Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp165408lqp; Fri, 12 Apr 2024 13:49:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUvy0n9COgtHfS4l5iJwIPo5Ovg+T7/G0vuevfkTOFBGmQxo2lmkjjIobVyMLXcY+30cOciO7t+wMgtBHd0CulwznXe0n0i5UYvs89mfQ== X-Google-Smtp-Source: AGHT+IHD07fqMCJVV+rriiMOYNRknAJbXaW8ou3OzR7Atj0Zc1GnfSP2UOdF0aKZ86izfj61At94 X-Received: by 2002:a05:622a:64d:b0:434:622b:d054 with SMTP id a13-20020a05622a064d00b00434622bd054mr3828563qtb.66.1712954985416; Fri, 12 Apr 2024 13:49:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712954985; cv=pass; d=google.com; s=arc-20160816; b=yUBYBW7EiILX/aRgjsPNU6tvgkzYohkEY8ceFQVLmGLOLNjInhbb03k1FNObLxw1um 0ywCB9OvIGt0vPhB4EQkfS83E8JupFjymSbzIE8Un923pfTEQK+VaXG9a/+wg1Wpka+v Rghhf1THrwsEAhYt7Uwo51mJqIknu9L3Go+sIREsF+mxAbOv7/xqjssfOip5TV4SStSG LTiD/VxDtmV9nXk6xs5K4yg9FzNN3THjGU7bexYXcVcVn3vOtxgXwrCKHxnNftrfoFqN cC7S5YAY7K50F0qGvgs3T0sLCtz8401zjDPvV0ZKzV4wRWNAkML1IPwXvEbJZqS+y65Y nAsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=ZIJGnA7TN+BEfAdwT7IEnOdJBJpks8qVlQRsyWpANt4=; fh=QHP6WNV2vqmmmVBwYZJm+aUjNiYQ52974lw1nxvUP5E=; b=WM9HiDsywYAPTn9M/O5hYeq6K57w5i3OgWXHx8BOKXehednu0/o9ID93SAGsVYPNzF HJcmqI/gxEAxTVnR8qkysNEnfwEzzfI5/sPjz9L6U8POj6lgqQ6AHy1MkR7M84VGYTm1 3RoIoQwssOp05LuViHy+D4iWn2JakWczNkF1w7OrqnF6tjxQdH5QJiQH7eF4KzuyB/9q D4m9R5qJlPa3WR86oSrBzrOTEVakrV5kufeNgNtC2x6BLjH86QCA+eJ9VkvBQnYOlhVU 8G9vFLEGs8VHfflvu5s8V9amq/kKweqG+M7nWvQ/dSaXEbqNMdUiqH6AP3sE6fAaMOng 9NZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@citrix.com header.s=google header.b=Dst9qPNT; arc=pass (i=1 spf=pass spfdomain=cloud.com dkim=pass dkdomain=citrix.com dmarc=pass fromdomain=citrix.com); spf=pass (google.com: domain of linux-kernel+bounces-143328-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143328-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=citrix.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z9-20020a05622a060900b0043125e4a0b9si4470428qta.777.2024.04.12.13.49.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 13:49:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143328-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@citrix.com header.s=google header.b=Dst9qPNT; arc=pass (i=1 spf=pass spfdomain=cloud.com dkim=pass dkdomain=citrix.com dmarc=pass fromdomain=citrix.com); spf=pass (google.com: domain of linux-kernel+bounces-143328-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143328-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=citrix.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 18EA81C23014 for ; Fri, 12 Apr 2024 20:49:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8634E40BE5; Fri, 12 Apr 2024 20:49:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="Dst9qPNT" Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F25602F844 for ; Fri, 12 Apr 2024 20:49:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712954978; cv=none; b=QlMsNlpErw49hG0Ed3DLTMZWZYL8ASlr/P48WIwxVihCvDVqo5ZuOTUHg9VI8f7lWEjmUtwADJdu+GK0n1Ho2jXkfYyidpXJ9hSz7FhpYJDuGf7fFSIH9tRlYx+9isUM86y6XrV/U+SpI6wpyrTDIHwQ2AMqhaxO/QF/uG4Yp9s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712954978; c=relaxed/simple; bh=SI8LyFXWk12/XUzxfdu9P61bWqIvGJedFSgwFIAgJ4M=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QvKrwaJ3ElMP/Of35ndK9tMTVyFeiQ8Bya142zUI8sQdXkAmG+Spfvc88ClcvFx/BYRTECrlp0Pzf4p5iOO7bparsUMHDiJRiEoPJgSqdFjI6Wq5AIVbEVh0RyUDqGfQR5DY9hRY3cQuUXzprNUw0boQHA2+NPl2sVG7dxUS8/I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=citrix.com; spf=pass smtp.mailfrom=cloud.com; dkim=pass (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b=Dst9qPNT; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=citrix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cloud.com Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4180c6a1003so4908825e9.1 for ; Fri, 12 Apr 2024 13:49:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1712954975; x=1713559775; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=ZIJGnA7TN+BEfAdwT7IEnOdJBJpks8qVlQRsyWpANt4=; b=Dst9qPNTcEnutZ9pl5tnqKoFFvEWClWBodHZcr4CQ3bM+8tcMvzgt3/vOqJZz8X6iA fvDSuLjtAC9wsKcFAASBbUMRlF8Eo+jM/JQSyfBf2DBgQXqAaR6vsEeJTsJrgJ/8GB2/ T1PyZNpsVdbajpflygy+9y0lv2QyLF3zBScdM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712954975; x=1713559775; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZIJGnA7TN+BEfAdwT7IEnOdJBJpks8qVlQRsyWpANt4=; b=aNcrl9p9OpFjMG71QfejEq8bf1fp7lBxAUpbM0nHpcGEXlQz/M7MTCufuYlsb4NY6k CTGlcjNDicEEffb7wDtvn5F/hrS9DF7RdxHkuHlYRfRJwjg4TbhFZ9OwxW/D/+dUvsb3 D7+kp0Pmig6AsOkVSmU9MP+TiQsLc/fHfBPrSNk5HRDQUHZZQceuxpesoPQPzLhvko8W A1Np81Xgu+d/UTlUCVNlD4fMogJdr0vRAU0OE2eHvhY++IpDoysk3TjeED8Bo5ZjraRh Hny0wugTSXfTNYPW/muYlfGYxbJXatjkhlJRDVUm3UiHgPXXOs5CTsIc0PV3aDg1BZ2d cpNg== X-Gm-Message-State: AOJu0Yy9BYAjb8X97JcJphJ+29a85I4zMhWE3SPcAhU8OnpvsF0+oO9H jR7e8fSf8B9ZG9clpPsMTilnNM18/cungm2XbvDS/WRa0ZIWFZ1pQlLFBAMavZY= X-Received: by 2002:a05:600c:1e08:b0:418:1ac7:fdd2 with SMTP id ay8-20020a05600c1e0800b004181ac7fdd2mr415153wmb.16.1712954975123; Fri, 12 Apr 2024 13:49:35 -0700 (PDT) Received: from [192.168.1.10] (host-92-3-248-192.as13285.net. [92.3.248.192]) by smtp.gmail.com with ESMTPSA id b9-20020a05600c4e0900b00417fdf58a26sm3089099wmq.33.2024.04.12.13.49.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Apr 2024 13:49:34 -0700 (PDT) Message-ID: Date: Fri, 12 Apr 2024 21:49:33 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/3] x86/bugs: Remove support for Spectre v2 LFENCE "retpolines" To: Josh Poimboeuf , x86@kernel.org Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Daniel Sneddon , Pawan Gupta , Thomas Gleixner , Alexandre Chartre , Konrad Rzeszutek Wilk , Peter Zijlstra , Greg Kroah-Hartman , Sean Christopherson , Dave Hansen , Nikolay Borisov , KP Singh , Waiman Long , Borislav Petkov , Ingo Molnar References: Content-Language: en-GB From: Andrew Cooper Autocrypt: addr=andrew.cooper3@citrix.com; keydata= xsFNBFLhNn8BEADVhE+Hb8i0GV6mihnnr/uiQQdPF8kUoFzCOPXkf7jQ5sLYeJa0cQi6Penp VtiFYznTairnVsN5J+ujSTIb+OlMSJUWV4opS7WVNnxHbFTPYZVQ3erv7NKc2iVizCRZ2Kxn srM1oPXWRic8BIAdYOKOloF2300SL/bIpeD+x7h3w9B/qez7nOin5NzkxgFoaUeIal12pXSR Q354FKFoy6Vh96gc4VRqte3jw8mPuJQpfws+Pb+swvSf/i1q1+1I4jsRQQh2m6OTADHIqg2E ofTYAEh7R5HfPx0EXoEDMdRjOeKn8+vvkAwhviWXTHlG3R1QkbE5M/oywnZ83udJmi+lxjJ5 YhQ5IzomvJ16H0Bq+TLyVLO/VRksp1VR9HxCzItLNCS8PdpYYz5TC204ViycobYU65WMpzWe LFAGn8jSS25XIpqv0Y9k87dLbctKKA14Ifw2kq5OIVu2FuX+3i446JOa2vpCI9GcjCzi3oHV e00bzYiHMIl0FICrNJU0Kjho8pdo0m2uxkn6SYEpogAy9pnatUlO+erL4LqFUO7GXSdBRbw5 gNt25XTLdSFuZtMxkY3tq8MFss5QnjhehCVPEpE6y9ZjI4XB8ad1G4oBHVGK5LMsvg22PfMJ ISWFSHoF/B5+lHkCKWkFxZ0gZn33ju5n6/FOdEx4B8cMJt+cWwARAQABzSlBbmRyZXcgQ29v cGVyIDxhbmRyZXcuY29vcGVyM0BjaXRyaXguY29tPsLBegQTAQgAJAIbAwULCQgHAwUVCgkI CwUWAgMBAAIeAQIXgAUCWKD95wIZAQAKCRBlw/kGpdefoHbdD/9AIoR3k6fKl+RFiFpyAhvO 59ttDFI7nIAnlYngev2XUR3acFElJATHSDO0ju+hqWqAb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sJT5RgvefAIFfHBg7fTY/i kBEimoUsTEQz+N4hbKwo1hULfVxDJStE4sbPhjbsPCrlXf6W9CxSyQ0qmZ2bXsLQYRj2xqd1 bpA+1o1j2N4/au1R/uSiUFjewJdT/LX1EklKDcQwpk06Af/N7VZtSfEJeRV04unbsKVXWZAk uAJyDDKN99ziC0Wz5kcPyVD1HNf8bgaqGDzrv3TfYjwqayRFcMf7xJaL9xXedMcAEQEAAcLB XwQYAQgACQUCUuE2fwIbDAAKCRBlw/kGpdefoG4XEACD1Qf/er8EA7g23HMxYWd3FXHThrVQ HgiGdk5Yh632vjOm9L4sd/GCEACVQKjsu98e8o3ysitFlznEns5EAAXEbITrgKWXDDUWGYxd pnjj2u+GkVdsOAGk0kxczX6s+VRBhpbBI2PWnOsRJgU2n10PZ3mZD4Xu9kU2IXYmuW+e5KCA vTArRUdCrAtIa1k01sPipPPw6dfxx2e5asy21YOytzxuWFfJTGnVxZZSCyLUO83sh6OZhJkk b9rxL9wPmpN/t2IPaEKoAc0FTQZS36wAMOXkBh24PQ9gaLJvfPKpNzGD8XWR5HHF0NLIJhgg 4ZlEXQ2fVp3XrtocHqhu4UZR4koCijgB8sB7Tb0GCpwK+C4UePdFLfhKyRdSXuvY3AHJd4CP 4JzW0Bzq/WXY3XMOzUTYApGQpnUpdOmuQSfpV9MQO+/jo7r6yPbxT7CwRS5dcQPzUiuHLK9i nvjREdh84qycnx0/6dDroYhp0DFv4udxuAvt1h4wGwTPRQZerSm4xaYegEFusyhbZrI0U9tJ B8WrhBLXDiYlyJT6zOV2yZFuW47VrLsjYnHwn27hmxTC/7tvG3euCklmkn9Sl9IAKFu29RSo d5bD8kMSCYsTqtTfT6W4A3qHGvIDta3ptLYpIAOD2sY3GYq2nf3Bbzx81wZK14JdDDHUX2Rs 6+ahAA== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 12/04/2024 7:10 pm, Josh Poimboeuf wrote: > I found several bugs where code assumes that X86_FEATURE_RETPOLINE > actually means retpolines (imagine that!). Yeah :(   One could also imagine a past where that was pointed out, or just read about it in the archives. > In fact that feature also > includes the original AMD LFENCE "retpolines", which aren't in fact > retpolines. > > Really, those "retpolines" should just be removed. They're already > considered vulnerable due to the fact that the speculative window after > the indirect branch can still be long enough to do multiple dependent > loads. And recent tooling makes such gadgets easier to find. There are two Atom CPUs which are not repotline safe, and for which Intel released a statement saying "use lfence/jmp" on these. I'm still trying to find it... ~Andrew