[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CE1DB6E.9080301@goop.org>
Date: Mon, 15 Nov 2010 17:16:30 -0800
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
CC: the arch/x86 maintainers <x86@...nel.org>,
Xen-devel <xen-devel@...ts.xensource.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [Xen-devel] Re: [PATCH 2/3] xen: add CPU microcode update driver
On 11/15/2010 07:59 AM, Konrad Rzeszutek Wilk wrote:
>> +static enum ucode_state xen_request_microcode_user(int cpu,
>> + const void __user *buf, size_t size)
>> +{
>> + struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
>> + struct xen_microcode *uc;
>> + enum ucode_state ret;
>> + size_t unread;
>> +
>> + if (cpu != 0) {
>> + /* No real firmware for non-zero cpus; just store a
>> + placeholder */
>> + size = 0;
>> + }
>> +
>> + if (uci->mc != NULL) {
>> + vfree(uci->mc);
>> + uci->mc = NULL;
>> + }
>> +
>> + ret = UCODE_ERROR;
>> + uc = vmalloc(sizeof(*uc) + size);
>> + if (uc == NULL)
>> + goto out;
>> +
>> + uc->len = size;
>> +
>> + ret = UCODE_NFOUND;
>> +
>> + /* XXX This sporadically returns uncopied bytes, so we return
>> + EFAULT. As far as I can see, the usermode code
> ^^^^^ UCODE_NFOUND.
>> + (microcode_ctl) isn't doing anything wrong... */
> Is this still valid? Looking at AMD it checks for a magic key and the Intel
> just copies without checks.
Probably not.
J
--
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