mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tim.gardner@canonical.com
To: x86@kernel.org, linux-kernel@vger.kernel.org
Cc: Tim Gardner <tim.gardner@canonical.com>,
	Borislav Petkov <bp@alien8.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH v4.4-rc8 2/4] x86/microcode/intel: save_microcode_in_initrd_intel: Squelch frame size warning
Date: Thu,  7 Jan 2016 07:59:57 -0700	[thread overview]
Message-ID: <1452178799-20878-3-git-send-email-tim.gardner@canonical.com> (raw)
In-Reply-To: <1452178799-20878-1-git-send-email-tim.gardner@canonical.com>

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

arch/x86/kernel/cpu/microcode/intel.c: In function 'save_microcode_in_initrd_intel':
arch/x86/kernel/cpu/microcode/intel.c:705: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@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 arch/x86/kernel/cpu/microcode/intel.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index bee5e84..ebf5e66 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -694,12 +694,16 @@ static int apply_microcode_early(struct ucode_cpu_info *uci, bool early)
 int __init save_microcode_in_initrd_intel(void)
 {
 	unsigned int count = mc_saved_data.mc_saved_count;
-	struct microcode_intel *mc_saved[MAX_UCODE_COUNT];
+	struct microcode_intel **mc_saved;
 	int ret = 0;
 
 	if (count == 0)
 		return ret;
 
+	mc_saved = kcalloc(MAX_UCODE_COUNT, sizeof(*mc_saved), GFP_KERNEL);
+	if (!mc_saved)
+		return -ENOMEM;
+
 	copy_initrd_ptrs(mc_saved, mc_saved_in_initrd, initrd_start, count);
 	ret = save_microcode(&mc_saved_data, mc_saved, count);
 	if (ret)
@@ -707,6 +711,7 @@ int __init save_microcode_in_initrd_intel(void)
 
 	show_saved_mc();
 
+	kfree(mc_saved);
 	return ret;
 }
 
-- 
1.9.1


  parent reply	other threads:[~2016-01-07 15:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-07 14:59 [PATCH v4.4-rc8 0/4] x86/microcode/intel: Squelch frame size warnings tim.gardner
2016-01-07 14:59 ` [PATCH v4.4-rc8 1/4] x86/microcode/intel: save_mc_for_early: Squelch frame size warning tim.gardner
2016-01-18 10:10   ` Borislav Petkov
2016-03-09 12:41     ` Ingo Molnar
2016-03-09 13:47       ` Borislav Petkov
2016-03-09 13:48         ` [PATCH] x86/i386-defconfig: Set CONFIG_FRAME_WARN to Kconfig default Borislav Petkov
2016-03-09 13:58           ` [tip:x86/build] x86/defconfigs/32: Set CONFIG_FRAME_WARN to the " tip-bot for Borislav Petkov
2016-01-07 14:59 ` tim.gardner [this message]
2016-01-07 14:59 ` [PATCH v4.4-rc8 3/4] x86/microcode/intel: load_microcode: Squelch frame size warning tim.gardner
2016-01-07 14:59 ` [PATCH v4.4-rc8 4/4] x86/microcode/intel: get_matching_model_microcode: " tim.gardner

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=1452178799-20878-3-git-send-email-tim.gardner@canonical.com \
    --to=tim.gardner@canonical.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®