[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1410506936.17540.7.camel@concordia>
Date: Fri, 12 Sep 2014 17:28:56 +1000
From: Michael Ellerman <mpe@...erman.id.au>
To: Aaron Tomlin <atomlin@...hat.com>
Cc: peterz@...radead.org, dzickus@...hat.com, jcastillo@...hat.com,
riel@...hat.com, x86@...nel.org, akpm@...ux-foundation.org,
minchan@...nel.org, bmr@...hat.com, prarit@...hat.com,
oleg@...hat.com, rostedt@...dmis.org, linux-kernel@...r.kernel.org,
hannes@...xchg.org, mingo@...hat.com,
aneesh.kumar@...ux.vnet.ibm.com, akpm@...gle.com, jgh@...hat.com,
linuxppc-dev@...ts.ozlabs.org, tglx@...utronix.de,
pzijlstr@...hat.com
Subject: Re: [PATCH v3 1/3] init/main.c: Give init_task a canary
On Thu, 2014-09-11 at 16:41 +0100, Aaron Tomlin wrote:
> Tasks get their end of stack set to STACK_END_MAGIC with the
> aim to catch stack overruns. Currently this feature does not
> apply to init_task. This patch removes this restriction.
>
> diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
> index 51ab9e7..35d0760c 100644
> --- a/arch/powerpc/mm/fault.c
> +++ b/arch/powerpc/mm/fault.c
> @@ -30,7 +30,6 @@
> #include <linux/kprobes.h>
> #include <linux/kdebug.h>
> #include <linux/perf_event.h>
> -#include <linux/magic.h>
> #include <linux/ratelimit.h>
> #include <linux/context_tracking.h>
>
> @@ -538,7 +537,7 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
> regs->nip);
>
> stackend = end_of_stack(current);
> - if (current != &init_task && *stackend != STACK_END_MAGIC)
> + if (*stackend != STACK_END_MAGIC)
> printk(KERN_ALERT "Thread overran stack, or stack corrupted\n");
This part looks fine.
Acked-by: Michael Ellerman <mpe@...erman.id.au>
cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists