Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C66B3C636CD for ; Tue, 7 Feb 2023 11:55:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231328AbjBGLzC (ORCPT ); Tue, 7 Feb 2023 06:55:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231281AbjBGLy5 (ORCPT ); Tue, 7 Feb 2023 06:54:57 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8949FF752 for ; Tue, 7 Feb 2023 03:54:55 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 392E638658; Tue, 7 Feb 2023 11:54:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1675770894; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GbR6suLYqqOLXuiO1QkSDn6FDUD01CxxWkTNqAIH1aE=; b=HglHXMjiV1qqkxLTcqLFmaErc3HTvskC4UsSHGQdUZQgoSB5V4wlsOQ6CoSrNdi1lICCIP BuiM+oWdg6BTuwehMD5EnvhoSOAcBWe2pVI89QHO9HToRdyddNThjvca0zEf78tbKHDu72 ttUDaQTyJ1J5unG6E+wl/Adxps8wYtQ= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CFB9E139ED; Tue, 7 Feb 2023 11:54:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uYwLMQ084mMMSQAAMHmgww (envelope-from ); Tue, 07 Feb 2023 11:54:53 +0000 Message-ID: Date: Tue, 7 Feb 2023 12:54:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH 5/6] x86/mm: only check uniform after calling mtrr_type_lookup() Content-Language: en-US To: Borislav Petkov , "Kani, Toshi" Cc: linux-kernel@vger.kernel.org, x86@kernel.org, lists@nerdbynature.de, mikelley@microsoft.com, torvalds@linux-foundation.org, Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" References: <20230207072902.5528-1-jgross@suse.com> <20230207072902.5528-6-jgross@suse.com> From: Juergen Gross In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------ox7uA8RfE1QKRJaXx6iIgCO3" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------ox7uA8RfE1QKRJaXx6iIgCO3 Content-Type: multipart/mixed; boundary="------------2vS0rMHK9Eyf1hosjmAJ5sjR"; protected-headers="v1" From: Juergen Gross To: Borislav Petkov , "Kani, Toshi" Cc: linux-kernel@vger.kernel.org, x86@kernel.org, lists@nerdbynature.de, mikelley@microsoft.com, torvalds@linux-foundation.org, Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" Message-ID: Subject: Re: [PATCH 5/6] x86/mm: only check uniform after calling mtrr_type_lookup() References: <20230207072902.5528-1-jgross@suse.com> <20230207072902.5528-6-jgross@suse.com> In-Reply-To: --------------2vS0rMHK9Eyf1hosjmAJ5sjR Content-Type: multipart/mixed; boundary="------------047mB0EgWMNTMUbLnM3IW1xb" --------------047mB0EgWMNTMUbLnM3IW1xb Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 T24gMDcuMDIuMjMgMTI6NDIsIEJvcmlzbGF2IFBldGtvdiB3cm90ZToNCj4gT24gVHVlLCBG ZWIgMDcsIDIwMjMgYXQgMDg6Mjk6MDFBTSArMDEwMCwgSnVlcmdlbiBHcm9zcyB3cm90ZToN Cj4+IFRvZGF5IHB1ZF9zZXRfaHVnZSgpIGFuZCBwbWRfc2V0X2h1Z2UoKSB0ZXN0IGZvciB0 aGUgTVRSUiB0eXBlIHRvIGJlDQo+PiBXQiBvciBJTlZBTElEIGFmdGVyIGNhbGxpbmcgbXRy cl90eXBlX2xvb2t1cCgpLiBUaG9zZSB0ZXN0cyBjYW4gYmUNCj4+IGRyb3BwZWQsIGFzIHRo ZSBvbmx5IHJlYXNvbiB0byBub3QgdXNlIGEgbGFyZ2UgbWFwcGluZyB3b3VsZCBiZQ0KPj4g dW5pZm9ybSBiZWluZyAwLiBBbnkgTVRSUiB0eXBlIGNhbiBiZSBhY2NlcHRlZCBhcyBsb25n IGFzIGl0IGFwcGxpZXMNCj4+IHRvIHRoZSB3aG9sZSBtZW1vcnkgcmFuZ2UgY292ZXJlZCBi eSB0aGUgbWFwcGluZywgYXMgdGhlIGFsdGVybmF0aXZlDQo+PiB3b3VsZCBvbmx5IGJlIHRv IG1hcCB0aGUgc2FtZSByZWdpb24gd2l0aCBzbWFsbGVyIHBhZ2VzIGluc3RlYWQgdXNpbmcN Cj4+IHRoZSBzYW1lIFBBVCB0eXBlIGFzIGZvciB0aGUgbGFyZ2UgbWFwcGluZy4NCj4+DQo+ PiBTdWdnZXN0ZWQtYnk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ICAgICAgICovDQo+ICAgICAgICAgIGlmICgo c3RhcnQgPCAweDEwMDAwMCkgJiYNCj4gICAgICAgICAgICAgIChtdHJyX3N0YXRlLmhhdmVf Zml4ZWQpICYmDQo+ICAgICAgICAgICAgICAobXRycl9zdGF0ZS5lbmFibGVkICYgTVRSUl9T VEFURV9NVFJSX0ZJWEVEX0VOQUJMRUQpKSB7DQo+ICAgICAgICAgICAgICAgICAgaXNfdW5p Zm9ybSA9IDA7DQo+ICAgICAgICAgICAgICAgICAgdHlwZSA9IG10cnJfdHlwZV9sb29rdXBf Zml4ZWQoc3RhcnQsIGVuZCk7DQo+ICAgICAgICAgICAgICAgICAgZ290byBvdXQ7DQo+ICAg ICAgICAgIH0NCj4gDQo+IElmIHRoYXQgY2FuIHJldHVybiBXQiwgdGhlbiBJIGd1ZXNzIHRo YXQgc2F5cyBpdCBpcyBzdGlsbCBvay4gQ2FuIHRoZQ0KPiBmaXhlZCByYW5nZXMgZXZlbiBj b3ZlciBhLCBhdCBsZWFzdCBhIFBNRD8gSSBndWVzcyBJIG5lZWQgdG8gc3RhcmUgYXQNCj4g dGhpcyBtb3JlLg0KDQpGaXhlZCBNVFJScyBhcmUgYWxsIGJlbG93IDFNQi4gU28gbm8sIHRo ZXkgY2FuJ3QgY292ZXIgYSBQTUQuDQoNCg0KSnVlcmdlbg0K --------------047mB0EgWMNTMUbLnM3IW1xb Content-Type: application/pgp-keys; name="OpenPGP_0xB0DE9DD628BF132F.asc" Content-Disposition: attachment; filename="OpenPGP_0xB0DE9DD628BF132F.asc" Content-Description: OpenPGP public key Content-Transfer-Encoding: quoted-printable -----BEGIN PGP PUBLIC KEY BLOCK----- xsBNBFOMcBYBCACgGjqjoGvbEouQZw/ToiBg9W98AlM2QHV+iNHsEs7kxWhKMjri oyspZKOBycWxw3ie3j9uvg9EOB3aN4xiTv4qbnGiTr3oJhkB1gsb6ToJQZ8uxGq2 kaV2KL9650I1SJvedYm8Of8Zd621lSmoKOwlNClALZNew72NjJLE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QugJ6MpMncr 0xSwFmHEgnSEjK/PAjppgmyc57BwKII3sV4on+gDVFJR6Y8ZRwgnBC5mVM6JjQ5x Dk8WRXljExRfUX9pNhdE5eBOZJrDRoLUmmjDtKzWaDhIg/+1Hzz93X4fCQkNVbVF LELU9bMaLPBG/x5q4iYZ2k2ex6d47YE1ZFdMm6YBYMOljGkZKwYde5ldM9mo45mm we0icXKLkpEdIXKTZeKDO+Hdv1aqFuAcccTg9RXDQjmwhC3yEmrmcfl0+rPghO0I v3OOImwTEe4co3c1mwARAQABwsBfBBgBAgAJBQJTjHAWAhsMAAoJELDendYovxMv Q/gH/1ha96vm4P/L+bQpJwrZ/dneZcmEwTbe8YFsw2V/Buv6Z4Mysln3nQK5ZadD 534CF7TDVft7fC4tU4PONxF5D+/tvgkPfDAfF77zy2AH1vJzQ1fOU8lYFpZXTXIH b+559UqvIB8AdgR3SAJGHHt4RKA0F7f5ipYBBrC6cyXJyyoprT10EMvU8VGiwXvT yJz3fjoYsdFzpWPlJEBRMedCot60g5dmbdrZ5DWClAr0yau47zpWj3enf1tLWaqc suylWsviuGjKGw7KHQd3bxALOknAp4dN3QwBYCKuZ7AddY9yjynVaD5X7nF9nO5B jR/i1DG86lem3iBDXzXsZDn8R38=3D =3D2wuH -----END PGP PUBLIC KEY BLOCK----- --------------047mB0EgWMNTMUbLnM3IW1xb-- --------------2vS0rMHK9Eyf1hosjmAJ5sjR-- --------------ox7uA8RfE1QKRJaXx6iIgCO3 Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEhRJncuj2BJSl0Jf3sN6d1ii/Ey8FAmPiPA0FAwAAAAAACgkQsN6d1ii/Ey8W Fgf9F4H8lb1SjOG/Vc5fG1QBEc17Y6J1Ok/egN5GjHdp+pA4U4a55RaknccDrAxN2rJlmZYtjPGO uWqjrrh+l0zFprd3JIDxwXS1d4RSAg+sBOnPh/ZEd6oVnXBjlIC7qhioU/7RxIp72yOamnXbKeJR Uo8UHaesVvzdZgxaZg1mq28QCokK8PdV8y0r+SHLRhteKMOn+nHOm2z30cH0tZJkoIY/BGIDKbqe fWfnONgtduI7vmrA410isw0qAYtseXs6AbIHF+X91RPOvhAf1OWtK2Z28vwnjM5kNkwBQzEpkX97 BKvjmyHXMRIdUriedJemlfwrlv9VrXTaW7HVKpzF9Q== =YTID -----END PGP SIGNATURE----- --------------ox7uA8RfE1QKRJaXx6iIgCO3--