Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2280379imd; Fri, 2 Nov 2018 08:46:42 -0700 (PDT) X-Google-Smtp-Source: AJdET5efIgH/9rdITJ6IvSEw3L6qg+LhdY+dKih2Bfw0Ukow5orGbMhCTLWtjJIazupZ4ShkFoEf X-Received: by 2002:a63:f0c:: with SMTP id e12mr8432264pgl.274.1541173602444; Fri, 02 Nov 2018 08:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541173602; cv=none; d=google.com; s=arc-20160816; b=T4ChWQRAxnDzferOZIS7Ai79x2h7YjW1El0c7KfpfOQgq+owbE61Cunfhld38Fovlt aJqhK2tpG10nnUnVlK4BgA/D8GsTgx6mywQAYBgBFaCa4Rr9YyT7nd48jqZkNclDAoQs jETCpboaHsIJlUIj3zh79sOiz02a4/YMasQaOWlaNDc2iRmZnjHmqPoN198X7KewgCVx DzFdjGwgAj6iEV+LVsu5v+bgpWafv4eNxgjrzy8bVhk52D+nAc5+8wvpBrxm54/GaAXD lb+5xwYJ3adf2gvkGDgNchAMqkwiD2tUJnd7hIqZ0GGuz8k9pPSz3jpizbabvy/O0ocE p+cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=3RoAOpI4bvRwMkkRCv0E6Kryt32dhQgEtRVjHseU8UE=; b=ow5JWCVwic32b6kLLratZFDOtFYe49qrieP6hOnP0n4zHIPG1uWIMv+vO1TmHUVwDL Gpt78kNiLuI2bxhxeTpl8ZS6ijXfLuiC6cyetfefls7V0kFNGWpt4BnJxGWrA062mxIg wsf6ZJ2pfWI9iaRaOdKTaLIJu228qLjA8raDXj8e4iyl0zu/AXhOkaYduROC6SI1cgpI +y/ia01zzat9E9vsHZrKeb0RjYY/5IrAVXdMlDZTu95+/i92E/xc8P0B6/4FIUbeyylq w6lT4EsLjaDssftDKM1UIR5MHZSagy4IzVeBms56CQGSGfo/HaJCna90h2Zp/jNpjt/H otrw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f34-v6si32985300ple.31.2018.11.02.08.46.27; Fri, 02 Nov 2018 08:46:42 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727835AbeKCAvy (ORCPT + 99 others); Fri, 2 Nov 2018 20:51:54 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:59367 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726229AbeKCAvy (ORCPT ); Fri, 2 Nov 2018 20:51:54 -0400 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1gIbcO-0000X4-9V; Fri, 02 Nov 2018 16:44:16 +0100 Date: Fri, 2 Nov 2018 16:44:16 +0100 From: Sebastian Andrzej Siewior To: Borislav Petkov Cc: Dave Hansen , Rik van Riel , linux-kernel@vger.kernel.org, x86@kernel.org, Andy Lutomirski , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , kvm@vger.kernel.org, "Jason A. Donenfeld" Subject: Re: [PATCH 10/11] x86/fpu: prepare copy_fpstate_to_sigframe for TIF_LOAD_FPU Message-ID: <20181102154416.bgtueiy65o6d23ni@linutronix.de> References: <20181004140547.13014-1-bigeasy@linutronix.de> <20181004140547.13014-11-bigeasy@linutronix.de> <20181015152431.GD11434@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181015152431.GD11434@zn.tnic> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-10-15 17:24:31 [+0200], Borislav Petkov wrote: > On Fri, Oct 12, 2018 at 12:40:19PM -0700, Dave Hansen wrote: > > > + __fpregs_changes_end(); > > > > Do we really need the __fpregs_changes_*() abstraction for this single > > call site? > > Yap, I'm staring at those in patch 2, there's no documentation there what > they're supposed to do, only the commit message of patch 11 says: > > "The __fpregs_changes_{begin|end}() section ensures that the register > remain unchanged. Otherwise a context switch or a BH could save the > registers to its FPU context and processor's FPU register would remain > random." > > So I'd say we should drop that abstraction, use preempt_* and put that > text above the single usage site. There are more than one caller and this function disables preemption and BH in the end. Therefore I would like to keep it. But as suggested in the previous patch I will think about renaming it. > Thx. Sebastian