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 EB6C4C43334 for ; Wed, 15 Jun 2022 20:25:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231317AbiFOUZe (ORCPT ); Wed, 15 Jun 2022 16:25:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233573AbiFOUZd (ORCPT ); Wed, 15 Jun 2022 16:25:33 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D41D850E0D for ; Wed, 15 Jun 2022 13:25:31 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id r5so5675816pgr.3 for ; Wed, 15 Jun 2022 13:25:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=fSbaUdWMc4ZCN4x6T7HO7Oazr6+FjS4D1nOKI+4v+qI=; b=eoBnV1ab6mcOB4xykNYFQaZW+Qi3dcgSQdsqak3tENQPcuOUClkzPwbUWUNWFP+QVK bQwrpLsOSl1k9EqZEIsTmvr6JEEssRSqiHDlJNMXVJ30VXU0dndaTEks0xtZFx1PwQpi jGw5dC7e0N7xdUVRy+kS0fs6FXid54A1kOOiE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=fSbaUdWMc4ZCN4x6T7HO7Oazr6+FjS4D1nOKI+4v+qI=; b=ai1jbXxzaHFDK7WbWHkd99Iuyk1ulTlGh2htwWkrkKK8UAjmr+kbrsdOwG2djKUxI4 344s3dGfvfrlQItbleuTd4kKH8mMlhkfEnEALVsSgiU8WTu9DmJbqx6lPrL6RaXfZ13o Lyh8xFsNo4Cn6Opal+E9olvNIvawHdaUUX95UNpgwaSsbIaWnE38LrOXDotseIuQ+7se 2WIoXgRWNDoyj4IxqdWwf5p0tmuT+8qR7gmqealUdkWGvXweqsbbxhPuQ3dO44pZsw/D 9pmBt1YRbFOdIVElkhUKbBiNNHRz/pwBfzeq+Np0FA1MJsqYKWYmDiEN4abhkNa7Ge16 XQDA== X-Gm-Message-State: AJIora+aLH/8K4YkeEwnzdM2CThMp8hDXEaxhpb+hq99P2BOFA76y3K+ 14cvbzqGHXHyUKsV5skB/Kx9pA== X-Google-Smtp-Source: AGRyM1tESwgbtAytnIPSYcv5RqPofftOKrovVEa2JmH58Vpoe8CgFFE/Ium5XvKSgg8sm3hMrzT/lg== X-Received: by 2002:a63:135b:0:b0:3fd:876c:975a with SMTP id 27-20020a63135b000000b003fd876c975amr1347239pgt.538.1655324731197; Wed, 15 Jun 2022 13:25:31 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id b13-20020a1709027e0d00b00163aba9a2a5sm40235plm.106.2022.06.15.13.25.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 13:25:30 -0700 (PDT) Date: Wed, 15 Jun 2022 13:25:30 -0700 From: Kees Cook To: Nathan Chancellor Cc: Stephen Rothwell , "Paul E. McKenney" , Frederic Weisbecker , Sami Tolvanen , 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: <202206151323.4D78044D8@keescook> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-next@vger.kernel.org On Wed, Jun 15, 2022 at 12:55:53PM -0700, Nathan Chancellor wrote: > Hi Stephen et al., > > 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 :) Ah! Thanks for tracking this down! Maybe dcc0c11aa87b should be updated to leave an alias until the next merge window? -- Kees Cook