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

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.debug @@ -824,6 +824,18 @@ config

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 and can go unnoticed. However

[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 atom...@redhat.com --- kernel/sched/core.c | 3 +++ lib/Kconfig.debug | 12 2 files changed, 15

[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 atom...@redhat.com --- arch/powerpc/mm/fault.c| 4 +--- arch/x86/mm/fault.c| 4 +--- include/linux/sched.h | 2 ++ kernel/trace/trace_stack.c | 2

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

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

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

2014-09-12 Thread Aaron Tomlin
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 init/main.c

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 atom...@redhat.com 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 ? I can't see how

[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 atom...@redhat.com --- arch/powerpc/mm/fault.c| 4 +--- arch/x86/mm/fault.c| 4 +--- include/linux/sched.h | 2 ++ kernel/trace/trace_stack.c | 2

[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 atom...@redhat.com --- kernel/sched/core.c | 3 +++ lib/Kconfig.debug | 12 2 files changed, 15

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

2014-09-11 Thread Aaron Tomlin
/?l=linux-kernelm=127144305403241w=2 Signed-off-by: Aaron Tomlin atom...@redhat.com --- 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

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

2014-09-11 Thread Aaron Tomlin
- 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/powerpc/mm

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 ___ Linuxppc-dev

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 corrupted region is examined

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 atom...@redhat.com wrote: +void task_stack_end_magic(struct task_struct *tsk) +{ + unsigned long *stackend; + + stackend = end_of_stack(tsk); + *stackend

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

2014-09-09 Thread Aaron Tomlin
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 init_task a canary

[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 atom...@redhat.com --- kernel/sched/core.c | 4 lib/Kconfig.debug | 12 2 files changed, 16

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

2014-09-09 Thread Aaron Tomlin
/?l=linux-kernelm=127144305403241w=2 Signed-off-by: Aaron Tomlin atom...@redhat.com --- 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

[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 atom...@redhat.com --- arch/powerpc/mm/fault.c| 4 +--- arch/x86/mm/fault.c| 4 +--- include/linux/sched.h | 2 ++ kernel/trace/trace_stack.c | 2

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

2014-09-08 Thread Aaron Tomlin
/?l=linux-kernelm=127144305403241w=2 Signed-off-by: Aaron Tomlin atom...@redhat.com --- 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

[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 atom...@redhat.com --- arch/powerpc/mm/fault.c| 4 +--- arch/x86/mm/fault.c| 4 +--- include/linux/sched.h | 2 ++ kernel/trace/trace_stack.c | 2

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

2014-09-08 Thread Aaron Tomlin
. 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 overrun

[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 atom...@redhat.com --- kernel/sched/core.c | 4 lib/Kconfig.debug | 12 2 files changed, 16

[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 atom...@redhat.com --- arch/powerpc/mm/fault.c| 6 ++ arch/x86/mm/fault.c| 5 + include/linux/sched.h | 3 +++ kernel/trace/trace_stack.c | 5

[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 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 atom...@redhat.com --- kernel/sched/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/sched

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. But why we exclude swapper/0? Can't we add

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 often silent and can go unnoticed