[DTrace-devel] DTrace-ized 5.6.2 pushed to github
Nick Alcock
nick.alcock at oracle.com
Tue May 19 03:25:49 PDT 2020
It works with all released v5.6 to date. (Sorry, I should have released
it long ago but I simply forgot to push).
Tests passed on x86-64 and AArch64 with dtrace-utils master:
see <https://github.com/oracle/dtrace-utils>. Unfortunately the need for
new translators means that no released DTrace can handle this kernel
yet (though you can copy /usr/lib64/dtrace/5.6.* to a DTrace 1.2.1
installation and it shuold work).
Pushed to <https://github.com/oracle/dtrace-linux-kernel>.
This push is of DTrace v1, with a specialized kernel module.
Changes over 5.5.2 other than fusion of old fixups were largely the
reintroduction of the Makefile.modbuiltin mechanism: it was removed
upstream to save about 1s build time and replaced with a mechanism that
works on a module-by-module basis and does not let us associate object
files with modules any more. It's simple enough so I just put it back.
:)
1: 8f12d495f11e ! 1: ffdf376271c9 ctf: generate CTF information for the kernel
@@ Commit message
glib, and the new libdtrace-ctf package (shared with DTrace userspace).
No new runtime dependencies are introduced.
+ v5.6: retain the tristate machinery and scripts/Makefile.modbuiltin,
+ since there appears to be no other way to get modules_thick.builtin
+ (or anything like it) generated.
+
Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Signed-off-by: Tomas Jedlicka <tomas.jedlicka at oracle.com>
@@ Documentation/dwarf2ctf (new)
+module_to_ctf_file hash, writing out every CTF file into a new suitably-named
+file via zlib's compressed file I/O functions.
+ ## Documentation/kbuild/kconfig.rst ##
+@@ Documentation/kbuild/kconfig.rst: KCONFIG_AUTOCONFIG
+ This environment variable can be set to specify the path & name of the
+ "auto.conf" file. Its default value is "include/config/auto.conf".
+
++KCONFIG_TRISTATE
++----------------
++This environment variable can be set to specify the path & name of the
++"tristate.conf" file. Its default value is "include/config/tristate.conf".
++
+ KCONFIG_AUTOHEADER
+ ------------------
+ This environment variable can be set to specify the path & name of the
+
## Documentation/process/changes.rst ##
@@ Documentation/process/changes.rst: iptables 1.4.2 iptables -V
openssl & libcrypto 1.0.0 openssl version
@@ Documentation/process/changes.rst: OpenSSL
## Makefile ##
+@@ Makefile: $(KCONFIG_CONFIG):
+ #
+ # This exploits the 'multi-target pattern rule' trick.
+ # The syncconfig should be executed only once to make all the targets.
+-%/auto.conf %/auto.conf.cmd: $(KCONFIG_CONFIG)
++%/auto.conf %/auto.conf.cmd %/tristate.conf: $(KCONFIG_CONFIG)
+ $(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
+ else # !may-sync-config
+ # External modules and some install targets need include/generated/autoconf.h
@@ Makefile: cmd_link-vmlinux = \
$(CONFIG_SHELL) $< $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_vmlinux) ; \
$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
@@ Makefile: cmd_link-vmlinux = \
+$(call if_changed,link-vmlinux)
targets := vmlinux
-@@ Makefile: modules: $(if $(KBUILD_BUILTIN),vmlinux) modules.order modules.builtin
+@@ Makefile: modules: $(if $(KBUILD_BUILTIN),vmlinux) modules.order
modules.order: descend
$(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(build-dirs)) > $@
--modbuiltin-dirs := $(addprefix _modbuiltin_, $(build-dirs))
+ifneq (CONFIG_CTF@,'@')
-
--modules.builtin: $(modbuiltin-dirs)
-- $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(build-dirs)) > $@
++
+# We need to force everything to be built, since we need the .o files below.
+KBUILD_BUILTIN := 1
-
--PHONY += $(modbuiltin-dirs)
--# tristate.conf is not included from this Makefile. Add it as a prerequisite
--# here to make it self-healing in case somebody accidentally removes it.
--$(modbuiltin-dirs): include/config/tristate.conf
-- $(Q)$(MAKE) $(modbuiltin)=$(patsubst _modbuiltin_%,%,$@)
++
+# This contains all the object files that are built directly into the
+# kernel (including built-in modules), for consumption by dwarf2ctf in
+# Makefile.modpost.
@@ Makefile: modules: $(if $(KBUILD_BUILTIN),vmlinux) modules.order modules.builtin
+PHONY += objects.builtin
+objects.builtin:
+endif
-
++
# Target to prepare building external modules
PHONY += modules_prepare
+ modules_prepare: prepare
@@ Makefile: _modinst_:
@sed 's:^:kernel/:' modules.order > $(MODLIB)/modules.order
- @sed 's:^:kernel/:' modules.builtin > $(MODLIB)/modules.builtin
+ @cp -f modules.builtin $(MODLIB)/
@cp -f $(objtree)/modules.builtin.modinfo $(MODLIB)/
+ @if [ -f $(objtree)/vmlinux.ctfa ] ; then \
+ cp -f $(objtree)/vmlinux.ctfa $(MODLIB)/kernel ; \
@@ Makefile: modules modules_install:
endif # CONFIG_MODULES
-+# modules.builtin has a 'thick' form which maps from kernel modules (or rather
-+# the object file names they would have had had they not been built in) to their
-+# constituent object files: dwarf2ctf uses this to determine which modules any
-+# given object file is part of. (We cannot eliminate the slight redundancy here
-+# without double-expansion.)
++# modules_thick.builtin maps from kernel modules (or rather the object file
++# names they would have had had they not been built in) to their constituent
++# object files: dwarf2ctf uses this to determine which modules any given object
++# file is part of. (We cannot eliminate the slight redundancy here without
++# double-expansion.)
+
-+modbuiltin-dirs := $(addprefix _modbuiltin_, $(build-dirs))
+modthickbuiltin-dirs := $(addprefix _modthickbuiltin_, $(build-dirs))
+
-+modules.builtin: $(modbuiltin-dirs)
-+ $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(build-dirs)) > $@
-+
+modules_thick.builtin: $(modthickbuiltin-dirs)
+ $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(build-dirs)) > $@
+
-+PHONY += $(modbuiltin-dirs) $(modthickbuiltin-dirs)
++PHONY += $(modthickbuiltin-dirs)
+# tristate.conf is not included from this Makefile. Add it as a prerequisite
+# here to make it self-healing in case somebody accidentally removes it.
-+$(modbuiltin-dirs): include/config/tristate.conf
-+ $(Q)$(MAKE) $(modbuiltin)=$(patsubst _modbuiltin_%,%,$@) builtin-file=modules.builtin
+$(modthickbuiltin-dirs): include/config/tristate.conf
+ $(Q)$(MAKE) $(modbuiltin)=$(patsubst _modthickbuiltin_%,%,$@) builtin-file=modules_thick.builtin
+
@@ Makefile: endif # CONFIG_MODULES
# Directories & files removed with 'make clean'
-CLEAN_DIRS += include/ksym
--CLEAN_FILES += modules.builtin.modinfo modules.nsdeps
+-CLEAN_FILES += modules.builtin modules.builtin.modinfo modules.nsdeps
+CLEAN_DIRS += include/ksym .ctf
-+CLEAN_FILES += modules.builtin.modinfo modules.nsdeps .ctf.filelist .ctf.filelist.raw
++CLEAN_FILES += modules.builtin modules.builtin.modinfo objects.builtin modules.nsdeps .ctf.filelist .ctf.filelist.raw
# Directories & files removed with 'make mrproper'
MRPROPER_DIRS += include/config include/generated \
@@ Makefile: help:
@echo ' cscope - Generate cscope index'
@echo ' gtags - Generate GNU GLOBAL index'
@@ Makefile: clean: $(clean-dirs)
- -o -name '*.lex.c' -o -name '*.tab.[ch]' \
- -o -name '*.asn1.[ch]' \
-o -name '*.symtypes' -o -name 'modules.order' \
-- -o -name modules.builtin -o -name '.tmp_*.o.*' \
-+ -o -name modules.builtin -o -name modules_thick.builtin \
-+ -o -name 'objects.builtin' \
-+ -o -name '.tmp_*.o.*' \
+ -o -name '.tmp_*.o.*' \
-o -name '*.c.[012]*.*' \
- -o -name '*.ll' \
+ -o -name '*.ll' -o -name '*.ctfa' \
@@ lib/Kconfig: config DIMLIB
config OID_REGISTRY
tristate
+ ## scripts/Kbuild.include ##
+@@ scripts/Kbuild.include: ld-ifversion = $(shell [ $(ld-version) $(1) $(2) ] && echo $(3) || echo $(4))
+ # $(Q)$(MAKE) $(build)=dir
+ build := -f $(srctree)/scripts/Makefile.build obj
+
++###
++# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj=
++# Usage:
++# $(Q)$(MAKE) $(modbuiltin)=dir
++modbuiltin := -f $(srctree)/scripts/Makefile.modbuiltin obj
++
+ ###
+ # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.dtbinst obj=
+ # Usage:
+
## scripts/Makefile ##
-@@ scripts/Makefile: hostprogs-y += unifdef
+@@ scripts/Makefile: hostprogs += unifdef
subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
subdir-$(CONFIG_MODVERSIONS) += genksyms
@@ scripts/Makefile: hostprogs-y += unifdef
# Let clean descend into subdirs
- ## scripts/Makefile.modbuiltin ##
+ ## scripts/Makefile.modbuiltin (new) ##
@@
- # SPDX-License-Identifier: GPL-2.0
- # ==========================================================================
--# Generating modules.builtin
-+# Generating modules.builtin and modules_thick.builtin
- # ==========================================================================
-
- src := $(obj)
-@@ scripts/Makefile.modbuiltin: __subdir-Y := $(patsubst %/,%,$(filter %/, $(obj-Y)))
- subdir-Y += $(__subdir-Y)
- subdir-ym := $(sort $(subdir-y) $(subdir-Y) $(subdir-m))
- subdir-ym := $(addprefix $(obj)/,$(subdir-ym))
--obj-Y := $(addprefix $(obj)/,$(obj-Y))
++# SPDX-License-Identifier: GPL-2.0
++# ==========================================================================
++# Generating modules_thick.builtin
++# ==========================================================================
++
++src := $(obj)
++
++PHONY := __modbuiltin
++__modbuiltin:
++
++include include/config/auto.conf
++# tristate.conf sets tristate variables to uppercase 'Y' or 'M'
++# That way, we get the list of built-in modules in obj-Y
++include include/config/tristate.conf
++
++include scripts/Kbuild.include
++
++ifdef building_out_of_srctree
++# Create output directory if not already present
++_dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
++endif
++
++# The filename Kbuild has precedence over Makefile
++kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
++kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile)
++include $(kbuild-file)
++
++include scripts/Makefile.lib
++__subdir-Y := $(patsubst %/,%,$(filter %/, $(obj-Y)))
++subdir-Y += $(__subdir-Y)
++subdir-ym := $(sort $(subdir-y) $(subdir-Y) $(subdir-m))
++subdir-ym := $(addprefix $(obj)/,$(subdir-ym))
+pathobj-Y := $(addprefix $(obj)/,$(obj-Y))
-
- modbuiltin-subdirs := $(patsubst %,%/modules.builtin, $(subdir-ym))
--modbuiltin-mods := $(filter %.ko, $(obj-Y:.o=.ko))
-+modbuiltin-mods := $(filter %.ko, $(pathobj-Y:.o=.ko))
- modbuiltin-target := $(obj)/modules.builtin
++
+modthickbuiltin-subdirs := $(patsubst %,%/modules_thick.builtin, $(subdir-ym))
+modthickbuiltin-target := $(obj)/modules_thick.builtin
-
--__modbuiltin: $(modbuiltin-target) $(subdir-ym)
++
+__modbuiltin: $(obj)/$(builtin-file) $(subdir-ym)
- @:
-
- $(modbuiltin-target): $(subdir-ym) FORCE
- $(Q)(for m in $(modbuiltin-mods); do echo $$m; done; \
- cat /dev/null $(modbuiltin-subdirs)) > $@
-
++ @:
++
+$(modthickbuiltin-target): $(subdir-ym) FORCE
+ $(Q) $(foreach mod-o, $(filter %.o,$(obj-Y)),\
+ printf "%s:" $(addprefix $(obj)/,$(mod-o)) >> $@; \
@@ scripts/Makefile.modbuiltin: __subdir-Y := $(patsubst %/,%,$(filter %/, $(ob
+ printf "\n" >> $@; ) \
+ cat /dev/null $(modthickbuiltin-subdirs) >> $@;
+
- PHONY += FORCE
-
- FORCE:
-@@ scripts/Makefile.modbuiltin: FORCE:
-
- PHONY += $(subdir-ym)
- $(subdir-ym):
-- $(Q)$(MAKE) $(modbuiltin)=$@
++PHONY += FORCE
++
++FORCE:
++
++# Descending
++# ---------------------------------------------------------------------------
++
++PHONY += $(subdir-ym)
++$(subdir-ym):
+ $(Q)$(MAKE) $(modbuiltin)=$@ builtin-file=$(builtin-file)
-
- .PHONY: $(PHONY)
++
++.PHONY: $(PHONY)
## scripts/Makefile.modfinal ##
@@
@@ scripts/eu_simple.h (new)
+
+#endif
+ ## scripts/kconfig/confdata.c ##
+@@ scripts/kconfig/confdata.c: static struct conf_printer header_printer_cb =
+ .print_comment = header_print_comment,
+ };
+
++/*
++ * Tristate printer
++ *
++ * This printer is used when generating the `include/config/tristate.conf' file.
++ */
++static void
++tristate_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
++{
++
++ if (sym->type == S_TRISTATE && *value != 'n')
++ fprintf(fp, "%s%s=%c\n", CONFIG_, sym->name, (char)toupper(*value));
++}
++
++static struct conf_printer tristate_printer_cb =
++{
++ .print_symbol = tristate_print_symbol,
++ .print_comment = kconfig_print_comment,
++};
++
+ static void conf_write_symbol(FILE *fp, struct symbol *sym,
+ struct conf_printer *printer, void *printer_arg)
+ {
+@@ scripts/kconfig/confdata.c: int conf_write_autoconf(int overwrite)
+ struct symbol *sym;
+ const char *name;
+ const char *autoconf_name = conf_get_autoconfig_name();
+- FILE *out, *out_h;
++ FILE *out, *tristate, *out_h;
+ int i;
+
+ if (!overwrite && is_present(autoconf_name))
+@@ scripts/kconfig/confdata.c: int conf_write_autoconf(int overwrite)
+ if (!out)
+ return 1;
+
++ tristate = fopen(".tmpconfig_tristate", "w");
++ if (!tristate) {
++ fclose(out);
++ fclose(tristate);
++ return 1;
++ }
++
+ out_h = fopen(".tmpconfig.h", "w");
+ if (!out_h) {
+ fclose(out);
+@@ scripts/kconfig/confdata.c: int conf_write_autoconf(int overwrite)
+ }
+
+ conf_write_heading(out, &kconfig_printer_cb, NULL);
++ conf_write_heading(tristate, &tristate_printer_cb, NULL);
+ conf_write_heading(out_h, &header_printer_cb, NULL);
+
+ for_all_symbols(i, sym) {
+@@ scripts/kconfig/confdata.c: int conf_write_autoconf(int overwrite)
+ if (!(sym->flags & SYMBOL_WRITE) || !sym->name)
+ continue;
+
+- /* write symbols to auto.conf and autoconf.h */
++ /* write symbols to auto.conf, tristate and header files */
+ conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1);
++ conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1);
+ conf_write_symbol(out_h, sym, &header_printer_cb, NULL);
+ }
+ fclose(out);
++ fclose(tristate);
+ fclose(out_h);
+
+ name = getenv("KCONFIG_AUTOHEADER");
+@@ scripts/kconfig/confdata.c: int conf_write_autoconf(int overwrite)
+ if (rename(".tmpconfig.h", name))
+ return 1;
+
++ name = getenv("KCONFIG_TRISTATE");
++ if (!name)
++ name = "include/config/tristate.conf";
++ if (make_parent_dir(name))
++ return 1;
++ if (rename(".tmpconfig_tristate", name))
++ return 1;
++
+ if (make_parent_dir(autoconf_name))
+ return 1;
+ /*
+
## scripts/move-if-change (new) ##
@@
+#!/bin/sh
2: 7204f1071c1d ! 2: efcf8b61d220 kallsyms: introduce new /proc/kallmodsyms including builtin modules too
@@ Commit message
Signed-off-by: Vincent Lim <vincent.lim at oracle.com>
## Makefile ##
-@@ Makefile: modules: $(if $(KBUILD_BUILTIN),vmlinux) modules.order modules.builtin
+@@ Makefile: modules: $(if $(KBUILD_BUILTIN),vmlinux) modules.order
modules.order: descend
$(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(build-dirs)) > $@
@@ kernel/kallsyms.c
/*
@@ kernel/kallsyms.c: __attribute__((weak, section(".rodata")));
- extern const u8 kallsyms_token_table[] __weak;
+ extern const char kallsyms_token_table[] __weak;
extern const u16 kallsyms_token_index[] __weak;
+extern const char kallsyms_modules[] __weak;
+extern const u32 kallsyms_symbol_modules[] __weak;
@@ kernel/kallsyms.c: static int get_ksymbol_bpf(struct kallsym_iter *iter)
{
unsigned off = iter->nameoff;
+ u32 mod_index = 0;
-
-- iter->module_name[0] = '\0';
++
+ if (kallsyms_symbol_modules)
+ mod_index = kallsyms_symbol_modules[iter->pos];
-+
+
+- iter->module_name[0] = '\0';
+ if (mod_index == 0 || kallsyms_modules == NULL) {
+ iter->module_name[0] = '\0';
+ iter->builtin_module = 0;
@@ kernel/kallsyms.c: const char *kdb_walk_kallsyms(loff_t *pos)
return NULL;
++*pos;
/* Some debugging symbols have no name. Ignore them. */
-@@ kernel/kallsyms.c: static const struct file_operations kallsyms_operations = {
- .release = seq_release_private,
+@@ kernel/kallsyms.c: static const struct proc_ops kallsyms_proc_ops = {
+ .proc_release = seq_release_private,
};
-+static const struct file_operations kallmodsyms_operations = {
-+ .open = kallmodsyms_open,
-+ .read = seq_read,
-+ .llseek = seq_lseek,
-+ .release = seq_release_private,
++static const struct proc_ops kallmodsyms_proc_ops = {
++ .proc_open = kallmodsyms_open,
++ .proc_read = seq_read,
++ .proc_lseek = seq_lseek,
++ .proc_release = seq_release_private,
+};
+
static int __init kallsyms_init(void)
{
- proc_create("kallsyms", 0444, NULL, &kallsyms_operations);
-+#ifdef CONFIG_KALLMODSYMS
-+ proc_create("kallmodsyms", 0444, NULL, &kallmodsyms_operations);
-+#endif
+ proc_create("kallsyms", 0444, NULL, &kallsyms_proc_ops);
++ proc_create("kallmodsyms", 0444, NULL, &kallmodsyms_proc_ops);
return 0;
}
device_initcall(kallsyms_init);
@@ kernel/module.c: int module_get_kallsym(unsigned int symnum, unsigned long *valu
}
## scripts/Makefile ##
-@@ scripts/Makefile: HOSTLDLIBS_extract-cert = -lcrypto
-
- always := $(hostprogs-y) $(hostprogs-m)
+@@ scripts/Makefile: always-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
+ always-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
+ always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
+kallsyms-objs := kallsyms.o
+
@@ scripts/Makefile: HOSTLDLIBS_extract-cert = -lcrypto
+HOSTCFLAGS_kallsyms.o := $(shell pkg-config --cflags glib-2.0) -I$(srctree)/scripts
+HOSTLDLIBS_kallsyms := $(shell pkg-config --libs glib-2.0) -ldw
+endif
- # The following hostprogs-y programs are only build on demand
- hostprogs-y += unifdef
-
++
+ HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include
+ HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
+ HOSTLDLIBS_sign-file = -lcrypto
## scripts/kallsyms.c ##
@@
@@ scripts/kallsyms.c
+ unsigned long long size;
unsigned int len;
unsigned int start_pos;
- unsigned char *sym;
unsigned int percpu_absolute;
+#ifdef CONFIG_KALLMODSYMS
+ unsigned int module;
+#endif
+ unsigned char sym[0];
};
- struct addr_range {
@@ scripts/kallsyms.c: static int token_profit[0x10000];
static unsigned char best_table[256][2];
static unsigned char best_table_len[256];
@@ scripts/kallsyms.c: static void check_symbol_range(const char *sym, unsigned lon
+}
+#endif
+
- static int read_symbol(FILE *in, struct sym_entry *s)
+ static struct sym_entry *read_symbol(FILE *in)
{
- char sym[500], stype;
+ char name[500], type;
+@@ scripts/kallsyms.c: static struct sym_entry *read_symbol(FILE *in)
+ unsigned int len;
+ struct sym_entry *sym;
int rc;
+-
+- rc = fscanf(in, "%llx %c %499s\n", &addr, &type, name);
+- if (rc != 3) {
+#ifdef CONFIG_KALLMODSYMS
++ unsigned long long size;
+ struct addrmap_entry *range;
++ unsigned int module;
+#endif
-
-- rc = fscanf(in, "%llx %c %499s\n", &s->addr, &stype, sym);
-- if (rc != 3) {
-+ rc = fscanf(in, "%llx %llx %c %499s\n",
-+ &s->addr, &s->size, &stype, sym);
++
++ rc = fscanf(in, "%llx %llx %c %499s\n", &addr, &size, &type, name);
+ if (rc != 4) {
- if (rc != EOF && fgets(sym, 500, in) == NULL)
+ if (rc != EOF && fgets(name, 500, in) == NULL)
fprintf(stderr, "Read error or end of file.\n");
- return -1;
-@@ scripts/kallsyms.c: static int read_symbol(FILE *in, struct sym_entry *s)
- check_symbol_range(sym, s->addr, text_ranges, ARRAY_SIZE(text_ranges));
- check_symbol_range(sym, s->addr, &percpu_range, 1);
+ return NULL;
+@@ scripts/kallsyms.c: static struct sym_entry *read_symbol(FILE *in)
+ check_symbol_range(name, addr, text_ranges, ARRAY_SIZE(text_ranges));
+ check_symbol_range(name, addr, &percpu_range, 1);
+#ifdef CONFIG_KALLMODSYMS
+ /* look up the builtin module this is part of (if any) */
-+ range = (struct addrmap_entry *) bsearch(&s->addr,
++ range = (struct addrmap_entry *) bsearch(&addr,
+ addrmap, addrmap_num, sizeof(*addrmap), &addrmap_compare);
+ if (range)
-+ s->module = builtin_module_offsets[range->module];
++ module = builtin_module_offsets[range->module];
+ else
-+ s->module = 0;
++ module = 0;
+#endif
+
/* include the type field in the symbol name, so that it gets
* compressed together */
- s->len = strlen(sym) + 1;
+
+@@ scripts/kallsyms.c: static struct sym_entry *read_symbol(FILE *in)
+ sym->sym[0] = type;
+ strcpy(sym_name(sym), name);
+ sym->percpu_absolute = 0;
++ sym->size = size;
++#ifdef CONFIG_KALLMODSYMS
++ sym->module = module;
++#endif
+
+ return sym;
+ }
@@ scripts/kallsyms.c: static void write_src(void)
printf("\n");
}
+ output_label("kallsyms_sizes");
+ for (i = 0; i < table_cnt; i++)
-+ printf("\tPTR\t%#llx\n", table[i].size);
++ printf("\tPTR\t%#llx\n", table[i]->size);
+ printf("\n");
+
output_label("kallsyms_num_syms");
@@ scripts/kallsyms.c: static void write_src(void)
+
+ output_label("kallsyms_symbol_modules");
+ for (i = 0; i < table_cnt; i++)
-+ printf("\t.int\t%d\n", table[i].module);
++ printf("\t.int\t%d\n", table[i]->module);
+ printf("\n");
+#endif
+}
3: 782e9a6892e3 ! 3: 02c9abdf791f waitfd: new syscall implementing waitpid() over fds
@@ Commit message
## arch/x86/entry/syscalls/syscall_32.tbl ##
@@
- 433 i386 fspick sys_fspick __ia32_sys_fspick
- 434 i386 pidfd_open sys_pidfd_open __ia32_sys_pidfd_open
435 i386 clone3 sys_clone3 __ia32_sys_clone3
+ 437 i386 openat2 sys_openat2 __ia32_sys_openat2
+ 438 i386 pidfd_getfd sys_pidfd_getfd __ia32_sys_pidfd_getfd
+# This one is a temporary number, designed for no clashes.
+# Nothing but DTrace should use it.
+473 i386 waitfd sys_waitfd __ia32_sys_waitfd
## arch/x86/entry/syscalls/syscall_64.tbl ##
@@
- 433 common fspick __x64_sys_fspick
- 434 common pidfd_open __x64_sys_pidfd_open
435 common clone3 __x64_sys_clone3/ptregs
+ 437 common openat2 __x64_sys_openat2
+ 438 common pidfd_getfd __x64_sys_pidfd_getfd
+# This one is a temporary number, designed for no clashes.
+# Nothing but DTrace should use it.
+473 common waitfd __x64_sys_waitfd
@@ include/linux/syscalls.h: long ksys_old_shmctl(int shmid, int cmd, struct shmid_
#endif
## include/uapi/asm-generic/unistd.h ##
-@@ include/uapi/asm-generic/unistd.h: __SYSCALL(__NR_clone3, sys_clone3)
+@@ include/uapi/asm-generic/unistd.h: __SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd)
#undef __NR_syscalls
- #define __NR_syscalls 436
+ #define __NR_syscalls 439
+#ifdef CONFIG_DTRACE
+#define __NR_waitfd 473
4: 6b5049188be1 ! 4: c42a3059b763 dtrace: core and x86
@@ arch/x86/kernel/dtrace_util.c (new)
+
+ return NOTIFY_OK | NOTIFY_STOP_MASK;
+ }
++ /* fallthrough */
+ default:
+ return NOTIFY_DONE;
+ }
@@ include/dtrace/provider.h (new)
+ prov->dtmp_priv, NULL, \
+ prov->dtmp_pops, prov, \
+ &prov->dtmp_id) != 0) \
-+ pr_warning("Failed to register provider %s", \
++ pr_warn("Failed to register provider %s", \
+ prov->dtmp_name); \
+ } \
+ \
@@ kernel/dtrace/cyclic.c (new)
+ return seq_open(file, &cyclicinfo_ops);
+}
+
-+static const struct file_operations proc_cyclicinfo_ops = {
-+ .open = cyclicinfo_open,
-+ .read = seq_read,
-+ .llseek = seq_lseek,
-+ .release = seq_release,
++static const struct proc_ops proc_cyclicinfo_ops = {
++ .proc_open = cyclicinfo_open,
++ .proc_read = seq_read,
++ .proc_lseek = seq_lseek,
++ .proc_release = seq_release,
+};
+
+static int __init cyclic_init(void)
5: ac164e68a25f ! 5: f5b6a986ea24 dtrace: modular components and x86 support
@@ arch/x86/dtrace/dtrace_asm_x86_64.S (new)
+#define CPU_DTRACE_BADADDR 0x0004 /* DTrace fault: bad address */
+
+#if defined(__x86_64__)
-+ ENTRY(dtrace_caller)
++ SYM_CODE_START(dtrace_caller)
+ movq $-1, %rax
+ ret
-+ ENDPROC(dtrace_caller)
++ SYM_CODE_END(dtrace_caller)
+
+#elif defined(__i386__)
+
-+ ENTRY(dtrace_caller)
++ SYM_CODE_START(dtrace_caller)
+ movl $-1, %eax
+ ret
-+ ENDPROC(dtrace_caller)
++ SYM_CODE_END(dtrace_caller)
+
+#endif /* __i386__ */
+
+#if defined(__x86_64__)
+
-+ ENTRY(dtrace_copy)
++ SYM_FUNC_START(dtrace_copy)
+ pushq %rbp
+ movq %rsp, %rbp
+
@@ arch/x86/dtrace/dtrace_asm_x86_64.S (new)
+ ASM_CLAC
+ leave
+ ret
-+ ENDPROC(dtrace_copy)
++ SYM_FUNC_END(dtrace_copy)
+
+#elif defined(__i386__)
+
-+ ENTRY(dtrace_copy)
++ SYM_FUNC_START(dtrace_copy)
+ pushl %ebp
+ movl %esp, %ebp
+ pushl %esi
@@ arch/x86/dtrace/dtrace_asm_x86_64.S (new)
+ movl %ebp, %esp
+ popl %ebp
+ ret
-+ ENDPROC(dtrace_copy)
++ SYM_FUNC_END(dtrace_copy)
+
+#endif /* __i386__ */
+
+#if defined(__x86_64__)
+
-+ ENTRY(dtrace_copystr)
++ SYM_FUNC_START(dtrace_copystr)
+ pushq %rbp
+ movq %rsp, %rbp
+
@@ arch/x86/dtrace/dtrace_asm_x86_64.S (new)
+ leave
+ ret
+
-+ ENDPROC(dtrace_copystr)
++ SYM_FUNC_END(dtrace_copystr)
+
+#elif defined(__i386__)
+
-+ ENTRY(dtrace_copystr)
++ SYM_FUNC_START(dtrace_copystr)
+
+ pushl %ebp # Setup stack frame
+ movl %esp, %ebp
@@ arch/x86/dtrace/dtrace_asm_x86_64.S (new)
+ popl %ebp
+ ret
+
-+ ENDPROC(dtrace_copystr)
++ SYM_FUNC_END(dtrace_copystr)
+
+#endif /* __i386__ */
+
+#if defined(__x86_64__)
+
-+ ENTRY(dtrace_fuword8_nocheck)
++ SYM_CODE_START(dtrace_fuword8_nocheck)
+ xorq %rax, %rax
+ ASM_STAC
+ movb (%rdi), %al
+ ASM_CLAC
+ ret
-+ ENDPROC(dtrace_fuword8_nocheck)
++ SYM_CODE_END(dtrace_fuword8_nocheck)
+
+#elif defined(__i386__)
+
-+ ENTRY(dtrace_fuword8_nocheck)
++ SYM_CODE_START(dtrace_fuword8_nocheck)
+ movl 4(%esp), %ecx
+ xorl %eax, %eax
+ movzbl (%ecx), %eax
+ ret
-+ ENDPROC(dtrace_fuword8_nocheck)
++ SYM_CODE_END(dtrace_fuword8_nocheck)
+
+#endif /* __i386__ */
+
+#if defined(__x86_64__)
+
-+ ENTRY(dtrace_fuword16_nocheck)
++ SYM_CODE_START(dtrace_fuword16_nocheck)
+ xorq %rax, %rax
+ ASM_STAC
+ movw (%rdi), %ax
+ ASM_CLAC
+ ret
-+ ENDPROC(dtrace_fuword16_nocheck)
++ SYM_CODE_END(dtrace_fuword16_nocheck)
+
+#elif defined(__i386__)
+
-+ ENTRY(dtrace_fuword16_nocheck)
++ SYM_CODE_START(dtrace_fuword16_nocheck)
+ movl 4(%esp), %ecx
+ xorl %eax, %eax
+ movzwl (%ecx), %eax
+ ret
-+ ENDPROC(dtrace_fuword16_nocheck)
++ SYM_CODE_END(dtrace_fuword16_nocheck)
+
+#endif /* __i386__ */
+
+#if defined(__x86_64__)
+
-+ ENTRY(dtrace_fuword32_nocheck)
++ SYM_CODE_START(dtrace_fuword32_nocheck)
+ xorq %rax, %rax
+ ASM_STAC
+ movl (%rdi), %eax
+ ASM_CLAC
+ ret
-+ ENDPROC(dtrace_fuword32_nocheck)
++ SYM_CODE_END(dtrace_fuword32_nocheck)
+
+#elif defined(__i386__)
+
-+ ENTRY(dtrace_fuword32_nocheck)
++ SYM_CODE_START(dtrace_fuword32_nocheck)
+ movl 4(%esp), %ecx
+ xorl %eax, %eax
+ movl (%ecx), %eax
+ ret
-+ ENDPROC(dtrace_fuword32_nocheck)
++ SYM_CODE_END(dtrace_fuword32_nocheck)
+
+#endif /* __i386__ */
+
+#if defined(__x86_64__)
+
-+ ENTRY(dtrace_fuword64_nocheck)
++ SYM_CODE_START(dtrace_fuword64_nocheck)
+ ASM_STAC
+ movq (%rdi), %rax
+ ASM_CLAC
+ ret
-+ ENDPROC(dtrace_fuword64_nocheck)
++ SYM_CODE_END(dtrace_fuword64_nocheck)
+
+#elif defined(__i386__)
+
-+ ENTRY(dtrace_fuword64_nocheck)
++ SYM_CODE_START(dtrace_fuword64_nocheck)
+ movl 4(%esp), %ecx
+ xorl %eax, %eax
+ xorl %edx, %edx
+ movl (%ecx), %eax
+ movl 4(%ecx), %edx
+ ret
-+ ENDPROC(dtrace_fuword64_nocheck)
++ SYM_CODE_END(dtrace_fuword64_nocheck)
+
+#endif /* __i386__ */
@@ dtrace/dtrace_ecb.c (new)
+ format = dtrace_format_add(
+ state, (char *)(uintptr_t)arg);
+ }
++ /* fallthru */
+
+ case DTRACEACT_TRACEMEM:
+ case DTRACEACT_LIBACT:
@@ dtrace/dtrace_ecb.c (new)
+ nframes = opt[DTRACEOPT_JSTACKFRAMES];
+
+ arg = DTRACE_USTACK_ARG(nframes, strsize);
++ /* fallthru */
+
+ case DTRACEACT_USTACK:
+ if (desc->dtad_kind != DTRACEACT_JSTACK &&
@@ dtrace/dtrace_match.c (new)
+ c = *p++;
+ if (c == '\0')
+ return 0;
-+
++ /* fallthru */
+ default:
+ if (c != s1)
+ return 0;
++ /* fallthru */
+
+ case '?':
+ if (s1 != '\0')
6: 3d8db94dbe02 = 6: 5e701db64f04 dtrace: systrace provider core components
7: e63686ec7bf4 = 7: d096497f1ca7 dtrace: systrace provider
8: ee01bd95b7db ! 8: 28880a941752 dtrace: sdt provider core components
@@ arch/x86/include/asm/spinlock.h
* Your basic SMP spinlocks, allowing only a single CPU anywhere
## arch/x86/include/asm/text-patching.h ##
-@@ arch/x86/include/asm/text-patching.h: struct text_poke_loc {
- const u8 text[POKE_MAX_OPCODE_SIZE];
- };
+@@ arch/x86/include/asm/text-patching.h: static inline void apply_paravirt(struct paravirt_patch_site *start,
+ */
+ #define POKE_MAX_OPCODE_SIZE 5
+extern void add_nops(void *insns, unsigned int len);
extern void text_poke_early(void *addr, const void *opcode, size_t len);
@@ arch/x86/kernel/dtrace_util.c: int dtrace_die_notifier(struct notifier_block *nb
+ orig_trapnr = dargs->trapnr;
+ dargs->trapnr = 6;
+ }
++ /* fallthrough */
+ case DIE_TRAP: {
+ struct dtrace_invop_hdlr *hdlr;
+ int rval = 0;
@@ arch/x86/kernel/dtrace_util.c: int dtrace_die_notifier(struct notifier_block *nb
+ dargs->regs->ip++;
+ }
}
+ /* fallthrough */
default:
- return NOTIFY_DONE;
+@@ arch/x86/kernel/dtrace_util.c: int dtrace_die_notifier(struct notifier_block *nb, unsigned long val,
}
}
@@ scripts/.gitignore: asn1_compiler
## scripts/Makefile ##
@@
+ # the kernel for the build process.
+ # ---------------------------------------------------------------------------
# kallsyms: Find all symbols in vmlinux
- # conmakehash: Create chartable
- # conmakehash: Create arrays for initializing the kernel console tables
+# kmodsdt: Post-process module .o files for SDT probes
HOST_EXTRACFLAGS += -I$(srctree)/tools/include
-@@ scripts/Makefile: hostprogs-$(CONFIG_ASN1) += asn1_compiler
- hostprogs-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
- hostprogs-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
- hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
-+hostprogs-$(CONFIG_DTRACE) += kmodsdt
+@@ scripts/Makefile: always-$(CONFIG_ASN1) += asn1_compiler
+ always-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
+ always-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
+ always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
++always-$(CONFIG_DTRACE) += kmodsdt
- HOSTCFLAGS_sortextable.o = -I$(srctree)/tools/include
- HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
-@@ scripts/Makefile: HOSTCFLAGS_eu_simple.o := -I$(srctree)/scripts
- HOSTCFLAGS_kallsyms.o := $(shell pkg-config --cflags glib-2.0) -I$(srctree)/scripts
- HOSTLDLIBS_kallsyms := $(shell pkg-config --libs glib-2.0) -ldw
+ kallsyms-objs := kallsyms.o
+
+@@ scripts/Makefile: HOSTCFLAGS_sorttable.o += -DUNWINDER_ORC_ENABLED
+ HOSTLDLIBS_sorttable = -lpthread
endif
-+
+
+ifeq ($(CONFIG_DTRACE),y)
+HOSTCFLAGS_kmodsdt.o := -I$(srctree)/include/generated
+HOSTLDLIBS_kmodsdt := -lelf
+endif
+
- # The following hostprogs-y programs are only build on demand
- hostprogs-y += unifdef
+ hostprogs := $(always-y) $(always-m)
+ # The following programs are only built on demand
## scripts/Makefile.modfinal ##
@@
@@ scripts/link-vmlinux.sh: cleanup()
rm -f vmlinux
@@ scripts/link-vmlinux.sh: fi;
# final build of init/
- ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init
+ ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init need-builtin=1
+sdtstubo=""
+sdtinfoo=""
@@ scripts/link-vmlinux.sh: if [ -n "${CONFIG_KALLSYMS}" ]; then
+ else
+ kallsyms_step 1 -r
+ fi
-+ sdtinfo ${kallsyms_vmlinux} ${sdtinfoo}
++ sdtinfo ${kallsyms_vmlinux} ${sdtinfoo} vmlinux.o
+ fi
+
+ # step 2
@@ scripts/link-vmlinux.sh: if [ -n "${CONFIG_KALLSYMS}" ]; then
-vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o}
+vmlinux_link vmlinux "" "${kallsymso}" ${btf_vmlinux_bin_o} ${sdtstubo} ${sdtinfoo}
- if [ -n "${CONFIG_BUILDTIME_EXTABLE_SORT}" ]; then
- info SORTEX vmlinux
+ if [ -n "${CONFIG_BUILDTIME_TABLE_SORT}" ]; then
+ info SORTTAB vmlinux
## scripts/mod/modpost.c ##
@@ scripts/mod/modpost.c: static int check_exports(struct module *mod)
9: bc56712b7e34 = 9: d297e1a7027a dtrace: sdt provider for x86
10: bacbf7736afb = 10: 36f89f218f28 dtrace: profile provider and test probe core components
11: a89d11db10b2 = 11: 8cd78d79b676 dtrace: profile and tick providers built on cyclics
12: 062a9fd1a734 = 12: 5d0252075356 dtrace: USDT and pid provider core and x86 components
13: c70fe4a1ace5 = 13: c327e63c89e6 dtrace: USDT and pid providers
14: 12de496ebb18 ! 14: c0292714b382 dtrace: function boundary tracing (FBT) core and x86 components
@@ arch/x86/entry/entry_64.S: SYM_CODE_START(\sym)
.endm
+#ifdef CONFIG_DTRACE
-+ENTRY(dtrace_error_exit)
++SYM_CODE_START(dtrace_error_exit)
+ UNWIND_HINT_REGS
+ DISABLE_INTERRUPTS(CLBR_NONE)
+ TRACE_IRQS_OFF
@@ arch/x86/entry/entry_64.S: SYM_CODE_START(\sym)
+
+ INTERRUPT_RETURN
+
-+END(dtrace_error_exit)
++SYM_CODE_END(dtrace_error_exit)
+
+.pushsection .rodata, "a"
+dtrace_error_msg:
@@ arch/x86/kernel/kvm.c: u32 kvm_read_and_reset_pf_reason(void)
+dotraplinkage int
do_async_page_fault(struct pt_regs *regs, unsigned long error_code, unsigned long address)
{
- enum ctx_state prev_state;
+ switch (kvm_read_and_reset_pf_reason()) {
@@ arch/x86/kernel/kvm.c: do_async_page_fault(struct pt_regs *regs, unsigned long error_code, unsigned lon
rcu_irq_exit();
break;
@@ arch/x86/kernel/traps.c: dotraplinkage void do_double_fault(struct pt_regs *regs
-dotraplinkage void do_bounds(struct pt_regs *regs, long error_code)
+dotraplinkage int do_bounds(struct pt_regs *regs, long error_code)
{
- const struct mpx_bndcsr *bndcsr;
-
RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
if (notify_die(DIE_TRAP, "bounds", regs, error_code,
X86_TRAP_BR, SIGSEGV) == NOTIFY_STOP)
@@ arch/x86/kernel/traps.c: dotraplinkage void do_double_fault(struct pt_regs *regs
cond_local_irq_enable(regs);
if (!user_mode(regs))
-@@ arch/x86/kernel/traps.c: dotraplinkage void do_bounds(struct pt_regs *regs, long error_code)
die("bounds", regs, error_code);
- }
-
-- return;
-+ return 0;
- exit_trap:
- /*
-@@ arch/x86/kernel/traps.c: dotraplinkage void do_bounds(struct pt_regs *regs, long error_code)
- * time..
- */
do_trap(X86_TRAP_BR, SIGSEGV, "bounds", regs, error_code, 0, NULL);
+ return 0;
}
--dotraplinkage void
-+dotraplinkage int
- do_general_protection(struct pt_regs *regs, long error_code)
+ enum kernel_gp_hint {
+@@ arch/x86/kernel/traps.c: static enum kernel_gp_hint get_kernel_gp_address(struct pt_regs *regs,
+
+ #define GPFSTR "general protection fault"
+
+-dotraplinkage void do_general_protection(struct pt_regs *regs, long error_code)
++dotraplinkage int do_general_protection(struct pt_regs *regs, long error_code)
{
- const char *desc = "general protection fault";
+ char desc[sizeof(GPFSTR) + 50 + 2*sizeof(unsigned long) + 1] = GPFSTR;
+ enum kernel_gp_hint hint = GP_NO_HINT;
struct task_struct *tsk;
+ unsigned long gp_addr;
+- int ret;
+ int ret = 0;
RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
@@ arch/x86/kernel/traps.c: dotraplinkage void do_bounds(struct pt_regs *regs, long
}
tsk = current;
- if (!user_mode(regs)) {
- if (fixup_exception(regs, X86_TRAP_GP, error_code, 0))
-- return;
-+ return 0;
-
- tsk->thread.error_code = error_code;
- tsk->thread.trap_nr = X86_TRAP_GP;
-@@ arch/x86/kernel/traps.c: do_general_protection(struct pt_regs *regs, long error_code)
- */
- if (!preemptible() && kprobe_running() &&
- kprobe_fault_handler(regs, X86_TRAP_GP))
-- return;
-+ return 0;
+@@ arch/x86/kernel/traps.c: dotraplinkage void do_general_protection(struct pt_regs *regs, long error_code)
+ show_signal(tsk, SIGSEGV, "", desc, regs, error_code);
+ force_sig(SIGSEGV);
-- if (notify_die(DIE_GPF, desc, regs, error_code,
-- X86_TRAP_GP, SIGSEGV) != NOTIFY_STOP)
-+ ret = notify_die(DIE_GPF, desc, regs, error_code,
-+ X86_TRAP_GP, SIGSEGV);
-+ if ((ret & NOTIFY_STOP_MASK) != NOTIFY_STOP_MASK)
- die(desc, regs, error_code);
- return;
-+ return notifier_to_errno(ret);
++ return 0;
}
+ if (fixup_exception(regs, X86_TRAP_GP, error_code, 0))
+- return;
++ return 0;
+
tsk->thread.error_code = error_code;
-@@ arch/x86/kernel/traps.c: do_general_protection(struct pt_regs *regs, long error_code)
- show_signal(tsk, SIGSEGV, "", desc, regs, error_code);
+ tsk->thread.trap_nr = X86_TRAP_GP;
+@@ arch/x86/kernel/traps.c: dotraplinkage void do_general_protection(struct pt_regs *regs, long error_code)
+ if (!preemptible() &&
+ kprobe_running() &&
+ kprobe_fault_handler(regs, X86_TRAP_GP))
+- return;
++ return 0;
+
+ ret = notify_die(DIE_GPF, desc, regs, error_code, X86_TRAP_GP, SIGSEGV);
+- if (ret == NOTIFY_STOP)
+- return;
++ if ((ret & NOTIFY_STOP_MASK) == NOTIFY_STOP_MASK)
++ return notifier_to_errno(ret);
+
+ if (error_code)
+ snprintf(desc, sizeof(desc), "segment-related " GPFSTR);
+@@ arch/x86/kernel/traps.c: dotraplinkage void do_general_protection(struct pt_regs *regs, long error_code)
+
+ die_addr(desc, regs, error_code, gp_addr);
- force_sig(SIGSEGV);
+ return 0;
}
NOKPROBE_SYMBOL(do_general_protection);
@@ arch/x86/kernel/traps.c: do_general_protection(struct pt_regs *regs, long error_
-dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code)
+dotraplinkage int notrace do_int3(struct pt_regs *regs, long error_code)
{
-+ int ret = 0;
- #ifdef CONFIG_DYNAMIC_FTRACE
- /*
- * ftrace must be first, everything else may cause a recursive crash.
-@@ arch/x86/kernel/traps.c: dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code)
- */
- if (unlikely(atomic_read(&modifying_ftrace_code)) &&
- ftrace_int3_handler(regs))
-- return;
-+ return 0;
- #endif
++ int ret;
++
if (poke_int3_handler(regs))
- return;
+ return 0;
@@ arch/x86/mm/fault.c: trace_page_fault_entries(struct pt_regs *regs, unsigned lon
+ * exception_{enter,exit}() contains all sorts of tracepoints.
+ */
+dotraplinkage int notrace
- do_page_fault(struct pt_regs *regs, unsigned long error_code, unsigned long address)
+ do_page_fault(struct pt_regs *regs, unsigned long hw_error_code,
+ unsigned long address)
{
- enum ctx_state prev_state;
-@@ arch/x86/mm/fault.c: do_page_fault(struct pt_regs *regs, unsigned long error_code, unsigned long addr
- trace_page_fault_entries(regs, error_code, address);
- __do_page_fault(regs, error_code, address);
- exception_exit(prev_state);
+@@ arch/x86/mm/fault.c: do_page_fault(struct pt_regs *regs, unsigned long hw_error_code,
+ trace_page_fault_entries(regs, hw_error_code, address);
+
+ if (unlikely(kmmio_fault(regs, address)))
+- return;
++ return 0;
+
+ /* Was the fault on kernel-controlled part of the address space? */
+ if (unlikely(fault_in_kernel_space(address)))
+ do_kern_addr_fault(regs, hw_error_code, address);
+ else
+ do_user_addr_fault(regs, hw_error_code, address);
+ return 0;
}
NOKPROBE_SYMBOL(do_page_fault);
15: 5c53d038264f = 15: 4937f9ec7fc6 dtrace: fbt provider, modular components
16: d9b4eb455db9 ! 16: e3eb09b9907b dtrace, arm: arm64 port
@@ scripts/link-vmlinux.sh: if [ -n "${CONFIG_KALLSYMS}" ]; then
+ if [ -n "${CONFIG_X86_64}" ]; then
+ kallsyms_step 1 --emit-relocs
fi
- sdtinfo ${kallsyms_vmlinux} ${sdtinfoo}
+ sdtinfo ${kallsyms_vmlinux} ${sdtinfoo} vmlinux.o
fi
17: eff208caaee3 ! 17: 78317f54af4a dtrace: add SDT probes
@@ fs/exec.c: static int __do_execve_file(int fd, struct filename *filename,
## fs/nfs/internal.h ##
@@
- #include <linux/crc32.h>
+ #include <linux/sunrpc/addr.h>
#include <linux/nfs_page.h>
#include <linux/wait_bit.h>
+#include <linux/sdt.h>
- #define NFS_MS_MASK (SB_RDONLY|SB_NOSUID|SB_NODEV|SB_NOEXEC|SB_SYNCHRONOUS)
+ #define NFS_SB_MASK (SB_RDONLY|SB_NOSUID|SB_NODEV|SB_NOEXEC|SB_SYNCHRONOUS)
-@@ fs/nfs/internal.h: static inline bool nfs_error_is_fatal_on_server(int err)
- }
- return nfs_error_is_fatal(err);
+@@ fs/nfs/internal.h: static inline void nfs_set_port(struct sockaddr *sap, int *port,
+
+ rpc_set_port(sap, *port);
}
+
+#define DTRACE_IO_NFS(name, rw, size, inode) \
@@ fs/nfs/read.c: static void nfs_initiate_read(struct nfs_pgio_header *hdr,
+
task_setup_data->flags |= swap_flags;
rpc_ops->read_setup(hdr, msg);
- trace_nfs_initiate_read(inode, hdr->io_start, hdr->good_bytes);
+ trace_nfs_initiate_read(hdr);
@@ fs/nfs/read.c: static int nfs_readpage_done(struct rpc_task *task,
struct inode *inode)
{
@@ fs/nfs/read.c: static int nfs_readpage_done(struct rpc_task *task,
## fs/nfs/write.c ##
@@ fs/nfs/write.c: static void nfs_initiate_write(struct nfs_pgio_header *hdr,
+ task_setup_data->priority = priority;
rpc_ops->write_setup(hdr, msg, &task_setup_data->rpc_client);
- trace_nfs_initiate_write(hdr->inode, hdr->io_start, hdr->good_bytes,
- hdr->args.stable);
+ trace_nfs_initiate_write(hdr);
+ DTRACE_IO_NFS(start, REQ_OP_WRITE, hdr->args.count, hdr->inode);
}
@@ kernel/sched/core.c: static void __sched notrace __schedule(bool preempt)
}
@@ kernel/sched/core.c: void set_user_nice(struct task_struct *p, long nice)
+ old_prio = p->prio;
p->prio = effective_prio(p);
- delta = p->prio - old_prio;
+ DTRACE_SCHED(change__pri, struct task_struct * : (lwpsinfo_t *,
+ psinfo_t *), p,
+ int, old_prio);
- if (queued) {
+ if (queued)
enqueue_task(rq, p, ENQUEUE_RESTORE | ENQUEUE_NOCLOCK);
- /*
+ if (running)
@@ kernel/sched/core.c: static void do_sched_yield(void)
rq_unlock(rq, &rf);
sched_preempt_enable_no_resched();
@@ net/ipv4/tcp.c: void tcp_set_state(struct sock *sk, int state)
## net/ipv4/tcp_input.c ##
@@
- #include <trace/events/tcp.h>
#include <linux/jump_label_ratelimit.h>
#include <net/busy_poll.h>
+ #include <net/mptcp.h>
+#include <linux/sdt.h>
int sysctl_tcp_max_orphans __read_mostly = NR_FILE;
@@ net/ipv6/mcast.c: static void mld_sendpack(struct sk_buff *skb)
}
static int grec_size(struct ifmcaddr6 *pmc, int type, int gdel, int sdel)
+@@ net/ipv6/mcast.c: static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
+ {
+ struct net *net = dev_net(dev);
+ struct sock *sk = net->ipv6.igmp_sk;
+- struct inet6_dev *idev;
++ struct inet6_dev *idev = NULL;
+ struct sk_buff *skb;
+ struct mld_msg *hdr;
+ const struct in6_addr *snd_addr, *saddr;
@@ net/ipv6/mcast.c: static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
u8 ra[8] = { IPPROTO_ICMPV6, 0,
IPV6_TLV_ROUTERALERT, 2, 0, 0,
18: 7996decb4444 = 18: 2042ea6f63eb dtrace: add rcu_irq_exit and rcu_nmi_exit_common to FBT blacklist
19: 9536d0284bae = 19: 2983513cad05 dtrace: add sample script for building DTrace on Fedora
20: 00c7cfea0186 = 20: f63e27cd239e locking: publicize mutex_owner and mutex_owned again
21: fe425177fcbd < -: ------------ fixup! dtrace: modular components and x86 support
22: fcd40e317963 < -: ------------ fixup! dtrace: add SDT probes
23: 582c39ca6b12 < -: ------------ fixup! dtrace: core and x86
24: 316db26d919a < -: ------------ fixup! dtrace: sdt provider core components
25: 1f9239bd03c0 < -: ------------ fixup! dtrace: core and x86
26: 69cce46cfa34 < -: ------------ fixup! dtrace: modular components and x86 support
More information about the DTrace-devel
mailing list