From: kernel test robot <lkp@intel.com>
To: Siddharth Nayyar <sidnayyar@google.com>, petr.pavlu@suse.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
arnd@arndb.de, linux-arch@vger.kernel.org,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-modules@vger.kernel.org, mcgrof@kernel.org,
nathan@kernel.org, nicolas.schier@linux.dev,
samitolvanen@google.com, sidnayyar@google.com,
maennich@google.com, gprocida@google.com
Subject: Re: [PATCH v2 10/10] module loader: enforce symbol import protection
Date: Tue, 14 Oct 2025 15:34:57 +0800 [thread overview]
Message-ID: <202510141538.VZqnRzHh-lkp@intel.com> (raw)
In-Reply-To: <20251013153918.2206045-11-sidnayyar@google.com>
Hi Siddharth,
kernel test robot noticed the following build errors:
[auto build test ERROR on arnd-asm-generic/master]
[also build test ERROR on soc/for-next linus/master v6.18-rc1 next-20251013]
[cannot apply to mcgrof/modules-next]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Siddharth-Nayyar/define-kernel-symbol-flags/20251014-005305
base: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git master
patch link: https://lore.kernel.org/r/20251013153918.2206045-11-sidnayyar%40google.com
patch subject: [PATCH v2 10/10] module loader: enforce symbol import protection
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20251014/202510141538.VZqnRzHh-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251014/202510141538.VZqnRzHh-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/202510141538.VZqnRzHh-lkp@intel.com/
All errors (new ones prefixed by >>):
>> kernel/module/main.c:1271:32: error: no member named 'sig_ok' in 'struct module'
1271 | if (fsa.is_protected && !mod->sig_ok) {
| ~~~ ^
1 error generated.
vim +1271 kernel/module/main.c
1228
1229 /* Resolve a symbol for this module. I.e. if we find one, record usage. */
1230 static const struct kernel_symbol *resolve_symbol(struct module *mod,
1231 const struct load_info *info,
1232 const char *name,
1233 char ownername[])
1234 {
1235 struct find_symbol_arg fsa = {
1236 .name = name,
1237 .gplok = !(mod->taints & (1 << TAINT_PROPRIETARY_MODULE)),
1238 .warn = true,
1239 };
1240 int err;
1241
1242 /*
1243 * The module_mutex should not be a heavily contended lock;
1244 * if we get the occasional sleep here, we'll go an extra iteration
1245 * in the wait_event_interruptible(), which is harmless.
1246 */
1247 sched_annotate_sleep();
1248 mutex_lock(&module_mutex);
1249 if (!find_symbol(&fsa))
1250 goto unlock;
1251
1252 if (fsa.license == GPL_ONLY)
1253 mod->using_gplonly_symbols = true;
1254
1255 if (!inherit_taint(mod, fsa.owner, name)) {
1256 fsa.sym = NULL;
1257 goto getname;
1258 }
1259
1260 if (!check_version(info, name, mod, fsa.crc)) {
1261 fsa.sym = ERR_PTR(-EINVAL);
1262 goto getname;
1263 }
1264
1265 err = verify_namespace_is_imported(info, fsa.sym, mod);
1266 if (err) {
1267 fsa.sym = ERR_PTR(err);
1268 goto getname;
1269 }
1270
> 1271 if (fsa.is_protected && !mod->sig_ok) {
1272 pr_warn("%s: Cannot use protected symbol %s\n",
1273 mod->name, name);
1274 fsa.sym = ERR_PTR(-EACCES);
1275 goto getname;
1276 }
1277
1278 err = ref_module(mod, fsa.owner);
1279 if (err) {
1280 fsa.sym = ERR_PTR(err);
1281 goto getname;
1282 }
1283
1284 getname:
1285 /* We must make copy under the lock if we failed to get ref. */
1286 strscpy(ownername, module_name(fsa.owner), MODULE_NAME_LEN);
1287 unlock:
1288 mutex_unlock(&module_mutex);
1289 return fsa.sym;
1290 }
1291
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-10-14 7:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 15:39 [PATCH v2 00/10] scalable symbol flags with __kflagstab Siddharth Nayyar
2025-10-13 15:39 ` [PATCH v2 01/10] define kernel symbol flags Siddharth Nayyar
2025-10-13 15:39 ` [PATCH v2 02/10] linker: add kflagstab section to vmlinux and modules Siddharth Nayyar
2025-10-13 15:39 ` [PATCH v2 03/10] modpost: create entries for kflagstab Siddharth Nayyar
2025-10-13 15:39 ` [PATCH v2 04/10] module loader: use kflagstab instead of *_gpl sections Siddharth Nayyar
2025-10-13 15:39 ` [PATCH v2 05/10] modpost: put all exported symbols in ksymtab section Siddharth Nayyar
2025-10-13 15:39 ` [PATCH v2 06/10] module loader: remove references of *_gpl sections Siddharth Nayyar
2025-10-13 15:39 ` [PATCH v2 07/10] linker: remove *_gpl sections from vmlinux and modules Siddharth Nayyar
2025-10-13 15:39 ` [PATCH v2 08/10] remove references to *_gpl sections in documentation Siddharth Nayyar
2025-10-13 15:39 ` [PATCH v2 09/10] modpost: add symbol import protection flag to kflagstab Siddharth Nayyar
2025-10-13 15:39 ` [PATCH v2 10/10] module loader: enforce symbol import protection Siddharth Nayyar
2025-10-14 7:34 ` kernel test robot [this message]
2025-10-20 23:00 ` Siddharth Nayyar
2025-10-23 2:36 ` kernel test robot
2025-10-23 9:58 ` kernel test robot
2025-10-13 19:02 ` [PATCH v2 00/10] scalable symbol flags with __kflagstab Jonathan Corbet
2025-10-20 22:43 ` Siddharth Nayyar
2025-10-21 8:35 ` Petr Pavlu
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=202510141538.VZqnRzHh-lkp@intel.com \
--to=lkp@intel.com \
--cc=arnd@arndb.de \
--cc=gprocida@google.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=maennich@google.com \
--cc=mcgrof@kernel.org \
--cc=nathan@kernel.org \
--cc=nicolas.schier@linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=petr.pavlu@suse.com \
--cc=samitolvanen@google.com \
--cc=sidnayyar@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox