From: Martin KaFai Lau <kafai@fb.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <bpf@vger.kernel.org>, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>, <kernel-team@fb.com>,
<netdev@vger.kernel.org>, Song Liu <songliubraving@fb.com>
Subject: Re: [PATCH v2 bpf-next 3/4] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP
Date: Mon, 16 Nov 2020 10:51:51 -0800 [thread overview]
Message-ID: <20201116185151.iannqczqxmcj6xr4@kafai-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <20201116104340.60692716@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
On Mon, Nov 16, 2020 at 10:43:40AM -0800, Jakub Kicinski wrote:
> On Mon, 16 Nov 2020 10:37:49 -0800 Martin KaFai Lau wrote:
> > On Mon, Nov 16, 2020 at 10:00:04AM -0800, Jakub Kicinski wrote:
> > > Locks that can run in any context but preempt disabled or softirq
> > > disabled?
> > Not exactly. e.g. running from irq won't work.
> >
> > > Let me cut to the chase. Are you sure you didn't mean to check
> > > if (irq_count()) ?
> > so, no.
> >
> > From preempt.h:
> >
> > /*
> > * ...
> > * in_interrupt() - We're in NMI,IRQ,SoftIRQ context or have BH disabled
> > * ...
> > */
> > #define in_interrupt() (irq_count())
>
> Right, as I said in my correction (in_irq() || in_nmi()).
>
> Just to spell it out AFAIU in_serving_softirq() will return true when
> softirq is active and interrupted by a hard irq or an NMI.
I see what you have been getting at now.
Good point. will post a fix.
next prev parent reply other threads:[~2020-11-16 18:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 21:12 [PATCH v2 bpf-next 0/4] bpf: Enable bpf_sk_storage for FENTRY/FEXIT/RAW_TP Martin KaFai Lau
2020-11-12 21:13 ` [PATCH v2 bpf-next 1/4] bpf: Folding omem_charge() into sk_storage_charge() Martin KaFai Lau
2020-11-12 21:48 ` KP Singh
2020-11-12 21:13 ` [PATCH v2 bpf-next 2/4] bpf: Rename some functions in bpf_sk_storage Martin KaFai Lau
2020-11-12 21:47 ` KP Singh
2020-11-12 21:13 ` [PATCH v2 bpf-next 3/4] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP Martin KaFai Lau
2020-11-15 1:17 ` Jakub Kicinski
2020-11-16 17:37 ` Martin KaFai Lau
2020-11-16 18:00 ` Jakub Kicinski
2020-11-16 18:02 ` Jakub Kicinski
2020-11-16 18:37 ` Martin KaFai Lau
2020-11-16 18:43 ` Jakub Kicinski
2020-11-16 18:51 ` Martin KaFai Lau [this message]
2020-11-12 21:13 ` [PATCH v2 bpf-next 4/4] bpf: selftest: Use " Martin KaFai Lau
2020-11-13 3:00 ` [PATCH v2 bpf-next 0/4] bpf: Enable bpf_sk_storage for FENTRY/FEXIT/RAW_TP 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=20201116185151.iannqczqxmcj6xr4@kafai-mbp.dhcp.thefacebook.com \
--to=kafai@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@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 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).