From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751274AbdKLXwB (ORCPT ); Sun, 12 Nov 2017 18:52:01 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:47220 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750961AbdKLXv7 (ORCPT ); Sun, 12 Nov 2017 18:51:59 -0500 Subject: Re: [RFC PATCH v2] Fix: x86: Add missing core serializing instruction on migration From: Benjamin Herrenschmidt Reply-To: benh@au1.ibm.com To: Mathieu Desnoyers , Andy Lutomirski , Peter Zijlstra , "H. Peter Anvin" Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.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@kernel.org, linux-arch@vger.kernel.org, stable@kernel.org Date: Mon, 13 Nov 2017 10:51:47 +1100 In-Reply-To: <1510529164.12797.41.camel@kernel.crashing.org> References: <20171111150357.26072-1-mathieu.desnoyers@efficios.com> <1510529164.12797.41.camel@kernel.crashing.org> Organization: IBM Australia Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.6 (3.24.6-1.fc26) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17111223-0020-0000-0000-000003CB7322 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17111223-0021-0000-0000-000042609B37 Message-Id: <1510530707.12797.42.camel@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-12_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711120341 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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.