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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0c89da8c-10e5-42d2-99cd-557b25a8e91c@ghiti.fr>
Date: Wed, 2 Apr 2025 09:35:12 +0200
From: Alexandre Ghiti <alex@...ti.fr>
To: Nam Cao <namcao@...utronix.de>, Steven Rostedt <rostedt@...dmis.org>,
 Gabriele Monaco <gmonaco@...hat.com>, john.ogness@...utronix.de,
 linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Paul Walmsley <paul.walmsley@...ive.com>,
 Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
 linux-riscv@...ts.infradead.org
Subject: Re: [PATCH 08/10] riscv: mm: Add page fault trace points

Hi Nam,

On 11/03/2025 18:05, Nam Cao wrote:
> Add page fault trace points, which are useful to implement RV monitor that
> watches page faults.
>
> Signed-off-by: Nam Cao <namcao@...utronix.de>
> ---
> Cc: Paul Walmsley <paul.walmsley@...ive.com>
> Cc: Palmer Dabbelt <palmer@...belt.com>
> Cc: Albert Ou <aou@...s.berkeley.edu>
> Cc: Alexandre Ghiti <alex@...ti.fr>
> Cc: linux-riscv@...ts.infradead.org
> ---
>   arch/riscv/mm/fault.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/arch/riscv/mm/fault.c b/arch/riscv/mm/fault.c
> index 0194324a0c50..04ed6f8acae4 100644
> --- a/arch/riscv/mm/fault.c
> +++ b/arch/riscv/mm/fault.c
> @@ -20,6 +20,9 @@
>   #include <asm/ptrace.h>
>   #include <asm/tlbflush.h>
>   
> +#define CREATE_TRACE_POINTS
> +#include <trace/events/exceptions.h>
> +
>   #include "../kernel/head.h"
>   
>   static void show_pte(unsigned long addr)
> @@ -291,6 +294,11 @@ void handle_page_fault(struct pt_regs *regs)
>   	if (kprobe_page_fault(regs, cause))
>   		return;
>   
> +	if (user_mode(regs))
> +		trace_page_fault_user(addr, regs, cause);
> +	else
> +		trace_page_fault_kernel(addr, regs, cause);
> +
>   	/*
>   	 * Fault-in kernel-space virtual memory on-demand.
>   	 * The 'reference' page table is init_mm.pgd.


For this riscv part, you can add:

Acked-by: Alexandre Ghiti <alexghiti@...osinc.com>

Thanks,

Alex


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ