Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp665396pxb; Thu, 17 Feb 2022 12:00:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfrXgsTFHCaMMF9+i3l8/0dJ65lvGs/nAtjuvi+CO34VtS6XdQOEn4W/qG/6Wyfo3MuWgF X-Received: by 2002:a65:4108:0:b0:36b:ffa6:9c86 with SMTP id w8-20020a654108000000b0036bffa69c86mr3668424pgp.203.1645128015940; Thu, 17 Feb 2022 12:00:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645128015; cv=none; d=google.com; s=arc-20160816; b=CBlzRvpeOXB3HKF3X5hxpxsHEWLn+AIX/JXK5wKUFO9L2YBSlQlxF84a4X2+MGWEL6 lepN9wuxEWjFEFJV13DUmjUlNFOCiFpnuoLbdtFBsYUbGydPwcCdySJaNhDObuqSHLrB vL3Vx3bYNTZ3dkqEPUqACLWYJr/C+zrRwfmIq6wKn9qHS+Gfmhj9w1czoOmZ4aP7aC+2 W5RifWidd4d3XmbH5ZjxKxXaEdKMLPYJJjMxsXHQ+QLfHMHsP3I/u2dpiT0CVos/MZpn qJ5y5RN3OqsnS0C4F9c4bMckavIbn1FLLeuBcKN3/abWoUJOR/pROwNkV2PuqUufayGU zX/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=efMaWsKREHNxsnyxfSVPTTgtVgwrUj4joFVOyPkC3O4=; b=s4H9F8gMV7pOD4eJy+q6uaij60ii98ykhbaSdcV742p0r0qx4OKFNlZUBRfVwmHC3e 9s7syvrdNQh7LFBQ41r2QTdNrtwp+sFXXdLJ9+YOmvl6csJhTg/X+7ndmmpEQGSxoycm RfV6i861pEzaohHF+lDPvQHEgPPeQNCS3MdlLZwm6HP9eiHC4GMZXV8gJqaPQNFmDTaa a2QaXCqWQ2UFMA3gMNEWmfaqymcj/nnraa5KZY80P0utxlKssJtuTt6SoSiELtKx8L7w wm2APnj6FhAHL9c+vhQQm63JfjOt4uEkoyQvgHLfewAPXmKTbEk2XUZ3Yn09KlN8SoGG cIjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="IG1/OdJJ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n1si1452117pjq.103.2022.02.17.11.59.59; Thu, 17 Feb 2022 12:00:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="IG1/OdJJ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243118AbiBQQol (ORCPT + 99 others); Thu, 17 Feb 2022 11:44:41 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242697AbiBQQog (ORCPT ); Thu, 17 Feb 2022 11:44:36 -0500 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA549AC; Thu, 17 Feb 2022 08:44:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645116261; x=1676652261; h=message-id:date:mime-version:to:cc:references:from: subject:in-reply-to:content-transfer-encoding; bh=XqrJSESx4co6rylkuJdM9NA+JNlPqfIB9lAf1Ua1BBA=; b=IG1/OdJJG4CmrkH8uJ+hXfvapFyTqIXRmcbr1EbRLcqrzbGd+hj/phJk 2zddSoTlBaD8EiPuiilzq1XKShZjA4BQSEHZZ5vREOsNSObXiNndzEKxq Efsu1vy23Zr4Ph2EEfabKjkgUtiGK7uB7HTR+GAUVebcEvFSaK4+fNPUU vgm/EbgjJVHa5YxUYf3Mx8ZeqmlW32mH5TikpaqPVq7xuTWLsxzGiXdRZ pZqs2Gs89wJaqcMps35jB6tPjY02/RuV7xF9ZQpkKYtA2um3e/pt0u6FF jLjjKK5IL0EKfb/6H0oqePU+GUKniLzh+nLYdU5uL9DZKh5aYVM3xqOR5 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10261"; a="314181323" X-IronPort-AV: E=Sophos;i="5.88,376,1635231600"; d="scan'208";a="314181323" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 08:44:21 -0800 X-IronPort-AV: E=Sophos;i="5.88,376,1635231600"; d="scan'208";a="530351502" Received: from drichard-mobl2.amr.corp.intel.com (HELO [10.209.21.238]) ([10.209.21.238]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 08:44:21 -0800 Message-ID: Date: Thu, 17 Feb 2022 08:44:17 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: Brian Geffon Cc: Greg KH , Thomas Gleixner , Willis Kung , Guenter Roeck , Borislav Petkov , Andy Lutomirski , "# v4 . 10+" , the arch/x86 maintainers , LKML References: <543efc25-9b99-53cd-e305-d8b4d917b64b@intel.com> <20220215192233.8717-1-bgeffon@google.com> From: Dave Hansen Subject: Re: [PATCH stable 5.4,5.10] x86/fpu: Correct pkru/xstate inconsistency In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/17/22 05:31, Brian Geffon wrote: > How would you and Greg KH like to proceed with this? I'm happy to help > however I can. If I could wave a magic wand, I'd just apply the whole FPU rewrite to stable. My second choice would be to stop managing PKRU with XSAVE. x86_pkru_load() uses WRPKRU instead of XSAVE and keeps the task's PKRU in task->pkru instead of the XSAVE buffer. Doing that will take some care, including pulling XFEATURE_PKRU out of the feature mask (RFBM) at XRSTOR. I _think_ that can be done in a manageable set of patches which will keep stable close to mainline. I recognize that more bugs might get introduced in the process which are unique to stable. If you give that a shot and realize that it's not feasible to do a subset, then we can fall back to the minimal fix. I'm not asking for a multi-month engineering effort here. Maybe an hour or two to see if it's really as scary as it looks.