lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202108142340.phk6ixfR-lkp@intel.com>
Date:   Sat, 14 Aug 2021 23:31:53 +0800
From:   kernel test robot <lkp@...el.com>
To:     Luis Chamberlain <mcgrof@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [mcgrof-next:20210813-sysfs-fixes-v8 7/10]
 include/linux/uidgid.h:30:35: error: incompatible type for argument 4 of
 '__kernfs_create_file'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20210813-sysfs-fixes-v8
head:   f5b8aadeca76656caad8bccc795bfe7b0730230a
commit: da898d13309d7b2855a74ee4e49e0fb43a55a2f1 [7/10] sysfs: fix deadlock race with module removal
config: i386-randconfig-c001-20210812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/commit/?id=da898d13309d7b2855a74ee4e49e0fb43a55a2f1
        git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
        git fetch --no-tags mcgrof-next 20210813-sysfs-fixes-v8
        git checkout da898d13309d7b2855a74ee4e49e0fb43a55a2f1
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/ipc.h:6,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   arch/x86/kernel/cpu/resctrl/rdtgroup.c: In function 'rdtgroup_add_file':
>> include/linux/uidgid.h:30:35: error: incompatible type for argument 4 of '__kernfs_create_file'
      30 | #define KUIDT_INIT(value) (kuid_t){ value }
         |                                   ^~~~~~~~~
         |                                   |
         |                                   kuid_t {aka struct <anonymous>}
   include/linux/uidgid.h:55:25: note: in expansion of macro 'KUIDT_INIT'
      55 | #define GLOBAL_ROOT_UID KUIDT_INIT(0)
         |                         ^~~~~~~~~~
   arch/x86/kernel/cpu/resctrl/rdtgroup.c:211:7: note: in expansion of macro 'GLOBAL_ROOT_UID'
     211 |       GLOBAL_ROOT_UID, GLOBAL_ROOT_GID,
         |       ^~~~~~~~~~~~~~~
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: expected 'struct module *' but argument is of type 'kuid_t' {aka 'struct <anonymous>'}
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/ipc.h:6,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/uidgid.h:31:35: error: incompatible type for argument 5 of '__kernfs_create_file'
      31 | #define KGIDT_INIT(value) (kgid_t){ value }
         |                                   ^~~~~~~~~
         |                                   |
         |                                   kgid_t {aka struct <anonymous>}
   include/linux/uidgid.h:56:25: note: in expansion of macro 'KGIDT_INIT'
      56 | #define GLOBAL_ROOT_GID KGIDT_INIT(0)
         |                         ^~~~~~~~~~
   arch/x86/kernel/cpu/resctrl/rdtgroup.c:211:24: note: in expansion of macro 'GLOBAL_ROOT_GID'
     211 |       GLOBAL_ROOT_UID, GLOBAL_ROOT_GID,
         |                        ^~~~~~~~~~~~~~~
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: expected 'kuid_t' {aka 'struct <anonymous>'} but argument is of type 'kgid_t' {aka 'struct <anonymous>'}
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/cpu/resctrl/rdtgroup.c:212:7: error: incompatible type for argument 6 of '__kernfs_create_file'
     212 |       0, rft->kf_ops, rft, NULL, NULL);
         |       ^
         |       |
         |       int
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: expected 'kgid_t' {aka 'struct <anonymous>'} but argument is of type 'int'
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/resctrl/rdtgroup.c:212:13: warning: passing argument 7 of '__kernfs_create_file' makes integer from pointer without a cast [-Wint-conversion]
     212 |       0, rft->kf_ops, rft, NULL, NULL);
         |          ~~~^~~~~~~~
         |             |
         |             const struct kernfs_ops *
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: expected 'loff_t' {aka 'long long int'} but argument is of type 'const struct kernfs_ops *'
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/cpu/resctrl/rdtgroup.c:212:23: error: passing argument 8 of '__kernfs_create_file' from incompatible pointer type [-Werror=incompatible-pointer-types]
     212 |       0, rft->kf_ops, rft, NULL, NULL);
         |                       ^~~
         |                       |
         |                       struct rftype *
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: expected 'const struct kernfs_ops *' but argument is of type 'struct rftype *'
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/cpu/resctrl/rdtgroup.c:210:7: error: too few arguments to function '__kernfs_create_file'
     210 |  kn = __kernfs_create_file(parent_kn, rft->name, rft->mode,
         |       ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: declared here
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/ipc.h:6,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   arch/x86/kernel/cpu/resctrl/rdtgroup.c: In function 'mon_addfile':
>> include/linux/uidgid.h:30:35: error: incompatible type for argument 4 of '__kernfs_create_file'
      30 | #define KUIDT_INIT(value) (kuid_t){ value }
         |                                   ^~~~~~~~~
         |                                   |
         |                                   kuid_t {aka struct <anonymous>}
   include/linux/uidgid.h:55:25: note: in expansion of macro 'KUIDT_INIT'
      55 | #define GLOBAL_ROOT_UID KUIDT_INIT(0)
         |                         ^~~~~~~~~~
   arch/x86/kernel/cpu/resctrl/rdtgroup.c:2484:7: note: in expansion of macro 'GLOBAL_ROOT_UID'
    2484 |       GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, 0,
         |       ^~~~~~~~~~~~~~~
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: expected 'struct module *' but argument is of type 'kuid_t' {aka 'struct <anonymous>'}
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/ipc.h:6,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/uidgid.h:31:35: error: incompatible type for argument 5 of '__kernfs_create_file'
      31 | #define KGIDT_INIT(value) (kgid_t){ value }
         |                                   ^~~~~~~~~
         |                                   |
         |                                   kgid_t {aka struct <anonymous>}
   include/linux/uidgid.h:56:25: note: in expansion of macro 'KGIDT_INIT'
      56 | #define GLOBAL_ROOT_GID KGIDT_INIT(0)
         |                         ^~~~~~~~~~
   arch/x86/kernel/cpu/resctrl/rdtgroup.c:2484:24: note: in expansion of macro 'GLOBAL_ROOT_GID'
    2484 |       GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, 0,
         |                        ^~~~~~~~~~~~~~~
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: expected 'kuid_t' {aka 'struct <anonymous>'} but argument is of type 'kgid_t' {aka 'struct <anonymous>'}
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/resctrl/rdtgroup.c:2484:41: error: incompatible type for argument 6 of '__kernfs_create_file'
    2484 |       GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, 0,
         |                                         ^
         |                                         |
         |                                         int
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: expected 'kgid_t' {aka 'struct <anonymous>'} but argument is of type 'int'
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/resctrl/rdtgroup.c:2485:7: warning: passing argument 7 of '__kernfs_create_file' makes integer from pointer without a cast [-Wint-conversion]
    2485 |       &kf_mondata_ops, priv, NULL, NULL);
         |       ^~~~~~~~~~~~~~~
         |       |
         |       const struct kernfs_ops *
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: expected 'loff_t' {aka 'long long int'} but argument is of type 'const struct kernfs_ops *'
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/resctrl/rdtgroup.c:2483:7: error: too few arguments to function '__kernfs_create_file'
    2483 |  kn = __kernfs_create_file(parent_kn, name, 0444,
         |       ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: declared here
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~


vim +/__kernfs_create_file +30 include/linux/uidgid.h

7a4e7408c5cadb Eric W. Biederman 2011-11-14  29  
7a4e7408c5cadb Eric W. Biederman 2011-11-14 @30  #define KUIDT_INIT(value) (kuid_t){ value }
7a4e7408c5cadb Eric W. Biederman 2011-11-14  31  #define KGIDT_INIT(value) (kgid_t){ value }
7a4e7408c5cadb Eric W. Biederman 2011-11-14  32  

:::::: The code at line 30 was first introduced by commit
:::::: 7a4e7408c5cadb240e068a662251754a562355e3 userns: Add kuid_t and kgid_t and associated infrastructure in uidgid.h

:::::: TO: Eric W. Biederman <ebiederm@...ssion.com>
:::::: CC: Eric W. Biederman <ebiederm@...ssion.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (32478 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ