Skip to content

Commit 472dd69

Browse files
labbottAlex Shi
authored andcommitted
mm: Add is_migrate_cma_page
Code such as hardened user copy[1] needs a way to tell if a page is CMA or not. Add is_migrate_cma_page in a similar way to is_migrate_isolate_page. [1]http://article.gmane.org/gmane.linux.kernel.mm/155238 Signed-off-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Kees Cook <keescook@chromium.org> (cherry picked from commit 7c15d9bb8231f998ae7dc0b72415f5215459f7fb) Signed-off-by: Alex Shi <alex.shi@linaro.org>
1 parent 21a48ff commit 472dd69

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

include/linux/mmzone.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ enum {
6565

6666
#ifdef CONFIG_CMA
6767
# define is_migrate_cma(migratetype) unlikely((migratetype) == MIGRATE_CMA)
68+
# define is_migrate_cma_page(_page) (get_pageblock_migratetype(_page) == MIGRATE_CMA)
6869
#else
6970
# define is_migrate_cma(migratetype) false
71+
# define is_migrate_cma_page(_page) false
7072
#endif
7173

7274
#define for_each_migratetype_order(order, type) \

0 commit comments

Comments
 (0)