bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	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 21:41:42 +0200	[thread overview]
Message-ID: <0250363a-68a5-3152-b6df-2b2894a08abc@iogearbox.net> (raw)
In-Reply-To: <CAADnVQJorSsnhGef5_Nfdwe=G2XP2LXdetNRqCKpjJmkKhSN7g@mail.gmail.com>

On 5/28/20 8:38 PM, Alexei Starovoitov wrote:
> 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.

Fully agree, libbpf is the better place to provide a more user friendly
error especially given the older kernel case.

      reply	other threads:[~2020-05-28 19:41 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
2020-05-28 19:41         ` Daniel Borkmann [this message]

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=0250363a-68a5-3152-b6df-2b2894a08abc@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=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).