1. 18 Apr, 2023 5 commits
    • Luis Chamberlain's avatar
      module: avoid allocation if module is already present and ready · 064f4536
      Luis Chamberlain authored
      The finit_module() system call can create unnecessary virtual memory
      pressure for duplicate modules. This is because load_module() can in
      the worse case allocate more than twice the size of a module in virtual
      memory. This saves at least a full size of the module in wasted vmalloc
      space memory by trying to avoid duplicates as soon as we can validate
      the module name in the read module structure.
      
      This can only be an issue if a system is getting hammered with userspace
      loading modules. There are two ways to load modules typically on systems,
      one is the kernel moduile auto-loading (*request_module*() calls in-kernel)
      and the other is things like udev. The auto-loading is in-kernel, but that
      pings back to userspace to just call modprobe. We already have a way to
      restrict the amount of concurrent kernel auto-loads in a given time, however
      that still allows multiple requests for the same module to go through
      and force two threads in userspace racing to call modprobe for the same
      exact module. Even though libkmod which both modprobe and udev does check
      if a module is already loaded prior calling finit_module() races are
      still possible and this is clearly evident today when you have multiple
      CPUs.
      
      To avoid memory pressure for such stupid cases put a stop gap for them.
      The *earliest* we can detect duplicates from the modules side of things
      is once we have blessed the module name, sadly after the first vmalloc
      allocation. We can check for the module being present *before* a secondary
      vmalloc() allocation.
      
      There is a linear relationship between wasted virtual memory bytes and
      the number of CPU counts. The reason is that udev ends up racing to call
      tons of the same modules for each of the CPUs.
      
      We can see the different linear relationships between wasted virtual
      memory and CPU count during after boot in the following graph:
      
               +----------------------------------------------------------------------------+
          14GB |-+          +            +            +           +           *+          +-|
               |                                                          ****              |
               |                                                       ***                  |
               |                                                     **                     |
          12GB |-+                                                 **                     +-|
               |                                                 **                         |
               |                                               **                           |
               |                                             **                             |
               |                                           **                               |
          10GB |-+                                       **                               +-|
               |                                       **                                   |
               |                                     **                                     |
               |                                   **                                       |
           8GB |-+                               **                                       +-|
      waste    |                               **                             ###           |
               |                             **                           ####              |
               |                           **                      #######                  |
           6GB |-+                     ****                    ####                       +-|
               |                      *                    ####                             |
               |                     *                 ####                                 |
               |                *****              ####                                     |
           4GB |-+            **               ####                                       +-|
               |            **             ####                                             |
               |          **           ####                                                 |
               |        **         ####                                                     |
           2GB |-+    **      #####                                                       +-|
               |     *    ####                                                              |
               |    * ####                                                   Before ******* |
               |  **##      +            +            +           +           After ####### |
               +----------------------------------------------------------------------------+
               0            50          100          150         200          250          300
                                                CPUs count
      
      On the y-axis we can see gigabytes of wasted virtual memory during boot
      due to duplicate module requests which just end up failing. Trying to
      infer the slope this ends up being about ~463 MiB per CPU lost prior
      to this patch. After this patch we only loose about ~230 MiB per CPU, for
      a total savings of about ~233 MiB per CPU. This is all *just on bootup*!
      
      On a 8vcpu 8 GiB RAM system using kdevops and testing against selftests
      kmod.sh -t 0008 I see a saving in the *highest* side of memory
      consumption of up to ~ 84 MiB with the Linux kernel selftests kmod
      test 0008. With the new stress-ng module test I see a 145 MiB difference
      in max memory consumption with 100 ops. The stress-ng module ops tests can be
      pretty pathalogical -- it is not realistic, however it was used to
      finally successfully reproduce issues which are only reported to happen on
      system with over 400 CPUs [0] by just usign 100 ops on a 8vcpu 8 GiB RAM
      system. Running out of virtual memory space is no surprise given the
      above graph, since at least on x86_64 we're capped at 128 MiB, eventually
      we'd hit a series of errors and once can use the above graph to
      guestimate when. This of course will vary depending on the features
      you have enabled. So for instance, enabling KASAN seems to make this
      much worse.
      
      The results with kmod and stress-ng can be observed and visualized below.
      The time it takes to run the test is also not affected.
      
      The kmod tests 0008:
      
      The gnuplot is set to a range from 400000 KiB (390 Mib) - 580000 (566 Mib)
      given the tests peak around that range.
      
      cat kmod.plot
      set term dumb
      set output fileout
      set yrange [400000:580000]
      plot filein with linespoints title "Memory usage (KiB)"
      
      Before:
      root@kmod ~ # /data/linux-next/tools/testing/selftests/kmod/kmod.sh -t 0008
      root@kmod ~ # free -k -s 1 -c 40 | grep Mem | awk '{print $3}' > log-0008-before.txt ^C
      root@kmod ~ # sort -n -r log-0008-before.txt | head -1
      528732
      
      So ~516.33 MiB
      
      After:
      
      root@kmod ~ # /data/linux-next/tools/testing/selftests/kmod/kmod.sh -t 0008
      root@kmod ~ # free -k -s 1 -c 40 | grep Mem | awk '{print $3}' > log-0008-after.txt ^C
      
      root@kmod ~ # sort -n -r log-0008-after.txt | head -1
      442516
      
      So ~432.14 MiB
      
      That's about 84 ~MiB in savings in the worst case. The graphs:
      
      root@kmod ~ # gnuplot -e "filein='log-0008-before.txt'; fileout='graph-0008-before.txt'" kmod.plot
      root@kmod ~ # gnuplot -e "filein='log-0008-after.txt';  fileout='graph-0008-after.txt'"  kmod.plot
      
      root@kmod ~ # cat graph-0008-before.txt
      
        580000 +-----------------------------------------------------------------+
               |       +        +       +       +       +        +       +       |
        560000 |-+                                    Memory usage (KiB) ***A***-|
               |                                                                 |
        540000 |-+                                                             +-|
               |                                                                 |
               |        *A     *AA*AA*A*AA          *A*AA    A*A*A *AA*A*AA*A  A |
        520000 |-+A*A*AA  *AA*A           *A*AA*A*AA     *A*A     A          *A+-|
               |*A                                                               |
        500000 |-+                                                             +-|
               |                                                                 |
        480000 |-+                                                             +-|
               |                                                                 |
        460000 |-+                                                             +-|
               |                                                                 |
               |                                                                 |
        440000 |-+                                                             +-|
               |                                                                 |
        420000 |-+                                                             +-|
               |       +        +       +       +       +        +       +       |
        400000 +-----------------------------------------------------------------+
               0       5        10      15      20      25       30      35      40
      
      root@kmod ~ # cat graph-0008-after.txt
      
        580000 +-----------------------------------------------------------------+
               |       +        +       +       +       +        +       +       |
        560000 |-+                                    Memory usage (KiB) ***A***-|
               |                                                                 |
        540000 |-+                                                             +-|
               |                                                                 |
               |                                                                 |
        520000 |-+                                                             +-|
               |                                                                 |
        500000 |-+                                                             +-|
               |                                                                 |
        480000 |-+                                                             +-|
               |                                                                 |
        460000 |-+                                                             +-|
               |                                                                 |
               |          *A              *A*A                                   |
        440000 |-+A*A*AA*A  A       A*A*AA    A*A*AA*A*AA*A*AA*A*AA*AA*A*AA*A*AA-|
               |*A           *A*AA*A                                             |
        420000 |-+                                                             +-|
               |       +        +       +       +       +        +       +       |
        400000 +-----------------------------------------------------------------+
               0       5        10      15      20      25       30      35      40
      
      The stress-ng module tests:
      
      This is used to run the test to try to reproduce the vmap issues
      reported by David:
      
        echo 0 > /proc/sys/vm/oom_dump_tasks
        ./stress-ng --module 100 --module-name xfs
      
      Prior to this commit:
      root@kmod ~ # free -k -s 1 -c 40 | grep Mem | awk '{print $3}' > baseline-stress-ng.txt
      root@kmod ~ # sort -n -r baseline-stress-ng.txt | head -1
      5046456
      
      After this commit:
      root@kmod ~ # free -k -s 1 -c 40 | grep Mem | awk '{print $3}' > after-stress-ng.txt
      root@kmod ~ # sort -n -r after-stress-ng.txt | head -1
      4896972
      
      5046456 - 4896972
      149484
      149484/1024
      145.98046875000000000000
      
      So this commit using stress-ng reveals saving about 145 MiB in memory
      using 100 ops from stress-ng which reproduced the vmap issue reported.
      
      cat kmod.plot
      set term dumb
      set output fileout
      set yrange [4700000:5070000]
      plot filein with linespoints title "Memory usage (KiB)"
      
      root@kmod ~ # gnuplot -e "filein='baseline-stress-ng.txt'; fileout='graph-stress-ng-before.txt'"  kmod-simple-stress-ng.plot
      root@kmod ~ # gnuplot -e "filein='after-stress-ng.txt'; fileout='graph-stress-ng-after.txt'"  kmod-simple-stress-ng.plot
      
      root@kmod ~ # cat graph-stress-ng-before.txt
      
                 +---------------------------------------------------------------+
        5.05e+06 |-+     + A     +       +       +       +       +       +     +-|
                 |         *                          Memory usage (KiB) ***A*** |
                 |         *                             A                       |
           5e+06 |-+      **                            **                     +-|
                 |        **                            * *    A                 |
        4.95e+06 |-+      * *                          A  *   A*               +-|
                 |        * *      A       A           *  *  *  *             A  |
                 |       *  *     * *     * *        *A   *  *  *      A      *  |
         4.9e+06 |-+     *  *     * A*A   * A*AA*A  A      *A    **A   **A*A  *+-|
                 |       A  A*A  A    *  A       *  *      A     A *  A    * **  |
                 |      *      **      **         * *              *  *    * * * |
        4.85e+06 |-+   A       A       A          **               *  *     ** *-|
                 |     *                           *               * *      ** * |
                 |     *                           A               * *      *  * |
         4.8e+06 |-+   *                                           * *      A  A-|
                 |     *                                           * *           |
        4.75e+06 |-+  *                                            * *         +-|
                 |    *                                            **            |
                 |    *  +       +       +       +       +       + **    +       |
         4.7e+06 +---------------------------------------------------------------+
                 0       5       10      15      20      25      30      35      40
      
      root@kmod ~ # cat graph-stress-ng-after.txt
      
                 +---------------------------------------------------------------+
        5.05e+06 |-+     +       +       +       +       +       +       +     +-|
                 |                                    Memory usage (KiB) ***A*** |
                 |                                                               |
           5e+06 |-+                                                           +-|
                 |                                                               |
        4.95e+06 |-+                                                           +-|
                 |                                                               |
                 |                                                               |
         4.9e+06 |-+                                      *AA                  +-|
                 |  A*AA*A*A  A  A*AA*AA*A*AA*A  A  A  A*A   *AA*A*A  A  A*AA*AA |
                 |  *      * **  *            *  *  ** *            ***  *       |
        4.85e+06 |-+*       ***  *            * * * ***             A *  *     +-|
                 |  *       A *  *             ** * * A               *  *       |
                 |  *         *  *             *  **                  *  *       |
         4.8e+06 |-+*         *  *             A   *                  *  *     +-|
                 | *          * *                  A                  * *        |
        4.75e+06 |-*          * *                                     * *      +-|
                 | *          * *                                     * *        |
                 | *     +    * *+       +       +       +       +    * *+       |
         4.7e+06 +---------------------------------------------------------------+
                 0       5       10      15      20      25      30      35      40
      
      [0] https://lkml.kernel.org/r/20221013180518.217405-1-david@redhat.comReported-by: default avatarDavid Hildenbrand <david@redhat.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      064f4536
    • Luis Chamberlain's avatar
      module: add debug stats to help identify memory pressure · df3e764d
      Luis Chamberlain authored
      Loading modules with finit_module() can end up using vmalloc(), vmap()
      and vmalloc() again, for a total of up to 3 separate allocations in the
      worst case for a single module. We always kernel_read*() the module,
      that's a vmalloc(). Then vmap() is used for the module decompression,
      and if so the last read buffer is freed as we use the now decompressed
      module buffer to stuff data into our copy module. The last allocation is
      specific to each architectures but pretty much that's generally a series
      of vmalloc() calls or a variation of vmalloc to handle ELF sections with
      special permissions.
      
      Evaluation with new stress-ng module support [1] with just 100 ops
      is proving that you can end up using GiBs of data easily even with all
      care we have in the kernel and userspace today in trying to not load modules
      which are already loaded. 100 ops seems to resemble the sort of pressure a
      system with about 400 CPUs can create on module loading. Although issues
      relating to duplicate module requests due to each CPU inucurring a new
      module reuest is silly and some of these are being fixed, we currently lack
      proper tooling to help diagnose easily what happened, when it happened
      and who likely is to blame -- userspace or kernel module autoloading.
      
      Provide an initial set of stats which use debugfs to let us easily scrape
      post-boot information about failed loads. This sort of information can
      be used on production worklaods to try to optimize *avoiding* redundant
      memory pressure using finit_module().
      
      There's a few examples that can be provided:
      
      A 255 vCPU system without the next patch in this series applied:
      
      Startup finished in 19.143s (kernel) + 7.078s (userspace) = 26.221s
      graphical.target reached after 6.988s in userspace
      
      And 13.58 GiB of virtual memory space lost due to failed module loading:
      
      root@big ~ # cat /sys/kernel/debug/modules/stats
               Mods ever loaded       67
           Mods failed on kread       0
      Mods failed on decompress       0
        Mods failed on becoming       0
            Mods failed on load       1411
              Total module size       11464704
            Total mod text size       4194304
             Failed kread bytes       0
        Failed decompress bytes       0
          Failed becoming bytes       0
              Failed kmod bytes       14588526272
       Virtual mem wasted bytes       14588526272
               Average mod size       171115
          Average mod text size       62602
        Average fail load bytes       10339140
      Duplicate failed modules:
                    module-name        How-many-times                    Reason
                      kvm_intel                   249                      Load
                            kvm                   249                      Load
                      irqbypass                     8                      Load
               crct10dif_pclmul                   128                      Load
            ghash_clmulni_intel                    27                      Load
                   sha512_ssse3                    50                      Load
                 sha512_generic                   200                      Load
                    aesni_intel                   249                      Load
                    crypto_simd                    41                      Load
                         cryptd                   131                      Load
                          evdev                     2                      Load
                      serio_raw                     1                      Load
                     virtio_pci                     3                      Load
                           nvme                     3                      Load
                      nvme_core                     3                      Load
          virtio_pci_legacy_dev                     3                      Load
          virtio_pci_modern_dev                     3                      Load
                         t10_pi                     3                      Load
                         virtio                     3                      Load
                   crc32_pclmul                     6                      Load
                 crc64_rocksoft                     3                      Load
                   crc32c_intel                    40                      Load
                    virtio_ring                     3                      Load
                          crc64                     3                      Load
      
      The following screen shot, of a simple 8vcpu 8 GiB KVM guest with the
      next patch in this series applied, shows 226.53 MiB are wasted in virtual
      memory allocations which due to duplicate module requests during boot.
      It also shows an average module memory size of 167.10 KiB and an an
      average module .text + .init.text size of 61.13 KiB. The end shows all
      modules which were detected as duplicate requests and whether or not
      they failed early after just the first kernel_read*() call or late after
      we've already allocated the private space for the module in
      layout_and_allocate(). A system with module decompression would reveal
      more wasted virtual memory space.
      
      We should put effort now into identifying the source of these duplicate
      module requests and trimming these down as much possible. Larger systems
      will obviously show much more wasted virtual memory allocations.
      
      root@kmod ~ # cat /sys/kernel/debug/modules/stats
               Mods ever loaded       67
           Mods failed on kread       0
      Mods failed on decompress       0
        Mods failed on becoming       83
            Mods failed on load       16
              Total module size       11464704
            Total mod text size       4194304
             Failed kread bytes       0
        Failed decompress bytes       0
          Failed becoming bytes       228959096
              Failed kmod bytes       8578080
       Virtual mem wasted bytes       237537176
               Average mod size       171115
          Average mod text size       62602
        Avg fail becoming bytes       2758544
        Average fail load bytes       536130
      Duplicate failed modules:
                    module-name        How-many-times                    Reason
                      kvm_intel                     7                  Becoming
                            kvm                     7                  Becoming
                      irqbypass                     6           Becoming & Load
               crct10dif_pclmul                     7           Becoming & Load
            ghash_clmulni_intel                     7           Becoming & Load
                   sha512_ssse3                     6           Becoming & Load
                 sha512_generic                     7           Becoming & Load
                    aesni_intel                     7                  Becoming
                    crypto_simd                     7           Becoming & Load
                         cryptd                     3           Becoming & Load
                          evdev                     1                  Becoming
                      serio_raw                     1                  Becoming
                           nvme                     3                  Becoming
                      nvme_core                     3                  Becoming
                         t10_pi                     3                  Becoming
                     virtio_pci                     3                  Becoming
                   crc32_pclmul                     6           Becoming & Load
                 crc64_rocksoft                     3                  Becoming
                   crc32c_intel                     3                  Becoming
          virtio_pci_modern_dev                     2                  Becoming
          virtio_pci_legacy_dev                     1                  Becoming
                          crc64                     2                  Becoming
                         virtio                     2                  Becoming
                    virtio_ring                     2                  Becoming
      
      [0] https://github.com/ColinIanKing/stress-ng.git
      [1] echo 0 > /proc/sys/vm/oom_dump_tasks
          ./stress-ng --module 100 --module-name xfs
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      df3e764d
    • Luis Chamberlain's avatar
      module: extract patient module check into helper · f71afa6a
      Luis Chamberlain authored
      The patient module check inside add_unformed_module() is large
      enough as we need it. It is a bit hard to read too, so just
      move it to a helper and do the inverse checks first to help
      shift the code and make it easier to read. The new helper then
      is module_patient_check_exists().
      
      To make this work we need to mvoe the finished_loading() up,
      we do that without making any functional changes to that routine.
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      f71afa6a
    • Luis Chamberlain's avatar
      modules/kmod: replace implementation with a semaphore · 25a1b5b5
      Luis Chamberlain authored
      Simplify the concurrency delimiter we use for kmod with the semaphore.
      I had used the kmod strategy to try to implement a similar concurrency
      delimiter for the kernel_read*() calls from the finit_module() path
      so to reduce vmalloc() memory pressure. That effort didn't provide yet
      conclusive results, but one thing that became clear is we can use
      the suggested alternative solution with semaphores which Linus hinted
      at instead of using the atomic / wait strategy.
      
      I've stress tested this with kmod test 0008:
      
      time /data/linux-next/tools/testing/selftests/kmod/kmod.sh -t 0008
      
      And I get only a *slight* delay. That delay however is small, a few
      seconds for a full test loop run that runs 150 times, for about ~30-40
      seconds. The small delay is worth the simplfication IMHO.
      Reviewed-by: default avatarDavidlohr Bueso <dave@stgolabs.net>
      Reviewed-by: default avatarMiroslav Benes <mbenes@suse.cz>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      25a1b5b5
    • Peter Zijlstra's avatar
      Change DEFINE_SEMAPHORE() to take a number argument · 48380368
      Peter Zijlstra authored
      Fundamentally semaphores are a counted primitive, but
      DEFINE_SEMAPHORE() does not expose this and explicitly creates a
      binary semaphore.
      
      Change DEFINE_SEMAPHORE() to take a number argument and use that in the
      few places that open-coded it using __SEMAPHORE_INITIALIZER().
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      [mcgrof: add some tribal knowledge about why some folks prefer
       binary sempahores over mutexes]
      Reviewed-by: default avatarSergey Senozhatsky <senozhatsky@chromium.org>
      Reviewed-by: default avatarDavidlohr Bueso <dave@stgolabs.net>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      48380368
  2. 14 Apr, 2023 4 commits
    • Luis Chamberlain's avatar
      module: fix kmemleak annotations for non init ELF sections · 430bb0d1
      Luis Chamberlain authored
      Commit ac3b4328 ("module: replace module_layout with module_memory")
      reworked the way to handle memory allocations to make it clearer. But it
      lost in translation how we handled kmemleak_ignore() or kmemleak_not_leak()
      for different ELF sections.
      
      Fix this and clarify the comments a bit more. Contrary to the old way
      of using kmemleak_ignore() for init.* ELF sections we stick now only to
      kmemleak_not_leak() as per suggestion by Catalin Marinas so to avoid
      any false positives and simplify the code.
      
      Fixes: ac3b4328 ("module: replace module_layout with module_memory")
      Reported-by: default avatarJim Cromie <jim.cromie@gmail.com>
      Acked-by: default avatarSong Liu <song@kernel.org>
      Suggested-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      430bb0d1
    • Tiezhu Yang's avatar
      module: Ignore L0 and rename is_arm_mapping_symbol() · 0a3bf860
      Tiezhu Yang authored
      The L0 symbol is generated when build module on LoongArch, ignore it in
      modpost and when looking at module symbols, otherwise we can not see the
      expected call trace.
      
      Now is_arm_mapping_symbol() is not only for ARM, in order to reflect the
      reality, rename is_arm_mapping_symbol() to is_mapping_symbol().
      
      This is related with commit c17a2538 ("mksysmap: Fix the mismatch of
      'L0' symbols in System.map").
      
      (1) Simple test case
      
        [loongson@linux hello]$ cat hello.c
        #include <linux/init.h>
        #include <linux/module.h>
        #include <linux/printk.h>
      
        static void test_func(void)
        {
        	  pr_info("This is a test\n");
      	  dump_stack();
        }
      
        static int __init hello_init(void)
        {
      	  pr_warn("Hello, world\n");
      	  test_func();
      
      	  return 0;
        }
      
        static void __exit hello_exit(void)
        {
      	  pr_warn("Goodbye\n");
        }
      
        module_init(hello_init);
        module_exit(hello_exit);
        MODULE_LICENSE("GPL");
        [loongson@linux hello]$ cat Makefile
        obj-m:=hello.o
      
        ccflags-y += -g -Og
      
        all:
      	  make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) modules
        clean:
      	  make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) clean
      
      (2) Test environment
      
      system: LoongArch CLFS 5.5
      https://github.com/sunhaiyong1978/CLFS-for-LoongArch/releases/tag/5.0
      It needs to update grub to avoid booting error "invalid magic number".
      
      kernel: 6.3-rc1 with loongson3_defconfig + CONFIG_DYNAMIC_FTRACE=y
      
      (3) Test result
      
      Without this patch:
      
        [root@linux hello]# insmod hello.ko
        [root@linux hello]# dmesg
        ...
        Hello, world
        This is a test
        ...
        Call Trace:
        [<9000000000223728>] show_stack+0x68/0x18c
        [<90000000013374cc>] dump_stack_lvl+0x60/0x88
        [<ffff800002050028>] L0\x01+0x20/0x2c [hello]
        [<ffff800002058028>] L0\x01+0x20/0x30 [hello]
        [<900000000022097c>] do_one_initcall+0x88/0x288
        [<90000000002df890>] do_init_module+0x54/0x200
        [<90000000002e1e18>] __do_sys_finit_module+0xc4/0x114
        [<90000000013382e8>] do_syscall+0x7c/0x94
        [<9000000000221e3c>] handle_syscall+0xbc/0x158
      
      With this patch:
      
        [root@linux hello]# insmod hello.ko
        [root@linux hello]# dmesg
        ...
        Hello, world
        This is a test
        ...
        Call Trace:
        [<9000000000223728>] show_stack+0x68/0x18c
        [<90000000013374cc>] dump_stack_lvl+0x60/0x88
        [<ffff800002050028>] test_func+0x28/0x34 [hello]
        [<ffff800002058028>] hello_init+0x28/0x38 [hello]
        [<900000000022097c>] do_one_initcall+0x88/0x288
        [<90000000002df890>] do_init_module+0x54/0x200
        [<90000000002e1e18>] __do_sys_finit_module+0xc4/0x114
        [<90000000013382e8>] do_syscall+0x7c/0x94
        [<9000000000221e3c>] handle_syscall+0xbc/0x158
      Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
      Tested-by: Youling Tang <tangyouling@loongson.cn> # for LoongArch
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      0a3bf860
    • Tiezhu Yang's avatar
      module: Move is_arm_mapping_symbol() to module_symbol.h · 987d2e0a
      Tiezhu Yang authored
      In order to avoid duplicated code, move is_arm_mapping_symbol() to
      include/linux/module_symbol.h, then remove is_arm_mapping_symbol()
      in the other places.
      Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      987d2e0a
    • Tiezhu Yang's avatar
      module: Sync code of is_arm_mapping_symbol() · 87e5b1e8
      Tiezhu Yang authored
      After commit 2e3a10a1 ("ARM: avoid ARM binutils leaking ELF local
      symbols") and commit d6b73266 ("modpost: fix undefined behavior of
      is_arm_mapping_symbol()"), many differences of is_arm_mapping_symbol()
      exist in kernel/module/kallsyms.c and scripts/mod/modpost.c, just sync
      the code to keep consistent.
      Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      87e5b1e8
  3. 13 Apr, 2023 31 commits
    • Pankaj Raghav's avatar
      scripts/gdb: use mem instead of core_layout to get the module address · b4aff751
      Pankaj Raghav authored
      commit ac3b4328 ("module: replace module_layout with module_memory")
      changed the struct module data structure from module_layout to
      module_memory. The core_layout member which is used while loading
      modules are not available anymore leading to the following error while
      running gdb:
      
      (gdb) lx-symbols
      loading vmlinux
      Python Exception <class 'gdb.error'>: There is no member named core_layout.
      Error occurred in Python: There is no member named core_layout.
      
      Replace core_layout with its new counterpart mem[MOD_TEXT].
      
      Fixes: ac3b4328 ("module: replace module_layout with module_memory")
      Signed-off-by: default avatarPankaj Raghav <p.raghav@samsung.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      b4aff751
    • Nick Alcock's avatar
      interconnect: remove module-related code · 560db7cc
      Nick Alcock authored
      Now the interconnect core can no longer be a module, drop all remaining
      module-related code as well.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Requested-by: default avatarGeorgi Djakov <djakov@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Georgi Djakov <djakov@kernel.org>
      Cc: linux-pm@vger.kernel.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      560db7cc
    • Nick Alcock's avatar
      interconnect: remove MODULE_LICENSE in non-modules · c0a8c5d0
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Georgi Djakov <djakov@kernel.org>
      Cc: linux-pm@vger.kernel.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      c0a8c5d0
    • Nick Alcock's avatar
      zswap: remove MODULE_LICENSE in non-modules · 7e137102
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Seth Jennings <sjenning@redhat.com>
      Cc: Dan Streetman <ddstreet@ieee.org>
      Cc: Vitaly Wool <vitaly.wool@konsulko.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-mm@kvack.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      7e137102
    • Nick Alcock's avatar
      zpool: remove MODULE_LICENSE in non-modules · 68ac1265
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Dan Streetman <ddstreet@ieee.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-mm@kvack.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      68ac1265
    • Nick Alcock's avatar
      x86/mm/dump_pagetables: remove MODULE_LICENSE in non-modules · 569e4d25
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: x86@kernel.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      569e4d25
    • Nick Alcock's avatar
      regulator: stm32-pwr: remove MODULE_LICENSE in non-modules · 1c8744d8
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Liam Girdwood <lgirdwood@gmail.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
      Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
      Cc: linux-stm32@st-md-mailman.stormreply.com
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      1c8744d8
    • Nick Alcock's avatar
      udmabuf: remove MODULE_LICENSE in non-modules · be1c21f1
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: linux-media@vger.kernel.org
      Cc: linaro-mm-sig@lists.linaro.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      be1c21f1
    • Nick Alcock's avatar
      unicode: remove MODULE_LICENSE in non-modules · 573858e8
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Acked-by: default avatarGabriel Krisman Bertazi <krisman@suse.de>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Gabriel Krisman Bertazi <krisman@collabora.com>
      Cc: linux-fsdevel@vger.kernel.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      573858e8
    • Nick Alcock's avatar
      treewide: remove MODULE_LICENSE in non-modules · 7f82b39d
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      7f82b39d
    • Nick Alcock's avatar
      btree: remove MODULE_LICENSE in non-modules · 0c9bf64c
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      0c9bf64c
    • Nick Alcock's avatar
      watch_queue: remove MODULE_LICENSE in non-modules · 958adeef
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      958adeef
    • Nick Alcock's avatar
      drivers: bus: simple-pm-bus: remove MODULE_LICENSE in non-modules · 92a72297
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      92a72297
    • Nick Alcock's avatar
      braille_console: remove MODULE_LICENSE in non-modules · ae6385af
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      ae6385af
    • Nick Alcock's avatar
      bus: remove MODULE_LICENSE in non-modules · 84937573
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      84937573
    • Nick Alcock's avatar
      irqchip: remove MODULE_LICENSE in non-modules · a0d88810
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Nishanth Menon <nm@ti.com>
      Cc: Tero Kristo <kristo@kernel.org>
      Cc: Santosh Shilimkar <ssantosh@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Marc Zyngier <maz@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      a0d88810
    • Nick Alcock's avatar
      soc/tegra: cbb: remove MODULE_LICENSE in non-modules · 295ff94c
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: linux-tegra@vger.kernel.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      295ff94c
    • Nick Alcock's avatar
      power: reset: remove MODULE_LICENSE in non-modules · 24e4dba2
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: linux-pm@vger.kernel.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      24e4dba2
    • Nick Alcock's avatar
      irqchip/irq-sl28cpld: remove MODULE_LICENSE in non-modules · b00cf023
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Acked-by: default avatarMichael Walle <michael@walle.cc>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Michael Walle <michael@walle.cc>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Marc Zyngier <maz@kernel.org>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      b00cf023
    • Nick Alcock's avatar
      rv/reactor: remove MODULE_LICENSE in non-modules · 2fd5ed8b
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Acked-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: linux-trace-devel@vger.kernel.org
      Cc: linux-trace-kernel@vger.kernel.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      2fd5ed8b
    • Nick Alcock's avatar
      reset: mpfs: remove MODULE_LICENSE in non-modules · 39b8452f
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Conor Dooley <conor.dooley@microchip.com>
      Cc: Daire McNamara <daire.mcnamara@microchip.com>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: linux-riscv@lists.infradead.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      39b8452f
    • Nick Alcock's avatar
      clk: microchip: mpfs: remove MODULE_LICENSE in non-modules · 00c8682a
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Conor Dooley <conor.dooley@microchip.com>
      Cc: Daire McNamara <daire.mcnamara@microchip.com>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Cc: Stephen Boyd <sboyd@kernel.org>
      Cc: linux-riscv@lists.infradead.org
      Cc: linux-clk@vger.kernel.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      00c8682a
    • Nick Alcock's avatar
      reset: lantiq: remove MODULE_LICENSE in non-modules · 7bd57c5a
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      7bd57c5a
    • Nick Alcock's avatar
      reset: mchp: sparx5: remove MODULE_LICENSE in non-modules · c9698fd5
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Reviewed-by: default avatarSteen Hegelund <Steen.Hegelund@microchip.com>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: Lars Povlsen <lars.povlsen@microchip.com>
      Cc: Steen Hegelund <Steen.Hegelund@microchip.com>
      Cc: Daniel Machon <daniel.machon@microchip.com>
      Cc: UNGLinuxDriver@microchip.com
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      c9698fd5
    • Nick Alcock's avatar
      clk: renesas: remove MODULE_LICENSE in non-modules · 355a1a4b
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Geert Uytterhoeven <geert+renesas@glider.be>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Cc: Stephen Boyd <sboyd@kernel.org>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: linux-renesas-soc@vger.kernel.org
      Cc: linux-clk@vger.kernel.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      355a1a4b
    • Nick Alcock's avatar
      remoteproc: remove MODULE_LICENSE in non-modules · cc9ab32b
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Reviewed-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
      Acked-by: default avatarMukesh Ojha <quic_mojha@quicinc.com>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Bjorn Andersson <andersson@kernel.org>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: linux-remoteproc@vger.kernel.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      cc9ab32b
    • Nick Alcock's avatar
      power: supply: remove MODULE_LICENSE in non-modules · ec4f7b7f
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: linux-pm@vger.kernel.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      ec4f7b7f
    • Nick Alcock's avatar
      lib: remove MODULE_LICENSE in non-modules · 5e0266f0
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Acked-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Jacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      5e0266f0
    • Nick Alcock's avatar
      pinctrl: renesas: remove MODULE_LICENSE in non-modules · b0840191
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Geert Uytterhoeven <geert+renesas@glider.be>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: linux-renesas-soc@vger.kernel.org
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      b0840191
    • Nick Alcock's avatar
      pinctrl: mediatek: remove MODULE_LICENSE in non-modules · 7da1628c
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Sean Wang <sean.wang@kernel.org>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Matthias Brugger <matthias.bgg@gmail.com>
      Cc: linux-mediatek@lists.infradead.org
      Cc: linux-gpio@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      7da1628c
    • Nick Alcock's avatar
      pinctrl: amd: remove MODULE_LICENSE in non-modules · feb7e8cb
      Nick Alcock authored
      Since commit 8b41fc44 ("kbuild: create modules.builtin without
      Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
      are used to identify modules. As a consequence, uses of the macro
      in non-modules will cause modprobe to misidentify their containing
      object file as a module when it is not (false positives), and modprobe
      might succeed rather than failing with a suitable error message.
      
      So remove it in the files in this commit, none of which can be built as
      modules.
      Signed-off-by: default avatarNick Alcock <nick.alcock@oracle.com>
      Suggested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: linux-modules@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
      Cc: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
      Cc: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      feb7e8cb