Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp579901ybh; Sat, 18 Jul 2020 13:19:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzD9cP2bF1fKHjhQf9HTtP9RulHWGJ/2qFqUnU+1dHwGuqnq2AsFjGoKKChTJg+us4eb1yk X-Received: by 2002:a17:906:7802:: with SMTP id u2mr13932881ejm.206.1595103568821; Sat, 18 Jul 2020 13:19:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595103568; cv=none; d=google.com; s=arc-20160816; b=mtVRmP1lCLrKWq6UUvcvgnb5l91AWAbUC5b50fPo8yb8YarzW+/7ys9B0Pn6fU0Dit lDKC8aB31nvI/x6uhyGZ0GHa10N7ndG7U8LijNN6uvM0hM+LjHm3D6YrPongFu28vOyK tIWsW00WI58Q7splgMzwJPemHCY0IKDhmMA+FEB2nueoviBFGzS8NYHgYTaBGveBJQrj aBPoJiNILXRKtP8PKz4yJm1i8EUuOu2tx4v1+pcHPliyCuIu8+L4ypKf0WNaIpQYM4J3 ipp5S6Ag8Pt86FvDqpV2p+tltk0+EAtMs53pDV/O7gF/wuC1vfMOTJxSepMBNInTEGeH e74g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=Wzy+cAnfVWyCNBRsbp4f96uaFuyezcnGy3p//wWBWlc=; b=gpSSRcB7SuP+XkVv1YDomMfQBldSPiP2+3WLhNOa4gBEu6vjNnO3jd/2NhyFR89NfB Iz5nCWCE/JHCIQjA79bCw9xrYVKehrq6OQnHkGc7PEKTdna9x04ozvb34gUSTDoh4RVd EbmjD0RNHSjnOqiWkjfjc5NkT8MCLOShzwihZTwyd5HOiMgLI1+cr59mMx2ikfgnqjjj 8yCcmNCvQsqTDWQMqh/MBACtn4NoUHqXxdR/Da/M4ty2FP6eIgAQjPYDb1lt88SG13I3 LKZO7FO857TbZPSv4TJaQZkxFCpvSLvlJp0gfWM8ELXTUaumpUSJVyOiVS46arAKOJ8o wJuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cs.unc.edu header.s=google header.b=IwWw+pOP; 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 y24si7804425edv.573.2020.07.18.13.19.04; Sat, 18 Jul 2020 13:19:28 -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=@cs.unc.edu header.s=google header.b=IwWw+pOP; 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 S1727943AbgGRUSK (ORCPT + 99 others); Sat, 18 Jul 2020 16:18:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726801AbgGRUSK (ORCPT ); Sat, 18 Jul 2020 16:18:10 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7918C0619D2 for ; Sat, 18 Jul 2020 13:18:09 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id w27so10233304qtb.7 for ; Sat, 18 Jul 2020 13:18:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.unc.edu; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=Wzy+cAnfVWyCNBRsbp4f96uaFuyezcnGy3p//wWBWlc=; b=IwWw+pOP8iz9mglvw1oqstQ6ZxJyWkhps+nXR1W7C87271q704wKNliO3g40NlXtYX FEdEP8H3UzLAiUjh7/U6V57lgeSPBgXJlgqoWmm5bZcj13guYXTbt1Ozrp2kuxt/U43T SvA7YfgeZqrhMZDtgktMzQKvnW0QuTblDl0Qg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Wzy+cAnfVWyCNBRsbp4f96uaFuyezcnGy3p//wWBWlc=; b=anesM7daDHY1DJpioNBSt+Pi5APTKlI/iz6wG0IgWjId0UTNshUHcmFyvlxzLv3v5b v3NZonBfbEVqijdVRHVnph7RaVleoOjdif/CY2xpaSpDOnjytjMPQ5qRsJSOQPtF0xtv 6evj3Qc1J6Dnu/uKrz5WuHhow8TxL5hyxrB9f3bO9NcQhwwmbolphKfjE98p5zJF7d0w sQ6USNidGK1htLm2sw+pL9eBNpc7P/qCQqZZgNnj/T4WA8F01mTtZWIQ28d+DWmNDucp JH3Y3MGv5djuE1TQmAw55f2mM0yBfLYbiwz4pGqEGfVTztFj+C+cYEBcMeNSA8Q0bXS9 VPJQ== X-Gm-Message-State: AOAM531sgnQc4mFbNWEzAHNppH+ShVJGkRMaPxw0CG2GSu/3X2fIV/Si cfiRXOUcCOsw5kpZcGdZlq/8jQ== X-Received: by 2002:aed:2723:: with SMTP id n32mr16929892qtd.109.1595103488923; Sat, 18 Jul 2020 13:18:08 -0700 (PDT) Received: from pepe.local (71-142-124-255.lightspeed.rlghnc.sbcglobal.net. [71.142.124.255]) by smtp.gmail.com with ESMTPSA id p36sm15125718qte.90.2020.07.18.13.18.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Jul 2020 13:18:08 -0700 (PDT) Subject: Re: Linux FSGSBASE testing To: Andy Lutomirski , LKML , X86 ML , Stas Sergeev , linux-sgx@vger.kernel.org References: From: Don Porter Message-ID: <6e3d25fc-9a67-8655-a00a-b3afbc360ff0@cs.unc.edu> Date: Sat, 18 Jul 2020 16:18:06 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/20/20 11:59 AM, Andy Lutomirski wrote: > Hi Stas- > > FSGSBASE support is queued up for Linux 5.9. Since you're one of the > more exotic users of segmentation on Linux, is there any chance you > could test it? The code is here: > > https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/log/?h=x86/fsgsbase > > There are two interesting cases to test: > > 1. FSGSBASE on. This is the default if you boot this kernel on Ivy > Bridge or newer hardware. > > 2. FSGSBASE off on a patched kernel. Boot the same kernel as in #1 > but either pass nofsgsbase on the kernel command line or use pre-Ivy > Bridge hardware. You will * > > You can tell you have FSGSBASE enabled for test #1 by running > tools/testing/selftests/x86/fsgsbase_64 -- the first line of output > will be :FSGSBASE instructions are enabled". You can build it by > cd-ing to tools/testing/selftests/x86 and running make. > > If anything is broken for you, I'd like to know before this makes it > into a released kernel! > > Thanks, > Andy > FWIW, we tested this patch using Graphene under Case 1, both in our standard CI pipelines, and with hand testing. Everything looks good on our end - no suspicious dmesg, no application-level issues. I also reran the stress test Andy suggested on a separate thread, which also looks good: * Graphene running nginx pinned to core 0 * infinite loop on core 0 * perf top running * Exercised with non-SGX apache bench several times (~10 minutes of testing time) also from core 0 All the best, Don