aboutsummaryrefslogtreecommitdiff
path: root/include/linux/compiler-gcc.h
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2021-06-17 22:48:05 -0700
committerKees Cook <[email protected]>2021-09-25 08:20:49 -0700
commitc80d92fbb67b2c80b8eeb8759ee79d676eb33520 (patch)
tree1a3310f4a7976cc5b7b3d9ade2069188eb7dca90 /include/linux/compiler-gcc.h
parent8610047ca89f4855ae0546dfc8db122d28deb50d (diff)
compiler_types.h: Remove __compiletime_object_size()
Since all compilers support __builtin_object_size(), and there is only one user of __compiletime_object_size, remove it to avoid the needless indirection. This lets Clang reason about check_copy_size() correctly. Link: https://github.com/ClangBuiltLinux/linux/issues/1179 Suggested-by: Nick Desaulniers <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Nick Desaulniers <[email protected]> Cc: Sedat Dilek <[email protected]> Cc: Will Deacon <[email protected]> Cc: Marco Elver <[email protected]> Cc: Arvind Sankar <[email protected]> Cc: Masahiro Yamada <[email protected]> Cc: Luc Van Oostenryck <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Sami Tolvanen <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Gabriel Krisman Bertazi <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Oleg Nesterov <[email protected]> Reviewed-by: Miguel Ojeda <[email protected]> Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'include/linux/compiler-gcc.h')
-rw-r--r--include/linux/compiler-gcc.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index bd2b881c6b63..9957085b8148 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -41,8 +41,6 @@
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
-#define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
-
#if defined(LATENT_ENTROPY_PLUGIN) && !defined(__CHECKER__)
#define __latent_entropy __attribute__((latent_entropy))
#endif