linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] I-side fixes
@ 2018-06-19 12:48 Will Deacon
  2018-06-19 12:48 ` [PATCH 1/3] arm64: Avoid flush_icache_range() in alternatives patching code Will Deacon
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Will Deacon @ 2018-06-19 12:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

These three patches attempt to address some issues with ISBs and I-cache
maintenance. Specifically:

  - Ensure we don't invoke dynamically modified I-cache maintenance code
    as part of the instruction patching routines
  - Remove ISBs from pte/pmd/pud setter functions
  - IPI other CPUs when invalidating the I-cache for kernel mappings

Whilst the IPI is a bit nasty, I couldn't figure out a better way to
ensure that CPUs don't retain instructions from freed pages in their
pipelines. I initially hoped to deal with this by hooking into RCU, but
that would rely on RCU being the only mechanism used to defer reclaim of
executable pages and this doesn't appear to be the case for e.g. modules.

Feedback welcome,

Will

--->8

Will Deacon (3):
  arm64: Avoid flush_icache_range() in alternatives patching code
  arm64: Remove unnecessary ISBs from set_{pte,pmd,pud}
  arm64: IPI each CPU after invalidating the I-cache for kernel mappings

 arch/arm64/include/asm/alternative.h |  7 +++++-
 arch/arm64/include/asm/cacheflush.h  | 13 +++++++++-
 arch/arm64/include/asm/pgtable.h     |  6 +----
 arch/arm64/kernel/alternative.c      | 47 ++++++++++++++++++++++++++++++------
 arch/arm64/kernel/cpu_errata.c       |  2 +-
 arch/arm64/kernel/insn.c             | 15 ++----------
 arch/arm64/kernel/module.c           |  5 ++--
 arch/arm64/mm/cache.S                |  4 +--
 8 files changed, 65 insertions(+), 34 deletions(-)

-- 
2.1.4

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

end of thread, other threads:[~2018-06-21 10:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-19 12:48 [PATCH 0/3] I-side fixes Will Deacon
2018-06-19 12:48 ` [PATCH 1/3] arm64: Avoid flush_icache_range() in alternatives patching code Will Deacon
2018-06-19 13:33   ` Mark Rutland
2018-06-19 12:48 ` [PATCH 2/3] arm64: Remove unnecessary ISBs from set_{pte,pmd,pud} Will Deacon
2018-06-19 13:34   ` [PATCH 2/3] arm64: Remove unnecessary ISBs from set_{pte, pmd, pud} Mark Rutland
2018-06-20 15:32   ` Catalin Marinas
2018-06-19 12:48 ` [PATCH 3/3] arm64: IPI each CPU after invalidating the I-cache for kernel mappings Will Deacon
2018-06-19 13:55   ` Mark Rutland
2018-06-19 13:59     ` Mark Rutland
2018-06-19 16:50     ` Will Deacon
2018-06-21 10:24       ` James Morse
2018-06-20 16:01   ` Alexander Van Brunt
2018-06-20 17:01     ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).