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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BEACC433F5 for ; Sun, 6 Feb 2022 13:19:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7B21F6B0071; Sun, 6 Feb 2022 08:19:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 762006B0072; Sun, 6 Feb 2022 08:19:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 62A686B0073; Sun, 6 Feb 2022 08:19:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0057.hostedemail.com [216.40.44.57]) by kanga.kvack.org (Postfix) with ESMTP id 4FD456B0071 for ; Sun, 6 Feb 2022 08:19:42 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 03B77181BCDA2 for ; Sun, 6 Feb 2022 13:19:42 +0000 (UTC) X-FDA: 79112412204.09.3B2224E Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) by imf12.hostedemail.com (Postfix) with ESMTP id B289440003 for ; Sun, 6 Feb 2022 13:19:41 +0000 (UTC) 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-Rspam-User: nil X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: B289440003 X-Stat-Signature: ueofux76x9gi975ztwmew9f1s49dnk53 Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=infradead.org header.s=desiato.20200630 header.b=POsbBsdf; spf=none (imf12.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.92.199) smtp.mailfrom=peterz@infradead.org; dmarc=none X-HE-Tag: 1644153581-788876 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 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.