Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp406231lqr; Wed, 5 Jun 2024 09:17:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVEHBFPgvj4yMilhvWIK+XxpgFty2X5KUdDkeywF6Wltjb9unvx4pUAGKSOyh1klTSpqlw5P6/4lET4bqR11fyOtso6tBVBgSkoqOGGEw== X-Google-Smtp-Source: AGHT+IEaGlAZO34GxfOIekKanIvk5KOFnN1Pu/8LhDzcR9Rwp/XgDL0WHumtqzFrA2dnrwWuNPh8 X-Received: by 2002:a17:906:7189:b0:a59:dba0:1544 with SMTP id a640c23a62f3a-a6c763bf63cmr13065866b.31.1717604278473; Wed, 05 Jun 2024 09:17:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717604278; cv=pass; d=google.com; s=arc-20160816; b=rJY94mc9ZNBIncVQSRvnP3mIN31MiX7bHu7agmK9OizwaqbZ1+GOPQ74jCRYhEg7j5 /aDW1uBz7xrLtiCISgWUpMFTZyTXAHgn87xdLNdzv4Y/deu8RQw4QAs5FN5pCoGzqYaM FvUoQozozgu6YDmQGykLlEWqDj72mBCMLugMavbQ3GtozwC7LKzBL4omuVKfIu355Vmn GkWUOC+ab/7tQ8Q3TiIvTBtgDS7855MLQJ3sGfu+65lodCfEJIKxfJCAzieYKGJOe4lg zTBGpD9ZW5ADpbSeNuboQs0KCw7YpFpkhXKrZODIQYainSMgd80tfELGASrLxyV3Wn7A H5lA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=rjT+iRyc5GfiUIlZUEFmZp09PKDBzpzR2oZ+eeDSlg0=; fh=zRMQeD9DD0+kSXt0UeEjU1zoYPjtzqwJxxvVPi9wzDE=; b=G0NNaEZfrS0n/MlsqQ02hlCt+dp0ogKfGfambcqtOkPaWuQ6C8izQmYYw3JupJe1of zd4KuwarUEi+CXsZBOMVFDJ/BiidDScZTqrbbFsnqbUT2gxkzuOe5ILyXvU/CarJsNdF 4EyF9tQh/d45ebRaZZeAJNxrWU1lw2Uu2RAWE8iKHicZGq8Du/PKlfhxNhQJP/b4i0KH TxxEzuyReABjhO7PaSwgO8OEO22pWFwtQ4qm/050mFIoO1fb+QjSuBhms9cwZlgEHytm stPBEsNl1AAvwQDrccmHigmxib7WS447mXU319VS0xDluYgMHCJxKhtELfX+ZoxeoDIM O2Wg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=FgLFTgqo; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-202886-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202886-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a68b8a0fd67si481410366b.293.2024.06.05.09.17.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 09:17:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202886-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=FgLFTgqo; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-202886-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202886-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DEC4F1F2979D for ; Wed, 5 Jun 2024 16:08:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0419814E2FD; Wed, 5 Jun 2024 16:08:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="FgLFTgqo" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2906C2837A for ; Wed, 5 Jun 2024 16:08:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717603710; cv=none; b=II/7geE17/aaLiL2iIw3xv/2zuTiWTyB5fOP/K7o0doPDuT0vejo8dutpmxZJaftaDqUdYF1zgwKu0R5V2dndnGE9KZNzpBZwI71Aqkjvg8wbeltkqAGLPBsSuwAmRDCWBeRhqiD0M01K9e5u+PzMJ40U6V34uMZKf9fCQRbnK0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717603710; c=relaxed/simple; bh=H/FJ2N0FwApJ96TxD1B509Iuy8DXiL1iOz47w9oFOJo=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=WMPytfetiq7VOsCc1TtXNDshLu8lrrt8v9Xebd6MK3jfD2IghxWRtT1I7QcH2lChxCXtBOjAAqWiVtXZNm/gm2VhW8fA8Jq+JJsd1j9uOzHC3z8browoE+13pLsB8+kr816x/K/grjdi4tszvDgJikQjY7vCB3/ClvcFsmdBifI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=FgLFTgqo; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a626919d19dso214808466b.0 for ; Wed, 05 Jun 2024 09:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1717603706; x=1718208506; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=rjT+iRyc5GfiUIlZUEFmZp09PKDBzpzR2oZ+eeDSlg0=; b=FgLFTgqo5yPGq6dfzPTTC/LKyh7Ldfc1GRxISTA1FbcaM/hiYp7Yo74MS+b3MVPmnF w4H71a2QZzr5EoouXufBAUkfJ4T/WmORfTDrCILnmmoY8/HyNpk2msyT+Xj1enihGWlm t5bmsWs/yp74srEeZ9Py79BrlyG2m/Qo1RcHs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717603706; x=1718208506; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rjT+iRyc5GfiUIlZUEFmZp09PKDBzpzR2oZ+eeDSlg0=; b=PvsnXUheU4KPX7JBDDSe7t/UQGDwTemaidu5qG03yTIrmmQmWXY6+v4CMxIIg1QH/9 6+wrDNEgcMOmk1kQslwjg882C8Hu0ATaPZdHhCOwktZHzAFfcebhMfyDW4Aat7NmnVWA 64br9J44LQSPlqXSgEZ2kgXiKTkfSNVfrI4IzyeYjlbIRe3up1qFRYPO2OCMzirMtfSD OeqBrZ+pp6YK68RQ4mjl0zvPeimYukj+t++RGk2TMUvfu01tUPVgPu59oqU0Ce2QqE0m XP5Dgl5JTV2weDR8lTp7oIrAaVckpCN0iLKNgb5rStwsEjs8rLA6up/1f3U0wG3E2wfQ 06tA== X-Forwarded-Encrypted: i=1; AJvYcCVFvI2B/beHlQu27Mw4Sg4qEGaxxDQI0GCrilgtPz8CEL1hjf9rhudROrAxFFNq9radwM5e1zLEM9Ev43GPYEODADA0kSaGmFkuvXDe X-Gm-Message-State: AOJu0YyVfYC7Z0mFgm0nLcbRAWCOFJJidf0maK7A3EXNgYXAWV7CMc4a 0xvKGY/THhg5XMa5AgtLw4AbiIy1OUKAv9GFkssAWNTkTjHRLTxJgsdz6OUuFTwKbs8/83OEkls AfiyYEGQo X-Received: by 2002:a17:906:270d:b0:a68:f6b8:5239 with SMTP id a640c23a62f3a-a6c75fadd7dmr8605666b.13.1717603706234; Wed, 05 Jun 2024 09:08:26 -0700 (PDT) Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com. [209.85.218.48]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a68ba7fd6besm649355266b.190.2024.06.05.09.08.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jun 2024 09:08:25 -0700 (PDT) Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a6269885572so196033366b.1 for ; Wed, 05 Jun 2024 09:08:24 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWeWOvAdsCJs4NGUnlWqq9lUnIatpvCK13Sr5RSAV8u94WXtGXrksEimQe1A1k4L2l0a5QhurLa3/HHxl4baq+Hpe8SQRPdaKD2IWQB X-Received: by 2002:a17:906:dfe7:b0:a68:c70b:5555 with SMTP id a640c23a62f3a-a6c762bcb4cmr10056866b.17.1717603704589; Wed, 05 Jun 2024 09:08:24 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240605083557.2051480-1-mingo@kernel.org> <20240605083557.2051480-4-mingo@kernel.org> <20240605141733.GC25006@redhat.com> In-Reply-To: <20240605141733.GC25006@redhat.com> From: Linus Torvalds Date: Wed, 5 Jun 2024 09:08:07 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/3] x86/fpu: Remove init_task FPU state dependencies, add debugging warning To: Oleg Nesterov Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Andy Lutomirski , Andrew Morton , Dave Hansen , Peter Zijlstra , Borislav Petkov , "H . Peter Anvin" , Thomas Gleixner , Uros Bizjak Content-Type: text/plain; charset="UTF-8" On Wed, 5 Jun 2024 at 07:19, Oleg Nesterov wrote: > > On 06/05, Ingo Molnar wrote: > > > > But the init task isn't supposed to be using the FPU in any case, > > Afaics, the same is true for any PF_KTHREAD/USER_WORKER thread? I don't think so. We have various users of kernel_fpu_begin()/end() that are very much about things like crypto and RAID xor memory copies etc that will be used by kernel worker threads. In fact, as far as I know, we'll use the FPU in the init_task too thanks to irq_fpu_usable(). Look up the nft_pipapo_avx2_lookup() function. Maybe other patches removed that, I didn't check the context, but the "init_task doesn't use FPU" doesn't actually sound true to me. Linus