[PATCH] ppc32: removed usage of <asm/segment.h>

Miklos Szeredi miklos at szeredi.hu
Wed Aug 17 19:15:39 EST 2005

> > There are perfectly valid uses of kernel headers from userspace.  For
> > example if a program uses the netlink interface, it should include
> > <linux/netlink.h>.  It's the interface definition after all.
> > 
> > Glibc headers also include <linux/*> and <asm/*> in quite few places.
> But these files in /usr/include/ aren't provided by the kernel anymore.

They are provided by _one_ kernel, not necessarily the running kernel.

That doesn't make them any less a kernel header.

So if some userspace program depends on header <linux/x.h> to get the
interface definition for feature x, and you remove <linux/x.h> from
the current kernel, it _will_ break the userspace program some time
later, when glibc picks up the new kernel.

Having said that that, <asm/segment.h> may or may not be validly
exported to userspace.


More information about the Linuxppc-dev mailing list