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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201702190746.fJlmOJFo%fengguang.wu@intel.com>
Date:   Sun, 19 Feb 2017 07:34:20 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Alexey Gladkov <gladkov.alexey@...il.com>
Cc:     kbuild-all@...org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Kirill A. Shutemov" <kirill@...temov.name>,
        Vasiliy Kulikov <segoon@...nwall.com>,
        Al Viro <viro@...iv.linux.org.uk>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        Oleg Nesterov <oleg@...hat.com>,
        Pavel Emelyanov <xemul@...allels.com>
Subject: Re: [PATCH] Add pidfs filesystem

Hi Alexey,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.10-rc8 next-20170217]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Alexey-Gladkov/Add-pidfs-filesystem/20170219-070129
config: x86_64-randconfig-x003-201708 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/uapi/linux/capability.h:16,
                    from include/linux/capability.h:15,
                    from include/linux/sched.h:15,
                    from include/linux/uaccess.h:4,
                    from fs/proc/root.c:9:
   fs/proc/root.c: In function 'proc_kill_sb':
   fs/proc/root.c:107:9: error: 'struct pid_namespace' has no member named 'pidfs_self'; did you mean 'proc_self'?
      if (ns->pidfs_self)
            ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> fs/proc/root.c:107:3: note: in expansion of macro 'if'
      if (ns->pidfs_self)
      ^~
   fs/proc/root.c:107:9: error: 'struct pid_namespace' has no member named 'pidfs_self'; did you mean 'proc_self'?
      if (ns->pidfs_self)
            ^
   include/linux/compiler.h:149:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> fs/proc/root.c:107:3: note: in expansion of macro 'if'
      if (ns->pidfs_self)
      ^~
   fs/proc/root.c:107:9: error: 'struct pid_namespace' has no member named 'pidfs_self'; did you mean 'proc_self'?
      if (ns->pidfs_self)
            ^
   include/linux/compiler.h:160:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> fs/proc/root.c:107:3: note: in expansion of macro 'if'
      if (ns->pidfs_self)
      ^~
   fs/proc/root.c:108:11: error: 'struct pid_namespace' has no member named 'pidfs_self'; did you mean 'proc_self'?
       dput(ns->pidfs_self);
              ^~
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/uapi/linux/capability.h:16,
                    from include/linux/capability.h:15,
                    from include/linux/sched.h:15,
                    from include/linux/uaccess.h:4,
                    from fs/proc/root.c:9:
   fs/proc/root.c:110:9: error: 'struct pid_namespace' has no member named 'pidfs_thread_self'; did you mean 'proc_thread_self'?
      if (ns->pidfs_thread_self)
            ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   fs/proc/root.c:110:3: note: in expansion of macro 'if'
      if (ns->pidfs_thread_self)
      ^~
   fs/proc/root.c:110:9: error: 'struct pid_namespace' has no member named 'pidfs_thread_self'; did you mean 'proc_thread_self'?
      if (ns->pidfs_thread_self)
            ^
   include/linux/compiler.h:149:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
   fs/proc/root.c:110:3: note: in expansion of macro 'if'
      if (ns->pidfs_thread_self)
      ^~
   fs/proc/root.c:110:9: error: 'struct pid_namespace' has no member named 'pidfs_thread_self'; did you mean 'proc_thread_self'?
      if (ns->pidfs_thread_self)
            ^
   include/linux/compiler.h:160:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
   fs/proc/root.c:110:3: note: in expansion of macro 'if'
      if (ns->pidfs_thread_self)
      ^~
   fs/proc/root.c:111:11: error: 'struct pid_namespace' has no member named 'pidfs_thread_self'; did you mean 'proc_thread_self'?
       dput(ns->pidfs_thread_self);
              ^~
   fs/proc/root.c: In function 'pid_ns_prepare_proc':
   fs/proc/root.c:282:5: error: 'struct pid_namespace' has no member named 'pidfs_mnt'; did you mean 'proc_mnt'?
      ns->pidfs_mnt = mnt;
        ^~
   fs/proc/root.c: In function 'pid_ns_release_proc':
   fs/proc/root.c:292:18: error: 'struct pid_namespace' has no member named 'pidfs_mnt'; did you mean 'proc_mnt'?
      kern_unmount(ns->pidfs_mnt);
                     ^~

vim +/if +107 fs/proc/root.c

     3	 *
     4	 *  Copyright (C) 1991, 1992 Linus Torvalds
     5	 *
     6	 *  proc root directory handling functions
     7	 */
     8	
   > 9	#include <linux/uaccess.h>
    10	
    11	#include <linux/errno.h>
    12	#include <linux/time.h>
    13	#include <linux/proc_fs.h>
    14	#include <linux/stat.h>
    15	#include <linux/init.h>
    16	#include <linux/sched.h>
    17	#include <linux/module.h>
    18	#include <linux/bitops.h>
    19	#include <linux/user_namespace.h>
    20	#include <linux/mount.h>
    21	#include <linux/pid_namespace.h>
    22	#include <linux/parser.h>
    23	
    24	#include "internal.h"
    25	
    26	enum {
    27		Opt_gid, Opt_hidepid, Opt_err,
    28	};
    29	
    30	static const match_table_t tokens = {
    31		{Opt_hidepid, "hidepid=%u"},
    32		{Opt_gid, "gid=%u"},
    33		{Opt_err, NULL},
    34	};
    35	
    36	int proc_parse_options(char *options, struct pid_namespace *pid)
    37	{
    38		char *p;
    39		substring_t args[MAX_OPT_ARGS];
    40		int option;
    41	
    42		if (!options)
    43			return 1;
    44	
    45		while ((p = strsep(&options, ",")) != NULL) {
    46			int token;
    47			if (!*p)
    48				continue;
    49	
    50			args[0].to = args[0].from = NULL;
    51			token = match_token(p, tokens, args);
    52			switch (token) {
    53			case Opt_gid:
    54				if (match_int(&args[0], &option))
    55					return 0;
    56				pid->pid_gid = make_kgid(current_user_ns(), option);
    57				break;
    58			case Opt_hidepid:
    59				if (match_int(&args[0], &option))
    60					return 0;
    61				if (option < 0 || option > 2) {
    62					pr_err("proc: hidepid value must be between 0 and 2.\n");
    63					return 0;
    64				}
    65				pid->hide_pid = option;
    66				break;
    67			default:
    68				pr_err("proc: unrecognized mount option \"%s\" "
    69				       "or missing value\n", p);
    70				return 0;
    71			}
    72		}
    73	
    74		return 1;
    75	}
    76	
    77	int proc_remount(struct super_block *sb, int *flags, char *data)
    78	{
    79		struct pid_namespace *pid = sb->s_fs_info;
    80	
    81		sync_filesystem(sb);
    82		return !proc_parse_options(data, pid);
    83	}
    84	
    85	static struct dentry *proc_mount(struct file_system_type *fs_type,
    86		int flags, const char *dev_name, void *data)
    87	{
    88		struct pid_namespace *ns;
    89	
    90		if (flags & MS_KERNMOUNT) {
    91			ns = data;
    92			data = NULL;
    93		} else {
    94			ns = task_active_pid_ns(current);
    95		}
    96	
    97		return mount_ns(fs_type, flags, data, ns, ns->user_ns, proc_fill_super);
    98	}
    99	
   100	static void proc_kill_sb(struct super_block *sb)
   101	{
   102		struct pid_namespace *ns;
   103	
   104		ns = (struct pid_namespace *)sb->s_fs_info;
   105	
   106		if (IS_ENABLED(CONFIG_PROC_PIDFS) && sb->s_type == &pidfs_fs_type) {
 > 107			if (ns->pidfs_self)
   108				dput(ns->pidfs_self);
   109	
   110			if (ns->pidfs_thread_self)

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ