Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp181808rdh; Mon, 18 Dec 2023 16:01:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IG42JQgo0DexNEwmGkzkIoy8NqCTyAu8W4Lf+NlgYu9kDAA7+8FmCY4SFH1yiAWobxnCCbO X-Received: by 2002:a17:902:650c:b0:1d3:6c37:23b7 with SMTP id b12-20020a170902650c00b001d36c3723b7mr7146787plk.87.1702944093754; Mon, 18 Dec 2023 16:01:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702944093; cv=none; d=google.com; s=arc-20160816; b=r9n7hhathdlem+s9UlIOwu6ShsnEot7IILLiwn7LqNMhr3iMEgw/50TQMoyovvic+e cSXsjRT3I7sM02WmvpYkxP5JIKARr9vtzUXGT4+Ejp6adkMLWG9w4HYnTiUsEbqnZs8c mEbUjgbU6j3F8oODbJ1F5GlpN8on/XKJSnwzkvIzycQDwe1OEJXyyQ4GmTjXOkM4iwXy P7DUl5OrR1GLHlc3g+RGJQW42d2Ac5eCnd9CUKYwOFSqq9ImPkNPRrWqGzpnDIqadXeM XplTfipTE57uBb2uttjap+SqR0JJakBrvrzieb9aROcFdtDeVcT7rne0pU44wJpY1HIF CkMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Gj+gRRqBobU/IdDNvW+J1YWWHWtc7h43mZwDKtx2Pp0=; fh=e+Z9VSm6qilWLYVVDrl1xS5hzWqSyEfmgwNQuEQgMNk=; b=iGu0ayRB0UZkpIqNaTsB/NLRbd8JWsrFwxDty5xPyOizOpErp1cpAQYZPPulwMsHzs 7yrdMlUWAx+imGkdIaJubPhtQfull1YmV+YCE9ulP7u4tB1MBe248IR/m/h4a0QQJ7UF RjRo4rkO7cy2eo1u6H/3xA2X+3PlfF2d3Zs2JpRho4p4112sA/a+HxiHVz+NxET23OaN Y8jbrl5A4f67PcXkU6T4QPTfaOzIK2vNb+2akhTzrkSMBpk4zC9QG0rOTZzIhsDsE5QK AbLZyHppFQowc2JHy2WK0mB7tMGNintgFSDjDvj8VbOehGbKm1A3hQNX374/VUANrYtB Q52g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rr8a9wCc; spf=pass (google.com: domain of linux-kernel+bounces-4508-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4508-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k9-20020a170902c40900b001d0bcb62f98si19453526plk.368.2023.12.18.16.01.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 16:01:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4508-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rr8a9wCc; spf=pass (google.com: domain of linux-kernel+bounces-4508-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4508-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 661F9285A3E for ; Tue, 19 Dec 2023 00:01:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 052DDAD2D; Tue, 19 Dec 2023 00:01:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rr8a9wCc" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C7FE7472; Tue, 19 Dec 2023 00:01:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C79BC433C8; Tue, 19 Dec 2023 00:01:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702944079; bh=fMgl5f1cxsDp2Ro+Gy0GmSHDb4UdBfrTzpxZdw6xSOI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rr8a9wCcxzUWjy+33BEpF+Rz/shtCM1gzDwv6ucq4Mp+VdWWx+hVaiF+tmXKbzUQ7 wObo1de1uj0lA8td3opQu8p2rEAxvlh+inTqEEmqXhxdvD0qtAD6IhSfTs4NII0EIG lw+Zey2sh4dFZYPEWd/NGIGXAmjGKubHZm5SgQzagOwYliWG5sFMICElNin3u4lOHE f6rzfFg29C//Uw1vAdwPHRcW3a2mGwhnNKM0o95Z/7d3mbznhulW2VnALuxSiCMA34 aRbeIFGIE9JczjyLsDc+cmS8RyBopRKqHd967KNsrt6slkFwU68j+plOP3/yNrqDAf r20wNTWUyx20g== Date: Mon, 18 Dec 2023 17:01:16 -0700 From: Nathan Chancellor To: kernel test robot Cc: Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Boqun Feng , Daniel Borkmann , Eric Dumazet , Frederic Weisbecker , Ingo Molnar , Jakub Kicinski , Paolo Abeni , Peter Zijlstra , Thomas Gleixner , Waiman Long , Will Deacon , Alexei Starovoitov , Jesper Dangaard Brouer , Jesse Brandeburg , John Fastabend , Tony Nguyen , bpf@vger.kernel.org, intel-wired-lan@lists.osuosl.org Subject: Re: [PATCH net-next 20/24] net: intel: Use nested-BH locking for XDP redirect. Message-ID: <20231219000116.GA3956476@dev-arch.thelio-3990X> References: <20231215171020.687342-21-bigeasy@linutronix.de> <202312161212.D5tju5i6-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202312161212.D5tju5i6-lkp@intel.com> On Sat, Dec 16, 2023 at 12:53:43PM +0800, kernel test robot wrote: > Hi Sebastian, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on net-next/main] > > url: https://github.com/intel-lab-lkp/linux/commits/Sebastian-Andrzej-Siewior/locking-local_lock-Introduce-guard-definition-for-local_lock/20231216-011911 > base: net-next/main > patch link: https://lore.kernel.org/r/20231215171020.687342-21-bigeasy%40linutronix.de > patch subject: [PATCH net-next 20/24] net: intel: Use nested-BH locking for XDP redirect. > config: arm-defconfig (https://download.01.org/0day-ci/archive/20231216/202312161212.D5tju5i6-lkp@intel.com/config) > compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1) > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231216/202312161212.D5tju5i6-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202312161212.D5tju5i6-lkp@intel.com/ > > All errors (new ones prefixed by >>): > > >> drivers/net/ethernet/intel/igb/igb_main.c:8620:3: error: cannot jump from this goto statement to its label > goto xdp_out; > ^ > drivers/net/ethernet/intel/igb/igb_main.c:8624:2: note: jump bypasses initialization of variable with __attribute__((cleanup)) > guard(local_lock_nested_bh)(&bpf_run_lock.redirect_lock); > ^ > include/linux/cleanup.h:142:15: note: expanded from macro 'guard' > CLASS(_name, __UNIQUE_ID(guard)) > ^ > include/linux/compiler.h:180:29: note: expanded from macro '__UNIQUE_ID' > #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) > ^ > include/linux/compiler_types.h:84:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:83:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > :52:1: note: expanded from here > __UNIQUE_ID_guard753 > ^ > 1 error generated. I initially thought that this may have been https://github.com/ClangBuiltLinux/linux/issues/1886 but asm goto is not involved here. This error occurs because jumping over the initialization of a variable declared with __attribute__((__cleanup__(...))) does not prevent the clean up function from running as one may expect it to, but could instead result in the clean up function getting run on uninitialized memory. A contrived example (see the bottom of the "Output" tabs for the execution output): https://godbolt.org/z/9bvGboxvc While there is a warning from GCC in that example, I don't see one in the kernel's case. I see there is an open GCC issue around this problem: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91951 While it is possible that there may not actually be a problem with how the kernel uses __attribute__((__cleanup__(...))) and gotos, I think clang's behavior is reasonable given the potential footguns that this construct has. Cheers, Nathan