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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3492fcad-344d-174e-7e38-46f2e543b065@linux.intel.com>
Date:   Mon, 22 Jun 2020 15:11:07 -0400
From:   "Liang, Kan" <kan.liang@...ux.intel.com>
To:     Cyrill Gorcunov <gorcunov@...il.com>
Cc:     peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
        tglx@...utronix.de, bp@...en8.de, x86@...nel.org,
        linux-kernel@...r.kernel.org, mark.rutland@....com,
        alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
        namhyung@...nel.org, dave.hansen@...el.com, yu-cheng.yu@...el.com,
        bigeasy@...utronix.de, hpa@...or.com,
        alexey.budankov@...ux.intel.com, eranian@...gle.com,
        ak@...ux.intel.com, like.xu@...ux.intel.com,
        yao.jin@...ux.intel.com
Subject: Re: [PATCH 21/21] perf/x86/intel/lbr: Support XSAVES for arch LBR
 read



On 6/22/2020 2:49 PM, Cyrill Gorcunov wrote:
> On Fri, Jun 19, 2020 at 07:04:09AM -0700, kan.liang@...ux.intel.com wrote:
> ...
>> +static void intel_pmu_arch_lbr_read_xsave(struct cpu_hw_events *cpuc)
>> +{
>> +	struct x86_perf_task_context_arch_lbr_xsave *xsave = cpuc->lbr_xsave;
>> +	struct arch_lbr_entry *lbr;
>> +	int i;
>> +
>> +	if (!xsave)
>> +		goto rollback;
> 
> Why not make it simplier?
> 
> 	if (!xsave) {
> 		intel_pmu_arch_lbr_read(cpuc);
> 		return;
> 	}
> 
> The goto and "return" statement before the "rollback" label
> looks pretty ugly. I'm sorry I didn't follow the series
> in details so if you plan to add more handlers at "rollback"
> then sure.
> 

There were several handlers when I first implemented the function, but 
they are removed now. I don't think I will add more handlers in the next 
version.
I will remove the "rollback" label.

Thanks for pointing it out.

Kan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ