linux/Documentation/core-api
Linus Torvalds 88b29f3f57 Modules changes for v7.1-rc1
Kernel symbol flags:
 
   - Replace the separate *_gpl symbol sections (__ksymtab_gpl and
     __kcrctab_gpl) with a unified symbol table and a new
     __kflagstab section. This section stores symbol flags, such as
     the GPL-only flag, as an 8-bit bitset for each exported symbol.
     This is a cleanup that simplifies symbol lookup in the module
     loader by avoiding table fragmentation and will allow a cleaner
     way to add more flags later if needed.
 
 Module signature UAPI:
 
   - Move struct module_signature to the UAPI headers to allow reuse
     by tools outside the kernel proper, such as kmod and
     scripts/sign-file. This also renames a few constants for clarity
     and drops unused signature types as preparation for hash-based
     module integrity checking work that's in progress.
 
 Sysfs:
 
   - Add a /sys/module/<module>/import_ns sysfs attribute to show
     the symbol namespaces imported by loaded modules. This makes it
     easier to verify driver API access at runtime on systems that
     care about such things (e.g. Android).
 
 Cleanups and fixes:
 
   - Force sh_addr to 0 for all sections in module.lds. This prevents
     non-zero section addresses when linking modules with ld.bfd -r,
     which confused elfutils.
 
   - Fix a memory leak of charp module parameters on module unload
     when the kernel is configured with CONFIG_SYSFS=n.
 
   - Override the -EEXIST error code returned by module_init() to
     userspace. This prevents confusion with the errno reserved by
     the module loader to indicate that a module is already loaded.
 
   - Simplify the warning message and drop the stack dump on positive
     returns from module_init().
 
   - Drop unnecessary extern keywords from function declarations and
     synchronize parse_args() arguments with their implementation.
 
 Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQSE9au1u/dCZerzchhaByWrOaGnegUCadmI0gAKCRBaByWrOaGn
 euC6AQCpeQGQv/Z1Pu9DmBRaRD1MjXg1K1J8DN3qH7L8FbWDwAD9FtzAHw9GPOOP
 0aQpDvcYKjdrU8OiuqtENvhzCV1RTA4=
 =YaHp
 -----END PGP SIGNATURE-----

Merge tag 'modules-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux

Pull module updates from Sami Tolvanen:
 "Kernel symbol flags:

   - Replace the separate *_gpl symbol sections (__ksymtab_gpl and
     __kcrctab_gpl) with a unified symbol table and a new __kflagstab
     section.

     This section stores symbol flags, such as the GPL-only flag, as an
     8-bit bitset for each exported symbol. This is a cleanup that
     simplifies symbol lookup in the module loader by avoiding table
     fragmentation and will allow a cleaner way to add more flags later
     if needed.

  Module signature UAPI:

   - Move struct module_signature to the UAPI headers to allow reuse by
     tools outside the kernel proper, such as kmod and
     scripts/sign-file.

     This also renames a few constants for clarity and drops unused
     signature types as preparation for hash-based module integrity
     checking work that's in progress.

  Sysfs:

   - Add a /sys/module/<module>/import_ns sysfs attribute to show the
     symbol namespaces imported by loaded modules.

     This makes it easier to verify driver API access at runtime on
     systems that care about such things (e.g. Android).

  Cleanups and fixes:

   - Force sh_addr to 0 for all sections in module.lds. This prevents
     non-zero section addresses when linking modules with 'ld.bfd -r',
     which confused elfutils.

   - Fix a memory leak of charp module parameters on module unload when
     the kernel is configured with CONFIG_SYSFS=n.

   - Override the -EEXIST error code returned by module_init() to
     userspace. This prevents confusion with the errno reserved by the
     module loader to indicate that a module is already loaded.

   - Simplify the warning message and drop the stack dump on positive
     returns from module_init().

   - Drop unnecessary extern keywords from function declarations and
     synchronize parse_args() arguments with their implementation"

* tag 'modules-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux: (23 commits)
  module: Simplify warning on positive returns from module_init()
  module: Override -EEXIST module return
  documentation: remove references to *_gpl sections
  module: remove *_gpl sections from vmlinux and modules
  module: deprecate usage of *_gpl sections in module loader
  module: use kflagstab instead of *_gpl sections
  module: populate kflagstab in modpost
  module: add kflagstab section to vmlinux and modules
  module: define ksym_flags enumeration to represent kernel symbol flags
  selftests/bpf: verify_pkcs7_sig: Use 'struct module_signature' from the UAPI headers
  sign-file: use 'struct module_signature' from the UAPI headers
  tools uapi headers: add linux/module_signature.h
  module: Move 'struct module_signature' to UAPI
  module: Give MODULE_SIG_STRING a more descriptive name
  module: Give 'enum pkey_id_type' a more specific name
  module: Drop unused signature types
  extract-cert: drop unused definition of PKEY_ID_PKCS7
  docs: symbol-namespaces: mention sysfs attribute
  module: expose imported namespaces via sysfs
  module: Remove extern keyword from param prototypes
  ...
2026-04-14 17:16:38 -07:00
..
irq Documentation: Add managed interrupts 2026-04-11 07:07:02 -06:00
kho kho/abi: add memblock ABI header 2026-01-26 19:07:12 -08:00
real-time Documentation: core-api: real-time: correct spelling 2026-04-12 13:11:50 -06:00
wrappers
asm-annotations.rst
assoc_array.rst Documentation: assoc_array: Format internal tree layout tables 2025-10-17 14:23:04 -06:00
boot-time-mm.rst
cachetlb.rst
cgroup.rst
circular-buffers.rst
cleanup.rst
cpu_hotplug.rst treewide: Update email address 2026-01-11 06:09:11 -10:00
debug-objects.rst
debugging-via-ohci1394.rst
dma-api-howto.rst docs: dma-api: document __dma_from_device_group_begin()/end() 2025-12-31 19:28:12 -05:00
dma-api.rst dma-debug: refactor to use physical addresses for page mapping 2025-09-12 00:09:51 +02:00
dma-attributes.rst dma-mapping: Introduce DMA require coherency attribute 2026-03-20 12:05:36 +01:00
dma-isa-lpc.rst
entry.rst Documentation: core-api: entry: Replace deprecated KVM entry/exit functions 2025-07-24 08:32:59 -06:00
errseq.rst
floating-point.rst
folio_queue.rst docs: folio_queue: Fix minor typo in folio_queue page 2025-08-12 12:40:15 -06:00
genalloc.rst
generic-radix-tree.rst
genericirq.rst treewide: Update email address 2026-01-11 06:09:11 -10:00
gfp_mask-from-fs-io.rst
housekeeping.rst docs: fix typo in housekeeping 2026-03-09 09:55:08 -06:00
idr.rst
index.rst A slightly calmer cycle for docs this time around, though there is still a 2026-02-09 20:53:18 -08:00
kernel-api.rst It has been a relatively busy cycle for docs, especially the build system: 2025-07-31 08:36:51 -07:00
kobject.rst docs: Update documentation to avoid mentioning of kernel.h 2025-12-22 14:59:18 -07:00
kref.rst
librs.rst treewide: Update email address 2026-01-11 06:09:11 -10:00
list.rst list: add primitives for private list manipulations 2026-02-08 00:13:32 -08:00
liveupdate.rst liveupdate: luo_flb: introduce File-Lifecycle-Bound global state 2026-02-08 00:13:33 -08:00
local_ops.rst
maple_tree.rst
memory-allocation.rst
memory-hotplug.rst docs: memory-hotplug: fix typo 'fo' -> 'for' in NODE_ADDED_FIRST_MEMORY description 2026-03-17 08:42:05 -06:00
min_heap.rst
mm-api.rst mm: rename balloon_compaction.(c|h) to balloon.(c|h) 2026-01-31 14:22:35 -08:00
netlink.rst
packing.rst docs: packing: Fix a typo in example code. 2025-06-09 12:29:50 -06:00
padata.rst
parser.rst
pin_user_pages.rst
printk-basics.rst Documentation: printk: Add section about avoiding lockups 2026-03-17 08:37:49 -06:00
printk-formats.rst lib/vsprintf: Add specifier for printing struct timespec64 2025-11-19 10:24:13 +01:00
printk-index.rst
protection-keys.rst
rbtree.rst Docs/core-api: fix typos in rbtree.rst 2026-02-14 10:11:43 -07:00
refcount-vs-atomic.rst
swiotlb.rst
symbol-namespaces.rst docs: symbol-namespaces: mention sysfs attribute 2026-03-19 22:49:37 +00:00
this_cpu_ops.rst
timekeeping.rst
tracepoint.rst
unaligned-memory-access.rst
union_find.rst
watch_queue.rst
workqueue.rst workqueue: Add new WQ_PERCPU flag 2025-06-17 08:52:09 -10:00
xarray.rst