Re: [PATCH] Linux Kernel Markers

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

 



Ar Mer, 2006-09-20 am 11:39 +0200, ysgrifennodd Helge Hafting:
> Yes, 5 bytes is not an atomic write except on 64-bit. So a race is possible.

Untrue as well. Pentium and later have CMPXCHG8.

> How about this workaround:
> 1. Overwrite the start of the function with a hlt, which is atomic.
> 2. Write that 5-byte jump after the hlt.
> 3. Overwrite the hlt with nop so things will work
> 4. interrupt any cpus that got stuck on the hlt - or just wait for the 
> timer.

CPU errata time again. You have to synchronize.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux