1. 25 Jan, 2003 3 commits
  2. 24 Jan, 2003 12 commits
    • Kai Germaschewski's avatar
      kbuild/modules: Check module symbol versions on insmod · d2fdc759
      Kai Germaschewski authored
      Yeah, the final step!
        
      Now that we've got the checksums for the exported symbols and the
      checksums of the unresolved symbols for the module we're loading,
      let's compare and see.
        
      Again, we allow to load a module which has the version info stripped,
      but taint the kernel in that case.
      d2fdc759
    • Kai Germaschewski's avatar
      kbuild/modules: Return the index of the symbol from __find_symbol() · 82455d2e
      Kai Germaschewski authored
      We'll need that index to find the version checksum for the symbol in
      a bit.
      82455d2e
    • Kai Germaschewski's avatar
      kbuild/modules: Record versions for unresolved symbols · dcc38eae
      Kai Germaschewski authored
      In the case of CONFIG_MODVERSIONING, the build step will only
      generate preliminary <module>.o objects, and an additional
      postprocessing step is necessary to record the versions of the unresolved
      symbols and add them into the final <module>.ko
        
      The version information for unresolved symbols is again recorded into
      a special section, "__versions", which contains an array of symbol
      name strings and checksum (struct modversion_info). Size is here not
      an issue, since this section will not be stored permanently in kernel
      memory.
        
      Makefile.modver takes care of the following steps:
      o Collect the version information for all exported symbols from vmlinux
        and all modules which export symbols.
      o For each module, generate a C file which contains the modversion
        information for all unresolved symbols in that module.
      o For each module, compile that C file to an object file
      o Finally, link the <module>.ko using the preliminary <module.o> + the
        version information above.
        
      The first two steps are currently done by not very efficient scripting,
      so there's room for performance improvement using some helper C code.
      dcc38eae
    • Kai Germaschewski's avatar
      kbuild: Don't build final .ko yet when descending with CONFIG_MODVERSIONING · e4ccd604
      Kai Germaschewski authored
      With CONFIG_MODVERSIONING, we need to record the versions of the unresolved
      symbols in the final <module>.ko, which we only know after we finished
      the descending build. So we only build <module>.o in that case.
        
      Also, keep track of the modules we built, the post-processing step needs
      a list of all modules. Keeping track is done by touching
      .tmp_versions/path/to/module.ko
      e4ccd604
    • Kai Germaschewski's avatar
      kbuild: Always link module (.ko) from associated (.o) · caa9e0e0
      Kai Germaschewski authored
      For extracting the versions and finding the unresolved symbols, we
      need multi-part modules to be linked together already, so this
      patch separates the building of the modules as a .o file from generating
      the .ko in the next step.
      caa9e0e0
    • Kai Germaschewski's avatar
      kbuild/modules: Track versions of exported symbols · 1336f151
      Kai Germaschewski authored
      Store the information on the checksum alongside the rest of the 
      information on exported symbols. To actually use them, we need
      something to check them against first, though ;)
      
      Also, fix some conditional debug code to actually compile.
      1336f151
    • Kai Germaschewski's avatar
      kbuild/modules: Don't save the license string · e805cfe6
      Kai Germaschewski authored
      Again, the license string is only used at load time, so no need
      to store it permanently in kernel memory.
      e805cfe6
    • Kai Germaschewski's avatar
      kbuild/modules: Check __vermagic for validity · c8b4778d
      Kai Germaschewski authored
      modprobe --force allows to load modules without a matching version
      magic string. This invalidation is done by clearing the SHF_ALLOC
      flag, so check it in the kernel. Also, clear the SHF_ALLOC flag
      unconditionally, since we don't need to store the __vermagic section
      in the kernel, it's only checked once at load time. 
      c8b4778d
    • Kai Germaschewski's avatar
      kbuild: Generate versions for exported symbols · 09369f63
      Kai Germaschewski authored
      Up to now, we had a way to store the checksums associated with the
      exported symbols, but they were not filled in yet. This is done
      with this patch, using the linker to actually do that for us.
        
      The comment added with this patch explains what magic exactly is going
      on.
      09369f63
    • Kai Germaschewski's avatar
      kbuild: Add CONFIG_MODVERSIONING and __kcrctab · a6b99776
      Kai Germaschewski authored
      This patch adds the new config option CONFIG_MODVERSIONING which will
      be the new way of checking for ABI changes between kernel and module
      code.
      
      This and the following patches are in part based on an initial
      implementation by Rusty Russell and I believe some of the ideas go back
      to discussions on linux-kbuild, Keith Owens and Rusty.
      
      though I'm not sure I think credit for the basic idea of
      storing version info in sections goes to Keith Owens and Rusty.
      
      o Rename __gpl_ksymtab to __ksymtab_gpl since that looks more consistent
        and appending _gpl instead of putting it into the middle simplifies
        sharing code for EXPORT_SYMBOL() and EXPORT_SYMBOL_GPL()
      o Add CONFIG_MODVERSIONING
      o If CONFIG_MODVERSIONING is set, add a section __kcrctab{,_gpl}, which
        contains the ABI checksums for the exported symbols listed in 
        __ksymtab{,_crc} Since we don't know the checksums yet at compilation
        time, just make them an unresolved symbol which gets filled in by the
        linker later.
      a6b99776
    • Kai Germaschewski's avatar
      kbuild: Remove obsolete CONFIG_MODVERSIONS cruft · 81106eac
      Kai Germaschewski authored
      Though the CONFIG_MODVERSIONS option was removed with rusty's module
      rewrite and the associated code broken, a lot of that code was still
      living on here and there. Now it's gone for good.
      81106eac
    • Kai Germaschewski's avatar
      kbuild: Remove -DEXPORT_SYMTAB switch · 61cfcb3d
      Kai Germaschewski authored
      rusty's module rewrite removed the reference to EXPORT_SYMTAB 
      from linux/module.h, and it's not used anywhere else, either.
      61cfcb3d
  3. 17 Jan, 2003 1 commit
    • Kai Germaschewski's avatar
      kbuild: Fix __start_SECTION, __stop_SECTION · aae7d999
      Kai Germaschewski authored
      In a discussion with Sam Ravnborg, the following problem became apparent:
      Most vmlinux.lds.S (but the ARM ones) used the following construct:
        
             __start___ksymtab = .;                                          
             __ksymtab         : AT(ADDR(__ksymtab) - LOAD_OFFSET) {         
                     *(__ksymtab)                                            
             }                                                               
             __stop___ksymtab = .;                                           
        
      However, the link will align the beginning of the section __ksymtab
      according to the requirements for the input sections. If '.' (current
      location counter) wasn't sufficiently aligned before, it's possible
      that __ksymtab actually starts at an address after the one
      __start___ksymtab points to, which will confuse the users of
      __start___ksymtab badly. The fix is to follow what the ARM Makefiles
      did for this case, ie
        
             __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) {                 
                     __start___ksymtab = .;                                  
                     *(__ksymtab)                                            
                     __stop___ksymtab = .;                                   
             }                                                               
      aae7d999
  4. 16 Jan, 2003 24 commits
    • Linus Torvalds's avatar
      Linux v2.5.59 · 6a3354a9
      Linus Torvalds authored
      6a3354a9
    • Linus Torvalds's avatar
      Merge bk://bk.arm.linux.org.uk · 6a48e1ca
      Linus Torvalds authored
      into home.transmeta.com:/home/torvalds/v2.5/linux
      6a48e1ca
    • Russell King's avatar
      [ARM] Fix Integrator __virt_to_bus/__bus_to_virt · 5c157415
      Russell King authored
      __virt_to_bus/__bus_to_virt depended on INTEGRATOR_HDR0_SDRAM_BASE
      Unfortunately, this is defined in arch-integrator/platform.h, and
      we really don't want to include it in memory.h.
      
      We instead use BUS_OFFSET, which will eventually depend on the CPU
      number in the system.
      5c157415
    • Russell King's avatar
      [ARM/IDE] Fix BLK_DEV_IDEDMA setting on non-Acorn ARM systems · 4a78c70e
      Russell King authored
      Only default BLK_DEV_IDEDMA on BLK_DEV_IDEDMA_ICS if ARCH_ACORN is
      set, not if ARM is set.  There are PCI ARM systems out there!
      4a78c70e
    • Russell King's avatar
      [ARM] Fix failure paths in fd1772.c initialisation · 2b397cb5
      Russell King authored
      Ensure that we clean up properly after initialisation error,
      releasing all claimed resources in an orderly manner and
      returning the correct error code.
      2b397cb5
    • Russell King's avatar
    • Russell King's avatar
      321ea0c8
    • Russell King's avatar
      996e73ac
    • Russell King's avatar
      [ARM] Update acornfb for new fbcon layer. · e3608581
      Russell King authored
      e3608581
    • Russell King's avatar
      [ARM] Update sa1100fb · e1aada59
      Russell King authored
      Add cfbfillrect / cfbcopyarea / cfbimgblt objects for SA1100fb.
      Remove redundant "pm" member.
      e1aada59
    • Jeff Wiedemeier's avatar
      [PATCH] Fix marvel irq count computation. · 7f5ea7bc
      Jeff Wiedemeier authored
      Found a buglet in the marvel code -- doesn't change the number of IRQS
      just the logic to get there.. This applies on top of the other marvel
      code.
      
      /jeff
      7f5ea7bc
    • Richard Henderson's avatar
      Merge kanga.twiddle.net:/home/rth/linux/linus-2.5 · ca370702
      Richard Henderson authored
      into kanga.twiddle.net:/home/rth/linux/axp-2.5
      ca370702
    • Richard Henderson's avatar
    • Richard Henderson's avatar
      [ALPHA] Formatting cleanup, warning removal, move declarations · e62c31e2
      Richard Henderson authored
      to header files where they belong.
      e62c31e2
    • Richard Henderson's avatar
      [ALPHA] Fixups to Marvel and Titan for incomplete merging · 29a54be1
      Richard Henderson authored
      of AGP and SRMCONS patches.
      29a54be1
    • Richard Henderson's avatar
      [ALPHA] Marvel (AlphaServer ES47, ES80, GS1280) support. · f0bde625
      Richard Henderson authored
      From Jeff.Wiedemeier@hp.com.
      f0bde625
    • Richard Henderson's avatar
      [ALPHA] AGP infrastructure for AGP implemented in Alpha corelogic · c0b775bb
      Richard Henderson authored
      (Titan / Marvel), Kconfig and headers.
      
      From Jeff Wiedemeier.
      c0b775bb
    • Martin J. Bligh's avatar
      [PATCH] (3/3) NUMA rebalancer · 63ffe4d6
      Martin J. Bligh authored
      Patch from Erich Focht
      
      This adds a hook to rebalance globally across nodes every NODE_BALANCE_RATE
      iterations of the rebalancer. This allows us to easily tune on an architecture
      specific basis how often we wish to rebalance - machines with higher NUMA
      ratios (more expensive off-node access) will want to do this less often.
      It's currently set to 100 for NUMA-Q and 10 for other machines. If the
      imbalance between nodes is > 125%, we'll rebalance them. The hook for this
      is added to the NUMA definition of cpus_to_balance, so again, no impact
      on non-NUMA machines.
      63ffe4d6
    • Martin J. Bligh's avatar
      [PATCH] (2/3) Initial load balancing · f01419fd
      Martin J. Bligh authored
      Patch from Michael Hohnbaum
      
      This adds a hook, sched_balance_exec(), to the exec code, to make it
      place the exec'ed task on the least loaded queue. We have less state
      to move at exec time than fork time, so this is the cheapest point
      to cross-node migrate. Experience in Dynix/PTX and testing on Linux
      has confirmed that this is the cheapest time to move tasks between nodes.
      
      It also macro-wraps changes to nr_running, to allow us to keep track of
      per-node nr_running as well. Again, no impact on non-NUMA machines.
      f01419fd
    • Martin J. Bligh's avatar
      [PATCH] (1/3) Minimal NUMA scheduler · 5f24fe82
      Martin J. Bligh authored
      Patch from Martin J. Bligh
      
      This adds a small hook to the find_busiest_queue routine to allow us to
      specify a mask of which CPUs to search over. In the NUMA case, it will
      only balance inside the node (much cheaper to search, and stops tasks
      from bouncing across nodes, which is very costly). The cpus_to_balance
      routine is conditionally defined to ensure no impact to non-NUMA machines.
      
      This is a tiny NUMA scheduler, but it needs the assistance of the second
      and third patches in order to spread tasks across nodes.
      5f24fe82
    • Christoph Hellwig's avatar
      [PATCH] remove MOD_IN_USE · ca58c4b6
      Christoph Hellwig authored
      Another left-over from ancient module code, it was supposed to return
      non-zero if the module has a use count, but currently it always
      evaluates to 0.
      
      There are a few users of different types:
      (1)  ioctl that perform a while(MOD_IN_USE) MOD_DEC_USE_COUNT loop.
           Just rip them out, we now have forced module unloading.
      (2)  printk's that moan if the use-count in not zero in the exitfunc.
           Just rip them out, this can't happen.
      (3)  if(MOD_IN_USE) MOD_DEC_USE_COUNT constructs in ->close of a few
           serial drivers.  Just remove the conditional, we did a
           MOD_INC_USE_COUNT in ->open.
      (4)  This one is interesting:  drivers/sbus/char/display7seg.c uses
           the module use count to track openers.  Replace this with an
           atomic_t.
      
      In addition remove tons of stale comments in network driver that aren't
      understandable for anyone who doesn't know ancient Linux module semantics.
      ca58c4b6
    • Andi Kleen's avatar
      [PATCH] x86_64 update · cf34d923
      Andi Kleen authored
      x86-64 updates for 2.5.58. Changes only x86-64 specific files.
      
       - Rewrote module allocation. Lots of bugs fixed. Module loading
         should work now again.
       - Kconfig help fixes from Randy Dunlap
       - Makefile cleanups from Pavel Machek and Sam Ravnborg
       - Assembly cleanups from Pavel
       - defconfig update
       - Better strlen_user/strnlen_user
       - Merge with i386: new ptrace commands, 32bit vsyscall signal trampolines
      		new deactivate_mm, add asm/bug.h
       - Make sure initramfs is freed after booting (thanks to Kai for the hint)
       - User per cpu data for profile counters (Ravikiran Thirumalai)
       - 32bit compat_* updates from Stephen Rothwell
       - Fix race in context switch. The exception handler for bogus segment
         loads in __switch_to needs to keep interrupts disabled, otherwise an
         interrupt can deadlock on scheduler locks.  Also make sure they don't
         printk or set oops_in_progress during printk because printk does a
         wake_up too.
       - Disable 64bit GS base changes for processes.  I cannot get it to work
         reliably.
       - Clear IOPL on kernel entry
      cf34d923
    • Ivan Kokshaysky's avatar
      [PATCH] alpha smp callin · 1afaccae
      Ivan Kokshaysky authored
      From Jeff.Wiedemeier@hp.com:
      
      Add platform-specific callin for SMP.
      1afaccae
    • Ivan Kokshaysky's avatar
      [PATCH] alpha irq proc update · 7d0effa8
      Ivan Kokshaysky authored
      From Jeff.Wiedemeier@hp.com:
      
      - Only create smp_affinity /proc nodes if a set_affinity handler
        is provided.
      - Limit the number of irq nodes that will be created in /proc
        to avoid overfilling the /proc inode space.
      7d0effa8