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 38792C4332F for ; Fri, 14 Oct 2022 19:44:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231416AbiJNTot (ORCPT ); Fri, 14 Oct 2022 15:44:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231410AbiJNTor (ORCPT ); Fri, 14 Oct 2022 15:44:47 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25E012BEE; Fri, 14 Oct 2022 12:44:40 -0700 (PDT) Received: from zn.tnic (p200300ea9733e7ed329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e7ed:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 936011EC0745; Fri, 14 Oct 2022 21:44:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1665776674; 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: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=/V95RNDyG4C0aXVPfYmbPIz3FOBoOTs+eKl5UB9vPKs=; b=CH3Dw0F6sUBootIDepy8xu8SZlUqfyEbs1sZrwlg3E7dKOz34Nr41iAjSyzAvqEtP6IfFj H+Hv4B1TcCVGKnzMjTjy0r+KM7Pq05/PjJWMKOrsBw7qD+sz+QE1gmondjrULUrTc/BDJn ly1DXRZkoOd6GwlsHRLdAYjL+jHXVJE= Date: Fri, 14 Oct 2022 21:44:34 +0200 From: Borislav Petkov To: "Edgecombe, Rick P" Cc: "bsingharora@gmail.com" , "hpa@zytor.com" , "Syromiatnikov, Eugene" , "peterz@infradead.org" , "rdunlap@infradead.org" , "keescook@chromium.org" , "Yu, Yu-cheng" , "dave.hansen@linux.intel.com" , "kirill.shutemov@linux.intel.com" , "Eranian, Stephane" , "linux-mm@kvack.org" , "fweimer@redhat.com" , "nadav.amit@gmail.com" , "jannh@google.com" , "dethoma@microsoft.com" , "linux-arch@vger.kernel.org" , "kcc@google.com" , "pavel@ucw.cz" , "oleg@redhat.com" , "hjl.tools@gmail.com" , "linux-doc@vger.kernel.org" , "Lutomirski, Andy" , "arnd@arndb.de" , "jamorris@linux.microsoft.com" , "Moreira, Joao" , "tglx@linutronix.de" , "mike.kravetz@oracle.com" , "x86@kernel.org" , "Yang, Weijiang" , "john.allen@amd.com" , "rppt@kernel.org" , "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 v2 04/39] x86/cpufeatures: Enable CET CR4 bit for shadow stack Message-ID: References: <20220929222936.14584-1-rick.p.edgecombe@intel.com> <20220929222936.14584-5-rick.p.edgecombe@intel.com> <1f9e89ae13b49ffbcc947bf6bdee0303387c5cd4.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1f9e89ae13b49ffbcc947bf6bdee0303387c5cd4.camel@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Fri, Oct 14, 2022 at 06:15:30PM +0000, Edgecombe, Rick P wrote: > Andrew Cooper has suggested to create some software cpu features to > differentiate user/supervisor CET feature use. It could replace > HAS_KERNEL_IBT. Any objections to that versus Kconfig symbols? Sure, except you can't use them in arch/x86/include/asm/idtentry.h:8:#define IDT_ALIGN (8 * (1 + HAS_KERNEL_IBT)) as that gets used in asm code. But you don't have to do this in this patchset - it is huge already anyway. I have this thing on my todo so I'll get to it eventually. Unless you're itching to remove it yourself - then I won't stay in the way. :-) Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette