22 Apr, 2016

1 commit

  • Correct the size of the module mapping space and the maximum available
    physical memory size of current processors.

    Signed-off-by: Juergen Gross
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: corbet@lwn.net
    Cc: linux-doc@vger.kernel.org
    Link: http://lkml.kernel.org/r/1461310504-15977-1-git-send-email-jgross@suse.com
    Signed-off-by: Ingo Molnar

    Juergen Gross
     

29 Mar, 2016

2 commits

  • Stefan Richter noticed that the X86_INTEL_MEMORY_PROTECTION_KEYS option
    in arch/x86/Kconfig references Documentation/x86/protection-keys.txt,
    but the file does not exist.

    This is a patch merging mishap: the final (v8) version of the pkeys
    series did not include the documentation patch 32 and v7 included.
    Add it now.

    Reported-by: Stefan Richter
    Signed-off-by: Dave Hansen
    Cc: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Dave Hansen
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-mm@kvack.org
    Link: http://lkml.kernel.org/r/20151214190634.426BEE41@viggo.jf.intel.com
    [ Added changelog. ]
    Signed-off-by: Ingo Molnar

    Signed-off-by: Ingo Molnar

    Dave Hansen
     
  • This should contain important aspects of how we represent the system
    topology on x86. If people have questions about it and this file doesn't
    answer it, then it must be updated.

    Signed-off-by: Borislav Petkov
    Link: http://lkml.kernel.org/r/20160328095609.GD26651@pd.tnic
    Signed-off-by: Thomas Gleixner

    Borislav Petkov
     

21 Mar, 2016

1 commit

  • Pull EFI updates from Ingo Molnar:
    "The main changes are:

    - Use separate EFI page tables when executing EFI firmware code.
    This isolates the EFI context from the rest of the kernel, which
    has security and general robustness advantages. (Matt Fleming)

    - Run regular UEFI firmware with interrupts enabled. This is already
    the status quo under other OSs. (Ard Biesheuvel)

    - Various x86 EFI enhancements, such as the use of non-executable
    attributes for EFI memory mappings. (Sai Praneeth Prakhya)

    - Various arm64 UEFI enhancements. (Ard Biesheuvel)

    - ... various fixes and cleanups.

    The separate EFI page tables feature got delayed twice already,
    because it's an intrusive change and we didn't feel confident about
    it - third time's the charm we hope!"

    * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (37 commits)
    x86/mm/pat: Fix boot crash when 1GB pages are not supported by the CPU
    x86/efi: Only map kernel text for EFI mixed mode
    x86/efi: Map EFI_MEMORY_{XP,RO} memory region bits to EFI page tables
    x86/mm/pat: Don't implicitly allow _PAGE_RW in kernel_map_pages_in_pgd()
    efi/arm*: Perform hardware compatibility check
    efi/arm64: Check for h/w support before booting a >4 KB granular kernel
    efi/arm: Check for LPAE support before booting a LPAE kernel
    efi/arm-init: Use read-only early mappings
    efi/efistub: Prevent __init annotations from being used
    arm64/vmlinux.lds.S: Handle .init.rodata.xxx and .init.bss sections
    efi/arm64: Drop __init annotation from handle_kernel_image()
    x86/mm/pat: Use _PAGE_GLOBAL bit for EFI page table mappings
    efi/runtime-wrappers: Run UEFI Runtime Services with interrupts enabled
    efi: Reformat GUID tables to follow the format in UEFI spec
    efi: Add Persistent Memory type name
    efi: Add NV memory attribute
    x86/efi: Show actual ending addresses in efi_print_memmap
    x86/efi/bgrt: Don't ignore the BGRT if the 'valid' bit is 0
    efivars: Use to_efivar_entry
    efi: Runtime-wrapper: Get rid of the rtc_lock spinlock
    ...

    Linus Torvalds
     

16 Mar, 2016

2 commits

  • Pull x86 microcode updates from Ingo Molnar:
    "The biggest change in this cycle was the separation of the microcode
    loading mechanism from the initrd code plus the support of built-in
    microcode images.

    There were also lots cleanups and general restructuring (by Borislav
    Petkov)"

    * 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
    x86/microcode/intel: Drop orig_sum from ext signature checksum
    x86/microcode/intel: Improve microcode sanity-checking error messages
    x86/microcode/intel: Merge two consecutive if-statements
    x86/microcode/intel: Get rid of DWSIZE
    x86/microcode/intel: Change checksum variables to u32
    x86/microcode: Use kmemdup() rather than duplicating its implementation
    x86/microcode: Remove unnecessary paravirt_enabled check
    x86/microcode: Document builtin microcode loading method
    x86/microcode/AMD: Issue microcode updated message later
    x86/microcode/intel: Cleanup get_matching_model_microcode()
    x86/microcode/intel: Remove unused arg of get_matching_model_microcode()
    x86/microcode/intel: Rename mc_saved_in_initrd
    x86/microcode/intel: Use *wrmsrl variants
    x86/microcode/intel: Cleanup apply_microcode_intel()
    x86/microcode/intel: Move the BUG_ON up and turn it into WARN_ON
    x86/microcode/intel: Rename mc_intel variable to mc
    x86/microcode/intel: Rename mc_saved_count to num_saved
    x86/microcode/intel: Rename local variables of type struct mc_saved_data
    x86/microcode/AMD: Drop redundant printk prefix
    x86/microcode: Issue update message only once
    ...

    Linus Torvalds
     
  • Pull x86 asm updates from Ingo Molnar:
    "This is another big update. Main changes are:

    - lots of x86 system call (and other traps/exceptions) entry code
    enhancements. In particular the complex parts of the 64-bit entry
    code have been migrated to C code as well, and a number of dusty
    corners have been refreshed. (Andy Lutomirski)

    - vDSO special mapping robustification and general cleanups (Andy
    Lutomirski)

    - cpufeature refactoring, cleanups and speedups (Borislav Petkov)

    - lots of other changes ..."

    * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (64 commits)
    x86/cpufeature: Enable new AVX-512 features
    x86/entry/traps: Show unhandled signal for i386 in do_trap()
    x86/entry: Call enter_from_user_mode() with IRQs off
    x86/entry/32: Change INT80 to be an interrupt gate
    x86/entry: Improve system call entry comments
    x86/entry: Remove TIF_SINGLESTEP entry work
    x86/entry/32: Add and check a stack canary for the SYSENTER stack
    x86/entry/32: Simplify and fix up the SYSENTER stack #DB/NMI fixup
    x86/entry: Only allocate space for tss_struct::SYSENTER_stack if needed
    x86/entry: Vastly simplify SYSENTER TF (single-step) handling
    x86/entry/traps: Clear DR6 early in do_debug() and improve the comment
    x86/entry/traps: Clear TIF_BLOCKSTEP on all debug exceptions
    x86/entry/32: Restore FLAGS on SYSEXIT
    x86/entry/32: Filter NT and speed up AC filtering in SYSENTER
    x86/entry/compat: In SYSENTER, sink AC clearing below the existing FLAGS test
    selftests/x86: In syscall_nt, test NT|TF as well
    x86/asm-offsets: Remove PARAVIRT_enabled
    x86/entry/32: Introduce and use X86_BUG_ESPFIX instead of paravirt_enabled
    uprobes: __create_xol_area() must nullify xol_mapping.fault
    x86/cpufeature: Create a new synthetic cpu capability for machine check recovery
    ...

    Linus Torvalds
     

18 Feb, 2016

2 commits

  • The Intel Software Developer Manual describes bit 24 in the MCG_CAP
    MSR:

    MCG_SER_P (software error recovery support present) flag,
    bit 24 — Indicates (when set) that the processor supports
    software error recovery

    But only some models with this capability bit set will actually
    generate recoverable machine checks.

    Check the model name and set a synthetic capability bit. Provide
    a command line option to set this bit anyway in case the kernel
    doesn't recognise the model name.

    Signed-off-by: Tony Luck
    Reviewed-by: Borislav Petkov
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/2e5bfb23c89800a036fb8a45fa97a74bb16bc362.1455732970.git.tony.luck@intel.com
    Signed-off-by: Ingo Molnar

    Tony Luck
     
  • Huge amounts of help from Andy Lutomirski and Borislav Petkov to
    produce this. Andy provided the inspiration to add classes to the
    exception table with a clever bit-squeezing trick, Boris pointed
    out how much cleaner it would all be if we just had a new field.

    Linus Torvalds blessed the expansion with:

    ' I'd rather not be clever in order to save just a tiny amount of space
    in the exception table, which isn't really criticial for anybody. '

    The third field is another relative function pointer, this one to a
    handler that executes the actions.

    We start out with three handlers:

    1: Legacy - just jumps the to fixup IP
    2: Fault - provide the trap number in %ax to the fixup code
    3: Cleaned up legacy for the uaccess error hack

    Signed-off-by: Tony Luck
    Reviewed-by: Borislav Petkov
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/f6af78fcbd348cf4939875cfda9c19689b5e50b8.1455732970.git.tony.luck@intel.com
    Signed-off-by: Ingo Molnar

    Tony Luck
     

09 Feb, 2016

1 commit

  • Add some text and an example to Documentation/x86/early-microcode.txt
    explaining how to build in microcode.

    Tested-by: Thomas Voegtle
    Signed-off-by: Borislav Petkov
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1454499225-21544-18-git-send-email-bp@alien8.de
    Signed-off-by: Ingo Molnar

    Borislav Petkov
     

29 Nov, 2015

1 commit

  • Make it clear that the EFI page tables are only available during
    EFI runtime calls since that subject has come up a fair numbers
    of times in the past.

    Additionally, add the EFI region start and end addresses to the
    table so that it's possible to see at a glance where they fall
    in relation to other regions.

    Signed-off-by: Matt Fleming
    Reviewed-by: Borislav Petkov
    Acked-by: Borislav Petkov
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Andy Lutomirski
    Cc: Ard Biesheuvel
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Dave Jones
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Sai Praneeth Prakhya
    Cc: Stephen Smalley
    Cc: Thomas Gleixner
    Cc: Toshi Kani
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/1448658575-17029-7-git-send-email-matt@codeblueprint.co.uk
    Signed-off-by: Ingo Molnar

    Matt Fleming
     

02 Sep, 2015

2 commits

  • Pull x86 mm updates from Ingo Molnar:
    "The dominant change in this cycle was the continued work to isolate
    kernel drivers from MTRR legacies: this tree gets rid of all kernel
    internal driver interfaces to MTRRs (mostly by rewriting it to proper
    PAT interfaces), the only access left is the /proc/mtrr ABI.

    This work was done by Luis R Rodriguez.

    There's also some related PCI interface additions for which I've
    Cc:-ed Bjorn"

    * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits)
    x86/mm/mtrr: Remove kernel internal MTRR interfaces: unexport mtrr_add() and mtrr_del()
    s390/io: Add pci_iomap_wc() and pci_iomap_wc_range()
    drivers/dma/iop-adma: Use dma_alloc_writecombine() kernel-style
    drivers/video/fbdev/vt8623fb: Use arch_phys_wc_add() and pci_iomap_wc()
    drivers/video/fbdev/s3fb: Use arch_phys_wc_add() and pci_iomap_wc()
    drivers/video/fbdev/arkfb.c: Use arch_phys_wc_add() and pci_iomap_wc()
    PCI: Add pci_iomap_wc() variants
    drivers/video/fbdev/gxt4500: Use pci_ioremap_wc_bar() to map framebuffer
    drivers/video/fbdev/kyrofb: Use arch_phys_wc_add() and pci_ioremap_wc_bar()
    drivers/video/fbdev/i740fb: Use arch_phys_wc_add() and pci_ioremap_wc_bar()
    PCI: Add pci_ioremap_wc_bar()
    x86/mm: Make kernel/check.c explicitly non-modular
    x86/mm/pat: Make mm/pageattr[-test].c explicitly non-modular
    x86/mm/pat: Add comments to cachemode translation tables
    arch/*/io.h: Add ioremap_uc() to all architectures
    drivers/video/fbdev/atyfb: Use arch_phys_wc_add() and ioremap_wc()
    drivers/video/fbdev/atyfb: Replace MTRR UC hole with strong UC
    drivers/video/fbdev/atyfb: Clarify ioremap() base and length used
    drivers/video/fbdev/atyfb: Carve out framebuffer length fudging into a helper
    x86/mm, asm-generic: Add IOMMU ioremap_uc() variant default
    ...

    Linus Torvalds
     
  • Pull x86 boot updates from Ingo Molnar:
    "The main x86 bootup related changes in this cycle were:

    - more boot time optimizations. (Len Brown)

    - implement hex output to allow the debugging of early bootup
    parameters. (Kees Cook)

    - remove obsolete MCA leftovers. (Paolo Pisati)"

    * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/smpboot: Remove APIC.wait_for_init_deassert and atomic init_deasserted
    x86/smpboot: Remove SIPI delays from cpu_up()
    x86/smpboot: Remove udelay(100) when polling cpu_callin_map
    x86/smpboot: Remove udelay(100) when polling cpu_initialized_map
    x86/boot: Obsolete the MCA sys_desc_table
    x86/boot: Add hex output for debugging

    Linus Torvalds
     

28 Aug, 2015

1 commit

  • The effort to replace mtrr_add() with architecture agnostic
    arch_phys_wc_add() is complete, this will ensure write-combining
    implementations (PAT on x86) is taken advantage instead of using
    MTRR. With the effort done now, hide direct MTRR access for
    drivers.

    The legacy user-space /proc/mtrr ABI is not affected.

    Update x86 documentation on MTRR to reflect the completion of
    the phasing out of direct access to MTRR, also add a note on
    platform firmware code use of MTRRs based on the obituary
    discussion of MTRRs on Linux [0].

    [0] http://lkml.kernel.org/r/1438991330.3109.196.camel@hp.com

    Signed-off-by: Luis R. Rodriguez
    Cc:
    Cc: Andy Lutomirski
    Cc: Andy Walls
    Cc: Antonino Daplas
    Cc: Borislav Petkov
    Cc: Daniel Vetter
    Cc: Dave Airlie
    Cc: Dave Hansen
    Cc: Davidlohr Bueso
    Cc: Doug Ledford
    Cc: H. Peter Anvin
    Cc: Jean-Christophe Plagniol-Villard
    Cc: Juergen Gross
    Cc: Linus Torvalds
    Cc: Mel Gorman
    Cc: Peter Zijlstra
    Cc: Suresh Siddha
    Cc: Thomas Gleixner
    Cc: Tomi Valkeinen
    Cc: Toshi Kani
    Cc: Ville Syrjälä
    Cc: Vlastimil Babka
    Cc: airlied@linux.ie
    Cc: benh@kernel.crashing.org
    Cc: bhelgaas@google.com
    Cc: dan.j.williams@intel.com
    Cc: konrad.wilk@oracle.com
    Cc: linux-fbdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-media@vger.kernel.org
    Cc: mst@redhat.com
    Cc: netdev@vger.kernel.org
    Cc: vinod.koul@intel.com
    Cc: xen-devel@lists.xensource.com
    Link: http://lkml.kernel.org/r/1440443613-13696-12-git-send-email-mcgrof@do-not-panic.com
    Signed-off-by: Ingo Molnar

    Luis R. Rodriguez
     

25 Aug, 2015

1 commit


21 Jul, 2015

1 commit

  • The kernel does not support the MCA bus anymroe, so mark sys_desc_table
    as obsolete: remove any reference from the code together with the remaining
    of MCA logic.

    bloat-o-meter output:

    add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-55 (-55)
    function old new delta
    i386_start_kernel 128 119 -9
    setup_arch 1421 1375 -46

    Signed-off-by: Paolo Pisati
    Cc: Josh Triplett
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1437409430-8491-1-git-send-email-p.pisati@gmail.com
    Signed-off-by: Ingo Molnar

    Paolo Pisati
     

02 Jul, 2015

1 commit

  • The paths mentioned in this file weren't updated through some file
    rename commits. Fix them to refer to the correct path.

    Signed-off-by: James C Boyd
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: corbet@lwn.net
    Cc: trivial@kernel.org
    Link: http://lkml.kernel.org/r/1435781606-3037-1-git-send-email-jcboyd.dev@gmail.com
    Signed-off-by: Ingo Molnar

    James C Boyd
     

30 Jun, 2015

1 commit


23 Jun, 2015

2 commits

  • Pull x86 core updates from Ingo Molnar:
    "There were so many changes in the x86/asm, x86/apic and x86/mm topics
    in this cycle that the topical separation of -tip broke down somewhat -
    so the result is a more traditional architecture pull request,
    collected into the 'x86/core' topic.

    The topics were still maintained separately as far as possible, so
    bisectability and conceptual separation should still be pretty good -
    but there were a handful of merge points to avoid excessive
    dependencies (and conflicts) that would have been poorly tested in the
    end.

    The next cycle will hopefully be much more quiet (or at least will
    have fewer dependencies).

    The main changes in this cycle were:

    * x86/apic changes, with related IRQ core changes: (Jiang Liu, Thomas
    Gleixner)

    - This is the second and most intrusive part of changes to the x86
    interrupt handling - full conversion to hierarchical interrupt
    domains:

    [IOAPIC domain] -----
    |
    [MSI domain] --------[Remapping domain] ----- [ Vector domain ]
    | (optional) |
    [HPET MSI domain] ----- |
    |
    [DMAR domain] -----------------------------
    |
    [Legacy domain] -----------------------------

    This now reflects the actual hardware and allowed us to distangle
    the domain specific code from the underlying parent domain, which
    can be optional in the case of interrupt remapping. It's a clear
    separation of functionality and removes quite some duct tape
    constructs which plugged the remap code between ioapic/msi/hpet
    and the vector management.

    - Intel IOMMU IRQ remapping enhancements, to allow direct interrupt
    injection into guests (Feng Wu)

    * x86/asm changes:

    - Tons of cleanups and small speedups, micro-optimizations. This
    is in preparation to move a good chunk of the low level entry
    code from assembly to C code (Denys Vlasenko, Andy Lutomirski,
    Brian Gerst)

    - Moved all system entry related code to a new home under
    arch/x86/entry/ (Ingo Molnar)

    - Removal of the fragile and ugly CFI dwarf debuginfo annotations.
    Conversion to C will reintroduce many of them - but meanwhile
    they are only getting in the way, and the upstream kernel does
    not rely on them (Ingo Molnar)

    - NOP handling refinements. (Borislav Petkov)

    * x86/mm changes:

    - Big PAT and MTRR rework: making the code more robust and
    preparing to phase out exposing direct MTRR interfaces to drivers -
    in favor of using PAT driven interfaces (Toshi Kani, Luis R
    Rodriguez, Borislav Petkov)

    - New ioremap_wt()/set_memory_wt() interfaces to support
    Write-Through cached memory mappings. This is especially
    important for good performance on NVDIMM hardware (Toshi Kani)

    * x86/ras changes:

    - Add support for deferred errors on AMD (Aravind Gopalakrishnan)

    This is an important RAS feature which adds hardware support for
    poisoned data. That means roughly that the hardware marks data
    which it has detected as corrupted but wasn't able to correct, as
    poisoned data and raises an APIC interrupt to signal that in the
    form of a deferred error. It is the OS's responsibility then to
    take proper recovery action and thus prolonge system lifetime as
    far as possible.

    - Add support for Intel "Local MCE"s: upcoming CPUs will support
    CPU-local MCE interrupts, as opposed to the traditional system-
    wide broadcasted MCE interrupts (Ashok Raj)

    - Misc cleanups (Borislav Petkov)

    * x86/platform changes:

    - Intel Atom SoC updates

    ... and lots of other cleanups, fixlets and other changes - see the
    shortlog and the Git log for details"

    * 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (222 commits)
    x86/hpet: Use proper hpet device number for MSI allocation
    x86/hpet: Check for irq==0 when allocating hpet MSI interrupts
    x86/mm/pat, drivers/infiniband/ipath: Use arch_phys_wc_add() and require PAT disabled
    x86/mm/pat, drivers/media/ivtv: Use arch_phys_wc_add() and require PAT disabled
    x86/platform/intel/baytrail: Add comments about why we disabled HPET on Baytrail
    genirq: Prevent crash in irq_move_irq()
    genirq: Enhance irq_data_to_desc() to support hierarchy irqdomain
    iommu, x86: Properly handle posted interrupts for IOMMU hotplug
    iommu, x86: Provide irq_remapping_cap() interface
    iommu, x86: Setup Posted-Interrupts capability for Intel iommu
    iommu, x86: Add cap_pi_support() to detect VT-d PI capability
    iommu, x86: Avoid migrating VT-d posted interrupts
    iommu, x86: Save the mode (posted or remapped) of an IRTE
    iommu, x86: Implement irq_set_vcpu_affinity for intel_ir_chip
    iommu: dmar: Provide helper to copy shared irte fields
    iommu: dmar: Extend struct irte for VT-d Posted-Interrupts
    iommu: Add new member capability to struct irq_remap_ops
    x86/asm/entry/64: Disentangle error_entry/exit gsbase/ebx/usermode code
    x86/asm/entry/32: Shorten __audit_syscall_entry() args preparation
    x86/asm/entry/32: Explain reloading of registers after __audit_syscall_entry()
    ...

    Linus Torvalds
     
  • Pull x86 EFI updates from Ingo Molnar:
    "EFI changes:

    - Use idiomatic negative error values in efivar_create_sysfs_entry()
    instead of returning '1' to indicate error (Dan Carpenter)

    - Implement new support to expose the EFI System Resource Tables in
    sysfs, which provides information for performing firmware updates
    (Peter Jones)

    - Documentation cleanup in the EFI handover protocol section which
    falsely claimed that 'cmdline_size' needed to be filled out by the
    boot loader (Alex Smith)

    - Align the order of SMBIOS tables in /sys/firmware/efi/systab to
    match the way that we do things for ACPI and add documentation to
    Documentation/ABI (Jean Delvare)"

    * 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    efi: Work around ia64 build problem with ESRT driver
    efi: Add 'systab' information to Documentation/ABI
    efi: dmi: List SMBIOS3 table before SMBIOS table
    efi/esrt: Fix some compiler warnings
    x86, doc: Remove cmdline_size from list of fields to be filled in for EFI handover
    efi: Add esrt support
    efi: efivar_create_sysfs_entry() should return negative error codes

    Linus Torvalds
     

22 Jun, 2015

1 commit


09 Jun, 2015

1 commit


08 Jun, 2015

1 commit

  • Rename the following system call entry points:

    ia32_cstar_target -> entry_SYSCALL_compat
    ia32_syscall -> entry_INT80_compat

    The generic naming scheme for x86 system call entry points is:

    entry_MNEMONIC_qualifier

    where 'qualifier' is one of _32, _64 or _compat.

    Cc: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

07 Jun, 2015

4 commits

  • Conflicts:
    arch/x86/include/asm/irq_vectors.h

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Initialize and prepare for handling LMCEs. Add a boot-time
    option to disable LMCEs.

    Signed-off-by: Ashok Raj
    [ Simplify stuff, align statements for better readability, reflow comments; kill
    unused lmce_clear(); save us an MSR write if LMCE is already enabled. ]
    Signed-off-by: Borislav Petkov
    Cc: Andrew Morton
    Cc: H. Peter Anvin
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: linux-edac
    Link: http://lkml.kernel.org/r/1433436928-31903-16-git-send-email-bp@alien8.de
    Signed-off-by: Ingo Molnar

    Ashok Raj
     
  • Now that reserve_ram_pages_type() accepts the WT type, add
    set_memory_wt(), set_memory_array_wt() and set_pages_array_wt()
    in order to be able to set memory to Write-Through page cache
    mode.

    Also, extend ioremap_change_attr() to accept the WT type.

    Signed-off-by: Toshi Kani
    Signed-off-by: Borislav Petkov
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Elliott@hp.com
    Cc: H. Peter Anvin
    Cc: Linus Torvalds
    Cc: Luis R. Rodriguez
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: arnd@arndb.de
    Cc: hch@lst.de
    Cc: hmh@hmh.eng.br
    Cc: jgross@suse.com
    Cc: konrad.wilk@oracle.com
    Cc: linux-mm
    Cc: linux-nvdimm@lists.01.org
    Cc: stefan.bader@canonical.com
    Cc: yigal@plexistor.com
    Link: http://lkml.kernel.org/r/1433436928-31903-13-git-send-email-bp@alien8.de
    Signed-off-by: Ingo Molnar

    Toshi Kani
     
  • Add ioremap_wt() for creating Write-Through mappings on x86. It
    follows the same model as ioremap_wc() for multi-arch support.
    Define ARCH_HAS_IOREMAP_WT in the x86 version of io.h to
    indicate that ioremap_wt() is implemented on x86.

    Also update the PAT documentation file to cover ioremap_wt().

    Signed-off-by: Toshi Kani
    Signed-off-by: Borislav Petkov
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Elliott@hp.com
    Cc: H. Peter Anvin
    Cc: Linus Torvalds
    Cc: Luis R. Rodriguez
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: arnd@arndb.de
    Cc: hch@lst.de
    Cc: hmh@hmh.eng.br
    Cc: jgross@suse.com
    Cc: konrad.wilk@oracle.com
    Cc: linux-mm
    Cc: linux-nvdimm@lists.01.org
    Cc: stefan.bader@canonical.com
    Cc: yigal@plexistor.com
    Link: http://lkml.kernel.org/r/1433436928-31903-8-git-send-email-bp@alien8.de
    Signed-off-by: Ingo Molnar

    Toshi Kani
     

27 May, 2015

4 commits

  • As part of the effort to phase out MTRR use document
    write-combining MTRR effects on pages with different non-PAT
    page attributes flags and different PAT entry values. Extend
    arch_phys_wc_add() documentation to clarify power of two sizes /
    boundary requirements as we phase out mtrr_add() use.

    Lastly hint towards ioremap_uc() for corner cases on device
    drivers working with devices with mixed regions where MTRR size
    requirements would otherwise not enable write-combining
    effective memory types.

    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Borislav Petkov
    Cc: Andy Lutomirski
    Cc: Antonino Daplas
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Daniel Vetter
    Cc: Dave Airlie
    Cc: Dave Hansen
    Cc: Davidlohr Bueso
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Jean-Christophe Plagniol-Villard
    Cc: Jonathan Corbet
    Cc: Juergen Gross
    Cc: Linus Torvalds
    Cc: Mel Gorman
    Cc: Peter Zijlstra
    Cc: Suresh Siddha
    Cc: Thomas Gleixner
    Cc: Tomi Valkeinen
    Cc: Ville Syrjälä
    Cc: Vlastimil Babka
    Cc: linux-fbdev@vger.kernel.org
    Link: http://lkml.kernel.org/r/1430343851-967-3-git-send-email-mcgrof@do-not-panic.com
    Link: http://lkml.kernel.org/r/1432628901-18044-10-git-send-email-bp@alien8.de
    Signed-off-by: Ingo Molnar

    Luis R. Rodriguez
     
  • Hold it down for future reference, as the question about the
    question mark in stack traces keeps popping up.

    Signed-off-by: Borislav Petkov
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Josh Poimboeuf
    Cc: Linus Torvalds
    Cc: Michal Marek
    Cc: Peter Zijlstra
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: live-patching@vger.kernel.org
    Link: http://lkml.kernel.org/r/1432628901-18044-18-git-send-email-bp@alien8.de
    Link: http://lkml.kernel.org/r/20150521101614.GA10889@gmail.com
    Signed-off-by: Ingo Molnar

    Borislav Petkov
     
  • Update the documentation after

    6f442be2fb22 ("x86_64, traps: Stop using IST for #SS").

    Signed-off-by: Borislav Petkov
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Josh Poimboeuf
    Cc: Linus Torvalds
    Cc: Michal Marek
    Cc: Peter Zijlstra
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: live-patching@vger.kernel.org
    Link: http://lkml.kernel.org/r/1432628901-18044-17-git-send-email-bp@alien8.de
    Signed-off-by: Ingo Molnar

    Borislav Petkov
     
  • ... to Documentation/x86/ as it is going to collect more and not
    only 64-bit specific info.

    Signed-off-by: Borislav Petkov
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Josh Poimboeuf
    Cc: Linus Torvalds
    Cc: Michal Marek
    Cc: Peter Zijlstra
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: live-patching@vger.kernel.org
    Link: http://lkml.kernel.org/r/1432628901-18044-16-git-send-email-bp@alien8.de
    Signed-off-by: Ingo Molnar

    Borislav Petkov
     

11 May, 2015

1 commit

  • Documentation/x86/boot.txt labels the bit in
    boot_params.hdr.loadflags as ALSR_FLAG while it should be
    KASLR_FLAG.

    Signed-off-by: Miroslav Benes
    Signed-off-by: Borislav Petkov
    Cc: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Jiri Kosina
    Cc: Jonathan Corbet
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1429011324-7170-1-git-send-email-mbenes@suse.cz
    Link: http://lkml.kernel.org/r/1431332153-18566-4-git-send-email-bp@alien8.de
    Signed-off-by: Ingo Molnar

    Miroslav Benes
     

01 May, 2015

1 commit


03 Apr, 2015

1 commit

  • Commit:

    e2b32e678513 ("x86, kaslr: randomize module base load address")

    made module base address randomization unconditional and didn't regard
    disabled KKASLR due to CONFIG_HIBERNATION and command line option
    "nokaslr". For more info see (now reverted) commit:

    f47233c2d34f ("x86/mm/ASLR: Propagate base load address calculation")

    In order to propagate KASLR status to kernel proper, we need a single bit
    in boot_params.hdr.loadflags and we've chosen bit 1 thus leaving the
    top-down allocated bits for bits supposed to be used by the bootloader.

    Originally-From: Jiri Kosina
    Suggested-by: H. Peter Anvin
    Signed-off-by: Borislav Petkov
    Cc: Kees Cook
    Signed-off-by: Ingo Molnar

    Borislav Petkov
     

22 Feb, 2015

1 commit

  • Pull misc x86 fixes from Ingo Molnar:
    "This contains:

    - EFI fixes
    - a boot printout fix
    - ASLR/kASLR fixes
    - intel microcode driver fixes
    - other misc fixes

    Most of the linecount comes from an EFI revert"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/mm/ASLR: Avoid PAGE_SIZE redefinition for UML subarch
    x86/microcode/intel: Handle truncated microcode images more robustly
    x86/microcode/intel: Guard against stack overflow in the loader
    x86, mm/ASLR: Fix stack randomization on 64-bit systems
    x86/mm/init: Fix incorrect page size in init_memory_mapping() printks
    x86/mm/ASLR: Propagate base load address calculation
    Documentation/x86: Fix path in zero-page.txt
    x86/apic: Fix the devicetree build in certain configs
    Revert "efi/libstub: Call get_memory_map() to obtain map and desc sizes"
    x86/efi: Avoid triple faults during EFI mixed mode calls

    Linus Torvalds
     

19 Feb, 2015

1 commit


14 Feb, 2015

1 commit

  • 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: Andrey Ryabinin
    Cc: Dmitry Vyukov
    Cc: Konstantin Serebryany
    Cc: Dmitry Chernenkov
    Signed-off-by: Andrey Konovalov
    Cc: Yuri Gribov
    Cc: Konstantin Khlebnikov
    Cc: Sasha Levin
    Cc: Christoph Lameter
    Cc: Joonsoo Kim
    Cc: Dave Hansen
    Cc: Andi Kleen
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Christoph Lameter
    Cc: Pekka Enberg
    Cc: David Rientjes
    Cc: Jim Davis
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Ryabinin
     

03 Jan, 2015

1 commit

  • This causes all non-NMI, non-double-fault kernel entries from
    userspace to run on the normal kernel stack. Double-fault is
    exempt to minimize confusion if we double-fault directly from
    userspace due to a bad kernel stack.

    This is, suprisingly, simpler and shorter than the current code. It
    removes the IMO rather frightening paranoid_userspace path, and it
    make sync_regs much simpler.

    There is no risk of stack overflow due to this change -- the kernel
    stack that we switch to is empty.

    This will also enable us to create non-atomic sections within
    machine checks from userspace, which will simplify memory failure
    handling. It will also allow the upcoming fsgsbase code to be
    simplified, because it doesn't need to worry about usergs when
    scheduling in paranoid_exit, as that code no longer exists.

    Cc: Oleg Nesterov
    Cc: Andi Kleen
    Cc: Tony Luck
    Acked-by: Borislav Petkov
    Signed-off-by: Andy Lutomirski

    Andy Lutomirski
     

20 Dec, 2014

1 commit


15 Dec, 2014

2 commits

  • Give MPX a real config option. The CPUs that support it (referenced
    here):

    https://software.intel.com/en-us/forums/topic/402393

    are not available publicly yet. Right now only the software emulator
    provides MPX for the general public.

    [ tglx: Make it default off. There is no point in having it on right
    now as no hardware and no proper tooling support are available ]

    Signed-off-by: Dave Hansen
    Cc: Dave Hansen
    Link: http://lkml.kernel.org/r/20141212183836.2569D58D@viggo.jf.intel.com
    Signed-off-by: Thomas Gleixner

    Dave Hansen
     
  • I was writing some MPX test programs and realized that the
    current design makes it tricky. I did something like:

    bndcfgu |= bnd_dir | BNDCFGU_ENABLE;
    xrstor();
    printf("xrstor done");
    // #BR bounds exception here
    prctl(MPX_ENABLE_MANAGEMENT);

    and then compiled the app with "-fcheck-pointer-bounds -mmpx"
    to enable MPX instrumentation.

    The problem is that there is MPX instrumentation inserted in
    to the area of the printf(). The kernel gets a bounds exception
    and since management isn't yet enabled, it SIGSEGV's.

    Add a bit to the documentation to explain a way around this and
    where apps need to be careful.

    Signed-off-by: Dave Hansen
    Cc: Dave Hansen
    Link: http://lkml.kernel.org/r/20141212183835.8C581B3E@viggo.jf.intel.com
    Signed-off-by: Thomas Gleixner

    Dave Hansen