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]
Date:   Fri, 10 Sep 2021 19:04:36 +0000
From:   Song Liu <songliubraving@...com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     bpf <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>,
        Andrii Nakryiko <andrii@...nel.org>,
        John Fastabend <john.fastabend@...il.com>
Subject: Re: [PATCH v7 bpf-next 3/3] selftests/bpf: add test for
 bpf_get_branch_snapshot



> On Sep 10, 2021, at 11:58 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> 
> On Fri, Sep 10, 2021 at 11:33:52AM -0700, Song Liu wrote:
>> +	/* Given we stop LBR in software, we will waste a few entries.
>> +	 * But we should try to waste as few as possible entries. We are at
>> +	 * about 7 on x86_64 systems.
>> +	 * Add a check for < 10 so that we get heads-up when something
>> +	 * changes and wastes too many entries.
>> +	 */
>> +	ASSERT_LT(skel->bss->wasted_entries, 10, "check_wasted_entries");
> 
> It might be worth pointing out that you can easily bust this limit by
> enabling all the various tracepoints that are still in that code, but
> that that isn't a hard error since that's not the expected use case.
> 
> For example there's the wrmsr tracepoint that will inject 6 or so
> branches on top of that you now have. And I also think there's a
> tracepoint in local_irq_save() that can trigger.

Right. I did some test with a lot of debug config enabled. We do see a lot
more wasted entries there. 

Thanks,
Song

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ