Re: [PATCH 1/7] x86: don't show trace beyond show_stack(NULL, NULL)

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

 



* Tejun Heo <tj@xxxxxxxxxx> wrote:

> Hello, Ingo.
> 
> On Mon, Apr 08, 2013 at 06:08:11PM +0200, Ingo Molnar wrote:
> > >  void show_stack(struct task_struct *task, unsigned long *sp)
> > >  {
> > > -	show_stack_log_lvl(task, NULL, sp, 0, "");
> > > +	unsigned long bp = 0;
> > > +	unsigned long stack;
> > > +
> > > +	/*
> > > +	 * Stack frames below this one aren't interesting.  Don't show them
> > > +	 * if we're printing for %current.
> > > +	 */
> > > +	if (!sp && (!task || task == current)) {
> > > +		sp = &stack;
> > > +		bp = stack_frame(current, NULL);
> > > +	}
> > > +
> > > +	show_stack_log_lvl(task, NULL, sp, bp, "");
> > 
> > Hm, show_regs() has a similar problem AFAICS.
> 
> Doesn't seem so.  show_regs() have pt_regs which gets passed to
> dump_trace() and then used to determine the frame being dumped.
> e.g. BUG() takes pt_regs from the faulting frame and thus doesn't show
> anything beyond it.

Ok - but my other observation probably holds, that the bp == 0 special case in 
dump_trace() should be changed to a [printk()-ed] warning or so? No user will pass 
in bp == 0 legitimately, AFAICS.

Thanks,

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




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux