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: <20200205122423.GA2903@kevin>
Date:   Wed, 5 Feb 2020 07:24:23 -0500
From:   Alyssa Rosenzweig <alyssa.rosenzweig@...labora.com>
To:     Tomeu Vizoso <tomeu.vizoso@...labora.com>
Cc:     linux-kernel@...r.kernel.org, Rob Herring <robh@...nel.org>,
        Steven Price <steven.price@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH] drm/panfrost: Don't try to map on error faults

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@...labora.com> 

Although it might be nice to

	#define TRANSLATION_FAULT_LEVEL1 0xC1
	...
	#define TRANSLATION_FAULT_LEVEL4 0xC4

and then use semantic names instead of magic values. Minimally maybe add
a comment explaining that.

On Wed, Feb 05, 2020 at 11:07:16AM +0100, 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.
> 
> Otherwise, we can get flooded by kernel warnings and further faults.
> 
> 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) {
> -- 
> 2.21.0
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ