#include <linux/sched/signal.h>
#include <linux/errno.h>
#include <linux/dcache.h>
#include <linux/path.h>
#include <linux/fdtable.h>
#include <linux/namei.h>
#include <linux/pid.h>
#include <linux/ptrace.h>
#include <linux/bitmap.h>
#include <linux/security.h>
#include <linux/file.h>
#include <linux/seq_file.h>
#include <linux/fs.h>
#include <linux/filelock.h>
#include <linux/proc_fs.h>
#include "../mount.h"
#include "internal.h"
#include "fd.h"
static int seq_show(struct seq_file *m, void *v)
{ … }
static int seq_fdinfo_open(struct inode *inode, struct file *file)
{ … }
static int proc_fdinfo_permission(struct mnt_idmap *idmap, struct inode *inode,
int mask)
{ … }
static const struct inode_operations proc_fdinfo_file_inode_operations = …;
static const struct file_operations proc_fdinfo_file_operations = …;
static bool tid_fd_mode(struct task_struct *task, unsigned fd, fmode_t *mode)
{ … }
static void tid_fd_update_inode(struct task_struct *task, struct inode *inode,
fmode_t f_mode)
{ … }
static int tid_fd_revalidate(struct dentry *dentry, unsigned int flags)
{ … }
static const struct dentry_operations tid_fd_dentry_operations = …;
static int proc_fd_link(struct dentry *dentry, struct path *path)
{ … }
struct fd_data { … };
static struct dentry *proc_fd_instantiate(struct dentry *dentry,
struct task_struct *task, const void *ptr)
{ … }
static struct dentry *proc_lookupfd_common(struct inode *dir,
struct dentry *dentry,
instantiate_t instantiate)
{ … }
static int proc_readfd_common(struct file *file, struct dir_context *ctx,
instantiate_t instantiate)
{ … }
static int proc_readfd_count(struct inode *inode, loff_t *count)
{ … }
static int proc_readfd(struct file *file, struct dir_context *ctx)
{ … }
const struct file_operations proc_fd_operations = …;
static struct dentry *proc_lookupfd(struct inode *dir, struct dentry *dentry,
unsigned int flags)
{ … }
int proc_fd_permission(struct mnt_idmap *idmap,
struct inode *inode, int mask)
{ … }
static int proc_fd_getattr(struct mnt_idmap *idmap,
const struct path *path, struct kstat *stat,
u32 request_mask, unsigned int query_flags)
{ … }
const struct inode_operations proc_fd_inode_operations = …;
static struct dentry *proc_fdinfo_instantiate(struct dentry *dentry,
struct task_struct *task, const void *ptr)
{ … }
static struct dentry *
proc_lookupfdinfo(struct inode *dir, struct dentry *dentry, unsigned int flags)
{ … }
static int proc_readfdinfo(struct file *file, struct dir_context *ctx)
{ … }
const struct inode_operations proc_fdinfo_inode_operations = …;
const struct file_operations proc_fdinfo_operations = …;