| From: |
| Siddharth Nayyar <sidnayyar-AT-google.com> |
| To: |
| petr.pavlu-AT-suse.com |
| Subject: |
| [PATCH v2 00/10] scalable symbol flags with __kflagstab |
| Date: |
| Mon, 13 Oct 2025 15:39:08 +0000 |
| Message-ID: |
| <20251013153918.2206045-1-sidnayyar@google.com> |
| Cc: |
| arnd-AT-arndb.de, linux-arch-AT-vger.kernel.org, linux-kbuild-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, linux-modules-AT-vger.kernel.org, mcgrof-AT-kernel.org, nathan-AT-kernel.org, nicolas.schier-AT-linux.dev, samitolvanen-AT-google.com, sidnayyar-AT-google.com, maennich-AT-google.com, gprocida-AT-google.com |
| Archive-link: |
| Article |
This patch series implements a mechanism for scalable exported symbol
flags using a separate section called __kflagstab. The series introduces
__kflagstab support, removes *_gpl sections in favor of a GPL flag,
simplifies symbol resolution during module loading, and adds symbol
import protection.
Thank you Petr Pavlu for their valuable feedback.
---
Changes from v1:
- added a check to ensure __kflagstab is present
- added warnings for the obsolete *_gpl sections
- moved protected symbol check before ref_module() call
- moved protected symbol check failure warning to issue detection point
v1:
https://lore.kernel.org/all/20250829105418.3053274-1-sidn...
Siddharth Nayyar (10):
define kernel symbol flags
linker: add kflagstab section to vmlinux and modules
modpost: create entries for kflagstab
module loader: use kflagstab instead of *_gpl sections
modpost: put all exported symbols in ksymtab section
module loader: remove references of *_gpl sections
linker: remove *_gpl sections from vmlinux and modules
remove references to *_gpl sections in documentation
modpost: add symbol import protection flag to kflagstab
module loader: enforce symbol import protection
Documentation/kbuild/modules.rst | 11 +--
include/asm-generic/vmlinux.lds.h | 21 ++----
include/linux/export-internal.h | 28 +++++---
include/linux/module.h | 4 +-
include/linux/module_symbol.h | 6 ++
kernel/module/internal.h | 5 +-
kernel/module/main.c | 112 +++++++++++++++---------------
scripts/mod/modpost.c | 27 +++++--
scripts/module.lds.S | 3 +-
9 files changed, 120 insertions(+), 97 deletions(-)
--
2.51.0.740.g6adb054d12-goog