You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apisix.apache.org by yo...@apache.org on 2022/10/25 03:55:28 UTC
[apisix-profiler] branch main updated: change: add framework from libbpf-bootstrap and bcc for profiler (#1)
This is an automated email from the ASF dual-hosted git repository.
yousa pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/apisix-profiler.git
The following commit(s) were added to refs/heads/main by this push:
new 5831316 change: add framework from libbpf-bootstrap and bcc for profiler (#1)
5831316 is described below
commit 5831316a7b8a1ef65f8b3b9f7daa0e381476751d
Author: 云微 <10...@qq.com>
AuthorDate: Tue Oct 25 11:55:23 2022 +0800
change: add framework from libbpf-bootstrap and bcc for profiler (#1)
* profiler: add framework from libbpf-bootstrap
* profiler: add helpers from bcc/bpf-tools
This helpers functions are from
https://github.com/iovisor/bcc/tree/master/libbpf-tools
without any modifications.
* profiler: add Makefile and gitignore
---
.gitignore | 3 +
.gitmodules | 3 +
helpers/maps.bpf.h | 26 +
helpers/trace_helpers.c | 1138 +
helpers/trace_helpers.h | 100 +
helpers/uprobe_helpers.c | 289 +
helpers/uprobe_helpers.h | 18 +
libbpf | 1 +
profiler/Makefile | 99 +
tools/bpftool | Bin 0 -> 2453464 bytes
tools/gen_vmlinux_h.sh | 8 +
vmlinux/arm64/vmlinux.h | 1 +
vmlinux/arm64/vmlinux_516.h | 160927 +++++++++++++++++++++++++++++++++++++++++
vmlinux/vmlinux.h | 1 +
vmlinux/x86/vmlinux.h | 1 +
vmlinux/x86/vmlinux_508.h | 128607 ++++++++++++++++++++++++++++++++
16 files changed, 291222 insertions(+)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2eda0b7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+profiler/.output/*
+profiler/*.o
+profiler/profile
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..1706b4a
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "libbpf"]
+ path = libbpf
+ url = https://github.com/libbpf/libbpf.git
diff --git a/helpers/maps.bpf.h b/helpers/maps.bpf.h
new file mode 100644
index 0000000..51d1012
--- /dev/null
+++ b/helpers/maps.bpf.h
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
+// Copyright (c) 2020 Anton Protopopov
+#ifndef __MAPS_BPF_H
+#define __MAPS_BPF_H
+
+#include <bpf/bpf_helpers.h>
+#include <asm-generic/errno.h>
+
+static __always_inline void *
+bpf_map_lookup_or_try_init(void *map, const void *key, const void *init)
+{
+ void *val;
+ long err;
+
+ val = bpf_map_lookup_elem(map, key);
+ if (val)
+ return val;
+
+ err = bpf_map_update_elem(map, key, init, BPF_NOEXIST);
+ if (err && err != -EEXIST)
+ return 0;
+
+ return bpf_map_lookup_elem(map, key);
+}
+
+#endif /* __MAPS_BPF_H */
diff --git a/helpers/trace_helpers.c b/helpers/trace_helpers.c
new file mode 100644
index 0000000..8eb4c83
--- /dev/null
+++ b/helpers/trace_helpers.c
@@ -0,0 +1,1138 @@
+/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
+// Copyright (c) 2020 Wenbo Zhang
+//
+// Based on ksyms improvements from Andrii Nakryiko, add more helpers.
+// 28-Feb-2020 Wenbo Zhang Created this.
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/resource.h>
+#include <time.h>
+#include <bpf/bpf.h>
+#include <bpf/btf.h>
+#include <bpf/libbpf.h>
+#include <limits.h>
+#include "trace_helpers.h"
+#include "uprobe_helpers.h"
+
+#define min(x, y) ({ \
+ typeof(x) _min1 = (x); \
+ typeof(y) _min2 = (y); \
+ (void) (&_min1 == &_min2); \
+ _min1 < _min2 ? _min1 : _min2; })
+
+#define DISK_NAME_LEN 32
+
+#define MINORBITS 20
+#define MINORMASK ((1U << MINORBITS) - 1)
+
+#define MKDEV(ma, mi) (((ma) << MINORBITS) | (mi))
+
+struct ksyms {
+ struct ksym *syms;
+ int syms_sz;
+ int syms_cap;
+ char *strs;
+ int strs_sz;
+ int strs_cap;
+};
+
+static int ksyms__add_symbol(struct ksyms *ksyms, const char *name, unsigned long addr)
+{
+ size_t new_cap, name_len = strlen(name) + 1;
+ struct ksym *ksym;
+ void *tmp;
+
+ if (ksyms->strs_sz + name_len > ksyms->strs_cap) {
+ new_cap = ksyms->strs_cap * 4 / 3;
+ if (new_cap < ksyms->strs_sz + name_len)
+ new_cap = ksyms->strs_sz + name_len;
+ if (new_cap < 1024)
+ new_cap = 1024;
+ tmp = realloc(ksyms->strs, new_cap);
+ if (!tmp)
+ return -1;
+ ksyms->strs = tmp;
+ ksyms->strs_cap = new_cap;
+ }
+ if (ksyms->syms_sz + 1 > ksyms->syms_cap) {
+ new_cap = ksyms->syms_cap * 4 / 3;
+ if (new_cap < 1024)
+ new_cap = 1024;
+ tmp = realloc(ksyms->syms, sizeof(*ksyms->syms) * new_cap);
+ if (!tmp)
+ return -1;
+ ksyms->syms = tmp;
+ ksyms->syms_cap = new_cap;
+ }
+
+ ksym = &ksyms->syms[ksyms->syms_sz];
+ /* while constructing, re-use pointer as just a plain offset */
+ ksym->name = (void *)(unsigned long)ksyms->strs_sz;
+ ksym->addr = addr;
+
+ memcpy(ksyms->strs + ksyms->strs_sz, name, name_len);
+ ksyms->strs_sz += name_len;
+ ksyms->syms_sz++;
+
+ return 0;
+}
+
+static int ksym_cmp(const void *p1, const void *p2)
+{
+ const struct ksym *s1 = p1, *s2 = p2;
+
+ if (s1->addr == s2->addr)
+ return strcmp(s1->name, s2->name);
+ return s1->addr < s2->addr ? -1 : 1;
+}
+
+struct ksyms *ksyms__load(void)
+{
+ char sym_type, sym_name[256];
+ struct ksyms *ksyms;
+ unsigned long sym_addr;
+ int i, ret;
+ FILE *f;
+
+ f = fopen("/proc/kallsyms", "r");
+ if (!f)
+ return NULL;
+
+ ksyms = calloc(1, sizeof(*ksyms));
+ if (!ksyms)
+ goto err_out;
+
+ while (true) {
+ ret = fscanf(f, "%lx %c %s%*[^\n]\n",
+ &sym_addr, &sym_type, sym_name);
+ if (ret == EOF && feof(f))
+ break;
+ if (ret != 3)
+ goto err_out;
+ if (ksyms__add_symbol(ksyms, sym_name, sym_addr))
+ goto err_out;
+ }
+
+ /* now when strings are finalized, adjust pointers properly */
+ for (i = 0; i < ksyms->syms_sz; i++)
+ ksyms->syms[i].name += (unsigned long)ksyms->strs;
+
+ qsort(ksyms->syms, ksyms->syms_sz, sizeof(*ksyms->syms), ksym_cmp);
+
+ fclose(f);
+ return ksyms;
+
+err_out:
+ ksyms__free(ksyms);
+ fclose(f);
+ return NULL;
+}
+
+void ksyms__free(struct ksyms *ksyms)
+{
+ if (!ksyms)
+ return;
+
+ free(ksyms->syms);
+ free(ksyms->strs);
+ free(ksyms);
+}
+
+const struct ksym *ksyms__map_addr(const struct ksyms *ksyms,
+ unsigned long addr)
+{
+ int start = 0, end = ksyms->syms_sz - 1, mid;
+ unsigned long sym_addr;
+
+ /* find largest sym_addr <= addr using binary search */
+ while (start < end) {
+ mid = start + (end - start + 1) / 2;
+ sym_addr = ksyms->syms[mid].addr;
+
+ if (sym_addr <= addr)
+ start = mid;
+ else
+ end = mid - 1;
+ }
+
+ if (start == end && ksyms->syms[start].addr <= addr)
+ return &ksyms->syms[start];
+ return NULL;
+}
+
+const struct ksym *ksyms__get_symbol(const struct ksyms *ksyms,
+ const char *name)
+{
+ int i;
+
+ for (i = 0; i < ksyms->syms_sz; i++) {
+ if (strcmp(ksyms->syms[i].name, name) == 0)
+ return &ksyms->syms[i];
+ }
+
+ return NULL;
+}
+
+struct load_range {
+ uint64_t start;
+ uint64_t end;
+ uint64_t file_off;
+};
+
+enum elf_type {
+ EXEC,
+ DYN,
+ PERF_MAP,
+ VDSO,
+ UNKNOWN,
+};
+
+struct dso {
+ char *name;
+ struct load_range *ranges;
+ int range_sz;
+ /* Dyn's first text section virtual addr at execution */
+ uint64_t sh_addr;
+ /* Dyn's first text section file offset */
+ uint64_t sh_offset;
+ enum elf_type type;
+
+ struct sym *syms;
+ int syms_sz;
+ int syms_cap;
+
+ /*
+ * libbpf's struct btf is actually a pretty efficient
+ * "set of strings" data structure, so we create an
+ * empty one and use it to store symbol names.
+ */
+ struct btf *btf;
+};
+
+struct map {
+ uint64_t start_addr;
+ uint64_t end_addr;
+ uint64_t file_off;
+ uint64_t dev_major;
+ uint64_t dev_minor;
+ uint64_t inode;
+};
+
+struct syms {
+ struct dso *dsos;
+ int dso_sz;
+};
+
+static bool is_file_backed(const char *mapname)
+{
+#define STARTS_WITH(mapname, prefix) \
+ (!strncmp(mapname, prefix, sizeof(prefix) - 1))
+
+ return mapname[0] && !(
+ STARTS_WITH(mapname, "//anon") ||
+ STARTS_WITH(mapname, "/dev/zero") ||
+ STARTS_WITH(mapname, "/anon_hugepage") ||
+ STARTS_WITH(mapname, "[stack") ||
+ STARTS_WITH(mapname, "/SYSV") ||
+ STARTS_WITH(mapname, "[heap]") ||
+ STARTS_WITH(mapname, "[vsyscall]"));
+}
+
+static bool is_perf_map(const char *path)
+{
+ return false;
+}
+
+static bool is_vdso(const char *path)
+{
+ return !strcmp(path, "[vdso]");
+}
+
+static int get_elf_type(const char *path)
+{
+ GElf_Ehdr hdr;
+ void *res;
+ Elf *e;
+ int fd;
+
+ if (is_vdso(path))
+ return -1;
+ e = open_elf(path, &fd);
+ if (!e)
+ return -1;
+ res = gelf_getehdr(e, &hdr);
+ close_elf(e, fd);
+ if (!res)
+ return -1;
+ return hdr.e_type;
+}
+
+static int get_elf_text_scn_info(const char *path, uint64_t *addr,
+ uint64_t *offset)
+{
+ Elf_Scn *section = NULL;
+ int fd = -1, err = -1;
+ GElf_Shdr header;
+ size_t stridx;
+ Elf *e = NULL;
+ char *name;
+
+ e = open_elf(path, &fd);
+ if (!e)
+ goto err_out;
+ err = elf_getshdrstrndx(e, &stridx);
+ if (err < 0)
+ goto err_out;
+
+ err = -1;
+ while ((section = elf_nextscn(e, section)) != 0) {
+ if (!gelf_getshdr(section, &header))
+ continue;
+
+ name = elf_strptr(e, stridx, header.sh_name);
+ if (name && !strcmp(name, ".text")) {
+ *addr = (uint64_t)header.sh_addr;
+ *offset = (uint64_t)header.sh_offset;
+ err = 0;
+ break;
+ }
+ }
+
+err_out:
+ close_elf(e, fd);
+ return err;
+}
+
+static int syms__add_dso(struct syms *syms, struct map *map, const char *name)
+{
+ struct dso *dso = NULL;
+ int i, type;
+ void *tmp;
+
+ for (i = 0; i < syms->dso_sz; i++) {
+ if (!strcmp(syms->dsos[i].name, name)) {
+ dso = &syms->dsos[i];
+ break;
+ }
+ }
+
+ if (!dso) {
+ tmp = realloc(syms->dsos, (syms->dso_sz + 1) *
+ sizeof(*syms->dsos));
+ if (!tmp)
+ return -1;
+ syms->dsos = tmp;
+ dso = &syms->dsos[syms->dso_sz++];
+ memset(dso, 0, sizeof(*dso));
+ dso->name = strdup(name);
+ dso->btf = btf__new_empty();
+ }
+
+ tmp = realloc(dso->ranges, (dso->range_sz + 1) * sizeof(*dso->ranges));
+ if (!tmp)
+ return -1;
+ dso->ranges = tmp;
+ dso->ranges[dso->range_sz].start = map->start_addr;
+ dso->ranges[dso->range_sz].end = map->end_addr;
+ dso->ranges[dso->range_sz].file_off = map->file_off;
+ dso->range_sz++;
+ type = get_elf_type(name);
+ if (type == ET_EXEC) {
+ dso->type = EXEC;
+ } else if (type == ET_DYN) {
+ dso->type = DYN;
+ if (get_elf_text_scn_info(name, &dso->sh_addr, &dso->sh_offset) < 0)
+ return -1;
+ } else if (is_perf_map(name)) {
+ dso->type = PERF_MAP;
+ } else if (is_vdso(name)) {
+ dso->type = VDSO;
+ } else {
+ dso->type = UNKNOWN;
+ }
+ return 0;
+}
+
+static struct dso *syms__find_dso(const struct syms *syms, unsigned long addr,
+ uint64_t *offset)
+{
+ struct load_range *range;
+ struct dso *dso;
+ int i, j;
+
+ for (i = 0; i < syms->dso_sz; i++) {
+ dso = &syms->dsos[i];
+ for (j = 0; j < dso->range_sz; j++) {
+ range = &dso->ranges[j];
+ if (addr <= range->start || addr >= range->end)
+ continue;
+ if (dso->type == DYN || dso->type == VDSO) {
+ /* Offset within the mmap */
+ *offset = addr - range->start + range->file_off;
+ /* Offset within the ELF for dyn symbol lookup */
+ *offset += dso->sh_addr - dso->sh_offset;
+ } else {
+ *offset = addr;
+ }
+
+ return dso;
+ }
+ }
+
+ return NULL;
+}
+
+static int dso__load_sym_table_from_perf_map(struct dso *dso)
+{
+ return -1;
+}
+
+static int dso__add_sym(struct dso *dso, const char *name, uint64_t start,
+ uint64_t size)
+{
+ struct sym *sym;
+ size_t new_cap;
+ void *tmp;
+ int off;
+
+ off = btf__add_str(dso->btf, name);
+ if (off < 0)
+ return off;
+
+ if (dso->syms_sz + 1 > dso->syms_cap) {
+ new_cap = dso->syms_cap * 4 / 3;
+ if (new_cap < 1024)
+ new_cap = 1024;
+ tmp = realloc(dso->syms, sizeof(*dso->syms) * new_cap);
+ if (!tmp)
+ return -1;
+ dso->syms = tmp;
+ dso->syms_cap = new_cap;
+ }
+
+ sym = &dso->syms[dso->syms_sz++];
+ /* while constructing, re-use pointer as just a plain offset */
+ sym->name = (void*)(unsigned long)off;
+ sym->start = start;
+ sym->size = size;
+ sym->offset = 0;
+
+ return 0;
+}
+
+static int sym_cmp(const void *p1, const void *p2)
+{
+ const struct sym *s1 = p1, *s2 = p2;
+
+ if (s1->start == s2->start)
+ return strcmp(s1->name, s2->name);
+ return s1->start < s2->start ? -1 : 1;
+}
+
+static int dso__add_syms(struct dso *dso, Elf *e, Elf_Scn *section,
+ size_t stridx, size_t symsize)
+{
+ Elf_Data *data = NULL;
+
+ while ((data = elf_getdata(section, data)) != 0) {
+ size_t i, symcount = data->d_size / symsize;
+
+ if (data->d_size % symsize)
+ return -1;
+
+ for (i = 0; i < symcount; ++i) {
+ const char *name;
+ GElf_Sym sym;
+
+ if (!gelf_getsym(data, (int)i, &sym))
+ continue;
+ if (!(name = elf_strptr(e, stridx, sym.st_name)))
+ continue;
+ if (name[0] == '\0')
+ continue;
+
+ if (sym.st_value == 0)
+ continue;
+
+ if (dso__add_sym(dso, name, sym.st_value, sym.st_size))
+ goto err_out;
+ }
+ }
+
+ return 0;
+
+err_out:
+ return -1;
+}
+
+static void dso__free_fields(struct dso *dso)
+{
+ if (!dso)
+ return;
+
+ free(dso->name);
+ free(dso->ranges);
+ free(dso->syms);
+ btf__free(dso->btf);
+}
+
+static int dso__load_sym_table_from_elf(struct dso *dso, int fd)
+{
+ Elf_Scn *section = NULL;
+ Elf *e;
+ int i;
+
+ e = fd > 0 ? open_elf_by_fd(fd) : open_elf(dso->name, &fd);
+ if (!e)
+ return -1;
+
+ while ((section = elf_nextscn(e, section)) != 0) {
+ GElf_Shdr header;
+
+ if (!gelf_getshdr(section, &header))
+ continue;
+
+ if (header.sh_type != SHT_SYMTAB &&
+ header.sh_type != SHT_DYNSYM)
+ continue;
+
+ if (dso__add_syms(dso, e, section, header.sh_link,
+ header.sh_entsize))
+ goto err_out;
+ }
+
+ /* now when strings are finalized, adjust pointers properly */
+ for (i = 0; i < dso->syms_sz; i++)
+ dso->syms[i].name =
+ btf__name_by_offset(dso->btf,
+ (unsigned long)dso->syms[i].name);
+
+ qsort(dso->syms, dso->syms_sz, sizeof(*dso->syms), sym_cmp);
+
+ close_elf(e, fd);
+ return 0;
+
+err_out:
+ dso__free_fields(dso);
+ close_elf(e, fd);
+ return -1;
+}
+
+static int create_tmp_vdso_image(struct dso *dso)
+{
+ uint64_t start_addr, end_addr;
+ long pid = getpid();
+ char buf[PATH_MAX];
+ void *image = NULL;
+ char tmpfile[128];
+ int ret, fd = -1;
+ uint64_t sz;
+ char *name;
+ FILE *f;
+
+ snprintf(tmpfile, sizeof(tmpfile), "/proc/%ld/maps", pid);
+ f = fopen(tmpfile, "r");
+ if (!f)
+ return -1;
+
+ while (true) {
+ ret = fscanf(f, "%lx-%lx %*s %*x %*x:%*x %*u%[^\n]",
+ &start_addr, &end_addr, buf);
+ if (ret == EOF && feof(f))
+ break;
+ if (ret != 3)
+ goto err_out;
+
+ name = buf;
+ while (isspace(*name))
+ name++;
+ if (!is_file_backed(name))
+ continue;
+ if (is_vdso(name))
+ break;
+ }
+
+ sz = end_addr - start_addr;
+ image = malloc(sz);
+ if (!image)
+ goto err_out;
+ memcpy(image, (void *)start_addr, sz);
+
+ snprintf(tmpfile, sizeof(tmpfile),
+ "/tmp/libbpf_%ld_vdso_image_XXXXXX", pid);
+ fd = mkostemp(tmpfile, O_CLOEXEC);
+ if (fd < 0) {
+ fprintf(stderr, "failed to create temp file: %s\n",
+ strerror(errno));
+ goto err_out;
+ }
+ /* Unlink the file to avoid leaking */
+ if (unlink(tmpfile) == -1)
+ fprintf(stderr, "failed to unlink %s: %s\n", tmpfile,
+ strerror(errno));
+ if (write(fd, image, sz) == -1) {
+ fprintf(stderr, "failed to write to vDSO image: %s\n",
+ strerror(errno));
+ close(fd);
+ fd = -1;
+ goto err_out;
+ }
+
+err_out:
+ fclose(f);
+ free(image);
+ return fd;
+}
+
+static int dso__load_sym_table_from_vdso_image(struct dso *dso)
+{
+ int fd = create_tmp_vdso_image(dso);
+
+ if (fd < 0)
+ return -1;
+ return dso__load_sym_table_from_elf(dso, fd);
+}
+
+static int dso__load_sym_table(struct dso *dso)
+{
+ if (dso->type == UNKNOWN)
+ return -1;
+ if (dso->type == PERF_MAP)
+ return dso__load_sym_table_from_perf_map(dso);
+ if (dso->type == EXEC || dso->type == DYN)
+ return dso__load_sym_table_from_elf(dso, 0);
+ if (dso->type == VDSO)
+ return dso__load_sym_table_from_vdso_image(dso);
+ return -1;
+}
+
+static struct sym *dso__find_sym(struct dso *dso, uint64_t offset)
+{
+ unsigned long sym_addr;
+ int start, end, mid;
+
+ if (!dso->syms && dso__load_sym_table(dso))
+ return NULL;
+
+ start = 0;
+ end = dso->syms_sz - 1;
+
+ /* find largest sym_addr <= addr using binary search */
+ while (start < end) {
+ mid = start + (end - start + 1) / 2;
+ sym_addr = dso->syms[mid].start;
+
+ if (sym_addr <= offset)
+ start = mid;
+ else
+ end = mid - 1;
+ }
+
+ if (start == end && dso->syms[start].start <= offset) {
+ (dso->syms[start]).offset = offset - dso->syms[start].start;
+ return &dso->syms[start];
+ }
+ return NULL;
+}
+
+struct syms *syms__load_file(const char *fname)
+{
+ char buf[PATH_MAX], perm[5];
+ struct syms *syms;
+ struct map map;
+ char *name;
+ FILE *f;
+ int ret;
+
+ f = fopen(fname, "r");
+ if (!f)
+ return NULL;
+
+ syms = calloc(1, sizeof(*syms));
+ if (!syms)
+ goto err_out;
+
+ while (true) {
+ ret = fscanf(f, "%lx-%lx %4s %lx %lx:%lx %lu%[^\n]",
+ &map.start_addr, &map.end_addr, perm,
+ &map.file_off, &map.dev_major,
+ &map.dev_minor, &map.inode, buf);
+ if (ret == EOF && feof(f))
+ break;
+ if (ret != 8) /* perf-<PID>.map */
+ goto err_out;
+
+ if (perm[2] != 'x')
+ continue;
+
+ name = buf;
+ while (isspace(*name))
+ name++;
+ if (!is_file_backed(name))
+ continue;
+
+ if (syms__add_dso(syms, &map, name))
+ goto err_out;
+ }
+
+ fclose(f);
+ return syms;
+
+err_out:
+ syms__free(syms);
+ fclose(f);
+ return NULL;
+}
+
+struct syms *syms__load_pid(pid_t tgid)
+{
+ char fname[128];
+
+ snprintf(fname, sizeof(fname), "/proc/%ld/maps", (long)tgid);
+ return syms__load_file(fname);
+}
+
+void syms__free(struct syms *syms)
+{
+ int i;
+
+ if (!syms)
+ return;
+
+ for (i = 0; i < syms->dso_sz; i++)
+ dso__free_fields(&syms->dsos[i]);
+ free(syms->dsos);
+ free(syms);
+}
+
+const struct sym *syms__map_addr(const struct syms *syms, unsigned long addr)
+{
+ struct dso *dso;
+ uint64_t offset;
+
+ dso = syms__find_dso(syms, addr, &offset);
+ if (!dso)
+ return NULL;
+ return dso__find_sym(dso, offset);
+}
+
+const struct sym *syms__map_addr_dso(const struct syms *syms, unsigned long addr,
+ char **dso_name, uint64_t *dso_offset)
+{
+ struct dso *dso;
+ uint64_t offset;
+
+ dso = syms__find_dso(syms, addr, &offset);
+ if (!dso)
+ return NULL;
+
+ *dso_name = dso->name;
+ *dso_offset = offset;
+
+ return dso__find_sym(dso, offset);
+}
+
+struct syms_cache {
+ struct {
+ struct syms *syms;
+ int tgid;
+ } *data;
+ int nr;
+};
+
+struct syms_cache *syms_cache__new(int nr)
+{
+ struct syms_cache *syms_cache;
+
+ syms_cache = calloc(1, sizeof(*syms_cache));
+ if (!syms_cache)
+ return NULL;
+ if (nr > 0)
+ syms_cache->data = calloc(nr, sizeof(*syms_cache->data));
+ return syms_cache;
+}
+
+void syms_cache__free(struct syms_cache *syms_cache)
+{
+ int i;
+
+ if (!syms_cache)
+ return;
+
+ for (i = 0; i < syms_cache->nr; i++)
+ syms__free(syms_cache->data[i].syms);
+ free(syms_cache->data);
+ free(syms_cache);
+}
+
+struct syms *syms_cache__get_syms(struct syms_cache *syms_cache, int tgid)
+{
+ void *tmp;
+ int i;
+
+ for (i = 0; i < syms_cache->nr; i++) {
+ if (syms_cache->data[i].tgid == tgid)
+ return syms_cache->data[i].syms;
+ }
+
+ tmp = realloc(syms_cache->data, (syms_cache->nr + 1) *
+ sizeof(*syms_cache->data));
+ if (!tmp)
+ return NULL;
+ syms_cache->data = tmp;
+ syms_cache->data[syms_cache->nr].syms = syms__load_pid(tgid);
+ syms_cache->data[syms_cache->nr].tgid = tgid;
+ return syms_cache->data[syms_cache->nr++].syms;
+}
+
+struct partitions {
+ struct partition *items;
+ int sz;
+};
+
+static int partitions__add_partition(struct partitions *partitions,
+ const char *name, unsigned int dev)
+{
+ struct partition *partition;
+ void *tmp;
+
+ tmp = realloc(partitions->items, (partitions->sz + 1) *
+ sizeof(*partitions->items));
+ if (!tmp)
+ return -1;
+ partitions->items = tmp;
+ partition = &partitions->items[partitions->sz];
+ partition->name = strdup(name);
+ partition->dev = dev;
+ partitions->sz++;
+
+ return 0;
+}
+
+struct partitions *partitions__load(void)
+{
+ char part_name[DISK_NAME_LEN];
+ unsigned int devmaj, devmin;
+ unsigned long long nop;
+ struct partitions *partitions;
+ char buf[64];
+ FILE *f;
+
+ f = fopen("/proc/partitions", "r");
+ if (!f)
+ return NULL;
+
+ partitions = calloc(1, sizeof(*partitions));
+ if (!partitions)
+ goto err_out;
+
+ while (fgets(buf, sizeof(buf), f) != NULL) {
+ /* skip heading */
+ if (buf[0] != ' ' || buf[0] == '\n')
+ continue;
+ if (sscanf(buf, "%u %u %llu %s", &devmaj, &devmin, &nop,
+ part_name) != 4)
+ goto err_out;
+ if (partitions__add_partition(partitions, part_name,
+ MKDEV(devmaj, devmin)))
+ goto err_out;
+ }
+
+ fclose(f);
+ return partitions;
+
+err_out:
+ partitions__free(partitions);
+ fclose(f);
+ return NULL;
+}
+
+void partitions__free(struct partitions *partitions)
+{
+ int i;
+
+ if (!partitions)
+ return;
+
+ for (i = 0; i < partitions->sz; i++)
+ free(partitions->items[i].name);
+ free(partitions->items);
+ free(partitions);
+}
+
+const struct partition *
+partitions__get_by_dev(const struct partitions *partitions, unsigned int dev)
+{
+ int i;
+
+ for (i = 0; i < partitions->sz; i++) {
+ if (partitions->items[i].dev == dev)
+ return &partitions->items[i];
+ }
+
+ return NULL;
+}
+
+const struct partition *
+partitions__get_by_name(const struct partitions *partitions, const char *name)
+{
+ int i;
+
+ for (i = 0; i < partitions->sz; i++) {
+ if (strcmp(partitions->items[i].name, name) == 0)
+ return &partitions->items[i];
+ }
+
+ return NULL;
+}
+
+static void print_stars(unsigned int val, unsigned int val_max, int width)
+{
+ int num_stars, num_spaces, i;
+ bool need_plus;
+
+ num_stars = min(val, val_max) * width / val_max;
+ num_spaces = width - num_stars;
+ need_plus = val > val_max;
+
+ for (i = 0; i < num_stars; i++)
+ printf("*");
+ for (i = 0; i < num_spaces; i++)
+ printf(" ");
+ if (need_plus)
+ printf("+");
+}
+
+void print_log2_hist(unsigned int *vals, int vals_size, const char *val_type)
+{
+ int stars_max = 40, idx_max = -1;
+ unsigned int val, val_max = 0;
+ unsigned long long low, high;
+ int stars, width, i;
+
+ for (i = 0; i < vals_size; i++) {
+ val = vals[i];
+ if (val > 0)
+ idx_max = i;
+ if (val > val_max)
+ val_max = val;
+ }
+
+ if (idx_max < 0)
+ return;
+
+ printf("%*s%-*s : count distribution\n", idx_max <= 32 ? 5 : 15, "",
+ idx_max <= 32 ? 19 : 29, val_type);
+
+ if (idx_max <= 32)
+ stars = stars_max;
+ else
+ stars = stars_max / 2;
+
+ for (i = 0; i <= idx_max; i++) {
+ low = (1ULL << (i + 1)) >> 1;
+ high = (1ULL << (i + 1)) - 1;
+ if (low == high)
+ low -= 1;
+ val = vals[i];
+ width = idx_max <= 32 ? 10 : 20;
+ printf("%*lld -> %-*lld : %-8d |", width, low, width, high, val);
+ print_stars(val, val_max, stars);
+ printf("|\n");
+ }
+}
+
+void print_linear_hist(unsigned int *vals, int vals_size, unsigned int base,
+ unsigned int step, const char *val_type)
+{
+ int i, stars_max = 40, idx_min = -1, idx_max = -1;
+ unsigned int val, val_max = 0;
+
+ for (i = 0; i < vals_size; i++) {
+ val = vals[i];
+ if (val > 0) {
+ idx_max = i;
+ if (idx_min < 0)
+ idx_min = i;
+ }
+ if (val > val_max)
+ val_max = val;
+ }
+
+ if (idx_max < 0)
+ return;
+
+ printf(" %-13s : count distribution\n", val_type);
+ for (i = idx_min; i <= idx_max; i++) {
+ val = vals[i];
+ printf(" %-10d : %-8d |", base + i * step, val);
+ print_stars(val, val_max, stars_max);
+ printf("|\n");
+ }
+}
+
+unsigned long long get_ktime_ns(void)
+{
+ struct timespec ts;
+
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+ return ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec;
+}
+
+bool is_kernel_module(const char *name)
+{
+ bool found = false;
+ char buf[64];
+ FILE *f;
+
+ f = fopen("/proc/modules", "r");
+ if (!f)
+ return false;
+
+ while (fgets(buf, sizeof(buf), f) != NULL) {
+ if (sscanf(buf, "%s %*s\n", buf) != 1)
+ break;
+ if (!strcmp(buf, name)) {
+ found = true;
+ break;
+ }
+ }
+
+ fclose(f);
+ return found;
+}
+
+static bool fentry_try_attach(int id)
+{
+ struct bpf_insn insns[] = { { .code = BPF_JMP | BPF_EXIT } };
+ LIBBPF_OPTS(bpf_prog_load_opts, opts);
+ int prog_fd, attach_fd;
+
+ opts.expected_attach_type = BPF_TRACE_FENTRY;
+ opts.attach_btf_id = id,
+
+ prog_fd = bpf_prog_load(BPF_PROG_TYPE_TRACING, "test", NULL, insns, 1, &opts);
+ if (prog_fd < 0)
+ return false;
+
+ attach_fd = bpf_raw_tracepoint_open(NULL, prog_fd);
+ if (attach_fd >= 0)
+ close(attach_fd);
+
+ close(prog_fd);
+ return attach_fd >= 0;
+}
+
+bool fentry_can_attach(const char *name, const char *mod)
+{
+ const char sysfs_vmlinux[] = "/sys/kernel/btf/vmlinux";
+ struct btf *base, *btf = NULL;
+ char sysfs_mod[80];
+ int id = -1, err;
+
+ base = btf__parse(sysfs_vmlinux, NULL);
+ if (!base) {
+ err = -errno;
+ fprintf(stderr, "failed to parse vmlinux BTF at '%s': %s\n",
+ sysfs_vmlinux, strerror(-err));
+ goto err_out;
+ }
+ if (mod && module_btf_exists(mod)) {
+ snprintf(sysfs_mod, sizeof(sysfs_mod), "/sys/kernel/btf/%s", mod);
+ btf = btf__parse_split(sysfs_mod, base);
+ if (!btf) {
+ err = -errno;
+ fprintf(stderr, "failed to load BTF from %s: %s\n",
+ sysfs_mod, strerror(-err));
+ btf = base;
+ base = NULL;
+ }
+ } else {
+ btf = base;
+ base = NULL;
+ }
+
+ id = btf__find_by_name_kind(btf, name, BTF_KIND_FUNC);
+
+err_out:
+ btf__free(btf);
+ btf__free(base);
+ return id > 0 && fentry_try_attach(id);
+}
+
+bool kprobe_exists(const char *name)
+{
+ char sym_name[256];
+ FILE *f;
+ int ret;
+
+ f = fopen("/sys/kernel/debug/tracing/available_filter_functions", "r");
+ if (!f)
+ goto slow_path;
+
+ while (true) {
+ ret = fscanf(f, "%s%*[^\n]\n", sym_name);
+ if (ret == EOF && feof(f))
+ break;
+ if (ret != 1) {
+ fprintf(stderr, "failed to read symbol from available_filter_functions\n");
+ break;
+ }
+ if (!strcmp(name, sym_name)) {
+ fclose(f);
+ return true;
+ }
+ }
+
+ fclose(f);
+ return false;
+
+slow_path:
+ f = fopen("/proc/kallsyms", "r");
+ if (!f)
+ return false;
+
+ while (true) {
+ ret = fscanf(f, "%*x %*c %s%*[^\n]\n", sym_name);
+ if (ret == EOF && feof(f))
+ break;
+ if (ret != 1) {
+ fprintf(stderr, "failed to read symbol from kallsyms\n");
+ break;
+ }
+ if (!strcmp(name, sym_name)) {
+ fclose(f);
+ return true;
+ }
+ }
+
+ fclose(f);
+ return false;
+}
+
+bool vmlinux_btf_exists(void)
+{
+ if (!access("/sys/kernel/btf/vmlinux", R_OK))
+ return true;
+ return false;
+}
+
+bool module_btf_exists(const char *mod)
+{
+ char sysfs_mod[80];
+
+ if (mod) {
+ snprintf(sysfs_mod, sizeof(sysfs_mod), "/sys/kernel/btf/%s", mod);
+ if (!access(sysfs_mod, R_OK))
+ return true;
+ }
+ return false;
+}
diff --git a/helpers/trace_helpers.h b/helpers/trace_helpers.h
new file mode 100644
index 0000000..9027f83
--- /dev/null
+++ b/helpers/trace_helpers.h
@@ -0,0 +1,100 @@
+/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
+#ifndef __TRACE_HELPERS_H
+#define __TRACE_HELPERS_H
+
+#include <stdbool.h>
+
+#define NSEC_PER_SEC 1000000000ULL
+
+struct ksym {
+ const char *name;
+ unsigned long addr;
+};
+
+struct ksyms;
+
+struct ksyms *ksyms__load(void);
+void ksyms__free(struct ksyms *ksyms);
+const struct ksym *ksyms__map_addr(const struct ksyms *ksyms,
+ unsigned long addr);
+const struct ksym *ksyms__get_symbol(const struct ksyms *ksyms,
+ const char *name);
+
+struct sym {
+ const char *name;
+ unsigned long start;
+ unsigned long size;
+ unsigned long offset;
+};
+
+struct syms;
+
+struct syms *syms__load_pid(int tgid);
+struct syms *syms__load_file(const char *fname);
+void syms__free(struct syms *syms);
+const struct sym *syms__map_addr(const struct syms *syms, unsigned long addr);
+const struct sym *syms__map_addr_dso(const struct syms *syms, unsigned long addr,
+ char **dso_name, uint64_t *dso_offset);
+
+struct syms_cache;
+
+struct syms_cache *syms_cache__new(int nr);
+struct syms *syms_cache__get_syms(struct syms_cache *syms_cache, int tgid);
+void syms_cache__free(struct syms_cache *syms_cache);
+
+struct partition {
+ char *name;
+ unsigned int dev;
+};
+
+struct partitions;
+
+struct partitions *partitions__load(void);
+void partitions__free(struct partitions *partitions);
+const struct partition *
+partitions__get_by_dev(const struct partitions *partitions, unsigned int dev);
+const struct partition *
+partitions__get_by_name(const struct partitions *partitions, const char *name);
+
+void print_log2_hist(unsigned int *vals, int vals_size, const char *val_type);
+void print_linear_hist(unsigned int *vals, int vals_size, unsigned int base,
+ unsigned int step, const char *val_type);
+
+unsigned long long get_ktime_ns(void);
+
+bool is_kernel_module(const char *name);
+
+/*
+ * When attempting to use kprobe/kretprobe, please check out new fentry/fexit
+ * probes, as they provide better performance and usability. But in some
+ * situations we have to fallback to kprobe/kretprobe probes. This helper
+ * is used to detect fentry/fexit support for the specified kernel function.
+ *
+ * 1. A gap between kernel versions, kernel BTF is exposed
+ * starting from 5.4 kernel. but fentry/fexit is actually
+ * supported starting from 5.5.
+ * 2. Whether kernel supports module BTF or not
+ *
+ * *name* is the name of a kernel function to be attached to, which can be
+ * from vmlinux or a kernel module.
+ * *mod* is a hint that indicates the *name* may reside in module BTF,
+ * if NULL, it means *name* belongs to vmlinux.
+ */
+bool fentry_can_attach(const char *name, const char *mod);
+
+/*
+ * The name of a kernel function to be attached to may be changed between
+ * kernel releases. This helper is used to confirm whether the target kernel
+ * uses a certain function name before attaching.
+ *
+ * It is achieved by scaning
+ * /sys/kernel/debug/tracing/available_filter_functions
+ * If this file does not exist, it fallbacks to parse /proc/kallsyms,
+ * which is slower.
+ */
+bool kprobe_exists(const char *name);
+
+bool vmlinux_btf_exists(void);
+bool module_btf_exists(const char *mod);
+
+#endif /* __TRACE_HELPERS_H */
diff --git a/helpers/uprobe_helpers.c b/helpers/uprobe_helpers.c
new file mode 100644
index 0000000..953cea1
--- /dev/null
+++ b/helpers/uprobe_helpers.c
@@ -0,0 +1,289 @@
+// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
+/* Copyright (c) 2021 Google LLC. */
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <limits.h>
+#include <gelf.h>
+
+#define warn(...) fprintf(stderr, __VA_ARGS__)
+
+/*
+ * Returns 0 on success; -1 on failure. On sucess, returns via `path` the full
+ * path to the program for pid.
+ */
+int get_pid_binary_path(pid_t pid, char *path, size_t path_sz)
+{
+ ssize_t ret;
+ char proc_pid_exe[32];
+
+ if (snprintf(proc_pid_exe, sizeof(proc_pid_exe), "/proc/%d/exe", pid)
+ >= sizeof(proc_pid_exe)) {
+ warn("snprintf /proc/PID/exe failed");
+ return -1;
+ }
+ ret = readlink(proc_pid_exe, path, path_sz);
+ if (ret < 0) {
+ warn("No such pid %d\n", pid);
+ return -1;
+ }
+ if (ret >= path_sz) {
+ warn("readlink truncation");
+ return -1;
+ }
+ path[ret] = '\0';
+
+ return 0;
+}
+
+/*
+ * Returns 0 on success; -1 on failure. On success, returns via `path` the full
+ * path to a library matching the name `lib` that is loaded into pid's address
+ * space.
+ */
+int get_pid_lib_path(pid_t pid, const char *lib, char *path, size_t path_sz)
+{
+ FILE *maps;
+ char *p;
+ char proc_pid_maps[32];
+ char line_buf[1024];
+
+ if (snprintf(proc_pid_maps, sizeof(proc_pid_maps), "/proc/%d/maps", pid)
+ >= sizeof(proc_pid_maps)) {
+ warn("snprintf /proc/PID/maps failed");
+ return -1;
+ }
+ maps = fopen(proc_pid_maps, "r");
+ if (!maps) {
+ warn("No such pid %d\n", pid);
+ return -1;
+ }
+ while (fgets(line_buf, sizeof(line_buf), maps)) {
+ if (sscanf(line_buf, "%*x-%*x %*s %*x %*s %*u %s", path) != 1)
+ continue;
+ /* e.g. /usr/lib/x86_64-linux-gnu/libc-2.31.so */
+ p = strrchr(path, '/');
+ if (!p)
+ continue;
+ if (strncmp(p, "/lib", 4))
+ continue;
+ p += 4;
+ if (strncmp(lib, p, strlen(lib)))
+ continue;
+ p += strlen(lib);
+ /* libraries can have - or . after the name */
+ if (*p != '.' && *p != '-')
+ continue;
+
+ fclose(maps);
+ return 0;
+ }
+
+ warn("Cannot find library %s\n", lib);
+ fclose(maps);
+ return -1;
+}
+
+/*
+ * Returns 0 on success; -1 on failure. On success, returns via `path` the full
+ * path to the program.
+ */
+static int which_program(const char *prog, char *path, size_t path_sz)
+{
+ FILE *which;
+ char cmd[100];
+
+ if (snprintf(cmd, sizeof(cmd), "which %s", prog) >= sizeof(cmd)) {
+ warn("snprintf which prog failed");
+ return -1;
+ }
+ which = popen(cmd, "r");
+ if (!which) {
+ warn("which failed");
+ return -1;
+ }
+ if (!fgets(path, path_sz, which)) {
+ warn("fgets which failed");
+ pclose(which);
+ return -1;
+ }
+ /* which has a \n at the end of the string */
+ path[strlen(path) - 1] = '\0';
+ pclose(which);
+ return 0;
+}
+
+/*
+ * Returns 0 on success; -1 on failure. On success, returns via `path` the full
+ * path to the binary for the given pid.
+ * 1) pid == x, binary == "" : returns the path to x's program
+ * 2) pid == x, binary == "foo" : returns the path to libfoo linked in x
+ * 3) pid == 0, binary == "" : failure: need a pid or a binary
+ * 4) pid == 0, binary == "bar" : returns the path to `which bar`
+ *
+ * For case 4), ideally we'd like to search for libbar too, but we don't support
+ * that yet.
+ */
+int resolve_binary_path(const char *binary, pid_t pid, char *path, size_t path_sz)
+{
+ if (!strcmp(binary, "")) {
+ if (!pid) {
+ warn("Uprobes need a pid or a binary\n");
+ return -1;
+ }
+ return get_pid_binary_path(pid, path, path_sz);
+ }
+ if (pid)
+ return get_pid_lib_path(pid, binary, path, path_sz);
+
+ if (which_program(binary, path, path_sz)) {
+ /*
+ * If the user is tracing a program by name, we can find it.
+ * But we can't find a library by name yet. We'd need to parse
+ * ld.so.cache or something similar.
+ */
+ warn("Can't find %s (Need a PID if this is a library)\n", binary);
+ return -1;
+ }
+ return 0;
+}
+
+/*
+ * Opens an elf at `path` of kind ELF_K_ELF. Returns NULL on failure. On
+ * success, close with close_elf(e, fd_close).
+ */
+Elf *open_elf(const char *path, int *fd_close)
+{
+ int fd;
+ Elf *e;
+
+ if (elf_version(EV_CURRENT) == EV_NONE) {
+ warn("elf init failed\n");
+ return NULL;
+ }
+ fd = open(path, O_RDONLY);
+ if (fd < 0) {
+ warn("Could not open %s\n", path);
+ return NULL;
+ }
+ e = elf_begin(fd, ELF_C_READ, NULL);
+ if (!e) {
+ warn("elf_begin failed: %s\n", elf_errmsg(-1));
+ close(fd);
+ return NULL;
+ }
+ if (elf_kind(e) != ELF_K_ELF) {
+ warn("elf kind %d is not ELF_K_ELF\n", elf_kind(e));
+ elf_end(e);
+ close(fd);
+ return NULL;
+ }
+ *fd_close = fd;
+ return e;
+}
+
+Elf *open_elf_by_fd(int fd)
+{
+ Elf *e;
+
+ if (elf_version(EV_CURRENT) == EV_NONE) {
+ warn("elf init failed\n");
+ return NULL;
+ }
+ e = elf_begin(fd, ELF_C_READ, NULL);
+ if (!e) {
+ warn("elf_begin failed: %s\n", elf_errmsg(-1));
+ close(fd);
+ return NULL;
+ }
+ if (elf_kind(e) != ELF_K_ELF) {
+ warn("elf kind %d is not ELF_K_ELF\n", elf_kind(e));
+ elf_end(e);
+ close(fd);
+ return NULL;
+ }
+ return e;
+}
+
+void close_elf(Elf *e, int fd_close)
+{
+ elf_end(e);
+ close(fd_close);
+}
+
+/* Returns the offset of a function in the elf file `path`, or -1 on failure. */
+off_t get_elf_func_offset(const char *path, const char *func)
+{
+ off_t ret = -1;
+ int i, fd = -1;
+ Elf *e;
+ Elf_Scn *scn;
+ Elf_Data *data;
+ GElf_Ehdr ehdr;
+ GElf_Shdr shdr[1];
+ GElf_Phdr phdr;
+ GElf_Sym sym[1];
+ size_t shstrndx, nhdrs;
+ char *n;
+
+ e = open_elf(path, &fd);
+
+ if (!gelf_getehdr(e, &ehdr))
+ goto out;
+
+ if (elf_getshdrstrndx(e, &shstrndx) != 0)
+ goto out;
+
+ scn = NULL;
+ while ((scn = elf_nextscn(e, scn))) {
+ if (!gelf_getshdr(scn, shdr))
+ continue;
+ if (!(shdr->sh_type == SHT_SYMTAB || shdr->sh_type == SHT_DYNSYM))
+ continue;
+ data = NULL;
+ while ((data = elf_getdata(scn, data))) {
+ for (i = 0; gelf_getsym(data, i, sym); i++) {
+ n = elf_strptr(e, shdr->sh_link, sym->st_name);
+ if (!n)
+ continue;
+ if (GELF_ST_TYPE(sym->st_info) != STT_FUNC)
+ continue;
+ if (!strcmp(n, func)) {
+ ret = sym->st_value;
+ goto check;
+ }
+ }
+ }
+ }
+
+check:
+ if (ehdr.e_type == ET_EXEC || ehdr.e_type == ET_DYN) {
+ if (elf_getphdrnum(e, &nhdrs) != 0) {
+ ret = -1;
+ goto out;
+ }
+ for (i = 0; i < (int)nhdrs; i++) {
+ if (!gelf_getphdr(e, i, &phdr))
+ continue;
+ if (phdr.p_type != PT_LOAD || !(phdr.p_flags & PF_X))
+ continue;
+ if (phdr.p_vaddr <= ret && ret < (phdr.p_vaddr + phdr.p_memsz)) {
+ ret = ret - phdr.p_vaddr + phdr.p_offset;
+ goto out;
+ }
+ }
+ ret = -1;
+ }
+out:
+ close_elf(e, fd);
+ return ret;
+}
diff --git a/helpers/uprobe_helpers.h b/helpers/uprobe_helpers.h
new file mode 100644
index 0000000..47f77bb
--- /dev/null
+++ b/helpers/uprobe_helpers.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
+/* Copyright (c) 2021 Google LLC. */
+#ifndef __UPROBE_HELPERS_H
+#define __UPROBE_HELPERS_H
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <gelf.h>
+
+int get_pid_binary_path(pid_t pid, char *path, size_t path_sz);
+int get_pid_lib_path(pid_t pid, const char *lib, char *path, size_t path_sz);
+int resolve_binary_path(const char *binary, pid_t pid, char *path, size_t path_sz);
+off_t get_elf_func_offset(const char *path, const char *func);
+Elf *open_elf(const char *path, int *fd_close);
+Elf *open_elf_by_fd(int fd);
+void close_elf(Elf *e, int fd_close);
+
+#endif /* __UPROBE_HELPERS_H */
diff --git a/libbpf b/libbpf
new file mode 160000
index 0000000..10a3213
--- /dev/null
+++ b/libbpf
@@ -0,0 +1 @@
+Subproject commit 10a32130e727719a69e1b2b10815af7c2e245be7
diff --git a/profiler/Makefile b/profiler/Makefile
new file mode 100644
index 0000000..8424ed3
--- /dev/null
+++ b/profiler/Makefile
@@ -0,0 +1,99 @@
+# SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
+# from https://github.com/libbpf/libbpf-bootstrap/
+OUTPUT := .output
+CLANG ?= clang
+LLVM_STRIP ?= llvm-strip
+BPFTOOL ?= $(abspath ../tools/bpftool)
+LIBBPF_SRC := $(abspath ../libbpf/src)
+LIBBPF_OBJ := $(abspath $(OUTPUT)/libbpf.a)
+ARCH := $(shell uname -m | sed 's/x86_64/x86/' | sed 's/aarch64/arm64/' | sed 's/ppc64le/powerpc/' | sed 's/mips.*/mips/')
+VMLINUX := ../vmlinux/$(ARCH)/vmlinux.h
+HELPERS := $(abspath ../helpers)
+# Use our own libbpf API headers and Linux UAPI headers distributed with
+# libbpf to avoid dependency on system-wide headers, which could be missing or
+# outdated
+INCLUDES := -I$(OUTPUT) -I../libbpf/include/uapi -I$(dir $(VMLINUX)) -I$(HELPERS)
+CFLAGS := -g -Wall -fsanitize=address
+
+APPS = profile
+
+# Get Clang's default includes on this system. We'll explicitly add these dirs
+# to the includes list when compiling with `-target bpf` because otherwise some
+# architecture-specific dirs will be "missing" on some architectures/distros -
+# headers such as asm/types.h, asm/byteorder.h, asm/socket.h, asm/sockios.h,
+# sys/cdefs.h etc. might be missing.
+#
+# Use '-idirafter': Don't interfere with include mechanics except where the
+# build would have failed anyways.
+CLANG_BPF_SYS_INCLUDES = $(shell $(CLANG) -v -E - </dev/null 2>&1 \
+ | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }')
+
+ifeq ($(V),1)
+ Q =
+ msg =
+else
+ Q = @
+ msg = @printf ' %-8s %s%s\n' \
+ "$(1)" \
+ "$(patsubst $(abspath $(OUTPUT))/%,%,$(2))" \
+ "$(if $(3), $(3))";
+ MAKEFLAGS += --no-print-directory
+endif
+
+.PHONY: all
+all: $(APPS)
+
+.PHONY: clean
+clean:
+ $(call msg,CLEAN)
+ $(Q)rm -rf $(OUTPUT) $(APPS) *.o
+
+$(OUTPUT) $(OUTPUT)/libbpf:
+ $(call msg,MKDIR,$@)
+ $(Q)mkdir -p $@
+
+# Build libbpf
+$(LIBBPF_OBJ): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(OUTPUT)/libbpf
+ $(call msg,LIB,$@)
+ $(Q)$(MAKE) -C $(LIBBPF_SRC) BUILD_STATIC_ONLY=1 \
+ OBJDIR=$(dir $@)/libbpf DESTDIR=$(dir $@) \
+ INCLUDEDIR= LIBDIR= UAPIDIR= \
+ install
+
+# Build BPF code
+$(OUTPUT)/%.bpf.o: %.bpf.c $(LIBBPF_OBJ) $(wildcard %.h) $(VMLINUX) | $(OUTPUT)
+ $(call msg,BPF,$@)
+ $(Q)$(CLANG) -g -O2 -target bpf -D__TARGET_ARCH_$(ARCH) $(INCLUDES) $(CLANG_BPF_SYS_INCLUDES) -c $(filter %.c,$^) -o $@
+ $(Q)$(LLVM_STRIP) -g $@ # strip useless DWARF info
+
+# Generate BPF skeletons
+$(OUTPUT)/%.skel.h: $(OUTPUT)/%.bpf.o | $(OUTPUT)
+ $(call msg,GEN-SKEL,$@)
+ $(Q)$(BPFTOOL) gen skeleton $< > $@
+
+# Build user-space code
+$(patsubst %,$(OUTPUT)/%.o,$(APPS)): %.o: %.skel.h
+
+$(OUTPUT)/%.o: %.c $(wildcard %.h) | $(OUTPUT)
+ $(call msg,CC,$@)
+ $(Q)$(CC) $(CFLAGS) $(INCLUDES) -c $(filter %.c,$^) -o $@
+
+trace_helpers.o: $(HELPERS)/trace_helpers.c
+ $(Q)$(CC) $(CFLAGS) $(INCLUDES) -c $(filter %.c,$^) -o $@
+
+uprobe_helpers.o: $(HELPERS)/uprobe_helpers.c
+ $(Q)$(CC) $(CFLAGS) $(INCLUDES) -c $(filter %.c,$^) -o $@
+
+lua_stacks_helper.o: lua_stacks_helper.cpp profile.h lua_stacks_helper.h
+ $(CC) $(CFLAGS) $(INCLUDES) -c $(filter %.cpp,$^) -o $@
+
+# Build application binary
+$(APPS): %: $(OUTPUT)/%.o uprobe_helpers.o trace_helpers.o lua_stacks_helper.o $(LIBBPF_OBJ) | $(OUTPUT)
+ $(call msg,BINARY,$@)
+ $(Q)$(CXX) $(CFLAGS) $^ -lelf -lz -o $@
+
+# delete failed targets
+.DELETE_ON_ERROR:
+
+# keep intermediate (.skel.h, .bpf.o, etc) targets
+.SECONDARY:
diff --git a/tools/bpftool b/tools/bpftool
new file mode 100755
index 0000000..c562988
Binary files /dev/null and b/tools/bpftool differ
diff --git a/tools/gen_vmlinux_h.sh b/tools/gen_vmlinux_h.sh
new file mode 100755
index 0000000..57e7635
--- /dev/null
+++ b/tools/gen_vmlinux_h.sh
@@ -0,0 +1,8 @@
+#/bin/sh
+
+# Copyright 2017 Netflix, Inc.
+# Licensed under the Apache License, Version 2.0 (the "License")
+#
+# 10-Apr-2017 Brendan Gregg Created this.
+
+$(dirname "$0")/bpftool btf dump file ${1:-/sys/kernel/btf/vmlinux} format c
diff --git a/vmlinux/arm64/vmlinux.h b/vmlinux/arm64/vmlinux.h
new file mode 120000
index 0000000..a8f8eed
--- /dev/null
+++ b/vmlinux/arm64/vmlinux.h
@@ -0,0 +1 @@
+vmlinux_516.h
\ No newline at end of file
diff --git a/vmlinux/arm64/vmlinux_516.h b/vmlinux/arm64/vmlinux_516.h
new file mode 100644
index 0000000..4802dc4
--- /dev/null
+++ b/vmlinux/arm64/vmlinux_516.h
@@ -0,0 +1,160927 @@
+#ifndef __VMLINUX_H__
+#define __VMLINUX_H__
+
+#ifndef BPF_NO_PRESERVE_ACCESS_INDEX
+#pragma clang attribute push (__attribute__((preserve_access_index)), apply_to = record)
+#endif
+
+typedef signed char __s8;
+
+typedef unsigned char __u8;
+
+typedef short int __s16;
+
+typedef short unsigned int __u16;
+
+typedef int __s32;
+
+typedef unsigned int __u32;
+
+typedef long long int __s64;
+
+typedef long long unsigned int __u64;
+
+typedef __s8 s8;
+
+typedef __u8 u8;
+
+typedef __s16 s16;
+
+typedef __u16 u16;
+
+typedef __s32 s32;
+
+typedef __u32 u32;
+
+typedef __s64 s64;
+
+typedef __u64 u64;
+
+enum {
+ false = 0,
+ true = 1,
+};
+
+typedef long int __kernel_long_t;
+
+typedef long unsigned int __kernel_ulong_t;
+
+typedef int __kernel_pid_t;
+
+typedef unsigned int __kernel_uid32_t;
+
+typedef unsigned int __kernel_gid32_t;
+
+typedef __kernel_ulong_t __kernel_size_t;
+
+typedef __kernel_long_t __kernel_ssize_t;
+
+typedef long long int __kernel_loff_t;
+
+typedef long long int __kernel_time64_t;
+
+typedef __kernel_long_t __kernel_clock_t;
+
+typedef int __kernel_timer_t;
+
+typedef int __kernel_clockid_t;
+
+typedef __u32 __le32;
+
+typedef unsigned int __poll_t;
+
+typedef u32 __kernel_dev_t;
+
+typedef __kernel_dev_t dev_t;
+
+typedef short unsigned int umode_t;
+
+typedef __kernel_pid_t pid_t;
+
+typedef __kernel_clockid_t clockid_t;
+
+typedef _Bool bool;
+
+typedef __kernel_uid32_t uid_t;
+
+typedef __kernel_gid32_t gid_t;
+
+typedef __kernel_loff_t loff_t;
+
+typedef __kernel_size_t size_t;
+
+typedef __kernel_ssize_t ssize_t;
+
+typedef s32 int32_t;
+
+typedef u16 uint16_t;
+
+typedef u32 uint32_t;
+
+typedef u64 sector_t;
+
+typedef u64 blkcnt_t;
+
+typedef unsigned int gfp_t;
+
+typedef unsigned int fmode_t;
+
+typedef u64 phys_addr_t;
+
+typedef long unsigned int irq_hw_number_t;
+
+typedef struct {
+ int counter;
+} atomic_t;
+
+typedef struct {
+ s64 counter;
+} atomic64_t;
+
+struct list_head {
+ struct list_head *next;
+ struct list_head *prev;
+};
+
+struct hlist_node;
+
+struct hlist_head {
+ struct hlist_node *first;
+};
+
+struct hlist_node {
+ struct hlist_node *next;
+ struct hlist_node **pprev;
+};
+
+struct callback_head {
+ struct callback_head *next;
+ void (*func)(struct callback_head *);
+};
+
+typedef int (*initcall_t)();
+
+typedef int initcall_entry_t;
+
+struct lock_class_key {};
+
+struct fs_context;
+
+struct fs_parameter_spec;
+
+struct dentry;
+
+struct super_block;
+
+struct module;
+
+struct file_system_type {
+ const char *name;
+ int fs_flags;
+ int (*init_fs_context)(struct fs_context *);
+ const struct fs_parameter_spec *parameters;
+ struct dentry * (*mount)(struct file_system_type *, int, const char *, void *);
+ void (*kill_sb)(struct super_block *);
+ struct module *owner;
+ struct file_system_type *next;
+ struct hlist_head fs_supers;
+ struct lock_class_key s_lock_key;
+ struct lock_class_key s_umount_key;
+ struct lock_class_key s_vfs_rename_key;
+ struct lock_class_key s_writers_key[3];
+ struct lock_class_key i_lock_key;
+ struct lock_class_key i_mutex_key;
+ struct lock_class_key invalidate_lock_key;
+ struct lock_class_key i_mutex_dir_key;
+};
+
+struct obs_kernel_param {
+ const char *str;
+ int (*setup_func)(char *);
+ int early;
+};
+
+struct kernel_symbol {
+ int value_offset;
+ int name_offset;
+ int namespace_offset;
+};
+
+struct jump_entry {
+ s32 code;
+ s32 target;
+ long int key;
+};
+
+struct static_key_mod;
+
+struct static_key {
+ atomic_t enabled;
+ union {
+ long unsigned int type;
+ struct jump_entry *entries;
+ struct static_key_mod *next;
+ };
+};
+
+struct static_key_true {
+ struct static_key key;
+};
+
+struct static_key_false {
+ struct static_key key;
+};
+
+typedef atomic64_t atomic_long_t;
+
+typedef __s64 time64_t;
+
+struct __kernel_timespec {
+ __kernel_time64_t tv_sec;
+ long long int tv_nsec;
+};
+
+struct timespec64 {
+ time64_t tv_sec;
+ long int tv_nsec;
+};
+
+struct qspinlock {
+ union {
+ atomic_t val;
+ struct {
+ u8 locked;
+ u8 pending;
+ };
+ struct {
+ u16 locked_pending;
+ u16 tail;
+ };
+ };
+};
+
+typedef struct qspinlock arch_spinlock_t;
+
+struct qrwlock {
+ union {
+ atomic_t cnts;
+ struct {
+ u8 wlocked;
+ u8 __lstate[3];
+ };
+ };
+ arch_spinlock_t wait_lock;
+};
+
+typedef struct qrwlock arch_rwlock_t;
+
+struct lockdep_map {};
+
+struct raw_spinlock {
+ arch_spinlock_t raw_lock;
+};
+
+typedef struct raw_spinlock raw_spinlock_t;
+
+struct spinlock {
+ union {
+ struct raw_spinlock rlock;
+ };
+};
+
+typedef struct spinlock spinlock_t;
+
+typedef struct {
+ arch_rwlock_t raw_lock;
+} rwlock_t;
+
+struct ratelimit_state {
+ raw_spinlock_t lock;
+ int interval;
+ int burst;
+ int printed;
+ int missed;
+ long unsigned int begin;
+ long unsigned int flags;
+};
+
+struct _ddebug {
+ const char *modname;
+ const char *function;
+ const char *filename;
+ const char *format;
+ unsigned int lineno: 18;
+ unsigned int flags: 8;
+ union {
+ struct static_key_true dd_key_true;
+ struct static_key_false dd_key_false;
+ } key;
+};
+
+typedef void *fl_owner_t;
+
+struct file;
+
+struct kiocb;
+
+struct iov_iter;
+
+struct io_comp_batch;
+
+struct dir_context;
+
+struct poll_table_struct;
+
+struct vm_area_struct;
+
+struct inode;
+
+struct file_lock;
+
+struct page;
+
+struct pipe_inode_info;
+
+struct seq_file;
+
+struct file_operations {
+ struct module *owner;
+ loff_t (*llseek)(struct file *, loff_t, int);
+ ssize_t (*read)(struct file *, char *, size_t, loff_t *);
+ ssize_t (*write)(struct file *, const char *, size_t, loff_t *);
+ ssize_t (*read_iter)(struct kiocb *, struct iov_iter *);
+ ssize_t (*write_iter)(struct kiocb *, struct iov_iter *);
+ int (*iopoll)(struct kiocb *, struct io_comp_batch *, unsigned int);
+ int (*iterate)(struct file *, struct dir_context *);
+ int (*iterate_shared)(struct file *, struct dir_context *);
+ __poll_t (*poll)(struct file *, struct poll_table_struct *);
+ long int (*unlocked_ioctl)(struct file *, unsigned int, long unsigned int);
+ long int (*compat_ioctl)(struct file *, unsigned int, long unsigned int);
+ int (*mmap)(struct file *, struct vm_area_struct *);
+ long unsigned int mmap_supported_flags;
+ int (*open)(struct inode *, struct file *);
+ int (*flush)(struct file *, fl_owner_t);
+ int (*release)(struct inode *, struct file *);
+ int (*fsync)(struct file *, loff_t, loff_t, int);
+ int (*fasync)(int, struct file *, int);
+ int (*lock)(struct file *, int, struct file_lock *);
+ ssize_t (*sendpage)(struct file *, struct page *, int, size_t, loff_t *, int);
+ long unsigned int (*get_unmapped_area)(struct file *, long unsigned int, long unsigned int, long unsigned int, long unsigned int);
+ int (*check_flags)(int);
+ int (*flock)(struct file *, int, struct file_lock *);
+ ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
+ ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
+ int (*setlease)(struct file *, long int, struct file_lock **, void **);
+ long int (*fallocate)(struct file *, int, loff_t, loff_t);
+ void (*show_fdinfo)(struct seq_file *, struct file *);
+ ssize_t (*copy_file_range)(struct file *, loff_t, struct file *, loff_t, size_t, unsigned int);
+ loff_t (*remap_file_range)(struct file *, loff_t, struct file *, loff_t, loff_t, unsigned int);
+ int (*fadvise)(struct file *, loff_t, loff_t, int);
+};
+
+struct bug_entry {
+ int bug_addr_disp;
+ int file_disp;
+ short unsigned int line;
+ short unsigned int flags;
+};
+
+struct static_call_key {
+ void *func;
+};
+
+enum system_states {
+ SYSTEM_BOOTING = 0,
+ SYSTEM_SCHEDULING = 1,
+ SYSTEM_FREEING_INITMEM = 2,
+ SYSTEM_RUNNING = 3,
+ SYSTEM_HALT = 4,
+ SYSTEM_POWER_OFF = 5,
+ SYSTEM_RESTART = 6,
+ SYSTEM_SUSPEND = 7,
+};
+
+struct cpumask {
+ long unsigned int bits[4];
+};
+
+typedef struct cpumask cpumask_t;
+
+typedef struct cpumask cpumask_var_t[1];
+
+struct llist_node;
+
+struct llist_head {
+ struct llist_node *first;
+};
+
+struct llist_node {
+ struct llist_node *next;
+};
+
+struct __call_single_node {
+ struct llist_node llist;
+ union {
+ unsigned int u_flags;
+ atomic_t a_flags;
+ };
+ u16 src;
+ u16 dst;
+};
+
+enum timespec_type {
+ TT_NONE = 0,
+ TT_NATIVE = 1,
+ TT_COMPAT = 2,
+};
+
+typedef s32 old_time32_t;
+
+struct old_timespec32 {
+ old_time32_t tv_sec;
+ s32 tv_nsec;
+};
+
+struct pollfd {
+ int fd;
+ short int events;
+ short int revents;
+};
+
+struct restart_block {
+ long unsigned int arch_data;
+ long int (*fn)(struct restart_block *);
+ union {
+ struct {
+ u32 *uaddr;
+ u32 val;
+ u32 flags;
+ u32 bitset;
+ u64 time;
+ u32 *uaddr2;
+ } futex;
+ struct {
+ clockid_t clockid;
+ enum timespec_type type;
+ union {
+ struct __kernel_timespec *rmtp;
+ struct old_timespec32 *compat_rmtp;
+ };
+ u64 expires;
+ } nanosleep;
+ struct {
+ struct pollfd *ufds;
+ int nfds;
+ int has_timeout;
+ long unsigned int tv_sec;
+ long unsigned int tv_nsec;
+ } poll;
+ };
+};
+
+struct thread_info {
+ long unsigned int flags;
+ u64 ttbr0;
+ union {
+ u64 preempt_count;
+ struct {
+ u32 count;
+ u32 need_resched;
+ } preempt;
+ };
+ u32 cpu;
+};
+
+struct refcount_struct {
+ atomic_t refs;
+};
+
+typedef struct refcount_struct refcount_t;
+
+struct load_weight {
+ long unsigned int weight;
+ u32 inv_weight;
+};
+
+struct rb_node {
+ long unsigned int __rb_parent_color;
+ struct rb_node *rb_right;
+ struct rb_node *rb_left;
+};
+
+struct util_est {
+ unsigned int enqueued;
+ unsigned int ewma;
+};
+
+struct sched_avg {
+ u64 last_update_time;
+ u64 load_sum;
+ u64 runnable_sum;
+ u32 util_sum;
+ u32 period_contrib;
+ long unsigned int load_avg;
+ long unsigned int runnable_avg;
+ long unsigned int util_avg;
+ struct util_est util_est;
+};
+
+struct cfs_rq;
+
+struct sched_entity {
+ struct load_weight load;
+ struct rb_node run_node;
+ struct list_head group_node;
+ unsigned int on_rq;
+ u64 exec_start;
+ u64 sum_exec_runtime;
+ u64 vruntime;
+ u64 prev_sum_exec_runtime;
+ u64 nr_migrations;
+ int depth;
+ struct sched_entity *parent;
+ struct cfs_rq *cfs_rq;
+ struct cfs_rq *my_q;
+ long unsigned int runnable_weight;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ struct sched_avg avg;
+};
+
+struct sched_rt_entity {
+ struct list_head run_list;
+ long unsigned int timeout;
+ long unsigned int watchdog_stamp;
+ unsigned int time_slice;
+ short unsigned int on_rq;
+ short unsigned int on_list;
+ struct sched_rt_entity *back;
+};
+
+typedef s64 ktime_t;
+
+struct timerqueue_node {
+ struct rb_node node;
+ ktime_t expires;
+};
+
+enum hrtimer_restart {
+ HRTIMER_NORESTART = 0,
+ HRTIMER_RESTART = 1,
+};
+
+struct hrtimer_clock_base;
+
+struct hrtimer {
+ struct timerqueue_node node;
+ ktime_t _softexpires;
+ enum hrtimer_restart (*function)(struct hrtimer *);
+ struct hrtimer_clock_base *base;
+ u8 state;
+ u8 is_rel;
+ u8 is_soft;
+ u8 is_hard;
+};
+
+struct sched_dl_entity {
+ struct rb_node rb_node;
+ u64 dl_runtime;
+ u64 dl_deadline;
+ u64 dl_period;
+ u64 dl_bw;
+ u64 dl_density;
+ s64 runtime;
+ u64 deadline;
+ unsigned int flags;
+ unsigned int dl_throttled: 1;
+ unsigned int dl_yielded: 1;
+ unsigned int dl_non_contending: 1;
+ unsigned int dl_overrun: 1;
+ struct hrtimer dl_timer;
+ struct hrtimer inactive_timer;
+ struct sched_dl_entity *pi_se;
+};
+
+struct uclamp_se {
+ unsigned int value: 11;
+ unsigned int bucket_id: 3;
+ unsigned int active: 1;
+ unsigned int user_defined: 1;
+};
+
+struct sched_statistics {
+ u64 wait_start;
+ u64 wait_max;
+ u64 wait_count;
+ u64 wait_sum;
+ u64 iowait_count;
+ u64 iowait_sum;
+ u64 sleep_start;
+ u64 sleep_max;
+ s64 sum_sleep_runtime;
+ u64 block_start;
+ u64 block_max;
+ s64 sum_block_runtime;
+ u64 exec_max;
+ u64 slice_max;
+ u64 nr_migrations_cold;
+ u64 nr_failed_migrations_affine;
+ u64 nr_failed_migrations_running;
+ u64 nr_failed_migrations_hot;
+ u64 nr_forced_migrations;
+ u64 nr_wakeups;
+ u64 nr_wakeups_sync;
+ u64 nr_wakeups_migrate;
+ u64 nr_wakeups_local;
+ u64 nr_wakeups_remote;
+ u64 nr_wakeups_affine;
+ u64 nr_wakeups_affine_attempts;
+ u64 nr_wakeups_passive;
+ u64 nr_wakeups_idle;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+};
+
+union rcu_special {
+ struct {
+ u8 blocked;
+ u8 need_qs;
+ u8 exp_hint;
+ u8 need_mb;
+ } b;
+ u32 s;
+};
+
+struct sched_info {
+ long unsigned int pcount;
+ long long unsigned int run_delay;
+ long long unsigned int last_arrival;
+ long long unsigned int last_queued;
+};
+
+struct plist_node {
+ int prio;
+ struct list_head prio_list;
+ struct list_head node_list;
+};
+
+struct vmacache {
+ u64 seqnum;
+ struct vm_area_struct *vmas[4];
+};
+
+struct task_rss_stat {
+ int events;
+ int count[4];
+};
+
+struct prev_cputime {
+ u64 utime;
+ u64 stime;
+ raw_spinlock_t lock;
+};
+
+struct rb_root {
+ struct rb_node *rb_node;
+};
+
+struct rb_root_cached {
+ struct rb_root rb_root;
+ struct rb_node *rb_leftmost;
+};
+
+struct timerqueue_head {
+ struct rb_root_cached rb_root;
+};
+
+struct posix_cputimer_base {
+ u64 nextevt;
+ struct timerqueue_head tqhead;
+};
+
+struct posix_cputimers {
+ struct posix_cputimer_base bases[3];
+ unsigned int timers_active;
+ unsigned int expiry_active;
+};
+
+struct posix_cputimers_work {
+ struct callback_head work;
+ unsigned int scheduled;
+};
+
+struct sem_undo_list;
+
+struct sysv_sem {
+ struct sem_undo_list *undo_list;
+};
+
+struct sysv_shm {
+ struct list_head shm_clist;
+};
+
+typedef struct {
+ long unsigned int sig[1];
+} sigset_t;
+
+struct sigpending {
+ struct list_head list;
+ sigset_t signal;
+};
+
+typedef struct {
+ uid_t val;
+} kuid_t;
+
+struct seccomp_filter;
+
+struct seccomp {
+ int mode;
+ atomic_t filter_count;
+ struct seccomp_filter *filter;
+};
+
+struct syscall_user_dispatch {};
+
+struct wake_q_node {
+ struct wake_q_node *next;
+};
+
+struct task_io_accounting {
+ u64 rchar;
+ u64 wchar;
+ u64 syscr;
+ u64 syscw;
+ u64 read_bytes;
+ u64 write_bytes;
+ u64 cancelled_write_bytes;
+};
+
+typedef struct {
+ long unsigned int bits[1];
+} nodemask_t;
+
+struct seqcount {
+ unsigned int sequence;
+};
+
+typedef struct seqcount seqcount_t;
+
+struct seqcount_spinlock {
+ seqcount_t seqcount;
+};
+
+typedef struct seqcount_spinlock seqcount_spinlock_t;
+
+struct optimistic_spin_queue {
+ atomic_t tail;
+};
+
+struct mutex {
+ atomic_long_t owner;
+ raw_spinlock_t wait_lock;
+ struct optimistic_spin_queue osq;
+ struct list_head wait_list;
+};
+
+struct tlbflush_unmap_batch {};
+
+struct page_frag {
+ struct page *page;
+ __u32 offset;
+ __u32 size;
+};
+
+struct kmap_ctrl {};
+
+struct cpu_context {
+ long unsigned int x19;
+ long unsigned int x20;
+ long unsigned int x21;
+ long unsigned int x22;
+ long unsigned int x23;
+ long unsigned int x24;
+ long unsigned int x25;
+ long unsigned int x26;
+ long unsigned int x27;
+ long unsigned int x28;
+ long unsigned int fp;
+ long unsigned int sp;
+ long unsigned int pc;
+};
+
+struct user_fpsimd_state {
+ __int128 unsigned vregs[32];
+ __u32 fpsr;
+ __u32 fpcr;
+ __u32 __reserved[2];
+};
+
+struct perf_event;
+
+struct debug_info {
+ int suspended_step;
+ int bps_disabled;
+ int wps_disabled;
+ struct perf_event *hbp_break[16];
+ struct perf_event *hbp_watch[16];
+};
+
+struct ptrauth_key {
+ long unsigned int lo;
+ long unsigned int hi;
+};
+
+struct ptrauth_keys_user {
+ struct ptrauth_key apia;
+ struct ptrauth_key apib;
+ struct ptrauth_key apda;
+ struct ptrauth_key apdb;
+ struct ptrauth_key apga;
+};
+
+struct ptrauth_keys_kernel {
+ struct ptrauth_key apia;
+};
+
+struct thread_struct {
+ struct cpu_context cpu_context;
+ long: 64;
+ struct {
+ long unsigned int tp_value;
+ long unsigned int tp2_value;
+ struct user_fpsimd_state fpsimd_state;
+ } uw;
+ unsigned int fpsimd_cpu;
+ void *sve_state;
+ unsigned int vl[1];
+ unsigned int vl_onexec[1];
+ long unsigned int fault_address;
+ long unsigned int fault_code;
+ struct debug_info debug;
+ struct ptrauth_keys_user keys_user;
+ struct ptrauth_keys_kernel keys_kernel;
+ u64 mte_ctrl;
+ u64 sctlr_user;
+ long: 64;
+};
+
+struct sched_class;
+
+struct task_group;
+
+struct mm_struct;
+
+struct pid;
+
+struct completion;
+
+struct cred;
+
+struct key;
+
+struct nameidata;
+
+struct fs_struct;
+
+struct files_struct;
+
+struct io_uring_task;
+
+struct nsproxy;
+
+struct signal_struct;
+
+struct sighand_struct;
+
+struct audit_context;
+
+struct rt_mutex_waiter;
+
+struct bio_list;
+
+struct blk_plug;
+
+struct reclaim_state;
+
+struct backing_dev_info;
+
+struct io_context;
+
+struct capture_control;
+
+struct kernel_siginfo;
+
+typedef struct kernel_siginfo kernel_siginfo_t;
+
+struct css_set;
+
+struct robust_list_head;
+
+struct compat_robust_list_head;
+
+struct futex_pi_state;
+
+struct perf_event_context;
+
+struct mempolicy;
+
+struct numa_group;
+
+struct rseq;
+
+struct task_delay_info;
+
+struct ftrace_ret_stack;
+
+struct mem_cgroup;
+
+struct request_queue;
+
+struct uprobe_task;
+
+struct vm_struct;
+
+struct bpf_local_storage;
+
+struct bpf_run_ctx;
+
+struct task_struct {
+ struct thread_info thread_info;
+ unsigned int __state;
+ void *stack;
+ refcount_t usage;
+ unsigned int flags;
+ unsigned int ptrace;
+ int on_cpu;
+ struct __call_single_node wake_entry;
+ unsigned int wakee_flips;
+ long unsigned int wakee_flip_decay_ts;
+ struct task_struct *last_wakee;
+ int recent_used_cpu;
+ int wake_cpu;
+ int on_rq;
+ int prio;
+ int static_prio;
+ int normal_prio;
+ unsigned int rt_priority;
+ long: 32;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ struct sched_entity se;
+ struct sched_rt_entity rt;
+ struct sched_dl_entity dl;
+ const struct sched_class *sched_class;
+ struct rb_node core_node;
+ long unsigned int core_cookie;
+ unsigned int core_occupation;
+ struct task_group *sched_task_group;
+ struct uclamp_se uclamp_req[2];
+ struct uclamp_se uclamp[2];
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ struct sched_statistics stats;
+ struct hlist_head preempt_notifiers;
+ unsigned int btrace_seq;
+ unsigned int policy;
+ int nr_cpus_allowed;
+ const cpumask_t *cpus_ptr;
+ cpumask_t *user_cpus_ptr;
+ cpumask_t cpus_mask;
+ void *migration_pending;
+ short unsigned int migration_disabled;
+ short unsigned int migration_flags;
+ int trc_reader_nesting;
+ int trc_ipi_to_cpu;
+ union rcu_special trc_reader_special;
+ bool trc_reader_checked;
+ struct list_head trc_holdout_list;
+ struct sched_info sched_info;
+ struct list_head tasks;
+ struct plist_node pushable_tasks;
+ struct rb_node pushable_dl_tasks;
+ struct mm_struct *mm;
+ struct mm_struct *active_mm;
+ struct vmacache vmacache;
+ struct task_rss_stat rss_stat;
+ int exit_state;
+ int exit_code;
+ int exit_signal;
+ int pdeath_signal;
+ long unsigned int jobctl;
+ unsigned int personality;
+ unsigned int sched_reset_on_fork: 1;
+ unsigned int sched_contributes_to_load: 1;
+ unsigned int sched_migrated: 1;
+ unsigned int sched_psi_wake_requeue: 1;
+ int: 28;
+ unsigned int sched_remote_wakeup: 1;
+ unsigned int in_execve: 1;
+ unsigned int in_iowait: 1;
+ unsigned int in_user_fault: 1;
+ unsigned int no_cgroup_migration: 1;
+ unsigned int frozen: 1;
+ unsigned int use_memdelay: 1;
+ unsigned int in_memstall: 1;
+ unsigned int in_eventfd_signal: 1;
+ long unsigned int atomic_flags;
+ struct restart_block restart_block;
+ pid_t pid;
+ pid_t tgid;
+ long unsigned int stack_canary;
+ struct task_struct *real_parent;
+ struct task_struct *parent;
+ struct list_head children;
+ struct list_head sibling;
+ struct task_struct *group_leader;
+ struct list_head ptraced;
+ struct list_head ptrace_entry;
+ struct pid *thread_pid;
+ struct hlist_node pid_links[4];
+ struct list_head thread_group;
+ struct list_head thread_node;
+ struct completion *vfork_done;
+ int *set_child_tid;
+ int *clear_child_tid;
+ void *pf_io_worker;
+ u64 utime;
+ u64 stime;
+ u64 gtime;
+ struct prev_cputime prev_cputime;
+ long unsigned int nvcsw;
+ long unsigned int nivcsw;
+ u64 start_time;
+ u64 start_boottime;
+ long unsigned int min_flt;
+ long unsigned int maj_flt;
+ struct posix_cputimers posix_cputimers;
+ struct posix_cputimers_work posix_cputimers_work;
+ const struct cred *ptracer_cred;
+ const struct cred *real_cred;
+ const struct cred *cred;
+ struct key *cached_requested_key;
+ char comm[16];
+ struct nameidata *nameidata;
+ struct sysv_sem sysvsem;
+ struct sysv_shm sysvshm;
+ long unsigned int last_switch_count;
+ long unsigned int last_switch_time;
+ struct fs_struct *fs;
+ struct files_struct *files;
+ struct io_uring_task *io_uring;
+ struct nsproxy *nsproxy;
+ struct signal_struct *signal;
+ struct sighand_struct *sighand;
+ sigset_t blocked;
+ sigset_t real_blocked;
+ sigset_t saved_sigmask;
+ struct sigpending pending;
+ long unsigned int sas_ss_sp;
+ size_t sas_ss_size;
+ unsigned int sas_ss_flags;
+ struct callback_head *task_works;
+ struct audit_context *audit_context;
+ kuid_t loginuid;
+ unsigned int sessionid;
+ struct seccomp seccomp;
+ struct syscall_user_dispatch syscall_dispatch;
+ u64 parent_exec_id;
+ u64 self_exec_id;
+ spinlock_t alloc_lock;
+ raw_spinlock_t pi_lock;
+ struct wake_q_node wake_q;
+ struct rb_root_cached pi_waiters;
+ struct task_struct *pi_top_task;
+ struct rt_mutex_waiter *pi_blocked_on;
+ void *journal_info;
+ struct bio_list *bio_list;
+ struct blk_plug *plug;
+ struct reclaim_state *reclaim_state;
+ struct backing_dev_info *backing_dev_info;
+ struct io_context *io_context;
+ struct capture_control *capture_control;
+ long unsigned int ptrace_message;
+ kernel_siginfo_t *last_siginfo;
+ struct task_io_accounting ioac;
+ unsigned int psi_flags;
+ u64 acct_rss_mem1;
+ u64 acct_vm_mem1;
+ u64 acct_timexpd;
+ nodemask_t mems_allowed;
+ seqcount_spinlock_t mems_allowed_seq;
+ int cpuset_mem_spread_rotor;
+ int cpuset_slab_spread_rotor;
+ struct css_set *cgroups;
+ struct list_head cg_list;
+ struct robust_list_head *robust_list;
+ struct compat_robust_list_head *compat_robust_list;
+ struct list_head pi_state_list;
+ struct futex_pi_state *pi_state_cache;
+ struct mutex futex_exit_mutex;
+ unsigned int futex_state;
+ struct perf_event_context *perf_event_ctxp[2];
+ struct mutex perf_event_mutex;
+ struct list_head perf_event_list;
+ struct mempolicy *mempolicy;
+ short int il_prev;
+ short int pref_node_fork;
+ int numa_scan_seq;
+ unsigned int numa_scan_period;
+ unsigned int numa_scan_period_max;
+ int numa_preferred_nid;
+ long unsigned int numa_migrate_retry;
+ u64 node_stamp;
+ u64 last_task_numa_placement;
+ u64 last_sum_exec_runtime;
+ struct callback_head numa_work;
+ struct numa_group *numa_group;
+ long unsigned int *numa_faults;
+ long unsigned int total_numa_faults;
+ long unsigned int numa_faults_locality[3];
+ long unsigned int numa_pages_migrated;
+ struct rseq *rseq;
+ u32 rseq_sig;
+ long unsigned int rseq_event_mask;
+ struct tlbflush_unmap_batch tlb_ubc;
+ union {
+ refcount_t rcu_users;
+ struct callback_head rcu;
+ };
+ struct pipe_inode_info *splice_pipe;
+ struct page_frag task_frag;
+ struct task_delay_info *delays;
+ int nr_dirtied;
+ int nr_dirtied_pause;
+ long unsigned int dirty_paused_when;
+ u64 timer_slack_ns;
+ u64 default_timer_slack_ns;
+ int curr_ret_stack;
+ int curr_ret_depth;
+ struct ftrace_ret_stack *ret_stack;
+ long long unsigned int ftrace_timestamp;
+ atomic_t trace_overrun;
+ atomic_t tracing_graph_pause;
+ long unsigned int trace;
+ long unsigned int trace_recursion;
+ struct mem_cgroup *memcg_in_oom;
+ gfp_t memcg_oom_gfp_mask;
+ int memcg_oom_order;
+ unsigned int memcg_nr_pages_over_high;
+ struct mem_cgroup *active_memcg;
+ struct request_queue *throttle_queue;
+ struct uprobe_task *utask;
+ unsigned int sequential_io;
+ unsigned int sequential_io_avg;
+ struct kmap_ctrl kmap_ctrl;
+ int pagefault_disabled;
+ struct task_struct *oom_reaper_list;
+ struct vm_struct *stack_vm_area;
+ refcount_t stack_refcount;
+ void *security;
+ struct bpf_local_storage *bpf_storage;
+ struct bpf_run_ctx *bpf_ctx;
+ struct llist_head kretprobe_instances;
+ struct thread_struct thread;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+};
+
+typedef s32 compat_long_t;
+
+typedef u32 compat_uptr_t;
+
+struct user_pt_regs {
+ __u64 regs[31];
+ __u64 sp;
+ __u64 pc;
+ __u64 pstate;
+};
+
+struct pt_regs {
+ union {
+ struct user_pt_regs user_regs;
+ struct {
+ u64 regs[31];
+ u64 sp;
+ u64 pc;
+ u64 pstate;
+ };
+ };
+ u64 orig_x0;
+ s32 syscallno;
+ u32 unused2;
+ u64 sdei_ttbr1;
+ u64 pmr_save;
+ u64 stackframe[2];
+ u64 lockdep_hardirqs;
+ u64 exit_rcu;
+};
+
+struct arch_hw_breakpoint_ctrl {
+ u32 __reserved: 19;
+ u32 len: 8;
+ u32 type: 2;
+ u32 privilege: 2;
+ u32 enabled: 1;
+};
+
+struct arch_hw_breakpoint {
+ u64 address;
+ u64 trigger;
+ struct arch_hw_breakpoint_ctrl ctrl;
+};
+
+typedef u64 pteval_t;
+
+typedef u64 pmdval_t;
+
+typedef u64 pudval_t;
+
+typedef u64 pgdval_t;
+
+typedef struct {
+ pteval_t pte;
+} pte_t;
+
+typedef struct {
+ pmdval_t pmd;
+} pmd_t;
+
+typedef struct {
+ pudval_t pud;
+} pud_t;
+
+typedef struct {
+ pgdval_t pgd;
+} pgd_t;
+
+typedef struct {
+ pteval_t pgprot;
+} pgprot_t;
+
+enum module_state {
+ MODULE_STATE_LIVE = 0,
+ MODULE_STATE_COMING = 1,
+ MODULE_STATE_GOING = 2,
+ MODULE_STATE_UNFORMED = 3,
+};
+
+struct kref {
+ refcount_t refcount;
+};
+
+struct kset;
+
+struct kobj_type;
+
+struct kernfs_node;
+
+struct kobject {
+ const char *name;
+ struct list_head entry;
+ struct kobject *parent;
+ struct kset *kset;
+ struct kobj_type *ktype;
+ struct kernfs_node *sd;
+ struct kref kref;
+ unsigned int state_initialized: 1;
+ unsigned int state_in_sysfs: 1;
+ unsigned int state_add_uevent_sent: 1;
+ unsigned int state_remove_uevent_sent: 1;
+ unsigned int uevent_suppress: 1;
+};
+
+struct module_param_attrs;
+
+struct module_kobject {
+ struct kobject kobj;
+ struct module *mod;
+ struct kobject *drivers_dir;
+ struct module_param_attrs *mp;
+ struct completion *kobj_completion;
+};
+
+struct latch_tree_node {
+ struct rb_node node[2];
+};
+
+struct mod_tree_node {
+ struct module *mod;
+ struct latch_tree_node node;
+};
+
+struct module_layout {
+ void *base;
+ unsigned int size;
+ unsigned int text_size;
+ unsigned int ro_size;
+ unsigned int ro_after_init_size;
+ struct mod_tree_node mtn;
+};
+
+struct mod_plt_sec {
+ int plt_shndx;
+ int plt_num_entries;
+ int plt_max_entries;
+};
+
+struct plt_entry;
+
+struct mod_arch_specific {
+ struct mod_plt_sec core;
+ struct mod_plt_sec init;
+ struct plt_entry *ftrace_trampolines;
+};
+
+struct elf64_sym;
+
+typedef struct elf64_sym Elf64_Sym;
+
+struct mod_kallsyms {
+ Elf64_Sym *symtab;
+ unsigned int num_symtab;
+ char *strtab;
+ char *typetab;
+};
+
+typedef const int tracepoint_ptr_t;
+
+struct module_attribute;
+
+struct kernel_param;
+
+struct exception_table_entry;
+
+struct module_sect_attrs;
+
+struct module_notes_attrs;
+
+struct srcu_struct;
+
+struct bpf_raw_event_map;
+
+struct trace_event_call;
+
+struct trace_eval_map;
+
+struct error_injection_entry;
+
+struct module {
+ enum module_state state;
+ struct list_head list;
+ char name[56];
+ struct module_kobject mkobj;
+ struct module_attribute *modinfo_attrs;
+ const char *version;
+ const char *srcversion;
+ struct kobject *holders_dir;
+ const struct kernel_symbol *syms;
+ const s32 *crcs;
+ unsigned int num_syms;
+ struct mutex param_lock;
+ struct kernel_param *kp;
+ unsigned int num_kp;
+ unsigned int num_gpl_syms;
+ const struct kernel_symbol *gpl_syms;
+ const s32 *gpl_crcs;
+ bool using_gplonly_symbols;
+ bool sig_ok;
+ bool async_probe_requested;
+ unsigned int num_exentries;
+ struct exception_table_entry *extable;
+ int (*init)();
+ struct module_layout core_layout;
+ struct module_layout init_layout;
+ struct mod_arch_specific arch;
+ long unsigned int taints;
+ unsigned int num_bugs;
+ struct list_head bug_list;
+ struct bug_entry *bug_table;
+ struct mod_kallsyms *kallsyms;
+ struct mod_kallsyms core_kallsyms;
+ struct module_sect_attrs *sect_attrs;
+ struct module_notes_attrs *notes_attrs;
+ char *args;
+ void *percpu;
+ unsigned int percpu_size;
+ void *noinstr_text_start;
+ unsigned int noinstr_text_size;
+ unsigned int num_tracepoints;
+ tracepoint_ptr_t *tracepoints_ptrs;
+ unsigned int num_srcu_structs;
+ struct srcu_struct **srcu_struct_ptrs;
+ unsigned int num_bpf_raw_events;
+ struct bpf_raw_event_map *bpf_raw_events;
+ unsigned int btf_data_size;
+ void *btf_data;
+ struct jump_entry *jump_entries;
+ unsigned int num_jump_entries;
+ unsigned int num_trace_bprintk_fmt;
+ const char **trace_bprintk_fmt_start;
+ struct trace_event_call **trace_events;
+ unsigned int num_trace_events;
+ struct trace_eval_map **trace_evals;
+ unsigned int num_trace_evals;
+ unsigned int num_ftrace_callsites;
+ long unsigned int *ftrace_callsites;
+ void *kprobes_text_start;
+ unsigned int kprobes_text_size;
+ long unsigned int *kprobe_blacklist;
+ unsigned int num_kprobe_blacklist;
+ struct list_head source_list;
+ struct list_head target_list;
+ void (*exit)();
+ atomic_t refcnt;
+ struct error_injection_entry *ei_funcs;
+ unsigned int num_ei_funcs;
+ long: 32;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+};
+
+enum perf_event_state {
+ PERF_EVENT_STATE_DEAD = 4294967292,
+ PERF_EVENT_STATE_EXIT = 4294967293,
+ PERF_EVENT_STATE_ERROR = 4294967294,
+ PERF_EVENT_STATE_OFF = 4294967295,
+ PERF_EVENT_STATE_INACTIVE = 0,
+ PERF_EVENT_STATE_ACTIVE = 1,
+};
+
+typedef struct {
+ atomic_long_t a;
+} local_t;
+
+typedef struct {
+ local_t a;
+} local64_t;
+
+struct perf_event_attr {
+ __u32 type;
+ __u32 size;
+ __u64 config;
+ union {
+ __u64 sample_period;
+ __u64 sample_freq;
+ };
+ __u64 sample_type;
+ __u64 read_format;
+ __u64 disabled: 1;
+ __u64 inherit: 1;
+ __u64 pinned: 1;
+ __u64 exclusive: 1;
+ __u64 exclude_user: 1;
+ __u64 exclude_kernel: 1;
+ __u64 exclude_hv: 1;
+ __u64 exclude_idle: 1;
+ __u64 mmap: 1;
+ __u64 comm: 1;
+ __u64 freq: 1;
+ __u64 inherit_stat: 1;
+ __u64 enable_on_exec: 1;
+ __u64 task: 1;
+ __u64 watermark: 1;
+ __u64 precise_ip: 2;
+ __u64 mmap_data: 1;
+ __u64 sample_id_all: 1;
+ __u64 exclude_host: 1;
+ __u64 exclude_guest: 1;
+ __u64 exclude_callchain_kernel: 1;
+ __u64 exclude_callchain_user: 1;
+ __u64 mmap2: 1;
+ __u64 comm_exec: 1;
+ __u64 use_clockid: 1;
+ __u64 context_switch: 1;
+ __u64 write_backward: 1;
+ __u64 namespaces: 1;
+ __u64 ksymbol: 1;
+ __u64 bpf_event: 1;
+ __u64 aux_output: 1;
+ __u64 cgroup: 1;
+ __u64 text_poke: 1;
+ __u64 build_id: 1;
+ __u64 inherit_thread: 1;
+ __u64 remove_on_exec: 1;
+ __u64 sigtrap: 1;
+ __u64 __reserved_1: 26;
+ union {
+ __u32 wakeup_events;
+ __u32 wakeup_watermark;
+ };
+ __u32 bp_type;
+ union {
+ __u64 bp_addr;
+ __u64 kprobe_func;
+ __u64 uprobe_path;
+ __u64 config1;
+ };
+ union {
+ __u64 bp_len;
+ __u64 kprobe_addr;
+ __u64 probe_offset;
+ __u64 config2;
+ };
+ __u64 branch_sample_type;
+ __u64 sample_regs_user;
+ __u32 sample_stack_user;
+ __s32 clockid;
+ __u64 sample_regs_intr;
+ __u32 aux_watermark;
+ __u16 sample_max_stack;
+ __u16 __reserved_2;
+ __u32 aux_sample_size;
+ __u32 __reserved_3;
+ __u64 sig_data;
+};
+
+struct hw_perf_event_extra {
+ u64 config;
+ unsigned int reg;
+ int alloc;
+ int idx;
+};
+
+struct hw_perf_event {
+ union {
+ struct {
+ u64 config;
+ u64 last_tag;
+ long unsigned int config_base;
+ long unsigned int event_base;
+ int event_base_rdpmc;
+ int idx;
+ int last_cpu;
+ int flags;
+ struct hw_perf_event_extra extra_reg;
+ struct hw_perf_event_extra branch_reg;
+ };
+ struct {
+ struct hrtimer hrtimer;
+ };
+ struct {
+ struct list_head tp_list;
+ };
+ struct {
+ u64 pwr_acc;
+ u64 ptsc;
+ };
+ struct {
+ struct arch_hw_breakpoint info;
+ struct list_head bp_list;
+ };
+ struct {
+ u8 iommu_bank;
+ u8 iommu_cntr;
+ u16 padding;
+ u64 conf;
+ u64 conf1;
+ };
+ };
+ struct task_struct *target;
+ void *addr_filters;
+ long unsigned int addr_filters_gen;
+ int state;
+ local64_t prev_count;
+ u64 sample_period;
+ union {
+ struct {
+ u64 last_period;
+ local64_t period_left;
+ };
+ struct {
+ u64 saved_metric;
+ u64 saved_slots;
+ };
+ };
+ u64 interrupts_seq;
+ u64 interrupts;
+ u64 freq_time_stamp;
+ u64 freq_count_stamp;
+};
+
+struct wait_queue_head {
+ spinlock_t lock;
+ struct list_head head;
+};
+
+typedef struct wait_queue_head wait_queue_head_t;
+
+struct rcuwait {
+ struct task_struct *task;
+};
+
+struct irq_work {
+ struct __call_single_node node;
+ void (*func)(struct irq_work *);
+ struct rcuwait irqwait;
+};
+
+struct perf_addr_filters_head {
+ struct list_head list;
+ raw_spinlock_t lock;
+ unsigned int nr_file_filters;
+};
+
+struct perf_sample_data;
+
+typedef void (*perf_overflow_handler_t)(struct perf_event *, struct perf_sample_data *, struct pt_regs *);
+
+struct ftrace_ops;
+
+struct ftrace_regs;
+
+typedef void (*ftrace_func_t)(long unsigned int, long unsigned int, struct ftrace_ops *, struct ftrace_regs *);
+
+struct ftrace_hash;
+
+struct ftrace_ops_hash {
+ struct ftrace_hash *notrace_hash;
+ struct ftrace_hash *filter_hash;
+ struct mutex regex_lock;
+};
+
+struct ftrace_ops {
+ ftrace_func_t func;
+ struct ftrace_ops *next;
+ long unsigned int flags;
+ void *private;
+ ftrace_func_t saved_func;
+ struct ftrace_ops_hash local_hash;
+ struct ftrace_ops_hash *func_hash;
+ struct ftrace_ops_hash old_hash;
+ long unsigned int trampoline;
+ long unsigned int trampoline_size;
+ struct list_head list;
+};
+
+struct pmu;
+
+struct perf_buffer;
+
+struct fasync_struct;
+
+struct perf_addr_filter_range;
+
+struct pid_namespace;
+
+struct bpf_prog;
+
+struct event_filter;
+
+struct perf_cgroup;
+
+struct perf_event {
+ struct list_head event_entry;
+ struct list_head sibling_list;
+ struct list_head active_list;
+ struct rb_node group_node;
+ u64 group_index;
+ struct list_head migrate_entry;
+ struct hlist_node hlist_entry;
+ struct list_head active_entry;
+ int nr_siblings;
+ int event_caps;
+ int group_caps;
+ struct perf_event *group_leader;
+ struct pmu *pmu;
+ void *pmu_private;
+ enum perf_event_state state;
+ unsigned int attach_state;
+ local64_t count;
+ atomic64_t child_count;
+ u64 total_time_enabled;
+ u64 total_time_running;
+ u64 tstamp;
+ u64 shadow_ctx_time;
+ struct perf_event_attr attr;
+ u16 header_size;
+ u16 id_header_size;
+ u16 read_size;
+ struct hw_perf_event hw;
+ struct perf_event_context *ctx;
+ atomic_long_t refcount;
+ atomic64_t child_total_time_enabled;
+ atomic64_t child_total_time_running;
+ struct mutex child_mutex;
+ struct list_head child_list;
+ struct perf_event *parent;
+ int oncpu;
+ int cpu;
+ struct list_head owner_entry;
+ struct task_struct *owner;
+ struct mutex mmap_mutex;
+ atomic_t mmap_count;
+ struct perf_buffer *rb;
+ struct list_head rb_entry;
+ long unsigned int rcu_batches;
+ int rcu_pending;
+ wait_queue_head_t waitq;
+ struct fasync_struct *fasync;
+ int pending_wakeup;
+ int pending_kill;
+ int pending_disable;
+ long unsigned int pending_addr;
+ struct irq_work pending;
+ atomic_t event_limit;
+ struct perf_addr_filters_head addr_filters;
+ struct perf_addr_filter_range *addr_filter_ranges;
+ long unsigned int addr_filters_gen;
+ struct perf_event *aux_event;
+ void (*destroy)(struct perf_event *);
+ struct callback_head callback_head;
+ struct pid_namespace *ns;
+ u64 id;
+ u64 (*clock)();
+ perf_overflow_handler_t overflow_handler;
+ void *overflow_handler_context;
+ perf_overflow_handler_t orig_overflow_handler;
+ struct bpf_prog *prog;
+ u64 bpf_cookie;
+ struct trace_event_call *tp_event;
+ struct event_filter *filter;
+ struct ftrace_ops ftrace_ops;
+ struct perf_cgroup *cgrp;
+ void *security;
+ struct list_head sb_list;
+};
+
+struct wait_queue_entry;
+
+typedef int (*wait_queue_func_t)(struct wait_queue_entry *, unsigned int, int, void *);
+
+struct wait_queue_entry {
+ unsigned int flags;
+ void *private;
+ wait_queue_func_t func;
+ struct list_head entry;
+};
+
+typedef struct wait_queue_entry wait_queue_entry_t;
+
+enum refcount_saturation_type {
+ REFCOUNT_ADD_NOT_ZERO_OVF = 0,
+ REFCOUNT_ADD_OVF = 1,
+ REFCOUNT_ADD_UAF = 2,
+ REFCOUNT_SUB_UAF = 3,
+ REFCOUNT_DEC_LEAK = 4,
+};
+
+enum pid_type {
+ PIDTYPE_PID = 0,
+ PIDTYPE_TGID = 1,
+ PIDTYPE_PGID = 2,
+ PIDTYPE_SID = 3,
+ PIDTYPE_MAX = 4,
+};
+
+struct upid {
+ int nr;
+ struct pid_namespace *ns;
+};
+
+struct xarray {
+ spinlock_t xa_lock;
+ gfp_t xa_flags;
+ void *xa_head;
+};
+
+struct idr {
+ struct xarray idr_rt;
+ unsigned int idr_base;
+ unsigned int idr_next;
+};
+
+struct proc_ns_operations;
+
+struct ns_common {
+ atomic_long_t stashed;
+ const struct proc_ns_operations *ops;
+ unsigned int inum;
+ refcount_t count;
+};
+
+struct kmem_cache;
+
+struct fs_pin;
+
+struct user_namespace;
+
+struct ucounts;
+
+struct pid_namespace {
+ struct idr idr;
+ struct callback_head rcu;
+ unsigned int pid_allocated;
+ struct task_struct *child_reaper;
+ struct kmem_cache *pid_cachep;
+ unsigned int level;
+ struct pid_namespace *parent;
+ struct fs_pin *bacct;
+ struct user_namespace *user_ns;
+ struct ucounts *ucounts;
+ int reboot;
+ struct ns_common ns;
+};
+
+struct pid {
+ refcount_t count;
+ unsigned int level;
+ spinlock_t lock;
+ struct hlist_head tasks[4];
+ struct hlist_head inodes;
+ wait_queue_head_t wait_pidfd;
+ struct callback_head rcu;
+ struct upid numbers[1];
+};
+
+struct uid_gid_extent {
+ u32 first;
+ u32 lower_first;
+ u32 count;
+};
+
+struct uid_gid_map {
+ u32 nr_extents;
+ union {
+ struct uid_gid_extent extent[5];
+ struct {
+ struct uid_gid_extent *forward;
+ struct uid_gid_extent *reverse;
+ };
+ };
+};
+
+typedef struct {
+ gid_t val;
+} kgid_t;
+
+struct rw_semaphore {
+ atomic_long_t count;
+ atomic_long_t owner;
+ struct optimistic_spin_queue osq;
+ raw_spinlock_t wait_lock;
+ struct list_head wait_list;
+};
+
+struct work_struct;
+
+typedef void (*work_func_t)(struct work_struct *);
+
+struct work_struct {
+ atomic_long_t data;
+ struct list_head entry;
+ work_func_t func;
+};
+
+struct ctl_table;
+
+struct ctl_table_root;
+
+struct ctl_table_set;
+
+struct ctl_dir;
+
+struct ctl_node;
+
+struct ctl_table_header {
+ union {
+ struct {
+ struct ctl_table *ctl_table;
+ int used;
+ int count;
+ int nreg;
+ };
+ struct callback_head rcu;
+ };
+ struct completion *unregistering;
+ struct ctl_table *ctl_table_arg;
+ struct ctl_table_root *root;
+ struct ctl_table_set *set;
+ struct ctl_dir *parent;
+ struct ctl_node *node;
+ struct hlist_head inodes;
+};
+
+struct ctl_dir {
+ struct ctl_table_header header;
+ struct rb_root root;
+};
+
+struct ctl_table_set {
+ int (*is_seen)(struct ctl_table_set *);
+ struct ctl_dir dir;
+};
+
+struct user_namespace {
+ struct uid_gid_map uid_map;
+ struct uid_gid_map gid_map;
+ struct uid_gid_map projid_map;
+ struct user_namespace *parent;
+ int level;
+ kuid_t owner;
+ kgid_t group;
+ struct ns_common ns;
+ long unsigned int flags;
+ bool parent_could_setfcap;
+ struct list_head keyring_name_list;
+ struct key *user_keyring_register;
+ struct rw_semaphore keyring_sem;
+ struct key *persistent_keyring_register;
+ struct work_struct work;
+ struct ctl_table_set set;
+ struct ctl_table_header *sysctls;
+ struct ucounts *ucounts;
+ long int ucount_max[16];
+};
+
+struct timer_list {
+ struct hlist_node entry;
+ long unsigned int expires;
+ void (*function)(struct timer_list *);
+ u32 flags;
+};
+
+struct workqueue_struct;
+
+struct delayed_work {
+ struct work_struct work;
+ struct timer_list timer;
+ struct workqueue_struct *wq;
+ int cpu;
+};
+
+struct rcu_work {
+ struct work_struct work;
+ struct callback_head rcu;
+ struct workqueue_struct *wq;
+};
+
+typedef struct page *pgtable_t;
+
+struct address_space;
+
+struct page_pool;
+
+struct dev_pagemap;
+
+struct page {
+ long unsigned int flags;
+ union {
+ struct {
+ struct list_head lru;
+ struct address_space *mapping;
+ long unsigned int index;
+ long unsigned int private;
+ };
+ struct {
+ long unsigned int pp_magic;
+ struct page_pool *pp;
+ long unsigned int _pp_mapping_pad;
+ long unsigned int dma_addr;
+ union {
+ long unsigned int dma_addr_upper;
+ atomic_long_t pp_frag_count;
+ };
+ };
+ struct {
+ union {
+ struct list_head slab_list;
+ struct {
+ struct page *next;
+ int pages;
+ };
+ };
+ struct kmem_cache *slab_cache;
+ void *freelist;
+ union {
+ void *s_mem;
+ long unsigned int counters;
+ struct {
+ unsigned int inuse: 16;
+ unsigned int objects: 15;
+ unsigned int frozen: 1;
+ };
+ };
+ };
+ struct {
+ long unsigned int compound_head;
+ unsigned char compound_dtor;
+ unsigned char compound_order;
+ atomic_t compound_mapcount;
+ unsigned int compound_nr;
+ };
+ struct {
+ long unsigned int _compound_pad_1;
+ atomic_t hpage_pinned_refcount;
+ struct list_head deferred_list;
+ };
+ struct {
+ long unsigned int _pt_pad_1;
+ pgtable_t pmd_huge_pte;
+ long unsigned int _pt_pad_2;
+ union {
+ struct mm_struct *pt_mm;
+ atomic_t pt_frag_refcount;
+ };
+ spinlock_t ptl;
+ };
+ struct {
+ struct dev_pagemap *pgmap;
+ void *zone_device_data;
+ };
+ struct callback_head callback_head;
+ };
+ union {
+ atomic_t _mapcount;
+ unsigned int page_type;
+ unsigned int active;
+ int units;
+ };
+ atomic_t _refcount;
+ long unsigned int memcg_data;
+};
+
+struct seqcount_raw_spinlock {
+ seqcount_t seqcount;
+};
+
+typedef struct seqcount_raw_spinlock seqcount_raw_spinlock_t;
+
+typedef struct {
+ seqcount_spinlock_t seqcount;
+ spinlock_t lock;
+} seqlock_t;
+
+struct hrtimer_cpu_base;
+
+struct hrtimer_clock_base {
+ struct hrtimer_cpu_base *cpu_base;
+ unsigned int index;
+ clockid_t clockid;
+ seqcount_raw_spinlock_t seq;
+ struct hrtimer *running;
+ struct timerqueue_head active;
+ ktime_t (*get_time)();
+ ktime_t offset;
+};
+
+struct hrtimer_cpu_base {
+ raw_spinlock_t lock;
+ unsigned int cpu;
+ unsigned int active_bases;
+ unsigned int clock_was_set_seq;
+ unsigned int hres_active: 1;
+ unsigned int in_hrtirq: 1;
+ unsigned int hang_detected: 1;
+ unsigned int softirq_activated: 1;
+ unsigned int nr_events;
+ short unsigned int nr_retries;
+ short unsigned int nr_hangs;
+ unsigned int max_hang_time;
+ ktime_t expires_next;
+ struct hrtimer *next_timer;
+ ktime_t softirq_expires_next;
+ struct hrtimer *softirq_next_timer;
+ struct hrtimer_clock_base clock_base[8];
+};
+
+enum node_states {
+ N_POSSIBLE = 0,
+ N_ONLINE = 1,
+ N_NORMAL_MEMORY = 2,
+ N_HIGH_MEMORY = 2,
+ N_MEMORY = 3,
+ N_CPU = 4,
+ N_GENERIC_INITIATOR = 5,
+ NR_NODE_STATES = 6,
+};
+
+struct rlimit {
+ __kernel_ulong_t rlim_cur;
+ __kernel_ulong_t rlim_max;
+};
+
+struct task_cputime {
+ u64 stime;
+ u64 utime;
+ long long unsigned int sum_exec_runtime;
+};
+
+typedef void __signalfn_t(int);
+
+typedef __signalfn_t *__sighandler_t;
+
+typedef void __restorefn_t();
+
+typedef __restorefn_t *__sigrestore_t;
+
+union sigval {
+ int sival_int;
+ void *sival_ptr;
+};
+
+typedef union sigval sigval_t;
+
+union __sifields {
+ struct {
+ __kernel_pid_t _pid;
+ __kernel_uid32_t _uid;
+ } _kill;
+ struct {
+ __kernel_timer_t _tid;
+ int _overrun;
+ sigval_t _sigval;
+ int _sys_private;
+ } _timer;
+ struct {
+ __kernel_pid_t _pid;
+ __kernel_uid32_t _uid;
+ sigval_t _sigval;
+ } _rt;
+ struct {
+ __kernel_pid_t _pid;
+ __kernel_uid32_t _uid;
+ int _status;
+ __kernel_clock_t _utime;
+ __kernel_clock_t _stime;
+ } _sigchld;
+ struct {
+ void *_addr;
+ union {
+ int _trapno;
+ short int _addr_lsb;
+ struct {
+ char _dummy_bnd[8];
+ void *_lower;
+ void *_upper;
+ } _addr_bnd;
+ struct {
+ char _dummy_pkey[8];
+ __u32 _pkey;
+ } _addr_pkey;
+ struct {
+ long unsigned int _data;
+ __u32 _type;
+ } _perf;
+ };
+ } _sigfault;
+ struct {
+ long int _band;
+ int _fd;
+ } _sigpoll;
+ struct {
+ void *_call_addr;
+ int _syscall;
+ unsigned int _arch;
+ } _sigsys;
+};
+
+struct kernel_siginfo {
+ struct {
+ int si_signo;
+ int si_errno;
+ int si_code;
+ union __sifields _sifields;
+ };
+};
+
+struct ucounts {
+ struct hlist_node node;
+ struct user_namespace *ns;
+ kuid_t uid;
+ atomic_t count;
+ atomic_long_t ucount[16];
+};
+
+struct sigaction {
+ __sighandler_t sa_handler;
+ long unsigned int sa_flags;
+ __sigrestore_t sa_restorer;
+ sigset_t sa_mask;
+};
+
+struct k_sigaction {
+ struct sigaction sa;
+};
+
+struct userfaultfd_ctx;
+
+struct vm_userfaultfd_ctx {
+ struct userfaultfd_ctx *ctx;
+};
+
+struct anon_vma;
+
+struct vm_operations_struct;
+
+struct vm_area_struct {
+ long unsigned int vm_start;
+ long unsigned int vm_end;
+ struct vm_area_struct *vm_next;
+ struct vm_area_struct *vm_prev;
+ struct rb_node vm_rb;
+ long unsigned int rb_subtree_gap;
+ struct mm_struct *vm_mm;
+ pgprot_t vm_page_prot;
+ long unsigned int vm_flags;
+ struct {
+ struct rb_node rb;
+ long unsigned int rb_subtree_last;
+ } shared;
+ struct list_head anon_vma_chain;
+ struct anon_vma *anon_vma;
+ const struct vm_operations_struct *vm_ops;
+ long unsigned int vm_pgoff;
+ struct file *vm_file;
+ void *vm_private_data;
+ atomic_long_t swap_readahead_info;
+ struct mempolicy *vm_policy;
+ struct vm_userfaultfd_ctx vm_userfaultfd_ctx;
+};
+
+struct mm_rss_stat {
+ atomic_long_t count[4];
+};
+
+struct cpu_itimer {
+ u64 expires;
+ u64 incr;
+};
+
+struct task_cputime_atomic {
+ atomic64_t utime;
+ atomic64_t stime;
+ atomic64_t sum_exec_runtime;
+};
+
+struct thread_group_cputimer {
+ struct task_cputime_atomic cputime_atomic;
+};
+
+struct pacct_struct {
+ int ac_flag;
+ long int ac_exitcode;
+ long unsigned int ac_mem;
+ u64 ac_utime;
+ u64 ac_stime;
+ long unsigned int ac_minflt;
+ long unsigned int ac_majflt;
+};
+
+struct core_state;
+
+struct tty_struct;
+
+struct autogroup;
+
+struct taskstats;
+
+struct tty_audit_buf;
+
+struct signal_struct {
+ refcount_t sigcnt;
+ atomic_t live;
+ int nr_threads;
+ struct list_head thread_head;
+ wait_queue_head_t wait_chldexit;
+ struct task_struct *curr_target;
+ struct sigpending shared_pending;
+ struct hlist_head multiprocess;
+ int group_exit_code;
+ int notify_count;
+ struct task_struct *group_exit_task;
+ int group_stop_count;
+ unsigned int flags;
+ struct core_state *core_state;
+ unsigned int is_child_subreaper: 1;
+ unsigned int has_child_subreaper: 1;
+ int posix_timer_id;
+ struct list_head posix_timers;
+ struct hrtimer real_timer;
+ ktime_t it_real_incr;
+ struct cpu_itimer it[2];
+ struct thread_group_cputimer cputimer;
+ struct posix_cputimers posix_cputimers;
+ struct pid *pids[4];
+ struct pid *tty_old_pgrp;
+ int leader;
+ struct tty_struct *tty;
+ struct autogroup *autogroup;
+ seqlock_t stats_lock;
+ u64 utime;
+ u64 stime;
+ u64 cutime;
+ u64 cstime;
+ u64 gtime;
+ u64 cgtime;
+ struct prev_cputime prev_cputime;
+ long unsigned int nvcsw;
+ long unsigned int nivcsw;
+ long unsigned int cnvcsw;
+ long unsigned int cnivcsw;
+ long unsigned int min_flt;
+ long unsigned int maj_flt;
+ long unsigned int cmin_flt;
+ long unsigned int cmaj_flt;
+ long unsigned int inblock;
+ long unsigned int oublock;
+ long unsigned int cinblock;
+ long unsigned int coublock;
+ long unsigned int maxrss;
+ long unsigned int cmaxrss;
+ struct task_io_accounting ioac;
+ long long unsigned int sum_sched_runtime;
+ struct rlimit rlim[16];
+ struct pacct_struct pacct;
+ struct taskstats *stats;
+ unsigned int audit_tty;
+ struct tty_audit_buf *tty_audit_buf;
+ bool oom_flag_origin;
+ short int oom_score_adj;
+ short int oom_score_adj_min;
+ struct mm_struct *oom_mm;
+ struct mutex cred_guard_mutex;
+ struct rw_semaphore exec_update_lock;
+};
+
+struct rseq {
+ __u32 cpu_id_start;
+ __u32 cpu_id;
+ union {
+ __u64 ptr64;
+ __u64 ptr;
+ } rseq_cs;
+ __u32 flags;
+ long: 32;
+ long: 64;
+};
+
+struct rq;
+
+struct rq_flags;
+
+struct sched_class {
+ int uclamp_enabled;
+ void (*enqueue_task)(struct rq *, struct task_struct *, int);
+ void (*dequeue_task)(struct rq *, struct task_struct *, int);
+ void (*yield_task)(struct rq *);
+ bool (*yield_to_task)(struct rq *, struct task_struct *);
+ void (*check_preempt_curr)(struct rq *, struct task_struct *, int);
+ struct task_struct * (*pick_next_task)(struct rq *);
+ void (*put_prev_task)(struct rq *, struct task_struct *);
+ void (*set_next_task)(struct rq *, struct task_struct *, bool);
+ int (*balance)(struct rq *, struct task_struct *, struct rq_flags *);
+ int (*select_task_rq)(struct task_struct *, int, int);
+ struct task_struct * (*pick_task)(struct rq *);
+ void (*migrate_task_rq)(struct task_struct *, int);
+ void (*task_woken)(struct rq *, struct task_struct *);
+ void (*set_cpus_allowed)(struct task_struct *, const struct cpumask *, u32);
+ void (*rq_online)(struct rq *);
+ void (*rq_offline)(struct rq *);
+ struct rq * (*find_lock_rq)(struct task_struct *, struct rq *);
+ void (*task_tick)(struct rq *, struct task_struct *, int);
+ void (*task_fork)(struct task_struct *);
+ void (*task_dead)(struct task_struct *);
+ void (*switched_from)(struct rq *, struct task_struct *);
+ void (*switched_to)(struct rq *, struct task_struct *);
+ void (*prio_changed)(struct rq *, struct task_struct *, int);
+ unsigned int (*get_rr_interval)(struct rq *, struct task_struct *);
+ void (*update_curr)(struct rq *);
+ void (*task_change_group)(struct task_struct *, int);
+};
+
+typedef struct {
+ atomic64_t id;
+ void *sigpage;
+ refcount_t pinned;
+ void *vdso;
+ long unsigned int flags;
+} mm_context_t;
+
+struct xol_area;
+
+struct uprobes_state {
+ struct xol_area *xol_area;
+};
+
+struct linux_binfmt;
+
+struct kioctx_table;
+
+struct mmu_notifier_subscriptions;
+
+struct mm_struct {
+ struct {
+ struct vm_area_struct *mmap;
+ struct rb_root mm_rb;
+ u64 vmacache_seqnum;
+ long unsigned int (*get_unmapped_area)(struct file *, long unsigned int, long unsigned int, long unsigned int, long unsigned int);
+ long unsigned int mmap_base;
+ long unsigned int mmap_legacy_base;
+ long unsigned int task_size;
+ long unsigned int highest_vm_end;
+ pgd_t *pgd;
+ atomic_t membarrier_state;
+ atomic_t mm_users;
+ atomic_t mm_count;
+ atomic_long_t pgtables_bytes;
+ int map_count;
+ spinlock_t page_table_lock;
+ struct rw_semaphore mmap_lock;
+ struct list_head mmlist;
+ long unsigned int hiwater_rss;
+ long unsigned int hiwater_vm;
+ long unsigned int total_vm;
+ long unsigned int locked_vm;
+ atomic64_t pinned_vm;
+ long unsigned int data_vm;
+ long unsigned int exec_vm;
+ long unsigned int stack_vm;
+ long unsigned int def_flags;
+ seqcount_t write_protect_seq;
+ spinlock_t arg_lock;
+ long unsigned int start_code;
+ long unsigned int end_code;
+ long unsigned int start_data;
+ long unsigned int end_data;
+ long unsigned int start_brk;
+ long unsigned int brk;
+ long unsigned int start_stack;
+ long unsigned int arg_start;
+ long unsigned int arg_end;
+ long unsigned int env_start;
+ long unsigned int env_end;
+ long unsigned int saved_auxv[46];
+ struct mm_rss_stat rss_stat;
+ struct linux_binfmt *binfmt;
+ mm_context_t context;
+ long unsigned int flags;
+ spinlock_t ioctx_lock;
+ struct kioctx_table *ioctx_table;
+ struct task_struct *owner;
+ struct user_namespace *user_ns;
+ struct file *exe_file;
+ struct mmu_notifier_subscriptions *notifier_subscriptions;
+ long unsigned int numa_next_scan;
+ long unsigned int numa_scan_offset;
+ int numa_scan_seq;
+ atomic_t tlb_flush_pending;
+ struct uprobes_state uprobes_state;
+ atomic_long_t hugetlb_usage;
+ struct work_struct async_put_work;
+ u32 pasid;
+ };
+ long unsigned int cpu_bitmap[0];
+};
+
+struct swait_queue_head {
+ raw_spinlock_t lock;
+ struct list_head task_list;
+};
+
+struct completion {
+ unsigned int done;
+ struct swait_queue_head wait;
+};
+
+struct kernel_cap_struct {
+ __u32 cap[2];
+};
+
+typedef struct kernel_cap_struct kernel_cap_t;
+
+struct user_struct;
+
+struct group_info;
+
+struct cred {
+ atomic_t usage;
+ kuid_t uid;
+ kgid_t gid;
+ kuid_t suid;
+ kgid_t sgid;
+ kuid_t euid;
+ kgid_t egid;
+ kuid_t fsuid;
+ kgid_t fsgid;
+ unsigned int securebits;
+ kernel_cap_t cap_inheritable;
+ kernel_cap_t cap_permitted;
+ kernel_cap_t cap_effective;
+ kernel_cap_t cap_bset;
+ kernel_cap_t cap_ambient;
+ unsigned char jit_keyring;
+ struct key *session_keyring;
+ struct key *process_keyring;
+ struct key *thread_keyring;
+ struct key *request_key_auth;
+ void *security;
+ struct user_struct *user;
+ struct user_namespace *user_ns;
+ struct ucounts *ucounts;
+ struct group_info *group_info;
+ union {
+ int non_rcu;
+ struct callback_head rcu;
+ };
+};
+
+typedef int32_t key_serial_t;
+
+typedef uint32_t key_perm_t;
+
+struct key_type;
+
+struct key_tag;
+
+struct keyring_index_key {
+ long unsigned int hash;
+ union {
+ struct {
+ u16 desc_len;
+ char desc[6];
+ };
+ long unsigned int x;
+ };
+ struct key_type *type;
+ struct key_tag *domain_tag;
+ const char *description;
+};
+
+union key_payload {
+ void *rcu_data0;
+ void *data[4];
+};
+
+struct assoc_array_ptr;
+
+struct assoc_array {
+ struct assoc_array_ptr *root;
+ long unsigned int nr_leaves_on_tree;
+};
+
+struct watch_list;
+
+struct key_user;
+
+struct key_restriction;
+
+struct key {
+ refcount_t usage;
+ key_serial_t serial;
+ union {
+ struct list_head graveyard_link;
+ struct rb_node serial_node;
+ };
+ struct watch_list *watchers;
+ struct rw_semaphore sem;
+ struct key_user *user;
+ void *security;
+ union {
+ time64_t expiry;
+ time64_t revoked_at;
+ };
+ time64_t last_used_at;
+ kuid_t uid;
+ kgid_t gid;
+ key_perm_t perm;
+ short unsigned int quotalen;
+ short unsigned int datalen;
+ short int state;
+ long unsigned int flags;
+ union {
+ struct keyring_index_key index_key;
+ struct {
+ long unsigned int hash;
+ long unsigned int len_desc;
+ struct key_type *type;
+ struct key_tag *domain_tag;
+ char *description;
+ };
+ };
+ union {
+ union key_payload payload;
+ struct {
+ struct list_head name_link;
+ struct assoc_array keys;
+ };
+ };
+ struct key_restriction *restrict_link;
+};
+
+struct uts_namespace;
+
+struct ipc_namespace;
+
+struct mnt_namespace;
+
+struct net;
+
+struct time_namespace;
+
+struct cgroup_namespace;
+
+struct nsproxy {
+ atomic_t count;
+ struct uts_namespace *uts_ns;
+ struct ipc_namespace *ipc_ns;
+ struct mnt_namespace *mnt_ns;
+ struct pid_namespace *pid_ns_for_children;
+ struct net *net_ns;
+ struct time_namespace *time_ns;
+ struct time_namespace *time_ns_for_children;
+ struct cgroup_namespace *cgroup_ns;
+};
+
+struct sighand_struct {
+ spinlock_t siglock;
+ refcount_t count;
+ wait_queue_head_t signalfd_wqh;
+ struct k_sigaction action[64];
+};
+
+struct bio;
+
+struct bio_list {
+ struct bio *head;
+ struct bio *tail;
+};
+
+struct request;
+
+struct blk_plug {
+ struct request *mq_list;
+ struct request *cached_rq;
+ short unsigned int nr_ios;
+ short unsigned int rq_count;
+ bool multiple_queues;
+ bool has_elevator;
+ bool nowait;
+ struct list_head cb_list;
+};
+
+struct reclaim_state {
+ long unsigned int reclaimed_slab;
+};
+
+struct percpu_counter {
+ raw_spinlock_t lock;
+ s64 count;
+ struct list_head list;
+ s32 *counters;
+};
+
+struct fprop_local_percpu {
+ struct percpu_counter events;
+ unsigned int period;
+ raw_spinlock_t lock;
+};
+
+enum wb_reason {
+ WB_REASON_BACKGROUND = 0,
+ WB_REASON_VMSCAN = 1,
+ WB_REASON_SYNC = 2,
+ WB_REASON_PERIODIC = 3,
+ WB_REASON_LAPTOP_TIMER = 4,
+ WB_REASON_FS_FREE_SPACE = 5,
+ WB_REASON_FORKER_THREAD = 6,
+ WB_REASON_FOREIGN_FLUSH = 7,
+ WB_REASON_MAX = 8,
+};
+
+struct percpu_ref_data;
+
+struct percpu_ref {
+ long unsigned int percpu_count_ptr;
+ struct percpu_ref_data *data;
+};
+
+struct cgroup_subsys_state;
+
+struct bdi_writeback {
+ struct backing_dev_info *bdi;
+ long unsigned int state;
+ long unsigned int last_old_flush;
+ struct list_head b_dirty;
+ struct list_head b_io;
+ struct list_head b_more_io;
+ struct list_head b_dirty_time;
+ spinlock_t list_lock;
+ atomic_t writeback_inodes;
+ struct percpu_counter stat[4];
+ long unsigned int congested;
+ long unsigned int bw_time_stamp;
+ long unsigned int dirtied_stamp;
+ long unsigned int written_stamp;
+ long unsigned int write_bandwidth;
+ long unsigned int avg_write_bandwidth;
+ long unsigned int dirty_ratelimit;
+ long unsigned int balanced_dirty_ratelimit;
+ struct fprop_local_percpu completions;
+ int dirty_exceeded;
+ enum wb_reason start_all_reason;
+ spinlock_t work_lock;
+ struct list_head work_list;
+ struct delayed_work dwork;
+ struct delayed_work bw_dwork;
+ long unsigned int dirty_sleep;
+ struct list_head bdi_node;
+ struct percpu_ref refcnt;
+ struct fprop_local_percpu memcg_completions;
+ struct cgroup_subsys_state *memcg_css;
+ struct cgroup_subsys_state *blkcg_css;
+ struct list_head memcg_node;
+ struct list_head blkcg_node;
+ struct list_head b_attached;
+ struct list_head offline_node;
+ union {
+ struct work_struct release_work;
+ struct callback_head rcu;
+ };
+};
+
+struct device;
+
+struct backing_dev_info {
+ u64 id;
+ struct rb_node rb_node;
+ struct list_head bdi_list;
+ long unsigned int ra_pages;
+ long unsigned int io_pages;
+ struct kref refcnt;
+ unsigned int capabilities;
+ unsigned int min_ratio;
+ unsigned int max_ratio;
+ unsigned int max_prop_frac;
+ atomic_long_t tot_write_bandwidth;
+ struct bdi_writeback wb;
+ struct list_head wb_list;
+ struct xarray cgwb_tree;
+ struct mutex cgwb_release_mutex;
+ struct rw_semaphore wb_switch_rwsem;
+ wait_queue_head_t wb_waitq;
+ struct device *dev;
+ char dev_name[64];
+ struct device *owner;
+ struct timer_list laptop_mode_wb_timer;
+ struct dentry *debug_dir;
+};
+
+struct io_cq;
+
+struct io_context {
+ atomic_long_t refcount;
+ atomic_t active_ref;
+ atomic_t nr_tasks;
+ spinlock_t lock;
+ short unsigned int ioprio;
+ struct xarray icq_tree;
+ struct io_cq *icq_hint;
+ struct hlist_head icq_list;
+ struct work_struct release_work;
+};
+
+struct cgroup;
+
+struct css_set {
+ struct cgroup_subsys_state *subsys[14];
+ refcount_t refcount;
+ struct css_set *dom_cset;
+ struct cgroup *dfl_cgrp;
+ int nr_tasks;
+ struct list_head tasks;
+ struct list_head mg_tasks;
+ struct list_head dying_tasks;
+ struct list_head task_iters;
+ struct list_head e_cset_node[14];
+ struct list_head threaded_csets;
+ struct list_head threaded_csets_node;
+ struct hlist_node hlist;
+ struct list_head cgrp_links;
+ struct list_head mg_preload_node;
+ struct list_head mg_node;
+ struct cgroup *mg_src_cgrp;
+ struct cgroup *mg_dst_cgrp;
+ struct css_set *mg_dst_cset;
+ bool dead;
+ struct callback_head callback_head;
+};
+
+struct compat_robust_list {
+ compat_uptr_t next;
+};
+
+struct compat_robust_list_head {
+ struct compat_robust_list list;
+ compat_long_t futex_offset;
+ compat_uptr_t list_op_pending;
+};
+
+struct perf_event_groups {
+ struct rb_root tree;
+ u64 index;
+};
+
+struct perf_event_context {
+ struct pmu *pmu;
+ raw_spinlock_t lock;
+ struct mutex mutex;
+ struct list_head active_ctx_list;
+ struct perf_event_groups pinned_groups;
+ struct perf_event_groups flexible_groups;
+ struct list_head event_list;
+ struct list_head pinned_active;
+ struct list_head flexible_active;
+ int nr_events;
+ int nr_active;
+ int is_active;
+ int nr_stat;
+ int nr_freq;
+ int rotate_disable;
+ int rotate_necessary;
+ refcount_t refcount;
+ struct task_struct *task;
+ u64 time;
+ u64 timestamp;
+ struct perf_event_context *parent_ctx;
+ u64 parent_gen;
+ u64 generation;
+ int pin_count;
+ int nr_cgroups;
+ void *task_ctx_data;
+ struct callback_head callback_head;
+};
+
+struct mempolicy {
+ atomic_t refcnt;
+ short unsigned int mode;
+ short unsigned int flags;
+ nodemask_t nodes;
+ union {
+ nodemask_t cpuset_mems_allowed;
+ nodemask_t user_nodemask;
+ } w;
+};
+
+struct task_delay_info {
+ raw_spinlock_t lock;
+ unsigned int flags;
+ u64 blkio_start;
+ u64 blkio_delay;
+ u64 swapin_delay;
+ u32 blkio_count;
+ u32 swapin_count;
+ u64 freepages_start;
+ u64 freepages_delay;
+ u64 thrashing_start;
+ u64 thrashing_delay;
+ u32 freepages_count;
+ u32 thrashing_count;
+};
+
+struct ftrace_ret_stack {
+ long unsigned int ret;
+ long unsigned int func;
+ long long unsigned int calltime;
+ long long unsigned int subtime;
+ long unsigned int fp;
+ long unsigned int *retp;
+};
+
+struct cgroup_subsys;
+
+struct cgroup_subsys_state {
+ struct cgroup *cgroup;
+ struct cgroup_subsys *ss;
+ struct percpu_ref refcnt;
+ struct list_head sibling;
+ struct list_head children;
+ struct list_head rstat_css_node;
+ int id;
+ unsigned int flags;
+ u64 serial_nr;
+ atomic_t online_cnt;
+ struct work_struct destroy_work;
+ struct rcu_work destroy_rwork;
+ struct cgroup_subsys_state *parent;
+};
+
+struct mem_cgroup_id {
+ int id;
+ refcount_t ref;
+};
+
+struct page_counter {
+ atomic_long_t usage;
+ long unsigned int min;
+ long unsigned int low;
+ long unsigned int high;
+ long unsigned int max;
+ long unsigned int emin;
+ atomic_long_t min_usage;
+ atomic_long_t children_min_usage;
+ long unsigned int elow;
+ atomic_long_t low_usage;
+ atomic_long_t children_low_usage;
+ long unsigned int watermark;
+ long unsigned int failcnt;
+ struct page_counter *parent;
+};
+
+struct vmpressure {
+ long unsigned int scanned;
+ long unsigned int reclaimed;
+ long unsigned int tree_scanned;
+ long unsigned int tree_reclaimed;
+ spinlock_t sr_lock;
+ struct list_head events;
+ struct mutex events_lock;
+ struct work_struct work;
+};
+
+struct cgroup_file {
+ struct kernfs_node *kn;
+ long unsigned int notified_at;
+ struct timer_list notify_timer;
+};
+
+struct mem_cgroup_threshold_ary;
+
+struct mem_cgroup_thresholds {
+ struct mem_cgroup_threshold_ary *primary;
+ struct mem_cgroup_threshold_ary *spare;
+};
+
+struct memcg_padding {
+ char x[0];
+};
+
+struct memcg_vmstats {
+ long int state[43];
+ long unsigned int events[99];
+ long int state_pending[43];
+ long unsigned int events_pending[99];
+};
+
+struct fprop_global {
+ struct percpu_counter events;
+ unsigned int period;
+ seqcount_t sequence;
+};
+
+struct wb_domain {
+ spinlock_t lock;
+ struct fprop_global completions;
+ struct timer_list period_timer;
+ long unsigned int period_time;
+ long unsigned int dirty_limit_tstamp;
+ long unsigned int dirty_limit;
+};
+
+struct wb_completion {
+ atomic_t cnt;
+ wait_queue_head_t *waitq;
+};
+
+struct memcg_cgwb_frn {
+ u64 bdi_id;
+ int memcg_id;
+ u64 at;
+ struct wb_completion done;
+};
+
+struct deferred_split {
+ spinlock_t split_queue_lock;
+ struct list_head split_queue;
+ long unsigned int split_queue_len;
+};
+
+struct obj_cgroup;
+
+struct memcg_vmstats_percpu;
+
+struct mem_cgroup_per_node;
+
+struct mem_cgroup {
+ struct cgroup_subsys_state css;
+ struct mem_cgroup_id id;
+ struct page_counter memory;
+ union {
+ struct page_counter swap;
+ struct page_counter memsw;
+ };
+ struct page_counter kmem;
+ struct page_counter tcpmem;
+ struct work_struct high_work;
+ long unsigned int soft_limit;
+ struct vmpressure vmpressure;
+ bool oom_group;
+ bool oom_lock;
+ int under_oom;
+ int swappiness;
+ int oom_kill_disable;
+ struct cgroup_file events_file;
+ struct cgroup_file events_local_file;
+ struct cgroup_file swap_events_file;
+ struct mutex thresholds_lock;
+ struct mem_cgroup_thresholds thresholds;
+ struct mem_cgroup_thresholds memsw_thresholds;
+ struct list_head oom_notify;
+ long unsigned int move_charge_at_immigrate;
+ spinlock_t move_lock;
+ long unsigned int move_lock_flags;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ struct memcg_padding _pad1_;
+ struct memcg_vmstats vmstats;
+ atomic_long_t memory_events[8];
+ atomic_long_t memory_events_local[8];
+ long unsigned int socket_pressure;
+ bool tcpmem_active;
+ int tcpmem_pressure;
+ int kmemcg_id;
+ struct obj_cgroup *objcg;
+ struct list_head objcg_list;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ struct memcg_padding _pad2_;
+ atomic_t moving_account;
+ struct task_struct *move_lock_task;
+ struct memcg_vmstats_percpu *vmstats_percpu;
+ struct list_head cgwb_list;
+ struct wb_domain cgwb_domain;
+ struct memcg_cgwb_frn cgwb_frn[4];
+ struct list_head event_list;
+ spinlock_t event_list_lock;
+ struct deferred_split deferred_split_queue;
+ struct mem_cgroup_per_node *nodeinfo[0];
+ long: 64;
+};
+
+struct blk_integrity_profile;
+
+struct blk_integrity {
+ const struct blk_integrity_profile *profile;
+ unsigned char flags;
+ unsigned char tuple_size;
+ unsigned char interval_exp;
+ unsigned char tag_size;
+};
+
+enum rpm_status {
+ RPM_ACTIVE = 0,
+ RPM_RESUMING = 1,
+ RPM_SUSPENDED = 2,
+ RPM_SUSPENDING = 3,
+};
+
+struct blk_rq_stat {
+ u64 mean;
+ u64 min;
+ u64 max;
+ u32 nr_samples;
+ u64 batch;
+};
+
+enum blk_bounce {
+ BLK_BOUNCE_NONE = 0,
+ BLK_BOUNCE_HIGH = 1,
+};
+
+enum blk_zoned_model {
+ BLK_ZONED_NONE = 0,
+ BLK_ZONED_HA = 1,
+ BLK_ZONED_HM = 2,
+};
+
+struct queue_limits {
+ enum blk_bounce bounce;
+ long unsigned int seg_boundary_mask;
+ long unsigned int virt_boundary_mask;
+ unsigned int max_hw_sectors;
+ unsigned int max_dev_sectors;
+ unsigned int chunk_sectors;
+ unsigned int max_sectors;
+ unsigned int max_segment_size;
+ unsigned int physical_block_size;
+ unsigned int logical_block_size;
+ unsigned int alignment_offset;
+ unsigned int io_min;
+ unsigned int io_opt;
+ unsigned int max_discard_sectors;
+ unsigned int max_hw_discard_sectors;
+ unsigned int max_write_same_sectors;
+ unsigned int max_write_zeroes_sectors;
+ unsigned int max_zone_append_sectors;
+ unsigned int discard_granularity;
+ unsigned int discard_alignment;
+ unsigned int zone_write_granularity;
+ short unsigned int max_segments;
+ short unsigned int max_integrity_segments;
+ short unsigned int max_discard_segments;
+ unsigned char misaligned;
+ unsigned char discard_misaligned;
+ unsigned char raid_partial_stripes_expensive;
+ enum blk_zoned_model zoned;
+};
+
+typedef void *mempool_alloc_t(gfp_t, void *);
+
+typedef void mempool_free_t(void *, void *);
+
+struct mempool_s {
+ spinlock_t lock;
+ int min_nr;
+ int curr_nr;
+ void **elements;
+ void *pool_data;
+ mempool_alloc_t *alloc;
+ mempool_free_t *free;
+ wait_queue_head_t wait;
+};
+
+typedef struct mempool_s mempool_t;
+
+struct bio_alloc_cache;
+
+struct bio_set {
+ struct kmem_cache *bio_slab;
+ unsigned int front_pad;
+ struct bio_alloc_cache *cache;
+ mempool_t bio_pool;
+ mempool_t bvec_pool;
+ mempool_t bio_integrity_pool;
+ mempool_t bvec_integrity_pool;
+ unsigned int back_pad;
+ spinlock_t rescue_lock;
+ struct bio_list rescue_list;
+ struct work_struct rescue_work;
+ struct workqueue_struct *rescue_workqueue;
+ struct hlist_node cpuhp_dead;
+};
+
+struct elevator_queue;
+
+struct blk_queue_stats;
+
+struct rq_qos;
+
+struct blk_mq_ops;
+
+struct blk_mq_ctx;
+
+struct blk_mq_hw_ctx;
+
+struct gendisk;
+
+struct blk_crypto_profile;
+
+struct blk_stat_callback;
+
+struct blk_mq_tags;
+
+struct blkcg_gq;
+
+struct blk_trace;
+
+struct blk_flush_queue;
+
+struct throtl_data;
+
+struct blk_mq_tag_set;
+
+struct blk_independent_access_ranges;
+
+struct request_queue {
+ struct request *last_merge;
+ struct elevator_queue *elevator;
+ struct percpu_ref q_usage_counter;
+ struct blk_queue_stats *stats;
+ struct rq_qos *rq_qos;
+ const struct blk_mq_ops *mq_ops;
+ struct blk_mq_ctx *queue_ctx;
+ unsigned int queue_depth;
+ struct blk_mq_hw_ctx **queue_hw_ctx;
+ unsigned int nr_hw_queues;
+ void *queuedata;
+ long unsigned int queue_flags;
+ atomic_t pm_only;
+ int id;
+ spinlock_t queue_lock;
+ struct gendisk *disk;
+ struct kobject kobj;
+ struct kobject *mq_kobj;
+ struct blk_integrity integrity;
+ struct device *dev;
+ enum rpm_status rpm_status;
+ long unsigned int nr_requests;
+ unsigned int dma_pad_mask;
+ unsigned int dma_alignment;
+ struct blk_crypto_profile *crypto_profile;
+ unsigned int rq_timeout;
+ int poll_nsec;
+ struct blk_stat_callback *poll_cb;
+ struct blk_rq_stat poll_stat[16];
+ struct timer_list timeout;
+ struct work_struct timeout_work;
+ atomic_t nr_active_requests_shared_tags;
+ struct blk_mq_tags *sched_shared_tags;
+ struct list_head icq_list;
+ long unsigned int blkcg_pols[1];
+ struct blkcg_gq *root_blkg;
+ struct list_head blkg_list;
+ struct queue_limits limits;
+ unsigned int required_elevator_features;
+ unsigned int nr_zones;
+ long unsigned int *conv_zones_bitmap;
+ long unsigned int *seq_zones_wlock;
+ unsigned int max_open_zones;
+ unsigned int max_active_zones;
+ int node;
+ struct mutex debugfs_mutex;
+ struct blk_trace *blk_trace;
+ struct blk_flush_queue *fq;
+ struct list_head requeue_list;
+ spinlock_t requeue_lock;
+ struct delayed_work requeue_work;
+ struct mutex sysfs_lock;
+ struct mutex sysfs_dir_lock;
+ struct list_head unused_hctx_list;
+ spinlock_t unused_hctx_lock;
+ int mq_freeze_depth;
+ struct throtl_data *td;
+ struct callback_head callback_head;
+ wait_queue_head_t mq_freeze_wq;
+ struct mutex mq_freeze_lock;
+ int quiesce_depth;
+ struct blk_mq_tag_set *tag_set;
+ struct list_head tag_set_list;
+ struct bio_set bio_split;
+ struct dentry *debugfs_dir;
+ struct dentry *sched_debugfs_dir;
+ struct dentry *rqos_debugfs_dir;
+ bool mq_sysfs_init_done;
+ u64 write_hints[5];
+ struct blk_independent_access_ranges *ia_ranges;
+};
+
+enum uprobe_task_state {
+ UTASK_RUNNING = 0,
+ UTASK_SSTEP = 1,
+ UTASK_SSTEP_ACK = 2,
+ UTASK_SSTEP_TRAPPED = 3,
+};
+
+struct arch_uprobe_task {};
+
+struct uprobe;
+
+struct return_instance;
+
+struct uprobe_task {
+ enum uprobe_task_state state;
+ union {
+ struct {
+ struct arch_uprobe_task autask;
+ long unsigned int vaddr;
+ };
+ struct {
+ struct callback_head dup_xol_work;
+ long unsigned int dup_xol_addr;
+ };
+ };
+ struct uprobe *active_uprobe;
+ long unsigned int xol_vaddr;
+ struct return_instance *return_instances;
+ unsigned int depth;
+};
+
+struct vm_struct {
+ struct vm_struct *next;
+ void *addr;
+ long unsigned int size;
+ long unsigned int flags;
+ struct page **pages;
+ unsigned int nr_pages;
+ phys_addr_t phys_addr;
+ const void *caller;
+};
+
+struct bpf_run_ctx {};
+
+struct kstat {
+ u32 result_mask;
+ umode_t mode;
+ unsigned int nlink;
+ uint32_t blksize;
+ u64 attributes;
+ u64 attributes_mask;
+ u64 ino;
+ dev_t dev;
+ dev_t rdev;
+ kuid_t uid;
+ kgid_t gid;
+ loff_t size;
+ struct timespec64 atime;
+ struct timespec64 mtime;
+ struct timespec64 ctime;
+ struct timespec64 btime;
+ u64 blocks;
+ u64 mnt_id;
+};
+
+struct return_instance {
+ struct uprobe *uprobe;
+ long unsigned int func;
+ long unsigned int stack;
+ long unsigned int orig_ret_vaddr;
+ bool chained;
+ struct return_instance *next;
+};
+
+typedef u32 errseq_t;
+
+struct address_space_operations;
+
+struct address_space {
+ struct inode *host;
+ struct xarray i_pages;
+ struct rw_semaphore invalidate_lock;
+ gfp_t gfp_mask;
+ atomic_t i_mmap_writable;
+ struct rb_root_cached i_mmap;
+ struct rw_semaphore i_mmap_rwsem;
+ long unsigned int nrpages;
+ long unsigned int writeback_index;
+ const struct address_space_operations *a_ops;
+ long unsigned int flags;
+ errseq_t wb_err;
+ spinlock_t private_lock;
+ struct list_head private_list;
+ void *private_data;
+};
+
+struct vmem_altmap {
+ long unsigned int base_pfn;
+ const long unsigned int end_pfn;
+ const long unsigned int reserve;
+ long unsigned int free;
+ long unsigned int align;
+ long unsigned int alloc;
+};
+
+enum memory_type {
+ MEMORY_DEVICE_PRIVATE = 1,
+ MEMORY_DEVICE_FS_DAX = 2,
+ MEMORY_DEVICE_GENERIC = 3,
+ MEMORY_DEVICE_PCI_P2PDMA = 4,
+};
+
+struct range {
+ u64 start;
+ u64 end;
+};
+
+struct dev_pagemap_ops;
+
+struct dev_pagemap {
+ struct vmem_altmap altmap;
+ struct percpu_ref *ref;
+ struct percpu_ref internal_ref;
+ struct completion done;
+ enum memory_type type;
+ unsigned int flags;
+ const struct dev_pagemap_ops *ops;
+ void *owner;
+ int nr_range;
+ union {
+ struct range range;
+ struct range ranges[0];
+ };
+};
+
+struct folio {
+ union {
+ struct {
+ long unsigned int flags;
+ struct list_head lru;
+ struct address_space *mapping;
+ long unsigned int index;
+ void *private;
+ atomic_t _mapcount;
+ atomic_t _refcount;
+ long unsigned int memcg_data;
+ };
+ struct page page;
+ };
+};
+
+struct vfsmount;
+
+struct path {
+ struct vfsmount *mnt;
+ struct dentry *dentry;
+};
+
+enum rw_hint {
+ WRITE_LIFE_NOT_SET = 0,
+ WRITE_LIFE_NONE = 1,
+ WRITE_LIFE_SHORT = 2,
+ WRITE_LIFE_MEDIUM = 3,
+ WRITE_LIFE_LONG = 4,
+ WRITE_LIFE_EXTREME = 5,
+};
+
+struct fown_struct {
+ rwlock_t lock;
+ struct pid *pid;
+ enum pid_type pid_type;
+ kuid_t uid;
+ kuid_t euid;
+ int signum;
+};
+
+struct file_ra_state {
+ long unsigned int start;
+ unsigned int size;
+ unsigned int async_size;
+ unsigned int ra_pages;
+ unsigned int mmap_miss;
+ loff_t prev_pos;
+};
+
+struct file {
+ union {
+ struct llist_node fu_llist;
+ struct callback_head fu_rcuhead;
+ } f_u;
+ struct path f_path;
+ struct inode *f_inode;
+ const struct file_operations *f_op;
+ spinlock_t f_lock;
+ enum rw_hint f_write_hint;
+ atomic_long_t f_count;
+ unsigned int f_flags;
+ fmode_t f_mode;
+ struct mutex f_pos_lock;
+ loff_t f_pos;
+ struct fown_struct f_owner;
+ const struct cred *f_cred;
+ struct file_ra_state f_ra;
+ u64 f_version;
+ void *f_security;
+ void *private_data;
+ struct hlist_head *f_ep;
+ struct address_space *f_mapping;
+ errseq_t f_wb_err;
+ errseq_t f_sb_err;
+};
+
+struct anon_vma {
+ struct anon_vma *root;
+ struct rw_semaphore rwsem;
+ atomic_t refcount;
+ unsigned int degree;
+ struct anon_vma *parent;
+ struct rb_root_cached rb_root;
+};
+
+typedef unsigned int vm_fault_t;
+
+enum page_entry_size {
+ PE_SIZE_PTE = 0,
+ PE_SIZE_PMD = 1,
+ PE_SIZE_PUD = 2,
+};
+
+struct vm_fault;
+
+struct vm_operations_struct {
+ void (*open)(struct vm_area_struct *);
+ void (*close)(struct vm_area_struct *);
+ int (*may_split)(struct vm_area_struct *, long unsigned int);
+ int (*mremap)(struct vm_area_struct *);
+ int (*mprotect)(struct vm_area_struct *, long unsigned int, long unsigned int, long unsigned int);
+ vm_fault_t (*fault)(struct vm_fault *);
+ vm_fault_t (*huge_fault)(struct vm_fault *, enum page_entry_size);
+ vm_fault_t (*map_pages)(struct vm_fault *, long unsigned int, long unsigned int);
+ long unsigned int (*pagesize)(struct vm_area_struct *);
+ vm_fault_t (*page_mkwrite)(struct vm_fault *);
+ vm_fault_t (*pfn_mkwrite)(struct vm_fault *);
+ int (*access)(struct vm_area_struct *, long unsigned int, void *, int, int);
+ const char * (*name)(struct vm_area_struct *);
+ int (*set_policy)(struct vm_area_struct *, struct mempolicy *);
+ struct mempolicy * (*get_policy)(struct vm_area_struct *, long unsigned int);
+ struct page * (*find_special_page)(struct vm_area_struct *, long unsigned int);
+};
+
+struct linux_binprm;
+
+struct coredump_params;
+
+struct linux_binfmt {
+ struct list_head lh;
+ struct module *module;
+ int (*load_binary)(struct linux_binprm *);
+ int (*load_shlib)(struct file *);
+ int (*core_dump)(struct coredump_params *);
+ long unsigned int min_coredump;
+};
+
+enum fault_flag {
+ FAULT_FLAG_WRITE = 1,
+ FAULT_FLAG_MKWRITE = 2,
+ FAULT_FLAG_ALLOW_RETRY = 4,
+ FAULT_FLAG_RETRY_NOWAIT = 8,
+ FAULT_FLAG_KILLABLE = 16,
+ FAULT_FLAG_TRIED = 32,
+ FAULT_FLAG_USER = 64,
+ FAULT_FLAG_REMOTE = 128,
+ FAULT_FLAG_INSTRUCTION = 256,
+ FAULT_FLAG_INTERRUPTIBLE = 512,
+};
+
+struct vm_fault {
+ const struct {
+ struct vm_area_struct *vma;
+ gfp_t gfp_mask;
+ long unsigned int pgoff;
+ long unsigned int address;
+ };
+ enum fault_flag flags;
+ pmd_t *pmd;
+ pud_t *pud;
+ union {
+ pte_t orig_pte;
+ pmd_t orig_pmd;
+ };
+ struct page *cow_page;
+ struct page *page;
+ pte_t *pte;
+ spinlock_t *ptl;
+ pgtable_t prealloc_pte;
+};
+
+struct free_area {
+ struct list_head free_list[6];
+ long unsigned int nr_free;
+};
+
+struct zone_padding {
+ char x[0];
+};
+
+enum node_stat_item {
+ NR_LRU_BASE = 0,
+ NR_INACTIVE_ANON = 0,
+ NR_ACTIVE_ANON = 1,
+ NR_INACTIVE_FILE = 2,
+ NR_ACTIVE_FILE = 3,
+ NR_UNEVICTABLE = 4,
+ NR_SLAB_RECLAIMABLE_B = 5,
+ NR_SLAB_UNRECLAIMABLE_B = 6,
+ NR_ISOLATED_ANON = 7,
+ NR_ISOLATED_FILE = 8,
+ WORKINGSET_NODES = 9,
+ WORKINGSET_REFAULT_BASE = 10,
+ WORKINGSET_REFAULT_ANON = 10,
+ WORKINGSET_REFAULT_FILE = 11,
+ WORKINGSET_ACTIVATE_BASE = 12,
+ WORKINGSET_ACTIVATE_ANON = 12,
+ WORKINGSET_ACTIVATE_FILE = 13,
+ WORKINGSET_RESTORE_BASE = 14,
+ WORKINGSET_RESTORE_ANON = 14,
+ WORKINGSET_RESTORE_FILE = 15,
+ WORKINGSET_NODERECLAIM = 16,
+ NR_ANON_MAPPED = 17,
+ NR_FILE_MAPPED = 18,
+ NR_FILE_PAGES = 19,
+ NR_FILE_DIRTY = 20,
+ NR_WRITEBACK = 21,
+ NR_WRITEBACK_TEMP = 22,
+ NR_SHMEM = 23,
+ NR_SHMEM_THPS = 24,
+ NR_SHMEM_PMDMAPPED = 25,
+ NR_FILE_THPS = 26,
+ NR_FILE_PMDMAPPED = 27,
+ NR_ANON_THPS = 28,
+ NR_VMSCAN_WRITE = 29,
+ NR_VMSCAN_IMMEDIATE = 30,
+ NR_DIRTIED = 31,
+ NR_WRITTEN = 32,
+ NR_THROTTLED_WRITTEN = 33,
+ NR_KERNEL_MISC_RECLAIMABLE = 34,
+ NR_FOLL_PIN_ACQUIRED = 35,
+ NR_FOLL_PIN_RELEASED = 36,
+ NR_KERNEL_STACK_KB = 37,
+ NR_PAGETABLE = 38,
+ NR_SWAPCACHE = 39,
+ NR_VM_NODE_STAT_ITEMS = 40,
+};
+
+enum lru_list {
+ LRU_INACTIVE_ANON = 0,
+ LRU_ACTIVE_ANON = 1,
+ LRU_INACTIVE_FILE = 2,
+ LRU_ACTIVE_FILE = 3,
+ LRU_UNEVICTABLE = 4,
+ NR_LRU_LISTS = 5,
+};
+
+struct pglist_data;
+
+struct lruvec {
+ struct list_head lists[5];
+ spinlock_t lru_lock;
+ long unsigned int anon_cost;
+ long unsigned int file_cost;
+ atomic_long_t nonresident_age;
+ long unsigned int refaults[2];
+ long unsigned int flags;
+ struct pglist_data *pgdat;
+};
+
+struct per_cpu_pages;
+
+struct per_cpu_zonestat;
+
+struct zone {
+ long unsigned int _watermark[3];
+ long unsigned int watermark_boost;
+ long unsigned int nr_reserved_highatomic;
+ long int lowmem_reserve[5];
+ int node;
+ struct pglist_data *zone_pgdat;
+ struct per_cpu_pages *per_cpu_pageset;
+ struct per_cpu_zonestat *per_cpu_zonestats;
+ int pageset_high;
+ int pageset_batch;
+ long unsigned int zone_start_pfn;
+ atomic_long_t managed_pages;
+ long unsigned int spanned_pages;
+ long unsigned int present_pages;
+ long unsigned int present_early_pages;
+ long unsigned int cma_pages;
+ const char *name;
+ long unsigned int nr_isolate_pageblock;
+ seqlock_t span_seqlock;
+ int initialized;
+ long: 32;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ struct zone_padding _pad1_;
+ struct free_area free_area[11];
+ long unsigned int flags;
+ spinlock_t lock;
+ long: 32;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ struct zone_padding _pad2_;
+ long unsigned int percpu_drift_mark;
+ long unsigned int compact_cached_free_pfn;
+ long unsigned int compact_cached_migrate_pfn[2];
+ long unsigned int compact_init_migrate_pfn;
+ long unsigned int compact_init_free_pfn;
+ unsigned int compact_considered;
+ unsigned int compact_defer_shift;
+ int compact_order_failed;
+ bool compact_blockskip_flush;
+ bool contiguous;
+ short: 16;
+ struct zone_padding _pad3_;
+ atomic_long_t vm_stat[11];
+ atomic_long_t vm_numa_event[6];
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+};
+
+struct zoneref {
+ struct zone *zone;
+ int zone_idx;
+};
+
+struct zonelist {
+ struct zoneref _zonerefs[321];
+};
+
+enum zone_type {
+ ZONE_DMA = 0,
+ ZONE_DMA32 = 1,
+ ZONE_NORMAL = 2,
+ ZONE_MOVABLE = 3,
+ ZONE_DEVICE = 4,
+ __MAX_NR_ZONES = 5,
+};
+
+struct per_cpu_nodestat;
+
+struct pglist_data {
+ struct zone node_zones[5];
+ struct zonelist node_zonelists[2];
+ int nr_zones;
+ spinlock_t node_size_lock;
+ long unsigned int node_start_pfn;
+ long unsigned int node_present_pages;
+ long unsigned int node_spanned_pages;
+ int node_id;
+ wait_queue_head_t kswapd_wait;
+ wait_queue_head_t pfmemalloc_wait;
+ wait_queue_head_t reclaim_wait[4];
+ atomic_t nr_writeback_throttled;
+ long unsigned int nr_reclaim_start;
+ struct task_struct *kswapd;
+ int kswapd_order;
+ enum zone_type kswapd_highest_zoneidx;
+ int kswapd_failures;
+ int kcompactd_max_order;
+ enum zone_type kcompactd_highest_zoneidx;
+ wait_queue_head_t kcompactd_wait;
+ struct task_struct *kcompactd;
+ bool proactive_compact_trigger;
+ long unsigned int totalreserve_pages;
+ long unsigned int min_unmapped_pages;
+ long unsigned int min_slab_pages;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ struct zone_padding _pad1_;
+ struct deferred_split deferred_split_queue;
+ struct lruvec __lruvec;
+ long unsigned int flags;
+ long: 64;
+ struct zone_padding _pad2_;
+ struct per_cpu_nodestat *per_cpu_nodestats;
+ atomic_long_t vm_stat[40];
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+};
+
+typedef unsigned int isolate_mode_t;
+
+struct per_cpu_pages {
+ int count;
+ int high;
+ int batch;
+ short int free_factor;
+ short int expire;
+ struct list_head lists[15];
+};
+
+struct per_cpu_zonestat {
+ s8 vm_stat_diff[11];
+ s8 stat_threshold;
+ long unsigned int vm_numa_event[6];
+};
+
+struct per_cpu_nodestat {
+ s8 stat_threshold;
+ s8 vm_node_stat_diff[40];
+};
+
+typedef struct pglist_data pg_data_t;
+
+struct rcu_segcblist {
+ struct callback_head *head;
+ struct callback_head **tails[4];
+ long unsigned int gp_seq[4];
+ long int len;
+ long int seglen[4];
+ u8 flags;
+};
+
+struct srcu_node;
+
+struct srcu_data {
+ long unsigned int srcu_lock_count[2];
+ long unsigned int srcu_unlock_count[2];
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ spinlock_t lock;
+ struct rcu_segcblist srcu_cblist;
+ long unsigned int srcu_gp_seq_needed;
+ long unsigned int srcu_gp_seq_needed_exp;
+ bool srcu_cblist_invoking;
+ struct timer_list delay_work;
+ struct work_struct work;
+ struct callback_head srcu_barrier_head;
+ struct srcu_node *mynode;
+ long unsigned int grpmask;
+ int cpu;
+ struct srcu_struct *ssp;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+};
+
+struct srcu_node {
+ spinlock_t lock;
+ long unsigned int srcu_have_cbs[4];
+ long unsigned int srcu_data_have_cbs[4];
+ long unsigned int srcu_gp_seq_needed_exp;
+ struct srcu_node *srcu_parent;
+ int grplo;
+ int grphi;
+};
+
+struct srcu_struct {
+ struct srcu_node node[17];
+ struct srcu_node *level[3];
+ struct mutex srcu_cb_mutex;
+ spinlock_t lock;
+ struct mutex srcu_gp_mutex;
+ unsigned int srcu_idx;
+ long unsigned int srcu_gp_seq;
+ long unsigned int srcu_gp_seq_needed;
+ long unsigned int srcu_gp_seq_needed_exp;
+ long unsigned int srcu_last_gp_end;
+ struct srcu_data *sda;
+ long unsigned int srcu_barrier_seq;
+ struct mutex srcu_barrier_mutex;
+ struct completion srcu_barrier_completion;
+ atomic_t srcu_barrier_cpu_cnt;
+ struct delayed_work work;
+ struct lockdep_map dep_map;
+};
+
+typedef int proc_handler(struct ctl_table *, int, void *, size_t *, loff_t *);
+
+struct ctl_table_poll;
+
+struct ctl_table {
+ const char *procname;
+ void *data;
+ int maxlen;
+ umode_t mode;
+ struct ctl_table *child;
+ proc_handler *proc_handler;
+ struct ctl_table_poll *poll;
+ void *extra1;
+ void *extra2;
+};
+
+struct ctl_table_poll {
+ atomic_t event;
+ wait_queue_head_t wait;
+};
+
+struct ctl_node {
+ struct rb_node node;
+ struct ctl_table_header *header;
+};
+
+struct ctl_table_root {
+ struct ctl_table_set default_set;
+ struct ctl_table_set * (*lookup)(struct ctl_table_root *);
+ void (*set_ownership)(struct ctl_table_header *, struct ctl_table *, kuid_t *, kgid_t *);
+ int (*permissions)(struct ctl_table_header *, struct ctl_table *);
+};
+
+typedef __u64 Elf64_Addr;
+
+typedef __u16 Elf64_Half;
+
+typedef __u32 Elf64_Word;
+
+typedef __u64 Elf64_Xword;
+
+struct elf64_sym {
+ Elf64_Word st_name;
+ unsigned char st_info;
+ unsigned char st_other;
+ Elf64_Half st_shndx;
+ Elf64_Addr st_value;
+ Elf64_Xword st_size;
+};
+
+struct hlist_bl_node;
+
+struct hlist_bl_head {
+ struct hlist_bl_node *first;
+};
+
+struct hlist_bl_node {
+ struct hlist_bl_node *next;
+ struct hlist_bl_node **pprev;
+};
+
+struct lockref {
+ union {
+ __u64 lock_count;
+ struct {
+ spinlock_t lock;
+ int count;
+ };
+ };
+};
+
+struct qstr {
+ union {
+ struct {
+ u32 hash;
+ u32 len;
+ };
+ u64 hash_len;
+ };
+ const unsigned char *name;
+};
+
+struct dentry_operations;
+
+struct dentry {
+ unsigned int d_flags;
+ seqcount_spinlock_t d_seq;
+ struct hlist_bl_node d_hash;
+ struct dentry *d_parent;
+ struct qstr d_name;
+ struct inode *d_inode;
+ unsigned char d_iname[32];
+ struct lockref d_lockref;
+ const struct dentry_operations *d_op;
+ struct super_block *d_sb;
+ long unsigned int d_time;
+ void *d_fsdata;
+ union {
+ struct list_head d_lru;
+ wait_queue_head_t *d_wait;
+ };
+ struct list_head d_child;
+ struct list_head d_subdirs;
+ union {
+ struct hlist_node d_alias;
+ struct hlist_bl_node d_in_lookup_hash;
+ struct callback_head d_rcu;
+ } d_u;
+};
+
+struct posix_acl;
+
+struct inode_operations;
+
+struct file_lock_context;
+
+struct cdev;
+
+struct fsnotify_mark_connector;
+
+struct fscrypt_info;
+
+struct fsverity_info;
+
+struct inode {
+ umode_t i_mode;
+ short unsigned int i_opflags;
+ kuid_t i_uid;
+ kgid_t i_gid;
+ unsigned int i_flags;
+ struct posix_acl *i_acl;
+ struct posix_acl *i_default_acl;
+ const struct inode_operations *i_op;
+ struct super_block *i_sb;
+ struct address_space *i_mapping;
+ void *i_security;
+ long unsigned int i_ino;
+ union {
+ const unsigned int i_nlink;
+ unsigned int __i_nlink;
+ };
+ dev_t i_rdev;
+ loff_t i_size;
+ struct timespec64 i_atime;
+ struct timespec64 i_mtime;
+ struct timespec64 i_ctime;
+ spinlock_t i_lock;
+ short unsigned int i_bytes;
+ u8 i_blkbits;
+ u8 i_write_hint;
+ blkcnt_t i_blocks;
+ long unsigned int i_state;
+ struct rw_semaphore i_rwsem;
+ long unsigned int dirtied_when;
+ long unsigned int dirtied_time_when;
+ struct hlist_node i_hash;
+ struct list_head i_io_list;
+ struct bdi_writeback *i_wb;
+ int i_wb_frn_winner;
+ u16 i_wb_frn_avg_time;
+ u16 i_wb_frn_history;
+ struct list_head i_lru;
+ struct list_head i_sb_list;
+ struct list_head i_wb_list;
+ union {
+ struct hlist_head i_dentry;
+ struct callback_head i_rcu;
+ };
+ atomic64_t i_version;
+ atomic64_t i_sequence;
+ atomic_t i_count;
+ atomic_t i_dio_count;
+ atomic_t i_writecount;
+ atomic_t i_readcount;
+ union {
+ const struct file_operations *i_fop;
+ void (*free_inode)(struct inode *);
+ };
+ struct file_lock_context *i_flctx;
+ struct address_space i_data;
+ struct list_head i_devices;
+ union {
+ struct pipe_inode_info *i_pipe;
+ struct cdev *i_cdev;
+ char *i_link;
+ unsigned int i_dir_seq;
+ };
+ __u32 i_generation;
+ __u32 i_fsnotify_mask;
+ struct fsnotify_mark_connector *i_fsnotify_marks;
+ struct fscrypt_info *i_crypt_info;
+ struct fsverity_info *i_verity_info;
+ void *i_private;
+};
+
+struct dentry_operations {
+ int (*d_revalidate)(struct dentry *, unsigned int);
+ int (*d_weak_revalidate)(struct dentry *, unsigned int);
+ int (*d_hash)(const struct dentry *, struct qstr *);
+ int (*d_compare)(const struct dentry *, unsigned int, const char *, const struct qstr *);
+ int (*d_delete)(const struct dentry *);
+ int (*d_init)(struct dentry *);
+ void (*d_release)(struct dentry *);
+ void (*d_prune)(struct dentry *);
+ void (*d_iput)(struct dentry *, struct inode *);
+ char * (*d_dname)(struct dentry *, char *, int);
+ struct vfsmount * (*d_automount)(struct path *);
+ int (*d_manage)(const struct path *, bool);
+ struct dentry * (*d_real)(struct dentry *, const struct inode *);
+ long: 64;
+ long: 64;
+ long: 64;
+};
+
+struct mtd_info;
+
+typedef long long int qsize_t;
+
+struct quota_format_type;
+
+struct mem_dqinfo {
+ struct quota_format_type *dqi_format;
+ int dqi_fmt_id;
+ struct list_head dqi_dirty_list;
+ long unsigned int dqi_flags;
+ unsigned int dqi_bgrace;
+ unsigned int dqi_igrace;
+ qsize_t dqi_max_spc_limit;
+ qsize_t dqi_max_ino_limit;
+ void *dqi_priv;
+};
+
+struct quota_format_ops;
+
+struct quota_info {
+ unsigned int flags;
+ struct rw_semaphore dqio_sem;
+ struct inode *files[3];
+ struct mem_dqinfo info[3];
+ const struct quota_format_ops *ops[3];
+};
+
+struct rcu_sync {
+ int gp_state;
+ int gp_count;
+ wait_queue_head_t gp_wait;
+ struct callback_head cb_head;
+};
+
+struct percpu_rw_semaphore {
+ struct rcu_sync rss;
+ unsigned int *read_count;
+ struct rcuwait writer;
+ wait_queue_head_t waiters;
+ atomic_t block;
+};
+
+struct sb_writers {
+ int frozen;
+ wait_queue_head_t wait_unfrozen;
+ struct percpu_rw_semaphore rw_sem[3];
+};
+
+typedef struct {
+ __u8 b[16];
+} uuid_t;
+
+struct shrink_control;
+
+struct shrinker {
+ long unsigned int (*count_objects)(struct shrinker *, struct shrink_control *);
+ long unsigned int (*scan_objects)(struct shrinker *, struct shrink_control *);
+ long int batch;
+ int seeks;
+ unsigned int flags;
+ struct list_head list;
+ int id;
+ atomic_long_t *nr_deferred;
+};
+
+struct list_lru_node;
+
+struct list_lru {
+ struct list_lru_node *node;
+ struct list_head list;
+ int shrinker_id;
+ bool memcg_aware;
+};
+
+struct super_operations;
+
+struct dquot_operations;
+
+struct quotactl_ops;
+
+struct export_operations;
+
+struct xattr_handler;
+
+struct fscrypt_operations;
+
+struct fsverity_operations;
+
+struct unicode_map;
+
+struct block_device;
+
+struct super_block {
+ struct list_head s_list;
+ dev_t s_dev;
+ unsigned char s_blocksize_bits;
+ long unsigned int s_blocksize;
+ loff_t s_maxbytes;
+ struct file_system_type *s_type;
+ const struct super_operations *s_op;
+ const struct dquot_operations *dq_op;
+ const struct quotactl_ops *s_qcop;
+ const struct export_operations *s_export_op;
+ long unsigned int s_flags;
+ long unsigned int s_iflags;
+ long unsigned int s_magic;
+ struct dentry *s_root;
+ struct rw_semaphore s_umount;
+ int s_count;
+ atomic_t s_active;
+ void *s_security;
+ const struct xattr_handler **s_xattr;
+ const struct fscrypt_operations *s_cop;
+ struct key *s_master_keys;
+ const struct fsverity_operations *s_vop;
+ struct unicode_map *s_encoding;
+ __u16 s_encoding_flags;
+ struct hlist_bl_head s_roots;
+ struct list_head s_mounts;
+ struct block_device *s_bdev;
+ struct backing_dev_info *s_bdi;
+ struct mtd_info *s_mtd;
+ struct hlist_node s_instances;
+ unsigned int s_quota_types;
+ struct quota_info s_dquot;
+ struct sb_writers s_writers;
+ void *s_fs_info;
+ u32 s_time_gran;
+ time64_t s_time_min;
+ time64_t s_time_max;
+ __u32 s_fsnotify_mask;
+ struct fsnotify_mark_connector *s_fsnotify_marks;
+ char s_id[32];
+ uuid_t s_uuid;
+ unsigned int s_max_links;
+ fmode_t s_mode;
+ struct mutex s_vfs_rename_mutex;
+ const char *s_subtype;
+ const struct dentry_operations *s_d_op;
+ int cleancache_poolid;
+ struct shrinker s_shrink;
+ atomic_long_t s_remove_count;
+ atomic_long_t s_fsnotify_connectors;
+ int s_readonly_remount;
+ errseq_t s_wb_err;
+ struct workqueue_struct *s_dio_done_wq;
+ struct hlist_head s_pins;
+ struct user_namespace *s_user_ns;
+ struct list_lru s_dentry_lru;
+ struct list_lru s_inode_lru;
+ struct callback_head rcu;
+ struct work_struct destroy_work;
+ struct mutex s_sync_lock;
+ int s_stack_depth;
+ int: 32;
+ spinlock_t s_inode_list_lock;
+ struct list_head s_inodes;
+ spinlock_t s_inode_wblist_lock;
+ struct list_head s_inodes_wb;
+ long: 64;
+ long: 64;
+};
+
+struct vfsmount {
+ struct dentry *mnt_root;
+ struct super_block *mnt_sb;
+ int mnt_flags;
+ struct user_namespace *mnt_userns;
+};
+
+struct shrink_control {
+ gfp_t gfp_mask;
+ int nid;
+ long unsigned int nr_to_scan;
+ long unsigned int nr_scanned;
+ struct mem_cgroup *memcg;
+};
+
+struct list_lru_one {
+ struct list_head list;
+ long int nr_items;
+};
+
+struct list_lru_memcg {
+ struct callback_head rcu;
+ struct list_lru_one *lru[0];
+};
+
+struct list_lru_node {
+ spinlock_t lock;
+ struct list_lru_one lru;
+ struct list_lru_memcg *memcg_lrus;
+ long int nr_items;
+ long: 64;
+ long: 64;
+};
+
+enum migrate_mode {
+ MIGRATE_ASYNC = 0,
+ MIGRATE_SYNC_LIGHT = 1,
+ MIGRATE_SYNC = 2,
+ MIGRATE_SYNC_NO_COPY = 3,
+};
+
+struct exception_table_entry {
+ int insn;
+ int fixup;
+ short int type;
+ short int data;
+};
+
+struct cgroup_base_stat {
+ struct task_cputime cputime;
+};
+
+struct psi_group_cpu;
+
+struct psi_group {
+ struct mutex avgs_lock;
+ struct psi_group_cpu *pcpu;
+ u64 avg_total[6];
+ u64 avg_last_update;
+ u64 avg_next_update;
+ struct delayed_work avgs_work;
+ u64 total[12];
+ long unsigned int avg[18];
+ struct task_struct *poll_task;
+ struct timer_list poll_timer;
+ wait_queue_head_t poll_wait;
+ atomic_t poll_wakeup;
+ struct mutex trigger_lock;
+ struct list_head triggers;
+ u32 nr_triggers[6];
+ u32 poll_states;
+ u64 poll_min_period;
+ u64 polling_total[6];
+ u64 polling_next_update;
+ u64 polling_until;
+};
+
+struct bpf_prog_array;
+
+struct cgroup_bpf {
+ struct bpf_prog_array *effective[23];
+ struct list_head progs[23];
+ u32 flags[23];
+ struct list_head storages;
+ struct bpf_prog_array *inactive;
+ struct percpu_ref refcnt;
+ struct work_struct release_work;
+};
+
+struct cgroup_freezer_state {
+ bool freeze;
+ int e_freeze;
+ int nr_frozen_descendants;
+ int nr_frozen_tasks;
+};
+
+struct cgroup_root;
+
+struct cgroup_rstat_cpu;
+
+struct cgroup {
+ struct cgroup_subsys_state self;
+ long unsigned int flags;
+ int level;
+ int max_depth;
+ int nr_descendants;
+ int nr_dying_descendants;
+ int max_descendants;
+ int nr_populated_csets;
+ int nr_populated_domain_children;
+ int nr_populated_threaded_children;
+ int nr_threaded_children;
+ struct kernfs_node *kn;
+ struct cgroup_file procs_file;
+ struct cgroup_file events_file;
+ u16 subtree_control;
+ u16 subtree_ss_mask;
+ u16 old_subtree_control;
+ u16 old_subtree_ss_mask;
+ struct cgroup_subsys_state *subsys[14];
+ struct cgroup_root *root;
+ struct list_head cset_links;
+ struct list_head e_csets[14];
+ struct cgroup *dom_cgrp;
+ struct cgroup *old_dom_cgrp;
+ struct cgroup_rstat_cpu *rstat_cpu;
+ struct list_head rstat_css_list;
+ struct cgroup_base_stat last_bstat;
+ struct cgroup_base_stat bstat;
+ struct prev_cputime prev_cputime;
+ struct list_head pidlists;
+ struct mutex pidlist_mutex;
+ wait_queue_head_t offline_waitq;
+ struct work_struct release_agent_work;
+ struct psi_group psi;
+ struct cgroup_bpf bpf;
+ atomic_t congestion_count;
+ struct cgroup_freezer_state freezer;
+ u64 ancestor_ids[0];
+};
+
+struct key_tag {
+ struct callback_head rcu;
+ refcount_t usage;
+ bool removed;
+};
+
+typedef int (*request_key_actor_t)(struct key *, void *);
+
+struct key_preparsed_payload;
+
+struct key_match_data;
+
+struct kernel_pkey_params;
+
+struct kernel_pkey_query;
+
+struct key_type {
+ const char *name;
+ size_t def_datalen;
+ unsigned int flags;
+ int (*vet_description)(const char *);
+ int (*preparse)(struct key_preparsed_payload *);
+ void (*free_preparse)(struct key_preparsed_payload *);
+ int (*instantiate)(struct key *, struct key_preparsed_payload *);
+ int (*update)(struct key *, struct key_preparsed_payload *);
+ int (*match_preparse)(struct key_match_data *);
+ void (*match_free)(struct key_match_data *);
+ void (*revoke)(struct key *);
+ void (*destroy)(struct key *);
+ void (*describe)(const struct key *, struct seq_file *);
+ long int (*read)(const struct key *, char *, size_t);
+ request_key_actor_t request_key;
+ struct key_restriction * (*lookup_restriction)(const char *);
+ int (*asym_query)(const struct kernel_pkey_params *, struct kernel_pkey_query *);
+ int (*asym_eds_op)(struct kernel_pkey_params *, const void *, void *);
+ int (*asym_verify_signature)(struct kernel_pkey_params *, const void *, const void *);
+ struct list_head link;
+ struct lock_class_key lock_class;
+};
+
+typedef int (*key_restrict_link_func_t)(struct key *, const struct key_type *, const union key_payload *, struct key *);
+
+struct key_restriction {
+ key_restrict_link_func_t check;
+ struct key *key;
+ struct key_type *keytype;
+};
+
+struct user_struct {
+ refcount_t __count;
+ struct percpu_counter epoll_watches;
+ long unsigned int unix_inflight;
+ atomic_long_t pipe_bufs;
+ struct hlist_node uidhash_node;
+ kuid_t uid;
+ atomic_long_t locked_vm;
+ atomic_t nr_watches;
+ struct ratelimit_state ratelimit;
+};
+
+struct group_info {
+ atomic_t usage;
+ int ngroups;
+ kgid_t gid[0];
+};
+
+struct core_thread {
+ struct task_struct *task;
+ struct core_thread *next;
+};
+
+struct core_state {
+ atomic_t nr_threads;
+ struct core_thread dumper;
+ struct completion startup;
+};
+
+struct taskstats {
+ __u16 version;
+ __u32 ac_exitcode;
+ __u8 ac_flag;
+ __u8 ac_nice;
+ __u64 cpu_count;
+ __u64 cpu_delay_total;
+ __u64 blkio_count;
+ __u64 blkio_delay_total;
+ __u64 swapin_count;
+ __u64 swapin_delay_total;
+ __u64 cpu_run_real_total;
+ __u64 cpu_run_virtual_total;
+ char ac_comm[32];
+ __u8 ac_sched;
+ __u8 ac_pad[3];
+ int: 32;
+ __u32 ac_uid;
+ __u32 ac_gid;
+ __u32 ac_pid;
+ __u32 ac_ppid;
+ __u32 ac_btime;
+ __u64 ac_etime;
+ __u64 ac_utime;
+ __u64 ac_stime;
+ __u64 ac_minflt;
+ __u64 ac_majflt;
+ __u64 coremem;
+ __u64 virtmem;
+ __u64 hiwater_rss;
+ __u64 hiwater_vm;
+ __u64 read_char;
+ __u64 write_char;
+ __u64 read_syscalls;
+ __u64 write_syscalls;
+ __u64 read_bytes;
+ __u64 write_bytes;
+ __u64 cancelled_write_bytes;
+ __u64 nvcsw;
+ __u64 nivcsw;
+ __u64 ac_utimescaled;
+ __u64 ac_stimescaled;
+ __u64 cpu_scaled_run_real_total;
+ __u64 freepages_count;
+ __u64 freepages_delay_total;
+ __u64 thrashing_count;
+ __u64 thrashing_delay_total;
+ __u64 ac_btime64;
+};
+
+struct delayed_call {
+ void (*fn)(void *);
+ void *arg;
+};
+
+struct io_cq {
+ struct request_queue *q;
+ struct io_context *ioc;
+ union {
+ struct list_head q_node;
+ struct kmem_cache *__rcu_icq_cache;
+ };
+ union {
+ struct hlist_node ioc_node;
+ struct callback_head __rcu_head;
+ };
+ unsigned int flags;
+};
+
+struct wait_page_queue;
+
+struct kiocb {
+ struct file *ki_filp;
+ loff_t ki_pos;
+ void (*ki_complete)(struct kiocb *, long int);
+ void *private;
+ int ki_flags;
+ u16 ki_hint;
+ u16 ki_ioprio;
+ struct wait_page_queue *ki_waitq;
+};
+
+struct iattr {
+ unsigned int ia_valid;
+ umode_t ia_mode;
+ kuid_t ia_uid;
+ kgid_t ia_gid;
+ loff_t ia_size;
+ struct timespec64 ia_atime;
+ struct timespec64 ia_mtime;
+ struct timespec64 ia_ctime;
+ struct file *ia_file;
+};
+
+typedef __kernel_uid32_t projid_t;
+
+typedef struct {
+ projid_t val;
+} kprojid_t;
+
+enum quota_type {
+ USRQUOTA = 0,
+ GRPQUOTA = 1,
+ PRJQUOTA = 2,
+};
+
+struct kqid {
+ union {
+ kuid_t uid;
+ kgid_t gid;
+ kprojid_t projid;
+ };
+ enum quota_type type;
+};
+
+struct mem_dqblk {
+ qsize_t dqb_bhardlimit;
+ qsize_t dqb_bsoftlimit;
+ qsize_t dqb_curspace;
+ qsize_t dqb_rsvspace;
+ qsize_t dqb_ihardlimit;
+ qsize_t dqb_isoftlimit;
+ qsize_t dqb_curinodes;
+ time64_t dqb_btime;
+ time64_t dqb_itime;
+};
+
+struct dquot {
+ struct hlist_node dq_hash;
+ struct list_head dq_inuse;
+ struct list_head dq_free;
+ struct list_head dq_dirty;
+ struct mutex dq_lock;
+ spinlock_t dq_dqb_lock;
+ atomic_t dq_count;
+ struct super_block *dq_sb;
+ struct kqid dq_id;
+ loff_t dq_off;
+ long unsigned int dq_flags;
+ struct mem_dqblk dq_dqb;
+};
+
+struct quota_format_type {
+ int qf_fmt_id;
+ const struct quota_format_ops *qf_ops;
+ struct module *qf_owner;
+ struct quota_format_type *qf_next;
+};
+
+struct quota_format_ops {
+ int (*check_quota_file)(struct super_block *, int);
+ int (*read_file_info)(struct super_block *, int);
+ int (*write_file_info)(struct super_block *, int);
+ int (*free_file_info)(struct super_block *, int);
+ int (*read_dqblk)(struct dquot *);
+ int (*commit_dqblk)(struct dquot *);
+ int (*release_dqblk)(struct dquot *);
+ int (*get_next_id)(struct super_block *, struct kqid *);
+};
+
+struct dquot_operations {
+ int (*write_dquot)(struct dquot *);
+ struct dquot * (*alloc_dquot)(struct super_block *, int);
+ void (*destroy_dquot)(struct dquot *);
+ int (*acquire_dquot)(struct dquot *);
+ int (*release_dquot)(struct dquot *);
+ int (*mark_dirty)(struct dquot *);
+ int (*write_info)(struct super_block *, int);
+ qsize_t * (*get_reserved_space)(struct inode *);
+ int (*get_projid)(struct inode *, kprojid_t *);
+ int (*get_inode_usage)(struct inode *, qsize_t *);
+ int (*get_next_id)(struct super_block *, struct kqid *);
+};
+
+struct qc_dqblk {
+ int d_fieldmask;
+ u64 d_spc_hardlimit;
+ u64 d_spc_softlimit;
+ u64 d_ino_hardlimit;
+ u64 d_ino_softlimit;
+ u64 d_space;
+ u64 d_ino_count;
+ s64 d_ino_timer;
+ s64 d_spc_timer;
+ int d_ino_warns;
+ int d_spc_warns;
+ u64 d_rt_spc_hardlimit;
+ u64 d_rt_spc_softlimit;
+ u64 d_rt_space;
+ s64 d_rt_spc_timer;
+ int d_rt_spc_warns;
+};
+
+struct qc_type_state {
+ unsigned int flags;
+ unsigned int spc_timelimit;
+ unsigned int ino_timelimit;
+ unsigned int rt_spc_timelimit;
+ unsigned int spc_warnlimit;
+ unsigned int ino_warnlimit;
+ unsigned int rt_spc_warnlimit;
+ long long unsigned int ino;
+ blkcnt_t blocks;
+ blkcnt_t nextents;
+};
+
+struct qc_state {
+ unsigned int s_incoredqs;
+ struct qc_type_state s_state[3];
+};
+
+struct qc_info {
+ int i_fieldmask;
+ unsigned int i_flags;
+ unsigned int i_spc_timelimit;
+ unsigned int i_ino_timelimit;
+ unsigned int i_rt_spc_timelimit;
+ unsigned int i_spc_warnlimit;
+ unsigned int i_ino_warnlimit;
+ unsigned int i_rt_spc_warnlimit;
+};
+
+struct quotactl_ops {
+ int (*quota_on)(struct super_block *, int, int, const struct path *);
+ int (*quota_off)(struct super_block *, int);
+ int (*quota_enable)(struct super_block *, unsigned int);
+ int (*quota_disable)(struct super_block *, unsigned int);
+ int (*quota_sync)(struct super_block *, int);
+ int (*set_info)(struct super_block *, int, struct qc_info *);
+ int (*get_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *);
+ int (*get_nextdqblk)(struct super_block *, struct kqid *, struct qc_dqblk *);
+ int (*set_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *);
+ int (*get_state)(struct super_block *, struct qc_state *);
+ int (*rm_xquota)(struct super_block *, unsigned int);
+};
+
+struct wait_page_queue {
+ struct folio *folio;
+ int bit_nr;
+ wait_queue_entry_t wait;
+};
+
+struct writeback_control;
+
+struct readahead_control;
+
+struct swap_info_struct;
+
+struct address_space_operations {
+ int (*writepage)(struct page *, struct writeback_control *);
+ int (*readpage)(struct file *, struct page *);
+ int (*writepages)(struct address_space *, struct writeback_control *);
+ int (*set_page_dirty)(struct page *);
+ int (*readpages)(struct file *, struct address_space *, struct list_head *, unsigned int);
+ void (*readahead)(struct readahead_control *);
+ int (*write_begin)(struct file *, struct address_space *, loff_t, unsigned int, unsigned int, struct page **, void **);
+ int (*write_end)(struct file *, struct address_space *, loff_t, unsigned int, unsigned int, struct page *, void *);
+ sector_t (*bmap)(struct address_space *, sector_t);
+ void (*invalidatepage)(struct page *, unsigned int, unsigned int);
+ int (*releasepage)(struct page *, gfp_t);
+ void (*freepage)(struct page *);
+ ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *);
+ int (*migratepage)(struct address_space *, struct page *, struct page *, enum migrate_mode);
+ bool (*isolate_page)(struct page *, isolate_mode_t);
+ void (*putback_page)(struct page *);
+ int (*launder_page)(struct page *);
+ int (*is_partially_uptodate)(struct page *, long unsigned int, long unsigned int);
+ void (*is_dirty_writeback)(struct page *, bool *, bool *);
+ int (*error_remove_page)(struct address_space *, struct page *);
+ int (*swap_activate)(struct swap_info_struct *, struct file *, sector_t *);
+ void (*swap_deactivate)(struct file *);
+};
+
+enum writeback_sync_modes {
+ WB_SYNC_NONE = 0,
+ WB_SYNC_ALL = 1,
+};
+
+struct writeback_control {
+ long int nr_to_write;
+ long int pages_skipped;
+ loff_t range_start;
+ loff_t range_end;
+ enum writeback_sync_modes sync_mode;
+ unsigned int for_kupdate: 1;
+ unsigned int for_background: 1;
+ unsigned int tagged_writepages: 1;
+ unsigned int for_reclaim: 1;
+ unsigned int range_cyclic: 1;
+ unsigned int for_sync: 1;
+ unsigned int no_cgroup_owner: 1;
+ unsigned int punt_to_cgroup: 1;
+ struct bdi_writeback *wb;
+ struct inode *inode;
+ int wb_id;
+ int wb_lcand_id;
+ int wb_tcand_id;
+ size_t wb_bytes;
+ size_t wb_lcand_bytes;
+ size_t wb_tcand_bytes;
+};
+
+struct readahead_control {
+ struct file *file;
+ struct address_space *mapping;
+ struct file_ra_state *ra;
+ long unsigned int _index;
+ unsigned int _nr_pages;
+ unsigned int _batch_count;
+};
+
+struct iovec;
+
+struct kvec;
+
+struct bio_vec;
+
+struct iov_iter {
+ u8 iter_type;
+ bool nofault;
+ bool data_source;
+ size_t iov_offset;
+ size_t count;
+ union {
+ const struct iovec *iov;
+ const struct kvec *kvec;
+ const struct bio_vec *bvec;
+ struct xarray *xarray;
+ struct pipe_inode_info *pipe;
+ };
+ union {
+ long unsigned int nr_segs;
+ struct {
+ unsigned int head;
+ unsigned int start_head;
+ };
+ loff_t xarray_start;
+ };
+};
+
+struct swap_cluster_info {
+ spinlock_t lock;
+ unsigned int data: 24;
+ unsigned int flags: 8;
+};
+
+struct swap_cluster_list {
+ struct swap_cluster_info head;
+ struct swap_cluster_info tail;
+};
+
+struct percpu_cluster;
+
+struct swap_info_struct {
+ struct percpu_ref users;
+ long unsigned int flags;
+ short int prio;
+ struct plist_node list;
+ signed char type;
+ unsigned int max;
+ unsigned char *swap_map;
+ struct swap_cluster_info *cluster_info;
+ struct swap_cluster_list free_clusters;
+ unsigned int lowest_bit;
+ unsigned int highest_bit;
+ unsigned int pages;
+ unsigned int inuse_pages;
+ unsigned int cluster_next;
+ unsigned int cluster_nr;
+ unsigned int *cluster_next_cpu;
+ struct percpu_cluster *percpu_cluster;
+ struct rb_root swap_extent_root;
+ struct block_device *bdev;
+ struct file *swap_file;
+ unsigned int old_block_size;
+ struct completion comp;
+ long unsigned int *frontswap_map;
+ atomic_t frontswap_pages;
+ spinlock_t lock;
+ spinlock_t cont_lock;
+ struct work_struct discard_work;
+ struct swap_cluster_list discard_clusters;
+ struct plist_node avail_lists[0];
+};
+
+struct cdev {
+ struct kobject kobj;
+ struct module *owner;
+ const struct file_operations *ops;
+ struct list_head list;
+ dev_t dev;
+ unsigned int count;
+};
+
+struct fiemap_extent_info;
+
+struct fileattr;
+
+struct inode_operations {
+ struct dentry * (*lookup)(struct inode *, struct dentry *, unsigned int);
+ const char * (*get_link)(struct dentry *, struct inode *, struct delayed_call *);
+ int (*permission)(struct user_namespace *, struct inode *, int);
+ struct posix_acl * (*get_acl)(struct inode *, int, bool);
+ int (*readlink)(struct dentry *, char *, int);
+ int (*create)(struct user_namespace *, struct inode *, struct dentry *, umode_t, bool);
+ int (*link)(struct dentry *, struct inode *, struct dentry *);
+ int (*unlink)(struct inode *, struct dentry *);
+ int (*symlink)(struct user_namespace *, struct inode *, struct dentry *, const char *);
+ int (*mkdir)(struct user_namespace *, struct inode *, struct dentry *, umode_t);
+ int (*rmdir)(struct inode *, struct dentry *);
+ int (*mknod)(struct user_namespace *, struct inode *, struct dentry *, umode_t, dev_t);
+ int (*rename)(struct user_namespace *, struct inode *, struct dentry *, struct inode *, struct dentry *, unsigned int);
+ int (*setattr)(struct user_namespace *, struct dentry *, struct iattr *);
+ int (*getattr)(struct user_namespace *, const struct path *, struct kstat *, u32, unsigned int);
+ ssize_t (*listxattr)(struct dentry *, char *, size_t);
+ int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64, u64);
+ int (*update_time)(struct inode *, struct timespec64 *, int);
+ int (*atomic_open)(struct inode *, struct dentry *, struct file *, unsigned int, umode_t);
+ int (*tmpfile)(struct user_namespace *, struct inode *, struct dentry *, umode_t);
+ int (*set_acl)(struct user_namespace *, struct inode *, struct posix_acl *, int);
+ int (*fileattr_set)(struct user_namespace *, struct dentry *, struct fileattr *);
+ int (*fileattr_get)(struct dentry *, struct fileattr *);
+ long: 64;
+};
+
+struct file_lock_context {
+ spinlock_t flc_lock;
+ struct list_head flc_flock;
+ struct list_head flc_posix;
+ struct list_head flc_lease;
+};
+
+struct file_lock_operations {
+ void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
+ void (*fl_release_private)(struct file_lock *);
+};
+
+struct nlm_lockowner;
+
+struct nfs_lock_info {
+ u32 state;
+ struct nlm_lockowner *owner;
+ struct list_head list;
+};
+
+struct nfs4_lock_state;
+
+struct nfs4_lock_info {
+ struct nfs4_lock_state *owner;
+};
+
+struct lock_manager_operations;
+
+struct file_lock {
+ struct file_lock *fl_blocker;
+ struct list_head fl_list;
+ struct hlist_node fl_link;
+ struct list_head fl_blocked_requests;
+ struct list_head fl_blocked_member;
+ fl_owner_t fl_owner;
+ unsigned int fl_flags;
+ unsigned char fl_type;
+ unsigned int fl_pid;
+ int fl_link_cpu;
+ wait_queue_head_t fl_wait;
+ struct file *fl_file;
+ loff_t fl_start;
+ loff_t fl_end;
+ struct fasync_struct *fl_fasync;
+ long unsigned int fl_break_time;
+ long unsigned int fl_downgrade_time;
+ const struct file_lock_operations *fl_ops;
+ const struct lock_manager_operations *fl_lmops;
+ union {
+ struct nfs_lock_info nfs_fl;
+ struct nfs4_lock_info nfs4_fl;
+ struct {
+ struct list_head link;
+ int state;
+ unsigned int debug_id;
+ } afs;
+ } fl_u;
+};
+
+struct lock_manager_operations {
+ fl_owner_t (*lm_get_owner)(fl_owner_t);
+ void (*lm_put_owner)(fl_owner_t);
+ void (*lm_notify)(struct file_lock *);
+ int (*lm_grant)(struct file_lock *, int);
+ bool (*lm_break)(struct file_lock *);
+ int (*lm_change)(struct file_lock *, int, struct list_head *);
+ void (*lm_setup)(struct file_lock *, void **);
+ bool (*lm_breaker_owns_lease)(struct file_lock *);
+};
+
+struct fasync_struct {
+ rwlock_t fa_lock;
+ int magic;
+ int fa_fd;
+ struct fasync_struct *fa_next;
+ struct file *fa_file;
+ struct callback_head fa_rcu;
+};
+
+struct kstatfs;
+
+struct super_operations {
+ struct inode * (*alloc_inode)(struct super_block *);
+ void (*destroy_inode)(struct inode *);
+ void (*free_inode)(struct inode *);
+ void (*dirty_inode)(struct inode *, int);
+ int (*write_inode)(struct inode *, struct writeback_control *);
+ int (*drop_inode)(struct inode *);
+ void (*evict_inode)(struct inode *);
+ void (*put_super)(struct super_block *);
+ int (*sync_fs)(struct super_block *, int);
+ int (*freeze_super)(struct super_block *);
+ int (*freeze_fs)(struct super_block *);
+ int (*thaw_super)(struct super_block *);
+ int (*unfreeze_fs)(struct super_block *);
+ int (*statfs)(struct dentry *, struct kstatfs *);
+ int (*remount_fs)(struct super_block *, int *, char *);
+ void (*umount_begin)(struct super_block *);
+ int (*show_options)(struct seq_file *, struct dentry *);
+ int (*show_devname)(struct seq_file *, struct dentry *);
+ int (*show_path)(struct seq_file *, struct dentry *);
+ int (*show_stats)(struct seq_file *, struct dentry *);
+ ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
+ ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
+ struct dquot ** (*get_dquots)(struct inode *);
+ long int (*nr_cached_objects)(struct super_block *, struct shrink_control *);
+ long int (*free_cached_objects)(struct super_block *, struct shrink_control *);
+};
+
+struct iomap;
+
+struct fid;
+
+struct export_operations {
+ int (*encode_fh)(struct inode *, __u32 *, int *, struct inode *);
+ struct dentry * (*fh_to_dentry)(struct super_block *, struct fid *, int, int);
+ struct dentry * (*fh_to_parent)(struct super_block *, struct fid *, int, int);
+ int (*get_name)(struct dentry *, char *, struct dentry *);
+ struct dentry * (*get_parent)(struct dentry *);
+ int (*commit_metadata)(struct inode *);
+ int (*get_uuid)(struct super_block *, u8 *, u32 *, u64 *);
+ int (*map_blocks)(struct inode *, loff_t, u64, struct iomap *, bool, u32 *);
+ int (*commit_blocks)(struct inode *, struct iomap *, int, struct iattr *);
+ u64 (*fetch_iversion)(struct inode *);
+ long unsigned int flags;
+};
+
+struct xattr_handler {
+ const char *name;
+ const char *prefix;
+ int flags;
+ bool (*list)(struct dentry *);
+ int (*get)(const struct xattr_handler *, struct dentry *, struct inode *, const char *, void *, size_t);
+ int (*set)(const struct xattr_handler *, struct user_namespace *, struct dentry *, struct inode *, const char *, const void *, size_t, int);
+};
+
+union fscrypt_policy;
+
+struct fscrypt_operations {
+ unsigned int flags;
+ const char *key_prefix;
+ int (*get_context)(struct inode *, void *, size_t);
+ int (*set_context)(struct inode *, const void *, size_t, void *);
+ const union fscrypt_policy * (*get_dummy_policy)(struct super_block *);
+ bool (*empty_dir)(struct inode *);
+ bool (*has_stable_inodes)(struct super_block *);
+ void (*get_ino_and_lblk_bits)(struct super_block *, int *, int *);
+ int (*get_num_devices)(struct super_block *);
+ void (*get_devices)(struct super_block *, struct request_queue **);
+};
+
+struct fsverity_operations {
+ int (*begin_enable_verity)(struct file *);
+ int (*end_enable_verity)(struct file *, const void *, size_t, u64);
+ int (*get_verity_descriptor)(struct inode *, void *, size_t);
+ struct page * (*read_merkle_tree_page)(struct inode *, long unsigned int, long unsigned int);
+ int (*write_merkle_tree_block)(struct inode *, const void *, u64, int);
+};
+
+enum dl_dev_state {
+ DL_DEV_NO_DRIVER = 0,
+ DL_DEV_PROBING = 1,
+ DL_DEV_DRIVER_BOUND = 2,
+ DL_DEV_UNBINDING = 3,
+};
+
+struct dev_links_info {
+ struct list_head suppliers;
+ struct list_head consumers;
+ struct list_head defer_sync;
+ enum dl_dev_state status;
+};
+
+struct pm_message {
+ int event;
+};
+
+typedef struct pm_message pm_message_t;
+
+enum rpm_request {
+ RPM_REQ_NONE = 0,
+ RPM_REQ_IDLE = 1,
+ RPM_REQ_SUSPEND = 2,
+ RPM_REQ_AUTOSUSPEND = 3,
+ RPM_REQ_RESUME = 4,
+};
+
+struct wakeup_source;
+
+struct wake_irq;
+
+struct pm_subsys_data;
+
+struct dev_pm_qos;
+
+struct dev_pm_info {
+ pm_message_t power_state;
+ unsigned int can_wakeup: 1;
+ unsigned int async_suspend: 1;
+ bool in_dpm_list: 1;
+ bool is_prepared: 1;
+ bool is_suspended: 1;
+ bool is_noirq_suspended: 1;
+ bool is_late_suspended: 1;
+ bool no_pm: 1;
+ bool early_init: 1;
+ bool direct_complete: 1;
+ u32 driver_flags;
+ spinlock_t lock;
+ struct list_head entry;
+ struct completion completion;
+ struct wakeup_source *wakeup;
+ bool wakeup_path: 1;
+ bool syscore: 1;
+ bool no_pm_callbacks: 1;
+ unsigned int must_resume: 1;
+ unsigned int may_skip_resume: 1;
+ struct hrtimer suspend_timer;
+ u64 timer_expires;
+ struct work_struct work;
+ wait_queue_head_t wait_queue;
+ struct wake_irq *wakeirq;
+ atomic_t usage_count;
+ atomic_t child_count;
+ unsigned int disable_depth: 3;
+ unsigned int idle_notification: 1;
+ unsigned int request_pending: 1;
+ unsigned int deferred_resume: 1;
+ unsigned int needs_force_resume: 1;
+ unsigned int runtime_auto: 1;
+ bool ignore_children: 1;
+ unsigned int no_callbacks: 1;
+ unsigned int irq_safe: 1;
+ unsigned int use_autosuspend: 1;
+ unsigned int timer_autosuspends: 1;
+ unsigned int memalloc_noio: 1;
+ unsigned int links_count;
+ enum rpm_request request;
+ enum rpm_status runtime_status;
+ int runtime_error;
+ int autosuspend_delay;
+ u64 last_busy;
+ u64 active_time;
+ u64 suspended_time;
+ u64 accounting_timestamp;
+ struct pm_subsys_data *subsys_data;
+ void (*set_latency_tolerance)(struct device *, s32);
+ struct dev_pm_qos *qos;
+};
+
+struct dev_archdata {};
+
+enum device_removable {
+ DEVICE_REMOVABLE_NOT_SUPPORTED = 0,
+ DEVICE_REMOVABLE_UNKNOWN = 1,
+ DEVICE_FIXED = 2,
+ DEVICE_REMOVABLE = 3,
+};
+
+struct device_private;
+
+struct device_type;
+
+struct bus_type;
+
+struct device_driver;
+
+struct dev_pm_domain;
+
+struct em_perf_domain;
+
+struct irq_domain;
+
+struct dev_pin_info;
+
+struct dma_map_ops;
+
+struct bus_dma_region;
+
+struct device_dma_parameters;
+
+struct dma_coherent_mem;
+
+struct cma;
+
+struct io_tlb_mem;
+
+struct device_node;
+
+struct fwnode_handle;
+
+struct class;
+
+struct attribute_group;
+
+struct iommu_group;
+
+struct dev_iommu;
+
+struct device {
+ struct kobject kobj;
+ struct device *parent;
+ struct device_private *p;
+ const char *init_name;
+ const struct device_type *type;
+ struct bus_type *bus;
+ struct device_driver *driver;
+ void *platform_data;
+ void *driver_data;
+ struct mutex mutex;
+ struct dev_links_info links;
+ struct dev_pm_info power;
+ struct dev_pm_domain *pm_domain;
+ struct em_perf_domain *em_pd;
+ struct irq_domain *msi_domain;
+ struct dev_pin_info *pins;
+ raw_spinlock_t msi_lock;
+ struct list_head msi_list;
+ const struct dma_map_ops *dma_ops;
+ u64 *dma_mask;
+ u64 coherent_dma_mask;
+ u64 bus_dma_limit;
+ const struct bus_dma_region *dma_range_map;
+ struct device_dma_parameters *dma_parms;
+ struct list_head dma_pools;
+ struct dma_coherent_mem *dma_mem;
+ struct cma *cma_area;
+ struct io_tlb_mem *dma_io_tlb_mem;
+ struct dev_archdata archdata;
+ struct device_node *of_node;
+ struct fwnode_handle *fwnode;
+ int numa_node;
+ dev_t devt;
+ u32 id;
+ spinlock_t devres_lock;
+ struct list_head devres_head;
+ struct class *class;
+ const struct attribute_group **groups;
+ void (*release)(struct device *);
+ struct iommu_group *iommu_group;
+ struct dev_iommu *iommu;
+ enum device_removable removable;
+ bool offline_disabled: 1;
+ bool offline: 1;
+ bool of_node_reused: 1;
+ bool state_synced: 1;
+ bool can_match: 1;
+ bool dma_coherent: 1;
+};
+
+struct disk_stats;
+
+struct partition_meta_info;
+
+struct block_device {
+ sector_t bd_start_sect;
+ sector_t bd_nr_sectors;
+ struct disk_stats *bd_stats;
+ long unsigned int bd_stamp;
+ bool bd_read_only;
+ dev_t bd_dev;
+ int bd_openers;
+ struct inode *bd_inode;
+ struct super_block *bd_super;
+ void *bd_claiming;
+ struct device bd_device;
+ void *bd_holder;
+ int bd_holders;
+ bool bd_write_holder;
+ struct kobject *bd_holder_dir;
+ u8 bd_partno;
+ spinlock_t bd_size_lock;
+ struct gendisk *bd_disk;
+ struct request_queue *bd_queue;
+ int bd_fsfreeze_count;
+ struct mutex bd_fsfreeze_mutex;
+ struct super_block *bd_fsfreeze_sb;
+ struct partition_meta_info *bd_meta_info;
+};
+
+typedef int (*filldir_t)(struct dir_context *, const char *, int, loff_t, u64, unsigned int);
+
+struct dir_context {
+ filldir_t actor;
+ loff_t pos;
+};
+
+struct io_comp_batch {
+ struct request *req_list;
+ bool need_ts;
+ void (*complete)(struct io_comp_batch *);
+};
+
+typedef void (*poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_table_struct *);
+
+struct poll_table_struct {
+ poll_queue_proc _qproc;
+ __poll_t _key;
+};
+
+struct seq_operations;
+
+struct seq_file {
+ char *buf;
+ size_t size;
+ size_t from;
+ size_t count;
+ size_t pad_until;
+ loff_t index;
+ loff_t read_pos;
+ struct mutex lock;
+ const struct seq_operations *op;
+ int poll_event;
+ const struct file *file;
+ void *private;
+};
+
+struct fc_log;
+
+struct p_log {
+ const char *prefix;
+ struct fc_log *log;
+};
+
+enum fs_context_purpose {
+ FS_CONTEXT_FOR_MOUNT = 0,
+ FS_CONTEXT_FOR_SUBMOUNT = 1,
+ FS_CONTEXT_FOR_RECONFIGURE = 2,
+};
+
+enum fs_context_phase {
+ FS_CONTEXT_CREATE_PARAMS = 0,
+ FS_CONTEXT_CREATING = 1,
+ FS_CONTEXT_AWAITING_MOUNT = 2,
+ FS_CONTEXT_AWAITING_RECONF = 3,
+ FS_CONTEXT_RECONF_PARAMS = 4,
+ FS_CONTEXT_RECONFIGURING = 5,
+ FS_CONTEXT_FAILED = 6,
+};
+
+struct fs_context_operations;
+
+struct fs_context {
+ const struct fs_context_operations *ops;
+ struct mutex uapi_mutex;
+ struct file_system_type *fs_type;
+ void *fs_private;
+ void *sget_key;
+ struct dentry *root;
+ struct user_namespace *user_ns;
+ struct net *net_ns;
+ const struct cred *cred;
+ struct p_log log;
+ const char *source;
+ void *security;
+ void *s_fs_info;
+ unsigned int sb_flags;
+ unsigned int sb_flags_mask;
+ unsigned int s_iflags;
+ unsigned int lsm_flags;
+ enum fs_context_purpose purpose: 8;
+ enum fs_context_phase phase: 8;
+ bool need_free: 1;
+ bool global: 1;
+ bool oldapi: 1;
+};
+
+struct fs_parameter;
+
+struct fs_parse_result;
+
+typedef int fs_param_type(struct p_log *, const struct fs_parameter_spec *, struct fs_parameter *, struct fs_parse_result *);
+
+struct fs_parameter_spec {
+ const char *name;
+ fs_param_type *type;
+ u8 opt;
+ short unsigned int flags;
+ const void *data;
+};
+
+struct audit_names;
+
+struct filename {
+ const char *name;
+ const char *uptr;
+ int refcnt;
+ struct audit_names *aname;
+ const char iname[0];
+};
+
+typedef u8 blk_status_t;
+
+struct bvec_iter {
+ sector_t bi_sector;
+ unsigned int bi_size;
+ unsigned int bi_idx;
+ unsigned int bi_bvec_done;
+} __attribute__((packed));
+
+typedef unsigned int blk_qc_t;
+
+typedef void bio_end_io_t(struct bio *);
+
+struct bio_issue {
+ u64 value;
+};
+
+struct bio_vec {
+ struct page *bv_page;
+ unsigned int bv_len;
+ unsigned int bv_offset;
+};
+
+struct bio_crypt_ctx;
+
+struct bio_integrity_payload;
+
+struct bio {
+ struct bio *bi_next;
+ struct block_device *bi_bdev;
+ unsigned int bi_opf;
+ short unsigned int bi_flags;
+ short unsigned int bi_ioprio;
+ short unsigned int bi_write_hint;
+ blk_status_t bi_status;
+ atomic_t __bi_remaining;
+ struct bvec_iter bi_iter;
+ blk_qc_t bi_cookie;
+ bio_end_io_t *bi_end_io;
+ void *bi_private;
+ struct blkcg_gq *bi_blkg;
+ struct bio_issue bi_issue;
+ u64 bi_iocost_cost;
+ struct bio_crypt_ctx *bi_crypt_context;
+ union {
+ struct bio_integrity_payload *bi_integrity;
+ };
+ short unsigned int bi_vcnt;
+ short unsigned int bi_max_vecs;
+ atomic_t __bi_cnt;
+ struct bio_vec *bi_io_vec;
+ struct bio_set *bi_pool;
+ struct bio_vec bi_inline_vecs[0];
+};
+
+struct kernfs_root;
+
+struct kernfs_elem_dir {
+ long unsigned int subdirs;
+ struct rb_root children;
+ struct kernfs_root *root;
+ long unsigned int rev;
+};
+
+struct kernfs_syscall_ops;
+
+struct kernfs_root {
+ struct kernfs_node *kn;
+ unsigned int flags;
+ struct idr ino_idr;
+ u32 last_id_lowbits;
+ u32 id_highbits;
+ struct kernfs_syscall_ops *syscall_ops;
+ struct list_head supers;
+ wait_queue_head_t deactivate_waitq;
+};
+
+struct kernfs_elem_symlink {
+ struct kernfs_node *target_kn;
+};
+
+struct kernfs_ops;
+
+struct kernfs_open_node;
+
+struct kernfs_elem_attr {
+ const struct kernfs_ops *ops;
+ struct kernfs_open_node *open;
+ loff_t size;
+ struct kernfs_node *notify_next;
+};
+
+struct kernfs_iattrs;
+
+struct kernfs_node {
+ atomic_t count;
+ atomic_t active;
+ struct kernfs_node *parent;
+ const char *name;
+ struct rb_node rb;
+ const void *ns;
+ unsigned int hash;
+ union {
+ struct kernfs_elem_dir dir;
+ struct kernfs_elem_symlink symlink;
+ struct kernfs_elem_attr attr;
+ };
+ void *priv;
+ u64 id;
+ short unsigned int flags;
+ umode_t mode;
+ struct kernfs_iattrs *iattr;
+};
+
+struct kernfs_open_file;
+
+struct kernfs_ops {
+ int (*open)(struct kernfs_open_file *);
+ void (*release)(struct kernfs_open_file *);
+ int (*seq_show)(struct seq_file *, void *);
+ void * (*seq_start)(struct seq_file *, loff_t *);
+ void * (*seq_next)(struct seq_file *, void *, loff_t *);
+ void (*seq_stop)(struct seq_file *, void *);
+ ssize_t (*read)(struct kernfs_open_file *, char *, size_t, loff_t);
+ size_t atomic_write_len;
+ bool prealloc;
+ ssize_t (*write)(struct kernfs_open_file *, char *, size_t, loff_t);
+ __poll_t (*poll)(struct kernfs_open_file *, struct poll_table_struct *);
+ int (*mmap)(struct kernfs_open_file *, struct vm_area_struct *);
+};
+
+struct kernfs_syscall_ops {
+ int (*show_options)(struct seq_file *, struct kernfs_root *);
+ int (*mkdir)(struct kernfs_node *, const char *, umode_t);
+ int (*rmdir)(struct kernfs_node *);
+ int (*rename)(struct kernfs_node *, struct kernfs_node *, const char *);
+ int (*show_path)(struct seq_file *, struct kernfs_node *, struct kernfs_root *);
+};
+
+struct kernfs_open_file {
+ struct kernfs_node *kn;
+ struct file *file;
+ struct seq_file *seq_file;
+ void *priv;
+ struct mutex mutex;
+ struct mutex prealloc_mutex;
+ int event;
+ struct list_head list;
+ char *prealloc_buf;
+ size_t atomic_write_len;
+ bool mmapped: 1;
+ bool released: 1;
+ const struct vm_operations_struct *vm_ops;
+};
+
+enum kobj_ns_type {
+ KOBJ_NS_TYPE_NONE = 0,
+ KOBJ_NS_TYPE_NET = 1,
+ KOBJ_NS_TYPES = 2,
+};
+
+struct sock;
+
+struct kobj_ns_type_operations {
+ enum kobj_ns_type type;
+ bool (*current_may_mount)();
+ void * (*grab_current_ns)();
+ const void * (*netlink_ns)(struct sock *);
+ const void * (*initial_ns)();
+ void (*drop_ns)(void *);
+};
+
+struct attribute {
+ const char *name;
+ umode_t mode;
+};
+
+struct bin_attribute;
+
+struct attribute_group {
+ const char *name;
+ umode_t (*is_visible)(struct kobject *, struct attribute *, int);
+ umode_t (*is_bin_visible)(struct kobject *, struct bin_attribute *, int);
+ struct attribute **attrs;
+ struct bin_attribute **bin_attrs;
+};
+
+struct bin_attribute {
+ struct attribute attr;
+ size_t size;
+ void *private;
+ struct address_space * (*f_mapping)();
+ ssize_t (*read)(struct file *, struct kobject *, struct bin_attribute *, char *, loff_t, size_t);
+ ssize_t (*write)(struct file *, struct kobject *, struct bin_attribute *, char *, loff_t, size_t);
+ int (*mmap)(struct file *, struct kobject *, struct bin_attribute *, struct vm_area_struct *);
+};
+
+struct sysfs_ops {
+ ssize_t (*show)(struct kobject *, struct attribute *, char *);
+ ssize_t (*store)(struct kobject *, struct attribute *, const char *, size_t);
+};
+
+struct kset_uevent_ops;
+
+struct kset {
+ struct list_head list;
+ spinlock_t list_lock;
+ struct kobject kobj;
+ const struct kset_uevent_ops *uevent_ops;
+};
+
+struct kobj_type {
+ void (*release)(struct kobject *);
+ const struct sysfs_ops *sysfs_ops;
+ struct attribute **default_attrs;
+ const struct attribute_group **default_groups;
+ const struct kobj_ns_type_operations * (*child_ns_type)(struct kobject *);
+ const void * (*namespace)(struct kobject *);
+ void (*get_ownership)(struct kobject *, kuid_t *, kgid_t *);
+};
+
+struct kobj_uevent_env {
+ char *argv[3];
+ char *envp[64];
+ int envp_idx;
+ char buf[2048];
+ int buflen;
+};
+
+struct kset_uevent_ops {
+ int (* const filter)(struct kset *, struct kobject *);
+ const char * (* const name)(struct kset *, struct kobject *);
+ int (* const uevent)(struct kset *, struct kobject *, struct kobj_uevent_env *);
+};
+
+struct kernel_param_ops {
+ unsigned int flags;
+ int (*set)(const char *, const struct kernel_param *);
+ int (*get)(char *, const struct kernel_param *);
+ void (*free)(void *);
+};
+
+struct kparam_string;
+
+struct kparam_array;
+
+struct kernel_param {
+ const char *name;
+ struct module *mod;
+ const struct kernel_param_ops *ops;
+ const u16 perm;
+ s8 level;
+ u8 flags;
+ union {
+ void *arg;
+ const struct kparam_string *str;
+ const struct kparam_array *arr;
+ };
+};
+
+struct kparam_string {
+ unsigned int maxlen;
+ char *string;
+};
+
+struct kparam_array {
+ unsigned int max;
+ unsigned int elemsize;
+ unsigned int *num;
+ const struct kernel_param_ops *ops;
+ void *elem;
+};
+
+struct error_injection_entry {
+ long unsigned int addr;
+ int etype;
+};
+
+struct tracepoint_func {
+ void *func;
+ void *data;
+ int prio;
+};
+
+struct tracepoint {
+ const char *name;
+ struct static_key key;
+ struct static_call_key *static_call_key;
+ void *static_call_tramp;
+ void *iterator;
+ int (*regfunc)();
+ void (*unregfunc)();
+ struct tracepoint_func *funcs;
+};
+
+struct bpf_raw_event_map {
+ struct tracepoint *tp;
+ void *bpf_func;
+ u32 num_args;
+ u32 writable_size;
+ long: 64;
+};
+
+struct plt_entry {
+ __le32 adrp;
+ __le32 add;
+ __le32 br;
+};
+
+struct module_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct module_attribute *, struct module_kobject *, char *);
+ ssize_t (*store)(struct module_attribute *, struct module_kobject *, const char *, size_t);
+ void (*setup)(struct module *, const char *);
+ int (*test)(struct module *);
+ void (*free)(struct module *);
+};
+
+struct trace_event_functions;
+
+struct trace_event {
+ struct hlist_node node;
+ struct list_head list;
+ int type;
+ struct trace_event_functions *funcs;
+};
+
+struct trace_event_class;
+
+struct trace_event_call {
+ struct list_head list;
+ struct trace_event_class *class;
+ union {
+ char *name;
+ struct tracepoint *tp;
+ };
+ struct trace_event event;
+ char *print_fmt;
+ struct event_filter *filter;
+ union {
+ void *module;
+ atomic_t refcnt;
+ };
+ void *data;
+ int flags;
+ int perf_refcount;
+ struct hlist_head *perf_events;
+ struct bpf_prog_array *prog_array;
+ int (*perf_perm)(struct trace_event_call *, struct perf_event *);
+};
+
+struct trace_eval_map {
+ const char *system;
+ const char *eval_string;
+ long unsigned int eval_value;
+};
+
+struct linux_binprm {
+ struct vm_area_struct *vma;
+ long unsigned int vma_pages;
+ struct mm_struct *mm;
+ long unsigned int p;
+ long unsigned int argmin;
+ unsigned int have_execfd: 1;
+ unsigned int execfd_creds: 1;
+ unsigned int secureexec: 1;
+ unsigned int point_of_no_return: 1;
+ struct file *executable;
+ struct file *interpreter;
+ struct file *file;
+ struct cred *cred;
+ int unsafe;
+ unsigned int per_clear;
+ int argc;
+ int envc;
+ const char *filename;
+ const char *interp;
+ const char *fdpath;
+ unsigned int interp_flags;
+ int execfd;
+ long unsigned int loader;
+ long unsigned int exec;
+ struct rlimit rlim_stack;
+ char buf[256];
+};
+
+struct coredump_params {
+ const kernel_siginfo_t *siginfo;
+ struct pt_regs *regs;
+ struct file *file;
+ long unsigned int limit;
+ long unsigned int mm_flags;
+ loff_t written;
+ loff_t pos;
+ loff_t to_skip;
+};
+
+struct em_perf_state {
+ long unsigned int frequency;
+ long unsigned int power;
+ long unsigned int cost;
+ long unsigned int flags;
+};
+
+struct em_perf_domain {
+ struct em_perf_state *table;
+ int nr_perf_states;
+ long unsigned int flags;
+ long unsigned int cpus[0];
+};
+
+struct dev_pm_ops {
+ int (*prepare)(struct device *);
+ void (*complete)(struct device *);
+ int (*suspend)(struct device *);
+ int (*resume)(struct device *);
+ int (*freeze)(struct device *);
+ int (*thaw)(struct device *);
+ int (*poweroff)(struct device *);
+ int (*restore)(struct device *);
+ int (*suspend_late)(struct device *);
+ int (*resume_early)(struct device *);
+ int (*freeze_late)(struct device *);
+ int (*thaw_early)(struct device *);
+ int (*poweroff_late)(struct device *);
+ int (*restore_early)(struct device *);
+ int (*suspend_noirq)(struct device *);
+ int (*resume_noirq)(struct device *);
+ int (*freeze_noirq)(struct device *);
+ int (*thaw_noirq)(struct device *);
+ int (*poweroff_noirq)(struct device *);
+ int (*restore_noirq)(struct device *);
+ int (*runtime_suspend)(struct device *);
+ int (*runtime_resume)(struct device *);
+ int (*runtime_idle)(struct device *);
+};
+
+struct pm_domain_data;
+
+struct pm_subsys_data {
+ spinlock_t lock;
+ unsigned int refcount;
+ unsigned int clock_op_might_sleep;
+ struct mutex clock_mutex;
+ struct list_head clock_list;
+ struct pm_domain_data *domain_data;
+};
+
+struct wakeup_source {
+ const char *name;
+ int id;
+ struct list_head entry;
+ spinlock_t lock;
+ struct wake_irq *wakeirq;
+ struct timer_list timer;
+ long unsigned int timer_expires;
+ ktime_t total_time;
+ ktime_t max_time;
+ ktime_t last_time;
+ ktime_t start_prevent_time;
+ ktime_t prevent_sleep_time;
+ long unsigned int event_count;
+ long unsigned int active_count;
+ long unsigned int relax_count;
+ long unsigned int expire_count;
+ long unsigned int wakeup_count;
+ struct device *dev;
+ bool active: 1;
+ bool autosleep_enabled: 1;
+};
+
+struct dev_pm_domain {
+ struct dev_pm_ops ops;
+ int (*start)(struct device *);
+ void (*detach)(struct device *, bool);
+ int (*activate)(struct device *);
+ void (*sync)(struct device *);
+ void (*dismiss)(struct device *);
+};
+
+struct iommu_ops;
+
+struct subsys_private;
+
+struct bus_type {
+ const char *name;
+ const char *dev_name;
+ struct device *dev_root;
+ const struct attribute_group **bus_groups;
+ const struct attribute_group **dev_groups;
+ const struct attribute_group **drv_groups;
+ int (*match)(struct device *, struct device_driver *);
+ int (*uevent)(struct device *, struct kobj_uevent_env *);
+ int (*probe)(struct device *);
+ void (*sync_state)(struct device *);
+ void (*remove)(struct device *);
+ void (*shutdown)(struct device *);
+ int (*online)(struct device *);
+ int (*offline)(struct device *);
+ int (*suspend)(struct device *, pm_message_t);
+ int (*resume)(struct device *);
+ int (*num_vf)(struct device *);
+ int (*dma_configure)(struct device *);
+ const struct dev_pm_ops *pm;
+ const struct iommu_ops *iommu_ops;
+ struct subsys_private *p;
+ struct lock_class_key lock_key;
+ bool need_parent_lock;
+};
+
+enum probe_type {
+ PROBE_DEFAULT_STRATEGY = 0,
+ PROBE_PREFER_ASYNCHRONOUS = 1,
+ PROBE_FORCE_SYNCHRONOUS = 2,
+};
+
+struct of_device_id;
+
+struct acpi_device_id;
+
+struct driver_private;
+
+struct device_driver {
+ const char *name;
+ struct bus_type *bus;
+ struct module *owner;
+ const char *mod_name;
+ bool suppress_bind_attrs;
+ enum probe_type probe_type;
+ const struct of_device_id *of_match_table;
+ const struct acpi_device_id *acpi_match_table;
+ int (*probe)(struct device *);
+ void (*sync_state)(struct device *);
+ int (*remove)(struct device *);
+ void (*shutdown)(struct device *);
+ int (*suspend)(struct device *, pm_message_t);
+ int (*resume)(struct device *);
+ const struct attribute_group **groups;
+ const struct attribute_group **dev_groups;
+ const struct dev_pm_ops *pm;
+ void (*coredump)(struct device *);
+ struct driver_private *p;
+};
+
+enum iommu_cap {
+ IOMMU_CAP_CACHE_COHERENCY = 0,
+ IOMMU_CAP_INTR_REMAP = 1,
+ IOMMU_CAP_NOEXEC = 2,
+};
+
+typedef u64 dma_addr_t;
+
+enum iommu_dev_features {
+ IOMMU_DEV_FEAT_AUX = 0,
+ IOMMU_DEV_FEAT_SVA = 1,
+ IOMMU_DEV_FEAT_IOPF = 2,
+};
+
+struct iommu_domain;
+
+struct iommu_iotlb_gather;
+
+struct iommu_device;
+
+struct iommu_resv_region;
+
+struct of_phandle_args;
+
+struct iommu_sva;
+
+struct iommu_fault_event;
+
+struct iommu_page_response;
+
+struct iommu_cache_invalidate_info;
+
+struct iommu_gpasid_bind_data;
+
+struct iommu_ops {
+ bool (*capable)(enum iommu_cap);
+ struct iommu_domain * (*domain_alloc)(unsigned int);
+ void (*domain_free)(struct iommu_domain *);
+ int (*attach_dev)(struct iommu_domain *, struct device *);
+ void (*detach_dev)(struct iommu_domain *, struct device *);
+ int (*map)(struct iommu_domain *, long unsigned int, phys_addr_t, size_t, int, gfp_t);
+ int (*map_pages)(struct iommu_domain *, long unsigned int, phys_addr_t, size_t, size_t, int, gfp_t, size_t *);
+ size_t (*unmap)(struct iommu_domain *, long unsigned int, size_t, struct iommu_iotlb_gather *);
+ size_t (*unmap_pages)(struct iommu_domain *, long unsigned int, size_t, size_t, struct iommu_iotlb_gather *);
+ void (*flush_iotlb_all)(struct iommu_domain *);
+ void (*iotlb_sync_map)(struct iommu_domain *, long unsigned int, size_t);
+ void (*iotlb_sync)(struct iommu_domain *, struct iommu_iotlb_gather *);
+ phys_addr_t (*iova_to_phys)(struct iommu_domain *, dma_addr_t);
+ struct iommu_device * (*probe_device)(struct device *);
+ void (*release_device)(struct device *);
+ void (*probe_finalize)(struct device *);
+ struct iommu_group * (*device_group)(struct device *);
+ int (*enable_nesting)(struct iommu_domain *);
+ int (*set_pgtable_quirks)(struct iommu_domain *, long unsigned int);
+ void (*get_resv_regions)(struct device *, struct list_head *);
+ void (*put_resv_regions)(struct device *, struct list_head *);
+ void (*apply_resv_region)(struct device *, struct iommu_domain *, struct iommu_resv_region *);
+ int (*of_xlate)(struct device *, struct of_phandle_args *);
+ bool (*is_attach_deferred)(struct iommu_domain *, struct device *);
+ bool (*dev_has_feat)(struct device *, enum iommu_dev_features);
+ bool (*dev_feat_enabled)(struct device *, enum iommu_dev_features);
+ int (*dev_enable_feat)(struct device *, enum iommu_dev_features);
+ int (*dev_disable_feat)(struct device *, enum iommu_dev_features);
+ int (*aux_attach_dev)(struct iommu_domain *, struct device *);
+ void (*aux_detach_dev)(struct iommu_domain *, struct device *);
+ int (*aux_get_pasid)(struct iommu_domain *, struct device *);
+ struct iommu_sva * (*sva_bind)(struct device *, struct mm_struct *, void *);
+ void (*sva_unbind)(struct iommu_sva *);
+ u32 (*sva_get_pasid)(struct iommu_sva *);
+ int (*page_response)(struct device *, struct iommu_fault_event *, struct iommu_page_response *);
+ int (*cache_invalidate)(struct iommu_domain *, struct device *, struct iommu_cache_invalidate_info *);
+ int (*sva_bind_gpasid)(struct iommu_domain *, struct device *, struct iommu_gpasid_bind_data *);
+ int (*sva_unbind_gpasid)(struct device *, u32);
+ int (*def_domain_type)(struct device *);
+ long unsigned int pgsize_bitmap;
+ struct module *owner;
+};
+
+struct device_type {
+ const char *name;
+ const struct attribute_group **groups;
+ int (*uevent)(struct device *, struct kobj_uevent_env *);
+ char * (*devnode)(struct device *, umode_t *, kuid_t *, kgid_t *);
+ void (*release)(struct device *);
+ const struct dev_pm_ops *pm;
+};
+
+struct class {
+ const char *name;
+ struct module *owner;
+ const struct attribute_group **class_groups;
+ const struct attribute_group **dev_groups;
+ struct kobject *dev_kobj;
+ int (*dev_uevent)(struct device *, struct kobj_uevent_env *);
+ char * (*devnode)(struct device *, umode_t *);
+ void (*class_release)(struct class *);
+ void (*dev_release)(struct device *);
+ int (*shutdown_pre)(struct device *);
+ const struct kobj_ns_type_operations *ns_type;
+ const void * (*namespace)(struct device *);
+ void (*get_ownership)(struct device *, kuid_t *, kgid_t *);
+ const struct dev_pm_ops *pm;
+ struct subsys_private *p;
+};
+
+struct of_device_id {
+ char name[32];
+ char type[32];
+ char compatible[128];
+ const void *data;
+};
+
+typedef long unsigned int kernel_ulong_t;
+
+struct acpi_device_id {
+ __u8 id[9];
+ kernel_ulong_t driver_data;
+ __u32 cls;
+ __u32 cls_msk;
+};
+
+struct device_dma_parameters {
+ unsigned int max_segment_size;
+ unsigned int min_align_mask;
+ long unsigned int segment_boundary_mask;
+};
+
+enum irq_domain_bus_token {
+ DOMAIN_BUS_ANY = 0,
+ DOMAIN_BUS_WIRED = 1,
+ DOMAIN_BUS_GENERIC_MSI = 2,
+ DOMAIN_BUS_PCI_MSI = 3,
+ DOMAIN_BUS_PLATFORM_MSI = 4,
+ DOMAIN_BUS_NEXUS = 5,
+ DOMAIN_BUS_IPI = 6,
+ DOMAIN_BUS_FSL_MC_MSI = 7,
+ DOMAIN_BUS_TI_SCI_INTA_MSI = 8,
+ DOMAIN_BUS_WAKEUP = 9,
+ DOMAIN_BUS_VMD_MSI = 10,
+};
+
+struct irq_domain_ops;
+
+struct irq_domain_chip_generic;
+
+struct irq_data;
+
+struct irq_domain {
+ struct list_head link;
+ const char *name;
+ const struct irq_domain_ops *ops;
+ void *host_data;
+ unsigned int flags;
+ unsigned int mapcount;
+ struct fwnode_handle *fwnode;
+ enum irq_domain_bus_token bus_token;
+ struct irq_domain_chip_generic *gc;
+ struct irq_domain *parent;
+ irq_hw_number_t hwirq_max;
+ unsigned int revmap_size;
+ struct xarray revmap_tree;
+ struct mutex revmap_mutex;
+ struct irq_data *revmap[0];
+};
+
+enum dma_data_direction {
+ DMA_BIDIRECTIONAL = 0,
+ DMA_TO_DEVICE = 1,
+ DMA_FROM_DEVICE = 2,
+ DMA_NONE = 3,
+};
+
+struct sg_table;
+
+struct scatterlist;
+
+struct dma_map_ops {
+ void * (*alloc)(struct device *, size_t, dma_addr_t *, gfp_t, long unsigned int);
+ void (*free)(struct device *, size_t, void *, dma_addr_t, long unsigned int);
+ struct page * (*alloc_pages)(struct device *, size_t, dma_addr_t *, enum dma_data_direction, gfp_t);
+ void (*free_pages)(struct device *, size_t, struct page *, dma_addr_t, enum dma_data_direction);
+ struct sg_table * (*alloc_noncontiguous)(struct device *, size_t, enum dma_data_direction, gfp_t, long unsigned int);
+ void (*free_noncontiguous)(struct device *, size_t, struct sg_table *, enum dma_data_direction);
+ int (*mmap)(struct device *, struct vm_area_struct *, void *, dma_addr_t, size_t, long unsigned int);
+ int (*get_sgtable)(struct device *, struct sg_table *, void *, dma_addr_t, size_t, long unsigned int);
+ dma_addr_t (*map_page)(struct device *, struct page *, long unsigned int, size_t, enum dma_data_direction, long unsigned int);
+ void (*unmap_page)(struct device *, dma_addr_t, size_t, enum dma_data_direction, long unsigned int);
+ int (*map_sg)(struct device *, struct scatterlist *, int, enum dma_data_direction, long unsigned int);
+ void (*unmap_sg)(struct device *, struct scatterlist *, int, enum dma_data_direction, long unsigned int);
+ dma_addr_t (*map_resource)(struct device *, phys_addr_t, size_t, enum dma_data_direction, long unsigned int);
+ void (*unmap_resource)(struct device *, dma_addr_t, size_t, enum dma_data_direction, long unsigned int);
+ void (*sync_single_for_cpu)(struct device *, dma_addr_t, size_t, enum dma_data_direction);
+ void (*sync_single_for_device)(struct device *, dma_addr_t, size_t, enum dma_data_direction);
+ void (*sync_sg_for_cpu)(struct device *, struct scatterlist *, int, enum dma_data_direction);
+ void (*sync_sg_for_device)(struct device *, struct scatterlist *, int, enum dma_data_direction);
+ void (*cache_sync)(struct device *, void *, size_t, enum dma_data_direction);
+ int (*dma_supported)(struct device *, u64);
+ u64 (*get_required_mask)(struct device *);
+ size_t (*max_mapping_size)(struct device *);
+ long unsigned int (*get_merge_boundary)(struct device *);
+};
+
+struct bus_dma_region {
+ phys_addr_t cpu_start;
+ dma_addr_t dma_start;
+ u64 size;
+ u64 offset;
+};
+
+typedef u32 phandle;
+
+struct fwnode_operations;
+
+struct fwnode_handle {
+ struct fwnode_handle *secondary;
+ const struct fwnode_operations *ops;
+ struct device *dev;
+ struct list_head suppliers;
+ struct list_head consumers;
+ u8 flags;
+};
+
+struct property;
+
+struct device_node {
+ const char *name;
+ phandle phandle;
+ const char *full_name;
+ struct fwnode_handle fwnode;
+ struct property *properties;
+ struct property *deadprops;
+ struct device_node *parent;
+ struct device_node *child;
+ struct device_node *sibling;
+ struct kobject kobj;
+ long unsigned int _flags;
+ void *data;
+};
+
+enum cpuhp_state {
+ CPUHP_INVALID = 4294967295,
+ CPUHP_OFFLINE = 0,
+ CPUHP_CREATE_THREADS = 1,
+ CPUHP_PERF_PREPARE = 2,
+ CPUHP_PERF_X86_PREPARE = 3,
+ CPUHP_PERF_X86_AMD_UNCORE_PREP = 4,
+ CPUHP_PERF_POWER = 5,
+ CPUHP_PERF_SUPERH = 6,
+ CPUHP_X86_HPET_DEAD = 7,
+ CPUHP_X86_APB_DEAD = 8,
+ CPUHP_X86_MCE_DEAD = 9,
+ CPUHP_VIRT_NET_DEAD = 10,
+ CPUHP_SLUB_DEAD = 11,
+ CPUHP_DEBUG_OBJ_DEAD = 12,
+ CPUHP_MM_WRITEBACK_DEAD = 13,
+ CPUHP_MM_DEMOTION_DEAD = 14,
+ CPUHP_MM_VMSTAT_DEAD = 15,
+ CPUHP_SOFTIRQ_DEAD = 16,
+ CPUHP_NET_MVNETA_DEAD = 17,
+ CPUHP_CPUIDLE_DEAD = 18,
+ CPUHP_ARM64_FPSIMD_DEAD = 19,
+ CPUHP_ARM_OMAP_WAKE_DEAD = 20,
+ CPUHP_IRQ_POLL_DEAD = 21,
+ CPUHP_BLOCK_SOFTIRQ_DEAD = 22,
+ CPUHP_BIO_DEAD = 23,
+ CPUHP_ACPI_CPUDRV_DEAD = 24,
+ CPUHP_S390_PFAULT_DEAD = 25,
+ CPUHP_BLK_MQ_DEAD = 26,
+ CPUHP_FS_BUFF_DEAD = 27,
+ CPUHP_PRINTK_DEAD = 28,
+ CPUHP_MM_MEMCQ_DEAD = 29,
+ CPUHP_XFS_DEAD = 30,
+ CPUHP_PERCPU_CNT_DEAD = 31,
+ CPUHP_RADIX_DEAD = 32,
+ CPUHP_PAGE_ALLOC = 33,
+ CPUHP_NET_DEV_DEAD = 34,
+ CPUHP_PCI_XGENE_DEAD = 35,
+ CPUHP_IOMMU_IOVA_DEAD = 36,
+ CPUHP_LUSTRE_CFS_DEAD = 37,
+ CPUHP_AP_ARM_CACHE_B15_RAC_DEAD = 38,
+ CPUHP_PADATA_DEAD = 39,
+ CPUHP_AP_DTPM_CPU_DEAD = 40,
+ CPUHP_WORKQUEUE_PREP = 41,
+ CPUHP_POWER_NUMA_PREPARE = 42,
+ CPUHP_HRTIMERS_PREPARE = 43,
+ CPUHP_PROFILE_PREPARE = 44,
+ CPUHP_X2APIC_PREPARE = 45,
+ CPUHP_SMPCFD_PREPARE = 46,
+ CPUHP_RELAY_PREPARE = 47,
+ CPUHP_SLAB_PREPARE = 48,
+ CPUHP_MD_RAID5_PREPARE = 49,
+ CPUHP_RCUTREE_PREP = 50,
+ CPUHP_CPUIDLE_COUPLED_PREPARE = 51,
+ CPUHP_POWERPC_PMAC_PREPARE = 52,
+ CPUHP_POWERPC_MMU_CTX_PREPARE = 53,
+ CPUHP_XEN_PREPARE = 54,
+ CPUHP_XEN_EVTCHN_PREPARE = 55,
+ CPUHP_ARM_SHMOBILE_SCU_PREPARE = 56,
+ CPUHP_SH_SH3X_PREPARE = 57,
+ CPUHP_NET_FLOW_PREPARE = 58,
+ CPUHP_TOPOLOGY_PREPARE = 59,
+ CPUHP_NET_IUCV_PREPARE = 60,
+ CPUHP_ARM_BL_PREPARE = 61,
+ CPUHP_TRACE_RB_PREPARE = 62,
+ CPUHP_MM_ZS_PREPARE = 63,
+ CPUHP_MM_ZSWP_MEM_PREPARE = 64,
+ CPUHP_MM_ZSWP_POOL_PREPARE = 65,
+ CPUHP_KVM_PPC_BOOK3S_PREPARE = 66,
+ CPUHP_ZCOMP_PREPARE = 67,
+ CPUHP_TIMERS_PREPARE = 68,
+ CPUHP_MIPS_SOC_PREPARE = 69,
+ CPUHP_BP_PREPARE_DYN = 70,
+ CPUHP_BP_PREPARE_DYN_END = 90,
+ CPUHP_BRINGUP_CPU = 91,
+ CPUHP_AP_IDLE_DEAD = 92,
+ CPUHP_AP_OFFLINE = 93,
+ CPUHP_AP_SCHED_STARTING = 94,
+ CPUHP_AP_RCUTREE_DYING = 95,
+ CPUHP_AP_CPU_PM_STARTING = 96,
+ CPUHP_AP_IRQ_GIC_STARTING = 97,
+ CPUHP_AP_IRQ_HIP04_STARTING = 98,
+ CPUHP_AP_IRQ_APPLE_AIC_STARTING = 99,
+ CPUHP_AP_IRQ_ARMADA_XP_STARTING = 100,
+ CPUHP_AP_IRQ_BCM2836_STARTING = 101,
+ CPUHP_AP_IRQ_MIPS_GIC_STARTING = 102,
+ CPUHP_AP_IRQ_RISCV_STARTING = 103,
+ CPUHP_AP_IRQ_SIFIVE_PLIC_STARTING = 104,
+ CPUHP_AP_ARM_MVEBU_COHERENCY = 105,
+ CPUHP_AP_MICROCODE_LOADER = 106,
+ CPUHP_AP_PERF_X86_AMD_UNCORE_STARTING = 107,
+ CPUHP_AP_PERF_X86_STARTING = 108,
+ CPUHP_AP_PERF_X86_AMD_IBS_STARTING = 109,
+ CPUHP_AP_PERF_X86_CQM_STARTING = 110,
+ CPUHP_AP_PERF_X86_CSTATE_STARTING = 111,
+ CPUHP_AP_PERF_XTENSA_STARTING = 112,
+ CPUHP_AP_MIPS_OP_LOONGSON3_STARTING = 113,
+ CPUHP_AP_ARM_SDEI_STARTING = 114,
+ CPUHP_AP_ARM_VFP_STARTING = 115,
+ CPUHP_AP_ARM64_DEBUG_MONITORS_STARTING = 116,
+ CPUHP_AP_PERF_ARM_HW_BREAKPOINT_STARTING = 117,
+ CPUHP_AP_PERF_ARM_ACPI_STARTING = 118,
+ CPUHP_AP_PERF_ARM_STARTING = 119,
+ CPUHP_AP_ARM_L2X0_STARTING = 120,
+ CPUHP_AP_EXYNOS4_MCT_TIMER_STARTING = 121,
+ CPUHP_AP_ARM_ARCH_TIMER_STARTING = 122,
+ CPUHP_AP_ARM_GLOBAL_TIMER_STARTING = 123,
+ CPUHP_AP_JCORE_TIMER_STARTING = 124,
+ CPUHP_AP_ARM_TWD_STARTING = 125,
+ CPUHP_AP_QCOM_TIMER_STARTING = 126,
+ CPUHP_AP_TEGRA_TIMER_STARTING = 127,
+ CPUHP_AP_ARMADA_TIMER_STARTING = 128,
+ CPUHP_AP_MARCO_TIMER_STARTING = 129,
+ CPUHP_AP_MIPS_GIC_TIMER_STARTING = 130,
+ CPUHP_AP_ARC_TIMER_STARTING = 131,
+ CPUHP_AP_RISCV_TIMER_STARTING = 132,
+ CPUHP_AP_CLINT_TIMER_STARTING = 133,
+ CPUHP_AP_CSKY_TIMER_STARTING = 134,
+ CPUHP_AP_TI_GP_TIMER_STARTING = 135,
+ CPUHP_AP_HYPERV_TIMER_STARTING = 136,
+ CPUHP_AP_KVM_STARTING = 137,
+ CPUHP_AP_KVM_ARM_VGIC_INIT_STARTING = 138,
+ CPUHP_AP_KVM_ARM_VGIC_STARTING = 139,
+ CPUHP_AP_KVM_ARM_TIMER_STARTING = 140,
+ CPUHP_AP_DUMMY_TIMER_STARTING = 141,
+ CPUHP_AP_ARM_XEN_STARTING = 142,
+ CPUHP_AP_ARM_CORESIGHT_STARTING = 143,
+ CPUHP_AP_ARM_CORESIGHT_CTI_STARTING = 144,
+ CPUHP_AP_ARM64_ISNDEP_STARTING = 145,
+ CPUHP_AP_SMPCFD_DYING = 146,
+ CPUHP_AP_X86_TBOOT_DYING = 147,
+ CPUHP_AP_ARM_CACHE_B15_RAC_DYING = 148,
+ CPUHP_AP_ONLINE = 149,
+ CPUHP_TEARDOWN_CPU = 150,
+ CPUHP_AP_ONLINE_IDLE = 151,
+ CPUHP_AP_SCHED_WAIT_EMPTY = 152,
+ CPUHP_AP_SMPBOOT_THREADS = 153,
+ CPUHP_AP_X86_VDSO_VMA_ONLINE = 154,
+ CPUHP_AP_IRQ_AFFINITY_ONLINE = 155,
+ CPUHP_AP_BLK_MQ_ONLINE = 156,
+ CPUHP_AP_ARM_MVEBU_SYNC_CLOCKS = 157,
+ CPUHP_AP_X86_INTEL_EPB_ONLINE = 158,
+ CPUHP_AP_PERF_ONLINE = 159,
+ CPUHP_AP_PERF_X86_ONLINE = 160,
+ CPUHP_AP_PERF_X86_UNCORE_ONLINE = 161,
+ CPUHP_AP_PERF_X86_AMD_UNCORE_ONLINE = 162,
+ CPUHP_AP_PERF_X86_AMD_POWER_ONLINE = 163,
+ CPUHP_AP_PERF_X86_RAPL_ONLINE = 164,
+ CPUHP_AP_PERF_X86_CQM_ONLINE = 165,
+ CPUHP_AP_PERF_X86_CSTATE_ONLINE = 166,
+ CPUHP_AP_PERF_X86_IDXD_ONLINE = 167,
+ CPUHP_AP_PERF_S390_CF_ONLINE = 168,
+ CPUHP_AP_PERF_S390_SF_ONLINE = 169,
+ CPUHP_AP_PERF_ARM_CCI_ONLINE = 170,
+ CPUHP_AP_PERF_ARM_CCN_ONLINE = 171,
+ CPUHP_AP_PERF_ARM_HISI_DDRC_ONLINE = 172,
+ CPUHP_AP_PERF_ARM_HISI_HHA_ONLINE = 173,
+ CPUHP_AP_PERF_ARM_HISI_L3_ONLINE = 174,
+ CPUHP_AP_PERF_ARM_HISI_PA_ONLINE = 175,
+ CPUHP_AP_PERF_ARM_HISI_SLLC_ONLINE = 176,
+ CPUHP_AP_PERF_ARM_L2X0_ONLINE = 177,
+ CPUHP_AP_PERF_ARM_QCOM_L2_ONLINE = 178,
+ CPUHP_AP_PERF_ARM_QCOM_L3_ONLINE = 179,
+ CPUHP_AP_PERF_ARM_APM_XGENE_ONLINE = 180,
+ CPUHP_AP_PERF_ARM_CAVIUM_TX2_UNCORE_ONLINE = 181,
+ CPUHP_AP_PERF_POWERPC_NEST_IMC_ONLINE = 182,
+ CPUHP_AP_PERF_POWERPC_CORE_IMC_ONLINE = 183,
+ CPUHP_AP_PERF_POWERPC_THREAD_IMC_ONLINE = 184,
+ CPUHP_AP_PERF_POWERPC_TRACE_IMC_ONLINE = 185,
+ CPUHP_AP_PERF_POWERPC_HV_24x7_ONLINE = 186,
+ CPUHP_AP_PERF_POWERPC_HV_GPCI_ONLINE = 187,
+ CPUHP_AP_PERF_CSKY_ONLINE = 188,
+ CPUHP_AP_WATCHDOG_ONLINE = 189,
+ CPUHP_AP_WORKQUEUE_ONLINE = 190,
+ CPUHP_AP_RCUTREE_ONLINE = 191,
+ CPUHP_AP_BASE_CACHEINFO_ONLINE = 192,
+ CPUHP_AP_ONLINE_DYN = 193,
+ CPUHP_AP_ONLINE_DYN_END = 223,
+ CPUHP_AP_MM_DEMOTION_ONLINE = 224,
+ CPUHP_AP_X86_HPET_ONLINE = 225,
+ CPUHP_AP_X86_KVM_CLK_ONLINE = 226,
+ CPUHP_AP_ACTIVE = 227,
+ CPUHP_ONLINE = 228,
+};
+
+typedef void percpu_ref_func_t(struct percpu_ref *);
+
+struct percpu_ref_data {
+ atomic_long_t count;
+ percpu_ref_func_t *release;
+ percpu_ref_func_t *confirm_switch;
+ bool force_atomic: 1;
+ bool allow_reinit: 1;
+ struct callback_head rcu;
+ struct percpu_ref *ref;
+};
+
+struct dev_pagemap_ops {
+ void (*page_free)(struct page *);
+ void (*kill)(struct dev_pagemap *);
+ void (*cleanup)(struct dev_pagemap *);
+ vm_fault_t (*migrate_to_ram)(struct vm_fault *);
+};
+
+enum vm_event_item {
+ PGPGIN = 0,
+ PGPGOUT = 1,
+ PSWPIN = 2,
+ PSWPOUT = 3,
+ PGALLOC_DMA = 4,
+ PGALLOC_DMA32 = 5,
+ PGALLOC_NORMAL = 6,
+ PGALLOC_MOVABLE = 7,
+ ALLOCSTALL_DMA = 8,
+ ALLOCSTALL_DMA32 = 9,
+ ALLOCSTALL_NORMAL = 10,
+ ALLOCSTALL_MOVABLE = 11,
+ PGSCAN_SKIP_DMA = 12,
+ PGSCAN_SKIP_DMA32 = 13,
+ PGSCAN_SKIP_NORMAL = 14,
+ PGSCAN_SKIP_MOVABLE = 15,
+ PGFREE = 16,
+ PGACTIVATE = 17,
+ PGDEACTIVATE = 18,
+ PGLAZYFREE = 19,
+ PGFAULT = 20,
+ PGMAJFAULT = 21,
+ PGLAZYFREED = 22,
+ PGREFILL = 23,
+ PGREUSE = 24,
+ PGSTEAL_KSWAPD = 25,
+ PGSTEAL_DIRECT = 26,
+ PGDEMOTE_KSWAPD = 27,
+ PGDEMOTE_DIRECT = 28,
+ PGSCAN_KSWAPD = 29,
+ PGSCAN_DIRECT = 30,
+ PGSCAN_DIRECT_THROTTLE = 31,
+ PGSCAN_ANON = 32,
+ PGSCAN_FILE = 33,
+ PGSTEAL_ANON = 34,
+ PGSTEAL_FILE = 35,
+ PGSCAN_ZONE_RECLAIM_FAILED = 36,
+ PGINODESTEAL = 37,
+ SLABS_SCANNED = 38,
+ KSWAPD_INODESTEAL = 39,
+ KSWAPD_LOW_WMARK_HIT_QUICKLY = 40,
+ KSWAPD_HIGH_WMARK_HIT_QUICKLY = 41,
+ PAGEOUTRUN = 42,
+ PGROTATED = 43,
+ DROP_PAGECACHE = 44,
+ DROP_SLAB = 45,
+ OOM_KILL = 46,
+ NUMA_PTE_UPDATES = 47,
+ NUMA_HUGE_PTE_UPDATES = 48,
+ NUMA_HINT_FAULTS = 49,
+ NUMA_HINT_FAULTS_LOCAL = 50,
+ NUMA_PAGE_MIGRATE = 51,
+ PGMIGRATE_SUCCESS = 52,
+ PGMIGRATE_FAIL = 53,
+ THP_MIGRATION_SUCCESS = 54,
+ THP_MIGRATION_FAIL = 55,
+ THP_MIGRATION_SPLIT = 56,
+ COMPACTMIGRATE_SCANNED = 57,
+ COMPACTFREE_SCANNED = 58,
+ COMPACTISOLATED = 59,
+ COMPACTSTALL = 60,
+ COMPACTFAIL = 61,
+ COMPACTSUCCESS = 62,
+ KCOMPACTD_WAKE = 63,
+ KCOMPACTD_MIGRATE_SCANNED = 64,
+ KCOMPACTD_FREE_SCANNED = 65,
+ HTLB_BUDDY_PGALLOC = 66,
+ HTLB_BUDDY_PGALLOC_FAIL = 67,
+ CMA_ALLOC_SUCCESS = 68,
+ CMA_ALLOC_FAIL = 69,
+ UNEVICTABLE_PGCULLED = 70,
+ UNEVICTABLE_PGSCANNED = 71,
+ UNEVICTABLE_PGRESCUED = 72,
+ UNEVICTABLE_PGMLOCKED = 73,
+ UNEVICTABLE_PGMUNLOCKED = 74,
+ UNEVICTABLE_PGCLEARED = 75,
+ UNEVICTABLE_PGSTRANDED = 76,
+ THP_FAULT_ALLOC = 77,
+ THP_FAULT_FALLBACK = 78,
+ THP_FAULT_FALLBACK_CHARGE = 79,
+ THP_COLLAPSE_ALLOC = 80,
+ THP_COLLAPSE_ALLOC_FAILED = 81,
+ THP_FILE_ALLOC = 82,
+ THP_FILE_FALLBACK = 83,
+ THP_FILE_FALLBACK_CHARGE = 84,
+ THP_FILE_MAPPED = 85,
+ THP_SPLIT_PAGE = 86,
+ THP_SPLIT_PAGE_FAILED = 87,
+ THP_DEFERRED_SPLIT_PAGE = 88,
+ THP_SPLIT_PMD = 89,
+ THP_ZERO_PAGE_ALLOC = 90,
+ THP_ZERO_PAGE_ALLOC_FAILED = 91,
+ THP_SWPOUT = 92,
+ THP_SWPOUT_FALLBACK = 93,
+ BALLOON_INFLATE = 94,
+ BALLOON_DEFLATE = 95,
+ BALLOON_MIGRATE = 96,
+ SWAP_RA = 97,
+ SWAP_RA_HIT = 98,
+ NR_VM_EVENT_ITEMS = 99,
+};
+
+struct seq_operations {
+ void * (*start)(struct seq_file *, loff_t *);
+ void (*stop)(struct seq_file *, void *);
+ void * (*next)(struct seq_file *, void *, loff_t *);
+ int (*show)(struct seq_file *, void *);
+};
+
+struct ring_buffer_event {
+ u32 type_len: 5;
+ u32 time_delta: 27;
+ u32 array[0];
+};
+
+struct seq_buf {
+ char *buffer;
+ size_t size;
+ size_t len;
+ loff_t readpos;
+};
+
+struct trace_seq {
+ char buffer[4096];
+ struct seq_buf seq;
+ int full;
+};
+
+struct irq_desc;
+
+typedef void (*irq_flow_handler_t)(struct irq_desc *);
+
+struct msi_desc;
+
+struct irq_common_data {
+ unsigned int state_use_accessors;
+ unsigned int node;
+ void *handler_data;
+ struct msi_desc *msi_desc;
+ cpumask_var_t affinity;
+ cpumask_var_t effective_affinity;
+ unsigned int ipi_offset;
+};
+
+struct irq_chip;
+
+struct irq_data {
+ u32 mask;
+ unsigned int irq;
+ long unsigned int hwirq;
+ struct irq_common_data *common;
+ struct irq_chip *chip;
+ struct irq_domain *domain;
+ struct irq_data *parent_data;
+ void *chip_data;
+};
+
+struct irqaction;
+
+struct irq_affinity_notify;
+
+struct proc_dir_entry;
+
+struct irq_desc {
+ struct irq_common_data irq_common_data;
+ struct irq_data irq_data;
+ unsigned int *kstat_irqs;
+ irq_flow_handler_t handle_irq;
+ struct irqaction *action;
+ unsigned int status_use_accessors;
+ unsigned int core_internal_state__do_not_mess_with_it;
+ unsigned int depth;
+ unsigned int wake_depth;
+ unsigned int tot_count;
+ unsigned int irq_count;
+ long unsigned int last_unhandled;
+ unsigned int irqs_unhandled;
+ atomic_t threads_handled;
+ int threads_handled_last;
+ raw_spinlock_t lock;
+ struct cpumask *percpu_enabled;
+ const struct cpumask *percpu_affinity;
+ const struct cpumask *affinity_hint;
+ struct irq_affinity_notify *affinity_notify;
+ long unsigned int threads_oneshot;
+ atomic_t threads_active;
+ wait_queue_head_t wait_for_threads;
+ unsigned int nr_actions;
+ unsigned int no_suspend_depth;
+ unsigned int cond_suspend_depth;
+ unsigned int force_resume_depth;
+ struct proc_dir_entry *dir;
+ struct callback_head rcu;
+ struct kobject kobj;
+ struct mutex request_mutex;
+ int parent_irq;
+ struct module *owner;
+ const char *name;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+};
+
+enum irqreturn {
+ IRQ_NONE = 0,
+ IRQ_HANDLED = 1,
+ IRQ_WAKE_THREAD = 2,
+};
+
+typedef enum irqreturn irqreturn_t;
+
+struct fwnode_reference_args;
+
+struct fwnode_endpoint;
+
+struct fwnode_operations {
+ struct fwnode_handle * (*get)(struct fwnode_handle *);
+ void (*put)(struct fwnode_handle *);
+ bool (*device_is_available)(const struct fwnode_handle *);
+ const void * (*device_get_match_data)(const struct fwnode_handle *, const struct device *);
+ bool (*property_present)(const struct fwnode_handle *, const char *);
+ int (*property_read_int_array)(const struct fwnode_handle *, const char *, unsigned int, void *, size_t);
+ int (*property_read_string_array)(const struct fwnode_handle *, const char *, const char **, size_t);
+ const char * (*get_name)(const struct fwnode_handle *);
+ const char * (*get_name_prefix)(const struct fwnode_handle *);
+ struct fwnode_handle * (*get_parent)(const struct fwnode_handle *);
+ struct fwnode_handle * (*get_next_child_node)(const struct fwnode_handle *, struct fwnode_handle *);
+ struct fwnode_handle * (*get_named_child_node)(const struct fwnode_handle *, const char *);
+ int (*get_reference_args)(const struct fwnode_handle *, const char *, const char *, unsigned int, unsigned int, struct fwnode_reference_args *);
+ struct fwnode_handle * (*graph_get_next_endpoint)(const struct fwnode_handle *, struct fwnode_handle *);
+ struct fwnode_handle * (*graph_get_remote_endpoint)(const struct fwnode_handle *);
+ struct fwnode_handle * (*graph_get_port_parent)(struct fwnode_handle *);
+ int (*graph_parse_endpoint)(const struct fwnode_handle *, struct fwnode_endpoint *);
+ int (*add_links)(struct fwnode_handle *);
+};
+
+struct fwnode_endpoint {
+ unsigned int port;
+ unsigned int id;
+ const struct fwnode_handle *local_fwnode;
+};
+
+struct fwnode_reference_args {
+ struct fwnode_handle *fwnode;
+ unsigned int nargs;
+ u64 args[8];
+};
+
+enum kmalloc_cache_type {
+ KMALLOC_NORMAL = 0,
+ KMALLOC_CGROUP = 1,
+ KMALLOC_RECLAIM = 2,
+ KMALLOC_DMA = 3,
+ NR_KMALLOC_TYPES = 4,
+};
+
+enum irqchip_irq_state {
+ IRQCHIP_STATE_PENDING = 0,
+ IRQCHIP_STATE_ACTIVE = 1,
+ IRQCHIP_STATE_MASKED = 2,
+ IRQCHIP_STATE_LINE_LEVEL = 3,
+};
+
+struct msi_msg;
+
+struct irq_chip {
+ struct device *parent_device;
+ const char *name;
+ unsigned int (*irq_startup)(struct irq_data *);
+ void (*irq_shutdown)(struct irq_data *);
+ void (*irq_enable)(struct irq_data *);
+ void (*irq_disable)(struct irq_data *);
+ void (*irq_ack)(struct irq_data *);
+ void (*irq_mask)(struct irq_data *);
+ void (*irq_mask_ack)(struct irq_data *);
+ void (*irq_unmask)(struct irq_data *);
+ void (*irq_eoi)(struct irq_data *);
+ int (*irq_set_affinity)(struct irq_data *, const struct cpumask *, bool);
+ int (*irq_retrigger)(struct irq_data *);
+ int (*irq_set_type)(struct irq_data *, unsigned int);
+ int (*irq_set_wake)(struct irq_data *, unsigned int);
+ void (*irq_bus_lock)(struct irq_data *);
+ void (*irq_bus_sync_unlock)(struct irq_data *);
+ void (*irq_suspend)(struct irq_data *);
+ void (*irq_resume)(struct irq_data *);
+ void (*irq_pm_shutdown)(struct irq_data *);
+ void (*irq_calc_mask)(struct irq_data *);
+ void (*irq_print_chip)(struct irq_data *, struct seq_file *);
+ int (*irq_request_resources)(struct irq_data *);
+ void (*irq_release_resources)(struct irq_data *);
+ void (*irq_compose_msi_msg)(struct irq_data *, struct msi_msg *);
+ void (*irq_write_msi_msg)(struct irq_data *, struct msi_msg *);
+ int (*irq_get_irqchip_state)(struct irq_data *, enum irqchip_irq_state, bool *);
+ int (*irq_set_irqchip_state)(struct irq_data *, enum irqchip_irq_state, bool);
+ int (*irq_set_vcpu_affinity)(struct irq_data *, void *);
+ void (*ipi_send_single)(struct irq_data *, unsigned int);
+ void (*ipi_send_mask)(struct irq_data *, const struct cpumask *);
+ int (*irq_nmi_setup)(struct irq_data *);
+ void (*irq_nmi_teardown)(struct irq_data *);
+ long unsigned int flags;
+};
+
+typedef irqreturn_t (*irq_handler_t)(int, void *);
+
+struct irqaction {
+ irq_handler_t handler;
+ void *dev_id;
+ void *percpu_dev_id;
+ struct irqaction *next;
+ irq_handler_t thread_fn;
+ struct task_struct *thread;
+ struct irqaction *secondary;
+ unsigned int irq;
+ unsigned int flags;
+ long unsigned int thread_flags;
+ long unsigned int thread_mask;
+ const char *name;
+ struct proc_dir_entry *dir;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+};
+
+struct irq_affinity_notify {
+ unsigned int irq;
+ struct kref kref;
+ struct work_struct work;
+ void (*notify)(struct irq_affinity_notify *, const cpumask_t *);
+ void (*release)(struct kref *);
+};
+
+struct irq_chip_regs {
+ long unsigned int enable;
+ long unsigned int disable;
+ long unsigned int mask;
+ long unsigned int ack;
+ long unsigned int eoi;
+ long unsigned int type;
+ long unsigned int polarity;
+};
+
+struct irq_chip_type {
+ struct irq_chip chip;
+ struct irq_chip_regs regs;
+ irq_flow_handler_t handler;
+ u32 type;
+ u32 mask_cache_priv;
+ u32 *mask_cache;
+};
+
+struct irq_chip_generic {
+ raw_spinlock_t lock;
+ void *reg_base;
+ u32 (*reg_readl)(void *);
+ void (*reg_writel)(u32, void *);
+ void (*suspend)(struct irq_chip_generic *);
+ void (*resume)(struct irq_chip_generic *);
+ unsigned int irq_base;
+ unsigned int irq_cnt;
+ u32 mask_cache;
+ u32 type_cache;
+ u32 polarity_cache;
+ u32 wake_enabled;
+ u32 wake_active;
+ unsigned int num_ct;
+ void *private;
+ long unsigned int installed;
+ long unsigned int unused;
+ struct irq_domain *domain;
+ struct list_head list;
+ struct irq_chip_type chip_types[0];
+};
+
+enum irq_gc_flags {
+ IRQ_GC_INIT_MASK_CACHE = 1,
+ IRQ_GC_INIT_NESTED_LOCK = 2,
+ IRQ_GC_MASK_CACHE_PER_TYPE = 4,
+ IRQ_GC_NO_MASK = 8,
+ IRQ_GC_BE_IO = 16,
+};
+
+struct irq_domain_chip_generic {
+ unsigned int irqs_per_chip;
+ unsigned int num_chips;
+ unsigned int irq_flags_to_clear;
+ unsigned int irq_flags_to_set;
+ enum irq_gc_flags gc_flags;
+ struct irq_chip_generic *gc[0];
+};
+
+enum perf_sw_ids {
+ PERF_COUNT_SW_CPU_CLOCK = 0,
+ PERF_COUNT_SW_TASK_CLOCK = 1,
+ PERF_COUNT_SW_PAGE_FAULTS = 2,
+ PERF_COUNT_SW_CONTEXT_SWITCHES = 3,
+ PERF_COUNT_SW_CPU_MIGRATIONS = 4,
+ PERF_COUNT_SW_PAGE_FAULTS_MIN = 5,
+ PERF_COUNT_SW_PAGE_FAULTS_MAJ = 6,
+ PERF_COUNT_SW_ALIGNMENT_FAULTS = 7,
+ PERF_COUNT_SW_EMULATION_FAULTS = 8,
+ PERF_COUNT_SW_DUMMY = 9,
+ PERF_COUNT_SW_BPF_OUTPUT = 10,
+ PERF_COUNT_SW_CGROUP_SWITCHES = 11,
+ PERF_COUNT_SW_MAX = 12,
+};
+
+union perf_mem_data_src {
+ __u64 val;
+ struct {
+ __u64 mem_op: 5;
+ __u64 mem_lvl: 14;
+ __u64 mem_snoop: 5;
+ __u64 mem_lock: 2;
+ __u64 mem_dtlb: 7;
+ __u64 mem_lvl_num: 4;
+ __u64 mem_remote: 1;
+ __u64 mem_snoopx: 2;
+ __u64 mem_blk: 3;
+ __u64 mem_hops: 3;
+ __u64 mem_rsvd: 18;
+ };
+};
+
+struct perf_branch_entry {
+ __u64 from;
+ __u64 to;
+ __u64 mispred: 1;
+ __u64 predicted: 1;
+ __u64 in_tx: 1;
+ __u64 abort: 1;
+ __u64 cycles: 16;
+ __u64 type: 4;
+ __u64 reserved: 40;
+};
+
+union perf_sample_weight {
+ __u64 full;
+ struct {
+ __u32 var1_dw;
+ __u16 var2_w;
+ __u16 var3_w;
+ };
+};
+
+struct new_utsname {
+ char sysname[65];
+ char nodename[65];
+ char release[65];
+ char version[65];
+ char machine[65];
+ char domainname[65];
+};
+
+struct uts_namespace {
+ struct new_utsname name;
+ struct user_namespace *user_ns;
+ struct ucounts *ucounts;
+ struct ns_common ns;
+};
+
+struct cgroup_namespace {
+ struct ns_common ns;
+ struct user_namespace *user_ns;
+ struct ucounts *ucounts;
+ struct css_set *root_cset;
+};
+
+struct nsset {
+ unsigned int flags;
+ struct nsproxy *nsproxy;
+ struct fs_struct *fs;
+ const struct cred *cred;
+};
+
+struct proc_ns_operations {
+ const char *name;
+ const char *real_ns_name;
+ int type;
+ struct ns_common * (*get)(struct task_struct *);
+ void (*put)(struct ns_common *);
+ int (*install)(struct nsset *, struct ns_common *);
+ struct user_namespace * (*owner)(struct ns_common *);
+ struct ns_common * (*get_parent)(struct ns_common *);
+};
+
+struct iovec {
+ void *iov_base;
+ __kernel_size_t iov_len;
+};
+
+struct kvec {
+ void *iov_base;
+ size_t iov_len;
+};
+
+struct ftrace_regs {
+ struct pt_regs regs;
+};
+
+struct perf_regs {
+ __u64 abi;
+ struct pt_regs *regs;
+};
+
+struct u64_stats_sync {};
+
+struct bpf_cgroup_storage_key {
+ __u64 cgroup_inode_id;
+ __u32 attach_type;
+};
+
+struct bpf_storage_buffer;
+
+struct bpf_cgroup_storage_map;
+
+struct bpf_cgroup_storage {
+ union {
+ struct bpf_storage_buffer *buf;
+ void *percpu_buf;
+ };
+ struct bpf_cgroup_storage_map *map;
+ struct bpf_cgroup_storage_key key;
+ struct list_head list_map;
+ struct list_head list_cg;
+ struct rb_node node;
+ struct callback_head rcu;
+};
+
+struct bpf_prog_array_item {
+ struct bpf_prog *prog;
+ union {
+ struct bpf_cgroup_storage *cgroup_storage[2];
+ u64 bpf_cookie;
+ };
+};
+
+struct bpf_prog_array {
+ struct callback_head rcu;
+ struct bpf_prog_array_item items[0];
+};
+
+struct bpf_storage_buffer {
+ struct callback_head rcu;
+ char data[0];
+};
+
+struct psi_group_cpu {
+ seqcount_t seq;
+ unsigned int tasks[4];
+ u32 state_mask;
+ u32 times[7];
+ u64 state_start;
+ u32 times_prev[14];
+ long: 64;
+};
+
+struct cgroup_taskset;
+
+struct cftype;
+
+struct cgroup_subsys {
+ struct cgroup_subsys_state * (*css_alloc)(struct cgroup_subsys_state *);
+ int (*css_online)(struct cgroup_subsys_state *);
+ void (*css_offline)(struct cgroup_subsys_state *);
+ void (*css_released)(struct cgroup_subsys_state *);
+ void (*css_free)(struct cgroup_subsys_state *);
+ void (*css_reset)(struct cgroup_subsys_state *);
+ void (*css_rstat_flush)(struct cgroup_subsys_state *, int);
+ int (*css_extra_stat_show)(struct seq_file *, struct cgroup_subsys_state *);
+ int (*can_attach)(struct cgroup_taskset *);
+ void (*cancel_attach)(struct cgroup_taskset *);
+ void (*attach)(struct cgroup_taskset *);
+ void (*post_attach)();
+ int (*can_fork)(struct task_struct *, struct css_set *);
+ void (*cancel_fork)(struct task_struct *, struct css_set *);
+ void (*fork)(struct task_struct *);
+ void (*exit)(struct task_struct *);
+ void (*release)(struct task_struct *);
+ void (*bind)(struct cgroup_subsys_state *);
+ bool early_init: 1;
+ bool implicit_on_dfl: 1;
+ bool threaded: 1;
+ int id;
+ const char *name;
+ const char *legacy_name;
+ struct cgroup_root *root;
+ struct idr css_idr;
+ struct list_head cfts;
+ struct cftype *dfl_cftypes;
+ struct cftype *legacy_cftypes;
+ unsigned int depends_on;
+};
+
+struct cgroup_rstat_cpu {
+ struct u64_stats_sync bsync;
+ struct cgroup_base_stat bstat;
+ struct cgroup_base_stat last_bstat;
+ struct cgroup *updated_children;
+ struct cgroup *updated_next;
+};
+
+struct cgroup_root {
+ struct kernfs_root *kf_root;
+ unsigned int subsys_mask;
+ int hierarchy_id;
+ struct cgroup cgrp;
+ u64 cgrp_ancestor_id_storage;
+ atomic_t nr_cgrps;
+ struct list_head root_list;
+ unsigned int flags;
+ char release_agent_path[4096];
+ char name[64];
+};
+
+struct cftype {
+ char name[64];
+ long unsigned int private;
+ size_t max_write_len;
+ unsigned int flags;
+ unsigned int file_offset;
+ struct cgroup_subsys *ss;
+ struct list_head node;
+ struct kernfs_ops *kf_ops;
+ int (*open)(struct kernfs_open_file *);
+ void (*release)(struct kernfs_open_file *);
+ u64 (*read_u64)(struct cgroup_subsys_state *, struct cftype *);
+ s64 (*read_s64)(struct cgroup_subsys_state *, struct cftype *);
+ int (*seq_show)(struct seq_file *, void *);
+ void * (*seq_start)(struct seq_file *, loff_t *);
+ void * (*seq_next)(struct seq_file *, void *, loff_t *);
+ void (*seq_stop)(struct seq_file *, void *);
+ int (*write_u64)(struct cgroup_subsys_state *, struct cftype *, u64);
+ int (*write_s64)(struct cgroup_subsys_state *, struct cftype *, s64);
+ ssize_t (*write)(struct kernfs_open_file *, char *, size_t, loff_t);
+ __poll_t (*poll)(struct kernfs_open_file *, struct poll_table_struct *);
+};
+
+struct perf_callchain_entry {
+ __u64 nr;
+ __u64 ip[0];
+};
+
+typedef long unsigned int (*perf_copy_f)(void *, const void *, long unsigned int, long unsigned int);
+
+struct perf_raw_frag {
+ union {
+ struct perf_raw_frag *next;
+ long unsigned int pad;
+ };
+ perf_copy_f copy;
+ void *data;
+ u32 size;
+} __attribute__((packed));
+
+struct perf_raw_record {
+ struct perf_raw_frag frag;
+ u32 size;
+};
+
+struct perf_branch_stack {
+ __u64 nr;
+ __u64 hw_idx;
+ struct perf_branch_entry entries[0];
+};
+
+struct perf_cpu_context;
+
+struct perf_output_handle;
+
+struct pmu {
+ struct list_head entry;
+ struct module *module;
+ struct device *dev;
+ const struct attribute_group **attr_groups;
+ const struct attribute_group **attr_update;
+ const char *name;
+ int type;
+ int capabilities;
+ int *pmu_disable_count;
+ struct perf_cpu_context *pmu_cpu_context;
+ atomic_t exclusive_cnt;
+ int task_ctx_nr;
+ int hrtimer_interval_ms;
+ unsigned int nr_addr_filters;
+ void (*pmu_enable)(struct pmu *);
+ void (*pmu_disable)(struct pmu *);
+ int (*event_init)(struct perf_event *);
+ void (*event_mapped)(struct perf_event *, struct mm_struct *);
+ void (*event_unmapped)(struct perf_event *, struct mm_struct *);
+ int (*add)(struct perf_event *, int);
+ void (*del)(struct perf_event *, int);
+ void (*start)(struct perf_event *, int);
+ void (*stop)(struct perf_event *, int);
+ void (*read)(struct perf_event *);
+ void (*start_txn)(struct pmu *, unsigned int);
+ int (*commit_txn)(struct pmu *);
+ void (*cancel_txn)(struct pmu *);
+ int (*event_idx)(struct perf_event *);
+ void (*sched_task)(struct perf_event_context *, bool);
+ struct kmem_cache *task_ctx_cache;
+ void (*swap_task_ctx)(struct perf_event_context *, struct perf_event_context *);
+ void * (*setup_aux)(struct perf_event *, void **, int, bool);
+ void (*free_aux)(void *);
+ long int (*snapshot_aux)(struct perf_event *, struct perf_output_handle *, long unsigned int);
+ int (*addr_filters_validate)(struct list_head *);
+ void (*addr_filters_sync)(struct perf_event *);
+ int (*aux_output_match)(struct perf_event *);
+ int (*filter_match)(struct perf_event *);
+ int (*check_period)(struct perf_event *, u64);
+};
+
+struct perf_cpu_context {
+ struct perf_event_context ctx;
+ struct perf_event_context *task_ctx;
+ int active_oncpu;
+ int exclusive;
+ raw_spinlock_t hrtimer_lock;
+ struct hrtimer hrtimer;
+ ktime_t hrtimer_interval;
+ unsigned int hrtimer_active;
+ struct perf_cgroup *cgrp;
+ struct list_head cgrp_cpuctx_entry;
+ struct list_head sched_cb_entry;
+ int sched_cb_usage;
+ int online;
+ int heap_size;
+ struct perf_event **heap;
+ struct perf_event *heap_default[2];
+};
+
+struct perf_output_handle {
+ struct perf_event *event;
+ struct perf_buffer *rb;
+ long unsigned int wakeup;
+ long unsigned int size;
+ u64 aux_flags;
+ union {
+ void *addr;
+ long unsigned int head;
+ };
+ int page;
+};
+
+struct perf_addr_filter_range {
+ long unsigned int start;
+ long unsigned int size;
+};
+
+struct perf_sample_data {
+ u64 addr;
+ struct perf_raw_record *raw;
+ struct perf_branch_stack *br_stack;
+ u64 period;
+ union perf_sample_weight weight;
+ u64 txn;
+ union perf_mem_data_src data_src;
+ u64 type;
+ u64 ip;
+ struct {
+ u32 pid;
+ u32 tid;
+ } tid_entry;
+ u64 time;
+ u64 id;
+ u64 stream_id;
+ struct {
+ u32 cpu;
+ u32 reserved;
+ } cpu_entry;
+ struct perf_callchain_entry *callchain;
+ u64 aux_size;
+ struct perf_regs regs_user;
+ struct perf_regs regs_intr;
+ u64 stack_user_size;
+ u64 phys_addr;
+ u64 cgroup;
+ u64 data_page_size;
+ u64 code_page_size;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+};
+
+struct perf_cgroup_info;
+
+struct perf_cgroup {
+ struct cgroup_subsys_state css;
+ struct perf_cgroup_info *info;
+};
+
+struct perf_cgroup_info {
+ u64 time;
+ u64 timestamp;
+};
+
+struct trace_entry {
+ short unsigned int type;
+ unsigned char flags;
+ unsigned char preempt_count;
+ int pid;
+};
+
+struct trace_array;
+
+struct tracer;
+
+struct array_buffer;
+
+struct ring_buffer_iter;
+
+struct trace_iterator {
+ struct trace_array *tr;
+ struct tracer *trace;
+ struct array_buffer *array_buffer;
+ void *private;
+ int cpu_file;
+ struct mutex mutex;
+ struct ring_buffer_iter **buffer_iter;
+ long unsigned int iter_flags;
+ void *temp;
+ unsigned int temp_size;
+ char *fmt;
+ unsigned int fmt_size;
+ struct trace_seq tmp_seq;
+ cpumask_var_t started;
+ bool snapshot;
+ struct trace_seq seq;
+ struct trace_entry *ent;
+ long unsigned int lost_events;
+ int leftover;
+ int ent_size;
+ int cpu;
+ u64 ts;
+ loff_t pos;
+ long int idx;
+};
+
+enum print_line_t {
+ TRACE_TYPE_PARTIAL_LINE = 0,
+ TRACE_TYPE_HANDLED = 1,
+ TRACE_TYPE_UNHANDLED = 2,
+ TRACE_TYPE_NO_CONSUME = 3,
+};
+
+typedef enum print_line_t (*trace_print_func)(struct trace_iterator *, int, struct trace_event *);
+
+struct trace_event_functions {
+ trace_print_func trace;
+ trace_print_func raw;
+ trace_print_func hex;
+ trace_print_func binary;
+};
+
+enum trace_reg {
+ TRACE_REG_REGISTER = 0,
+ TRACE_REG_UNREGISTER = 1,
+ TRACE_REG_PERF_REGISTER = 2,
+ TRACE_REG_PERF_UNREGISTER = 3,
+ TRACE_REG_PERF_OPEN = 4,
+ TRACE_REG_PERF_CLOSE = 5,
+ TRACE_REG_PERF_ADD = 6,
+ TRACE_REG_PERF_DEL = 7,
+};
+
+struct trace_event_fields {
+ const char *type;
+ union {
+ struct {
+ const char *name;
+ const int size;
+ const int align;
+ const int is_signed;
+ const int filter_type;
+ };
+ int (*define_fields)(struct trace_event_call *);
+ };
+};
+
+struct trace_event_class {
+ const char *system;
+ void *probe;
+ void *perf_probe;
+ int (*reg)(struct trace_event_call *, enum trace_reg, void *);
+ struct trace_event_fields *fields_array;
+ struct list_head * (*get_fields)(struct trace_event_call *);
+ struct list_head fields;
+ int (*raw_init)(struct trace_event_call *);
+};
+
+struct trace_buffer;
+
+struct trace_event_file;
+
+struct trace_event_buffer {
+ struct trace_buffer *buffer;
+ struct ring_buffer_event *event;
+ struct trace_event_file *trace_file;
+ void *entry;
+ unsigned int trace_ctx;
+ struct pt_regs *regs;
+};
+
+struct trace_subsystem_dir;
+
+struct trace_event_file {
+ struct list_head list;
+ struct trace_event_call *event_call;
+ struct event_filter *filter;
+ struct dentry *dir;
+ struct trace_array *tr;
+ struct trace_subsystem_dir *system;
+ struct list_head triggers;
+ long unsigned int flags;
+ atomic_t sm_ref;
+ atomic_t tm_ref;
+};
+
+enum {
+ TRACE_EVENT_FL_FILTERED_BIT = 0,
+ TRACE_EVENT_FL_CAP_ANY_BIT = 1,
+ TRACE_EVENT_FL_NO_SET_FILTER_BIT = 2,
+ TRACE_EVENT_FL_IGNORE_ENABLE_BIT = 3,
+ TRACE_EVENT_FL_TRACEPOINT_BIT = 4,
+ TRACE_EVENT_FL_DYNAMIC_BIT = 5,
+ TRACE_EVENT_FL_KPROBE_BIT = 6,
+ TRACE_EVENT_FL_UPROBE_BIT = 7,
+ TRACE_EVENT_FL_EPROBE_BIT = 8,
+};
+
+enum {
+ TRACE_EVENT_FL_FILTERED = 1,
+ TRACE_EVENT_FL_CAP_ANY = 2,
+ TRACE_EVENT_FL_NO_SET_FILTER = 4,
+ TRACE_EVENT_FL_IGNORE_ENABLE = 8,
+ TRACE_EVENT_FL_TRACEPOINT = 16,
+ TRACE_EVENT_FL_DYNAMIC = 32,
+ TRACE_EVENT_FL_KPROBE = 64,
+ TRACE_EVENT_FL_UPROBE = 128,
+ TRACE_EVENT_FL_EPROBE = 256,
+};
+
+enum {
+ EVENT_FILE_FL_ENABLED_BIT = 0,
+ EVENT_FILE_FL_RECORDED_CMD_BIT = 1,
+ EVENT_FILE_FL_RECORDED_TGID_BIT = 2,
+ EVENT_FILE_FL_FILTERED_BIT = 3,
+ EVENT_FILE_FL_NO_SET_FILTER_BIT = 4,
+ EVENT_FILE_FL_SOFT_MODE_BIT = 5,
+ EVENT_FILE_FL_SOFT_DISABLED_BIT = 6,
+ EVENT_FILE_FL_TRIGGER_MODE_BIT = 7,
+ EVENT_FILE_FL_TRIGGER_COND_BIT = 8,
+ EVENT_FILE_FL_PID_FILTER_BIT = 9,
+ EVENT_FILE_FL_WAS_ENABLED_BIT = 10,
+};
+
+enum {
+ EVENT_FILE_FL_ENABLED = 1,
+ EVENT_FILE_FL_RECORDED_CMD = 2,
+ EVENT_FILE_FL_RECORDED_TGID = 4,
+ EVENT_FILE_FL_FILTERED = 8,
+ EVENT_FILE_FL_NO_SET_FILTER = 16,
+ EVENT_FILE_FL_SOFT_MODE = 32,
+ EVENT_FILE_FL_SOFT_DISABLED = 64,
+ EVENT_FILE_FL_TRIGGER_MODE = 128,
+ EVENT_FILE_FL_TRIGGER_COND = 256,
+ EVENT_FILE_FL_PID_FILTER = 512,
+ EVENT_FILE_FL_WAS_ENABLED = 1024,
+};
+
+enum event_trigger_type {
+ ETT_NONE = 0,
+ ETT_TRACE_ONOFF = 1,
+ ETT_SNAPSHOT = 2,
+ ETT_STACKTRACE = 4,
+ ETT_EVENT_ENABLE = 8,
+ ETT_EVENT_HIST = 16,
+ ETT_HIST_ENABLE = 32,
+ ETT_EVENT_EPROBE = 64,
+};
+
+enum {
+ FILTER_OTHER = 0,
+ FILTER_STATIC_STRING = 1,
+ FILTER_DYN_STRING = 2,
+ FILTER_PTR_STRING = 3,
+ FILTER_TRACE_FN = 4,
+ FILTER_COMM = 5,
+ FILTER_CPU = 6,
+};
+
+struct property {
+ char *name;
+ int length;
+ void *value;
+ struct property *next;
+ long unsigned int _flags;
+ struct bin_attribute attr;
+};
+
+struct irq_fwspec {
+ struct fwnode_handle *fwnode;
+ int param_count;
+ u32 param[16];
+};
+
+struct irq_domain_ops {
+ int (*match)(struct irq_domain *, struct device_node *, enum irq_domain_bus_token);
+ int (*select)(struct irq_domain *, struct irq_fwspec *, enum irq_domain_bus_token);
+ int (*map)(struct irq_domain *, unsigned int, irq_hw_number_t);
+ void (*unmap)(struct irq_domain *, unsigned int);
+ int (*xlate)(struct irq_domain *, struct device_node *, const u32 *, unsigned int, long unsigned int *, unsigned int *);
+ int (*alloc)(struct irq_domain *, unsigned int, unsigned int, void *);
+ void (*free)(struct irq_domain *, unsigned int, unsigned int);
+ int (*activate)(struct irq_domain *, struct irq_data *, bool);
+ void (*deactivate)(struct irq_domain *, struct irq_data *);
+ int (*translate)(struct irq_domain *, struct irq_fwspec *, long unsigned int *, unsigned int *);
+};
+
+struct xbc_node {
+ uint16_t next;
+ uint16_t child;
+ uint16_t parent;
+ uint16_t data;
+};
+
+enum wb_stat_item {
+ WB_RECLAIMABLE = 0,
+ WB_WRITEBACK = 1,
+ WB_DIRTIED = 2,
+ WB_WRITTEN = 3,
+ NR_WB_STAT_ITEMS = 4,
+};
+
+struct block_device_operations;
+
+struct timer_rand_state;
+
+struct disk_events;
+
+struct cdrom_device_info;
+
+struct badblocks;
+
+struct gendisk {
+ int major;
+ int first_minor;
+ int minors;
+ char disk_name[32];
+ short unsigned int events;
+ short unsigned int event_flags;
+ struct xarray part_tbl;
+ struct block_device *part0;
+ const struct block_device_operations *fops;
+ struct request_queue *queue;
+ void *private_data;
+ int flags;
+ long unsigned int state;
+ struct mutex open_mutex;
+ unsigned int open_partitions;
+ struct backing_dev_info *bdi;
+ struct kobject *slave_dir;
+ struct list_head slave_bdevs;
+ struct timer_rand_state *random;
+ atomic_t sync_io;
+ struct disk_events *ev;
+ struct kobject integrity_kobj;
+ struct cdrom_device_info *cdi;
+ int node_id;
+ struct badblocks *bb;
+ struct lockdep_map lockdep_map;
+ u64 diskseq;
+};
+
+struct partition_meta_info {
+ char uuid[37];
+ u8 volname[64];
+};
+
+struct bio_integrity_payload {
+ struct bio *bip_bio;
+ struct bvec_iter bip_iter;
+ short unsigned int bip_vcnt;
+ short unsigned int bip_max_vcnt;
+ short unsigned int bip_flags;
+ struct bvec_iter bio_iter;
+ short: 16;
+ struct work_struct bip_work;
+ struct bio_vec *bip_vec;
+ struct bio_vec bip_inline_vecs[0];
+} __attribute__((packed));
+
+enum memcg_stat_item {
+ MEMCG_SWAP = 40,
+ MEMCG_SOCK = 41,
+ MEMCG_PERCPU_B = 42,
+ MEMCG_NR_STAT = 43,
+};
+
+enum memcg_memory_event {
+ MEMCG_LOW = 0,
+ MEMCG_HIGH = 1,
+ MEMCG_MAX = 2,
+ MEMCG_OOM = 3,
+ MEMCG_OOM_KILL = 4,
+ MEMCG_SWAP_HIGH = 5,
+ MEMCG_SWAP_MAX = 6,
+ MEMCG_SWAP_FAIL = 7,
+ MEMCG_NR_MEMORY_EVENTS = 8,
+};
+
+enum mem_cgroup_events_target {
+ MEM_CGROUP_TARGET_THRESH = 0,
+ MEM_CGROUP_TARGET_SOFTLIMIT = 1,
+ MEM_CGROUP_NTARGETS = 2,
+};
+
+struct memcg_vmstats_percpu {
+ long int state[43];
+ long unsigned int events[99];
+ long int state_prev[43];
+ long unsigned int events_prev[99];
+ long unsigned int nr_page_events;
+ long unsigned int targets[2];
+};
+
+struct mem_cgroup_reclaim_iter {
+ struct mem_cgroup *position;
+ unsigned int generation;
+};
+
+struct shrinker_info {
+ struct callback_head rcu;
+ atomic_long_t *nr_deferred;
+ long unsigned int *map;
+};
+
+struct lruvec_stats_percpu {
+ long int state[40];
+ long int state_prev[40];
+};
+
+struct lruvec_stats {
+ long int state[40];
+ long int state_pending[40];
+};
+
+struct mem_cgroup_per_node {
+ struct lruvec lruvec;
+ struct lruvec_stats_percpu *lruvec_stats_percpu;
+ struct lruvec_stats lruvec_stats;
+ long unsigned int lru_zone_size[25];
+ struct mem_cgroup_reclaim_iter iter;
+ struct shrinker_info *shrinker_info;
+ struct rb_node tree_node;
+ long unsigned int usage_in_excess;
+ bool on_tree;
+ struct mem_cgroup *memcg;
+};
+
+struct eventfd_ctx;
+
+struct mem_cgroup_threshold {
+ struct eventfd_ctx *eventfd;
+ long unsigned int threshold;
+};
+
+struct mem_cgroup_threshold_ary {
+ int current_threshold;
+ unsigned int size;
+ struct mem_cgroup_threshold entries[0];
+};
+
+struct obj_cgroup {
+ struct percpu_ref refcnt;
+ struct mem_cgroup *memcg;
+ atomic_t nr_charged_bytes;
+ union {
+ struct list_head list;
+ struct callback_head rcu;
+ };
+};
+
+struct percpu_cluster {
+ struct swap_cluster_info index;
+ unsigned int next;
+};
+
+enum fs_value_type {
+ fs_value_is_undefined = 0,
+ fs_value_is_flag = 1,
+ fs_value_is_string = 2,
+ fs_value_is_blob = 3,
+ fs_value_is_filename = 4,
+ fs_value_is_file = 5,
+};
+
+struct fs_parameter {
+ const char *key;
+ enum fs_value_type type: 8;
+ union {
+ char *string;
+ void *blob;
+ struct filename *name;
+ struct file *file;
+ };
+ size_t size;
+ int dirfd;
+};
+
+struct fc_log {
+ refcount_t usage;
+ u8 head;
+ u8 tail;
+ u8 need_free;
+ struct module *owner;
+ char *buffer[8];
+};
+
+struct fs_context_operations {
+ void (*free)(struct fs_context *);
+ int (*dup)(struct fs_context *, struct fs_context *);
+ int (*parse_param)(struct fs_context *, struct fs_parameter *);
+ int (*parse_monolithic)(struct fs_context *, void *);
+ int (*get_tree)(struct fs_context *);
+ int (*reconfigure)(struct fs_context *);
+};
+
+struct fs_parse_result {
+ bool negated;
+ union {
+ bool boolean;
+ int int_32;
+ unsigned int uint_32;
+ u64 uint_64;
+ };
+};
+
+struct blk_integrity_iter;
+
+typedef blk_status_t integrity_processing_fn(struct blk_integrity_iter *);
+
+typedef void integrity_prepare_fn(struct request *);
+
+typedef void integrity_complete_fn(struct request *, unsigned int);
+
+struct blk_integrity_profile {
+ integrity_processing_fn *generate_fn;
+ integrity_processing_fn *verify_fn;
+ integrity_prepare_fn *prepare_fn;
+ integrity_complete_fn *complete_fn;
+ const char *name;
+};
+
+struct blk_zone;
+
+typedef int (*report_zones_cb)(struct blk_zone *, unsigned int, void *);
+
+enum blk_unique_id {
+ BLK_UID_T10 = 1,
+ BLK_UID_EUI64 = 2,
+ BLK_UID_NAA = 3,
+};
+
+struct hd_geometry;
+
+struct pr_ops;
+
+struct block_device_operations {
+ void (*submit_bio)(struct bio *);
+ int (*open)(struct block_device *, fmode_t);
+ void (*release)(struct gendisk *, fmode_t);
+ int (*rw_page)(struct block_device *, sector_t, struct page *, unsigned int);
+ int (*ioctl)(struct block_device *, fmode_t, unsigned int, long unsigned int);
+ int (*compat_ioctl)(struct block_device *, fmode_t, unsigned int, long unsigned int);
+ unsigned int (*check_events)(struct gendisk *, unsigned int);
+ void (*unlock_native_capacity)(struct gendisk *);
+ int (*getgeo)(struct block_device *, struct hd_geometry *);
+ int (*set_read_only)(struct block_device *, bool);
+ void (*swap_slot_free_notify)(struct block_device *, long unsigned int);
+ int (*report_zones)(struct gendisk *, sector_t, unsigned int, report_zones_cb, void *);
+ char * (*devnode)(struct gendisk *, umode_t *);
+ int (*get_unique_id)(struct gendisk *, u8 *, enum blk_unique_id);
+ struct module *owner;
+ const struct pr_ops *pr_ops;
+ int (*alternative_gpt_sector)(struct gendisk *, sector_t *);
+};
+
+struct blk_zone {
+ __u64 start;
+ __u64 len;
+ __u64 wp;
+ __u8 type;
+ __u8 cond;
+ __u8 non_seq;
+ __u8 reset;
+ __u8 resv[4];
+ __u64 capacity;
+ __u8 reserved[24];
+};
+
+struct blk_independent_access_range {
+ struct kobject kobj;
+ struct request_queue *queue;
+ sector_t sector;
+ sector_t nr_sectors;
+};
+
+struct blk_independent_access_ranges {
+ struct kobject kobj;
+ bool sysfs_registered;
+ unsigned int nr_ia_ranges;
+ struct blk_independent_access_range ia_range[0];
+};
+
+enum blk_eh_timer_return {
+ BLK_EH_DONE = 0,
+ BLK_EH_RESET_TIMER = 1,
+};
+
+struct blk_mq_queue_data;
+
+struct blk_mq_ops {
+ blk_status_t (*queue_rq)(struct blk_mq_hw_ctx *, const struct blk_mq_queue_data *);
+ void (*commit_rqs)(struct blk_mq_hw_ctx *);
+ int (*get_budget)(struct request_queue *);
+ void (*put_budget)(struct request_queue *, int);
+ void (*set_rq_budget_token)(struct request *, int);
+ int (*get_rq_budget_token)(struct request *);
+ enum blk_eh_timer_return (*timeout)(struct request *, bool);
+ int (*poll)(struct blk_mq_hw_ctx *, struct io_comp_batch *);
+ void (*complete)(struct request *);
+ int (*init_hctx)(struct blk_mq_hw_ctx *, void *, unsigned int);
+ void (*exit_hctx)(struct blk_mq_hw_ctx *, unsigned int);
+ int (*init_request)(struct blk_mq_tag_set *, struct request *, unsigned int, unsigned int);
+ void (*exit_request)(struct blk_mq_tag_set *, struct request *, unsigned int);
+ void (*cleanup_rq)(struct request *);
+ bool (*busy)(struct request_queue *);
+ int (*map_queues)(struct blk_mq_tag_set *);
+ void (*show_rq)(struct seq_file *, struct request *);
+};
+
+enum pr_type {
+ PR_WRITE_EXCLUSIVE = 1,
+ PR_EXCLUSIVE_ACCESS = 2,
+ PR_WRITE_EXCLUSIVE_REG_ONLY = 3,
+ PR_EXCLUSIVE_ACCESS_REG_ONLY = 4,
+ PR_WRITE_EXCLUSIVE_ALL_REGS = 5,
+ PR_EXCLUSIVE_ACCESS_ALL_REGS = 6,
+};
+
+struct pr_ops {
+ int (*pr_register)(struct block_device *, u64, u64, u32);
+ int (*pr_reserve)(struct block_device *, u64, enum pr_type, u32);
+ int (*pr_release)(struct block_device *, u64, enum pr_type);
+ int (*pr_preempt)(struct block_device *, u64, u64, enum pr_type, bool);
+ int (*pr_clear)(struct block_device *, u64);
+};
+
+struct trace_event_raw_initcall_level {
+ struct trace_entry ent;
+ u32 __data_loc_level;
+ char __data[0];
+};
+
+struct trace_event_raw_initcall_start {
+ struct trace_entry ent;
+ initcall_t func;
+ char __data[0];
+};
+
+struct trace_event_raw_initcall_finish {
+ struct trace_entry ent;
+ initcall_t func;
+ int ret;
+ char __data[0];
+};
+
+struct trace_event_data_offsets_initcall_level {
+ u32 level;
+};
+
+struct trace_event_data_offsets_initcall_start {};
+
+struct trace_event_data_offsets_initcall_finish {};
+
+typedef void (*btf_trace_initcall_level)(void *, const char *);
+
+typedef void (*btf_trace_initcall_start)(void *, initcall_t);
+
+typedef void (*btf_trace_initcall_finish)(void *, initcall_t, int);
+
+struct blacklist_entry {
+ struct list_head next;
+ char *buf;
+};
+
+typedef __u32 Elf32_Word;
+
+struct elf32_note {
+ Elf32_Word n_namesz;
+ Elf32_Word n_descsz;
+ Elf32_Word n_type;
+};
+
+enum pcpu_fc {
+ PCPU_FC_AUTO = 0,
+ PCPU_FC_EMBED = 1,
+ PCPU_FC_PAGE = 2,
+ PCPU_FC_NR = 3,
+};
+
+enum vec_type {
+ ARM64_VEC_SVE = 0,
+ ARM64_VEC_MAX = 1,
+};
+
+enum {
+ UNAME26 = 131072,
+ ADDR_NO_RANDOMIZE = 262144,
+ FDPIC_FUNCPTRS = 524288,
+ MMAP_PAGE_ZERO = 1048576,
+ ADDR_COMPAT_LAYOUT = 2097152,
+ READ_IMPLIES_EXEC = 4194304,
+ ADDR_LIMIT_32BIT = 8388608,
+ SHORT_INODE = 16777216,
+ WHOLE_SECONDS = 33554432,
+ STICKY_TIMEOUTS = 67108864,
+ ADDR_LIMIT_3GB = 134217728,
+};
+
+enum hrtimer_base_type {
+ HRTIMER_BASE_MONOTONIC = 0,
+ HRTIMER_BASE_REALTIME = 1,
+ HRTIMER_BASE_BOOTTIME = 2,
+ HRTIMER_BASE_TAI = 3,
+ HRTIMER_BASE_MONOTONIC_SOFT = 4,
+ HRTIMER_BASE_REALTIME_SOFT = 5,
+ HRTIMER_BASE_BOOTTIME_SOFT = 6,
+ HRTIMER_BASE_TAI_SOFT = 7,
+ HRTIMER_MAX_CLOCK_BASES = 8,
+};
+
+enum {
+ MM_FILEPAGES = 0,
+ MM_ANONPAGES = 1,
+ MM_SWAPENTS = 2,
+ MM_SHMEMPAGES = 3,
+ NR_MM_COUNTERS = 4,
+};
+
+enum rseq_cs_flags_bit {
+ RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT = 0,
+ RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT = 1,
+ RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT = 2,
+};
+
+enum uclamp_id {
+ UCLAMP_MIN = 0,
+ UCLAMP_MAX = 1,
+ UCLAMP_CNT = 2,
+};
+
+enum perf_event_task_context {
+ perf_invalid_context = 4294967295,
+ perf_hw_context = 0,
+ perf_sw_context = 1,
+ perf_nr_task_contexts = 2,
+};
+
+enum rseq_event_mask_bits {
+ RSEQ_EVENT_PREEMPT_BIT = 0,
+ RSEQ_EVENT_SIGNAL_BIT = 1,
+ RSEQ_EVENT_MIGRATE_BIT = 2,
+};
+
+enum {
+ PROC_ROOT_INO = 1,
+ PROC_IPC_INIT_INO = 4026531839,
+ PROC_UTS_INIT_INO = 4026531838,
+ PROC_USER_INIT_INO = 4026531837,
+ PROC_PID_INIT_INO = 4026531836,
+ PROC_CGROUP_INIT_INO = 4026531835,
+ PROC_TIME_INIT_INO = 4026531834,
+};
+
+typedef __u16 __le16;
+
+typedef __u16 __be16;
+
+typedef __u32 __be32;
+
+typedef __u64 __be64;
+
+typedef __u32 __wsum;
+
+typedef unsigned int slab_flags_t;
+
+struct rhash_head {
+ struct rhash_head *next;
+};
+
+struct rhashtable;
+
+struct rhashtable_compare_arg {
+ struct rhashtable *ht;
+ const void *key;
+};
+
+typedef u32 (*rht_hashfn_t)(const void *, u32, u32);
+
+typedef u32 (*rht_obj_hashfn_t)(const void *, u32, u32);
+
+typedef int (*rht_obj_cmpfn_t)(struct rhashtable_compare_arg *, const void *);
+
+struct rhashtable_params {
+ u16 nelem_hint;
+ u16 key_len;
+ u16 key_offset;
+ u16 head_offset;
+ unsigned int max_size;
+ u16 min_size;
+ bool automatic_shrinking;
+ rht_hashfn_t hashfn;
+ rht_obj_hashfn_t obj_hashfn;
+ rht_obj_cmpfn_t obj_cmpfn;
+};
+
+struct bucket_table;
+
+struct rhashtable {
+ struct bucket_table *tbl;
+ unsigned int key_len;
+ unsigned int max_elems;
+ struct rhashtable_params p;
+ bool rhlist;
+ struct work_struct run_work;
+ struct mutex mutex;
+ spinlock_t lock;
+ atomic_t nelems;
+};
+
+struct fs_struct {
+ int users;
+ spinlock_t lock;
+ seqcount_spinlock_t seq;
+ int umask;
+ int in_exec;
+ struct path root;
+ struct path pwd;
+};
+
+struct pipe_buffer;
+
+struct watch_queue;
+
+struct pipe_inode_info {
+ struct mutex mutex;
+ wait_queue_head_t rd_wait;
+ wait_queue_head_t wr_wait;
+ unsigned int head;
+ unsigned int tail;
+ unsigned int max_usage;
+ unsigned int ring_size;
+ bool note_loss;
+ unsigned int nr_accounted;
+ unsigned int readers;
+ unsigned int writers;
+ unsigned int files;
+ unsigned int r_counter;
+ unsigned int w_counter;
+ unsigned int poll_usage;
+ struct page *tmp_page;
+ struct fasync_struct *fasync_readers;
+ struct fasync_struct *fasync_writers;
+ struct pipe_buffer *bufs;
+ struct user_struct *user;
+ struct watch_queue *watch_queue;
+};
+
+struct page_pool_params {
+ unsigned int flags;
+ unsigned int order;
+ unsigned int pool_size;
+ int nid;
+ struct device *dev;
+ enum dma_data_direction dma_dir;
+ unsigned int max_len;
+ unsigned int offset;
+};
+
+struct pp_alloc_cache {
+ u32 count;
+ struct page *cache[128];
+};
+
+struct ptr_ring {
+ int producer;
+ spinlock_t producer_lock;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ int consumer_head;
+ int consumer_tail;
+ spinlock_t consumer_lock;
+ long: 32;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ int size;
+ int batch;
+ void **queue;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+};
+
+struct page_pool {
+ struct page_pool_params p;
+ struct delayed_work release_dw;
+ void (*disconnect)(void *);
+ long unsigned int defer_start;
+ long unsigned int defer_warn;
+ u32 pages_state_hold_cnt;
+ unsigned int frag_offset;
+ struct page *frag_page;
+ long int frag_users;
+ long: 64;
+ long: 64;
+ struct pp_alloc_cache alloc;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ struct ptr_ring ring;
+ atomic_t pages_state_release_cnt;
+ refcount_t user_cnt;
+ u64 destroy_cnt;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+ long: 64;
+};
+
+struct notifier_block;
+
+typedef int (*notifier_fn_t)(struct notifier_block *, long unsigned int, void *);
+
+struct notifier_block {
+ notifier_fn_t notifier_call;
+ struct notifier_block *next;
+ int priority;
+};
+
+struct blocking_notifier_head {
+ struct rw_semaphore rwsem;
+ struct notifier_block *head;
+};
+
+struct raw_notifier_head {
+ struct notifier_block *head;
+};
+
+struct ld_semaphore {
+ atomic_long_t count;
+ raw_spinlock_t wait_lock;
+ unsigned int wait_readers;
+ struct list_head read_wait;
+ struct list_head write_wait;
+};
+
+typedef unsigned int tcflag_t;
+
+typedef unsigned char cc_t;
+
+typedef unsigned int speed_t;
+
+struct ktermios {
+ tcflag_t c_iflag;
+ tcflag_t c_oflag;
+ tcflag_t c_cflag;
+ tcflag_t c_lflag;
+ cc_t c_line;
+ cc_t c_cc[19];
+ speed_t c_ispeed;
+ speed_t c_ospeed;
+};
+
+struct winsize {
+ short unsigned int ws_row;
+ short unsigned int ws_col;
+ short unsigned int ws_xpixel;
+ short unsigned int ws_ypixel;
+};
+
+struct tty_driver;
+
+struct tty_operations;
+
+struct tty_ldisc;
+
+struct tty_port;
+
+struct tty_struct {
+ int magic;
+ struct kref kref;
+ struct device *dev;
+ struct tty_driver *driver;
+ const struct tty_operations *ops;
+ int index;
+ struct ld_semaphore ldisc_sem;
+ struct tty_ldisc *ldisc;
+ struct mutex atomic_write_lock;
+ struct mutex legacy_mutex;
+ struct mutex throttle_mutex;
+ struct rw_semaphore termios_rwsem;
+ struct mutex winsize_mutex;
+ struct ktermios termios;
+ struct ktermios termios_locked;
+ char name[64];
+ long unsigned int flags;
+ int count;
+ struct winsize winsize;
+ struct {
+ spinlock_t lock;
+ bool stopped;
+ bool tco_stopped;
+ long unsigned int unused[0];
+ } flow;
+ struct {
+ spinlock_t lock;
+ struct pid *pgrp;
+ struct pid *session;
+ unsigned char pktstatus;
+ bool packet;
+ long unsigned int unused[0];
+ } ctrl;
+ int hw_stopped;
+ unsigned int receive_room;
+ int flow_change;
+ struct tty_struct *link;
+ struct fasync_struct *fasync;
+ wait_queue_head_t write_wait;
+ wait_queue_head_t read_wait;
+ struct work_struct hangup_work;
+ void *disc_data;
+ void *driver_data;
+ spinlock_t files_lock;
+ struct list_head tty_files;
+ int closing;
+ unsigned char *write_buf;
+ int write_cnt;
+ struct work_struct SAK_work;
+ struct tty_port *port;
+};
+
+typedef struct {
+ size_t written;
+ size_t count;
+ union {
+ char *buf;
+ void *data;
+ } arg;
+ int error;
+} read_descriptor_t;
+
+struct posix_acl_entry {
+ short int e_tag;
+ short unsigned int e_perm;
+ union {
+ kuid_t e_uid;
+ kgid_t e_gid;
+ };
+};
+
+struct posix_acl {
+ refcount_t a_refcount;
+ struct callback_head a_rcu;
+ unsigned int a_count;
+ struct posix_acl_entry a_entries[0];
+};
+
+typedef __u64 __addrpair;
+
+typedef __u32 __portpair;
+
+typedef struct {
+ struct net *net;
+} possible_net_t;
+
+struct in6_addr {
+ union {
+ __u8 u6_addr8[16];
+ __be16 u6_addr16[8];
... 281357 lines suppressed ...