From: Andrew Donnellan <ajd@linux.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH v2] powerpc/mm: Fix missing KUAP disable in flush_coherent_icache()
Date: Thu, 5 Mar 2020 11:30:46 +1100 [thread overview]
Message-ID: <ab27d125-54e7-3c31-709e-ff5d28c7bfbd@linux.ibm.com> (raw)
In-Reply-To: <20200303235708.26004-1-mpe@ellerman.id.au>
On 4/3/20 10:57 am, Michael Ellerman wrote:
> diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
> index ef7b1119b2e2..36a8c7b105ce 100644
> --- a/arch/powerpc/mm/mem.c
> +++ b/arch/powerpc/mm/mem.c
> @@ -373,7 +373,9 @@ static inline bool flush_coherent_icache(unsigned long addr)
> */
> if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) {
> mb(); /* sync */
> + allow_read_from_user((void *)addr, L1_CACHE_BYTES);
> icbi((void *)addr);
> + prevent_read_from_user((void *)addr, L1_CACHE_BYTES);
> mb(); /* sync */
> isync();
> return true;
>
(void *) should be (const void __user *) to avoid sparse warnings.
snowpatch reports: https://patchwork.ozlabs.org/patch/1248671/
--
Andrew Donnellan OzLabs, ADL Canberra
ajd@linux.ibm.com IBM Australia Limited
next prev parent reply other threads:[~2020-03-05 0:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 23:57 [PATCH v2] powerpc/mm: Fix missing KUAP disable in flush_coherent_icache() Michael Ellerman
2020-03-05 0:30 ` Andrew Donnellan [this message]
2020-03-05 6:08 ` Michael Ellerman
2020-03-05 20:19 ` Russell Currey
2020-03-06 0:11 ` Michael Ellerman
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=ab27d125-54e7-3c31-709e-ff5d28c7bfbd@linux.ibm.com \
--to=ajd@linux.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
/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 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).