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: <vclmxoorivzhamd4smaaeyamdeangj3aqlbl27muzxuljasdrg@t4jj77rmiozu>
Date: Mon, 17 Feb 2025 11:01:47 +1100
From: Alistair Popple <apopple@...dia.com>
To: David Hildenbrand <david@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, 
	linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org, dri-devel@...ts.freedesktop.org, 
	linux-mm@...ck.org, nouveau@...ts.freedesktop.org, 
	linux-trace-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org, damon@...ts.linux.dev, 
	Jérôme Glisse <jglisse@...hat.com>, Jonathan Corbet <corbet@....net>, Alex Shi <alexs@...nel.org>, 
	Yanteng Si <si.yanteng@...ux.dev>, Karol Herbst <kherbst@...hat.com>, Lyude Paul <lyude@...hat.com>, 
	Danilo Krummrich <dakr@...nel.org>, David Airlie <airlied@...il.com>, 
	Simona Vetter <simona@...ll.ch>, Masami Hiramatsu <mhiramat@...nel.org>, 
	Oleg Nesterov <oleg@...hat.com>, Peter Zijlstra <peterz@...radead.org>, 
	SeongJae Park <sj@...nel.org>, "Liam R. Howlett" <Liam.Howlett@...cle.com>, 
	Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, Vlastimil Babka <vbabka@...e.cz>, Jann Horn <jannh@...gle.com>, 
	Pasha Tatashin <pasha.tatashin@...een.com>, Peter Xu <peterx@...hat.com>, Jason Gunthorpe <jgg@...dia.com>, 
	Simona Vetter <simona.vetter@...ll.ch>
Subject: Re: [PATCH v2 03/17] mm/rmap: convert make_device_exclusive_range()
 to make_device_exclusive()

On Tue, Feb 11, 2025 at 09:33:54AM +0100, David Hildenbrand wrote:
> On 11.02.25 06:00, Andrew Morton wrote:
> > On Mon, 10 Feb 2025 20:37:45 +0100 David Hildenbrand <david@...hat.com> wrote:
> > 
> > > The single "real" user in the tree of make_device_exclusive_range() always
> > > requests making only a single address exclusive. The current implementation
> > > is hard to fix for properly supporting anonymous THP / large folios and
> > > for avoiding messing with rmap walks in weird ways.
> > > 
> > > So let's always process a single address/page and return folio + page to
> > > minimize page -> folio lookups. This is a preparation for further
> > > changes.
> > > 
> > > Reject any non-anonymous or hugetlb folios early, directly after GUP.
> > > 
> > > While at it, extend the documentation of make_device_exclusive() to
> > > clarify some things.
> > 
> > x86_64 allmodconfig:
> > 
> > drivers/gpu/drm/nouveau/nouveau_svm.c: In function 'nouveau_atomic_range_fault':
> > drivers/gpu/drm/nouveau/nouveau_svm.c:612:68: error: 'folio' undeclared (first use in this function)
> >    612 |                 page = make_device_exclusive(mm, start, drm->dev, &folio);
> >        |                                                                    ^~~~~
> > drivers/gpu/drm/nouveau/nouveau_svm.c:612:68: note: each undeclared identifier is reported only once for each function it appears in
> 
> Ah! Because I was carrying on the same branch SVM fixes [1] that are
> getting surprisingly little attention so far.

I believe this has been picked up in drm-misc-fixes now:

https://lore.kernel.org/dri-devel/Z69eloo_7LM6NneO@cassiopeiae/

> 
> 
> The following sorts it out for now:
> 
> From 337c68bf24af59f36477be11ea6ef7c7ce9aa8ae Mon Sep 17 00:00:00 2001
> From: David Hildenbrand <david@...hat.com>
> Date: Tue, 11 Feb 2025 09:33:04 +0100
> Subject: [PATCH] merge
> 
> Signed-off-by: David Hildenbrand <david@...hat.com>
> ---
>  drivers/gpu/drm/nouveau/nouveau_svm.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b/drivers/gpu/drm/nouveau/nouveau_svm.c
> index 39e3740980bb7..1fed638b9eba8 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_svm.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_svm.c
> @@ -590,6 +590,7 @@ static int nouveau_atomic_range_fault(struct nouveau_svmm *svmm,
>  	unsigned long timeout =
>  		jiffies + msecs_to_jiffies(HMM_RANGE_DEFAULT_TIMEOUT);
>  	struct mm_struct *mm = svmm->notifier.mm;
> +	struct folio *folio;
>  	struct page *page;
>  	unsigned long start = args->p.addr;
>  	unsigned long notifier_seq;
> -- 
> 2.48.1
> 
> 
> I'll resend [1] once this stuff here landed.
> 
> Let me know if you want a full resend of this series, thanks.
> 
> 
> [1] https://lkml.kernel.org/r/20250124181524.3584236-1-david@redhat.com
> 
> -- 
> Cheers,
> 
> David / dhildenb
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ