lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 4 Oct 2023 16:01:33 -0700
From: Florian Fainelli <florian.fainelli@...adcom.com>
To: Markus Mayer <mmayer@...adcom.com>, netdev@...r.kernel.org,
 Michal Kubecek <mkubecek@...e.cz>
Subject: Re: Bug in 6.5 tar-ball

+Michal,

On 10/4/23 14:27, Markus Mayer wrote:
> Hi,
> 
> It would seem I discovered an issue with the ethtool-6.5 tar-balls on
> cdn.kernel.org. They are missing the const.h header file. Maybe other
> files too.
> 
> Please verify as follows:
> 
> $ curl -s -o - https://cdn.kernel.org/pub/software/network/ethtool/ethtool-6.5.tar.xz
> | \
>      tar tJf - | grep const
> [no output]
> 
> $ curl -s -o - https://cdn.kernel.org/pub/software/network/ethtool/ethtool-6.5.tar.gz
> | \
>      tar tzf - | grep const
> [no output]
> 
> Meanwhile, this tar-ball seems correct:
> 
> $ curl -s -o - https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/snapshot/ethtool-6.5.tar.gz
> | \
>      tar tzf - | grep const
> ethtool-6.5/uapi/linux/const.h
> 
> So, the tar-ball directly taken from git.kernel.org does have const.h,
> but the two from cdn.kernel.org do not.

The latter is a snapshot of the git directory so that is why it works.

> 
> This is currently leading to build problems for me.
> 
> /storage/buildroot/output/arm64/host/bin/aarch64-linux-gcc
> -DHAVE_CONFIG_H -I.  -I./uapi  -D_LARGEFILE_SOURCE
> -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wextra
> -D_POSIX_C_SOURCE=200809L -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D_FILE_OFFSET_BITS=64  -Os -g0 -D_FORTIFY_SOURCE=2 -std=gnu11 -c -o
> netlink/rings.o netlink/rings.c
> In file included from internal.h:45,
>                   from common.c:7:
> ./uapi/linux/ethtool.h:1507:19: warning: implicit declaration of
> function '__KERNEL_DIV_ROUND_UP' [-Wimplicit-function-declaration]
>    __u32 queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)];
>                     ^~~~~~~~~~~~~~~~~~~~~
> ./uapi/linux/ethtool.h:1507:8: error: variably modified 'queue_mask'
> at file scope
>    __u32 queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)];
>          ^~~~~~~~~~
> make[3]: *** [Makefile:1410: common.o] Error 1
> make[3]: *** Waiting for unfinished jobs....
> 
> There are, of course, ways to work around it, but the tar-balls should
> be fixed, since I won't be the only one hitting this problem.

Seems like we need to amend Makefile.am with all of the uapi files that 
we include, this should do it:

diff --git a/Makefile.am b/Makefile.am
index ae3b667696db..b9e06ad15889 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,8 +6,12 @@ man_MANS = ethtool.8
  EXTRA_DIST = LICENSE ethtool.8 ethtool.spec.in aclocal.m4 ChangeLog 
autogen.sh

  sbin_PROGRAMS = ethtool
-ethtool_SOURCES = ethtool.c uapi/linux/ethtool.h internal.h \
+ethtool_SOURCES = ethtool.c uapi/linux/const.h uapi/linux/ethtool.h 
internal.h \
                   uapi/linux/net_tstamp.h uapi/linux/if.h 
uapi/linux/hdlc/ioctl.h \
+                 uapi/linux/if_addr.h uapi/linux/if_ether.h 
uapi/linux/if_link.h \
+                 uapi/linux/libc-compat.h uapi/linux/net_tstamp.h 
uapi/linux/neighbour.h \
+                 uapi/linux/posix_types.h uapi/linux/rtnetlink.h 
uapi/linux/socket.h \
+                 uapi/linux/stddef.h uapi/linux/types.h \
                   rxclass.c common.c common.h \
                   json_writer.c json_writer.h json_print.c json_print.h \
                   list.h

./autogen.sh
configure
make dist
tar tzf ethtool-6.5.tar.gz | grep const.h
ethtool-6.5/uapi/linux/const.h
-- 
Florian


Download attachment "smime.p7s" of type "application/pkcs7-signature" (4221 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ