Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp100157pxb; Mon, 7 Feb 2022 07:12:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/B1vZEey6jrdJn7OUIQ99cI1AC2aIq35y7ozPEtGPPL0uSAHwr1ry5IUCC999Ucq8PGtx X-Received: by 2002:a50:a6d3:: with SMTP id f19mr10718812edc.148.1644246759173; Mon, 07 Feb 2022 07:12:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644246759; cv=none; d=google.com; s=arc-20160816; b=quupuv6x0BsjqAv5bNpOtmmmK2gblUHC34HZv+hSrwlc/SIDqrk1MRkY78BUVwK2Am o1MOfzwBZP+zyIEmqIacsD0boS6SczZ7Kj81Iz5Q3dG9m2CYy5JWsLMJafgADFq/Zfx5 Jo4qrsJBymCqWLQobbRNvKxD/KgITH4kuhXiBDU/GDfz4+QokJW8OjYwlsKj/eVnB/Bv 71oofK4TkIqHojLiBAO/7KmqscYr2+R2nSxpABmjP/1SfC2QbPc6b8Vo4Gf1ytHRUlSg lkITg2v8r8Hg1nvAP4buvm/oBx6x2QP4DydYmhzYybeqmYQ4IpZdfZdsgjmRsgY9SOAV V8jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VZNTySQNOEJV6cg8aeFhpGWvoK8qXx/LSgdAWKilKGg=; b=lPcTTnqvs6Cu1bQ2ommoaWTWaX/1JEwOTfTTcs5tLa9EENncHZE1Eee+nAnaMtLzmF b1OG89OzNz+KWmIICf+07oTXIgcGoYYGjCKdCF1VqU4JX9vARSJDVUnsh6+a2VTd69eU XDfo3IApEfJjSrczpSKR71tTyaN4vJnazqXErx0UKOfTH8EGE191od9OAz/zGAUQVx+6 lnRUi2pX+iNsZxbo68R7dVWKvzSqW8osz7VShYJcMLPhLzaUGdlKDe83gfRH8/e+RFhX BZsIczbXJDqrPQCALjawd6LXmAnrByDLlYfs78aMM+VkOql/GvElVedp/7ySwlcZv+RS 7/Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=POsbBsdf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d4si1715979edv.613.2022.02.07.07.12.13; Mon, 07 Feb 2022 07:12:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=POsbBsdf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239127AbiBFNUI (ORCPT + 99 others); Sun, 6 Feb 2022 08:20:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236136AbiBFNUH (ORCPT ); Sun, 6 Feb 2022 08:20:07 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AAE6C06173B; Sun, 6 Feb 2022 05:20:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=VZNTySQNOEJV6cg8aeFhpGWvoK8qXx/LSgdAWKilKGg=; b=POsbBsdfqCpbbBE0cZsLonbq5E 6LY/eZpph1oztJdK37sbbD8H0+NL6Zfsj1etmucw3QP0K6935G5RyKtkFEG2dcF2EK36HSg2OL4+7 HK6vmx1MBYwjNQDJe5To01TxMc7AWlRhwt7ncOTpOq56T6li9Mh6i7l8PKPFJTZvc1KzYKJVevJU3 ySm/d0yi8usPXN3jEhtkrCcg+7D066l1eh17QUoDw9JZ/xP93sNIPZwiQPNfta2umwOF70UYzwBuH /SkMo9VsD/t1hQiI9BUp1gQWDw3unofdzSVO814HXLUUdiSil2ozFGO12znOHQqSjeHHesG7T86Si fO3ZLUDg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nGhRi-007QWu-BE; Sun, 06 Feb 2022 13:19:16 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E94303002C3; Sun, 6 Feb 2022 14:19:12 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CB55C2CA50E00; Sun, 6 Feb 2022 14:19:12 +0100 (CET) Date: Sun, 6 Feb 2022 14:19:12 +0100 From: Peter Zijlstra To: "H.J. Lu" Cc: "Edgecombe, Rick P" , "David.Laight@aculab.com" , "bsingharora@gmail.com" , "hpa@zytor.com" , "Syromiatnikov, Eugene" , "rdunlap@infradead.org" , "keescook@chromium.org" , "Eranian, Stephane" , "kirill.shutemov@linux.intel.com" , "dave.hansen@linux.intel.com" , "linux-mm@kvack.org" , "fweimer@redhat.com" , "nadav.amit@gmail.com" , "jannh@google.com" , "kcc@google.com" , "linux-arch@vger.kernel.org" , "pavel@ucw.cz" , "oleg@redhat.com" , "Yang, Weijiang" , "Lutomirski, Andy" , "bp@alien8.de" , "arnd@arndb.de" , "Moreira, Joao" , "tglx@linutronix.de" , "mike.kravetz@oracle.com" , "x86@kernel.org" , "linux-doc@vger.kernel.org" , "Dave.Martin@arm.com" , "john.allen@amd.com" , "mingo@redhat.com" , "Shankar, Ravi V" , "corbet@lwn.net" , "linux-kernel@vger.kernel.org" , "linux-api@vger.kernel.org" , "gorcunov@gmail.com" Subject: Re: [PATCH 00/35] Shadow stacks for userspace Message-ID: References: <87fsozek0j.ffs@tglx> <3421da7fc8474b6db0e265b20ffd28d0@AcuMS.aculab.com> <9f948745435c4c9273131146d50fe6f328b91a78.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 05, 2022 at 12:21:12PM -0800, H.J. Lu wrote: > setjmp/longjmp work on the same sigjmp_buf. Shadow stack pointer > is saved and restored, just like any other callee-saved registers. How is having that shadow stack pointer in user-writable memory not a problem? That seems like a prime target to subvert the whole shadow stack machinery.