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: [RFC PATCH v1] pin_on_cpu: Introduce thread CPU pinning system call
Date: Fri, 24 Jan 2020 20:25:22 +0800	[thread overview]
Message-ID: <202001242011.3jDI68CI%lkp@intel.com> (raw)
In-Reply-To: <20200121160312.26545-1-mathieu.desnoyers@efficios.com>

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

Hi Mathieu,

[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on tip/x86/asm]
[also build test ERROR on asm-generic/master linus/master v5.5-rc7]
[cannot apply to tip/sched/core next-20200123]
[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/Mathieu-Desnoyers/pin_on_cpu-Introduce-thread-CPU-pinning-system-call/20200124-092039
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 183ef7adf4ed638ac0fb0c3c9a71fc00e8512b61
config: m68k-defconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=m68k 

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

All errors (new ones prefixed by >>):

   fs/exec.c: In function '__do_execve_file':
>> fs/exec.c:1829:9: error: 'struct task_struct' has no member named 'pinned_cpu'
     current->pinned_cpu = -1;
            ^~

vim +1829 fs/exec.c

  1711	
  1712	/*
  1713	 * sys_execve() executes a new program.
  1714	 */
  1715	static int __do_execve_file(int fd, struct filename *filename,
  1716				    struct user_arg_ptr argv,
  1717				    struct user_arg_ptr envp,
  1718				    int flags, struct file *file)
  1719	{
  1720		char *pathbuf = NULL;
  1721		struct linux_binprm *bprm;
  1722		struct files_struct *displaced;
  1723		int retval;
  1724	
  1725		if (IS_ERR(filename))
  1726			return PTR_ERR(filename);
  1727	
  1728		/*
  1729		 * We move the actual failure in case of RLIMIT_NPROC excess from
  1730		 * set*uid() to execve() because too many poorly written programs
  1731		 * don't check setuid() return code.  Here we additionally recheck
  1732		 * whether NPROC limit is still exceeded.
  1733		 */
  1734		if ((current->flags & PF_NPROC_EXCEEDED) &&
  1735		    atomic_read(&current_user()->processes) > rlimit(RLIMIT_NPROC)) {
  1736			retval = -EAGAIN;
  1737			goto out_ret;
  1738		}
  1739	
  1740		/* We're below the limit (still or again), so we don't want to make
  1741		 * further execve() calls fail. */
  1742		current->flags &= ~PF_NPROC_EXCEEDED;
  1743	
  1744		retval = unshare_files(&displaced);
  1745		if (retval)
  1746			goto out_ret;
  1747	
  1748		retval = -ENOMEM;
  1749		bprm = kzalloc(sizeof(*bprm), GFP_KERNEL);
  1750		if (!bprm)
  1751			goto out_files;
  1752	
  1753		retval = prepare_bprm_creds(bprm);
  1754		if (retval)
  1755			goto out_free;
  1756	
  1757		check_unsafe_exec(bprm);
  1758		current->in_execve = 1;
  1759	
  1760		if (!file)
  1761			file = do_open_execat(fd, filename, flags);
  1762		retval = PTR_ERR(file);
  1763		if (IS_ERR(file))
  1764			goto out_unmark;
  1765	
  1766		sched_exec();
  1767	
  1768		bprm->file = file;
  1769		if (!filename) {
  1770			bprm->filename = "none";
  1771		} else if (fd == AT_FDCWD || filename->name[0] == '/') {
  1772			bprm->filename = filename->name;
  1773		} else {
  1774			if (filename->name[0] == '\0')
  1775				pathbuf = kasprintf(GFP_KERNEL, "/dev/fd/%d", fd);
  1776			else
  1777				pathbuf = kasprintf(GFP_KERNEL, "/dev/fd/%d/%s",
  1778						    fd, filename->name);
  1779			if (!pathbuf) {
  1780				retval = -ENOMEM;
  1781				goto out_unmark;
  1782			}
  1783			/*
  1784			 * Record that a name derived from an O_CLOEXEC fd will be
  1785			 * inaccessible after exec. Relies on having exclusive access to
  1786			 * current->files (due to unshare_files above).
  1787			 */
  1788			if (close_on_exec(fd, rcu_dereference_raw(current->files->fdt)))
  1789				bprm->interp_flags |= BINPRM_FLAGS_PATH_INACCESSIBLE;
  1790			bprm->filename = pathbuf;
  1791		}
  1792		bprm->interp = bprm->filename;
  1793	
  1794		retval = bprm_mm_init(bprm);
  1795		if (retval)
  1796			goto out_unmark;
  1797	
  1798		retval = prepare_arg_pages(bprm, argv, envp);
  1799		if (retval < 0)
  1800			goto out;
  1801	
  1802		retval = prepare_binprm(bprm);
  1803		if (retval < 0)
  1804			goto out;
  1805	
  1806		retval = copy_strings_kernel(1, &bprm->filename, bprm);
  1807		if (retval < 0)
  1808			goto out;
  1809	
  1810		bprm->exec = bprm->p;
  1811		retval = copy_strings(bprm->envc, envp, bprm);
  1812		if (retval < 0)
  1813			goto out;
  1814	
  1815		retval = copy_strings(bprm->argc, argv, bprm);
  1816		if (retval < 0)
  1817			goto out;
  1818	
  1819		would_dump(bprm, bprm->file);
  1820	
  1821		retval = exec_binprm(bprm);
  1822		if (retval < 0)
  1823			goto out;
  1824	
  1825		/* execve succeeded */
  1826		current->fs->in_exec = 0;
  1827		current->in_execve = 0;
  1828		rseq_execve(current);
> 1829		current->pinned_cpu = -1;
  1830		acct_update_integrals(current);
  1831		task_numa_free(current, false);
  1832		free_bprm(bprm);
  1833		kfree(pathbuf);
  1834		if (filename)
  1835			putname(filename);
  1836		if (displaced)
  1837			put_files_struct(displaced);
  1838		return retval;
  1839	
  1840	out:
  1841		if (bprm->mm) {
  1842			acct_arg_size(bprm, 0);
  1843			mmput(bprm->mm);
  1844		}
  1845	
  1846	out_unmark:
  1847		current->fs->in_exec = 0;
  1848		current->in_execve = 0;
  1849	
  1850	out_free:
  1851		free_bprm(bprm);
  1852		kfree(pathbuf);
  1853	
  1854	out_files:
  1855		if (displaced)
  1856			reset_files_struct(displaced);
  1857	out_ret:
  1858		if (filename)
  1859			putname(filename);
  1860		return retval;
  1861	}
  1862	

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

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

  parent reply	other threads:[~2020-01-24 12:25 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21 16:03 [RFC PATCH v1] pin_on_cpu: Introduce thread CPU pinning system call Mathieu Desnoyers
2020-01-21 16:03 ` Mathieu Desnoyers
2020-01-21 17:20 ` Jann Horn
2020-01-21 17:20   ` Jann Horn
2020-01-21 19:47   ` Mathieu Desnoyers
2020-01-21 19:47     ` Mathieu Desnoyers
2020-01-21 20:35     ` Jann Horn
2020-01-21 20:35       ` Jann Horn
2020-01-21 21:18       ` Mathieu Desnoyers
2020-01-21 21:18         ` Mathieu Desnoyers
     [not found]         ` <2049164886.596497.1579641536619.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2020-01-21 21:44           ` Christopher Lameter
2020-01-21 21:44             ` Christopher Lameter
     [not found]             ` <alpine.DEB.2.21.2001212141590.1231-FiTwH0KJEoYIjDr1QQGPvw@public.gmane.org>
2020-01-22  1:11               ` Mathieu Desnoyers
2020-01-22  1:11                 ` Mathieu Desnoyers
     [not found]                 ` <1648013936.596672.1579655468604.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2020-01-23  7:53                   ` H. Peter Anvin
2020-01-23  7:53                     ` H. Peter Anvin
     [not found]                     ` <ead7a565-9a23-a7d7-904d-c4860f63952a-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2020-01-23  8:19                       ` Florian Weimer
2020-01-23  8:19                         ` Florian Weimer
     [not found]                         ` <87a76efuux.fsf-fjB847h8rq1N9UpBYOmNkhcY2uh10dtjAL8bYrjMMd8@public.gmane.org>
2020-01-27 19:39                           ` Mathieu Desnoyers
2020-01-27 19:39                             ` Mathieu Desnoyers
2020-01-30 11:10                             ` Florian Weimer
2020-01-30 11:10                               ` Florian Weimer
2020-02-14 16:54                               ` Mathieu Desnoyers
2020-01-22  8:23         ` Jann Horn
2020-01-22  8:23           ` Jann Horn
2020-01-24  9:44 ` kbuild test robot
2020-01-24 12:25 ` kbuild test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-01-22 15:48 Jan Ziak
2020-01-22 15:48 ` Jan Ziak
     [not found] <CAODFU0rTLmb-Ph_n1EHaZmdOAjsa6Jmx=3zkuT8LH3No=sOk5w@mail.gmail.com>
     [not found] ` <CAODFU0rTLmb-Ph_n1EHaZmdOAjsa6Jmx=3zkuT8LH3No=sOk5w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-01-22 17:16   ` Mathieu Desnoyers
2020-01-22 17:16     ` Mathieu Desnoyers

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=202001242011.3jDI68CI%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.