From: kernel test robot <[email protected]>
To: Alexey Gladkov <[email protected]>,
LKML <[email protected]>,
[email protected],
Kernel Hardening <[email protected]>,
Linux Containers <[email protected]>,
[email protected]
Cc: [email protected], Alexey Gladkov <[email protected]>,
Andrew Morton <[email protected]>,
Linux Memory Management List <[email protected]>,
Christian Brauner <[email protected]>,
"Eric W . Biederman" <[email protected]>
Subject: Re: [PATCH v6 6/7] Reimplement RLIMIT_MEMLOCK on top of ucounts
Date: Tue, 16 Feb 2021 01:49:41 +0800 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <04cdc5d6da93511c0493612581b319b2255ea3d6.1613392826.git.gladkov.alexey@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5271 bytes --]
Hi Alexey,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on kselftest/next]
[also build test ERROR on linux/master linus/master v5.11 next-20210212]
[cannot apply to hnaz-linux-mm/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Alexey-Gladkov/Count-rlimits-in-each-user-namespace/20210215-204524
base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next
config: openrisc-randconfig-r001-20210215 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/f009495a8def89a71b9e0b9025a39379d6f9097d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alexey-Gladkov/Count-rlimits-in-each-user-namespace/20210215-204524
git checkout f009495a8def89a71b9e0b9025a39379d6f9097d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
All errors (new ones prefixed by >>):
mm/mmap.c: In function 'ksys_mmap_pgoff':
>> mm/mmap.c:1626:5: error: passing argument 4 of 'hugetlb_file_setup' from incompatible pointer type [-Werror=incompatible-pointer-types]
1626 | &cred, HUGETLB_ANONHUGE_INODE,
| ^~~~~
| |
| const struct cred **
In file included from mm/mmap.c:28:
include/linux/hugetlb.h:457:17: note: expected 'struct cred **' but argument is of type 'const struct cred **'
457 | struct cred **cred, int creat_flags,
| ~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors
--
mm/memfd.c: In function '__do_sys_memfd_create':
>> mm/memfd.c:301:52: error: passing argument 4 of 'hugetlb_file_setup' from incompatible pointer type [-Werror=incompatible-pointer-types]
301 | file = hugetlb_file_setup(name, 0, VM_NORESERVE, &cred,
| ^~~~~
| |
| const struct cred **
In file included from mm/memfd.c:18:
include/linux/hugetlb.h:457:17: note: expected 'struct cred **' but argument is of type 'const struct cred **'
457 | struct cred **cred, int creat_flags,
| ~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors
--
ipc/shm.c: In function 'newseg':
>> ipc/shm.c:653:5: error: passing argument 4 of 'hugetlb_file_setup' from incompatible pointer type [-Werror=incompatible-pointer-types]
653 | &shp->mlock_cred, HUGETLB_SHMFS_INODE,
| ^~~~~~~~~~~~~~~~
| |
| const struct cred **
In file included from ipc/shm.c:30:
include/linux/hugetlb.h:457:17: note: expected 'struct cred **' but argument is of type 'const struct cred **'
457 | struct cred **cred, int creat_flags,
| ~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors
vim +/hugetlb_file_setup +1626 mm/mmap.c
1590
1591 unsigned long ksys_mmap_pgoff(unsigned long addr, unsigned long len,
1592 unsigned long prot, unsigned long flags,
1593 unsigned long fd, unsigned long pgoff)
1594 {
1595 struct file *file = NULL;
1596 unsigned long retval;
1597
1598 if (!(flags & MAP_ANONYMOUS)) {
1599 audit_mmap_fd(fd, flags);
1600 file = fget(fd);
1601 if (!file)
1602 return -EBADF;
1603 if (is_file_hugepages(file)) {
1604 len = ALIGN(len, huge_page_size(hstate_file(file)));
1605 } else if (unlikely(flags & MAP_HUGETLB)) {
1606 retval = -EINVAL;
1607 goto out_fput;
1608 }
1609 } else if (flags & MAP_HUGETLB) {
1610 const struct cred *cred;
1611 struct hstate *hs;
1612
1613 hs = hstate_sizelog((flags >> MAP_HUGE_SHIFT) & MAP_HUGE_MASK);
1614 if (!hs)
1615 return -EINVAL;
1616
1617 len = ALIGN(len, huge_page_size(hs));
1618 /*
1619 * VM_NORESERVE is used because the reservations will be
1620 * taken when vm_ops->mmap() is called
1621 * A dummy user value is used because we are not locking
1622 * memory so no accounting is necessary
1623 */
1624 file = hugetlb_file_setup(HUGETLB_ANON_FILE, len,
1625 VM_NORESERVE,
> 1626 &cred, HUGETLB_ANONHUGE_INODE,
1627 (flags >> MAP_HUGE_SHIFT) & MAP_HUGE_MASK);
1628 if (IS_ERR(file))
1629 return PTR_ERR(file);
1630 }
1631
1632 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
1633
1634 retval = vm_mmap_pgoff(file, addr, len, prot, flags, pgoff);
1635 out_fput:
1636 if (file)
1637 fput(file);
1638 return retval;
1639 }
1640
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 22871 bytes --]
next prev parent reply other threads:[~2021-02-15 17:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-15 12:41 [PATCH v6 0/7] Count rlimits in each user namespace Alexey Gladkov
2021-02-15 12:41 ` [PATCH v6 1/7] Increase size of ucounts to atomic_long_t Alexey Gladkov
2021-02-15 12:41 ` [PATCH v6 2/7] Add a reference to ucounts for each cred Alexey Gladkov
2021-02-15 12:41 ` [PATCH v6 3/7] Reimplement RLIMIT_NPROC on top of ucounts Alexey Gladkov
2021-02-21 23:38 ` Jens Axboe
2021-02-22 10:11 ` Alexey Gladkov
2021-02-22 14:09 ` Jens Axboe
2021-02-15 12:41 ` [PATCH v6 4/7] Reimplement RLIMIT_MSGQUEUE " Alexey Gladkov
2021-02-15 12:41 ` [PATCH v6 5/7] Reimplement RLIMIT_SIGPENDING " Alexey Gladkov
2021-02-15 12:41 ` [PATCH v6 6/7] Reimplement RLIMIT_MEMLOCK " Alexey Gladkov
2021-02-15 15:09 ` kernel test robot
2021-02-15 17:49 ` kernel test robot [this message]
2021-02-16 11:12 ` [PATCH v7 " Alexey Gladkov
2021-02-15 12:41 ` [PATCH v6 7/7] kselftests: Add test to check for rlimit changes in different user namespaces Alexey Gladkov
2021-02-21 22:20 ` [PATCH v6 0/7] Count rlimits in each user namespace Linus Torvalds
2021-02-22 10:27 ` Alexey Gladkov
2021-02-23 5:30 ` Eric W. Biederman
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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