Thread (69 messages) 69 messages, 13 authors, 2023-10-04

Re: [RFC PATCH 2/3] add statmnt(2) syscall

From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2023-09-25 12:57:56
Also in: linux-fsdevel, linux-man, linux-security-module, lkml

On Wed, Sep 13, 2023, at 17:22, Miklos Szeredi wrote:
 asmlinkage long sys_fstatfs64(unsigned int fd, size_t sz,
 				struct statfs64 __user *buf);
+asmlinkage long sys_statmnt(u64 mnt_id, u64 mask,
+			    struct statmnt __user *buf, size_t bufsize,
+			    unsigned int flags);
This definition is problematic on 32-bit architectures for two
reasons:

- 64-bit register arguments are passed in pairs of registers
  on two architectures, so anything passing those needs to
  have a separate entry point for compat syscalls on 64-bit
  architectures. I would suggest also using the same one on
  32-bit ones, so you don't rely on the compiler splitting
  up the long arguments into pairs.

- There is a limit of six argument registers for system call
  entry points, but with two pairs and three single registers
  you end up with seven of them.

The listmnt syscall in patch 3 also has the first problem,
but not the second.

      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