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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 28 Apr 2020 15:52:51 -0700
From:   Matthew Wilcox <willy@...radead.org>
To:     Ira Weiny <ira.weiny@...el.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        Will Deacon <will@...nel.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Russell King <linux@...linux.org.uk>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        linux-m68k@...ts.linux-m68k.org
Subject: Re: [PATCH 1/7] mm: Document x86 uses a linked list of pgds

On Tue, Apr 28, 2020 at 02:41:09PM -0700, Ira Weiny wrote:
> On Tue, Apr 28, 2020 at 12:44:43PM -0700, Matthew Wilcox wrote:
> > x86 uses page->lru of the pages used for pgds, but that's not immediately
> > obvious to anyone looking to make changes.  Add a struct list_head to
> > the union so it's clearly in use for pgds.
> 
> Shouldn't pgd_list_{add,del}() use this list head variable instead of lru to
> complete the documentation?
> 
> Probably the list iteration loops arch/x86/* as well?

Yes, but I felt that was out of scope for this patchset.  Untangling the
uses of struct page is a long and messy business; if we have to fix
everything at once, we'll never get anywhere.  There's also the slab
users of page->lru instead of page->slab_list.

What I actually want to get to is:

struct page {
	unsigned long flags;
	union {
		struct file_page file;
		struct anon_page anon;
		struct pt_page pt;
		struct slab_page slab;
		struct tail_page tail;
		struct rcu_head rcu;
	};
	union {
		atomic_t _mapcount;
		...
	};
	atomic_t refcount;
	...
};

and then we can refer to page->pt.list and so on.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ