Commit cbf7e949 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-fixes-for-linus' of...

Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: fix early panic on amd64 due to typo in supported CPU section
  x86, early_ioremap: fix fencepost error
  x86: avoid dereferencing beyond stack + THREAD_SIZE
parents 06270d5d cb58ffc3
...@@ -754,12 +754,12 @@ unsigned long get_wchan(struct task_struct *p) ...@@ -754,12 +754,12 @@ unsigned long get_wchan(struct task_struct *p)
if (!p || p == current || p->state == TASK_RUNNING) if (!p || p == current || p->state == TASK_RUNNING)
return 0; return 0;
stack = (unsigned long)task_stack_page(p); stack = (unsigned long)task_stack_page(p);
if (p->thread.sp < stack || p->thread.sp > stack+THREAD_SIZE) if (p->thread.sp < stack || p->thread.sp >= stack+THREAD_SIZE)
return 0; return 0;
fp = *(u64 *)(p->thread.sp); fp = *(u64 *)(p->thread.sp);
do { do {
if (fp < (unsigned long)stack || if (fp < (unsigned long)stack ||
fp > (unsigned long)stack+THREAD_SIZE) fp >= (unsigned long)stack+THREAD_SIZE)
return 0; return 0;
ip = *(u64 *)(fp+8); ip = *(u64 *)(fp+8);
if (!in_sched_functions(ip)) if (!in_sched_functions(ip))
......
...@@ -172,8 +172,8 @@ SECTIONS ...@@ -172,8 +172,8 @@ SECTIONS
.x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) { .x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) {
*(.x86_cpu_dev.init) *(.x86_cpu_dev.init)
} }
SECURITY_INIT
__x86_cpu_dev_end = .; __x86_cpu_dev_end = .;
SECURITY_INIT
. = ALIGN(8); . = ALIGN(8);
.parainstructions : AT(ADDR(.parainstructions) - LOAD_OFFSET) { .parainstructions : AT(ADDR(.parainstructions) - LOAD_OFFSET) {
......
...@@ -614,7 +614,7 @@ void __init *early_ioremap(unsigned long phys_addr, unsigned long size) ...@@ -614,7 +614,7 @@ void __init *early_ioremap(unsigned long phys_addr, unsigned long size)
*/ */
offset = phys_addr & ~PAGE_MASK; offset = phys_addr & ~PAGE_MASK;
phys_addr &= PAGE_MASK; phys_addr &= PAGE_MASK;
size = PAGE_ALIGN(last_addr) - phys_addr; size = PAGE_ALIGN(last_addr + 1) - phys_addr;
/* /*
* Mappings have to fit in the FIX_BTMAP area. * Mappings have to fit in the FIX_BTMAP area.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment