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] [day] [month] [year] [list]
Message-ID: <mhng-d348c041-9628-4aa2-af10-51604edbe48c@palmer-ri-x1c9>
Date:   Wed, 30 Mar 2022 22:53:09 -0700 (PDT)
From:   Palmer Dabbelt <palmer@...belt.com>
To:     nikita.shubin@...uefel.me
CC:     linux@...ro.com, n.shubin@...ro.com, peterz@...radead.org,
        mingo@...hat.com, acme@...nel.org, mark.rutland@....com,
        alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
        namhyung@...nel.org, Paul Walmsley <paul.walmsley@...ive.com>,
        aou@...s.berkeley.edu, han_mao@...ky.com,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-riscv@...ts.infradead.org
Subject:     Re: [PATCH] riscv: Fix fill_callchain return value

On Thu, 10 Mar 2022 22:58:15 PST (-0800), nikita.shubin@...uefel.me wrote:
> From: Nikita Shubin <n.shubin@...ro.com>
>
> perf_callchain_store return 0 on success, -1 otherwise,
> fix fill_callchain to return correct bool value.
>
> Fixes: dbeb90b0c1eb ("riscv: Add perf callchain support")
> Signed-off-by: Nikita Shubin <n.shubin@...ro.com>
> ---
>  arch/riscv/kernel/perf_callchain.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/perf_callchain.c b/arch/riscv/kernel/perf_callchain.c
> index 1fc075b8f764..7aca6a238173 100644
> --- a/arch/riscv/kernel/perf_callchain.c
> +++ b/arch/riscv/kernel/perf_callchain.c
> @@ -68,7 +68,7 @@ void perf_callchain_user(struct perf_callchain_entry_ctx *entry,
>
>  static bool fill_callchain(void *entry, unsigned long pc)
>  {
> -	return perf_callchain_store(entry, pc);
> +	return perf_callchain_store(entry, pc) == 0;
>  }
>
>  void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,

Thanks, this is on for-next.  Looks like we share some of this code with 
at least arm64, it might be worth refactoring this into something 
generic.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ