Re: [PATCH] x86/mm: Rename flush_tlb_single() and flush_tlb_one()
From: Peter Zijlstra
Date: Thu Feb 01 2018 - 04:06:36 EST
On Wed, Jan 31, 2018 at 08:03:10AM -0800, Andy Lutomirski wrote:
> flush_tlb_single() and flush_tlb_one() sound almost identical, but
> they really mean "flush one user translation" and "flush one kernel
> translation". Rename them to flush_tlb_one_user() and
> flush_tlb_one_kernel() to make the semantics more obvious.
>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Dave Hansen <dave.hansen@xxxxxxxxx>
> Cc: Borislav Petkov <bpetkov@xxxxxxx>
> Cc: Kees Cook <keescook@xxxxxxxxxx>
> Cc: Hugh Dickins <hughd@xxxxxxxxxx>
> Cc: Brian Gerst <brgerst@xxxxxxxxx>
> Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
> Cc: Rik van Riel <riel@xxxxxxxxxx>
> Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> Cc: Juergen Gross <jgross@xxxxxxxx>
> Cc: Eduardo Valentin <eduval@xxxxxxxxxx>
> Cc: Will Deacon <will.deacon@xxxxxxx>
> Cc: Linux-MM <linux-mm@xxxxxxxxx>
> Signed-off-by: Andy Lutomirski <luto@xxxxxxxxxx>
> ---
>
> I was looking at some PTI-related code, and the flush-one-address code
> is unnecessarily hard to understand because the names of the helpers are
> uninformative. This came up during PTI review, but no one got around to
> doing it.
Right, got as far as making it consistent and putting a comment on :-)
Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>