Skip to content

ceph: don't NULL terminate virtual xattrs

Jeff Layton ceph-devel lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 3 repliesIn review
  2. v32 patches 4 repliesSuperseded
  3. v23 patches 6 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches5 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ceph: make getxattr_cb return ssize_tfs/ceph/xattr.c+45 -450 replies
2/3ceph: return -ERANGE if virtual xattr value didn't fit in bufferfs/ceph/xattr.c+7 -70 replies
3/3ceph: don't NULL terminate virtual xattrsfs/ceph/xattr.c+59 -253 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/3] ceph: don't NULL terminate virtual xattrs

v4: resurrect snprintf_noterm as static function that uses a
fixed-size intermediate buffer.
Return -E2BIG and WARN if the formatted string exceeds temp buffer. make getxattr_cb callbacks return ssize_t.
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 4th posting of this patchset. In this variant, we add a new variatic static function that uses an internal buffer and calls vsnprintf to do the formatting, and then memcpys the result into the buffer. This also adds a bit of type-sanity cleanup of the vxattr handling in general.

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

Jeff Layton (3):
ceph: make getxattr_cb return ssize_t
ceph: return -ERANGE if virtual xattr value didn't fit in buffer
ceph: don't NULL terminate virtual xattrs

 fs/ceph/xattr.c | 182 ++++++++++++++++++++++++++++--------------------
 1 file changed, 108 insertions(+), 74 deletions(-)
Signature · 1 line
2.21.0