1. Oct 05, 2022
  2. Oct 03, 2022
  3. Oct 02, 2022
  4. Oct 01, 2022
  5. Sep 30, 2022
    • Linus Torvalds's avatar
      Merge tag 'pstore-v6.0-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · d649d2c4
      Linus Torvalds authored
      Pull pstore revert from Kees Cook:
       "A misbehavior with some compression backends in pstore was just
        discovered due to the recent crypto acomp migration.
      
        Since we're so close to release, it seems better to just simply revert
        it, and we can figure out what's going on without leaving it broken
        for a release.
      
         - Revert crypto acomp migration (Guilherme G. Piccoli)"
      
      * tag 'pstore-v6.0-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        Revert "pstore: migrate to crypto acomp interface"
      d649d2c4
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 89e10b86
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
       "One more fix for the upcoming release:
      
         - fix the check for pwm support on non-A8K platforms in gpio-mvebu"
      
      * tag 'gpio-fixes-for-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpio: mvebu: Fix check for pwm support on non-A8K platforms
      89e10b86
    • Guilherme G. Piccoli's avatar
      Revert "pstore: migrate to crypto acomp interface" · 40158dbf
      Guilherme G. Piccoli authored
      This reverts commit e4f0a7ec.
      
      When using this new interface, both efi_pstore and ramoops
      backends are unable to properly decompress dmesg if using
      zstd, lz4 and lzo algorithms (and maybe more). It does succeed
      with deflate though.
      
      The message observed in the kernel log is:
      
      [2.328828] pstore: crypto_acomp_decompress failed, ret = -22!
      
      The pstore infrastructure is able to collect the dmesg with
      both backends tested, but since decompression fails it's
      unreadable. With this revert everything is back to normal.
      
      Fixes: e4f0a7ec
      
       ("pstore: migrate to crypto acomp interface")
      Cc: Ard Biesheuvel <ardb@kernel.org>
      Signed-off-by: default avatarGuilherme G. Piccoli <gpiccoli@igalia.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Link: https://lore.kernel.org/r/20220929215515.276486-1-gpiccoli@igalia.com
      40158dbf
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-09-30-1' of git://anongit.freedesktop.org/drm/drm · 5a773869
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Last set of fixes for 6.0 hopefully - minor bridge fixes, i915 fixes,
        and a bunch of amdgpu fixes for new IP blocks, along with a couple of
        regression fixes. Should be all set for merge window next week.
      
        amdgpu:
         - GC 11.x fixes
         - SMU 13.x fixes
         - DCN 3.1.4 fixes
         - DCN 3.2.x fixes
         - GC 9.x fix
         - Fence fix
         - SR-IOV supend/resume fix
         - PSR regression fix
      
        i915:
         - Restrict forced preemption to the active context
         - Restrict perf_limit_reasons to the supported platforms - gen11+
      
        bridge:
         - analogix: Revert earlier suspend fix
         - lt8912b: Fix corrupt display output"
      
      * tag 'drm-fixes-2022-09-30-1' of git://anongit.freedesktop.org/drm/drm: (26 commits)
        drm/amd/display: Prevent OTG shutdown during PSR SU
        drm/i915/gt: Perf_limit_reasons are only available for Gen11+
        drm/amdgpu: Add amdgpu suspend-resume code path under SRIOV
        drm/amdgpu: Remove fence_process in count_emitted
        drm/amdgpu: Correct the position in patch_cond_exec
        drm/amd/display: fill in clock values when DPM is not enabled
        drm/amd/display: Avoid unnecessary pixel rate divider programming
        drm/amd/display: Remove assert for odm transition case
        drm/amd/display: Fix typo in get_pixel_rate_div
        drm/amd/display: Fix audio on display after unplugging another
        drm/amd/display: Add explicit FIFO disable for DP blank
        drm/amd/display: Wrap OTG disable workaround with FIFO control
        drm/amd/display: Do DIO FIFO enable after DP video stream enable
        drm/amd/display: Update DCN32 to use new SR latencies
        drm/amd/display: Avoid avoid unnecessary pixel rate divider programming
        drm/amdkfd: fix dropped interrupt in kfd_int_process_v11
        drm/amdgpu: pass queue size and is_aql_queue to MES
        drm/amdkfd: fix MQD init for GFX11 in init_mqd
        drm/amd/pm: use adverse selection for dpm features unsupported by driver
        drm/amd/pm: enable gfxoff feature for SMU 13.0.0
        ...
      5a773869
    • Sean Christopherson's avatar
      KVM: selftests: Compare insn opcodes directly in fix_hypercall_test · 39426507
      Sean Christopherson authored
      Directly compare the expected versus observed hypercall instructions when
      verifying that KVM patched in the native hypercall (FIX_HYPERCALL_INSN
      quirk enabled).  gcc rightly complains that doing a 4-byte memcpy() with
      an "unsigned char" as the source generates an out-of-bounds accesses.
      
      Alternatively, "exp" and "obs" could be declared as 3-byte arrays, but
      there's no known reason to copy locally instead of comparing directly.
      
      In function ‘assert_hypercall_insn’,
          inlined from ‘guest_main’ at x86_64/fix_hypercall_test.c:91:2:
      x86_64/fix_hypercall_test.c:63:9: error: array subscript ‘unsigned int[0]’
       is partly outside array bounds of ‘unsigned char[1]’ [-Werror=array-bounds]
         63 |         memcpy(&exp, exp_insn, sizeof(exp));
            |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      x86_64/fix_hypercall_test.c: In function ‘guest_main’:
      x86_64/fix_hypercall_test.c:42:22: note: object ‘vmx_hypercall_insn’ of size 1
         42 | extern unsigned char vmx_hypercall_insn;
            |                      ^~~~~~~~~~~~~~~~~~
      x86_64/fix_hypercall_test.c:25:22: note: object ‘svm_hypercall_insn’ of size 1
         25 | extern unsigned char svm_hypercall_insn;
            |                      ^~~~~~~~~~~~~~~~~~
      In function ‘assert_hypercall_insn’,
          inlined from ‘guest_main’ at x86_64/fix_hypercall_test.c:91:2:
      x86_64/fix_hypercall_test.c:64:9: error: array subscript ‘unsigned int[0]’
       is partly outside array bounds of ‘unsigned char[1]’ [-Werror=array-bounds]
         64 |         memcpy(&obs, obs_insn, sizeof(obs));
            |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      x86_64/fix_hypercall_test.c: In function ‘guest_main’:
      x86_64/fix_hypercall_test.c:25:22: note: object ‘svm_hypercall_insn’ of size 1
         25 | extern unsigned char svm_hypercall_insn;
            |                      ^~~~~~~~~~~~~~~~~~
      x86_64/fix_hypercall_test.c:42:22: note: object ‘vmx_hypercall_insn’ of size 1
         42 | extern unsigned char vmx_hypercall_insn;
            |                      ^~~~~~~~~~~~~~~~~~
      cc1: all warnings being treated as errors
      make: *** [../lib.mk:135: tools/testing/selftests/kvm/x86_64/fix_hypercall_test] Error 1
      
      Fixes: 6c2fa8b2
      
       ("selftests: KVM: Test KVM_X86_QUIRK_FIX_HYPERCALL_INSN")
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
      Reviewed-by: default avatarOliver Upton <oliver.upton@linux.dev>
      Message-Id: <20220928233652.783504-3-seanjc@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      39426507
    • Sean Christopherson's avatar
      KVM: selftests: Implement memcmp(), memcpy(), and memset() for guest use · 6b6f7148
      Sean Christopherson authored
      Implement memcmp(), memcpy(), and memset() to override the compiler's
      built-in versions in order to guarantee that the compiler won't generate
      out-of-line calls to external functions via the PLT.  This allows the
      helpers to be safely used in guest code, as KVM selftests don't support
      dynamic loading of guest code.
      
      Steal the implementations from the kernel's generic versions, sans the
      optimizations in memcmp() for unaligned accesses.
      
      Put the utilities in a separate compilation unit and build with
      -ffreestanding to fudge around a gcc "feature" where it will optimize
      memset(), memcpy(), etc... by generating a recursive call.  I.e. the
      compiler optimizes itself into infinite recursion.  Alternatively, the
      individual functions could be tagged with
      optimize("no-tree-loop-distribute-patterns"), but using "optimize" for
      anything but debug is discouraged, and Linus NAK'd the use of the flag
      in the kernel proper[*].
      
      https://lore.kernel.org/lkml/CAHk-=wik-oXnUpfZ6Hw37uLykc-_P0Apyn2XuX-odh-3Nzop8w@mail.gmail.com
      
      
      
      Cc: Andrew Jones <andrew.jones@linux.dev>
      Cc: Anup Patel <anup@brainfault.org>
      Cc: Atish Patra <atishp@atishpatra.org>
      Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
      Cc: Janosch Frank <frankja@linux.ibm.com>
      Cc: Claudio Imbrenda <imbrenda@linux.ibm.com>
      Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
      Message-Id: <20220928233652.783504-2-seanjc@google.com>
      Reviewed-by: default avatarAndrew Jones <andrew.jones@linux.dev>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      6b6f7148
    • Jim Mattson's avatar
      KVM: x86: Hide IA32_PLATFORM_DCA_CAP[31:0] from the guest · aae2e722
      Jim Mattson authored
      The only thing reported by CPUID.9 is the value of
      IA32_PLATFORM_DCA_CAP[31:0] in EAX. This MSR doesn't even exist in the
      guest, since CPUID.1:ECX.DCA[bit 18] is clear in the guest.
      
      Clear CPUID.9 in KVM_GET_SUPPORTED_CPUID.
      
      Fixes: 24c82e57
      
       ("KVM: Sanitize cpuid")
      Signed-off-by: default avatarJim Mattson <jmattson@google.com>
      Message-Id: <20220922231854.249383-1-jmattson@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      aae2e722
    • David Matlack's avatar
      KVM: selftests: Gracefully handle empty stack traces · 09636efd
      David Matlack authored
      
      
      Bail out of test_dump_stack() if the stack trace is empty rather than
      invoking addr2line with zero addresses. The problem with the latter is
      that addr2line will block waiting for addresses to be passed in via
      stdin, e.g. if running a selftest from an interactive terminal.
      
      Opportunistically fix up the comment that mentions skipping 3 frames
      since only 2 are skipped in the code.
      
      Cc: Vipin Sharma <vipinsh@google.com>
      Cc: Sean Christopherson <seanjc@google.com>
      Signed-off-by: default avatarDavid Matlack <dmatlack@google.com>
      Message-Id: <20220922231724.3560211-1-dmatlack@google.com>
      [Small tweak to keep backtrace() call close to if(). - Paolo]
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      09636efd