From: Christian Brauner <brauner@kernel.org>
To: linux-fsdevel@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Jann Horn <jannh@google.com>, Josef Bacik <josef@toxicpanda.com>,
Chris Mason <mason@kernel.org>, Jeff Layton <jlayton@kernel.org>,
NeilBrown <neil@brown.name>, Eric Dumazet <edumazet@kernel.org>,
Thomas Gleixner <tglx@kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
Jonathan Corbet <corbet@lwn.net>, Christoph Hellwig <hch@lst.de>,
Greg Kroah-Hartman <gregkh@suse.de>,
Joel Granados <joel.granados@kernel.org>,
Kees Cook <kees@kernel.org>, Jan Kara <jack@suse.cz>,
Jan Kara <jack@suse.com>,
linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org,
linux-acpi@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-um@lists.infradead.org, linux-wireless@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org,
ntfs3@lists.linux.dev, platform-driver-x86@vger.kernel.org,
coreteam@netfilter.org, kexec@lists.infradead.org,
linux-pci@vger.kernel.org, linux-sound@vger.kernel.org,
netfilter-devel@vger.kernel.org,
dri-devel@lists.freedesktop.org,
ibm-acpi-devel@lists.sourceforge.net,
jfs-discussion@lists.sourceforge.net,
linux-alpha@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-cifs@vger.kernel.org, linux-fbdev@vger.kernel.org,
linux-hwmon@vger.kernel.org, linux-mm@kvack.org,
linux-sh@vger.kernel.org, linux-usb@vger.kernel.org,
samba-technical@lists.samba.org, sparclinux@vger.kernel.org,
linux-m68k@lists.linux-m68k.org, linux-doc@vger.kernel.org,
linux-serial@vger.kernel.org,
linux-atm-general@lists.sourceforge.net,
Takashi Iwai <tiwai@suse.de>,
linux-input@vger.kernel.org, linux-raid@vger.kernel.org,
linux-ext4@vger.kernel.org, linux-modules@vger.kernel.org,
linux-debuggers@vger.kernel.org,
"Christian Brauner (Amutable)" <brauner@kernel.org>,
Chuck Lever <cel@kernel.org>
Subject: [PATCH RFC 04/16] proc: let procfs own the seq_file of seq_file entries
Date: Mon, 02 Nov 2026 15:48:44 +0100 [thread overview]
Message-ID: <20261102-work-procfs-core-v1-4-75df35e4f8b8@kernel.org> (raw)
In-Reply-To: <20261102-work-procfs-core-v1-0-75df35e4f8b8@kernel.org>
remove_proc_entry() waits until every call into the entry has returned.
For a seq_file entry that's all of seq_read_iter(), including the copy
to userspace. A page fault in that copy can be made to take as long as
the reader wants, e.g. with userfaultfd or by punching holes into a
memfd over and over. And callers of remove_proc_entry() like to hold
locks while they wait. xt_hashlimit holds hashlimit_mutex, which all
network namespaces share, and addrconf holds RTNL.
But the entry's code only runs between ->start() and ->stop() and the
copies to userspace happen outside of that. So let procfs own the
seq_file the way kernfs does. An entry declares its seq_operations, or
just a show function, and the size of its private state in struct
proc_ops. procfs then opens the seq_file with seq_operations of its own
that pin the entry around every call into the entry, and reads and
seeks through seq_file directly. The copies to userspace happen with
the entry unpinned.
That changes who owns the seq_file. remove_proc_entry() can now finish
while a reader is still copying out of the buffer, so the seq_file
can't go away with the entry. procfs frees it once the file is
released. ->proc_open() finds the seq_file in ->private_data and sets
up whatever the entry needs and ->proc_release() releases just that. It
still runs when the entry is removed, or when the file is closed before
that.
Since procfs reads these entries through seq_read_iter() itself they
all have ->splice_read() now, so sendfile(), splice(), aio, the RWF
flags and kernel_read() work on them, and readv() is one read instead
of one per segment. Note that a removed entry still hands out what it
had already formatted and then answers -EIO to reads, and to seeks that
have to walk the records. Seeking it failed with -EINVAL right away
before.
The seq_operations of procfs serve both kinds of entries. For an entry
that only has a show function they do what single_open() does, like
kernfs_seq_start(). seq_file's complaint about a ->next() that doesn't
move the position would name procfs' wrapper, so the wrapper checks
that itself and names the entry's. An entry that declares a seq_file
and also a read or seek method of its own, or one that releases the
seq_file with seq_release() itself, doesn't make sense, procfs reads,
seeks and releases the seq_file itself, so registering it fails.
No users yet.
Suggested-by: Jann Horn <jannh@google.com>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
---
fs/proc/generic.c | 36 +++++++++--
fs/proc/inode.c | 167 ++++++++++++++++++++++++++++++++++++++++++++----
fs/proc/internal.h | 16 +++++
include/linux/proc_fs.h | 22 ++++++-
4 files changed, 219 insertions(+), 22 deletions(-)
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 761f9958558f..eff5c38e2219 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -434,19 +434,41 @@ static const struct inode_operations proc_dir_inode_operations = {
.setattr = proc_setattr,
};
-static void pde_set_flags(struct proc_dir_entry *pde)
+static int pde_set_flags(struct proc_dir_entry *pde)
{
const struct proc_ops *proc_ops = pde->proc_ops;
if (!proc_ops)
- return;
+ return 0;
if (proc_ops->proc_flags & PROC_ENTRY_PERMANENT)
pde->flags |= PROC_ENTRY_PERMANENT;
- if (proc_ops->proc_read_iter)
- pde->flags |= PROC_ENTRY_proc_read_iter;
- if (proc_ops->proc_lseek)
+ if (proc_ops->proc_seq_ops) {
+ pde->seq_ops = proc_ops->proc_seq_ops;
+ pde->state_size = proc_ops->proc_state_size;
+ pde->flags |= PROC_ENTRY_proc_seq_ops;
+ } else if (proc_ops->proc_show) {
+ pde->single_show = proc_ops->proc_show;
+ pde->flags |= PROC_ENTRY_proc_show;
+ }
+ if (pde_is_seq_file(pde)) {
+ /* procfs reads and seeks through the seq_file itself */
+ if (WARN_ON_ONCE(proc_ops->proc_read || proc_ops->proc_read_iter ||
+ proc_ops->proc_lseek))
+ return -EINVAL;
+ /* and frees it, see pde_seq_release() */
+ if (WARN_ON_ONCE(proc_ops->proc_release == seq_release ||
+ proc_ops->proc_release == seq_release_private ||
+ proc_ops->proc_release == single_release))
+ return -EINVAL;
pde->flags |= PROC_ENTRY_proc_lseek;
+ } else {
+ if (proc_ops->proc_read_iter)
+ pde->flags |= PROC_ENTRY_proc_read_iter;
+ if (proc_ops->proc_lseek)
+ pde->flags |= PROC_ENTRY_proc_lseek;
+ }
+ return 0;
}
/* returns the registered entry, or frees dp and returns NULL on failure */
@@ -456,8 +478,8 @@ struct proc_dir_entry *proc_register(struct proc_dir_entry *dir,
if (proc_alloc_inum(&dp->low_ino))
goto out_free_entry;
- if (!S_ISDIR(dp->mode))
- pde_set_flags(dp);
+ if (!S_ISDIR(dp->mode) && pde_set_flags(dp))
+ goto out_free_inum;
write_lock(&proc_subdir_lock);
dp->parent = dir;
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 66a3688757dd..8425465aae5d 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -218,6 +218,110 @@ static void pde_unpin(struct proc_dir_entry *pde)
unuse_pde(pde);
}
+/*
+ * procfs owns the seq_file of a seq_file entry and only calls into the entry
+ * with it pinned. A read copies to userspace without the pin, so a reader
+ * that faults on its buffer doesn't hold up remove_proc_entry().
+ *
+ * An entry that only has a show function is iterated like single_open() does
+ * it, see kernfs_seq_start().
+ *
+ * Like ERR_PTR(-ENODEV) in kernfs_seq_start(), ERR_PTR(-EIO) means the entry
+ * isn't pinned. If the entry returns it itself, it is unpinned right away.
+ */
+static struct proc_dir_entry *seq_pde(struct seq_file *m)
+{
+ return PDE(file_inode(m->file));
+}
+
+static void pde_seq_stop_pinned(struct seq_file *m, void *v)
+{
+ struct proc_dir_entry *pde = seq_pde(m);
+
+ if (pde_has_proc_seq_ops(pde))
+ pde->seq_ops->stop(m, v);
+ pde_unpin(pde);
+}
+
+static void *pde_seq_start(struct seq_file *m, loff_t *pos)
+{
+ struct proc_dir_entry *pde = seq_pde(m);
+ void *v;
+
+ if (!pde_pin(pde))
+ return ERR_PTR(-EIO);
+ if (!pde_has_proc_seq_ops(pde))
+ return single_start(m, pos);
+ v = pde->seq_ops->start(m, pos);
+ if (v == ERR_PTR(-EIO))
+ pde_seq_stop_pinned(m, v);
+ return v;
+}
+
+static void *pde_seq_next(struct seq_file *m, void *v, loff_t *pos)
+{
+ struct proc_dir_entry *pde = seq_pde(m);
+ loff_t old = *pos;
+
+ if (!pde_has_proc_seq_ops(pde)) {
+ ++*pos;
+ return NULL;
+ }
+ v = pde->seq_ops->next(m, v, pos);
+ if (v == ERR_PTR(-EIO))
+ pde_seq_stop_pinned(m, v);
+ /* seq_file would blame these seq_operations, blame the entry's */
+ if (*pos == old) {
+ pr_info_ratelimited("buggy .next function %ps did not update position index\n",
+ pde->seq_ops->next);
+ ++*pos;
+ }
+ return v;
+}
+
+static void pde_seq_stop(struct seq_file *m, void *v)
+{
+ if (v != ERR_PTR(-EIO))
+ pde_seq_stop_pinned(m, v);
+}
+
+static int pde_seq_show(struct seq_file *m, void *v)
+{
+ struct proc_dir_entry *pde = seq_pde(m);
+
+ if (pde_has_proc_seq_ops(pde))
+ return pde->seq_ops->show(m, v);
+ return pde->single_show(m, v);
+}
+
+static const struct seq_operations pde_seq_ops = {
+ .start = pde_seq_start,
+ .next = pde_seq_next,
+ .stop = pde_seq_stop,
+ .show = pde_seq_show,
+};
+
+static int pde_seq_open(struct proc_dir_entry *pde, struct file *file)
+{
+ int err;
+
+ if (pde->state_size)
+ return seq_open_private(file, &pde_seq_ops, pde->state_size);
+ err = seq_open(file, &pde_seq_ops);
+ if (!err && pde_has_proc_show(pde))
+ ((struct seq_file *)file->private_data)->private = pde->data;
+ return err;
+}
+
+static void pde_seq_release(struct proc_dir_entry *pde, struct inode *inode,
+ struct file *file)
+{
+ if (pde->state_size)
+ seq_release_private(inode, file);
+ else
+ seq_release(inode, file);
+}
+
/*
* At most 2 contexts can enter this function: the one doing the last
* close on the descriptor and whoever is deleting PDE itself.
@@ -474,22 +578,35 @@ static unsigned int proc_reg_mmap_capabilities(struct file *file)
}
#endif
+static int pde_open(struct proc_dir_entry *pde, struct inode *inode,
+ struct file *file)
+{
+ const auto open = pde->proc_ops->proc_open;
+ int rv;
+
+ if (!pde_is_seq_file(pde))
+ return open ? open(inode, file) : 0;
+
+ rv = pde_seq_open(pde, file);
+ if (rv || !open)
+ return rv;
+ rv = open(inode, file);
+ if (rv)
+ pde_seq_release(pde, inode, file);
+ return rv;
+}
+
static int proc_reg_open(struct inode *inode, struct file *file)
{
struct proc_dir_entry *pde = PDE(inode);
int rv = 0;
- typeof_member(struct proc_ops, proc_open) open;
struct pde_opener *pdeo;
if (!pde_has_proc_lseek(pde))
file->f_mode &= ~FMODE_LSEEK;
- if (pde_is_permanent(pde)) {
- open = pde->proc_ops->proc_open;
- if (open)
- rv = open(inode, file);
- return rv;
- }
+ if (pde_is_permanent(pde))
+ return pde_open(pde, inode, file);
/*
* Ensure that
@@ -514,9 +631,7 @@ static int proc_reg_open(struct inode *inode, struct file *file)
}
}
- open = pde->proc_ops->proc_open;
- if (open)
- rv = open(inode, file);
+ rv = pde_open(pde, inode, file);
if (release) {
if (rv == 0) {
@@ -544,21 +659,43 @@ static int proc_reg_release(struct inode *inode, struct file *file)
if (pde_is_permanent(pde)) {
const auto release = pde->proc_ops->proc_release;
if (release)
- return release(inode, file);
- return 0;
+ release(inode, file);
+ goto out;
}
spin_lock(&pde->pde_unload_lock);
list_for_each_entry(pdeo, &pde->pde_openers, lh) {
if (pdeo->file == file) {
close_pdeo(pde, pdeo);
- return 0;
+ goto out;
}
}
spin_unlock(&pde->pde_unload_lock);
+out:
+ /* ->proc_release() has run, here or in remove_proc_entry() */
+ if (pde_is_seq_file(pde))
+ pde_seq_release(pde, inode, file);
return 0;
}
+/* For seq_file entries, see pde_seq_ops. */
+static const struct file_operations proc_seq_file_ops = {
+ .llseek = seq_lseek,
+ .read_iter = seq_read_iter,
+ .splice_read = copy_splice_read,
+ .write = proc_reg_write,
+ .poll = proc_reg_poll,
+ .unlocked_ioctl = proc_reg_unlocked_ioctl,
+ .compat_ioctl = proc_reg_compat_ioctl,
+ .mmap = proc_reg_mmap,
+ .get_unmapped_area = proc_reg_get_unmapped_area,
+#ifndef CONFIG_MMU
+ .mmap_capabilities = proc_reg_mmap_capabilities,
+#endif
+ .open = proc_reg_open,
+ .release = proc_reg_release,
+};
+
static const struct file_operations proc_reg_file_ops = {
.llseek = proc_reg_llseek,
.read = proc_reg_read,
@@ -642,7 +779,9 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
if (S_ISREG(inode->i_mode)) {
inode->i_op = de->proc_iops;
- if (pde_has_proc_read_iter(de))
+ if (pde_is_seq_file(de))
+ inode->i_fop = &proc_seq_file_ops;
+ else if (pde_has_proc_read_iter(de))
inode->i_fop = &proc_iter_file_ops;
else
inode->i_fop = &proc_reg_file_ops;
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index 41e00c978ddd..d8093451524a 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -97,6 +97,22 @@ static inline bool pde_has_proc_lseek(const struct proc_dir_entry *pde)
return pde->flags & PROC_ENTRY_proc_lseek;
}
+static inline bool pde_has_proc_seq_ops(const struct proc_dir_entry *pde)
+{
+ return pde->flags & PROC_ENTRY_proc_seq_ops;
+}
+
+static inline bool pde_has_proc_show(const struct proc_dir_entry *pde)
+{
+ return pde->flags & PROC_ENTRY_proc_show;
+}
+
+/* procfs owns the seq_file, see pde_seq_ops */
+static inline bool pde_is_seq_file(const struct proc_dir_entry *pde)
+{
+ return pde_has_proc_seq_ops(pde) || pde_has_proc_show(pde);
+}
+
extern struct kmem_cache *proc_dir_entry_cache;
void pde_free(struct proc_dir_entry *pde);
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 6ad5150020bf..ea55ed85a2d6 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -27,6 +27,8 @@ enum {
PROC_ENTRY_proc_read_iter = 1U << 1,
PROC_ENTRY_proc_lseek = 1U << 3,
+ PROC_ENTRY_proc_seq_ops = 1U << 4,
+ PROC_ENTRY_proc_show = 1U << 5,
PROC_ENTRY_FORCE_LOOKUP = 1U << 7,
};
@@ -37,7 +39,10 @@ struct proc_ops {
ssize_t (*proc_read)(struct file *, char __user *, size_t, loff_t *);
ssize_t (*proc_read_iter)(struct kiocb *, struct iov_iter *);
ssize_t (*proc_write)(struct file *, const char __user *, size_t, loff_t *);
- /* mandatory unless nonseekable_open() or equivalent is used */
+ /*
+ * mandatory unless nonseekable_open() or equivalent is used, procfs
+ * seeks seq_file entries itself
+ */
loff_t (*proc_lseek)(struct file *, loff_t, int);
int (*proc_release)(struct inode *, struct file *);
__poll_t (*proc_poll)(struct file *, struct poll_table_struct *);
@@ -47,6 +52,21 @@ struct proc_ops {
#endif
int (*proc_mmap)(struct file *, struct vm_area_struct *);
unsigned long (*proc_get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
+ /*
+ * For seq_file entries procfs opens the seq_file, reads and seeks
+ * through it and frees it once the file is released. ->proc_open()
+ * finds the seq_file in ->private_data and ->proc_release() only
+ * releases what ->proc_open() set up. It can run while a reader still
+ * copies out of the seq_file, so it must leave that alone. procfs
+ * allocates ->proc_state_size bytes of ->private state for
+ * ->proc_seq_ops and points ->private at the entry's data for
+ * ->proc_show(). Nothing that runs with the entry pinned may wait for
+ * something a copy to or from userspace can hold, like the seq_file's
+ * lock.
+ */
+ const struct seq_operations *proc_seq_ops;
+ int (*proc_show)(struct seq_file *, void *);
+ unsigned int proc_state_size;
} __randomize_layout;
/* definitions for hide_pid field */
--
2.53.0
next prev parent reply other threads:[~2026-11-02 14:50 UTC|newest]
Thread overview: 156+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 14:19 [PATCH RFC 0/7] proc: move procfs to what kernfs does Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 00/38] proc: fix a few old bugs in /proc handlers Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 01/38] PCI/proc: don't truncate the position of config space accesses Christian Brauner
2026-11-02 17:58 ` Linus Torvalds
2026-11-02 14:21 ` [PATCH RFC 02/38] PNP: isapnp: don't read past the end of the buffer on a large pread() Christian Brauner
2026-11-02 14:51 ` Rafael J. Wysocki (Intel)
2026-11-02 14:21 ` [PATCH RFC 03/38] netfilter: xt_recent: don't remove the proc entries under a spinlock Christian Brauner
2026-11-02 14:41 ` Florian Westphal
2026-11-02 14:21 ` [PATCH RFC 04/38] s390/dasd: don't look in front of the buffer on an empty write Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 05/38] platform/x86: toshiba_acpi: reject malformed brightness and fan writes Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 06/38] xtensa: simdisk: don't read the file name without the lock Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 07/38] powerpc/rtas_flash: don't read past the validate message Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 08/38] powerpc/rtasd: zero the error log buffer Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 09/38] ALSA: info: don't write past the end of a data entry Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 10/38] scsi: BusLogic: don't return 0 from writes to the proc file Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 11/38] scsi: ips: " Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 12/38] wifi: libipw: don't return 0 from writes to debug_level Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 13/38] scsi: core: NUL-terminate what is written to the host proc files Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 14/38] um: NUL-terminate what is written to /proc/exitcode Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 15/38] ntfs3: don't warn when a huge label is written Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 16/38] proc: don't walk through a non-directory when resolving a name Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 17/38] net: pktgen: reject device names with a '/' Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 18/38] proc: don't WARN about a name that is already registered Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 19/38] proc: resume readdir after the last name it returned Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 20/38] selftests/proc: check a /proc listing while entries come and go Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 21/38] proc: let proc_remove() remove the entry it was given Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 22/38] proc: warn about entries left in /proc/net of a dying namespace Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 23/38] proc: don't let NOMMU map procfs files Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 24/38] proc/vmcore: don't let vmcore_cleanup() run twice at once Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 25/38] powerpc/crash_dump: check ioremap_cache() in copy_oldmem_page() Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 26/38] powerpc/crash_dump: recover from a machine check " Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 27/38] sunrpc: make queue_wait a global wait queue again Christian Brauner
2026-11-02 15:12 ` Chuck Lever
2026-11-02 14:21 ` [PATCH RFC 28/38] scsi: esas2r: bound the lengths of the HBA, SMP and firmware ioctls Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 29/38] powerpc/pseries: bound the lengths in the ofdt property parser Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 30/38] powerpc/pseries/lparcfg: return h_get_ppp()'s status as a long Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 31/38] proc: sysctl: resume readdir after the last name it returned Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 32/38] selftests/proc: check a sysctl listing while entries come and go Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 33/38] proc: sysctl: copy to and from userspace without holding the table Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 34/38] proc: sysctl: look at the table under sysctl_lock when creating an inode Christian Brauner
2026-11-02 14:21 ` [PATCH RFC 35/38] proc: sysctl: don't hold the tables while readdir copies to userspace Christian Brauner
2026-11-02 14:43 ` [PATCH RFC 36/38] selftests/proc: check that faulting sysctl accesses don't hold up removal Christian Brauner
2026-11-02 14:43 ` [PATCH RFC 37/38] proc: don't pin a symlink's entry while readlink() copies it out Christian Brauner
2026-11-02 14:43 ` [PATCH RFC 38/38] selftests/proc: check that a faulting readlink() doesn't hold up removal Christian Brauner
2026-11-02 14:48 ` [PATCH RFC 00/16] proc: let procfs own the data path Christian Brauner
2026-11-02 14:48 ` [PATCH RFC 01/16] proc: drop the compat file operations Christian Brauner
2026-11-02 14:48 ` [PATCH RFC 02/16] proc: add pde_pin() and pde_unpin() Christian Brauner
2026-11-02 14:48 ` [PATCH RFC 03/16] proc: make room for more entry flags Christian Brauner
2026-11-02 14:48 ` Christian Brauner [this message]
2026-11-02 14:48 ` [PATCH RFC 05/16] proc: let procfs own the seq_file of proc_create_seq() and friends Christian Brauner
2026-11-02 14:48 ` [PATCH RFC 06/16] proc: let procfs own the seq_file of DEFINE_PROC_SHOW_ATTRIBUTE() files Christian Brauner
2026-11-02 14:48 ` [PATCH RFC 07/16] treewide: let procfs own the seq_file of simple proc entries Christian Brauner
2026-11-02 14:48 ` [PATCH RFC 08/16] selftests/proc: check that a faulting reader doesn't hold up removal Christian Brauner
2026-11-02 14:48 ` [PATCH RFC 09/16] seq_file: add seq_preallocate() Christian Brauner
2026-11-02 14:48 ` [PATCH RFC 10/16] proc: let procfs own the seq_file of /proc/stat Christian Brauner
2026-11-02 14:48 ` [PATCH RFC 11/16] proc: let procfs copy in writes before pinning the entry Christian Brauner
2026-11-02 14:48 ` [PATCH RFC 12/16] proc: copy in writes to the network namespace entries before pinning Christian Brauner
2026-11-02 14:48 ` [PATCH RFC 13/16] proc: let procfs copy out reads that don't go through seq_file Christian Brauner
2026-11-02 14:48 ` [PATCH RFC 14/16] fs/proc/vmcore: let procfs copy out reads Christian Brauner
2026-11-02 14:48 ` [PATCH RFC 15/16] proc: let procfs copy ioctl arguments in and out Christian Brauner
2026-11-02 14:48 ` [PATCH RFC 16/16] Documentation: seq_file: describe how a /proc file uses seq_file Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 00/22] proc: convert the arch and platform entries Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 01/22] alpha: srm_env: let procfs copy in writes Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 02/22] ARM: alignment: " Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 03/22] ARM: atags: let procfs copy out reads of /proc/atags Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 04/22] m68k/bootinfo: let procfs copy out reads of /proc/bootinfo Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 05/22] powerpc/rtas: let procfs copy in writes Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 06/22] powerpc/rtas: let procfs copy out reads Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 07/22] powerpc/pseries: let procfs copy in writes Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 08/22] powerpc/procfs: let procfs copy out reads of /proc/powerpc/systemcfg Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 09/22] sh: alignment: let procfs copy in writes Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 10/22] sparc: led: " Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 11/22] um: " Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 12/22] x86/mtrr: let procfs own the seq_file of /proc/mtrr Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 13/22] x86/mtrr: let procfs copy in writes to /proc/mtrr Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 14/22] x86/mtrr: let procfs copy the ioctl arguments of /proc/mtrr Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 15/22] xtensa: simdisk: let procfs copy in writes Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 16/22] xtensa: simdisk: let procfs copy out reads Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 17/22] ACPI: proc: let procfs copy in writes to /proc/acpi/wakeup Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 18/22] macintosh/via-pmu: let procfs copy in writes to the options file Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 19/22] platform/x86: thinkpad_acpi: let procfs copy in writes Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 20/22] platform/x86: toshiba_acpi: " Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 21/22] PNP: pnpbios: " Christian Brauner
2026-11-02 15:01 ` [PATCH RFC 22/22] PNP: isapnp: let procfs copy out reads Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 00/23] proc: convert the driver entries Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 01/23] nubus: let procfs own the seq_file of the resource files Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 02/23] zorro: let procfs copy out reads Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 03/23] PCI/proc: let procfs copy in config space writes Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 04/23] PCI/proc: let procfs copy out config space reads Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 05/23] PCI/proc: let procfs handle the ioctls Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 06/23] md: let procfs own the seq_file of /proc/mdstat Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 07/23] s390/dasd: let procfs copy in writes to /proc/dasd/statistics Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 08/23] s390/cio: let procfs copy in writes Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 09/23] scsi: let procfs own the seq_file of the host files Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 10/23] scsi: core: let procfs copy in writes Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 11/23] selftests/proc: check that a faulting writer doesn't hold up removal Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 12/23] scsi: sg: let procfs own the seq_file of allow_dio and def_reserved_size Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 13/23] scsi: sg: let procfs copy in writes Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 14/23] scsi: esas2r: let procfs copy the ioctl argument of the ATTONode file Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 15/23] hwmon: (dell-smm) let procfs copy the i8k ioctl arguments Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 16/23] fbdev: viafb: let procfs copy in writes Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 17/23] usb: gadget: function: rndis: " Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 18/23] wifi: ipw2x00: let procfs copy in writes to the debug level Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 19/23] tty: sysrq: let procfs copy in writes to /proc/sysrq-trigger Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 20/23] ALSA: info: let procfs own the seq_file of text entries Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 21/23] ALSA: info: let procfs copy in writes Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 22/23] ALSA: info: let procfs copy out reads of data entries Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 23/23] ALSA: info: drop the ioctl hook " Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 00/27] proc: convert the fs, kernel and mm entries Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 01/27] jbd2: let procfs own the seq_file of the info file Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 02/27] jfs: let procfs copy in writes to the loglevel file Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 03/27] lockd: let procfs copy in writes to nlm_end_grace Christian Brauner
2026-11-02 15:23 ` Chuck Lever
2026-11-02 15:07 ` [PATCH RFC 04/27] lockd: let procfs copy out reads of nlm_end_grace Christian Brauner
2026-11-02 15:24 ` Chuck Lever
2026-11-02 15:07 ` [PATCH RFC 05/27] nfsd: factor out setting up the exports seq_file Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 06/27] nfsd: let procfs own the seq_file of /proc/fs/nfs/exports Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 07/27] ntfs3: let procfs copy in writes to the label file Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 08/27] smb: client: let procfs own the seq_file of the smbdirect files Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 09/27] smb: client: let procfs copy in writes Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 10/27] genirq/proc: let procfs copy in the affinity masks Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 11/27] latencytop: let procfs copy in writes to /proc/latency_stats Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 12/27] locking/lockdep: let procfs own the seq_file of /proc/lock_stat Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 13/27] locking/lockdep: let procfs copy in writes to /proc/lock_stat Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 14/27] profiling: let procfs copy in writes to /proc/profile Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 15/27] profiling: mark /proc/profile permanent Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 16/27] sched/psi: let procfs own the seq_file of the pressure files Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 17/27] sched/psi: let procfs copy in trigger writes Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 18/27] sched/psi: mark the pressure files permanent Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 19/27] kallsyms: let procfs own the seq_file of /proc/kallsyms Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 20/27] module: procfs: let procfs own the seq_file of /proc/modules Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 21/27] dyndbg: let procfs copy in writes to /proc/dynamic_debug/control Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 22/27] ipc: let procfs own the seq_file of the sysvipc files Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 23/27] alloc_tag: let procfs own the seq_file of /proc/allocinfo Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 24/27] alloc_tag: let procfs copy the ioctl arguments " Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 25/27] mm/swapfile: let procfs own the seq_file of /proc/swaps Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 26/27] kernel/configs: let procfs copy out reads of /proc/config.gz Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 27/27] selftests/proc: check that unloading configs doesn't wait for a reader Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 00/11] proc: convert the net entries and the kfifo samples Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 01/11] atm: let procfs copy out reads of the device files Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 02/11] l2tp: let procfs own the seq_file of /proc/net/pppol2tp Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 03/11] net: pktgen: let procfs copy in commands Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 04/11] netfilter: xt_recent: let procfs own the seq_file Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 05/11] netfilter: xt_recent: let procfs copy in writes Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 06/11] SUNRPC: let procfs own the seq_file of the cache content file Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 07/11] SUNRPC: let procfs copy in writes Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 08/11] SUNRPC: let procfs copy out reads Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 09/11] SUNRPC: drop the ioctl of the procfs channel files Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 10/11] samples/kfifo: let procfs copy in writes Christian Brauner
2026-11-02 15:07 ` [PATCH RFC 11/11] samples/kfifo: let procfs copy out reads Christian Brauner
2026-11-02 15:15 ` [PATCH RFC 0/5] proc: drop the __user methods Christian Brauner
2026-11-02 15:15 ` [PATCH RFC 1/5] proc: drop ->proc_write() Christian Brauner
2026-11-02 15:15 ` [PATCH RFC 2/5] proc: drop ->proc_ioctl() and ->proc_compat_ioctl() Christian Brauner
2026-11-02 15:15 ` [PATCH RFC 3/5] proc: only let permanent entries read straight into userspace Christian Brauner
2026-11-02 15:15 ` [PATCH RFC 4/5] proc: rename ->proc_read() and ->proc_read_iter() Christian Brauner
2026-11-02 15:15 ` [PATCH RFC 5/5] proc: drop the _buf suffix from the new methods Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261102-work-procfs-core-v1-4-75df35e4f8b8@kernel.org \
--to=brauner@kernel.org \
--cc=cel@kernel.org \
--cc=corbet@lwn.net \
--cc=coreteam@netfilter.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=edumazet@kernel.org \
--cc=gregkh@suse.de \
--cc=hch@lst.de \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=jack@suse.com \
--cc=jack@suse.cz \
--cc=jannh@google.com \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=jlayton@kernel.org \
--cc=joel.granados@kernel.org \
--cc=josef@toxicpanda.com \
--cc=kees@kernel.org \
--cc=kexec@lists.infradead.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-atm-general@lists.sourceforge.net \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-debuggers@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mm@kvack.org \
--cc=linux-modules@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mason@kernel.org \
--cc=neil@brown.name \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=ntfs3@lists.linux.dev \
--cc=platform-driver-x86@vger.kernel.org \
--cc=samba-technical@lists.samba.org \
--cc=sparclinux@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=tiwai@suse.de \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox