diff options
author | Ingo Molnar <mingo@kernel.org> | 2018-08-18 13:11:51 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-08-18 13:11:51 +0200 |
commit | 5804b11034a21e4287daaf017c5ad60ad7af8d67 (patch) | |
tree | 79dd4998b58e3124bc2e5749914e4046afe5d0fd /arch | |
parent | 13e091b6dd0e78a518a7d8756607d3acb8215768 (diff) | |
parent | 6855dc41b24619c3d1de3dbd27dd0546b0e45272 (diff) | |
download | linux-stable-5804b11034a21e4287daaf017c5ad60ad7af8d67.tar.gz linux-stable-5804b11034a21e4287daaf017c5ad60ad7af8d67.tar.bz2 linux-stable-5804b11034a21e4287daaf017c5ad60ad7af8d67.zip |
Merge tag 'perf-core-for-mingo-4.19-20180815' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
kernel:
- kallsyms, x86: Export addresses of PTI entry trampolines (Alexander Shishkin)
- kallsyms: Simplify update_iter_mod() (Adrian Hunter)
- x86: Add entry trampolines to kcore (Adrian Hunter)
Hardware tracing:
- Fix auxtrace queue resize (Adrian Hunter)
Arch specific:
- Fix uninitialized ARM SPE record error variable (Kim Phillips)
- Fix trace event post-processing in powerpc (Sandipan Das)
Build:
- Fix check-headers.sh AND list path of execution (Alexander Kapshuk)
- Remove -mcet and -fcf-protection when building the python binding
with older clang versions (Arnaldo Carvalho de Melo)
- Make check-headers.sh check based on kernel dir (Jiri Olsa)
- Move syscall_64.tbl check into check-headers.sh (Jiri Olsa)
Infrastructure:
- Check for null when copying nsinfo. (Benno Evers)
Libraries:
- Rename libtraceevent prefixes, prep work for making it a shared
library generaly available (Tzvetomir Stoyanov (VMware))
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/mm/cpu_entry_area.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/x86/mm/cpu_entry_area.c b/arch/x86/mm/cpu_entry_area.c index b45f5aaefd74..076ebdce9bd4 100644 --- a/arch/x86/mm/cpu_entry_area.c +++ b/arch/x86/mm/cpu_entry_area.c @@ -2,6 +2,8 @@ #include <linux/spinlock.h> #include <linux/percpu.h> +#include <linux/kallsyms.h> +#include <linux/kcore.h> #include <asm/cpu_entry_area.h> #include <asm/pgtable.h> @@ -13,6 +15,7 @@ static DEFINE_PER_CPU_PAGE_ALIGNED(struct entry_stack_page, entry_stack_storage) #ifdef CONFIG_X86_64 static DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks [(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ]); +static DEFINE_PER_CPU(struct kcore_list, kcore_entry_trampoline); #endif struct cpu_entry_area *get_cpu_entry_area(int cpu) @@ -146,10 +149,40 @@ static void __init setup_cpu_entry_area(int cpu) cea_set_pte(&get_cpu_entry_area(cpu)->entry_trampoline, __pa_symbol(_entry_trampoline), PAGE_KERNEL_RX); + /* + * The cpu_entry_area alias addresses are not in the kernel binary + * so they do not show up in /proc/kcore normally. This adds entries + * for them manually. + */ + kclist_add_remap(&per_cpu(kcore_entry_trampoline, cpu), + _entry_trampoline, + &get_cpu_entry_area(cpu)->entry_trampoline, PAGE_SIZE); #endif percpu_setup_debug_store(cpu); } +#ifdef CONFIG_X86_64 +int arch_get_kallsym(unsigned int symnum, unsigned long *value, char *type, + char *name) +{ + unsigned int cpu, ncpu = 0; + + if (symnum >= num_possible_cpus()) + return -EINVAL; + + for_each_possible_cpu(cpu) { + if (ncpu++ >= symnum) + break; + } + + *value = (unsigned long)&get_cpu_entry_area(cpu)->entry_trampoline; + *type = 't'; + strlcpy(name, "__entry_SYSCALL_64_trampoline", KSYM_NAME_LEN); + + return 0; +} +#endif + static __init void setup_cpu_entry_area_ptes(void) { #ifdef CONFIG_X86_32 |