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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <32a473bb-2760-b967-5d54-a22677b8018d@windriver.com>
Date:   Wed, 29 Apr 2020 12:51:55 +0800
From:   Jiping Ma <Jiping.Ma2@...driver.com>
To:     will.deacon@....com, mark.rutland@....com, catalin.marinas@....com
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf: perf can not parser the backtrace of app in the
 32bit system and 64bit kernel.

We test it as the following steps.
# gcc -g -mthumb -gdwarf -o test test.c
# export CALLGRAPH=dwarf
#(./perftest ./test profiling 1; cd ./profiling/; perf script)

Thanks,
Jiping

On 04/29/2020 12:01 PM, Jiping Ma wrote:
> Record PC value from regs[15], it should be regs[32], which cause perf
> parser the backtrace failed.
>
> Signed-off-by: Jiping Ma <jiping.ma2@...driver.com>
> ---
>   arch/arm64/kernel/perf_regs.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm64/kernel/perf_regs.c b/arch/arm64/kernel/perf_regs.c
> index 0bbac61..04088e6 100644
> --- a/arch/arm64/kernel/perf_regs.c
> +++ b/arch/arm64/kernel/perf_regs.c
> @@ -32,6 +32,10 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
>   	if ((u32)idx == PERF_REG_ARM64_PC)
>   		return regs->pc;
>   
> +	if (perf_reg_abi(current) == PERF_SAMPLE_REGS_ABI_32
> +		&& idx == 15)
> +		return regs->regs[PERF_REG_ARM64_PC];
> +
>   	return regs->regs[idx];
>   }
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ