lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211201123334.679131-1-german.gomez@arm.com>
Date:   Wed,  1 Dec 2021 12:33:28 +0000
From:   German Gomez <german.gomez@....com>
To:     linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
        acme@...nel.org
Cc:     German Gomez <german.gomez@....com>,
        John Garry <john.garry@...wei.com>,
        Will Deacon <will@...nel.org>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Leo Yan <leo.yan@...aro.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        linux-arm-kernel@...ts.infradead.org, linux-csky@...r.kernel.org,
        linux-riscv@...ts.infradead.org
Subject: [PATCH v1 0/4] Support register names from all architectures

The following changeset applies some corrections to the way system
registers are processed and presented when reading perf.data files using
the various perf tools.

The commit message from [4/4] shows how register names aren't correctly
presented when performing x-arch analysis of perf.data files (i.e.
recording in one arch, then reading the file from a different arch).

Please let me know if there are any concerns with this approach, or if
any improvements can be made for subsequent re-rolls of the changeset.

  - [PATCH 1/4] Fixes a potential out-of-bounds access when reading the
    values of the registers in the perf.data file.
  - [PATCH 2/4] Modifies one of the callbacks in "struct scripting_ops"
    so that the python version can obtain the correct register names.
  - [PATCH 3/4] Adds header files with the register indices and names
    from all architectures, which are used by the next patch.
  - [PATCH 4/4] Refactors the function "perf_reg_name" so that it can
    support registers from all architectures, not just the local one.

Thanks,
German

German Gomez (4):
  perf tools: Prevent out-of-bounds access to registers
  perf script: Add "struct machine" parameter to process_event callback
  perf tools: Crete header files with register names
  perf tools: Support register names from all architectures

 tools/perf/arch/arm/include/perf_regs.h       |  42 --------
 tools/perf/arch/arm64/include/perf_regs.h     |  76 -------------
 tools/perf/arch/csky/include/perf_regs.h      |  82 --------------
 tools/perf/arch/mips/include/perf_regs.h      |  69 ------------
 tools/perf/arch/powerpc/include/perf_regs.h   |  66 ------------
 tools/perf/arch/riscv/include/perf_regs.h     |  74 -------------
 tools/perf/arch/s390/include/perf_regs.h      |  78 --------------
 tools/perf/arch/x86/include/perf_regs.h       |  82 --------------
 tools/perf/builtin-script.c                   |  26 ++---
 tools/perf/util/event.h                       |   5 +-
 tools/perf/util/perf_regs.c                   |   3 +
 tools/perf/util/perf_regs.h                   |  33 +++++-
 tools/perf/util/perf_regs_arm.h               |  57 ++++++++++
 tools/perf/util/perf_regs_arm64.h             |  83 ++++++++++++++
 tools/perf/util/perf_regs_csky.h              | 101 ++++++++++++++++++
 tools/perf/util/perf_regs_mips.h              |  76 +++++++++++++
 tools/perf/util/perf_regs_powerpc.h           |  74 +++++++++++++
 tools/perf/util/perf_regs_riscv.h             |  81 ++++++++++++++
 tools/perf/util/perf_regs_s390.h              |  85 +++++++++++++++
 tools/perf/util/perf_regs_x86.h               |  87 +++++++++++++++
 .../util/scripting-engines/trace-event-perl.c |   3 +-
 .../scripting-engines/trace-event-python.c    |  33 +++---
 tools/perf/util/session.c                     |  25 ++---
 tools/perf/util/trace-event-scripting.c       |   3 +-
 tools/perf/util/trace-event.h                 |   3 +-
 25 files changed, 733 insertions(+), 614 deletions(-)
 create mode 100644 tools/perf/util/perf_regs_arm.h
 create mode 100644 tools/perf/util/perf_regs_arm64.h
 create mode 100644 tools/perf/util/perf_regs_csky.h
 create mode 100644 tools/perf/util/perf_regs_mips.h
 create mode 100644 tools/perf/util/perf_regs_powerpc.h
 create mode 100644 tools/perf/util/perf_regs_riscv.h
 create mode 100644 tools/perf/util/perf_regs_s390.h
 create mode 100644 tools/perf/util/perf_regs_x86.h

-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ