mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-27 06:50:37 +00:00

- The 4 patch series "mm: ksm: prevent KSM from breaking merging of new VMAs" from Lorenzo Stoakes addresses an issue with KSM's PR_SET_MEMORY_MERGE mode: newly mapped VMAs were not eligible for merging with existing adjacent VMAs. - The 4 patch series "mm/damon: introduce DAMON_STAT for simple and practical access monitoring" from SeongJae Park adds a new kernel module which simplifies the setup and usage of DAMON in production environments. - The 6 patch series "stop passing a writeback_control to swap/shmem writeout" from Christoph Hellwig is a cleanup to the writeback code which removes a couple of pointers from struct writeback_control. - The 7 patch series "drivers/base/node.c: optimization and cleanups" from Donet Tom contains largely uncorrelated cleanups to the NUMA node setup and management code. - The 4 patch series "mm: userfaultfd: assorted fixes and cleanups" from Tal Zussman does some maintenance work on the userfaultfd code. - The 5 patch series "Readahead tweaks for larger folios" from Ryan Roberts implements some tuneups for pagecache readahead when it is reading into order>0 folios. - The 4 patch series "selftests/mm: Tweaks to the cow test" from Mark Brown provides some cleanups and consistency improvements to the selftests code. - The 4 patch series "Optimize mremap() for large folios" from Dev Jain does that. A 37% reduction in execution time was measured in a memset+mremap+munmap microbenchmark. - The 5 patch series "Remove zero_user()" from Matthew Wilcox expunges zero_user() in favor of the more modern memzero_page(). - The 3 patch series "mm/huge_memory: vmf_insert_folio_*() and vmf_insert_pfn_pud() fixes" from David Hildenbrand addresses some warts which David noticed in the huge page code. These were not known to be causing any issues at this time. - The 3 patch series "mm/damon: use alloc_migrate_target() for DAMOS_MIGRATE_{HOT,COLD" from SeongJae Park provides some cleanup and consolidation work in DAMON. - The 3 patch series "use vm_flags_t consistently" from Lorenzo Stoakes uses vm_flags_t in places where we were inappropriately using other types. - The 3 patch series "mm/memfd: Reserve hugetlb folios before allocation" from Vivek Kasireddy increases the reliability of large page allocation in the memfd code. - The 14 patch series "mm: Remove pXX_devmap page table bit and pfn_t type" from Alistair Popple removes several now-unneeded PFN_* flags. - The 5 patch series "mm/damon: decouple sysfs from core" from SeongJae Park implememnts some cleanup and maintainability work in the DAMON sysfs layer. - The 5 patch series "madvise cleanup" from Lorenzo Stoakes does quite a lot of cleanup/maintenance work in the madvise() code. - The 4 patch series "madvise anon_name cleanups" from Vlastimil Babka provides additional cleanups on top or Lorenzo's effort. - The 11 patch series "Implement numa node notifier" from Oscar Salvador creates a standalone notifier for NUMA node memory state changes. Previously these were lumped under the more general memory on/offline notifier. - The 6 patch series "Make MIGRATE_ISOLATE a standalone bit" from Zi Yan cleans up the pageblock isolation code and fixes a potential issue which doesn't seem to cause any problems in practice. - The 5 patch series "selftests/damon: add python and drgn based DAMON sysfs functionality tests" from SeongJae Park adds additional drgn- and python-based DAMON selftests which are more comprehensive than the existing selftest suite. - The 5 patch series "Misc rework on hugetlb faulting path" from Oscar Salvador fixes a rather obscure deadlock in the hugetlb fault code and follows that fix with a series of cleanups. - The 3 patch series "cma: factor out allocation logic from __cma_declare_contiguous_nid" from Mike Rapoport rationalizes and cleans up the highmem-specific code in the CMA allocator. - The 28 patch series "mm/migration: rework movable_ops page migration (part 1)" from David Hildenbrand provides cleanups and future-preparedness to the migration code. - The 2 patch series "mm/damon: add trace events for auto-tuned monitoring intervals and DAMOS quota" from SeongJae Park adds some tracepoints to some DAMON auto-tuning code. - The 6 patch series "mm/damon: fix misc bugs in DAMON modules" from SeongJae Park does that. - The 6 patch series "mm/damon: misc cleanups" from SeongJae Park also does what it claims. - The 4 patch series "mm: folio_pte_batch() improvements" from David Hildenbrand cleans up the large folio PTE batching code. - The 13 patch series "mm/damon/vaddr: Allow interleaving in migrate_{hot,cold} actions" from SeongJae Park facilitates dynamic alteration of DAMON's inter-node allocation policy. - The 3 patch series "Remove unmap_and_put_page()" from Vishal Moola provides a couple of page->folio conversions. - The 4 patch series "mm: per-node proactive reclaim" from Davidlohr Bueso implements a per-node control of proactive reclaim - beyond the current memcg-based implementation. - The 14 patch series "mm/damon: remove damon_callback" from SeongJae Park replaces the damon_callback interface with a more general and powerful damon_call()+damos_walk() interface. - The 10 patch series "mm/mremap: permit mremap() move of multiple VMAs" from Lorenzo Stoakes implements a number of mremap cleanups (of course) in preparation for adding new mremap() functionality: newly permit the remapping of multiple VMAs when the user is specifying MREMAP_FIXED. It still excludes some specialized situations where this cannot be performed reliably. - The 3 patch series "drop hugetlb_free_pgd_range()" from Anthony Yznaga switches some sparc hugetlb code over to the generic version and removes the thus-unneeded hugetlb_free_pgd_range(). - The 4 patch series "mm/damon/sysfs: support periodic and automated stats update" from SeongJae Park augments the present userspace-requested update of DAMON sysfs monitoring files. Automatic update is now provided, along with a tunable to control the update interval. - The 4 patch series "Some randome fixes and cleanups to swapfile" from Kemeng Shi does what is claims. - The 4 patch series "mm: introduce snapshot_page" from Luiz Capitulino and David Hildenbrand provides (and uses) a means by which debug-style functions can grab a copy of a pageframe and inspect it locklessly without tripping over the races inherent in operating on the live pageframe directly. - The 6 patch series "use per-vma locks for /proc/pid/maps reads" from Suren Baghdasaryan addresses the large contention issues which can be triggered by reads from that procfs file. Latencies are reduced by more than half in some situations. The series also introduces several new selftests for the /proc/pid/maps interface. - The 6 patch series "__folio_split() clean up" from Zi Yan cleans up __folio_split()! - The 7 patch series "Optimize mprotect() for large folios" from Dev Jain provides some quite large (>3x) speedups to mprotect() when dealing with large folios. - The 2 patch series "selftests/mm: reuse FORCE_READ to replace "asm volatile("" : "+r" (XXX));" and some cleanup" from wang lian does some cleanup work in the selftests code. - The 3 patch series "tools/testing: expand mremap testing" from Lorenzo Stoakes extends the mremap() selftest in several ways, including adding more checking of Lorenzo's recently added "permit mremap() move of multiple VMAs" feature. - The 22 patch series "selftests/damon/sysfs.py: test all parameters" from SeongJae Park extends the DAMON sysfs interface selftest so that it tests all possible user-requested parameters. Rather than the present minimal subset. -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQTTMBEPP41GrTpTJgfdBJ7gKXxAjgUCaIqcCgAKCRDdBJ7gKXxA jkVBAQCCn9DR1QP0CRk961ot0cKzOgioSc0aA03DPb2KXRt2kQEAzDAz0ARurFhL 8BzbvI0c+4tntHLXvIlrC33n9KWAOQM= =XsFy -----END PGP SIGNATURE----- Merge tag 'mm-stable-2025-07-30-15-25' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull MM updates from Andrew Morton: "As usual, many cleanups. The below blurbiage describes 42 patchsets. 21 of those are partially or fully cleanup work. "cleans up", "cleanup", "maintainability", "rationalizes", etc. I never knew the MM code was so dirty. "mm: ksm: prevent KSM from breaking merging of new VMAs" (Lorenzo Stoakes) addresses an issue with KSM's PR_SET_MEMORY_MERGE mode: newly mapped VMAs were not eligible for merging with existing adjacent VMAs. "mm/damon: introduce DAMON_STAT for simple and practical access monitoring" (SeongJae Park) adds a new kernel module which simplifies the setup and usage of DAMON in production environments. "stop passing a writeback_control to swap/shmem writeout" (Christoph Hellwig) is a cleanup to the writeback code which removes a couple of pointers from struct writeback_control. "drivers/base/node.c: optimization and cleanups" (Donet Tom) contains largely uncorrelated cleanups to the NUMA node setup and management code. "mm: userfaultfd: assorted fixes and cleanups" (Tal Zussman) does some maintenance work on the userfaultfd code. "Readahead tweaks for larger folios" (Ryan Roberts) implements some tuneups for pagecache readahead when it is reading into order>0 folios. "selftests/mm: Tweaks to the cow test" (Mark Brown) provides some cleanups and consistency improvements to the selftests code. "Optimize mremap() for large folios" (Dev Jain) does that. A 37% reduction in execution time was measured in a memset+mremap+munmap microbenchmark. "Remove zero_user()" (Matthew Wilcox) expunges zero_user() in favor of the more modern memzero_page(). "mm/huge_memory: vmf_insert_folio_*() and vmf_insert_pfn_pud() fixes" (David Hildenbrand) addresses some warts which David noticed in the huge page code. These were not known to be causing any issues at this time. "mm/damon: use alloc_migrate_target() for DAMOS_MIGRATE_{HOT,COLD" (SeongJae Park) provides some cleanup and consolidation work in DAMON. "use vm_flags_t consistently" (Lorenzo Stoakes) uses vm_flags_t in places where we were inappropriately using other types. "mm/memfd: Reserve hugetlb folios before allocation" (Vivek Kasireddy) increases the reliability of large page allocation in the memfd code. "mm: Remove pXX_devmap page table bit and pfn_t type" (Alistair Popple) removes several now-unneeded PFN_* flags. "mm/damon: decouple sysfs from core" (SeongJae Park) implememnts some cleanup and maintainability work in the DAMON sysfs layer. "madvise cleanup" (Lorenzo Stoakes) does quite a lot of cleanup/maintenance work in the madvise() code. "madvise anon_name cleanups" (Vlastimil Babka) provides additional cleanups on top or Lorenzo's effort. "Implement numa node notifier" (Oscar Salvador) creates a standalone notifier for NUMA node memory state changes. Previously these were lumped under the more general memory on/offline notifier. "Make MIGRATE_ISOLATE a standalone bit" (Zi Yan) cleans up the pageblock isolation code and fixes a potential issue which doesn't seem to cause any problems in practice. "selftests/damon: add python and drgn based DAMON sysfs functionality tests" (SeongJae Park) adds additional drgn- and python-based DAMON selftests which are more comprehensive than the existing selftest suite. "Misc rework on hugetlb faulting path" (Oscar Salvador) fixes a rather obscure deadlock in the hugetlb fault code and follows that fix with a series of cleanups. "cma: factor out allocation logic from __cma_declare_contiguous_nid" (Mike Rapoport) rationalizes and cleans up the highmem-specific code in the CMA allocator. "mm/migration: rework movable_ops page migration (part 1)" (David Hildenbrand) provides cleanups and future-preparedness to the migration code. "mm/damon: add trace events for auto-tuned monitoring intervals and DAMOS quota" (SeongJae Park) adds some tracepoints to some DAMON auto-tuning code. "mm/damon: fix misc bugs in DAMON modules" (SeongJae Park) does that. "mm/damon: misc cleanups" (SeongJae Park) also does what it claims. "mm: folio_pte_batch() improvements" (David Hildenbrand) cleans up the large folio PTE batching code. "mm/damon/vaddr: Allow interleaving in migrate_{hot,cold} actions" (SeongJae Park) facilitates dynamic alteration of DAMON's inter-node allocation policy. "Remove unmap_and_put_page()" (Vishal Moola) provides a couple of page->folio conversions. "mm: per-node proactive reclaim" (Davidlohr Bueso) implements a per-node control of proactive reclaim - beyond the current memcg-based implementation. "mm/damon: remove damon_callback" (SeongJae Park) replaces the damon_callback interface with a more general and powerful damon_call()+damos_walk() interface. "mm/mremap: permit mremap() move of multiple VMAs" (Lorenzo Stoakes) implements a number of mremap cleanups (of course) in preparation for adding new mremap() functionality: newly permit the remapping of multiple VMAs when the user is specifying MREMAP_FIXED. It still excludes some specialized situations where this cannot be performed reliably. "drop hugetlb_free_pgd_range()" (Anthony Yznaga) switches some sparc hugetlb code over to the generic version and removes the thus-unneeded hugetlb_free_pgd_range(). "mm/damon/sysfs: support periodic and automated stats update" (SeongJae Park) augments the present userspace-requested update of DAMON sysfs monitoring files. Automatic update is now provided, along with a tunable to control the update interval. "Some randome fixes and cleanups to swapfile" (Kemeng Shi) does what is claims. "mm: introduce snapshot_page" (Luiz Capitulino and David Hildenbrand) provides (and uses) a means by which debug-style functions can grab a copy of a pageframe and inspect it locklessly without tripping over the races inherent in operating on the live pageframe directly. "use per-vma locks for /proc/pid/maps reads" (Suren Baghdasaryan) addresses the large contention issues which can be triggered by reads from that procfs file. Latencies are reduced by more than half in some situations. The series also introduces several new selftests for the /proc/pid/maps interface. "__folio_split() clean up" (Zi Yan) cleans up __folio_split()! "Optimize mprotect() for large folios" (Dev Jain) provides some quite large (>3x) speedups to mprotect() when dealing with large folios. "selftests/mm: reuse FORCE_READ to replace "asm volatile("" : "+r" (XXX));" and some cleanup" (wang lian) does some cleanup work in the selftests code. "tools/testing: expand mremap testing" (Lorenzo Stoakes) extends the mremap() selftest in several ways, including adding more checking of Lorenzo's recently added "permit mremap() move of multiple VMAs" feature. "selftests/damon/sysfs.py: test all parameters" (SeongJae Park) extends the DAMON sysfs interface selftest so that it tests all possible user-requested parameters. Rather than the present minimal subset" * tag 'mm-stable-2025-07-30-15-25' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (370 commits) MAINTAINERS: add missing headers to mempory policy & migration section MAINTAINERS: add missing file to cgroup section MAINTAINERS: add MM MISC section, add missing files to MISC and CORE MAINTAINERS: add missing zsmalloc file MAINTAINERS: add missing files to page alloc section MAINTAINERS: add missing shrinker files MAINTAINERS: move memremap.[ch] to hotplug section MAINTAINERS: add missing mm_slot.h file THP section MAINTAINERS: add missing interval_tree.c to memory mapping section MAINTAINERS: add missing percpu-internal.h file to per-cpu section mm/page_alloc: remove trace_mm_alloc_contig_migrate_range_info() selftests/damon: introduce _common.sh to host shared function selftests/damon/sysfs.py: test runtime reduction of DAMON parameters selftests/damon/sysfs.py: test non-default parameters runtime commit selftests/damon/sysfs.py: generalize DAMON context commit assertion selftests/damon/sysfs.py: generalize monitoring attributes commit assertion selftests/damon/sysfs.py: generalize DAMOS schemes commit assertion selftests/damon/sysfs.py: test DAMOS filters commitment selftests/damon/sysfs.py: generalize DAMOS scheme commit assertion selftests/damon/sysfs.py: test DAMOS destinations commitment ...
254 lines
9.2 KiB
C
254 lines
9.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* The proc filesystem constants/structures
|
|
*/
|
|
#ifndef _LINUX_PROC_FS_H
|
|
#define _LINUX_PROC_FS_H
|
|
|
|
#include <linux/compiler.h>
|
|
#include <linux/types.h>
|
|
#include <linux/fs.h>
|
|
|
|
struct proc_dir_entry;
|
|
struct seq_file;
|
|
struct seq_operations;
|
|
|
|
enum {
|
|
/*
|
|
* All /proc entries using this ->proc_ops instance are never removed.
|
|
*
|
|
* If in doubt, ignore this flag.
|
|
*/
|
|
#ifdef MODULE
|
|
PROC_ENTRY_PERMANENT = 0U,
|
|
#else
|
|
PROC_ENTRY_PERMANENT = 1U << 0,
|
|
#endif
|
|
|
|
PROC_ENTRY_proc_read_iter = 1U << 1,
|
|
PROC_ENTRY_proc_compat_ioctl = 1U << 2,
|
|
PROC_ENTRY_proc_lseek = 1U << 3,
|
|
|
|
PROC_ENTRY_FORCE_LOOKUP = 1U << 7,
|
|
};
|
|
|
|
struct proc_ops {
|
|
unsigned int proc_flags;
|
|
int (*proc_open)(struct inode *, struct file *);
|
|
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 */
|
|
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 *);
|
|
long (*proc_ioctl)(struct file *, unsigned int, unsigned long);
|
|
#ifdef CONFIG_COMPAT
|
|
long (*proc_compat_ioctl)(struct file *, unsigned int, unsigned long);
|
|
#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);
|
|
} __randomize_layout;
|
|
|
|
/* definitions for hide_pid field */
|
|
enum proc_hidepid {
|
|
HIDEPID_OFF = 0,
|
|
HIDEPID_NO_ACCESS = 1,
|
|
HIDEPID_INVISIBLE = 2,
|
|
HIDEPID_NOT_PTRACEABLE = 4, /* Limit pids to only ptraceable pids */
|
|
};
|
|
|
|
/* definitions for proc mount option pidonly */
|
|
enum proc_pidonly {
|
|
PROC_PIDONLY_OFF = 0,
|
|
PROC_PIDONLY_ON = 1,
|
|
};
|
|
|
|
struct proc_fs_info {
|
|
struct pid_namespace *pid_ns;
|
|
struct dentry *proc_self; /* For /proc/self */
|
|
struct dentry *proc_thread_self; /* For /proc/thread-self */
|
|
kgid_t pid_gid;
|
|
enum proc_hidepid hide_pid;
|
|
enum proc_pidonly pidonly;
|
|
struct rcu_head rcu;
|
|
};
|
|
|
|
static inline struct proc_fs_info *proc_sb_info(struct super_block *sb)
|
|
{
|
|
return sb->s_fs_info;
|
|
}
|
|
|
|
#ifdef CONFIG_PROC_FS
|
|
|
|
typedef int (*proc_write_t)(struct file *, char *, size_t);
|
|
|
|
extern void proc_root_init(void);
|
|
extern void proc_flush_pid(struct pid *);
|
|
|
|
extern struct proc_dir_entry *proc_symlink(const char *,
|
|
struct proc_dir_entry *, const char *);
|
|
struct proc_dir_entry *_proc_mkdir(const char *, umode_t, struct proc_dir_entry *, void *, bool);
|
|
extern struct proc_dir_entry *proc_mkdir(const char *, struct proc_dir_entry *);
|
|
extern struct proc_dir_entry *proc_mkdir_data(const char *, umode_t,
|
|
struct proc_dir_entry *, void *);
|
|
extern struct proc_dir_entry *proc_mkdir_mode(const char *, umode_t,
|
|
struct proc_dir_entry *);
|
|
struct proc_dir_entry *proc_create_mount_point(const char *name);
|
|
|
|
struct proc_dir_entry *proc_create_seq_private(const char *name, umode_t mode,
|
|
struct proc_dir_entry *parent, const struct seq_operations *ops,
|
|
unsigned int state_size, void *data);
|
|
#define proc_create_seq_data(name, mode, parent, ops, data) \
|
|
proc_create_seq_private(name, mode, parent, ops, 0, data)
|
|
#define proc_create_seq(name, mode, parent, ops) \
|
|
proc_create_seq_private(name, mode, parent, ops, 0, NULL)
|
|
struct proc_dir_entry *proc_create_single_data(const char *name, umode_t mode,
|
|
struct proc_dir_entry *parent,
|
|
int (*show)(struct seq_file *, void *), void *data);
|
|
#define proc_create_single(name, mode, parent, show) \
|
|
proc_create_single_data(name, mode, parent, show, NULL)
|
|
|
|
extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
|
|
struct proc_dir_entry *,
|
|
const struct proc_ops *,
|
|
void *);
|
|
|
|
struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
|
|
extern void proc_set_size(struct proc_dir_entry *, loff_t);
|
|
extern void proc_set_user(struct proc_dir_entry *, kuid_t, kgid_t);
|
|
|
|
/*
|
|
* Obtain the private data passed by user through proc_create_data() or
|
|
* related.
|
|
*/
|
|
static inline void *pde_data(const struct inode *inode)
|
|
{
|
|
return inode->i_private;
|
|
}
|
|
|
|
extern void *proc_get_parent_data(const struct inode *);
|
|
extern void proc_remove(struct proc_dir_entry *);
|
|
extern void remove_proc_entry(const char *, struct proc_dir_entry *);
|
|
extern int remove_proc_subtree(const char *, struct proc_dir_entry *);
|
|
|
|
struct proc_dir_entry *proc_create_net_data(const char *name, umode_t mode,
|
|
struct proc_dir_entry *parent, const struct seq_operations *ops,
|
|
unsigned int state_size, void *data);
|
|
#define proc_create_net(name, mode, parent, ops, state_size) \
|
|
proc_create_net_data(name, mode, parent, ops, state_size, NULL)
|
|
struct proc_dir_entry *proc_create_net_single(const char *name, umode_t mode,
|
|
struct proc_dir_entry *parent,
|
|
int (*show)(struct seq_file *, void *), void *data);
|
|
struct proc_dir_entry *proc_create_net_data_write(const char *name, umode_t mode,
|
|
struct proc_dir_entry *parent,
|
|
const struct seq_operations *ops,
|
|
proc_write_t write,
|
|
unsigned int state_size, void *data);
|
|
struct proc_dir_entry *proc_create_net_single_write(const char *name, umode_t mode,
|
|
struct proc_dir_entry *parent,
|
|
int (*show)(struct seq_file *, void *),
|
|
proc_write_t write,
|
|
void *data);
|
|
extern struct pid *tgid_pidfd_to_pid(const struct file *file);
|
|
|
|
struct bpf_iter_aux_info;
|
|
extern int bpf_iter_init_seq_net(void *priv_data, struct bpf_iter_aux_info *aux);
|
|
extern void bpf_iter_fini_seq_net(void *priv_data);
|
|
|
|
#ifdef CONFIG_PROC_PID_ARCH_STATUS
|
|
/*
|
|
* The architecture which selects CONFIG_PROC_PID_ARCH_STATUS must
|
|
* provide proc_pid_arch_status() definition.
|
|
*/
|
|
int proc_pid_arch_status(struct seq_file *m, struct pid_namespace *ns,
|
|
struct pid *pid, struct task_struct *task);
|
|
#endif /* CONFIG_PROC_PID_ARCH_STATUS */
|
|
|
|
void arch_report_meminfo(struct seq_file *m);
|
|
void arch_proc_pid_thread_features(struct seq_file *m, struct task_struct *task);
|
|
|
|
#else /* CONFIG_PROC_FS */
|
|
|
|
static inline void proc_root_init(void)
|
|
{
|
|
}
|
|
|
|
static inline void proc_flush_pid(struct pid *pid)
|
|
{
|
|
}
|
|
|
|
static inline struct proc_dir_entry *proc_symlink(const char *name,
|
|
struct proc_dir_entry *parent,const char *dest) { return NULL;}
|
|
static inline struct proc_dir_entry *proc_mkdir(const char *name,
|
|
struct proc_dir_entry *parent) {return NULL;}
|
|
static inline struct proc_dir_entry *proc_create_mount_point(const char *name) { return NULL; }
|
|
static inline struct proc_dir_entry *_proc_mkdir(const char *name, umode_t mode,
|
|
struct proc_dir_entry *parent, void *data, bool force_lookup)
|
|
{
|
|
return NULL;
|
|
}
|
|
static inline struct proc_dir_entry *proc_mkdir_data(const char *name,
|
|
umode_t mode, struct proc_dir_entry *parent, void *data) { return NULL; }
|
|
static inline struct proc_dir_entry *proc_mkdir_mode(const char *name,
|
|
umode_t mode, struct proc_dir_entry *parent) { return NULL; }
|
|
#define proc_create_seq_private(name, mode, parent, ops, size, data) ({NULL;})
|
|
#define proc_create_seq_data(name, mode, parent, ops, data) ({NULL;})
|
|
#define proc_create_seq(name, mode, parent, ops) ({NULL;})
|
|
#define proc_create_single(name, mode, parent, show) ({NULL;})
|
|
#define proc_create_single_data(name, mode, parent, show, data) ({NULL;})
|
|
|
|
static inline struct proc_dir_entry *
|
|
proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent,
|
|
const struct proc_ops *proc_ops)
|
|
{ return NULL; }
|
|
|
|
static inline struct proc_dir_entry *
|
|
proc_create_data(const char *name, umode_t mode, struct proc_dir_entry *parent,
|
|
const struct proc_ops *proc_ops, void *data)
|
|
{ return NULL; }
|
|
|
|
static inline void proc_set_size(struct proc_dir_entry *de, loff_t size) {}
|
|
static inline void proc_set_user(struct proc_dir_entry *de, kuid_t uid, kgid_t gid) {}
|
|
static inline void *pde_data(const struct inode *inode) {BUG(); return NULL;}
|
|
static inline void *proc_get_parent_data(const struct inode *inode) { BUG(); return NULL; }
|
|
|
|
static inline void proc_remove(struct proc_dir_entry *de) {}
|
|
#define remove_proc_entry(name, parent) do {} while (0)
|
|
static inline int remove_proc_subtree(const char *name, struct proc_dir_entry *parent) { return 0; }
|
|
|
|
#define proc_create_net_data(name, mode, parent, ops, state_size, data) ({NULL;})
|
|
#define proc_create_net_data_write(name, mode, parent, ops, write, state_size, data) ({NULL;})
|
|
#define proc_create_net(name, mode, parent, state_size, ops) ({NULL;})
|
|
#define proc_create_net_single(name, mode, parent, show, data) ({NULL;})
|
|
#define proc_create_net_single_write(name, mode, parent, show, write, data) ({NULL;})
|
|
|
|
static inline struct pid *tgid_pidfd_to_pid(const struct file *file)
|
|
{
|
|
return ERR_PTR(-EBADF);
|
|
}
|
|
|
|
#endif /* CONFIG_PROC_FS */
|
|
|
|
struct net;
|
|
|
|
static inline struct proc_dir_entry *proc_net_mkdir(
|
|
struct net *net, const char *name, struct proc_dir_entry *parent)
|
|
{
|
|
return _proc_mkdir(name, 0, parent, net, true);
|
|
}
|
|
|
|
struct ns_common;
|
|
int open_related_ns(struct ns_common *ns,
|
|
struct ns_common *(*get_ns)(struct ns_common *ns));
|
|
|
|
/* get the associated pid namespace for a file in procfs */
|
|
static inline struct pid_namespace *proc_pid_ns(struct super_block *sb)
|
|
{
|
|
return proc_sb_info(sb)->pid_ns;
|
|
}
|
|
|
|
bool proc_ns_file(const struct file *file);
|
|
|
|
#endif /* _LINUX_PROC_FS_H */
|