[Ksummit-discuss] UAPI headers and inline function policy
David Howells
dhowells at redhat.com
Mon Jan 23 11:20:25 UTC 2017
I noticed that include/uapi/linux/cec.h and cec-funcs.h export a bunch of
inline functions to userspace. I think that the following should possibly be
prohibited in kernel UAPI headers:
(1) Inline functions and function declarations.
(2) Anonymous embedded structs and unions.
(3) Conditionals, other than re-inclusion guards and C++ guards. Definitely
no dependencies on CONFIG_* or __ARCH_* or __KERNEL__. Ideally, we
should be able to copy the headers as-are to /usr/include/ without the
need to run them through a filter.
(4) The extern keyword - except when used in a C++ guard.
Now, we already have some violations of these that we probably can't get rid
of, but anything added in the last merge window we probably can deal with.
Thoughts?
David
More information about the Ksummit-discuss
mailing list