From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "David Windsor" <dwindsor@gmail.com>
Cc: <bpf@vger.kernel.org>, <daniel@iogearbox.net>,
<andrii@kernel.org>, <eddyz87@gmail.com>, <memxor@gmail.com>,
<a.s.protopopov@gmail.com>
Subject: Re: [PATCH v3 bpf-next 05/11] resolve_btfids: Tag the functions that return errors
Date: Sat, 14 Nov 2026 23:31:44 +0000 [thread overview]
Message-ID: <DMVBQIN4TRA3.3Q23K4YDZMP1A@gmail.com> (raw)
In-Reply-To: <CAEXv5_hR=RNzwqYB=q=X_CiYSq6E2if6YaS1TiVU4LMvzfnmNA@mail.gmail.com>
On Sat Nov 14, 2026 at 9:07 PM UTC, David Windsor wrote:
> On Sat, Nov 14, 2026 at 3:00 PM Alexei Starovoitov
> <alexei.starovoitov@gmail.com> wrote:
>>
>> On Sat, Nov 14, 2026 at 11:37 AM David Windsor <dwindsor@gmail.com> wrote:
>> > Do we also need -EBUSY here as an exception? crypto_enqueue_request
>> > uses it to mean the request was queued on the backlog (not that it
>> > failed)
>>
>> Good point. -EBUSY is not a failure there, -ENOSPC is.
>> A prog that returns -EBUSY skips the list_add_tail().
>> crypto_wait_req() then waits for a completion that never comes.
>>
>> In most other functions -EBUSY is a plain failure, so means_failure()
>> can't drop it for all.
>> ccp_enqueue_cmd() and qat_alg_send_message_maybacklog() have such
>> a backlog too. All three also return -EINPROGRESS.
>> So drop -EBUSY only if the function returns -EINPROGRESS too.
>> crypto_enqueue_request() stays a target with -ENOSPC.
>>
>> Here is proposed follow up... other ideas?
>>
>
> Looks good, selftest looks right.
sent a follow up, since it's trivial and doesn't change fmodret list.
> Other interesting edge cases my bot identified:
>
> 1. bit_wait() in kernel/sched/wait_bit.c returns -EINTR to report the
> status of the waiting task, not to indicate failure
> 2. try_mem_charge_cg returns -ENOMEM, but callers might not be set up
> to handle it, it can be masked by __GFP_NOFAIL. Such callers won't
> expect an error there.
BTF can answer that, but I'm going to table that for now,
since chasing long tail is never going to end.
We're not aiming for 100% safety.
next prev parent reply other threads:[~2026-11-14 23:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 5:17 [PATCH v3 bpf-next 00/11] bpf: fmod_ret for each function that returns errors Alexei Starovoitov
2026-11-14 5:17 ` [PATCH v3 bpf-next 01/11] selftests/bpf: Don't depend on the width of a BTF id in verifier_live_stack Alexei Starovoitov
2026-11-14 5:17 ` [PATCH v3 bpf-next 02/11] resolve_btfids: Read the code of an ELF file by address Alexei Starovoitov
2026-11-14 5:17 ` [PATCH v3 bpf-next 03/11] resolve_btfids: Describe machine instructions with LLVM's MC layer Alexei Starovoitov
2026-11-14 5:17 ` [PATCH v3 bpf-next 04/11] resolve_btfids: Find the definitions that reach the return value Alexei Starovoitov
2026-11-14 5:17 ` [PATCH v3 bpf-next 05/11] resolve_btfids: Tag the functions that return errors Alexei Starovoitov
2026-11-14 6:05 ` bot+bpf-ci
2026-11-14 19:37 ` David Windsor
2026-11-14 20:00 ` Alexei Starovoitov
2026-11-14 21:07 ` David Windsor
2026-11-14 21:12 ` David Windsor
2026-11-14 23:31 ` Alexei Starovoitov [this message]
2026-11-14 5:18 ` [PATCH v3 bpf-next 06/11] resolve_btfids: Fold the constants of a select without a branch Alexei Starovoitov
2026-11-14 5:18 ` [PATCH v3 bpf-next 07/11] resolve_btfids: Say which registers an instruction reads Alexei Starovoitov
2026-11-14 5:18 ` [PATCH v3 bpf-next 08/11] resolve_btfids: Don't list an error that follows work on an argument Alexei Starovoitov
2026-11-14 6:05 ` bot+bpf-ci
2026-11-14 5:18 ` [PATCH v3 bpf-next 09/11] bpf: Allow fmod_ret on tagged functions and check the return value Alexei Starovoitov
2026-11-14 5:18 ` [PATCH v3 bpf-next 10/11] bpf: Require the JIT for fmod_ret programs on tagged 64-bit targets Alexei Starovoitov
2026-11-14 5:18 ` [PATCH v3 bpf-next 11/11] selftests/bpf: Test fmod_ret on tagged functions Alexei Starovoitov
2026-11-14 18:30 ` [PATCH v3 bpf-next 00/11] bpf: fmod_ret for each function that returns errors patchwork-bot+netdevbpf
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=DMVBQIN4TRA3.3Q23K4YDZMP1A@gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=a.s.protopopov@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dwindsor@gmail.com \
--cc=eddyz87@gmail.com \
--cc=memxor@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox