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]
Message-ID: <20210116120628.GA3024@localhost.localdomain>
Date:   Sat, 16 Jan 2021 13:06:28 +0100
From:   Oscar Salvador <osalvador@...e.de>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Mike Kravetz <mike.kravetz@...cle.com>,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        Michal Hocko <mhocko@...nel.org>,
        Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
        Muchun Song <songmuchun@...edance.com>,
        David Hildenbrand <david@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 2/5] hugetlb: convert page_huge_active() to HP_Migratable
 flag

On Sat, Jan 16, 2021 at 04:24:16AM +0000, Matthew Wilcox wrote:
> and name these HPG_restore_reserve and HPG_migratable
> 
> and generate the calls to hugetlb_set_page_flag etc from macros, eg:
> 
> #define TESTHPAGEFLAG(uname, lname)					\
> static __always_inline bool HPage##uname(struct page *page)		\
> { return test_bit(HPG_##lname, &page->private); }
> ...
> #define HPAGEFLAG(uname, lname)						\
> 	TESTHPAGEFLAG(uname, lname)					\
> 	SETHPAGEFLAG(uname, lname)					\
> 	CLEARHPAGEFLAG(uname, lname)
> 
> HPAGEFLAG(RestoreReserve, restore_reserve)
> HPAGEFLAG(Migratable, migratable)
> 
> just to mirror page-flags.h more closely.

That is on me.
I thought that given the low number of flags, we coud get away with:

hugetlb_{set,test,clear}_page_flag(page, flag)

and call it from the code.
But some of the flags need to be set/tested outside hugetlb code, so
it indeed looks nicer and more consistent to follow page-flags.h convention.

Sorry for the noise.

-- 
Oscar Salvador
SUSE L3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ