Hi David, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.16-rc1 next-20211117] [cannot apply to mszeredi-vfs/overlayfs-next tytso-ext4/dev jmorris-security/next-testing] [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/David-Anderson/overlayfs-override_creds-off-nested-get-xattr-fix/20211117-100030 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 8ab774587903771821b59471cc723bba6d893942 config: arm-randconfig-c002-20211116 (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/73277167dc9cad1e636a76e9f993d8f30b289d02 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review David-Anderson/overlayfs-override_creds-off-nested-get-xattr-fix/20211117-100030 git checkout 73277167dc9cad1e636a76e9f993d8f30b289d02 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from fs/open.c:19: include/linux/security.h: In function 'security_inode_need_killpriv': >> include/linux/security.h:901:40: error: passing argument 1 of 'cap_inode_need_killpriv' from incompatible pointer type [-Werror=incompatible-pointer-types] 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~ | | | struct dentry * include/linux/security.h:153:52: note: expected 'struct user_namespace *' but argument is of type 'struct dentry *' 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ >> include/linux/security.h:901:16: error: too few arguments to function 'cap_inode_need_killpriv' 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/security.h:153:5: note: declared here 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ^~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors -- In file included from include/linux/fs_context.h:14, from include/linux/pseudo_fs.h:4, from fs/pipe.c:17: include/linux/security.h: In function 'security_inode_need_killpriv': >> include/linux/security.h:901:40: error: passing argument 1 of 'cap_inode_need_killpriv' from incompatible pointer type [-Werror=incompatible-pointer-types] 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~ | | | struct dentry * include/linux/security.h:153:52: note: expected 'struct user_namespace *' but argument is of type 'struct dentry *' 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ >> include/linux/security.h:901:16: error: too few arguments to function 'cap_inode_need_killpriv' 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/security.h:153:5: note: declared here 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ^~~~~~~~~~~~~~~~~~~~~~~ fs/pipe.c: At top level: fs/pipe.c:755:15: warning: no previous prototype for 'account_pipe_buffers' [-Wmissing-prototypes] 755 | unsigned long account_pipe_buffers(struct user_struct *user, | ^~~~~~~~~~~~~~~~~~~~ fs/pipe.c:761:6: warning: no previous prototype for 'too_many_pipe_buffers_soft' [-Wmissing-prototypes] 761 | bool too_many_pipe_buffers_soft(unsigned long user_bufs) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ fs/pipe.c:768:6: warning: no previous prototype for 'too_many_pipe_buffers_hard' [-Wmissing-prototypes] 768 | bool too_many_pipe_buffers_hard(unsigned long user_bufs) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ fs/pipe.c:775:6: warning: no previous prototype for 'pipe_is_unprivileged_user' [-Wmissing-prototypes] 775 | bool pipe_is_unprivileged_user(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~ fs/pipe.c:1245:5: warning: no previous prototype for 'pipe_resize_ring' [-Wmissing-prototypes] 1245 | int pipe_resize_ring(struct pipe_inode_info *pipe, unsigned int nr_slots) | ^~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors -- In file included from fs/inode.c:12: include/linux/security.h: In function 'security_inode_need_killpriv': >> include/linux/security.h:901:40: error: passing argument 1 of 'cap_inode_need_killpriv' from incompatible pointer type [-Werror=incompatible-pointer-types] 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~ | | | struct dentry * include/linux/security.h:153:52: note: expected 'struct user_namespace *' but argument is of type 'struct dentry *' 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ >> include/linux/security.h:901:16: error: too few arguments to function 'cap_inode_need_killpriv' 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/security.h:153:5: note: declared here 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ^~~~~~~~~~~~~~~~~~~~~~~ fs/inode.c: In function 'dentry_needs_remove_privs': >> fs/inode.c:1921:44: error: passing argument 1 of 'security_inode_need_killpriv' from incompatible pointer type [-Werror=incompatible-pointer-types] 1921 | ret = security_inode_need_killpriv(mnt_userns, dentry); | ^~~~~~~~~~ | | | struct user_namespace * In file included from fs/inode.c:12: include/linux/security.h:899:63: note: expected 'struct dentry *' but argument is of type 'struct user_namespace *' 899 | static inline int security_inode_need_killpriv(struct dentry *dentry) | ~~~~~~~~~~~~~~~^~~~~~ >> fs/inode.c:1921:15: error: too many arguments to function 'security_inode_need_killpriv' 1921 | ret = security_inode_need_killpriv(mnt_userns, dentry); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from fs/inode.c:12: include/linux/security.h:899:19: note: declared here 899 | static inline int security_inode_need_killpriv(struct dentry *dentry) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/security.h: In function 'security_inode_need_killpriv': include/linux/security.h:902:1: error: control reaches end of non-void function [-Werror=return-type] 902 | } | ^ cc1: some warnings being treated as errors -- In file included from fs/attr.c:17: include/linux/security.h: In function 'security_inode_need_killpriv': >> include/linux/security.h:901:40: error: passing argument 1 of 'cap_inode_need_killpriv' from incompatible pointer type [-Werror=incompatible-pointer-types] 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~ | | | struct dentry * include/linux/security.h:153:52: note: expected 'struct user_namespace *' but argument is of type 'struct dentry *' 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ >> include/linux/security.h:901:16: error: too few arguments to function 'cap_inode_need_killpriv' 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/security.h:153:5: note: declared here 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ^~~~~~~~~~~~~~~~~~~~~~~ fs/attr.c: In function 'notify_change': >> fs/attr.c:345:54: error: passing argument 1 of 'security_inode_need_killpriv' from incompatible pointer type [-Werror=incompatible-pointer-types] 345 | error = security_inode_need_killpriv(mnt_userns, dentry); | ^~~~~~~~~~ | | | struct user_namespace * In file included from fs/attr.c:17: include/linux/security.h:899:63: note: expected 'struct dentry *' but argument is of type 'struct user_namespace *' 899 | static inline int security_inode_need_killpriv(struct dentry *dentry) | ~~~~~~~~~~~~~~~^~~~~~ >> fs/attr.c:345:25: error: too many arguments to function 'security_inode_need_killpriv' 345 | error = security_inode_need_killpriv(mnt_userns, dentry); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from fs/attr.c:17: include/linux/security.h:899:19: note: declared here 899 | static inline int security_inode_need_killpriv(struct dentry *dentry) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/security.h: In function 'security_inode_need_killpriv': include/linux/security.h:902:1: error: control reaches end of non-void function [-Werror=return-type] 902 | } | ^ cc1: some warnings being treated as errors -- In file included from include/linux/perf_event.h:59, from include/linux/trace_events.h:10, from include/trace/syscall.h:7, from include/linux/syscalls.h:88, from fs/d_path.c:2: include/linux/security.h: In function 'security_inode_need_killpriv': >> include/linux/security.h:901:40: error: passing argument 1 of 'cap_inode_need_killpriv' from incompatible pointer type [-Werror=incompatible-pointer-types] 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~ | | | struct dentry * include/linux/security.h:153:52: note: expected 'struct user_namespace *' but argument is of type 'struct dentry *' 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ >> include/linux/security.h:901:16: error: too few arguments to function 'cap_inode_need_killpriv' 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/security.h:153:5: note: declared here 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ^~~~~~~~~~~~~~~~~~~~~~~ fs/d_path.c: At top level: fs/d_path.c:318:7: warning: no previous prototype for 'simple_dname' [-Wmissing-prototypes] 318 | char *simple_dname(struct dentry *dentry, char *buffer, int buflen) | ^~~~~~~~~~~~ cc1: some warnings being treated as errors -- In file included from kernel/trace/trace.c:20: include/linux/security.h: In function 'security_inode_need_killpriv': >> include/linux/security.h:901:40: error: passing argument 1 of 'cap_inode_need_killpriv' from incompatible pointer type [-Werror=incompatible-pointer-types] 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~ | | | struct dentry * include/linux/security.h:153:52: note: expected 'struct user_namespace *' but argument is of type 'struct dentry *' 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ >> include/linux/security.h:901:16: error: too few arguments to function 'cap_inode_need_killpriv' 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/security.h:153:5: note: declared here 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ^~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/trace.c: In function 'trace_check_vprintf': kernel/trace/trace.c:3813:17: warning: function 'trace_check_vprintf' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 3813 | trace_seq_vprintf(&iter->seq, iter->fmt, ap); | ^~~~~~~~~~~~~~~~~ kernel/trace/trace.c:3868:17: warning: function 'trace_check_vprintf' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 3868 | trace_seq_vprintf(&iter->seq, p, ap); | ^~~~~~~~~~~~~~~~~ At top level: kernel/trace/trace.c:1668:37: warning: 'tracing_max_lat_fops' defined but not used [-Wunused-const-variable=] 1668 | static const struct file_operations tracing_max_lat_fops; | ^~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors -- In file included from include/linux/perf_event.h:59, from include/linux/hw_breakpoint.h:5, from kernel/trace/trace.h:15, from kernel/trace/trace_output.h:6, from kernel/trace/trace_output.c:15: include/linux/security.h: In function 'security_inode_need_killpriv': >> include/linux/security.h:901:40: error: passing argument 1 of 'cap_inode_need_killpriv' from incompatible pointer type [-Werror=incompatible-pointer-types] 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~ | | | struct dentry * include/linux/security.h:153:52: note: expected 'struct user_namespace *' but argument is of type 'struct dentry *' 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ >> include/linux/security.h:901:16: error: too few arguments to function 'cap_inode_need_killpriv' 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/security.h:153:5: note: declared here 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ^~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/trace_output.c: In function 'trace_output_raw': kernel/trace/trace_output.c:332:9: warning: function 'trace_output_raw' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 332 | trace_seq_vprintf(s, trace_event_format(iter, fmt), ap); | ^~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors -- In file included from include/linux/perf_event.h:59, from include/linux/hw_breakpoint.h:5, from kernel/trace/trace.h:15, from kernel/trace/trace_preemptirq.c:13: include/linux/security.h: In function 'security_inode_need_killpriv': >> include/linux/security.h:901:40: error: passing argument 1 of 'cap_inode_need_killpriv' from incompatible pointer type [-Werror=incompatible-pointer-types] 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~ | | | struct dentry * include/linux/security.h:153:52: note: expected 'struct user_namespace *' but argument is of type 'struct dentry *' 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ >> include/linux/security.h:901:16: error: too few arguments to function 'cap_inode_need_killpriv' 901 | return cap_inode_need_killpriv(dentry); | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/security.h:153:5: note: declared here 153 | int cap_inode_need_killpriv(struct user_namespace *mnt_userns, | ^~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/trace_preemptirq.c: At top level: kernel/trace/trace_preemptirq.c:88:16: warning: no previous prototype for 'trace_hardirqs_on_caller' [-Wmissing-prototypes] 88 | __visible void trace_hardirqs_on_caller(unsigned long caller_addr) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/trace/trace_preemptirq.c:103:16: warning: no previous prototype for 'trace_hardirqs_off_caller' [-Wmissing-prototypes] 103 | __visible void trace_hardirqs_off_caller(unsigned long caller_addr) | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/cap_inode_need_killpriv +901 include/linux/security.h ^1da177e4c3f415 Linus Torvalds 2005-04-16 898 b53767719b6cd87 Serge E. Hallyn 2007-10-16 899 static inline int security_inode_need_killpriv(struct dentry *dentry) b53767719b6cd87 Serge E. Hallyn 2007-10-16 900 { b53767719b6cd87 Serge E. Hallyn 2007-10-16 @901 return cap_inode_need_killpriv(dentry); b53767719b6cd87 Serge E. Hallyn 2007-10-16 902 } b53767719b6cd87 Serge E. Hallyn 2007-10-16 903 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org