Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2f30c73 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'perf-fixes-for-linus' of...

Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf symbols: Remove incorrect open-coded container_of()
  perf record: Handle restrictive permissions in /proc/{kallsyms,modules}
  x86/kprobes: Prevent kprobes to probe on save_args()
  irq_work: Drop cmpxchg() result
  perf: Fix owner-list vs exit
  x86, hw_nmi: Move backtrace_mask declaration under ARCH_HAS_NMI_WATCHDOG
  tracing: Fix recursive user stack trace
  perf,hw_breakpoint: Initialize hardware api earlier
  x86: Ignore trap bits on single step exceptions
  tracing: Force arch_local_irq_* notrace for paravirt
  tracing: Fix module use of trace_bprintk()
parents 1b065fdf 02a9d037
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -824,27 +824,27 @@ static __always_inline void arch_spin_unlock(struct arch_spinlock *lock)
#define __PV_IS_CALLEE_SAVE(func)			\
#define __PV_IS_CALLEE_SAVE(func)			\
	((struct paravirt_callee_save) { func })
	((struct paravirt_callee_save) { func })


static inline unsigned long arch_local_save_flags(void)
static inline notrace unsigned long arch_local_save_flags(void)
{
{
	return PVOP_CALLEE0(unsigned long, pv_irq_ops.save_fl);
	return PVOP_CALLEE0(unsigned long, pv_irq_ops.save_fl);
}
}


static inline void arch_local_irq_restore(unsigned long f)
static inline notrace void arch_local_irq_restore(unsigned long f)
{
{
	PVOP_VCALLEE1(pv_irq_ops.restore_fl, f);
	PVOP_VCALLEE1(pv_irq_ops.restore_fl, f);
}
}


static inline void arch_local_irq_disable(void)
static inline notrace void arch_local_irq_disable(void)
{
{
	PVOP_VCALLEE0(pv_irq_ops.irq_disable);
	PVOP_VCALLEE0(pv_irq_ops.irq_disable);
}
}


static inline void arch_local_irq_enable(void)
static inline notrace void arch_local_irq_enable(void)
{
{
	PVOP_VCALLEE0(pv_irq_ops.irq_enable);
	PVOP_VCALLEE0(pv_irq_ops.irq_enable);
}
}


static inline unsigned long arch_local_irq_save(void)
static inline notrace unsigned long arch_local_irq_save(void)
{
{
	unsigned long f;
	unsigned long f;


+4 −3
Original line number Original line Diff line number Diff line
@@ -17,15 +17,16 @@
#include <linux/nmi.h>
#include <linux/nmi.h>
#include <linux/module.h>
#include <linux/module.h>


/* For reliability, we're prepared to waste bits here. */
static DECLARE_BITMAP(backtrace_mask, NR_CPUS) __read_mostly;

u64 hw_nmi_get_sample_period(void)
u64 hw_nmi_get_sample_period(void)
{
{
	return (u64)(cpu_khz) * 1000 * 60;
	return (u64)(cpu_khz) * 1000 * 60;
}
}


#ifdef ARCH_HAS_NMI_WATCHDOG
#ifdef ARCH_HAS_NMI_WATCHDOG

/* For reliability, we're prepared to waste bits here. */
static DECLARE_BITMAP(backtrace_mask, NR_CPUS) __read_mostly;

void arch_trigger_all_cpu_backtrace(void)
void arch_trigger_all_cpu_backtrace(void)
{
{
	int i;
	int i;
+2 −0
Original line number Original line Diff line number Diff line
@@ -295,6 +295,7 @@ ENDPROC(native_usergs_sysret64)
	.endm
	.endm


/* save partial stack frame */
/* save partial stack frame */
	.pushsection .kprobes.text, "ax"
ENTRY(save_args)
ENTRY(save_args)
	XCPT_FRAME
	XCPT_FRAME
	cld
	cld
@@ -334,6 +335,7 @@ ENTRY(save_args)
	ret
	ret
	CFI_ENDPROC
	CFI_ENDPROC
END(save_args)
END(save_args)
	.popsection


ENTRY(save_rest)
ENTRY(save_rest)
	PARTIAL_FRAME 1 REST_SKIP+8
	PARTIAL_FRAME 1 REST_SKIP+8
+4 −0
Original line number Original line Diff line number Diff line
@@ -433,6 +433,10 @@ static int __kprobes hw_breakpoint_handler(struct die_args *args)
	dr6_p = (unsigned long *)ERR_PTR(args->err);
	dr6_p = (unsigned long *)ERR_PTR(args->err);
	dr6 = *dr6_p;
	dr6 = *dr6_p;


	/* If it's a single step, TRAP bits are random */
	if (dr6 & DR_STEP)
		return NOTIFY_DONE;

	/* Do an early return if no trap bits are set in DR6 */
	/* Do an early return if no trap bits are set in DR6 */
	if ((dr6 & DR_TRAP_BITS) == 0)
	if ((dr6 & DR_TRAP_BITS) == 0)
		return NOTIFY_DONE;
		return NOTIFY_DONE;
+4 −0
Original line number Original line Diff line number Diff line
@@ -33,6 +33,8 @@ enum bp_type_idx {


#ifdef CONFIG_HAVE_HW_BREAKPOINT
#ifdef CONFIG_HAVE_HW_BREAKPOINT


extern int __init init_hw_breakpoint(void);

static inline void hw_breakpoint_init(struct perf_event_attr *attr)
static inline void hw_breakpoint_init(struct perf_event_attr *attr)
{
{
	memset(attr, 0, sizeof(*attr));
	memset(attr, 0, sizeof(*attr));
@@ -108,6 +110,8 @@ static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp)


#else /* !CONFIG_HAVE_HW_BREAKPOINT */
#else /* !CONFIG_HAVE_HW_BREAKPOINT */


static inline int __init init_hw_breakpoint(void) { return 0; }

static inline struct perf_event *
static inline struct perf_event *
register_user_hw_breakpoint(struct perf_event_attr *attr,
register_user_hw_breakpoint(struct perf_event_attr *attr,
			    perf_overflow_handler_t triggered,
			    perf_overflow_handler_t triggered,
Loading