1. 07 Jan, 2022 7 commits
    • Arnaldo Carvalho de Melo's avatar
      Revert "libtraceevent: Increase libtraceevent logging when verbose" · dc9f2dd5
      Arnaldo Carvalho de Melo authored
      This reverts commit 08efcb4a.
      
      This breaks the build as it will prefer using libbpf-devel header files,
      even when not using LIBBPF_DYNAMIC=1, breaking the build.
      
      This was detected on OpenSuSE Tumbleweed with libtraceevent-devel 1.3.0,
      as described by Jiri Slaby:
      
      =======================================================================
      It breaks build with LIBTRACEEVENT_DYNAMIC and version 1.3.0:
      > util/debug.c: In function ‘perf_debug_option’:
      > util/debug.c:243:17: error: implicit declaration of function
      ‘tep_set_loglevel’ [-Werror=implicit-function-declaration]
      >   243 |                 tep_set_loglevel(TEP_LOG_INFO);
      >       |                 ^~~~~~~~~~~~~~~~
      > util/debug.c:243:34: error: ‘TEP_LOG_INFO’ undeclared (first use in this
      function); did you mean ‘TEP_PRINT_INFO’?
      >   243 |                 tep_set_loglevel(TEP_LOG_INFO);
      >       |                                  ^~~~~~~~~~~~
      >       |                                  TEP_PRINT_INFO
      > util/debug.c:243:34: note: each undeclared identifier is reported only once
      for each function it appears in
      > util/debug.c:245:34: error: ‘TEP_LOG_DEBUG’ undeclared (first use in this
      function)
      >   245 |                 tep_set_loglevel(TEP_LOG_DEBUG);
      >       |                                  ^~~~~~~~~~~~~
      > util/debug.c:247:34: error: ‘TEP_LOG_ALL’ undeclared (first use in this
      function)
      >   247 |                 tep_set_loglevel(TEP_LOG_ALL);
      >       |                                  ^~~~~~~~~~~
      
      It is because the gcc's command line looks like:
      gcc
      ...
      -I/home/abuild/rpmbuild/BUILD/tools/lib/
      ...
      -DLIBTRACEEVENT_VERSION=65790
      ...
      =======================================================================
      
      The proper way to fix this is more involved and so not suitable for this
      late in the 5.16-rc stage.
      Reported-by: default avatarJiri Slaby <jirislaby@kernel.org>
      Link: https://lore.kernel.org/lkml/bc2b0786-8965-1bcd-2316-9d9bb37b9c31@kernel.org
      Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: https://lore.kernel.org/lkml/YddGjjmlMZzxUZbN@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dc9f2dd5
    • Jiri Olsa's avatar
      perf trace: Avoid early exit due to running SIGCHLD handler before it makes sense to · f06a82f9
      Jiri Olsa authored
      When running 'perf trace' with an BPF object like:
      
        # perf trace -e openat,tools/perf/examples/bpf/hello.c
      
      the event parsing eventually calls llvm__get_kbuild_opts() that runs a
      script and that ends up with SIGCHLD delivered to the 'perf trace'
      handler, which assumes the workload process is done and quits 'perf
      trace'.
      
      Move the SIGCHLD handler setup directly to trace__run(), where the event
      is parsed and the object is already compiled.
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Christy Lee <christyc.y.lee@gmail.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20220106222030.227499-1-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f06a82f9
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 24556728
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "Two small fixes for x86:
      
         - lockdep WARN due to missing lock nesting annotation
      
         - NULL pointer dereference when accessing debugfs"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: Check for rmaps allocation
        KVM: SEV: Mark nested locking of kvm->lock
      24556728
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-01-07' of git://anongit.freedesktop.org/drm/drm · 7a6043cc
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "There is only the amdgpu runtime pm regression fix in here:
      
        amdgpu:
      
         - suspend/resume fix
      
         - fix runtime PM regression"
      
      * tag 'drm-fixes-2022-01-07' of git://anongit.freedesktop.org/drm/drm:
        drm/amdgpu: disable runpm if we are the primary adapter
        fbdev: fbmem: add a helper to determine if an aperture is used by a fw fb
        drm/amd/pm: keep the BACO feature enabled for suspend
      7a6043cc
    • Nikunj A Dadhania's avatar
      KVM: x86: Check for rmaps allocation · fffb5323
      Nikunj A Dadhania authored
      With TDP MMU being the default now, access to mmu_rmaps_stat debugfs
      file causes following oops:
      
      BUG: kernel NULL pointer dereference, address: 0000000000000000
      PGD 0 P4D 0
      Oops: 0000 [#1] PREEMPT SMP NOPTI
      CPU: 7 PID: 3185 Comm: cat Not tainted 5.16.0-rc4+ #204
      RIP: 0010:pte_list_count+0x6/0x40
       Call Trace:
        <TASK>
        ? kvm_mmu_rmaps_stat_show+0x15e/0x320
        seq_read_iter+0x126/0x4b0
        ? aa_file_perm+0x124/0x490
        seq_read+0xf5/0x140
        full_proxy_read+0x5c/0x80
        vfs_read+0x9f/0x1a0
        ksys_read+0x67/0xe0
        __x64_sys_read+0x19/0x20
        do_syscall_64+0x3b/0xc0
        entry_SYSCALL_64_after_hwframe+0x44/0xae
       RIP: 0033:0x7fca6fc13912
      
      Return early when rmaps are not present.
      Reported-by: default avatarVasant Hegde <vasant.hegde@amd.com>
      Tested-by: default avatarVasant Hegde <vasant.hegde@amd.com>
      Signed-off-by: default avatarNikunj A Dadhania <nikunj@amd.com>
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
      Message-Id: <20220105040337.4234-1-nikunj@amd.com>
      Cc: stable@vger.kernel.org
      Fixes: 3bcd0662 ("KVM: X86: Introduce mmu_rmaps_stat per-vm debugfs file")
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      fffb5323
    • Wanpeng Li's avatar
      KVM: SEV: Mark nested locking of kvm->lock · 597cb796
      Wanpeng Li authored
      Both source and dest vms' kvm->locks are held in sev_lock_two_vms.
      Mark one with a different subtype to avoid false positives from lockdep.
      
      Fixes: c9d61dcb (KVM: SEV: accept signals in sev_lock_two_vms)
      Reported-by: default avatarYiru Xu <xyru1999@gmail.com>
      Tested-by: default avatarJinrong Liang <cloudliang@tencent.com>
      Signed-off-by: default avatarWanpeng Li <wanpengli@tencent.com>
      Message-Id: <1641364863-26331-1-git-send-email-wanpengli@tencent.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      597cb796
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · ddec8ed2
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "Last pull for 5.16, the reversion has been known for a while now but
        didn't get a proper fix in time. Looks like we will have several
        info-leak bugs to take care of going foward.
      
         - Revert the patch fixing the DM related crash causing a widespread
           regression for kernel ULPs. A proper fix just didn't appear this
           cycle due to the holidays
      
         - Missing NULL check on alloc in uverbs
      
         - Double free in rxe error paths
      
         - Fix a new kernel-infoleak report when forming ah_attr's without
           GRH's in ucma"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        RDMA/core: Don't infoleak GRH fields
        RDMA/uverbs: Check for null return of kmalloc_array
        Revert "RDMA/mlx5: Fix releasing unallocated memory in dereg MR flow"
        RDMA/rxe: Prevent double freeing rxe_map_set()
      ddec8ed2
  2. 06 Jan, 2022 2 commits
  3. 05 Jan, 2022 13 commits
  4. 04 Jan, 2022 18 commits