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 43C79C47089 for ; Sat, 3 Dec 2022 02:20:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234701AbiLCCUw (ORCPT ); Fri, 2 Dec 2022 21:20:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234973AbiLCCUv (ORCPT ); Fri, 2 Dec 2022 21:20:51 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FF90AB2DE for ; Fri, 2 Dec 2022 18:20:50 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id z14so2610462pfr.11 for ; Fri, 02 Dec 2022 18:20:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=pdj4rQnZt3ghY0JYsDbW8G29zmubdAJq8qnfUhP1bDw=; b=gsBDlFYIA6+ssXAuRQnSCJpEb8pM4SDnpeDeLeFetrTCxdejKvNiZg4cCs8RzVeSVR aCDxlveDMDqzJ0/uwkJSoqvEnryHxT4HvfWZkKCjiqK9uowsLom9/PdT5VLwDe7XrNm0 QZiu0h6AvVRpdlpM9Nd8QSrYGdi9ypFGXRNzQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pdj4rQnZt3ghY0JYsDbW8G29zmubdAJq8qnfUhP1bDw=; b=y2rxbuKxxBwygQys+dz3mIsT1dLSGVvqrP0RW2jXgezG0RYmKoCp/d7uNm0pSl764X Zwp8JFUoHOvKmSUX8aNCCqpZ6c0Q22Rg6uyoZybGqH8VrguvfyREm9xpYtULzfUliQiD PbRZKlAX3kCtU179DX9gLvQDuHBFNrn16u4XErZ886NVYGXE1U/A6j7JkHJCuuzavdji mQmbaEeSCg1kQEGXKqgZd6JSL1GHuj9Rbp/LNj5aR4Pkp6trCq459e9Udal+/1hAkqoa sJQrpC7eHEV7cyXM2HD2Xz7vt/f4Zf7TEle5BzboamkxIfYKg6av6P6d1j/jgP1a8Nou oniQ== X-Gm-Message-State: ANoB5plRLDHeDdZj2Ef5shD/qZXyjOBoUxjDdODr/18MThoumHWT8loS tYyFIEndb800we904KYlOlEj1A== X-Google-Smtp-Source: AA0mqf4mF13JhpORx1pjJYPRNcogO+X7Oh29vGm+VcX+eNni2cgUCbmjN8FPxQdYEN/m921aEDZQ9A== X-Received: by 2002:a62:5b43:0:b0:573:6cfc:2210 with SMTP id p64-20020a625b43000000b005736cfc2210mr57434898pfb.55.1670034049745; Fri, 02 Dec 2022 18:20:49 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z19-20020aa79493000000b00576670cc170sm1903619pfk.93.2022.12.02.18.20.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 18:20:49 -0800 (PST) Date: Fri, 2 Dec 2022 18:20:48 -0800 From: Kees Cook To: Rick Edgecombe Cc: x86@kernel.org, "H . Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H . J . Lu" , Jann Horn , Jonathan Corbet , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , Weijiang Yang , "Kirill A . Shutemov" , John Allen , kcc@google.com, eranian@google.com, rppt@kernel.org, jamorris@linux.microsoft.com, dethoma@microsoft.com, akpm@linux-foundation.org, Andrew.Cooper3@citrix.com, christina.schimpe@intel.com, Yu-cheng Yu Subject: Re: [PATCH v4 02/39] x86/shstk: Add Kconfig option for Shadow Stack Message-ID: <202212021820.72F8CAE9E@keescook> References: <20221203003606.6838-1-rick.p.edgecombe@intel.com> <20221203003606.6838-3-rick.p.edgecombe@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221203003606.6838-3-rick.p.edgecombe@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org On Fri, Dec 02, 2022 at 04:35:29PM -0800, Rick Edgecombe wrote: > From: Yu-cheng Yu > > Shadow Stack provides protection for applications against function return > address corruption. It is active when the processor supports it, the > kernel has CONFIG_X86_SHADOW_STACK enabled, and the application is built > for the feature. This is only implemented for the 64-bit kernel. When it > is enabled, legacy non-Shadow Stack applications continue to work, but > without protection. > > Since there is another feature that utilizes CET (Kernel IBT) that will > share implementation with Shadow Stacks, create CONFIG_CET to signify > that at least one CET feature is configured. > > Tested-by: Pengfei Xu > Tested-by: John Allen > Signed-off-by: Yu-cheng Yu Reviewed-by: Kees Cook -- Kees Cook