linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] hw_breakpoint: Save privilege of access control via ptrace
@ 2024-06-21  7:39 Tiezhu Yang
  2024-06-21  7:39 ` [PATCH v2 1/3] perf: Add perf_event_attr::bp_priv Tiezhu Yang
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Tiezhu Yang @ 2024-06-21  7:39 UTC (permalink / raw)
  To: Will Deacon, Mark Rutland, Russell King, Catalin Marinas,
	Oleg Nesterov, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Namhyung Kim
  Cc: linux-arm-kernel, linux-perf-users, linux-kernel

Hi all,

Thank you very much for your feedbacks in the v1 patch.
This series is based on 6.10-rc4, cross compile tested only.

As far as I can tell, these changes are not relevant with tools/perf,
on some archs such as ARM, ARM64 and LoongArch which have privilege
level of breakpoint, the initial aim is to make use of the value of
ctrl->privilege saved in decode_ctrl_reg() and then remove the check
whether bp virtual address is in kernel space to assign value for
hw->ctrl.privilege in arch_build_bp_info().

v2:
  -- Put the new member "bp_priv" at the end of the uapi
     struct perf_event_attr and add PERF_ATTR_SIZE_VER9.
  -- Update the commit message to make the goal clear.

Tiezhu Yang (3):
  perf: Add perf_event_attr::bp_priv
  arm: hw_breakpoint: Save privilege of access control via ptrace
  arm64: hw_breakpoint: Save privilege of access control via ptrace

 arch/arm/kernel/hw_breakpoint.c   |  4 +---
 arch/arm/kernel/ptrace.c          |  2 ++
 arch/arm64/kernel/hw_breakpoint.c | 11 ++---------
 arch/arm64/kernel/ptrace.c        |  2 ++
 include/uapi/linux/perf_event.h   |  3 +++
 kernel/events/hw_breakpoint.c     |  1 +
 6 files changed, 11 insertions(+), 12 deletions(-)

-- 
2.42.0



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-07-09  1:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-21  7:39 [PATCH v2 0/3] hw_breakpoint: Save privilege of access control via ptrace Tiezhu Yang
2024-06-21  7:39 ` [PATCH v2 1/3] perf: Add perf_event_attr::bp_priv Tiezhu Yang
2024-07-05 10:34   ` Will Deacon
2024-07-06  5:31     ` Tiezhu Yang
2024-07-08  7:36       ` Peter Zijlstra
2024-07-08 10:06         ` Tiezhu Yang
2024-07-08 11:15       ` Will Deacon
2024-07-09  1:34         ` Tiezhu Yang
2024-06-21  7:39 ` [PATCH v2 2/3] arm: hw_breakpoint: Save privilege of access control via ptrace Tiezhu Yang
2024-06-21  7:39 ` [PATCH v2 3/3] arm64: " Tiezhu Yang
2024-07-04 14:47 ` [PATCH v2 0/3] " Tiezhu Yang
2024-07-05 10:29   ` Russell King (Oracle)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).