Skip to content
  1. Jan 12, 2023
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · c757fc92
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
      
       - Fixes for long standing issues with accesses to spidev->spi during
         teardown in the spidev userspace driver.
      
       - Rename the newly added spi-cs-setup-ns DT property to be more in line
         with our other delay properties before it becomes ABI.
      
       - A few driver specific fixes.
      
      * tag 'spi-fix-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: spidev: remove debug messages that access spidev->spi without locking
        spi: spidev: fix a race condition when accessing spidev->spi
        spi: Rename spi-cs-setup-ns property to spi-cs-setup-delay-ns
        spi: dt-bindings: Rename spi-cs-setup-ns to spi-cs-setup-delay-ns
        spi: cadence: Fix busy cycles calculation
        spi: mediatek: Enable irq before the spi registration
      c757fc92
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v6.2-rc3' of... · cf9668a2
      Linus Torvalds authored
      Merge tag 'regulator-fix-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fixes from Mark Brown:
       "A couple of small driver specific fixes, one of which I queued for 6.1
        but didn't actually send out so has had *plenty* of testing in -next"
      
      * tag 'regulator-fix-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: qcom-rpmh: PM8550 ldo11 regulator is an nldo
        regulator: da9211: Use irq handler when ready
      cf9668a2
    • Linus Torvalds's avatar
      Merge tag 'mtd/fixes-for-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · e58f087e
      Linus Torvalds authored
      Pull MTD fixes from Miquel Raynal:
      
       - cfi: Allow building spi-intel standalone to avoid build issues
      
       - parsers: scpart: Fix __udivdi3 undefined on mips
      
       - parsers: tplink_safeloader: Fix potential memory leak during parsing
      
       - Update email of Tudor Ambarus
      
      * tag 'mtd/fixes-for-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
        MAINTAINERS: Update email of Tudor Ambarus
        mtd: cfi: allow building spi-intel standalone
        mtd: parsers: scpart: fix __udivdi3 undefined on mips
        mtd: parsers: Fix potential memory leak in mtd_parser_tplink_safeloader_parse()
      e58f087e
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 23025cbc
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Ten small fixes (less the one that cleaned up a reverted removal),
        nine in drivers of which the ufs one is the most critical.
      
        The single core patch is a minor speedup to error handling"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: libsas: Grab the ATA port lock in sas_ata_device_link_abort()
        scsi: hisi_sas: Fix tag freeing for reserved tags
        scsi: ufs: core: WLUN suspend SSU/enter hibern8 fail recovery
        scsi: scsi_debug: Delete unreachable code in inquiry_vpd_b0()
        scsi: mpi3mr: Refer CONFIG_SCSI_MPI3MR in Makefile
        scsi: core: scsi_error: Do not queue pointless abort workqueue functions
        scsi: storvsc: Fix swiotlb bounce buffer leak in confidential VM
        scsi: iscsi: Fix multiple iSCSI session unbind events sent to userspace
        scsi: mpi3mr: Remove usage of dma_get_required_mask() API
        scsi: mpt3sas: Remove usage of dma_get_required_mask() API
      23025cbc
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v6.2-2-2023-01-11' of... · e8f60cd7
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v6.2-2-2023-01-11' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Make 'perf kmem' cope with the removal of some
         kmem:kmem_cache_alloc_node and kmem:kmalloc_node in the
         11e9734b ("mm/slab_common: unify NUMA and UMA version of
         tracepoints") commit, making sure it works with Linux >= 6.2 as well
         as with older kernels where those tracepoints are present.
      
       - Also make it handle the new "node" kmem:kmalloc and
         kmem:kmem_cache_alloc tracepoint field introduced in that same
         commit.
      
       - Fix hardware tracing PMU address filter duplicate symbol selection,
         that was preventing to match with static functions with the same name
         present in different object files.
      
       - Fix regression on what linux/types.h file gets used to build the "BPF
         prologue" 'perf test' entry, the system one lacks the fmode_t
         definition used in this test, so provide that type in the test
         itself.
      
       - Avoid build breakage with libbpf < 0.8.0 + LIBBPF_DYNAMIC=1. If the
         user asks for linking with the libbpf package provided by the distro,
         then it has to be >= 0.8.0. Using the libbpf supplied with the kernel
         would be a fallback in that case.
      
       - Fix the build when libbpf isn't available or explicitly disabled via
         NO_LIBBPF=1.
      
       - Don't try to install libtraceevent plugins as its not anymore in the
         kernel sources and will thus always fail.
      
      * tag 'perf-tools-fixes-for-v6.2-2-2023-01-11' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf auxtrace: Fix address filter duplicate symbol selection
        perf bpf: Avoid build breakage with libbpf < 0.8.0 + LIBBPF_DYNAMIC=1
        perf build: Fix build error when NO_LIBBPF=1
        perf tools: Don't install libtraceevent plugins as its not anymore in the kernel sources
        perf kmem: Support field "node" in evsel__process_alloc_event() coping with recent tracepoint restructuring
        perf kmem: Support legacy tracepoints
        perf build: Properly guard libbpf includes
        perf tests bpf prologue: Fix bpf-script-test-prologue test compile issue with clang
      e8f60cd7
    • Adrian Hunter's avatar
      perf auxtrace: Fix address filter duplicate symbol selection · cf129830
      Adrian Hunter authored
      When a match has been made to the nth duplicate symbol, return
      success not error.
      
      Example:
      
        Before:
      
          $ cat file.c
          cat: file.c: No such file or directory
          $ cat file1.c
          #include <stdio.h>
      
          static void func(void)
          {
                  printf("First func\n");
          }
      
          void other(void);
      
          int main()
          {
                  func();
                  other();
                  return 0;
          }
          $ cat file2.c
          #include <stdio.h>
      
          static void func(void)
          {
                  printf("Second func\n");
          }
      
          void other(void)
          {
                  func();
          }
      
          $ gcc -Wall -Wextra -o test file1.c file2.c
          $ perf record -e intel_pt//u --filter 'filter func @ ./test' -- ./test
          Multiple symbols with name 'func'
          #1      0x1149  l       func
                          which is near           main
          #2      0x1179  l       func
                          which is near           other
          Disambiguate symbol name by inserting #n after the name e.g. func #2
          Or select a global symbol by inserting #0 or #g or #G
          Failed to parse address filter: 'filter func @ ./test'
          Filter format is: filter|start|stop|tracestop <start symbol or address> [/ <end symbol or size>] [@<file name>]
          Where multiple filters are separated by space or comma.
          $ perf record -e intel_pt//u --filter 'filter func #2 @ ./test' -- ./test
          Failed to parse address filter: 'filter func #2 @ ./test'
          Filter format is: filter|start|stop|tracestop <start symbol or address> [/ <end symbol or size>] [@<file name>]
          Where multiple filters are separated by space or comma.
      
        After:
      
          $ perf record -e intel_pt//u --filter 'filter func #2 @ ./test' -- ./test
          First func
          Second func
          [ perf record: Woken up 1 times to write data ]
          [ perf record: Captured and wrote 0.016 MB perf.data ]
          $ perf script --itrace=b -Ftime,flags,ip,sym,addr --ns
          1231062.526977619:   tr strt                               0 [unknown] =>     558495708179 func
          1231062.526977619:   tr end  call               558495708188 func =>     558495708050 _init
          1231062.526979286:   tr strt                               0 [unknown] =>     55849570818d func
          1231062.526979286:   tr end  return             55849570818f func =>     55849570819d other
      
      Fixes: 1b36c03e
      
       ("perf record: Add support for using symbols in address filters")
      Reported-by: default avatarDmitrii Dolgov <9erthalion6@gmail.com>
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: default avatarDmitry Dolgov <9erthalion6@gmail.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20230110185659.15979-1-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      cf129830
  2. Jan 11, 2023
  3. Jan 10, 2023
    • Arnaldo Carvalho de Melo's avatar
      perf bpf: Avoid build breakage with libbpf < 0.8.0 + LIBBPF_DYNAMIC=1 · 14292a4a
      Arnaldo Carvalho de Melo authored
      In 746bd29e ("perf build: Use tools/lib headers from install
      path") we stopped having the tools/lib/ directory from the kernel
      sources in the header include path unconditionally, which breaks the
      build on systems with older versions of libbpf-devel, in this case 0.7.0
      as some of the structures and function declarations present in the newer
      version of libbpf included in the kernel sources (tools/lib/bpf) are not
      anymore used, just the ones in the system libbpf.
      
      So instead of trying to provide alternative functions when the
      libbpf-bpf_program__set_insns feature test fails, fail a
      LIBBPF_DYNAMIC=1 build (requesting the use of the system's libbpf) and
      emit this build error message:
      
        $ make LIBBPF_DYNAMIC=1 -C tools/perf
        Makefile.config:593: *** Error: libbpf devel library needs to be >= 0.8.0 to build with LIBBPF_DYNAMIC, update or build statically with the version that comes with the kernel sources.  Stop.
        $
      
      For v6.3 these tests will be revamped and we'll require libbpf 1.0 as a
      minimal version for using LIBBPF_DYNAMIC=1, most distros should have it
      by now or at v6.3 time.
      
      Fixes: 746bd29e
      
       ("perf build: Use tools/lib headers from install path")
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/CAP-5=fVa51_URGsdDFVTzpyGmdDRj_Dj2EKPuDHNQ0BYgMSzUA@mail.gmail.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      14292a4a
    • Ian Rogers's avatar
      perf build: Fix build error when NO_LIBBPF=1 · f00eccb4
      Ian Rogers authored
      The $(LIBBPF) target should only be a dependency of prepare if the
      static version of libbpf is needed. Add a new LIBBPF_STATIC variable
      that is set by Makefile.config. Use LIBBPF_STATIC to determine whether
      the CFLAGS, etc. need updating and for adding $(LIBBPF) as a prepare
      dependency.
      
      As Makefile.config isn't loaded for "clean" as a target, always set
      LIBBPF_OUTPUT regardless of whether it is needed for $(LIBBPF). This
      is done to minimize conditional logic for $(LIBBPF)-clean.
      
      This issue and an original fix was reported by Mike Leach in:
      https://lore.kernel.org/lkml/20230105172243.7238-1-mike.leach@linaro.org/
      
      Fixes: 746bd29e
      
       ("perf build: Use tools/lib headers from install path")
      Reported-by: default avatarMike Leach <mike.leach@linaro.org>
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Tested-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: bpf@vger.kernel.org
      Cc: Ian Rogers <irogers@google.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20230106151320.619514-2-irogers@google.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f00eccb4
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Don't install libtraceevent plugins as its not anymore in the kernel sources · 213b760f
      Arnaldo Carvalho de Melo authored
      While doing 'make -C tools/perf build-test' one can notice error
      messages while trying to install libtraceevent plugins, stop doing that
      as libtraceevent isn't anymore a homie.
      
      These are the warnings dealt with:
      
         make_install_prefix_slash_O: make install prefix=/tmp/krava/
          failed to find: /tmp/krava/etc/bash_completion.d/perf
          failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_cfg80211.so
          failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_scsi.so
          failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_xen.so
          failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_function.so
          failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_sched_switch.so
          failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_mac80211.so
          failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_kvm.so
          failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_kmem.so
          failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_hrtimer.so
          failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_jbd2.so
      
      Fixes: 4171925a
      
       ("tools lib traceevent: Remove libtraceevent")
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lore.kernel.org/lkml/Y7xXz+TSpiCbQGjw@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      213b760f
    • Leo Yan's avatar
      perf kmem: Support field "node" in evsel__process_alloc_event() coping with... · dce088ab
      Leo Yan authored
      perf kmem: Support field "node" in evsel__process_alloc_event() coping with recent tracepoint restructuring
      
      Commit 11e9734b ("mm/slab_common: unify NUMA and UMA version of
      tracepoints") adds the field "node" into the tracepoints 'kmalloc' and
      'kmem_cache_alloc', so this patch modifies the event process function to
      support the field "node".
      
      If field "node" is detected by checking function evsel__field(), it
      stats the cross allocation.
      
      When the "node" value is NUMA_NO_NODE (-1), it means the memory can be
      allocated from any memory node, in this case, we don't account it as a
      cross allocation.
      
      Fixes: 11e9734b
      
       ("mm/slab_common: unify NUMA and UMA version of tracepoints")
      Reported-by: default avatarRavi Bangoria <ravi.bangoria@amd.com>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Link: https://lore.kernel.org/r/20230108062400.250690-2-leo.yan@linaro.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dce088ab
    • Leo Yan's avatar
      perf kmem: Support legacy tracepoints · b3719108
      Leo Yan authored
      Commit 11e9734b ("mm/slab_common: unify NUMA and UMA version of
      tracepoints") removed tracepoints 'kmalloc_node' and
      'kmem_cache_alloc_node', we need to consider the tool should be backward
      compatible.
      
      If it detect the tracepoint "kmem:kmalloc_node", this patch enables the
      legacy tracepoints, otherwise, it will ignore them.
      
      Fixes: 11e9734b
      
       ("mm/slab_common: unify NUMA and UMA version of tracepoints")
      Reported-by: default avatarRavi Bangoria <ravi.bangoria@amd.com>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Link: https://lore.kernel.org/r/20230108062400.250690-1-leo.yan@linaro.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b3719108
    • Ian Rogers's avatar
      perf build: Properly guard libbpf includes · d891f2b7
      Ian Rogers authored
      Including libbpf header files should be guarded by HAVE_LIBBPF_SUPPORT.
      In bpf_counter.h, move the skeleton utilities under HAVE_BPF_SKEL.
      
      Fixes: d6a735ef
      
       ("perf bpf_counter: Move common functions to bpf_counter.h")
      Reported-by: default avatarMike Leach <mike.leach@linaro.org>
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Tested-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarMike Leach <mike.leach@linaro.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20230105172243.7238-1-mike.leach@linaro.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d891f2b7
    • Linus Torvalds's avatar
      Merge tag '6.2-rc3-ksmbd-server-fixes' of git://git.samba.org/ksmbd · 40c18f36
      Linus Torvalds authored
      Pull ksmb server fixes from Steve French:
      
       - fix possible infinite loop in socket handler
      
       - fix possible panic in ntlmv2 authentication
      
       - fix error handling on tree connect
      
      * tag '6.2-rc3-ksmbd-server-fixes' of git://git.samba.org/ksmbd:
        ksmbd: fix infinite loop in ksmbd_conn_handler_loop()
        ksmbd: check nt_len to be at least CIFS_ENCPWD_SIZE in ksmbd_decode_ntlmssp_auth_blob
        ksmbd: send proper error response in smb2_tree_connect()
      40c18f36
    • Peter Zijlstra's avatar
      sh/mm: Fix pmd_t for real · 526970be
      Peter Zijlstra authored
      Because typing is hard...
      
      Fixes: 0862ff05
      
       ("sh/mm: Make pmd_t similar to pte_t")
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      526970be
    • Linus Torvalds's avatar
      gcc: disable -Warray-bounds for gcc-11 too · 5a41237a
      Linus Torvalds authored
      
      
      We had already disabled this warning for gcc-12 due to bugs in the value
      range analysis, but it turns out we end up having some similar problems
      with gcc-11.3 too, so let's disable it there too.
      
      Older gcc versions end up being increasingly less relevant, and
      hopefully clang and newer version of gcc (ie gcc-13) end up working
      reliably enough that we still get the build coverage even when we
      disable this for some versions.
      
      Link: https://lore.kernel.org/all/20221227002941.GA2691687@roeck-us.net/
      Link: https://lore.kernel.org/all/D8BDBF66-E44C-45D4-9758-BAAA4F0C1998@kernel.org/
      Cc: Kees Cook <kees@kernel.org>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5a41237a
  4. Jan 09, 2023
    • Athira Rajeev's avatar
      perf tests bpf prologue: Fix bpf-script-test-prologue test compile issue with clang · 6f9aba7f
      Athira Rajeev authored
      While running 'perf test' for bpf, observed that "BPF prologue
      generation" test case fails to compile with clang. Logs below from
      powerpc:
      
        <stdin>:33:2: error: use of undeclared identifier 'fmode_t'
                fmode_t f_mode = (fmode_t)_f_mode;
                ^
        <stdin>:37:6: error: use of undeclared identifier 'f_mode'; did you mean '_f_mode'?
                if (f_mode & FMODE_WRITE)
                    ^~~~~~
                    _f_mode
        <stdin>:30:60: note: '_f_mode' declared here
        int bpf_func__null_lseek(void *ctx, int err, unsigned long _f_mode,
                                                                   ^
        2 errors generated.
      
      The test code tests/bpf-script-test-prologue.c uses fmode_t.  And the
      error above is for "fmode_t" which is defined in include/linux/types.h
      as part of kernel build directory: "/lib/modules/<kernel_version>/build"
      that comes from kernel devel [ soft link to /usr/src/<kernel_version> ].
      
      Clang picks this header file from "-working-directory" build option that
      specifies this build folder.
      
      But the commit 14e4b9f4 ("perf trace: Raw augmented syscalls fix
      libbpf 1.0+ compatibility") changed the include directory to use:
      "/usr/include".
      
      Post this change, types.h from /usr/include/ is getting picked upwhich
      doesn’t contain definition of "fmode_t" and hence fails to compile.
      
      Compilation command before this commit:
      
        /usr/bin/clang -D__KERNEL__ -D__NR_CPUS__=72 -DLINUX_VERSION_CODE=0x50e00 -xc  -I/root/lib/perf/include/bpf -nostdinc -I./arch/powerpc/include -I./arch/powerpc/include/generated  -I./include -I./arch/powerpc/include/uapi -I./arch/powerpc/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h  -Wno-unused-value -Wno-pointer-sign -working-directory /lib/modules/<ver>/build -c - -target bpf  -g -O2 -o -
      
      Compilation command after this commit:
      
        /usr/bin/clang -D__KERNEL__ -D__NR_CPUS__=72 -DLINUX_VERSION_CODE=0x50e00 -xc  -I/usr/include/ -nostdinc -I./arch/powerpc/include -I./arch/powerpc/include/generated  -I./include -I./arch/powerpc/include/uapi -I./arch/powerpc/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h  -Wno-unused-value -Wno-pointer-sign -working-directory /lib/modules/<ver>/build -c - -target bpf  -g -O2 -o -
      
      The difference is addition of -I/usr/include/  in the first line which
      is causing the error. Fix this by adding typedef for "fmode_t" in the
      testcase to solve the compile issue.
      
      Fixes: 14e4b9f4
      
       ("perf trace: Raw augmented syscalls fix libbpf 1.0+ compatibility")
      Signed-off-by: default avatarAthira Jajeev <atrajeev@linux.vnet.ibm.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Disha Goel <disgoel@linux.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nageswara R Sastry <rnsastry@linux.ibm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/linux-perf-users/20230105120436.92051-1-atrajeev@linux.vnet.ibm.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6f9aba7f
    • Linus Torvalds's avatar
      Merge tag 'xfs-6.2-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 1fe4fd6f
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
      
       - Remove some incorrect assertions
      
       - Fix compiler warnings about variables that could be static
      
       - Fix an off by one error when computing the maximum btree height that
         can cause repair failures
      
       - Fix the bulkstat-single ioctl not returning the root inode when asked
         to do that
      
       - Convey NOFS state to inodegc workers to avoid recursion in reclaim
      
       - Fix unnecessary variable initializations
      
       - Fix a bug that could result in corruption of the busy extent tree
      
      * tag 'xfs-6.2-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: fix extent busy updating
        xfs: xfs_qm: remove unnecessary ‘0’ values from error
        xfs: Fix deadlock on xfs_inodegc_worker
        xfs: get root inode correctly at bulkstat
        xfs: fix off-by-one error in xfs_btree_space_to_height
        xfs: make xfs_iomap_page_ops static
        xfs: don't assert if cmap covers imap after cycling lock
      1fe4fd6f
    • Linus Torvalds's avatar
      Linux 6.2-rc3 · b7bfaa76
      Linus Torvalds authored
      v6.2-rc3
      b7bfaa76
  5. Jan 08, 2023
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 93928d48
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Three fixes for various bogosity in our linker script, revealed
         by the recent commit which changed discard behaviour with some
         toolchains.
      
      * tag 'powerpc-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/vmlinux.lds: Don't discard .comment
        powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds
        powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT
      93928d48
    • Linus Torvalds's avatar
      Merge tag 'fixes-2023-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock · e9ffbf16
      Linus Torvalds authored
      Pull memblock fixes from Mike Rapoport:
       "Small fixes in kernel-doc and tests:
      
         - Fix kernel-doc for memblock_phys_free() to use correct names for
           the counterpart allocation methods
      
         - Fix compilation error in memblock tests"
      
      * tag 'fixes-2023-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
        memblock: Fix doc for memblock_phys_free
        memblock tests: Fix compilation error.
      e9ffbf16
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-6.2-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 9b43a525
      Linus Torvalds authored
      Pull NFS client fixes from Trond Myklebust:
      
       - Fix a race in the RPCSEC_GSS upcall code that causes hung RPC calls
      
       - Fix a broken coalescing test in the pNFS file layout driver
      
       - Ensure that the access cache rcu path also applies the login test
      
       - Fix up for a sparse warning
      
      * tag 'nfs-for-6.2-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS: Fix up a sparse warning
        NFS: Judge the file access cache's timestamp in rcu path
        pNFS/filelayout: Fix coalescing test for single DS
        SUNRPC: ensure the matching upcall is in-flight upon downcall
      9b43a525
    • Linus Torvalds's avatar
      Merge tag '6.2-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · f18fca98
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "cifs/smb3 client fixes:
      
         - two multichannel fixes
      
         - three reconnect fixes
      
         - unmap fix"
      
      * tag '6.2-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: fix interface count calculation during refresh
        cifs: refcount only the selected iface during interface update
        cifs: protect access of TCP_Server_Info::{dstaddr,hostname}
        cifs: fix race in assemble_neg_contexts()
        cifs: ignore ipc reconnect failures during dfs failover
        cifs: Fix kmap_local_page() unmapping
      f18fca98
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 0007c040
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - Fix DT memory scanning for some MIPS boards when memory is not
         specified in DT
      
       - Redo CONFIG_CMDLINE* handling for missing /chosen node. The first
         attempt broke PS3 (and possibly other PPC platforms).
      
       - Fix constraints in QCom Soundwire schema
      
      * tag 'devicetree-fixes-for-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        of: fdt: Honor CONFIG_CMDLINE* even without /chosen node, take 2
        Revert "of: fdt: Honor CONFIG_CMDLINE* even without /chosen node"
        dt-bindings: soundwire: qcom,soundwire: correct sizes related to number of ports
        of/fdt: run soc memory setup when early_init_dt_scan_memory fails
      0007c040
    • Linus Torvalds's avatar
      Merge tag 'usb-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · c28bdeaf
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB driver fixes for 6.2-rc3 that resolve some
        reported issues. They include:
      
         - of-reported ulpi problem, so the offending commit is reverted
      
         - dwc3 driver bugfixes for recent changes
      
         - fotg210 fixes
      
        Most of these have been in linux-next for a while, the last few were
        on the mailing list for a long time and passed all the 0-day bot
        testing so all should be fine with them as well"
      
      * tag 'usb-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: dwc3: gadget: Ignore End Transfer delay on teardown
        usb: dwc3: xilinx: include linux/gpio/consumer.h
        usb: fotg210-udc: fix error return code in fotg210_udc_probe()
        usb: fotg210: fix OTG-only build
        Revert "usb: ulpi: defer ulpi_register on ulpi_read_id timeout"
      c28bdeaf
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 4a4dcea0
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "Most noticeable is that Yishai found a big data corruption regression
        due to a change in the scatterlist:
      
         - Do not wrongly combine non-contiguous pages in scatterlist
      
         - Fix compilation warnings on gcc 13
      
         - Oops when using some mlx5 stats
      
         - Bad enforcement of atomic responder resources in mlx5"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        lib/scatterlist: Fix to merge contiguous pages into the last SG properly
        RDMA/mlx5: Fix validation of max_rd_atomic caps for DC
        RDMA/mlx5: Fix mlx5_ib_get_hw_stats when used for device
        RDMA/srp: Move large values to a new enum for gcc13
      4a4dcea0
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v6.2-2' of... · a7c4127a
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Fix single *.ko build
      
       - Fix module builds when vmlinux.o or Module.symver is missing
      
      * tag 'kbuild-fixes-v6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: readd -w option when vmlinux.o or Module.symver is missing
        kbuild: fix single *.ko build
      a7c4127a
  6. Jan 07, 2023
    • Chuck Lever's avatar
      NFSD: Use set_bit(RQ_DROPME) · 5304930d
      Chuck Lever authored
      The premise that "Once an svc thread is scheduled and executing an
      RPC, no other processes will touch svc_rqst::rq_flags" is false.
      svc_xprt_enqueue() examines the RQ_BUSY flag in scheduled nfsd
      threads when determining which thread to wake up next.
      
      Fixes: 93155647
      
       ("NFSD: Use only RQ_DROPME to signal the need to drop a reply")
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      5304930d
    • Tudor Ambarus's avatar
      MAINTAINERS: Update email of Tudor Ambarus · c0f7ae27
      Tudor Ambarus authored
      
      
      My professional email will change and the microchip one will bounce after
      mid-november of 2022.
      
      Update the MAINTAINERS file, the YAML bindings, MODULE_AUTHOR entries and
      author mentions, and add an entry in the .mailmap file.
      
      Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Acked-by: default avatarPratyush Yadav <pratyush@kernel.org>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Acked-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      Link: https://lore.kernel.org/linux-mtd/20221226144043.367706-1-tudor.ambarus@linaro.org
      c0f7ae27
    • Xingui Yang's avatar
      scsi: libsas: Grab the ATA port lock in sas_ata_device_link_abort() · a67aad57
      Xingui Yang authored
      Grab the ATA port lock in sas_ata_device_link_abort() before calling
      ata_link_abort() as outlined in this function's locking requirements.
      
      Fixes: 44112922
      
       ("scsi: libsas: Add sas_ata_device_link_abort()")
      Signed-off-by: default avatarXingui Yang <yangxingui@huawei.com>
      Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
      Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      a67aad57
    • Jason Yan's avatar
      scsi: hisi_sas: Fix tag freeing for reserved tags · ea44242b
      Jason Yan authored
      The reserved tags were put in the lower region of the tagset in commit
      f7d190a9 ("scsi: hisi_sas: Put reserved tags in lower region of
      tagset"). However, only the allocate function was changed, freeing was not
      handled. This resulted in a failure to boot:
      
      [   33.467345] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
      [   33.473413] sas: Executing internal abort failed 5000000000000603 (-132)
      [   33.480088] hisi_sas_v3_hw 0000:b4:02.0: I_T nexus reset: internal abort (-132)
      [   33.657336] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
      [   33.663403] ata7.00: failed to IDENTIFY (I/O error, err_mask=0x40)
      [   35.787344] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
      [   35.793411] sas: Executing internal abort failed 5000000000000703 (-132)
      [   35.800084] hisi_sas_v3_hw 0000:b4:04.0: I_T nexus reset: internal abort (-132)
      [   35.977335] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
      [   35.983403] ata10.00: failed to IDENTIFY (I/O error, err_mask=0x40)
      [   35.989643] ata10.00: revalidation failed (errno=-5)
      
      Fixes: f7d190a9
      
       ("scsi: hisi_sas: Put reserved tags in lower region of tagset")
      Cc: John Garry <john.g.garry@oracle.com>
      Cc: Xiang Chen <chenxiang66@hisilicon.com>
      Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
      Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
      Acked-by: default avatarXiang Chen <chenxiang66@hisilicon.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      ea44242b
    • Max Filippov's avatar
      xtensa: drop unused members of struct thread_struct · 4414c1f5
      Max Filippov authored
      
      
      bad_vaddr, bad_uaddr and error_code fields are set but never read by the
      xtensa arch-specific code. Drop them. Also drop the commented out info
      field.
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      4414c1f5
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2023-01-06' of git://anongit.freedesktop.org/drm/drm · 0a715535
      Linus Torvalds authored
      Pull drm fixes from Daniel Vetter:
       "Still not much, but more than last week. Dave should be back next week
        from the beaching.
      
        drivers:
         - i915-gvt fixes
         - amdgpu/kfd fixes
         - panfrost bo refcounting fix
         - meson afbc corruption fix
         - imx plane width fix
      
        core:
         - drm/sched fixes
         - drm/mm kunit test fix
         - dma-buf export error handling fixes"
      
      * tag 'drm-fixes-2023-01-06' of git://anongit.freedesktop.org/drm/drm:
        Revert "drm/amd/display: Enable Freesync Video Mode by default"
        drm/i915/gvt: fix double free bug in split_2MB_gtt_entry
        drm/i915/gvt: use atomic operations to change the vGPU status
        drm/i915/gvt: fix vgpu debugfs clean in remove
        drm/i915/gvt: fix gvt debugfs destroy
        drm/i915: unpin on error in intel_vgpu_shadow_mm_pin()
        drm/amd/display: Uninitialized variables causing 4k60 UCLK to stay at DPM1 and not DPM0
        drm/amdkfd: Fix kernel warning during topology setup
        drm/scheduler: Fix lockup in drm_sched_entity_kill()
        drm/imx: ipuv3-plane: Fix overlay plane width
        drm/scheduler: Fix lockup in drm_sched_entity_kill()
        drm/virtio: Fix memory leak in virtio_gpu_object_create()
        drm/meson: Reduce the FIFO lines held when AFBC is not used
        drm/tests: reduce drm_mm_test stack usage
        drm/panfrost: Fix GEM handle creation ref-counting
        drm/plane-helper: Add the missing declaration of drm_atomic_state
        dma-buf: fix dma_buf_export init order v2
      0a715535
    • Jason A. Donenfeld's avatar
      tpm: Allow system suspend to continue when TPM suspend fails · 1382999a
      Jason A. Donenfeld authored
      TPM 1 is sometimes broken across system suspends, due to races or
      locking issues or something else that haven't been diagnosed or fixed
      yet, most likely having to do with concurrent reads from the TPM's
      hardware random number generator driver. These issues prevent the system
      from actually suspending, with errors like:
      
        tpm tpm0: A TPM error (28) occurred continue selftest
        ...
        tpm tpm0: A TPM error (28) occurred attempting get random
        ...
        tpm tpm0: Error (28) sending savestate before suspend
        tpm_tis 00:08: PM: __pnp_bus_suspend(): tpm_pm_suspend+0x0/0x80 returns 28
        tpm_tis 00:08: PM: dpm_run_callback(): pnp_bus_suspend+0x0/0x10 returns 28
        tpm_tis 00:08: PM: failed to suspend: error 28
        PM: Some devices failed to suspend, or early wake event detected
      
      This issue was partially fixed by 23393c64
      
       ("char: tpm: Protect
      tpm_pm_suspend with locks"), in a last minute 6.1 commit that Linus took
      directly because the TPM maintainers weren't available. However, it
      seems like this just addresses the most common cases of the bug, rather
      than addressing it entirely. So there are more things to fix still,
      apparently.
      
      In lieu of actually fixing the underlying bug, just allow system suspend
      to continue, so that laptops still go to sleep fine. Later, this can be
      reverted when the real bug is fixed.
      
      Link: https://lore.kernel.org/lkml/7cbe96cf-e0b5-ba63-d1b4-f63d2e826efa@suse.cz/
      Cc: stable@vger.kernel.org # 6.1+
      Reported-by: default avatarVlastimil Babka <vbabka@suse.cz>
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Acked-by: default avatarLuigi Semenzato <semenzato@chromium.org>
      Cc: Peter Huewe <peterhuewe@gmx.de>
      Cc: Jarkko Sakkinen <jarkko@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Johannes Altmanninger <aclopte@gmail.com>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1382999a
    • Linus Torvalds's avatar
      hfs/hfsplus: avoid WARN_ON() for sanity check, use proper error handling · cb7a95af
      Linus Torvalds authored
      Commit 55d1cbbb
      
       ("hfs/hfsplus: use WARN_ON for sanity check") fixed
      a build warning by turning a comment into a WARN_ON(), but it turns out
      that syzbot then complains because it can trigger said warning with a
      corrupted hfs image.
      
      The warning actually does warn about a bad situation, but we are much
      better off just handling it as the error it is.  So rather than warn
      about us doing bad things, stop doing the bad things and return -EIO.
      
      While at it, also fix a memory leak that was introduced by an earlier
      fix for a similar syzbot warning situation, and add a check for one case
      that historically wasn't handled at all (ie neither comment nor
      subsequent WARN_ON).
      
      Reported-by: default avatar <syzbot+7bb7cd3595533513a9e7@syzkaller.appspotmail.com>
      Fixes: 55d1cbbb ("hfs/hfsplus: use WARN_ON for sanity check")
      Fixes: 8d824e69
      
       ("hfs: fix OOB Read in __hfs_brec_find")
      Link: https://lore.kernel.org/lkml/000000000000dbce4e05f170f289@google.com/
      Tested-by: default avatarMichael Schmitz <schmitzmic@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Viacheslav Dubeyko <slava@dubeyko.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cb7a95af
    • Linus Torvalds's avatar
      Merge tag 'block-2023-01-06' of git://git.kernel.dk/linux · a689b938
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "The big change here is obviously the revert of the pktcdvd driver
        removal. Outside of that, just minor tweaks. In detail:
      
         - Re-instate the pktcdvd driver, which necessitates adding back
           bio_copy_data_iter() and the fops->devnode() hook for now (me)
      
         - Fix for splitting of a bio marked as NOWAIT, causing either nowait
           reads or writes to error with EAGAIN even if parts of the IO
           completed (me)
      
         - Fix for ublk, punting management commands to io-wq as they can all
           easily block for extended periods of time (Ming)
      
         - Removal of SRCU dependency for the block layer (Paul)"
      
      * tag 'block-2023-01-06' of git://git.kernel.dk/linux:
        block: Remove "select SRCU"
        Revert "pktcdvd: remove driver."
        Revert "block: remove devnode callback from struct block_device_operations"
        Revert "block: bio_copy_data_iter"
        ublk: honor IO_URING_F_NONBLOCK for handling control command
        block: don't allow splitting of a REQ_NOWAIT bio
        block: handle bio_split_to_limits() NULL return
      a689b938