<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/android_kernel_m2note/net/unix, 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>2018-11-29T16:49:05+00:00</updated>
<entry>
<title>Replace &lt;asm/uaccess.h&gt; with &lt;linux/uaccess.h&gt; globally</title>
<updated>2018-11-29T16:49:05+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-24T19:46:01+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=8588b01909e0145e5e84f5fe0a5353bd194f205c'/>
<id>urn:sha1:8588b01909e0145e5e84f5fe0a5353bd194f205c</id>
<content type='text'>
This was entirely automated, using the script by Al:

  PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*&lt;asm/uaccess.h&gt;'
  sed -i -e "s!$PATT!#include &lt;linux/uaccess.h&gt;!" \
        $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)

to do the replacement at the end of the merge window.

Requested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Moyster &lt;oysterized@gmail.com&gt;
</content>
</entry>
<entry>
<title>af_unix: move unix_mknod() out of bindlock</title>
<updated>2017-07-04T09:51:31+00:00</updated>
<author>
<name>WANG Cong</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2017-01-23T19:17:35+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=8856b3e0e8482eb3ffed8ef733bae0f3877a4d71'/>
<id>urn:sha1:8856b3e0e8482eb3ffed8ef733bae0f3877a4d71</id>
<content type='text'>
commit 0fb44559ffd67de8517098b81f675fa0210f13f0 upstream.

Dmitry reported a deadlock scenario:

unix_bind() path:
u-&gt;bindlock ==&gt; sb_writer

do_splice() path:
sb_writer ==&gt; pipe-&gt;mutex ==&gt; u-&gt;bindlock

In the unix_bind() code path, unix_mknod() does not have to
be done with u-&gt;bindlock held, since it is a pure fs operation,
so we can just move unix_mknod() out.

Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Cc: Rainer Weikusat &lt;rweikusat@mobileactivedefense.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>net: unix: properly re-increment inflight counter of GC discarded candidates</title>
<updated>2017-06-17T13:54:07+00:00</updated>
<author>
<name>Andrey Ulanov</name>
<email>andreyu@google.com</email>
</author>
<published>2017-03-15T03:16:42+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=ae81d47f9ffeeaa8a95ad453eb0106deef67c79c'/>
<id>urn:sha1:ae81d47f9ffeeaa8a95ad453eb0106deef67c79c</id>
<content type='text'>
commit 7df9c24625b9981779afb8fcdbe2bb4765e61147 upstream.

Dmitry has reported that a BUG_ON() condition in unix_notinflight()
may be triggered by a simple code that forwards unix socket in an
SCM_RIGHTS message.
That is caused by incorrect unix socket GC implementation in unix_gc().

The GC first collects list of candidates, then (a) decrements their
"children's" inflight counter, (b) checks which inflight counters are
now 0, and then (c) increments all inflight counters back.
(a) and (c) are done by calling scan_children() with inc_inflight or
dec_inflight as the second argument.

Commit 6209344f5a37 ("net: unix: fix inflight counting bug in garbage
collector") changed scan_children() such that it no longer considers
sockets that do not have UNIX_GC_CANDIDATE flag. It also added a block
of code that that unsets this flag _before_ invoking
scan_children(, dec_iflight, ). This may lead to incorrect inflight
counters for some sockets.

This change fixes this bug by changing order of operations:
UNIX_GC_CANDIDATE is now unset only after all inflight counters are
restored to the original state.

  kernel BUG at net/unix/garbage.c:149!
  RIP: 0010:[&lt;ffffffff8717ebf4&gt;]  [&lt;ffffffff8717ebf4&gt;]
  unix_notinflight+0x3b4/0x490 net/unix/garbage.c:149
  Call Trace:
   [&lt;ffffffff8716cfbf&gt;] unix_detach_fds.isra.19+0xff/0x170 net/unix/af_unix.c:1487
   [&lt;ffffffff8716f6a9&gt;] unix_destruct_scm+0xf9/0x210 net/unix/af_unix.c:1496
   [&lt;ffffffff86a90a01&gt;] skb_release_head_state+0x101/0x200 net/core/skbuff.c:655
   [&lt;ffffffff86a9808a&gt;] skb_release_all+0x1a/0x60 net/core/skbuff.c:668
   [&lt;ffffffff86a980ea&gt;] __kfree_skb+0x1a/0x30 net/core/skbuff.c:684
   [&lt;ffffffff86a98284&gt;] kfree_skb+0x184/0x570 net/core/skbuff.c:705
   [&lt;ffffffff871789d5&gt;] unix_release_sock+0x5b5/0xbd0 net/unix/af_unix.c:559
   [&lt;ffffffff87179039&gt;] unix_release+0x49/0x90 net/unix/af_unix.c:836
   [&lt;ffffffff86a694b2&gt;] sock_release+0x92/0x1f0 net/socket.c:570
   [&lt;ffffffff86a6962b&gt;] sock_close+0x1b/0x20 net/socket.c:1017
   [&lt;ffffffff81a76b8e&gt;] __fput+0x34e/0x910 fs/file_table.c:208
   [&lt;ffffffff81a771da&gt;] ____fput+0x1a/0x20 fs/file_table.c:244
   [&lt;ffffffff81483ab0&gt;] task_work_run+0x1a0/0x280 kernel/task_work.c:116
   [&lt;     inline     &gt;] exit_task_work include/linux/task_work.h:21
   [&lt;ffffffff8141287a&gt;] do_exit+0x183a/0x2640 kernel/exit.c:828
   [&lt;ffffffff8141383e&gt;] do_group_exit+0x14e/0x420 kernel/exit.c:931
   [&lt;ffffffff814429d3&gt;] get_signal+0x663/0x1880 kernel/signal.c:2307
   [&lt;ffffffff81239b45&gt;] do_signal+0xc5/0x2190 arch/x86/kernel/signal.c:807
   [&lt;ffffffff8100666a&gt;] exit_to_usermode_loop+0x1ea/0x2d0
  arch/x86/entry/common.c:156
   [&lt;     inline     &gt;] prepare_exit_to_usermode arch/x86/entry/common.c:190
   [&lt;ffffffff81009693&gt;] syscall_return_slowpath+0x4d3/0x570
  arch/x86/entry/common.c:259
   [&lt;ffffffff881478e6&gt;] entry_SYSCALL_64_fastpath+0xc4/0xc6

Link: https://lkml.org/lkml/2017/3/6/252
Signed-off-by: Andrey Ulanov &lt;andreyu@google.com&gt;
Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Fixes: 6209344 ("net: unix: fix inflight counting bug in garbage collector")
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>mtk: 3.10 updates</title>
<updated>2017-04-29T14:47:32+00:00</updated>
<author>
<name>Mister Oyster</name>
<email>oysterized@gmail.com</email>
</author>
<published>2017-04-29T14:27:14+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=3e0e49ebddd860ad6cceca5868de4c96858154a2'/>
<id>urn:sha1:3e0e49ebddd860ad6cceca5868de4c96858154a2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>net: Fix maybe-uninitialized variables</title>
<updated>2017-04-25T09:28:19+00:00</updated>
<author>
<name>Christopher N. Hesse</name>
<email>raymanfx@gmail.com</email>
</author>
<published>2017-04-11T18:46:38+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=12f097688a4d91cdd36fced51d7c944d813a1404'/>
<id>urn:sha1:12f097688a4d91cdd36fced51d7c944d813a1404</id>
<content type='text'>
Change-Id: I83202d1362a1d01fbd5be6c23f2f47fe60efcb61
</content>
</entry>
<entry>
<title>Security patches</title>
<updated>2017-04-16T13:03:42+00:00</updated>
<author>
<name>fire855</name>
<email>thefire855@gmail.com</email>
</author>
<published>2017-01-05T22:52:53+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=f81ee65aedf25f7279cb1023081823e815a6e708'/>
<id>urn:sha1:f81ee65aedf25f7279cb1023081823e815a6e708</id>
<content type='text'>
Signed-off-by: Mister Oyster &lt;oysterized@gmail.com&gt;
</content>
</entry>
<entry>
<title>net: unix: suppress initialization warnings</title>
<updated>2017-04-13T10:35:37+00:00</updated>
<author>
<name>Srinivasarao P</name>
<email>spathi@codeaurora.org</email>
</author>
<published>2015-11-05T07:22:33+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=d97c983cab77e60f49223f7990e82e510c2b51c8'/>
<id>urn:sha1:d97c983cab77e60f49223f7990e82e510c2b51c8</id>
<content type='text'>
compilation failed for ARCH=um due to uninitialized variable 'path'
so fixing it by initializing 'path' variable.

Change-Id: I3d745793876ffe4c518eff97f9d4acf79cc86cf7
Signed-off-by: Srinivasarao P &lt;spathi@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>af_unix: fix bug on large send()</title>
<updated>2017-04-13T10:32:08+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2013-08-12T04:54:48+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=8558623a83dc5bb686534553877d102b4e1a3504'/>
<id>urn:sha1:8558623a83dc5bb686534553877d102b4e1a3504</id>
<content type='text'>
commit e370a723632 ("af_unix: improve STREAM behavior with fragmented
memory") added a bug on large send() because the
skb_copy_datagram_from_iovec() call always start from the beginning
of iovec.

We must instead use the @sent variable to properly skip the
already processed part.

Reported-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Francisco Franco &lt;franciscofranco.1990@gmail.com&gt;
</content>
</entry>
<entry>
<title>af_unix: improve STREAM behavior with fragmented memory</title>
<updated>2017-04-13T10:32:08+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2013-08-08T21:37:32+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=5d3005a1584cd506cdc9e6a914d83e4484dc71d8'/>
<id>urn:sha1:5d3005a1584cd506cdc9e6a914d83e4484dc71d8</id>
<content type='text'>
unix_stream_sendmsg() currently uses order-2 allocations,
and we had numerous reports this can fail.

The __GFP_REPEAT flag present in sock_alloc_send_pskb() is
not helping.

This patch extends the work done in commit eb6a24816b247c
("af_unix: reduce high order page allocations) for
datagram sockets.

This opens the possibility of zero copy IO (splice() and
friends)

The trick is to not use skb_pull() anymore in recvmsg() path,
and instead add a @consumed field in UNIXCB() to track amount
of already read payload in the skb.

There is a performance regression for large sends
because of extra page allocations that will be addressed
in a follow-up patch, allowing sock_alloc_send_pskb()
to attempt high order page allocations.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Francisco Franco &lt;franciscofranco.1990@gmail.com&gt;
</content>
</entry>
<entry>
<title>af_unix: fix struct pid memory leak</title>
<updated>2017-04-13T10:32:08+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-01-24T21:53:50+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=6d4717c01face6564c99ec65de983c3ae2aa234c'/>
<id>urn:sha1:6d4717c01face6564c99ec65de983c3ae2aa234c</id>
<content type='text'>
Dmitry reported a struct pid leak detected by a syzkaller program.

Bug happens in unix_stream_recvmsg() when we break the loop when a
signal is pending, without properly releasing scm.

Fixes: b3ca9b02b007 ("net: fix multithreaded signal handling in unix recv routines")
Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Rainer Weikusat &lt;rweikusat@mobileactivedefense.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Francisco Franco &lt;franciscofranco.1990@gmail.com&gt;
</content>
</entry>
</feed>
