Andy Lutomirski
f56141e3e2
all arches, signal: move restart_block to struct task_struct
...
If an attacker can cause a controlled kernel stack overflow, overwriting
the restart block is a very juicy exploit target. This is because the
restart_block is held in the same memory allocation as the kernel stack.
Moving the restart block to struct task_struct prevents this exploit by
making the restart_block harder to locate.
Note that there are other fields in thread_info that are also easy
targets, at least on some architectures.
It's also a decent simplification, since the restart code is more or less
identical on all architectures.
[[email protected] : metag: align thread_info::supervisor_stack]
Signed-off-by: Andy Lutomirski <[email protected] >
Cc: Thomas Gleixner <[email protected] >
Cc: Al Viro <[email protected] >
Cc: "H. Peter Anvin" <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Kees Cook <[email protected] >
Cc: David Miller <[email protected] >
Acked-by: Richard Weinberger <[email protected] >
Cc: Richard Henderson <[email protected] >
Cc: Ivan Kokshaysky <[email protected] >
Cc: Matt Turner <[email protected] >
Cc: Vineet Gupta <[email protected] >
Cc: Russell King <[email protected] >
Cc: Catalin Marinas <[email protected] >
Cc: Will Deacon <[email protected] >
Cc: Haavard Skinnemoen <[email protected] >
Cc: Hans-Christian Egtvedt <[email protected] >
Cc: Steven Miao <[email protected] >
Cc: Mark Salter <[email protected] >
Cc: Aurelien Jacquiot <[email protected] >
Cc: Mikael Starvik <[email protected] >
Cc: Jesper Nilsson <[email protected] >
Cc: David Howells <[email protected] >
Cc: Richard Kuo <[email protected] >
Cc: "Luck, Tony" <[email protected] >
Cc: Geert Uytterhoeven <[email protected] >
Cc: Michal Simek <[email protected] >
Cc: Ralf Baechle <[email protected] >
Cc: Jonas Bonn <[email protected] >
Cc: "James E.J. Bottomley" <[email protected] >
Cc: Helge Deller <[email protected] >
Cc: Benjamin Herrenschmidt <[email protected] >
Cc: Paul Mackerras <[email protected] >
Acked-by: Michael Ellerman <[email protected] > (powerpc)
Tested-by: Michael Ellerman <[email protected] > (powerpc)
Cc: Martin Schwidefsky <[email protected] >
Cc: Heiko Carstens <[email protected] >
Cc: Chen Liqin <[email protected] >
Cc: Lennox Wu <[email protected] >
Cc: Chris Metcalf <[email protected] >
Cc: Guan Xuetao <[email protected] >
Cc: Chris Zankel <[email protected] >
Cc: Max Filippov <[email protected] >
Cc: Oleg Nesterov <[email protected] >
Cc: Guenter Roeck <[email protected] >
Signed-off-by: James Hogan <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
Signed-off-by: Linus Torvalds <[email protected] >
2015-02-12 18:54:12 -08:00
Thomas Gleixner
00d1a39e69
preempt: Make PREEMPT_ACTIVE generic
...
No point in having this bit defined by architecture.
Signed-off-by: Thomas Gleixner <[email protected] >
Acked-by: Peter Zijlstra <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
2013-11-13 20:21:47 +01:00
Al Viro
16a8016372
sanitize tsk_is_polling()
...
Make default just return 0. The current default (checking
TIF_POLLING_NRFLAG) is taken to architectures that need it;
ones that don't do polling in their idle threads don't need
to defined TIF_POLLING_NRFLAG at all.
ia64 defined both TS_POLLING (used by its tsk_is_polling())
and TIF_POLLING_NRFLAG (not used at all). Killed the latter...
Signed-off-by: Al Viro <[email protected] >
2012-10-01 09:58:13 -04:00
Al Viro
c6802f4370
um: bury unused _TIF_RESTORE_SIGMASK
...
Signed-off-by: Al Viro <[email protected] >
2012-05-21 14:22:25 -04:00
Al Viro
d50349b0c3
um: add TIF_NOTIFY_RESUME
...
Signed-off-by: Al Viro <[email protected] >
2012-05-21 14:19:53 -04:00
Tejun Heo
d88e4cb671
freezer: remove now unused TIF_FREEZE
...
Signed-off-by: Tejun Heo <[email protected] >
Cc: Arnd Bergmann <[email protected] >
Cc: [email protected]
2011-11-21 12:32:25 -08:00
Richard Weinberger
534e3adbd2
um: adjust current_thread_info() for newer gcc versions
...
In some cases gcc >= 4.5.2 will optimize away current_thread_info(). To
prevent gcc from doing so the stack address has to be obtained via inline
asm.
Signed-off-by: Richard Weinberger <[email protected] >
Acked-by: Kirill A. Shutemov <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
Signed-off-by: Linus Torvalds <[email protected] >
2011-04-28 11:28:21 -07:00
Andreas Dilger
0ddc9324b1
add descriptive comment for TIF_MEMDIE task flag declaration.
...
Signed-off-by: Andreas Dilger <[email protected] >
Acked-by: KOSAKI Motohiro <[email protected] >
Signed-off-by: Jiri Kosina <[email protected] >
2010-05-14 11:13:27 +02:00
Peter Zijlstra
c99e6efe1b
sched: INIT_PREEMPT_COUNT
...
Pull the initial preempt_count value into a single
definition site.
Maintainers for: alpha, ia64 and m68k, please have a look,
your arch code is funny.
The header magic is a bit odd, but similar to the KERNEL_DS
one, CPP waits with expanding these macros until the
INIT_THREAD_INFO macro itself is expanded, which is in
arch/*/kernel/init_task.c where we've already included
sched.h so we're good.
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Peter Zijlstra <[email protected] >
Acked-by: Matt Mackall <[email protected] >
Signed-off-by: Linus Torvalds <[email protected] >
2009-07-10 14:24:05 -07:00
Al Viro
8ede0bdb63
x86, um: initial part of asm-um move
...
Signed-off-by: Al Viro <[email protected] >
Signed-off-by: H. Peter Anvin <[email protected] >
2008-10-22 22:55:19 -07:00