From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
To: herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org
Cc: marcelo.leitner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
baijiaju1990-9Onoh4P/yGk@public.gmane.org,
nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org,
vyasevich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
linux-crypto-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-sctp-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH V2] Fix a sleep-in-atomic bug in shash_setkey_unaligned
Date: Wed, 04 Oct 2017 21:37:58 -0700 (PDT) [thread overview]
Message-ID: <20171004.213758.2210486785503998906.davem@davemloft.net> (raw)
In-Reply-To: <20171005034054.GB31996-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
From: Herbert Xu <herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
Date: Thu, 5 Oct 2017 11:40:54 +0800
> On Tue, Oct 03, 2017 at 07:45:06PM -0300, Marcelo Ricardo Leitner wrote:
>>
>> > Usually if you're invoking setkey from a non-sleeping code-path
>> > you're probably doing something wrong.
>>
>> Usually but not always. There are 3 calls to that function on SCTP
>> code:
>> - pack a cookie, which is sent on an INIT_ACK packet to the client
>> - unpack the cookie above, after it is sent back by the client on a
>> COOKIE_ECHO packet
>> - send a chunk authenticated by a hash
>
> I'm not talking about the code-path in question. I'm talking
> about the function which generates the secret key in the first
> place. AFAICS that's only called in GFP_KERNEL context. What
> am I missing?
The setkey happens in functions like sctp_pack_cookie() and
sctp_unpack_cookie(), which seems to run from software interrupts.
next prev parent reply other threads:[~2017-10-05 4:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 2:25 [PATCH V2] Fix a sleep-in-atomic bug in shash_setkey_unaligned Jia-Ju Bai
2017-10-03 4:18 ` Andy Lutomirski
[not found] ` <CALCETrWdXjTTTywbb3duCEsLYNxkeGx7bf3SM4PYKeErCyiUNQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-03 5:26 ` Herbert Xu
2017-10-03 16:46 ` Andy Lutomirski
2017-10-03 22:45 ` Marcelo Ricardo Leitner
2017-10-05 3:40 ` Herbert Xu
[not found] ` <20171005034054.GB31996-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2017-10-05 4:37 ` David Miller [this message]
2017-10-05 10:16 ` Herbert Xu
[not found] ` <20171005101620.GA1246-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2017-10-05 13:16 ` Herbert Xu
2017-10-05 19:07 ` Marcelo Ricardo Leitner
2017-10-03 22:33 ` Marcelo Ricardo Leitner
[not found] ` <20171003223308.GD19750-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2017-10-03 22:46 ` Marcelo Ricardo Leitner
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=20171004.213758.2210486785503998906.davem@davemloft.net \
--to=davem-ft/pcqaiutieiz0/mpfg9q@public.gmane.org \
--cc=baijiaju1990-9Onoh4P/yGk@public.gmane.org \
--cc=herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org \
--cc=kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=linux-crypto-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sctp-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=marcelo.leitner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
--cc=vyasevich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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