<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/android_kernel_m2note/drivers/android, branch ng-7.1.2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=ng-7.1.2</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=ng-7.1.2'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/'/>
<updated>2019-05-02T15:20:57+00:00</updated>
<entry>
<title>Staging: android: binder: Ratelimit binder debug messages</title>
<updated>2019-05-02T15:20:57+00:00</updated>
<author>
<name>Chris Fries</name>
<email>cfries@motorola.com</email>
</author>
<published>2014-09-29T03:58:09+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=c2d67afc6ba9cd413c1cf2d0dfd41850a5a14ebf'/>
<id>urn:sha1:c2d67afc6ba9cd413c1cf2d0dfd41850a5a14ebf</id>
<content type='text'>
Ratelimit the binder debug messages, since they can get spammy and
flood the entire kernel log.

In some cases, enabling serial console with a spammy binder error can
cause a watchdog panic (and we don't have reports of this happening
with serial console disabled).

Bug: 17613664
Change-Id: Iecdb4c3c80ccf00c43459e93c17f5369fd55e6e7
Signed-off-by: Chris Fries &lt;cfries@motorola.com&gt;
</content>
</entry>
<entry>
<title>FROMLIST: ANDROID: binder: Add BINDER_GET_NODE_INFO_FOR_REF ioctl.</title>
<updated>2018-11-29T09:59:47+00:00</updated>
<author>
<name>Martijn Coenen</name>
<email>maco@android.com</email>
</author>
<published>2018-08-25T20:50:56+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=b972c6d86079f1f313daad3a8156da8581990408'/>
<id>urn:sha1:b972c6d86079f1f313daad3a8156da8581990408</id>
<content type='text'>
This allows the context manager to retrieve information about nodes
that it holds a reference to, such as the current number of
references to those nodes.

Such information can for example be used to determine whether the
servicemanager is the only process holding a reference to a node.
This information can then be passed on to the process holding the
node, which can in turn decide whether it wants to shut down to
reduce resource usage.

Signed-off-by: Martijn Coenen &lt;maco@android.com&gt;
</content>
</entry>
<entry>
<title>UPSTREAM: binder: replace "%p" with "%pK"</title>
<updated>2018-11-29T09:59:47+00:00</updated>
<author>
<name>Todd Kjos</name>
<email>tkjos@android.com</email>
</author>
<published>2018-02-07T21:57:37+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=d097508a108d53f91fad02432fbd83f174b9aa45'/>
<id>urn:sha1:d097508a108d53f91fad02432fbd83f174b9aa45</id>
<content type='text'>
The format specifier "%p" can leak kernel addresses. Use
"%pK" instead. There were 4 remaining cases in binder.c.

Signed-off-by: Todd Kjos &lt;tkjos@google.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
(cherry picked from commit 8ca86f1639ec5890d400fff9211aca22d0a392eb)

Change-Id: I309241853c53bcdfa65c17cb05876e786597afdd
</content>
</entry>
<entry>
<title>UPSTREAM: binder: free memory on error</title>
<updated>2018-11-29T09:59:47+00:00</updated>
<author>
<name>Christian Brauner</name>
<email>christian.brauner@ubuntu.com</email>
</author>
<published>2017-08-21T14:13:28+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=f08c477a8233c0a149bd8c3dce8703d790a87ad3'/>
<id>urn:sha1:f08c477a8233c0a149bd8c3dce8703d790a87ad3</id>
<content type='text'>
On binder_init() the devices string is duplicated and smashed into individual
device names which are passed along. However, the original duplicated string
wasn't freed in case binder_init() failed. Let's free it on error.

Signed-off-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
(cherry picked from commit 22eb9476b5d80a393ac0ba235c42bccc90b82c76)

Change-Id: I78fdeecf70c31ba4248b3de17130f97546288f84
</content>
</entry>
<entry>
<title>UPSTREAM: ANDROID: binder: change down_write to down_read</title>
<updated>2018-11-29T09:59:46+00:00</updated>
<author>
<name>Minchan Kim</name>
<email>minchan@kernel.org</email>
</author>
<published>2018-05-07T14:15:37+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=3702e61005b6491b814dc539300d4d413831086e'/>
<id>urn:sha1:3702e61005b6491b814dc539300d4d413831086e</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;
(cherry picked from commit 720c241924046aff83f5f2323232f34a30a4c281)

Change-Id: I8358ceaaab4030f7122c95308dcad59557cad411
</content>
</entry>
<entry>
<title>UPSTREAM: ANDROID: binder: correct the cmd print for BINDER_WORK_RETURN_ERROR</title>
<updated>2018-11-29T09:59:46+00:00</updated>
<author>
<name>宋金时</name>
<email>songjinshi@xiaomi.com</email>
</author>
<published>2018-05-10T02:05:03+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=94e780c6f1e8779b4aba2d50523bc4b0d95c9317'/>
<id>urn:sha1:94e780c6f1e8779b4aba2d50523bc4b0d95c9317</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;
(cherry picked from commit 838d5565669aa5bb7deb605684a5970d51d5eaf6)

Change-Id: I425b32c5419a491c6b9ceee7c00dde6513e0421d
</content>
</entry>
<entry>
<title>UPSTREAM: ANDROID: binder: remove 32-bit binder interface.</title>
<updated>2018-11-29T09:59:46+00:00</updated>
<author>
<name>Martijn Coenen</name>
<email>maco@google.com</email>
</author>
<published>2018-05-11T08:45:24+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=98f55d3a8dd20a0bee8bcc12e4bf507a9a58ae93'/>
<id>urn:sha1:98f55d3a8dd20a0bee8bcc12e4bf507a9a58ae93</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;
(cherry picked from commit 1190b4e38f97023154e6b3bef61b251aa5f970d0)

Change-Id: I73dadf1d7b45a42bb18be5d5d3f5c090e61866de
</content>
</entry>
<entry>
<title>UPSTREAM: ANDROID: binder: re-order some conditions</title>
<updated>2018-11-29T09:59:46+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2018-03-29T09:14:40+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=05a3a630ec614783a8be1a477f70bce20f2d251e'/>
<id>urn:sha1:05a3a630ec614783a8be1a477f70bce20f2d251e</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;
(cherry picked from commit 361f2ddbb0c9f9b4f336025a7bd0212cea4a34f0)

Change-Id: I098d525ba63d125caa9840e6e1d5004bf70edc3c
</content>
</entry>
<entry>
<title>UPSTREAM: android: binder: use VM_ALLOC to get vm area</title>
<updated>2018-11-29T09:59:46+00:00</updated>
<author>
<name>Ganesh Mahendran</name>
<email>opensource.ganesh@gmail.com</email>
</author>
<published>2018-01-10T02:49:05+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=b28bb9199f8bcd497df42b79474dd2ced6993cae'/>
<id>urn:sha1:b28bb9199f8bcd497df42b79474dd2ced6993cae</id>
<content type='text'>
VM_IOREMAP is used to access hardware through a mechanism called
I/O mapped memory. Android binder is a IPC machanism which will
not access I/O memory.

And VM_IOREMAP has alignment requiement which may not needed in
binder.
    __get_vm_area_node()
    {
    ...
        if (flags &amp; VM_IOREMAP)
            align = 1ul &lt;&lt; clamp_t(int, fls_long(size),
               PAGE_SHIFT, IOREMAP_MAX_ORDER);
    ...
    }

This patch will save some kernel vm area, especially for 32bit os.

In 32bit OS, kernel vm area is only 240MB. We may got below
error when launching a app:

&lt;3&gt;[ 4482.440053] binder_alloc: binder_alloc_mmap_handler: 15728 8ce67000-8cf65000 get_vm_area failed -12
&lt;3&gt;[ 4483.218817] binder_alloc: binder_alloc_mmap_handler: 15745 8ce67000-8cf65000 get_vm_area failed -12

Signed-off-by: Ganesh Mahendran &lt;opensource.ganesh@gmail.com&gt;
Acked-by: Martijn Coenen &lt;maco@android.com&gt;
Acked-by: Todd Kjos &lt;tkjos@google.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;

----
V3: update comments
V2: update comments
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
(cherry picked from commit aac6830ec1cb681544212838911cdc57f2638216)

Change-Id: Ide458abc6a4d3ec07973733aa223c4247eef20e6
</content>
</entry>
<entry>
<title>UPSTREAM: android: binder: Use true and false for boolean values</title>
<updated>2018-11-29T09:59:46+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2018-01-23T18:04:27+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=b19ca6513d4c13dc74830a56ad18258233af4832'/>
<id>urn:sha1:b19ca6513d4c13dc74830a56ad18258233af4832</id>
<content type='text'>
Assign true or false to boolean variables instead of an integer value.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Cc: Todd Kjos &lt;tkjos@android.com&gt;
Cc: Martijn Coenen &lt;maco@android.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
(cherry picked from commit 197410ad884eb18b31d48e9d8e64cb5a9e326f2f)

Change-Id: I30bed831d6b6ff2e9e3e521ccc5d6836f0b30944
Signed-off-by: Moyster &lt;oysterized@gmail.com&gt;
</content>
</entry>
</feed>
