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: <3fa173c8-2f36-adf5-c55b-ff356c49715f@amd.com>
Date:   Mon, 4 Oct 2021 16:57:37 -0500
From:   Kim Phillips <kim.phillips@....com>
To:     Stephane Eranian <eranian@...gle.com>, linux-kernel@...r.kernel.org
Cc:     peterz@...radead.org, acme@...hat.com, jolsa@...hat.com,
        namhyung@...nel.org, irogers@...gle.com
Subject: Re: [PATCH v1 12/13] perf tools: improve error handling of AMD Branch
 Sampling

On 9/9/21 2:56 AM, Stephane Eranian wrote:
> This patch improves the error message printed by perf when perf_event_open()
> fails on AMD Zen3 when using the branch sampling feature. In the case of
> EINVAL, there are two main reasons: frequency mode or period is smaller than
> the depth of the branch sampling buffer (16). The patch checks the parameters
> of the call and tries to print a relevant message to explain the error:
> 
> $ perf record -b -e cpu/branch-brs/ -c 10 ls
> Error:
> AMD Branch Sampling does not support sampling period smaller than what is reported in /sys/devices/cpu/caps/branches.
> 
> $ perf record -b -e cpu/branch-brs/ ls
> Error:
> AMD Branch Sampling does not support frequency mode sampling, must pass a fixed sampling period via -c option or cpu/branch-brs,period=xxxx/.
> 
> Signed-off-by: Stephane Eranian <eranian@...gle.com>
> ---

Hi Stephane,

I've rewritten this patch based on Arnaldo's comments to the previous 
(11/13) patch.  The new version attached depends on this 2-patch series:

https://lore.kernel.org/lkml/20211004214114.188477-1-kim.phillips@amd.com/T/#mc4c9c582e3816ab31af6d0187e6803de1a98ac84

Thanks,

Kim

View attachment "0003-perf-tools-Improve-error-handling-of-AMD-Branch-Samp.patch" of type "text/x-patch" (2585 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ