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: <1452178799-20878-4-git-send-email-tim.gardner@canonical.com>
Date:	Thu,  7 Jan 2016 07:59:58 -0700
From:	tim.gardner@...onical.com
To:	x86@...nel.org, linux-kernel@...r.kernel.org
Cc:	Tim Gardner <tim.gardner@...onical.com>,
	Borislav Petkov <bp@...en8.de>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: [PATCH v4.4-rc8 3/4] x86/microcode/intel: load_microcode: Squelch frame size warning

From: Tim Gardner <tim.gardner@...onical.com>

arch/x86/kernel/cpu/microcode/intel.c: In function 'load_microcode.isra.2.constprop':
arch/x86/kernel/cpu/microcode/intel.c:130:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]

gcc version 5.3.1 20160101 (Ubuntu 5.3.1-5ubuntu1)

Cc: Borislav Petkov <bp@...en8.de>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: "H. Peter Anvin" <hpa@...or.com>
Signed-off-by: Tim Gardner <tim.gardner@...onical.com>
---
 arch/x86/kernel/cpu/microcode/intel.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index ebf5e66..e019c11 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -111,22 +111,30 @@ static enum ucode_state
 load_microcode(struct mc_saved_data *mc_saved_data, unsigned long *initrd,
 	       unsigned long initrd_start, struct ucode_cpu_info *uci)
 {
-	struct microcode_intel *mc_saved_tmp[MAX_UCODE_COUNT];
+	struct microcode_intel **mc_saved_tmp;
 	unsigned int count = mc_saved_data->mc_saved_count;
+	enum ucode_state state;
+
+	mc_saved_tmp = kcalloc(MAX_UCODE_COUNT, sizeof(*mc_saved_tmp),
+		GFP_KERNEL);
+	if (!mc_saved_tmp)
+		return UCODE_ERROR;
 
 	if (!mc_saved_data->mc_saved) {
 		copy_initrd_ptrs(mc_saved_tmp, initrd, initrd_start, count);
 
-		return load_microcode_early(mc_saved_tmp, count, uci);
+		state = load_microcode_early(mc_saved_tmp, count, uci);
 	} else {
 #ifdef CONFIG_X86_32
 		microcode_phys(mc_saved_tmp, mc_saved_data);
-		return load_microcode_early(mc_saved_tmp, count, uci);
+		state = load_microcode_early(mc_saved_tmp, count, uci);
 #else
-		return load_microcode_early(mc_saved_data->mc_saved,
+		state = load_microcode_early(mc_saved_data->mc_saved,
 						    count, uci);
 #endif
 	}
+	kfree(mc_saved_tmp);
+	return state;
 }
 
 /*
-- 
1.9.1

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