1. 08 8月, 2015 1 次提交
    • A
      x86/vdso: Emit a GNU hash · 6b7e2654
      Andy Lutomirski 提交于
      Some dynamic loaders may be slightly faster if a GNU hash is
      available.  Strangely, this seems to have no effect at all on
      the vdso size.
      
      This is unlikely to have any measurable effect on the time it
      takes to resolve vdso symbols (since there are so few of them).
      In some contexts, it can be a win for a different reason: if
      every DSO has a GNU hash section, then libc can avoid
      calculating SysV hashes at all.  Both musl and glibc appear to
      have this optimization.
      
      It's plausible that this breaks some ancient glibc version.  If
      so, then, depending on what glibc versions break, we could
      either require COMPAT_VDSO for them or consider reverting.
      Signed-off-by: NAndy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Isaac Dunham <ibid.ag@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Nathan Lynch <nathan_lynch@mentor.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: musl@lists.openwall.com <musl@lists.openwall.com>
      Link: http://lkml.kernel.org/r/fd56cc057a2d62ab31c56a48d04fccb435b3fd4f.1438897382.git.luto@kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      6b7e2654
  2. 06 7月, 2015 1 次提交
  3. 04 6月, 2015 1 次提交
    • I
      x86/asm/entry, x86/vdso: Move the vDSO code to arch/x86/entry/vdso/ · d603c8e1
      Ingo Molnar 提交于
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      d603c8e1
  4. 11 5月, 2015 1 次提交
  5. 31 3月, 2015 3 次提交
  6. 14 2月, 2015 1 次提交
    • A
      x86_64: add KASan support · ef7f0d6a
      Andrey Ryabinin 提交于
      This patch adds arch specific code for kernel address sanitizer.
      
      16TB of virtual addressed used for shadow memory.  It's located in range
      [ffffec0000000000 - fffffc0000000000] between vmemmap and %esp fixup
      stacks.
      
      At early stage we map whole shadow region with zero page.  Latter, after
      pages mapped to direct mapping address range we unmap zero pages from
      corresponding shadow (see kasan_map_shadow()) and allocate and map a real
      shadow memory reusing vmemmap_populate() function.
      
      Also replace __pa with __pa_nodebug before shadow initialized.  __pa with
      CONFIG_DEBUG_VIRTUAL=y make external function call (__phys_addr)
      __phys_addr is instrumented, so __asan_load could be called before shadow
      area initialized.
      Signed-off-by: NAndrey Ryabinin <a.ryabinin@samsung.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Konstantin Serebryany <kcc@google.com>
      Cc: Dmitry Chernenkov <dmitryc@google.com>
      Signed-off-by: NAndrey Konovalov <adech.fo@gmail.com>
      Cc: Yuri Gribov <tetra2005@gmail.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Sasha Levin <sasha.levin@oracle.com>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Jim Davis <jim.epost@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ef7f0d6a
  7. 29 1月, 2015 1 次提交
  8. 12 7月, 2014 1 次提交
  9. 25 6月, 2014 1 次提交
  10. 21 6月, 2014 1 次提交
  11. 20 6月, 2014 1 次提交
    • A
      x86/vdso: Improve the fake section headers · bfad381c
      Andy Lutomirski 提交于
      Fully stripping the vDSO has other unfortunate side effects:
      
       - binutils is unable to find ELF notes without a SHT_NOTE section.
      
       - Even elfutils has trouble: it can find ELF notes without a section
         table at all, but if a section table is present, it won't look for
         PT_NOTE.
      
       - gdb wants section names to match between stripped DSOs and their
         symbols; otherwise it will corrupt symbol addresses.
      
      We're also breaking the rules: section 0 is supposed to be SHT_NULL.
      
      Fix these problems by building a better fake section table.  While
      we're at it, we might as well let buggy Go versions keep working well
      by giving the SHT_DYNSYM entry the correct size.
      
      This is a bit unfortunate: it adds quite a bit of size to the vdso
      image.
      
      If/when binutils improves and the improved versions become widespread,
      it would be worth considering dropping most of this.
      Signed-off-by: NAndy Lutomirski <luto@amacapital.net>
      Link: http://lkml.kernel.org/r/0e546a5eeaafdf1840e6ee654a55c1e727c26663.1403129369.git.luto@amacapital.netSigned-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      bfad381c
  12. 14 6月, 2014 1 次提交
  13. 13 6月, 2014 1 次提交
  14. 07 6月, 2014 1 次提交
  15. 06 5月, 2014 1 次提交
    • A
      x86, vdso: Reimplement vdso.so preparation in build-time C · 6f121e54
      Andy Lutomirski 提交于
      Currently, vdso.so files are prepared and analyzed by a combination
      of objcopy, nm, some linker script tricks, and some simple ELF
      parsers in the kernel.  Replace all of that with plain C code that
      runs at build time.
      
      All five vdso images now generate .c files that are compiled and
      linked in to the kernel image.
      
      This should cause only one userspace-visible change: the loaded vDSO
      images are stripped more heavily than they used to be.  Everything
      outside the loadable segment is dropped.  In particular, this causes
      the section table and section name strings to be missing.  This
      should be fine: real dynamic loaders don't load or inspect these
      tables anyway.  The result is roughly equivalent to eu-strip's
      --strip-sections option.
      
      The purpose of this change is to enable the vvar and hpet mappings
      to be moved to the page following the vDSO load segment.  Currently,
      it is possible for the section table to extend into the page after
      the load segment, so, if we map it, it risks overlapping the vvar or
      hpet page.  This happens whenever the load segment is just under a
      multiple of PAGE_SIZE.
      
      The only real subtlety here is that the old code had a C file with
      inline assembler that did 'call VDSO32_vsyscall' and a linker script
      that defined 'VDSO32_vsyscall = __kernel_vsyscall'.  This most
      likely worked by accident: the linker script entry defines a symbol
      associated with an address as opposed to an alias for the real
      dynamic symbol __kernel_vsyscall.  That caused ld to relocate the
      reference at link time instead of leaving an interposable dynamic
      relocation.  Since the VDSO32_vsyscall hack is no longer needed, I
      now use 'call __kernel_vsyscall', and I added -Bsymbolic to make it
      work.  vdso2c will generate an error and abort the build if the
      resulting image contains any dynamic relocations, so we won't
      silently generate bad vdso images.
      
      (Dynamic relocations are a problem because nothing will even attempt
      to relocate the vdso.)
      Signed-off-by: NAndy Lutomirski <luto@amacapital.net>
      Link: http://lkml.kernel.org/r/2c4fcf45524162a34d87fdda1eb046b2a5cecee7.1399317206.git.luto@amacapital.netSigned-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      6f121e54
  16. 26 3月, 2014 1 次提交
  17. 19 3月, 2014 3 次提交
  18. 14 2月, 2014 1 次提交
  19. 21 2月, 2012 1 次提交
    • H
      x32: Add x32 VDSO support · 1a21d4e0
      H. J. Lu 提交于
      Add support for the x32 VDSO.  The x32 VDSO takes advantage of the
      similarity between the x86-64 and the x32 ABIs to contain the same
      content, only the container is different, as the x32 VDSO obviously is
      an x32 shared object.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      1a21d4e0
  20. 14 7月, 2011 1 次提交
  21. 24 5月, 2011 2 次提交
  22. 14 12月, 2010 1 次提交
  23. 19 6月, 2010 1 次提交
  24. 20 9月, 2009 1 次提交
  25. 19 6月, 2009 1 次提交
    • P
      gcov: enable GCOV_PROFILE_ALL for x86_64 · 7bf99fb6
      Peter Oberparleiter 提交于
      Enable gcov profiling of the entire kernel on x86_64. Required changes
      include disabling profiling for:
      
      * arch/kernel/acpi/realmode and arch/kernel/boot/compressed:
        not linked to main kernel
      * arch/vdso, arch/kernel/vsyscall_64 and arch/kernel/hpet:
        profiling causes segfaults during boot (incompatible context)
      Signed-off-by: NPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Huang Ying <ying.huang@intel.com>
      Cc: Li Wei <W.Li@Sun.COM>
      Cc: Michael Ellerman <michaele@au1.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Heiko Carstens <heicars2@linux.vnet.ibm.com>
      Cc: Martin Schwidefsky <mschwid2@linux.vnet.ibm.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: WANG Cong <xiyou.wangcong@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7bf99fb6
  26. 10 2月, 2009 1 次提交
  27. 16 7月, 2008 1 次提交
  28. 20 4月, 2008 1 次提交
  29. 17 4月, 2008 1 次提交
  30. 01 3月, 2008 1 次提交
    • R
      x86 vdso: fix build locale dependency · f2dbe03d
      Roland McGrath 提交于
      Priit Laes discovered that the sed command processing nm output was
      sensitive to locale settings.  This was addressed in commit
      03994f01 by using [:alnum:] in place of
      [a-zA-Z0-9].
      
      But that solution too is locale-dependent and may not always match
      the identifiers it needs to.  The better fix is just to run sed et al
      with a fixed locale setting in all builds.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      CC: Priit Laes <plaes@plaes.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f2dbe03d
  31. 26 2月, 2008 1 次提交
  32. 12 2月, 2008 1 次提交
  33. 30 1月, 2008 3 次提交