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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71BC6C433EF for ; Sun, 6 Feb 2022 13:20:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231955AbiBFNUI (ORCPT ); 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: 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.