Patch "perf regs: Make perf_reg_name() return "unknown" instead of NULL" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    perf regs: Make perf_reg_name() return "unknown" instead of NULL

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     perf-regs-make-perf_reg_name-return-unknown-instead-.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 2103f4c4ab4209deb7424230bf78ca454f666cff
Author: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Date:   Wed Nov 27 10:13:34 2019 -0300

    perf regs: Make perf_reg_name() return "unknown" instead of NULL
    
    [ Upstream commit 5b596e0ff0e1852197d4c82d3314db5e43126bf7 ]
    
    To avoid breaking the build on arches where this is not wired up, at
    least all the other features should be made available and when using
    this specific routine, the "unknown" should point the user/developer to
    the need to wire this up on this particular hardware architecture.
    
    Detected in a container mipsel debian cross build environment, where it
    shows up as:
    
      In file included from /usr/mipsel-linux-gnu/include/stdio.h:867,
                       from /git/linux/tools/perf/lib/include/perf/cpumap.h:6,
                       from util/session.c:13:
      In function 'printf',
          inlined from 'regs_dump__printf' at util/session.c:1103:3,
          inlined from 'regs__printf' at util/session.c:1131:2:
      /usr/mipsel-linux-gnu/include/bits/stdio2.h:107:10: error: '%-5s' directive argument is null [-Werror=format-overflow=]
        107 |   return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
            |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    cross compiler details:
    
      mipsel-linux-gnu-gcc (Debian 9.2.1-8) 9.2.1 20190909
    
    Also on mips64:
    
      In file included from /usr/mips64-linux-gnuabi64/include/stdio.h:867,
                       from /git/linux/tools/perf/lib/include/perf/cpumap.h:6,
                       from util/session.c:13:
      In function 'printf',
          inlined from 'regs_dump__printf' at util/session.c:1103:3,
          inlined from 'regs__printf' at util/session.c:1131:2,
          inlined from 'regs_user__printf' at util/session.c:1139:3,
          inlined from 'dump_sample' at util/session.c:1246:3,
          inlined from 'machines__deliver_event' at util/session.c:1421:3:
      /usr/mips64-linux-gnuabi64/include/bits/stdio2.h:107:10: error: '%-5s' directive argument is null [-Werror=format-overflow=]
        107 |   return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
            |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      In function 'printf',
          inlined from 'regs_dump__printf' at util/session.c:1103:3,
          inlined from 'regs__printf' at util/session.c:1131:2,
          inlined from 'regs_intr__printf' at util/session.c:1147:3,
          inlined from 'dump_sample' at util/session.c:1249:3,
          inlined from 'machines__deliver_event' at util/session.c:1421:3:
      /usr/mips64-linux-gnuabi64/include/bits/stdio2.h:107:10: error: '%-5s' directive argument is null [-Werror=format-overflow=]
        107 |   return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
            |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    cross compiler details:
    
      mips64-linux-gnuabi64-gcc (Debian 9.2.1-8) 9.2.1 20190909
    
    Fixes: 2bcd355b71da ("perf tools: Add interface to arch registers sets")
    Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
    Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
    Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
    Link: https://lkml.kernel.org/n/tip-95wjyv4o65nuaeweq31t7l1s@xxxxxxxxxxxxxx
    Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/perf/util/perf_regs.h b/tools/perf/util/perf_regs.h
index 47fe34e5f7d5..ec7640cc4c91 100644
--- a/tools/perf/util/perf_regs.h
+++ b/tools/perf/util/perf_regs.h
@@ -41,7 +41,7 @@ int perf_reg_value(u64 *valp, struct regs_dump *regs, int id);
 
 static inline const char *perf_reg_name(int id __maybe_unused)
 {
-	return NULL;
+	return "unknown";
 }
 
 static inline int perf_reg_value(u64 *valp __maybe_unused,



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux