1. 18 Jul, 2017 17 commits
    • Tom Lendacky's avatar
      x86/mm: Add support for early encryption/decryption of memory · 7f8b7e7f
      Tom Lendacky authored
      Add support to be able to either encrypt or decrypt data in place during
      the early stages of booting the kernel. This does not change the memory
      encryption attribute - it is used for ensuring that data present in either
      an encrypted or decrypted memory area is in the proper state (for example
      the initrd will have been loaded by the boot loader and will not be
      encrypted, but the memory that it resides in is marked as encrypted).
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Toshimitsu Kani <toshi.kani@hpe.com>
      Cc: kasan-dev@googlegroups.com
      Cc: kvm@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Cc: linux-mm@kvack.org
      Link: http://lkml.kernel.org/r/f9968e9432cd6c4b57ef245729be04ff18852225.1500319216.git.thomas.lendacky@amd.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      7f8b7e7f
    • Tom Lendacky's avatar
      x86/mm: Extend early_memremap() support with additional attrs · f88a68fa
      Tom Lendacky authored
      Add early_memremap() support to be able to specify encrypted and
      decrypted mappings with and without write-protection. The use of
      write-protection is necessary when encrypting data "in place". The
      write-protect attribute is considered cacheable for loads, but not
      stores. This implies that the hardware will never give the core a
      dirty line with this memtype.
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Toshimitsu Kani <toshi.kani@hpe.com>
      Cc: kasan-dev@googlegroups.com
      Cc: kvm@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Cc: linux-mm@kvack.org
      Link: http://lkml.kernel.org/r/479b5832c30fae3efa7932e48f81794e86397229.1500319216.git.thomas.lendacky@amd.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      f88a68fa
    • Tom Lendacky's avatar
      x86/mm: Add SME support for read_cr3_pa() · eef9c4ab
      Tom Lendacky authored
      The CR3 register entry can contain the SME encryption mask that indicates
      the PGD is encrypted.  The encryption mask should not be used when
      creating a virtual address from the CR3 register, so remove the SME
      encryption mask in the read_cr3_pa() function.
      
      During early boot SME will need to use a native version of read_cr3_pa(),
      so create native_read_cr3_pa().
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Toshimitsu Kani <toshi.kani@hpe.com>
      Cc: kasan-dev@googlegroups.com
      Cc: kvm@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Cc: linux-mm@kvack.org
      Link: http://lkml.kernel.org/r/767b085c384a46f67f451f8589903a462c7ff68a.1500319216.git.thomas.lendacky@amd.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      eef9c4ab
    • Tom Lendacky's avatar
      x86/mm: Provide general kernel support for memory encryption · 21729f81
      Tom Lendacky authored
      Changes to the existing page table macros will allow the SME support to
      be enabled in a simple fashion with minimal changes to files that use these
      macros.  Since the memory encryption mask will now be part of the regular
      pagetable macros, we introduce two new macros (_PAGE_TABLE_NOENC and
      _KERNPG_TABLE_NOENC) to allow for early pagetable creation/initialization
      without the encryption mask before SME becomes active.  Two new pgprot()
      macros are defined to allow setting or clearing the page encryption mask.
      
      The FIXMAP_PAGE_NOCACHE define is introduced for use with MMIO.  SME does
      not support encryption for MMIO areas so this define removes the encryption
      mask from the page attribute.
      
      Two new macros are introduced (__sme_pa() / __sme_pa_nodebug()) to allow
      creating a physical address with the encryption mask.  These are used when
      working with the cr3 register so that the PGD can be encrypted. The current
      __va() macro is updated so that the virtual address is generated based off
      of the physical address without the encryption mask thus allowing the same
      virtual address to be generated regardless of whether encryption is enabled
      for that physical location or not.
      
      Also, an early initialization function is added for SME.  If SME is active,
      this function:
      
       - Updates the early_pmd_flags so that early page faults create mappings
         with the encryption mask.
      
       - Updates the __supported_pte_mask to include the encryption mask.
      
       - Updates the protection_map entries to include the encryption mask so
         that user-space allocations will automatically have the encryption mask
         applied.
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Toshimitsu Kani <toshi.kani@hpe.com>
      Cc: kasan-dev@googlegroups.com
      Cc: kvm@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Cc: linux-mm@kvack.org
      Link: http://lkml.kernel.org/r/b36e952c4c39767ae7f0a41cf5345adf27438480.1500319216.git.thomas.lendacky@amd.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      21729f81
    • Tom Lendacky's avatar
      x86/mm: Simplify p[g4um]d_page() macros · fd7e3159
      Tom Lendacky authored
      Create a pgd_pfn() macro similar to the p[4um]d_pfn() macros and then
      use the p[g4um]d_pfn() macros in the p[g4um]d_page() macros instead of
      duplicating the code.
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Toshimitsu Kani <toshi.kani@hpe.com>
      Cc: kasan-dev@googlegroups.com
      Cc: kvm@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Cc: linux-mm@kvack.org
      Link: http://lkml.kernel.org/r/e61eb533a6d0aac941db2723d8aa63ef6b882dee.1500319216.git.thomas.lendacky@amd.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      fd7e3159
    • Tom Lendacky's avatar
      x86/mm: Add support to enable SME in early boot processing · 5868f365
      Tom Lendacky authored
      Add support to the early boot code to use Secure Memory Encryption (SME).
      Since the kernel has been loaded into memory in a decrypted state, encrypt
      the kernel in place and update the early pagetables with the memory
      encryption mask so that new pagetable entries will use memory encryption.
      
      The routines to set the encryption mask and perform the encryption are
      stub routines for now with functionality to be added in a later patch.
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Toshimitsu Kani <toshi.kani@hpe.com>
      Cc: kasan-dev@googlegroups.com
      Cc: kvm@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Cc: linux-mm@kvack.org
      Link: http://lkml.kernel.org/r/e52ad781f085224bf835b3caff9aa3aee6febccb.1500319216.git.thomas.lendacky@amd.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      5868f365
    • Tom Lendacky's avatar
      x86/mm: Remove phys_to_virt() usage in ioremap() · 33c2b803
      Tom Lendacky authored
      Currently there is a check if the address being mapped is in the ISA
      range (is_ISA_range()), and if it is, then phys_to_virt() is used to
      perform the mapping. When SME is active, the default is to add pagetable
      mappings with the encryption bit set unless specifically overridden. The
      resulting pagetable mapping from phys_to_virt() will result in a mapping
      that has the encryption bit set. With SME, the use of ioremap() is
      intended to generate pagetable mappings that do not have the encryption
      bit set through the use of the PAGE_KERNEL_IO protection value.
      
      Rather than special case the SME scenario, remove the ISA range check and
      usage of phys_to_virt() and have ISA range mappings continue through the
      remaining ioremap() path.
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Toshimitsu Kani <toshi.kani@hpe.com>
      Cc: kasan-dev@googlegroups.com
      Cc: kvm@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Cc: linux-mm@kvack.org
      Link: http://lkml.kernel.org/r/88ada7b09c6568c61cd696351eb59fb15a82ce1a.1500319216.git.thomas.lendacky@amd.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      33c2b803
    • Tom Lendacky's avatar
      x86/mm: Add Secure Memory Encryption (SME) support · 7744ccdb
      Tom Lendacky authored
      Add support for Secure Memory Encryption (SME). This initial support
      provides a Kconfig entry to build the SME support into the kernel and
      defines the memory encryption mask that will be used in subsequent
      patches to mark pages as encrypted.
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Toshimitsu Kani <toshi.kani@hpe.com>
      Cc: kasan-dev@googlegroups.com
      Cc: kvm@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Cc: linux-mm@kvack.org
      Link: http://lkml.kernel.org/r/a6c34d16caaed3bc3e2d6f0987554275bd291554.1500319216.git.thomas.lendacky@amd.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      7744ccdb
    • Tom Lendacky's avatar
      x86/cpu/AMD: Handle SME reduction in physical address size · 9af9b940
      Tom Lendacky authored
      When System Memory Encryption (SME) is enabled, the physical address
      space is reduced. Adjust the x86_phys_bits value to reflect this
      reduction.
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Toshimitsu Kani <toshi.kani@hpe.com>
      Cc: kasan-dev@googlegroups.com
      Cc: kvm@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Cc: linux-mm@kvack.org
      Link: http://lkml.kernel.org/r/593c037a3cad85ba92f3d061ffa7462e9ce3531d.1500319216.git.thomas.lendacky@amd.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      9af9b940
    • Tom Lendacky's avatar
      x86/cpu/AMD: Add the Secure Memory Encryption CPU feature · 872cbefd
      Tom Lendacky authored
      Update the CPU features to include identifying and reporting on the
      Secure Memory Encryption (SME) feature.  SME is identified by CPUID
      0x8000001f, but requires BIOS support to enable it (set bit 23 of
      MSR_K8_SYSCFG).  Only show the SME feature as available if reported by
      CPUID, enabled by BIOS and not configured as CONFIG_X86_32=y.
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Toshimitsu Kani <toshi.kani@hpe.com>
      Cc: kasan-dev@googlegroups.com
      Cc: kvm@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Cc: linux-mm@kvack.org
      Link: http://lkml.kernel.org/r/85c17ff450721abccddc95e611ae8df3f4d9718b.1500319216.git.thomas.lendacky@amd.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      872cbefd
    • Tom Lendacky's avatar
      x86, mpparse, x86/acpi, x86/PCI, x86/dmi, SFI: Use memremap() for RAM mappings · f7750a79
      Tom Lendacky authored
      The ioremap() function is intended for mapping MMIO. For RAM, the
      memremap() function should be used. Convert calls from ioremap() to
      memremap() when re-mapping RAM.
      
      This will be used later by SME to control how the encryption mask is
      applied to memory mappings, with certain memory locations being mapped
      decrypted vs encrypted.
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Toshimitsu Kani <toshi.kani@hpe.com>
      Cc: kasan-dev@googlegroups.com
      Cc: kvm@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Cc: linux-mm@kvack.org
      Link: http://lkml.kernel.org/r/b13fccb9abbd547a7eef7b1fdfc223431b211c88.1500319216.git.thomas.lendacky@amd.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      f7750a79
    • Tom Lendacky's avatar
      x86/mm/pat: Set write-protect cache mode for full PAT support · aac7b79e
      Tom Lendacky authored
      For processors that support PAT, set the write-protect cache mode
      (_PAGE_CACHE_MODE_WP) entry to the actual write-protect value (x05).
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Toshimitsu Kani <toshi.kani@hpe.com>
      Cc: kasan-dev@googlegroups.com
      Cc: kvm@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Cc: linux-mm@kvack.org
      Link: http://lkml.kernel.org/r/ade53b63d4dbffbfc3cb08fb62024647059c8688.1500319216.git.thomas.lendacky@amd.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      aac7b79e
    • Tom Lendacky's avatar
      x86/cpu/AMD: Document AMD Secure Memory Encryption (SME) · c262f3b9
      Tom Lendacky authored
      Create a Documentation entry to describe the AMD Secure Memory
      Encryption (SME) feature and add documentation for the mem_encrypt=
      kernel parameter.
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Toshimitsu Kani <toshi.kani@hpe.com>
      Cc: kasan-dev@googlegroups.com
      Cc: kvm@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Cc: linux-mm@kvack.org
      Link: http://lkml.kernel.org/r/ca0a0c13b055fd804cfc92cbaca8acd68057eed0.1500319216.git.thomas.lendacky@amd.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      c262f3b9
    • Ingo Molnar's avatar
      Merge branch 'x86/boot' into x86/mm, to pick up interacting changes · 1ed7d327
      Ingo Molnar authored
      The SME patches we are about to apply add some E820 logic, so merge in
      pending E820 code changes first, to have a single code base.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1ed7d327
    • Baoquan He's avatar
      x86/boot/KASLR: Rename process_e820_entry() into process_mem_region() · 27aac205
      Baoquan He authored
      Now process_e820_entry() is not limited to e820 entry processing, rename
      it to process_mem_region(). And adjust the code comment accordingly.
      Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: fanc.fnst@cn.fujitsu.com
      Cc: izumi.taku@jp.fujitsu.com
      Cc: matt@codeblueprint.co.uk
      Cc: thgarnie@google.com
      Link: http://lkml.kernel.org/r/1499603862-11516-4-git-send-email-bhe@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      27aac205
    • Baoquan He's avatar
      x86/boot/KASLR: Switch to pass struct mem_vector to process_e820_entry() · 87891b01
      Baoquan He authored
      This makes process_e820_entry() be able to process any kind of memory
      region.
      Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: fanc.fnst@cn.fujitsu.com
      Cc: izumi.taku@jp.fujitsu.com
      Cc: matt@codeblueprint.co.uk
      Cc: thgarnie@google.com
      Link: http://lkml.kernel.org/r/1499603862-11516-3-git-send-email-bhe@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      87891b01
    • Baoquan He's avatar
      x86/boot/KASLR: Wrap e820 entries walking code into new function process_e820_entries() · f62995c9
      Baoquan He authored
      The original function process_e820_entry() only takes care of each
      e820 entry passed.
      
      And move the E820_TYPE_RAM checking logic into process_e820_entries().
      
      And remove the redundent local variable 'addr' definition in
      find_random_phys_addr().
      Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: fanc.fnst@cn.fujitsu.com
      Cc: izumi.taku@jp.fujitsu.com
      Cc: matt@codeblueprint.co.uk
      Cc: thgarnie@google.com
      Link: http://lkml.kernel.org/r/1499603862-11516-2-git-send-email-bhe@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      f62995c9
  2. 17 Jul, 2017 7 commits
  3. 16 Jul, 2017 3 commits
  4. 15 Jul, 2017 13 commits
    • Linus Torvalds's avatar
      Linux v4.13-rc1 · 5771a8c0
      Linus Torvalds authored
      5771a8c0
    • Linus Torvalds's avatar
      Merge tag 'standardize-docs' of git://git.lwn.net/linux · 486088bc
      Linus Torvalds authored
      Pull documentation format standardization from Jonathan Corbet:
       "This series converts a number of top-level documents to the RST format
        without incorporating them into the Sphinx tree. The hope is to bring
        some uniformity to kernel documentation and, perhaps more importantly,
        have our existing docs serve as an example of the desired formatting
        for those that will be added later.
      
        Mauro has gone through and fixed up a lot of top-level documentation
        files to make them conform to the RST format, but without moving or
        renaming them in any way. This will help when we incorporate the ones
        we want to keep into the Sphinx doctree, but the real purpose is to
        bring a bit of uniformity to our documentation and let the top-level
        docs serve as examples for those writing new ones"
      
      * tag 'standardize-docs' of git://git.lwn.net/linux: (84 commits)
        docs: kprobes.txt: Fix whitespacing
        tee.txt: standardize document format
        cgroup-v2.txt: standardize document format
        dell_rbu.txt: standardize document format
        zorro.txt: standardize document format
        xz.txt: standardize document format
        xillybus.txt: standardize document format
        vfio.txt: standardize document format
        vfio-mediated-device.txt: standardize document format
        unaligned-memory-access.txt: standardize document format
        this_cpu_ops.txt: standardize document format
        svga.txt: standardize document format
        static-keys.txt: standardize document format
        smsc_ece1099.txt: standardize document format
        SM501.txt: standardize document format
        siphash.txt: standardize document format
        sgi-ioc4.txt: standardize document format
        SAK.txt: standardize document format
        rpmsg.txt: standardize document format
        robust-futexes.txt: standardize document format
        ...
      486088bc
    • Linus Torvalds's avatar
      Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random · 52f6c588
      Linus Torvalds authored
      Pull random updates from Ted Ts'o:
       "Add wait_for_random_bytes() and get_random_*_wait() functions so that
        callers can more safely get random bytes if they can block until the
        CRNG is initialized.
      
        Also print a warning if get_random_*() is called before the CRNG is
        initialized. By default, only one single-line warning will be printed
        per boot. If CONFIG_WARN_ALL_UNSEEDED_RANDOM is defined, then a
        warning will be printed for each function which tries to get random
        bytes before the CRNG is initialized. This can get spammy for certain
        architecture types, so it is not enabled by default"
      
      * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
        random: reorder READ_ONCE() in get_random_uXX
        random: suppress spammy warnings about unseeded randomness
        random: warn when kernel uses unseeded randomness
        net/route: use get_random_int for random counter
        net/neighbor: use get_random_u32 for 32-bit hash random
        rhashtable: use get_random_u32 for hash_rnd
        ceph: ensure RNG is seeded before using
        iscsi: ensure RNG is seeded before use
        cifs: use get_random_u32 for 32-bit lock random
        random: add get_random_{bytes,u32,u64,int,long,once}_wait family
        random: add wait_for_random_bytes() API
      52f6c588
    • Linus Torvalds's avatar
      Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 78dcf734
      Linus Torvalds authored
      Pull ->s_options removal from Al Viro:
       "Preparations for fsmount/fsopen stuff (coming next cycle). Everything
        gets moved to explicit ->show_options(), killing ->s_options off +
        some cosmetic bits around fs/namespace.c and friends. Basically, the
        stuff needed to work with fsmount series with minimum of conflicts
        with other work.
      
        It's not strictly required for this merge window, but it would reduce
        the PITA during the coming cycle, so it would be nice to have those
        bits and pieces out of the way"
      
      * 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        isofs: Fix isofs_show_options()
        VFS: Kill off s_options and helpers
        orangefs: Implement show_options
        9p: Implement show_options
        isofs: Implement show_options
        afs: Implement show_options
        affs: Implement show_options
        befs: Implement show_options
        spufs: Implement show_options
        bpf: Implement show_options
        ramfs: Implement show_options
        pstore: Implement show_options
        omfs: Implement show_options
        hugetlbfs: Implement show_options
        VFS: Don't use save/replace_mount_options if not using generic_show_options
        VFS: Provide empty name qstr
        VFS: Make get_filesystem() return the affected filesystem
        VFS: Clean up whitespace in fs/namespace.c and fs/super.c
        Provide a function to create a NUL-terminated string from unterminated data
      78dcf734
    • Linus Torvalds's avatar
      Merge branch 'work.__copy_to_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 93ff8185
      Linus Torvalds authored
      Pull more __copy_.._user elimination from Al Viro.
      
      * 'work.__copy_to_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        drm_dp_aux_dev: switch to read_iter/write_iter
      93ff8185
    • Linus Torvalds's avatar
      Merge branch 'work.uaccess-unaligned' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 89cbec71
      Linus Torvalds authored
      Pull uacess-unaligned removal from Al Viro:
       "That stuff had just one user, and an exotic one, at that - binfmt_flat
        on arm and m68k"
      
      * 'work.uaccess-unaligned' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        kill {__,}{get,put}_user_unaligned()
        binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail
      89cbec71
    • Linus Torvalds's avatar
      Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 2173bd06
      Linus Torvalds authored
      Pull network field-by-field copy-in updates from Al Viro:
       "This part of the misc compat queue was held back for review from
        networking folks and since davem has jus ACKed those..."
      
      * 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        get_compat_bpf_fprog(): don't copyin field-by-field
        get_compat_msghdr(): get rid of field-by-field copyin
        copy_msghdr_from_user(): get rid of field-by-field copyin
      2173bd06
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 568d135d
      Linus Torvalds authored
      Pull MIPS updates from Ralf Baechle:
       "Boston platform support:
         - Document DT bindings
         - Add CLK driver for board clocks
      
        CM:
         - Avoid per-core locking with CM3 & higher
         - WARN on attempt to lock invalid VP, not BUG
      
        CPS:
         - Select CONFIG_SYS_SUPPORTS_SCHED_SMT for MIPSr6
         - Prevent multi-core with dcache aliasing
         - Handle cores not powering down more gracefully
         - Handle spurious VP starts more gracefully
      
        DSP:
         - Add lwx & lhx missaligned access support
      
        eBPF:
         - Add MIPS support along with many supporting change to add the
           required infrastructure
      
        Generic arch code:
         - Misc sysmips MIPS_ATOMIC_SET fixes
         - Drop duplicate HAVE_SYSCALL_TRACEPOINTS
         - Negate error syscall return in trace
         - Correct forced syscall errors
         - Traced negative syscalls should return -ENOSYS
         - Allow samples/bpf/tracex5 to access syscall arguments for sane
           traces
         - Cleanup from old Kconfig options in defconfigs
         - Fix PREF instruction usage by memcpy for MIPS R6
         - Fix various special cases in the FPU eulation
         - Fix some special cases in MIPS16e2 support
         - Fix MIPS I ISA /proc/cpuinfo reporting
         - Sort MIPS Kconfig alphabetically
         - Fix minimum alignment requirement of IRQ stack as required by
           ABI / GCC
         - Fix special cases in the module loader
         - Perform post-DMA cache flushes on systems with MAARs
         - Probe the I6500 CPU
         - Cleanup cmpxchg and add support for 1 and 2 byte operations
         - Use queued read/write locks (qrwlock)
         - Use queued spinlocks (qspinlock)
         - Add CPU shared FTLB feature detection
         - Handle tlbex-tlbp race condition
         - Allow storing pgd in C0_CONTEXT for MIPSr6
         - Use current_cpu_type() in m4kc_tlbp_war()
         - Support Boston in the generic kernel
      
        Generic platform:
         - yamon-dt: Pull YAMON DT shim code out of SEAD-3 board
         - yamon-dt: Support > 256MB of RAM
         - yamon-dt: Use serial* rather than uart* aliases
         - Abstract FDT fixup application
         - Set RTC_ALWAYS_BCD to 0
         - Add a MAINTAINERS entry
      
        core kernel:
         - qspinlock.c: include linux/prefetch.h
      
        Loongson 3:
         - Add support
      
        Perf:
         - Add I6500 support
      
        SEAD-3:
         - Remove GIC timer from DT
         - Set interrupt-parent per-device, not at root node
         - Fix GIC interrupt specifiers
      
        SMP:
         - Skip IPI setup if we only have a single CPU
      
        VDSO:
         - Make comment match reality
         - Improvements to time code in VDSO"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (86 commits)
        locking/qspinlock: Include linux/prefetch.h
        MIPS: Fix MIPS I ISA /proc/cpuinfo reporting
        MIPS: Fix minimum alignment requirement of IRQ stack
        MIPS: generic: Support MIPS Boston development boards
        MIPS: DTS: img: Don't attempt to build-in all .dtb files
        clk: boston: Add a driver for MIPS Boston board clocks
        dt-bindings: Document img,boston-clock binding
        MIPS: Traced negative syscalls should return -ENOSYS
        MIPS: Correct forced syscall errors
        MIPS: Negate error syscall return in trace
        MIPS: Drop duplicate HAVE_SYSCALL_TRACEPOINTS select
        MIPS16e2: Provide feature overrides for non-MIPS16 systems
        MIPS: MIPS16e2: Report ASE presence in /proc/cpuinfo
        MIPS: MIPS16e2: Subdecode extended LWSP/SWSP instructions
        MIPS: MIPS16e2: Identify ASE presence
        MIPS: VDSO: Fix a mismatch between comment and preprocessor constant
        MIPS: VDSO: Add implementation of gettimeofday() fallback
        MIPS: VDSO: Add implementation of clock_gettime() fallback
        MIPS: VDSO: Fix conversions in do_monotonic()/do_monotonic_coarse()
        MIPS: Use current_cpu_type() in m4kc_tlbp_war()
        ...
      568d135d
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · 4ecd4ff5
      Linus Torvalds authored
      Pull UML updates from Richard Weinberger:
       "Mostly fixes for UML:
      
         - First round of fixes for PTRACE_GETRESET/SETREGSET
      
         - A printf vs printk cleanup
      
         - Minor improvements"
      
      * 'for-linus-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: Correctly check for PTRACE_GETRESET/SETREGSET
        um: v2: Use generic NOTES macro
        um: Add kerneldoc for userspace_tramp() and start_userspace()
        um: Add kerneldoc for segv_handler
        um: stub-data.h: remove superfluous include
        um: userspace - be more verbose in ptrace set regs error
        um: add dummy ioremap and iounmap functions
        um: Allow building and running on older hosts
        um: Avoid longjmp/setjmp symbol clashes with libpthread.a
        um: console: Ignore console= option
        um: Use os_warn to print out pre-boot warning/error messages
        um: Add os_warn() for pre-boot warning/error messages
        um: Use os_info for the messages on normal path
        um: Add os_info() for pre-boot information messages
        um: Use printk instead of printf in make_uml_dir
      4ecd4ff5
    • Linus Torvalds's avatar
      Merge tag 'upstream-4.13-rc1' of git://git.infradead.org/linux-ubifs · 966859b9
      Linus Torvalds authored
      Pull UBIFS updates from Richard Weinberger:
      
       - Updates and fixes for the file encryption mode
      
       - Minor improvements
      
       - Random fixes
      
      * tag 'upstream-4.13-rc1' of git://git.infradead.org/linux-ubifs:
        ubifs: Set double hash cookie also for RENAME_EXCHANGE
        ubifs: Massage assert in ubifs_xattr_set() wrt. init_xattrs
        ubifs: Don't leak kernel memory to the MTD
        ubifs: Change gfp flags in page allocation for bulk read
        ubifs: Fix oops when remounting with no_bulk_read.
        ubifs: Fail commit if TNC is obviously inconsistent
        ubifs: allow userspace to map mounts to volumes
        ubifs: Wire-up statx() support
        ubifs: Remove dead code from ubifs_get_link()
        ubifs: Massage debug prints wrt. fscrypt
        ubifs: Add assert to dent_key_init()
        ubifs: Fix unlink code wrt. double hash lookups
        ubifs: Fix data node size for truncating uncompressed nodes
        ubifs: Don't encrypt special files on creation
        ubifs: Fix memory leak in RENAME_WHITEOUT error path in do_rename
        ubifs: Fix inode data budget in ubifs_mknod
        ubifs: Correctly evict xattr inodes
        ubifs: Unexport ubifs_inode_slab
        ubifs: don't bother checking for encryption key in ->mmap()
        ubifs: require key for truncate(2) of encrypted file
      966859b9
    • Linus Torvalds's avatar
      Merge tag 'kvm-4.13-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm · e37a07e0
      Linus Torvalds authored
      Pull more KVM updates from Radim Krčmář:
       "Second batch of KVM updates for v4.13
      
        Common:
         - add uevents for VM creation/destruction
         - annotate and properly access RCU-protected objects
      
        s390:
         - rename IOCTL added in the first v4.13 merge
      
        x86:
         - emulate VMLOAD VMSAVE feature in SVM
         - support paravirtual asynchronous page fault while nested
         - add Hyper-V userspace interfaces for better migration
         - improve master clock corner cases
         - extend internal error reporting after EPT misconfig
         - correct single-stepping of emulated instructions in SVM
         - handle MCE during VM entry
         - fix nVMX VM entry checks and nVMX VMCS shadowing"
      
      * tag 'kvm-4.13-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (28 commits)
        kvm: x86: hyperv: make VP_INDEX managed by userspace
        KVM: async_pf: Let guest support delivery of async_pf from guest mode
        KVM: async_pf: Force a nested vmexit if the injected #PF is async_pf
        KVM: async_pf: Add L1 guest async_pf #PF vmexit handler
        KVM: x86: Simplify kvm_x86_ops->queue_exception parameter list
        kvm: x86: hyperv: add KVM_CAP_HYPERV_SYNIC2
        KVM: x86: make backwards_tsc_observed a per-VM variable
        KVM: trigger uevents when creating or destroying a VM
        KVM: SVM: Enable Virtual VMLOAD VMSAVE feature
        KVM: SVM: Add Virtual VMLOAD VMSAVE feature definition
        KVM: SVM: Rename lbr_ctl field in the vmcb control area
        KVM: SVM: Prepare for new bit definition in lbr_ctl
        KVM: SVM: handle singlestep exception when skipping emulated instructions
        KVM: x86: take slots_lock in kvm_free_pit
        KVM: s390: Fix KVM_S390_GET_CMMA_BITS ioctl definition
        kvm: vmx: Properly handle machine check during VM-entry
        KVM: x86: update master clock before computing kvmclock_offset
        kvm: nVMX: Shadow "high" parts of shadowed 64-bit VMCS fields
        kvm: nVMX: Fix nested_vmx_check_msr_bitmap_controls
        kvm: nVMX: Validate the I/O bitmaps on nested VM-entry
        ...
      e37a07e0
    • Sebastian Andrzej Siewior's avatar
      random: reorder READ_ONCE() in get_random_uXX · 72e5c740
      Sebastian Andrzej Siewior authored
      Avoid the READ_ONCE in commit 4a072c71 ("random: silence compiler
      warnings and fix race") if we can leave the function after
      arch_get_random_XXX().
      
      Cc: Jason A. Donenfeld <Jason@zx2c4.com>
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      72e5c740
    • Theodore Ts'o's avatar
      random: suppress spammy warnings about unseeded randomness · eecabf56
      Theodore Ts'o authored
      Unfortunately, on some models of some architectures getting a fully
      seeded CRNG is extremely difficult, and so this can result in dmesg
      getting spammed for a surprisingly long time.  This is really bad from
      a security perspective, and so architecture maintainers really need to
      do what they can to get the CRNG seeded sooner after the system is
      booted.  However, users can't do anything actionble to address this,
      and spamming the kernel messages log will only just annoy people.
      
      For developers who want to work on improving this situation,
      CONFIG_WARN_UNSEEDED_RANDOM has been renamed to
      CONFIG_WARN_ALL_UNSEEDED_RANDOM.  By default the kernel will always
      print the first use of unseeded randomness.  This way, hopefully the
      security obsessed will be happy that there is _some_ indication when
      the kernel boots there may be a potential issue with that architecture
      or subarchitecture.  To see all uses of unseeded randomness,
      developers can enable CONFIG_WARN_ALL_UNSEEDED_RANDOM.
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      eecabf56