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]
Date:   Fri, 10 Sep 2021 19:11:29 +0000
From:   Song Liu <songliubraving@...com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "acme@...nel.org" <acme@...nel.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "kjain@...ux.ibm.com" <kjain@...ux.ibm.com>,
        Kernel Team <Kernel-team@...com>,
        John Fastabend <john.fastabend@...il.com>,
        "Andrii Nakryiko" <andrii@...nel.org>
Subject: Re: [PATCH v6 bpf-next 1/3] perf: enable branch record for software
 events



> On Sep 10, 2021, at 12:08 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> 
> On Fri, Sep 10, 2021 at 07:00:08PM +0000, Song Liu wrote:
> 
>> Hmm.. not really. We call migrate_disable() before entering the BPF program. 
>> And the helper calls snapshot_branch_stack() inside the BPF program. To move
>> it to before migrate_disable(), we will have to add a "whether to snapshot
>> branch stack" check before entering the BPF program. This check, while is
>> cheap, is added to all BPF programs on this hook, even when the program does 
>> not use snapshot at all. So we would rather keep all logic inside the helper, 
>> and not touch the common path. 
> 
> Moo :/ Because I also really don't want to expose struct rq, it's
> currently nicely squirelled away in kernel/sched/ and doesn't get
> anywhere near include/.

This matches my guess, so I didn't go too far on that direction. :-)

> 
> A well, maybe we can do something clever with migrate_disable() itself.
> I'll put it on this endless todo list ;-)

Awesome!

Thanks,
Song

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ