bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>,
	bpf <bpf@vger.kernel.org>,
	Daniel Borkmann <borkmann@iogearbox.net>,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH bpf-next V2] bpf: Fix map_check_no_btf return code
Date: Thu, 28 May 2020 11:38:42 -0700	[thread overview]
Message-ID: <CAADnVQJorSsnhGef5_Nfdwe=G2XP2LXdetNRqCKpjJmkKhSN7g@mail.gmail.com> (raw)
In-Reply-To: <CAEf4BzZ0L=J9PbYndB4rFLvBEnZR6opUppDnD=b9BXsR2AR0cQ@mail.gmail.com>

On Thu, May 28, 2020 at 11:21 AM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
>
> My biggest grudge with changing error code is that old error code will
> still be used in older kernels, so if libbpf were to help users with
> more helpful message, it now needs to support both error codes,
> forever, potentially depending on kernel version. This constant
> splitting of logic is annoying, so I'd rather avoid it.

+1.

I think what this patch is trying to do is to fix strerror() lack of
understanding of error code on the kernel side by changing
the error code.
There are plenty of similar places in the kernel.
I think it's better to fix strerror via wrapper that understand kernel
error codes.
There probably will be more than one such ENOTSUPP error.

  reply	other threads:[~2020-05-28 18:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 11:33 [PATCH bpf-next V2] bpf: Fix map_check_no_btf return code Jesper Dangaard Brouer
2020-05-27 22:59 ` Andrii Nakryiko
2020-05-28  7:08   ` Jesper Dangaard Brouer
2020-05-28 18:21     ` Andrii Nakryiko
2020-05-28 18:38       ` Alexei Starovoitov [this message]
2020-05-28 19:41         ` Daniel Borkmann

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='CAADnVQJorSsnhGef5_Nfdwe=G2XP2LXdetNRqCKpjJmkKhSN7g@mail.gmail.com' \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=borkmann@iogearbox.net \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=kuba@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).