Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2602993lqz; Wed, 3 Apr 2024 03:10:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVGEEEylXoIfoiXq1OkLsRNlXonaurADA8JhcETh8aYY7jIZuX5zP7Nnn8FbxiByGl4Q3Pp1gL3Bo/JRoVwYa6gORbA+qM93ufvf3huiA== X-Google-Smtp-Source: AGHT+IHJwmKjeRnbxUcI6OfnPVVmH9b1NBZ5gZ0m/siFiyg4Vs8+Kp8Ppfwt6QhS3kPI+eKmkob3 X-Received: by 2002:a0c:ea46:0:b0:699:209f:285a with SMTP id u6-20020a0cea46000000b00699209f285amr2002320qvp.33.1712139026722; Wed, 03 Apr 2024 03:10:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712139026; cv=pass; d=google.com; s=arc-20160816; b=ZU5lDgF3m++ivfwR1qRPyDYFl3etd/OA2+j8RvFCXruB0Tfri6ekpeeS5VNh9bA4sA UM89Dyow/lCRKuNrbZK/osm5W2rKLynhUEN9Dhs6QBvUD1W/Yo80R0tHVA8vE+0l41kc 97qstzOSq4VJXDWdM/N+4t+435G10NuUH4+a8K33TTlwvDaAttFYi7pvWbWSBUdtZE4m lPq5lyPFglrS/53NBcfSZXBz76fWyDq/NllhgUbe9d0mtWbCC5WpVyJID4gBU1FlDfWd 88MIziutC9v/bhYeGHRzFvLazlRJBLsTJxwtzlSuAqetz6jedGVIKG2gnv8SzI/oMts0 pagQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=QjTsloGmOucOZQ+j+s/fLrYr5N8eIOKIN1JpE5014io=; fh=gWIyBOfGZbN075kDzZBjQnFW94Q8Eu3lIs8d5dZ0cpE=; b=Pq1Mb92ZVxx3jEdX1vJqTz+qdjYe5++y0s8Tk3NyxB3N/ssVRA9YKTLik6ebHFjOR7 wKo3v6DP7xLPhiM/d9Tuas+g9TC4KtQOkCNrPb6ViAURK8fKEu2Fqiophr+j+JwkR7br mT2kVhLD5QxU7pQDscea+m5Na8O3D6VZqbeLWr4qGSe+T7OrnYIkXKJlrlGmDwOnXz7n FsFXdfqOimImwdTqXOR74ZJuNvdtWdn/NV/QspD5niuwp2ZPKoiuqbyBaCHfJN+RP/IL a9Q/MknrfnFDfGuXvl6WHhGDxKWE6nnlrhC2MvItnn1BD8xaaA7flq3vd0KS32NZ+9Hk Hnaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@isovalent.com header.s=google header.b="VV4YU/pe"; arc=pass (i=1 spf=pass spfdomain=isovalent.com dkim=pass dkdomain=isovalent.com dmarc=pass fromdomain=isovalent.com); spf=pass (google.com: domain of linux-kernel+bounces-129506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129506-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=isovalent.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e14-20020a056214110e00b00690197c48e2si13886927qvs.236.2024.04.03.03.10.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 03:10:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@isovalent.com header.s=google header.b="VV4YU/pe"; arc=pass (i=1 spf=pass spfdomain=isovalent.com dkim=pass dkdomain=isovalent.com dmarc=pass fromdomain=isovalent.com); spf=pass (google.com: domain of linux-kernel+bounces-129506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129506-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=isovalent.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 63D331C2101A for ; Wed, 3 Apr 2024 10:10:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7426D136E22; Wed, 3 Apr 2024 10:09:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=isovalent.com header.i=@isovalent.com header.b="VV4YU/pe" Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C62B1135405 for ; Wed, 3 Apr 2024 10:09:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712138983; cv=none; b=R6EIFOvYvga2o/ZP4u+POqM4odCcBNnRL0pD62xmkl8pNk+mSHuvn3FoHOMW9f06IIjgynBWRLKpii+PKrOU6wfgCq6wA1xvDapd+IsRQvuHCiysIgi7PdpIWFk+yMQJqYNFXliTXLqyW8uQCLtr9eGWeQIfSI9P6IdCQKe8aZA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712138983; c=relaxed/simple; bh=jiF1b1qN7q/VFRrdeA+VOPcB74H2DGR+qR1HismVjBc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ufD754LFrJzdVQ4ndHKfcv8Z4d4TWO1NZfHLJNYD2s3kk/XTk9vwU9+H9eS1OejCFl903owlXxNh1zEy3TMkPEVV50g5EUAFA2FZZ6KYqdx4wZGZ48vjY8z322t8qHPgFTuir9ghpvhbsPoBYKmW4l6arfLu1BSgHkkJ5eLdVuw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=isovalent.com; spf=pass smtp.mailfrom=isovalent.com; dkim=pass (2048-bit key) header.d=isovalent.com header.i=@isovalent.com header.b=VV4YU/pe; arc=none smtp.client-ip=209.85.208.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=isovalent.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=isovalent.com Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2d6ee6c9945so46373381fa.3 for ; Wed, 03 Apr 2024 03:09:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=isovalent.com; s=google; t=1712138980; x=1712743780; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=QjTsloGmOucOZQ+j+s/fLrYr5N8eIOKIN1JpE5014io=; b=VV4YU/pes8YaZDKo+iH4oLgupmTBCElBZnBz4oL0exZ7R1TAL6mTYT1kE1Lp8a1MRH gne2Qsm7DXD3KFDRjHb1xNILw97j4tkmHJ5F35adsfFbH9KUNyHl7ErQ0Pxy6b3V3O5/ 5RJsO1RqLZU5MrP5OKK+Js5mTeVbdb63DJ0vMIGK0yh6ZPHkjDNU9zvcE7iYGdzrKemC wqgYxp9BO6tsX5j7ce+r6vOd3Z/dkWMOPnkL/xUemjfXRtdaziNkDLx0E8gpuu1Z6Yhd 0eN4YngbUOB6YI60o+OY563Cg1YGeJhCOCirrAh55mNnhHWg/eEUldmIB5xwHWKTBF9q 5/dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712138980; x=1712743780; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QjTsloGmOucOZQ+j+s/fLrYr5N8eIOKIN1JpE5014io=; b=Al9mYokQnHXFsU4IPSdzINBqjKjMzm+icTaHIcqnFoTVZVhF+PpYAPH4IB3voJJpCa c7Wbezn36UmNB101XzzbmQBPQMLxCTyI0e1g+cg2Ldk3dIkIELulMb83s+IxW0aVpw2S 6ShMMTE3MKN0oR/KTCQYP0xzYJF80OzxyMhsTCnWa2kOq2aocV5X4fimkNjYebh142eM AXI0u6+caFKIGorHKtelelo8aMANLRRnAAlTGcF2RGqgh0n5vWZjXutH/5UUoqLuFWhi mDPLhalpq3khnZ0IytaQGrrvW1uzAGxYI2NsO/sPf1M41vJ7KpzGJh8ml1ShRQEqXBZ5 +/VA== X-Forwarded-Encrypted: i=1; AJvYcCVIKFxnIHmKeCiE/KTp8Ijw8XPKl9tBgP00pPTnPHTosxJCcxWNpzluw8U/gdzcBPwkG9nR4e6NF1eq5JysMykKSvSpxYPvh4sdQtZh X-Gm-Message-State: AOJu0Yxwxf/+/uV/VLkHWWJLxx9/pBgyfttqEOlbriRrK14SLXPjC36P PV8STR3hN5e4v3uZERqjH8ckm4OlYumt8nH8AEGfUf8v4QayrsI2OYnj9M0kVrCgvLzg0FHuRGh XmYPUu75ifh4EO9qcbF234q1kfEuZpDrtZonHOA== X-Received: by 2002:a2e:b1c2:0:b0:2d6:c4ec:782 with SMTP id e2-20020a2eb1c2000000b002d6c4ec0782mr1420936lja.49.1712138979880; Wed, 03 Apr 2024 03:09:39 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <347bb21e-98db-4bd5-9ca1-550eac5be9f8@app.fastmail.com> <277decf7-d9cb-451c-a105-6ecc998f9f46@intel.com> In-Reply-To: From: Anton Protopopov Date: Wed, 3 Apr 2024 12:09:29 +0200 Message-ID: Subject: Re: include/linux/build_bug.h:78:41: error: static assertion failed: "struct bpf_fib_lookup size check" To: Alexander Lobakin Cc: Arnd Bergmann , Naresh Kamboju , open list , lkft-triage@lists.linaro.org, Linux Regressions , Anders Roxell , Dan Carpenter , Daniel Borkmann , David Ahern , Alexei Starovoitov , Russell King , Ard Biesheuvel , Linus Walleij Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Apr 3, 2024 at 11:57=E2=80=AFAM Anton Protopopov wrote: > > On Wed, Apr 3, 2024 at 11:39=E2=80=AFAM Alexander Lobakin > wrote: > > > > From: Arnd Bergmann > > Date: Wed, 03 Apr 2024 10:45:36 +0200 > > > > > On Wed, Apr 3, 2024, at 10:10, Anton Protopopov wrote: > > >> On Wed, Apr 3, 2024 at 10:03=E2=80=AFAM Naresh Kamboju > > >> wrote: > > >>> > > >>> The arm footbridge_defconfig failed with gcc-13 and gcc-8 on Linux = next > > >>> starting from next-20240328..next-20240402. > > >>> > > >>> arm: > > >>> build: > > >>> * gcc-8-footbridge_defconfig - Failed > > >>> * gcc-13-footbridge_defconfig - Failed > > >>> > > >>> Reported-by: Linux Kernel Functional Testing > > >>> > > >>> In file included from include/linux/bitfield.h:10, > > >>> from arch/arm/include/asm/ptrace.h:13, > > >>> from arch/arm/include/asm/processor.h:14, > > >>> from include/linux/prefetch.h:15, > > >>> from arch/arm/include/asm/atomic.h:12, > > >>> from include/linux/atomic.h:7, > > >>> from net/core/filter.c:20: > > >>> include/linux/build_bug.h:78:41: error: static assertion failed: > > >>> "struct bpf_fib_lookup size check" > > >>> 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr= , msg) > > >>> | ^~~~~~~~~~~~~~ > > >> > > >> Thanks, I will take a look today > > > > Naresh, > > > > Could you please remove that static_assert() and dump bpf_bif_lookup > > layout from pahole? > > > > Anton unionized { smac, dmac } with __u32 mark. On x86_64, the offset o= f > > smac was 52 (aligned to 4) already, so I don't really get what AEABI > > does here. IIRC it aligns every structure to 8 bytes? > > > > Maybe we could just add __attribute__((__packed__)) > > __attribute__((__aligned__(4))) to that anonymous union at the end. > > Yeah, I am sending a patch for this right now. Better not to depend on > compiler options One __packed__ was not enough though. The problem was also with the union of two __u16's which is padded to be 32 bits when AEABI=3Dn and the whole structure is packed (so total size is 66 in this case).