diff options
author | Kees Cook <keescook@chromium.org> | 2022-02-08 14:53:48 -0800 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2022-02-13 16:50:07 -0800 |
commit | 92df138a8d663cefebc3124041253677a53c92cf (patch) | |
tree | 9dd830cc3b8666120e5658642a1583bdf2ac1a9b /include/linux/compiler_attributes.h | |
parent | 0a2b782a00f33e7d06dc43d099fa071ae97bee77 (diff) |
fortify: Use __diagnose_as() for better diagnostic coverage
In preparation for using Clang's __pass_object_size, add __diagnose_as()
attributes to mark the functions as being the same as the indicated
builtins. When __daignose_as() is available, Clang will have a more
complete ability to apply its own diagnostic analysis to callers of these
functions, as if they were the builtins themselves. Without __diagnose_as,
Clang's compile time diagnostic messages won't be as precise as they
could be, but at least users of older toolchains will still benefit from
having fortified routines.
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20220208225350.1331628-7-keescook@chromium.org
Diffstat (limited to 'include/linux/compiler_attributes.h')
0 files changed, 0 insertions, 0 deletions