Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3574364ybl; Fri, 20 Dec 2019 11:36:55 -0800 (PST) X-Google-Smtp-Source: APXvYqw+BHmDoGAWMvh5rXXHFK85jRH8Uj1/4kVgayHtizTLwgDXM7e4Zs1AOnbNpFH2bqBc6FFo X-Received: by 2002:a05:6830:3c3:: with SMTP id p3mr1880268otc.146.1576870615482; Fri, 20 Dec 2019 11:36:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576870615; cv=none; d=google.com; s=arc-20160816; b=pV1oAJleH3iB6+7/3BFirCL1sd0Mic7gVKNSADnkp0v+JQl/jcsIHQIh4l+ovRs86Y Q27IXGIeMUbiF7ZcrQbR6+riBr4wKnuQEt6c60kJK4mT1j5l8knXDlSW/WMFplNm7Pdy 3w0R567PjCDrF6ZJZdW7PpBQC/lnFVu4EHQk9FKpV/nWsy5pnGlX3rMs68w/oUhCE7iI qKmp2GC9Sramlvf2WGuThJrtztsXotka2yeMapHIbK1L9auEu5q2qdcUpMf26aAKC7kW jQl2j//SzEvNTMmvofzsz63dnKVgGVWLOCR2pSmeykIt7yvxM/rL45rByEJwG5eDvSFp ATPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0w7BdpFfq1sQvJ5pJAS7Ef9KsGQfYtQlP4zXMnJdaQY=; b=mDK0h2bDylpdzlAEUlUFtfMECdMUEVNqFytTrtq8VvrQw3KJxCEQhkZeBtM9qoH33t 29RE7nh2QzlGq7ylmE06gWpxBqN8cIN6a7FZZqwGYUjFeiwi58lQf9/0/qEHee4bqwt4 gWD1UzAtXu0OrmeBnCUlCrDKA2MUIOOQqxlVsWsYtovvbYdqBcIYGFu3mfs7177Ik1le VyP1FnScImGVg1Zbr/TJl44PrNfD3nucdlivxNt02j4Sfea5AZwnsT2+BnC57d2TefNx C4v9075Pj5xF7nPyOkNo2Dd5rK4e2BCAQOIpBWqPichsz14HF0qfzf+zRrxYznpR/iv8 4X3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Vs5/CCNl"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y198si5449637oia.163.2019.12.20.11.36.42; Fri, 20 Dec 2019 11:36:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Vs5/CCNl"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727507AbfLTTgC (ORCPT + 99 others); Fri, 20 Dec 2019 14:36:02 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:42445 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727413AbfLTTgB (ORCPT ); Fri, 20 Dec 2019 14:36:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576870559; h=from:from:reply-to:subject:subject: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=0w7BdpFfq1sQvJ5pJAS7Ef9KsGQfYtQlP4zXMnJdaQY=; b=Vs5/CCNlyjFmfpvoWzUFW8DVCTiKOmRXkQjrgNhkdaroOxh/wSJ6wSrsfLiYGjnYzTSD7K lWidjBEJ0dJu0RMk4YrQ+H1fRA+ZX26mCKQtsHGNltRms64hH+b7mh2EWDyv8SuJYo1hcf NHHQg0vnf0F+DwgiLjebDX7TjSra+Tw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-265-1oiERg97PtSBy0Z3cBMOZA-1; Fri, 20 Dec 2019 14:35:55 -0500 X-MC-Unique: 1oiERg97PtSBy0Z3cBMOZA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0BD7C1081BFB; Fri, 20 Dec 2019 19:35:54 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (ovpn-204-70.brq.redhat.com [10.40.204.70]) by smtp.corp.redhat.com (Postfix) with SMTP id 664CC5DA2C; Fri, 20 Dec 2019 19:35:45 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Fri, 20 Dec 2019 20:35:52 +0100 (CET) Date: Fri, 20 Dec 2019 20:35:44 +0100 From: Oleg Nesterov To: Brian Gerst Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , "H . Peter Anvin" , Andy Lutomirski , Boris Ostrovsky Subject: Re: [PATCH] x86: Remove force_iret() Message-ID: <20191220193543.GD13464@redhat.com> References: <20191219115812.102620-1-brgerst@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191219115812.102620-1-brgerst@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/19, Brian Gerst wrote: > > force_iret() was originally intended to prevent the return to user mode with > the SYSRET or SYSEXIT instructions, in cases where the register state could > have been changed to be incompatible with those instructions. The entry code > has been significantly reworked since then, and register state is validated > before SYSRET or SYSEXIT are used. force_iret() no longer serves its original > purpose and can be eliminated. Plus iiuc today force_iret() == set_thread_flag(TIF_NOTIFY_RESUME) simply has no effect on asm paths. Acked-by: Oleg Nesterov