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] [day] [month] [year] [list]
Message-ID: <20241112100736.10b4873b@collabora.com>
Date: Tue, 12 Nov 2024 10:07:36 +0100
From: Boris Brezillon <boris.brezillon@...labora.com>
To: Steven Price <steven.price@....com>
Cc: Akash Goel <akash.goel@....com>, liviu.dudau@....com,
 dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
 mihail.atanassov@....com, ketil.johnsen@....com,
 maarten.lankhorst@...ux.intel.com, mripard@...nel.org, tzimmermann@...e.de,
 airlied@...il.com, daniel@...ll.ch, nd@....com
Subject: Re: [PATCH] drm/panthor: Fix handling of partial GPU mapping of BOs

On Mon, 11 Nov 2024 11:31:12 +0000
Steven Price <steven.price@....com> wrote:

> On 11/11/2024 09:26, Akash Goel wrote:
> > This commit fixes the handling of partial GPU mapping of buffer objects
> > in Panthor.
> > VM_BIND ioctl allows Userspace to partially map the BOs to GPU.
> > To map a BO, Panthor walks through the sg_table to retrieve the physical
> > address of pages. If the mapping is created at an offset into the BO,
> > then the scatterlist(s) at the beginning have to be skipped to reach the
> > one corresponding to the offset. But the case where the offset didn't
> > point to the first page of desired scatterlist wasn't handled correctly.
> > The bug caused the partial GPU mapping of BO to go wrong for the said
> > case, as the pages didn't get map at the expected virtual address and
> > consequently there were kernel warnings on unmap.
> > 
> > Signed-off-by: Akash Goel <akash.goel@....com>  
> 
> Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block")
> 
> Reviewed-by: Steven Price <steven.price@....com>

Reviewed-by: Boris Brezillon <boris.brezillon@...labora.com>

> 
> Thanks,
> Steve
> 
> > ---
> >  drivers/gpu/drm/panthor/panthor_mmu.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/panthor/panthor_mmu.c b/drivers/gpu/drm/panthor/panthor_mmu.c
> > index d8cc9e7d064e..6bc188d9a9ad 100644
> > --- a/drivers/gpu/drm/panthor/panthor_mmu.c
> > +++ b/drivers/gpu/drm/panthor/panthor_mmu.c
> > @@ -957,6 +957,7 @@ panthor_vm_map_pages(struct panthor_vm *vm, u64 iova, int prot,
> >  
> >  		paddr += offset;
> >  		len -= offset;
> > +		offset = 0;
> >  		len = min_t(size_t, len, size);
> >  		size -= len;
> >    
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ