Re: sizeof (siginfo_t) problem

Jakub Jelinek (jakub@redhat.com)
Mon, 14 Jul 2003 13:45:55 -0400


On Tue, Jul 15, 2003 at 03:25:52AM +1000, Stephen Rothwell wrote:
> > Then that pad needs to be #ifdef __s390x__ as well.
>
> But why pad at all since we have now increased the size of the siginfo
> structure in the 64bit case (maybe I am being thick as it is 3:25am here
> :-)).

Decreased, from 136 bytes when __ARCH_SI_PREAMBLE_SIZE is (3 * sizeof(int))
to 128 bytes with (4 * sizeof(int)).
The pad in rt_sigframe is certainly open for discussion. GCC does on s390x:
struct ucontext_ \
{ \
unsigned long uc_flags; \
struct ucontext_ *uc_link; \
unsigned long uc_stack[3]; \
sigregs_ uc_mcontext; \
} *uc_ = (CONTEXT)->cfa + 8 + 128; \
\
regs_ = &uc_->uc_mcontext; \
(128 stands for sizeof(siginfo_t)).
This means it does not work on any kernels so far, if we don't add a pad
to the kernel and just fix __ARCH_SI_PREAMBLE_SIZE on s390x, then GCC
will suddenly work with all newer kernels but will never work with older
kernels.
If pad is added to the kernel at the same time as __ARCH_SI_PREAMBLE_SIZE
is increased, it would need to be added to GCC as well, so older GCCs
would not work on any kernels while patched/newer GCCs would work on all
kernels.

Jakub
-
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/