-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update(driver/modern_bpf): vmlinux + overlay definitions 5.15.0-86-ge…
…neric s390x Signed-off-by: Roberto Scolaro <[email protected]>
- Loading branch information
1 parent
c4db6c6
commit b0084fb
Showing
3 changed files
with
60,752 additions
and
71,501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,299 @@ | ||
#ifndef __OVERLAY_H__ | ||
#define __OVERLAY_H__ | ||
|
||
#ifndef BPF_NO_PRESERVE_ACCESS_INDEX | ||
#pragma clang attribute push (__attribute__((preserve_access_index)), apply_to = record) | ||
#endif | ||
|
||
/*=============================== ARCH S390: 5.15.0-86-generic ===========================*/ | ||
|
||
struct ovl_config { | ||
char *lowerdir; | ||
char *upperdir; | ||
char *workdir; | ||
bool default_permissions; | ||
bool redirect_dir; | ||
bool redirect_follow; | ||
const char *redirect_mode; | ||
bool index; | ||
bool uuid; | ||
bool nfs_export; | ||
int xino; | ||
bool metacopy; | ||
bool userxattr; | ||
bool ovl_volatile; | ||
}; | ||
|
||
struct ovl_sb { | ||
struct super_block *sb; | ||
dev_t pseudo_dev; | ||
bool bad_uuid; | ||
bool is_lower; | ||
}; | ||
|
||
struct ovl_layer { | ||
struct vfsmount *mnt; | ||
struct inode *trap; | ||
struct ovl_sb *fs; | ||
int idx; | ||
int fsid; | ||
}; | ||
|
||
struct ovl_path { | ||
const struct ovl_layer *layer; | ||
struct dentry *dentry; | ||
}; | ||
|
||
struct ovl_fs { | ||
unsigned int numlayer; | ||
unsigned int numfs; | ||
const struct ovl_layer *layers; | ||
struct ovl_sb *fs; | ||
struct dentry *workbasedir; | ||
struct dentry *workdir; | ||
struct dentry *indexdir; | ||
long int namelen; | ||
struct ovl_config config; | ||
const struct cred *creator_cred; | ||
bool tmpfile; | ||
bool noxattr; | ||
bool upperdir_locked; | ||
bool workdir_locked; | ||
bool share_whiteout; | ||
struct inode *workbasedir_trap; | ||
struct inode *workdir_trap; | ||
struct inode *indexdir_trap; | ||
int xino_mode; | ||
atomic_long_t last_ino; | ||
struct dentry *whiteout; | ||
errseq_t errseq; | ||
}; | ||
|
||
struct ovl_entry { | ||
union { | ||
struct { | ||
long unsigned int flags; | ||
}; | ||
struct callback_head rcu; | ||
}; | ||
unsigned int numlower; | ||
struct ovl_path lowerstack[0]; | ||
}; | ||
|
||
struct ovl_dir_cache; | ||
|
||
struct ovl_inode { | ||
union { | ||
struct ovl_dir_cache *cache; | ||
struct inode *lowerdata; | ||
}; | ||
const char *redirect; | ||
u64 version; | ||
long unsigned int flags; | ||
struct inode vfs_inode; | ||
struct dentry *__upperdentry; | ||
struct ovl_path lowerpath; | ||
struct mutex lock; | ||
}; | ||
|
||
enum ovl_path_type { | ||
__OVL_PATH_UPPER = 1, | ||
__OVL_PATH_MERGE = 2, | ||
__OVL_PATH_ORIGIN = 4, | ||
}; | ||
|
||
enum ovl_xattr { | ||
OVL_XATTR_OPAQUE = 0, | ||
OVL_XATTR_REDIRECT = 1, | ||
OVL_XATTR_ORIGIN = 2, | ||
OVL_XATTR_IMPURE = 3, | ||
OVL_XATTR_NLINK = 4, | ||
OVL_XATTR_UPPER = 5, | ||
OVL_XATTR_METACOPY = 6, | ||
OVL_XATTR_PROTATTR = 7, | ||
}; | ||
|
||
enum ovl_inode_flag { | ||
OVL_IMPURE = 0, | ||
OVL_WHITEOUTS = 1, | ||
OVL_INDEX = 2, | ||
OVL_UPPERDATA = 3, | ||
OVL_CONST_INO = 4, | ||
}; | ||
|
||
enum ovl_entry_flag { | ||
OVL_E_UPPER_ALIAS = 0, | ||
OVL_E_OPAQUE = 1, | ||
OVL_E_CONNECTED = 2, | ||
}; | ||
|
||
enum { | ||
OVL_XINO_OFF = 0, | ||
OVL_XINO_AUTO = 1, | ||
OVL_XINO_ON = 2, | ||
}; | ||
|
||
struct ovl_inode_params { | ||
struct inode *newinode; | ||
struct dentry *upperdentry; | ||
struct ovl_path *lowerpath; | ||
bool index; | ||
unsigned int numlower; | ||
char *redirect; | ||
struct dentry *lowerdata; | ||
}; | ||
|
||
struct ovl_cattr { | ||
dev_t rdev; | ||
umode_t mode; | ||
const char *link; | ||
struct dentry *hardlink; | ||
}; | ||
|
||
enum { | ||
OPT_LOWERDIR = 0, | ||
OPT_UPPERDIR = 1, | ||
OPT_WORKDIR = 2, | ||
OPT_DEFAULT_PERMISSIONS___2 = 3, | ||
OPT_REDIRECT_DIR = 4, | ||
OPT_INDEX_ON = 5, | ||
OPT_INDEX_OFF = 6, | ||
OPT_UUID_ON = 7, | ||
OPT_UUID_OFF = 8, | ||
OPT_NFS_EXPORT_ON = 9, | ||
OPT_USERXATTR = 10, | ||
OPT_NFS_EXPORT_OFF = 11, | ||
OPT_XINO_ON = 12, | ||
OPT_XINO_OFF = 13, | ||
OPT_XINO_AUTO = 14, | ||
OPT_METACOPY_ON = 15, | ||
OPT_METACOPY_OFF = 16, | ||
OPT_VOLATILE = 17, | ||
OPT_ERR___2 = 18, | ||
}; | ||
|
||
struct ovl_fb { | ||
u8 version; | ||
u8 magic; | ||
u8 len; | ||
u8 flags; | ||
u8 type; | ||
uuid_t uuid; | ||
u32 fid[0]; | ||
} __attribute__((packed)); | ||
|
||
struct ovl_fh { | ||
u8 padding[3]; | ||
union { | ||
struct ovl_fb fb; | ||
struct { | ||
struct {} __empty_buf; | ||
u8 buf[0]; | ||
}; | ||
}; | ||
}; | ||
|
||
struct ovl_lookup_data { | ||
struct super_block *sb; | ||
struct qstr name; | ||
bool is_dir; | ||
bool opaque; | ||
bool stop; | ||
bool last; | ||
char *redirect; | ||
bool metacopy; | ||
}; | ||
|
||
struct ovl_aio_req { | ||
struct kiocb iocb; | ||
refcount_t ref; | ||
struct kiocb *orig_iocb; | ||
struct fd fd; | ||
}; | ||
|
||
enum ovl_copyop { | ||
OVL_COPY = 0, | ||
OVL_CLONE = 1, | ||
OVL_DEDUPE = 2, | ||
}; | ||
|
||
struct ovl_dir_cache { | ||
long int refcount; | ||
u64 version; | ||
struct list_head entries; | ||
struct rb_root root; | ||
}; | ||
|
||
struct ovl_cache_entry { | ||
unsigned int len; | ||
unsigned int type; | ||
u64 real_ino; | ||
u64 ino; | ||
struct list_head l_node; | ||
struct rb_node node; | ||
struct ovl_cache_entry *next_maybe_whiteout; | ||
bool is_upper; | ||
bool is_whiteout; | ||
char name[0]; | ||
}; | ||
|
||
struct ovl_readdir_data { | ||
struct dir_context ctx; | ||
struct dentry *dentry; | ||
bool is_lowest; | ||
struct rb_root *root; | ||
struct list_head *list; | ||
struct list_head middle; | ||
struct ovl_cache_entry *first_maybe_whiteout; | ||
int count; | ||
int err; | ||
bool is_upper; | ||
bool d_type_supported; | ||
}; | ||
|
||
struct ovl_dir_file { | ||
bool is_real; | ||
bool is_upper; | ||
struct ovl_dir_cache *cache; | ||
struct list_head *cursor; | ||
struct file *realfile; | ||
struct file *upperfile; | ||
}; | ||
|
||
struct ovl_readdir_translate { | ||
struct dir_context *orig_ctx; | ||
struct ovl_dir_cache *cache; | ||
struct dir_context ctx; | ||
u64 parent_ino; | ||
int fsid; | ||
int xinobits; | ||
bool xinowarn; | ||
}; | ||
|
||
struct ovl_copy_up_ctx { | ||
struct dentry *parent; | ||
struct dentry *dentry; | ||
struct path lowerpath; | ||
struct kstat stat; | ||
struct kstat pstat; | ||
const char *link; | ||
struct dentry *destdir; | ||
struct qstr destname; | ||
struct dentry *workdir; | ||
bool origin; | ||
bool indexed; | ||
bool metacopy; | ||
}; | ||
|
||
struct ovl_cu_creds { | ||
const struct cred *old; | ||
struct cred *new; | ||
}; | ||
|
||
/*=============================== ARCH S390: 5.15.0-86-generic ===========================*/ | ||
|
||
#ifndef BPF_NO_PRESERVE_ACCESS_INDEX | ||
#pragma clang attribute pop | ||
#endif | ||
|
||
#endif /* __OVERLAY_H__ */ |
Oops, something went wrong.