public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] ceph: don't NULL terminate virtual xattr values
@ 2019-06-21 14:18 Jeff Layton
  2019-06-21 14:18 ` [PATCH v3 1/2] ceph: fix buffer length handling in virtual xattrs Jeff Layton
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jeff Layton @ 2019-06-21 14:18 UTC (permalink / raw)
  To: linux-kernel, ceph-devel
  Cc: idryomov, zyan, sage, agruenba, joe, geert+renesas,
	andriy.shevchenko

v3: switch to using an intermediate buffer for snprintf destination
    add patch to fix ceph_vxattrcb_layout return value
v2: drop bogus EXPORT_SYMBOL of static function

This is the 3rd posting of this patchset. Instead of adding a new
snprintf variant that doesn't NULL terminate, this set instead has
the vxattr handlers use an intermediate buffer as the snprintf
destination and then memcpy's the result into the destination buffer.

Also, I added a patch to fix up the return of ceph_vxattrcb_layout. The
existing code actually worked, but relied on casting a signed negative
value to unsigned and back, which seemed a little sketchy.

Most of the rationale for this set is in the description of the first
patch of the series.

Jeff Layton (2):
  ceph: fix buffer length handling in virtual xattrs
  ceph: fix return of ceph_vxattrcb_layout

 fs/ceph/xattr.c | 113 ++++++++++++++++++++++++++++++++++--------------
 1 file changed, 81 insertions(+), 32 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-06-24 11:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-21 14:18 [PATCH v3 0/2] ceph: don't NULL terminate virtual xattr values Jeff Layton
2019-06-21 14:18 ` [PATCH v3 1/2] ceph: fix buffer length handling in virtual xattrs Jeff Layton
2019-06-24 10:00   ` Ilya Dryomov
2019-06-24 10:26     ` Jeff Layton
2019-06-24 11:03       ` Ilya Dryomov
2019-06-21 14:18 ` [PATCH v3 2/2] ceph: fix return of ceph_vxattrcb_layout Jeff Layton
2019-06-24  8:56 ` [PATCH v3 0/2] ceph: don't NULL terminate virtual xattr values Yan, Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox