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] [day] [month] [year] [list]
Date:	Thu, 23 May 2013 10:17:54 -0500
From:	Jacob Shin <jacob.shin@....com>
To:	Borislav Petkov <bp@...en8.de>
CC:	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>, <x86@...nel.org>,
	Fenghua Yu <fenghua.yu@...el.com>,
	Andreas Herrmann <herrmann.der.user@...glemail.com>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] x86/microcode: vendor abstract out
 save_microcode_in_initrd()

On Thu, May 23, 2013 at 09:54:23AM +0200, Borislav Petkov wrote:
> On Wed, May 22, 2013 at 08:15:33PM -0500, Jacob Shin wrote:
> > Currently save_microcode_in_initrd() is declared in vendor neutural
> > microcode.h file, but defined in vendor specific
> > microcode_intel_early.c file. Vendor abstract it out to
> > microcode_core_early.c with a wrapper function.
> > 
> > Signed-off-by: Jacob Shin <jacob.shin@....com>
> > ---
> >  arch/x86/include/asm/microcode_intel.h  |    2 ++
> >  arch/x86/kernel/microcode_core_early.c  |   10 ++++++++++
> >  arch/x86/kernel/microcode_intel_early.c |    2 +-
> >  3 files changed, 13 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/x86/include/asm/microcode_intel.h b/arch/x86/include/asm/microcode_intel.h
> > index 5356f92..cf729eb 100644
> > --- a/arch/x86/include/asm/microcode_intel.h
> > +++ b/arch/x86/include/asm/microcode_intel.h
> > @@ -67,10 +67,12 @@ update_match_revision(struct microcode_header_intel *mc_header, int rev);
> >  extern void __init load_ucode_intel_bsp(void);
> >  extern void __cpuinit load_ucode_intel_ap(void);
> >  extern void show_ucode_info_early(void);
> > +extern int __init save_microcode_in_initrd_intel(void);
> >  #else
> >  static inline __init void load_ucode_intel_bsp(void) {}
> >  static inline __cpuinit void load_ucode_intel_ap(void) {}
> >  static inline void show_ucode_info_early(void) {}
> > +static inline int __init save_microcode_in_initrd_intel(void) {}
> 
> In file included from arch/x86/kernel/cpu/common.c:41:0:
> /w/kernel/linux-2.6/arch/x86/include/asm/microcode_intel.h: In function ‘save_microcode_in_initrd_intel’:
> /w/kernel/linux-2.6/arch/x86/include/asm/microcode_intel.h:75:1: warning: no return statement in function returning non-void [-Wreturn-type]
> In file included from arch/x86/kernel/microcode_intel_lib.c:30:0:
> /w/kernel/linux-2.6/arch/x86/include/asm/microcode_intel.h: In function ‘save_microcode_in_initrd_intel’:
> /w/kernel/linux-2.6/arch/x86/include/asm/microcode_intel.h:75:1: warning: no return statement in function returning non-void [-Wreturn-type]
> In file included from arch/x86/kernel/microcode_intel.c:82:0:
> /w/kernel/linux-2.6/arch/x86/include/asm/microcode_intel.h: In function ‘save_microcode_in_initrd_intel’:
> /w/kernel/linux-2.6/arch/x86/include/asm/microcode_intel.h:75:1: warning: no return statement in function returning non-void [-Wreturn-type]
> Setup is 15436 bytes (padded to 15872 bytes).
> System is 4268 kB
> CRC a330a73f
> 
> You need:
> 
> diff --git a/arch/x86/include/asm/microcode_intel.h b/arch/x86/include/asm/microcode_intel.h
> index cf729eb3beee..87a085333cbf 100644
> --- a/arch/x86/include/asm/microcode_intel.h
> +++ b/arch/x86/include/asm/microcode_intel.h
> @@ -72,7 +72,7 @@ extern int __init save_microcode_in_initrd_intel(void);
>  static inline __init void load_ucode_intel_bsp(void) {}
>  static inline __cpuinit void load_ucode_intel_ap(void) {}
>  static inline void show_ucode_info_early(void) {}
> -static inline int __init save_microcode_in_initrd_intel(void) {}
> +static inline int __init save_microcode_in_initrd_intel(void) { return -EINVAL; }

Oops, sorry about that. Will fix,

>  #endif
>  
>  #if defined(CONFIG_MICROCODE_INTEL_EARLY) && defined(CONFIG_HOTPLUG_CPU)
> 
> Btw,
> 
> could you pick up this trivial fix and add it to your set - I can't help
> myself when I see typos, especially in user-visible printks :)

Will do and send out a V2 today.

Thanks!

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ