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 CD311C74A44 for ; Tue, 14 Mar 2023 18:53:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230322AbjCNSxW (ORCPT ); Tue, 14 Mar 2023 14:53:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbjCNSxT (ORCPT ); Tue, 14 Mar 2023 14:53:19 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 953722129E; Tue, 14 Mar 2023 11:52:42 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id fd5so32181330edb.7; Tue, 14 Mar 2023 11:52:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678819960; 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=/TyElIWgexllmpdDJP4yPEqDY3bV2L7lXgcPPLwRUOY=; b=UeDOTY0aX04XtbWW7DgBEXbwSH/civPFMvrDvl60KzcJlFT8kaHIARlTBja1329vf1 MhtQ9Tw8+PnHGNLRksLZzc+222BDWyXI1TzLC3Yd/X7NR/yVUTC8ERN2jWM3IuP4hhJA bpnoBHR0y+5VPfeoHvQMymRj9w2SX1IYMrkA04LF1+pN/0kJDGLj3Jkg1maHQ8heMV8+ UFXf5GYKDiRcng5OXQ79cHrkb/OYTRxCDa8kTrEz3xXcSTzVSkddy1MJi8P5fZjyyEe8 GjH+GgJxheA8/DAwtc4jx9R9zDF6bOgLatuoahLKLlRMiv8byyiRelYNp9L4AFZCxQXM z6tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678819960; 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=/TyElIWgexllmpdDJP4yPEqDY3bV2L7lXgcPPLwRUOY=; b=jGP5xx2qoirRrUAKgU7MmdbmLhHRbT4XG+FcV19zKjBjrYIgIylhOjAQujR5kS938A UYWtq1ZsYtB5vjwOGuGUMFtY7rtV3QtQo6JMwntK3i4UaF92AiT5wMDQreDJExSNJGfE fIGeZLBgOn1pb1tGewJ67psl7oM7FT9rwBySSSu/ijFjumEPKK+i5fxPBI+v4lJ6ZNHG Ce4TOjsMJmp8Lf2bP/IVZq2SUuq+2rjrp79UsQAPlk+H3hZwjy/ZbnlAMOs2nybubRCB hG0RO3DbZ+o5WC1r3p5aVc7Iavev75vmfvanhOY5kSzueBfmt8u73mCXoGQJ8ybwq1nV TEXw== X-Gm-Message-State: AO0yUKWSf04EAdrY6M3CyAeYsbVw4dZww2PP0ZOKHxmiA6de5FzUu9B8 HyhMPZImCA7h+ixY2hPjZUnwkKz5XcbO2keBrWzcav4c X-Google-Smtp-Source: AK7set/9zMCyA10PYR9HiyiyTZRC+Fn7ib1qNvhz/pfVTT3MgkLBj1Ci2HypROZLVLSZfmh0Psf1gnEwUkgLuBTk4Ks= X-Received: by 2002:a17:906:bc51:b0:923:6595:a81b with SMTP id s17-20020a170906bc5100b009236595a81bmr1813215ejv.5.1678819960041; Tue, 14 Mar 2023 11:52:40 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andrii Nakryiko Date: Tue, 14 Mar 2023 11:52:27 -0700 Message-ID: Subject: Re: next: zip.c:35:8: error: packed attribute causes inefficient alignment for 'magic' [-Werror=attributes] To: Naresh Kamboju , Jiri Olsa , Arnaldo Carvalho de Melo , Namhyung Kim , Ian Rogers , =?UTF-8?Q?Daniel_M=C3=BCller?= Cc: 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 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? > > 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/2MfXEyvgh4ba9y3rkt= 6KPf6sUMR/ > > > History link, > https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230314/= testrun/15564056/suite/build/test/gcc-10-lkftconfig-perf/history/ > > > -- > Linaro LKFT > https://lkft.linaro.org