From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 5/5] x86/ucode: Drop the match_reg[] field from AMD's microcode_patch
Date: Tue, 25 Feb 2025 22:01:59 +0000 [thread overview]
Message-ID: <22f17108-7c71-47ee-94cc-068fc01194fd@citrix.com> (raw)
In-Reply-To: <122ae85e-d418-42d3-9554-2ecd90996ae3@suse.com>
On 28/10/2024 1:18 pm, Jan Beulich wrote:
> On 24.10.2024 15:22, Andrew Cooper wrote:
>> This was true in the K10 days, but even back then the match registers were
>> really payload data rather than header data.
>>
>> But, it's really model specific data, and these days typically part of the
>> signature, so is random data for all intents and purposes.
>>
>> No functional change.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> ---
>> CC: Jan Beulich <JBeulich@suse.com>
>> CC: Roger Pau Monné <roger.pau@citrix.com>
>>
>> The single difference from this is:
>>
>> @@ -207587,7 +207587,7 @@
>> ffff82d0402ad261: 4c 89 ce mov %r9,%rsi
>> ffff82d0402ad264: 4c 39 c8 cmp %r9,%rax
>> ffff82d0402ad267: 0f 82 c2 11 f6 ff jb ffff82d04020e42f <amd_ucode_parse.cold+0x55>
>> -ffff82d0402ad26d: 41 83 f9 3f cmp $0x3f,%r9d
>> +ffff82d0402ad26d: 41 83 f9 1f cmp $0x1f,%r9d
>> ffff82d0402ad271: 0f 86 b8 11 f6 ff jbe ffff82d04020e42f <amd_ucode_parse.cold+0x55>
>> ffff82d0402ad277: 85 ed test %ebp,%ebp
>> ffff82d0402ad279: 75 55 jne ffff82d0402ad2d0 <amd_ucode_parse+0x170>
>>
>> which is "mc->len < sizeof(struct microcode_patch)" expression in
>> amd_ucode_parse().
> Yet is it correct to effectively relax that check, i.e. to accept something
> we previously would have rejected?
Yes. This is the bounds check about whether it's safe to look at fields
in the header. It's not part of the other validity checks.
~Andrew
next prev parent reply other threads:[~2025-02-25 22:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 13:22 [PATCH 0/5] x86/ucode: Minor cleanup Andrew Cooper
2024-10-24 13:22 ` [PATCH 1/5] x86/ucode: Rename hypercall-context functions Andrew Cooper
2024-10-25 14:57 ` Jason Andryuk
2024-10-24 13:22 ` [PATCH 2/5] x86/ucode: Drop the parse_blob() wrapper Andrew Cooper
2024-10-25 14:59 ` Jason Andryuk
2024-10-24 13:22 ` [PATCH 3/5] x86/ucode: Rename the cpu_request_microcode() hook to parse() Andrew Cooper
2024-10-25 15:03 ` Jason Andryuk
2024-10-24 13:22 ` [PATCH 4/5] x86/ucode: Rename the apply_microcode() hook to load() Andrew Cooper
2024-10-25 15:08 ` Jason Andryuk
2024-10-28 13:14 ` Jan Beulich
2024-10-24 13:22 ` [PATCH 5/5] x86/ucode: Drop the match_reg[] field from AMD's microcode_patch Andrew Cooper
2024-10-25 15:10 ` Jason Andryuk
2024-10-28 13:18 ` Jan Beulich
2025-02-25 22:01 ` Andrew Cooper [this message]
2025-02-26 7:18 ` Jan Beulich
2024-10-25 10:13 ` [PATCH 0/5] x86/ucode: Minor cleanup Alejandro Vallejo
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=22f17108-7c71-47ee-94cc-068fc01194fd@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.