lkml.org 
[lkml]   [2013]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: x86-32: Early microcode loading stumbles over disabled DYNAMIC_FTRACE
On Fri, 30 Aug 2013 08:36:58 -0700
"H. Peter Anvin" <hpa@zytor.com> wrote:

> On 08/23/2013 09:40 AM, Jan Kiszka wrote:
> > Hi all,
> >
> > 32-bit kernels currently crash/reboot in early microcode loading when
> > non-dynamic function tracing is enabled. Several functions in that path
> > get instrumented with mcount, but its non-dynamic implementation does
> > not work before paging is enabled (it accesses global variables at wrong
> > addresses).
> >
> > Below some hunks to get it working again - at least in the absence of
> > any microcode in the initrd. Marking all involved functions as __init is
> > another option (as __init implies notrace). But I bet there is more
> > hidden. I see e.g. a pr_warn() in find_cpio_init that should trigger the
> > issue as well if we hit the error it reports (btw. printing at this
> > point of the boot should not work anyway, should it?).
> >
> > Better ideas?
> >
> > Jan
> >
>
> A better idea would be for the mcount/__fentry__ function to simply
> return until the function tracing stuff is actually ready.
>

It does when dynamic tracing is enabled. But this issue is with static
tracing, there's no code modification, thus all functions call
mcount/__fentry__ and we need to look at a variable to determine if we
should trace or not.

-- Steve


\
 
 \ /
  Last update: 2013-08-30 18:21    [W:0.098 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site