1. 22 5月, 2020 1 次提交
  2. 22 4月, 2020 2 次提交
  3. 21 4月, 2020 1 次提交
  4. 18 4月, 2020 3 次提交
  5. 17 4月, 2020 2 次提交
  6. 15 4月, 2020 1 次提交
  7. 14 4月, 2020 4 次提交
    • J
      x86/microcode/AMD: Increase microcode PATCH_MAX_SIZE · bdf89df3
      John Allen 提交于
      Future AMD CPUs will have microcode patches that exceed the default 4K
      patch size. Raise our limit.
      Signed-off-by: NJohn Allen <john.allen@amd.com>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: stable@vger.kernel.org # v4.14..
      Link: https://lkml.kernel.org/r/20200409152931.GA685273@mojo.amd.com
      bdf89df3
    • A
      efi/x86: Revert struct layout change to fix kexec boot regression · a088b858
      Ard Biesheuvel 提交于
      Commit
      
        0a67361d ("efi/x86: Remove runtime table address from kexec EFI setup data")
      
      removed the code that retrieves the non-remapped UEFI runtime services
      pointer from the data structure provided by kexec, as it was never really
      needed on the kexec boot path: mapping the runtime services table at its
      non-remapped address is only needed when calling SetVirtualAddressMap(),
      which never happens during a kexec boot in the first place.
      
      However, dropping the 'runtime' member from struct efi_setup_data was a
      mistake. That struct is shared ABI between the kernel and the kexec tooling
      for x86, and so we cannot simply change its layout. So let's put back the
      removed field, but call it 'unused' to reflect the fact that we never look
      at its contents. While at it, add a comment to remind our future selves
      that the layout is external ABI.
      
      Fixes: 0a67361d ("efi/x86: Remove runtime table address from kexec EFI setup data")
      Reported-by: NTheodore Ts'o <tytso@mit.edu>
      Tested-by: NTheodore Ts'o <tytso@mit.edu>
      Reviewed-by: NDave Young <dyoung@redhat.com>
      Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      a088b858
    • A
      efi/x86: Don't remap text<->rodata gap read-only for mixed mode · f6103162
      Ard Biesheuvel 提交于
      Commit
      
        d9e3d2c4 ("efi/x86: Don't map the entire kernel text RW for mixed mode")
      
      updated the code that creates the 1:1 memory mapping to use read-only
      attributes for the 1:1 alias of the kernel's text and rodata sections, to
      protect it from inadvertent modification. However, it failed to take into
      account that the unused gap between text and rodata is given to the page
      allocator for general use.
      
      If the vmap'ed stack happens to be allocated from this region, any by-ref
      output arguments passed to EFI runtime services that are allocated on the
      stack (such as the 'datasize' argument taken by GetVariable() when invoked
      from efivar_entry_size()) will be referenced via a read-only mapping,
      resulting in a page fault if the EFI code tries to write to it:
      
        BUG: unable to handle page fault for address: 00000000386aae88
        #PF: supervisor write access in kernel mode
        #PF: error_code(0x0003) - permissions violation
        PGD fd61063 P4D fd61063 PUD fd62063 PMD 386000e1
        Oops: 0003 [#1] SMP PTI
        CPU: 2 PID: 255 Comm: systemd-sysv-ge Not tainted 5.6.0-rc4-default+ #22
        Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015
        RIP: 0008:0x3eaeed95
        Code: ...  <89> 03 be 05 00 00 80 a1 74 63 b1 3e 83 c0 48 e8 44 d2 ff ff eb 05
        RSP: 0018:000000000fd73fa0 EFLAGS: 00010002
        RAX: 0000000000000001 RBX: 00000000386aae88 RCX: 000000003e9f1120
        RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000000000001
        RBP: 000000000fd73fd8 R08: 00000000386aae88 R09: 0000000000000000
        R10: 0000000000000002 R11: 0000000000000000 R12: 0000000000000000
        R13: ffffc0f040220000 R14: 0000000000000000 R15: 0000000000000000
        FS:  00007f21160ac940(0000) GS:ffff9cf23d500000(0000) knlGS:0000000000000000
        CS:  0008 DS: 0018 ES: 0018 CR0: 0000000080050033
        CR2: 00000000386aae88 CR3: 000000000fd6c004 CR4: 00000000003606e0
        DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
        Call Trace:
        Modules linked in:
        CR2: 00000000386aae88
        ---[ end trace a8bfbd202e712834 ]---
      
      Let's fix this by remapping text and rodata individually, and leave the
      gaps mapped read-write.
      
      Fixes: d9e3d2c4 ("efi/x86: Don't map the entire kernel text RW for mixed mode")
      Reported-by: NJiri Slaby <jslaby@suse.cz>
      Tested-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      Link: https://lore.kernel.org/r/20200409130434.6736-10-ardb@kernel.org
      f6103162
    • G
      efi/x86: Fix the deletion of variables in mixed mode · a4b81ccf
      Gary Lin 提交于
      efi_thunk_set_variable() treated the NULL "data" pointer as an invalid
      parameter, and this broke the deletion of variables in mixed mode.
      This commit fixes the check of data so that the userspace program can
      delete a variable in mixed mode.
      
      Fixes: 8319e9d5 ("efi/x86: Handle by-ref arguments covering multiple pages in mixed mode")
      Signed-off-by: NGary Lin <glin@suse.com>
      Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      Link: https://lore.kernel.org/r/20200408081606.1504-1-glin@suse.com
      Link: https://lore.kernel.org/r/20200409130434.6736-9-ardb@kernel.org
      a4b81ccf
  8. 12 4月, 2020 2 次提交
  9. 11 4月, 2020 11 次提交
  10. 10 4月, 2020 1 次提交
  11. 09 4月, 2020 1 次提交
  12. 08 4月, 2020 11 次提交