Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136355
b: refs/heads/master
c: 113c541
h: refs/heads/master
i:
  136353: 87b0c2d
  136351: e17dafd
v: v3
  • Loading branch information
Ingo Molnar authored and Thomas Gleixner committed May 26, 2008
1 parent 98f70c2 commit f4e8a00
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 960a672bd9f1ec06e8f197cf81a50fd07ea02e7f
refs/heads/master: 113c5413cf9051cc50b88befdc42e3402bb92115
22 changes: 9 additions & 13 deletions trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1140,30 +1140,26 @@ config SECCOMP

If unsure, say Y. Only embedded should say N here.

config CC_STACKPROTECTOR_ALL
bool

config CC_STACKPROTECTOR
bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
depends on X86_64
select CC_STACKPROTECTOR_ALL
help
This option turns on the -fstack-protector GCC feature. This
feature puts, at the beginning of critical functions, a canary
value on the stack just before the return address, and validates
This option turns on the -fstack-protector GCC feature. This
feature puts, at the beginning of functions, a canary value on
the stack just before the return address, and validates
the value just before actually returning. Stack based buffer
overflows (that need to overwrite this return address) now also
overwrite the canary, which gets detected and the attack is then
neutralized via a kernel panic.

This feature requires gcc version 4.2 or above, or a distribution
gcc with the feature backported. Older versions are automatically
detected and for those versions, this configuration option is ignored.

config CC_STACKPROTECTOR_ALL
bool "Use stack-protector for all functions"
depends on CC_STACKPROTECTOR
default y
help
Normally, GCC only inserts the canary value protection for
functions that use large-ish on-stack buffers. By enabling
this option, GCC will be asked to do this for ALL functions.
detected and for those versions, this configuration option is
ignored. (and a warning is printed during bootup)

source kernel/Kconfig.hz

Expand Down

0 comments on commit f4e8a00

Please sign in to comment.