ernel/module/internal.h | 4 +++-
> kernel/module/main.c | 5 -
> 2 files changed, 3 insertions(+), 6 deletions(-)
Reviewed-by: Aaron Tomlin
--
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
/?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 +---
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
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
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
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.
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
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
_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
/?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
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
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
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
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
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
/?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
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
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
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
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
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
/?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
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
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
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
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
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
28 matches
Mail list logo