tree:
https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git memfd-secret/v19.2
head: 96dd5765c0ba20e58b377b1341358c2c35504098
commit: 9a074a1c16d0fce50b45f82ff886f04452d38904 [4/7] mm: introduce memfd_secret system
call to create "secret" memory areas
config: x86_64-randconfig-a015-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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-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.2
git checkout 9a074a1c16d0fce50b45f82ff886f04452d38904
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
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:63:46: error: too many arguments to function call,
expected single argument 'page', have 2 arguments
err =
set_direct_map_invalid_noflush(page, 1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
arch/x86/include/asm/set_memory.h:83:5: note: 'set_direct_map_invalid_noflush'
declared here
int set_direct_map_invalid_noflush(struct page *page);
^
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/x86/include/asm/set_memory.h:84:5: note: 'set_direct_map_default_noflush'
declared here
int set_direct_map_default_noflush(struct page *page);
^
mm/secretmem.c:136:39: error: too many arguments to function call, expected single
argument 'page', have 2 arguments
set_direct_map_default_noflush(page, 1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
arch/x86/include/asm/set_memory.h:84:5: note: 'set_direct_map_default_noflush'
declared here
int set_direct_map_default_noflush(struct page *page);
^
3 errors generated.
vim +/page +63 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, 1);
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