Skip to contentSkip to conversation

Possible bug in arch/i386/kernel/process.c for reloading of debug registers (DRx)?

DISCUSSION Kevin Lawton 1 participant 1 message Feb 3, 2003

lore
Share & tools
lore
#0 lore raw

I was scanning through the source and noticed the lines below. Should the code below, be reloading at least the local bits of DR7 if the current DR7 value != 0? From a quick glance, it looks like only if the next task's DR7 value is non-zero, that DR7 is reloaded. I'm wondering if this would leave a new task to receive "local" debug events for the previous task if prev->DR7!=0 && next->DR7==0.

-Kevin

linux-2.5.59: arch/i386/kernel/process.c: line 462+:

  /*
   * Now maybe reload the debug registers
   */
  if (unlikely(next->debugreg[7])) {
    loaddebug(next, 0);
    loaddebug(next, 1);
    loaddebug(next, 2);
    loaddebug(next, 3);
    /* no 4 and 5 */
    loaddebug(next, 6);
    loaddebug(next, 7);
  }

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com