Re: [PATCH RFC 1/8] uaccess: add copy_struct_to_user helper

2024-09-02 Thread Aleksa Sarai
On 2024-09-02, Arnd Bergmann wrote: > On Mon, Sep 2, 2024, at 07:06, Aleksa Sarai wrote: > > This is based on copy_struct_from_user(), but there is one additional > > case to consider when creating a syscall that returns an > > extensible-struct to userspace -- how should data in the struct that >

Re: [PATCH RFC 1/8] uaccess: add copy_struct_to_user helper

2024-09-02 Thread Arnd Bergmann
On Mon, Sep 2, 2024, at 07:06, Aleksa Sarai wrote: > This is based on copy_struct_from_user(), but there is one additional > case to consider when creating a syscall that returns an > extensible-struct to userspace -- how should data in the struct that > cannot fit into the userspace struct be hand

[PATCH RFC 1/8] uaccess: add copy_struct_to_user helper

2024-09-02 Thread Aleksa Sarai
This is based on copy_struct_from_user(), but there is one additional case to consider when creating a syscall that returns an extensible-struct to userspace -- how should data in the struct that cannot fit into the userspace struct be handled (ksize > usize)? There are three possibilies: 1. The