Thread (30 messages) 30 messages, 3 authors, 2022-02-25

Re: [PATCH V6 11/20] riscv: compat: syscall: Add compat_sys_call_table implementation

From: Guo Ren <guoren@kernel.org>
Date: 2022-02-24 10:30:51
Also in: linux-arch, linux-mips, linux-riscv, linux-s390, linuxppc-dev, lkml, sparclinux

On Thu, Feb 24, 2022 at 5:38 PM Arnd Bergmann [off-list ref] wrote:
On Thu, Feb 24, 2022 at 9:54 AM [off-list ref] wrote:
quoted
From: Guo Ren <redacted>

Implement compat sys_call_table and some system call functions:
truncate64, ftruncate64, fallocate, pread64, pwrite64,
sync_file_range, readahead, fadvise64_64 which need argument
translation.

Signed-off-by: Guo Ren <redacted>
Signed-off-by: Guo Ren <guoren@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Here, I was hoping you'd convert some of the other architectures to use
the same code, but the changes you did do look correct.

Please at least add the missing bit for big-endian architectures here:

+#if !defined(compat_arg_u64) && !defined(CONFIG_CPU_BIG_ENDIAN)
+#define compat_arg_u64(name)           u32  name##_lo, u32  name##_hi
+#define compat_arg_u64_dual(name)      u32, name##_lo, u32, name##_hi
+#define compat_arg_u64_glue(name)      (((u64)name##_hi << 32) | \
+                                        ((u64)name##_lo & 0xffffffffUL))
+#endif

with the lo/hi words swapped. With that change:
Got it, I would change it in next version of patch.
Reviewed-by: Arnd Bergmann <arnd@arndb.de>


-- 
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help