Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp650859ybm; Thu, 28 May 2020 11:40:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCTP73bBdk52Cge2hmyyMseZbxwWXFd4eW5bVXLggS85DEqnbm1GnLABlNC6ia7FynEkbo X-Received: by 2002:aa7:c158:: with SMTP id r24mr4780729edp.341.1590691230966; Thu, 28 May 2020 11:40:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590691230; cv=none; d=google.com; s=arc-20160816; b=s8d51UnMyKW8E+lOyKx5952iQEw8lwe9Wu8+YAIQ0zX3TCyBHMqT1/qKCMVfkUs7SE k7VDsdIYY2vH7oS92oULcuEtkqPfDcMaYZsiJHTa/c3DLdnjYyIC4rgEFoC0ilvrSna0 GSgxuX72+47oa38DMgDRSdVHZpcaztAOUdfvNw1ii5eYqj3nljFpjAw9PPx/5drZPNv5 ZKZFPnCpdTijdw4ntT6d+5DX7ZyXkX0nflDCNsQAG1NHp8ussLKc83JcgzQTDj6RzQGx CMvB7o6s4m8DbnhPp+c0E361WiolSoAlQrAYGqLsUOa6F0mn3CMSReXJ1r/D04ZcG2ti d8jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=+s1IaVbmnL9yBRcZ3BjJ3ucj5/q4zxOlTyNgvpB+MwY=; b=CmNvNEJ7oSBzIVrLOANv3eljhq9VvSF/BJxo3amrslFW+jkiNYzwZ3RROeyr2oRuw3 xLO+LU+barv5pHRVheX7RwBm0FiTCwUtHRrbIphWpcTw/uGGlo6Evh/1tFCrmhoNELZA VmMRs/pnnPbC0h7tiLnkye74f0H2hQgY9eWLRRI/fez+K5PtKweIvhpyitfC3kMreK0J JHimn9j0b8d3t6FCmYS000skYNH9SINsL1A+LZ2biL+VnncyMhDs4U1SlL5LYsWGAFK/ 4D1/9lW2eJLySVvkKALuEQYmg0v0523YtQAvf7MozjvBhyf13fY3pCGsoK458o+heRsf hB1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=0Nl6Ipet; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c25si3778210edw.456.2020.05.28.11.40.07; Thu, 28 May 2020 11:40:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=0Nl6Ipet; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405983AbgE1SiJ (ORCPT + 99 others); Thu, 28 May 2020 14:38:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405786AbgE1SiG (ORCPT ); Thu, 28 May 2020 14:38:06 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9204C08C5C6 for ; Thu, 28 May 2020 11:38:06 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id bh7so5053260plb.11 for ; Thu, 28 May 2020 11:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=+s1IaVbmnL9yBRcZ3BjJ3ucj5/q4zxOlTyNgvpB+MwY=; b=0Nl6IpetJJlL2sY/xdUrtiGf71qCqKaMz3tYwG0BjLShyZFuWH3MzGQgD05EWh8Ki8 1CwnGi3TFGVjxMg/fK9XJlA9N2ExT5nYc3g+MJkaYSTy639r4LxBWQZ2jDAoOJ8Tg2jn G+skcjEedXqRJ+VRDnL2vtJdSh8T9MHVN0SvBUrmtzCTfnG2UpGejhCjBoAXmCWnvTi+ x0gpLK11fRau3FTi9e2fGJ51AP7Z+92Gv9BYKDKBIZODOhJxrTG8zo5+er8AT6Db9v08 Xgere7E42Z3/7kxWz68YHFqtTSx/aNIYb+AKpfjnHcr9NcdlMiqurbhwxeFeOlNOgNQT GNtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=+s1IaVbmnL9yBRcZ3BjJ3ucj5/q4zxOlTyNgvpB+MwY=; b=TQHvoWb7a4UL2pT0AIbPvc0NVVKdWqxbgYe2IJMiOQ7hb8T8hj4kGgD1cjdjFsRmMr M+mmZKpGNPyZTWGEviQ7ncBUiBvdD0urH/y/whLkJDhH92K/EQ4aTqczsY4DHzUfKGe4 HE9bHMz7zFj/objGhQUf0Be7z8Dwmx3RM3+GO7jtyW+NVtWlJkCMChlZ93MWQkiyRGaA vGAqII0BNcLMQMMCHTiM3m86bSb0YXKID/Mra4jO6amFUP38X6fc3ZUyha6XSJ9q8fdU VCldPpWod0a7rCfCLIYlAXWb5NJwUq2WBInfHgFgdvki7iuR09pBrVGXmclPrDMDDxEj TneA== X-Gm-Message-State: AOAM530MbrDVvnClQMaanaxmlS9vXVE6T804dC7FIcz0nrCP9yj8e2/d 3RY2QPyhpmBt6XdzKhQC6WqQvw== X-Received: by 2002:a17:90a:950d:: with SMTP id t13mr5580197pjo.102.1590691086116; Thu, 28 May 2020 11:38:06 -0700 (PDT) Received: from [192.168.86.238] (c-73-170-200-117.hsd1.ca.comcast.net. [73.170.200.117]) by smtp.gmail.com with ESMTPSA id j26sm5378855pfr.215.2020.05.28.11.38.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 May 2020 11:38:05 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v12 00/18] Enable FSGSBASE instructions Date: Thu, 28 May 2020 11:38:01 -0700 Message-Id: <7A3EBAB0-B3B3-4CB7-AA6A-FDF29D03E30D@amacapital.net> References: Cc: Thomas Gleixner , Jarkko Sakkinen , Andi Kleen , Sasha Levin , linux-kernel@vger.kernel.org, bp@alien8.de, luto@kernel.org, hpa@zytor.com, dave.hansen@intel.com, tony.luck@intel.com, ravi.v.shankar@intel.com, chang.seok.bae@intel.com In-Reply-To: To: Don Porter X-Mailer: iPhone Mail (17E262) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On May 28, 2020, at 10:40 AM, Don Porter wrote: >=20 > =EF=BB=BFHi Thomas, >=20 > On 5/28/20 6:29 AM, Thomas Gleixner wrote: >>> Until recently, we were doing proof-of-concept research, not product >>> development, and there are limited hours in the day. I also hasten to >>> say that the product of research is an article, the software artifact >>> serves as documentation of the experiment. In contrast, the product of >>> software development is software. It takes significant time and effort >>> to convert one to the other. Upstreaming code is of little scientific >>> interest. But things have changed for our project; we had no users in >>> 2015 and we are now un-cutting corners that are appropriate for research= >>> but inappropriate for production. For a research artifact with an >>> audience that knew the risks, we shipped a module because it was easier >>> to maintain and install than a kernel patch. >> I understand that and with a big fat warning and documentation from >> start I wouldn't have complained so vehemently. >=20 > This is a fair point. We will fix this ASAP, and I will be more careful a= bout this going forward. >=20 >>=20 >> Sorry for that innuendo. Now that my anger and general frustration about >> this whole disaster have calmed down, I surely would not write that >> again. >=20 > I appreciate you saying so. Thank you. >=20 > I can also understand how frustrating the history was with this feature, a= nd we missed an opportunity to help sooner. There is a lot I still don't un= derstand about the process of merging and testing patches in this community,= but if it makes sense for us to help now, we would be willing. >=20 >=20 With my x86 hat on, I have no particular expectation that you would be famil= iar with the particular problems wi TV FSGSBASE. One sequence that will kill= the kernel is to use WRGSBASE to load a negative value (e.g. ~0), then set E= FLAGS.TF and do SYSENTER. I=E2=80=99m adding a test like this to the x86 sel= ftests. One useful test for the actual kernel patches would be to run your SGX workl= oad on a loaded core. That is, do something like taskset -c 0 graphene_thing and, simultaneously, write a triv= ial infinite loop program and run that under taskset -c 0 as well. For good m= easure, you could have perf top or perf record running at the same time. Lo= ok for kernel errors, but also look for any evidence of your workload malfun= ctioning. =E2=80=94Andy=