Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5781831imw; Wed, 20 Jul 2022 12:24:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s29Ng6CVeGpTqTIPq4qvnsLYP9DMRaVI4YcD0/kmq0G+5YFCZjhNybGzSP9VuUW9EWR/fo X-Received: by 2002:a17:906:9c82:b0:6df:c5f0:d456 with SMTP id fj2-20020a1709069c8200b006dfc5f0d456mr37626302ejc.287.1658345098708; Wed, 20 Jul 2022 12:24:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658345098; cv=none; d=google.com; s=arc-20160816; b=VrWBmSHITPU0CuHVoT86m5GQQcX2IrhoaJB8hIHhI6KCvNGB42GdvsocW+VCmqZYvP V5ia6iEwYMHo86mqAXuswPn8miSuGKi3FeeftMpLsC63CjhIsa1k0zfKCtgWY1kxoi7m QGpoX+yGpy1K8RyEFNhI14rLVoHwlnyivNx6NkhW8T8NEuDMcdCu7Qr3Tuqm6KC18TTP /NNQwGV5AB7h4AC5zke99OWj82XTzp8oh9YiZiDjyIWRRT9wiQ22PMWWs+t/BSXnxM3r VuWILxg/uUBDqrmtt2wcDGpl8IjB2pSQy8b+4yqswXntrGXZeTQS8WU4ri3SRikesuFy ReoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=WX1lGI+FffE60gYBZrrwxN495iHRDQmdxHU7l4lURA4=; b=iANpT/mAqPuYn5hgGG8smpTrOq1y3CneY3GPNEqgY5vofFCHzaqLVHoTJHMVXLvGZz OKKqmKgA1BqFRmSsBlsSDaP9LJsxWNSSgMU4FLu3sCdHSx7LG/4YUJOQEhDS/WuHCTpi EtUmHo0askVbpiNbZ+lDiWqJ/e8ImkCdXUsV9NvGYmhqCEroD+eYEI5L1ZiTYD9xTuIZ I9lJwNPoDvahmpz4AKAeG3ajuicHEJKm4CiLSjjxZe0uwsl2CdUulj3Mi+TDLvkgDlxK hFu9++DC5zeFh+5Z+Flng6/m4LMFP/Jb3T6zBhqZePyy0rYD0UCpoQQq5Kozzsi+xJyO NanQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h13-20020a0564020e8d00b0043baadc1561si3404766eda.614.2022.07.20.12.24.33; Wed, 20 Jul 2022 12:24:58 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232647AbiGTTLc (ORCPT + 99 others); Wed, 20 Jul 2022 15:11:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230391AbiGTTLb (ORCPT ); Wed, 20 Jul 2022 15:11:31 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B089457265 for ; Wed, 20 Jul 2022 12:11:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 59866B821D0 for ; Wed, 20 Jul 2022 19:11:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4E7EC341CB; Wed, 20 Jul 2022 19:11:24 +0000 (UTC) Date: Wed, 20 Jul 2022 15:11:23 -0400 From: Steven Rostedt To: Linus Torvalds Cc: Peter Zijlstra , Thomas Gleixner , LKML , "the arch/x86 maintainers" , Tim Chen , Josh Poimboeuf , Andrew Cooper , Pawan Gupta , Johannes Wikner , Alyssa Milburn , Jann Horn , "H.J. Lu" , Joao Moreira , Joseph Nuzman , Juergen Gross , Masami Hiramatsu , Alexei Starovoitov , Daniel Borkmann Subject: Re: [patch 00/38] x86/retbleed: Call depth tracking mitigation Message-ID: <20220720151123.0e5bf61e@gandalf.local.home> In-Reply-To: References: <20220716230344.239749011@linutronix.de> <20220720125736.48164a14@gandalf.local.home> <20220720135016.3178ffc6@gandalf.local.home> <20220720143147.4d8a2f8d@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Wed, 20 Jul 2022 11:43:37 -0700 Linus Torvalds wrote: > So unless somebody has some one-liner workaround, I really suspect the > fix is to remove all this. The amount of hackery to make it work in > the first place is kind of disgusting anyway. > > Since this was a WARN_ONCE(), can you make sure that with this case > removed, nothing else triggers? Actually, this fixes it too: (and this config boots to completion without warnings). I'll add this to my full test suite and see if it finishes. -- Steve diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 1f40dad30d50..2dd61d8594f4 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -25,6 +25,7 @@ endif ifdef CONFIG_RETHUNK RETHUNK_CFLAGS := -mfunction-return=thunk-extern RETPOLINE_CFLAGS += $(RETHUNK_CFLAGS) +export RETHUNK_CFLAGS endif export RETPOLINE_CFLAGS diff --git a/drivers/misc/lkdtm/Makefile b/drivers/misc/lkdtm/Makefile index 2e0aa74ac185..fd96ac1617f7 100644 --- a/drivers/misc/lkdtm/Makefile +++ b/drivers/misc/lkdtm/Makefile @@ -16,7 +16,7 @@ lkdtm-$(CONFIG_PPC_64S_HASH_MMU) += powerpc.o KASAN_SANITIZE_rodata.o := n KASAN_SANITIZE_stackleak.o := n KCOV_INSTRUMENT_rodata.o := n -CFLAGS_REMOVE_rodata.o += $(CC_FLAGS_LTO) +CFLAGS_REMOVE_rodata.o += $(CC_FLAGS_LTO) $(RETHUNK_CFLAGS) OBJCOPYFLAGS := OBJCOPYFLAGS_rodata_objcopy.o := \