1. 16 Feb, 2023 1 commit
    • Greg Kroah-Hartman's avatar
      kvm: initialize all of the kvm_debugregs structure before sending it to userspace · 2c10b614
      Greg Kroah-Hartman authored
      When calling the KVM_GET_DEBUGREGS ioctl, on some configurations, there
      might be some unitialized portions of the kvm_debugregs structure that
      could be copied to userspace.  Prevent this as is done in the other kvm
      ioctls, by setting the whole structure to 0 before copying anything into
      it.
      
      Bonus is that this reduces the lines of code as the explicit flag
      setting and reserved space zeroing out can be removed.
      
      Cc: Sean Christopherson <seanjc@google.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: <x86@kernel.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: stable <stable@kernel.org>
      Reported-by: default avatarXingyuan Mo <hdthky0@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Message-Id: <20230214103304.3689213-1-gregkh@linuxfoundation.org>
      Tested-by: default avatarXingyuan Mo <hdthky0@gmail.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      2c10b614
  2. 15 Feb, 2023 3 commits
    • Sean Christopherson's avatar
      perf/x86: Refuse to export capabilities for hybrid PMUs · 4b4191b8
      Sean Christopherson authored
      Now that KVM disables vPMU support on hybrid CPUs, WARN and return zeros
      if perf_get_x86_pmu_capability() is invoked on a hybrid CPU.  The helper
      doesn't provide an accurate accounting of the PMU capabilities for hybrid
      CPUs and needs to be enhanced if KVM, or anything else outside of perf,
      wants to act on the PMU capabilities.
      
      Cc: stable@vger.kernel.org
      Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Link: https://lore.kernel.org/all/20220818181530.2355034-1-kan.liang@linux.intel.comSigned-off-by: default avatarSean Christopherson <seanjc@google.com>
      Message-Id: <20230208204230.1360502-3-seanjc@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      4b4191b8
    • Sean Christopherson's avatar
      KVM: x86/pmu: Disable vPMU support on hybrid CPUs (host PMUs) · 4d7404e5
      Sean Christopherson authored
      Disable KVM support for virtualizing PMUs on hosts with hybrid PMUs until
      KVM gains a sane way to enumeration the hybrid vPMU to userspace and/or
      gains a mechanism to let userspace opt-in to the dangers of exposing a
      hybrid vPMU to KVM guests.  Virtualizing a hybrid PMU, or at least part of
      a hybrid PMU, is possible, but it requires careful, deliberate
      configuration from userspace.
      
      E.g. to expose full functionality, vCPUs need to be pinned to pCPUs to
      prevent migrating a vCPU between a big core and a little core, userspace
      must enumerate a reasonable topology to the guest, and guest CPUID must be
      curated per vCPU to enumerate accurate vPMU capabilities.
      
      The last point is especially problematic, as KVM doesn't control which
      pCPU it runs on when enumerating KVM's vPMU capabilities to userspace,
      i.e. userspace can't rely on KVM_GET_SUPPORTED_CPUID in it's current form.
      
      Alternatively, userspace could enable vPMU support by enumerating the
      set of features that are common and coherent across all cores, e.g. by
      filtering PMU events and restricting guest capabilities.  But again, that
      requires userspace to take action far beyond reflecting KVM's supported
      feature set into the guest.
      
      For now, simply disable vPMU support on hybrid CPUs to avoid inducing
      seemingly random #GPs in guests, and punt support for hybrid CPUs to a
      future enabling effort.
      Reported-by: default avatarJianfeng Gao <jianfeng.gao@intel.com>
      Cc: stable@vger.kernel.org
      Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Link: https://lore.kernel.org/all/20220818181530.2355034-1-kan.liang@linux.intel.comSigned-off-by: default avatarSean Christopherson <seanjc@google.com>
      Message-Id: <20230208204230.1360502-2-seanjc@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      4d7404e5
    • Paolo Bonzini's avatar
      Documentation/hw-vuln: Fix rST warning · 971cecb9
      Paolo Bonzini authored
      The following warning:
      
         Documentation/admin-guide/hw-vuln/cross-thread-rsb.rst:92: ERROR: Unexpected indentation.
      
      was introduced by commit 493a2c2d.  Fix it by placing everything in
      the same paragraph and also use a monospace font.
      
      Fixes: 493a2c2d ("Documentation/hw-vuln: Add documentation for Cross-Thread Return Predictions")
      Reported-by: Stephen Rothwell <sfr@canb@auug.org.au>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      971cecb9
  3. 10 Feb, 2023 3 commits
  4. 29 Jan, 2023 6 commits
  5. 28 Jan, 2023 7 commits
    • Linus Torvalds's avatar
      Fix up more non-executable files marked executable · c9661827
      Linus Torvalds authored
      Joe found another DT file that shouldn't be executable, and that
      frustrated me enough that I went hunting with this script:
      
          git ls-files -s |
              grep '^100755' |
              cut -f2 |
              xargs grep -L '^#!'
      
      and that found another file that shouldn't have been marked executable
      either, despite being in the scripts directory.
      
      Maybe these two are the last ones at least for now.  But I'm sure we'll
      be back in a few years, fixing things up again.
      
      Fixes: 8c6789f4 ("ASoC: dt-bindings: Add Everest ES8326 audio CODEC")
      Fixes: 4d8e5cd2 ("locking/atomics: Fix scripts/atomic/ script permissions")
      Reported-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c9661827
    • Linus Torvalds's avatar
      Merge tag '6.2-rc5-ksmbd-server-fixes' of git://git.samba.org/ksmbd · 2543fdbd
      Linus Torvalds authored
      Pull ksmbd server fixes from Steve French:
       "Four smb3 server fixes, all also for stable:
      
         - fix for signing bug
      
         - fix to more strictly check packet length
      
         - add a max connections parm to limit simultaneous connections
      
         - fix error message flood that can occur with newer Samba xattr
           format"
      
      * tag '6.2-rc5-ksmbd-server-fixes' of git://git.samba.org/ksmbd:
        ksmbd: downgrade ndr version error message to debug
        ksmbd: limit pdu length size according to connection status
        ksmbd: do not sign response to session request for guest login
        ksmbd: add max connections parameter
      2543fdbd
    • Linus Torvalds's avatar
      Merge tag '6.2-rc5-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 5af6ce70
      Linus Torvalds authored
      Pull cifs fix from Steve French:
       "Fix for reconnect oops in smbdirect (RDMA), also is marked for stable"
      
      * tag '6.2-rc5-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: Fix oops due to uncleared server->smbd_conn in reconnect
      5af6ce70
    • Linus Torvalds's avatar
      Merge tag 'block-6.2-2023-01-27' of git://git.kernel.dk/linux · 90aaef4e
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Minor tweaks for this release:
      
         - NVMe pull request via Christoph:
              - Flush initial scan_work for async probe (Keith Busch)
              - Fix passthrough csi check (Keith Busch)
              - Fix nvme-fc initialization order (Ross Lagerwall)
      
         - Fix for tearing down non-started device in ublk (Ming)"
      
      * tag 'block-6.2-2023-01-27' of git://git.kernel.dk/linux:
        block: ublk: move ublk_chr_class destroying after devices are removed
        nvme: fix passthrough csi check
        nvme-pci: flush initial scan_work for async probe
        nvme-fc: fix initialization order
      90aaef4e
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.2-2023-01-27' of git://git.kernel.dk/linux · f851453b
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Two small fixes for this release:
      
         - Sanitize how async prep is done for drain requests, so we ensure
           that it always gets done (Dylan)
      
         - A ring provided buffer recycling fix for multishot receive (me)"
      
      * tag 'io_uring-6.2-2023-01-27' of git://git.kernel.dk/linux:
        io_uring: always prep_async for drain requests
        io_uring/net: cache provided buffer group value for multishot receives
      f851453b
    • Linus Torvalds's avatar
      Merge tag 'hardening-v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 28cca23d
      Linus Torvalds authored
      Pull hardening fixes from Kees Cook:
      
       - Split slow memcpy tests into MEMCPY_SLOW_KUNIT_TEST
      
       - Reorganize gcc-plugin includes for GCC 13
      
       - Silence bcache memcpy run-time false positive warnings
      
      * tag 'hardening-v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        bcache: Silence memcpy() run-time false positive warnings
        gcc-plugins: Reorganize gimple includes for GCC 13
        kunit: memcpy: Split slow memcpy tests into MEMCPY_SLOW_KUNIT_TEST
      28cca23d
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · d786f0fe
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
      
       - Fix filter memory leak by calling ftrace_free_filter()
      
       - Initialize trace_printk() earlier so that ftrace_dump_on_oops shows
         data on early crashes.
      
       - Update the outdated instructions in scripts/tracing/ftrace-bisect.sh
      
       - Add lockdep_is_held() to fix lockdep warning
      
       - Add allocation failure check in create_hist_field()
      
       - Don't initialize pointer that gets set right away in enabled_monitors_write()
      
       - Update MAINTAINER entries
      
       - Fix help messages in Kconfigs
      
       - Fix kernel-doc header for update_preds()
      
      * tag 'trace-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        bootconfig: Update MAINTAINERS file to add tree and mailing list
        rv: remove redundant initialization of pointer ptr
        ftrace: Maintain samples/ftrace
        tracing/filter: fix kernel-doc warnings
        lib: Kconfig: fix spellos
        trace_events_hist: add check for return value of 'create_hist_field'
        tracing/osnoise: Use built-in RCU list checking
        tracing: Kconfig: Fix spelling/grammar/punctuation
        ftrace/scripts: Update the instructions for ftrace-bisect.sh
        tracing: Make sure trace_printk() can output as soon as it can be used
        ftrace: Export ftrace_free_filter() to modules
      d786f0fe
  6. 27 Jan, 2023 20 commits