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-next>] [day] [month] [year] [list]
Message-ID: <20220907082643.186979-1-wangkefeng.wang@huawei.com>
Date:   Wed, 7 Sep 2022 16:26:43 +0800
From:   Kefeng Wang <wangkefeng.wang@...wei.com>
To:     Andrew Morton <akpm@...ux-foundation.org>, <linux-mm@...ck.org>
CC:     Mike Rapoport <rppt@...nel.org>,
        David Hildenbrand <david@...hat.com>,
        Oscar Salvador <osalvador@...e.de>,
        <linux-kernel@...r.kernel.org>, "Vlastimil Babka" <vbabka@...e.cz>,
        Kefeng Wang <wangkefeng.wang@...wei.com>
Subject: [PATCH v2 4/3] memblock tests: add new pageblock related macro

Add new pageblock_start_pfn() and pageblock_align() macro
which are needed by memblock tests.

Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
---
 tools/testing/memblock/linux/mmzone.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/memblock/linux/mmzone.h b/tools/testing/memblock/linux/mmzone.h
index 7c2eb5c9bb54..e65f89b12f1c 100644
--- a/tools/testing/memblock/linux/mmzone.h
+++ b/tools/testing/memblock/linux/mmzone.h
@@ -22,6 +22,8 @@ enum zone_type {
 
 #define pageblock_order		(MAX_ORDER - 1)
 #define pageblock_nr_pages	BIT(pageblock_order)
+#define pageblock_align(pfn)	ALIGN((pfn), pageblock_nr_pages)
+#define pageblock_start_pfn(pfn)	ALIGN_DOWN((pfn), pageblock_nr_pages)
 
 struct zone {
 	atomic_long_t		managed_pages;
-- 
2.35.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ