From: Jeff Layton <jlayton@kernel.org>
To: linux-kernel@vger.kernel.org, ceph-devel@vger.kernel.org
Cc: idryomov@gmail.com, zyan@redhat.com, sage@redhat.com,
agruenba@redhat.com
Subject: [PATCH v4 0/3] ceph: don't NULL terminate virtual xattrs
Date: Mon, 24 Jun 2019 12:27:23 -0400 [thread overview]
Message-ID: <20190624162726.17413-1-jlayton@kernel.org> (raw)
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(-)
--
2.21.0
next reply other threads:[~2019-06-24 16:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-24 16:27 Jeff Layton [this message]
2019-06-24 16:27 ` [PATCH v4 1/3] ceph: make getxattr_cb return ssize_t Jeff Layton
2019-06-24 16:27 ` [PATCH v4 2/3] ceph: return -ERANGE if virtual xattr value didn't fit in buffer Jeff Layton
2019-06-24 16:27 ` [PATCH v4 3/3] ceph: don't NULL terminate virtual xattrs Jeff Layton
2019-06-25 13:29 ` Yan, Zheng
2019-06-25 14:35 ` Ilya Dryomov
2019-06-25 14:49 ` Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190624162726.17413-1-jlayton@kernel.org \
--to=jlayton@kernel.org \
--cc=agruenba@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sage@redhat.com \
--cc=zyan@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox