linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] arm64: mm: don't print out page table entries on EL0 faults
Date: Mon, 22 May 2017 13:21:16 +0100	[thread overview]
Message-ID: <20170522122115.GF1107@arm.com> (raw)
In-Reply-To: <1495453554-9412-2-git-send-email-kristina.martsenko@arm.com>

On Mon, May 22, 2017 at 12:45:54PM +0100, Kristina Martsenko wrote:
> When we take a fault from EL0 that can't be handled, we print out the
> page table entries associated with the faulting address. This allows
> userspace to print out any current page table entries, including kernel
> (TTBR1) entries.  Exposing kernel mappings like this could pose a
> security risk, so don't print out page table information on EL0 faults.
> (But still print it out for EL1 faults.)
> 
> Signed-off-by: Kristina Martsenko <kristina.martsenko@arm.com>

It might be worth mentioning that this follows the same behaviour as x86.
In fact, they print the name of the faulting VMA using print_vma_addr,
which might be useful too.

Will

> ---
>  arch/arm64/mm/fault.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
> index 0c32f34fb4af..798841f4b00a 100644
> --- a/arch/arm64/mm/fault.c
> +++ b/arch/arm64/mm/fault.c
> @@ -260,7 +260,6 @@ static void __do_user_fault(struct task_struct *tsk, unsigned long addr,
>  		pr_info("%s[%d]: unhandled %s (%d) at 0x%08lx, esr 0x%03x\n",
>  			tsk->comm, task_pid_nr(tsk), inf->name, sig,
>  			addr, esr);
> -		show_pte(addr);
>  		show_regs(regs);
>  	}
>  
> -- 
> 2.1.4
> 

  reply	other threads:[~2017-05-22 12:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22 11:45 [PATCH 1/2] arm64: mm: print out correct page table entries Kristina Martsenko
2017-05-22 11:45 ` [PATCH 2/2] arm64: mm: don't print out page table entries on EL0 faults Kristina Martsenko
2017-05-22 12:21   ` Will Deacon [this message]
2017-05-31 19:38     ` Kristina Martsenko
2017-06-01 12:37       ` Will Deacon
2017-05-22 12:18 ` [PATCH 1/2] arm64: mm: print out correct page table entries Will Deacon
2017-05-31 19:37   ` Kristina Martsenko

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=20170522122115.GF1107@arm.com \
    --to=will.deacon@arm.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 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).