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

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

From: Christian Brauner <brauner@kernel.org>
Date: 2023-09-19 13:18:14
Also in: linux-fsdevel, linux-man, linux-security-module, lkml

On Tue, Sep 19, 2023 at 02:59:53PM +0200, Miklos Szeredi wrote:
On Tue, 19 Sept 2023 at 14:41, Christian Brauner [off-list ref] wrote:
quoted
quoted
quoted
 with __u32 size for mnt_root and mnt_point
Unnecessary if the strings are nul terminated.
All ok by me so far but how does the kernel know the size of the buffer
to copy into? Wouldn't it be better to allow userspace to specify that?
I'm probably just missing something but I better ask.
Because size of the buffer is given as the syscall argument.

  long statmount(u64 mnt_id, u64 mask, struct statmnt __user *buf,
size_t bufsize, unsigned int flags);

If you are still hung up about this not being properly typed, how about this:
I really just wasn't clear how exactly you envisioned this. Your
proposal as is sounds good to me! I'm on board. I prefer the two offsets
as that lets us avoid searching for null bytes. So please leave it as is!
Thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help