aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_iface.c
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2022-02-08 14:53:49 -0800
committerKees Cook <[email protected]>2022-02-13 16:50:07 -0800
commit67ebc3ab446230c77fe3b545a9d8a11cac1cfb6e (patch)
tree712643fdda5c0f50442eb4d9238daaa2035be71f /net/lapb/lapb_iface.c
parent92df138a8d663cefebc3124041253677a53c92cf (diff)
fortify: Make sure strlen() may still be used as a constant expression
In preparation for enabling Clang FORTIFY_SOURCE support, redefine strlen() as a macro that tests for being a constant expression so that strlen() can still be used in static initializers, which is lost when adding __pass_object_size and __overloadable. An example of this usage can be seen here: https://lore.kernel.org/all/[email protected]/ Notably, this constant expression feature of strlen() is not available for architectures that build with -ffreestanding. This means the kernel currently does not universally expect strlen() to be used this way, but since there _are_ some build configurations that depend on it, retain the characteristic for Clang FORTIFY_SOURCE builds too. Signed-off-by: Kees Cook <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions