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
70#define __counted_by_be(m)70#define __counted_by_be(m)
71#endif71#endif
72 72
73#ifdef __KERNEL__
74#define __kernel_nonstring __nonstring
75#else
76#define __kernel_nonstring
77#endif
78
73#endif /* _UAPI_LINUX_STDDEF_H */79#endif /* _UAPI_LINUX_STDDEF_H */