1. 27 11月, 2008 1 次提交
    • M
      [S390] fix system call parameter functions. · 59da2139
      Martin Schwidefsky 提交于
      syscall_get_nr() currently returns a valid result only if the call
      chain of the traced process includes do_syscall_trace_enter(). But
      collect_syscall() can be called for any sleeping task, the result of
      syscall_get_nr() in general is completely bogus.
      
      To make syscall_get_nr() work for any sleeping task the traps field
      in pt_regs is replace with svcnr - the system call number the process
      is executing. If svcnr == 0 the process is not on a system call path.
      
      The syscall_get_arguments and syscall_set_arguments use regs->gprs[2]
      for the first system call parameter. This is incorrect since gprs[2]
      may have been overwritten with the system call number if the call
      chain includes do_syscall_trace_enter. Use regs->orig_gprs2 instead.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      59da2139
  2. 11 10月, 2008 1 次提交
  3. 09 9月, 2008 1 次提交
  4. 14 7月, 2008 1 次提交
  5. 07 5月, 2008 1 次提交
  6. 30 4月, 2008 2 次提交
  7. 17 4月, 2008 1 次提交
  8. 26 1月, 2008 1 次提交
  9. 17 10月, 2007 1 次提交
  10. 18 7月, 2007 2 次提交
  11. 06 2月, 2007 2 次提交
    • G
      [S390] noexec protection · c1821c2e
      Gerald Schaefer 提交于
      This provides a noexec protection on s390 hardware. Our hardware does
      not have any bits left in the pte for a hw noexec bit, so this is a
      different approach using shadow page tables and a special addressing
      mode that allows separate address spaces for code and data.
      
      As a special feature of our "secondary-space" addressing mode, separate
      page tables can be specified for the translation of data addresses
      (storage operands) and instruction addresses. The shadow page table is
      used for the instruction addresses and the standard page table for the
      data addresses.
      The shadow page table is linked to the standard page table by a pointer
      in page->lru.next of the struct page corresponding to the page that
      contains the standard page table (since page->private is not really
      private with the pte_lock and the page table pages are not in the LRU
      list).
      Depending on the software bits of a pte, it is either inserted into
      both page tables or just into the standard (data) page table. Pages of
      a vma that does not have the VM_EXEC bit set get mapped only in the
      data address space. Any try to execute code on such a page will cause a
      page translation exception. The standard reaction to this is a SIGSEGV
      with two exceptions: the two system call opcodes 0x0a77 (sys_sigreturn)
      and 0x0aad (sys_rt_sigreturn) are allowed. They are stored by the
      kernel to the signal stack frame. Unfortunately, the signal return
      mechanism cannot be modified to use an SA_RESTORER because the
      exception unwinding code depends on the system call opcode stored
      behind the signal stack frame.
      
      This feature requires that user space is executed in secondary-space
      mode and the kernel in home-space mode, which means that the addressing
      modes need to be switched and that the noexec protection only works
      for user space.
      After switching the addressing modes, we cannot use the mvcp/mvcs
      instructions anymore to copy between kernel and user space. A new
      mvcos instruction has been added to the z9 EC/BC hardware which allows
      to copy between arbitrary address spaces, but on older hardware the
      page tables need to be walked manually.
      Signed-off-by: NGerald Schaefer <geraldsc@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      c1821c2e
    • H
  12. 01 5月, 2006 1 次提交
  13. 13 1月, 2006 1 次提交
  14. 09 1月, 2006 1 次提交
  15. 07 1月, 2006 1 次提交
  16. 05 6月, 2005 2 次提交
    • B
      [PATCH] s390: uml ptrace fixes · c5c3a6d8
      Bodo Stroesser 提交于
      To make UML build and run on s390, I needed to do these two little
      changes:
      
      1) UML includes some of the subarch's (s390) headers. I had to
         change one of them with the following one-liner, to make this
         compile. AFAICS, this change doesn't break compilation of s390
         itself.
      
      2) UML needs to intercept syscalls via ptrace to invalidate the syscall,
         read syscall's parameters and write the result with the result of
         UML's syscall processing. Also, UML needs to make sure, that the host
         does no syscall restart processing. On i386 for example, this can be
         done by writing -1 to orig_eax on the 2nd syscall interception
         (orig_eax is the syscall number, which after the interception is used
         as a "interrupt was a syscall" flag only.
         Unfortunately, s390 holds syscall number and syscall result in gpr2 and
         its "interrupt was a syscall" flag (trap) is unreachable via ptrace.
         So I changed the host to set trap to -1, if the syscall number is changed
         to an invalid value on the first syscall interception.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c5c3a6d8
    • M
      [PATCH] s390: ptrace peek and poke · 778959db
      Martin Schwidefsky 提交于
      The special cases of peek and poke on acrs[15] and the fpc register are not
      handled correctly.  A poke on acrs[15] will clobber the 4 bytes after the
      access registers in the thread_info structure.  That happens to be the kernel
      stack pointer.  A poke on the fpc with an invalid value is not caught by the
      validity check.  On the next context switch the broken fpc value will cause a
      program check in the kernel.  Improving the checks in peek and poke fixes
      this.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      778959db
  17. 01 5月, 2005 1 次提交
  18. 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
  19. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4