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]
Date:   Mon, 7 Nov 2016 17:47:21 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Borislav Petkov <bp@...en8.de>
cc:     He Chen <he.chen@...ux.intel.com>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, x86@...nel.org,
        Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        Ingo Molnar <mingo@...hat.com>,
        "H . Peter Anvin" <hpa@...or.com>,
        Luwei Kang <luwei.kang@...el.com>,
        Piotr Luc <Piotr.Luc@...el.com>
Subject: Re: [PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS
 features to kvm guest

On Mon, 7 Nov 2016, Borislav Petkov wrote:

> On Mon, Nov 07, 2016 at 10:10:07AM +0800, He Chen wrote:
> > It should be, but I found it conflcts with `struct cpuid_regs` in
> > `arch/x86/kernel/cpuid.c` since it got exported.
> 
> So make the cpuid.c-one static.

That does not work.

processor.h

enum cpuid_regs {
     ....
};

cpuid.c

struct cpuid_regs {
      ....
};

How do you make that struct definition static? And even if that'd work, how
would that help to avoid the name clash in cpuid.c?

Not at all.

Both the enum and the struct should be in processor.h obviously with
different names so we won't trip over this once more. And the obvious
naming is:

struct cpuid_regs {
      u32 eax, ebx, ecx, edx;
};

enum cpuid_regs_idx {
     CPUID_EAX,
     CPUID_EBX,
     CPUID_ECX,
     CPUID_EDX,
};

as CR_E*X is just not intuitive at all.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ