[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/5] x86/ucode: Drop ucode_mod and ucode_blob
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 28 Mar 2023 16:28:36 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OrRzzGZx79GvdfvZtfyt7X++JTiFnWIX+XEBOGPhBY4=; b=kRDOcC06KJPvJ9mpvYsAlGcMPYoICU/wXeIs1YICLK38rJreZvwxR4A1v0/bcmGjLREqf4voUna11e+4+5dKozzeHfPrRTokqwwuGxTy5EwDmXIp13ov3BLVf1ceqcFiZyLbocG/TP8t1DGfShwXCo1zOTUWbWfWaV4uT0FBUEa/Ck9SUyrQja3sJpWmSEfsH0DEKKDRAZRX5Ky6LpMAwJockLvyXakmy4GB8/y5KgoJMuUnqVlEr4Lv7SHxJtazIuntPejHgEKdmxBAdm0EgMntn92ASFI/WNnwguhx6Ko+sEeGvLtBR/Fkmhwyoh34P4An7NfZP1GRGDBXEODLwg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IcFywrLDgnW/ChEKNZZgiBoBkqJ3tRhxfo7MwlgafRvmsVpb7NqDHPJW6WwulkYl6URIHZ/+GjG6hP8L5Qd+wr29VhrW6bqqaplaRNrezKODjVGaXcEgG5sMf09qfCfb6UpKm625hT9e1/QDGbmt50Tm4WxQXZRJiYfxB9KNi9v4xpDMDmMhSxXCDabZHo3IWweJRtclLaR/ZaRg8r7jW9fcOuPG0a6ZtGcgyRqfZ1OlV78UE1V1zzTu2l/pdo1vWRsD4EU89N3+Y8rYu5M3kHS8YNcg2B9fLuMmYGBT//rGm+Mtpb014JxkD/yBf4iDjI9H0696g2NxnaozzjE9YQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Sergey Dyasli <sergey.dyasli@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 28 Mar 2023 14:28:53 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 27.03.2023 21:41, Andrew Cooper wrote:
> These both incorrectly cache bootstrap_map()'d pointers across returns back to
> __start_xen(). This is never valid, and such pointers may fault, or point to
> something unrelated.
As before - unless bootstrap_map(NULL) was (carefully) not called in
between. Same ...
> With the refactoring work in the previous patches, they're clearly now just
> non-standard function return parameters.
>
> Rename struct ucode_mod_blob to just struct blob for breviy and because
> there's nothing really ucode-specific about it.
>
> Introduce find_microcode_blob(), to replace microcode_grab_module(), and
> rework microcode_scan_module() so they both return a pointer/size tuple, and
> don't cache their return values in global state.
>
> This allows us to remove the microcode_init() initcall, the comments of which
> gives the false impression that either of the cached pointers are safe to use.
... here.
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
but I'd appreciate if the description was adjusted to only call the
original code as bad as it really is, not any worse.
Jan
|