From: Ingo Molnar Date: Mon, 29 Dec 2008 08:45:15 +0000 (+0100) Subject: Merge branch 'linus' into perfcounters/core X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e1df957670aef74ffd9a4ad93e6d2c90bf6b4845;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'linus' into perfcounters/core Conflicts: fs/exec.c include/linux/init_task.h Simple context conflicts. --- e1df957670aef74ffd9a4ad93e6d2c90bf6b4845 diff --cc arch/x86/kernel/apic.c index 4f859acb1563,b5229affb953..6c83ac10e6d3 --- a/arch/x86/kernel/apic.c +++ b/arch/x86/kernel/apic.c @@@ -30,8 -30,8 +30,9 @@@ #include #include #include + #include +#include #include #include #include diff --cc arch/x86/kernel/cpu/Makefile index 89e53361fe24,82db7f45e2de..c3813306e0b4 --- a/arch/x86/kernel/cpu/Makefile +++ b/arch/x86/kernel/cpu/Makefile @@@ -1,9 -1,15 +1,15 @@@ # -# Makefile for x86-compatible CPU details and quirks +# Makefile for x86-compatible CPU details, features and quirks # + # Don't trace early stages of a secondary CPU boot + ifdef CONFIG_FUNCTION_TRACER + CFLAGS_REMOVE_common.o = -pg + endif + obj-y := intel_cacheinfo.o addon_cpuid_features.o obj-y += proc.o capflags.o powerflags.o common.o + obj-y += vmware.o hypervisor.o obj-$(CONFIG_X86_32) += bugs.o cmpxchg.o obj-$(CONFIG_X86_64) += bugs_64.o diff --cc fs/exec.c index d5165d899a49,1f59ea079cbb..911dd0fd7e09 --- a/fs/exec.c +++ b/fs/exec.c @@@ -1018,13 -1017,8 +1018,15 @@@ int flush_old_exec(struct linux_binprm set_dumpable(current->mm, suid_dumpable); } + current->personality &= ~bprm->per_clear; + + /* + * Flush performance counters when crossing a + * security domain: + */ + if (!get_dumpable(current->mm)) + perf_counter_exit_task(current); + /* An exec changes our domain. We are no longer part of the thread group */ diff --cc include/linux/init_task.h index 467cff545c30,959f5522d10a..d0e6cf3b201c --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@@ -113,16 -112,8 +112,18 @@@ extern struct group_info init_groups # define CAP_INIT_BSET CAP_INIT_EFF_SET #endif + extern struct cred init_cred; + +#ifdef CONFIG_PERF_COUNTERS +# define INIT_PERF_COUNTERS(tsk) \ + .perf_counter_ctx.counter_list = \ + LIST_HEAD_INIT(tsk.perf_counter_ctx.counter_list), \ + .perf_counter_ctx.lock = \ + __SPIN_LOCK_UNLOCKED(tsk.perf_counter_ctx.lock), +#else +# define INIT_PERF_COUNTERS(tsk) +#endif + /* * INIT_TASK is used to set up the first task table, touch at * your own risk!. Base=0, limit=0x1fffff (=2MB) diff --cc kernel/Makefile index 1f184a1dc406,027edda63511..4476da868f86 --- a/kernel/Makefile +++ b/kernel/Makefile @@@ -89,9 -88,8 +88,9 @@@ obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT obj-$(CONFIG_FUNCTION_TRACER) += trace/ obj-$(CONFIG_TRACING) += trace/ obj-$(CONFIG_SMP) += sched_cpupri.o +obj-$(CONFIG_PERF_COUNTERS) += perf_counter.o - ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y) + ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y) # According to Alan Modra , the -fno-omit-frame-pointer is # needed for x86 only. Why this used to be enabled for all architectures is beyond # me. I suspect most platforms don't need this, but until we know that for sure