• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: コミット

2.4.36-stable kernel tree


コミットメタ情報

リビジョンf3f1dfb50d308581859ee001eae7d27dfc2ba0cd (tree)
日時2006-12-05 17:27:21
作者Shaohua Li <shaohua.li@inte...>
コミッターWilly Tarreau

ログメッセージ

[PATCH] x86 microcode: dont check the size

(backported from 2.6)

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>
Acked-by: Shaohua Li <shaohua.li@intel.com>

変更サマリ

差分

--- a/arch/i386/kernel/microcode.c
+++ b/arch/i386/kernel/microcode.c
@@ -237,14 +237,14 @@ static int find_matching_ucodes (void)
237237 }
238238
239239 total_size = get_totalsize(&mc_header);
240- if ((cursor + total_size > user_buffer_size) || (total_size < DEFAULT_UCODE_TOTALSIZE)) {
240+ if (cursor + total_size > user_buffer_size) {
241241 printk(KERN_ERR "microcode: error! Bad data in microcode data file\n");
242242 error = -EINVAL;
243243 goto out;
244244 }
245245
246246 data_size = get_datasize(&mc_header);
247- if ((data_size + MC_HEADER_SIZE > total_size) || (data_size < DEFAULT_UCODE_DATASIZE)) {
247+ if (data_size + MC_HEADER_SIZE > total_size) {
248248 printk(KERN_ERR "microcode: error! Bad data in microcode data file\n");
249249 error = -EINVAL;
250250 goto out;
@@ -438,11 +438,6 @@ static ssize_t microcode_write (struct file *file, const char *buf, size_t len,
438438 {
439439 ssize_t ret;
440440
441- if (len < DEFAULT_UCODE_TOTALSIZE) {
442- printk(KERN_ERR "microcode: not enough data\n");
443- return -EINVAL;
444- }
445-
446441 if ((len >> PAGE_SHIFT) > num_physpages) {
447442 printk(KERN_ERR "microcode: too much data (max %ld pages)\n", num_physpages);
448443 return -EINVAL;
旧リポジトリブラウザで表示