lkml.org 
[lkml]   [2019]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v5 00/17] Rewrite x86/ftrace to use text_poke (and more)
On Mon, 25 Nov 2019 12:55:34 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries)
> ...
> on_each_cpu(do_sync_core, NULL, 1);
> /*
> * sync_core() implies an smp_mb() and orders this store against
> * the writing of the new instruction.
> */
> bp_patching.vec = NULL;
> bp_patching.nr_entries = 0;
> }
> -----
>
> I think the "on_each_cpu(do_sync_core, NULL, 1);" can sync the pipeline
> but doesn't ensure all ongoing int3 handling is done. Thus, we may need a

How does it not ensure all ongoing int3 handling is done? int3 is done
with interrupts disabled, and the on_each_cpu() requires all CPUs to
have had their interrupts enabled, thus int3 handling should be
completed. Perhaps we need another sync core?

on_each_cpu(do_sync_core, NULL, 1);
bp_patching.nr_entries = 0;
on_each_cpu(do_sync_core, NULL, 1);
bp_patching.vec = NULL;

?

-- Steve


> bigger wait in between bp_patching.nr_entries = 0 and bp_patching.vec = NULL;

\
 
 \ /
  Last update: 2019-11-25 18:33    [W:0.215 / U:1.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site