RE: [PATCH 5/9] fs: remove various compat readv/writev helpers

2020-09-23 Thread David Laight
From: Arnd Bergmann > Sent: 23 September 2020 19:46 ... > Regardless of that, another advantage of having the SYSCALL_DECLAREx() > would be the ability to include that header file from elsewhere with a > different > macro definition to create a machine-readable version of the interface when > comb

Re: [PATCH 5/9] fs: remove various compat readv/writev helpers

2020-09-23 Thread Arnd Bergmann
On Wed, Sep 23, 2020 at 9:48 PM Al Viro wrote: > FWIW, after playing with that for a while... Do we really want the > compat_sys_...() declarations to live in linux/compat.h? Most of > the users of that file don't want those; why not move them to > linux/syscalls.h? Sure, let's do that. The tre

Re: [PATCH 5/9] fs: remove various compat readv/writev helpers

2020-09-23 Thread Al Viro
On Wed, Sep 23, 2020 at 08:45:51PM +0200, Arnd Bergmann wrote: > On Wed, Sep 23, 2020 at 6:38 PM Al Viro wrote: > > > > I wonder if we should do something like > > > > SYSCALL_DECLARE3(readv, unsigned long, fd, const struct iovec __user *, vec, > > unsigned long, vlen); > > in sys

Re: [PATCH 5/9] fs: remove various compat readv/writev helpers

2020-09-23 Thread Arnd Bergmann
On Wed, Sep 23, 2020 at 6:38 PM Al Viro wrote: > > I wonder if we should do something like > > SYSCALL_DECLARE3(readv, unsigned long, fd, const struct iovec __user *, vec, > unsigned long, vlen); > in syscalls.h instead, and not under that ifdef. > > Let it expand to declaration o

Re: [PATCH 5/9] fs: remove various compat readv/writev helpers

2020-09-23 Thread Christoph Hellwig
On Wed, Sep 23, 2020 at 06:05:27PM +0100, Al Viro wrote: > On Wed, Sep 23, 2020 at 05:38:31PM +0100, Al Viro wrote: > > On Wed, Sep 23, 2020 at 03:59:01PM +0100, Al Viro wrote: > > > > > > That's a very good question. But it does not just compile but actually > > > > works. Probably because all

Re: [PATCH 5/9] fs: remove various compat readv/writev helpers

2020-09-23 Thread Brian Gerst
On Wed, Sep 23, 2020 at 12:39 PM Al Viro wrote: > > On Wed, Sep 23, 2020 at 03:59:01PM +0100, Al Viro wrote: > > > > That's a very good question. But it does not just compile but actually > > > works. Probably because all the syscall wrappers mean that we don't > > > actually generate the normal

Re: [PATCH 5/9] fs: remove various compat readv/writev helpers

2020-09-23 Thread Al Viro
On Wed, Sep 23, 2020 at 05:38:31PM +0100, Al Viro wrote: > On Wed, Sep 23, 2020 at 03:59:01PM +0100, Al Viro wrote: > > > > That's a very good question. But it does not just compile but actually > > > works. Probably because all the syscall wrappers mean that we don't > > > actually generate the

Re: [PATCH 5/9] fs: remove various compat readv/writev helpers

2020-09-23 Thread Al Viro
On Wed, Sep 23, 2020 at 03:59:01PM +0100, Al Viro wrote: > > That's a very good question. But it does not just compile but actually > > works. Probably because all the syscall wrappers mean that we don't > > actually generate the normal names. I just tried this: > > > > --- a/include/linux/sys

Re: [PATCH 5/9] fs: remove various compat readv/writev helpers

2020-09-23 Thread Al Viro
On Wed, Sep 23, 2020 at 04:32:51PM +0200, Christoph Hellwig wrote: > On Wed, Sep 23, 2020 at 03:25:49PM +0100, Al Viro wrote: > > On Wed, Sep 23, 2020 at 08:05:43AM +0200, Christoph Hellwig wrote: > > > COMPAT_SYSCALL_DEFINE3(readv, compat_ulong_t, fd, > > > - const struct compat_iovec __u

Re: [PATCH 5/9] fs: remove various compat readv/writev helpers

2020-09-23 Thread Christoph Hellwig
On Wed, Sep 23, 2020 at 03:25:49PM +0100, Al Viro wrote: > On Wed, Sep 23, 2020 at 08:05:43AM +0200, Christoph Hellwig wrote: > > COMPAT_SYSCALL_DEFINE3(readv, compat_ulong_t, fd, > > - const struct compat_iovec __user *,vec, > > + const struct iovec __user *, vec, > > Um...

Re: [PATCH 5/9] fs: remove various compat readv/writev helpers

2020-09-23 Thread Al Viro
On Wed, Sep 23, 2020 at 08:05:43AM +0200, Christoph Hellwig wrote: > COMPAT_SYSCALL_DEFINE3(readv, compat_ulong_t, fd, > - const struct compat_iovec __user *,vec, > + const struct iovec __user *, vec, Um... Will it even compile? > #ifdef __ARCH_WANT_COMPAT_SYS_PREADV64