Re: [PATCH 2/3] drm/amd: validate user pitch alignment

2018-12-27 Thread Michel Dänzer
On 2018-12-23 10:44 p.m., Yu Zhao wrote: > On Fri, Dec 21, 2018 at 10:07:26AM +0100, Michel Dänzer wrote: >> On 2018-12-21 4:10 a.m., Yu Zhao wrote: >>> Userspace may request pitch alignment that is not supported by GPU. >>> Some requests 32, but GPU ignores it and uses default 64 when cpp is >>>

Re: [PATCH 2/3] drm/amd: validate user pitch alignment

2018-12-26 Thread Yu Zhao
On Fri, Dec 21, 2018 at 10:07:26AM +0100, Michel Dänzer wrote: > On 2018-12-21 4:10 a.m., Yu Zhao wrote: > > Userspace may request pitch alignment that is not supported by GPU. > > Some requests 32, but GPU ignores it and uses default 64 when cpp is > > 4. If GEM object is allocated based on the

Re: [PATCH 2/3] drm/amd: validate user pitch alignment

2018-12-21 Thread Yu Zhao
On Fri, Dec 21, 2018 at 10:07:26AM +0100, Michel Dänzer wrote: > On 2018-12-21 4:10 a.m., Yu Zhao wrote: > > Userspace may request pitch alignment that is not supported by GPU. > > Some requests 32, but GPU ignores it and uses default 64 when cpp is > > 4. If GEM object is allocated based on the

Re: [PATCH 2/3] drm/amd: validate user pitch alignment

2018-12-21 Thread Michel Dänzer
On 2018-12-21 4:10 a.m., Yu Zhao wrote: > Userspace may request pitch alignment that is not supported by GPU. > Some requests 32, but GPU ignores it and uses default 64 when cpp is > 4. If GEM object is allocated based on the smaller alignment, GPU > DMA will go out of bound. > > For GPU that

Re: [PATCH 2/3] drm/amd: validate user pitch alignment

2018-12-21 Thread Michel Dänzer
On 2018-12-21 4:10 a.m., Yu Zhao wrote: > Userspace may request pitch alignment that is not supported by GPU. > Some requests 32, but GPU ignores it and uses default 64 when cpp is > 4. If GEM object is allocated based on the smaller alignment, GPU > DMA will go out of bound. > > For GPU that

[PATCH 2/3] drm/amd: validate user pitch alignment

2018-12-21 Thread Yu Zhao
Userspace may request pitch alignment that is not supported by GPU. Some requests 32, but GPU ignores it and uses default 64 when cpp is 4. If GEM object is allocated based on the smaller alignment, GPU DMA will go out of bound. For GPU that does frame buffer compression, DMA writing out of bound