Re: [PATCH 4/4] quota: simplify the quotactl compat handling

From
Al Viro <viro@zeniv.linux.org.uk>
Date
2020-07-26 16:32:25
Also in
linux-api, linux-arch, linux-fsdevel, lkml
Reply to
Christoph Hellwig, 2020-07-26
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:
quoted hunk ↗ jump to hunk
+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
Thread (15 messages) 15 messages, 5 authors, last reply 2020-07-31
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help