[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200429100731.201312a9@gandalf.local.home>
Date: Wed, 29 Apr 2020 10:07:31 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Joerg Roedel <jroedel@...e.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Borislav Petkov <bp@...en8.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Shile Zhang <shile.zhang@...ux.alibaba.com>,
Andy Lutomirski <luto@...capital.net>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Tzvetomir Stoyanov <tz.stoyanov@...il.com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [RFC][PATCH] x86/mm: Sync all vmalloc mappings before
text_poke()
On Wed, 29 Apr 2020 08:28:54 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:
> On Wed, 29 Apr 2020 12:59:41 +0200
> Joerg Roedel <jroedel@...e.de> wrote:
>
> > > use_temporary_mm() {
> > > switch_mm_irqs_off() {
> > > load_new_mm_cr3() {
> > > write_cr3() <<--- Lock up!
> >
> > I don't see how it could lock up in write_cr3(), at least on bare-metal.
> > What is the environment this happens, 32 or 64 bit, in a VM or
> > bare-metal?
>
> 64 bit bare-metal. In fact, it wasn't reproducible on a VM (according
> to Tzvetomir, who was just using a Fedora kernel). I only tried it on
> bare-metal.
>
> >
> > I think it is more likely that your lockup is actually a page-fault
> > loop, where the #PF handler does not map the faulting address correctly.
>
> Sounds reasonable.
>
> >
> > But I have to look closer into how text_poke() works before I can say
> > more.
> >
> > Btw, in case it happens on x86-64, does it also happen without
> > vmalloc-stacks?
>
> Just tried it out with !CONFIG_VMAP_STACKS and it still locks up :-/
Talking with Mathieu about this on IRC, he pointed out that my code does
have a vzalloc() that is called:
in trace_pid_write()
pid_list->pids = vzalloc((pid_list->pid_max + 7) >> 3);
This is done when -P1,2 is on the trace-cmd command line.
-- Steve
Powered by blists - more mailing lists