* [PATCH v2 0/2] quota: Add mountpath based quota support @ 2021-02-11 15:30 Sascha Hauer 2021-02-11 15:30 ` [PATCH 1/2] " Sascha Hauer ` (3 more replies) 0 siblings, 4 replies; 19+ messages in thread From: Sascha Hauer @ 2021-02-11 15:30 UTC (permalink / raw) To: linux-fsdevel Cc: linux-kernel, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger, Sascha Hauer Current quotactl syscall uses a path to a block device to specify the filesystem to work on which makes it unsuitable for filesystems that do not have a block device. This series adds a new syscall quotactl_path() which replaces the path to the block device with a mountpath, but otherwise behaves like original quotactl. This is done to add quota support to UBIFS. UBIFS quota support has been posted several times with different approaches to put the mountpath into the existing quotactl() syscall until it has been suggested to make it a new syscall instead, so here it is. I'm not posting the full UBIFS quota series here as it remains unchanged and I'd like to get feedback to the new syscall first. For those interested the most recent series can be found here: https://lwn.net/Articles/810463/ Changes since (implicit) v1: - Ignore second path argument to Q_QUOTAON. With this quotactl_path() can only do the Q_QUOTAON operation on filesystems which use hidden inodes for quota metadata storage - Drop unnecessary quotactl_cmd_onoff() check Sascha Hauer (2): quota: Add mountpath based quota support quota: wire up quotactl_path arch/alpha/kernel/syscalls/syscall.tbl | 1 + arch/arm/tools/syscall.tbl | 1 + arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 2 + arch/ia64/kernel/syscalls/syscall.tbl | 1 + arch/m68k/kernel/syscalls/syscall.tbl | 1 + arch/microblaze/kernel/syscalls/syscall.tbl | 1 + arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + arch/parisc/kernel/syscalls/syscall.tbl | 1 + arch/powerpc/kernel/syscalls/syscall.tbl | 1 + arch/s390/kernel/syscalls/syscall.tbl | 1 + arch/sh/kernel/syscalls/syscall.tbl | 1 + arch/sparc/kernel/syscalls/syscall.tbl | 1 + arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + arch/xtensa/kernel/syscalls/syscall.tbl | 1 + fs/quota/quota.c | 49 +++++++++++++++++++++ include/linux/syscalls.h | 2 + include/uapi/asm-generic/unistd.h | 4 +- kernel/sys_ni.c | 1 + 22 files changed, 74 insertions(+), 2 deletions(-) -- 2.20.1 ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/2] quota: Add mountpath based quota support 2021-02-11 15:30 [PATCH v2 0/2] quota: Add mountpath based quota support Sascha Hauer @ 2021-02-11 15:30 ` Sascha Hauer 2021-02-11 15:38 ` Christoph Hellwig ` (2 more replies) 2021-02-11 15:30 ` [PATCH 2/2] quota: wire up quotactl_path Sascha Hauer ` (2 subsequent siblings) 3 siblings, 3 replies; 19+ messages in thread From: Sascha Hauer @ 2021-02-11 15:30 UTC (permalink / raw) To: linux-fsdevel Cc: linux-kernel, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger, Sascha Hauer Add syscall quotactl_path, a variant of quotactl which allows to specify the mountpath instead of a path of to a block device. The quotactl syscall expects a path to the mounted block device to specify the filesystem to work on. This limits usage to filesystems which actually have a block device. quotactl_path replaces the path to the block device with a path where the filesystem is mounted at. The global Q_SYNC command to sync all filesystems is not supported for this new syscall, otherwise quotactl_path behaves like quotactl. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- fs/quota/quota.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/fs/quota/quota.c b/fs/quota/quota.c index 6d16b2be5ac4..6f1df32abeea 100644 --- a/fs/quota/quota.c +++ b/fs/quota/quota.c @@ -17,6 +17,7 @@ #include <linux/capability.h> #include <linux/quotaops.h> #include <linux/types.h> +#include <linux/mount.h> #include <linux/writeback.h> #include <linux/nospec.h> #include "compat.h" @@ -968,3 +969,51 @@ SYSCALL_DEFINE4(quotactl, unsigned int, cmd, const char __user *, special, path_put(pathp); return ret; } + +SYSCALL_DEFINE4(quotactl_path, unsigned int, cmd, const char __user *, + mountpoint, qid_t, id, void __user *, addr) +{ + struct super_block *sb; + struct path mountpath; + unsigned int cmds = cmd >> SUBCMDSHIFT; + unsigned int type = cmd & SUBCMDMASK; + int ret; + + if (type >= MAXQUOTAS) + return -EINVAL; + + if (!mountpoint) + return -ENODEV; + + ret = user_path_at(AT_FDCWD, mountpoint, + LOOKUP_FOLLOW | LOOKUP_AUTOMOUNT, &mountpath); + if (ret) + return ret; + + sb = mountpath.dentry->d_inode->i_sb; + + if (quotactl_cmd_write(cmds)) { + ret = mnt_want_write(mountpath.mnt); + if (ret) + goto out; + } + + if (quotactl_cmd_onoff(cmds)) + down_write(&sb->s_umount); + else + down_read(&sb->s_umount); + + ret = do_quotactl(sb, type, cmds, id, addr, ERR_PTR(-EINVAL)); + + if (quotactl_cmd_onoff(cmds)) + up_write(&sb->s_umount); + else + up_read(&sb->s_umount); + + if (quotactl_cmd_write(cmds)) + mnt_drop_write(mountpath.mnt); +out: + path_put(&mountpath); + + return ret; +} -- 2.20.1 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 1/2] quota: Add mountpath based quota support 2021-02-11 15:30 ` [PATCH 1/2] " Sascha Hauer @ 2021-02-11 15:38 ` Christoph Hellwig 2021-02-12 8:38 ` Sascha Hauer 2021-02-12 5:45 ` kernel test robot 2021-02-14 13:48 ` Al Viro 2 siblings, 1 reply; 19+ messages in thread From: Christoph Hellwig @ 2021-02-11 15:38 UTC (permalink / raw) To: Sascha Hauer Cc: linux-fsdevel, linux-kernel, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger > + if (!mountpoint) > + return -ENODEV; > + > + ret = user_path_at(AT_FDCWD, mountpoint, > + LOOKUP_FOLLOW | LOOKUP_AUTOMOUNT, &mountpath); user_path_at handles an empty path, although you'll get EFAULT instead. Do we care about the -ENODEV here? Otherwise this looks good: Reviewed-by: Christoph Hellwig <hch@lst.de> ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/2] quota: Add mountpath based quota support 2021-02-11 15:38 ` Christoph Hellwig @ 2021-02-12 8:38 ` Sascha Hauer 2021-02-12 10:05 ` Jan Kara 0 siblings, 1 reply; 19+ messages in thread From: Sascha Hauer @ 2021-02-12 8:38 UTC (permalink / raw) To: Christoph Hellwig Cc: linux-fsdevel, linux-kernel, kernel, Jan Kara, Richard Weinberger On Thu, Feb 11, 2021 at 03:38:13PM +0000, Christoph Hellwig wrote: > > + if (!mountpoint) > > + return -ENODEV; > > + > > + ret = user_path_at(AT_FDCWD, mountpoint, > > + LOOKUP_FOLLOW | LOOKUP_AUTOMOUNT, &mountpath); > > user_path_at handles an empty path, although you'll get EFAULT instead. > Do we care about the -ENODEV here? The quotactl manpage documents EFAULT as error code for invalid addr or special argument, so we really should return -EFAULT here. Existing quotactl gets this wrong as well: if (!special) { if (cmds == Q_SYNC) return quota_sync_all(type); return -ENODEV; } Should we fix this or is there userspace code that is confused by a changed return value? Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/2] quota: Add mountpath based quota support 2021-02-12 8:38 ` Sascha Hauer @ 2021-02-12 10:05 ` Jan Kara 2021-02-12 10:29 ` Sascha Hauer 0 siblings, 1 reply; 19+ messages in thread From: Jan Kara @ 2021-02-12 10:05 UTC (permalink / raw) To: Sascha Hauer Cc: Christoph Hellwig, linux-fsdevel, linux-kernel, kernel, Jan Kara, Richard Weinberger On Fri 12-02-21 09:38:35, Sascha Hauer wrote: > On Thu, Feb 11, 2021 at 03:38:13PM +0000, Christoph Hellwig wrote: > > > + if (!mountpoint) > > > + return -ENODEV; > > > + > > > + ret = user_path_at(AT_FDCWD, mountpoint, > > > + LOOKUP_FOLLOW | LOOKUP_AUTOMOUNT, &mountpath); > > > > user_path_at handles an empty path, although you'll get EFAULT instead. > > Do we care about the -ENODEV here? > > The quotactl manpage documents EFAULT as error code for invalid addr or > special argument, so we really should return -EFAULT here. > > Existing quotactl gets this wrong as well: > > if (!special) { > if (cmds == Q_SYNC) > return quota_sync_all(type); > return -ENODEV; > } > > Should we fix this or is there userspace code that is confused by a changed > return value? I'd leave the original quotactl(2) as is. There's no strong reason to risk breaking some userspace. For the new syscall, I agree we can just standardize the return value, there ENODEV makes even less sense since there's no device in that call. Honza -- Jan Kara <jack@suse.com> SUSE Labs, CR ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/2] quota: Add mountpath based quota support 2021-02-12 10:05 ` Jan Kara @ 2021-02-12 10:29 ` Sascha Hauer 2021-02-12 10:41 ` Jan Kara 0 siblings, 1 reply; 19+ messages in thread From: Sascha Hauer @ 2021-02-12 10:29 UTC (permalink / raw) To: Jan Kara Cc: Richard Weinberger, linux-kernel, Christoph Hellwig, kernel, Jan Kara, linux-fsdevel On Fri, Feb 12, 2021 at 11:05:05AM +0100, Jan Kara wrote: > On Fri 12-02-21 09:38:35, Sascha Hauer wrote: > > On Thu, Feb 11, 2021 at 03:38:13PM +0000, Christoph Hellwig wrote: > > > > + if (!mountpoint) > > > > + return -ENODEV; > > > > + > > > > + ret = user_path_at(AT_FDCWD, mountpoint, > > > > + LOOKUP_FOLLOW | LOOKUP_AUTOMOUNT, &mountpath); > > > > > > user_path_at handles an empty path, although you'll get EFAULT instead. > > > Do we care about the -ENODEV here? > > > > The quotactl manpage documents EFAULT as error code for invalid addr or > > special argument, so we really should return -EFAULT here. > > > > Existing quotactl gets this wrong as well: > > > > if (!special) { > > if (cmds == Q_SYNC) > > return quota_sync_all(type); > > return -ENODEV; > > } > > > > Should we fix this or is there userspace code that is confused by a changed > > return value? > > I'd leave the original quotactl(2) as is. There's no strong reason to risk > breaking some userspace. For the new syscall, I agree we can just > standardize the return value, there ENODEV makes even less sense since > there's no device in that call. Ok, will do. Who can pick this series up? Anyone else I need to Cc next round? Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/2] quota: Add mountpath based quota support 2021-02-12 10:29 ` Sascha Hauer @ 2021-02-12 10:41 ` Jan Kara 0 siblings, 0 replies; 19+ messages in thread From: Jan Kara @ 2021-02-12 10:41 UTC (permalink / raw) To: Sascha Hauer Cc: Jan Kara, Richard Weinberger, linux-kernel, Christoph Hellwig, kernel, Jan Kara, linux-fsdevel On Fri 12-02-21 11:29:00, Sascha Hauer wrote: > On Fri, Feb 12, 2021 at 11:05:05AM +0100, Jan Kara wrote: > > On Fri 12-02-21 09:38:35, Sascha Hauer wrote: > > > On Thu, Feb 11, 2021 at 03:38:13PM +0000, Christoph Hellwig wrote: > > > > > + if (!mountpoint) > > > > > + return -ENODEV; > > > > > + > > > > > + ret = user_path_at(AT_FDCWD, mountpoint, > > > > > + LOOKUP_FOLLOW | LOOKUP_AUTOMOUNT, &mountpath); > > > > > > > > user_path_at handles an empty path, although you'll get EFAULT instead. > > > > Do we care about the -ENODEV here? > > > > > > The quotactl manpage documents EFAULT as error code for invalid addr or > > > special argument, so we really should return -EFAULT here. > > > > > > Existing quotactl gets this wrong as well: > > > > > > if (!special) { > > > if (cmds == Q_SYNC) > > > return quota_sync_all(type); > > > return -ENODEV; > > > } > > > > > > Should we fix this or is there userspace code that is confused by a changed > > > return value? > > > > I'd leave the original quotactl(2) as is. There's no strong reason to risk > > breaking some userspace. For the new syscall, I agree we can just > > standardize the return value, there ENODEV makes even less sense since > > there's no device in that call. > > Ok, will do. Who can pick this series up? Anyone else I need to Cc next > round? I guess I can pick up both kernel patches (the manpage patch needs to be submitted to the manpage list) but please CC linux-api@vger as well so that interested people are aware of the new syscall. Honza -- Jan Kara <jack@suse.com> SUSE Labs, CR ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/2] quota: Add mountpath based quota support 2021-02-11 15:30 ` [PATCH 1/2] " Sascha Hauer 2021-02-11 15:38 ` Christoph Hellwig @ 2021-02-12 5:45 ` kernel test robot 2021-02-14 13:48 ` Al Viro 2 siblings, 0 replies; 19+ messages in thread From: kernel test robot @ 2021-02-12 5:45 UTC (permalink / raw) To: Sascha Hauer, linux-fsdevel Cc: kbuild-all, clang-built-linux, linux-kernel, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger, Sascha Hauer [-- Attachment #1: Type: text/plain, Size: 3017 bytes --] Hi Sascha, I love your patch! Yet something to improve: [auto build test ERROR on arm64/for-next/core] [also build test ERROR on tip/x86/asm m68k/for-next hp-parisc/for-next powerpc/next s390/features linus/master v5.11-rc7 next-20210211] [cannot apply to sparc/master] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Sascha-Hauer/quota-Add-mountpath-based-quota-support/20210211-233912 base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core config: x86_64-randconfig-a012-20210209 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://github.com/0day-ci/linux/commit/4b7a3df11dd2ca215a6e9b24d81c98d6951476b6 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Sascha-Hauer/quota-Add-mountpath-based-quota-support/20210211-233912 git checkout 4b7a3df11dd2ca215a6e9b24d81c98d6951476b6 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): >> fs/quota/quota.c:995:6: error: implicit declaration of function 'quotactl_cmd_write' [-Werror,-Wimplicit-function-declaration] if (quotactl_cmd_write(cmds)) { ^ fs/quota/quota.c:995:6: note: did you mean 'quotactl_cmd_onoff'? fs/quota/quota.c:857:13: note: 'quotactl_cmd_onoff' declared here static bool quotactl_cmd_onoff(int cmd) ^ 1 error generated. vim +/quotactl_cmd_write +995 fs/quota/quota.c 972 973 SYSCALL_DEFINE4(quotactl_path, unsigned int, cmd, const char __user *, 974 mountpoint, qid_t, id, void __user *, addr) 975 { 976 struct super_block *sb; 977 struct path mountpath; 978 unsigned int cmds = cmd >> SUBCMDSHIFT; 979 unsigned int type = cmd & SUBCMDMASK; 980 int ret; 981 982 if (type >= MAXQUOTAS) 983 return -EINVAL; 984 985 if (!mountpoint) 986 return -ENODEV; 987 988 ret = user_path_at(AT_FDCWD, mountpoint, 989 LOOKUP_FOLLOW | LOOKUP_AUTOMOUNT, &mountpath); 990 if (ret) 991 return ret; 992 993 sb = mountpath.dentry->d_inode->i_sb; 994 > 995 if (quotactl_cmd_write(cmds)) { --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 34205 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/2] quota: Add mountpath based quota support 2021-02-11 15:30 ` [PATCH 1/2] " Sascha Hauer 2021-02-11 15:38 ` Christoph Hellwig 2021-02-12 5:45 ` kernel test robot @ 2021-02-14 13:48 ` Al Viro 2 siblings, 0 replies; 19+ messages in thread From: Al Viro @ 2021-02-14 13:48 UTC (permalink / raw) To: Sascha Hauer Cc: linux-fsdevel, linux-kernel, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger On Thu, Feb 11, 2021 at 04:30:22PM +0100, Sascha Hauer wrote: > + sb = mountpath.dentry->d_inode->i_sb; Minor nit: mountpath.mnt->mnt_sb, please. ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 2/2] quota: wire up quotactl_path 2021-02-11 15:30 [PATCH v2 0/2] quota: Add mountpath based quota support Sascha Hauer 2021-02-11 15:30 ` [PATCH 1/2] " Sascha Hauer @ 2021-02-11 15:30 ` Sascha Hauer 2021-02-11 15:38 ` Christoph Hellwig ` (2 more replies) 2021-02-11 15:30 ` [PATCH] quotactl.2: Add documentation for quotactl_path() Sascha Hauer 2021-02-12 10:16 ` [PATCH v2 0/2] quota: Add mountpath based quota support Jan Kara 3 siblings, 3 replies; 19+ messages in thread From: Sascha Hauer @ 2021-02-11 15:30 UTC (permalink / raw) To: linux-fsdevel Cc: linux-kernel, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger, Sascha Hauer Wire up the quotactl_path syscall added in the previous patch. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- arch/alpha/kernel/syscalls/syscall.tbl | 1 + arch/arm/tools/syscall.tbl | 1 + arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 2 ++ arch/ia64/kernel/syscalls/syscall.tbl | 1 + arch/m68k/kernel/syscalls/syscall.tbl | 1 + arch/microblaze/kernel/syscalls/syscall.tbl | 1 + arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + arch/parisc/kernel/syscalls/syscall.tbl | 1 + arch/powerpc/kernel/syscalls/syscall.tbl | 1 + arch/s390/kernel/syscalls/syscall.tbl | 1 + arch/sh/kernel/syscalls/syscall.tbl | 1 + arch/sparc/kernel/syscalls/syscall.tbl | 1 + arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + arch/xtensa/kernel/syscalls/syscall.tbl | 1 + include/linux/syscalls.h | 2 ++ include/uapi/asm-generic/unistd.h | 4 +++- kernel/sys_ni.c | 1 + 21 files changed, 25 insertions(+), 2 deletions(-) diff --git a/arch/alpha/kernel/syscalls/syscall.tbl b/arch/alpha/kernel/syscalls/syscall.tbl index a6617067dbe6..3fe90880c821 100644 --- a/arch/alpha/kernel/syscalls/syscall.tbl +++ b/arch/alpha/kernel/syscalls/syscall.tbl @@ -481,3 +481,4 @@ 549 common faccessat2 sys_faccessat2 550 common process_madvise sys_process_madvise 551 common epoll_pwait2 sys_epoll_pwait2 +552 common quotactl_path sys_quotactl_path diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl index 20e1170e2e0a..a62509df217f 100644 --- a/arch/arm/tools/syscall.tbl +++ b/arch/arm/tools/syscall.tbl @@ -455,3 +455,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h index 86a9d7b3eabe..949788f5ba40 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h @@ -38,7 +38,7 @@ #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5) #define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800) -#define __NR_compat_syscalls 442 +#define __NR_compat_syscalls 443 #endif #define __ARCH_WANT_SYS_CLONE diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h index cccfbbefbf95..734c254ca1b6 100644 --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h @@ -891,6 +891,8 @@ __SYSCALL(__NR_faccessat2, sys_faccessat2) __SYSCALL(__NR_process_madvise, sys_process_madvise) #define __NR_epoll_pwait2 441 __SYSCALL(__NR_epoll_pwait2, compat_sys_epoll_pwait2) +#define __NR_quotactl_path 442 +__SYSCALL(__NR_quotactl_path, sys_quotactl_path) /* * Please add new compat syscalls above this comment and update diff --git a/arch/ia64/kernel/syscalls/syscall.tbl b/arch/ia64/kernel/syscalls/syscall.tbl index bfc00f2bd437..4758a22a4d80 100644 --- a/arch/ia64/kernel/syscalls/syscall.tbl +++ b/arch/ia64/kernel/syscalls/syscall.tbl @@ -362,3 +362,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/m68k/kernel/syscalls/syscall.tbl b/arch/m68k/kernel/syscalls/syscall.tbl index 7fe4e45c864c..b9072d2f1fdc 100644 --- a/arch/m68k/kernel/syscalls/syscall.tbl +++ b/arch/m68k/kernel/syscalls/syscall.tbl @@ -441,3 +441,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/microblaze/kernel/syscalls/syscall.tbl b/arch/microblaze/kernel/syscalls/syscall.tbl index a522adf194ab..95e0cb59e8c1 100644 --- a/arch/microblaze/kernel/syscalls/syscall.tbl +++ b/arch/microblaze/kernel/syscalls/syscall.tbl @@ -447,3 +447,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/mips/kernel/syscalls/syscall_n32.tbl b/arch/mips/kernel/syscalls/syscall_n32.tbl index 0f03ad223f33..027fe0351e66 100644 --- a/arch/mips/kernel/syscalls/syscall_n32.tbl +++ b/arch/mips/kernel/syscalls/syscall_n32.tbl @@ -380,3 +380,4 @@ 439 n32 faccessat2 sys_faccessat2 440 n32 process_madvise sys_process_madvise 441 n32 epoll_pwait2 compat_sys_epoll_pwait2 +442 n32 quotactl_path sys_quotactl_path diff --git a/arch/mips/kernel/syscalls/syscall_n64.tbl b/arch/mips/kernel/syscalls/syscall_n64.tbl index 91649690b52f..f4bddccab043 100644 --- a/arch/mips/kernel/syscalls/syscall_n64.tbl +++ b/arch/mips/kernel/syscalls/syscall_n64.tbl @@ -356,3 +356,4 @@ 439 n64 faccessat2 sys_faccessat2 440 n64 process_madvise sys_process_madvise 441 n64 epoll_pwait2 sys_epoll_pwait2 +442 n64 quotactl_path sys_quotactl_path diff --git a/arch/mips/kernel/syscalls/syscall_o32.tbl b/arch/mips/kernel/syscalls/syscall_o32.tbl index 4bad0c40aed6..bc2f3ad1de87 100644 --- a/arch/mips/kernel/syscalls/syscall_o32.tbl +++ b/arch/mips/kernel/syscalls/syscall_o32.tbl @@ -429,3 +429,4 @@ 439 o32 faccessat2 sys_faccessat2 440 o32 process_madvise sys_process_madvise 441 o32 epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 o32 quotactl_path sys_quotactl_path diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl index 6bcc31966b44..80a4b6dbae77 100644 --- a/arch/parisc/kernel/syscalls/syscall.tbl +++ b/arch/parisc/kernel/syscalls/syscall.tbl @@ -439,3 +439,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl b/arch/powerpc/kernel/syscalls/syscall.tbl index f744eb5cba88..29a706828330 100644 --- a/arch/powerpc/kernel/syscalls/syscall.tbl +++ b/arch/powerpc/kernel/syscalls/syscall.tbl @@ -531,3 +531,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl index d443423495e5..6ed53d992736 100644 --- a/arch/s390/kernel/syscalls/syscall.tbl +++ b/arch/s390/kernel/syscalls/syscall.tbl @@ -444,3 +444,4 @@ 439 common faccessat2 sys_faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/sh/kernel/syscalls/syscall.tbl b/arch/sh/kernel/syscalls/syscall.tbl index 9df40ac0ebc0..f8488ad641b6 100644 --- a/arch/sh/kernel/syscalls/syscall.tbl +++ b/arch/sh/kernel/syscalls/syscall.tbl @@ -444,3 +444,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/sparc/kernel/syscalls/syscall.tbl b/arch/sparc/kernel/syscalls/syscall.tbl index 40d8c7cd8298..211d7269246b 100644 --- a/arch/sparc/kernel/syscalls/syscall.tbl +++ b/arch/sparc/kernel/syscalls/syscall.tbl @@ -487,3 +487,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl index 874aeacde2dd..deb7650cfc88 100644 --- a/arch/x86/entry/syscalls/syscall_32.tbl +++ b/arch/x86/entry/syscalls/syscall_32.tbl @@ -446,3 +446,4 @@ 439 i386 faccessat2 sys_faccessat2 440 i386 process_madvise sys_process_madvise 441 i386 epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl index 78672124d28b..cdbfb67852e6 100644 --- a/arch/x86/entry/syscalls/syscall_64.tbl +++ b/arch/x86/entry/syscalls/syscall_64.tbl @@ -363,6 +363,7 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path # # Due to a historical design error, certain syscalls are numbered differently diff --git a/arch/xtensa/kernel/syscalls/syscall.tbl b/arch/xtensa/kernel/syscalls/syscall.tbl index 46116a28eeed..b434eda5653a 100644 --- a/arch/xtensa/kernel/syscalls/syscall.tbl +++ b/arch/xtensa/kernel/syscalls/syscall.tbl @@ -412,3 +412,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 7688bc983de5..2e1bf7c2165f 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -482,6 +482,8 @@ asmlinkage long sys_pipe2(int __user *fildes, int flags); /* fs/quota.c */ asmlinkage long sys_quotactl(unsigned int cmd, const char __user *special, qid_t id, void __user *addr); +asmlinkage long sys_quotactl_path(unsigned int cmd, const char __user *mountpoint, + qid_t id, void __user *addr); /* fs/readdir.c */ asmlinkage long sys_getdents64(unsigned int fd, diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 728752917785..dad876b86488 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -861,9 +861,11 @@ __SYSCALL(__NR_faccessat2, sys_faccessat2) __SYSCALL(__NR_process_madvise, sys_process_madvise) #define __NR_epoll_pwait2 441 __SC_COMP(__NR_epoll_pwait2, sys_epoll_pwait2, compat_sys_epoll_pwait2) +#define __NR_quotactl_path 442 +__SYSCALL(__NR_quotactl_path, sys_quotactl_path) #undef __NR_syscalls -#define __NR_syscalls 442 +#define __NR_syscalls 443 /* * 32 bit systems traditionally used different diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c index 19aa806890d5..d24431782414 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c @@ -99,6 +99,7 @@ COND_SYSCALL(flock); /* fs/quota.c */ COND_SYSCALL(quotactl); +COND_SYSCALL(quotactl_path); /* fs/readdir.c */ -- 2.20.1 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 2/2] quota: wire up quotactl_path 2021-02-11 15:30 ` [PATCH 2/2] quota: wire up quotactl_path Sascha Hauer @ 2021-02-11 15:38 ` Christoph Hellwig 2021-02-11 19:56 ` kernel test robot 2021-02-12 0:10 ` kernel test robot 2 siblings, 0 replies; 19+ messages in thread From: Christoph Hellwig @ 2021-02-11 15:38 UTC (permalink / raw) To: Sascha Hauer Cc: linux-fsdevel, linux-kernel, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de> ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/2] quota: wire up quotactl_path 2021-02-11 15:30 ` [PATCH 2/2] quota: wire up quotactl_path Sascha Hauer 2021-02-11 15:38 ` Christoph Hellwig @ 2021-02-11 19:56 ` kernel test robot 2021-02-12 0:10 ` kernel test robot 2 siblings, 0 replies; 19+ messages in thread From: kernel test robot @ 2021-02-11 19:56 UTC (permalink / raw) To: Sascha Hauer, linux-fsdevel Cc: kbuild-all, clang-built-linux, linux-kernel, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger, Sascha Hauer [-- Attachment #1: Type: text/plain, Size: 15914 bytes --] Hi Sascha, I love your patch! Perhaps something to improve: [auto build test WARNING on arm64/for-next/core] [also build test WARNING on tip/x86/asm m68k/for-next hp-parisc/for-next powerpc/next s390/features linus/master v5.11-rc7] [cannot apply to sparc-next/master sparc/master xtensa/for_next next-20210211] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Sascha-Hauer/quota-Add-mountpath-based-quota-support/20210211-233912 base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core config: x86_64-randconfig-a013-20210209 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://github.com/0day-ci/linux/commit/0fa8489f958d6ec34215930a8d1a2d4b6644fea3 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Sascha-Hauer/quota-Add-mountpath-based-quota-support/20210211-233912 git checkout 0fa8489f958d6ec34215930a8d1a2d4b6644fea3 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): In file included from arch/x86/entry/syscall_32.c:13: ./arch/x86/include/generated/asm/syscalls_32.h:830:18: error: expected parameter declarator __SYSCALL_COMMON(442, sys_quotactl_path) ^ ./arch/x86/include/generated/asm/syscalls_32.h:830:18: error: expected ')' ./arch/x86/include/generated/asm/syscalls_32.h:830:17: note: to match this '(' __SYSCALL_COMMON(442, sys_quotactl_path) ^ >> ./arch/x86/include/generated/asm/syscalls_32.h:830:1: warning: declaration specifier missing, defaulting to 'int' __SYSCALL_COMMON(442, sys_quotactl_path) ^ int ./arch/x86/include/generated/asm/syscalls_32.h:830:17: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] __SYSCALL_COMMON(442, sys_quotactl_path) ^ void ./arch/x86/include/generated/asm/syscalls_32.h:830:41: error: expected ';' after top level declarator __SYSCALL_COMMON(442, sys_quotactl_path) ^ ; In file included from arch/x86/entry/syscall_32.c:24: ./arch/x86/include/generated/asm/syscalls_32.h:830:23: error: use of undeclared identifier 'sys_quotactl_path' __SYSCALL_COMMON(442, sys_quotactl_path) ^ 1 warning and 5 errors generated. -- kernel/sys_ni.c:88:1: warning: no previous prototype for function '__x64_sys_flock' [-Wmissing-prototypes] COND_SYSCALL(flock); ^ arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL' __X64_COND_SYSCALL(name) \ ^ arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL' __COND_SYSCALL(x64, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ <scratch space>:225:1: note: expanded from here __x64_sys_flock ^ kernel/sys_ni.c:88:1: note: declare 'static' if the function is not intended to be used outside of this translation unit arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL' __X64_COND_SYSCALL(name) \ ^ arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL' __COND_SYSCALL(x64, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ kernel/sys_ni.c:88:1: warning: no previous prototype for function '__ia32_sys_flock' [-Wmissing-prototypes] COND_SYSCALL(flock); ^ arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL' __IA32_COND_SYSCALL(name) ^ arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL' __COND_SYSCALL(ia32, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ <scratch space>:229:1: note: expanded from here __ia32_sys_flock ^ kernel/sys_ni.c:88:1: note: declare 'static' if the function is not intended to be used outside of this translation unit arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL' __IA32_COND_SYSCALL(name) ^ arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL' __COND_SYSCALL(ia32, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ kernel/sys_ni.c:101:1: warning: no previous prototype for function '__x64_sys_quotactl' [-Wmissing-prototypes] COND_SYSCALL(quotactl); ^ arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL' __X64_COND_SYSCALL(name) \ ^ arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL' __COND_SYSCALL(x64, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ <scratch space>:233:1: note: expanded from here __x64_sys_quotactl ^ kernel/sys_ni.c:101:1: note: declare 'static' if the function is not intended to be used outside of this translation unit arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL' __X64_COND_SYSCALL(name) \ ^ arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL' __COND_SYSCALL(x64, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ kernel/sys_ni.c:101:1: warning: no previous prototype for function '__ia32_sys_quotactl' [-Wmissing-prototypes] COND_SYSCALL(quotactl); ^ arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL' __IA32_COND_SYSCALL(name) ^ arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL' __COND_SYSCALL(ia32, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ <scratch space>:237:1: note: expanded from here __ia32_sys_quotactl ^ kernel/sys_ni.c:101:1: note: declare 'static' if the function is not intended to be used outside of this translation unit arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL' __IA32_COND_SYSCALL(name) ^ arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL' __COND_SYSCALL(ia32, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ >> kernel/sys_ni.c:102:1: warning: no previous prototype for function '__x64_sys_quotactl_path' [-Wmissing-prototypes] COND_SYSCALL(quotactl_path); ^ arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL' __X64_COND_SYSCALL(name) \ ^ arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL' __COND_SYSCALL(x64, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ <scratch space>:241:1: note: expanded from here __x64_sys_quotactl_path ^ kernel/sys_ni.c:102:1: note: declare 'static' if the function is not intended to be used outside of this translation unit arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL' __X64_COND_SYSCALL(name) \ ^ arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL' __COND_SYSCALL(x64, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ >> kernel/sys_ni.c:102:1: warning: no previous prototype for function '__ia32_sys_quotactl_path' [-Wmissing-prototypes] COND_SYSCALL(quotactl_path); ^ arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL' __IA32_COND_SYSCALL(name) ^ arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL' __COND_SYSCALL(ia32, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ <scratch space>:245:1: note: expanded from here __ia32_sys_quotactl_path ^ kernel/sys_ni.c:102:1: note: declare 'static' if the function is not intended to be used outside of this translation unit arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL' __IA32_COND_SYSCALL(name) ^ arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL' __COND_SYSCALL(ia32, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ kernel/sys_ni.c:113:1: warning: no previous prototype for function '__x64_sys_signalfd4' [-Wmissing-prototypes] COND_SYSCALL(signalfd4); ^ arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL' __X64_COND_SYSCALL(name) \ ^ arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL' __COND_SYSCALL(x64, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ <scratch space>:249:1: note: expanded from here __x64_sys_signalfd4 ^ kernel/sys_ni.c:113:1: note: declare 'static' if the function is not intended to be used outside of this translation unit arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL' __X64_COND_SYSCALL(name) \ ^ arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL' __COND_SYSCALL(x64, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ kernel/sys_ni.c:113:1: warning: no previous prototype for function '__ia32_sys_signalfd4' [-Wmissing-prototypes] COND_SYSCALL(signalfd4); ^ arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL' __IA32_COND_SYSCALL(name) ^ arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL' __COND_SYSCALL(ia32, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ <scratch space>:253:1: note: expanded from here __ia32_sys_signalfd4 ^ kernel/sys_ni.c:113:1: note: declare 'static' if the function is not intended to be used outside of this translation unit arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL' __IA32_COND_SYSCALL(name) ^ arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL' __COND_SYSCALL(ia32, sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ kernel/sys_ni.c:114:1: warning: no previous prototype for function '__ia32_compat_sys_signalfd4' [-Wmissing-prototypes] COND_SYSCALL_COMPAT(signalfd4); ^ arch/x86/include/asm/syscall_wrapper.h:218:2: note: expanded from macro 'COND_SYSCALL_COMPAT' __IA32_COMPAT_COND_SYSCALL(name) \ ^ arch/x86/include/asm/syscall_wrapper.h:148:2: note: expanded from macro '__IA32_COMPAT_COND_SYSCALL' __COND_SYSCALL(ia32, compat_sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ <scratch space>:257:1: note: expanded from here __ia32_compat_sys_signalfd4 ^ kernel/sys_ni.c:114:1: note: declare 'static' if the function is not intended to be used outside of this translation unit arch/x86/include/asm/syscall_wrapper.h:218:2: note: expanded from macro 'COND_SYSCALL_COMPAT' __IA32_COMPAT_COND_SYSCALL(name) \ ^ arch/x86/include/asm/syscall_wrapper.h:148:2: note: expanded from macro '__IA32_COMPAT_COND_SYSCALL' __COND_SYSCALL(ia32, compat_sys_##name) ^ arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL' __weak long __##abi##_##name(const struct pt_regs *__unused) \ ^ kernel/sys_ni.c:123:1: warning: no previous prototype for function '__x64_sys_timerfd_create' [-Wmissing-prototypes] vim +/__x64_sys_quotactl_path +102 kernel/sys_ni.c 99 100 /* fs/quota.c */ 101 COND_SYSCALL(quotactl); > 102 COND_SYSCALL(quotactl_path); 103 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 36960 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/2] quota: wire up quotactl_path 2021-02-11 15:30 ` [PATCH 2/2] quota: wire up quotactl_path Sascha Hauer 2021-02-11 15:38 ` Christoph Hellwig 2021-02-11 19:56 ` kernel test robot @ 2021-02-12 0:10 ` kernel test robot 2 siblings, 0 replies; 19+ messages in thread From: kernel test robot @ 2021-02-12 0:10 UTC (permalink / raw) To: Sascha Hauer, linux-fsdevel Cc: kbuild-all, clang-built-linux, linux-kernel, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger, Sascha Hauer [-- Attachment #1: Type: text/plain, Size: 3275 bytes --] Hi Sascha, I love your patch! Yet something to improve: [auto build test ERROR on arm64/for-next/core] [also build test ERROR on tip/x86/asm m68k/for-next hp-parisc/for-next powerpc/next s390/features linus/master v5.11-rc7] [cannot apply to sparc-next/master sparc/master xtensa/for_next next-20210211] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Sascha-Hauer/quota-Add-mountpath-based-quota-support/20210211-233912 base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core config: x86_64-randconfig-a013-20210209 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://github.com/0day-ci/linux/commit/0fa8489f958d6ec34215930a8d1a2d4b6644fea3 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Sascha-Hauer/quota-Add-mountpath-based-quota-support/20210211-233912 git checkout 0fa8489f958d6ec34215930a8d1a2d4b6644fea3 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): In file included from arch/x86/entry/syscall_32.c:13: >> ./arch/x86/include/generated/asm/syscalls_32.h:830:18: error: expected parameter declarator __SYSCALL_COMMON(442, sys_quotactl_path) ^ >> ./arch/x86/include/generated/asm/syscalls_32.h:830:18: error: expected ')' ./arch/x86/include/generated/asm/syscalls_32.h:830:17: note: to match this '(' __SYSCALL_COMMON(442, sys_quotactl_path) ^ ./arch/x86/include/generated/asm/syscalls_32.h:830:1: warning: declaration specifier missing, defaulting to 'int' __SYSCALL_COMMON(442, sys_quotactl_path) ^ int >> ./arch/x86/include/generated/asm/syscalls_32.h:830:17: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] __SYSCALL_COMMON(442, sys_quotactl_path) ^ void >> ./arch/x86/include/generated/asm/syscalls_32.h:830:41: error: expected ';' after top level declarator __SYSCALL_COMMON(442, sys_quotactl_path) ^ ; In file included from arch/x86/entry/syscall_32.c:24: >> ./arch/x86/include/generated/asm/syscalls_32.h:830:23: error: use of undeclared identifier 'sys_quotactl_path' __SYSCALL_COMMON(442, sys_quotactl_path) ^ 1 warning and 5 errors generated. --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 36960 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] quotactl.2: Add documentation for quotactl_path() 2021-02-11 15:30 [PATCH v2 0/2] quota: Add mountpath based quota support Sascha Hauer 2021-02-11 15:30 ` [PATCH 1/2] " Sascha Hauer 2021-02-11 15:30 ` [PATCH 2/2] quota: wire up quotactl_path Sascha Hauer @ 2021-02-11 15:30 ` Sascha Hauer 2021-02-12 10:16 ` [PATCH v2 0/2] quota: Add mountpath based quota support Jan Kara 3 siblings, 0 replies; 19+ messages in thread From: Sascha Hauer @ 2021-02-11 15:30 UTC (permalink / raw) To: linux-fsdevel Cc: linux-kernel, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger, Sascha Hauer Expand the quotactl.2 manpage with a description for quotactl_path() that takes a mountpoint path instead of a path to a block device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- man2/quotactl.2 | 31 ++++++++++++++++++++++++++++--- man2/quotactl_path.2 | 1 + 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 man2/quotactl_path.2 diff --git a/man2/quotactl.2 b/man2/quotactl.2 index 7869c64ea..76505c668 100644 --- a/man2/quotactl.2 +++ b/man2/quotactl.2 @@ -34,6 +34,8 @@ quotactl \- manipulate disk quotas .PP .BI "int quotactl(int " cmd ", const char *" special ", int " id \ ", caddr_t " addr ); +.BI "int quotactl_path(int " cmd ", const char *" mountpoint ", int " id \ +", caddr_t " addr ); .fi .SH DESCRIPTION The quota system can be used to set per-user, per-group, and per-project limits @@ -48,7 +50,11 @@ after this, the soft limit counts as a hard limit. .PP The .BR quotactl () -call manipulates disk quotas. +and +.BR quotactl_path () +calls manipulate disk quotas. The difference between both functions is the way +how the filesystem being manipulated is specified, see description of the arguments +below. The .I cmd argument indicates a command to be applied to the user or @@ -75,10 +81,19 @@ value is described below. .PP The .I special -argument is a pointer to a null-terminated string containing the pathname +argument to +.BR quotactl () +is a pointer to a null-terminated string containing the pathname of the (mounted) block special device for the filesystem being manipulated. .PP The +.I mountpoint +argument to +.BR quotactl_path () +is a pointer to a null-terminated string containing the pathname +of the mountpoint for the filesystem being manipulated. +.PP +The .I addr argument is the address of an optional, command-specific, data structure that is copied in or out of the system. @@ -133,7 +148,17 @@ flag in the .I dqi_flags field returned by the .B Q_GETINFO -operation. +operation. The +.BR quotactl_path () +variant of this syscall generally ignores the +.IR addr +and +.IR id +arguments, so the +.B Q_QUOTAON +operation of +.BR quotactl_path () +is only suitable for work with hidden system inodes. .IP This operation requires privilege .RB ( CAP_SYS_ADMIN ). diff --git a/man2/quotactl_path.2 b/man2/quotactl_path.2 new file mode 100644 index 000000000..5f63187c6 --- /dev/null +++ b/man2/quotactl_path.2 @@ -0,0 +1 @@ +.so man2/quotactl.2 -- 2.20.1 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v2 0/2] quota: Add mountpath based quota support 2021-02-11 15:30 [PATCH v2 0/2] quota: Add mountpath based quota support Sascha Hauer ` (2 preceding siblings ...) 2021-02-11 15:30 ` [PATCH] quotactl.2: Add documentation for quotactl_path() Sascha Hauer @ 2021-02-12 10:16 ` Jan Kara 3 siblings, 0 replies; 19+ messages in thread From: Jan Kara @ 2021-02-12 10:16 UTC (permalink / raw) To: Sascha Hauer Cc: linux-fsdevel, linux-kernel, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger On Thu 11-02-21 16:30:21, Sascha Hauer wrote: > Current quotactl syscall uses a path to a block device to specify the > filesystem to work on which makes it unsuitable for filesystems that > do not have a block device. This series adds a new syscall quotactl_path() > which replaces the path to the block device with a mountpath, but otherwise > behaves like original quotactl. > > This is done to add quota support to UBIFS. UBIFS quota support has been > posted several times with different approaches to put the mountpath into > the existing quotactl() syscall until it has been suggested to make it a > new syscall instead, so here it is. > > I'm not posting the full UBIFS quota series here as it remains unchanged > and I'd like to get feedback to the new syscall first. For those interested > the most recent series can be found here: https://lwn.net/Articles/810463/ > > Changes since (implicit) v1: > - Ignore second path argument to Q_QUOTAON. With this quotactl_path() can > only do the Q_QUOTAON operation on filesystems which use hidden inodes > for quota metadata storage > - Drop unnecessary quotactl_cmd_onoff() check Thanks modulo the 0-day complains and the small nit discussed the patches and manpage update look good to me. Honza > > Sascha Hauer (2): > quota: Add mountpath based quota support > quota: wire up quotactl_path > > arch/alpha/kernel/syscalls/syscall.tbl | 1 + > arch/arm/tools/syscall.tbl | 1 + > arch/arm64/include/asm/unistd.h | 2 +- > arch/arm64/include/asm/unistd32.h | 2 + > arch/ia64/kernel/syscalls/syscall.tbl | 1 + > arch/m68k/kernel/syscalls/syscall.tbl | 1 + > arch/microblaze/kernel/syscalls/syscall.tbl | 1 + > arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + > arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + > arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + > arch/parisc/kernel/syscalls/syscall.tbl | 1 + > arch/powerpc/kernel/syscalls/syscall.tbl | 1 + > arch/s390/kernel/syscalls/syscall.tbl | 1 + > arch/sh/kernel/syscalls/syscall.tbl | 1 + > arch/sparc/kernel/syscalls/syscall.tbl | 1 + > arch/x86/entry/syscalls/syscall_32.tbl | 1 + > arch/x86/entry/syscalls/syscall_64.tbl | 1 + > arch/xtensa/kernel/syscalls/syscall.tbl | 1 + > fs/quota/quota.c | 49 +++++++++++++++++++++ > include/linux/syscalls.h | 2 + > include/uapi/asm-generic/unistd.h | 4 +- > kernel/sys_ni.c | 1 + > 22 files changed, 74 insertions(+), 2 deletions(-) > > -- > 2.20.1 > -- Jan Kara <jack@suse.com> SUSE Labs, CR ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3 0/2] quota: Add mountpath based quota support @ 2021-03-04 12:35 Sascha Hauer 2021-03-04 12:35 ` [PATCH 2/2] quota: wire up quotactl_path Sascha Hauer 0 siblings, 1 reply; 19+ messages in thread From: Sascha Hauer @ 2021-03-04 12:35 UTC (permalink / raw) To: linux-fsdevel Cc: linux-kernel, linux-api, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger, Sascha Hauer Current quotactl syscall uses a path to a block device to specify the filesystem to work on which makes it unsuitable for filesystems that do not have a block device. This series adds a new syscall quotactl_path() which replaces the path to the block device with a mountpath, but otherwise behaves like original quotactl. This is done to add quota support to UBIFS. UBIFS quota support has been posted several times with different approaches to put the mountpath into the existing quotactl() syscall until it has been suggested to make it a new syscall instead, so here it is. I'm not posting the full UBIFS quota series here as it remains unchanged and I'd like to get feedback to the new syscall first. For those interested the most recent series can be found here: https://lwn.net/Articles/810463/ Changes since v2: - Rebase on v5.12-rc1 - replace mountpath.dentry->d_inode->i_sb with mountpath.mnt->mnt_sb - fix wrong macro usage in arch/x86/entry/syscalls/syscall_32.tbl - +Cc linux-api@vger.kernel.org Changes since (implicit) v1: - Ignore second path argument to Q_QUOTAON. With this quotactl_path() can only do the Q_QUOTAON operation on filesystems which use hidden inodes for quota metadata storage - Drop unnecessary quotactl_cmd_onoff() check Sascha Hauer (2): quota: Add mountpath based quota support quota: wire up quotactl_path arch/alpha/kernel/syscalls/syscall.tbl | 1 + arch/arm/tools/syscall.tbl | 1 + arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 2 + arch/ia64/kernel/syscalls/syscall.tbl | 1 + arch/m68k/kernel/syscalls/syscall.tbl | 1 + arch/microblaze/kernel/syscalls/syscall.tbl | 1 + arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + arch/parisc/kernel/syscalls/syscall.tbl | 1 + arch/powerpc/kernel/syscalls/syscall.tbl | 1 + arch/s390/kernel/syscalls/syscall.tbl | 1 + arch/sh/kernel/syscalls/syscall.tbl | 1 + arch/sparc/kernel/syscalls/syscall.tbl | 1 + arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + arch/xtensa/kernel/syscalls/syscall.tbl | 1 + fs/quota/quota.c | 49 +++++++++++++++++++-- include/linux/syscalls.h | 2 + include/uapi/asm-generic/unistd.h | 4 +- kernel/sys_ni.c | 1 + 22 files changed, 71 insertions(+), 5 deletions(-) -- 2.29.2 ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 2/2] quota: wire up quotactl_path 2021-03-04 12:35 [PATCH v3 " Sascha Hauer @ 2021-03-04 12:35 ` Sascha Hauer 2021-03-04 16:41 ` kernel test robot 2021-03-04 17:08 ` kernel test robot 0 siblings, 2 replies; 19+ messages in thread From: Sascha Hauer @ 2021-03-04 12:35 UTC (permalink / raw) To: linux-fsdevel Cc: linux-kernel, linux-api, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger, Sascha Hauer, Christoph Hellwig Wire up the quotactl_path syscall added in the previous patch. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Christoph Hellwig <hch@lst.de> --- arch/alpha/kernel/syscalls/syscall.tbl | 1 + arch/arm/tools/syscall.tbl | 1 + arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 2 ++ arch/ia64/kernel/syscalls/syscall.tbl | 1 + arch/m68k/kernel/syscalls/syscall.tbl | 1 + arch/microblaze/kernel/syscalls/syscall.tbl | 1 + arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + arch/parisc/kernel/syscalls/syscall.tbl | 1 + arch/powerpc/kernel/syscalls/syscall.tbl | 1 + arch/s390/kernel/syscalls/syscall.tbl | 1 + arch/sh/kernel/syscalls/syscall.tbl | 1 + arch/sparc/kernel/syscalls/syscall.tbl | 1 + arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + arch/xtensa/kernel/syscalls/syscall.tbl | 1 + include/linux/syscalls.h | 2 ++ include/uapi/asm-generic/unistd.h | 4 +++- kernel/sys_ni.c | 1 + 21 files changed, 25 insertions(+), 2 deletions(-) diff --git a/arch/alpha/kernel/syscalls/syscall.tbl b/arch/alpha/kernel/syscalls/syscall.tbl index 02f0244e005c..c5f7e595adab 100644 --- a/arch/alpha/kernel/syscalls/syscall.tbl +++ b/arch/alpha/kernel/syscalls/syscall.tbl @@ -482,3 +482,4 @@ 550 common process_madvise sys_process_madvise 551 common epoll_pwait2 sys_epoll_pwait2 552 common mount_setattr sys_mount_setattr +553 common quotactl_path sys_quotactl_path diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl index dcc1191291a2..90cbe207cf3e 100644 --- a/arch/arm/tools/syscall.tbl +++ b/arch/arm/tools/syscall.tbl @@ -456,3 +456,4 @@ 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 442 common mount_setattr sys_mount_setattr +443 common quotactl_path sys_quotactl_path diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h index 949788f5ba40..d1f7d35f986e 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h @@ -38,7 +38,7 @@ #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5) #define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800) -#define __NR_compat_syscalls 443 +#define __NR_compat_syscalls 444 #endif #define __ARCH_WANT_SYS_CLONE diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h index 3d874f624056..8361c5138e5f 100644 --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h @@ -893,6 +893,8 @@ __SYSCALL(__NR_process_madvise, sys_process_madvise) __SYSCALL(__NR_epoll_pwait2, compat_sys_epoll_pwait2) #define __NR_mount_setattr 442 __SYSCALL(__NR_mount_setattr, sys_mount_setattr) +#define __NR_quotactl_path 443 +__SYSCALL(__NR_quotactl_path, sys_quotactl_path) /* * Please add new compat syscalls above this comment and update diff --git a/arch/ia64/kernel/syscalls/syscall.tbl b/arch/ia64/kernel/syscalls/syscall.tbl index d89231166e19..c072cd459bb5 100644 --- a/arch/ia64/kernel/syscalls/syscall.tbl +++ b/arch/ia64/kernel/syscalls/syscall.tbl @@ -363,3 +363,4 @@ 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 442 common mount_setattr sys_mount_setattr +443 common quotactl_path sys_quotactl_path diff --git a/arch/m68k/kernel/syscalls/syscall.tbl b/arch/m68k/kernel/syscalls/syscall.tbl index 72bde6707dd3..5e9f81073ff4 100644 --- a/arch/m68k/kernel/syscalls/syscall.tbl +++ b/arch/m68k/kernel/syscalls/syscall.tbl @@ -442,3 +442,4 @@ 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 442 common mount_setattr sys_mount_setattr +443 common quotactl_path sys_quotactl_path diff --git a/arch/microblaze/kernel/syscalls/syscall.tbl b/arch/microblaze/kernel/syscalls/syscall.tbl index d603a5ec9338..8e74d690c64d 100644 --- a/arch/microblaze/kernel/syscalls/syscall.tbl +++ b/arch/microblaze/kernel/syscalls/syscall.tbl @@ -448,3 +448,4 @@ 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 442 common mount_setattr sys_mount_setattr +443 common quotactl_path sys_quotactl_path diff --git a/arch/mips/kernel/syscalls/syscall_n32.tbl b/arch/mips/kernel/syscalls/syscall_n32.tbl index 8fd8c1790941..6f397e56926f 100644 --- a/arch/mips/kernel/syscalls/syscall_n32.tbl +++ b/arch/mips/kernel/syscalls/syscall_n32.tbl @@ -381,3 +381,4 @@ 440 n32 process_madvise sys_process_madvise 441 n32 epoll_pwait2 compat_sys_epoll_pwait2 442 n32 mount_setattr sys_mount_setattr +443 n32 quotactl_path sys_quotactl_path diff --git a/arch/mips/kernel/syscalls/syscall_n64.tbl b/arch/mips/kernel/syscalls/syscall_n64.tbl index 169f21438065..ab85a357c4fa 100644 --- a/arch/mips/kernel/syscalls/syscall_n64.tbl +++ b/arch/mips/kernel/syscalls/syscall_n64.tbl @@ -357,3 +357,4 @@ 440 n64 process_madvise sys_process_madvise 441 n64 epoll_pwait2 sys_epoll_pwait2 442 n64 mount_setattr sys_mount_setattr +443 n64 quotactl_path sys_quotactl_path diff --git a/arch/mips/kernel/syscalls/syscall_o32.tbl b/arch/mips/kernel/syscalls/syscall_o32.tbl index 090d29ca80ff..9c4cd2b40b38 100644 --- a/arch/mips/kernel/syscalls/syscall_o32.tbl +++ b/arch/mips/kernel/syscalls/syscall_o32.tbl @@ -430,3 +430,4 @@ 440 o32 process_madvise sys_process_madvise 441 o32 epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 442 o32 mount_setattr sys_mount_setattr +443 o32 quotactl_path sys_quotactl_path diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl index 271a92519683..80fba3f7d47b 100644 --- a/arch/parisc/kernel/syscalls/syscall.tbl +++ b/arch/parisc/kernel/syscalls/syscall.tbl @@ -440,3 +440,4 @@ 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 442 common mount_setattr sys_mount_setattr +443 common quotactl_path sys_quotactl_path diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl b/arch/powerpc/kernel/syscalls/syscall.tbl index 0b2480cf3e47..f66f9c9b9d6c 100644 --- a/arch/powerpc/kernel/syscalls/syscall.tbl +++ b/arch/powerpc/kernel/syscalls/syscall.tbl @@ -522,3 +522,4 @@ 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 442 common mount_setattr sys_mount_setattr +443 common quotactl_path sys_quotactl_path diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl index 3abef2144dac..4aeaa89fa774 100644 --- a/arch/s390/kernel/syscalls/syscall.tbl +++ b/arch/s390/kernel/syscalls/syscall.tbl @@ -445,3 +445,4 @@ 440 common process_madvise sys_process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 442 common mount_setattr sys_mount_setattr sys_mount_setattr +443 common quotactl_path sys_quotactl_path diff --git a/arch/sh/kernel/syscalls/syscall.tbl b/arch/sh/kernel/syscalls/syscall.tbl index d08eebad6b7f..f68517aaa4f1 100644 --- a/arch/sh/kernel/syscalls/syscall.tbl +++ b/arch/sh/kernel/syscalls/syscall.tbl @@ -445,3 +445,4 @@ 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 442 common mount_setattr sys_mount_setattr +443 common quotactl_path sys_quotactl_path diff --git a/arch/sparc/kernel/syscalls/syscall.tbl b/arch/sparc/kernel/syscalls/syscall.tbl index 84403a99039c..3ee82321504d 100644 --- a/arch/sparc/kernel/syscalls/syscall.tbl +++ b/arch/sparc/kernel/syscalls/syscall.tbl @@ -488,3 +488,4 @@ 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 442 common mount_setattr sys_mount_setattr +443 common quotactl_path sys_quotactl_path diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl index a1c9f496fca6..f52a443eede0 100644 --- a/arch/x86/entry/syscalls/syscall_32.tbl +++ b/arch/x86/entry/syscalls/syscall_32.tbl @@ -447,3 +447,4 @@ 440 i386 process_madvise sys_process_madvise 441 i386 epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 442 i386 mount_setattr sys_mount_setattr +443 i386 quotactl_path sys_quotactl_path diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl index 7bf01cbe582f..7eb007b8cab5 100644 --- a/arch/x86/entry/syscalls/syscall_64.tbl +++ b/arch/x86/entry/syscalls/syscall_64.tbl @@ -364,6 +364,7 @@ 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 442 common mount_setattr sys_mount_setattr +443 common quotactl_path sys_quotactl_path # # Due to a historical design error, certain syscalls are numbered differently diff --git a/arch/xtensa/kernel/syscalls/syscall.tbl b/arch/xtensa/kernel/syscalls/syscall.tbl index 365a9b849224..c71cc45633de 100644 --- a/arch/xtensa/kernel/syscalls/syscall.tbl +++ b/arch/xtensa/kernel/syscalls/syscall.tbl @@ -413,3 +413,4 @@ 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 442 common mount_setattr sys_mount_setattr +443 common quotactl_path sys_quotactl_path diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 2839dc9a7c01..a672bbe28577 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -483,6 +483,8 @@ asmlinkage long sys_pipe2(int __user *fildes, int flags); /* fs/quota.c */ asmlinkage long sys_quotactl(unsigned int cmd, const char __user *special, qid_t id, void __user *addr); +asmlinkage long sys_quotactl_path(unsigned int cmd, const char __user *mountpoint, + qid_t id, void __user *addr); /* fs/readdir.c */ asmlinkage long sys_getdents64(unsigned int fd, diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index ce58cff99b66..739c839d28fe 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -863,9 +863,11 @@ __SYSCALL(__NR_process_madvise, sys_process_madvise) __SC_COMP(__NR_epoll_pwait2, sys_epoll_pwait2, compat_sys_epoll_pwait2) #define __NR_mount_setattr 442 __SYSCALL(__NR_mount_setattr, sys_mount_setattr) +#define __NR_quotactl_path 443 +__SYSCALL(__NR_quotactl_path, sys_quotactl_path) #undef __NR_syscalls -#define __NR_syscalls 443 +#define __NR_syscalls 444 /* * 32 bit systems traditionally used different diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c index 19aa806890d5..d24431782414 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c @@ -99,6 +99,7 @@ COND_SYSCALL(flock); /* fs/quota.c */ COND_SYSCALL(quotactl); +COND_SYSCALL(quotactl_path); /* fs/readdir.c */ -- 2.29.2 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 2/2] quota: wire up quotactl_path 2021-03-04 12:35 ` [PATCH 2/2] quota: wire up quotactl_path Sascha Hauer @ 2021-03-04 16:41 ` kernel test robot 2021-03-04 17:08 ` kernel test robot 1 sibling, 0 replies; 19+ messages in thread From: kernel test robot @ 2021-03-04 16:41 UTC (permalink / raw) To: Sascha Hauer, linux-fsdevel Cc: linux-kernel, linux-api, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger, Sascha Hauer [-- Attachment #1: Type: text/plain, Size: 19839 bytes --] Hi Sascha, I love your patch! Perhaps something to improve: [auto build test WARNING on m68k/for-next] [also build test WARNING on hp-parisc/for-next powerpc/next s390/features sparc/master linus/master v5.12-rc1] [cannot apply to arm64/for-next/core tip/x86/asm] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Sascha-Hauer/quota-Add-mountpath-based-quota-support/20210304-204157 base: https://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git for-next config: x86_64-randconfig-m001-20210304 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/4c5e71a8aad3e3e1f2eb339eec24d563d0d6acbe git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Sascha-Hauer/quota-Add-mountpath-based-quota-support/20210304-204157 git checkout 4c5e71a8aad3e3e1f2eb339eec24d563d0d6acbe # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:69:1: note: in expansion of macro 'COND_SYSCALL' 69 | COND_SYSCALL(epoll_pwait); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_epoll_pwait2' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:71:1: note: in expansion of macro 'COND_SYSCALL' 71 | COND_SYSCALL(epoll_pwait2); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_inotify_init1' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:77:1: note: in expansion of macro 'COND_SYSCALL' 77 | COND_SYSCALL(inotify_init1); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_inotify_add_watch' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:78:1: note: in expansion of macro 'COND_SYSCALL' 78 | COND_SYSCALL(inotify_add_watch); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_inotify_rm_watch' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:79:1: note: in expansion of macro 'COND_SYSCALL' 79 | COND_SYSCALL(inotify_rm_watch); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_ioprio_set' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:84:1: note: in expansion of macro 'COND_SYSCALL' 84 | COND_SYSCALL(ioprio_set); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_ioprio_get' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:85:1: note: in expansion of macro 'COND_SYSCALL' 85 | COND_SYSCALL(ioprio_get); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_flock' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:88:1: note: in expansion of macro 'COND_SYSCALL' 88 | COND_SYSCALL(flock); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_quotactl' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:101:1: note: in expansion of macro 'COND_SYSCALL' 101 | COND_SYSCALL(quotactl); | ^~~~~~~~~~~~ >> arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_quotactl_path' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:102:1: note: in expansion of macro 'COND_SYSCALL' 102 | COND_SYSCALL(quotactl_path); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_signalfd4' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:113:1: note: in expansion of macro 'COND_SYSCALL' 113 | COND_SYSCALL(signalfd4); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_timerfd_create' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:123:1: note: in expansion of macro 'COND_SYSCALL' 123 | COND_SYSCALL(timerfd_create); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_timerfd_settime' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:124:1: note: in expansion of macro 'COND_SYSCALL' 124 | COND_SYSCALL(timerfd_settime); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_timerfd_settime32' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:125:1: note: in expansion of macro 'COND_SYSCALL' 125 | COND_SYSCALL(timerfd_settime32); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_timerfd_gettime' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:126:1: note: in expansion of macro 'COND_SYSCALL' 126 | COND_SYSCALL(timerfd_gettime); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_timerfd_gettime32' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:127:1: note: in expansion of macro 'COND_SYSCALL' 127 | COND_SYSCALL(timerfd_gettime32); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_acct' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) | ^~~~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' 256 | __X64_COND_SYSCALL(name) \ | ^~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:132:1: note: in expansion of macro 'COND_SYSCALL' 132 | COND_SYSCALL(acct); | ^~~~~~~~~~~~ arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_capget' [-Wmissing-prototypes] 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ | ^~ arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' 100 | __COND_SYSCALL(x64, sys_##name) vim +/__x64_sys_quotactl_path +83 arch/x86/include/asm/syscall_wrapper.h cc42c045af1ff4de Brian Gerst 2020-03-13 13 25c619e59b395a8c Brian Gerst 2020-03-13 14 /* 25c619e59b395a8c Brian Gerst 2020-03-13 15 * Instead of the generic __SYSCALL_DEFINEx() definition, the x86 version takes 25c619e59b395a8c Brian Gerst 2020-03-13 16 * struct pt_regs *regs as the only argument of the syscall stub(s) named as: 25c619e59b395a8c Brian Gerst 2020-03-13 17 * __x64_sys_*() - 64-bit native syscall 25c619e59b395a8c Brian Gerst 2020-03-13 18 * __ia32_sys_*() - 32-bit native syscall or common compat syscall 25c619e59b395a8c Brian Gerst 2020-03-13 19 * __ia32_compat_sys_*() - 32-bit compat syscall 25c619e59b395a8c Brian Gerst 2020-03-13 20 * __x32_compat_sys_*() - 64-bit X32 compat syscall 25c619e59b395a8c Brian Gerst 2020-03-13 21 * 25c619e59b395a8c Brian Gerst 2020-03-13 22 * The registers are decoded according to the ABI: 25c619e59b395a8c Brian Gerst 2020-03-13 23 * 64-bit: RDI, RSI, RDX, R10, R8, R9 25c619e59b395a8c Brian Gerst 2020-03-13 24 * 32-bit: EBX, ECX, EDX, ESI, EDI, EBP 25c619e59b395a8c Brian Gerst 2020-03-13 25 * 25c619e59b395a8c Brian Gerst 2020-03-13 26 * The stub then passes the decoded arguments to the __se_sys_*() wrapper to 25c619e59b395a8c Brian Gerst 2020-03-13 27 * perform sign-extension (omitted for zero-argument syscalls). Finally the 25c619e59b395a8c Brian Gerst 2020-03-13 28 * arguments are passed to the __do_sys_*() function which is the actual 25c619e59b395a8c Brian Gerst 2020-03-13 29 * syscall. These wrappers are marked as inline so the compiler can optimize 25c619e59b395a8c Brian Gerst 2020-03-13 30 * the functions where appropriate. 25c619e59b395a8c Brian Gerst 2020-03-13 31 * 25c619e59b395a8c Brian Gerst 2020-03-13 32 * Example assembly (slightly re-ordered for better readability): 25c619e59b395a8c Brian Gerst 2020-03-13 33 * 25c619e59b395a8c Brian Gerst 2020-03-13 34 * <__x64_sys_recv>: <-- syscall with 4 parameters 25c619e59b395a8c Brian Gerst 2020-03-13 35 * callq <__fentry__> 25c619e59b395a8c Brian Gerst 2020-03-13 36 * 25c619e59b395a8c Brian Gerst 2020-03-13 37 * mov 0x70(%rdi),%rdi <-- decode regs->di 25c619e59b395a8c Brian Gerst 2020-03-13 38 * mov 0x68(%rdi),%rsi <-- decode regs->si 25c619e59b395a8c Brian Gerst 2020-03-13 39 * mov 0x60(%rdi),%rdx <-- decode regs->dx 25c619e59b395a8c Brian Gerst 2020-03-13 40 * mov 0x38(%rdi),%rcx <-- decode regs->r10 25c619e59b395a8c Brian Gerst 2020-03-13 41 * 25c619e59b395a8c Brian Gerst 2020-03-13 42 * xor %r9d,%r9d <-- clear %r9 25c619e59b395a8c Brian Gerst 2020-03-13 43 * xor %r8d,%r8d <-- clear %r8 25c619e59b395a8c Brian Gerst 2020-03-13 44 * 25c619e59b395a8c Brian Gerst 2020-03-13 45 * callq __sys_recvfrom <-- do the actual work in __sys_recvfrom() 25c619e59b395a8c Brian Gerst 2020-03-13 46 * which takes 6 arguments 25c619e59b395a8c Brian Gerst 2020-03-13 47 * 25c619e59b395a8c Brian Gerst 2020-03-13 48 * cltq <-- extend return value to 64-bit 25c619e59b395a8c Brian Gerst 2020-03-13 49 * retq <-- return 25c619e59b395a8c Brian Gerst 2020-03-13 50 * 25c619e59b395a8c Brian Gerst 2020-03-13 51 * This approach avoids leaking random user-provided register content down 25c619e59b395a8c Brian Gerst 2020-03-13 52 * the call chain. 25c619e59b395a8c Brian Gerst 2020-03-13 53 */ 25c619e59b395a8c Brian Gerst 2020-03-13 54 ebeb8c82ffaf9443 Dominik Brodowski 2018-04-05 55 /* Mapping of registers to parameters for syscalls on x86-64 and x32 */ ebeb8c82ffaf9443 Dominik Brodowski 2018-04-05 56 #define SC_X86_64_REGS_TO_ARGS(x, ...) \ ebeb8c82ffaf9443 Dominik Brodowski 2018-04-05 57 __MAP(x,__SC_ARGS \ ebeb8c82ffaf9443 Dominik Brodowski 2018-04-05 58 ,,regs->di,,regs->si,,regs->dx \ ebeb8c82ffaf9443 Dominik Brodowski 2018-04-05 59 ,,regs->r10,,regs->r8,,regs->r9) \ ebeb8c82ffaf9443 Dominik Brodowski 2018-04-05 60 ebeb8c82ffaf9443 Dominik Brodowski 2018-04-05 61 /* Mapping of registers to parameters for syscalls on i386 */ ebeb8c82ffaf9443 Dominik Brodowski 2018-04-05 62 #define SC_IA32_REGS_TO_ARGS(x, ...) \ ebeb8c82ffaf9443 Dominik Brodowski 2018-04-05 63 __MAP(x,__SC_ARGS \ ebeb8c82ffaf9443 Dominik Brodowski 2018-04-05 64 ,,(unsigned int)regs->bx,,(unsigned int)regs->cx \ ebeb8c82ffaf9443 Dominik Brodowski 2018-04-05 65 ,,(unsigned int)regs->dx,,(unsigned int)regs->si \ ebeb8c82ffaf9443 Dominik Brodowski 2018-04-05 66 ,,(unsigned int)regs->di,,(unsigned int)regs->bp) ebeb8c82ffaf9443 Dominik Brodowski 2018-04-05 67 d2b5de495ee9838b Brian Gerst 2020-03-13 68 #define __SYS_STUB0(abi, name) \ 0f78ff17112d8b34 Brian Gerst 2020-03-13 69 long __##abi##_##name(const struct pt_regs *regs); \ d2b5de495ee9838b Brian Gerst 2020-03-13 70 ALLOW_ERROR_INJECTION(__##abi##_##name, ERRNO); \ 0f78ff17112d8b34 Brian Gerst 2020-03-13 71 long __##abi##_##name(const struct pt_regs *regs) \ d2b5de495ee9838b Brian Gerst 2020-03-13 72 __alias(__do_##name); d2b5de495ee9838b Brian Gerst 2020-03-13 73 4399e0cf494f739a Brian Gerst 2020-03-13 74 #define __SYS_STUBx(abi, name, ...) \ 0f78ff17112d8b34 Brian Gerst 2020-03-13 75 long __##abi##_##name(const struct pt_regs *regs); \ 4399e0cf494f739a Brian Gerst 2020-03-13 76 ALLOW_ERROR_INJECTION(__##abi##_##name, ERRNO); \ 0f78ff17112d8b34 Brian Gerst 2020-03-13 77 long __##abi##_##name(const struct pt_regs *regs) \ 4399e0cf494f739a Brian Gerst 2020-03-13 78 { \ 4399e0cf494f739a Brian Gerst 2020-03-13 79 return __se_##name(__VA_ARGS__); \ 4399e0cf494f739a Brian Gerst 2020-03-13 80 } 4399e0cf494f739a Brian Gerst 2020-03-13 81 6cc8d2b286d9e716 Brian Gerst 2020-03-13 82 #define __COND_SYSCALL(abi, name) \ 0f78ff17112d8b34 Brian Gerst 2020-03-13 @83 __weak long __##abi##_##name(const struct pt_regs *__unused) \ 6cc8d2b286d9e716 Brian Gerst 2020-03-13 84 { \ 6cc8d2b286d9e716 Brian Gerst 2020-03-13 85 return sys_ni_syscall(); \ 6cc8d2b286d9e716 Brian Gerst 2020-03-13 86 } 6cc8d2b286d9e716 Brian Gerst 2020-03-13 87 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 33993 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/2] quota: wire up quotactl_path 2021-03-04 12:35 ` [PATCH 2/2] quota: wire up quotactl_path Sascha Hauer 2021-03-04 16:41 ` kernel test robot @ 2021-03-04 17:08 ` kernel test robot 1 sibling, 0 replies; 19+ messages in thread From: kernel test robot @ 2021-03-04 17:08 UTC (permalink / raw) To: Sascha Hauer, linux-fsdevel Cc: linux-kernel, linux-api, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger, Sascha Hauer [-- Attachment #1: Type: text/plain, Size: 17889 bytes --] Hi Sascha, I love your patch! Perhaps something to improve: [auto build test WARNING on m68k/for-next] [also build test WARNING on hp-parisc/for-next powerpc/next s390/features sparc/master linus/master v5.12-rc1] [cannot apply to arm64/for-next/core tip/x86/asm] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Sascha-Hauer/quota-Add-mountpath-based-quota-support/20210304-204157 base: https://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git for-next config: arm64-randconfig-r002-20210304 (attached as .config) compiler: aarch64-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/4c5e71a8aad3e3e1f2eb339eec24d563d0d6acbe git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Sascha-Hauer/quota-Add-mountpath-based-quota-support/20210304-204157 git checkout 4c5e71a8aad3e3e1f2eb339eec24d563d0d6acbe # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): | ^~~~~~~~~~~~ kernel/sys_ni.c:53:1: note: in expansion of macro 'COND_SYSCALL' 53 | COND_SYSCALL(io_uring_register); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_lookup_dcookie' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:60:1: note: in expansion of macro 'COND_SYSCALL' 60 | COND_SYSCALL(lookup_dcookie); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:41:25: warning: no previous prototype for '__arm64_compat_sys_lookup_dcookie' [-Wmissing-prototypes] 41 | asmlinkage long __weak __arm64_compat_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:61:1: note: in expansion of macro 'COND_SYSCALL_COMPAT' 61 | COND_SYSCALL_COMPAT(lookup_dcookie); | ^~~~~~~~~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_eventfd2' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:64:1: note: in expansion of macro 'COND_SYSCALL' 64 | COND_SYSCALL(eventfd2); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_epoll_create1' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:67:1: note: in expansion of macro 'COND_SYSCALL' 67 | COND_SYSCALL(epoll_create1); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_epoll_ctl' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:68:1: note: in expansion of macro 'COND_SYSCALL' 68 | COND_SYSCALL(epoll_ctl); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_epoll_pwait' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:69:1: note: in expansion of macro 'COND_SYSCALL' 69 | COND_SYSCALL(epoll_pwait); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:41:25: warning: no previous prototype for '__arm64_compat_sys_epoll_pwait' [-Wmissing-prototypes] 41 | asmlinkage long __weak __arm64_compat_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:70:1: note: in expansion of macro 'COND_SYSCALL_COMPAT' 70 | COND_SYSCALL_COMPAT(epoll_pwait); | ^~~~~~~~~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_epoll_pwait2' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:71:1: note: in expansion of macro 'COND_SYSCALL' 71 | COND_SYSCALL(epoll_pwait2); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:41:25: warning: no previous prototype for '__arm64_compat_sys_epoll_pwait2' [-Wmissing-prototypes] 41 | asmlinkage long __weak __arm64_compat_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:72:1: note: in expansion of macro 'COND_SYSCALL_COMPAT' 72 | COND_SYSCALL_COMPAT(epoll_pwait2); | ^~~~~~~~~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_inotify_init1' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:77:1: note: in expansion of macro 'COND_SYSCALL' 77 | COND_SYSCALL(inotify_init1); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_inotify_add_watch' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:78:1: note: in expansion of macro 'COND_SYSCALL' 78 | COND_SYSCALL(inotify_add_watch); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_inotify_rm_watch' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:79:1: note: in expansion of macro 'COND_SYSCALL' 79 | COND_SYSCALL(inotify_rm_watch); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_ioprio_set' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:84:1: note: in expansion of macro 'COND_SYSCALL' 84 | COND_SYSCALL(ioprio_set); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_ioprio_get' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:85:1: note: in expansion of macro 'COND_SYSCALL' 85 | COND_SYSCALL(ioprio_get); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_flock' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:88:1: note: in expansion of macro 'COND_SYSCALL' 88 | COND_SYSCALL(flock); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_quotactl' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:101:1: note: in expansion of macro 'COND_SYSCALL' 101 | COND_SYSCALL(quotactl); | ^~~~~~~~~~~~ >> arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_quotactl_path' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:102:1: note: in expansion of macro 'COND_SYSCALL' 102 | COND_SYSCALL(quotactl_path); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_signalfd4' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:113:1: note: in expansion of macro 'COND_SYSCALL' 113 | COND_SYSCALL(signalfd4); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:41:25: warning: no previous prototype for '__arm64_compat_sys_signalfd4' [-Wmissing-prototypes] 41 | asmlinkage long __weak __arm64_compat_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:114:1: note: in expansion of macro 'COND_SYSCALL_COMPAT' 114 | COND_SYSCALL_COMPAT(signalfd4); | ^~~~~~~~~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_timerfd_create' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:123:1: note: in expansion of macro 'COND_SYSCALL' 123 | COND_SYSCALL(timerfd_create); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_timerfd_settime' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:124:1: note: in expansion of macro 'COND_SYSCALL' 124 | COND_SYSCALL(timerfd_settime); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_timerfd_settime32' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:125:1: note: in expansion of macro 'COND_SYSCALL' 125 | COND_SYSCALL(timerfd_settime32); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_timerfd_gettime' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:126:1: note: in expansion of macro 'COND_SYSCALL' 126 | COND_SYSCALL(timerfd_gettime); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_timerfd_gettime32' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:127:1: note: in expansion of macro 'COND_SYSCALL' 127 | COND_SYSCALL(timerfd_gettime32); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_acct' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:132:1: note: in expansion of macro 'COND_SYSCALL' 132 | COND_SYSCALL(acct); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_capget' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:135:1: note: in expansion of macro 'COND_SYSCALL' 135 | COND_SYSCALL(capget); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_capset' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:136:1: note: in expansion of macro 'COND_SYSCALL' 136 | COND_SYSCALL(capset); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_clone3' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:144:1: note: in expansion of macro 'COND_SYSCALL' 144 | COND_SYSCALL(clone3); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_futex' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:147:1: note: in expansion of macro 'COND_SYSCALL' 147 | COND_SYSCALL(futex); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_futex_time32' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:148:1: note: in expansion of macro 'COND_SYSCALL' 148 | COND_SYSCALL(futex_time32); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_set_robust_list' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:149:1: note: in expansion of macro 'COND_SYSCALL' 149 | COND_SYSCALL(set_robust_list); | ^~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:41:25: warning: no previous prototype for '__arm64_compat_sys_set_robust_list' [-Wmissing-prototypes] 41 | asmlinkage long __weak __arm64_compat_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~~~~~~~~ kernel/sys_ni.c:150:1: note: in expansion of macro 'COND_SYSCALL_COMPAT' 150 | COND_SYSCALL_COMPAT(set_robust_list); | ^~~~~~~~~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:76:25: warning: no previous prototype for '__arm64_sys_get_robust_list' [-Wmissing-prototypes] 76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ | ^~~~~~~~~~~~ kernel/sys_ni.c:151:1: note: in expansion of macro 'COND_SYSCALL' 151 | COND_SYSCALL(get_robust_list); vim +/__arm64_sys_quotactl_path +76 arch/arm64/include/asm/syscall_wrapper.h 4378a7d4be30ec Mark Rutland 2018-07-11 50 4378a7d4be30ec Mark Rutland 2018-07-11 51 #define __SYSCALL_DEFINEx(x, name, ...) \ 4378a7d4be30ec Mark Rutland 2018-07-11 52 asmlinkage long __arm64_sys##name(const struct pt_regs *regs); \ 4378a7d4be30ec Mark Rutland 2018-07-11 53 ALLOW_ERROR_INJECTION(__arm64_sys##name, ERRNO); \ 4378a7d4be30ec Mark Rutland 2018-07-11 54 static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ 4378a7d4be30ec Mark Rutland 2018-07-11 55 static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ 4378a7d4be30ec Mark Rutland 2018-07-11 56 asmlinkage long __arm64_sys##name(const struct pt_regs *regs) \ 4378a7d4be30ec Mark Rutland 2018-07-11 57 { \ 4378a7d4be30ec Mark Rutland 2018-07-11 58 return __se_sys##name(SC_ARM64_REGS_TO_ARGS(x,__VA_ARGS__)); \ 4378a7d4be30ec Mark Rutland 2018-07-11 59 } \ 4378a7d4be30ec Mark Rutland 2018-07-11 60 static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ 4378a7d4be30ec Mark Rutland 2018-07-11 61 { \ 4378a7d4be30ec Mark Rutland 2018-07-11 62 long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__)); \ 4378a7d4be30ec Mark Rutland 2018-07-11 63 __MAP(x,__SC_TEST,__VA_ARGS__); \ 4378a7d4be30ec Mark Rutland 2018-07-11 64 __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ 4378a7d4be30ec Mark Rutland 2018-07-11 65 return ret; \ 4378a7d4be30ec Mark Rutland 2018-07-11 66 } \ 4378a7d4be30ec Mark Rutland 2018-07-11 67 static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) 4378a7d4be30ec Mark Rutland 2018-07-11 68 4378a7d4be30ec Mark Rutland 2018-07-11 69 #define SYSCALL_DEFINE0(sname) \ 4378a7d4be30ec Mark Rutland 2018-07-11 70 SYSCALL_METADATA(_##sname, 0); \ 0e358bd7b7ebd2 Sami Tolvanen 2019-05-24 71 asmlinkage long __arm64_sys_##sname(const struct pt_regs *__unused); \ 4378a7d4be30ec Mark Rutland 2018-07-11 72 ALLOW_ERROR_INJECTION(__arm64_sys_##sname, ERRNO); \ 0e358bd7b7ebd2 Sami Tolvanen 2019-05-24 73 asmlinkage long __arm64_sys_##sname(const struct pt_regs *__unused) 4378a7d4be30ec Mark Rutland 2018-07-11 74 c27eccfe4d6c74 Sami Tolvanen 2019-09-10 75 #define COND_SYSCALL(name) \ c27eccfe4d6c74 Sami Tolvanen 2019-09-10 @76 asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \ c27eccfe4d6c74 Sami Tolvanen 2019-09-10 77 { \ c27eccfe4d6c74 Sami Tolvanen 2019-09-10 78 return sys_ni_syscall(); \ c27eccfe4d6c74 Sami Tolvanen 2019-09-10 79 } 4378a7d4be30ec Mark Rutland 2018-07-11 80 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 23215 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 0/2] quota: Add mountpath based quota support @ 2021-01-28 14:17 Sascha Hauer 2021-01-28 14:17 ` [PATCH 2/2] quota: wire up quotactl_path Sascha Hauer 0 siblings, 1 reply; 19+ messages in thread From: Sascha Hauer @ 2021-01-28 14:17 UTC (permalink / raw) To: linux-fsdevel Cc: linux-kernel, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger, Sascha Hauer Current quotactl syscall uses a path to a block device to specify the filesystem to work on which makes it unsuitable for filesystems that do not have a block device. This series adds a new syscall quotactl_path() which replaces the path to the block device with a mountpath, but otherwise behaves like original quotactl. This is done to add quota support to UBIFS. UBIFS quota support has been posted several times with different approaches to put the mountpath into the existing quotactl() syscall until it has been suggested to make it a new syscall instead, so here it is. I'm not posting the full UBIFS quota series here as it remains unchanged and I'd like to get feedback to the new syscall first. For those interested the most recent series can be found here: https://lwn.net/Articles/810463/ Sascha Sascha Hauer (2): quota: Add mountpath based quota support quota: wire up quotactl_path arch/alpha/kernel/syscalls/syscall.tbl | 1 + arch/arm/tools/syscall.tbl | 1 + arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 2 + arch/ia64/kernel/syscalls/syscall.tbl | 1 + arch/m68k/kernel/syscalls/syscall.tbl | 1 + arch/microblaze/kernel/syscalls/syscall.tbl | 1 + arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + arch/parisc/kernel/syscalls/syscall.tbl | 1 + arch/powerpc/kernel/syscalls/syscall.tbl | 1 + arch/s390/kernel/syscalls/syscall.tbl | 1 + arch/sh/kernel/syscalls/syscall.tbl | 1 + arch/sparc/kernel/syscalls/syscall.tbl | 1 + arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + arch/xtensa/kernel/syscalls/syscall.tbl | 1 + fs/quota/quota.c | 77 +++++++++++++++++++++ include/linux/syscalls.h | 2 + include/uapi/asm-generic/unistd.h | 4 +- kernel/sys_ni.c | 1 + 22 files changed, 102 insertions(+), 2 deletions(-) -- 2.20.1 ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 2/2] quota: wire up quotactl_path 2021-01-28 14:17 [PATCH 0/2] quota: Add mountpath based quota support Sascha Hauer @ 2021-01-28 14:17 ` Sascha Hauer 0 siblings, 0 replies; 19+ messages in thread From: Sascha Hauer @ 2021-01-28 14:17 UTC (permalink / raw) To: linux-fsdevel Cc: linux-kernel, Christoph Hellwig, kernel, Jan Kara, Richard Weinberger, Sascha Hauer Wire up the quotactl_path syscall added in the previous patch. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- arch/alpha/kernel/syscalls/syscall.tbl | 1 + arch/arm/tools/syscall.tbl | 1 + arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 2 ++ arch/ia64/kernel/syscalls/syscall.tbl | 1 + arch/m68k/kernel/syscalls/syscall.tbl | 1 + arch/microblaze/kernel/syscalls/syscall.tbl | 1 + arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + arch/parisc/kernel/syscalls/syscall.tbl | 1 + arch/powerpc/kernel/syscalls/syscall.tbl | 1 + arch/s390/kernel/syscalls/syscall.tbl | 1 + arch/sh/kernel/syscalls/syscall.tbl | 1 + arch/sparc/kernel/syscalls/syscall.tbl | 1 + arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + arch/xtensa/kernel/syscalls/syscall.tbl | 1 + include/linux/syscalls.h | 2 ++ include/uapi/asm-generic/unistd.h | 4 +++- kernel/sys_ni.c | 1 + 21 files changed, 25 insertions(+), 2 deletions(-) diff --git a/arch/alpha/kernel/syscalls/syscall.tbl b/arch/alpha/kernel/syscalls/syscall.tbl index a6617067dbe6..3fe90880c821 100644 --- a/arch/alpha/kernel/syscalls/syscall.tbl +++ b/arch/alpha/kernel/syscalls/syscall.tbl @@ -481,3 +481,4 @@ 549 common faccessat2 sys_faccessat2 550 common process_madvise sys_process_madvise 551 common epoll_pwait2 sys_epoll_pwait2 +552 common quotactl_path sys_quotactl_path diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl index 20e1170e2e0a..a62509df217f 100644 --- a/arch/arm/tools/syscall.tbl +++ b/arch/arm/tools/syscall.tbl @@ -455,3 +455,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h index 86a9d7b3eabe..949788f5ba40 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h @@ -38,7 +38,7 @@ #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5) #define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800) -#define __NR_compat_syscalls 442 +#define __NR_compat_syscalls 443 #endif #define __ARCH_WANT_SYS_CLONE diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h index cccfbbefbf95..734c254ca1b6 100644 --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h @@ -891,6 +891,8 @@ __SYSCALL(__NR_faccessat2, sys_faccessat2) __SYSCALL(__NR_process_madvise, sys_process_madvise) #define __NR_epoll_pwait2 441 __SYSCALL(__NR_epoll_pwait2, compat_sys_epoll_pwait2) +#define __NR_quotactl_path 442 +__SYSCALL(__NR_quotactl_path, sys_quotactl_path) /* * Please add new compat syscalls above this comment and update diff --git a/arch/ia64/kernel/syscalls/syscall.tbl b/arch/ia64/kernel/syscalls/syscall.tbl index bfc00f2bd437..4758a22a4d80 100644 --- a/arch/ia64/kernel/syscalls/syscall.tbl +++ b/arch/ia64/kernel/syscalls/syscall.tbl @@ -362,3 +362,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/m68k/kernel/syscalls/syscall.tbl b/arch/m68k/kernel/syscalls/syscall.tbl index 7fe4e45c864c..b9072d2f1fdc 100644 --- a/arch/m68k/kernel/syscalls/syscall.tbl +++ b/arch/m68k/kernel/syscalls/syscall.tbl @@ -441,3 +441,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/microblaze/kernel/syscalls/syscall.tbl b/arch/microblaze/kernel/syscalls/syscall.tbl index a522adf194ab..95e0cb59e8c1 100644 --- a/arch/microblaze/kernel/syscalls/syscall.tbl +++ b/arch/microblaze/kernel/syscalls/syscall.tbl @@ -447,3 +447,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/mips/kernel/syscalls/syscall_n32.tbl b/arch/mips/kernel/syscalls/syscall_n32.tbl index 0f03ad223f33..027fe0351e66 100644 --- a/arch/mips/kernel/syscalls/syscall_n32.tbl +++ b/arch/mips/kernel/syscalls/syscall_n32.tbl @@ -380,3 +380,4 @@ 439 n32 faccessat2 sys_faccessat2 440 n32 process_madvise sys_process_madvise 441 n32 epoll_pwait2 compat_sys_epoll_pwait2 +442 n32 quotactl_path sys_quotactl_path diff --git a/arch/mips/kernel/syscalls/syscall_n64.tbl b/arch/mips/kernel/syscalls/syscall_n64.tbl index 91649690b52f..f4bddccab043 100644 --- a/arch/mips/kernel/syscalls/syscall_n64.tbl +++ b/arch/mips/kernel/syscalls/syscall_n64.tbl @@ -356,3 +356,4 @@ 439 n64 faccessat2 sys_faccessat2 440 n64 process_madvise sys_process_madvise 441 n64 epoll_pwait2 sys_epoll_pwait2 +442 n64 quotactl_path sys_quotactl_path diff --git a/arch/mips/kernel/syscalls/syscall_o32.tbl b/arch/mips/kernel/syscalls/syscall_o32.tbl index 4bad0c40aed6..bc2f3ad1de87 100644 --- a/arch/mips/kernel/syscalls/syscall_o32.tbl +++ b/arch/mips/kernel/syscalls/syscall_o32.tbl @@ -429,3 +429,4 @@ 439 o32 faccessat2 sys_faccessat2 440 o32 process_madvise sys_process_madvise 441 o32 epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 o32 quotactl_path sys_quotactl_path diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl index 6bcc31966b44..80a4b6dbae77 100644 --- a/arch/parisc/kernel/syscalls/syscall.tbl +++ b/arch/parisc/kernel/syscalls/syscall.tbl @@ -439,3 +439,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl b/arch/powerpc/kernel/syscalls/syscall.tbl index f744eb5cba88..29a706828330 100644 --- a/arch/powerpc/kernel/syscalls/syscall.tbl +++ b/arch/powerpc/kernel/syscalls/syscall.tbl @@ -531,3 +531,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl index d443423495e5..6ed53d992736 100644 --- a/arch/s390/kernel/syscalls/syscall.tbl +++ b/arch/s390/kernel/syscalls/syscall.tbl @@ -444,3 +444,4 @@ 439 common faccessat2 sys_faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/sh/kernel/syscalls/syscall.tbl b/arch/sh/kernel/syscalls/syscall.tbl index 9df40ac0ebc0..f8488ad641b6 100644 --- a/arch/sh/kernel/syscalls/syscall.tbl +++ b/arch/sh/kernel/syscalls/syscall.tbl @@ -444,3 +444,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/sparc/kernel/syscalls/syscall.tbl b/arch/sparc/kernel/syscalls/syscall.tbl index 40d8c7cd8298..211d7269246b 100644 --- a/arch/sparc/kernel/syscalls/syscall.tbl +++ b/arch/sparc/kernel/syscalls/syscall.tbl @@ -487,3 +487,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl index 874aeacde2dd..deb7650cfc88 100644 --- a/arch/x86/entry/syscalls/syscall_32.tbl +++ b/arch/x86/entry/syscalls/syscall_32.tbl @@ -446,3 +446,4 @@ 439 i386 faccessat2 sys_faccessat2 440 i386 process_madvise sys_process_madvise 441 i386 epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl index 78672124d28b..cdbfb67852e6 100644 --- a/arch/x86/entry/syscalls/syscall_64.tbl +++ b/arch/x86/entry/syscalls/syscall_64.tbl @@ -363,6 +363,7 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path # # Due to a historical design error, certain syscalls are numbered differently diff --git a/arch/xtensa/kernel/syscalls/syscall.tbl b/arch/xtensa/kernel/syscalls/syscall.tbl index 46116a28eeed..b434eda5653a 100644 --- a/arch/xtensa/kernel/syscalls/syscall.tbl +++ b/arch/xtensa/kernel/syscalls/syscall.tbl @@ -412,3 +412,4 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise 441 common epoll_pwait2 sys_epoll_pwait2 +442 common quotactl_path sys_quotactl_path diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 7688bc983de5..2e1bf7c2165f 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -482,6 +482,8 @@ asmlinkage long sys_pipe2(int __user *fildes, int flags); /* fs/quota.c */ asmlinkage long sys_quotactl(unsigned int cmd, const char __user *special, qid_t id, void __user *addr); +asmlinkage long sys_quotactl_path(unsigned int cmd, const char __user *mountpoint, + qid_t id, void __user *addr); /* fs/readdir.c */ asmlinkage long sys_getdents64(unsigned int fd, diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 728752917785..dad876b86488 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -861,9 +861,11 @@ __SYSCALL(__NR_faccessat2, sys_faccessat2) __SYSCALL(__NR_process_madvise, sys_process_madvise) #define __NR_epoll_pwait2 441 __SC_COMP(__NR_epoll_pwait2, sys_epoll_pwait2, compat_sys_epoll_pwait2) +#define __NR_quotactl_path 442 +__SYSCALL(__NR_quotactl_path, sys_quotactl_path) #undef __NR_syscalls -#define __NR_syscalls 442 +#define __NR_syscalls 443 /* * 32 bit systems traditionally used different diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c index 19aa806890d5..d24431782414 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c @@ -99,6 +99,7 @@ COND_SYSCALL(flock); /* fs/quota.c */ COND_SYSCALL(quotactl); +COND_SYSCALL(quotactl_path); /* fs/readdir.c */ -- 2.20.1 ^ permalink raw reply related [flat|nested] 19+ messages in thread
end of thread, other threads:[~2021-03-04 17:10 UTC | newest] Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-02-11 15:30 [PATCH v2 0/2] quota: Add mountpath based quota support Sascha Hauer 2021-02-11 15:30 ` [PATCH 1/2] " Sascha Hauer 2021-02-11 15:38 ` Christoph Hellwig 2021-02-12 8:38 ` Sascha Hauer 2021-02-12 10:05 ` Jan Kara 2021-02-12 10:29 ` Sascha Hauer 2021-02-12 10:41 ` Jan Kara 2021-02-12 5:45 ` kernel test robot 2021-02-14 13:48 ` Al Viro 2021-02-11 15:30 ` [PATCH 2/2] quota: wire up quotactl_path Sascha Hauer 2021-02-11 15:38 ` Christoph Hellwig 2021-02-11 19:56 ` kernel test robot 2021-02-12 0:10 ` kernel test robot 2021-02-11 15:30 ` [PATCH] quotactl.2: Add documentation for quotactl_path() Sascha Hauer 2021-02-12 10:16 ` [PATCH v2 0/2] quota: Add mountpath based quota support Jan Kara -- strict thread matches above, loose matches on Subject: below -- 2021-03-04 12:35 [PATCH v3 " Sascha Hauer 2021-03-04 12:35 ` [PATCH 2/2] quota: wire up quotactl_path Sascha Hauer 2021-03-04 16:41 ` kernel test robot 2021-03-04 17:08 ` kernel test robot 2021-01-28 14:17 [PATCH 0/2] quota: Add mountpath based quota support Sascha Hauer 2021-01-28 14:17 ` [PATCH 2/2] quota: wire up quotactl_path Sascha Hauer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).