Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp826959pxb; Thu, 21 Oct 2021 10:12:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDc9K650iGyJpDTbuL5+rAY3mpXYuRrFbKre44YQeodt7O8RTpuGegz+zhVbDebomhw9o7 X-Received: by 2002:a17:906:1cd6:: with SMTP id i22mr1054030ejh.119.1634836359317; Thu, 21 Oct 2021 10:12:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634836359; cv=none; d=google.com; s=arc-20160816; b=T07b55gIRN4CJTPTMlefGRdRCKZzNnhXzwF4MgjG8tqAP25ePtmrq6rEyacqXAZ8ft 44twphhxgJtrFxoZuX/M3p8szJRPdVsETKZBPuonrjk3dfp8FIHdbRRqTCpzj0E4MNWn a8u/1jMfAGKGSs9y97AJc5CERXbBkidXNF5qsIifkpUfx8a7toDucaaDiKwraQLZ+m9L wpQ7UtSSI2v74rktXUqpxvH7W0Pt3ie0p7W2UHBHCF3Z8ccUYKAlWDeeWB4QKysNejxD czxg64trXmK3uK3OYQC1oHAwXFFEHcakJ7bpmwmiDv5Myn52FfnP1673WQcPaoDbypjH eq8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/h3z+ZI1NEezvcalKf2dOAyWJ+jaOF20N5IW04VxMnA=; b=ld6p0ehb4rJ/B5c1BhSarV7oEPelLqJJnD4NJP55D+rz7OLpLptCy6s9fx3q7xvypB zI3fMNYU9d0+0L5vC7XEpjYxTt3T6tOOHA4rfxO2PEKG5VFkFY6VKucRIzUGB60lEPEp gFpR5tt5LBS0ktNaek92PMREkQNuZiRF5BrTE7SWmSHMAp0PndQ9ooNnbmXPos5pAood 7CrSFjuODeCLL1+QKddF8edFeUWdugHID2d0Kd0ID/lF7tWUFrQX/9fAJKXOy593IjEb 6XcWW+amhxyVWb0kjXxkx72KwK8fNxCB+WBF69JMEioXYRByCIgxXRSZe1vhNRFQQBp9 sqtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EDjRl+Xf; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg13si12765368ejc.220.2021.10.21.10.12.13; Thu, 21 Oct 2021 10:12:39 -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=@chromium.org header.s=google header.b=EDjRl+Xf; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231220AbhJURL5 (ORCPT + 99 others); Thu, 21 Oct 2021 13:11:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230456AbhJURLv (ORCPT ); Thu, 21 Oct 2021 13:11:51 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41787C061220 for ; Thu, 21 Oct 2021 10:09:35 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id o4-20020a17090a3d4400b001a1c8344c3fso1512514pjf.3 for ; Thu, 21 Oct 2021 10:09:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/h3z+ZI1NEezvcalKf2dOAyWJ+jaOF20N5IW04VxMnA=; b=EDjRl+XfT9L+B0/Ui2ATB7qVPuwaM4acCWeRrcT+9g5GbxL0WJjmTq5c1ovmol2FJ0 1fskzEINTfsYw8g8nAAbg2ogfzpc+mC2cO++Uro/3Z17oY0UGCsaxq0L4FpQ5hTR0B+i 4F82TStCNcJSBnVJ6HHpuKiPMrmrBZjNNQaQ4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/h3z+ZI1NEezvcalKf2dOAyWJ+jaOF20N5IW04VxMnA=; b=25kOG5talwZ7uD88sM8yTCmBO5VMU9YCVVs3Tv13ip0Oj/T7eHfv24O4AhVYJjI7dV M6GBdvBQDf15QGoxnQmDKH+0RPB4T8JDa+pnBUGawIcSaszlfetp70k8HCe842kRUY25 Ws93vM2Rmw0BQcYwRtPkwkb1FcjGED2gR9YqFCLQ3o62fQ0aWAQrPG63VR6fUFO+/pfA iV/H20Apfj1b6TrA3C5rUVGrFS4/9ajCihQxXXmMOhm7UGYaQ3NGV9iYOopF7mcQpbFS KaUna3CK7A8An+Jq/kpIiLVLvWoqJQaEHwGheuFxCVw1VD2c4MdVBX8Mm/bGyRXoyTkU KjMA== X-Gm-Message-State: AOAM531uxWjBmcr2t4o9JqEzizT/g/ElA8AJq8g7QDqEvmk/XJZN+obc V8dCngzYVw9PTjxTQV16+XLdsQ== X-Received: by 2002:a17:90b:38c6:: with SMTP id nn6mr8039311pjb.246.1634836174380; Thu, 21 Oct 2021 10:09:34 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id y13sm6032193pgc.46.2021.10.21.10.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 10:09:34 -0700 (PDT) Date: Thu, 21 Oct 2021 10:09:33 -0700 From: Kees Cook To: Peter Zijlstra Cc: Mark Rutland , Shuah Khan , Alexey Dobriyan , linux-kselftest@vger.kernel.org, Josh Poimboeuf , Andrew Morton , Alexey Gladkov , jannh@google.com, vcaputo@pengaru.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, christian.brauner@ubuntu.com, amistry@google.com, Kenta.Tada@sony.com, legion@kernel.org, michael.weiss@aisec.fraunhofer.de, mhocko@suse.com, deller@gmx.de, zhengqi.arch@bytedance.com, me@tobin.cc, tycho@tycho.pizza, tglx@linutronix.de, bp@alien8.de, hpa@zytor.com, axboe@kernel.dk, metze@samba.org, laijs@linux.alibaba.com, luto@kernel.org, dave.hansen@linux.intel.com, ebiederm@xmission.com, ohoono.kwon@samsung.com, kaleshsingh@google.com, yifeifz2@illinois.edu, linux-arch@vger.kernel.org, vgupta@kernel.org, linux@armlinux.org.uk, will@kernel.org, guoren@kernel.org, bcain@codeaurora.org, monstr@monstr.eu, tsbogend@alpha.franken.de, nickhu@andestech.com, jonas@southpole.se, mpe@ellerman.id.au, paul.walmsley@sifive.com, hca@linux.ibm.com, ysato@users.sourceforge.jp, davem@davemloft.net, chris@zankel.net, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] selftests: proc: Make sure wchan works when it exists Message-ID: <202110211008.CC8B26A@keescook> References: <20211008235504.2957528-1-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211008235504.2957528-1-keescook@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 08, 2021 at 04:55:04PM -0700, 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": > > $ tools/testing/selftests/proc/proc-pid-wchan > ok: found 'sleep' in wchan 'hrtimer_nanosleep' > > Cc: Peter Zijlstra > Cc: Mark Rutland > Cc: Shuah Khan > Cc: Alexey Dobriyan > Cc: linux-kselftest@vger.kernel.org > Signed-off-by: Kees Cook Friendly ping. > --- > Hi Peter, > > Can you add this to the wchan series, please? This should help wchan from > regressing in the future, and allow us to notice if the depth accidentally > changes, like Mark saw. > --- I'd like to make sure we have a regression test for this. Will you add this to the wchan series please? -Kees -- Kees Cook