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: <20211116083454.GY174703@worktop.programming.kicks-ass.net>
Date:   Tue, 16 Nov 2021 09:34:54 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Daniel Borkmann <daniel@...earbox.net>
Cc:     Kajol Jain <kjain@...ux.ibm.com>, bpf@...r.kernel.org,
        linux-kernel@...r.kernel.org, acme@...nel.org,
        songliubraving@...com, andrii@...nel.org, kafai@...com, yhs@...com,
        john.fastabend@...il.com, davem@...emloft.net, kpsingh@...nel.org,
        hawk@...nel.org, kuba@...nel.org, maddy@...ux.ibm.com,
        atrajeev@...ux.vnet.ibm.com, linux-perf-users@...r.kernel.org,
        rnsastry@...ux.ibm.com
Subject: Re: [PATCH] bpf: Enable bpf support for reading branch records in
 powerpc

On Tue, Nov 16, 2021 at 12:30:07AM +0100, Daniel Borkmann wrote:

> > diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
> > index fdd14072fc3b..2b7343b64bb7 100644
> > --- a/kernel/trace/bpf_trace.c
> > +++ b/kernel/trace/bpf_trace.c
> > @@ -1245,7 +1245,7 @@ static const struct bpf_func_proto bpf_perf_prog_read_value_proto = {
> >   BPF_CALL_4(bpf_read_branch_records, struct bpf_perf_event_data_kern *, ctx,
> >   	   void *, buf, u32, size, u64, flags)
> >   {
> > -#ifndef CONFIG_X86
> > +#if !(defined(CONFIG_X86) || defined(CONFIG_PPC64))
> 
> Can this really be enabled generically? Looking at 3925f46bb590 ("powerpc/perf: Enable
> branch stack sampling framework") it says POWER8 [and beyond]. Should there be a generic
> Kconfig symbol like ARCH_HAS_BRANCH_RECORDS that can be selected by archs instead?

I conplained about it before as well. I'd just take it out entirely.

If perf_snapshot_branch_stack isn't implemnted it'll return 0 and then
we'll -Esomething anyway.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ