[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220904193844.GA7953@redhat.com>
Date: Sun, 4 Sep 2022 21:38:44 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Oleksandr Natalenko <oleksandr@...hat.com>,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
linux-fsdevel@...r.kernel.org, Jonathan Corbet <corbet@....net>,
Alexander Viro <viro@...iv.linux.org.uk>,
Huang Ying <ying.huang@...el.com>,
"Jason A . Donenfeld" <Jason@...c4.com>,
Will Deacon <will@...nel.org>,
"Guilherme G . Piccoli" <gpiccoli@...lia.com>,
Laurent Dufour <ldufour@...ux.ibm.com>,
Stephen Kitt <steve@....org>, Rob Herring <robh@...nel.org>,
Joel Savitz <jsavitz@...hat.com>,
"Eric W . Biederman" <ebiederm@...ssion.com>,
Kees Cook <keescook@...omium.org>,
Xiaoming Ni <nixiaoming@...wei.com>,
Luis Chamberlain <mcgrof@...nel.org>,
Renaud Métrich <rmetrich@...hat.com>,
Grzegorz Halat <ghalat@...hat.com>, Qi Guo <qguo@...hat.com>
Subject: Re: [PATCH] core_pattern: add CPU specifier
On 09/04, Andrew Morton wrote:
>
> On Sat, 3 Sep 2022 08:43:30 +0200 Oleksandr Natalenko <oleksandr@...hat.com> wrote:
>
> > @@ -535,6 +539,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
> > */
> > .mm_flags = mm->flags,
> > .vma_meta = NULL,
> > + .cpu = raw_smp_processor_id(),
> > };
>
> Why use the "raw_" function here?
To avoid check_preemption_disabled() from debug_smp_processor_id().
We do not disable preemption because this is pointless, this is the
"racy snapshot" anyway. The coredumping task can migrate to another
CPU even before get_signal/do_coredump, right after exit-to-user
path enables irqs.
Oleg.
Powered by blists - more mailing lists