From: Al Viro <viro@zeniv.linux.org.uk>
To: Christoph Hellwig <hch@lst.de>
Cc: x86@kernel.org, Jan Kara <jack@suse.com>,
linux-arm-kernel@lists.infradead.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-api@vger.kernel.org, linux-arch@vger.kernel.org
Subject: Re: [PATCH 4/4] quota: simplify the quotactl compat handling
Date: Sun, 26 Jul 2020 17:32:14 +0100 [thread overview]
Message-ID: <20200726163214.GS2786714@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20200726160401.311569-5-hch@lst.de>
On Sun, Jul 26, 2020 at 06:04:01PM +0200, Christoph Hellwig wrote:
> Fold the misaligned u64 workarounds into the main quotactl flow instead
> of implementing a separate compat syscall handler.
I can live with that (and drop the local quota-related stuff from
copy_in_user/compat_alloc_user_space elimination series). One question,
though:
> +static int compat_copy_fs_qfilestat(struct compat_fs_qfilestat __user *to,
> + struct fs_qfilestat *from)
> +{
> + if (copy_to_user(to, from, sizeof(*to)) ||
> + put_user(from->qfs_nextents, &to->qfs_nextents))
> + return -EFAULT;
> + return 0;
> +}
do we have any need of that put_user()? Note that you don't even call
that thing unless compat_need_64bit_alignment_fixup() is true. And AFAICS
all such cases are little-endian...
WARNING: multiple messages have this Message-ID (diff)
From: Al Viro <viro@zeniv.linux.org.uk>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-arch@vger.kernel.org, linux-api@vger.kernel.org,
x86@kernel.org, linux-kernel@vger.kernel.org,
Jan Kara <jack@suse.com>,
linux-fsdevel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 4/4] quota: simplify the quotactl compat handling
Date: Sun, 26 Jul 2020 17:32:14 +0100 [thread overview]
Message-ID: <20200726163214.GS2786714@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20200726160401.311569-5-hch@lst.de>
On Sun, Jul 26, 2020 at 06:04:01PM +0200, Christoph Hellwig wrote:
> Fold the misaligned u64 workarounds into the main quotactl flow instead
> of implementing a separate compat syscall handler.
I can live with that (and drop the local quota-related stuff from
copy_in_user/compat_alloc_user_space elimination series). One question,
though:
> +static int compat_copy_fs_qfilestat(struct compat_fs_qfilestat __user *to,
> + struct fs_qfilestat *from)
> +{
> + if (copy_to_user(to, from, sizeof(*to)) ||
> + put_user(from->qfs_nextents, &to->qfs_nextents))
> + return -EFAULT;
> + return 0;
> +}
do we have any need of that put_user()? Note that you don't even call
that thing unless compat_need_64bit_alignment_fixup() is true. And AFAICS
all such cases are little-endian...
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-07-26 16:32 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-26 16:03 improve compat handling for the i386 u64 alignment quirk Christoph Hellwig
2020-07-26 16:03 ` Christoph Hellwig
2020-07-26 16:03 ` [PATCH 1/4] arm64: stop using <asm/compat.h> directly Christoph Hellwig
2020-07-26 16:03 ` Christoph Hellwig
2020-07-30 17:34 ` Nathan Chancellor
2020-07-30 17:34 ` Nathan Chancellor
2020-07-31 8:41 ` Naresh Kamboju
2020-07-31 8:41 ` Naresh Kamboju
2020-07-26 16:03 ` [PATCH 2/4] compat: lift compat_s64 and compat_u64 to <linux/compat.h> Christoph Hellwig
2020-07-26 16:03 ` Christoph Hellwig
2020-07-29 6:08 ` [PATCH 2/4 v2] " Christoph Hellwig
2020-07-29 6:08 ` Christoph Hellwig
2020-07-26 16:04 ` [PATCH 3/4] compat: add a compat_need_64bit_alignment_fixup() helper Christoph Hellwig
2020-07-26 16:04 ` Christoph Hellwig
2020-07-26 16:04 ` [PATCH 4/4] quota: simplify the quotactl compat handling Christoph Hellwig
2020-07-26 16:04 ` Christoph Hellwig
2020-07-26 16:04 ` Christoph Hellwig
2020-07-26 16:32 ` Al Viro [this message]
2020-07-26 16:32 ` Al Viro
2020-07-26 16:34 ` Christoph Hellwig
2020-07-26 16:34 ` Christoph Hellwig
2020-07-26 16:37 ` Al Viro
2020-07-26 16:37 ` Al Viro
2020-07-26 16:37 ` Al Viro
2020-07-27 12:41 ` Jan Kara
2020-07-27 12:41 ` Jan Kara
2020-07-27 12:41 ` Jan Kara
2020-07-27 15:56 ` Al Viro
2020-07-27 15:56 ` Al Viro
2020-07-27 21:31 ` Jan Kara
2020-07-27 21:31 ` Jan Kara
2020-07-28 1:49 ` Al Viro
2020-07-28 1:49 ` Al Viro
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=20200726163214.GS2786714@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=hch@lst.de \
--cc=jack@suse.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.