1. 22 1月, 2014 1 次提交
  2. 13 6月, 2013 1 次提交
  3. 17 4月, 2013 4 次提交
  4. 28 1月, 2013 1 次提交
  5. 24 5月, 2012 2 次提交
    • H
      x86, relocs: Add jiffies and jiffies_64 to the relative whitelist · ea17e741
      H. Peter Anvin 提交于
      The symbol jiffies is created in the linker script as an alias to
      jiffies_64.  Unfortunately this is done outside any section, and
      apparently GNU ld 2.21 doesn't carry the section with it, so we end up
      with an absolute symbol and therefore a broken kernel.
      
      Add jiffies and jiffies_64 to the whitelist.
      
      The most disturbing bit with this discovery is that it shows that we
      have had multiple linker bugs in this area crossing multiple
      generations, and have been silently building bad kernels for some time.
      
      Link: http://lkml.kernel.org/r/20120524171604.0d98284f3affc643e9714470@canb.auug.org.auReported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: <stable@vger.kernel.org> v3.4
      ea17e741
    • H
      x86-32, relocs: Whitelist more symbols for ld bug workaround · fd952815
      H. Peter Anvin 提交于
      As noted in checkin:
      
      a3e854d9 x86, relocs: Workaround for binutils 2.22.52.0.1 section bug
      
      ld version 2.22.52.0.[12] can incorrectly promote relative symbols to
      absolute, if the output section they appear in is otherwise empty.
      
      Since checkin:
      
      6520fe55 x86, realmode: 16-bit real-mode code support for relocs tool
      
      we actually check for this and error out rather than silently creating
      a kernel which will malfunction if relocated.
      
      Ingo found a configuration in which __start_builtin_fw triggered the
      warning.
      
      Go through the linker script sources and look for more symbols that
      could plausibly get bogusly promoted to absolute, and add them to the
      whitelist.
      
      In general, if the following error triggers:
      
      	Invalid absolute R_386_32 relocation: <symbol>
      
      ... then we should verify that <symbol> is really meant to be
      relocated, and add it and any related symbols manually to the S_REL
      regexp.
      
      Please note that 6520fe55 does not introduce the error, only the check
      for the error -- without 6520fe55 this version of ld will simply
      produce a corrupt kernel if CONFIG_RELOCATABLE is set on x86-32.
      Reported-by: NIngo Molnar <mingo@kernel.org>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: <stable@vger.kernel.org> v3.4
      fd952815
  6. 19 5月, 2012 3 次提交
    • H
      x86, relocs: When printing an error, say relative or absolute · 24ab82bd
      H. Peter Anvin 提交于
      When the relocs tool throws an error, let the error message say if it
      is an absolute or relative symbol.  This should make it a lot more
      clear what action the programmer needs to take and should help us find
      the reason if additional symbol bugs show up.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: <stable@vger.kernel.org>
      24ab82bd
    • H
      x86, relocs: Workaround for binutils 2.22.52.0.1 section bug · a3e854d9
      H. Peter Anvin 提交于
      GNU ld 2.22.52.0.1 has a bug that it blindly changes symbols from
      section-relative to absolute if they are in a section of zero length.
      This turns the symbols __init_begin and __init_end into absolute
      symbols.  Let the relocs program know that those should be treated as
      relative symbols.
      Reported-by: NIngo Molnar <mingo@kernel.org>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: H.J. Lu <hjl.tools@gmail.com>
      Cc: <stable@vger.kernel.org>
      Cc: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
      a3e854d9
    • H
      x86, realmode: 16-bit real-mode code support for relocs tool · 6520fe55
      H. Peter Anvin 提交于
      A new option is added to the relocs tool called '--realmode'.
      This option causes the generation of 16-bit segment relocations
      and 32-bit linear relocations for the real-mode code. When
      the real-mode code is moved to the low-memory during kernel
      initialization, these relocation entries can be used to
      relocate the code properly.
      
      In the assembly code 16-bit segment relocations must be relative
      to the 'real_mode_seg' absolute symbol. Linear relocations must be
      relative to a symbol prefixed with 'pa_'.
      
      16-bit segment relocation is used to load cs:ip in 16-bit code.
      Linear relocations are used in the 32-bit code for relocatable
      data references. They are declared in the linker script of the
      real-mode code.
      
      The relocs tool is moved to arch/x86/tools/relocs.c, and added new
      target archscripts that can be used to build scripts needed building
      an architecture.  be compiled before building the arch/x86 tree.
      
      [ hpa: accelerating this because it detects invalid absolute
        relocations, a serious bug in binutils 2.22.52.0.x which currently
        produces bad kernels. ]
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      Link: http://lkml.kernel.org/r/1336501366-28617-2-git-send-email-jarkko.sakkinen@intel.comSigned-off-by: NJarkko Sakkinen <jarkko.sakkinen@intel.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      Cc: <stable@vger.kernel.org>
      6520fe55
  7. 09 5月, 2012 1 次提交
  8. 01 5月, 2012 1 次提交
  9. 30 4月, 2012 1 次提交
  10. 29 2月, 2012 1 次提交
  11. 26 5月, 2010 1 次提交
    • L
      Revert "endian: #define __BYTE_ORDER" · 13da9e20
      Linus Torvalds 提交于
      This reverts commit b3b77c8c, which was
      also totally broken (see commit 0d2daf5c that reverted the crc32
      version of it).  As reported by Stephen Rothwell, it causes problems on
      big-endian machines:
      
      > In file included from fs/jfs/jfs_types.h:33,
      >                  from fs/jfs/jfs_incore.h:26,
      >                  from fs/jfs/file.c:22:
      > fs/jfs/endian24.h:36:101: warning: "__LITTLE_ENDIAN" is not defined
      
      The kernel has never had that crazy "__BYTE_ORDER == __LITTLE_ENDIAN"
      model.  It's not how we do things, and it isn't how we _should_ do
      things.  So don't go there.
      Requested-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      13da9e20
  12. 25 5月, 2010 1 次提交
  13. 15 12月, 2009 1 次提交
    • H
      x86: Regex support and known-movable symbols for relocs, fix _end · 873b5271
      H. Peter Anvin 提交于
      This adds a new category of symbols to the relocs program: symbols
      which are known to be relative, even though the linker emits them as
      absolute; this is the case for symbols that live in the linker script,
      which currently applies to _end.
      
      Unfortunately the previous workaround of putting _end in its own empty
      section was defeated by newer binutils, which remove empty sections
      completely.
      
      This patch also changes the symbol matching to use regular expressions
      instead of hardcoded C for specific patterns.
      
      This is a decidedly non-minimal patch: a modified version of the
      relocs program is used as part of the Syslinux build, and this 	is
      basically a backport to Linux of some of those changes; they have
      thus been well tested.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      LKML-Reference: <4AF86211.3070103@zytor.com>
      Acked-by: NMichal Marek <mmarek@suse.cz>
      Tested-by: NSedat Dilek <sedat.dilek@gmail.com>
      873b5271
  14. 26 5月, 2009 1 次提交
    • T
      x86, relocs: ignore R_386_NONE in kernel relocation entries · 46176b4f
      Tejun Heo 提交于
      For relocatable 32bit kernels, boot/compressed/relocs.c processes
      relocation entries in the kernel image and appends it to the kernel
      image such that boot/compressed/head_32.S can relocate the kernel.
      The kernel image is one statically linked object and only uses two
      relocation types - R_386_PC32 and R_386_32, of the two only the latter
      needs massaging during kernel relocation and thus handled by relocs.
      R_386_PC32 is ignored and all other relocation types are considered
      error.
      
      When the target of a relocation resides in a discarded section,
      binutils doesn't throw away the relocation record but nullifies it by
      changing it to R_386_NONE, which unfortunately makes relocs fail.
      
      The problem was triggered by yet out-of-tree x86 stack unwind patches
      but given the binutils behavior, ignoring R_386_NONE is the right
      thing to do.
      
      The problem has been tracked down to binutils behavior by Jan Beulich.
      
      [ Impact: fix build with certain binutils by ignoring R_386_NONE ]
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Jan Beulich <JBeulich@novell.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      LKML-Reference: <4A1B8150.40702@kernel.org>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      46176b4f
  15. 04 10月, 2008 1 次提交
  16. 01 7月, 2008 1 次提交
  17. 05 5月, 2008 1 次提交
  18. 30 1月, 2008 1 次提交
  19. 24 10月, 2007 1 次提交
  20. 11 10月, 2007 1 次提交
  21. 20 7月, 2007 1 次提交
  22. 18 7月, 2007 1 次提交
    • J
      xen: suppress abs symbol warnings for unused reloc pointers · 600b2fc2
      Jeremy Fitzhardinge 提交于
      arch/i386/xen/xen-asm.S defines some small pieces of code which are
      used to implement a few paravirt_ops.  They're designed so they can be
      used either in-place, or be inline patched into their callsites if
      there's enough space.
      
      Some of those operations need to make calls out (specifically, if you
      re-enable events [interrupts], and there's a pending event at that
      time).  These calls need the call instruction to be relocated if the
      code is patched inline.  In this case xen_foo_reloc is a
      section-relative symbol which points to xen_foo's required relocation.
      
      Other operations have no need of a relocation, and so their
      corresponding xen_bar_reloc is absolute 0.  These are the cases which
      are triggering the warning.
      
      This patch adds those symbols to the list of safe abs symbols.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Adrian Bunk <bunk@stusta.de>
      600b2fc2
  23. 18 2月, 2007 1 次提交
  24. 02 2月, 2007 1 次提交
    • A
      [PATCH] __crc_... is intended to be absolute · 2a3d4f1f
      Al Viro 提交于
      i386 boot/compressed/relocs checks for absolute symbols and warns about
      unexpected ones.  If you build with modversions, you get ~2500 warnings
      about __crc_<symbol>.  These suckers are really absolute symbols - we
      do _not_ want to modify them on relocation.
      
      They are generated by genksyms - EXPORT_... generates a weak alias, then
      genksyms produces an ld script with __crc_<symbol> = <checksum> and it's
      fed to ld to produce the final object file.  Their only use is to match
      kernel and module at modprobe time; they _must_ be absolute.
      
      boot/compressed/relocs has a whitelist of known absolute symbols, but
      it doesn't know about __crc_... stuff.  As the result, we get shitloads
      of false positives on any ld(1) version.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2a3d4f1f
  25. 07 12月, 2006 2 次提交
    • V
      [PATCH] i386: Warn upon absolute relocations being present · 6a044b3a
      Vivek Goyal 提交于
      o Relocations generated w.r.t absolute symbols are not processed as by
        definition, absolute symbols are not to be relocated. Explicitly warn
        user about absolutions relocations present at compile time.
      
      o These relocations get introduced either due to linker optimizations or
        some programming oversights.
      
      o Also create a list of symbols which have been audited to be safe and
        don't emit warnings for these.
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      6a044b3a
    • E
      [PATCH] i386: Relocatable kernel support · 968de4f0
      Eric W. Biederman 提交于
      This patch modifies the i386 kernel so that if CONFIG_RELOCATABLE is
      selected it will be able to be loaded at any 4K aligned address below
      1G.  The technique used is to compile the decompressor with -fPIC and
      modify it so the decompressor is fully relocatable.  For the main
      kernel relocations are generated.  Resulting in a kernel that is relocatable
      with no runtime overhead and no need to modify the source code.
      
      A reserved 32bit word in the parameters has been assigned
      to serve as a stack so we figure out where are running.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      968de4f0