Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 472dd690 authored by Laura Abbott's avatar Laura Abbott Committed by Alex Shi
Browse files

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: default avatarLaura Abbott <labbott@redhat.com>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
(cherry picked from commit 7c15d9bb8231f998ae7dc0b72415f5215459f7fb)
Signed-off-by: default avatarAlex Shi <alex.shi@linaro.org>
parent 21a48ffe
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -65,8 +65,10 @@ enum {

#ifdef CONFIG_CMA
#  define is_migrate_cma(migratetype) unlikely((migratetype) == MIGRATE_CMA)
#  define is_migrate_cma_page(_page) (get_pageblock_migratetype(_page) == MIGRATE_CMA)
#else
#  define is_migrate_cma(migratetype) false
#  define is_migrate_cma_page(_page) false
#endif

#define for_each_migratetype_order(order, type) \