From: Julien Grall <julien@xen.org>
To: Roger Pau Monne <roger.pau@citrix.com>, xen-devel@lists.xenproject.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Jan Beulich <jbeulich@suse.com>, Wei Liu <wl@xen.org>
Subject: Re: [Xen-devel] [PATCH 0/3] x86: fixes/improvements for scratch cpumask
Date: Wed, 12 Feb 2020 22:05:14 +0100 [thread overview]
Message-ID: <72a1c94b-fd3b-3d47-4963-d92c6293000c@xen.org> (raw)
In-Reply-To: <20200212164949.56434-1-roger.pau@citrix.com>
On 12/02/2020 17:49, Roger Pau Monne wrote:
> Hello,
Hi Roger,
> Commit:
>
> 5500d265a2a8fa63d60c08beb549de8ec82ff7a5
> x86/smp: use APIC ALLBUT destination shorthand when possible
There is a more subtle problem introduced by this patch. I thought I
would mention it here just in case this affect the approach you have
chosen in this series.
get_cpu_maps() is used by stop_machine_run() to serialize the callers.
If the latter fails to acquire the lock, it will bail out.
Unfortunately, rcu_barrier() is implemented using stop_machine_run() and
will be turned to pretty much a NOP if the latter fails (e.g the lock
cannot be acquired).
This means that the rcu_barrier() will not do the expected job and
potentially introduce unknown issues (e.g use-after-free...).
Before your patch, it would have been pretty hard to hit the problem
above. After, you can race more easily with rcu_barrier() as sending IPI
is pretty common.
Sadly, I don't have a suggestion yet how to fix this problem.
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2020-02-12 21:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-12 16:49 [Xen-devel] [PATCH 0/3] x86: fixes/improvements for scratch cpumask Roger Pau Monne
2020-02-12 16:49 ` [Xen-devel] [PATCH 1/3] x86/smp: unify header includes in smp.h Roger Pau Monne
2020-02-12 23:05 ` Wei Liu
2020-02-13 9:54 ` Jan Beulich
2020-02-12 16:49 ` [Xen-devel] [PATCH 2/3] x86/smp: use a dedicated scratch cpumask in send_IPI_mask Roger Pau Monne
2020-02-13 9:59 ` Jan Beulich
2020-02-13 10:03 ` Roger Pau Monné
2020-02-13 10:19 ` Jan Beulich
2020-02-13 11:41 ` Roger Pau Monné
2020-02-13 13:35 ` Jan Beulich
2020-02-12 16:49 ` [Xen-devel] [PATCH 3/3] x86: add accessors for scratch cpu mask Roger Pau Monne
2020-02-13 10:12 ` Jan Beulich
2020-02-13 15:15 ` Roger Pau Monné
2020-02-13 15:43 ` Jan Beulich
2020-02-12 16:53 ` [Xen-devel] [PATCH 0/3] x86: fixes/improvements for scratch cpumask Sander Eikelenboom
2020-02-12 17:01 ` Roger Pau Monné
2020-02-12 17:13 ` Sander Eikelenboom
2020-02-13 9:31 ` Sander Eikelenboom
2020-02-12 21:05 ` Julien Grall [this message]
2020-02-13 9:53 ` Jan Beulich
2020-02-13 10:05 ` Roger Pau Monné
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=72a1c94b-fd3b-3d47-4963-d92c6293000c@xen.org \
--to=julien@xen.org \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).