From owner-freebsd-current@freebsd.org Thu Jan 4 21:43:43 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C077EB9757 for ; Thu, 4 Jan 2018 21:43:43 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E93B23218 for ; Thu, 4 Jan 2018 21:43:42 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f45.google.com with SMTP id d16so3988202itj.1 for ; Thu, 04 Jan 2018 13:43:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=p2DL1tsuQhfQn36PK12GvRfigyQoV/9DuqLHg0d8YVQ=; b=VCWVWqUS7Ml9UMCd2D8XVuK1ZXfE1aobtQYdJKFsgTD/0o/A3+gZm/ug0MikbNWrq1 PuMZIKsdz9KEhC5b2YG97J12btt5d0WR1ojoqSWcp8+X243zVO+AsZz9Dv5I75ntjhjo xBeWbJrLMDpIUOYRNkCw28Ycw0vitrDINJOxT1mZTGx0xjt3aOLCLNF0WuEPp2mgjOVK WdTYHW8nr5HljwXte/vyA8QHyK+bs+kYPV5I/mBoguXXPumxk0+YJ4FhGl9RAKEAHxYJ DV+KhKdNDSMcjFhyB9ZsDka7I41B8IARPZ7sfGrXwgoRmZCAGQyT6rW/0t8km0jIoKBP q0Dg== X-Gm-Message-State: AKGB3mLUxNFPqujOOT1QrQEgsfyLAq6CZ93qKoGrPbrBmFTuWvr77Np2 6h3aH1vc9We9ZuFH7ua5J1cd0Z3E X-Google-Smtp-Source: ACJfBotQ7Gt62N/7vPyAR6ar+/vFfh21juVcW9ufhGgKCHqica0Dn7OlsKkusK/IZbVZraSxM8SMeQ== X-Received: by 10.36.92.79 with SMTP id q76mr1067080itb.153.1515102216221; Thu, 04 Jan 2018 13:43:36 -0800 (PST) Received: from mail-io0-f175.google.com (mail-io0-f175.google.com. [209.85.223.175]) by smtp.gmail.com with ESMTPSA id x82sm2692240itb.36.2018.01.04.13.43.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jan 2018 13:43:35 -0800 (PST) Received: by mail-io0-f175.google.com with SMTP id 14so3720212iou.2 for ; Thu, 04 Jan 2018 13:43:35 -0800 (PST) X-Received: by 10.107.132.88 with SMTP id g85mr1113146iod.117.1515102215612; Thu, 04 Jan 2018 13:43:35 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.15.193 with HTTP; Thu, 4 Jan 2018 13:43:35 -0800 (PST) In-Reply-To: <02f1caac-b20d-d9bb-ceeb-fd1a2639e6f7@protected-networks.net> References: <9dda0496-be16-35c6-6c45-63d03b218ccb@protected-networks.net> <18376c97-3c0d-49c8-9483-96b95a84f3f1@7he.at> <02f1caac-b20d-d9bb-ceeb-fd1a2639e6f7@protected-networks.net> From: Conrad Meyer Date: Thu, 4 Jan 2018 13:43:35 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Intel CPU design flaw - FreeBSD affected? // disabling LDTSC To: Michael Butler Cc: "Klaus P. Ohrhallinger" , freebsd-current , jan.kokemueller@gmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 21:43:43 -0000 Possibly because Xeon 5400 dates to 2007 =E2=80=94 it may have less advance= d speculative / out-of-order execution and may not have the same branch prediction algorithm as Haswell. On Thu, Jan 4, 2018 at 1:07 PM, Michael Butler wrote: > On 01/04/18 14:59, Klaus P. Ohrhallinger wrote: >> On 04.01.2018 19:51, Jan Kokem=C3=BCller wrote: >> >>> It is possible to emulate a high resolution counter with a thread that >>> continuously increments a variable [1]. This is the reason why browser >>> vendors are currently disabling the SharedArrayBuffer feature [2]. >>> >>> [1]: https://gist.github.com/ErikAugust/724d4a969fb2c6ae1bbd7b2a9e3d4bb= 6#gistcomment-2311156 >>> [2]: https://blog.mozilla.org/security/2018/01/03/mitigations-landing-n= ew-class-timing-attack/ >> >> I tried the phtread example from [1] but even with some tweaking is does >> not work at all. >> >> This is a multiprocessor system, with moderate load. >> >> As far as I understand the matter, it can only work if both threads >> share the same cpu cache, otherwise the counter variable is either never >> up-to-date, or has to be fetched and stored from/to memory, which is way >> too slow for this purpose. >> >> Any suggestions ? >> >> --- >> >> CPU: Intel(R) Xeon(R) CPU E5420 @ 2.50GHz (2500.14-MHz >> K8-class CPU) >> FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs >> FreeBSD/SMP: 2 package(s) x 4 core(s) > > Interestingly, the Xeon 5400 series is not listed as vulnerable in the > Intel documentation where the 5500 and 5600s are; I checked as I have a > bunch of E5440s in service. > > https://security-center.intel.com/advisory.aspx?intelid=3DINTEL-SA-00088&= languageid=3Den-fr > > imb > > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= "