Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp227967rdh; Tue, 13 Feb 2024 15:17:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW3NtqQpmF/rxNolKkqrXdjgbAjHhkT0e3+HO4W+wtb0KNbC9tH5RqgwPp+nnI2IgsTwJVa0SEc2w+Ib0nyMMXF5UKYWmFH+XcUeBksVg== X-Google-Smtp-Source: AGHT+IHPnaQG9zMqOXmYIE0hVJqgcksH82D94nrTl0dC8zXQgru7iHWLN6a4QPLJ39n722NH5S5o X-Received: by 2002:a05:6a20:9d90:b0:19e:a19f:f4de with SMTP id mu16-20020a056a209d9000b0019ea19ff4demr1092154pzb.41.1707866265944; Tue, 13 Feb 2024 15:17:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707866265; cv=pass; d=google.com; s=arc-20160816; b=K4iub2y/CIQc1iZqunK2Abj2D+LiiqQt4TJZV4J4+QoJLqq1FfG1Ncto68CH1YV3TF lGj/hvKx8IzrmHA5EybWvnUnr3FKVPFz3KD0eIKW0DGDgB6Srzr/sV46DivSOzS47UUA oSpB9lIlNbtmsyDH2RRD9w/kKllBZRrMgChpm5rRoRnIETrtZSjKc+BM4mzXyiPa75jg qcwqdF0Z6lsZkp9Yw87YimWLF2TNYPinvk3uNCFvSK04rV9sHmMC5Lqjc86J9cHUuqUw p1Y68UIzFHCRcIHDusAYmMSdBZbqWuUe2qpEBLouN8qCX+oblHEW5WI3gdgH8A7mUO24 /79g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=m62O428pDtswNs+TJOBUHcO2zhmjFZMBSPfQGCfQJa8=; fh=CNSToaSK+jsSuJIHro5Yk+HqVXhkzxKZG2SM7b2q0pc=; b=pSf7Cbqq7bFgbvK5elSZQFR2rcBwXR8fHfpmia3qbqPQZsFKk/qr6WbFpZgsJp94SN Z36Lc1wP3gN+t0EHa3SSGJ8TSyCYuL53lJ/O53VB0XOCoo9q5/tFQa9aXgHOkhs+K4AV a7OzDyLMP0DvqWBE4CjHWHlmLnpsarWqcTtKFbyqn5PRpdwUbf5UOwPRYXxA2xAhob5/ lgc2uXGKYpzIQ4T6fqAb3KAiQ/BQZwFs+SK59rurSPlz/FFZgzRdA7DHLbUbB/9oCN8z Keex95WgHOQPWd3K4C+Gj0DWnzquH81vwBoi33UfXdzz9PXsBdrNvHCQ+691RRN05dMG 8RTA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-64480-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64480-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXese2khbFpNmdJrOU3Sw/qTn4xycLkI/0VI9UgWBbR7uoRbuBIl2WV34HVIOmVya5fca+NahnqHrY/MaJ3xJDb7BKZCdcq6UF7iW+wcQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x32-20020a056a0018a000b006dbe30aeb1dsi7502893pfh.112.2024.02.13.15.17.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 15:17:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64480-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-64480-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64480-linux.lists.archive=gmail.com@vger.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C5BCEB28E16 for ; Tue, 13 Feb 2024 22:46:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A810D62818; Tue, 13 Feb 2024 22:46:12 +0000 (UTC) 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 075DA626B2; Tue, 13 Feb 2024 22:46:11 +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=1707864372; cv=none; b=uFfAUCfKb1k+vMYIpdbZofbIhyvzVzcovZRkfuwhkj8PwIvdg/jhM4KxIlOMYPi8i98pu9kRtHUz+LrSTSqv4vj7iGs8YmdWKJZWNQxHuwp8lJIExNP6htXT2eVkH8RyBI5KfFOXp2bVyr9dIMLqX7Ks1veUa2CIlhPySusbgKk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707864372; c=relaxed/simple; bh=6AWrD9fLn9rIoWsfdQ1zN/JM/sKG+z0lxc9s0V1f1BY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=K2L2GgG5UXbunjvUu53WSY3kBT4M1pNs7CWMYUv5/4CXZ9oFFgfgHlr30XzzZiXNhovAWcEivwrIl3J42LMBLVy6E0T8zR+WXp/9bEdqbxeV7sEMkGhvLgnEIEUb/NeWb2QacjiR7i8+2XL5vOcM4/wdBQlEsWLJJero2/+71fA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29488C433C7; Tue, 13 Feb 2024 22:46:04 +0000 (UTC) Date: Tue, 13 Feb 2024 17:47:33 -0500 From: Steven Rostedt To: Kees Cook Cc: Suren Baghdasaryan , "Darrick J. Wong" , akpm@linux-foundation.org, kent.overstreet@linux.dev, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, ndesaulniers@google.com, vvvvvv@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org Subject: Re: [PATCH v3 13/35] lib: add allocation tagging support for memory allocation profiling Message-ID: <20240213174733.086b2e3e@gandalf.local.home> In-Reply-To: <202402131436.2CA91AE@keescook> References: <20240212213922.783301-1-surenb@google.com> <20240212213922.783301-14-surenb@google.com> <202402121433.5CC66F34B@keescook> <20240213222859.GE6184@frogsfrogsfrogs> <202402131436.2CA91AE@keescook> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Tue, 13 Feb 2024 14:38:16 -0800 Kees Cook wrote: > > > Save yourself a cycle of "rework the whole fs interface only to have > > > someone else tell you no" and put it in debugfs, not sysfs. Wrangling > > > with debugfs is easier than all the macro-happy sysfs stuff; you don't > > > have to integrate with the "device" model; and there is no 'one value > > > per file' rule. > > > > Thanks for the input. This file used to be in debugfs but reviewers > > felt it belonged in /proc if it's to be used in production > > environments. Some distros (like Android) disable debugfs in > > production. > > FWIW, I agree debugfs is not right. If others feel it's right in /proc, > I certainly won't NAK -- it's just been that we've traditionally been > trying to avoid continuing to pollute the top-level /proc and instead > associate new things with something in /sys. You can create your own file system, but I would suggest using kernfs for it ;-) If you look in /sys/kernel/ you'll see a bunch of kernel file systems already there: ~# mount |grep kernel securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime) tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime) configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime) -- Steve