aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/vmalloc.c
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2024-08-05 21:43:44 +0000
committerKees Cook <[email protected]>2024-08-23 00:04:43 +0000
commit559048d156ff3391c4b793779a824c9193e20442 (patch)
treea05e8cf71ae1b3814c1c59f8f316beb1e9b58ebf /rust/helpers/vmalloc.c
parentmedia: venus: hfi_cmds: struct hfi_session_release_buffer_pkt: Add __counted_... (diff)
downloadkernel-559048d156ff3391c4b793779a824c9193e20442.tar.gz
kernel-559048d156ff3391c4b793779a824c9193e20442.zip
string: Check for "nonstring" attribute on strscpy() arguments
GCC already checks for arguments that are marked with the "nonstring"[1] attribute when used on standard C String API functions (e.g. strcpy). Gain this compile-time checking also for the kernel's primary string copying function, strscpy(). Note that Clang has neither "nonstring" nor __builtin_has_attribute(). Link: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#index-nonstring-variable-attribute [1] Reviewed-by: Miguel Ojeda <[email protected]> Tested-by: Miguel Ojeda <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'rust/helpers/vmalloc.c')
0 files changed, 0 insertions, 0 deletions