From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [RFC PATCH v2] Fix: x86: Add missing core serializing instruction on migration Date: Mon, 13 Nov 2017 10:51:47 +1100 Message-ID: <1510530707.12797.42.camel@au1.ibm.com> References: <20171111150357.26072-1-mathieu.desnoyers@efficios.com> <1510529164.12797.41.camel@kernel.crashing.org> Reply-To: benh-8fk3Idey6ehBDgjK7y7TUQ@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1510529164.12797.41.camel-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Mathieu Desnoyers , Andy Lutomirski , Peter Zijlstra , "H. Peter Anvin" Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "Paul E . McKenney" , Boqun Feng , Andrew Hunter , Maged Michael , Avi Kivity , Paul Mackerras , Michael Ellerman , Dave Watson , Thomas Gleixner , Ingo Molnar , Andrea Parri , Russell King , Greg Hackmann , Will Deacon , David Sehr , Linus Torvalds , x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org List-Id: linux-api@vger.kernel.org On Mon, 2017-11-13 at 10:26 +1100, Benjamin Herrenschmidt wrote: > On Sat, 2017-11-11 at 10:03 -0500, Mathieu Desnoyers wrote: > > x86 has a missing core serializing instruction in migration scenarios. > > > > Given that x86-32 can return to user-space with sysexit, and x86-64 > > through sysretq and sysretl, which are not core serializing, the > > following user-space self-modifiying code (JIT) scenario can occur: > > Is this about load/store consistency ? In this case, don't you also > have problems with get/put_user and not just going to userspace ? Ah forget it, I saw Linus earlier messages. Cheers, Ben.