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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAXyoMPP19LEMj-dYWFQmwdZgGbXOq+iYbONCAFx--PNN8TNoQ@mail.gmail.com>
Date: Mon, 8 Sep 2025 17:39:58 +0800
From: Yangfl <mmyangfl@...il.com>
To: Ido Schimmel <idosch@...dia.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	Simon Horman <horms@...nel.org>, Shuah Khan <shuah@...nel.org>, 
	Nikolay Aleksandrov <razor@...ckwall.org>, Andy Roulin <aroulin@...dia.com>, 
	Yong Wang <yongwang@...dia.com>, Petr Machata <petrm@...dia.com>, 
	Vladimir Oltean <vladimir.oltean@....com>, Amit Cohen <amcohen@...dia.com>, 
	Li Shuang <shuali@...hat.com>, Alessandro Zanni <alessandro.zanni87@...il.com>, 
	Xin Long <lucien.xin@...il.com>, Cong Wang <xiyou.wangcong@...il.com>, 
	linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2] selftests: forwarding: Reorder arguments to
 obey POSIX getopt

On Mon, Sep 8, 2025 at 2:52 PM Ido Schimmel <idosch@...dia.com> wrote:
>
> On Sun, Sep 07, 2025 at 01:04:35AM +0800, David Yang wrote:
> > Quoted from musl wiki:
> >
> >   GNU getopt permutes argv to pull options to the front, ahead of
> >   non-option arguments. musl and the POSIX standard getopt stop
> >   processing options at the first non-option argument with no
> >   permutation.
> >
> > Thus these scripts stop working on musl since non-option arguments do
> > not always come last. Fix it by reordering arguments.
> >
> > Signed-off-by: David Yang <mmyangfl@...il.com>
> >
> > v1: https://lore.kernel.org/r/20250905173947.3164807-1-mmyangfl@gmail.com
> >   - fix CI errors
> > ---
>
> A few comments:
>
> 1. You should have "---" under your SoB so that the changelog is not
> part of the commit message. Another option is to use "git notes" and
> passing "--notes" to "git format-patch".
>
> 2. Did you try a newer version of mausezahn? Seems the issue was fixed
> 2.5 years ago:
> https://github.com/netsniff-ng/netsniff-ng/pull/237/commits/f5dce56e74b005daec72c771d27d55964aa8efd7
>
> I feel like this change is fragile since current usage is in accordance
> with mausezahn man page.

Sorry, I didn't notice that.

But ping is still affected:
https://github.com/iputils/iputils/blob/master/ping/ping.c#L400

It's quite suspicious just replacing getopt with getopt_long given
that mausezahn does not use any long opts.

Should I fix (ar)ping only in selftests, or fix iputils with that trick instead?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ