From: avanbrunt@nvidia.com (Alexander Van Brunt)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] arm64: IPI each CPU after invalidating the I-cache for kernel mappings
Date: Wed, 20 Jun 2018 16:01:29 +0000 [thread overview]
Message-ID: <1529510537801.73315@nvidia.com> (raw)
In-Reply-To: <1529412495-17525-4-git-send-email-will.deacon@arm.com>
> When invalidating the instruction cache for a kernel mapping via
> flush_icache_range(), it is also necessary to flush the pipeline for
> other CPUs so that instructions fetched into the pipeline before the
> I-cache invalidation are discarded. For example, if module 'foo' is
> unloaded and then module 'bar' is loaded into the same area of memory,
> a CPU could end up executing instructions from 'foo' when branching into
> 'bar' if these instructions were fetched into the pipeline before 'foo'
> was unloaded.
I don't think this fixes the problem. If a CPU is executing 'foo', takes an IPI, and returns to find itself executing in the middle of 'bar' there is still a problem because the code changed. All this patch does is synchronize when two CPUs see 'foo' change to 'bar'.
next prev parent reply other threads:[~2018-06-20 16:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2018-06-20 17:01 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1529510537801.73315@nvidia.com \
--to=avanbrunt@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.