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.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -70,4 +70,10 @@ · 69 unmodified lines | ||
| 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 */ |