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: <20240605214342.GA781723@bhelgaas>
Date: Wed, 5 Jun 2024 16:43:42 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Martin Oliveira <martin.oliveira@...eticom.com>
Cc: linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-pci@...r.kernel.org, linux-mm@...ck.org,
	Jason Gunthorpe <jgg@...pe.ca>, Leon Romanovsky <leon@...nel.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Logan Gunthorpe <logang@...tatee.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Tejun Heo <tj@...nel.org>, "Rafael J. Wysocki" <rafael@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Mike Marciniszyn <mike.marciniszyn@...el.com>,
	Michael Guralnik <michaelgur@...dia.com>,
	Dan Williams <dan.j.williams@...el.com>,
	Ard Biesheuvel <ardb@...nel.org>,
	Valentine Sinitsyn <valesini@...dex-team.ru>,
	Lukas Wunner <lukas@...ner.de>
Subject: Re: [PATCH 1/6] kernfs: create vm_operations_struct without
 page_mkwrite()

On Wed, Jun 05, 2024 at 01:29:29PM -0600, Martin Oliveira wrote:
> The standard kernfs vm_ops installs a page_mkwrite() operator which
> modifies the file update time on write.
> 
> This not always required (or makes sense), such as in the P2PDMA, which

s/This/This is/ ?

> uses the sysfs file as an allocator from userspace.
> 
> Furthermore, having the page_mkwrite() operator causes
> writable_file_mapping_allowed() to fail due to
> vma_needs_dirty_tracking() on the gup flow, which is a pre-requisite for
> enabling P2PDMA over RDMA.
> 
> Fix this by adding a new boolean on kernfs_ops to differentiate between
> the different behaviours.

> +	 * Use the file as an allocator from userspace. This disables
> +	 * page_mkwrite() to prevent the file time from being updated on write
> +	 * which enables using GUP with FOLL_LONGTERM with memory that's been
> +	 * mmaped.

"mmaped" does seem more commonly used in Linux than "mmapped", but the
base word "mapped" definitely requires "pp", so "mmaped" looks funny
to me.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ