lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211101093518.86845-1-songmuchun@bytedance.com>
Date:   Mon,  1 Nov 2021 17:35:14 +0800
From:   Muchun Song <songmuchun@...edance.com>
To:     akpm@...ux-foundation.org, adobriyan@...il.com,
        gladkov.alexey@...il.com
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        Muchun Song <songmuchun@...edance.com>
Subject: [PATCH 0/4] remove PDE_DATA()

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ