lkml.org 
[lkml]   [2015]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: nios2: is the ptrace ABI correct?
    Date
    On Tuesday 24 February 2015 12:28:41 Ezequiel Garcia wrote:
    >
    > Gah, no, you are right. I got confused.
    >
    > So it would be OK to avoid remove pt_regs from the uapi headers?
    > How does this affect the signal handling nios2 implementation?
    >

    We have a number of architectures that don't provide this structure:

    $ git grep -L pt_regs arch/*/include/uapi/asm/ptrace.h
    arch/frv/include/uapi/asm/ptrace.h
    arch/metag/include/uapi/asm/ptrace.h
    arch/openrisc/include/uapi/asm/ptrace.h
    arch/s390/include/uapi/asm/ptrace.h

    so I'd assume it's ok in general not to have it. However, on
    nios2, struct pt_regs is embedded inside of struct sigcontext.
    If I read the code in arch/nios2/kernel/signal.c correctly,
    this is actually a bug and you should use a different structure
    there too, because pt_regs does not match the layout of the
    stack either. This means that the (rare) user programs that
    would know about the architecture to modify signal stacks
    are currently broken.

    Arnd


    \
     
     \ /
      Last update: 2015-02-24 20:41    [W:2.369 / U:0.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site