diff options
author | Sami Tolvanen <samitolvanen@google.com> | 2020-04-27 09:00:08 -0700 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-05-15 16:35:49 +0100 |
commit | 628d06a48f57c36abdc2a024930212e654a501b7 (patch) | |
tree | de784916db6c4bc3c63a99efc825e0726dd4b930 /fs/proc/meminfo.c | |
parent | d08b9f0ca6605e13dcb48f04e55a30545b3c71eb (diff) | |
download | linux-628d06a48f57c36abdc2a024930212e654a501b7.tar.bz2 |
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 'fs/proc/meminfo.c')
-rw-r--r-- | fs/proc/meminfo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c index 8c1f1bb1a5ce..09cd51c8d23d 100644 --- a/fs/proc/meminfo.c +++ b/fs/proc/meminfo.c @@ -103,6 +103,10 @@ static int meminfo_proc_show(struct seq_file *m, void *v) show_val_kb(m, "SUnreclaim: ", sunreclaim); seq_printf(m, "KernelStack: %8lu kB\n", global_zone_page_state(NR_KERNEL_STACK_KB)); +#ifdef CONFIG_SHADOW_CALL_STACK + seq_printf(m, "ShadowCallStack:%8lu kB\n", + global_zone_page_state(NR_KERNEL_SCS_KB)); +#endif show_val_kb(m, "PageTables: ", global_zone_page_state(NR_PAGETABLE)); |