Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp6400460ioo; Thu, 2 Jun 2022 05:52:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcNKwvxCrpqoTbBAAia6ZexfeVNFLD49msK45lRuAZezmVNancPsU4ZdwVRzn0NJru1kE4 X-Received: by 2002:a17:907:da3:b0:6fe:f08b:776 with SMTP id go35-20020a1709070da300b006fef08b0776mr4242199ejc.558.1654174324159; Thu, 02 Jun 2022 05:52:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654174324; cv=none; d=google.com; s=arc-20160816; b=D0vxyJkUdnNc40LlDnRD4vUE1fDz9udQKxpbkP7MGnD/vO+zE8wL5HZrBBYwyfrz2a qyliRvy3AHV0ysvqi7TNRhG9rPsenoerUloHgTFv+3HsWrBN755K907uPHzClCyIKCFd GZeaJx5zCHO4pjdKMaJt2TFWUuQCOhT+UgjuQQ1yYLGV0qY5CVDClMDEyfyFKllKpwZg 9mDWgJP4tAOPk3CEMIIBINGLgp+tKPH8GaUnsdd7GOQvMOyhIl6rZI5Rpz4zBlYUhetZ qfrXefw4q0XAdO72Q3ZAGrgCglCTTjt0A8Yt/t7GLThaZTyVmAeaEwEbBWln/G55TXSV DTxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=9cySqlmFVJBKguTDHxtOMSFrQDrD4+1cO9gZ2lMMbWw=; b=Ic0P97vDGocpixfDl0cfs5mtSDfgEwFnGqa1CXL9EUqaA9U4WteixyW44pdyd4jieN Qs+BeSouUL+TajLghKawoi0A1uaNg183LQ6lZOk5TvghSZDwobtUUteZV1eB3obgnm4+ 8YzsyTb/MRRM1UaGXSIGWBTqPd+2woQ0cWVE+HquS7cin9S/7IVGAVQTaNAXiXLPl3fF F0gJa9beAtBpmf+RiaHOx97YWEi0EOqnN0ctYEx245amQpsy27NI/ErxsJnepSBnVWNt DoqlG05JYWmyzESgZWxRl3bCmKeDLZJSIqe3RCjoJE2WrzP8o6FTvOFJCl6Q5xmX88Pl Sikw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m10-20020a056402050a00b0042daefc74ddsi4437879edv.170.2022.06.02.05.51.39; Thu, 02 Jun 2022 05:52:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234884AbiFBMLi (ORCPT + 99 others); Thu, 2 Jun 2022 08:11:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234866AbiFBMLf (ORCPT ); Thu, 2 Jun 2022 08:11:35 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4774B2A46CD for ; Thu, 2 Jun 2022 05:11:32 -0700 (PDT) Received: from mail-yb1-f174.google.com ([209.85.219.174]) by mrelayeu.kundenserver.de (mreue009 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MNKuI-1o8MdV1EwU-00OoGc for ; Thu, 02 Jun 2022 14:11:31 +0200 Received: by mail-yb1-f174.google.com with SMTP id p13so7958425ybm.1 for ; Thu, 02 Jun 2022 05:11:31 -0700 (PDT) X-Gm-Message-State: AOAM5332DSVrLNjoXGkq92HKjSld1ARP8j/ygbicaRY3c+ryvCNy00gY L9NJqJvph4YmNSU4zlTSEA5um7szVePDCl1DM0M= X-Received: by 2002:a25:db8a:0:b0:65c:b04a:f612 with SMTP id g132-20020a25db8a000000b0065cb04af612mr4808103ybf.106.1654171890125; Thu, 02 Jun 2022 05:11:30 -0700 (PDT) MIME-Version: 1.0 References: <91E67F46-A3C7-4159-9E0C-C6C6306F3669@inria.fr> <74bed19a-713f-1a25-8142-cf32984beada@I-love.SAKURA.ne.jp> In-Reply-To: <74bed19a-713f-1a25-8142-cf32984beada@I-love.SAKURA.ne.jp> From: Arnd Bergmann Date: Thu, 2 Jun 2022 14:11:13 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers") To: Tetsuo Handa Cc: Arnd Bergmann , Linus Torvalds , Keisuke Nishimura , Kentaro Takeda , Ayush Sawal , Vinay Kumar Yadav , Rohit Maheshwari , Julia Lawall , Jani Nikula , Sudip Mukherjee , Russell King , Viresh Kumar , Shiraz Hashim , =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel , Linux Kernel Mailing List , Linux ARM , SoC Team Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:fIlLPdr/4OZ8rVJ2kwQu6HHZYAbGdFKL3Cb7NA7NYcngY4Tbs+Y tqRPESUoFoxViK0GddRpAG7jHjWKaEuMZ7nSHdliRFon0mQnDapxka6hdvrRjYSrTiWJT0/ dDqPPI1y1TYUf+OrTTWFB9dm4ScwaKhf2XB3pYKs4968AcrXj5wa7q4aZi7v4rNxQ6vU3Gz 47ie4gF44pgLP8e+ssabA== X-UI-Out-Filterresults: notjunk:1;V03:K0:M8M6zndQz70=:sHl0XjMebMBpN+cZpq8Jle WnUVcHzvWYUDlhRY4G0daC8Xe/IteKSFJ0YGEkWKSuvTlfEz1TDdSn/3C+ZgVNepG+LxvVNln UQDaxYLxrqVZ+VlblnJCdnZ4zAhDRPLijCXgyzdD6gdwU18CSwsSdz9lXtrWn0xCyenwDeA4n QPQKRLKTXDoreYAae+DITfZoyRf1b0LMsUjaBikGT4N5/QsMLaIboAlTW6mhQfXMBdDOJv8mQ Idc90zhRaaHamiWSygDmGoCQcErb5kOz0M9wMCmZgR9Ig81EvHpyR4uXssai/7jcdyWbnCnrK ka1T/JhTzly8lA60T3l/SdBh90iDXwnY1MlV6TpMRWPhEsOe+C7F9euXcgEhPmu/nl0N+JCPR tGG92HQP2cQfsCKFLlQMidLAwBM3e+WIKHHUMa82ESH/KjxVsDIPfhwlZzIhKl9mPgOyuSlGV 8/ZSHswN6G5zy7cwm4h7zoq508TyINPzT5ia759RCstJAhfGDqQ9TCLO0ydBVDIURlzZ05kaU SJJt9nqG9fd8CRT/xaNPbso808zLWbx2KncytLgXcJSBq+H6qv3S3ZPW1SqaDh0aMCuHcAZ4n SiCYsM9LFmVuOEVBACGPO6QDcZmefFgCX9Hxh6EGBgjdjXy/wmaQGxClFWxchbJ/F/Ojdbmbl yAsaJKkmc2VzPpObj332iO93VUC8IwlRXbbwra1Noh7YRcJkak/fc3N2m4DY6FvqVZ2/VWp0Z IEfvTuMkct0a7BKTbhZFPKHVzUZ4knmfaLrBm//W2sLVsSCke9xttVDlB/HV6bYLvJYovlZ3p jFKwyeodwJ2UCf0x6tT8Il4nNnGAdy9CdIybw4Eqq227dyfvMPnIJwTAlU6qP/f8OOQ1Zzrtd kIyxGwmX9AT3svCrFTZA== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 2, 2022 at 1:21 PM Tetsuo Handa wrote: > On 2022/06/02 16:38, Arnd Bergmann wrote: > >> But let's cc the tomoyo and chelsio people. > > > > I think both of them work because the structures are always > > embedded inside of larger structures that have at least word > > alignment. This is the thing I was looking for, and the > > __packed attribute was added in error, most likely copied > > from somewhere else. > > The __packed in "struct tomoyo_shared_acl_head" is to embed next > naturally-aligned member of a larger struct into the bytes that > would have been wasted if __packed is not specified. For example, > > struct tomoyo_shared_acl_head { > struct list_head list; > atomic_t users; > } __packed; > > struct tomoyo_condition { > struct tomoyo_shared_acl_head head; > u32 size; /* Memory size allocated for this entry. */ > (...snipped...) > }; > > saves 4 bytes on 64 bits build. > > If the next naturally-aligned member of a larger struct is larger than > the bytes that was saved by __packed, the saved bytes will be unused. Ok, got it. I think as gcc should still be able to always figure out the alignment when accessing the atomic, without ever falling back to byte access on an atomic_get() or atomic_set(). To be on the safe side, I would still either move the __packed attribute to the 'list' member, or make the structure '__aligned(4)'. Arnd