Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1618171

Re: [PATCH v4] arm64: print a fault message when attempting to write RO memory

Path csiph.com!weretis.net!feeder6.news.weretis.net!feeder4.news.weretis.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Catalin Marinas <catalin.marinas@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4] arm64: print a fault message when attempting to write RO memory
Date Thu, 06 Apr 2017 18:40:02 +0200
Message-ID <ttiBY-3iF-13@gated-at.bofh.it> (permalink)
References <tsYDf-6EZ-5@gated-at.bofh.it>
X-Original-To Stephen Boyd <stephen.boyd@linaro.org>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.23 (2014-03-12)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 35
Organization linux.* mail to news gateway
X-Original-Cc Will Deacon <will.deacon@arm.com>, Mark Rutland <mark.rutland@arm.com>, Laura Abbott <labbott@redhat.com>, James Morse <james.morse@arm.com>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
X-Original-Date Thu, 6 Apr 2017 17:36:25 +0100
X-Original-Message-ID <20170406163625.GD7705@e104818-lin.cambridge.arm.com>
X-Original-References <20170405191831.8246-1-stephen.boyd@linaro.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1618171

Show key headers only | View raw


On Wed, Apr 05, 2017 at 12:18:31PM -0700, Stephen Boyd wrote:
> If a page is marked read only we should print out that fact,
> instead of printing out that there was a page fault. Right now we
> get a cryptic error message that something went wrong with an
> unhandled fault, but we don't evaluate the esr to figure out that
> it was a read/write permission fault.
> 
> Instead of seeing:
> 
>   Unable to handle kernel paging request at virtual address ffff000008e460d8
>   pgd = ffff800003504000
>   [ffff000008e460d8] *pgd=0000000083473003, *pud=0000000083503003, *pmd=0000000000000000
>   Internal error: Oops: 9600004f [#1] PREEMPT SMP
> 
> we'll see:
> 
>   Unable to handle kernel write to read-only memory at virtual address ffff000008e760d8
>   pgd = ffff80003d3de000
>   [ffff000008e760d8] *pgd=0000000083472003, *pud=0000000083435003, *pmd=0000000000000000
>   Internal error: Oops: 9600004f [#1] PREEMPT SMP
> 
> We also add a userspace address check into is_permission_fault()
> so that the function doesn't return true for ttbr0 PAN faults
> when it shouldn't.
> 
> Reviewed-by: James Morse <james.morse@arm.com>
> Tested-by: James Morse <james.morse@arm.com>
> Acked-by: Laura Abbott <labbott@redhat.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>

Queued for 4.12. Thanks.

-- 
Catalin

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH v4] arm64: print a fault message when attempting to write RO memory Stephen Boyd <stephen.boyd@linaro.org> - 2017-04-05 21:20 +0200
  Re: [PATCH v4] arm64: print a fault message when attempting to write  RO memory Catalin Marinas <catalin.marinas@arm.com> - 2017-04-06 18:40 +0200

csiph-web