Thread (9 messages) 9 messages, 3 authors, 2023-02-12

Re: [PATCH v9 2/3] cachestat: implement cachestat syscall

flat view

From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2023-02-05 09:56:11
Also in: linux-mm, lkml

On Fri, Feb 3, 2023, at 20:04, Nhat Pham wrote:
+SYSCALL_DEFINE5(cachestat, unsigned int, fd, loff_t, off, size_t, len,
+		struct cachestat __user *, cstat, unsigned int, flags)
+{
+	return ksys_cachestat(fd, off, len, cstat, flags);
+}
+
+#ifdef CONFIG_COMPAT
+COMPAT_SYSCALL_DEFINE6(cachestat, unsigned int, fd, 
compat_arg_u64_dual(off),
+		size_t, len, struct cachestat __user *, cstat, unsigned int, flags)
+{
+	return ksys_cachestat(fd, compat_arg_u64_glue(off), len, cstat, 
flags);
+}
This still looks wrong to me, as this compat definition does not match
the native variant on architectures that require 64-bit arguments to
be passed in aligned register pairs, such as arm, mips or ppc, but
not x86, s390 or riscv.

     Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help