Re: [PATCH] uapi: avoid namespace conflict in linux/posix_types.h

From: Florian Weimer
Date: Fri Jun 07 2019 - 14:47:32 EST


* Linus Torvalds:

> If we're changing kernel header files, it's easy enough to change the
> kernel users. I'd be more worried about user space that *uses* that
> thing, and currently accesses 'val[]' by name.
>
> So the patch looks a bit odd to me. How are people supposed to use
> fsid_t if they can't look at it?

The problem is that the header was previously not used pervasively in
userspace headers. See commit a623a7a1a5670c25a16881f5078072d272d96b71
("y2038: fix socket.h header inclusion"). Very little code needed it
before.

On the glibc side, we nowadays deal with this by splitting headers
further. (We used to suppress definitions with macros, but that tended
to become convoluted.) In this case, moving the definition of
__kernel_long_t to its own header, so that
include/uapi/asm-generic/socket.h can include that should fix it.

> So now that I _do_ see the patch, there's no way I'll apply it.

Fair enough.

Thanks,
Florian