ANDROID: android: Add symbols to debug_symbols driver

in our vendor driver, we need the following three kernel variables:
include/linuc/mm.h:
extern unsigned long stack_guard_gap;
extern int sysctl_legacy_va_layout;

include/linux/security.h:
extern unsigned long mmap_min_addr;

Bug: 191439466
Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I9d1759d8157ddd214475742e417dfb9e870d4b2e
This commit is contained in:
xieliujie
2021-07-02 20:34:05 +08:00
committed by Todd Kjos
parent 914a7b14a0
commit a2b3afb2f7
2 changed files with 16 additions and 0 deletions

View File

@@ -16,6 +16,8 @@
#include <linux/memblock.h> #include <linux/memblock.h>
#include <linux/page_owner.h> #include <linux/page_owner.h>
#include <linux/swap.h> #include <linux/swap.h>
#include <linux/mm.h>
#include <linux/security.h>
struct ads_entry { struct ads_entry {
char *name; char *name;
@@ -59,6 +61,13 @@ static const struct ads_entry ads_entries[ADS_END] = {
#ifdef CONFIG_SWAP #ifdef CONFIG_SWAP
ADS_ENTRY(ADS_NR_SWAP_PAGES, &nr_swap_pages), ADS_ENTRY(ADS_NR_SWAP_PAGES, &nr_swap_pages),
#endif #endif
#ifdef CONFIG_MMU
ADS_ENTRY(ADS_MMAP_MIN_ADDR, &mmap_min_addr),
#endif
ADS_ENTRY(ADS_STACK_GUARD_GAP, &stack_guard_gap),
#ifdef CONFIG_SYSCTL
ADS_ENTRY(ADS_SYSCTL_LEGACY_VA_LAYOUT, &sysctl_legacy_va_layout),
#endif
}; };
/* /*

View File

@@ -29,6 +29,13 @@ enum android_debug_symbol {
#endif #endif
#ifdef CONFIG_SWAP #ifdef CONFIG_SWAP
ADS_NR_SWAP_PAGES, ADS_NR_SWAP_PAGES,
#endif
#ifdef CONFIG_MMU
ADS_MMAP_MIN_ADDR,
#endif
ADS_STACK_GUARD_GAP,
#ifdef CONFIG_SYSCTL
ADS_SYSCTL_LEGACY_VA_LAYOUT,
#endif #endif
ADS_END ADS_END
}; };