Re: [RFC PATCH v2] Fix: x86: Add missing core serializing instruction on migration

2017-11-12 Thread Benjamin Herrenschmidt
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

Re: [RFC PATCH v2] Fix: x86: Add missing core serializing instruction on migration

2017-11-12 Thread Benjamin Herrenschmidt
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 sel

Re: [RFC PATCH v2] Fix: x86: Add missing core serializing instruction on migration

2017-11-11 Thread Mathieu Desnoyers
Fixing the sta...@kernel.org CC. - On Nov 11, 2017, at 10:03 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com 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 sys

[RFC PATCH v2] Fix: x86: Add missing core serializing instruction on migration

2017-11-11 Thread Mathieu Desnoyers
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: CPU 0