Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

uapi: stddef.h: Introduce __kernel_nonstring

In order to annotate byte arrays in UAPI that are not C strings (i.e.
they may not be NUL terminated), the "nonstring" attribute is needed.
However, we can't expose this to userspace as it is compiler version
specific.

Signed-off-by: Kees Cook <kees@kernel.org>

+6
+6
include/uapi/linux/stddef.h
··· 70 70 #define __counted_by_be(m) 71 71 #endif 72 72 73 + #ifdef __KERNEL__ 74 + #define __kernel_nonstring __nonstring 75 + #else 76 + #define __kernel_nonstring 77 + #endif 78 + 73 79 #endif /* _UAPI_LINUX_STDDEF_H */