1. 25 Mar, 2006 2 commits
    • Arjan van de Ven's avatar
      [PATCH] x86_64: Basic reorder infrastructure · 4bdc3b7f
      Arjan van de Ven authored
      This patch puts the infrastructure in place to allow for a reordering of
      functions based inside the vmlinux. The general idea is that it is possible
      to put all "common" functions into the first 2Mb of the code, so that they
      are covered by one TLB entry. This as opposed to the current situation where
      a typical vmlinux covers about 3.5Mb (on x86-64) and thus 2 TLB entries.
      This is done by enabling the -ffunction-sections flag in gcc, which puts
      each function in its own ELF section, so that the linker can then order them
      in a way defined by the linker script.
      As per previous discussions, Linus said he wanted a "static" list for this,
      eg a list provided by the kernel tarbal, so that most people have the same
      ordering at least. A script is provided to create this list based on
      readprofile(1) output. The included list is provisional, and entirely biased
      on my own testbox and me running a few kernel compiles and some other
      I think that to get to a better list we need to invite people to submit
      their own profiles, and somehow add those all up and base the final list on
      that. I'm willing to do that effort if this is ends up being the prefered
      approach. Such an effort probably needs to be repeated like once a year or
      so to adopt to the changing nature of the kernel.
      Made it a CONFIG with default n because it increases link times
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Jesper Juhl's avatar
      [PATCH] kallsyms: handle malloc() failure · f1a136e0
      Jesper Juhl authored
      This fixes coverity bugs #398 and #397
      Signed-off-by: default avatarJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  2. 24 Mar, 2006 4 commits
  3. 21 Mar, 2006 1 commit
  4. 20 Mar, 2006 1 commit
  5. 17 Mar, 2006 1 commit
    • Sam Ravnborg's avatar
      [PATCH] kbuild: fix buffer overflow in modpost · 7670f023
      Sam Ravnborg authored
      Jiri Benc <jbenc@suse.cz> reported that modpost would stop with SIGABRT if
      used with long filepaths.
      The error looked like:
      >   Building modules, stage 2.
      >   MODPOST
      > *** glibc detected *** scripts/mod/modpost: realloc(): invalid next size:
      +0x0809f588 ***
      > [...]
      Fix this by allocating at least the required memory + SZ bytes each time.
      Before we sometimes ended up allocating too little memory resuting in the
      glibc detected bug above.  Based on patch originally submitted by: Jiri
      Benc <jbenc@suse.cz>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  6. 12 Mar, 2006 5 commits
  7. 08 Mar, 2006 2 commits
  8. 07 Mar, 2006 1 commit
  9. 05 Mar, 2006 4 commits
  10. 04 Mar, 2006 1 commit
    • Sam Ravnborg's avatar
      kbuild: kill false positives from section mismatch warnings for powerpc · 9209aed0
      Sam Ravnborg authored
      Building an allmodconfig kernel for ppc64 revealed a number of false
      positives - originally reported by Andrew Morton.
      This patch removes most if not all false positives for ppc64:
      Section .opd
      The .opd section contains function descriptors at least for ppc64.
      So ignore it for .init.text (was ignored for .exit.text).
      See description of function descriptors here:
      Section .toc1
      ppc64 places some static variables in .toc1 - ignore the.
      Section __bug_tabe
      BUG() and friends uses __bug_table. Ignore warnings from that section.
      Module parameters are placed in .data.rel for ppc64, for adjust pattern to
      match on section named .data*
      Tested with gcc: 3.4.0 and binutils
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
  11. 03 Mar, 2006 1 commit
  12. 27 Feb, 2006 2 commits
  13. 26 Feb, 2006 2 commits
  14. 22 Feb, 2006 2 commits
    • Sam Ravnborg's avatar
      kbuild: do not warn when unwind sections references .init/.exit sections · 6e10133f
      Sam Ravnborg authored
      Andrew Morton reported a number of false positives for ia64 - like these:
      WARNING: drivers/acpi/button.o - Section mismatch: reference to .init.text: from .IA_64.unwind.init.text after '' (at offset 0x0)
      WARNING: drivers/acpi/button.o - Section mismatch: reference to .exit.text: from .IA_64.unwind.exit.text after '' (at offset 0x0)
      WARNING: drivers/acpi/processor.o - Section mismatch: reference to .init.text: from .IA_64.unwind after '' (at offset 0x1e8)
      They are all false positives - or at least the .c code looks OK.
      It is not known why sometimes a section name is appended and sometimes not.
      Fix is to accept references from all sections that includes "unwind." in the name.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
    • akpm@osdl.org's avatar
      kbuild: fix modpost compile with older gcc · fededcd2
      akpm@osdl.org authored
      The kernel now requires that CC be 3.1.0 or higher.  But we shouldn't place
      that requirement upon HOSTCC unless we really need to.  Fixes my ia64 problem.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
  15. 19 Feb, 2006 11 commits
    • Sam Ravnborg's avatar
      kbuild: include symbol names in section mismatch warnings · 93684d3b
      Sam Ravnborg authored
      Try to look up the symbol that is referenced. Include the symbol
      name in the warning message.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
    • Sam Ravnborg's avatar
      kbuild: fix segfault in modpost · 8ea80ca4
      Sam Ravnborg authored
      Do not try to look up section name until we know it is not a special
      section. Otherwise we will address outside legal space and segfault.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
    • Sam Ravnborg's avatar
      kbuild: do not segfault in modpost if MODVERDIR is not defined · 41370d3b
      Sam Ravnborg authored
      A combination of calling modpost with option -a and MODVERDIR undefined
      caused segmentation fault. So provide a default value and accept the
      error messages it generates instead.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
    • Sam Ravnborg's avatar
      kbuild: fix comment in Kbuild.include · 9d6e7a70
      Sam Ravnborg authored
      Noted by Olaf Hering <olh@suse.de>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
    • Brian Gerst's avatar
      kbuild: remove checkconfig.pl · 18a43ba2
      Brian Gerst authored
      checkconfig.pl is no longer needed now that autoconf.h is automatically
      included.  Remove it and all references to it.
      Signed-off-by: default avatarBrian Gerst <bgerst@didntduck.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
    • Jan Beulich's avatar
      kbuild: fix mkmakefile · 96678281
      Jan Beulich authored
      With the current way of generating the Makefile in the output directory
      for builds outside of the source tree, specifying real targets (rather
      than phony ones) doesn't work in an already (partially) built tree, as
      the stub Makefile doesn't have any dependency information available.
      Thus, all targets where files may actually exist must be listed
      explicitly and, due to what I'd call a make misbehavior, directory
      targets must then also be special cased.
      Signed-Off-By: default avatarJan Beulich <jbeulich@novell.com>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
    • Jan Beulich's avatar
      kbuild: consolidate command line escaping · 6176aa9a
      Jan Beulich authored
      While the recent change to also escape # symbols when storing C-file
      compilation command lines was helpful, it should be in effect for all
      command lines, as much as the dollar escaping should be in effect for
      C-source compilation commands. Additionally, for better readability and
      maintenance, consolidating all the escaping (single quotes, dollars,
      and now sharps) was also desirable.
      Signed-Off-By: default avatarJan Beulich <jbeulich@novell.com>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
    • Sam Ravnborg's avatar
      kbuild: make cc-version available in kbuild files · 20a468b5
      Sam Ravnborg authored
      Move $(CC) support functions to Kbuild.include so they are available
      in the kbuild files.
      In addition the following was done:
      	o as-option documented in Documentation/kbuild/makefiles.txt
      	o Moved documentation to new section to match
      	  new scope of functions
      	o added cc-ifversion used to conditionally select a text string
      	  dependent on actual $(CC) version
      	o documented cc-ifversion
      	o change so Kbuild.include is read before the kbuild file
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
    • Sam Ravnborg's avatar
      kbuild: check for section mismatch during modpost stage · b39927cf
      Sam Ravnborg authored
      Section mismatch is identified as references to .init*
      sections from non .init sections. And likewise references
      to .exit.* sections outside .exit sections.
      .init.* sections are discarded after a module is initialized
      and references to .init.* sections are oops candidates.
      .exit.* sections are discarded when a module is built-in and
      thus references to .exit are also oops candidates.
      The checks were possible to do using 'make buildcheck' which
      called the two perl scripts: reference_discarded.pl and
      reference_init.pl. This patch just moves the same functionality
      inside modpost and the scripts are then obsoleted.
      They will though be kept for a while so users can do double
      checks - but note that some .o files are skipped by the perl scripts
      so result is not 1:1.
      All credit for the concept goes to Keith Owens who implemented
      the original perl scrips - this patch just moves it to modpost.
      Compared to the perl script the implmentation in modpost will be run
      for each kernel build - thus catching the error much sooner, but
      the downside is that the individual .o file are not always identified.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
    • Sam Ravnborg's avatar
      kbuild: warn about duplicate exported symbols · 8e70c458
      Sam Ravnborg authored
      In modpost introduce a check for symbols exported twice.
      This check caught only one victim (inet_bind_bucket_create) for
      which a patch is already sent to netdev.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
    • Sam Ravnborg's avatar
      kbuild: improved modversioning support for external modules · 040fcc81
      Sam Ravnborg authored
      With following patch a second option is enabled to obtain
      symbol information from a second external module when a
      external module is build.
      The recommended approach is to use a common kbuild file but
      that may be impractical in certain cases.
      With this patch one can copy over a Module.symvers from one
      external module to make symbols (and symbol versions) available
      for another external module.
      Updated documentation in Documentation/kbuild/modules.txt
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>