mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Alexey Gladkov <gladkov.alexey@gmail.com>
Cc: kbuild-all@01.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Kirill A. Shutemov" <kirill@shutemov.name>,
	Vasiliy Kulikov <segoon@openwall.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Oleg Nesterov <oleg@redhat.com>,
	Pavel Emelyanov <xemul@parallels.com>
Subject: Re: [PATCH] Add pidfs filesystem
Date: Sun, 19 Feb 2017 07:34:20 +0800	[thread overview]
Message-ID: <201702190746.fJlmOJFo%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170218225307.GA10345@comp-core-i7-2640m-0182e6.fortress>

[-- Attachment #1: Type: text/plain, Size: 8180 bytes --]

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23447 bytes --]

  reply	other threads:[~2017-02-18 23:36 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-18 22:53 Alexey Gladkov
2017-02-18 23:34 ` kbuild test robot [this message]
2017-02-18 23:34 ` kbuild test robot
2017-02-20  4:05 ` Eric W. Biederman
2017-02-20 10:36   ` Alexey Gladkov
2017-02-22 20:11   ` Richard Weinberger
2017-02-21 14:57 ` Oleg Nesterov
2017-02-22  7:40   ` Pavel Emelyanov
2017-02-22 12:04     ` Alexey Gladkov
2017-02-22 13:08       ` Pavel Emelyanov
2017-02-22 11:53   ` Alexey Gladkov
2017-02-22 15:37   ` Dmitry V. Levin
2017-02-22 17:48     ` Oleg Nesterov
2017-02-22 19:56       ` Alexey Gladkov
2017-03-06 23:05   ` [RFC] Add option to mount only a pids subset Alexey Gladkov
2017-03-07 16:24     ` Andy Lutomirski
2017-03-09 11:26       ` Djalal Harouni
2017-03-09 20:52         ` Eric W. Biederman
2017-03-11 21:51         ` Alexey Gladkov
2017-03-11  0:05       ` Alexey Gladkov
2017-03-07 17:49     ` Oleg Nesterov
2017-03-10 23:46       ` Alexey Gladkov
2017-03-12  1:54     ` Al Viro
2017-03-12  2:13       ` Al Viro
2017-03-13  3:19         ` Andy Lutomirski
2017-03-13 13:27           ` Al Viro
2017-03-13 15:24             ` Andy Lutomirski
2017-03-23 15:59               ` [PATCH] proc: allow to change proc mount options per mount Djalal Harouni
2017-03-20 12:58         ` [RFC] Add option to mount only a pids subset Alexey Gladkov
2017-03-23 16:05           ` Oleg Nesterov
2017-03-23 22:57             ` Alexey Gladkov
2017-03-23 16:06           ` Djalal Harouni
2017-03-23 22:07             ` Alexey Gladkov
2017-03-26  7:03               ` Djalal Harouni
2017-03-30 21:45                 ` Alexey Gladkov
2017-02-27 18:56 ` [PATCH] Add pidfs filesystem Michael Kerrisk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201702190746.fJlmOJFo%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=ebiederm@xmission.com \
    --cc=gladkov.alexey@gmail.com \
    --cc=kbuild-all@01.org \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=segoon@openwall.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xemul@parallels.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®