diff options
author | Sami Tolvanen <samitolvanen@google.com> | 2020-04-27 19:00:08 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-05-15 18:35:49 +0300 |
commit | 628d06a48f57c36abdc2a024930212e654a501b7 (patch) | |
tree | de784916db6c4bc3c63a99efc825e0726dd4b930 /mm/page_alloc.c | |
parent | d08b9f0ca6605e13dcb48f04e55a30545b3c71eb (diff) | |
download | linux-628d06a48f57c36abdc2a024930212e654a501b7.tar.xz |
scs: Add page accounting for shadow call stack allocations
This change adds accounting for the memory allocated for shadow stacks.
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 69827d4fa052..83743d7a6177 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5411,6 +5411,9 @@ void show_free_areas(unsigned int filter, nodemask_t *nodemask) " managed:%lukB" " mlocked:%lukB" " kernel_stack:%lukB" +#ifdef CONFIG_SHADOW_CALL_STACK + " shadow_call_stack:%lukB" +#endif " pagetables:%lukB" " bounce:%lukB" " free_pcp:%lukB" @@ -5433,6 +5436,9 @@ void show_free_areas(unsigned int filter, nodemask_t *nodemask) K(zone_managed_pages(zone)), K(zone_page_state(zone, NR_MLOCK)), zone_page_state(zone, NR_KERNEL_STACK_KB), +#ifdef CONFIG_SHADOW_CALL_STACK + zone_page_state(zone, NR_KERNEL_SCS_KB), +#endif K(zone_page_state(zone, NR_PAGETABLE)), K(zone_page_state(zone, NR_BOUNCE)), K(free_pcp), |