Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4169207pxf; Tue, 23 Mar 2021 04:39:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVmNdt2bcfEm9wxJdalKGvKCrtmSiTc8LtgzVJckOiHvFq+RgG668A/mZFMmP6Cy7z9E7v X-Received: by 2002:a17:906:3544:: with SMTP id s4mr4601260eja.73.1616499540637; Tue, 23 Mar 2021 04:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616499540; cv=none; d=google.com; s=arc-20160816; b=QHR2tLaaQBKlHHc7YLpPp+b8i7zYDPHuQowAw8GFbdaLMCNRpR6pe1b7xgBJ1NAUf3 abOvdEJuWyHoHSAqGUtXIm8mU7P7/+vtAZF3Pn5lsaRLSKdhzn7WXBM+KKWlOfZ6Zbvn p+FMk3WfxnDdcsKrTQME8bZ7ErRnbitsYLMEZfOk8qvCcZqvfpY1enAdOb2zfOsEMBAO xSeDRRgy++qcGSs4yanaBPK6HXKLiQN05vpk0EjoVNuDcDkjCEAfE7ITdgUYxwzPgi3d R+p/EaA9TcXJ9uwAhrEnPRkzK72ztY4d90tKEpSu0AHJ5y1mgVcpKdWfbYBZjO5OOBGi lSCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=eYXwdWJpGgPlbF+IMjlnRK89MycJ6XGBFq/8nML6pC0=; b=gpfDezt2y5nMNKeH7N0dD0pIBqjIBtP2idthS0hltPVDvHsMaP3JIj3aN0R59k/ICx +xc8Y/F6DeMFTKA6zENA3MGhaTn8IU+hH+topR4I6fCGgo/Kulc3RGnvRX6pPiLjxOwV Z54Lv4Z3sWqkzEm4R9Zsz7ijcM/D6reuryzBDw9l9eegAs4VoDGYQM59WkeW+fyNLRV/ 5v8Q+TFDi0Nm2o4NewNOiLXPWakOojaXkG5o1o0gifdASvI5QZjCnNXsCFEiiKXLeVBk Zot7ytKUGmfo3y9YlAibwQVekoWBopbZfZTtYwtKjzNjqLezTjfLW6nKwTusgEXAcwge iKJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=clFInBke; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i25si13386619eje.58.2021.03.23.04.38.36; Tue, 23 Mar 2021 04:39:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=clFInBke; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229508AbhCWLhT (ORCPT + 99 others); Tue, 23 Mar 2021 07:37:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230274AbhCWLg6 (ORCPT ); Tue, 23 Mar 2021 07:36:58 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 264AAC061574 for ; Tue, 23 Mar 2021 04:36:58 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id u5so26529936ejn.8 for ; Tue, 23 Mar 2021 04:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=eYXwdWJpGgPlbF+IMjlnRK89MycJ6XGBFq/8nML6pC0=; b=clFInBkeeScHTmHOP7pOfOTtYcMCWJWsiDjZLLVa3tz9WfsZFCU2Xjz4Rn/Xtgqmf1 9ni/sA01AyG+pIzAWtzgOP6oyrRg0E4DHIrU5noHCJmgoRl9vqPAvZFKhxMkGyt9Q+GH pgmQ1u/7DFmwUyGGCQfEx63QP4keEpp7eyKq0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=eYXwdWJpGgPlbF+IMjlnRK89MycJ6XGBFq/8nML6pC0=; b=GhB3n2JJGXgXBHPJseckGIbRSCwPISkeZdhq4SxOWIS/kyKnfEUReqgm/1ExukMi9i Tyw1MNIsbjnp6OI4SzzmP+oLVBxomkjUwcEbw3mGW4bsVWlHwr2siv6vWX8JYewH31By F6xX9wHKspzfklK+0I1MqzJ6HaglhVVgkS7dxbhw/z2BphZ+j1TjVvCPCZSebSwxzm/k 8NIHp2jph3x6HxTK69ZM/WetDv/YvQ0FO3SDYEfEMqW5xTsELbwJZukNjO1rMuQDCGrc VemUWw6A9HqARt/sdaV/wMZTUps22Sq4sggBciZ5sCeLYcv6mQBr3MC8T8GOzbqIcHeY bH2A== X-Gm-Message-State: AOAM530FVKBikmMRbWZJDAOdsTyw+Xt98Qb0WkeWAfDzDjq++A57114z 56Df5GCJks4tjmaQdDQDGoFr+g== X-Received: by 2002:a17:906:b297:: with SMTP id q23mr4498095ejz.315.1616499416873; Tue, 23 Mar 2021 04:36:56 -0700 (PDT) Received: from [192.168.1.149] ([80.208.71.248]) by smtp.gmail.com with ESMTPSA id p3sm11014906ejd.7.2021.03.23.04.36.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Mar 2021 04:36:56 -0700 (PDT) Subject: Re: [kbuild-all] Re: include/linux/compiler_types.h:315:38: error: call to '__compiletime_assert_536' declared with attribute error: BUILD_BUG_ON failed: offsetof(struct can_frame, len) != offsetof(struct canfd_frame, len) || offsetof(struct can_frame, data) != offsetof(struc... To: Oliver Hartkopp , Marc Kleine-Budde , Rong Chen , Patrick Menschel Cc: kernel test robot , kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, linux-can References: <202103210435.I0fiBGAC-lkp@intel.com> <7f4f7e1c-194b-a903-d474-e3b742556a55@intel.com> <20210323073437.yo63wreqnubbeqby@pengutronix.de> <7ff6bfd3-6b4b-045a-abb7-485927909587@hartkopp.net> From: Rasmus Villemoes Message-ID: Date: Tue, 23 Mar 2021 12:36:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <7ff6bfd3-6b4b-045a-abb7-485927909587@hartkopp.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/03/2021 08.45, Oliver Hartkopp wrote: > IMO we facing a compiler problem here - and we should be very happy that > the BUILD_BUG_ON() triggered an issue after years of silence. > > I do not have a good feeling about what kind of strange effects this > compiler issue might have in other code of other projects. > > So I would explicitly suggest NOT to change the af_can.c code to work > around this compiler issue. > > Let the gcc people fix their product and let them thank all of us for > detecting it. I'm sure you'd be eligible for a full refund in case this was a bug in gcc. It is not. It's a pretty clear ABI requirement for (at least some flavors of) ARM: https://stackoverflow.com/questions/43786747/struct-layout-in-apcs-gnu-abi and more directly from the horse's mouth: https://developer.arm.com/documentation/dui0067/d/arm-compiler-reference/c-and-c---implementation-details/structures--unions--enumerations--and-bitfields Field alignment Structures are arranged with the first-named component at the lowest address. Fields are aligned as follows: A field with a char type is aligned to the next available byte. A field with a short type is aligned to the next even-addressed byte. Bitfield alignment depends on how the bitfield is declared. See Bitfields in packed structures for more information. All other types are aligned on word boundaries. That anonymous union falls into the "All other types" bullet. __packed is the documented and standard way to overrule the compiler's/ABI's layout decisions. Rasmus