lkml.org 
[lkml]   [2012]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: Compat 32-bit syscall entry from 64-bit task!? [was: Re: [RFC,PATCH 1/2] seccomp_filters: system call filtering using BPF]
    On Wed, Jan 18, 2012 at 5:06 PM, Indan Zupancic <indan@nul.nu> wrote:
    > On Wed, January 18, 2012 02:01, Andrew Lutomirski wrote:
    >> On Tue, Jan 17, 2012 at 4:56 PM, Indan Zupancic <indan@nul.nu> wrote:
    >> I don't know what your ptrace jailer does.  But a task can switch
    >> itself between 32-bit and 64-bit execution at will, and there's
    >> nothing the kernel can do about it.  (That isn't quite true -- in
    >> theory the kernel could fiddle with the GDT, but that would be
    >> expensive and wouldn't work on Xen.)
    >
    > That's why we don't cache the CS value but check it for every system call.
    > But you said elsewhere that checking CS isn't always correct either.
    > I grepped arch/x86 for "user_64bit_mode", but couldn't find anything,
    > but maybe my kernel sources are too old, I haven't updated this system
    > for almost a year. The current code only handles 0x23 and 0x33 and kills
    > the jail if it encounters anything else.

    I think you're hosed on Xen, then. Xen regularly runs with a
    different Xen-specific cs value.

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

    \
     
     \ /
      Last update: 2012-01-19 02:23    [W:0.020 / U:0.084 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site