Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1094851pxb; Thu, 23 Sep 2021 18:18:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzP62Qo571T4nqJxwYpfCNAOzl156PoUC2oe/reXWG8XVhsf4lN5AOVAaMYxlryG4NJhMd X-Received: by 2002:a6b:7b4a:: with SMTP id m10mr6369953iop.125.1632446311972; Thu, 23 Sep 2021 18:18:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632446311; cv=none; d=google.com; s=arc-20160816; b=YHAGfy4OE+wNnzRemN3FRc/jP71EjzB0gGs1taScjk6ge70ex5yKqWVYO1jiuFzo5Y JePM4EkUKd9CCRY4uTg+4o8wiN/RDg6ZwmEL6uw+u81nW0Atc/Fuq9hYCCPUa1zitJ7G t8Zy8D/oJnji4bDaea05j7Q6ZKuljBY37wow0545/oAz/4TGBzIA03/h1DEt+GPWQN8D 3lZmC07fHAXU5GRGlz89xr17IwbL6dxE3OCP4xNeJqJOhpgChw462oHSkYT1m8dWpuRZ tizvbETVLEkAmVxoohcnhlSIcUEDclKTH0p1R8A6nutJmm9iMyWdktfwaFUGrFhTSINz siUA== 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=w5B8w4boy04cb2C9FnPWt5iQ9AQtwNvlUApWzI3TT6E=; b=x3urfrszoOpdmLq7Cd1FHg4HfSgcztY2xcuACx6PuuKLk3rftfc94NTE3KmZiM3lrf bq5OXPI7SMRwTsZyu9DRCeMWppD7xwIbMfYe48MUCSzDX4olfmQ+5NZniiF7sZsPHlER 3ziKwDmELCqRdli3cmW5rnZLhjr1vFD2IiaUM2Mk21gLQXuKhM8XOtkNQRzXX3JKRZzZ QHbz6mETRj8c7UOG6EFio0FBjOS8j6DPc92OXd++0UwC7uv9msifn5w1NL54KtzKXVxl ionicUNHczaSEa2tMXnff7akKPsiW17Xve3YS6VeQozy+e1S9ktPPbgONoYrs/C9mDWa PWYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="fk/zXO6A"; 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 i9si7737403ilc.6.2021.09.23.18.18.18; Thu, 23 Sep 2021 18:18:31 -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="fk/zXO6A"; 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 S243733AbhIXBRv (ORCPT + 99 others); Thu, 23 Sep 2021 21:17:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240863AbhIXBRv (ORCPT ); Thu, 23 Sep 2021 21:17:51 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEEDAC061574 for ; Thu, 23 Sep 2021 18:16:18 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id j15so3785665plh.7 for ; Thu, 23 Sep 2021 18:16:18 -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=w5B8w4boy04cb2C9FnPWt5iQ9AQtwNvlUApWzI3TT6E=; b=fk/zXO6APsjQP2fh5wykxBplb9piOvz3CNMHFIPkMPwFt20Rurof4KpK+RCED8KfWg awr2VaO0bwCNMi6PCTnWMa1XeV3bxdLEGfMljXtedJWuUaehsap1a9+fq0dBtHOHqhrd VG1ySMWoZXdd4KZu0XVMzt+HO6rkK8NokbFFE= 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=w5B8w4boy04cb2C9FnPWt5iQ9AQtwNvlUApWzI3TT6E=; b=cQbwJqaceDIYhb14qtgsSEjSR9/5HFhoarQ9wXoyxU93aqEh065eekLtdjFUYqFCyG 8l20QOq67N6BC9a3Yg7aKOOAipZO8sswD+GuUlUBp22l5zr/2xW2nMQ5bvoHgvW+7Yf8 1mkKslsalEOdKQznj8liEYSyuK/sGapcCpEroBJ8x10W14DjK8gcDdb+Tg5155oOR3Kq qXbiiiZpGdFZyHx3vh0rDWS7QUfeX9j85VClBP9gzr8wg3qqz7FtgJFa10K22m5xiom7 hVshrYw0ODJUGFiyrEImPPII8sqH9I5ACf2LUGMkUMTmCT/kzWva96WCAUJ7LnWumw1+ 3mDw== X-Gm-Message-State: AOAM533ahjquK5yJlUyxVvg0ru/yXMydVAd2UwhuRWMnSSxDvKFkDdHv nYbpcfGj2oUy4kwAnnoeRCrYiA== X-Received: by 2002:a17:902:e153:b0:13b:63ba:7288 with SMTP id d19-20020a170902e15300b0013b63ba7288mr6270393pla.33.1632446178067; Thu, 23 Sep 2021 18:16:18 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id e14sm6519648pfv.127.2021.09.23.18.16.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Sep 2021 18:16:17 -0700 (PDT) Date: Thu, 23 Sep 2021 18:16:16 -0700 From: Kees Cook To: Vito Caputo Cc: Jann Horn , Thomas Gleixner , Josh Poimboeuf , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Jens Axboe , Mark Rutland , Peter Zijlstra , Stefan Metzmacher , Andy Lutomirski , Lai Jiangshan , Christian Brauner , Andrew Morton , "Kenta.Tada@sony.com" , Daniel Bristot de Oliveira , Michael =?iso-8859-1?Q?Wei=DF?= , Anand K Mistry , Alexey Gladkov , Michal Hocko , Helge Deller , Dave Hansen , Andrea Righi , Ohhoon Kwon , Kalesh Singh , YiFei Zhu , "Eric W. Biederman" , linux-kernel@vger.kernel.org, x86@kernel.org, linux-fsdevel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] proc: Disable /proc/$pid/wchan Message-ID: <202109231814.FD09DBAD3@keescook> References: <20210923233105.4045080-1-keescook@chromium.org> <20210923234917.pqrxwoq7yqnvfpwu@shells.gnugeneration.com> <20210924002230.sijoedia65hf5bj7@shells.gnugeneration.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210924002230.sijoedia65hf5bj7@shells.gnugeneration.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 23, 2021 at 05:22:30PM -0700, Vito Caputo wrote: > Instead of unwinding stacks maybe the kernel should be sticking an > entrypoint address in the current task struct for get_wchan() to > access, whenever userspace enters the kernel? wchan is supposed to show where the kernel is at the instant the get_wchan() happens. (i.e. recording it at syscall entry would just always show syscall entry.) -- Kees Cook