Re: [Nouveau] [PATCH] nouveau/gem: fix user-after-free in nouveau_gem_new

2021-05-17 Thread Thierry Reding
On Tue, May 11, 2021 at 06:35:53PM +0200, Karol Herbst wrote: > If ttm_bo_init fails it will already call ttm_bo_put, so we don't have to > do it through nouveau_bo_ref. > > == > BUG: KFENCE: use-after-free write in

Re: [Nouveau] [PATCH] nouveau/gem: fix user-after-free in nouveau_gem_new

2021-05-17 Thread Thierry Reding
On Mon, May 17, 2021 at 10:56:29AM +0200, Thierry Reding wrote: > On Tue, May 11, 2021 at 06:35:53PM +0200, Karol Herbst wrote: > > If ttm_bo_init fails it will already call ttm_bo_put, so we don't have to > > do it through nouveau_bo_ref. > > > >

Re: [Nouveau] [PATCH] nouveau/gem: fix user-after-free in nouveau_gem_new

2021-05-17 Thread Thierry Reding
On Mon, May 17, 2021 at 09:32:44AM -0400, Jeremy Cline wrote: > On Mon, May 17, 2021 at 11:19:02AM +0200, Thierry Reding wrote: > > On Mon, May 17, 2021 at 10:56:29AM +0200, Thierry Reding wrote: > > > On Tue, May 11, 2021 at 06:35:53PM +0200, Karol Herbst wrote: > > > > If ttm_bo_init fails it

Re: [Nouveau] [PATCH 0/3] drm: Remove some includes of drm_legacy.h

2021-05-17 Thread Jani Nikula
On Sun, 16 May 2021, Thomas Zimmermann wrote: > Remove include statements for DRM legacy headers. None of these > dependencies is required. Built-tested w/o CONFIG_DRM_LEGACY set. > > These patches should probably go through drm-misc, like the rest > of the legacy cleanups. Acked-by: Jani Nikula

Re: [Nouveau] [PATCH] nouveau/gem: fix user-after-free in nouveau_gem_new

2021-05-17 Thread Karol Herbst
On Mon, May 17, 2021 at 11:17 AM Thierry Reding wrote: > > On Mon, May 17, 2021 at 10:56:29AM +0200, Thierry Reding wrote: > > On Tue, May 11, 2021 at 06:35:53PM +0200, Karol Herbst wrote: > > > If ttm_bo_init fails it will already call ttm_bo_put, so we don't have to > > > do it through

Re: [Nouveau] [PATCH] nouveau/gem: fix user-after-free in nouveau_gem_new

2021-05-17 Thread Jeremy Cline
On Mon, May 17, 2021 at 11:19:02AM +0200, Thierry Reding wrote: > On Mon, May 17, 2021 at 10:56:29AM +0200, Thierry Reding wrote: > > On Tue, May 11, 2021 at 06:35:53PM +0200, Karol Herbst wrote: > > > If ttm_bo_init fails it will already call ttm_bo_put, so we don't have to > > > do it through

Re: [Nouveau] [PATCH 0/7] Per client engine busyness

2021-05-17 Thread Simon Ser
On Monday, May 17th, 2021 at 8:16 PM, Nieto, David M wrote: > Btw is DRM_MAJOR 226 consider uapi? I don't see it in uapi headers. It's not in the headers, but it's de facto uAPI, as seen in libdrm: > git grep 226 xf86drm.c 99:#define DRM_MAJOR 226 /* Linux */

Re: [Nouveau] [PATCH 0/7] Per client engine busyness

2021-05-17 Thread Nieto, David M
[Public] Cycling some of the Nvidia/nouveau guys here too. I think there is a benefit on trying to estandarize how fdinfo can be used to expose per engine and device memory utilization. Another of the advantages of going the /proc/ way instead of the sysfs debugfs approach is that you inherit

Re: [Nouveau] [PATCH v8 5/8] mm: Device exclusive memory access

2021-05-17 Thread Peter Xu
Hi, Alistair, The overall patch looks good to me, however I have a few comments or questions inlined below. On Wed, Apr 07, 2021 at 06:42:35PM +1000, Alistair Popple wrote: > Some devices require exclusive write access to shared virtual > memory (SVM) ranges to perform atomic operations on that

Re: [Nouveau] [PATCH v8 1/8] mm: Remove special swap entry functions

2021-05-17 Thread Peter Xu
On Wed, Apr 07, 2021 at 06:42:31PM +1000, Alistair Popple wrote: > +static inline struct page *pfn_swap_entry_to_page(swp_entry_t entry) > +{ > + struct page *p = pfn_to_page(swp_offset(entry)); > + > + /* > + * Any use of migration entries may only occur while the > + *