From: Leo Yan <leo.yan@arm.com>
To: Justinien Bouron <jbouron@amazon.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
David Hildenbrand <david@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Ryan Roberts <ryan.roberts@arm.com>,
Ada Couprie Diaz <ada.coupriediaz@arm.com>,
Kevin Brodsky <kevin.brodsky@arm.com>,
Lorenzo Stoakes <ljs@kernel.org>,
Quentin Perret <qperret@google.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Gunnar Kudrjavets <gunnarku@amazon.com>
Subject: Re: [PATCH] arm64: Add user and kernel page-fault tracepoints
Date: Wed, 20 May 2026 08:36:06 +0100 [thread overview]
Message-ID: <20260520073606.GA101133@e132581.arm.com> (raw)
In-Reply-To: <20260520045524.75670-1-jbouron@amazon.com>
On Tue, May 19, 2026 at 09:55:24PM -0700, Justinien Bouron wrote:
[...]
> @@ -606,6 +609,11 @@ static int __kprobes do_page_fault(unsigned long far, unsigned long esr,
> int si_code;
> int pkey = -1;
>
> + if (user_mode(regs))
> + trace_page_fault_user(addr, regs, esr);
> + else
> + trace_page_fault_kernel(addr, regs, esr);
Based on the discussion [1], Arm64 has already supported perf sw event
for page-faults:
perf record -e page-faults ...
Seems there have a plan to consolidate perf event and tracepoints but I
have no idea how it is going. I would leave this to maintainers.
> +
> if (kprobe_page_fault(regs, esr))
> return 0;
tracepoints should be after kprobe_page_fault(), as explained [2] by Mark.
Thanks,
Leo
[1] https://lore.kernel.org/all/20250520140453.GA18711@willie-the-truck/
[2] https://lore.kernel.org/all/aCtZfiU8bgkSAgLh@J2N7QTR9R3/
WARNING: multiple messages have this Message-ID (diff)
From: Leo Yan <leo.yan@arm.com>
To: Justinien Bouron <jbouron@amazon.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
Gunnar Kudrjavets <gunnarku@amazon.com>,
Ryan Roberts <ryan.roberts@arm.com>,
Quentin Perret <qperret@google.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Kevin Brodsky <kevin.brodsky@arm.com>,
linux-kernel@vger.kernel.org,
David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <ljs@kernel.org>, Will Deacon <will@kernel.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64: Add user and kernel page-fault tracepoints
Date: Wed, 20 May 2026 08:36:06 +0100 [thread overview]
Message-ID: <20260520073606.GA101133@e132581.arm.com> (raw)
In-Reply-To: <20260520045524.75670-1-jbouron@amazon.com>
On Tue, May 19, 2026 at 09:55:24PM -0700, Justinien Bouron wrote:
[...]
> @@ -606,6 +609,11 @@ static int __kprobes do_page_fault(unsigned long far, unsigned long esr,
> int si_code;
> int pkey = -1;
>
> + if (user_mode(regs))
> + trace_page_fault_user(addr, regs, esr);
> + else
> + trace_page_fault_kernel(addr, regs, esr);
Based on the discussion [1], Arm64 has already supported perf sw event
for page-faults:
perf record -e page-faults ...
Seems there have a plan to consolidate perf event and tracepoints but I
have no idea how it is going. I would leave this to maintainers.
> +
> if (kprobe_page_fault(regs, esr))
> return 0;
tracepoints should be after kprobe_page_fault(), as explained [2] by Mark.
Thanks,
Leo
[1] https://lore.kernel.org/all/20250520140453.GA18711@willie-the-truck/
[2] https://lore.kernel.org/all/aCtZfiU8bgkSAgLh@J2N7QTR9R3/
next prev parent reply other threads:[~2026-05-20 7:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 4:55 [PATCH] arm64: Add user and kernel page-fault tracepoints Justinien Bouron
2026-05-20 7:36 ` Leo Yan [this message]
2026-05-20 7:36 ` Leo Yan
2026-05-20 16:45 ` Justinien Bouron
2026-05-20 16:45 ` Justinien Bouron
2026-09-09 13:13 ` Bouron, Justinien
2026-09-09 17:50 ` Leo Yan
2026-09-23 14:40 ` Catalin Marinas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260520073606.GA101133@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=ada.coupriediaz@arm.com \
--cc=catalin.marinas@arm.com \
--cc=david@kernel.org \
--cc=gunnarku@amazon.com \
--cc=jbouron@amazon.com \
--cc=kevin.brodsky@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ljs@kernel.org \
--cc=mark.rutland@arm.com \
--cc=qperret@google.com \
--cc=ryan.roberts@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.