<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/ceph/messenger.c, branch linux-5.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-05-17T00:00:13Z</updated>
<entry>
<title>Merge tag 'afs-fixes-20190516' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs</title>
<updated>2019-05-17T00:00:13Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2019-05-17T00:00:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=227747fb9eab37aaeb360aeba795362c01889427'/>
<id>urn:sha1:227747fb9eab37aaeb360aeba795362c01889427</id>
<content type='text'>
Pull misc AFS fixes from David Howells:
 "This fixes a set of miscellaneous issues in the afs filesystem,
  including:

   - leak of keys on file close.

   - broken error handling in xattr functions.

   - missing locking when updating VL server list.

   - volume location server DNS lookup whereby preloaded cells may not
     ever get a lookup and regular DNS lookups to maintain server lists
     consume power unnecessarily.

   - incorrect error propagation and handling in the fileserver
     iteration code causes operations to sometimes apparently succeed.

   - interruption of server record check/update side op during
     fileserver iteration causes uninterruptible main operations to fail
     unexpectedly.

   - callback promise expiry time miscalculation.

   - over invalidation of the callback promise on directories.

   - double locking on callback break waking up file locking waiters.

   - double increment of the vnode callback break counter.

  Note that it makes some changes outside of the afs code, including:

   - an extra parameter to dns_query() to allow the dns_resolver key
     just accessed to be immediately invalidated. AFS is caching the
     results itself, so the key can be discarded.

   - an interruptible version of wait_var_event().

   - an rxrpc function to allow the maximum lifespan to be set on a
     call.

   - a way for an rxrpc call to be marked as non-interruptible"

* tag 'afs-fixes-20190516' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
  afs: Fix double inc of vnode-&gt;cb_break
  afs: Fix lock-wait/callback-break double locking
  afs: Don't invalidate callback if AFS_VNODE_DIR_VALID not set
  afs: Fix calculation of callback expiry time
  afs: Make dynamic root population wait uninterruptibly for proc_cells_lock
  afs: Make some RPC operations non-interruptible
  rxrpc: Allow the kernel to mark a call as being non-interruptible
  afs: Fix error propagation from server record check/update
  afs: Fix the maximum lifespan of VL and probe calls
  rxrpc: Provide kernel interface to set max lifespan on a call
  afs: Fix "kAFS: AFS vnode with undefined type 0"
  afs: Fix cell DNS lookup
  Add wait_var_event_interruptible()
  dns_resolver: Allow used keys to be invalidated
  afs: Fix afs_cell records to always have a VL server list record
  afs: Fix missing lock when replacing VL server list
  afs: Fix afs_xattr_get_yfs() to not try freeing an error value
  afs: Fix incorrect error handling in afs_xattr_get_acl()
  afs: Fix key leak in afs_release() and afs_evict_inode()
</content>
</entry>
<entry>
<title>dns_resolver: Allow used keys to be invalidated</title>
<updated>2019-05-15T16:35:54Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2019-05-03T17:26:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d0660f0b3b7d1760d1ab60ec8e9d0de52e885207'/>
<id>urn:sha1:d0660f0b3b7d1760d1ab60ec8e9d0de52e885207</id>
<content type='text'>
Allow used DNS resolver keys to be invalidated after use if the caller is
doing its own caching of the results.  This reduces the amount of resources
required.

Fix AFS to invalidate DNS results to kill off permanent failure records
that get lodged in the resolver keyring and prevent future lookups from
happening.

Fixes: 0a5143f2f89c ("afs: Implement VL server rotation")
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>libceph: make ceph_pr_addr take an struct ceph_entity_addr pointer</title>
<updated>2019-05-07T17:43:05Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2019-05-06T13:38:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b726ec972cf2122137fbc47847b4fcc7b3bc2801'/>
<id>urn:sha1:b726ec972cf2122137fbc47847b4fcc7b3bc2801</id>
<content type='text'>
GCC9 is throwing a lot of warnings about unaligned accesses by
callers of ceph_pr_addr. All of the current callers are passing a
pointer to the sockaddr inside struct ceph_entity_addr.

Fix it to take a pointer to a struct ceph_entity_addr instead,
and then have the function make a copy of the sockaddr before
printing it.

Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Reviewed-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: fix unaligned accesses in ceph_entity_addr handling</title>
<updated>2019-05-07T17:43:05Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2019-05-06T13:38:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cede185b1ba3118e1912385db4812a37d9e9b205'/>
<id>urn:sha1:cede185b1ba3118e1912385db4812a37d9e9b205</id>
<content type='text'>
GCC9 is throwing a lot of warnings about unaligned access. This patch
fixes some of them by changing most of the sockaddr handling functions
to take a pointer to struct ceph_entity_addr instead of struct
sockaddr_storage.  The lower functions can then make copies or do
unaligned accesses as needed.

Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Reviewed-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: fix breakage caused by multipage bvecs</title>
<updated>2019-03-25T21:28:07Z</updated>
<author>
<name>Ilya Dryomov</name>
</author>
<published>2019-03-22T21:14:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=187df76325af5d9e12ae9daec1510307797e54f0'/>
<id>urn:sha1:187df76325af5d9e12ae9daec1510307797e54f0</id>
<content type='text'>
A bvec can now consist of multiple physically contiguous pages.
This means that bvec_iter_advance() can move to a different page while
staying in the same bvec (i.e. -&gt;bi_bvec_done != 0).

The messenger works in terms of segments which can now be defined as
the smaller of a bvec and a page.  The "more bytes to process in this
segment" condition holds only if bvec_iter_advance() leaves us in the
same bvec _and_ in the same page.  On next bvec (possibly in the same
page) and on next page (possibly in the same bvec) we may need to set
-&gt;last_piece.

Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: handle an empty authorize reply</title>
<updated>2019-02-18T17:05:33Z</updated>
<author>
<name>Ilya Dryomov</name>
</author>
<published>2019-02-05T19:30:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0fd3fd0a9bb0b02b6435bb7070e9f7b82a23f068'/>
<id>urn:sha1:0fd3fd0a9bb0b02b6435bb7070e9f7b82a23f068</id>
<content type='text'>
The authorize reply can be empty, for example when the ticket used to
build the authorizer is too old and TAG_BADAUTHORIZER is returned from
the service.  Calling -&gt;verify_authorizer_reply() results in an attempt
to decrypt and validate (somewhat) random data in au-&gt;buf (most likely
the signature block from calc_signature()), which fails and ends up in
con_fault_finish() with !con-&gt;auth_retry.  The ticket isn't invalidated
and the connection is retried again and again until a new ticket is
obtained from the monitor:

  libceph: osd2 192.168.122.1:6809 bad authorize reply
  libceph: osd2 192.168.122.1:6809 bad authorize reply
  libceph: osd2 192.168.122.1:6809 bad authorize reply
  libceph: osd2 192.168.122.1:6809 bad authorize reply

Let TAG_BADAUTHORIZER handler kick in and increment con-&gt;auth_retry.

Cc: stable@vger.kernel.org
Fixes: 5c056fdc5b47 ("libceph: verify authorize reply on connect")
Link: https://tracker.ceph.com/issues/20164
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Reviewed-by: Sage Weil &lt;sage@redhat.com&gt;
</content>
</entry>
<entry>
<title>libceph: avoid KEEPALIVE_PENDING races in ceph_con_keepalive()</title>
<updated>2019-01-21T13:53:12Z</updated>
<author>
<name>Ilya Dryomov</name>
</author>
<published>2019-01-14T20:13:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4aac9228d16458cedcfd90c7fb37211cf3653ac3'/>
<id>urn:sha1:4aac9228d16458cedcfd90c7fb37211cf3653ac3</id>
<content type='text'>
con_fault() can transition the connection into STANDBY right after
ceph_con_keepalive() clears STANDBY in clear_standby():

    libceph user thread               ceph-msgr worker

ceph_con_keepalive()
  mutex_lock(&amp;con-&gt;mutex)
  clear_standby(con)
  mutex_unlock(&amp;con-&gt;mutex)
                                mutex_lock(&amp;con-&gt;mutex)
                                con_fault()
                                  ...
                                  if KEEPALIVE_PENDING isn't set
                                    set state to STANDBY
                                  ...
                                mutex_unlock(&amp;con-&gt;mutex)
  set KEEPALIVE_PENDING
  set WRITE_PENDING

This triggers warnings in clear_standby() when either ceph_con_send()
or ceph_con_keepalive() get to clearing STANDBY next time.

I don't see a reason to condition queue_con() call on the previous
value of KEEPALIVE_PENDING, so move the setting of KEEPALIVE_PENDING
into the critical section -- unlike WRITE_PENDING, KEEPALIVE_PENDING
could have been a non-atomic flag.

Reported-by: syzbot+acdeb633f6211ccdf886@syzkaller.appspotmail.com
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Tested-by: Myungho Jung &lt;mhjungk@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: switch more to bool in ceph_tcp_sendmsg()</title>
<updated>2018-12-26T14:56:04Z</updated>
<author>
<name>Ilya Dryomov</name>
</author>
<published>2018-11-21T17:56:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=87349cdad963163b55cf7d327f5d47a647339838'/>
<id>urn:sha1:87349cdad963163b55cf7d327f5d47a647339838</id>
<content type='text'>
Unlike in ceph_tcp_sendpage(), it's a bool.

Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: use MSG_SENDPAGE_NOTLAST with ceph_tcp_sendpage()</title>
<updated>2018-12-26T14:56:04Z</updated>
<author>
<name>Ilya Dryomov</name>
</author>
<published>2018-11-20T14:44:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=433b0a12953bc1dfcb52febb186136395a65aad0'/>
<id>urn:sha1:433b0a12953bc1dfcb52febb186136395a65aad0</id>
<content type='text'>
Prevent do_tcp_sendpages() from calling tcp_push() (at least) once per
page.  Instead, arrange for tcp_push() to be called (at least) once per
data payload.  This results in more MSS-sized packets and fewer packets
overall (5-10% reduction in my tests with typical OSD request sizes).
See commits 2f5338442425 ("tcp: allow splice() to build full TSO
packets"), 35f9c09fe9c7 ("tcp: tcp_sendpages() should call tcp_push()
once") and ae62ca7b0321 ("tcp: fix MSG_SENDPAGE_NOTLAST logic") for
details.

Here is an example of a packet size histogram for 128K OSD requests
(MSS = 1448, top 5):

Before:

     SIZE    COUNT
     1448   777700
      952   127915
     1200    39238
     1219     9806
       21     5675

After:

     SIZE    COUNT
     1448   897280
       21     6201
     1019     2797
      643     2739
      376     2479

We could do slightly better by explicitly corking the socket but it's
not clear it's worth it.

Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: use sock_no_sendpage() as a fallback in ceph_tcp_sendpage()</title>
<updated>2018-12-26T14:56:04Z</updated>
<author>
<name>Ilya Dryomov</name>
</author>
<published>2018-11-16T10:58:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3239eb5215ebdef593a79316c9dbbdf8849166ec'/>
<id>urn:sha1:3239eb5215ebdef593a79316c9dbbdf8849166ec</id>
<content type='text'>
sock_no_sendpage() makes the code cleaner.

Also, don't set MSG_EOR.  sendpage doesn't act on MSG_EOR on its own,
it just honors the setting from the preceding sendmsg call by looking
at -&gt;eor in tcp_skb_can_collapse_to().

Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
</feed>
