Received: by 2002:a05:7412:a9a3:b0:f9:327e:43ab with SMTP id o35csp21542rdh; Mon, 18 Dec 2023 03:11:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1BhwxDfo6u8QwQUpOW8TrEO1h/IHGYiT89sCDaGvpnJFORP/ECaJR116Xp0HuWbGPRn1F X-Received: by 2002:a50:c189:0:b0:553:3b28:a41f with SMTP id m9-20020a50c189000000b005533b28a41fmr617980edf.135.1702897890381; Mon, 18 Dec 2023 03:11:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702897890; cv=none; d=google.com; s=arc-20160816; b=JJcMI2+4HBhH6GaaH0pAkCBww/GRIZPXKlgI+Fo3Jf+dtscICQvk0LctmxKpkPiDok zkQAmZvJbbPHhViEl/7WbHRPNSy//TsomLzYXkjRdf3S9uhlOWZdDIyNXWF87jsJCmsj 8ayGaGbrKw5fcButM0KYVvQHSaSUhFf5dI9cQ1cknb/WEaz+iM6KXVOclcn62GOTMON+ 404dR8SLBJrfJUJGhDZY7uMTSZZtZbHWp0n0hn3TubIsi5kLUw4ud26zyaQ3V+P5RrfD yTthnmgnHnpZK94kSvav182LhZ2u67eZZdOZ5zYpSsg8AZlkCERrvyU9vi13XCbULO14 +hBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5LLFzetDEY/rDRXkmjqDGfwp9LG6QBALHK3t57mRUS8=; fh=9IfpEuybCUl9I963a9hf5Q7YEY6R5qmksh62BBdhUXU=; b=WMesyyxrPBuOV4Ksu3rZbuM6aRM8dFdXx8n6mjM3pDUKC8MY8TLHFnhVY08ZesOSD7 TqTRnLrnb/vp+Fst5y0tci22l4wjGDGT1YyH3fmu93ai6v3RGA2VSbGqswyN7OB3NL13 Wqih2nYuY8dY9F8NLahFmKfeI2RVC8FFDpj8iDxVD6axhqkZ6WjTHuEXsniaHXiFpD5j 7ULp2wXeqGRltEkXEB9ptLEk5EFhbJP44YBD6QYDTVdQsWLXETGmdokGKB0MkXFBu63M S8Vq3vLS2ZMamUuk1zd3+IaCVA4mDDzIW/iLraX+OJ861cGQ5NMo7mBP+1M/MGQM94t4 /NPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=Bn6y3orl; spf=pass (google.com: domain of linux-kernel+bounces-3417-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3417-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m16-20020a50d7d0000000b00553728e4822si194972edj.103.2023.12.18.03.11.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 03:11:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3417-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=Bn6y3orl; spf=pass (google.com: domain of linux-kernel+bounces-3417-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3417-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 13A531F234E5 for ; Mon, 18 Dec 2023 11:11:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A9261944E; Mon, 18 Dec 2023 11:11:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="Bn6y3orl" X-Original-To: linux-kernel@vger.kernel.org Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 71C1018E2D for ; Mon, 18 Dec 2023 11:11:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1702897878; bh=NS546S3nezX5KtA5ZEsUrJc395ipkqDNIJ9bo/coqqo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Bn6y3orlkbd/O25jrNW9H44843d7dKx4t69o2OtzyLgcriGf7rHlD0q6pTKh3OUSt GRApF+O6ZHgcGUEsh/poarjLOE5syiySpsEIRx4zb06QmN4Frxz76uYMSsGLbOYLUA hqs3ecYaUB7zPwhuuTZ293E2fD0kZ8d1C4uOOtOY= Date: Mon, 18 Dec 2023 12:11:17 +0100 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Arnd Bergmann Cc: kernel test robot , oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Jakub Kicinski , Simon Horman Subject: Re: include/linux/compiler_types.h:397:45: error: call to '__compiletime_assert_810' declared with attribute error: BUILD_BUG_ON failed: skb_ext_total_length() > 255 Message-ID: References: <202312171924.4FozI5FG-lkp@intel.com> <3fb66648-5581-4371-b15e-23e52e6469ba@t-8ch.de> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On 2023-12-18 10:12:03+0000, Arnd Bergmann wrote: > On Sun, Dec 17, 2023, at 17:13, Thomas Weißschuh wrote: > > +Cc Arnd who was taking care of CFLAGS_GCOV in the past. > > > > On 2023-12-17 19:39:34+0800, kernel test robot wrote: > >> | Closes: https://lore.kernel.org/oe-kbuild-all/202312171924.4FozI5FG-lkp@intel.com/ > >> > >> All errors (new ones prefixed by >>): > >> > >> In file included from : > >> In function 'skb_extensions_init', > >> inlined from 'skb_init' at net/core/skbuff.c:4848:2: > >> >> include/linux/compiler_types.h:397:45: error: call to '__compiletime_assert_810' declared with attribute error: BUILD_BUG_ON failed: skb_ext_total_length() > 255 > > I tried to count the actual number of bytes and got to a worst case of 200 > bytes (for 64-bit machines), but this may have been wrong. I can think of two > possible things that may have caused the problem: > > a) there is an actual overflow but gcc fails to realize it without GCOV > b) the compile-time calculation goes wrong and is no longer a constant > value, so the assertion fails to evaluate > > We can probably elinminate a) if you can show that raising the limit does > not avoid the problem. I raised the limit and the issue persists. Also I replaced all entries in the array with a constant "0" and the issue also persists. So it can't be a). Funnily when I keep the explicit array initializers and set all values to "0" then the tripping point is from 4 to 5 array elements, the same as with the current code. With a plain array initialization the tripping point is from 2 to 3 elements. > > [..] > > > > This seems to be a compiler bug/configuration issue. > > > > When I remove the entry for SKB_EXT_MCTP from skb_ext_type_len then the > > error goes away. However this entry works the same as all other entries. > > > > Also dropping -fno-tree-loop-im *or* -fprofile-arcs from CFLAGS_GCOV > > makes the code compile as-is. > > > > Or switching to a 64bit build... > > The -fno-tree-loop-im option would likely stop the loop from getting > unrolled, which is how the skb_ext_total_length() return code is no > longer constant. > > Does manually unrolling this loop avoid the problem? That also works. The offending commit was a change from a manually unrolled loop to the current code. This code is a few months old but somehow the issue was only found now.