From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A00EC2D0E2 for ; Tue, 22 Sep 2020 23:16:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 271B5221EF for ; Tue, 22 Sep 2020 23:16:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BsnFk9Wa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726762AbgIVXQu (ORCPT ); Tue, 22 Sep 2020 19:16:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726448AbgIVXQu (ORCPT ); Tue, 22 Sep 2020 19:16:50 -0400 Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB533C061755 for ; Tue, 22 Sep 2020 16:16:49 -0700 (PDT) Received: by mail-ot1-x342.google.com with SMTP id m13so12747157otl.9 for ; Tue, 22 Sep 2020 16:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ZqvQ2BJN+fxtbxTJ+f0dKXvswWsP77F104iJ+8/BjLE=; b=BsnFk9Wasu2CYlnHTnoD+5Gu76wCuPmh8RAFdD3s/xNLIOjcd0A+5LsWIqAijhAYb+ WF4aSEmgUVMeRgVo0+sP8MzYJCnzo+cpT+q/Lk/LIw0Ugp0nNPepk+HWphG3fc1lCyal rW2DO7jfMy2wVJgmSYos19mA4gzSBZpARIEU7hrG/yK6bYyqWrQ7396bsuGcxLwRtonM b+xZdTsRtW8bg+4J5x9m4LfUJRgZiijQJ+qcYtNHCgHHXY+C0c0BMZLQhpLqRQh8g77H MEWRY7tllb72kvtqndvPBsnnM40vfAJKDpNSJGI54+nSjI7ziHHTc5loaiitc/XDnosU pPEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZqvQ2BJN+fxtbxTJ+f0dKXvswWsP77F104iJ+8/BjLE=; b=RlHhaKjyi/He0EHRSSTfzskM+VDkPCFGmwBsrb1ArRPXiTOmbVguEV197G/HRtjm82 QN1IQjAbbKMY+O5/J4p4e5uZfPd8uLlRVjIxO/OPWVd4fDAMK7dkpwcwXQy7eVYNCELm lN7XyShsYoad4z10vXFtSnluxgK6g9ZKv9SM1btJEjZQ00T3Aw8RDs438OyiBunTPr1U TSOJ1YmQTQgaPHlLyaHmUR35326+6TMDA/9UA19xPE26tAGoSmLsY/wpi+fOuL5njf0V 6vtyy0uDszCqT79IGK9PidkDZCg/to8YpPWCmJqEtZdx784dTgViE7yhC516I83EtE0M tU6Q== X-Gm-Message-State: AOAM531udZvSEqFUgdX/L9KfPH+c1k0yNCDziQa9wYTHXdspJqYl5ISj E4yIPM5lt9il+XjQm8hmSZ53uAplrJTQgQ== X-Google-Smtp-Source: ABdhPJyzQ0qTaHuTO4+WbylhVEqRmNkdOgzuMv0Mh8iFz2dswOfTJSP8n73zzinwjWx4NFJEQIhmlg== X-Received: by 2002:a9d:4c01:: with SMTP id l1mr4426612otf.341.1600816609011; Tue, 22 Sep 2020 16:16:49 -0700 (PDT) Received: from Davids-MacBook-Pro.local ([2601:282:803:7700:1cd7:3896:e667:9e25]) by smtp.googlemail.com with ESMTPSA id x15sm8469014oor.33.2020.09.22.16.16.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Sep 2020 16:16:48 -0700 (PDT) Subject: Re: [PATCH iproute2] ip: do not exit if RTM_GETNSID failed To: Jan Engelhardt , Stephen Hemminger Cc: netdev@vger.kernel.org References: <20200921235318.14001-1-jengelh@inai.de> <20200921172232.7c51b6b7@hermes.lan> From: David Ahern Message-ID: <7214fc31-42f4-2a47-0f01-426bed14711d@gmail.com> Date: Tue, 22 Sep 2020 17:16:46 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 9/22/20 12:28 AM, Jan Engelhardt wrote: > > On Tuesday 2020-09-22 02:22, Stephen Hemminger wrote: >> Jan Engelhardt 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: 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 >> >> 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.