[PATCH v4 05/18] arm64: Do not enable uaccess for invalidate_icache_range

Catalin Marinas catalin.marinas at arm.com
Tue May 25 04:21:18 PDT 2021


On Mon, May 24, 2021 at 09:29:48AM +0100, Fuad Tabba wrote:
> invalidate_icache_range() works on kernel addresses, and doesn't
> need uaccess. Remove the code that toggles uaccess_ttbr0_enable,
> as well as the code that emits an entry into the exception table
> (via the macro invalidate_icache_by_line).
> 
> Changes return type of invalidate_icache_range() from int (which
> used to indicate a fault) to void, since it doesn't need uaccess
> and won't fault. Note that return value was never checked by any
> of the callers.
> 
> No functional change intended.
> Possible performance impact due to the reduced number of
> instructions.
> 
> Reported-by: Catalin Marinas <catalin.marinas at arm.com>
> Reported-by: Will Deacon <will at kernel.org>
> Link: https://lore.kernel.org/linux-arch/20200511110014.lb9PEahJ4hVOYrbwIb_qUHXyNy9KQzNFdb_I3YlzY6A@z/
> Acked-by: Mark Rutland <mark.rutland at arm.com>
> Signed-off-by: Fuad Tabba <tabba at google.com>

Acked-by: Catalin Marinas <catalin.marinas at arm.com>



More information about the linux-arm-kernel mailing list