1. 20 10月, 2014 1 次提交
  2. 09 9月, 2014 2 次提交
  3. 07 8月, 2014 1 次提交
    • W
      mm/vmalloc.c: clean up map_vm_area third argument · f6f8ed47
      WANG Chao 提交于
      Currently map_vm_area() takes (struct page *** pages) as third argument,
      and after mapping, it moves (*pages) to point to (*pages +
      nr_mappped_pages).
      
      It looks like this kind of increment is useless to its caller these
      days.  The callers don't care about the increments and actually they're
      trying to avoid this by passing another copy to map_vm_area().
      
      The caller can always guarantee all the pages can be mapped into vm_area
      as specified in first argument and the caller only cares about whether
      map_vm_area() fails or not.
      
      This patch cleans up the pointer movement in map_vm_area() and updates
      its callers accordingly.
      Signed-off-by: NWANG Chao <chaowang@redhat.com>
      Cc: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Nitin Gupta <ngupta@vflare.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f6f8ed47
  4. 16 7月, 2014 1 次提交
  5. 09 7月, 2014 2 次提交
    • T
      staging: android: binder.c: binder_ioctl() cleanup · 78260ac6
      Tair Rzayev 提交于
      binder_ioctl() is quite huge and checkpatch dirty - mostly because of
      the amount of code for the BINDER_WRITE_READ and BINDER_SET_CONTEXT_MGR.
      Moved that code into the new binder_ioctl_write_read() and
      binder_ioctl_set_ctx_mgr()
      Signed-off-by: NTair Rzayev <tair.rzayev@gmail.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      78260ac6
    • V
      staging: binder: add vm_fault handler · ddac7d5f
      Vinayak Menon 提交于
      An issue was observed when a userspace task exits.
      The page which hits error here is the zero page.
      In binder mmap, the whole of vma is not mapped.
      On a task crash, when debuggerd reads the binder regions,
      the unmapped areas fall to do_anonymous_page in handle_pte_fault,
      due to the absence of a vm_fault handler. This results in
      zero page being mapped. Later in zap_pte_range, vm_normal_page
      returns zero page in the case of VM_MIXEDMAP and it results in the
      error.
      
      BUG: Bad page map in process mediaserver  pte:9dff379f pmd:9bfbd831
      page:c0ed8e60 count:1 mapcount:-1 mapping:  (null) index:0x0
      page flags: 0x404(referenced|reserved)
      addr:40c3f000 vm_flags:10220051 anon_vma:  (null) mapping:d9fe0764 index:fd
      vma->vm_ops->fault:   (null)
      vma->vm_file->f_op->mmap: binder_mmap+0x0/0x274
      CPU: 0 PID: 1463 Comm: mediaserver Tainted: G        W    3.10.17+ #1
      [<c001549c>] (unwind_backtrace+0x0/0x11c) from [<c001200c>] (show_stack+0x10/0x14)
      [<c001200c>] (show_stack+0x10/0x14) from [<c0103d78>] (print_bad_pte+0x158/0x190)
      [<c0103d78>] (print_bad_pte+0x158/0x190) from [<c01055f0>] (unmap_single_vma+0x2e4/0x598)
      [<c01055f0>] (unmap_single_vma+0x2e4/0x598) from [<c010618c>] (unmap_vmas+0x34/0x50)
      [<c010618c>] (unmap_vmas+0x34/0x50) from [<c010a9e4>] (exit_mmap+0xc8/0x1e8)
      [<c010a9e4>] (exit_mmap+0xc8/0x1e8) from [<c00520f0>] (mmput+0x54/0xd0)
      [<c00520f0>] (mmput+0x54/0xd0) from [<c005972c>] (do_exit+0x360/0x990)
      [<c005972c>] (do_exit+0x360/0x990) from [<c0059ef0>] (do_group_exit+0x84/0xc0)
      [<c0059ef0>] (do_group_exit+0x84/0xc0) from [<c0066de0>] (get_signal_to_deliver+0x4d4/0x548)
      [<c0066de0>] (get_signal_to_deliver+0x4d4/0x548) from [<c0011500>] (do_signal+0xa8/0x3b8)
      
      Add a vm_fault handler which returns VM_FAULT_SIGBUS, and prevents the
      wrong fallback to do_anonymous_page.
      Signed-off-by: NVinayak Menon <vinayakm.list@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ddac7d5f
  6. 27 6月, 2014 1 次提交
  7. 02 6月, 2014 1 次提交
  8. 23 5月, 2014 2 次提交
  9. 22 5月, 2014 1 次提交
  10. 04 5月, 2014 1 次提交
  11. 18 4月, 2014 1 次提交
  12. 17 4月, 2014 1 次提交
  13. 25 2月, 2014 1 次提交
    • A
      staging: binder: Support concurrent 32 bit and 64 bit processes. · da49889d
      Arve Hjønnevåg 提交于
      For 64bit systems we want to use the same binder interface for 32bit and
      64bit processes. Thus the size and the layout of the structures passed
      between the kernel and the userspace has to be the same for both 32 and
      64bit processes.
      
      This change replaces all the uses of void* and size_t with
      binder_uintptr_t and binder_size_t. These are then typedefed to specific
      sizes depending on the use of the interface, as follows:
             * __u32 - on legacy 32bit only userspace
             * __u64 - on mixed 32/64bit userspace where all processes use the same
      interface.
      
      This change also increments the BINDER_CURRENT_PROTOCOL_VERSION to 8 and
      hooks the compat_ioctl entry for the mixed 32/64bit Android userspace.
      
      This patch also provides a CONFIG_ANDROID_BINDER_IPC_32BIT option for
      compatability, which if set which enables the old protocol, setting
      BINDER_CURRENT_PROTOCOL_VERSION to 7, on 32 bit systems.
      
      Please note that all 64bit kernels will use the 64bit Binder ABI.
      
      Cc: Colin Cross <ccross@android.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Serban Constantinescu <serban.constantinescu@arm.com>
      Cc: Android Kernel Team <kernel-team@android.com>
      Signed-off-by: NArve Hjønnevåg <arve@android.com>
      [jstultz: Merged with upstream type changes. Various whitespace fixes
      and longer Kconfig description for checkpatch. Included improved commit
      message from Serban (with a few tweaks).]
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      da49889d
  14. 22 2月, 2014 1 次提交
  15. 17 9月, 2013 2 次提交
  16. 24 7月, 2013 3 次提交
  17. 25 6月, 2013 1 次提交
  18. 12 5月, 2013 1 次提交
    • C
      binder: use freezable blocking calls · e2610b26
      Colin Cross 提交于
      Avoid waking up every thread sleeping in a binder call during
      suspend and resume by calling a freezable blocking call.  Previous
      patches modified the freezer to avoid sending wakeups to threads
      that are blocked in freezable blocking calls.
      
      This call was selected to be converted to a freezable call because
      it doesn't hold any locks or release any resources when interrupted
      that might be needed by another freezing task or a kernel driver
      during suspend, and is a common site where idle userspace tasks are
      blocked.
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NColin Cross <ccross@android.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e2610b26
  19. 26 3月, 2013 4 次提交
  20. 28 2月, 2013 1 次提交
    • S
      hlist: drop the node parameter from iterators · b67bfe0d
      Sasha Levin 提交于
      I'm not sure why, but the hlist for each entry iterators were conceived
      
              list_for_each_entry(pos, head, member)
      
      The hlist ones were greedy and wanted an extra parameter:
      
              hlist_for_each_entry(tpos, pos, head, member)
      
      Why did they need an extra pos parameter? I'm not quite sure. Not only
      they don't really need it, it also prevents the iterator from looking
      exactly like the list iterator, which is unfortunate.
      
      Besides the semantic patch, there was some manual work required:
      
       - Fix up the actual hlist iterators in linux/list.h
       - Fix up the declaration of other iterators based on the hlist ones.
       - A very small amount of places were using the 'node' parameter, this
       was modified to use 'obj->member' instead.
       - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
       properly, so those had to be fixed up manually.
      
      The semantic patch which is mostly the work of Peter Senna Tschudin is here:
      
      @@
      iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;
      
      type T;
      expression a,c,d,e;
      identifier b;
      statement S;
      @@
      
      -T b;
          <+... when != b
      (
      hlist_for_each_entry(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue(a,
      - b,
      c) S
      |
      hlist_for_each_entry_from(a,
      - b,
      c) S
      |
      hlist_for_each_entry_rcu(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_rcu_bh(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue_rcu_bh(a,
      - b,
      c) S
      |
      for_each_busy_worker(a, c,
      - b,
      d) S
      |
      ax25_uid_for_each(a,
      - b,
      c) S
      |
      ax25_for_each(a,
      - b,
      c) S
      |
      inet_bind_bucket_for_each(a,
      - b,
      c) S
      |
      sctp_for_each_hentry(a,
      - b,
      c) S
      |
      sk_for_each(a,
      - b,
      c) S
      |
      sk_for_each_rcu(a,
      - b,
      c) S
      |
      sk_for_each_from
      -(a, b)
      +(a)
      S
      + sk_for_each_from(a) S
      |
      sk_for_each_safe(a,
      - b,
      c, d) S
      |
      sk_for_each_bound(a,
      - b,
      c) S
      |
      hlist_for_each_entry_safe(a,
      - b,
      c, d, e) S
      |
      hlist_for_each_entry_continue_rcu(a,
      - b,
      c) S
      |
      nr_neigh_for_each(a,
      - b,
      c) S
      |
      nr_neigh_for_each_safe(a,
      - b,
      c, d) S
      |
      nr_node_for_each(a,
      - b,
      c) S
      |
      nr_node_for_each_safe(a,
      - b,
      c, d) S
      |
      - for_each_gfn_sp(a, c, d, b) S
      + for_each_gfn_sp(a, c, d) S
      |
      - for_each_gfn_indirect_valid_sp(a, c, d, b) S
      + for_each_gfn_indirect_valid_sp(a, c, d) S
      |
      for_each_host(a,
      - b,
      c) S
      |
      for_each_host_safe(a,
      - b,
      c, d) S
      |
      for_each_mesh_entry(a,
      - b,
      c, d) S
      )
          ...+>
      
      [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
      [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
      [akpm@linux-foundation.org: checkpatch fixes]
      [akpm@linux-foundation.org: fix warnings]
      [akpm@linux-foudnation.org: redo intrusive kvm changes]
      Tested-by: NPeter Senna Tschudin <peter.senna@gmail.com>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NSasha Levin <sasha.levin@oracle.com>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b67bfe0d
  21. 08 1月, 2013 1 次提交
  22. 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
  23. 31 10月, 2012 1 次提交
  24. 23 10月, 2012 4 次提交
  25. 27 9月, 2012 4 次提交