From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= Subject: Re: xc_evtchn_status fails with EFAULT on HVM, the same on PV works Date: Thu, 22 Jun 2017 10:23:51 +0200 Message-ID: <20170622082351.GA19759@mail-itl> References: <20170113185922.GL1341@mail-itl> <0c47b88f-4130-a9b8-cf93-89ae03b25dab@citrix.com> <20170113194052.GB18728@mail-itl> <20170113203223.GO1341@mail-itl> <8892ce3d-25b0-338f-986f-c1bddf65ee3d@citrix.com> <20170114025227.GR5268@mail-itl> <587CC80702000078001306CE@prv-mh.provo.novell.com> <20170116230657.GI5268@mail-itl> <69bdbdcd-a285-fe1d-03b5-05fa0654b3e6@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8023235799777873250==" Return-path: In-Reply-To: <69bdbdcd-a285-fe1d-03b5-05fa0654b3e6@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Andrew Cooper Cc: Jan Beulich , xen-devel List-Id: xen-devel@lists.xenproject.org --===============8023235799777873250== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nFreZHaLTZJo0R7j" Content-Disposition: inline --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [resurrecting old thread...] On Mon, Jan 16, 2017 at 11:41:55PM +0000, Andrew Cooper wrote: > On 16/01/2017 23:06, Marek Marczykowski-G=C3=B3recki wrote: > > On Mon, Jan 16, 2017 at 05:17:59AM -0700, Jan Beulich wrote: > >> 2) When the guest issues stac()/clac(), it indicates to Xen _its own_ > >> intended view, without affecting Xen's. That is, as soon as hypervisor > >> context is being entered again, SMAP protection would be in effect > >> again (albeit as per point 1 guarding only against accessing PV guest > >> mappings). > >> > >> So the driver adjustment suggested by Andrew has an effect on only > >> page walks done by Xen during copy_{to,from}_guest(), but not on > >> actual memory accesses. > > Ok, so indeed the kernel patch makes the most sense here. Is the change > > in this shape (if works - I'll test it shortly) good to include > > upstream, or is it "ugly hack"? >=20 > If it works (which I suspect it will), then it will be the correct > proper upstream fix, and will of course CC stable@. Should I submit it? > In the meantime until it percolates into downstream kernels, disabling > SMAP for affected guests is probably the best stopgap solution. How to disable SMAP for selected guests only? --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --nFreZHaLTZJo0R7j Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJZS36XAAoJENuP0xzK19csZFQH+wRmYhkXHvW09Z1fNqYEzgSx W1P9c32oRxl6WEqF8p90Nsvq7WTSKMgb5YYOESKXoj4b7NV4tqcKqBq0MQlVo74i /m48aI4yIM4bZEW5lqmoADF2qU2fr7VTjr5To5xqgbWTae6GTUVwjwIZI4GrjPiC 06SljWLH4PoFD3EwtAxvR/zqaN8f9w/ReWSn6+RHqR/DZA2dfAtfRRvtwYd3P3Rl 0vPpSd86y9XM8pTWTSga/+4DH1yAmuXiX4ah68LF+6SAyl5C1VnXLsJ2ZaPG2B0H tEFt2zgDHn5wjt4k8MzMiLem8ERPbxrQMECUjaMClUsKoD0PkiWHG6/r70JWm1M= =d44S -----END PGP SIGNATURE----- --nFreZHaLTZJo0R7j-- --===============8023235799777873250== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============8023235799777873250==--