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: <20191127112613.GA3812@zn.tnic>
Date:   Wed, 27 Nov 2019 12:26:13 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     Jules Irenge <jbi.octave@...il.com>, tglx@...utronix.de,
        linux-kernel@...r.kernel.org, x86@...nel.org, hpa@...or.com,
        mingo@...hat.com
Subject: Re: [PATCH] cpu: microcode: Add comma to 0

On Wed, Nov 27, 2019 at 07:54:36AM +0100, Ingo Molnar wrote:
> 
> * Jules Irenge <jbi.octave@...il.com> wrote:
> 
> > Add ","  after 0
> > Because memory for the struct is being cleared
> > and elements after "," are missing on purpose
> >  as they are being cleared to
> > 
> > Recommended by Boris Petkov
> > 
> > Signed-off-by: Jules Irenge <jbi.octave@...il.com>
> > ---
> >  arch/x86/kernel/cpu/microcode/amd.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
> > index a0e52bd00ecc..04ee649f4acb 100644
> > --- a/arch/x86/kernel/cpu/microcode/amd.c
> > +++ b/arch/x86/kernel/cpu/microcode/amd.c
> > @@ -418,7 +418,7 @@ static int __apply_microcode_amd(struct microcode_amd *mc)
> >  static bool
> >  apply_microcode_early_amd(u32 cpuid_1_eax, void *ucode, size_t size, bool save_patch)
> >  {
> > -	struct cont_desc desc = { 0 };
> > +	struct cont_desc desc = { 0, };
> 
> This is 100% unnecessary - " = { }" is enough of a structure initializer.

That was my initial thought but empty initializers are not ISO C
compliant, I've been told.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ