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:	Fri, 16 Jan 2009 10:34:42 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Mike Travis <travis@....com>
Cc:	Rusty Russell <rusty@...tcorp.com.au>,
	LKML <linux-kernel@...r.kernel.org>,
	Jeremy Fitzhardinge <jeremy@...p.org>
Subject: Re: [PULL}: latest tip/cpus4096 changes


* Mike Travis <travis@....com> wrote:

> --- a/arch/x86/kernel/microcode_core.c
> +++ b/arch/x86/kernel/microcode_core.c
> @@ -104,7 +104,7 @@ static struct microcode_ops *microcode_ops;
>  /* no concurrent ->write()s are allowed on /dev/cpu/microcode */
>  static DEFINE_MUTEX(microcode_mutex);
>  
> -struct ucode_cpu_info ucode_cpu_info[NR_CPUS];
> +struct ucode_cpu_info *ucode_cpu_info;
>  EXPORT_SYMBOL_GPL(ucode_cpu_info);
>  
>  #ifdef CONFIG_MICROCODE_OLD_INTERFACE
> @@ -471,6 +471,13 @@ static int __init microcode_init(void)
>  {
>  	struct cpuinfo_x86 *c = &cpu_data(0);
>  	int error;
> +	size_t size = sizeof(*ucode_cpu_info) * nr_cpu_ids;
> +
> +	ucode_cpu_info = kmalloc(size, GFP_KERNEL);
> +	if (!ucode_cpu_info) {
> +		WARN(1, "CPU: cannot allocate microcode info structure\n");
> +		return -ENOMEM;
> +	}
>  
>  	if (c->x86_vendor == X86_VENDOR_INTEL)
>  		microcode_ops = init_intel_microcode();

look how this code continues:

        else if (c->x86_vendor == X86_VENDOR_AMD)
                microcode_ops = init_amd_microcode();

        if (!microcode_ops) {
                printk(KERN_ERR "microcode: no support for this CPU vendor\n");
                return -ENODEV;
        }

see the memory leak? Again, this patch too is trivially broken.

> commit beec9183a43f8a42f5b790326a3b120a3b513590
> Author: Mike Travis <travis@....com>
> Date:   Fri Jan 16 00:22:33 2009 -0800
> 
>     xen: reduce static memory usage

this one looks good in a quick check but please send it to Jeremy first or 
get his Ack.

	Ingo
--
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