<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/android/binder.c, branch v5.1</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=v5.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-03-21T05:50:47Z</updated>
<entry>
<title>binder: fix BUG_ON found by selinux-testsuite</title>
<updated>2019-03-21T05:50:47Z</updated>
<author>
<name>Todd Kjos</name>
<email>tkjos@android.com</email>
</author>
<published>2019-03-20T22:35:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5997da82145bb7c9a56d834894cb81f81f219344'/>
<id>urn:sha1:5997da82145bb7c9a56d834894cb81f81f219344</id>
<content type='text'>
The selinux-testsuite found an issue resulting in a BUG_ON()
where a conditional relied on a size_t going negative when
checking the validity of a buffer offset.

Fixes: 7a67a39320df ("binder: add function to copy binder object from buffer")
Reported-by: Paul Moore &lt;paul@paul-moore.com&gt;
Tested-by: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: Todd Kjos &lt;tkjos@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>binder: fix handling of misaligned binder object</title>
<updated>2019-02-15T07:49:20Z</updated>
<author>
<name>Todd Kjos</name>
<email>tkjos@android.com</email>
</author>
<published>2019-02-14T23:22:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=26528be6720bb40bc8844e97ee73a37e530e9c5e'/>
<id>urn:sha1:26528be6720bb40bc8844e97ee73a37e530e9c5e</id>
<content type='text'>
Fixes crash found by syzbot:
kernel BUG at drivers/android/binder_alloc.c:LINE! (2)

Reported-and-tested-by: syzbot+55de1eb4975dec156d8f@syzkaller.appspotmail.com
Signed-off-by: Todd Kjos &lt;tkjos@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>binder: use userspace pointer as base of buffer space</title>
<updated>2019-02-12T09:43:57Z</updated>
<author>
<name>Todd Kjos</name>
<email>tkjos@android.com</email>
</author>
<published>2019-02-08T18:35:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bde4a19fc04f5f46298c86b1acb7a4af1d5f138d'/>
<id>urn:sha1:bde4a19fc04f5f46298c86b1acb7a4af1d5f138d</id>
<content type='text'>
Now that alloc-&gt;buffer points to the userspace vm_area
rename buffer-&gt;data to buffer-&gt;user_data and rename
local pointers that hold user addresses. Also use the
"__user" tag to annotate all user pointers so sparse
can flag cases where user pointer vaues  are copied to
kernel pointers. Refactor code to use offsets instead
of user pointers.

Signed-off-by: Todd Kjos &lt;tkjos@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>binder: remove user_buffer_offset</title>
<updated>2019-02-12T09:43:57Z</updated>
<author>
<name>Todd Kjos</name>
<email>tkjos@android.com</email>
</author>
<published>2019-02-08T18:35:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c41358a5f5217abd7c051e8d42397e5b80f3b3ed'/>
<id>urn:sha1:c41358a5f5217abd7c051e8d42397e5b80f3b3ed</id>
<content type='text'>
Remove user_buffer_offset since there is no kernel
buffer pointer anymore.

Signed-off-by: Todd Kjos &lt;tkjos@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>binder: avoid kernel vm_area for buffer fixups</title>
<updated>2019-02-12T09:43:57Z</updated>
<author>
<name>Todd Kjos</name>
<email>tkjos@android.com</email>
</author>
<published>2019-02-08T18:35:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=db6b0b810bf945d1991917ffce0e93383101f2fa'/>
<id>urn:sha1:db6b0b810bf945d1991917ffce0e93383101f2fa</id>
<content type='text'>
Refactor the functions to validate and fixup struct
binder_buffer pointer objects to avoid using vm_area
pointers. Instead copy to/from kernel space using
binder_alloc_copy_to_buffer() and
binder_alloc_copy_from_buffer(). The following
functions were refactored:

	refactor binder_validate_ptr()
	binder_validate_fixup()
	binder_fixup_parent()

Signed-off-by: Todd Kjos &lt;tkjos@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>binder: add function to copy binder object from buffer</title>
<updated>2019-02-12T09:43:57Z</updated>
<author>
<name>Todd Kjos</name>
<email>tkjos@android.com</email>
</author>
<published>2019-02-08T18:35:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7a67a39320dfba4b36d3be5dae4581194e650316'/>
<id>urn:sha1:7a67a39320dfba4b36d3be5dae4581194e650316</id>
<content type='text'>
When creating or tearing down a transaction, the binder driver
examines objects in the buffer and takes appropriate action.
To do this without needing to dereference pointers into the
buffer, the local copies of the objects are needed. This patch
introduces a function to validate and copy binder objects
from the buffer to a local structure.

Signed-off-by: Todd Kjos &lt;tkjos@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>binder: add functions to copy to/from binder buffers</title>
<updated>2019-02-12T09:43:57Z</updated>
<author>
<name>Todd Kjos</name>
<email>tkjos@android.com</email>
</author>
<published>2019-02-08T18:35:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8ced0c6231ead26eca8cb416dcb7cc1c2cdd41d8'/>
<id>urn:sha1:8ced0c6231ead26eca8cb416dcb7cc1c2cdd41d8</id>
<content type='text'>
Avoid vm_area when copying to or from binder buffers.
Instead, new copy functions are added that copy from
kernel space to binder buffer space. These use
kmap_atomic() and kunmap_atomic() to create temporary
mappings and then memcpy() is used to copy within
that page.

Also, kmap_atomic() / kunmap_atomic() use the appropriate
cache flushing to support VIVT cache architectures.
Allow binder to build if CPU_CACHE_VIVT is defined.

Several uses of the new functions are added here. More
to follow in subsequent patches.

Signed-off-by: Todd Kjos &lt;tkjos@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>binder: create userspace-to-binder-buffer copy function</title>
<updated>2019-02-12T09:43:57Z</updated>
<author>
<name>Todd Kjos</name>
<email>tkjos@android.com</email>
</author>
<published>2019-02-08T18:35:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1a7c3d9bb7a926e88d5f57643e75ad1abfc55013'/>
<id>urn:sha1:1a7c3d9bb7a926e88d5f57643e75ad1abfc55013</id>
<content type='text'>
The binder driver uses a vm_area to map the per-process
binder buffer space. For 32-bit android devices, this is
now taking too much vmalloc space. This patch removes
the use of vm_area when copying the transaction data
from the sender to the buffer space. Instead of using
copy_from_user() for multi-page copies, it now uses
binder_alloc_copy_user_to_buffer() which uses kmap()
and kunmap() to map each page, and uses copy_from_user()
for copying to that page.

Signed-off-by: Todd Kjos &lt;tkjos@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 5.0-rc6 into char-misc-next</title>
<updated>2019-02-11T08:05:58Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-02-11T08:05:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5c07488d996b6b2af609f351bf54c9909ed0fdf8'/>
<id>urn:sha1:5c07488d996b6b2af609f351bf54c9909ed0fdf8</id>
<content type='text'>
We need the char-misc fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>binderfs: remove separate device_initcall()</title>
<updated>2019-02-01T14:50:26Z</updated>
<author>
<name>Christian Brauner</name>
<email>christian@brauner.io</email>
</author>
<published>2019-01-31T00:25:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5b9633af298bfd1de650f6774d3fada546543101'/>
<id>urn:sha1:5b9633af298bfd1de650f6774d3fada546543101</id>
<content type='text'>
binderfs should not have a separate device_initcall(). When a kernel is
compiled with CONFIG_ANDROID_BINDERFS register the filesystem alongside
CONFIG_ANDROID_IPC. This use-case is especially sensible when users specify
CONFIG_ANDROID_IPC=y, CONFIG_ANDROID_BINDERFS=y and
ANDROID_BINDER_DEVICES="".
When CONFIG_ANDROID_BINDERFS=n then this always succeeds so there's no
regression potential for legacy workloads.

Signed-off-by: Christian Brauner &lt;christian@brauner.io&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
