lkml.org 
[lkml]   [2022]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH] arch: patch_text: Fixup last cpu should be master
On Sun, Mar 13, 2022 at 7:50 AM Max Filippov <jcmvbkbc@gmail.com> wrote:
>
> Hi Guo Ren,
>
> On Sat, Mar 12, 2022 at 7:56 AM <guoren@kernel.org> wrote:
> >
> > From: Guo Ren <guoren@linux.alibaba.com>
> >
> > These patch_text implementations are using stop_machine_cpuslocked
> > infrastructure with atomic cpu_count. The origin idea is that when
>
> The original
>
> > the master CPU patch_text, others should wait for it. But current
> > implementation is using the first CPU as master, which couldn't
> > guarantee continue CPUs are waiting. This patch changes the last
>
> guarantee that remaining CPUs are waiting.
>
> > CPU as the master to solve the potaintial risk.
>
> potential
>
> >
> > Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> > Signed-off-by: Guo Ren <guoren@kernel.org>
> > Cc: Will Deacon <will@kernel.org>
> > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: Palmer Dabbelt <palmer@dabbelt.com>
> > Cc: Peter Zijlstra <peterz@infradead.org
> > Cc: Masami Hiramatsu <mhiramat@kernel.org>
> > Cc: Chris Zankel <chris@zankel.net>
> > Cc: Max Filippov <jcmvbkbc@gmail.com>
> > Cc: Arnd Bergmann <arnd@arndb.de>
> > ---
> > arch/arm64/kernel/patching.c | 4 ++--
> > arch/csky/kernel/probes/kprobes.c | 2 +-
> > arch/riscv/kernel/patch.c | 2 +-
> > arch/xtensa/kernel/jump_label.c | 2 +-
> > 4 files changed, 5 insertions(+), 5 deletions(-)
>
> Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
>
> I'm curious, is there a specific issue that prompted this patch?
No, theoretical risk.

>
> --
> Thanks.
> -- Max



--
Best Regards
Guo Ren

ML: https://lore.kernel.org/linux-csky/

\
 
 \ /
  Last update: 2022-03-13 02:11    [W:0.052 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site