Received: by 2002:ab2:7444:0:b0:1ef:eae8:a797 with SMTP id f4csp20793lqn; Fri, 15 Mar 2024 11:31:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUjzDiwIQwkFEY29oMCUkTMl8AsfgkER/lI6N0p9DQMCkUWUgVA1b2ad0PsJLe+Oe8o0HU+eHqenD5qd2zVnRDbjcMf5Ord6AEhXIWFsg== X-Google-Smtp-Source: AGHT+IGEz7OPjbKZmP0gDPW5vn+yg3q/5+YKuD357imEEyAW/P1wwuStDwX2UR5Un6UgpRDyW9PZ X-Received: by 2002:a05:620a:2186:b0:788:5d37:f3b4 with SMTP id g6-20020a05620a218600b007885d37f3b4mr6118888qka.14.1710527502903; Fri, 15 Mar 2024 11:31:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710527502; cv=pass; d=google.com; s=arc-20160816; b=YPKtBptaeWE33rCT30FmsoSc8xYHg4PQXhw1j/L4tAgzA/RcTFhhrRSGV3Fhx7RjYP xc+jaklxIHShIW4HyTwvhXBdq5/yQxNCyRxKAHEOfqtJtuOBBY2OcVQjQSKTblHOXdym jdP+hVHuO0/UgK27IKK3ObsCcdLdQ/mTOuRZ2zSsg38DbV4CVAs8uq8npJem1vYOR3PO qLZ2s6byYINLljvQt+zzegEPjXdf7O8MxfuLTboj9DWpvW1QUnH4OR4u1BXL1fuphqPV 1JFywOOvJRG/1aZFDJGDsnIwmxJTuU+qRkVnBQ8eZ00hHoF2wYlK/gkYypKF+KN3jpCq KFfw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=Zb/zhFytHbXqGL0dBOQvF5FVk/FeIh4iYrgiJ4vCfz0=; fh=VT+R0uuc011kLDfiqjYO7nnMjuy11+QOl0Ig22NhIHI=; b=Ny5LKP3RVn8wpm2Er4xaSKudJWYW9wjIVCd3YbUPx0j+RY7kmcGBTqguCPaf2QPx9W mu3L5evdMM21OqDVveVMeni0rX2K4c5qbW8WTOYAbs7TYkHlt/VQhxV0WadKRiuDef1X B9cFwmxDAMg4qkYdsKJFpcuL9KvjNNd7pRxu3F4zAWZ6Hm35PHw30XU32LB7hpr3LKhD w9mP7bKJPF8Nb8wtNz8uxA4B8zaHJAp3OTUWAHPeGvr6fNBJPkKli1SSSswBnzJr3Laf 5J70CI08OEagp9tmKR71/Ub/gldsF48EcwHutF+yH9sOr1d6q69Ddb+Dj2By1FgtCR08 DTKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nDklX0Uy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-104790-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104790-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id bm36-20020a05620a19a400b00789e90f7010si1083056qkb.169.2024.03.15.11.31.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 11:31:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104790-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nDklX0Uy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-104790-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104790-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7E3111C2280C for ; Fri, 15 Mar 2024 18:31:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E19917730; Fri, 15 Mar 2024 18:31:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nDklX0Uy" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5D59CD531; Fri, 15 Mar 2024 18:31:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710527468; cv=none; b=Db5YZ7+f+IeL8hGmkC3j6Y+mJEIPOSF0QpYjr22NFD6ORnZXEqufezT/mGzJTQlDkYAeuNmyOkTnfLjjbVBBI9Pn+uZvOjWUlfNSqjhwqPsW3BkfUipiRxBS8kqCdppbyIWGoj4HUj/kTFVe86yY4aKz6s+wHjjYpHQ2LiziOJw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710527468; c=relaxed/simple; bh=T+84s8L5cLj88+eB19sBYREZk0tFk9atFi3HG81DeFA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qv35mbzX2qdiL0TAQTL1a5dhEPLO3eW7DfTw8qLG+BW9eMK4AZcg4AMMPxjrpJQXbIdtU6p7oNt6qJJ4syAoeg0MA3TXpWMCbT6vzLx8hbiBqHrBUBGax7195QDoAuvNETAM7vqEqJY4c00RaTm6504y5RULyG1UeCYnO8vQ8ss= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nDklX0Uy; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC6B3C433F1; Fri, 15 Mar 2024 18:31:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710527467; bh=T+84s8L5cLj88+eB19sBYREZk0tFk9atFi3HG81DeFA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nDklX0UyY5Q0UlzTkNmCf1ofzlXyxl6g40aOqZ+mFfopLVdjCWi7CRy6vCN3m5kwB lb/dR2f4qChHDN/kyX/xzO92uj75eACQFwT/0Ge8FwKqSYdL9HIJuehSJwaPZCjzAh AYJnX6k9TrfShnmBiR85spDggse5jhmtFgaN2psOyKDlL24s3S6tibOzbk4VOkuNfr voZy9aKVk2CCUwERtmH1TAEtmBpssJutTPaMSsVq+I9yFIoXsaLnBZs7v7gFP15qUG 7cj5jLZxxKp+h2dsvBpji5zrgWhFlbmOmDTDE2dmEp1HMagzURpFjsKQK6994YXUUy kWzX+Fkxmgv3Q== Date: Fri, 15 Mar 2024 14:31:06 -0400 From: Sasha Levin To: Kees Cook Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Peter Zijlstra Subject: Re: [PATCH 5.15 64/76] proc: Use task_is_running() for wchan in /proc/$pid/stat Message-ID: References: <20240313164223.615640-1-sashal@kernel.org> <20240313164223.615640-65-sashal@kernel.org> <202403132003.BF9AF5CA@keescook> 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; format=flowed Content-Disposition: inline In-Reply-To: <202403132003.BF9AF5CA@keescook> On Wed, Mar 13, 2024 at 08:04:36PM -0700, Kees Cook wrote: >On Wed, Mar 13, 2024 at 12:42:11PM -0400, Sasha Levin wrote: >> From: Kees Cook >> >> [ Upstream commit 4e046156792c26bef8a4e30be711777fc8578257 ] >> >> The implementations of get_wchan() can be expensive. The only information >> imparted here is whether or not a process is currently blocked in the >> scheduler (and even this doesn't need to be exact). Avoid doing the >> heavy lifting of stack walking and just report that information by using >> task_is_running(). >> >> Signed-off-by: Kees Cook >> Signed-off-by: Peter Zijlstra (Intel) >> Link: https://lkml.kernel.org/r/20211008111626.211281780@infradead.org >> Stable-dep-of: 60f92acb60a9 ("fs/proc: do_task_stat: move thread_group_cputime_adjusted() outside of lock_task_sighand()") >> Signed-off-by: Sasha Levin > >Looks fine to me. Can you double-check that commit >54354c6a9f7f ("Revert "proc/wchan: use printk format instead of lookup_symbol_name()"") >is already backported too? Yup, it's there too. -- Thanks, Sasha