1. 18 1月, 2012 1 次提交
    • E
      Audit: push audit success and retcode into arch ptrace.h · d7e7528b
      Eric Paris 提交于
      The audit system previously expected arches calling to audit_syscall_exit to
      supply as arguments if the syscall was a success and what the return code was.
      Audit also provides a helper AUDITSC_RESULT which was supposed to simplify things
      by converting from negative retcodes to an audit internal magic value stating
      success or failure.  This helper was wrong and could indicate that a valid
      pointer returned to userspace was a failed syscall.  The fix is to fix the
      layering foolishness.  We now pass audit_syscall_exit a struct pt_reg and it
      in turns calls back into arch code to collect the return value and to
      determine if the syscall was a success or failure.  We also define a generic
      is_syscall_success() macro which determines success/failure based on if the
      value is < -MAX_ERRNO.  This works for arches like x86 which do not use a
      separate mechanism to indicate syscall failure.
      
      We make both the is_syscall_success() and regs_return_value() static inlines
      instead of macros.  The reason is because the audit function must take a void*
      for the regs.  (uml calls theirs struct uml_pt_regs instead of just struct
      pt_regs so audit_syscall_exit can't take a struct pt_regs).  Since the audit
      function takes a void* we need to use static inlines to cast it back to the
      arch correct structure to dereference it.
      
      The other major change is that on some arches, like ia64, MIPS and ppc, we
      change regs_return_value() to give us the negative value on syscall failure.
      THE only other user of this macro, kretprobe_example.c, won't notice and it
      makes the value signed consistently for the audit functions across all archs.
      
      In arch/sh/kernel/ptrace_64.c I see that we were using regs[9] in the old
      audit code as the return value.  But the ptrace_64.h code defined the macro
      regs_return_value() as regs[3].  I have no idea which one is correct, but this
      patch now uses the regs_return_value() function, so it now uses regs[3].
      
      For powerpc we previously used regs->result but now use the
      regs_return_value() function which uses regs->gprs[3].  regs->gprs[3] is
      always positive so the regs_return_value(), much like ia64 makes it negative
      before calling the audit code when appropriate.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Acked-by: H. Peter Anvin <hpa@zytor.com> [for x86 portion]
      Acked-by: Tony Luck <tony.luck@intel.com> [for ia64]
      Acked-by: Richard Weinberger <richard@nod.at> [for uml]
      Acked-by: David S. Miller <davem@davemloft.net> [for sparc]
      Acked-by: Ralf Baechle <ralf@linux-mips.org> [for mips]
      Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [for ppc]
      d7e7528b
  2. 19 5月, 2011 1 次提交
  3. 11 5月, 2011 1 次提交
  4. 28 10月, 2010 2 次提交
  5. 18 10月, 2010 1 次提交
  6. 13 3月, 2010 1 次提交
  7. 11 10月, 2008 1 次提交
  8. 04 10月, 2008 1 次提交
  9. 30 10月, 2007 1 次提交
  10. 17 10月, 2007 1 次提交
  11. 12 10月, 2007 1 次提交
  12. 01 8月, 2007 1 次提交
  13. 18 7月, 2007 2 次提交
  14. 09 5月, 2007 1 次提交
  15. 22 2月, 2007 1 次提交
    • F
      [MIPS] Add basic SMARTMIPS ASE support · 9693a853
      Franck Bui-Huu 提交于
      This patch adds trivial support for SMARTMIPS extension. This extension
      is currently implemented by 4KS[CD] CPUs.
      
      Basically it saves/restores ACX register, which is part of the SMARTMIPS
      ASE, when needed. This patch does *not* add any support for Smartmips MMU
      features.
      
      Futhermore this patch does not add explicit support for 4KS[CD] CPUs since
      they are respectively mips32 and mips32r2 compliant.  So with the current
      processor configuration, a platform that has such CPUs needs to select
      both configs:
      
      	CPU_HAS_SMARTMIPS
      	SYS_HAS_CPU_MIPS32_R[12]
      
      This is due to the processor configuration which is mixing up all the
      architecture variants and the processor types.
      
      The drawback of this, is that we currently pass '-march=mips32' option to
      gcc when building a kernel instead of '-march=4ksc' for 4KSC case. This
      can lead to a kernel image a little bit bigger than required.
      Signed-off-by: NFranck Bui-Huu <fbuihuu@gmail.com>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      9693a853
  16. 10 10月, 2006 1 次提交
  17. 01 7月, 2006 1 次提交
  18. 20 6月, 2006 1 次提交
  19. 01 5月, 2006 1 次提交
  20. 19 4月, 2006 1 次提交
  21. 13 1月, 2006 2 次提交
  22. 10 1月, 2006 1 次提交
    • R
      MIPS: DSP: eleminate used_dsp. · 6c355852
      Ralf Baechle 提交于
          
      used_dsp was meant to be used like used_math - but since the FPU context
      is small and lazy context switching is a stupid idea on multiprocessors
      this idea only got halfway implemented and those bits are were now
      breaking ptrace.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      6c355852
  23. 07 11月, 2005 1 次提交
  24. 31 10月, 2005 1 次提交
  25. 30 10月, 2005 7 次提交
  26. 05 9月, 2005 1 次提交
  27. 01 5月, 2005 1 次提交
  28. 29 4月, 2005 2 次提交
  29. 17 4月, 2005 2 次提交