summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarey Williams <carey.williams@arm.com>2018-12-17 10:11:35 +0000
committerCarey Williams <carey.williams@arm.com>2018-12-17 10:11:35 +0000
commitd94b0f62cf9e771455fc74354152dafa697c4a33 (patch)
treebf4c8663399696748942777703b7a867719e5eff
parent884deed1b383b869b0e785a2fa5a823bfd4d00e3 (diff)
downloadbcm5719-llvm-d94b0f62cf9e771455fc74354152dafa697c4a33.tar.gz
bcm5719-llvm-d94b0f62cf9e771455fc74354152dafa697c4a33.zip
[Docs] Expand -fstack-protector and -fstack-protector-all
Improve the description of these command line options by providing specific heuristic information, as outlined for the ssp function attribute(s) in LLVM's documentation. Also rewords -fstack-protector-all for affinity. Differential Revision: https://reviews.llvm.org/D55428 llvm-svn: 349335
-rw-r--r--clang/include/clang/Driver/Options.td13
1 files changed, 10 insertions, 3 deletions
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index acf82c5ab20..50aa0833e1b 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -1639,11 +1639,18 @@ def fno_signed_char : Flag<["-"], "fno-signed-char">, Group<f_Group>,
Flags<[CC1Option]>, HelpText<"Char is unsigned">;
def fsplit_stack : Flag<["-"], "fsplit-stack">, Group<f_Group>;
def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group<f_Group>,
- HelpText<"Force the usage of stack protectors for all functions">;
+ HelpText<"Enable stack protectors for all functions">;
def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, Group<f_Group>,
- HelpText<"Use a strong heuristic to apply stack protectors to functions">;
+ HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. "
+ "Compared to -fstack-protector, this uses a stronger heuristic "
+ "that includes functions containing arrays of any size (and any type), "
+ "as well as any calls to alloca or the taking of an address from a local variable">;
def fstack_protector : Flag<["-"], "fstack-protector">, Group<f_Group>,
- HelpText<"Enable stack protectors for functions potentially vulnerable to stack smashing">;
+ HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. "
+ "This uses a loose heuristic which considers functions vulnerable "
+ "if they contain a char (or 8bit integer) array or constant sized calls to "
+ "alloca, which are of greater size than ssp-buffer-size (default: 8 bytes). "
+ "All variable sized calls to alloca are considered vulnerable">;
def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group<f_Group>, Flags<[CoreOption]>,
HelpText<"Emit full debug info for all types used by the program">;
def fno_standalone_debug : Flag<["-"], "fno-standalone-debug">, Group<f_Group>, Flags<[CoreOption]>,
OpenPOWER on IntegriCloud