]> git.baikalelectronics.ru Git - kernel.git/commit
fortify: Convert to struct vs member helpers
authorKees Cook <keescook@chromium.org>
Tue, 20 Sep 2022 02:50:32 +0000 (19:50 -0700)
committerKees Cook <keescook@chromium.org>
Mon, 26 Sep 2022 18:01:32 +0000 (11:01 -0700)
commit9317017a4a2e7ba6f4ee904645bdf40a785320f5
treebdfa15b9f30e2a59dc42ba63e9def20a6697206e
parent728c5fb05adac9c80ffedc0d695e2823f9719766
fortify: Convert to struct vs member helpers

In preparation for adding support for __builtin_dynamic_object_size(),
wrap each instance of __builtin_object_size(p, N) with either the new
__struct_size(p) as __bos(p, 0), or __member_size(p) as __bos(p, 1).
This will allow us to replace the definitions with __bdos() next.
There are no binary differences from this change.

Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Tom Rix <trix@redhat.com>
Cc: linux-hardening@vger.kernel.org
Cc: llvm@lists.linux.dev
Link: https://lore.kernel.org/lkml/20220920192202.190793-4-keescook@chromium.org
Signed-off-by: Kees Cook <keescook@chromium.org>
include/linux/fortify-string.h