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: <25C12FFF-3F86-4733-B778-6C01A3138C25@gmail.com>
Date:   Mon, 04 Oct 2021 20:44:47 -0300
From:   Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To:     Kim Phillips <kim.phillips@....com>,
        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 October 4, 2021 6:57:09 PM GMT-03:00, Kim Phillips <kim.phillips@....com> wrote:
>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.


I'll work in this tomorrow, thanks

- Arnaldo
>
>Thanks,
>
>Kim

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ