[SRU][Bionic][Cosmic][PATCH 1/1] powerpc/livepatch: Implement reliable stack tracing for the consistency model

Joseph Salisbury joseph.salisbury at canonical.com
Tue Jun 5 15:52:15 UTC 2018


On 06/04/2018 10:11 PM, Michael Ellerman wrote:
> Joseph Salisbury <joseph.salisbury at canonical.com> writes:
>> diff --git a/arch/powerpc/kernel/stacktrace.c b/arch/powerpc/kernel/stacktrace.c
>> index d534ed901538..26a50603177c 100644
>> --- a/arch/powerpc/kernel/stacktrace.c
>> +++ b/arch/powerpc/kernel/stacktrace.c
>> @@ -76,3 +81,115 @@ save_stack_trace_regs(struct pt_regs *regs, struct stack_trace *trace)
>>  	save_context_stack(trace, regs->gpr[1], current, 0);
>>  }
>>  EXPORT_SYMBOL_GPL(save_stack_trace_regs);
>> +
>> +#ifdef CONFIG_HAVE_RELIABLE_STACKTRACE
>> +int
>> +save_stack_trace_tsk_reliable(struct task_struct *tsk,
>> +				struct stack_trace *trace)
>> +{
> ...
>> +		/*
>> +		 * Mark stacktraces with kretprobed functions on them
>> +		 * as unreliable.
>> +		 */
>> +		if (ip == (unsigned long)kretprobe_trampoline)
>> +			return 1;
> You may also want:
>
> 5e3f0d15ae5f ("powerpc/livepatch: Fix build error with kprobes disabled.")
>
> cheers

Thanks for the feedback, Michael.  Would it be possible for you to post
this comment to the bug?  That way we can get feedback from the original
bug reporter and IBM.


Thanks,


Joe






More information about the kernel-team mailing list