1. 04 Jan, 2009 5 commits
    • Helge Deller's avatar
      parisc: fix module loading failure of large kernel modules · c298be74
      Helge Deller authored
      On 32bit (and sometimes 64bit) and with big kernel modules like xfs or
      ipv6 the relocation types R_PARISC_PCREL17F and R_PARISC_PCREL22F may
      fail to reach their PLT stub if we only create one big stub array for
      all sections at the beginning of the core or init section.
      
      With this patch we now instead add individual PLT stub entries
      directly in front of the code sections where the stubs are actually
      called. This reduces the distance between the PCREL location and the
      stub entry so that the relocations can be fulfilled.
      
      While calculating the final layout of the kernel module in memory, the
      kernel module loader calls arch_mod_section_prepend() to request the
      to be reserved amount of memory in front of each individual section.
      
      Tested with 32- and 64bit kernels.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      c298be74
    • Helge Deller's avatar
      module: fix module loading failure of large kernel modules for parisc · 088af9a6
      Helge Deller authored
      When creating the final layout of a kernel module in memory, allow the
      module loader to reserve some additional memory in front of a given section.
      This is currently only needed for the parisc port which needs to put the
      stub entries there to fulfill the 17/22bit PCREL relocations with large
      kernel modules like xfs.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (renamed fn)
      088af9a6
    • Jianjun Kong's avatar
      module: fix warning of unused function when !CONFIG_PROC_FS · d1e99d7a
      Jianjun Kong authored
      Fix this warning:
      kernel/module.c:824: warning: ‘print_unload_info’ defined but not used
      print_unload_info() just was used when CONFIG_PROC_FS was defined.
      This patch mark print_unload_info() inline to solve the problem.
      Signed-off-by: default avatarJianjun Kong <jianjun@zeuux.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      CC: Ingo Molnar <mingo@elte.hu>
      CC: Américo Wang <xiyou.wangcong@gmail.com>
      d1e99d7a
    • Tim Abbott's avatar
      kernel/module.c: compare symbol values when marking symbols as exported in /proc/kallsyms. · ca4787b7
      Tim Abbott authored
      When there are two symbols in a module with the same name, one of which is
      exported, both will be marked as exported in /proc/kallsyms.  There aren't
      any instances of this in the current kernel, but it is easy to construct a
      simple module with two compilation units that exhibits the problem.
      
      $ objdump -j .text -t testmod.ko | grep foo
      00000000 l     F .text	00000032 foo
      00000080 g     F .text	00000001 foo
      $ sudo insmod testmod.ko
      $ grep "T foo" /proc/kallsyms
      c28e8000 T foo	[testmod]
      c28e8080 T foo	[testmod]
      
      Fix this by comparing the symbol values once we've found the exported
      symbol table entry matching the symbol name.  Tested using Ksplice:
      
      $ ksplice-create --patch=this_commit.patch --id=bar .
      $ sudo ksplice-apply ksplice-bar.tar.gz
      Done!
      $ grep "T foo" /proc/kallsyms
      c28e8080 T foo	[testmod]
      Signed-off-by: default avatarTim Abbott <tabbott@mit.edu>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      ca4787b7
    • Johannes Berg's avatar
      remove CONFIG_KMOD · a327ca2c
      Johannes Berg authored
      Now that nothing depends on it any more, remove CONFIG_KMOD.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      a327ca2c
  2. 03 Jan, 2009 35 commits