Re: [PATCH v4 01/15] stacktrace/x86: add function for detecting reliable stack traces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 27, 2017 at 09:47:08AM +0100, Miroslav Benes wrote:
> 
> > diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h
> > index 0a34489..8e8b67b 100644
> > --- a/include/linux/stacktrace.h
> > +++ b/include/linux/stacktrace.h
> > @@ -18,6 +18,8 @@ extern void save_stack_trace_regs(struct pt_regs *regs,
> >  				  struct stack_trace *trace);
> >  extern void save_stack_trace_tsk(struct task_struct *tsk,
> >  				struct stack_trace *trace);
> > +extern int save_stack_trace_tsk_reliable(struct task_struct *tsk,
> > +					 struct stack_trace *trace);
> >  
> >  extern void print_stack_trace(struct stack_trace *trace, int spaces);
> >  extern int snprint_stack_trace(char *buf, size_t size,
> > @@ -29,12 +31,12 @@ extern void save_stack_trace_user(struct stack_trace *trace);
> >  # define save_stack_trace_user(trace)              do { } while (0)
> >  #endif
> >  
> > -#else
> > +#else /* !CONFIG_STACKTRACE */
> >  # define save_stack_trace(trace)			do { } while (0)
> >  # define save_stack_trace_tsk(tsk, trace)		do { } while (0)
> >  # define save_stack_trace_user(trace)			do { } while (0)
> >  # define print_stack_trace(trace, spaces)		do { } while (0)
> >  # define snprint_stack_trace(buf, size, trace, spaces)	do { } while (0)
> 
> Is there a reason you did not define empty save_stack_trace_tsk_reliable() 
> here? Right, it should not be needed now as livepatching is the only user, 
> but still.

Agreed, thanks.  I'll make the stub return an error, since an empty
stack trace isn't very reliable.

-- 
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux