1. 30 1月, 2008 3 次提交
    • R
      x86: remove TRAP_FLAG · 77c03dcd
      Roland McGrath 提交于
      This gets rid of the local constant macro TRAP_FLAG.
      It's redundant with the public constant macro X86_EFLAGS_TF.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      77c03dcd
    • R
      x86: TLS cleanup · efd1ca52
      Roland McGrath 提交于
      This consolidates the four different places that implemented the same
      encoding magic for the GDT-slot 32-bit TLS support.  The old tls32.c was
      renamed and is now only slightly modified to be the shared implementation.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Zachary Amsden <zach@vmware.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      efd1ca52
    • R
      x86: ptrace fs/gs_base · df5d438e
      Roland McGrath 提交于
      The fs_base and gs_base fields are available in user_regs_struct.
      But reading these via ptrace (PTRACE_GETREGS or PTRACE_PEEKUSR) does
      not give a reliably useful value.  The thread_struct fields are 0
      when do_arch_prctl decided to use a GDT slot instead of MSR_FS_BASE,
      which it does for a value under 1<<32.
      
      This changes ptrace access to fs_base and gs_base to work like
      PTRACE_ARCH_PRCTL does.  That is, it reads the base address that
      user-mode memory access using the fs/gs instruction prefixes will
      use, regardless of how it's being implemented in the kernel.  The
      MSR vs GDT is an implementation detail that is pretty much hidden
      from userland in the actual using, and there is no reason that
      ptrace should give the internal implementation picture rather than
      the user-mode semantic picture.  In the case of setting the value,
      this can implicitly change the fsindex/gsindex value (also
      separately in user_regs_struct), which is what happens when the
      thread calls arch_prctl itself.  In a PTRACE_SETREGS, the fs_base
      change will come after the fsindex change due to the order of the
      struct, and so a change the debugger made to fs_base will have the
      effect intended, another part of the user_regs_struct will now
      differ when read back from what the debugger wrote.
      
      This makes PTRACE_ARCH_PRCTL obsolete.  We could consider declaring
      it deprecated and removing it one day, though there is no hurry.
      For the foreseeable future, debuggers have to assume an old kernel
      that does not report reliable fs_base/gs_base values in user_regs_struct
      and stick to PTRACE_ARCH_PRCTL anyway.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      df5d438e
  2. 18 10月, 2007 1 次提交
  3. 17 10月, 2007 1 次提交
  4. 14 10月, 2007 1 次提交
    • D
      Delete filenames in comments. · 835c34a1
      Dave Jones 提交于
      Since the x86 merge, lots of files that referenced their own filenames
      are no longer correct.  Rather than keep them up to date, just delete
      them, as they add no real value.
      
      Additionally:
      - fix up comment formatting in scx200_32.c
      - Remove a credit from myself in setup_64.c from a time when we had no SCM
      - remove longwinded history from tsc_32.c which can be figured out from
        git.
      Signed-off-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      835c34a1
  5. 11 10月, 2007 2 次提交
  6. 22 9月, 2007 1 次提交
  7. 19 7月, 2007 1 次提交
  8. 18 7月, 2007 2 次提交
  9. 09 5月, 2007 1 次提交
  10. 13 2月, 2007 1 次提交
  11. 26 9月, 2006 4 次提交
  12. 01 5月, 2006 1 次提交
  13. 11 4月, 2006 1 次提交
  14. 26 3月, 2006 1 次提交
  15. 13 1月, 2006 1 次提交
  16. 12 1月, 2006 1 次提交
  17. 07 11月, 2005 1 次提交
  18. 22 6月, 2005 1 次提交
    • S
      [PATCH] x86_64: TASK_SIZE fixes for compatibility mode processes · 84929801
      Suresh Siddha 提交于
      Appended patch will setup compatibility mode TASK_SIZE properly.  This will
      fix atleast three known bugs that can be encountered while running
      compatibility mode apps.
      
      a) A malicious 32bit app can have an elf section at 0xffffe000.  During
         exec of this app, we will have a memory leak as insert_vm_struct() is
         not checking for return value in syscall32_setup_pages() and thus not
         freeing the vma allocated for the vsyscall page.  And instead of exec
         failing (as it has addresses > TASK_SIZE), we were allowing it to
         succeed previously.
      
      b) With a 32bit app, hugetlb_get_unmapped_area/arch_get_unmapped_area
         may return addresses beyond 32bits, ultimately causing corruption
         because of wrap-around and resulting in SEGFAULT, instead of returning
         ENOMEM.
      
      c) 32bit app doing this below mmap will now fail.
      
        mmap((void *)(0xFFFFE000UL), 0x10000UL, PROT_READ|PROT_WRITE,
      	MAP_FIXED|MAP_PRIVATE|MAP_ANON, 0, 0);
      Signed-off-by: NZou Nan hai <nanhai.zou@intel.com>
      Signed-off-by: NSuresh Siddha <suresh.b.siddha@intel.com>
      Cc: Andi Kleen <ak@muc.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      84929801
  19. 21 5月, 2005 1 次提交
  20. 17 5月, 2005 2 次提交
  21. 03 5月, 2005 1 次提交
  22. 01 5月, 2005 1 次提交
  23. 29 4月, 2005 1 次提交
    • [AUDIT] Don't allow ptrace to fool auditing, log arch of audited syscalls. · 2fd6f58b
      提交于
      We were calling ptrace_notify() after auditing the syscall and arguments,
      but the debugger could have _changed_ them before the syscall was actually
      invoked. Reorder the calls to fix that.
      
      While we're touching ever call to audit_syscall_entry(), we also make it
      take an extra argument: the architecture of the syscall which was made,
      because some architectures allow more than one type of syscall.
      
      Also add an explicit success/failure flag to audit_syscall_exit(), for
      the benefit of architectures which return that in a condition register
      rather than only returning a single register.
      
      Change type of syscall return value to 'long' not 'int'.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      2fd6f58b
  24. 17 4月, 2005 3 次提交