Re: Correct way to include siginfo.h?

From: Kees Cook
Date: Thu Mar 29 2012 - 14:13:26 EST

On Thu, Mar 29, 2012 at 10:58 AM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> On 03/27/2012 11:01 AM, Kees Cook wrote:
>> No, siginfo, IIUC, is defined to be SI_MAX_SIZE bytes. The union for
>> seccomp (on SIGSYS) just uses a long and 2 ints. It'd be nice for
>> there to be a stable way to get the kernel's siginfo instead of
>> glibc's.
> Make it safe for the kernel to export and make glibc use the kernel's
> version, just like everything else...

We'll have to poke the glibc folks. In the meantime, Will Drewry found
a stable way to handle this. Just make the first set of includes and
defines be:

#include <asm/siginfo.h>
#define __have_siginfo_t 1
#define __have_sigval_t 1
#define __have_sigevent_t 1

Then the glibc includes won't attempt the redefinition.


Kees Cook
Chrome OS Security
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at