Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp170577rdb; Tue, 31 Oct 2023 04:26:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1z/9tbMj5VQ/009r+T6YipGq6hEdxpY/rjvy+bRnOtJe/3kQFEvIgtuMu06FOXV1ZxoT6 X-Received: by 2002:a05:6a21:328a:b0:167:26c4:256d with SMTP id yt10-20020a056a21328a00b0016726c4256dmr2992066pzb.21.1698751602956; Tue, 31 Oct 2023 04:26:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698751602; cv=none; d=google.com; s=arc-20160816; b=Prll8zkEusLVqplQanusYQNUk3hJTlGkZuS1RpzaJFsT2ksFvOzrPaL0vcM2RXLNHk 9WXKAalC6An8J1zkS5K4bvwinfpcyGxXEevAj32VoSuiZpY2ntq1tIiUmajZJ480JqOP sDmXYE4FYqF11inbPo+iMKu9sf0AZmIbLkZSnIR2JPivq03zJ6DfzlaO81ayNwimtglU bmMFxo4e3/vWk5PmB1tT97M8M5PelM3A0z+tLZkwZsqthfbZOn5p4PaZY9zMq+NBQ8Vr R1mRFDSYf4Llx8GZyWjhQDv+BDBWtef3lRCHnGw6Pr3koBxwq9p2up6yLo2OuTm6shTv 0hmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HpQ8ZkAVavcyZf/94v7pvHGWiVGSMkblV18kYeeITcc=; fh=MV4dKlARHTxQuvF3EXQvFGY5en/iqzSLx3Q6Zat4o4w=; b=JD+2l+9HZ9vQrjWCNTAe+SvUmfMzNGIMy0Vp6hzDoDhkWDdnaLti0mXsEL6iVKM4j7 YppfVsbJyueYvhO++6NlPh1if35JSU0NzQpyS1V+G/vpmUz4dS1hKuntT1Y08Vxtzwle GCnFX0nGJ/JUfQ/714Drjcd3gzX/qzUH40MxTwy8NB3zkI/2lRbf4rFTdyjFyQCcRhch A6O+Vggavn1wK4lYRyAYapylc03hsoTDE3331erOxyHQdVDolEVNCBD9nySmlddOqeyS mRh29nYa0LJAlKWOUuJ4ktixEtCvq/W4sLI23dZeY5hZG2sUBKBQVMfLPK9lekzinFuM Itqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=AdR6KpbX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id o15-20020a65614f000000b005b96dd10898si904317pgv.249.2023.10.31.04.26.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 04:26:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=AdR6KpbX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 606518023987; Tue, 31 Oct 2023 04:26:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235304AbjJaL0a (ORCPT + 99 others); Tue, 31 Oct 2023 07:26:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235017AbjJaL03 (ORCPT ); Tue, 31 Oct 2023 07:26:29 -0400 Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C000B97; Tue, 31 Oct 2023 04:26:26 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 882F840E0199; Tue, 31 Oct 2023 11:26:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id PEu3gr-Fzv-u; Tue, 31 Oct 2023 11:26:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1698751580; bh=HpQ8ZkAVavcyZf/94v7pvHGWiVGSMkblV18kYeeITcc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AdR6KpbXenVdYcGY0s5/zFnql2bUXkU7ZJ/pjnbSISP26SIaJHQVYxLUxMiT/Jy9m AFzCk4tft5qFD4R3vL0cfC0YQYYt54nrob0SYZ5UVtK9pUT4VLUoo+lOVvcju8Kw5o TJQfy2BHRr5ROGhBGfy53Hy5a/CzEuq96CciJp7zUG39lbRxldxUvhBEKYdQHloC3c gozROJwGMVBBWH5hg+eJ8tTyu6AXPIGV7G2aJkQ/PQ0kVtxlXjOaHOzxKhPxEVs6JW 3YbbsdZ+6DpSzAiLiTacYH2PlHSIeJyVzDCkgAJg4n6DULLNTXLf4irkXK8HORq64f HTHzSCkjtLnM2qZYp6RebhXAt0b2KqRkua1WnKWZPPMBhqKie3ost+cYy0Kd8miE2+ 9IFf0Uy2h5zwnMcNO+NML1HwgWe/AbLGg5hBZgDWoyIuCjONM+8XEU4bQWntslVr4/ JM3q4rZH4rbyG0t1M92Crj3xBqKitxh2IAec1wLsSAyUdkUlb7sJt7mZNAg7n1jyp5 dyTmmwvrFDhDmsvk/xUZZLK9vDImChT2R14pIPi8KO0xFEOZgHYMeCAuY7iVhRxEJT 0nrz1Feg13Uq0VPggME7XL5Kjne1tiw1BQ19AbrF7OWmKXJS0HaceDhpz1b/Ibn/Bj /4r2Gw3vsVjbpG57sGCLqRbA= Received: from zn.tnic (pd95304da.dip0.t-ipconnect.de [217.83.4.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id A369D40E014B; Tue, 31 Oct 2023 11:26:05 +0000 (UTC) Date: Tue, 31 Oct 2023 12:25:58 +0100 From: Borislav Petkov To: "Jiri Slaby (SUSE)" Cc: peterz@infradead.org, linux-kernel@vger.kernel.org, Yu-cheng Yu , Rick Edgecombe , Dave Hansen , Kees Cook , Mike Rapoport , Pengfei Xu , John Allen , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kbuild@vger.kernel.org Subject: Re: [PATCH] x86: Let AS_WRUSS depend on X86_64 Message-ID: <20231031112558.GAZUDkRrkEStZqDnz4@fat_crate.local> References: <20231031102111.32142-1-jirislaby@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231031102111.32142-1-jirislaby@kernel.org> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 31 Oct 2023 04:26:40 -0700 (PDT) + linux-kbuild@vger.kernel.org On Tue, Oct 31, 2023 at 11:21:11AM +0100, Jiri Slaby (SUSE) wrote: > Since commit 18e66b695e78 ("x86/shstk: Add Kconfig option for shadow > stack"), AS_WRUSS is set even in 32-bit .configs. It is due to how > Kbuild works. .config is not considered during make oldconfig (and other > make *config), so standard (64-bit) gcc is invoked from 'as-instr' > Kbuild tests. And such gcc indeed reports that wruss is supported, so > AS_WRUSS=y is set. > > Provided the wruss instruction is 64-bit only (and used in pure 64-bit > X86_USER_SHADOW_STACK), it has little sense to have AS_WRUSS=y set on > 32-bit. > > Therefore, make the whole test dependent on X86_64 to ensure it's set > only on 64-bit. > > Signed-off-by: Jiri Slaby (SUSE) > Cc: Yu-cheng Yu > Cc: Rick Edgecombe > Cc: Dave Hansen > Cc: Borislav Petkov (AMD) > Cc: Kees Cook > Cc: Mike Rapoport (IBM) > Cc: Pengfei Xu > Cc: John Allen > Cc: Kees Cook > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: "H. Peter Anvin" > Cc: x86@kernel.org > --- > arch/x86/Kconfig.assembler | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/x86/Kconfig.assembler b/arch/x86/Kconfig.assembler > index 8ad41da301e5..a5b5241711e3 100644 > --- a/arch/x86/Kconfig.assembler > +++ b/arch/x86/Kconfig.assembler > @@ -27,5 +27,6 @@ config AS_GFNI > > config AS_WRUSS > def_bool $(as-instr,wrussq %rax$(comma)(%rbx)) > + depends on X86_64 > help > Supported by binutils >= 2.31 and LLVM integrated assembler > -- > 2.42.0 > -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette