All of lore.kernel.org
 help / color / mirror / Atom feed
* sort out the flush_icache_range mess
@ 2020-05-10  7:54 ` Christoph Hellwig
  0 siblings, 0 replies; 279+ messages in thread
From: Christoph Hellwig @ 2020-05-10  7:54 UTC (permalink / raw)
  To: Andrew Morton, Arnd Bergmann, Roman Zippel
  Cc: linux-arch, linux-xtensa, Michal Simek, Jessica Yu, linux-ia64,
	linux-c6x-dev, linux-sh, linux-hexagon, x86, linux-um,
	linux-kernel, linux-mips, linux-mm, linux-m68k, openrisc,
	linux-alpha, sparclinux, linux-fsdevel, linux-riscv,
	linuxppc-dev, linux-arm-kernel

Hi all,

flush_icache_range is mostly used for kernel address, except for the following
cases:

 - the nommu brk and mmap implementations,
 - the read_code helper that is only used for binfmt_flat, binfmt_elf_fdpic,
   and binfmt_aout including the broken ia32 compat version
 - binfmt_flat itself,

none of which really are used by a typical MMU enabled kernel, as a.out can
only be build for alpha and m68k to start with.

But strangely enough commit ae92ef8a4424 ("PATCH] flush icache in correct
context") added a "set_fs(KERNEL_DS)" around the flush_icache_range call
in the module loader, because apparently m68k assumed user pointers.

This series first cleans up the cacheflush implementations, largely by
switching as much as possible to the asm-generic version after a few
preparations, then moves the misnamed current flush_icache_user_range to
a new name, to finally introduce a real flush_icache_user_range to be used
for the above use cases to flush the instruction cache for a userspace
address range.  The last patch then drops the set_fs in the module code
and moves it into the m68k implementation.

A git tree is available here:

    git://git.infradead.org/users/hch/misc.git flush_icache_range

Gitweb:

    http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/flush_icache_range

^ permalink raw reply	[flat|nested] 279+ messages in thread

end of thread, other threads:[~2020-05-13  6:23 UTC | newest]

Thread overview: 279+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-10  7:54 sort out the flush_icache_range mess Christoph Hellwig
2020-05-10  7:54 ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54 ` Christoph Hellwig
2020-05-10  7:54 ` Christoph Hellwig
2020-05-10  7:54 ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 01/31] arm: fix the flush_icache_range arguments in set_fiq_handler Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 02/31] arm64: fix the flush_icache_range arguments in machine_kexec Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-11  7:51   ` Will Deacon
2020-05-11  7:51     ` [OpenRISC] " Will Deacon
2020-05-11  7:51     ` Will Deacon
2020-05-11  7:51     ` Will Deacon
2020-05-11  7:51     ` Will Deacon
2020-05-11 11:00     ` Catalin Marinas
2020-05-11 11:00       ` [OpenRISC] " Catalin Marinas
2020-05-11 11:00       ` Catalin Marinas
2020-05-11 11:00       ` Catalin Marinas
2020-05-11 11:00       ` Catalin Marinas
2020-05-11 15:15       ` Christoph Hellwig
2020-05-11 15:15         ` [OpenRISC] " Christoph Hellwig
2020-05-11 15:15         ` Christoph Hellwig
2020-05-11 15:15         ` Christoph Hellwig
2020-05-11 15:15         ` Christoph Hellwig
2020-05-11 15:15         ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 03/31] MIPS: unexport __flush_icache_user_range Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-11 16:01   ` Thomas Bogendoerfer
2020-05-11 16:01     ` [OpenRISC] " Thomas Bogendoerfer
2020-05-11 16:01     ` Thomas Bogendoerfer
2020-05-11 16:01     ` Thomas Bogendoerfer
2020-05-11 16:01     ` Thomas Bogendoerfer
2020-05-10  7:54 ` [PATCH 04/31] nds32: unexport flush_icache_page Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 05/31] powerpc: unexport flush_icache_user_range Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 06/31] unicore32: remove flush_cache_user_range Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 07/31] asm-generic: fix the inclusion guards for cacheflush.h Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 08/31] asm-generic: don't include <linux/mm.h> in cacheflush.h Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 09/31] asm-generic: improve the flush_dcache_page stub Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 10/31] alpha: use asm-generic/cacheflush.h Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 11/31] arm64: " Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 12/31] c6x: " Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 13/31] hexagon: " Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 14/31] ia64: " Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 15/31] microblaze: " Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 16/31] m68knommu: " Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-12 14:44   ` Greg Ungerer
2020-05-12 14:44     ` [OpenRISC] " Greg Ungerer
2020-05-12 14:44     ` Greg Ungerer
2020-05-12 14:44     ` Greg Ungerer
2020-05-12 14:44     ` Greg Ungerer
2020-05-10  7:54 ` [PATCH 17/31] openrisc: " Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 18/31] powerpc: " Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 19/31] riscv: " Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-12 23:00   ` Palmer Dabbelt
2020-05-12 23:00     ` [OpenRISC] " Palmer Dabbelt
2020-05-12 23:00     ` Palmer Dabbelt
2020-05-12 23:00     ` Palmer Dabbelt
2020-05-12 23:00     ` Palmer Dabbelt
2020-05-13  6:23     ` Christoph Hellwig
2020-05-13  6:23       ` [OpenRISC] " Christoph Hellwig
2020-05-13  6:23       ` Christoph Hellwig
2020-05-13  6:23       ` Christoph Hellwig
2020-05-13  6:23       ` Christoph Hellwig
2020-05-10  7:54 ` [PATCH 20/31] arm,sparc,unicore32: remove flush_icache_user_range Christoph Hellwig
2020-05-10  7:54   ` [OpenRISC] [PATCH 20/31] arm, sparc, unicore32: " Christoph Hellwig
2020-05-10  7:54   ` [PATCH 20/31] arm,sparc,unicore32: " Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:54   ` Christoph Hellwig
2020-05-10  7:55 ` [PATCH 21/31] mm: rename flush_icache_user_range to flush_icache_user_page Christoph Hellwig
2020-05-10  7:55   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-11  7:36   ` Geert Uytterhoeven
2020-05-11  7:36     ` [OpenRISC] " Geert Uytterhoeven
2020-05-11  7:36     ` Geert Uytterhoeven
2020-05-11  7:36     ` Geert Uytterhoeven
2020-05-11  7:36     ` Geert Uytterhoeven
2020-05-11  7:36     ` Geert Uytterhoeven
2020-05-11  7:36     ` Geert Uytterhoeven
2020-05-11  7:36     ` Geert Uytterhoeven
2020-05-10  7:55 ` [PATCH 22/31] asm-generic: add a flush_icache_user_range stub Christoph Hellwig
2020-05-10  7:55   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55 ` [PATCH 23/31] sh: implement flush_icache_user_range Christoph Hellwig
2020-05-10  7:55   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55 ` [PATCH 24/31] xtensa: " Christoph Hellwig
2020-05-10  7:55   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55 ` [PATCH 25/31] arm: rename flush_cache_user_range to flush_icache_user_range Christoph Hellwig
2020-05-10  7:55   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55 ` [PATCH 26/31] m68k: implement flush_icache_user_range Christoph Hellwig
2020-05-10  7:55   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-11  7:38   ` Geert Uytterhoeven
2020-05-11  7:38     ` [OpenRISC] " Geert Uytterhoeven
2020-05-11  7:38     ` Geert Uytterhoeven
2020-05-11  7:38     ` Geert Uytterhoeven
2020-05-11  7:38     ` Geert Uytterhoeven
2020-05-11  7:38     ` Geert Uytterhoeven
2020-05-11  7:38     ` Geert Uytterhoeven
2020-05-11  7:38     ` Geert Uytterhoeven
2020-05-10  7:55 ` [PATCH 27/31] exec: only build read_code when needed Christoph Hellwig
2020-05-10  7:55   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55 ` [PATCH 28/31] exec: use flush_icache_user_range in read_code Christoph Hellwig
2020-05-10  7:55   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55 ` [PATCH 29/31] binfmt_flat: use flush_icache_user_range Christoph Hellwig
2020-05-10  7:55   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-12 14:46   ` Greg Ungerer
2020-05-12 14:46     ` [OpenRISC] " Greg Ungerer
2020-05-12 14:46     ` Greg Ungerer
2020-05-12 14:46     ` Greg Ungerer
2020-05-12 14:46     ` Greg Ungerer
2020-05-10  7:55 ` [PATCH 30/31] nommu: use flush_icache_user_range in brk and mmap Christoph Hellwig
2020-05-10  7:55   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55 ` [PATCH 31/31] module: move the set_fs hack for flush_icache_range to m68k Christoph Hellwig
2020-05-10  7:55   ` [OpenRISC] " Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-10  7:55   ` Christoph Hellwig
2020-05-11  7:40   ` Geert Uytterhoeven
2020-05-11  7:40     ` [OpenRISC] " Geert Uytterhoeven
2020-05-11  7:40     ` Geert Uytterhoeven
2020-05-11  7:40     ` Geert Uytterhoeven
2020-05-11  7:40     ` Geert Uytterhoeven
2020-05-11  7:40     ` Geert Uytterhoeven
2020-05-11  7:40     ` Geert Uytterhoeven
2020-05-11  7:40     ` Geert Uytterhoeven
2020-05-11 15:11     ` Christoph Hellwig
2020-05-11 15:11       ` [OpenRISC] " Christoph Hellwig
2020-05-11 15:11       ` Christoph Hellwig
2020-05-11 15:11       ` Christoph Hellwig
2020-05-11 15:11       ` Christoph Hellwig
2020-05-11 15:11       ` Christoph Hellwig
2020-05-11 15:11       ` Christoph Hellwig
2020-05-11 15:24       ` Geert Uytterhoeven
2020-05-11 15:24         ` [OpenRISC] " Geert Uytterhoeven
2020-05-11 15:24         ` Geert Uytterhoeven
2020-05-11 15:24         ` Geert Uytterhoeven
2020-05-11 15:24         ` Geert Uytterhoeven
2020-05-11 15:24         ` Geert Uytterhoeven
2020-05-11 15:24         ` Geert Uytterhoeven
2020-05-11 15:24         ` Geert Uytterhoeven
2020-05-11 16:37         ` Christoph Hellwig
2020-05-11 16:37           ` [OpenRISC] " Christoph Hellwig
2020-05-11 16:37           ` Christoph Hellwig
2020-05-11 16:37           ` Christoph Hellwig
2020-05-11 16:37           ` Christoph Hellwig
2020-05-11 16:37           ` Christoph Hellwig
2020-05-11 16:37           ` Christoph Hellwig
2020-05-11  7:46 ` sort out the flush_icache_range mess Geert Uytterhoeven
2020-05-11  7:46   ` [OpenRISC] " Geert Uytterhoeven
2020-05-11  7:46   ` Geert Uytterhoeven
2020-05-11  7:46   ` Geert Uytterhoeven
2020-05-11  7:46   ` Geert Uytterhoeven
2020-05-11  7:46   ` Geert Uytterhoeven
2020-05-11  7:46   ` Geert Uytterhoeven
2020-05-11  7:46   ` Geert Uytterhoeven
2020-05-11 15:13   ` Christoph Hellwig
2020-05-11 15:13     ` [OpenRISC] " Christoph Hellwig
2020-05-11 15:13     ` Christoph Hellwig
2020-05-11 15:13     ` Christoph Hellwig
2020-05-11 15:13     ` Christoph Hellwig
2020-05-11 15:13     ` Christoph Hellwig
2020-05-11 15:13     ` Christoph Hellwig
2020-05-11 15:25     ` Geert Uytterhoeven
2020-05-11 15:25       ` [OpenRISC] " Geert Uytterhoeven
2020-05-11 15:25       ` Geert Uytterhoeven
2020-05-11 15:25       ` Geert Uytterhoeven
2020-05-11 15:25       ` Geert Uytterhoeven
2020-05-11 15:25       ` Geert Uytterhoeven
2020-05-11 15:25       ` Geert Uytterhoeven
2020-05-11 15:25       ` Geert Uytterhoeven
2020-05-11 16:35       ` Christoph Hellwig
2020-05-11 16:35         ` [OpenRISC] " Christoph Hellwig
2020-05-11 16:35         ` Christoph Hellwig
2020-05-11 16:35         ` Christoph Hellwig
2020-05-11 16:35         ` Christoph Hellwig
2020-05-11 16:35         ` Christoph Hellwig
2020-05-11 16:35         ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.