lkml.org 
[lkml]   [2006]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Subjecti386 PDA patches use of %gs
    From
    Date
    Hi,

    Userspace uses %gs for it's per thread data (and in modern linux
    versions that means "all the time", errno is there for example).

    On x86-64 this is the reason that the kernel uses the OTHER segment
    register; so for the PDA patches this would mean using %fs and not %gs.

    The advantage of this is very simple: %fs will be 0 for userspace most
    of the time. Putting 0 in a segment register is cheap for the cpu,
    putting anything else in is quite expensive (a LOT of security checks
    need to happen). As such I would MUCH rather see that the i386 PDA
    patches use %fs and not %gs...

    Jeremy, is there a reason you're specifically using %gs and not %fs? If
    not, would you mind a switch to using %fs instead?

    Greetings,
    Arjan van de Ven
    --
    if you want to mail me at work (you don't), use arjan (at) linux.intel.com

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

    \
     
     \ /
      Last update: 2006-09-12 19:19    [W:0.034 / U:30.480 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site