From: kernel test robot <lkp@intel.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [ardb:arm64-combine-module-section-allocations 1/1] kernel/module/main.c:2826:21: error: 'provider_type' undeclared; did you mean 'iov_iter_type'?
Date: Thu, 20 Aug 2026 11:17:04 +0800 [thread overview]
Message-ID: <202608201116.kvsNriVW-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git arm64-combine-module-section-allocations
head: eaa00409fb18efd5ba35159657893d158d91faa4
commit: eaa00409fb18efd5ba35159657893d158d91faa4 [1/1] module: Permit module section allocations to be combined
config: alpha-allmodconfig (https://download.01.org/0day-ci/archive/20260820/202608201116.kvsNriVW-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260820/202608201116.kvsNriVW-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/202608201116.kvsNriVW-lkp@intel.com/
All errors (new ones prefixed by >>):
kernel/module/main.c: In function 'move_module':
>> kernel/module/main.c:2826:21: error: 'provider_type' undeclared (first use in this function); did you mean 'iov_iter_type'?
2826 | if (provider_type == MOD_INVALID)
| ^~~~~~~~~~~~~
| iov_iter_type
kernel/module/main.c:2826:21: note: each undeclared identifier is reported only once for each function it appears in
vim +2826 kernel/module/main.c
2800
2801 static int move_module(struct module *mod, struct load_info *info)
2802 {
2803 int i, ret;
2804 enum mod_mem_type t = MOD_MEM_NUM_TYPES;
2805 bool codetag_section_found = false;
2806
2807 for_each_mod_mem_type(type) {
2808 if (!mod->mem[type].size) {
2809 mod->mem[type].base = NULL;
2810 continue;
2811 }
2812
2813 if (mod->mem[type].alloc_provider != MOD_INVALID)
2814 continue;
2815
2816 ret = module_memory_alloc(mod, type);
2817 if (ret) {
2818 t = type;
2819 goto out_err;
2820 }
2821 }
2822
2823 for_each_mod_mem_type(type) {
2824 auto p_type = mod->mem[type].alloc_provider;
2825
> 2826 if (provider_type == MOD_INVALID)
2827 continue;
2828
2829 mod->mem[p_type].size -= mod->mem[type].size;
2830 mod->mem[type].base = mod->mem[p_type].base +
2831 mod->mem[p_type].size;
2832
2833 mod->mem[type].is_rox = mod->mem[p_type].is_rox;
2834 }
2835
2836 /* Transfer each section which specifies SHF_ALLOC */
2837 pr_debug("Final section addresses for %s:\n", mod->name);
2838 for (i = 0; i < info->hdr->e_shnum; i++) {
2839 void *dest;
2840 Elf_Shdr *shdr = &info->sechdrs[i];
2841 const char *sname;
2842
2843 if (!(shdr->sh_flags & SHF_ALLOC))
2844 continue;
2845
2846 sname = info->secstrings + shdr->sh_name;
2847 /*
2848 * Load codetag sections separately as they might still be used
2849 * after module unload.
2850 */
2851 if (codetag_needs_module_section(mod, sname, shdr->sh_size)) {
2852 dest = codetag_alloc_module_section(mod, sname, shdr->sh_size,
2853 arch_mod_section_prepend(mod, i), shdr->sh_addralign);
2854 if (WARN_ON(!dest)) {
2855 ret = -EINVAL;
2856 goto out_err;
2857 }
2858 if (IS_ERR(dest)) {
2859 ret = PTR_ERR(dest);
2860 goto out_err;
2861 }
2862 codetag_section_found = true;
2863 } else {
2864 enum mod_mem_type type = shdr->sh_entsize >> SH_ENTSIZE_TYPE_SHIFT;
2865 unsigned long offset = shdr->sh_entsize & SH_ENTSIZE_OFFSET_MASK;
2866
2867 dest = mod->mem[type].base + offset;
2868 }
2869
2870 if (shdr->sh_type != SHT_NOBITS) {
2871 /*
2872 * Our ELF checker already validated this, but let's
2873 * be pedantic and make the goal clearer. We actually
2874 * end up copying over all modifications made to the
2875 * userspace copy of the entire struct module.
2876 */
2877 if (i == info->index.mod &&
2878 (WARN_ON_ONCE(shdr->sh_size != sizeof(struct module)))) {
2879 ret = -ENOEXEC;
2880 goto out_err;
2881 }
2882 memcpy(dest, (void *)shdr->sh_addr, shdr->sh_size);
2883 }
2884 /*
2885 * Update the userspace copy's ELF section address to point to
2886 * our newly allocated memory as a pure convenience so that
2887 * users of info can keep taking advantage and using the newly
2888 * minted official memory area.
2889 */
2890 shdr->sh_addr = (unsigned long)dest;
2891 pr_debug("\t0x%lx 0x%.8lx %s\n", (long)shdr->sh_addr,
2892 (long)shdr->sh_size, info->secstrings + shdr->sh_name);
2893 }
2894
2895 return 0;
2896 out_err:
2897 module_memory_restore_rox(mod);
2898 while (t--)
2899 module_memory_free(mod, t);
2900 if (codetag_section_found)
2901 codetag_free_module_sections(mod);
2902
2903 return ret;
2904 }
2905
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-08-20 3:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 3:17 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-08-19 21:16 [ardb:arm64-combine-module-section-allocations 1/1] kernel/module/main.c:2826:21: error: 'provider_type' undeclared; did you mean 'iov_iter_type'? kernel test robot
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=202608201116.kvsNriVW-lkp@intel.com \
--to=lkp@intel.com \
--cc=ardb@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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.