1. 02 Mar, 2017 1 commit
  2. 30 Jan, 2017 1 commit
  3. 14 Jun, 2016 2 commits
  4. 02 Jun, 2016 1 commit
  5. 23 Sep, 2014 1 commit
  6. 03 Sep, 2014 1 commit
  7. 29 Jun, 2014 1 commit
  8. 09 Jul, 2013 1 commit
  9. 24 Jun, 2013 1 commit
  10. 11 Dec, 2012 1 commit
  11. 19 Nov, 2012 1 commit
  12. 19 Sep, 2012 2 commits
  13. 28 Jul, 2012 2 commits
  14. 09 Jul, 2012 2 commits
  15. 05 Jul, 2012 1 commit
    • Will Deacon's avatar
      ARM: 7443/1: Revert "new way of handling ERESTART_RESTARTBLOCK" · 433e2f30
      Will Deacon authored
      This reverts commit 6b5c8045.
      The new syscall restarting code can lead to problems if we take an
      interrupt in userspace just before restarting the svc instruction. If
      a signal is delivered when returning from the interrupt, the
      TIF_SYSCALL_RESTARTSYS will remain set and cause any syscalls executed
      from the signal handler to be treated as a restart of the previously
      interrupted system call. This includes the final sigreturn call, meaning
      that we may fail to exit from the signal context. Furthermore, if a
      system call made from the signal handler requires a restart via the
      restart_block, it is possible to clear the thread flag and fail to
      restart the originally interrupted system call.
      The right solution to this problem is to perform the restarting in the
      kernel, avoiding the possibility of handling a further signal before the
      restart is complete. Since we're almost at -rc6, let's revert the new
      method for now and aim for in-kernel restarting at a later date.
      Acked-by: default avatarCatalin Marinas <[email protected]>
      Signed-off-by: default avatarWill Deacon <[email protected]>
      Signed-off-by: default avatarRussell King <[email protected]>
  16. 21 May, 2012 2 commits
  17. 05 May, 2012 2 commits
  18. 25 Apr, 2012 1 commit
  19. 30 Mar, 2012 1 commit
  20. 28 Mar, 2012 1 commit
  21. 21 Feb, 2012 1 commit
    • Eric Paris's avatar
      ARM/audit: include audit header and fix audit arch · 5180bb39
      Eric Paris authored
      Both bugs being fixed were introduced in:
      Include linux/audit.h to fix below build errors:
        CC      arch/arm/kernel/ptrace.o
      arch/arm/kernel/ptrace.c: In function 'syscall_trace':
      arch/arm/kernel/ptrace.c:919: error: implicit declaration of function 'audit_syscall_exit'
      arch/arm/kernel/ptrace.c:921: error: implicit declaration of function 'audit_syscall_entry'
      arch/arm/kernel/ptrace.c:921: error: 'AUDIT_ARCH_ARMEB' undeclared (first use in this function)
      arch/arm/kernel/ptrace.c:921: error: (Each undeclared identifier is reported only once
      arch/arm/kernel/ptrace.c:921: error: for each function it appears in.)
      make[1]: *** [arch/arm/kernel/ptrace.o] Error 1
      make: *** [arch/arm/kernel] Error 2
      This part of the patch is:
      Reported-by: default avatarAxel Lin <[email protected]>
      Reported-by: default avatarPeter Ujfalusi <[email protected]>
      (They both provided patches to fix it)
      This patch also (at the request of the list) fixes the fact that
      ARM has both LE and BE versions however the audit code was called as if
      it was always BE.  If audit userspace were to try to interpret the bits
      it got from a LE system it would obviously do so incorrectly.  Fix this
      by using the right arch flag on the right system.
      This part of the patch is:
      Reported-by: default avatarRussell King - ARM Linux <[email protected]>
      Signed-off-by: default avatarEric Paris <[email protected]>
      Signed-off-by: default avatarRussell King <[email protected]>
  22. 02 Feb, 2012 2 commits
    • Will Deacon's avatar
      ARM: 7308/1: vfp: flush thread hwstate before copying ptrace registers · 8130b9d7
      Will Deacon authored
      If we are context switched whilst copying into a thread's
      vfp_hard_struct then the partial copy may be corrupted by the VFP
      context switching code (see "ARM: vfp: flush thread hwstate before
      restoring context from sigframe").
      This patch updates the ptrace VFP set code so that the thread state is
      flushed before the copy, therefore disabling VFP and preventing
      corruption from occurring.
      Cc: stable <[email protected]>
      Signed-off-by: default avatarWill Deacon <[email protected]>
      Signed-off-by: default avatarRussell King <[email protected]>
    • Dave Martin's avatar
      ARM: 7307/1: vfp: fix ptrace regset modification race · 247f4993
      Dave Martin authored
      In a preemptible kernel, vfp_set() can be preempted, causing the
      hardware VFP context to be switched while the thread vfp state is
      being read and modified.  This leads to a race condition which can
      cause the thread vfp state to become corrupted if lazy VFP context
      save occurs due to preemption in between the time thread->vfpstate
      is read and the time the modified state is written back.
      This may occur if preemption occurs during the execution of a
      ptrace() call which modifies the VFP register state of a thread.
      Such instances should be very rare in most realistic scenarios --
      none has been reported, so far as I am aware.  Only uniprocessor
      systems should be affected, since VFP context save is not currently
      lazy in SMP kernels.
      The problem was introduced by my earlier patch migrating to use
      regsets to implement ptrace.
      This patch does a vfp_sync_hwstate() before reading
      thread->vfpstate, to make sure that the thread's VFP state is not
      live in the hardware registers while the registers are modified.
      Thanks to Will Deacon for spotting this.
      Cc: stable <[email protected]>
      Signed-off-by: default avatarDave Martin <[email protected]>
      Signed-off-by: default avatarWill Deacon <[email protected]>
      Signed-off-by: default avatarRussell King <[email protected]>
  23. 17 Jan, 2012 1 commit
    • Dr. Whom's avatar
      Kernel: Audit Support For The ARM Platform · 29ef73b7
      Dr. Whom authored
      This patch provides functionality to audit system call events on the
      ARM platform. The implementation was based off the structure of the
      MIPS platform and information in this
      mailing list thread. The required audit_syscall_exit and
      audit_syscall_entry checks were added to ptrace using the standard
      registers for system call values (r0 through r3). A thread information
      flag was added for auditing (TIF_SYSCALL_AUDIT) and a meta-flag was
      added (_TIF_SYSCALL_WORK) to simplify modifications to the syscall
      entry/exit. Now, if either the TRACE flag is set or the AUDIT flag is
      set, the syscall_trace function will be executed. The prober changes
      were made to Kconfig to allow CONFIG_AUDITSYSCALL to be enabled.
      Due to platform availability limitations, this patch was only tested
      on the Android platform running the modified "android-goldfish-2.6.29"
      kernel. A test compile was performed using Code Sourcery's
      cross-compilation toolset and the current linux-3.0 stable kernel. The
      changes compile without error. I'm hoping, due to the simple modifications,
      the patch is "obviously correct".
      Signed-off-by: Dr. Whom's avatarNathaniel Husted <[email protected]>
      Signed-off-by: default avatarEric Paris <[email protected]>
  24. 31 Oct, 2011 1 commit
    • Paul Gortmaker's avatar
      arm: add elf.h to arch/arm/kernel/ptrace.c · ce8b9d25
      Paul Gortmaker authored
      It was implicitly getting it via an implicit presence of module.h
      but when we clean that up, we'll get a bunch of lines like this:
      arch/arm/kernel/ptrace.c:764: error: 'NT_PRSTATUS' undeclared here (not in a function)
      arch/arm/kernel/ptrace.c:765: error: 'ELF_NGREG' undeclared here (not in a function)
      arch/arm/kernel/ptrace.c:776: error: 'NT_PRFPREG' undeclared here (not in a function)
      Signed-off-by: default avatarPaul Gortmaker <[email protected]>
  25. 13 Jul, 2011 1 commit
    • Jon Medhurst's avatar
      ARM: Thumb-2: Support Thumb-2 in undefined instruction handler · 592201a9
      Jon Medhurst authored
      This patch allows undef_hook's to be specified for 32-bit Thumb
      instructions and also to be used for thumb kernel-side code.
      32-bit Thumb instructions are specified in the form:
      	((first_half << 16 ) | second_half)
      which matches the layout used by the ARM ARM.
      ptrace was handling 32-bit Thumb instructions by hooking the first
      halfword and manually checking the second half. This method would be
      broken by this patch so it is migrated to make use of the new Thumb-2
      Signed-off-by: default avatarJon Medhurst <[email protected]>
      Acked-by: default avatarNicolas Pitre <[email protected]>
  26. 01 Jul, 2011 2 commits
  27. 14 May, 2011 1 commit
  28. 25 Apr, 2011 1 commit
  29. 26 Feb, 2011 1 commit
  30. 23 Feb, 2011 1 commit
    • Will Deacon's avatar
      ARM: 6668/1: ptrace: remove single-step emulation code · 425fc47a
      Will Deacon authored
      PTRACE_SINGLESTEP is a ptrace request designed to offer single-stepping
      support to userspace when the underlying architecture has hardware
      support for this operation.
      On ARM, we set arch_has_single_step() to 1 and attempt to emulate hardware
      single-stepping by disassembling the current instruction to determine the
      next pc and placing a software breakpoint on that location.
      Unfortunately this has the following problems:
      1.) Only a subset of ARMv7 instructions are supported
      2.) Thumb-2 is unsupported
      3.) The code is not SMP safe
      We could try to fix this code, but it turns out that because of the above
      issues it is rarely used in practice.  GDB, for example, uses PTRACE_POKETEXT
      and PTRACE_PEEKTEXT to manage breakpoints itself and does not require any
      kernel assistance.
      This patch removes the single-step emulation code from ptrace meaning that
      the PTRACE_SINGLESTEP request will return -EIO on ARM. Portable code must
      check the return value from a ptrace call and handle the failure gracefully.
      Acked-by: default avatarNicolas Pitre <[email protected]>
      Signed-off-by: default avatarWill Deacon <[email protected]>
      Signed-off-by: default avatarRussell King <[email protected]>
  31. 06 Dec, 2010 1 commit
  32. 28 Oct, 2010 1 commit