Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp412336lqr; Wed, 5 Jun 2024 09:27:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUvnElDlbvmMCei6Xyh/y5N9cRYZ0FJKJpCFQs19TQo1/v5gHy52iflZqfB+0oLUuSR++yN/9A4RC+NLPZR72LeMySJ5uUDBmBxQ7i6rA== X-Google-Smtp-Source: AGHT+IG53UL2LJ5K6jgeOhFTakh4lCfGJF5Z0Nfk2Ury7rI9IuZ1gNOoJb1DFspTFMlEwzGAEMvj X-Received: by 2002:a05:6a20:918d:b0:1af:6541:8a08 with SMTP id adf61e73a8af0-1b2b6ee5c1cmr3652407637.20.1717604876591; Wed, 05 Jun 2024 09:27:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717604876; cv=pass; d=google.com; s=arc-20160816; b=d/nRnctJdTUpOg8rhCYTxVBzUPimXwSvtpzqusbfa/eM0Ld9oJUkqBu6U2SiR2Wxli nmm3YfwPX8CfiayN3iLXyNNjYh3QaMIcgtF0JHyWzYqgrUz3E+jFKDuqd4tkIlGqyX64 x/VTSc8d5+myywadlQp4zeFHGycTXm4tyalRbupQTEEQyq8TH1n6TuOVKgtYU2+Iv+ZT t8zwteOhYREkb3+C05BBmCzYOhNcAFKO9mlzP6oBiP2OXk+dGfMmJJrUz+o4v1oRC/ce nY9+yB/z9/E9586rh3NOAgJp7cSjYNeBcJH7Mt3lLArwHAEHLPkxZkPY/IBhVhcPUqEg VZgQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=WDicw8rzDSRTNRCMmdH3Lin6iM8oFn63Wzr/O2sLyt0=; fh=jX8Xr5fZ5ajhlNFYs2TOx6PJB26BSpQmy12p7KOckRk=; b=pdOq2GHGkg+DqgFYzepYKqPQ6v3rdkEP1ARbGgyTbad3AkCDCBkwA1kSJtAxnMwp5V /lxpevLb60dXTo9kNrLrmaFNbcikvzisxiLGXZM02awRcogLJbZ/fGRYLh/Ib6++NW2F ZsyVFBNb8Q0nhNOBX9OgZmavatRqR8gH1f103GI4O53ZzzLCf17mG0xlp68eZBi5FL6C CoTRyU/EvhQcq3GpbTxl6bUQEb91EZI9omnJxBtWeDgSG6kGw2yBR/Q70jOVxWzt/Cn/ YsW/3NBJ0utQMzBFrKcPFe2xmbUO/CsIlMAHG8PpBIzZtgiok7sn5AjBa/Gj4vmClOt2 Flug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Z/W7OJSq"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-202916-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202916-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c2806bca81si1491384a91.93.2024.06.05.09.27.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 09:27:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202916-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Z/W7OJSq"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-202916-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202916-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 34B3E286424 for ; Wed, 5 Jun 2024 16:27:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 45D5D15EFDC; Wed, 5 Jun 2024 16:27:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Z/W7OJSq" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BF6015351A for ; Wed, 5 Jun 2024 16:27:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717604872; cv=none; b=ahTaqAKQlcrGiCY13AnM7GuZfBkueCo+TwKTTbzQAqb/eCxyuXDAy/HIZgETSNFxzSILL497FHCl7+BzDANkm6ZQfiQd31iktZSK09bQiCMB2tdwPpcQJaRJpcnJXp71dHWjzvLd2VhXB4LOGaI6TPbnPmNvNRTXxdDLof/t/xM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717604872; c=relaxed/simple; bh=WDicw8rzDSRTNRCMmdH3Lin6iM8oFn63Wzr/O2sLyt0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OrSDbJ4wDSpMGgaqgzyXH4mZVBGWnyzx51wnptLp3d51U3390UQA7BlOGteKSBPOn/D20lznCD71hk8bNgYDwdr8dRJoUFztpyl43B6fQfzl0xWKdfUpO/y8HvaHOn/qcRoH/Z5E8WUzmpcUNJGMw0bw9VJ4ZnMzD0K7fHGHcgo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Z/W7OJSq; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717604870; 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=WDicw8rzDSRTNRCMmdH3Lin6iM8oFn63Wzr/O2sLyt0=; b=Z/W7OJSqXnuoiMxjKt/3wo39YoFulM9UoqAdwrpssXjiIy5LFo0gSxQa6GivYtXWEvh2c3 ah1bbmCivbEK1qi5w4zWA0sEoVMNMuO+r7nTE678Ofe3CadTpSGcSQ2L+70tA/zls0OTNH RUch8tjTBzMs2h6C5bW2PN04DXg2NoQ= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-1-k_m2iCmHN9OQCeUFZNm0ew-1; Wed, 05 Jun 2024 12:27:48 -0400 X-MC-Unique: k_m2iCmHN9OQCeUFZNm0ew-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D71931954236; Wed, 5 Jun 2024 16:27:45 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.50]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 6DF2119560A2; Wed, 5 Jun 2024 16:27:41 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Wed, 5 Jun 2024 18:26:16 +0200 (CEST) Date: Wed, 5 Jun 2024 18:26:11 +0200 From: Oleg Nesterov To: Linus Torvalds 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 Subject: Re: [PATCH 3/3] x86/fpu: Remove init_task FPU state dependencies, add debugging warning Message-ID: <20240605162610.GF25006@redhat.com> References: <20240605083557.2051480-1-mingo@kernel.org> <20240605083557.2051480-4-mingo@kernel.org> <20240605141733.GC25006@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 On 06/05, Linus Torvalds wrote: > > 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. Yes, but kernel_fpu_begin() never does save_fpregs_to_fpstate() if current->flags & PF_KTHREAD ? Oleg.