All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Eelco Chaudron <echaudro@redhat.com>, bpf@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org, ast@kernel.org,
	daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com,
	yhs@fb.com, andriin@fb.com
Subject: Re: [PATCH bpf-next] libbpf: fix probe code to return EPERM if encountered
Date: Thu, 30 Apr 2020 12:49:26 +0200	[thread overview]
Message-ID: <87tv11s0y1.fsf@toke.dk> (raw)
In-Reply-To: <158824221003.2338.9700507405752328930.stgit@ebuild>

Eelco Chaudron <echaudro@redhat.com> writes:

> When the probe code was failing for any reason ENOTSUP was returned, even
> if this was due to no having enough lock space. This patch fixes this by
> returning EPERM to the user application, so it can respond and increase
> the RLIMIT_MEMLOCK size.
>
> Signed-off-by: Eelco Chaudron <echaudro@redhat.com>

Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>

For context - we ran into this in xdp-tools where we've implemented
"fiddle rlimit and retry" logic in response to EPERM errors, and
suddenly we were seeing ENOTSUP errors instead. See discussion here:

https://github.com/xdp-project/xdp-tools/pull/16

-Toke


  reply	other threads:[~2020-04-30 10:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30 10:23 [PATCH bpf-next] libbpf: fix probe code to return EPERM if encountered Eelco Chaudron
2020-04-30 10:49 ` Toke Høiland-Jørgensen [this message]
2020-04-30 18:12 ` Andrii Nakryiko
2020-05-01  9:56   ` Eelco Chaudron
2020-05-01 19:16     ` Andrii Nakryiko
2020-05-04  8:57       ` Eelco Chaudron

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=87tv11s0y1.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=echaudro@redhat.com \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.