Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1024859iog; Wed, 15 Jun 2022 18:41:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1scOLJR5XLj7p4lT8Pc7kQuauNAm9sJ5x/RxEEn97WWRflQLkEfH0gVCR5x/8BQ6cdzQc5P X-Received: by 2002:a17:90b:1b10:b0:1e8:2966:3232 with SMTP id nu16-20020a17090b1b1000b001e829663232mr13306412pjb.103.1655343683142; Wed, 15 Jun 2022 18:41:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655343683; cv=none; d=google.com; s=arc-20160816; b=MuBIsakJ5+UJrllTksDUmXUv5nH6Cq6Vs5HczOdjcj8ioMwXafAjh0pjR+S4qZNMyh D8KQJv6VRTURHMBHQKkbrrjjYPU1Xp3P075fSRGqPNIZeD9Vb3NsFAfucG2BvvBNpmLL /p66HCGoIoKT8Y/ztWp4RH+jv1HKj5GIky5OO6IojEDHnwM2MFDFU9Qbp0JpWkXzMcpt ukZtyQkAYROi4BayVH/72r4j3DZUuYxGa6RPhqk4omI+lI/RXAXgq+Jdh4/JjYMdYkBG pd/hP87cmUlQf6+yWYsmVCeBLo1tMWk2UCU6TZQBBf7rseRpRskpMuco/pwPRL83kjqL 8Jew== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=2awV+GlsKfiknr1xT/xU1D15k0cNXtulBLebazj1hqs=; b=YLN1+//wF4NuR6jm//Mxo31qqPHbjAXI6tNX7ScvZRNPHCb8eBZvlXmYiyiNc8lsTa xvrDdGTz4b21zxFOTWSKg6q6xjff6FdiS6eLUphx2c8uR/Zr655wKA6eucrMczYt844o UFpqmFuVRPPXWOhQUHizBET5BJivzUziX4aGHkQ16Au9n3yyS4cDp20OjBW7txLFKDos 4r3Iu2niD9k5szstzrYR5q7T7M8euBMcvRGpXBVMI8BviaG0Dmr7OwsZ6Z8iEHO/WWit 5BcuGTSL42xXZSKvw/q/flScuTVTnDKr13j/ZJs1R2vYFNS4n3rYtYEVNpALmDjbP572 kTtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m8F26jI1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q2-20020a17090a304200b001e34484b182si652116pjl.135.2022.06.15.18.41.11; Wed, 15 Jun 2022 18:41:23 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m8F26jI1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352376AbiFPB0d (ORCPT + 99 others); Wed, 15 Jun 2022 21:26:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344002AbiFPB0b (ORCPT ); Wed, 15 Jun 2022 21:26:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E9BE51E54; Wed, 15 Jun 2022 18:26:31 -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 dfw.source.kernel.org (Postfix) with ESMTPS id A604561CB3; Thu, 16 Jun 2022 01:26:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01816C3411A; Thu, 16 Jun 2022 01:26:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655342790; bh=RVnT4ZhKcCC/rRu0iJrXXNZrI1VuclV9+DrhvH6u4bU=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=m8F26jI1i6uGOOKDtqA1FxbbM8hOQdLFCLpDMfzpCHfDhoDYCzdyzkP+oOBE3ora0 1XtpZPTit4/HwPfcHp7jAPQ+pf8n+x+IWjkcKxSd0iU9uKqcFAGb6oMj8rH5QtgxAI 9YXBV6O7okl7g7dcoNq0SNnlo/fQ0F5fMplHg9vBUJO3nG7FFRMccmSI+EL5rLmUaf Tjv70dYHf08MgWiz5AX3OK4/9RIGVFtQhO/GVQ4KzYNWnSPMeCT85coIVFvYrfW8Xh 6TA6MPtt+LP5VHoRRJQm3XWxDAsqMg8eaqDt9/xNn7fngOJXN8MTXwJJywBWeOVXR/ kW+/qtOoHFKAw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 932E05C0587; Wed, 15 Jun 2022 18:26:29 -0700 (PDT) Date: Wed, 15 Jun 2022 18:26:29 -0700 From: "Paul E. McKenney" To: Stephen Rothwell Cc: Nathan Chancellor , Frederic Weisbecker , Sami Tolvanen , Kees Cook , llvm@lists.linux.dev, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org Subject: Re: Contextual conflict between kspp and rcu trees Message-ID: <20220616012629.GL1790663@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20220616091634.55ebbdb0@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220616091634.55ebbdb0@canb.auug.org.au> X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Thu, Jun 16, 2022 at 09:16:34AM +1000, Stephen Rothwell wrote: > Hi Nathan, > > On Wed, 15 Jun 2022 12:55:53 -0700 Nathan Chancellor wrote: > > > > There is a contextual conflict between commit e1d337335207 ("cfi: Fix > > __cfi_slowpath_diag RCU usage with cpuidle") in the kspp tree and commit > > dcc0c11aa87b ("rcu/context-tracking: Remove rcu_irq_enter/exit()") in > > the rcu tree, which is visible when building ARCH=arm64 defconfig + > > CONFIG_LTO_CLANG_THIN=y + CONFIG_CFI_CLANG=y with clang: > > > > kernel/cfi.c:298:3: error: call to undeclared function 'rcu_irq_enter'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] > > rcu_irq_enter(); > > ^ > > kernel/cfi.c:298:3: note: did you mean 'ct_irq_enter'? > > ./include/linux/context_tracking_irq.h:6:6: note: 'ct_irq_enter' declared here > > void ct_irq_enter(void); > > ^ > > kernel/cfi.c:307:3: error: call to undeclared function 'rcu_irq_exit'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] > > rcu_irq_exit(); > > ^ > > kernel/cfi.c:307:3: note: did you mean 'ct_irq_exit'? > > ./include/linux/context_tracking_irq.h:7:6: note: 'ct_irq_exit' declared here > > void ct_irq_exit(void); > > ^ > > 2 errors generated. > > > > > > Per the above RCU commit and commit 6c5218715286 ("context_tracking: > > Take IRQ eqs entrypoints over RCU"), it appears that the following diff > > is the proper fix up. Would you mind applying it to the merge of > > whichever tree comes second if possible? I did build and boot test it > > but it would not be a bad idea for Sami and Frederic to verify that it > > is correct so that Kees/Paul can mention it to Linus :) > > > > Cheers, > > Nathan > > > > diff --git a/kernel/cfi.c b/kernel/cfi.c > > index 08102d19ec15..2046276ee234 100644 > > --- a/kernel/cfi.c > > +++ b/kernel/cfi.c > > @@ -295,7 +295,7 @@ static inline cfi_check_fn find_check_fn(unsigned long ptr) > > rcu_idle = !rcu_is_watching(); > > if (rcu_idle) { > > local_irq_save(flags); > > - rcu_irq_enter(); > > + ct_irq_enter(); > > } > > > > if (IS_ENABLED(CONFIG_CFI_CLANG_SHADOW)) > > @@ -304,7 +304,7 @@ static inline cfi_check_fn find_check_fn(unsigned long ptr) > > fn = find_module_check_fn(ptr); > > > > if (rcu_idle) { > > - rcu_irq_exit(); > > + ct_irq_exit(); > > local_irq_restore(flags); > > } > > > > I will apply that to the merge of the rcu tree today (unless Paul finds > time to update (and test :-) ) the rcu tree before I get to it) as the > CFI fix is now in Linus' tree. Please! In theory, I could rebase -rcu to linus/master now, but in practice the odds of it producing something useful are all too low. I will take care of it tomorrow (Thursday) morning, Pacific Time. Thanx, Paul