1. 28 2月, 2013 1 次提交
  2. 23 2月, 2013 1 次提交
  3. 15 2月, 2013 1 次提交
  4. 09 2月, 2013 27 次提交
  5. 03 2月, 2013 1 次提交
  6. 25 1月, 2013 1 次提交
  7. 20 11月, 2012 1 次提交
  8. 19 11月, 2012 1 次提交
    • E
      pidns: Use task_active_pid_ns where appropriate · 17cf22c3
      Eric W. Biederman 提交于
      The expressions tsk->nsproxy->pid_ns and task_active_pid_ns
      aka ns_of_pid(task_pid(tsk)) should have the same number of
      cache line misses with the practical difference that
      ns_of_pid(task_pid(tsk)) is released later in a processes life.
      
      Furthermore by using task_active_pid_ns it becomes trivial
      to write an unshare implementation for the the pid namespace.
      
      So I have used task_active_pid_ns everywhere I can.
      
      In fork since the pid has not yet been attached to the
      process I use ns_of_pid, to achieve the same effect.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      17cf22c3
  9. 16 11月, 2012 1 次提交
    • O
      uprobes: Use percpu_rw_semaphore to fix register/unregister vs dup_mmap() race · 32cdba1e
      Oleg Nesterov 提交于
      This was always racy, but 26872090
      "uprobes: Rework register_for_each_vma() to make it O(n)" should be
      blamed anyway, it made everything worse and I didn't notice.
      
      register/unregister call build_map_info() and then do install/remove
      breakpoint for every mm which mmaps inode/offset. This can obviously
      race with fork()->dup_mmap() in between and we can miss the child.
      
      uprobe_register() could be easily fixed but unregister is much worse,
      the new mm inherits "int3" from parent and there is no way to detect
      this if uprobe goes away.
      
      So this patch simply adds percpu_down_read/up_read around dup_mmap(),
      and percpu_down_write/up_write into register_for_each_vma().
      
      This adds 2 new hooks into dup_mmap() but we can kill uprobe_dup_mmap()
      and fold it into uprobe_end_dup_mmap().
      Reported-by: NSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Acked-by: NSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      32cdba1e
  10. 15 11月, 2012 1 次提交
  11. 04 11月, 2012 2 次提交
  12. 30 10月, 2012 1 次提交
    • M
      perf, powerpc: Fix hw breakpoints returning -ENOSPC · 0d855354
      Michael Neuling 提交于
      I've been trying to get hardware breakpoints with perf to work
      on POWER7 but I'm getting the following:
      
        % perf record -e mem:0x10000000 true
      
          Error: sys_perf_event_open() syscall returned with 28 (No space left on device).  /bin/dmesg may provide additional information.
      
          Fatal: No CONFIG_PERF_EVENTS=y kernel support configured?
      
        true: Terminated
      
      (FWIW adding -a and it works fine)
      
      Debugging it seems that __reserve_bp_slot() is returning ENOSPC
      because it thinks there are no free breakpoint slots on this
      CPU.
      
      I have a 2 CPUs, so perf userspace is doing two perf_event_open
      syscalls to add a counter to each CPU [1].  The first syscall
      succeeds but the second is failing.
      
      On this second syscall, fetch_bp_busy_slots() sets slots.pinned
      to be 1, despite there being no breakpoint on this CPU.  This is
      because the call the task_bp_pinned, checks all CPUs, rather
      than just the current CPU. POWER7 only has one hardware
      breakpoint per CPU (ie. HBP_NUM=1), so we return ENOSPC.
      
      The following patch fixes this by checking the associated CPU
      for each breakpoint in task_bp_pinned.  I'm not familiar with
      this code, so it's provided as a reference to the above issue.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Cc: Jovi Zhang <bookjovi@gmail.com>
      Cc: K Prasad <prasad@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/1351268936-2956-1-git-send-email-fweisbec@gmail.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      0d855354
  13. 09 10月, 2012 1 次提交
    • H
      mm: wrap calls to set_pte_at_notify with invalidate_range_start and invalidate_range_end · 6bdb913f
      Haggai Eran 提交于
      In order to allow sleeping during invalidate_page mmu notifier calls, we
      need to avoid calling when holding the PT lock.  In addition to its direct
      calls, invalidate_page can also be called as a substitute for a change_pte
      call, in case the notifier client hasn't implemented change_pte.
      
      This patch drops the invalidate_page call from change_pte, and instead
      wraps all calls to change_pte with invalidate_range_start and
      invalidate_range_end calls.
      
      Note that change_pte still cannot sleep after this patch, and that clients
      implementing change_pte should not take action on it in case the number of
      outstanding invalidate_range_start calls is larger than one, otherwise
      they might miss a later invalidation.
      Signed-off-by: NHaggai Eran <haggaie@mellanox.com>
      Cc: Andrea Arcangeli <andrea@qumranet.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Haggai Eran <haggaie@mellanox.com>
      Cc: Shachar Raindel <raindel@mellanox.com>
      Cc: Liran Liss <liranl@mellanox.com>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Hugh Dickins <hughd@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6bdb913f