[lkml]   [2012]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Compat 32-bit syscall entry from 64-bit task!?
    On Fri, January 20, 2012 23:41, H. Peter Anvin wrote:
    > On 01/20/2012 02:40 PM, Roland McGrath wrote:
    >> If you change the size of a regset, then the new full size will be the size
    >> of the core file notes. Existing userland tools will not be expecting
    >> this, they expect a known exact size. If you need to add new stuff, it
    >> really is easier all around to add a new regset flavor. When adding a new
    >> one, you can make it variable-sized from the start so as to be extensible
    >> in the future. We did this for NT_X86_XSTATE, for example.
    > Yes, that definitely seems cleaner.

    I would prefer Linus' way of just stuffing it into cs. Jamie also wanted
    a bit telling in what mode the userspace is running. That's 3 bits in total,
    with one bit telling whether the other bits are valid or not. Anything else?
    Maybe a bit telling whether it is syscall entry or exit?

    As all this is very x86_64 specific and cs is already used to figure out
    the mode, it seems overkill to add a new regset just for this.

    It's a lot easier for existing code to add an extra cs check than to use
    different register sets and different ptrace commands. Considering that
    PTRACE_GETREGSET is undocumented it's likely that existing code isn't
    using it much.



     \ /
      Last update: 2012-01-21 00:53    [W:0.025 / U:91.992 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site