From: Muchun Song <songmuchun@bytedance.com>
To: akpm@linux-foundation.org, adobriyan@gmail.com, gladkov.alexey@gmail.com
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Muchun Song <songmuchun@bytedance.com>
Subject: [PATCH 0/4] remove PDE_DATA()
Date: Mon, 1 Nov 2021 17:35:14 +0800 [thread overview]
Message-ID: <20211101093518.86845-1-songmuchun@bytedance.com> (raw)
I found a bug [1] some days ago, which is because we want to use
inode->i_private to pass user private data. However, this is wrong
on proc fs. We provide a specific function PDE_DATA() to get user
private data. Actually, we can hide this detail by storing
PDE()->data into inode->i_private and removing PDE_DATA() completely.
The user could use inode->i_private to get user private data just
like debugfs does. This series is trying to remove PDE_DATA().
[1] https://lore.kernel.org/lkml/20211029032638.84884-1-songmuchun@bytedance.com/
Muchun Song (4):
fs: proc: store PDE()->data into inode->i_private
fs: proc: replace PDE_DATA(inode) with inode->i_private
fs: proc: remove PDE_DATA()
fs: proc: use DEFINE_PROC_SHOW_ATTRIBUTE() to simplify the code
arch/alpha/kernel/srm_env.c | 4 ++--
arch/arm/kernel/atags_proc.c | 2 +-
arch/ia64/kernel/salinfo.c | 10 ++++-----
arch/powerpc/kernel/proc_powerpc.c | 4 ++--
arch/sh/mm/alignment.c | 2 +-
arch/xtensa/platforms/iss/simdisk.c | 4 ++--
drivers/acpi/proc.c | 2 +-
drivers/hwmon/dell-smm-hwmon.c | 4 ++--
drivers/net/bonding/bond_procfs.c | 8 ++++----
drivers/net/wireless/cisco/airo.c | 22 ++++++++++----------
drivers/net/wireless/intersil/hostap/hostap_ap.c | 16 +++++++--------
.../net/wireless/intersil/hostap/hostap_download.c | 2 +-
drivers/net/wireless/intersil/hostap/hostap_proc.c | 24 +++++++++++-----------
drivers/net/wireless/ray_cs.c | 2 +-
drivers/nubus/proc.c | 2 +-
drivers/parisc/led.c | 4 ++--
drivers/pci/proc.c | 10 ++++-----
drivers/platform/x86/thinkpad_acpi.c | 4 ++--
drivers/platform/x86/toshiba_acpi.c | 16 +++++++--------
drivers/pnp/isapnp/proc.c | 2 +-
drivers/pnp/pnpbios/proc.c | 4 ++--
drivers/scsi/scsi_proc.c | 4 ++--
drivers/usb/gadget/function/rndis.c | 4 ++--
drivers/zorro/proc.c | 2 +-
fs/afs/proc.c | 6 +++---
fs/cifs/cifs_debug.c | 17 ++-------------
fs/ext4/mballoc.c | 14 ++++++-------
fs/jbd2/journal.c | 2 +-
fs/nfsd/stats.c | 15 ++------------
fs/proc/generic.c | 6 ------
fs/proc/inode.c | 1 +
fs/proc/internal.h | 5 -----
fs/proc/proc_net.c | 12 +++++------
include/linux/proc_fs.h | 2 --
include/linux/seq_file.h | 2 +-
ipc/util.c | 2 +-
kernel/irq/proc.c | 8 ++++----
kernel/resource.c | 4 ++--
net/atm/proc.c | 4 ++--
net/bluetooth/af_bluetooth.c | 8 ++++----
net/can/bcm.c | 2 +-
net/can/proc.c | 2 +-
net/core/neighbour.c | 6 +++---
net/core/pktgen.c | 6 +++---
net/ipv4/netfilter/ipt_CLUSTERIP.c | 6 +++---
net/ipv4/raw.c | 8 ++++----
net/ipv4/tcp_ipv4.c | 2 +-
net/ipv4/udp.c | 6 +++---
net/netfilter/x_tables.c | 10 ++++-----
net/netfilter/xt_hashlimit.c | 18 ++++++++--------
net/netfilter/xt_recent.c | 4 ++--
net/sunrpc/auth_gss/svcauth_gss.c | 4 ++--
net/sunrpc/cache.c | 24 +++++++++++-----------
net/sunrpc/stats.c | 15 ++------------
sound/core/info.c | 4 ++--
55 files changed, 168 insertions(+), 215 deletions(-)
--
2.11.0
next reply other threads:[~2021-11-01 10:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-01 9:35 Muchun Song [this message]
2021-11-01 9:35 ` [PATCH 1/4] fs: proc: store PDE()->data into inode->i_private Muchun Song
2021-11-01 9:35 ` [PATCH 2/4] fs: proc: replace PDE_DATA(inode) with inode->i_private Muchun Song
2021-11-01 9:35 ` [PATCH 3/4] fs: proc: remove PDE_DATA() Muchun Song
2021-11-01 9:35 ` [PATCH 4/4] fs: proc: use DEFINE_PROC_SHOW_ATTRIBUTE() to simplify the code Muchun Song
2021-11-16 5:09 ` [PATCH 0/4] remove PDE_DATA() Andrew Morton
2021-11-16 8:26 ` Muchun Song
2021-11-16 20:01 ` Andrew Morton
2021-11-17 8:24 ` Muchun Song
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=20211101093518.86845-1-songmuchun@bytedance.com \
--to=songmuchun@bytedance.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=gladkov.alexey@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).