Sami Tolvanen
f344424f3c
ANDROID: add support for clang Shadow Call Stack (SCS)
...
This change adds generic support for clang's Shadow Call Stack, which
uses a shadow stack to protect return addresses from being overwritten
by an attacker. Details are available here:
https://clang.llvm.org/docs/ShadowCallStack.html
Bug: 112277034
Change-Id: Idd553b7c978b0673ab533a68980fb9a654f4510c
Signed-off-by: Sami Tolvanen <samitolvanen@google.com >
2018-11-09 08:44:42 -08:00
Sami Tolvanen
ddab5886dd
Revert "add support for clang SafeStack"
...
This reverts commit 26a804d93d .
Bug: 112277034
Change-Id: I3c2a293fbb82858acf06559cbb2755eeba0caa8a
Signed-off-by: Sami Tolvanen <samitolvanen@google.com >
2018-10-17 08:17:42 -07:00
Sami Tolvanen
26a804d93d
add support for clang SafeStack
...
This change adds support for clang SafeStack, which protects function
return addresses against attacks based on stack buffer overflows:
https://clang.llvm.org/docs/SafeStack.html
SafeStack splits the kernel stack into safe and unsafe parts. Safe
stack is used only for data that's at compile time determined to be
only accessed in a safe way. This prevents a buffer overflow in the
unsafe stack from overwriting any data in the safe stack, including
the return address.
Bug: 67506682
Bug: 67507327
Change-Id: I6ce8dbf80dfd8a97d16e049531bba900eb8699b3
Signed-off-by: Sami Tolvanen <samitolvanen@google.com >
2018-02-12 09:41:58 -08:00
Andy Lutomirski
c65eacbe29
sched/core: Allow putting thread_info into task_struct
...
If an arch opts in by setting CONFIG_THREAD_INFO_IN_TASK_STRUCT,
then thread_info is defined as a single 'u32 flags' and is the first
entry of task_struct. thread_info::task is removed (it serves no
purpose if thread_info is embedded in task_struct), and
thread_info::cpu gets its own slot in task_struct.
This is heavily based on a patch written by Linus.
Originally-from: Linus Torvalds <torvalds@linux-foundation.org >
Signed-off-by: Andy Lutomirski <luto@kernel.org >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Jann Horn <jann@thejh.net >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/a0898196f0476195ca02713691a5037a14f2aac5.1473801993.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2016-09-15 08:25:13 +02:00
Clark Williams
8bd75c77b7
sched/rt: Move rt specific bits into new header file
...
Move rt scheduler definitions out of include/linux/sched.h into
new file include/linux/sched/rt.h
Signed-off-by: Clark Williams <williams@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Link: http://lkml.kernel.org/r/20130207094707.7b9f825f@riff.lan
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-02-07 20:51:08 +01:00
Clark Williams
cf4aebc292
sched: Move sched.h sysctl bits into separate header
...
Move the sysctl-related bits from include/linux/sched.h into
a new file: include/linux/sched/sysctl.h. Then update source
files requiring access to those bits by including the new
header file.
Signed-off-by: Clark Williams <williams@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Link: http://lkml.kernel.org/r/20130207094659.06dced96@riff.lan
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-02-07 20:50:54 +01:00
Thomas Gleixner
a4a2eb490e
init_task: Create generic init_task instance
...
All archs define init_task in the same way (except ia64, but there is
no particular reason why ia64 cannot use the common version). Create a
generic instance so all archs can be converted over.
The config switch is temporary and will be removed when all archs are
converted over.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org >
Cc: Chen Liqin <liqin.chen@sunplusct.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Chris Zankel <chris@zankel.net >
Cc: David Howells <dhowells@redhat.com >
Cc: David S. Miller <davem@davemloft.net >
Cc: Geert Uytterhoeven <geert@linux-m68k.org >
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn >
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com >
Cc: Hirokazu Takata <takata@linux-m32r.org >
Cc: James E.J. Bottomley <jejb@parisc-linux.org >
Cc: Jesper Nilsson <jesper.nilsson@axis.com >
Cc: Jonas Bonn <jonas@southpole.se >
Cc: Mark Salter <msalter@redhat.com >
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com >
Cc: Heiko Carstens <heiko.carstens@de.ibm.com >
Cc: Matt Turner <mattst88@gmail.com >
Cc: Michal Simek <monstr@monstr.eu >
Cc: Mike Frysinger <vapier@gentoo.org >
Cc: Paul Mundt <lethal@linux-sh.org >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Richard Kuo <rkuo@codeaurora.org >
Cc: Richard Weinberger <richard@nod.at >
Cc: Russell King <linux@arm.linux.org.uk >
Cc: Yoshinori Sato <ysato@users.sourceforge.jp >
Link: http://lkml.kernel.org/r/20120503085034.092585287@linutronix.de
2012-05-05 13:00:21 +02:00