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: <aa40b532-0e95-76c0-6c9c-a91d45bf3468@amd.com>
Date:   Mon, 4 Oct 2021 16:57:09 -0500
From:   Kim Phillips <kim.phillips@....com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Stephane Eranian <eranian@...gle.com>
Cc:     linux-kernel@...r.kernel.org, peterz@...radead.org,
        acme@...hat.com, jolsa@...hat.com, namhyung@...nel.org,
        irogers@...gle.com
Subject: Re: [PATCH v1 11/13] perf tools: improve IBS error handling

On 9/13/21 2:34 PM, Arnaldo Carvalho de Melo wrote:
> Em Thu, Sep 09, 2021 at 12:56:58AM -0700, Stephane Eranian escreveu:
>> From: Kim Phillips <kim.phillips@....com>
>> +static void detect_amd(void)
>> +{
>> +	FILE *inf = fopen("/proc/cpuinfo", "r");
>> +	char *res;
>> +
>> +	if (!inf)
>> +		return;
>> +
>> +	res = fgrep(inf, "vendor_id");
>> +
>> +	if (res) {
>> +		char *s = strchr(res, ':');
>> +
>> +		is_amd = s && !strcmp(s, ": AuthenticAMD\n");
>> +		free(res);
>> +	}
>> +	fclose(inf);
>> +}
>> +
> 
> We have perf_env for such details, for instance in
> tools/perf/util/sample-raw.c we have:o
> 
>          const char *arch_pf = perf_env__arch(evlist->env);
>          const char *cpuid = perf_env__cpuid(evlist->env);
> 
> 	        else if (arch_pf && !strcmp("x86", arch_pf) &&
>                   cpuid && strstarts(cpuid, "AuthenticAMD") &&
>                   evlist__has_amd_ibs(evlist)) {

OK, I've rebased this 11/13 patch onto the new perf_env__{arch,cpuid} 
code, and posted it here:

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

The following 12/13 patch in this series changes, too, but since it 
depends on prior patches in the series, I'll reply-all to 12/13 with its 
new version.

Arnaldo, would it be ok to apply the two new patches that replace this 
11/13?  They don't depend on any others in this series, and it would 
save Stephane from having to carry them.

Thanks,

Kim

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ