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: Thu, 11 Apr 2024 15:10:23 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Alistair Popple <apopple@...dia.com>
Cc: linux-mm@...ck.org, david@...morbit.com, dan.j.williams@...el.com,
	jhubbard@...dia.com, rcampbell@...dia.com, jgg@...dia.com,
	linux-fsdevel@...r.kernel.org, jack@...e.cz, djwong@...nel.org,
	hch@....de, david@...hat.com, ruansy.fnst@...itsu.com,
	nvdimm@...ts.linux.dev, linux-xfs@...r.kernel.org,
	linux-ext4@...r.kernel.org, jglisse@...hat.com
Subject: Re: [RFC 07/10] mm: Allow compound zone device pages

On Thu, Apr 11, 2024 at 10:57:28AM +1000, Alistair Popple wrote:
> Supporting compound zone device pages requires compound_head() to
> distinguish between head and tail pages whilst still preserving the
> special struct page fields that are specific to zone device pages.
> 
> A tail page is distinguished by having bit zero being set in
> page->compound_head, with the remaining bits pointing to the head
> page. For zone device pages page->compound_head is shared with
> page->pgmap.
> 
> The page->pgmap field is common to all pages within a memory section.
> Therefore pgmap is the same for both head and tail pages and we can
> use the same scheme to distinguish tail pages. To obtain the pgmap for
> a tail page a new accessor is introduced to fetch it from
> compound_head.

Would it make sense at this point to move pgmap and zone_device_data
from struct page to struct folio?  That will make any forgotten
places fail to compile instead of getting a bogus value.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ