Re: siginfo pad problem.

From: Stephen Rothwell (sfr@canb.auug.org.au)
Date: Mon Jul 21 2003 - 18:51:05 EST


Hi Kurt,

On Mon, 21 Jul 2003 20:00:32 +0200 Kurt Roeckx <Q@ping.be> wrote:
>
> linux/types.h has:
> #ifdef __KERNEL__
> typedef __kernel_uid32_t uid_t;
> #else
> typedef __kernel_uid_t uid_t;
> #endif /* __KERNEL__ */
>
> And __kernel_uid_t is an "unsigned short"

Anywhere this should be used (i.e. only in the kernel), uid_t will be
__kernel_uid32_t. The change to this part of the siginfo_t structure has
not yet propogated to the glibc headers and when it does, it is up to the
glibc maintainers to make sure it matches what is used inside the kernel.

My extrapolation of your point leads me to ask why we even bother
with __KERNEL__ in the kernel's header files anymore since we keep
telling people that user mode programs should not use the kernel's
header files.

You are right that if a user mode program include the kernel's siginfo.h
(without defining __KERNEL__) it will not compile (on those architectures
where __kernel_uid_t is "unsigned short") but the answer I keep seeing
from this list is "Don't do that".

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:45 EST