From: Stephen Hemminger <stephen@networkplumber.org>
To: David Ahern <dsahern@gmail.com>
Cc: Jan Engelhardt <jengelh@inai.de>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] ip: do not exit if RTM_GETNSID failed
Date: Tue, 22 Sep 2020 16:57:49 -0700 [thread overview]
Message-ID: <20200922165749.3fb72ad6@hermes.lan> (raw)
In-Reply-To: <7214fc31-42f4-2a47-0f01-426bed14711d@gmail.com>
On Tue, 22 Sep 2020 17:16:46 -0600
David Ahern <dsahern@gmail.com> wrote:
> On 9/22/20 12:28 AM, Jan Engelhardt wrote:
> >
> > On Tuesday 2020-09-22 02:22, Stephen Hemminger wrote:
> >> Jan Engelhardt <jengelh@inai.de> wrote:
> >>
> >>> `ip addr` when run under qemu-user-riscv64, fails. This likely is
> >>> due to qemu-5.1 not doing translation of RTM_GETNSID calls.
> >>>
> >>> 2: host0@if5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
> >>> link/ether 5a:44:da:1a:c4:0b brd ff:ff:ff:ff:ff:ff
> >>> request send failed: Operation not supported
> >>>
> >>> Treat the situation similar to an absence of procfs.
> >>>
> >>> Signed-off-by: Jan Engelhardt <jengelh@inai.de>
> >>
> >> Not a good idea to hide a platform bug in ip command.
> >> When you do this, you risk creating all sorts of issues for people that
> >> run ip commands in container environments where the send is rejected (perhaps by SELinux)
> >> and then things go off into a different failure.
> >
> > In the very same function you do
> >
> > fd = open("/proc/self/ns/net", O_RDONLY);
> >
> > which equally hides a potential platform bug (namely, forgetting to
> > mount /proc in a chroot, or in case SELinux was improperly set-up).
> > Why is this measured two different ways?
> >
> >
>
> I think checking for EOPNOTSUPP error is more appropriate than ignoring
> all errors.
>
Right, checking for not supported makes sense, but permission denied
is different.
next prev parent reply other threads:[~2020-09-22 23:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 23:53 [PATCH iproute2] ip: do not exit if RTM_GETNSID failed Jan Engelhardt
2020-09-22 0:22 ` Stephen Hemminger
2020-09-22 6:28 ` Jan Engelhardt
2020-09-22 23:16 ` David Ahern
2020-09-22 23:57 ` Stephen Hemminger [this message]
2020-09-23 0:11 ` David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200922165749.3fb72ad6@hermes.lan \
--to=stephen@networkplumber.org \
--cc=dsahern@gmail.com \
--cc=jengelh@inai.de \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).