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: <20200925072224.GE15894@shbuild999.sh.intel.com>
Date:   Fri, 25 Sep 2020 15:22:24 +0800
From:   Feng Tang <feng.tang@...el.com>
To:     Dave Hansen <dave.hansen@...el.com>
Cc:     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 Tue, Sep 22, 2020 at 12:38:30PM -0700, Dave Hansen wrote:
> 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

Good point! User won't run it inside a kernel source tree folder. And yes,
there are already similar pci.ids and usb.ids in the same folder, we coud 
do this in the 'install' part of Makefile

> or something.  It also needs a "-f" argument to override this default
> location. 

Ok, will add.

> I don't know if there's a better per-kernel place to put this
> file, though.

Device tree's dtb file may be similar, but it's also outside of bzImage.

Thanks,
Feng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ