mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	Greg Hackmann <ghackmann@google.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] net: xfrm: use preempt-safe this_cpu_read() in ipcomp_alloc_tfms()
Date: Thu, 8 Mar 2018 08:31:47 -0800	[thread overview]
Message-ID: <feddabcd-61c5-a1ef-8c1e-6e3f1d71a9b9@gmail.com> (raw)
In-Reply-To: <20180308073328.GA8111@gondor.apana.org.au>



On 03/07/2018 11:33 PM, Herbert Xu wrote:
> On Wed, Mar 07, 2018 at 11:24:16AM -0800, Greg Hackmann wrote:
>> f7c83bcbfaf5 ("net: xfrm: use __this_cpu_read per-cpu helper") added a
>> __this_cpu_read() call inside ipcomp_alloc_tfms().  Since this call was
>> introduced, the rules around per-cpu accessors have been tightened and
>> __this_cpu_read() cannot be used in a preemptible context.
>>
>> syzkaller reported this leading to the following kernel BUG while
>> fuzzing sendmsg:
> 
> How about reverting f7c83bcbfaf5 instead?
> 
> Thanks,
> 

Because that would not be nice.

this_cpu_read() is faster than going through raw_smp_processor_id() and 
per_cpu_ptr()

  reply	other threads:[~2018-03-08 16:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 19:24 Greg Hackmann
2018-03-07 20:21 ` Eric Dumazet
2018-03-07 20:50   ` Greg Hackmann
2018-03-08  7:33 ` Herbert Xu
2018-03-08 16:31   ` Eric Dumazet [this message]
2018-03-08 18:40     ` Herbert Xu

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=feddabcd-61c5-a1ef-8c1e-6e3f1d71a9b9@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ghackmann@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=steffen.klassert@secunet.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

all inboxes | Powered by JetHome®