Received: by 10.223.185.116 with SMTP id b49csp1031756wrg; Fri, 16 Feb 2018 11:08:49 -0800 (PST) X-Google-Smtp-Source: AH8x225cJInsQfAebSwZzfCaKjMQjtUCGzOJKC7k0r5X43txyrvuB+flpqNAwc6i1RZ49Th7xxhG X-Received: by 2002:a17:902:d24:: with SMTP id 33-v6mr6716675plu.40.1518808129162; Fri, 16 Feb 2018 11:08:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518808129; cv=none; d=google.com; s=arc-20160816; b=ruTktCxkPu4zHxx7R1g2xizHlb2QP2K5qb2gd7fSSSm2xP0tD7fxLyh7Y72+t5wKia G+mr0TnRhdQfltCkEHzAbV6nJG3GbCjm5HhtEWEYQGcx8AkRvANNDzJ+y7acZHz5PxjY IU8DLbDDMin2ehSqvKySZLWRrpgrcvMlzCkilrMUPcWDS8P2ewcfc6V2E2ULUbRkACP6 ms+C4yDcUizVFEm1GdhOjuRwIWk/7fVG0a9SsoRlrsdbu9chpMZEHhIMYsOr9waM8TZn E+5KCePDkn07tZZ/R9luBg1GfuDy2xmwYTpwZOv7Qan50+KPFfjgBGxCBTyvUguMMprU 9FjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=s9lIdfzXecQHd6JiNj308e9WsQdtaz2ZsqkqA02Qsi4=; b=s1fcp/lSwj7+PwXerISnKeq8s3ZwrlAB1rxEyTnh4bPpFZ6enuk4KHIFY7lA/7vbyN ZwK8B88BBT61ZUyL1hYDb/dxMUkw8STCQEcQVVUM6G6JlTTJbRHZZhkTNuHjdt0EbgO+ QDFKe4jZWNuZVd6kclgNiGm1u21ONdd3NUs3rO7Q2bVfivh2O2zebbmVeLsOhqfYhRtw Zw3oBd1uDtyO2FRvMnwpNiKeBY8lPJaPjRxw7jPu6neSw7SH+c27BlJTTvq4ljpxFofB ss93UOmcVRAv1+JnnOgMsiuGZqZqa+Tu0yIguKFI6LpeQaGaC7gFOPAwYT3cJHEI4vay OB/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sC6iMouB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a35-v6si1859859pli.781.2018.02.16.11.08.34; Fri, 16 Feb 2018 11:08:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sC6iMouB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030345AbeBPNPK (ORCPT + 99 others); Fri, 16 Feb 2018 08:15:10 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:37116 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030316AbeBPNPI (ORCPT ); Fri, 16 Feb 2018 08:15:08 -0500 Received: by mail-lf0-f68.google.com with SMTP id f137so3994500lfe.4; Fri, 16 Feb 2018 05:15:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=s9lIdfzXecQHd6JiNj308e9WsQdtaz2ZsqkqA02Qsi4=; b=sC6iMouB31Lkb6SQhEowVThriPSdiRFTcs4KIfw24bfKagZvRbtl2TMxFmweG2Ed2M 4ao2M0Cd+6RoPDf+ZjiRXg05Afv8E6APxsqYI3YOMZG9YkraJpgx8CzQpHG/GMWkwEEP rGe6+F7l/n04c6KMJQefoh9IAJx5qFZx7aY/2PkBtDl1x5bDqjtmCRYxFQ4lILiZsxsg ajtbRawE2b+YgK/4CBTNbAbXmYqJvWKWYN8pX1ZuZ6JNwKkSTkqySAxAL+1adHk4aCM5 kswoJQQQ8LCJzqr2ZmY7jHzJ/XZIbgwRUlgYnWPicQ7Qn/73w6Aw0fa3/VGgEXsH+td0 UeNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=s9lIdfzXecQHd6JiNj308e9WsQdtaz2ZsqkqA02Qsi4=; b=Gqy61ggHUpPTmjEj/9PuaxnWY5wv4/4t/q0I2z7RFrAmpJwHiHwBEVmXGa+h4ZoCQV sDhLXx4HvWSpPlASTQkzTaRam2U3QODXLg5MvwcfkI6yLWPK/d4Mz5Fw1vzuKhLUCXKL /HnCfdWcGeaGVDLK7f7/6uEaeHGkqU3hGDd+XpF+PXjSO+vJiQ0440/tZEkO8VNSaBYZ O2OyblbE2u8k6MZNBs/AZ6NNvikuBZ6wmlugsoL+/Cp8T6Mpnop5m26tuC7tWF4fzRM9 0N/Osw8jYii0BZPjBj/Ui5/Fg8JTFnQ7klYF+NyM0stXF38cX/0B1KQBG0WD6CYks5cH efHg== X-Gm-Message-State: APf1xPBjHcqzCAFGo+gEd7Yrk34Z4Ikj1Z6JHj7uKwYfda+lyZQDG9vY obvO6T//o1NQFddczjjZdMri2ppnyi23nForkrM= X-Received: by 10.46.78.18 with SMTP id c18mr4423909ljb.62.1518786907194; Fri, 16 Feb 2018 05:15:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.23.22 with HTTP; Fri, 16 Feb 2018 05:15:06 -0800 (PST) In-Reply-To: <20180213163239.GA17101@kroah.com> References: <20180209133931.211869118@linuxfoundation.org> <20180209133934.259299920@linuxfoundation.org> <20180213150007.GJ26982@kroah.com> <20180213163239.GA17101@kroah.com> From: Nick Lowe Date: Fri, 16 Feb 2018 13:15:06 +0000 Message-ID: Subject: Re: [PATCH 4.9 43/92] x86/pti: Do not enable PTI on CPUs which are not vulnerable to Meltdown To: Greg Kroah-Hartman Cc: Arjan van de Ven , linux-kernel@vger.kernel.org, stable@vger.kernel.org, David Woodhouse , Thomas Gleixner , Borislav Petkov , Dave Hansen , gnomes@lxorguk.ukuu.org.uk, ak@linux.intel.com, ashok.raj@intel.com, karahmed@amazon.de, torvalds@linux-foundation.org, peterz@infradead.org, Borislav Petkov , pbonzini@redhat.com, tim.c.chen@linux.intel.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi I do not have a tested patch, but I expect the change would be something like: skip: - if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) + if (!static_cpu_has_bug(X86_BUG_CPU_MELTDOWN)) goto disable; Cheers, Nick On Tue, Feb 13, 2018 at 4:32 PM, Greg Kroah-Hartman wrote: > On Tue, Feb 13, 2018 at 03:27:47PM +0000, Nick Lowe wrote: >> Hi Arjan and Greg, >> >> Sorry if I am not being clear enough. >> >> My point is that there is a check for X86_VENDOR_AMD now in two places. >> >> It is still hardcoded for the auto boot option which I think should >> not be there. The patch on that basis looked incomplete to me. >> >> Put another way, there is no effect to the auto option where the >> contents of cpu_no_meltdown[] are changed and >> cpu_vulnerable_to_meltdown returns differently. >> >> The auto option does not make use of a determination of the >> X86_BUG_CPU_MELTDOWN state. >> >> This seems wrong to me. It does not seem correct to me for the auto >> option to have this duplication with a check for just X86_VENDOR_AMD. > > Do you have a patch that reflects what you want to see changed here? > > And can you test it? :) > > I don't have any AMD hardware, sorry. > > thanks, > > greg k-h