]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
module: Remove outdated comment about text_size
authorValentin Schneider <vschneid@redhat.com>
Tue, 29 Apr 2025 11:32:39 +0000 (13:32 +0200)
committerPetr Pavlu <petr.pavlu@suse.com>
Sun, 18 May 2025 11:56:22 +0000 (13:56 +0200)
The text_size bit referred to by the comment has been removed as of commit

  ac3b43283923 ("module: replace module_layout with module_memory")

and is thus no longer relevant. Remove it and comment about the contents of
the masks array instead.

Signed-off-by: Valentin Schneider <vschneid@redhat.com>
Link: https://lore.kernel.org/r/20250429113242.998312-23-vschneid@redhat.com
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
kernel/module/main.c

index 15781c2fb008aa4776f66d7426f26aa5bf172953..2b6bfaade36a7c591cfab8dc02150e4318d9edaa 100644 (file)
@@ -1562,12 +1562,11 @@ static void __layout_sections(struct module *mod, struct load_info *info, bool i
 {
        unsigned int m, i;
 
+       /*
+        * { Mask of required section header flags,
+        *   Mask of excluded section header flags }
+        */
        static const unsigned long masks[][2] = {
-               /*
-                * NOTE: all executable code must be the first section
-                * in this array; otherwise modify the text_size
-                * finder in the two loops below
-                */
                { SHF_EXECINSTR | SHF_ALLOC, ARCH_SHF_SMALL },
                { SHF_ALLOC, SHF_WRITE | ARCH_SHF_SMALL },
                { SHF_RO_AFTER_INIT | SHF_ALLOC, ARCH_SHF_SMALL },