<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/android/binder.c, branch v4.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-08-08T09:05:47Z</updated>
<entry>
<title>android: binder: Rate-limit debug and userspace triggered err msgs</title>
<updated>2018-08-08T09:05:47Z</updated>
<author>
<name>Sherry Yang</name>
<email>sherryy@android.com</email>
</author>
<published>2018-08-07T19:57:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=128f38041035001276e964cda1cf951f218d965d'/>
<id>urn:sha1:128f38041035001276e964cda1cf951f218d965d</id>
<content type='text'>
Use rate-limited debug messages where userspace can trigger
excessive log spams.

Acked-by: Arve Hjønnevåg &lt;arve@android.com&gt;
Signed-off-by: Sherry Yang &lt;sherryy@android.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>android: binder: Include asm/cacheflush.h after linux/ include files</title>
<updated>2018-07-24T12:23:00Z</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2018-07-23T21:41:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f371a7c17aaa47dd7aedc89ef3cd1d5638c03f5e'/>
<id>urn:sha1:f371a7c17aaa47dd7aedc89ef3cd1d5638c03f5e</id>
<content type='text'>
If asm/cacheflush.h is included first, the following build warnings are
seen with sparc32 builds.

In file included from arch/sparc/include/asm/cacheflush.h:11:0,
        from drivers/android/binder.c:54:
arch/sparc/include/asm/cacheflush_32.h:40:37: warning:
	'struct page' declared inside parameter list will not be visible
	outside of this definition or declaration

Moving the asm/ include after linux/ includes solves the problem.

Suggested-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>android: binder: Change return type to vm_fault_t</title>
<updated>2018-05-14T14:06:48Z</updated>
<author>
<name>Souptick Joarder</name>
<email>jrdr.linux@gmail.com</email>
</author>
<published>2018-04-23T16:24:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e19f70aa02f34abd4c5740f761f4694e9a7c8b3d'/>
<id>urn:sha1:e19f70aa02f34abd4c5740f761f4694e9a7c8b3d</id>
<content type='text'>
Use new return type vm_fault_t for fault handler in
struct vm_operations_struct. For now, this is just
documenting that the function returns a VM_FAULT
value rather than an errno.  Once all instances are
converted, vm_fault_t will become a distinct type.

Reference id -&gt; 1c8f422059ae ("mm: change return type
to vm_fault_t")

Signed-off-by: Souptick Joarder &lt;jrdr.linux@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ANDROID: binder: change down_write to down_read</title>
<updated>2018-05-14T14:06:48Z</updated>
<author>
<name>Minchan Kim</name>
<email>minchan@kernel.org</email>
</author>
<published>2018-05-07T14:15:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=720c241924046aff83f5f2323232f34a30a4c281'/>
<id>urn:sha1:720c241924046aff83f5f2323232f34a30a4c281</id>
<content type='text'>
binder_update_page_range needs down_write of mmap_sem because
vm_insert_page need to change vma-&gt;vm_flags to VM_MIXEDMAP unless
it is set. However, when I profile binder working, it seems
every binder buffers should be mapped in advance by binder_mmap.
It means we could set VM_MIXEDMAP in binder_mmap time which is
already hold a mmap_sem as down_write so binder_update_page_range
doesn't need to hold a mmap_sem as down_write.
Please use proper API down_read. It would help mmap_sem contention
problem as well as fixing down_write abuse.

Ganesh Mahendran tested app launching and binder throughput test
and he said he couldn't find any problem and I did binder latency
test per Greg KH request(Thanks Martijn to teach me how I can do)
I cannot find any problem, too.

Cc: Ganesh Mahendran &lt;opensource.ganesh@gmail.com&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Arve Hjønnevåg &lt;arve@android.com&gt;
Cc: Todd Kjos &lt;tkjos@google.com&gt;
Reviewed-by: Martijn Coenen &lt;maco@android.com&gt;
Signed-off-by: Minchan Kim &lt;minchan@kernel.org&gt;
Reviewed-by: Joel Fernandes (Google) &lt;joel@joelfernandes.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ANDROID: binder: correct the cmd print for BINDER_WORK_RETURN_ERROR</title>
<updated>2018-05-14T14:06:48Z</updated>
<author>
<name>宋金时</name>
<email>songjinshi@xiaomi.com</email>
</author>
<published>2018-05-10T02:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=838d5565669aa5bb7deb605684a5970d51d5eaf6'/>
<id>urn:sha1:838d5565669aa5bb7deb605684a5970d51d5eaf6</id>
<content type='text'>
When to execute binder_stat_br the e-&gt;cmd has been modifying as BR_OK
instead of the original return error cmd, in fact we want to know the
original return error, such as BR_DEAD_REPLY or BR_FAILED_REPLY, etc.
instead of always BR_OK, in order to avoid the value of the e-&gt;cmd is
always BR_OK, so we need assign the value of the e-&gt;cmd to cmd before
e-&gt;cmd = BR_OK.

Signed-off-by: songjinshi &lt;songjinshi@xiaomi.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ANDROID: binder: remove 32-bit binder interface.</title>
<updated>2018-05-14T14:06:48Z</updated>
<author>
<name>Martijn Coenen</name>
<email>maco@google.com</email>
</author>
<published>2018-05-11T08:45:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1190b4e38f97023154e6b3bef61b251aa5f970d0'/>
<id>urn:sha1:1190b4e38f97023154e6b3bef61b251aa5f970d0</id>
<content type='text'>
New devices launching with Android P need to use the 64-bit
binder interface, even on 32-bit SoCs [0].

This change removes the Kconfig option to select the 32-bit
binder interface. We don't think this will affect existing
userspace for the following reasons:
1) The latest Android common tree is 4.14, so we don't
   believe any Android devices are on kernels &gt;4.14.
2) Android devices launch on an LTS release and stick with
   it, so we wouldn't expect devices running on &lt;= 4.14 now
   to upgrade to 4.17 or later. But even if they did, they'd
   rebuild the world (kernel + userspace) anyway.
3) Other userspaces like 'anbox' are already using the
   64-bit interface.

Note that this change doesn't remove the 32-bit UAPI
itself; the reason for that is that Android userspace
always uses the latest UAPI headers from upstream, and
userspace retains 32-bit support for devices that are
upgrading. This will be removed as well in 2-3 years,
at which point we can remove the code from the UAPI
as well.

Finally, this change introduces build errors on archs where
64-bit get_user/put_user is not supported, so make binder
unavailable on m68k (which wouldn't want it anyway).

[0]: https://android-review.googlesource.com/c/platform/build/+/595193

Signed-off-by: Martijn Coenen &lt;maco@android.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 4.17-rc3 into char-misc-next</title>
<updated>2018-04-30T12:05:54Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-04-30T12:05:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=720d690e3680d8ae5fcf86f8614c1a10b4ee7605'/>
<id>urn:sha1:720d690e3680d8ae5fcf86f8614c1a10b4ee7605</id>
<content type='text'>
We want the fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ANDROID: binder: re-order some conditions</title>
<updated>2018-04-23T10:14:37Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2018-03-29T09:14:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=361f2ddbb0c9f9b4f336025a7bd0212cea4a34f0'/>
<id>urn:sha1:361f2ddbb0c9f9b4f336025a7bd0212cea4a34f0</id>
<content type='text'>
It doesn't make any difference to runtime but I've switched these two
checks to make my static checker happy.

The problem is that "buffer-&gt;data_size" is user controlled and if it's
less than "sizeo(*hdr)" then that means "offset" can be more than
"buffer-&gt;data_size".  It's just cleaner to check it in the other order.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Martijn Coenen &lt;maco@android.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ANDROID: binder: prevent transactions into own process.</title>
<updated>2018-04-23T10:12:41Z</updated>
<author>
<name>Martijn Coenen</name>
<email>maco@android.com</email>
</author>
<published>2018-03-28T09:14:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7aa135fcf26377f92dc0680a57566b4c7f3e281b'/>
<id>urn:sha1:7aa135fcf26377f92dc0680a57566b4c7f3e281b</id>
<content type='text'>
This can't happen with normal nodes (because you can't get a ref
to a node you own), but it could happen with the context manager;
to make the behavior consistent with regular nodes, reject
transactions into the context manager by the process owning it.

Reported-by: syzbot+09e05aba06723a94d43d@syzkaller.appspotmail.com
Signed-off-by: Martijn Coenen &lt;maco@android.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ANDROID: binder: synchronize_rcu() when using POLLFREE.</title>
<updated>2018-02-16T10:16:38Z</updated>
<author>
<name>Martijn Coenen</name>
<email>maco@android.com</email>
</author>
<published>2018-02-16T08:47:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5eeb2ca02a2f6084fc57ae5c244a38baab07033a'/>
<id>urn:sha1:5eeb2ca02a2f6084fc57ae5c244a38baab07033a</id>
<content type='text'>
To prevent races with ep_remove_waitqueue() removing the
waitqueue at the same time.

Reported-by: syzbot+a2a3c4909716e271487e@syzkaller.appspotmail.com
Signed-off-by: Martijn Coenen &lt;maco@android.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt; # 4.14+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
