* next: zip.c:35:8: error: packed attribute causes inefficient alignment for 'magic' [-Werror=attributes] @ 2023-03-14 6:38 Naresh Kamboju 2023-03-14 18:52 ` Andrii Nakryiko 0 siblings, 1 reply; 5+ messages in thread From: Naresh Kamboju @ 2023-03-14 6:38 UTC (permalink / raw) To: open list, bpf, lkft-triage, Linux-Next Mailing List Cc: Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann, Song Liu, Yonghong Song, KP Singh, Anders Roxell perf builds failing from Linux next-20230307..next-20230314 but pass on Linux mainline v6.3-rc2. Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> Build log: --- libbpf/staticobjs/zip.o zip.c:35:8: error: packed attribute causes inefficient alignment for 'magic' [-Werror=attributes] 35 | __u32 magic; | ^~~~~ zip.c:40:8: error: packed attribute causes inefficient alignment for 'this_disk' [-Werror=attributes] 40 | __u16 this_disk; | ^~~~~~~~~ zip.c:45:8: error: packed attribute causes inefficient alignment for 'cd_disk' [-Werror=attributes] 45 | __u16 cd_disk; | ^~~~~~~ zip.c:50:8: error: packed attribute causes inefficient alignment for 'cd_records' [-Werror=attributes] 50 | __u16 cd_records; | ^~~~~~~~~~ zip.c:55:8: error: packed attribute causes inefficient alignment for 'cd_records_total' [-Werror=attributes] 55 | __u16 cd_records_total; | ^~~~~~~~~~~~~~~~ zip.c:58:8: error: packed attribute causes inefficient alignment for 'cd_size' [-Werror=attributes] 58 | __u32 cd_size; | ^~~~~~~ zip.c:63:8: error: packed attribute causes inefficient alignment for 'cd_offset' [-Werror=attributes] 63 | __u32 cd_offset; | ^~~~~~~~~ zip.c:66:8: error: packed attribute causes inefficient alignment for 'comment_length' [-Werror=attributes] 66 | __u16 comment_length; | ^~~~~~~~~~~~~~ zip.c:79:8: error: packed attribute causes inefficient alignment for 'magic' [-Werror=attributes] 79 | __u32 magic; | ^~~~~ zip.c:80:8: error: packed attribute causes inefficient alignment for 'version' [-Werror=attributes] 80 | __u16 version; | ^~~~~~~ zip.c:82:8: error: packed attribute causes inefficient alignment for 'min_version' [-Werror=attributes] 82 | __u16 min_version; | ^~~~~~~~~~~ zip.c:83:8: error: packed attribute causes inefficient alignment for 'flags' [-Werror=attributes] 83 | __u16 flags; | ^~~~~ zip.c:84:8: error: packed attribute causes inefficient alignment for 'compression' [-Werror=attributes] 84 | __u16 compression; | ^~~~~~~~~~~ zip.c:85:8: error: packed attribute causes inefficient alignment for 'last_modified_time' [-Werror=attributes] 85 | __u16 last_modified_time; | ^~~~~~~~~~~~~~~~~~ zip.c:86:8: error: packed attribute causes inefficient alignment for 'last_modified_date' [-Werror=attributes] 86 | __u16 last_modified_date; | ^~~~~~~~~~~~~~~~~~ zip.c:87:8: error: packed attribute causes inefficient alignment for 'crc' [-Werror=attributes] 87 | __u32 crc; | ^~~ zip.c:88:8: error: packed attribute causes inefficient alignment for 'compressed_size' [-Werror=attributes] 88 | __u32 compressed_size; | ^~~~~~~~~~~~~~~ zip.c:89:8: error: packed attribute causes inefficient alignment for 'uncompressed_size' [-Werror=attributes] 89 | __u32 uncompressed_size; | ^~~~~~~~~~~~~~~~~ zip.c:90:8: error: packed attribute causes inefficient alignment for 'file_name_length' [-Werror=attributes] 90 | __u16 file_name_length; | ^~~~~~~~~~~~~~~~ zip.c:91:8: error: packed attribute causes inefficient alignment for 'extra_field_length' [-Werror=attributes] 91 | __u16 extra_field_length; | ^~~~~~~~~~~~~~~~~~ zip.c:92:8: error: packed attribute causes inefficient alignment for 'file_comment_length' [-Werror=attributes] 92 | __u16 file_comment_length; | ^~~~~~~~~~~~~~~~~~~ zip.c:94:8: error: packed attribute causes inefficient alignment for 'disk' [-Werror=attributes] 94 | __u16 disk; | ^~~~ zip.c:95:8: error: packed attribute causes inefficient alignment for 'internal_attributes' [-Werror=attributes] 95 | __u16 internal_attributes; | ^~~~~~~~~~~~~~~~~~~ zip.c:108:8: error: packed attribute causes inefficient alignment for 'magic' [-Werror=attributes] 108 | __u32 magic; | ^~~~~ zip.c:110:8: error: packed attribute causes inefficient alignment for 'min_version' [-Werror=attributes] 110 | __u16 min_version; | ^~~~~~~~~~~ zip.c:111:8: error: packed attribute causes inefficient alignment for 'flags' [-Werror=attributes] 111 | __u16 flags; | ^~~~~ zip.c:112:8: error: packed attribute causes inefficient alignment for 'compression' [-Werror=attributes] 112 | __u16 compression; | ^~~~~~~~~~~ zip.c:113:8: error: packed attribute causes inefficient alignment for 'last_modified_time' [-Werror=attributes] 113 | __u16 last_modified_time; | ^~~~~~~~~~~~~~~~~~ zip.c:114:8: error: packed attribute causes inefficient alignment for 'last_modified_date' [-Werror=attributes] 114 | __u16 last_modified_date; | ^~~~~~~~~~~~~~~~~~ zip.c:118:8: error: packed attribute causes inefficient alignment for 'file_name_length' [-Werror=attributes] 118 | __u16 file_name_length; | ^~~~~~~~~~~~~~~~ zip.c:119:8: error: packed attribute causes inefficient alignment for 'extra_field_length' [-Werror=attributes] 119 | __u16 extra_field_length; | ^~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Build links, https://storage.tuxsuite.com/public/linaro/lkft/builds/2MfXEyvgh4ba9y3rkt6KPf6sUMR/ 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: next: zip.c:35:8: error: packed attribute causes inefficient alignment for 'magic' [-Werror=attributes] 2023-03-14 6:38 next: zip.c:35:8: error: packed attribute causes inefficient alignment for 'magic' [-Werror=attributes] Naresh Kamboju @ 2023-03-14 18:52 ` Andrii Nakryiko 2023-03-14 20:01 ` Ian Rogers 0 siblings, 1 reply; 5+ messages in thread From: Andrii Nakryiko @ 2023-03-14 18:52 UTC (permalink / raw) To: Naresh Kamboju, Jiri Olsa, Arnaldo Carvalho de Melo, Namhyung Kim, Ian Rogers, Daniel Müller Cc: open list, bpf, lkft-triage, Linux-Next Mailing List, Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann, Song Liu, Yonghong Song, KP Singh, Anders Roxell On Mon, Mar 13, 2023 at 11:38 PM Naresh Kamboju <naresh.kamboju@linaro.org> wrote: > > perf builds failing from Linux next-20230307..next-20230314 but pass on > Linux mainline v6.3-rc2. > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> 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=attributes] > 35 | __u32 magic; > | ^~~~~ > zip.c:40:8: error: packed attribute causes inefficient alignment for > 'this_disk' [-Werror=attributes] > 40 | __u16 this_disk; > | ^~~~~~~~~ > zip.c:45:8: error: packed attribute causes inefficient alignment for > 'cd_disk' [-Werror=attributes] > 45 | __u16 cd_disk; > | ^~~~~~~ > zip.c:50:8: error: packed attribute causes inefficient alignment for > 'cd_records' [-Werror=attributes] > 50 | __u16 cd_records; > | ^~~~~~~~~~ > zip.c:55:8: error: packed attribute causes inefficient alignment for > 'cd_records_total' [-Werror=attributes] > 55 | __u16 cd_records_total; > | ^~~~~~~~~~~~~~~~ > zip.c:58:8: error: packed attribute causes inefficient alignment for > 'cd_size' [-Werror=attributes] > 58 | __u32 cd_size; > | ^~~~~~~ > zip.c:63:8: error: packed attribute causes inefficient alignment for > 'cd_offset' [-Werror=attributes] > 63 | __u32 cd_offset; > | ^~~~~~~~~ > zip.c:66:8: error: packed attribute causes inefficient alignment for > 'comment_length' [-Werror=attributes] > 66 | __u16 comment_length; > | ^~~~~~~~~~~~~~ > zip.c:79:8: error: packed attribute causes inefficient alignment for > 'magic' [-Werror=attributes] > 79 | __u32 magic; > | ^~~~~ > zip.c:80:8: error: packed attribute causes inefficient alignment for > 'version' [-Werror=attributes] > 80 | __u16 version; > | ^~~~~~~ > zip.c:82:8: error: packed attribute causes inefficient alignment for > 'min_version' [-Werror=attributes] > 82 | __u16 min_version; > | ^~~~~~~~~~~ > zip.c:83:8: error: packed attribute causes inefficient alignment for > 'flags' [-Werror=attributes] > 83 | __u16 flags; > | ^~~~~ > zip.c:84:8: error: packed attribute causes inefficient alignment for > 'compression' [-Werror=attributes] > 84 | __u16 compression; > | ^~~~~~~~~~~ > zip.c:85:8: error: packed attribute causes inefficient alignment for > 'last_modified_time' [-Werror=attributes] > 85 | __u16 last_modified_time; > | ^~~~~~~~~~~~~~~~~~ > zip.c:86:8: error: packed attribute causes inefficient alignment for > 'last_modified_date' [-Werror=attributes] > 86 | __u16 last_modified_date; > | ^~~~~~~~~~~~~~~~~~ > zip.c:87:8: error: packed attribute causes inefficient alignment for > 'crc' [-Werror=attributes] > 87 | __u32 crc; > | ^~~ > zip.c:88:8: error: packed attribute causes inefficient alignment for > 'compressed_size' [-Werror=attributes] > 88 | __u32 compressed_size; > | ^~~~~~~~~~~~~~~ > zip.c:89:8: error: packed attribute causes inefficient alignment for > 'uncompressed_size' [-Werror=attributes] > 89 | __u32 uncompressed_size; > | ^~~~~~~~~~~~~~~~~ > zip.c:90:8: error: packed attribute causes inefficient alignment for > 'file_name_length' [-Werror=attributes] > 90 | __u16 file_name_length; > | ^~~~~~~~~~~~~~~~ > zip.c:91:8: error: packed attribute causes inefficient alignment for > 'extra_field_length' [-Werror=attributes] > 91 | __u16 extra_field_length; > | ^~~~~~~~~~~~~~~~~~ > zip.c:92:8: error: packed attribute causes inefficient alignment for > 'file_comment_length' [-Werror=attributes] > 92 | __u16 file_comment_length; > | ^~~~~~~~~~~~~~~~~~~ > zip.c:94:8: error: packed attribute causes inefficient alignment for > 'disk' [-Werror=attributes] > 94 | __u16 disk; > | ^~~~ > zip.c:95:8: error: packed attribute causes inefficient alignment for > 'internal_attributes' [-Werror=attributes] > 95 | __u16 internal_attributes; > | ^~~~~~~~~~~~~~~~~~~ > zip.c:108:8: error: packed attribute causes inefficient alignment for > 'magic' [-Werror=attributes] > 108 | __u32 magic; > | ^~~~~ > zip.c:110:8: error: packed attribute causes inefficient alignment for > 'min_version' [-Werror=attributes] > 110 | __u16 min_version; > | ^~~~~~~~~~~ > zip.c:111:8: error: packed attribute causes inefficient alignment for > 'flags' [-Werror=attributes] > 111 | __u16 flags; > | ^~~~~ > zip.c:112:8: error: packed attribute causes inefficient alignment for > 'compression' [-Werror=attributes] > 112 | __u16 compression; > | ^~~~~~~~~~~ > zip.c:113:8: error: packed attribute causes inefficient alignment for > 'last_modified_time' [-Werror=attributes] > 113 | __u16 last_modified_time; > | ^~~~~~~~~~~~~~~~~~ > zip.c:114:8: error: packed attribute causes inefficient alignment for > 'last_modified_date' [-Werror=attributes] > 114 | __u16 last_modified_date; > | ^~~~~~~~~~~~~~~~~~ > zip.c:118:8: error: packed attribute causes inefficient alignment for > 'file_name_length' [-Werror=attributes] > 118 | __u16 file_name_length; > | ^~~~~~~~~~~~~~~~ > zip.c:119:8: error: packed attribute causes inefficient alignment for > 'extra_field_length' [-Werror=attributes] > 119 | __u16 extra_field_length; > | ^~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors > > Build links, > https://storage.tuxsuite.com/public/linaro/lkft/builds/2MfXEyvgh4ba9y3rkt6KPf6sUMR/ > > > 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: next: zip.c:35:8: error: packed attribute causes inefficient alignment for 'magic' [-Werror=attributes] 2023-03-14 18:52 ` Andrii Nakryiko @ 2023-03-14 20:01 ` Ian Rogers 2023-03-14 23:56 ` Andrii Nakryiko 0 siblings, 1 reply; 5+ messages in thread From: Ian Rogers @ 2023-03-14 20:01 UTC (permalink / raw) To: Andrii Nakryiko Cc: Naresh Kamboju, Jiri Olsa, Arnaldo Carvalho de Melo, Namhyung Kim, Daniel Müller, open list, bpf, lkft-triage, Linux-Next Mailing List, Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann, Song Liu, Yonghong Song, KP Singh, Anders Roxell On Tue, Mar 14, 2023 at 11:52 AM Andrii Nakryiko <andrii.nakryiko@gmail.com> wrote: > > On Mon, Mar 13, 2023 at 11:38 PM Naresh Kamboju > <naresh.kamboju@linaro.org> wrote: > > > > perf builds failing from Linux next-20230307..next-20230314 but pass on > > Linux mainline v6.3-rc2. > > > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> > > 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=perf-tools#n194 Thanks, Ian > > > > Build log: > > --- > > libbpf/staticobjs/zip.o > > zip.c:35:8: error: packed attribute causes inefficient alignment for > > 'magic' [-Werror=attributes] > > 35 | __u32 magic; > > | ^~~~~ > > zip.c:40:8: error: packed attribute causes inefficient alignment for > > 'this_disk' [-Werror=attributes] > > 40 | __u16 this_disk; > > | ^~~~~~~~~ > > zip.c:45:8: error: packed attribute causes inefficient alignment for > > 'cd_disk' [-Werror=attributes] > > 45 | __u16 cd_disk; > > | ^~~~~~~ > > zip.c:50:8: error: packed attribute causes inefficient alignment for > > 'cd_records' [-Werror=attributes] > > 50 | __u16 cd_records; > > | ^~~~~~~~~~ > > zip.c:55:8: error: packed attribute causes inefficient alignment for > > 'cd_records_total' [-Werror=attributes] > > 55 | __u16 cd_records_total; > > | ^~~~~~~~~~~~~~~~ > > zip.c:58:8: error: packed attribute causes inefficient alignment for > > 'cd_size' [-Werror=attributes] > > 58 | __u32 cd_size; > > | ^~~~~~~ > > zip.c:63:8: error: packed attribute causes inefficient alignment for > > 'cd_offset' [-Werror=attributes] > > 63 | __u32 cd_offset; > > | ^~~~~~~~~ > > zip.c:66:8: error: packed attribute causes inefficient alignment for > > 'comment_length' [-Werror=attributes] > > 66 | __u16 comment_length; > > | ^~~~~~~~~~~~~~ > > zip.c:79:8: error: packed attribute causes inefficient alignment for > > 'magic' [-Werror=attributes] > > 79 | __u32 magic; > > | ^~~~~ > > zip.c:80:8: error: packed attribute causes inefficient alignment for > > 'version' [-Werror=attributes] > > 80 | __u16 version; > > | ^~~~~~~ > > zip.c:82:8: error: packed attribute causes inefficient alignment for > > 'min_version' [-Werror=attributes] > > 82 | __u16 min_version; > > | ^~~~~~~~~~~ > > zip.c:83:8: error: packed attribute causes inefficient alignment for > > 'flags' [-Werror=attributes] > > 83 | __u16 flags; > > | ^~~~~ > > zip.c:84:8: error: packed attribute causes inefficient alignment for > > 'compression' [-Werror=attributes] > > 84 | __u16 compression; > > | ^~~~~~~~~~~ > > zip.c:85:8: error: packed attribute causes inefficient alignment for > > 'last_modified_time' [-Werror=attributes] > > 85 | __u16 last_modified_time; > > | ^~~~~~~~~~~~~~~~~~ > > zip.c:86:8: error: packed attribute causes inefficient alignment for > > 'last_modified_date' [-Werror=attributes] > > 86 | __u16 last_modified_date; > > | ^~~~~~~~~~~~~~~~~~ > > zip.c:87:8: error: packed attribute causes inefficient alignment for > > 'crc' [-Werror=attributes] > > 87 | __u32 crc; > > | ^~~ > > zip.c:88:8: error: packed attribute causes inefficient alignment for > > 'compressed_size' [-Werror=attributes] > > 88 | __u32 compressed_size; > > | ^~~~~~~~~~~~~~~ > > zip.c:89:8: error: packed attribute causes inefficient alignment for > > 'uncompressed_size' [-Werror=attributes] > > 89 | __u32 uncompressed_size; > > | ^~~~~~~~~~~~~~~~~ > > zip.c:90:8: error: packed attribute causes inefficient alignment for > > 'file_name_length' [-Werror=attributes] > > 90 | __u16 file_name_length; > > | ^~~~~~~~~~~~~~~~ > > zip.c:91:8: error: packed attribute causes inefficient alignment for > > 'extra_field_length' [-Werror=attributes] > > 91 | __u16 extra_field_length; > > | ^~~~~~~~~~~~~~~~~~ > > zip.c:92:8: error: packed attribute causes inefficient alignment for > > 'file_comment_length' [-Werror=attributes] > > 92 | __u16 file_comment_length; > > | ^~~~~~~~~~~~~~~~~~~ > > zip.c:94:8: error: packed attribute causes inefficient alignment for > > 'disk' [-Werror=attributes] > > 94 | __u16 disk; > > | ^~~~ > > zip.c:95:8: error: packed attribute causes inefficient alignment for > > 'internal_attributes' [-Werror=attributes] > > 95 | __u16 internal_attributes; > > | ^~~~~~~~~~~~~~~~~~~ > > zip.c:108:8: error: packed attribute causes inefficient alignment for > > 'magic' [-Werror=attributes] > > 108 | __u32 magic; > > | ^~~~~ > > zip.c:110:8: error: packed attribute causes inefficient alignment for > > 'min_version' [-Werror=attributes] > > 110 | __u16 min_version; > > | ^~~~~~~~~~~ > > zip.c:111:8: error: packed attribute causes inefficient alignment for > > 'flags' [-Werror=attributes] > > 111 | __u16 flags; > > | ^~~~~ > > zip.c:112:8: error: packed attribute causes inefficient alignment for > > 'compression' [-Werror=attributes] > > 112 | __u16 compression; > > | ^~~~~~~~~~~ > > zip.c:113:8: error: packed attribute causes inefficient alignment for > > 'last_modified_time' [-Werror=attributes] > > 113 | __u16 last_modified_time; > > | ^~~~~~~~~~~~~~~~~~ > > zip.c:114:8: error: packed attribute causes inefficient alignment for > > 'last_modified_date' [-Werror=attributes] > > 114 | __u16 last_modified_date; > > | ^~~~~~~~~~~~~~~~~~ > > zip.c:118:8: error: packed attribute causes inefficient alignment for > > 'file_name_length' [-Werror=attributes] > > 118 | __u16 file_name_length; > > | ^~~~~~~~~~~~~~~~ > > zip.c:119:8: error: packed attribute causes inefficient alignment for > > 'extra_field_length' [-Werror=attributes] > > 119 | __u16 extra_field_length; > > | ^~~~~~~~~~~~~~~~~~ > > cc1: all warnings being treated as errors > > > > Build links, > > https://storage.tuxsuite.com/public/linaro/lkft/builds/2MfXEyvgh4ba9y3rkt6KPf6sUMR/ > > > > > > 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: next: zip.c:35:8: error: packed attribute causes inefficient alignment for 'magic' [-Werror=attributes] 2023-03-14 20:01 ` Ian Rogers @ 2023-03-14 23:56 ` Andrii Nakryiko 2023-03-15 15:17 ` Daniel Müller 0 siblings, 1 reply; 5+ messages in thread From: Andrii Nakryiko @ 2023-03-14 23:56 UTC (permalink / raw) To: Ian Rogers Cc: Naresh Kamboju, Jiri Olsa, Arnaldo Carvalho de Melo, Namhyung Kim, Daniel Müller, open list, bpf, lkft-triage, Linux-Next Mailing List, Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann, Song Liu, Yonghong Song, KP Singh, Anders Roxell On Tue, Mar 14, 2023 at 1:01 PM Ian Rogers <irogers@google.com> wrote: > > On Tue, Mar 14, 2023 at 11:52 AM Andrii Nakryiko > <andrii.nakryiko@gmail.com> wrote: > > > > On Mon, Mar 13, 2023 at 11:38 PM Naresh Kamboju > > <naresh.kamboju@linaro.org> wrote: > > > > > > perf builds failing from Linux next-20230307..next-20230314 but pass on > > > Linux mainline v6.3-rc2. > > > > > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> > > > > 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=perf-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=attributes] > > > 35 | __u32 magic; > > > | ^~~~~ > > > zip.c:40:8: error: packed attribute causes inefficient alignment for > > > 'this_disk' [-Werror=attributes] > > > 40 | __u16 this_disk; > > > | ^~~~~~~~~ > > > zip.c:45:8: error: packed attribute causes inefficient alignment for > > > 'cd_disk' [-Werror=attributes] > > > 45 | __u16 cd_disk; > > > | ^~~~~~~ > > > zip.c:50:8: error: packed attribute causes inefficient alignment for > > > 'cd_records' [-Werror=attributes] > > > 50 | __u16 cd_records; > > > | ^~~~~~~~~~ > > > zip.c:55:8: error: packed attribute causes inefficient alignment for > > > 'cd_records_total' [-Werror=attributes] > > > 55 | __u16 cd_records_total; > > > | ^~~~~~~~~~~~~~~~ > > > zip.c:58:8: error: packed attribute causes inefficient alignment for > > > 'cd_size' [-Werror=attributes] > > > 58 | __u32 cd_size; > > > | ^~~~~~~ > > > zip.c:63:8: error: packed attribute causes inefficient alignment for > > > 'cd_offset' [-Werror=attributes] > > > 63 | __u32 cd_offset; > > > | ^~~~~~~~~ > > > zip.c:66:8: error: packed attribute causes inefficient alignment for > > > 'comment_length' [-Werror=attributes] > > > 66 | __u16 comment_length; > > > | ^~~~~~~~~~~~~~ > > > zip.c:79:8: error: packed attribute causes inefficient alignment for > > > 'magic' [-Werror=attributes] > > > 79 | __u32 magic; > > > | ^~~~~ > > > zip.c:80:8: error: packed attribute causes inefficient alignment for > > > 'version' [-Werror=attributes] > > > 80 | __u16 version; > > > | ^~~~~~~ > > > zip.c:82:8: error: packed attribute causes inefficient alignment for > > > 'min_version' [-Werror=attributes] > > > 82 | __u16 min_version; > > > | ^~~~~~~~~~~ > > > zip.c:83:8: error: packed attribute causes inefficient alignment for > > > 'flags' [-Werror=attributes] > > > 83 | __u16 flags; > > > | ^~~~~ > > > zip.c:84:8: error: packed attribute causes inefficient alignment for > > > 'compression' [-Werror=attributes] > > > 84 | __u16 compression; > > > | ^~~~~~~~~~~ > > > zip.c:85:8: error: packed attribute causes inefficient alignment for > > > 'last_modified_time' [-Werror=attributes] > > > 85 | __u16 last_modified_time; > > > | ^~~~~~~~~~~~~~~~~~ > > > zip.c:86:8: error: packed attribute causes inefficient alignment for > > > 'last_modified_date' [-Werror=attributes] > > > 86 | __u16 last_modified_date; > > > | ^~~~~~~~~~~~~~~~~~ > > > zip.c:87:8: error: packed attribute causes inefficient alignment for > > > 'crc' [-Werror=attributes] > > > 87 | __u32 crc; > > > | ^~~ > > > zip.c:88:8: error: packed attribute causes inefficient alignment for > > > 'compressed_size' [-Werror=attributes] > > > 88 | __u32 compressed_size; > > > | ^~~~~~~~~~~~~~~ > > > zip.c:89:8: error: packed attribute causes inefficient alignment for > > > 'uncompressed_size' [-Werror=attributes] > > > 89 | __u32 uncompressed_size; > > > | ^~~~~~~~~~~~~~~~~ > > > zip.c:90:8: error: packed attribute causes inefficient alignment for > > > 'file_name_length' [-Werror=attributes] > > > 90 | __u16 file_name_length; > > > | ^~~~~~~~~~~~~~~~ > > > zip.c:91:8: error: packed attribute causes inefficient alignment for > > > 'extra_field_length' [-Werror=attributes] > > > 91 | __u16 extra_field_length; > > > | ^~~~~~~~~~~~~~~~~~ > > > zip.c:92:8: error: packed attribute causes inefficient alignment for > > > 'file_comment_length' [-Werror=attributes] > > > 92 | __u16 file_comment_length; > > > | ^~~~~~~~~~~~~~~~~~~ > > > zip.c:94:8: error: packed attribute causes inefficient alignment for > > > 'disk' [-Werror=attributes] > > > 94 | __u16 disk; > > > | ^~~~ > > > zip.c:95:8: error: packed attribute causes inefficient alignment for > > > 'internal_attributes' [-Werror=attributes] > > > 95 | __u16 internal_attributes; > > > | ^~~~~~~~~~~~~~~~~~~ > > > zip.c:108:8: error: packed attribute causes inefficient alignment for > > > 'magic' [-Werror=attributes] > > > 108 | __u32 magic; > > > | ^~~~~ > > > zip.c:110:8: error: packed attribute causes inefficient alignment for > > > 'min_version' [-Werror=attributes] > > > 110 | __u16 min_version; > > > | ^~~~~~~~~~~ > > > zip.c:111:8: error: packed attribute causes inefficient alignment for > > > 'flags' [-Werror=attributes] > > > 111 | __u16 flags; > > > | ^~~~~ > > > zip.c:112:8: error: packed attribute causes inefficient alignment for > > > 'compression' [-Werror=attributes] > > > 112 | __u16 compression; > > > | ^~~~~~~~~~~ > > > zip.c:113:8: error: packed attribute causes inefficient alignment for > > > 'last_modified_time' [-Werror=attributes] > > > 113 | __u16 last_modified_time; > > > | ^~~~~~~~~~~~~~~~~~ > > > zip.c:114:8: error: packed attribute causes inefficient alignment for > > > 'last_modified_date' [-Werror=attributes] > > > 114 | __u16 last_modified_date; > > > | ^~~~~~~~~~~~~~~~~~ > > > zip.c:118:8: error: packed attribute causes inefficient alignment for > > > 'file_name_length' [-Werror=attributes] > > > 118 | __u16 file_name_length; > > > | ^~~~~~~~~~~~~~~~ > > > zip.c:119:8: error: packed attribute causes inefficient alignment for > > > 'extra_field_length' [-Werror=attributes] > > > 119 | __u16 extra_field_length; > > > | ^~~~~~~~~~~~~~~~~~ > > > cc1: all warnings being treated as errors > > > > > > Build links, > > > https://storage.tuxsuite.com/public/linaro/lkft/builds/2MfXEyvgh4ba9y3rkt6KPf6sUMR/ > > > > > > > > > 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: next: zip.c:35:8: error: packed attribute causes inefficient alignment for 'magic' [-Werror=attributes] 2023-03-14 23:56 ` Andrii Nakryiko @ 2023-03-15 15:17 ` Daniel Müller 0 siblings, 0 replies; 5+ messages in thread From: Daniel Müller @ 2023-03-15 15:17 UTC (permalink / raw) To: Andrii Nakryiko Cc: Ian Rogers, Naresh Kamboju, Jiri Olsa, Arnaldo Carvalho de Melo, Namhyung Kim, open list, bpf, lkft-triage, Linux-Next Mailing List, Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann, Song Liu, Yonghong Song, KP Singh, Anders Roxell On Tue, Mar 14, 2023 at 04:56:15PM -0700, Andrii Nakryiko wrote: > On Tue, Mar 14, 2023 at 1:01 PM Ian Rogers <irogers@google.com> wrote: > > > > On Tue, Mar 14, 2023 at 11:52 AM Andrii Nakryiko > > <andrii.nakryiko@gmail.com> wrote: > > > > > > On Mon, Mar 13, 2023 at 11:38 PM Naresh Kamboju > > > <naresh.kamboju@linaro.org> wrote: > > > > > > > > perf builds failing from Linux next-20230307..next-20230314 but pass on > > > > Linux mainline v6.3-rc2. > > > > > > > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> > > > > > > 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=perf-tools#n194 > > > > Ok, let's do the same here. Daniel, can you please send a follow up > patch to silence this warning? Sounds good. Thanks, Daniel ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-15 15:18 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-03-14 6:38 next: zip.c:35:8: error: packed attribute causes inefficient alignment for 'magic' [-Werror=attributes] Naresh Kamboju 2023-03-14 18:52 ` Andrii Nakryiko 2023-03-14 20:01 ` Ian Rogers 2023-03-14 23:56 ` Andrii Nakryiko 2023-03-15 15:17 ` Daniel Müller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).