Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81F7EC7618B for ; Tue, 14 Mar 2023 23:56:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230113AbjCNX4d (ORCPT ); Tue, 14 Mar 2023 19:56:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229938AbjCNX4b (ORCPT ); Tue, 14 Mar 2023 19:56:31 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EDA04B824; Tue, 14 Mar 2023 16:56:29 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id x3so68867633edb.10; Tue, 14 Mar 2023 16:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678838187; 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=WOphAHu7gszrVso7T+oh2ToFCR0kix6VtyaG3U2anX0=; b=CUHh5xUOFWm8ch6GdQbBV0NOt6vqTaXGfkK4OumKrVEVRX5BietJeKqFjFN0HPArZE q1BumjNZWHzEusSR5pSgHMc4p8ZZAgNYwHm/gG++qwWaOnWTL9dvDL6CwrYLHRrEd4A/ FeHzVELlteckyRtC2Wg2HlrnhQOTjVuzGqPhjlf9Bup1jq9Yj4qIpLvY8eKwVjF+69O/ JRGZR86PA07cXpITK9RW1MQQ6CP0hh0nfkNf5pAB/UO5cwEjgnUXJFGlN3TXFs/d+x1j +LiOB/qpofv55ag4/YoDr5D/Y22E0jZScvyAA5XDHF7QBI0yBkKvV3nyITjKZR4RYMIQ o7Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678838187; 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=WOphAHu7gszrVso7T+oh2ToFCR0kix6VtyaG3U2anX0=; b=FMZ7FE7REiXk2lZlFPr9fck5+ZYn5uu4eqRfXRSAdToZigKEeauq9lWO+Uv2Sxx7Sf SG+wTYDRt6Gd7VKDf5JGcWfqDrccb30etqhl9+Ym6JT2+Qh8ehkMZD9jFPN9PR/Gq7Go RjMKfBoCW0epb0GQ3WUkGZ7f+W1K3ePw1pS6pEyRzT5n1m1YiOp2BosdsoCrQsDkmvDF 5KrmokKaPf5kOOisTzemfnAiYPZYit+IN6LmHorm+rHNVIu14LJd/BpxfqBqzg4bvxHj IewaF84VLGvDYtbY/41lHnXm8PPv1DxvJz5qqrNS9dYq9gbrrhn43GcZwy91CtwknZF4 gLMg== X-Gm-Message-State: AO0yUKXS7GQKEvKqPg1W7PrcBD9xXQEt2bOEy0E4Jv5DirRvWzH7HLIk Ef6e9u2GciJBy5wPDewQUcBnaGx5pZBxTeTocSs= X-Google-Smtp-Source: AK7set9vU3iA94OwQwJjFlyCzhRRThwkSQ6ymB7ncDITBvYoDY60C68r8MxO5jdzFlutLECI4jO6y5nZw4QJX90Je0M= X-Received: by 2002:a05:6402:e9d:b0:4ad:739c:b38e with SMTP id h29-20020a0564020e9d00b004ad739cb38emr438702eda.1.1678838187529; Tue, 14 Mar 2023 16:56:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andrii Nakryiko Date: Tue, 14 Mar 2023 16:56:15 -0700 Message-ID: Subject: Re: next: zip.c:35:8: error: packed attribute causes inefficient alignment for 'magic' [-Werror=attributes] To: Ian Rogers Cc: Naresh Kamboju , Jiri Olsa , Arnaldo Carvalho de Melo , Namhyung Kim , =?UTF-8?Q?Daniel_M=C3=BCller?= , open list , bpf , lkft-triage@lists.linaro.org, Linux-Next Mailing List , Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann , Song Liu , Yonghong Song , KP Singh , Anders Roxell Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 14, 2023 at 1:01=E2=80=AFPM Ian Rogers wro= te: > > On Tue, Mar 14, 2023 at 11:52=E2=80=AFAM Andrii Nakryiko > wrote: > > > > On Mon, Mar 13, 2023 at 11:38=E2=80=AFPM Naresh Kamboju > > wrote: > > > > > > perf builds failing from Linux next-20230307..next-20230314 but pass = on > > > Linux mainline v6.3-rc2. > > > > > > Reported-by: Linux Kernel Functional Testing > > > > Thanks for the report, but I'm not sure what's wrong here. We added > > __attribute__((packed)) attribute intentionally and want to keep it > > this way. It seems like perf itself is using packed structs (e.g., > > struct debug_line_header in util/genelf_debug.c), so I'm wondering why > > that code doesn't cause any problems. > > > > Any hints from perf folks? > > We use a #pragma to disable the warnings in at least one place: > https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools= /lib/perf/include/perf/event.h?h=3Dperf-tools#n194 > Ok, let's do the same here. Daniel, can you please send a follow up patch to silence this warning? > Thanks, > Ian > > > > > > > Build log: > > > --- > > > libbpf/staticobjs/zip.o > > > zip.c:35:8: error: packed attribute causes inefficient alignment for > > > 'magic' [-Werror=3Dattributes] > > > 35 | __u32 magic; > > > | ^~~~~ > > > zip.c:40:8: error: packed attribute causes inefficient alignment for > > > 'this_disk' [-Werror=3Dattributes] > > > 40 | __u16 this_disk; > > > | ^~~~~~~~~ > > > zip.c:45:8: error: packed attribute causes inefficient alignment for > > > 'cd_disk' [-Werror=3Dattributes] > > > 45 | __u16 cd_disk; > > > | ^~~~~~~ > > > zip.c:50:8: error: packed attribute causes inefficient alignment for > > > 'cd_records' [-Werror=3Dattributes] > > > 50 | __u16 cd_records; > > > | ^~~~~~~~~~ > > > zip.c:55:8: error: packed attribute causes inefficient alignment for > > > 'cd_records_total' [-Werror=3Dattributes] > > > 55 | __u16 cd_records_total; > > > | ^~~~~~~~~~~~~~~~ > > > zip.c:58:8: error: packed attribute causes inefficient alignment for > > > 'cd_size' [-Werror=3Dattributes] > > > 58 | __u32 cd_size; > > > | ^~~~~~~ > > > zip.c:63:8: error: packed attribute causes inefficient alignment for > > > 'cd_offset' [-Werror=3Dattributes] > > > 63 | __u32 cd_offset; > > > | ^~~~~~~~~ > > > zip.c:66:8: error: packed attribute causes inefficient alignment for > > > 'comment_length' [-Werror=3Dattributes] > > > 66 | __u16 comment_length; > > > | ^~~~~~~~~~~~~~ > > > zip.c:79:8: error: packed attribute causes inefficient alignment for > > > 'magic' [-Werror=3Dattributes] > > > 79 | __u32 magic; > > > | ^~~~~ > > > zip.c:80:8: error: packed attribute causes inefficient alignment for > > > 'version' [-Werror=3Dattributes] > > > 80 | __u16 version; > > > | ^~~~~~~ > > > zip.c:82:8: error: packed attribute causes inefficient alignment for > > > 'min_version' [-Werror=3Dattributes] > > > 82 | __u16 min_version; > > > | ^~~~~~~~~~~ > > > zip.c:83:8: error: packed attribute causes inefficient alignment for > > > 'flags' [-Werror=3Dattributes] > > > 83 | __u16 flags; > > > | ^~~~~ > > > zip.c:84:8: error: packed attribute causes inefficient alignment for > > > 'compression' [-Werror=3Dattributes] > > > 84 | __u16 compression; > > > | ^~~~~~~~~~~ > > > zip.c:85:8: error: packed attribute causes inefficient alignment for > > > 'last_modified_time' [-Werror=3Dattributes] > > > 85 | __u16 last_modified_time; > > > | ^~~~~~~~~~~~~~~~~~ > > > zip.c:86:8: error: packed attribute causes inefficient alignment for > > > 'last_modified_date' [-Werror=3Dattributes] > > > 86 | __u16 last_modified_date; > > > | ^~~~~~~~~~~~~~~~~~ > > > zip.c:87:8: error: packed attribute causes inefficient alignment for > > > 'crc' [-Werror=3Dattributes] > > > 87 | __u32 crc; > > > | ^~~ > > > zip.c:88:8: error: packed attribute causes inefficient alignment for > > > 'compressed_size' [-Werror=3Dattributes] > > > 88 | __u32 compressed_size; > > > | ^~~~~~~~~~~~~~~ > > > zip.c:89:8: error: packed attribute causes inefficient alignment for > > > 'uncompressed_size' [-Werror=3Dattributes] > > > 89 | __u32 uncompressed_size; > > > | ^~~~~~~~~~~~~~~~~ > > > zip.c:90:8: error: packed attribute causes inefficient alignment for > > > 'file_name_length' [-Werror=3Dattributes] > > > 90 | __u16 file_name_length; > > > | ^~~~~~~~~~~~~~~~ > > > zip.c:91:8: error: packed attribute causes inefficient alignment for > > > 'extra_field_length' [-Werror=3Dattributes] > > > 91 | __u16 extra_field_length; > > > | ^~~~~~~~~~~~~~~~~~ > > > zip.c:92:8: error: packed attribute causes inefficient alignment for > > > 'file_comment_length' [-Werror=3Dattributes] > > > 92 | __u16 file_comment_length; > > > | ^~~~~~~~~~~~~~~~~~~ > > > zip.c:94:8: error: packed attribute causes inefficient alignment for > > > 'disk' [-Werror=3Dattributes] > > > 94 | __u16 disk; > > > | ^~~~ > > > zip.c:95:8: error: packed attribute causes inefficient alignment for > > > 'internal_attributes' [-Werror=3Dattributes] > > > 95 | __u16 internal_attributes; > > > | ^~~~~~~~~~~~~~~~~~~ > > > zip.c:108:8: error: packed attribute causes inefficient alignment for > > > 'magic' [-Werror=3Dattributes] > > > 108 | __u32 magic; > > > | ^~~~~ > > > zip.c:110:8: error: packed attribute causes inefficient alignment for > > > 'min_version' [-Werror=3Dattributes] > > > 110 | __u16 min_version; > > > | ^~~~~~~~~~~ > > > zip.c:111:8: error: packed attribute causes inefficient alignment for > > > 'flags' [-Werror=3Dattributes] > > > 111 | __u16 flags; > > > | ^~~~~ > > > zip.c:112:8: error: packed attribute causes inefficient alignment for > > > 'compression' [-Werror=3Dattributes] > > > 112 | __u16 compression; > > > | ^~~~~~~~~~~ > > > zip.c:113:8: error: packed attribute causes inefficient alignment for > > > 'last_modified_time' [-Werror=3Dattributes] > > > 113 | __u16 last_modified_time; > > > | ^~~~~~~~~~~~~~~~~~ > > > zip.c:114:8: error: packed attribute causes inefficient alignment for > > > 'last_modified_date' [-Werror=3Dattributes] > > > 114 | __u16 last_modified_date; > > > | ^~~~~~~~~~~~~~~~~~ > > > zip.c:118:8: error: packed attribute causes inefficient alignment for > > > 'file_name_length' [-Werror=3Dattributes] > > > 118 | __u16 file_name_length; > > > | ^~~~~~~~~~~~~~~~ > > > zip.c:119:8: error: packed attribute causes inefficient alignment for > > > 'extra_field_length' [-Werror=3Dattributes] > > > 119 | __u16 extra_field_length; > > > | ^~~~~~~~~~~~~~~~~~ > > > cc1: all warnings being treated as errors > > > > > > Build links, > > > https://storage.tuxsuite.com/public/linaro/lkft/builds/2MfXEyvgh4ba9y= 3rkt6KPf6sUMR/ > > > > > > > > > History link, > > > https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230= 314/testrun/15564056/suite/build/test/gcc-10-lkftconfig-perf/history/ > > > > > > > > > -- > > > Linaro LKFT > > > https://lkft.linaro.org