[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <34AA7007-F41C-4EBB-8EF4-C9476078E03D@fb.com>
Date: Wed, 28 Aug 2019 17:49:24 +0000
From: Song Liu <songliubraving@...com>
To: Thomas Gleixner <tglx@...utronix.de>
CC: LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
Joerg Roedel <jroedel@...e.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Rik van Riel <riel@...riel.com>
Subject: Re: [patch 2/2] x86/mm/pti: Do not invoke PTI functions when PTI is
disabled
> On Aug 28, 2019, at 7:24 AM, Thomas Gleixner <tglx@...utronix.de> wrote:
>
> When PTI is disabled at boot time either because the CPU is not affected or
> PTI has been disabled on the command line, the boot code still calls into
> pti_finalize() which then unconditionally invokes:
>
> pti_clone_entry_text()
> pti_clone_kernel_text()
>
> pti_clone_kernel_text() was called unconditionally before the 32bit support
> was added and 32bit added the call to pti_clone_entry_text().
>
> The call has no side effects as cloning the page tables into the available
> second one, which was allocated for PTI does not create damage. But it does
> not make sense either and in case that this functionality would be extended
> later this might actually lead to hard to diagnose issue.
>
> Neither function should be called when PTI is runtime disabled. Make the
> invocation conditional.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Song Liu <songliubraving@...com>
Powered by blists - more mailing lists