<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/net/9p/trans_fd.c, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/net/9p/trans_fd.c?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/net/9p/trans_fd.c?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2019-05-30T18:29:21Z</updated>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188</title>
<updated>2019-05-30T18:29:21Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-28T16:57:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=1f327613224e3a811d01d66d3c38762b3822057c'/>
<id>urn:sha1:1f327613224e3a811d01d66d3c38762b3822057c</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details you should have received a copy of the gnu general
  public license along with this program if not write to free software
  foundation 51 franklin street fifth floor boston ma 02111 1301 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 27 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Reviewed-by: Steve Winslow &lt;swinslow@gmail.com&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190528170026.981318839@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>9p/trans_fd: put worker reqs on destroy</title>
<updated>2018-10-10T00:14:34Z</updated>
<author>
<name>Dominique Martinet</name>
<email>dominique.martinet@cea.fr</email>
</author>
<published>2018-10-09T02:38:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=fb488fc1f2b4c5128540b032892ddec91edaf8d9'/>
<id>urn:sha1:fb488fc1f2b4c5128540b032892ddec91edaf8d9</id>
<content type='text'>
p9_read_work/p9_write_work might still hold references to a req after
having been cancelled; make sure we put any of these to avoid potential
request leak on disconnect.

Fixes: 728356dedeff8 ("9p: Add refcount to p9_req_t")
Link: http://lkml.kernel.org/r/1539057956-23741-2-git-send-email-asmadeus@codewreck.org
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
Cc: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
Cc: Latchesar Ionkov &lt;lucho@ionkov.net&gt;
Reviewed-by: Tomas Bortoli &lt;tomasbortoli@gmail.com&gt;
</content>
</entry>
<entry>
<title>9p/trans_fd: abort p9_read_work if req status changed</title>
<updated>2018-10-10T00:13:30Z</updated>
<author>
<name>Dominique Martinet</name>
<email>dominique.martinet@cea.fr</email>
</author>
<published>2018-10-09T02:18:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=e4ca13f7d075e551dc158df6af18fb412a1dba0a'/>
<id>urn:sha1:e4ca13f7d075e551dc158df6af18fb412a1dba0a</id>
<content type='text'>
p9_read_work would try to handle an errored req even if it got put to
error state by another thread between the lookup (that worked) and the
time it had been fully read.
The request itself is safe to use because we hold a ref to it from the
lookup (for m-&gt;rreq, so it was safe to read into the request data buffer
until this point), but the req_list has been deleted at the same time
status changed, and client_cb already has been called as well, so we
should not do either.

Link: http://lkml.kernel.org/r/1539057956-23741-1-git-send-email-asmadeus@codewreck.org
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
Reported-by: syzbot+2222c34dc40b515f30dc@syzkaller.appspotmail.com
Cc: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
Cc: Latchesar Ionkov &lt;lucho@ionkov.net&gt;
</content>
</entry>
<entry>
<title>9p: Rename req to rreq in trans_fd</title>
<updated>2018-09-07T16:40:04Z</updated>
<author>
<name>Tomas Bortoli</name>
<email>tomasbortoli@gmail.com</email>
</author>
<published>2018-09-03T16:03:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=6d35190f395316916c8bb4aabd35a182890bf856'/>
<id>urn:sha1:6d35190f395316916c8bb4aabd35a182890bf856</id>
<content type='text'>
In struct p9_conn, rename req to rreq as it is used by the read routine.

Link: http://lkml.kernel.org/r/20180903160321.2181-1-tomasbortoli@gmail.com
Signed-off-by: Tomas Bortoli &lt;tomasbortoli@gmail.com&gt;
Suggested-by: Jun Piao &lt;piaojun@huawei.com&gt;
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
<entry>
<title>9p: Add refcount to p9_req_t</title>
<updated>2018-09-07T16:39:47Z</updated>
<author>
<name>Tomas Bortoli</name>
<email>tomasbortoli@gmail.com</email>
</author>
<published>2018-08-14T17:43:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=728356dedeff8ef999cb436c71333ef4ac51a81c'/>
<id>urn:sha1:728356dedeff8ef999cb436c71333ef4ac51a81c</id>
<content type='text'>
To avoid use-after-free(s), use a refcount to keep track of the
usable references to any instantiated struct p9_req_t.

This commit adds p9_req_put(), p9_req_get() and p9_req_try_get() as
wrappers to kref_put(), kref_get() and kref_get_unless_zero().
These are used by the client and the transports to keep track of
valid requests' references.

p9_free_req() is added back and used as callback by kref_put().

Add SLAB_TYPESAFE_BY_RCU as it ensures that the memory freed by
kmem_cache_free() will not be reused for another type until the rcu
synchronisation period is over, so an address gotten under rcu read
lock is safe to inc_ref() without corrupting random memory while
the lock is held.

Link: http://lkml.kernel.org/r/1535626341-20693-1-git-send-email-asmadeus@codewreck.org
Co-developed-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
Signed-off-by: Tomas Bortoli &lt;tomasbortoli@gmail.com&gt;
Reported-by: syzbot+467050c1ce275af2a5b8@syzkaller.appspotmail.com
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
<entry>
<title>9p: embed fcall in req to round down buffer allocs</title>
<updated>2018-09-07T16:39:45Z</updated>
<author>
<name>Dominique Martinet</name>
<email>dominique.martinet@cea.fr</email>
</author>
<published>2018-07-30T05:55:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=523adb6cc10b48655c0abe556505240741425b49'/>
<id>urn:sha1:523adb6cc10b48655c0abe556505240741425b49</id>
<content type='text'>
'msize' is often a power of two, or at least page-aligned, so avoiding
an overhead of two dozen bytes for each allocation will help the
allocator do its work and reduce memory fragmentation.

Link: http://lkml.kernel.org/r/1533825236-22896-1-git-send-email-asmadeus@codewreck.org
Suggested-by: Matthew Wilcox &lt;willy@infradead.org&gt;
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
Reviewed-by: Greg Kurz &lt;groug@kaod.org&gt;
Acked-by: Jun Piao &lt;piaojun@huawei.com&gt;
Cc: Matthew Wilcox &lt;willy@infradead.org&gt;
</content>
</entry>
<entry>
<title>9p: fix multiple NULL-pointer-dereferences</title>
<updated>2018-08-13T00:34:58Z</updated>
<author>
<name>Tomas Bortoli</name>
<email>tomasbortoli@gmail.com</email>
</author>
<published>2018-07-27T11:05:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=10aa14527f458e9867cf3d2cc6b8cb0f6704448b'/>
<id>urn:sha1:10aa14527f458e9867cf3d2cc6b8cb0f6704448b</id>
<content type='text'>
Added checks to prevent GPFs from raising.

Link: http://lkml.kernel.org/r/20180727110558.5479-1-tomasbortoli@gmail.com
Signed-off-by: Tomas Bortoli &lt;tomasbortoli@gmail.com&gt;
Reported-by: syzbot+1a262da37d3bead15c39@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
<entry>
<title>9p: validate PDU length</title>
<updated>2018-08-13T00:34:58Z</updated>
<author>
<name>Tomas Bortoli</name>
<email>tomasbortoli@gmail.com</email>
</author>
<published>2018-07-23T15:44:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=f984579a01d85166ee7380204a96d978a67687a1'/>
<id>urn:sha1:f984579a01d85166ee7380204a96d978a67687a1</id>
<content type='text'>
This commit adds length check for the PDU size.
The size contained in the header has to match the actual size,
except for TCP (trans_fd.c) where actual length is not known ahead
and the header's length will be checked only against the validity
range.

Link: http://lkml.kernel.org/r/20180723154404.2406-1-tomasbortoli@gmail.com
Signed-off-by: Tomas Bortoli &lt;tomasbortoli@gmail.com&gt;
Reported-by: syzbot+65c6b72f284a39d416b4@syzkaller.appspotmail.com
To: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
To: Ron Minnich &lt;rminnich@sandia.gov&gt;
To: Latchesar Ionkov &lt;lucho@ionkov.net&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
<entry>
<title>net/9p/trans_fd.c: fix race by holding the lock</title>
<updated>2018-08-13T00:34:58Z</updated>
<author>
<name>Tomas Bortoli</name>
<email>tomasbortoli@gmail.com</email>
</author>
<published>2018-07-23T18:42:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=9f476d7c540cb57556d3cc7e78704e6cd5100f5f'/>
<id>urn:sha1:9f476d7c540cb57556d3cc7e78704e6cd5100f5f</id>
<content type='text'>
It may be possible to run p9_fd_cancel() with a deleted req-&gt;req_list
and incur in a double del. To fix hold the client-&gt;lock while changing
the status, so the other threads will be synchronized.

Link: http://lkml.kernel.org/r/20180723184253.6682-1-tomasbortoli@gmail.com
Signed-off-by: Tomas Bortoli &lt;tomasbortoli@gmail.com&gt;
Reported-by: syzbot+735d926e9d1317c3310c@syzkaller.appspotmail.com
To: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
To: Ron Minnich &lt;rminnich@sandia.gov&gt;
To: Latchesar Ionkov &lt;lucho@ionkov.net&gt;
Cc: Yiwen Jiang &lt;jiangyiwen@huwei.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
<entry>
<title>net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree()</title>
<updated>2018-08-13T00:34:58Z</updated>
<author>
<name>Tomas Bortoli</name>
<email>tomasbortoli@gmail.com</email>
</author>
<published>2018-07-20T09:27:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=430ac66eb4c5b5c4eb846b78ebf65747510b30f1'/>
<id>urn:sha1:430ac66eb4c5b5c4eb846b78ebf65747510b30f1</id>
<content type='text'>
The patch adds the flush in p9_mux_poll_stop() as it the function used by
p9_conn_destroy(), in turn called by p9_fd_close() to stop the async
polling associated with the data regarding the connection.

Link: http://lkml.kernel.org/r/20180720092730.27104-1-tomasbortoli@gmail.com
Signed-off-by: Tomas Bortoli &lt;tomasbortoli@gmail.com&gt;
Reported-by: syzbot+39749ed7d9ef6dfb23f6@syzkaller.appspotmail.com
To: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
To: Ron Minnich &lt;rminnich@sandia.gov&gt;
To: Latchesar Ionkov &lt;lucho@ionkov.net&gt;
Cc: Yiwen Jiang &lt;jiangyiwen@huwei.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Dominique Martinet &lt;dominique.martinet@cea.fr&gt;
</content>
</entry>
</feed>
