1. 17 Feb, 2022 5 commits
    • Luis Chamberlain's avatar
      fs/file_table: fix adding missing kmemleak_not_leak() · a3580ac9
      Luis Chamberlain authored
      Commit b42bc9a3 ("Fix regression due to "fs: move binfmt_misc sysctl
      to its own file") fixed a regression, however it failed to add a
      kmemleak_not_leak().
      
      Fixes: b42bc9a3 ("Fix regression due to "fs: move binfmt_misc sysctl to its own file")
      Reported-by: default avatarTong Zhang <ztong0001@gmail.com>
      Cc: Tong Zhang <ztong0001@gmail.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a3580ac9
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.17-2022-02-17' of... · 2dd3a8a1
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.17-2022-02-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fix corrupt inject files when only last branch option is enabled with
         ARM CoreSight ETM
      
       - Fix use-after-free for realloc(..., 0) in libsubcmd, found by gcc 12
      
       - Defer freeing string after possible strlen() on it in the BPF loader,
         found by gcc 12
      
       - Avoid early exit in 'perf trace' due SIGCHLD from non-workload
         processes
      
       - Fix arm64 perf_event_attr 'perf test's wrt --call-graph
         initialization
      
       - Fix libperf 32-bit build for 'perf test' wrt uint64_t printf
      
       - Fix perf_cpu_map__for_each_cpu macro in libperf, providing access to
         the CPU iterator
      
       - Sync linux/perf_event.h UAPI with the kernel sources
      
       - Update Jiri Olsa's email address in MAINTAINERS
      
      * tag 'perf-tools-fixes-for-v5.17-2022-02-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf bpf: Defer freeing string after possible strlen() on it
        perf test: Fix arm64 perf_event_attr tests wrt --call-graph initialization
        libsubcmd: Fix use-after-free for realloc(..., 0)
        libperf: Fix perf_cpu_map__for_each_cpu macro
        perf cs-etm: Fix corrupt inject files when only last branch option is enabled
        perf cs-etm: No-op refactor of synth opt usage
        libperf: Fix 32-bit build for tests uint64_t printf
        tools headers UAPI: Sync linux/perf_event.h with the kernel sources
        perf trace: Avoid early exit due SIGCHLD from non-workload processes
        MAINTAINERS: Update Jiri's email address
      2dd3a8a1
    • Linus Torvalds's avatar
      Merge tag 'modules-5.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux · edbd6c62
      Linus Torvalds authored
      Pull module fix from Luis Chamberlain:
       "Fixes module decompression when CONFIG_SYSFS=n
      
        The only fix trickled down for v5.17-rc cycle so far is the fix for
        module decompression when CONFIG_SYSFS=n. This was reported through
        0-day"
      
      * tag 'modules-5.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
        module: fix building with sysfs disabled
      edbd6c62
    • Linus Torvalds's avatar
      mm: don't try to NUMA-migrate COW pages that have other uses · 80d47f5d
      Linus Torvalds authored
      Oded Gabbay reports that enabling NUMA balancing causes corruption with
      his Gaudi accelerator test load:
      
       "All the details are in the bug, but the bottom line is that somehow,
        this patch causes corruption when the numa balancing feature is
        enabled AND we don't use process affinity AND we use GUP to pin pages
        so our accelerator can DMA to/from system memory.
      
        Either disabling numa balancing, using process affinity to bind to
        specific numa-node or reverting this patch causes the bug to
        disappear"
      
      and Oded bisected the issue to commit 09854ba9 ("mm: do_wp_page()
      simplification").
      
      Now, the NUMA balancing shouldn't actually be changing the writability
      of a page, and as such shouldn't matter for COW.  But it appears it
      does.  Suspicious.
      
      However, regardless of that, the condition for enabling NUMA faults in
      change_pte_range() is nonsensical.  It uses "page_mapcount(page)" to
      decide if a COW page should be NUMA-protected or not, and that makes
      absolutely no sense.
      
      The number of mappings a page has is irrelevant: not only does GUP get a
      reference to a page as in Oded's case, but the other mappings migth be
      paged out and the only reference to them would be in the page count.
      
      Since we should never try to NUMA-balance a page that we can't move
      anyway due to other references, just fix the code to use 'page_count()'.
      Oded confirms that that fixes his issue.
      
      Now, this does imply that something in NUMA balancing ends up changing
      page protections (other than the obvious one of making the page
      inaccessible to get the NUMA faulting information).  Otherwise the COW
      simplification wouldn't matter - since doing the GUP on the page would
      make sure it's writable.
      
      The cause of that permission change would be good to figure out too,
      since it clearly results in spurious COW events - but fixing the
      nonsensical test that just happened to work before is obviously the
      CorrectThing(tm) to do regardless.
      
      Fixes: 09854ba9 ("mm: do_wp_page() simplification")
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=215616
      Link: https://lore.kernel.org/all/CAFCwf10eNmwq2wD71xjUhqkvv5+_pJMR1nPug2RqNDcFT4H86Q@mail.gmail.com/Reported-and-tested-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Peter Xu <peterx@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      80d47f5d
    • Arnaldo Carvalho de Melo's avatar
      perf bpf: Defer freeing string after possible strlen() on it · 31ded153
      Arnaldo Carvalho de Melo authored
      This was detected by the gcc in Fedora Rawhide's gcc:
      
        50    11.01 fedora:rawhide                : FAIL gcc version 12.0.1 20220205 (Red Hat 12.0.1-0) (GCC)
              inlined from 'bpf__config_obj' at util/bpf-loader.c:1242:9:
          util/bpf-loader.c:1225:34: error: pointer 'map_opt' may be used after 'free' [-Werror=use-after-free]
           1225 |                 *key_scan_pos += strlen(map_opt);
                |                                  ^~~~~~~~~~~~~~~
          util/bpf-loader.c:1223:9: note: call to 'free' here
           1223 |         free(map_name);
                |         ^~~~~~~~~~~~~~
          cc1: all warnings being treated as errors
      
      So do the calculations on the pointer before freeing it.
      
      Fixes: 04f9bf2b ("perf bpf-loader: Add missing '*' for key_scan_pos")
      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: Wang ShaoBo <bobo.shaobowang@huawei.com>
      Link: https://lore.kernel.org/lkml/Yg1VtQxKrPpS3uNA@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      31ded153
  2. 16 Feb, 2022 11 commits
    • Dmitry Torokhov's avatar
      module: fix building with sysfs disabled · a8e8f851
      Dmitry Torokhov authored
      Sysfs support might be disabled so we need to guard the code that
      instantiates "compression" attribute with an #ifdef.
      
      Fixes: b1ae6dc4 ("module: add in-kernel support for decompressing")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      a8e8f851
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · f71077a4
      Linus Torvalds authored
      Pull MMC fix from Ulf Hansson:
       "Fix recovery logic for multi block I/O reads (MMC_READ_MULTIPLE_BLOCK)"
      
      * tag 'mmc-v5.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: block: fix read single on recovery logic
      f71077a4
    • Linus Torvalds's avatar
      tty: n_tty: do not look ahead for EOL character past the end of the buffer · 35930307
      Linus Torvalds authored
      Daniel Gibson reports that the n_tty code gets line termination wrong in
      very specific cases:
      
       "If you feed a line with exactly 64 chars + terminating newline, and
        directly afterwards (without reading) another line into a pseudo
        terminal, the the first read() on the other side will return the 64
        char line *without* terminating newline, and the next read() will
        return the missing terminating newline AND the complete next line (if
        it fits in the buffer)"
      
      and bisected the behavior to commit 3b830a9c ("tty: convert
      tty_ldisc_ops 'read()' function to take a kernel pointer").
      
      Now, digging deeper, it turns out that the behavior isn't exactly new:
      what changed in commit 3b830a9c was that the tty line discipline
      .read() function is now passed an intermediate kernel buffer rather than
      the final user space buffer.
      
      And that intermediate kernel buffer is 64 bytes in size - thus that
      special case with exactly 64 bytes plus terminating newline.
      
      The same problem did exist before, but historically the boundary was not
      the 64-byte chunk, but the user-supplied buffer size, which is obviously
      generally bigger (and potentially bigger than N_TTY_BUF_SIZE, which
      would hide the issue entirely).
      
      The reason is that the n_tty canon_copy_from_read_buf() code would look
      ahead for the EOL character one byte further than it would actually
      copy.  It would then decide that it had found the terminator, and unmark
      it as an EOL character - which in turn explains why the next read
      wouldn't then be terminated by it.
      
      Now, the reason it did all this in the first place is related to some
      historical and pretty obscure EOF behavior, see commit ac8f3bf8
      ("n_tty: Fix poll() after buffer-limited eof push read") and commit
      40d5e090 ("n_tty: Fix EOF push handling").
      
      And the reason for the EOL confusion is that we treat EOF as a special
      EOL condition, with the EOL character being NUL (aka "__DISABLED_CHAR"
      in the kernel sources).
      
      So that EOF look-ahead also affects the normal EOL handling.
      
      This patch just removes the look-ahead that causes problems, because EOL
      is much more critical than the historical "EOF in the middle of a line
      that coincides with the end of the buffer" handling ever was.
      
      Now, it is possible that we should indeed re-introduce the "look at next
      character to see if it's a EOF" behavior, but if so, that should be done
      not at the kernel buffer chunk boundary in canon_copy_from_read_buf(),
      but at a higher level, when we run out of the user buffer.
      
      In particular, the place to do that would be at the top of
      'n_tty_read()', where we check if it's a continuation of a previously
      started read, and there is no more buffer space left, we could decide to
      just eat the __DISABLED_CHAR at that point.
      
      But that would be a separate patch, because I suspect nobody actually
      cares, and I'd like to get a report about it before bothering.
      
      Fixes: 3b830a9c ("tty: convert tty_ldisc_ops 'read()' function to take a kernel pointer")
      Fixes: ac8f3bf8 ("n_tty: Fix  poll() after buffer-limited eof push read")
      Fixes: 40d5e090 ("n_tty: Fix EOF push handling")
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=215611Reported-and-tested-by: default avatarDaniel Gibson <metalcaedes@gmail.com>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jirislaby@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      35930307
    • German Gomez's avatar
      perf test: Fix arm64 perf_event_attr tests wrt --call-graph initialization · 047e6032
      German Gomez authored
      The struct perf_event_attr is initialised differently in Arm64 when
      recording in call-graph fp mode, so update the relevant tests, and add
      two extra arm64-only tests.
      
      Before:
      
        $ perf test 17 -v
        17: Setup struct perf_event_attr
        [...]
        running './tests/attr/test-record-graph-default'
        expected sample_type=295, got 4391
        expected sample_regs_user=0, got 1073741824
        FAILED './tests/attr/test-record-graph-default' - match failure
        test child finished with -1
        ---- end ----
      
      After:
      
      [...]
        running './tests/attr/test-record-graph-default-aarch64'
        test limitation 'aarch64'
        running './tests/attr/test-record-graph-fp-aarch64'
        test limitation 'aarch64'
        running './tests/attr/test-record-graph-default'
        test limitation '!aarch64'
        excluded architecture list ['aarch64']
        skipped [aarch64] './tests/attr/test-record-graph-default'
        running './tests/attr/test-record-graph-fp'
        test limitation '!aarch64'
        excluded architecture list ['aarch64']
        skipped [aarch64] './tests/attr/test-record-graph-fp'
      [...]
      
      Fixes: 7248e308 ("perf tools: Record ARM64 LR register automatically")
      Signed-off-by: default avatarGerman Gomez <german.gomez@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexandre Truong <alexandre.truong@arm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: KP Singh <kpsingh@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Martin KaFai Lau <kafai@fb.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Yonghong Song <yhs@fb.com>
      Link: http://lore.kernel.org/lkml/20220125104435.2737-1-german.gomez@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      047e6032
    • Kees Cook's avatar
      libsubcmd: Fix use-after-free for realloc(..., 0) · 52a9dab6
      Kees Cook authored
      GCC 12 correctly reports a potential use-after-free condition in the
      xrealloc helper. Fix the warning by avoiding an implicit "free(ptr)"
      when size == 0:
      
      In file included from help.c:12:
      In function 'xrealloc',
          inlined from 'add_cmdname' at help.c:24:2: subcmd-util.h:56:23: error: pointer may be used after 'realloc' [-Werror=use-after-free]
         56 |                 ret = realloc(ptr, size);
            |                       ^~~~~~~~~~~~~~~~~~
      subcmd-util.h:52:21: note: call to 'realloc' here
         52 |         void *ret = realloc(ptr, size);
            |                     ^~~~~~~~~~~~~~~~~~
      subcmd-util.h:58:31: error: pointer may be used after 'realloc' [-Werror=use-after-free]
         58 |                         ret = realloc(ptr, 1);
            |                               ^~~~~~~~~~~~~~~
      subcmd-util.h:52:21: note: call to 'realloc' here
         52 |         void *ret = realloc(ptr, size);
            |                     ^~~~~~~~~~~~~~~~~~
      
      Fixes: 2f4ce5ec ("perf tools: Finalize subcmd independence")
      Reported-by: default avatarValdis Klētnieks <valdis.kletnieks@vt.edu>
      Signed-off-by: default avatarKees Kook <keescook@chromium.org>
      Tested-by: default avatarValdis Klētnieks <valdis.kletnieks@vt.edu>
      Tested-by: default avatarJustin M. Forbes <jforbes@fedoraproject.org>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: linux-hardening@vger.kernel.org
      Cc: Valdis Klētnieks <valdis.kletnieks@vt.edu>
      Link: http://lore.kernel.org/lkml/20220213182443.4037039-1-keescook@chromium.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      52a9dab6
    • Jiri Olsa's avatar
      libperf: Fix perf_cpu_map__for_each_cpu macro · 30d1c4d9
      Jiri Olsa authored
      Tzvetomir Stoyanov reported an issue with using macro
      perf_cpu_map__for_each_cpu using private perf_cpu object.
      
      The issue is caused by recent change that wrapped cpu in struct perf_cpu
      to distinguish it from cpu indexes. We need to make struct perf_cpu
      public.
      
      Add a simple test for using the perf_cpu_map__for_each_cpu macro.
      
      Fixes: 6d18804b ("perf cpumap: Give CPUs their own type")
      Reported-by: default avatarTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      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/20220215153713.31395-1-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      30d1c4d9
    • James Clark's avatar
      perf cs-etm: Fix corrupt inject files when only last branch option is enabled · 9de07369
      James Clark authored
      'perf inject' with Coresight data generates files that cannot be opened
      when only the last branch option is specified:
      
        perf inject -i perf.data --itrace=l -o inject.data
        perf script -i inject.data
        0x33faa8 [0x8]: failed to process type: 9 [Bad address]
      
      This is because cs_etm__synth_instruction_sample() is called even when
      the sample type for instructions hasn't been setup. Last branch records
      are attached to instruction samples so it doesn't make sense to generate
      them when --itrace=i isn't specified anyway.
      
      This change disables all calls of cs_etm__synth_instruction_sample()
      unless --itrace=i is specified, resulting in a file with no samples if
      only --itrace=l is provided, rather than a bad file.
      Reviewed-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20220210200620.1227232-2-james.clark@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9de07369
    • James Clark's avatar
      perf cs-etm: No-op refactor of synth opt usage · 0b31ea66
      James Clark authored
      sample_branches and sample_instructions are already saved in the
      synth_opts struct. Other usages like synth_opts.last_branch don't save a
      value, so make this more consistent by always going through synth_opts
      and not saving duplicate values.
      Reviewed-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20220210200620.1227232-1-james.clark@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0b31ea66
    • Rob Herring's avatar
      libperf: Fix 32-bit build for tests uint64_t printf · 096972f5
      Rob Herring authored
      Commit a7f3713f ("libperf tests: Add test_stat_multiplexing test")
      added printf's of 64-bit ints using %lu which doesn't work on 32-bit
      builds:
      
        tests/test-evlist.c:529:29: error: format ‘%lu’ expects argument of type \
          ‘long unsigned int’, but argument 4 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Werror=format=]
      
      Use PRIu64 instead which works on both 32-bit and 64-bit systems.
      
      Fixes: a7f3713f ("libperf tests: Add test_stat_multiplexing test")
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
      Link: https://lore.kernel.org/r/20220201213903.699656-1-robh@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      096972f5
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync linux/perf_event.h with the kernel sources · 714b8b71
      Arnaldo Carvalho de Melo authored
      To pick the trivial change in:
      
        ddecd228 ("perf: uapi: Document perf_event_attr::sig_data truncation on 32 bit architectures")
      
      Just adds a comment.
      
      This silences this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/perf_event.h' differs from latest version at 'include/uapi/linux/perf_event.h'
        diff -u tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h
      
      Cc: Marco Elver <elver@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/lkml/Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      714b8b71
    • Changbin Du's avatar
      perf trace: Avoid early exit due SIGCHLD from non-workload processes · de9f498d
      Changbin Du authored
      The function trace__symbols_init() runs "perf-read-vdso32" and that ends up
      with a SIGCHLD delivered to 'perf'. And this SIGCHLD make perf exit early.
      
      'perf trace' should exit only if the SIGCHLD is from our workload process.
      So let's use sigaction() instead of signal() to match such condition.
      
      Committer notes:
      
      Use memset to zero the 'struct sigaction' variable as the '= { 0 }'
      method isn't accepted in many compiler versions, e.g.:
      
         4    34.02 alpine:3.6                    : FAIL clang version 4.0.0 (tags/RELEASE_400/final)
          builtin-trace.c:4897:35: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
                  struct sigaction sigchld_act = { 0 };
                                                   ^
                                                   {}
          builtin-trace.c:4897:37: error: missing field 'sa_mask' initializer [-Werror,-Wmissing-field-initializers]
                  struct sigaction sigchld_act = { 0 };
                                                     ^
          2 errors generated.
         6    32.60 alpine:3.8                    : FAIL gcc version 6.4.0 (Alpine 6.4.0)
          builtin-trace.c:4897:35: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
                  struct sigaction sigchld_act = { 0 };
                                                   ^
                                                   {}
          builtin-trace.c:4897:37: error: missing field 'sa_mask' initializer [-Werror,-Wmissing-field-initializers]
                  struct sigaction sigchld_act = { 0 };
                                                     ^
          2 errors generated.
         7    34.82 alpine:3.9                    : FAIL gcc version 8.3.0 (Alpine 8.3.0)
          builtin-trace.c:4897:35: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
                  struct sigaction sigchld_act = { 0 };
                                                   ^
                                                   {}
          builtin-trace.c:4897:37: error: missing field 'sa_mask' initializer [-Werror,-Wmissing-field-initializers]
                  struct sigaction sigchld_act = { 0 };
                                                     ^
          2 errors generated.
      Signed-off-by: default avatarChangbin Du <changbin.du@gmail.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220208140725.3947-1-changbin.du@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      de9f498d
  3. 15 Feb, 2022 5 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · c5d9ae26
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "ARM:
      
         - Read HW interrupt pending state from the HW
      
        x86:
      
         - Don't truncate the performance event mask on AMD
      
         - Fix Xen runstate updates to be atomic when preempting vCPU
      
         - Fix for AMD AVIC interrupt injection race
      
         - Several other AMD fixes"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86/pmu: Use AMD64_RAW_EVENT_MASK for PERF_TYPE_RAW
        KVM: x86/pmu: Don't truncate the PerfEvtSeln MSR when creating a perf event
        KVM: SVM: fix race between interrupt delivery and AVIC inhibition
        KVM: SVM: set IRR in svm_deliver_interrupt
        KVM: SVM: extract avic_ring_doorbell
        selftests: kvm: Remove absent target file
        KVM: arm64: vgic: Read HW interrupt pending state from the HW
        KVM: x86/xen: Fix runstate updates to be atomic when preempting vCPU
        KVM: x86: SVM: move avic definitions from AMD's spec to svm.h
        KVM: x86: lapic: don't touch irr_pending in kvm_apic_update_apicv when inhibiting it
        KVM: x86: nSVM: deal with L1 hypervisor that intercepts interrupts but lets L2 control them
        KVM: x86: nSVM: expose clean bit support to the guest
        KVM: x86: nSVM/nVMX: set nested_run_pending on VM entry which is a result of RSM
        KVM: x86: nSVM: mark vmcb01 as dirty when restoring SMM saved state
        KVM: x86: nSVM: fix potential NULL derefernce on nested migration
        KVM: x86: SVM: don't passthrough SMAP/SMEP/PKE bits in !NPT && !gCR0.PG case
        Revert "svm: Add warning message for AVIC IPI invalid target"
      c5d9ae26
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid · a254a9da
      Linus Torvalds authored
      Pull HID fixes from Jiri Kosina:
      
       - memory leak fix for hid-elo driver (Dongliang Mu)
      
       - fix for hangs on newer AMD platforms with amd_sfh-driven hardware
         (Basavaraj Natikar )
      
       - locking fix in i2c-hid (Daniel Thompson)
      
       - a few device-ID specific quirks
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
        HID: amd_sfh: Add interrupt handler to process interrupts
        HID: amd_sfh: Add functionality to clear interrupts
        HID: amd_sfh: Disable the interrupt for all command
        HID: amd_sfh: Correct the structure field name
        HID: amd_sfh: Handle amd_sfh work buffer in PM ops
        HID:Add support for UGTABLET WP5540
        HID: amd_sfh: Add illuminance mask to limit ALS max value
        HID: amd_sfh: Increase sensor command timeout
        HID: i2c-hid: goodix: Fix a lockdep splat
        HID: elo: fix memory leak in elo_probe
        HID: apple: Set the tilde quirk flag on the Wellspring 5 and later
      a254a9da
    • Linus Torvalds's avatar
      Merge tag 'for-5.17-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 705d84a3
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
      
       - yield CPU more often when defragmenting a large file
      
       - skip defragmenting extents already under writeback
      
       - improve error message when send fails to write file data
      
       - get rid of warning when mounted with 'flushoncommit'
      
      * tag 'for-5.17-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: send: in case of IO error log it
        btrfs: get rid of warning on transaction commit when using flushoncommit
        btrfs: defrag: don't try to defrag extents which are under writeback
        btrfs: don't hold CPU for too long when defragging a file
      705d84a3
    • Linus Torvalds's avatar
      Merge tag 'for-5.17/parisc-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 2572da44
      Linus Torvalds authored
      Pull parisc architecture fixes from Helge Deller:
      
       - Fix miscompilations when function calls are made from inside a
         put_user() call
      
       - Drop __init from map_pages() declaration to avoid random boot crashes
      
       - Added #error messages if a 64-bit compiler was used to build a 32-bit
         kernel (and vice versa)
      
       - Fix out-of-bound data TLB miss faults in sba_iommu and ccio-dma
         drivers
      
       - Add ioread64_lo_hi() and iowrite64_lo_hi() functions to avoid kernel
         test robot errors
      
       - Fix link failure when 8250_gsc driver is built without CONFIG_IOSAPIC
      
      * tag 'for-5.17/parisc-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        serial: parisc: GSC: fix build when IOSAPIC is not set
        parisc: Fix some apparent put_user() failures
        parisc: Show error if wrong 32/64-bit compiler is being used
        parisc: Add ioread64_lo_hi() and iowrite64_lo_hi()
        parisc: Fix sglist access in ccio-dma.c
        parisc: Fix data TLB miss in sba_unmap_sg
        parisc: Drop __init from map_pages declaration
      2572da44
    • Linus Torvalds's avatar
      Merge tag 'hyperv-fixes-signed-20220215' of... · c24449b3
      Linus Torvalds authored
      Merge tag 'hyperv-fixes-signed-20220215' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux
      
      Pull hyperv fixes from Wei Liu:
      
       - Rework use of DMA_BIT_MASK in vmbus to work around a clang bug
         (Michael Kelley)
      
       - Fix NUMA topology (Long Li)
      
       - Fix a memory leak in vmbus (Miaoqian Lin)
      
       - One minor clean-up patch (Cai Huoqing)
      
      * tag 'hyperv-fixes-signed-20220215' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
        Drivers: hv: utils: Make use of the helper macro LIST_HEAD()
        Drivers: hv: vmbus: Rework use of DMA_BIT_MASK(64)
        Drivers: hv: vmbus: Fix memory leak in vmbus_add_channel_kobj
        PCI: hv: Fix NUMA node assignment when kernel boots with custom NUMA topology
      c24449b3
  4. 14 Feb, 2022 11 commits
  5. 13 Feb, 2022 8 commits