Re: [PATCH v5 1/6] module: Always have struct mod_tree_root

2022-02-22 Thread Aaron Tomlin
ernel/module/internal.h | 4 +++- > kernel/module/main.c | 5 - > 2 files changed, 3 insertions(+), 6 deletions(-) Reviewed-by: Aaron Tomlin -- Aaron Tomlin

[PATCH v4 0/3] sched: Always check the integrity of the canary

2014-09-12 Thread Aaron Tomlin
r Zijlstra Aaron Tomlin (3): init/main.c: Give init_task a canary sched: Add helper for task stack page overrun checking sched: BUG when stack end location is over written arch/powerpc/mm/fault.c| 5 + arch/x86/mm/fault.c| 5 + include/linux/sched.h | 4 i

[PATCH v4 1/3] init/main.c: Give init_task a canary

2014-09-12 Thread Aaron Tomlin
/?l=linux-kernel&m=127144305403241&w=2 Signed-off-by: Aaron Tomlin Acked-by: Michael Ellerman --- arch/powerpc/mm/fault.c| 3 +-- arch/x86/mm/fault.c| 3 +-- include/linux/sched.h | 2 ++ init/main.c| 1 + kernel/fork.c | 12 +---

[PATCH v4 2/3] sched: Add helper for task stack page overrun checking

2014-09-12 Thread Aaron Tomlin
This facility is used in a few places so let's introduce a helper function to improve code readability. Signed-off-by: Aaron Tomlin --- arch/powerpc/mm/fault.c| 4 +--- arch/x86/mm/fault.c| 4 +--- include/linux/sched.h | 2 ++ kernel/trace/trace_stack.c | 2 +- 4 files ch

[PATCH v4 3/3] sched: BUG when stack end location is over written

2014-09-12 Thread Aaron Tomlin
cannot be handled. This patch checks for a stack overrun and takes appropriate action since the damage is already done, there is no point in continuing. Signed-off-by: Aaron Tomlin --- kernel/sched/core.c | 3 +++ lib/Kconfig.debug | 12 2 files changed, 15 insertions(+) diff

Re: [PATCH v3 3/3] sched: BUG when stack end location is over written

2014-09-12 Thread Aaron Tomlin
On Fri, Sep 12, 2014 at 04:04:51PM +1000, Michael Ellerman wrote: > On Thu, 2014-09-11 at 16:41 +0100, Aaron Tomlin wrote: > > Currently in the event of a stack overrun a call to schedule() > > does not check for this type of corruption. This corruption is > > often silent

Re: [PATCH v3 3/3] sched: BUG when stack end location is over written

2014-09-12 Thread Aaron Tomlin
On Fri, Sep 12, 2014 at 02:06:57PM +1000, Michael Ellerman wrote: > On Thu, 2014-09-11 at 16:41 +0100, Aaron Tomlin wrote: > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > > index a285900..2a8280a 100644 > > --- a/lib/Kconfig.debug > > +++ b/lib/Kconfig.

Re: [PATCH v3 0/3] sched: Always check the integrity of the canary

2014-09-11 Thread Aaron Tomlin
On Thu, Sep 11, 2014 at 04:02:45PM +, David Laight wrote: > From: Aaron Tomlin > > Currently in the event of a stack overrun a call to schedule() > > does not check for this type of corruption. This corruption is > > often silent and can go unnoticed. However once the co

Re: [PATCH v3 0/3] sched: Always check the integrity of the canary

2014-09-11 Thread Aaron Tomlin
On Thu, Sep 11, 2014 at 05:53:03PM +0200, Peter Zijlstra wrote: > > What's with the threading all versions together? Please don't do that -- > also don't post a new version just for this though. Sorry about that. Noted. -- Aaron Tomlin

[PATCH v3 0/3] sched: Always check the integrity of the canary

2014-09-11 Thread Aaron Tomlin
_task - Oleg Nesterov * Fix various code formatting issues - Peter Zijlstra * Introduce Kconfig option - Peter Zijlstra Aaron Tomlin (3): init/main.c: Give init_task a canary sched: Add helper for task stack page overrun checking sched: BUG when stack end location is over written arch/power

[PATCH v3 1/3] init/main.c: Give init_task a canary

2014-09-11 Thread Aaron Tomlin
/?l=linux-kernel&m=127144305403241&w=2 Signed-off-by: Aaron Tomlin --- arch/powerpc/mm/fault.c| 3 +-- arch/x86/mm/fault.c| 3 +-- include/linux/sched.h | 2 ++ init/main.c| 1 + kernel/fork.c | 12 +--- kernel/trace/trace_stac

[PATCH v3 3/3] sched: BUG when stack end location is over written

2014-09-11 Thread Aaron Tomlin
cannot be handled. This patch checks for a stack overrun and takes appropriate action since the damage is already done, there is no point in continuing. Signed-off-by: Aaron Tomlin --- kernel/sched/core.c | 3 +++ lib/Kconfig.debug | 12 2 files changed, 15 insertions(+) diff

[PATCH v3 2/3] sched: Add helper for task stack page overrun checking

2014-09-11 Thread Aaron Tomlin
This facility is used in a few places so let's introduce a helper function to improve code readability. Signed-off-by: Aaron Tomlin --- arch/powerpc/mm/fault.c| 4 +--- arch/x86/mm/fault.c| 4 +--- include/linux/sched.h | 2 ++ kernel/trace/trace_stack.c | 2 +- 4 files ch

Re: [PATCH v2 1/3] init/main.c: Give init_task a canary

2014-09-11 Thread Aaron Tomlin
On Thu, Sep 11, 2014 at 07:23:45AM -0500, Chuck Ebbert wrote: > On Wed, 10 Sep 2014 14:29:33 +0100 > Aaron Tomlin wrote: > > > On Wed, Sep 10, 2014 at 02:26:54AM -0500, Chuck Ebbert wrote: > > > And has this been tested on parisc and metag, which use STACK_GROWSUP

Re: [PATCH v2 1/3] init/main.c: Give init_task a canary

2014-09-10 Thread Aaron Tomlin
On Wed, Sep 10, 2014 at 02:26:54AM -0500, Chuck Ebbert wrote: > On Tue, 9 Sep 2014 10:42:27 +0100 > Aaron Tomlin wrote: > > > +void task_stack_end_magic(struct task_struct *tsk) > > +{ > > + unsigned long *stackend; > > + > > + stackend

[PATCH v2 2/3] sched: Add helper for task stack page overrun checking

2014-09-09 Thread Aaron Tomlin
This facility is used in a few places so let's introduce a helper function to improve code readability. Signed-off-by: Aaron Tomlin --- arch/powerpc/mm/fault.c| 4 +--- arch/x86/mm/fault.c| 4 +--- include/linux/sched.h | 2 ++ kernel/trace/trace_stack.c | 2 +- 4 files ch

[PATCH v2 1/3] init/main.c: Give init_task a canary

2014-09-09 Thread Aaron Tomlin
/?l=linux-kernel&m=127144305403241&w=2 Signed-off-by: Aaron Tomlin --- arch/powerpc/mm/fault.c| 3 +-- arch/x86/mm/fault.c| 3 +-- include/linux/sched.h | 2 ++ init/main.c| 1 + kernel/fork.c | 12 +--- kernel/trace/trace_stac

[PATCH v2 3/3] sched: BUG when stack end location is over written

2014-09-09 Thread Aaron Tomlin
cannot be handled. This patch checks for a stack overrun and takes appropriate action since the damage is already done, there is no point in continuing. Signed-off-by: Aaron Tomlin --- kernel/sched/core.c | 4 lib/Kconfig.debug | 12 2 files changed, 16 insertions(+) diff

[PATCH v2 0/3] sched: Always check the integrity of the canary

2014-09-09 Thread Aaron Tomlin
e the damage is already done, there is no point in continuing. Changes since v1: * Rebased against v3.17-rc4 * Add a canary to init_task - Oleg Nesterov * Fix various code formatting issues - Peter Zijlstra * Introduce Kconfig option - Peter Zijlstra Aaron Tomlin (3): init/main.c: Give ini

[PATCH 3/3] sched: BUG when stack end location is over written

2014-09-08 Thread Aaron Tomlin
cannot be handled. This patch checks for a stack overrun and takes appropriate action since the damage is already done, there is no point in continuing. Signed-off-by: Aaron Tomlin --- kernel/sched/core.c | 4 lib/Kconfig.debug | 12 2 files changed, 16 insertions(+) diff

[PATCH v2 0/3] sched: Always check the integrity of the canary

2014-09-08 Thread Aaron Tomlin
nuing. Changes since v1: * Rebased against v3.17-rc4 * Add a canary to init_task - Oleg Nesterov * Fix various code formatting issues - Peter Zijlstra * Introduce Kconfig option - Peter Zijlstra Aaron Tomlin (3): init/main.c: Give init_task a canary sched: Add helper for task stack page ov

[PATCH 2/3] sched: Add helper for task stack page overrun checking

2014-09-08 Thread Aaron Tomlin
This facility is used in a few places so let's introduce a helper function to improve code readability. Signed-off-by: Aaron Tomlin --- arch/powerpc/mm/fault.c| 4 +--- arch/x86/mm/fault.c| 4 +--- include/linux/sched.h | 2 ++ kernel/trace/trace_stack.c | 2 +- 4 files ch

[PATCH 1/3] init/main.c: Give init_task a canary

2014-09-08 Thread Aaron Tomlin
/?l=linux-kernel&m=127144305403241&w=2 Signed-off-by: Aaron Tomlin --- arch/powerpc/mm/fault.c| 3 +-- arch/x86/mm/fault.c| 3 +-- include/linux/sched.h | 2 ++ init/main.c| 1 + kernel/fork.c | 12 +--- kernel/trace/trace_stac

Re: [PATCH 2/2] sched: BUG when stack end location is over written

2014-09-04 Thread Aaron Tomlin
On Thu, Sep 04, 2014 at 05:32:31PM +0200, Peter Zijlstra wrote: > On Thu, Sep 04, 2014 at 03:50:24PM +0100, Aaron Tomlin wrote: > > Currently in the event of a stack overrun a call to schedule() > > does not check for this type of corruption. This corruption is > > of

Re: [PATCH 1/2] sched: Add helper for task stack page overrun checking

2014-09-04 Thread Aaron Tomlin
On Thu, Sep 04, 2014 at 05:02:34PM +0200, Oleg Nesterov wrote: > On 09/04, Aaron Tomlin wrote: > > > > +#define task_stack_end_corrupted(task) \ > > + (*(end_of_stack(task)) != STACK_END_MAGIC) > > and it is always used along with "tsk != init_task&quo

[PATCH 2/2] sched: BUG when stack end location is over written

2014-09-04 Thread Aaron Tomlin
cannot be handled. This patch checks for a stack overrun and takes appropriate action since the damage is already done, there is no point in continuing. Signed-off-by: Aaron Tomlin --- kernel/sched/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/sched/core.c b/kernel/sched

[PATCH 0/2] sched: Always check the integrity of the canary

2014-09-04 Thread Aaron Tomlin
cannot be handled. The first patch provides a helper to determine the integrity of the canary. While the second patch checks for a stack overrun and takes appropriate action since the damage is already done, there is no point in continuing. Aaron Tomlin (2): sched: Add helper for task stack

[PATCH 1/2] sched: Add helper for task stack page overrun checking

2014-09-04 Thread Aaron Tomlin
This facility is used in a few places so let's introduce a helper function to improve readability. Signed-off-by: Aaron Tomlin --- arch/powerpc/mm/fault.c| 6 ++ arch/x86/mm/fault.c| 5 + include/linux/sched.h | 3 +++ kernel/trace/trace_stack.c | 5 ++--- 4