lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3500c501-b166-6a1e-267b-31a4e5c62619@arm.com>
Date:   Wed, 5 Feb 2020 13:25:48 +0000
From:   Robin Murphy <robin.murphy@....com>
To:     Tomeu Vizoso <tomeu.vizoso@...labora.com>,
        linux-kernel@...r.kernel.org
Cc:     David Airlie <airlied@...ux.ie>, dri-devel@...ts.freedesktop.org,
        Steven Price <steven.price@....com>,
        Alyssa Rosenzweig <alyssa.rosenzweig@...labora.com>
Subject: Re: [PATCH] drm/panfrost: Don't try to map on error faults

On 05/02/2020 10:07 am, Tomeu Vizoso wrote:
> If the exception type isn't one of the normal faults, don't try to map
> and instead go straight to a terminal fault.

"One of the the normal faults" seems a rather vague way of saying "a 
translation fault", which is what we're specifically handling here, and 
logically the only fault reflecting something not yet mapped rather than 
mapped inappropriately ;)

(Who knows how the level ended up as 1-4 rather than 0-3 as it really 
should be - another Mali Mystery(TM)...)

> Otherwise, we can get flooded by kernel warnings and further faults.

Either way,

Reviewed-by: Robin Murphy <robin.murphy@....com>

> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@...labora.com>
> ---
>   drivers/gpu/drm/panfrost/panfrost_mmu.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
> index 763cfca886a7..80abddb4544c 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c
> @@ -596,8 +596,9 @@ static irqreturn_t panfrost_mmu_irq_handler_thread(int irq, void *data)
>   		source_id = (fault_status >> 16);
>   
>   		/* Page fault only */
> -		if ((status & mask) == BIT(i)) {
> -			WARN_ON(exception_type < 0xC1 || exception_type > 0xC4);
> +		if ((status & mask) == BIT(i) &&
> +		     exception_type >= 0xC1 &&
> +		     exception_type <= 0xC4) {
>   
>   			ret = panfrost_mmu_map_fault_addr(pfdev, i, addr);
>   			if (!ret) {
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ