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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 72F8AC433F5 for ; Fri, 6 May 2022 00:01:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DG6YQU5P1GbBk8RACuLRFCqUkyXuEJkreuiRu0DzI8o=; b=gQ7uwn3e3YSs5J hKtzz62jpF+eooWNYcBHd/u5YGh6K4Q5eIIR3mW5pSo6HmAm3FRnr5cqtkd1u4ny0bI9LiNWSsuaO sp8VjHedtQicncIXcYhrXcfty07AIV3D1giLAFjwPIdndPkG4XT/LlwTqslkhB9B13aafgedylTN4 jFIDLq3veM36vyTgAcS3cM7oO8KgoK37jNBxzysuDIrjh1VQeyukAYID1vg43TTJmVxlsqDdaHZ9O 1gmTo7SXWhS19K1Vld7oaqxoJgPcaisODOzH6BV6FVsFXZ6cGd0Rms0x/w2ti4Hs59oVNwplLgPF8 fGerzVgd4r5YscZYQTTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmlOq-000az3-K8; Fri, 06 May 2022 00:00:48 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmlOn-000ax6-6m for linux-arm-kernel@lists.infradead.org; Fri, 06 May 2022 00:00:46 +0000 Received: by mail-pg1-x52b.google.com with SMTP id 7so4803581pga.12 for ; Thu, 05 May 2022 17:00:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yi0vZqfMo1PpTsCpkbG17Qln/k22pG37Irnt79yUuK4=; b=EmZr2xWFTQRpN4yVfX5wcGF/5Mqz2mowTN4LNK4TVfErId61oxAV+xnLginwrGv+Hf 8P6VODKZp9HM0r9Iz3nAkIkA3CDwCqASFLHhD4TEDreZuTVKcOwaUfcVA1STzb/frL73 Hj/8S8s05Imx8C6BEGIynEBY8hgGrBJ6mNk/s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=yi0vZqfMo1PpTsCpkbG17Qln/k22pG37Irnt79yUuK4=; b=Ty0Vj6s+qV1qFAWONuvdXthTu8PFAdqB0O6OyGIjZEinwICEB2tOumtf6IbE3G4B/8 gEAR5mM6NNKYCH+2LqSxym289LZ4HhLZwg0b3pfbtD6Xsl88WFQl8FLfjVaWGCcVgVMQ NGTaCLMALDM2iKSh8LZBGBZY3pwANPPhcX3I4Axo6gkZJjgJGoYkUqaLsLzEDW9ggAWh 8PZ7S9voTxJhVfNyu4xaeBtZIQ89k2UJSoizLzheAioWyKPNraNZ2Ll4RpQWgj4SogZC gjfiqMkTaaSo982+z2gw78JQF++FXjBdVxQJqR+UFF16/YwyavGFSm7hbN24NxH07KmR llHQ== X-Gm-Message-State: AOAM532Gstcgw97ZQyruWyKPwmyb/goZ0KQDZ7Hax9wCKgqEaT3GH/9T ytC2sDKZyuqsFcdynNI0aIe9JA== X-Google-Smtp-Source: ABdhPJxkOP5NgSvyLGm7VNcJ/SUUNNjt0kvSKrw0yPxOPnaBgGsD9Cwo14kWGtCgNWkO7ZmNwigY3w== X-Received: by 2002:a63:f441:0:b0:3c2:7845:976 with SMTP id p1-20020a63f441000000b003c278450976mr551087pgk.194.1651795238133; Thu, 05 May 2022 17:00:38 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id em24-20020a17090b015800b001cd4989fedfsm5831722pjb.43.2022.05.05.17.00.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 17:00:37 -0700 (PDT) Date: Thu, 5 May 2022 17:00:36 -0700 From: Kees Cook To: Ard Biesheuvel Cc: linux-arm-kernel@lists.infradead.org, will@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com, maz@kernel.org, Sami Tolvanen , Fangrui Song , Nick Desaulniers , Dan Li Subject: Re: [RFC PATCH v2 2/3] scs: add support for dynamic shadow call stacks Message-ID: <202205051700.FC0EC12F2A@keescook> References: <20220505161011.1801596-1-ardb@kernel.org> <20220505161011.1801596-3-ardb@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220505161011.1801596-3-ardb@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220505_170045_286356_A7F3D7E5 X-CRM114-Status: GOOD ( 15.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 05, 2022 at 06:10:10PM +0200, Ard Biesheuvel wrote: > In order to allow arches to use code patching to conditionally emit the > shadow stack pushes and pops, rather than always taking the performance > hit even on CPUs that implement alternatives such as stack pointer > authentication on arm64, add a Kconfig symbol that can be set by the > arch to omit the SCS codegen itself, without otherwise affecting how > support code for SCS and compiler options (for register reservation, for > instance) are emitted. > > Also, add a static key and some plumbing to omit the allocation of > shadow call stack for dynamic SCS configurations if SCS is disabled at > runtime. > > Signed-off-by: Ard Biesheuvel Reviewed-by: Kees Cook -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel