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] [day] [month] [year] [list]
Message-ID: <Zo1Kig5y-ggl0g_e@casper.infradead.org>
Date: Tue, 9 Jul 2024 15:34:50 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Martin Oliveira <martin.oliveira@...eticom.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	linux-rdma@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Artemy Kovalyov <artemyko@...dia.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jason Gunthorpe <jgg@...pe.ca>, Leon Romanovsky <leon@...nel.org>,
	Logan Gunthorpe <logang@...tatee.com>,
	Michael Guralnik <michaelgur@...dia.com>,
	Mike Marciniszyn <mike.marciniszyn@...el.com>,
	Shiraz Saleem <shiraz.saleem@...el.com>, Tejun Heo <tj@...nel.org>,
	John Hubbard <jhubbard@...dia.com>,
	Dan Williams <dan.j.williams@...el.com>,
	David Sloan <david.sloan@...eticom.com>
Subject: Re: [PATCH v4 1/3] kernfs: remove page_mkwrite() from
 vm_operations_struct

On Mon, Jul 08, 2024 at 10:57:12AM -0600, Martin Oliveira wrote:
> -	/*
> -	 * It is not possible to successfully wrap close.
> -	 * So error if someone is trying to use close.
> -	 */
> -	if (vma->vm_ops && vma->vm_ops->close)
> -		goto out_put;
> +	if (vma->vm_ops) {
> +		/*
> +		 * It is not possible to successfully wrap close.
> +		 * So error if someone is trying to use close.
> +		 */
> +		if (vma->vm_ops->close)
> +			goto out_put;
> +
> +		if (WARN_ON_ONCE(vma->vm_ops->page_mkwrite))
> +			goto out_put;
> +	}

This is stupid.  Warn for both or neither.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ