All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 4/6] fs: implement fsconfig via configfd
Date: Sun, 12 Jan 2020 03:58:52 +0800	[thread overview]
Message-ID: <202001120308.0Y6AXzgU%lkp@intel.com> (raw)
In-Reply-To: <20200104201432.27320-5-James.Bottomley@HansenPartnership.com>

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

Hi James,

I love your patch! Perhaps something to improve:

[auto build test WARNING on s390/features]
[also build test WARNING on linus/master v5.5-rc5]
[cannot apply to arm64/for-next/core tip/x86/asm arm/for-next ia64/next m68k/for-next hp-parisc/for-next powerpc/next sparc-next/master next-20200110]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/James-Bottomley/introduce-configfd-as-generalisation-of-fsconfig/20200105-080415
base:   https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-129-g341daf20-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> fs/fsopen.c:116:31: sparse: sparse: incorrect type in argument 1 (different address spaces)
>> fs/fsopen.c:116:31: sparse:    expected char const *
>> fs/fsopen.c:116:31: sparse:    got char const [noderef] <asn:1> *path

vim +116 fs/fsopen.c

    78	
    79	/*
    80	 * Pick a superblock into a context for reconfiguration.
    81	 */
    82	SYSCALL_DEFINE3(fspick, int, dfd, const char __user *, path, unsigned int, flags)
    83	{
    84		struct path *target;
    85		unsigned int lookup_flags;
    86		int ret;
    87		int fd;
    88		struct configfd_param cp;
    89		struct open_flags of;
    90		struct filename *name;
    91		struct file *file;
    92	
    93		if (!ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN))
    94			return -EPERM;
    95	
    96		if ((flags & ~(FSPICK_CLOEXEC |
    97			       FSPICK_SYMLINK_NOFOLLOW |
    98			       FSPICK_NO_AUTOMOUNT |
    99			       FSPICK_EMPTY_PATH)) != 0)
   100			return -EINVAL;
   101	
   102		lookup_flags = LOOKUP_FOLLOW | LOOKUP_AUTOMOUNT;
   103		if (flags & FSPICK_SYMLINK_NOFOLLOW)
   104			lookup_flags &= ~LOOKUP_FOLLOW;
   105		if (flags & FSPICK_NO_AUTOMOUNT)
   106			lookup_flags &= ~LOOKUP_AUTOMOUNT;
   107		if (flags & FSPICK_EMPTY_PATH)
   108			lookup_flags |= LOOKUP_EMPTY;
   109	
   110		of.lookup_flags = lookup_flags;
   111		of.intent = LOOKUP_OPEN;
   112		of.acc_mode = 0;
   113		of.mode = 0;
   114		of.open_flag = O_PATH;
   115	
 > 116		name = getname_kernel(path);
   117		if (IS_ERR(name))
   118			return PTR_ERR(name);
   119	
   120		file = do_filp_open(dfd, name, &of);
   121		putname(name);
   122		if (IS_ERR(file))
   123			return PTR_ERR(file);
   124	
   125		target = &file->f_path;
   126		ret = -EINVAL;
   127		if (target->mnt->mnt_root != target->dentry)
   128			goto err_file;
   129	
   130		ret = fd = kern_configfd_open("mount",
   131					      flags & FSPICK_CLOEXEC ? O_CLOEXEC : 0,
   132					      CONFIGFD_CMD_RECONFIGURE);
   133		if (ret < 0)
   134			goto err_file;
   135		cp = (struct configfd_param) {
   136			.key = "pathfd",
   137			.file = file,
   138			.cmd = CONFIGFD_SET_FD,
   139		};
   140		ret = kern_configfd_action(fd, &cp);
   141		/* file gets NULL'd if successfully installed otherwise we put */
   142		if (cp.file)
   143			fput(file);
   144		if (ret < 0)
   145			goto err_close;
   146		return fd;
   147	
   148	 err_close:
   149		ksys_close(fd);
   150	 err_file:
   151		fput(file);
   152		return ret;
   153	}
   154	

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

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: kbuild-all@lists.01.org, linux-fsdevel@vger.kernel.org,
	David Howells <dhowells@redhat.com>,
	Christian Brauner <christian@brauner.io>,
	Al Viro <viro@ZenIV.linux.org.uk>,
	Miklos Szeredi <miklos@szeredi.hu>
Subject: Re: [PATCH v2 4/6] fs: implement fsconfig via configfd
Date: Sun, 12 Jan 2020 03:58:52 +0800	[thread overview]
Message-ID: <202001120308.0Y6AXzgU%lkp@intel.com> (raw)
In-Reply-To: <20200104201432.27320-5-James.Bottomley@HansenPartnership.com>

Hi James,

I love your patch! Perhaps something to improve:

[auto build test WARNING on s390/features]
[also build test WARNING on linus/master v5.5-rc5]
[cannot apply to arm64/for-next/core tip/x86/asm arm/for-next ia64/next m68k/for-next hp-parisc/for-next powerpc/next sparc-next/master next-20200110]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/James-Bottomley/introduce-configfd-as-generalisation-of-fsconfig/20200105-080415
base:   https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-129-g341daf20-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> fs/fsopen.c:116:31: sparse: sparse: incorrect type in argument 1 (different address spaces)
>> fs/fsopen.c:116:31: sparse:    expected char const *
>> fs/fsopen.c:116:31: sparse:    got char const [noderef] <asn:1> *path

vim +116 fs/fsopen.c

    78	
    79	/*
    80	 * Pick a superblock into a context for reconfiguration.
    81	 */
    82	SYSCALL_DEFINE3(fspick, int, dfd, const char __user *, path, unsigned int, flags)
    83	{
    84		struct path *target;
    85		unsigned int lookup_flags;
    86		int ret;
    87		int fd;
    88		struct configfd_param cp;
    89		struct open_flags of;
    90		struct filename *name;
    91		struct file *file;
    92	
    93		if (!ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN))
    94			return -EPERM;
    95	
    96		if ((flags & ~(FSPICK_CLOEXEC |
    97			       FSPICK_SYMLINK_NOFOLLOW |
    98			       FSPICK_NO_AUTOMOUNT |
    99			       FSPICK_EMPTY_PATH)) != 0)
   100			return -EINVAL;
   101	
   102		lookup_flags = LOOKUP_FOLLOW | LOOKUP_AUTOMOUNT;
   103		if (flags & FSPICK_SYMLINK_NOFOLLOW)
   104			lookup_flags &= ~LOOKUP_FOLLOW;
   105		if (flags & FSPICK_NO_AUTOMOUNT)
   106			lookup_flags &= ~LOOKUP_AUTOMOUNT;
   107		if (flags & FSPICK_EMPTY_PATH)
   108			lookup_flags |= LOOKUP_EMPTY;
   109	
   110		of.lookup_flags = lookup_flags;
   111		of.intent = LOOKUP_OPEN;
   112		of.acc_mode = 0;
   113		of.mode = 0;
   114		of.open_flag = O_PATH;
   115	
 > 116		name = getname_kernel(path);
   117		if (IS_ERR(name))
   118			return PTR_ERR(name);
   119	
   120		file = do_filp_open(dfd, name, &of);
   121		putname(name);
   122		if (IS_ERR(file))
   123			return PTR_ERR(file);
   124	
   125		target = &file->f_path;
   126		ret = -EINVAL;
   127		if (target->mnt->mnt_root != target->dentry)
   128			goto err_file;
   129	
   130		ret = fd = kern_configfd_open("mount",
   131					      flags & FSPICK_CLOEXEC ? O_CLOEXEC : 0,
   132					      CONFIGFD_CMD_RECONFIGURE);
   133		if (ret < 0)
   134			goto err_file;
   135		cp = (struct configfd_param) {
   136			.key = "pathfd",
   137			.file = file,
   138			.cmd = CONFIGFD_SET_FD,
   139		};
   140		ret = kern_configfd_action(fd, &cp);
   141		/* file gets NULL'd if successfully installed otherwise we put */
   142		if (cp.file)
   143			fput(file);
   144		if (ret < 0)
   145			goto err_close;
   146		return fd;
   147	
   148	 err_close:
   149		ksys_close(fd);
   150	 err_file:
   151		fput(file);
   152		return ret;
   153	}
   154	

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

  parent reply	other threads:[~2020-01-11 19:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-04 20:14 [PATCH v2 0/6] introduce configfd as generalisation of fsconfig James Bottomley
2020-01-04 20:14 ` [PATCH v2 1/6] logger: add a limited buffer logging facility James Bottomley
2020-01-04 20:14 ` [PATCH v2 2/6] configfd: add generic file descriptor based configuration parser James Bottomley
2020-01-06  3:58   ` kbuild test robot
2020-01-06  3:58     ` kbuild test robot
2020-01-06  3:58   ` [RFC PATCH] configfd: configfd_context_fops can be static kbuild test robot
2020-01-06  3:58     ` kbuild test robot
2020-01-04 20:14 ` [PATCH v2 3/6] configfd: syscall: wire up configfd syscalls James Bottomley
2020-01-04 20:14 ` [PATCH v2 4/6] fs: implement fsconfig via configfd James Bottomley
2020-01-05  1:12   ` kbuild test robot
2020-01-05  1:12     ` kbuild test robot
2020-01-05  2:56   ` kbuild test robot
2020-01-05  2:56     ` kbuild test robot
2020-01-11 19:58   ` kbuild test robot [this message]
2020-01-11 19:58     ` kbuild test robot
2020-01-04 20:14 ` [PATCH v2 5/6] fs: expose internal interfaces open_detached_copy and do_reconfigure_mount James Bottomley
2020-01-04 20:14 ` [PATCH v2 6/6] fs: bind: add configfs type for bind mounts James Bottomley
2020-01-12 10:35   ` kbuild test robot
2020-01-12 10:35     ` kbuild test robot
2020-01-12 10:35   ` [RFC PATCH] fs: bind: to_bind_data() can be static kbuild test robot
2020-01-12 10:35     ` kbuild test robot
2020-01-05 16:23 ` [PATCH v2 0/6] introduce configfd as generalisation of fsconfig Christian Brauner
2020-01-05 17:51   ` James Bottomley
2020-01-05 18:02   ` James Bottomley
2020-01-08 17:07     ` Christian Brauner
2020-01-08 18:42       ` James Bottomley

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=202001120308.0Y6AXzgU%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.