tree:
https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git memfd-secret/v19.3
head: 3ab055334ff06fa6231e2cf27fe7fff57bb7d87f
commit: 545bdc70882cbd28aebc1d6392fdc0249f795d2f [4/7] mm: introduce memfd_secret system
call to create "secret" memory areas
config: arm64-randconfig-r023-20210516 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
a80a5036a1f6b9a9eb4038b30458f9ab349efff8)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
#
https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git/commit/?id...
git remote add rppt
https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git
git fetch --no-tags rppt memfd-secret/v19.3
git checkout 545bdc70882cbd28aebc1d6392fdc0249f795d2f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> mm/secretmem.c:78:41: error: too many arguments to function call,
expected single argument 'page', have 2 arguments
set_direct_map_default_noflush(page, 1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
arch/arm64/include/asm/set_memory.h:14:5: note:
'set_direct_map_default_noflush' declared here
int set_direct_map_default_noflush(struct page *page);
^
1 error generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for STRICT_DEVMEM
Depends on MMU && DEVMEM && (ARCH_HAS_DEVMEM_IS_ALLOWED ||
GENERIC_LIB_DEVMEM_IS_ALLOWED
Selected by
- SECRETMEM
vim +/page +78 mm/secretmem.c
37
38 static bool secretmem_enable __ro_after_init;
39 module_param_named(enable, secretmem_enable, bool, 0400);
40 MODULE_PARM_DESC(secretmem_enable,
41 "Enable secretmem and memfd_secret(2) system call");
42
43 static vm_fault_t secretmem_fault(struct vm_fault *vmf)
44 {
45 struct address_space *mapping = vmf->vma->vm_file->f_mapping;
46 struct inode *inode = file_inode(vmf->vma->vm_file);
47 pgoff_t offset = vmf->pgoff;
48 gfp_t gfp = vmf->gfp_mask;
49 unsigned long addr;
50 struct page *page;
51 int err;
52
53 if (((loff_t)vmf->pgoff << PAGE_SHIFT) >= i_size_read(inode))
54 return vmf_error(-EINVAL);
55
56 retry:
57 page = find_lock_page(mapping, offset);
58 if (!page) {
59 page = alloc_page(gfp | __GFP_ZERO);
60 if (!page)
61 return VM_FAULT_OOM;
62
63 err = set_direct_map_invalid_noflush(page);
64 if (err) {
65 put_page(page);
66 return vmf_error(err);
67 }
68
69 __SetPageUptodate(page);
70 err = add_to_page_cache_lru(page, mapping, offset, gfp);
71 if (unlikely(err)) {
72 put_page(page);
73 /*
74 * If a split of large page was required, it
75 * already happened when we marked the page invalid
76 * which guarantees that this call won't fail
77 */
78 set_direct_map_default_noflush(page, 1);
79 if
(err == -EEXIST)
80 goto retry;
81
82 return vmf_error(err);
83 }
84
85 addr = (unsigned long)page_address(page);
86 flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
87 }
88
89 vmf->page = page;
90 return VM_FAULT_LOCKED;
91 }
92
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org