Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-23 Thread Daniel Vetter
On Tue, Feb 23, 2021 at 4:59 PM Neil Roberts wrote: > > Daniel Vetter writes: > > > drm_gem_shmem_fault() does not seem to check for purged objects at all. > > > > No idea how this works, or if it ever worked, but yeah something is > > clearly still busted. > > Oh of course, the fault handler doe

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-23 Thread Neil Roberts
Daniel Vetter writes: > drm_gem_shmem_fault() does not seem to check for purged objects at all. > > No idea how this works, or if it ever worked, but yeah something is > clearly still busted. Oh of course, the fault handler doesn’t check this. I’ve added a second patch to make it check and poste

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-23 Thread Daniel Vetter
On Tue, Feb 23, 2021 at 1:42 PM Neil Roberts wrote: > > Daniel Vetter writes: > > > Yeah plus Cc: stable for backporting and I think an igt or similar for > > panfrost to check this works correctly would be pretty good too. Since > > if it took us over 1 year to notice this bug it's pretty clear

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-23 Thread Neil Roberts
Daniel Vetter writes: > Yeah plus Cc: stable for backporting and I think an igt or similar for > panfrost to check this works correctly would be pretty good too. Since > if it took us over 1 year to notice this bug it's pretty clear that > normal testing doesn't catch this. So very likely we'll b

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-22 Thread Daniel Vetter
On Mon, Feb 22, 2021 at 03:24:17PM +0100, Thomas Zimmermann wrote: > Hi > > Am 17.02.21 um 17:59 schrieb Neil Roberts: > > When mmapping the shmem, it would previously adjust the pgoff in the > > vm_area_struct to remove the fake offset that is added to be able to > > identify the buffer. This pat

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-22 Thread Daniel Vetter
On Mon, Feb 22, 2021 at 09:34:43AM +0100, Boris Brezillon wrote: > Hi Daniel, > > On Fri, 19 Feb 2021 18:45:00 +0100 > Daniel Vetter wrote: > > > On Fri, Feb 19, 2021 at 5:17 PM Steven Price wrote: > > > > > > On 19/02/2021 15:13, Daniel Vetter wrote: > > > > On Fri, Feb 19, 2021 at 01:36:06P

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-22 Thread Thomas Zimmermann
Hi Am 17.02.21 um 17:59 schrieb Neil Roberts: When mmapping the shmem, it would previously adjust the pgoff in the vm_area_struct to remove the fake offset that is added to be able to identify the buffer. This patch removes the adjustment and makes the fault handler use the vm_fault address to c

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-22 Thread Boris Brezillon
Hi Daniel, On Fri, 19 Feb 2021 18:45:00 +0100 Daniel Vetter wrote: > On Fri, Feb 19, 2021 at 5:17 PM Steven Price wrote: > > > > On 19/02/2021 15:13, Daniel Vetter wrote: > > > On Fri, Feb 19, 2021 at 01:36:06PM +, Steven Price wrote: > > >> On 18/02/2021 18:20, Daniel Vetter wrote: >

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-19 Thread Daniel Vetter
On Fri, Feb 19, 2021 at 5:17 PM Steven Price wrote: > > On 19/02/2021 15:13, Daniel Vetter wrote: > > On Fri, Feb 19, 2021 at 01:36:06PM +, Steven Price wrote: > >> On 18/02/2021 18:20, Daniel Vetter wrote: > >>> On Thu, Feb 18, 2021 at 6:16 PM Rob Herring wrote: > > On Thu, Feb 18,

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-19 Thread Steven Price
On 19/02/2021 15:13, Daniel Vetter wrote: On Fri, Feb 19, 2021 at 01:36:06PM +, Steven Price wrote: On 18/02/2021 18:20, Daniel Vetter wrote: On Thu, Feb 18, 2021 at 6:16 PM Rob Herring wrote: On Thu, Feb 18, 2021 at 10:51 AM Steven Price wrote: On 18/02/2021 16:38, Rob Herring wrote:

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-19 Thread Daniel Vetter
On Fri, Feb 19, 2021 at 01:36:06PM +, Steven Price wrote: > On 18/02/2021 18:20, Daniel Vetter wrote: > > On Thu, Feb 18, 2021 at 6:16 PM Rob Herring wrote: > > > > > > On Thu, Feb 18, 2021 at 10:51 AM Steven Price > > > wrote: > > > > > > > > On 18/02/2021 16:38, Rob Herring wrote: > > >

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-19 Thread Steven Price
On 18/02/2021 18:20, Daniel Vetter wrote: On Thu, Feb 18, 2021 at 6:16 PM Rob Herring wrote: On Thu, Feb 18, 2021 at 10:51 AM Steven Price wrote: On 18/02/2021 16:38, Rob Herring wrote: On Thu, Feb 18, 2021 at 10:15 AM Steven Price wrote: On 18/02/2021 15:45, Alyssa Rosenzweig wrote: Y

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-18 Thread Daniel Vetter
On Thu, Feb 18, 2021 at 6:16 PM Rob Herring wrote: > > On Thu, Feb 18, 2021 at 10:51 AM Steven Price wrote: > > > > On 18/02/2021 16:38, Rob Herring wrote: > > > On Thu, Feb 18, 2021 at 10:15 AM Steven Price > > > wrote: > > >> > > >> On 18/02/2021 15:45, Alyssa Rosenzweig wrote: > > Yeah

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-18 Thread Rob Herring
On Thu, Feb 18, 2021 at 10:51 AM Steven Price wrote: > > On 18/02/2021 16:38, Rob Herring wrote: > > On Thu, Feb 18, 2021 at 10:15 AM Steven Price wrote: > >> > >> On 18/02/2021 15:45, Alyssa Rosenzweig wrote: > Yeah plus Cc: stable for backporting and I think an igt or similar for > pa

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-18 Thread Steven Price
On 18/02/2021 16:38, Rob Herring wrote: On Thu, Feb 18, 2021 at 10:15 AM Steven Price wrote: On 18/02/2021 15:45, Alyssa Rosenzweig wrote: Yeah plus Cc: stable for backporting and I think an igt or similar for panfrost to check this works correctly would be pretty good too. Since if it took u

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-18 Thread Rob Herring
On Thu, Feb 18, 2021 at 10:15 AM Steven Price wrote: > > On 18/02/2021 15:45, Alyssa Rosenzweig wrote: > >> Yeah plus Cc: stable for backporting and I think an igt or similar for > >> panfrost to check this works correctly would be pretty good too. Since > >> if it took us over 1 year to notice th

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-18 Thread Alyssa Rosenzweig
> Yeah plus Cc: stable for backporting and I think an igt or similar for > panfrost to check this works correctly would be pretty good too. Since > if it took us over 1 year to notice this bug it's pretty clear that > normal testing doesn't catch this. So very likely we'll break this > again. Unfo

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-18 Thread Steven Price
On 18/02/2021 15:45, Alyssa Rosenzweig wrote: Yeah plus Cc: stable for backporting and I think an igt or similar for panfrost to check this works correctly would be pretty good too. Since if it took us over 1 year to notice this bug it's pretty clear that normal testing doesn't catch this. So ver

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-18 Thread Daniel Vetter
On Thu, Feb 18, 2021 at 4:26 PM Steven Price wrote: > > On 17/02/2021 16:59, Neil Roberts wrote: > > When mmapping the shmem, it would previously adjust the pgoff in the > > vm_area_struct to remove the fake offset that is added to be able to > > identify the buffer. This patch removes the adjustm

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-18 Thread Steven Price
On 17/02/2021 16:59, Neil Roberts wrote: When mmapping the shmem, it would previously adjust the pgoff in the vm_area_struct to remove the fake offset that is added to be able to identify the buffer. This patch removes the adjustment and makes the fault handler use the vm_fault address to calcula

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-17 Thread kernel test robot
Hi Neil, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.11 next-20210217] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in

[PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-17 Thread Neil Roberts
When mmapping the shmem, it would previously adjust the pgoff in the vm_area_struct to remove the fake offset that is added to be able to identify the buffer. This patch removes the adjustment and makes the fault handler use the vm_fault address to calculate the page offset instead. Although using