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: <20220829065507.177781-1-anshuman.khandual@arm.com>
Date:   Mon, 29 Aug 2022 12:25:04 +0530
From:   Anshuman Khandual <anshuman.khandual@....com>
To:     linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
        peterz@...radead.org
Cc:     Anshuman Khandual <anshuman.khandual@....com>
Subject: [PATCH 0/3] perf/core: Assert PERF_EVENT_FLAG_ARCH is followed

This series ensures that PERF_EVENT_FLAG_ARCH mask is followed correctly,
while defining all the platform specific hardware event flags. But after
adding these checks, there are couple of build failures on x86 platform
like the following.

BUILD_BUG_ON(~PERF_EVENT_FLAG_ARCH & PERF_X86_EVENT_AMD_BRS)
BUILD_BUG_ON(~PERF_EVENT_FLAG_ARCH & PERF_X86_EVENT_PEBS_LAT_HYBRID)

This happens because both these flags PERF_X86_EVENT_AMD_BRS (0x10000) and
PERF_X86_EVENT_PEBS_LAT_HYBRID (0x20000) falls outside PERF_EVENT_FLAG_ARCH
(0x0000ffff). Given that x86 platform is already using up all available bit
positions, should this platform flags mask be extended to (0x000fffff) ?

This seires applies on v6.0-rc3.

Anshuman Khandual (3):
  perf/core: Assert PERF_EVENT_FLAG_ARCH does not overlap with generic flags
  arm64/perf: Assert all platform event flags are within PERF_EVENT_FLAG_ARCH
  x86/perf: Assert all platform event flags are within PERF_EVENT_FLAG_ARCH

 arch/arm64/kernel/perf_event.c  |  1 +
 arch/x86/events/amd/core.c      |  2 ++
 arch/x86/events/core.c          | 16 ++++++++++++++++
 drivers/perf/apple_m1_cpu_pmu.c |  1 +
 drivers/perf/arm_spe_pmu.c      |  1 +
 kernel/events/core.c            |  1 +
 6 files changed, 22 insertions(+)

-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ