public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: shaohua.li@intel.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch 14/23] x86 microcode: dont check the size
Date: Sat, 2 Dec 2006 07:44:54 +0100	[thread overview]
Message-ID: <20061202064454.GE1736@1wt.eu> (raw)
In-Reply-To: <20061129220524.148156000@sous-sol.org>

Shaohua,

this one seems appropriate for 2.4 too. It is OK for you if I merge it ?

Thanks,
Willy

On Wed, Nov 29, 2006 at 02:00:25PM -0800, Chris Wright wrote:
> -stable review patch.  If anyone has any objections, please let us know.
> ------------------
> 
> From: Shaohua Li <shaohua.li@intel.com>
> 
> IA32 manual says if micorcode update's size is 0, then the size is
> default size (2048 bytes). But this doesn't suggest all microcode
> update's size should be above 2048 bytes to me. We actually had a
> microcode update whose size is 1024 bytes. The patch just removed the
> check.
> 
> Backported to 2.6.18 by Daniel Drake.
> 
> Signed-off-by: Daniel Drake <dsd@gentoo.org>
> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
> ---
>  arch/i386/kernel/microcode.c |    9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> --- linux-2.6.18.4.orig/arch/i386/kernel/microcode.c
> +++ linux-2.6.18.4/arch/i386/kernel/microcode.c
> @@ -250,14 +250,14 @@ static int find_matching_ucodes (void) 
>  		}
>  
>  		total_size = get_totalsize(&mc_header);
> -		if ((cursor + total_size > user_buffer_size) || (total_size < DEFAULT_UCODE_TOTALSIZE)) {
> +		if (cursor + total_size > user_buffer_size) {
>  			printk(KERN_ERR "microcode: error! Bad data in microcode data file\n");
>  			error = -EINVAL;
>  			goto out;
>  		}
>  
>  		data_size = get_datasize(&mc_header);
> -		if ((data_size + MC_HEADER_SIZE > total_size) || (data_size < DEFAULT_UCODE_DATASIZE)) {
> +		if (data_size + MC_HEADER_SIZE > total_size) {
>  			printk(KERN_ERR "microcode: error! Bad data in microcode data file\n");
>  			error = -EINVAL;
>  			goto out;
> @@ -460,11 +460,6 @@ static ssize_t microcode_write (struct f
>  {
>  	ssize_t ret;
>  
> -	if (len < DEFAULT_UCODE_TOTALSIZE) {
> -		printk(KERN_ERR "microcode: not enough data\n"); 
> -		return -EINVAL;
> -	}
> -
>  	if ((len >> PAGE_SHIFT) > num_physpages) {
>  		printk(KERN_ERR "microcode: too much data (max %ld pages)\n", num_physpages);
>  		return -EINVAL;
> 
> --
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2006-12-02  6:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29 22:00 [patch 00/23] -stable review Chris Wright
2006-11-29 22:00 ` [patch 01/23] scsi: clear garbage after CDBs on SG_IO Chris Wright
2006-11-29 22:00 ` [patch 02/23] NETFILTER: Missing check for CAP_NET_ADMIN in iptables compat layer Chris Wright
2006-11-29 22:00 ` [patch 03/23] NETFILTER: ip_tables: compat error way cleanup Chris Wright
2006-11-29 22:00 ` [patch 04/23] NETFILTER: ip_tables: fix module refcount leaks in compat error paths Chris Wright
2006-11-29 22:00 ` [patch 05/23] NETFILTER: Missed and reordered checks in {arp,ip,ip6}_tables Chris Wright
2006-11-29 22:00 ` [patch 06/23] NETFILTER: arp_tables: missing unregistration on module unload Chris Wright
2006-11-29 22:00 ` [patch 07/23] NETFILTER: Honour source routing for LVS-NAT Chris Wright
2006-11-29 22:00 ` [patch 08/23] NETFILTER: Kconfig: fix xt_physdev dependencies Chris Wright
2006-11-29 22:00 ` [patch 09/23] NETFILTER: xt_CONNSECMARK: fix Kconfig dependencies Chris Wright
2006-11-29 22:00 ` [patch 10/23] bcm43xx: Drain TX status before starting IRQs Chris Wright
2006-11-29 22:00 ` [patch 11/23] NETFILTER: H.323 conntrack: fix crash with CONFIG_IP_NF_CT_ACCT Chris Wright
2006-11-29 22:00 ` [patch 12/23] pcmcia: fix rmmod pcmcia with unbound devices Chris Wright
2006-11-29 22:00 ` [patch 13/23] V4L: Do not enable VIDEO_V4L2 unconditionally Chris Wright
2006-11-29 22:00 ` [patch 14/23] x86 microcode: dont check the size Chris Wright
2006-12-02  6:44   ` Willy Tarreau [this message]
2006-12-03  1:28     ` Bill Davidsen
2006-12-04  1:04     ` Shaohua Li
2006-12-04  1:31       ` Willy Tarreau
2006-11-29 22:00 ` [patch 15/23] alpha: Fix ALPHA_EV56 dependencies typo Chris Wright
2006-11-29 22:00 ` [patch 16/23] softmac: fix a slab corruption in WEP restricted key association Chris Wright
2006-11-29 22:00 ` [patch 17/23] TG3: Add missing unlock in tg3_open() error path Chris Wright
2006-11-29 22:00 ` [patch 18/23] IPV6: Fix address/interface handling in UDP and DCCP, according to the scoping architecture Chris Wright
2006-11-29 22:00 ` [patch 19/23] IA64: bte_unaligned_copy() transfers one extra cache line Chris Wright
2006-11-29 22:00 ` [patch 20/23] BLUETOOTH: Fix unaligned access in hci_send_to_sock Chris Wright
2006-11-29 22:00 ` [patch 21/23] AGP: Allocate AGP pages with GFP_DMA32 by default Chris Wright
2006-11-29 22:00 ` [patch 22/23] fuse: fix Oops in lookup Chris Wright
2006-11-29 22:00 ` [patch 23/23] UDP: Make udp_encap_rcv use pskb_may_pull Chris Wright
2006-11-29 22:40 ` [patch 00/23] -stable review Dave Jones
2006-11-29 23:24   ` [stable] " Chris Wright

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061202064454.GE1736@1wt.eu \
    --to=w@1wt.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shaohua.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox