• Benjamin Herrenschmidt's avatar
    [PATCH] ppc64: siginfo conversion fix · b4389817
    Benjamin Herrenschmidt authored
    My message queue patch fixes the 64 bits -> 32 bits conversion of
    siginfo, but didn't change the 32 -> 64 bits conversion done in
    sys32_rt_sigqueueinfo() which was apparently bogus as well.
    
    After much discussion & debate on the right way of converting that
    structure, I decided to go the sparc64 / s390 way, and not the x86_64
    way, that is to copy the various unions data "as is". This guarantees
    that whatever a 32 bist app passes there, another 32 bits app will
    understand it. Crossover between 32 and 64 bits apps on such things
    as home-made userland siginfo isn't something we can help with anyway.
    
    The x86_64 choice of converting as if it was an RT signal, thus
    converting the sigval, cannot easily be applied to big endian archs
    since the sigval is a union of a ptr and an int, on BE, the int
    happens to be on the wrong half of the 64 bits ptr, thus  we can't
    do a simple conversion.
    b4389817
signal32.c 27.3 KB