06 Jun, 2011

2 commits

  • Move vvars out of the vsyscall page into their own page and mark
    it NX.

    Without this patch, an attacker who can force a daemon to call
    some fixed address could wait until the time contains, say,
    0xCD80, and then execute the current time.

    Signed-off-by: Andy Lutomirski
    Cc: Jesper Juhl
    Cc: Borislav Petkov
    Cc: Linus Torvalds
    Cc: Arjan van de Ven
    Cc: Jan Beulich
    Cc: richard -rw- weinberger
    Cc: Mikael Pettersson
    Cc: Andi Kleen
    Cc: Brian Gerst
    Cc: Louis Rilling
    Cc: Valdis.Kletnieks@vt.edu
    Cc: pageexec@freemail.hu
    Link: http://lkml.kernel.org/r/b1460f81dc4463d66ea3f2b5ce240f58d48effec.1307292171.git.luto@mit.edu
    Signed-off-by: Ingo Molnar

    Andy Lutomirski
     
  • It's declared __attribute__((aligned(16)) but it's explicitly
    not aligned. This is probably harmless but it's a bit
    embarrassing.

    Signed-off-by: Andy Lutomirski
    Cc: Jesper Juhl
    Cc: Borislav Petkov
    Cc: Linus Torvalds
    Cc: Arjan van de Ven
    Cc: Jan Beulich
    Cc: richard -rw- weinberger
    Cc: Mikael Pettersson
    Cc: Andi Kleen
    Cc: Brian Gerst
    Cc: Louis Rilling
    Cc: Valdis.Kletnieks@vt.edu
    Cc: pageexec@freemail.hu
    Link: http://lkml.kernel.org/r/5f3bc5542e9aaa9382d53f153f54373165cdef89.1307292171.git.luto@mit.edu
    Signed-off-by: Ingo Molnar

    Andy Lutomirski
     

24 May, 2011

1 commit

  • Variables that are shared between the vdso and the kernel are
    currently a bit of a mess. They are each defined with their own
    magic, they are accessed differently in the kernel, the vsyscall page,
    and the vdso, and one of them (vsyscall_clock) doesn't even really
    exist.

    This changes them all to use a common mechanism. All of them are
    delcared in vvar.h with a fixed address (validated by the linker
    script). In the kernel (as before), they look like ordinary
    read-write variables. In the vsyscall page and the vdso, they are
    accessed through a new macro VVAR, which gives read-only access.

    The vdso is now loaded verbatim into memory without any fixups. As a
    side bonus, access from the vdso is faster because a level of
    indirection is removed.

    While we're at it, pack jiffies and vgetcpu_mode into the same
    cacheline.

    Signed-off-by: Andy Lutomirski
    Cc: Andi Kleen
    Cc: Linus Torvalds
    Cc: "David S. Miller"
    Cc: Eric Dumazet
    Cc: Peter Zijlstra
    Cc: Borislav Petkov
    Link: http://lkml.kernel.org/r/%3C7357882fbb51fa30491636a7b6528747301b7ee9.1306156808.git.luto%40mit.edu%3E
    Signed-off-by: Thomas Gleixner

    Andy Lutomirski