Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1176806pxb; Thu, 21 Oct 2021 17:41:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAXoLKyw5M1txkdN91fSYl+4+QMxMrIda9hdTlHx42CwTH2qeVLXKE3EzJf+gZDKgwBg96 X-Received: by 2002:a17:903:2287:b0:13e:5d9f:1ebf with SMTP id b7-20020a170903228700b0013e5d9f1ebfmr8208187plh.75.1634863294015; Thu, 21 Oct 2021 17:41:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634863294; cv=none; d=google.com; s=arc-20160816; b=hp9Zr5pJEyjg02ASMJQCi80Q2eHGITGAbuOxG2DpvT22cKv/mwgEfLEPAWy1geYoO8 6aiL3cidbygMLEJ5kz/hnLJ46jg5eZEKHgLkzbcMGh7/nrnXA4u0uijDf5EaLfDv/hXH /aQIZb0nG8O/fmm/0e07MCNCTBys0OhZV+YHP62wGudqv3yCSGjKykFAUDgeMC8ageO0 p98Vw1f4miw/TuqK2t9UMPcxjBVQhUbLoaBDeF/BPPLXI/k/mvKK9buMxC4mfAFaTYC4 J5jex3SWElGn/B/i7ZAOV3SQmQgua7YR9AkcQiG19JflEm0mhUTbYu0w5Sbr01XjaGNZ yduQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:dkim-signature; bh=S0lfXvzTOYz00i3eJy4jU9CDG7p18Pg/6G0StFfsPUA=; b=wuVnW7z8IM5oEHR+nQh3WpYCHWbfHUIVpT4hc3eb5J03ZhwVfDYNDKkYJNGWgh6bID uqawdLrMM8tTCyvyeuxkempt+ruMtcHygcKF3vz8ZxidBfAI7gUxbOYHJBCYMNx0MGXy 8ifBYN3hbnSHyhXeX8Z9Aa5Civ4/639SLNY86L9sJ41Ps+IlCUaRpBfALT8tAxBlUUjQ OrhN6JDrHK43FRXJLWxUK+iNPJBt9cwtAhBllXuTFuxqIFK/quiNOcm6WsklVG6nE+mg QuHU3K74c+xPSfF6XpdfgzATqdc2kOdVNMLH1vic7HNH79YfaSnpFnengfV3/kXj+Pjx MKSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s8Cz1wmA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c17si8725967pgv.299.2021.10.21.17.41.21; Thu, 21 Oct 2021 17:41:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s8Cz1wmA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231839AbhJVAmS (ORCPT + 99 others); Thu, 21 Oct 2021 20:42:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:37520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbhJVAmR (ORCPT ); Thu, 21 Oct 2021 20:42:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D0FB8610EA; Fri, 22 Oct 2021 00:39:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634863200; bh=YI8Zfk561ht2DkhBm2zzblKrdL784Q8av/3a0SxfxXc=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=s8Cz1wmAB35qNsxrGaFdbqCdJHmaHNmBY2pu9w9cF7px4iooPgT50aUBBqr0YgYti eNuy0f/P8dUen5MvshVVNUF3rWomGVm4kNVvnFkizAJYu8MoBFIFJxNm2LnOpAzm94 t0KDbnWohwGpy17FeraKvU9uCp/zKmFb9R3JMi6c3+rNdmZU3o1zaBcm/PdQWK7+Yr I7TVlGAmQ93n83hfV4xXpPo2aMVqDl9lvrmdUFuYtIsYXrpZvGaKhoU6hHMSJnbLMa Fq/S9QA/YBgC/0BO2ayXlhv6xgSNjgDiy/k2yt+4fWC2Wlhn3e7r5KHN5e3wwYHMm9 Wd/ZWeNmR+qCw== Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id D859327C0054; Thu, 21 Oct 2021 20:39:58 -0400 (EDT) Received: from imap48 ([10.202.2.98]) by compute6.internal (MEProxy); Thu, 21 Oct 2021 20:39:58 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddvjedgfeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdetnhgu hicunfhuthhomhhirhhskhhifdcuoehluhhtoheskhgvrhhnvghlrdhorhhgqeenucggtf frrghtthgvrhhnpedthfehtedtvdetvdetudfgueeuhfdtudegvdelveelfedvteelfffg fedvkeegfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegrnhguhidomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudduiedukeeh ieefvddqvdeifeduieeitdekqdhluhhtoheppehkvghrnhgvlhdrohhrgheslhhinhhugi drlhhuthhordhush X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7512D21E006E; Thu, 21 Oct 2021 20:39:58 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1369-gd055fb5e7c-fm-20211018.002-gd055fb5e Mime-Version: 1.0 Message-Id: <08669c29-a19e-44a8-a53e-acfa773d4680@www.fastmail.com> In-Reply-To: <202110211310.634B74A@keescook> References: <20211008235504.2957528-1-keescook@chromium.org> <202110211310.634B74A@keescook> Date: Thu, 21 Oct 2021 17:39:38 -0700 From: "Andy Lutomirski" To: "Kees Cook" Cc: "Peter Zijlstra (Intel)" , "Mark Rutland" , "Shuah Khan" , "Alexey Dobriyan" , linux-kselftest@vger.kernel.org, "Josh Poimboeuf" , "Andrew Morton" , "Alexey Gladkov" , "Jann Horn" , "Vito Caputo" , "Ingo Molnar" , juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, "Steven Rostedt" , "Ben Segall" , mgorman@suse.de, bristot@redhat.com, "Christian Brauner" , amistry@google.com, Kenta.Tada@sony.com, legion@kernel.org, michael.weiss@aisec.fraunhofer.de, "Michal Hocko" , deller@gmx.de, "Qi Zheng" , me@tobin.cc, tycho@tycho.pizza, "Thomas Gleixner" , "Borislav Petkov" , "H. Peter Anvin" , "Jens Axboe" , metze@samba.org, "Lai Jiangshan" , "Dave Hansen" , "Eric W. Biederman" , ohoono.kwon@samsung.com, kaleshsingh@google.com, yifeifz2@illinois.edu, linux-arch@vger.kernel.org, vgupta@kernel.org, "Russell King (Oracle)" , "Will Deacon" , guoren@kernel.org, bcain@codeaurora.org, monstr@monstr.eu, tsbogend@alpha.franken.de, nickhu@andestech.com, jonas@southpole.se, "Michael Ellerman" , "Paul Walmsley" , hca@linux.ibm.com, ysato@users.sourceforge.jp, davem@davemloft.net, chris@zankel.net, "Linux Kernel Mailing List" , linux-fsdevel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] selftests: proc: Make sure wchan works when it exists Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 21, 2021, at 1:12 PM, Kees Cook wrote: > On Thu, Oct 21, 2021 at 01:03:33PM -0700, Andy Lutomirski wrote: >> >> >> On Fri, Oct 8, 2021, at 4:55 PM, Kees Cook wrote: >> > This makes sure that wchan contains a sensible symbol when a process is >> > blocked. Specifically this calls the sleep() syscall, and expects the >> > architecture to have called schedule() from a function that has "sleep" >> > somewhere in its name. For example, on the architectures I tested >> > (x86_64, arm64, arm, mips, and powerpc) this is "hrtimer_nanosleep": >> >> Is this really better than admitting that the whole mechanism is nonsense and disabling it? >> >> We could have a fixed string for each task state and call it a day. > > I consider this to be "future work". In earlier discussions it came up, > but there wasn't an obvious clean cost-free way to do this, so instead > we're just fixing the broken corner and keeping the mostly working rest > of it while cleaning up the weird edges. :) True, but we have the caveat that wchan is currently broken, so in some sense we have an easier time killing it now as compared to later. But if we don't have a fully-fleshed-out idea for how to kill it, then I'm fine with waiting. > > -- > Kees Cook