Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26597591rwd; Mon, 3 Jul 2023 11:57:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlHogJhQYU7osNwDOdOopcDTFTIQM+L8vSIeAgNzkPUM2nhvy8FoiFTm25Er3+k1tQVW+3kV X-Received: by 2002:a17:90a:7482:b0:263:484e:f625 with SMTP id p2-20020a17090a748200b00263484ef625mr9069772pjk.26.1688410631633; Mon, 03 Jul 2023 11:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688410631; cv=none; d=google.com; s=arc-20160816; b=Tgq3hAbvZ5tjdno7kOZY8uhk+4xvyEwrSAo8VwpsJyTXgRftafKg+7ldO1OfIIq9sV TDGCcvdQMh+/eJTBHoSdKBKrDQ76UdSVS6VO1BqjwtGkXfgEP3ei3U7cpvm9ubx5LwDI RgxKRAy4V3pv2Qy3IMMHycWKguNp6XqrW0YSirYS9Kv/kf1dc0uB0+Io9bKttmV9Kife ndUtwiJwhHRE3YROSQ2BUjkc0LCBgFJShDDMVvZwDCXUAo1IIdBrxKSR66i/kdQVddyu MOvZzTMd0Mp6q2zHIQhkGhm3z+BePxdrWiSXNj2UQK/xqNLLFQyGjd/FEUJpmlN3r1kS u0Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=fGW3b/q8l7CXKgcfZ4b/QVlRua/Of3iP83P5k+7J+8o=; fh=R6VQ8Nr+33tXdou28YdxN7o4usH2hXzQBt2iV+tk80E=; b=TYcMe01s+Yk+CpSLGzLw9UY4m70P9XXyCoELMN5uLgyI9s6m/CQLJe/MCStBSk5A2w XoFypbF92X/AQl1mqK0/hKpiudzXkQAB+IGYWAh56y4W7jxwtC/3Y2OsI39ZxTnhptRE aZlPvUPd2+Dw8fbKpMs22dhfceRRKupxEBgSOedL6RsYuiwJvDUjyUDPnotIfYdTWOJ/ duRKC3PbMZZfJDabHPpWQ9zFtQYuVDBGns0O5C7bPUf4ifrgKQhKqjGyipuHOMaF2WtM /YtixqLxX4sUO/G32sUpTpekxz/EFY6EIJgYg62qblPWk0Oq7QJLIlsdv83CQg2bRdDn /XRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=H0nJ7ZzG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t12-20020a17090a5d8c00b00259b7a03125si18338260pji.29.2023.07.03.11.56.56; Mon, 03 Jul 2023 11:57:11 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=H0nJ7ZzG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230295AbjGCSu1 (ORCPT + 99 others); Mon, 3 Jul 2023 14:50:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229943AbjGCSuX (ORCPT ); Mon, 3 Jul 2023 14:50:23 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE6E3E6A for ; Mon, 3 Jul 2023 11:49:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688410177; 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: in-reply-to:in-reply-to:references:references; bh=fGW3b/q8l7CXKgcfZ4b/QVlRua/Of3iP83P5k+7J+8o=; b=H0nJ7ZzG8mC2qwqEtdnpTFdmPpByjqY1SPJfS5y/v/ADBXeBHZJ3rgoZKy4Nz7s0iIUK+k 7q+TLBUFJIrBLbLouHz8OQlhtTim5HLDiHmLdFqkB+Qc0oet/5IuxXTBl1AXDDbfw34SoY XdmDo+ziv0LWQ6mvRBcempCo8n2x4jo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-205-P1gDR9jLN9GbuzEdR1I4Vw-1; Mon, 03 Jul 2023 14:49:30 -0400 X-MC-Unique: P1gDR9jLN9GbuzEdR1I4Vw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DB61F185A791; Mon, 3 Jul 2023 18:49:28 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8AD7DC00049; Mon, 3 Jul 2023 18:49:19 +0000 (UTC) From: Florian Weimer To: szabolcs.nagy@arm.com Cc: "Edgecombe, Rick P" , "Lutomirski, Andy" , "Xu, Pengfei" , "tglx@linutronix.de" , "linux-arch@vger.kernel.org" , "kcc@google.com" , "nadav.amit@gmail.com" , "kirill.shutemov@linux.intel.com" , "david@redhat.com" , "Schimpe, Christina" , "akpm@linux-foundation.org" , "peterz@infradead.org" , "corbet@lwn.net" , "nd@arm.com" , "broonie@kernel.org" , "jannh@google.com" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "debug@rivosinc.com" , "bp@alien8.de" , "rdunlap@infradead.org" , "linux-api@vger.kernel.org" , "rppt@kernel.org" , "jamorris@linux.microsoft.com" , "pavel@ucw.cz" , "john.allen@amd.com" , "bsingharora@gmail.com" , "mike.kravetz@oracle.com" , "dethoma@microsoft.com" , "andrew.cooper3@citrix.com" , "oleg@redhat.com" , "keescook@chromium.org" , "gorcunov@gmail.com" , "arnd@arndb.de" , "Yu, Yu-cheng" , "hpa@zytor.com" , "mingo@redhat.com" , "hjl.tools@gmail.com" , "linux-mm@kvack.org" , "Syromiatnikov, Eugene" , "Yang, Weijiang" , "linux-doc@vger.kernel.org" , "dave.hansen@linux.intel.com" , "Torvalds, Linus" , "Eranian, Stephane" Subject: Re: [PATCH v9 23/42] Documentation/x86: Add CET shadow stack description References: <1cd67ae45fc379fd82d2745190e4caf74e67499e.camel@intel.com> Date: Mon, 03 Jul 2023 20:49:17 +0200 In-Reply-To: (szabolcs's message of "Mon, 3 Jul 2023 19:19:00 +0100") Message-ID: <87r0pox236.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 * szabolcs: >> alt shadow stack cannot be transparent to existing software anyway, it > > maybe not in glibc, but a libc can internally use alt shadow stack > in sigaltstack instead of exposing a separate sigaltshadowstack api. > (this is what a strict posix conform implementation has to do to > support shadow stacks), leaking shadow stacks is not a correctness > issue unless it prevents the program working (the shadow stack for > the main thread likely wastes more memory than all the alt stack > leaks. if the leaks become dominant in a thread the sigaltstack > libc api can just fail). It should be possible in theory to carve out pages from sigaltstack and push a shadow stack page and a guard page as part of the signal frame. As far as I understand it, the signal frame layout is not ABI, so it's possible to hide arbitrary stuff in it. I'm just saying that it looks possible, not that it's a good idea. Perhaps that's not realistic with 64K pages, though. Thanks, Florian