Re: Hyper-Threading Vulnerability

From: Linus Torvalds (torvalds_at_osdl.org)
Date: 05/16/05

  • Next message: Jesper Juhl: "Re: test of 'good_bytes' in scsi_io_completion is always true (in drivers/scsi/scsi_lib.c)"
    Date:	Mon, 16 May 2005 10:00:20 -0700 (PDT)
    To: Scott Robert Ladd <lkml@coyotegulch.com>
    
    

    On Fri, 13 May 2005, Scott Robert Ladd wrote:
    >
    > Alan Cox wrote:
    > > HT for most users is pretty irrelevant, its a neat idea but the
    > > benchmarks don't suggest its too big a hit
    >
    > On real-world applications, I haven't seen HT boost performance by more
    > than 15% on a Pentium 4 -- and the usual gain is around 5%, if anything
    > at all. HT is a nice idea, but I don't enable it on my systems.

    HT is _wonderful_ for latency reduction.

    Why people think "performace" means "throughput" is something I'll never
    understand. Throughput is _always_ secondary to latency, and really only
    becomes interesting when it becomes a latency number (ie "I need higher
    throughput in order to process these jobs in 4 hours instead of 8" -
    notice how the real issue was again about _latency_).

    Now, Linux tends to have pretty good CPU latency anyway, so it's not
    usually that big of a deal, but I definitely enjoyed having a HT machine
    over a regular UP one. I'm told the effect was even more pronounced on
    XP.

    Of course, these days I enjoy having dual cores more, though, and with
    multiple cores, the latency advantages of HT become much less pronounced.

    As to the HT "vulnerability", it really seems to be not a whole lot
    different than what people saw with early SMP and (small) direct-mapped
    caches. Thank God those days are gone.

    I'd be really surprised if somebody is actually able to get a real-world
    attack on a real-world pgp key usage or similar out of it (and as to the
    covert channel, nobody cares). It's a fairly interesting approach, but
    it's certainly neither new nor HT-specific, or necessarily seem all that
    worrying in real life.

    (HT and modern CPU speeds just means that the covert channel is _faster_
    than it has been before, since you can test the L1 at core speeds. I doubt
    it helps the key attack much, though, since faster in that case cuts both
    ways: the speed of testing the cache eviction may have gone up, but so has
    the speed of the operation you're trying to follow, and you'd likely have
    a really hard time trying to catch things in real life).

    It does show that if you want to hide key operations, you want to be
    careful. I don't think HT is at fault per se.

                    Linus
    -
    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/


  • Next message: Jesper Juhl: "Re: test of 'good_bytes' in scsi_io_completion is always true (in drivers/scsi/scsi_lib.c)"

    Relevant Pages

    • Re: Big rig
      ... PhenomII 955 PC I have zero audio latency. ... x64 but I have a real problem playing with any latency. ... What sound card are you using? ... if I run two cores as stock it reads out as a x2 555 ...
      (alt.guitar)
    • Re: Slightly OT: Laptop memory upgrade
      ... clock speeds up they tick faster. ... The benefit of having 2Gb RAM outweighs the performance hit in every aspect apart from the crappy integrated graphics! ... What I was really wondering is whether it's worth forking out £30 for some Kingston HyperX low latency 4-4-4-12 modules. ...
      (uk.comp.homebuilt)
    • Re: Max DSL query.
      ... as does my Zoom modem. ... latency and sychronization, but it may give different speeds. ... I believe with some ISPs you can opt to have the Interleaving removed. ...
      (uk.people.silversurfers)
    • Re: Clear Corporation Clear CLWR wireless Internet service provider ISP billing customer review
      ... download lots of big files. ... slow speeds during the daytime. ... downloading large files during the daytime. ... latency is about 160 ms and the speed is somewhere between 1500 ...
      (alt.internet.wireless)
    • Re: Xilinx Square Root Unit
      ... The technique one of my esteemed colleagues settled on was derived from ... It has a similar latency to the core that ... fully pipelined floating-point cores for single and double precision. ... specific HPC functions that are maximally pipelined. ...
      (comp.arch.fpga)