Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1621355iob; Thu, 5 May 2022 05:19:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNMXmRGXSLN1HO9FIH9PyVCmCurHHEYUy1F/Vn6PHm1elKV0a1Bi58ES0pGxzpaypExhAi X-Received: by 2002:a17:902:76cb:b0:15e:e178:e2eb with SMTP id j11-20020a17090276cb00b0015ee178e2ebmr294272plt.0.1651753195969; Thu, 05 May 2022 05:19:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651753195; cv=none; d=google.com; s=arc-20160816; b=nuURm3FR6Blypg28sAfU3+xNCdg9FXzSI4CsN0ZNPwOaExv6wOLCgAtHBvOYe4QUhq TbacZZxckrKFQP+DQbnGBbnshRiXNwQCHR9m/dVaxmycb3qpEdp2ZuLshZwaMhHq8ynq b154cbiCXR4o6+dhHgJyVjR3WFVGj3SYaGcw2amorCo9ENSZFcTNSw21YinqE8+SMZQx MmUMuOs7DGiHxTqAgXE3uPdTzeXg2tE46jptk9Xy2zYAms7a92Sw1H/L9JStFhhNHZOo U9C6tivi3BkzRu7hGUK23h4xW+QBzSNWWGsyrjdTOjm6eyyf5HMv1GAQakK1hfoGCIHF 0Hxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=yscU3WybghtmL24CPVhfe3Npv35TWeHhUhbLPNB/baI=; b=oGEOTAOMdl8dsHs/NyjblBt2DdJR+tTMFo9Dulne9nlOY4+UMcaBVYYBffidoXAStc 3MjjluVPDSFdOeBWQP+FpxH8GoWGaJmT/NhNkk2cFugliVq5o0jhovH6VPlNd67ic3lN eVQTVQcWRT32m9rAR2dFj1UqnwQg1Mjjj0lY2yUlEQcAuZUQgfQs1T8eHks/y4+sViXW DFo1umVM/t3sE83oGR5zKYKh6VuBJJWv1cTw6sD3YGS6yK35I0ruzLYXIZ1QzNlv3nsD AC1McEb5F7ldQpGQaUeqbyxXcntZXw0dsSix4q8KqyAriV4UZ3Okb4MymR6+eaKUjr0b fupw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=2o4Pulyp; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=XRJx8U7T; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g9-20020aa78189000000b0050de4a898e1si1264861pfi.269.2022.05.05.05.19.40; Thu, 05 May 2022 05:19:55 -0700 (PDT) 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=@linutronix.de header.s=2020 header.b=2o4Pulyp; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=XRJx8U7T; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346350AbiEDVHw (ORCPT + 99 others); Wed, 4 May 2022 17:07:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235258AbiEDVHv (ORCPT ); Wed, 4 May 2022 17:07:51 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D2095132C; Wed, 4 May 2022 14:04:14 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1651698253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yscU3WybghtmL24CPVhfe3Npv35TWeHhUhbLPNB/baI=; b=2o4PulypsEzEaBWVKXUxymwhkYsJP/KTJPjb8FRZr+Ih3SjC7rNRe3gMTZ62Zhxqe08LUl Prn+Gl88cMnO4fy59CKk9MWSFjSSblnj75szVkZXRS/pw218lyTttRm8hs69hlbqvD5+4r j7Spi2zSB+/qZi6XUycE2WBtWCrd759FD1kpHPRuXmY/gpuftQmIGEQRFXTcEd9Llm67b4 VvIdre3I7NblZMLPy0gpoT6K7GeJsxSeVK3liXZ5Ry0rAF7vzYZhWyNs3AmbfDo3ov9PGt jIaFLQEVGPftCkXx7bujbixeFC6j2mpTed3UhJijSNvnblLacC+JRVzZhTCuqQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1651698253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yscU3WybghtmL24CPVhfe3Npv35TWeHhUhbLPNB/baI=; b=XRJx8U7T2flBHP2xUg1gwUnEZLffldEyfEe3a60XlUALYx+birhCBL4LUAs3gFlFAAI227 Vi33mqjq76SNcODQ== To: "Jason A. Donenfeld" Cc: Peter Zijlstra , Borislav Petkov , LKML , x86@kernel.org, Filipe Manana , linux-crypto@vger.kernel.org Subject: Re: [patch 3/3] x86/fpu: Make FPU protection more robust In-Reply-To: References: <20220501192740.203963477@linutronix.de> <20220501193102.704267030@linutronix.de> <87k0b4lydr.ffs@tglx> <87fslpjomx.ffs@tglx> <87czgtjlfq.ffs@tglx> Date: Wed, 04 May 2022 23:04:12 +0200 Message-ID: <87wnf1huwj.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,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 Jason, On Wed, May 04 2022 at 21:05, Jason A. Donenfeld wrote: > The other stance is that these input/disk events are relatively rare -- > compared to, say, a storm of interrupts from a NIC -- so mixing into the > input pool from there isn't actually a problem, and we benefit from the > quasi domain-specific accounting and the superior mixing function, > there, so keep it around. And the non-raw spinlock on the input pool > won't negatively affect RT from this context, because all its callers on > RT should be threaded. I'm not worried about RT here. > The second stance seems easier and more conservative from a certain > perspective -- we don't need to change anything -- so I'm more inclined > toward it. That's not conservative, that's lazy and lame. Staying with the status quo and piling more stuff on top because we can is just increasing technical debt. Works for a while by some definition of works. > And given that you've fixed the bug now, it sounds like that's fine > with you too. But if you're thinking about it differently in fact, let > me know. That still does not address my observation that using the FPU for this mixing, which is handling a couple of bytes per invocation, is not really benefitial. Which in turn bears the question, why we have to maintain an asymmetric FPU protection mechanism in order to support hard interrupt FPU usage for no or questionable benefit. The current implementation, courtesy to hard interrupt support, has the following downside: Any FPU usage in task context where soft interrupts are enabled will prevent FPU usage in soft interrupt processing when the interrupt hits into the FPU usage region. That means the softirq processing has to fall back to the generic implementations. Sure, the protection could be context dependent, but that's generally frowned upon. If we go there, then there has to be a really convincing technical argument. Thanks, tglx