From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02FB2C433E0 for ; Wed, 24 Feb 2021 19:43:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 40A6764EF1 for ; Wed, 24 Feb 2021 19:43:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40A6764EF1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5D9C66B0005; Wed, 24 Feb 2021 14:43:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 563866B0006; Wed, 24 Feb 2021 14:43:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 42B2B6B006C; Wed, 24 Feb 2021 14:43:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0087.hostedemail.com [216.40.44.87]) by kanga.kvack.org (Postfix) with ESMTP id 2B3286B0005 for ; Wed, 24 Feb 2021 14:43:50 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E2E788019952 for ; Wed, 24 Feb 2021 19:43:49 +0000 (UTC) X-FDA: 77854186578.28.C3750A5 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by imf22.hostedemail.com (Postfix) with ESMTP id 315D4C0007C7 for ; Wed, 24 Feb 2021 19:43:46 +0000 (UTC) Received: from zn.tnic (p200300ec2f0d180087c1c74682a645c2.dip0.t-ipconnect.de [IPv6:2003:ec:2f0d:1800:87c1:c746:82a6:45c2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id F109E1EC0328; Wed, 24 Feb 2021 20:42:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1614195726; 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: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=9ezgUQlQbbX7408pbcJrxnn71TdUJUjIpNkknyJCDRw=; b=VnSrIXBlqTORmrkgznFXrhpvc+CB1vlkNwYoJMdpewn99QaGbXEvOBOK/lD/XS+//KalF3 c5zTEwyImAn3425u7nHBNlLBjwHhiHsMhAQYE1oG76/9ve5NBLA6qumhCn4GNT7MOfmydT zHNMzYp6o5Qbh5hqT78fY22+8M/YJ5g= Date: Wed, 24 Feb 2021 20:42:04 +0100 From: Borislav Petkov To: Andy Lutomirski Cc: "Yu, Yu-cheng" , X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , LKML , "open list:DOCUMENTATION" , Linux-MM , linux-arch , Linux API , Arnd Bergmann , Balbir Singh , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , Weijiang Yang , Pengfei Xu , Haitao Huang , Michael Kerrisk Subject: Re: [PATCH v21 06/26] x86/cet: Add control-protection fault handler Message-ID: <20210224194204.GI20344@zn.tnic> References: <20210217222730.15819-1-yu-cheng.yu@intel.com> <20210217222730.15819-7-yu-cheng.yu@intel.com> <20210224161343.GE20344@zn.tnic> <32ac05ef-b50b-c947-095d-bc31a42947a3@intel.com> <20210224165332.GF20344@zn.tnic> <20210224192044.GH20344@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 315D4C0007C7 X-Stat-Signature: crqjycyashh6qjwzsakqiifgzh8jgain Received-SPF: none (alien8.de>: No applicable sender policy available) receiver=imf22; identity=mailfrom; envelope-from=""; helo=mail.skyhub.de; client-ip=5.9.137.197 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614195826-992932 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Feb 24, 2021 at 11:30:34AM -0800, Andy Lutomirski wrote: > On Wed, Feb 24, 2021 at 11:20 AM Borislav Petkov wrote: > > > > On Wed, Feb 24, 2021 at 09:56:13AM -0800, Yu, Yu-cheng wrote: > > > No. Maybe I am doing too much. The GP fault sets si_addr to zero, for > > > example. So maybe do the same here? > > > > No, you're looking at this from the wrong angle. This is going to be > > user-visible and the moment it gets upstream, it is cast in stone. > > > > So the whole use case of what luserspace needs to do or is going to do > > or wants to do on a SEGV_CPERR, needs to be described, agreed upon by > > people etc before it goes out. And thus clarified whether the address > > gets copied out or not. > > I vote 0. The address is in ucontext->gregs[REG_RIP] [0] regardless. > Why do we need to stick a copy somewhere else? > > [0] or however it's spelled. i can never remember. Fine with me. Let's have this documented in the manpage and then we can move forward with this. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette