History

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.

Kees Cook committed 1 year ago

Commit 3407caa1 parent c0e1d461 file · +6 −0Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/stddef.h+6−0
@@ -70,4 +70,10 @@ · 69 unmodified lines
7070 #define __counted_by_be(m)
7171 #endif
7272
73+#ifdef __KERNEL__
74+#define __kernel_nonstring __nonstring
75+#else
76+#define __kernel_nonstring
77+#endif
78+
7379 #endif /* _UAPI_LINUX_STDDEF_H */