linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Xiang Zheng <zhengxiang9@huawei.com>
To: Will Deacon <will@kernel.org>
Cc: catalin.marinas@arm.com, james.morse@arm.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, wanghaibin.wang@huawei.com
Subject: Re: [PATCH] arm64: print additional fault message when executing non-exec memory
Date: Tue, 29 Oct 2019 09:02:37 +0800	[thread overview]
Message-ID: <922ff695-62c4-5142-5efa-daeebd73459e@huawei.com> (raw)
In-Reply-To: <20191028164150.GG5576@willie-the-truck>



On 2019/10/29 0:41, Will Deacon wrote:
> On Mon, Oct 28, 2019 at 05:08:37PM +0800, Xiang Zheng wrote:
>> When attempting to executing non-executable memory, the fault message
>> shows:
>>
>>   Unable to handle kernel read from unreadable memory at virtual address
>>   ffff802dac469000
>>
>> This may confuse someone, so add a new fault message for instruction
>> abort.
>>
>> Signed-off-by: Xiang Zheng <zhengxiang9@huawei.com>
>> ---
>>  arch/arm64/mm/fault.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
>> index 9fc6db0bcbad..68bf4ec376d0 100644
>> --- a/arch/arm64/mm/fault.c
>> +++ b/arch/arm64/mm/fault.c
>> @@ -318,6 +318,8 @@ static void __do_kernel_fault(unsigned long addr, unsigned int esr,
>>  	if (is_el1_permission_fault(addr, esr, regs)) {
>>  		if (esr & ESR_ELx_WNR)
>>  			msg = "write to read-only memory";
>> +		else if (is_el1_instruction_abort(esr))
>> +			msg = "execute non-executable memory";
> 
> nit, please make this "execute from non-executable memory".

Thanks, I will make this in the next version of patch.

> 
> With that:
> 
> Acked-by: Will Deacon <will@kernel.org>
> 
> Will
> 
> .
> 

-- 

Thanks,
Xiang


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2019-10-29  1:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28  9:08 [PATCH] arm64: print additional fault message when executing non-exec memory Xiang Zheng
2019-10-28 16:41 ` Will Deacon
2019-10-29  1:02   ` Xiang Zheng [this message]

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=922ff695-62c4-5142-5efa-daeebd73459e@huawei.com \
    --to=zhengxiang9@huawei.com \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wanghaibin.wang@huawei.com \
    --cc=will@kernel.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).