From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A30D5C4829A for ; Tue, 13 Feb 2024 22:46:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3757E8D0019; Tue, 13 Feb 2024 17:46:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 326088D0001; Tue, 13 Feb 2024 17:46:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A0C98D0019; Tue, 13 Feb 2024 17:46:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 08E548D0001 for ; Tue, 13 Feb 2024 17:46:16 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id DDBCB1C158C for ; Tue, 13 Feb 2024 22:46:15 +0000 (UTC) X-FDA: 81788265510.17.F4DE07F Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf05.hostedemail.com (Postfix) with ESMTP id 3C723100010 for ; Tue, 13 Feb 2024 22:46:13 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf05.hostedemail.com: domain of "SRS0=4RJB=JW=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=4RJB=JW=goodmis.org=rostedt@kernel.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707864373; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m62O428pDtswNs+TJOBUHcO2zhmjFZMBSPfQGCfQJa8=; b=yGzzEarYJaW3xS/QsoN7dPERZBNC3rpokoWKD2Ovw78PV8RbKg+/2l9b8wygR6hZwfhcyq ndP+Uy0svHjYteS+ucGWKc8C9es6cXSd1e67RhBK4TeebRFTJ86wDanX18q5XQYNZMOZlw Uon0IpRVSMt4viAMpaRoRgcQE3K+8W4= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf05.hostedemail.com: domain of "SRS0=4RJB=JW=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=4RJB=JW=goodmis.org=rostedt@kernel.org" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707864373; a=rsa-sha256; cv=none; b=GKFELYm9xFQxLA9+nFRgwiGJcuwm8cKV07Iqt+5ZuPy0hq3WotyvZ5D1FpImM747gQb+O4 K4nuHuaUfH1+lvjREoOdPG3ImYQbrO/6pSCC9meg/I48Y7GEb+4LpLwa3uBxTVu2QJbpgm MGhY1ebQ3/sO5+M26nPw65PS6blN2+s= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E2B1661721; Tue, 13 Feb 2024 22:46:11 +0000 (UTC) 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) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 3C723100010 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: jqw6wxbzsspm95jmy4nqe9t4smaehh6a X-HE-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mqNVay3AL7vinFWmTTH3uhbmbgrdgyh4dx8yUZU4E0260nvsEmI+NX0xS6vVS7MXZKv63XhhjFSjdNFtiGbPdo4BgW8REcKeDviI/g1rEgZxrXlg5Jb/HIYmaKwNl7/3gzrj2pyAnf1TI7WwK7pjHrvW5wWvwKMuGgx7cqBUH6+MhqkcgSlaiDwKrk1rtOUgwj0co4AcS1kUcudUwjJHs7Es7b8pvtZqf/324eo0MrYKEyAiBEuYY7Z4F0UbaI8aDLZdTlag4J2Z9owbBywDN/jbrncdjE5oHqXYNmwFVE6umILOZpreMskoKV0Z0PQL/rapt/99ZBKg9 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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