lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200429154423.GM13592@hirez.programming.kicks-ass.net>
Date:   Wed, 29 Apr 2020 17:44:23 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Joerg Roedel <jroedel@...e.de>,
        LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        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, Apr 29, 2020 at 10:32:16AM -0400, Steven Rostedt wrote:
> On Wed, 29 Apr 2020 16:10:04 +0200
> Joerg Roedel <jroedel@...e.de> wrote:
> 
> > On Wed, Apr 29, 2020 at 10:07:31AM -0400, Steven Rostedt wrote:
> > > 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.  
> > 
> > Yeah, I was guessing something like this, init_mm has a mapping which
> > poking_mm has not. I currently try to reproduce this on one of my
> > machines.
> 
> Note, in use_temporary_mm(poking_mm), poking_mm only contains the page that

poking_mm should contain the full kernel map, the userspace part is 2
pages in a random location to alias two kernel pages.

So a vmalloc fault _should_ work.

> needs to be updated. But will get added to per_cpu(cpu_tlbstate.loaded_mm),
> which appears to be the one that's not updated.
> 
> -- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ