<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ceph, branch v4.4</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=v4.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-11-13T17:24:40Z</updated>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client</title>
<updated>2015-11-13T17:24:40Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-11-13T17:24:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ca4ba96e02e932a0c9997a40fd51253b5b2d0f9d'/>
<id>urn:sha1:ca4ba96e02e932a0c9997a40fd51253b5b2d0f9d</id>
<content type='text'>
Pull Ceph updates from Sage Weil:
 "There are several patches from Ilya fixing RBD allocation lifecycle
  issues, a series adding a nocephx_sign_messages option (and associated
  bug fixes/cleanups), several patches from Zheng improving the
  (directory) fsync behavior, a big improvement in IO for direct-io
  requests when striping is enabled from Caifeng, and several other
  small fixes and cleanups"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  libceph: clear msg-&gt;con in ceph_msg_release() only
  libceph: add nocephx_sign_messages option
  libceph: stop duplicating client fields in messenger
  libceph: drop authorizer check from cephx msg signing routines
  libceph: msg signing callouts don't need con argument
  libceph: evaluate osd_req_op_data() arguments only once
  ceph: make fsync() wait unsafe requests that created/modified inode
  ceph: add request to i_unsafe_dirops when getting unsafe reply
  libceph: introduce ceph_x_authorizer_cleanup()
  ceph: don't invalidate page cache when inode is no longer used
  rbd: remove duplicate calls to rbd_dev_mapping_clear()
  rbd: set device_type::release instead of device::release
  rbd: don't free rbd_dev outside of the release callback
  rbd: return -ENOMEM instead of pool id if rbd_dev_create() fails
  libceph: use local variable cursor instead of &amp;msg-&gt;cursor
  libceph: remove con argument in handle_reply()
  ceph: combine as many iovec as possile into one OSD request
  ceph: fix message length computation
  ceph: fix a comment typo
  rbd: drop null test before destroy functions
</content>
</entry>
<entry>
<title>Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security</title>
<updated>2015-11-05T23:32:38Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-11-05T23:32:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1873499e13648a2dd01a394ed3217c9290921b3d'/>
<id>urn:sha1:1873499e13648a2dd01a394ed3217c9290921b3d</id>
<content type='text'>
Pull security subsystem update from James Morris:
 "This is mostly maintenance updates across the subsystem, with a
  notable update for TPM 2.0, and addition of Jarkko Sakkinen as a
  maintainer of that"

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (40 commits)
  apparmor: clarify CRYPTO dependency
  selinux: Use a kmem_cache for allocation struct file_security_struct
  selinux: ioctl_has_perm should be static
  selinux: use sprintf return value
  selinux: use kstrdup() in security_get_bools()
  selinux: use kmemdup in security_sid_to_context_core()
  selinux: remove pointless cast in selinux_inode_setsecurity()
  selinux: introduce security_context_str_to_sid
  selinux: do not check open perm on ftruncate call
  selinux: change CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE default
  KEYS: Merge the type-specific data with the payload data
  KEYS: Provide a script to extract a module signature
  KEYS: Provide a script to extract the sys cert list from a vmlinux file
  keys: Be more consistent in selection of union members used
  certs: add .gitignore to stop git nagging about x509_certificate_list
  KEYS: use kvfree() in add_key
  Smack: limited capability for changing process label
  TPM: remove unnecessary little endian conversion
  vTPM: support little endian guests
  char: Drop owner assignment from i2c_driver
  ...
</content>
</entry>
<entry>
<title>libceph: clear msg-&gt;con in ceph_msg_release() only</title>
<updated>2015-11-02T22:37:46Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2015-11-02T16:13:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=583d0fef756a7615e50f0f68ea0892a497d03971'/>
<id>urn:sha1:583d0fef756a7615e50f0f68ea0892a497d03971</id>
<content type='text'>
The following bit in ceph_msg_revoke_incoming() is unsafe:

    struct ceph_connection *con = msg-&gt;con;
    if (!con)
            return;
    mutex_lock(&amp;con-&gt;mutex);
    &lt;more msg-&gt;con use&gt;

There is nothing preventing con from getting destroyed right after
msg-&gt;con test.  One easy way to reproduce this is to disable message
signing only on the server side and try to map an image.  The system
will go into a

    libceph: read_partial_message ffff880073f0ab68 signature check failed
    libceph: osd0 192.168.255.155:6801 bad crc/signature
    libceph: read_partial_message ffff880073f0ab68 signature check failed
    libceph: osd0 192.168.255.155:6801 bad crc/signature

loop which has to be interrupted with Ctrl-C.  Hit Ctrl-C and you are
likely to end up with a random GP fault if the reset handler executes
"within" ceph_msg_revoke_incoming():

                     &lt;yet another reply w/o a signature&gt;
                                   ...
          &lt;Ctrl-C&gt;
    rbd_obj_request_end
      ceph_osdc_cancel_request
        __unregister_request
          ceph_osdc_put_request
            ceph_msg_revoke_incoming
                                   ...
                                osd_reset
                                  __kick_osd_requests
                                    __reset_osd
                                      remove_osd
                                        ceph_con_close
                                          reset_connection
                                            &lt;clear con-&gt;in_msg-&gt;con&gt;
                                            &lt;put con ref&gt;
                                              put_osd
                                                &lt;free osd/con&gt;
              &lt;msg-&gt;con use&gt; &lt;-- !!!

If ceph_msg_revoke_incoming() executes "before" the reset handler,
osd/con will be leaked because ceph_msg_revoke_incoming() clears
con-&gt;in_msg but doesn't put con ref, while reset_connection() only puts
con ref if con-&gt;in_msg != NULL.

The current msg-&gt;con scheme was introduced by commits 38941f8031bf
("libceph: have messages point to their connection") and 92ce034b5a74
("libceph: have messages take a connection reference"), which defined
when messages get associated with a connection and when that
association goes away.  Part of the problem is that this association is
supposed to go away in much too many places; closing this race entirely
requires either a rework of the existing or an addition of a new layer
of synchronization.

In lieu of that, we can make it *much* less likely to hit by
disassociating messages only on their destruction and resend through
a different connection.  This makes the code simpler and is probably
a good thing to do regardless - this patch adds a msg_con_set() helper
which is is called from only three places: ceph_con_send() and
ceph_con_in_msg_alloc() to set msg-&gt;con and ceph_msg_release() to clear
it.

Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: add nocephx_sign_messages option</title>
<updated>2015-11-02T22:37:46Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2015-10-28T22:52:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a51983e4dd2d4d63912aab939f657c4cd476e21a'/>
<id>urn:sha1:a51983e4dd2d4d63912aab939f657c4cd476e21a</id>
<content type='text'>
Support for message signing was merged into 3.19, along with
nocephx_require_signatures option.  But, all that option does is allow
the kernel client to talk to clusters that don't support MSG_AUTH
feature bit.  That's pretty useless, given that it's been supported
since bobtail.

Meanwhile, if one disables message signing on the server side with
"cephx sign messages = false", it becomes impossible to use the kernel
client since it expects messages to be signed if MSG_AUTH was
negotiated.  Add nocephx_sign_messages option to support this use case.

Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: stop duplicating client fields in messenger</title>
<updated>2015-11-02T22:37:46Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2015-10-28T22:50:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=859bff51dc5e92ddfb5eb6f17b8040d9311095bb'/>
<id>urn:sha1:859bff51dc5e92ddfb5eb6f17b8040d9311095bb</id>
<content type='text'>
supported_features and required_features serve no purpose at all, while
nocrc and tcp_nodelay belong to ceph_options::flags.

Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: drop authorizer check from cephx msg signing routines</title>
<updated>2015-11-02T22:37:46Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2015-10-27T15:42:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4199b8eec36405822619d4176bddfacf7b47eb44'/>
<id>urn:sha1:4199b8eec36405822619d4176bddfacf7b47eb44</id>
<content type='text'>
I don't see a way for auth-&gt;authorizer to be NULL in
ceph_x_sign_message() or ceph_x_check_message_signature().

Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: msg signing callouts don't need con argument</title>
<updated>2015-11-02T22:37:45Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2015-10-26T21:23:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=79dbd1baa651cece408e68a1b445f3628c4b5bdc'/>
<id>urn:sha1:79dbd1baa651cece408e68a1b445f3628c4b5bdc</id>
<content type='text'>
We can use msg-&gt;con instead - at the point we sign an outgoing message
or check the signature on the incoming one, msg-&gt;con is always set.  We
wouldn't know how to sign a message without an associated session (i.e.
msg-&gt;con == NULL) and being able to sign a message using an explicitly
provided authorizer is of no use.

Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: evaluate osd_req_op_data() arguments only once</title>
<updated>2015-11-02T22:36:49Z</updated>
<author>
<name>Ioana Ciornei</name>
<email>ciorneiioana@gmail.com</email>
</author>
<published>2015-10-22T15:06:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8a703a383dd3458753e0ad71860ed3a5097692b3'/>
<id>urn:sha1:8a703a383dd3458753e0ad71860ed3a5097692b3</id>
<content type='text'>
This patch changes the osd_req_op_data() macro to not evaluate
arguments more than once in order to follow the kernel coding style.

Signed-off-by: Ioana Ciornei &lt;ciorneiioana@gmail.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
[idryomov@gmail.com: changelog, formatting]
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: introduce ceph_x_authorizer_cleanup()</title>
<updated>2015-11-02T22:36:48Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2015-10-26T10:03:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cbf99a11fb14db0835acd79ecd7469d37e398660'/>
<id>urn:sha1:cbf99a11fb14db0835acd79ecd7469d37e398660</id>
<content type='text'>
Commit ae385eaf24dc ("libceph: store session key in cephx authorizer")
introduced ceph_x_authorizer::session_key, but didn't update all the
exit/error paths.  Introduce ceph_x_authorizer_cleanup() to encapsulate
ceph_x_authorizer cleanup and switch to it.  This fixes ceph_x_destroy(),
which currently always leaks key and ceph_x_build_authorizer() error
paths.

Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Reviewed-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
</entry>
<entry>
<title>libceph: use local variable cursor instead of &amp;msg-&gt;cursor</title>
<updated>2015-11-02T22:36:47Z</updated>
<author>
<name>Shraddha Barke</name>
<email>shraddha.6596@gmail.com</email>
</author>
<published>2015-10-19T16:29:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=343128ce91836d4131ead74b53d83b72e93d55b2'/>
<id>urn:sha1:343128ce91836d4131ead74b53d83b72e93d55b2</id>
<content type='text'>
Use local variable cursor in place of &amp;msg-&gt;cursor in
read_partial_msg_data() and write_partial_msg_data().

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