• Eric W. Biederman's avatar
    signal/ia64: Use the generic force_sigsegv in setup_frame · 8b9c6b28
    Eric W. Biederman authored
    The ia64 handling of failure to setup a signal frame has been trying
    to set overlapping fields in struct siginfo since 2.3.43.  The si_pid
    and si_uid fields are stomped when the si_addr field is set.  The
    si_code of SI_KERNEL indicates that si_pid and si_uid should be valid,
    and that si_addr does not exist.
    
    Being at odds with the definition of SI_KERNEL and with nothing to
    indicate that this was a signal frame setup failure there is no way
    for userspace to know that si_addr was filled out instead.
    
    In practice failure to setup a signal frame is rare, and si_pid and
    si_uid are always set to 0 when si_code is SI_KERNEL so I expect no
    one has looked closely enough before to see this weirdness.  Further
    the only difference between force_sigsegv_info and the generic
    force_sigsegv other than the return code is that force_sigsegv_info
    stomps the si_uid and si_pid fields.
    
    Remove the bug and simplify the code by using force_sigsegv in this
    case just like other architectures.
    
    Fixes: 2.3.43
    Cc: Tony Luck <tony.luck@intel.com>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    Cc: linux-ia64@vger.kernel.org
    Acked-by: default avatarTony Luck <tony.luck@intel.com>
    Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
    8b9c6b28
signal.c 13.6 KB