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 C805FC433E0 for ; Wed, 24 Feb 2021 19:42:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 674F064EF1 for ; Wed, 24 Feb 2021 19:42:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234326AbhBXTms (ORCPT ); Wed, 24 Feb 2021 14:42:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234302AbhBXTmr (ORCPT ); Wed, 24 Feb 2021 14:42:47 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A083DC061574; Wed, 24 Feb 2021 11:42:07 -0800 (PST) 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: Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org 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