1. 13 Apr, 2016 19 commits
  2. 01 Apr, 2016 2 commits
    • Ingo Molnar's avatar
      x86/cpufeature: Fix build bug caused by merge artifact with the removal of cpu_has_hypervisor · d7847a70
      Ingo Molnar authored
      The 0-day build robot by Fengguang Wu reported a build failure:
      
         arch/x86/events//intel/cstate.c: In function 'cstate_pmu_init':
         arch/x86/events//intel/cstate.c:680:6: error: 'cpu_has_hypervisor' undeclared (first use in this function)
      
      ... which was caused by a merge mistake I made when applying
      the following patch:
      
        0c9f3536 ("x86/cpufeature: Remove cpu_has_hypervisor")
      
      apply the missing hunk as well.
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Cc: David Kershner <david.kershner@unisys.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: sparmaintainer@unisys.com
      Cc: virtualization@lists.linux-foundation.org
      Link: http://lkml.kernel.org/r/1459266123-21878-3-git-send-email-bp@alien8.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      d7847a70
    • Rusty Russell's avatar
      lguest, x86/entry/32: Fix handling of guest syscalls using interrupt gates · f87e0434
      Rusty Russell authored
      In a798f091 ("x86/entry/32: Change INT80 to be an interrupt gate")
      Andy broke lguest.  This is because lguest had special code to allow
      the 0x80 trap gate go straight into the guest itself; interrupts gates
      (without more work, as mentioned in the file's comments) bounce via
      the hypervisor.
      
      His change made them go via the hypervisor, but as it's in the range of
      normal hardware interrupts, they were not directed through to the guest
      at all.  Turns out the guest userspace isn't very effective if syscalls
      are all noops.
      
      I haven't ripped out all the now-useless trap-direct-to-guest-kernel
      code yet, since it will still be needed if someone decides to update
      this optimization.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Andy Lutomirski <luto@kernel.org>
      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: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Weisbecker <fweisbec@gmail.com>
      Cc: x86\@kernel.org
      Link: http://lkml.kernel.org/r/87fuv685kl.fsf@rustcorp.com.auSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      f87e0434
  3. 31 Mar, 2016 12 commits
  4. 30 Mar, 2016 3 commits
  5. 29 Mar, 2016 4 commits
    • Andrew Price's avatar
      dlm: config: Fix ENOMEM failures in make_cluster() · 82c7d823
      Andrew Price authored
      Commit 1ae1602d "configfs: switch ->default groups to a linked list"
      left the NULL gps pointer behind after removing the kcalloc() call which
      made it non-NULL. It also left the !gps check in place so make_cluster()
      now fails with ENOMEM. Remove the remaining uses of the gps variable to
      fix that.
      Reviewed-by: default avatarBob Peterson <rpeterso@redhat.com>
      Reviewed-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      Signed-off-by: default avatarAndrew Price <anprice@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      82c7d823
    • Borislav Petkov's avatar
      x86/cpu: Do the feature test first in enable_sep_cpu() · b3edfda4
      Borislav Petkov authored
      ... before assigning local vars. Kill out label too and simplify.
      
      No functionality change.
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Acked-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1458130769-24963-1-git-send-email-bp@alien8.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      b3edfda4
    • H.J. Lu's avatar
      x86/build: Build compressed x86 kernels as PIE · 6d92bc9d
      H.J. Lu authored
      The 32-bit x86 assembler in binutils 2.26 will generate R_386_GOT32X
      relocation to get the symbol address in PIC.  When the compressed x86
      kernel isn't built as PIC, the linker optimizes R_386_GOT32X relocations
      to their fixed symbol addresses.  However, when the compressed x86
      kernel is loaded at a different address, it leads to the following
      load failure:
      
        Failed to allocate space for phdrs
      
      during the decompression stage.
      
      If the compressed x86 kernel is relocatable at run-time, it should be
      compiled with -fPIE, instead of -fPIC, if possible and should be built as
      Position Independent Executable (PIE) so that linker won't optimize
      R_386_GOT32X relocation to its fixed symbol address.
      
      Older linkers generate R_386_32 relocations against locally defined
      symbols, _bss, _ebss, _got and _egot, in PIE.  It isn't wrong, just less
      optimal than R_386_RELATIVE.  But the x86 kernel fails to properly handle
      R_386_32 relocations when relocating the kernel.  To generate
      R_386_RELATIVE relocations, we mark _bss, _ebss, _got and _egot as
      hidden in both 32-bit and 64-bit x86 kernels.
      
      To build a 64-bit compressed x86 kernel as PIE, we need to disable the
      relocation overflow check to avoid relocation overflow errors. We do
      this with a new linker command-line option, -z noreloc-overflow, which
      got added recently:
      
       commit 4c10bbaa0912742322f10d9d5bb630ba4e15dfa7
       Author: H.J. Lu <hjl.tools@gmail.com>
       Date:   Tue Mar 15 11:07:06 2016 -0700
      
          Add -z noreloc-overflow option to x86-64 ld
      
          Add -z noreloc-overflow command-line option to the x86-64 ELF linker to
          disable relocation overflow check.  This can be used to avoid relocation
          overflow check if there will be no dynamic relocation overflow at
          run-time.
      
      The 64-bit compressed x86 kernel is built as PIE only if the linker supports
      -z noreloc-overflow.  So far 64-bit relocatable compressed x86 kernel
      boots fine even when it is built as a normal executable.
      Signed-off-by: default avatarH.J. Lu <hjl.tools@gmail.com>
      Cc: Andy 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: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      [ Edited the changelog and comments. ]
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      6d92bc9d
    • Toshi Kani's avatar
      x86/pat: Document the PAT initialization sequence · b6350c21
      Toshi Kani authored
      Update PAT documentation to describe how PAT is initialized under
      various configurations.
      Signed-off-by: default avatarToshi Kani <toshi.kani@hpe.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luis R. Rodriguez <mcgrof@suse.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Toshi Kani <toshi.kani@hp.com>
      Cc: elliott@hpe.com
      Cc: konrad.wilk@oracle.com
      Cc: paul.gortmaker@windriver.com
      Cc: xen-devel@lists.xenproject.org
      Link: http://lkml.kernel.org/r/1458769323-24491-8-git-send-email-toshi.kani@hpe.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      b6350c21