This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug translator/1276] support more timer varieties


Hi -

Josh wrote:

> AFAIK, current is always valid.  [...]  So unless someone knows
> otherwise, or has a reference to cast doubt on this, I think it's
> safe. [...]

I guess the "kernel-hacking" kernel/Documentation/DocBook file says
just this:

  <sect1 id="routines-current">
   <title><function>current</function>
    <filename class="headerfile">include/asm/current.h</filename></title>

   <para>
    This global variable (really a macro) contains a pointer to
    the current task structure, so is only valid in user context.
    For example, when a process makes a system call, this will
    point to the task structure of the calling process.  It is
    <emphasis>not NULL</emphasis> in interrupt context.
   </para>
  </sect1>

If it doesn't scare you off, then let's have a volunteer try disarming
some of those in_interrupt() conditionals (maybe replacing them with a
quick NULL or other simple pointer validity check), and write a few
stress tests (probes in uncomfortable spots for "current" usage).

- FChE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]