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:   Tue, 22 Sep 2020 12:38:30 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Feng Tang <feng.tang@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H . Peter Anvin" <hpa@...or.com>, Borislav Petkov <bp@...en8.de>,
        Peter Zijlstra <peterz@...radead.org>, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v2] tools/x86: add kcpuid tool to show raw CPU
 features

On 9/21/20 10:27 PM, Feng Tang wrote:
> +static void parse_text(void)
> +{
> +	FILE *file;
> +	char *line = NULL;
> +	size_t len = 0;
> +	int ret;
> +
> +	file = fopen("cpuid.txt", "r");
> +	if (!file) {
> +		printf("Error in opening 'cpuid.txt'\n");
> +		return;
> +	}

This mostly looks fine to me.  A few things about cpuid.txt, though...
It needs to be read out of *some* location which is not the current
directory.  Maybe:

	/usr/share/hwdata/cpu.ids

or something.  It also needs a "-f" argument to override this default
location.  I don't know if there's a better per-kernel place to put this
file, though.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ