linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Andrew Donnellan <ajd@linux.ibm.com>, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH v2] powerpc/mm: Fix missing KUAP disable in flush_coherent_icache()
Date: Thu, 05 Mar 2020 17:08:25 +1100	[thread overview]
Message-ID: <875zfjqqp2.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <ab27d125-54e7-3c31-709e-ff5d28c7bfbd@linux.ibm.com>

Andrew Donnellan <ajd@linux.ibm.com> writes:
> 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/

Thanks.

cheers

  reply	other threads:[~2020-03-05  6:10 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
2020-03-05  6:08   ` Michael Ellerman [this message]
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=875zfjqqp2.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=ajd@linux.ibm.com \
    --cc=linuxppc-dev@ozlabs.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 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).