From: "José Bollo" <jobol@nonadev.net>
To: "Toralf Förster" <toralf.foerster@gmx.de>
Cc: linux-security-module@vger.kernel.org,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] ext4: use XATTR_*_PREFIX_LEN instead sizeof(...)
Date: Wed, 06 Jan 2016 10:14:58 +0100 [thread overview]
Message-ID: <1452071698.3035.0.camel@nonadev.net> (raw)
In-Reply-To: <1451850998-28639-1-git-send-email-toralf.foerster@gmx.de>
I prefer the use of sizeof that can't be faked even by error but why not
Le dimanche 03 janvier 2016 à 20:56 +0100, Toralf Förster a écrit :
> use the definition in include/uapi/linux/xattr.h
>
> Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
> ---
> fs/ext4/xattr_security.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/xattr_security.c b/fs/ext4/xattr_security.c
> index 36f4c1a..1a3d629 100644
> --- a/fs/ext4/xattr_security.c
> +++ b/fs/ext4/xattr_security.c
> @@ -16,7 +16,7 @@ ext4_xattr_security_list(const struct xattr_handler *handler,
> struct dentry *dentry, char *list, size_t list_size,
> const char *name, size_t name_len)
> {
> - const size_t prefix_len = sizeof(XATTR_SECURITY_PREFIX)-1;
> + const size_t prefix_len = XATTR_SECURITY_PREFIX_LEN;
> const size_t total_len = prefix_len + name_len + 1;
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-01-06 9:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-03 19:56 [PATCH 1/2] ext4: use XATTR_*_PREFIX_LEN instead sizeof(...) Toralf Förster
2016-01-03 19:56 ` [PATCH 2/2] security: " Toralf Förster
2016-01-05 17:14 ` [PATCH 1/2] ext4: " Jan Kara
2016-01-06 9:14 ` José Bollo [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-01-05 17:49 Toralf Förster
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=1452071698.3035.0.camel@nonadev.net \
--to=jobol@nonadev.net \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=toralf.foerster@gmx.de \
/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;
as well as URLs for NNTP newsgroup(s).