mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Junichi Nomura <j-nomura@ce.jp.nec.com>
To: Borislav Petkov <bp@alien8.de>
Cc: "x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"hpa@zytor.com" <hpa@zytor.com>
Subject: Re: [PATCH] x86/microcode/intel: Use correct buffer size for saving microcode data
Date: Thu, 5 Jan 2017 23:47:56 +0000	[thread overview]
Message-ID: <e2b03b95-17ae-d734-d4a7-8f13e33147fc@ce.jp.nec.com> (raw)
In-Reply-To: <20170105101727.jutfvokxxdi4hxl6@pd.tnic>

On 01/05/17 19:17, Borislav Petkov wrote:
> On Thu, Jan 05, 2017 at 04:45:18AM +0000, Junichi Nomura wrote:
>> In generic_load_microcode(), curr_mc_size is the size of the last
>> allocated buffer and could be smaller than the actual size of the
>> buffer pointed to by "new_mc".
>>
>> Without this fix, we could get oops like this:
>>
>>   BUG: unable to handle kernel paging request at ffffc9000e30f000
>>   IP: __memcpy+0x12/0x20
>>   ...
>>   Call Trace:
>>   ? kmemdup+0x43/0x60
>>   __alloc_microcode_buf+0x44/0x70
>>   save_microcode_patch+0xd4/0x150
>>   generic_load_microcode+0x1b8/0x260
>>   request_microcode_user+0x15/0x20
> 
> I see you're using the old interface but how exactly do you trigger
> this, i.e., can you give me the blob you're using and the exact steps
> you're performing? I'd like to reproduce it here.

I'm seeing this on RHEL6-based userspace, where 'microcode_ctl -Qu' is
run from udev automatically when microcode driver is loaded.
The version of microcode_ctl is 1.17.

The problem can be reproduced either with the one in RHEL6 (
microcode-20151106.dat) or with the latest blob from Intel,
i.e. microcode-20161104.tgz.

-- 
Jun'ichi Nomura, NEC Corporation / NEC Solution Innovators, Ltd.

  reply	other threads:[~2017-01-05 23:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05  1:02 Junichi Nomura
2017-01-05  4:45 ` Junichi Nomura
2017-01-05 10:17   ` Borislav Petkov
2017-01-05 23:47     ` Junichi Nomura [this message]
2017-01-06 12:39       ` Borislav Petkov
2017-01-09 22:18   ` [tip:x86/urgent] " tip-bot for Junichi Nomura

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=e2b03b95-17ae-d734-d4a7-8f13e33147fc@ce.jp.nec.com \
    --to=j-nomura@ce.jp.nec.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®