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]
Date: Mon, 18 Mar 2024 13:14:44 +0000
From: Matthew Wilcox <willy@...radead.org>
To: alexs@...nel.org
Cc: kasong@...cent.com, Andrew Morton <akpm@...ux-foundation.org>,
	"open list:MEMORY MANAGEMENT" <linux-mm@...ck.org>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 01/12] mm/ksm: catch tail page abnormal in
 page_stable_node

On Mon, Mar 18, 2024 at 08:14:30PM +0800, alexs@...nel.org wrote:
> From: Alex Shi <alexs@...nel.org>
> 
> commit 19138349ed59 ("mm/migrate: Add folio_migrate_flags()") change the
> meaning of func page_stable_node() to check the compound head for tail
> 'page' instead of tail page self.
> But seems both semantics are same at results, the func always return NULL
>  for tail page. So adding a bug monitor here in case of abnormal.

No.  I didn't object to you doing this to convince yourself, but there's
no way we should have this upstream.

If we did have large KSM folios (and I don't think we should!), you'd
crash the kernel instead of silently doing the right thing.

>  static inline struct ksm_stable_node *page_stable_node(struct page *page)
>  {
> -	return folio_stable_node(page_folio(page));
> +	struct ksm_stable_node *node;
> +
> +	node = folio_stable_node(page_folio(page));
> +	VM_BUG_ON_PAGE(PageTail(page) && node, page);
> +
> +	return node;
>  }


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ