All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [riteshharjani:feat-secret-memfd-rfc-v1-0day 2/4] mm/secretmem.c:142:23: error: too few arguments to function 'set_direct_map_invalid_noflush'
Date: Sat, 10 Oct 2026 11:22:38 +0200	[thread overview]
Message-ID: <202610101141.WQ2vkOKS-lkp@intel.com> (raw)

tree:   https://github.com/riteshharjani/linux feat-secret-memfd-rfc-v1-0day
head:   80c52d3311e732619c0c339b4a03e92859ba98a1
commit: 744ed18f924d7aeb1a92993e90971120f0b7d4d4 [2/4] powerpc/64s/radix: Implement ARCH_HAS_SET_DIRECT_MAP
config: powerpc64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20261010/202610101141.WQ2vkOKS-lkp@intel.com/config)
compiler: powerpc64-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261010/202610101141.WQ2vkOKS-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610101141.WQ2vkOKS-lkp@intel.com/

All errors (new ones prefixed by >>):

   mm/vmalloc.c: In function 'vm_reset_perms':
>> mm/vmalloc.c:3403:35: error: passing argument 2 of 'set_area_direct_map' from incompatible pointer type [-Wincompatible-pointer-types]
    3403 |         set_area_direct_map(area, set_direct_map_invalid_noflush);
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                   |
         |                                   int (*)(struct page *, unsigned int)
   mm/vmalloc.c:3361:46: note: expected 'int (*)(struct page *)' but argument is of type 'int (*)(struct page *, unsigned int)'
    3361 |                                        int (*set_direct_map)(struct page *page))
         |                                        ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   mm/vmalloc.c:3405:35: error: passing argument 2 of 'set_area_direct_map' from incompatible pointer type [-Wincompatible-pointer-types]
    3405 |         set_area_direct_map(area, set_direct_map_default_noflush);
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                   |
         |                                   int (*)(struct page *, unsigned int)
   mm/vmalloc.c:3361:46: note: expected 'int (*)(struct page *)' but argument is of type 'int (*)(struct page *, unsigned int)'
    3361 |                                        int (*set_direct_map)(struct page *page))
         |                                        ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   mm/secretmem.c: In function 'secretmem_fault':
>> mm/secretmem.c:142:23: error: too few arguments to function 'set_direct_map_invalid_noflush'
     142 |                 err = set_direct_map_invalid_noflush(folio_page(folio, 0));
         |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from ./include/linux/set_memory.h:9,
                    from mm/secretmem.c:19:
   ./arch/powerpc/include/asm/set_memory.h:55:5: note: declared here
      55 | int set_direct_map_invalid_noflush(struct page *page, unsigned int numpages);
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/secretmem.c:159:25: error: too few arguments to function 'set_direct_map_default_noflush'
     159 |                         set_direct_map_default_noflush(folio_page(folio, 0));
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ./arch/powerpc/include/asm/set_memory.h:56:5: note: declared here
      56 | int set_direct_map_default_noflush(struct page *page, unsigned int numpages);
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   mm/secretmem.c: In function 'secretmem_free_folio':
   mm/secretmem.c:231:9: error: too few arguments to function 'set_direct_map_default_noflush'
     231 |         set_direct_map_default_noflush(folio_page(folio, 0));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ./arch/powerpc/include/asm/set_memory.h:56:5: note: declared here
      56 | int set_direct_map_default_noflush(struct page *page, unsigned int numpages);
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/set_direct_map_invalid_noflush +142 mm/secretmem.c

97d34aa65c29cc Lorenzo Stoakes (ARM    2026-08-26  109) 
1507f51255c9ff Mike Rapoport           2021-07-07  110  static vm_fault_t secretmem_fault(struct vm_fault *vmf)
1507f51255c9ff Mike Rapoport           2021-07-07  111  {
1507f51255c9ff Mike Rapoport           2021-07-07  112  	struct address_space *mapping = vmf->vma->vm_file->f_mapping;
1507f51255c9ff Mike Rapoport           2021-07-07  113  	struct inode *inode = file_inode(vmf->vma->vm_file);
97d34aa65c29cc Lorenzo Stoakes (ARM    2026-08-26  114) 	struct secretmem_inode_state *state = inode->i_private;
1507f51255c9ff Mike Rapoport           2021-07-07  115  	pgoff_t offset = vmf->pgoff;
1507f51255c9ff Mike Rapoport           2021-07-07  116  	gfp_t gfp = vmf->gfp_mask;
1507f51255c9ff Mike Rapoport           2021-07-07  117  	unsigned long addr;
7e2fca52ef918e ZhangPeng               2023-08-12  118  	struct folio *folio;
84ac013046ccc4 Mike Rapoport           2022-07-07  119  	vm_fault_t ret;
1507f51255c9ff Mike Rapoport           2021-07-07  120  	int err;
1507f51255c9ff Mike Rapoport           2021-07-07  121  
1507f51255c9ff Mike Rapoport           2021-07-07  122  	if (((loff_t)vmf->pgoff << PAGE_SHIFT) >= i_size_read(inode))
1507f51255c9ff Mike Rapoport           2021-07-07  123  		return vmf_error(-EINVAL);
1507f51255c9ff Mike Rapoport           2021-07-07  124  
84ac013046ccc4 Mike Rapoport           2022-07-07  125  	filemap_invalidate_lock_shared(mapping);
84ac013046ccc4 Mike Rapoport           2022-07-07  126  
1507f51255c9ff Mike Rapoport           2021-07-07  127  retry:
32925ee63beb7e Matthew Wilcox (Oracle  2025-06-13  128) 	folio = filemap_lock_folio(mapping, offset);
32925ee63beb7e Matthew Wilcox (Oracle  2025-06-13  129) 	if (IS_ERR(folio)) {
7e2fca52ef918e ZhangPeng               2023-08-12  130  		folio = folio_alloc(gfp | __GFP_ZERO, 0);
7e2fca52ef918e ZhangPeng               2023-08-12  131  		if (!folio) {
84ac013046ccc4 Mike Rapoport           2022-07-07  132  			ret = VM_FAULT_OOM;
84ac013046ccc4 Mike Rapoport           2022-07-07  133  			goto out;
84ac013046ccc4 Mike Rapoport           2022-07-07  134  		}
1507f51255c9ff Mike Rapoport           2021-07-07  135  
97d34aa65c29cc Lorenzo Stoakes (ARM    2026-08-26  136) 		if (!secretmem_account_folio(state, folio)) {
97d34aa65c29cc Lorenzo Stoakes (ARM    2026-08-26  137) 			folio_put(folio);
97d34aa65c29cc Lorenzo Stoakes (ARM    2026-08-26  138) 			ret = VM_FAULT_SIGBUS;
97d34aa65c29cc Lorenzo Stoakes (ARM    2026-08-26  139) 			goto out;
97d34aa65c29cc Lorenzo Stoakes (ARM    2026-08-26  140) 		}
97d34aa65c29cc Lorenzo Stoakes (ARM    2026-08-26  141) 
32925ee63beb7e Matthew Wilcox (Oracle  2025-06-13 @142) 		err = set_direct_map_invalid_noflush(folio_page(folio, 0));
1507f51255c9ff Mike Rapoport           2021-07-07  143  		if (err) {
97d34aa65c29cc Lorenzo Stoakes (ARM    2026-08-26  144) 			secretmem_unaccount_folio(state, folio);
7e2fca52ef918e ZhangPeng               2023-08-12  145  			folio_put(folio);
84ac013046ccc4 Mike Rapoport           2022-07-07  146  			ret = vmf_error(err);
84ac013046ccc4 Mike Rapoport           2022-07-07  147  			goto out;
1507f51255c9ff Mike Rapoport           2021-07-07  148  		}
1507f51255c9ff Mike Rapoport           2021-07-07  149  
7e2fca52ef918e ZhangPeng               2023-08-12  150  		__folio_mark_uptodate(folio);
7e2fca52ef918e ZhangPeng               2023-08-12  151  		err = filemap_add_folio(mapping, folio, offset, gfp);
1507f51255c9ff Mike Rapoport           2021-07-07  152  		if (unlikely(err)) {
97d34aa65c29cc Lorenzo Stoakes (ARM    2026-08-26  153) 			secretmem_unaccount_folio(state, folio);
1507f51255c9ff Mike Rapoport           2021-07-07  154  			/*
1507f51255c9ff Mike Rapoport           2021-07-07  155  			 * If a split of large page was required, it
1507f51255c9ff Mike Rapoport           2021-07-07  156  			 * already happened when we marked the page invalid
1507f51255c9ff Mike Rapoport           2021-07-07  157  			 * which guarantees that this call won't fail
1507f51255c9ff Mike Rapoport           2021-07-07  158  			 */
32925ee63beb7e Matthew Wilcox (Oracle  2025-06-13 @159) 			set_direct_map_default_noflush(folio_page(folio, 0));
6f86d0534fddfb Lance Yang              2025-10-31  160  			folio_put(folio);
1507f51255c9ff Mike Rapoport           2021-07-07  161  			if (err == -EEXIST)
1507f51255c9ff Mike Rapoport           2021-07-07  162  				goto retry;
1507f51255c9ff Mike Rapoport           2021-07-07  163  
84ac013046ccc4 Mike Rapoport           2022-07-07  164  			ret = vmf_error(err);
84ac013046ccc4 Mike Rapoport           2022-07-07  165  			goto out;
1507f51255c9ff Mike Rapoport           2021-07-07  166  		}
1507f51255c9ff Mike Rapoport           2021-07-07  167  
32925ee63beb7e Matthew Wilcox (Oracle  2025-06-13  168) 		addr = (unsigned long)folio_address(folio);
1507f51255c9ff Mike Rapoport           2021-07-07  169  		flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
1507f51255c9ff Mike Rapoport           2021-07-07  170  	}
1507f51255c9ff Mike Rapoport           2021-07-07  171  
32925ee63beb7e Matthew Wilcox (Oracle  2025-06-13  172) 	vmf->page = folio_file_page(folio, vmf->pgoff);
84ac013046ccc4 Mike Rapoport           2022-07-07  173  	ret = VM_FAULT_LOCKED;
84ac013046ccc4 Mike Rapoport           2022-07-07  174  
84ac013046ccc4 Mike Rapoport           2022-07-07  175  out:
84ac013046ccc4 Mike Rapoport           2022-07-07  176  	filemap_invalidate_unlock_shared(mapping);
84ac013046ccc4 Mike Rapoport           2022-07-07  177  	return ret;
1507f51255c9ff Mike Rapoport           2021-07-07  178  }
1507f51255c9ff Mike Rapoport           2021-07-07  179  

:::::: The code at line 142 was first introduced by commit
:::::: 32925ee63beb7e1a3fad25e2f54cefa2d32612de secretmem: remove uses of struct page

:::::: TO: Matthew Wilcox (Oracle) <willy@infradead.org>
:::::: CC: Andrew Morton <akpm@linux-foundation.org>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-10-10  9:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202610101141.WQ2vkOKS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ritesh.list@gmail.com \
    /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.