From: Francis Deslauriers Date: Tue, 18 Feb 2020 16:30:54 +0000 (-0500) Subject: module_load: change `taints` field to `ctf_enum` X-Git-Tag: v2.13.0-rc1~186 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5f1c794bcce39ee8c401c735cf7e1907c0bc20fe;p=lttng-modules.git module_load: change `taints` field to `ctf_enum` Signed-off-by: Francis Deslauriers Signed-off-by: Mathieu Desnoyers Change-Id: I67b5aad0bd2bc43e06a5708f0f5e1fea56f31436 --- diff --git a/include/instrumentation/events/module.h b/include/instrumentation/events/module.h index 5831650b..3de0f0e6 100644 --- a/include/instrumentation/events/module.h +++ b/include/instrumentation/events/module.h @@ -17,6 +17,7 @@ #include #include +#include #ifdef CONFIG_MODULES @@ -26,6 +27,41 @@ struct module; #endif +LTTNG_TRACEPOINT_ENUM(taint, + TP_ENUM_VALUES( + ctf_enum_value("PROPRIETARY_MODULE", 1UL << TAINT_PROPRIETARY_MODULE) + ctf_enum_value("FORCED_MODULE", 1UL << TAINT_FORCED_MODULE) + ctf_enum_value("CPU_OUT_OF_SPEC", 1UL << TAINT_CPU_OUT_OF_SPEC) + ctf_enum_value("FORCED_RMMOD", 1UL << TAINT_FORCED_RMMOD) + ctf_enum_value("MACHINE_CHECK", 1UL << TAINT_MACHINE_CHECK) + ctf_enum_value("BAD_PAGE", 1UL << TAINT_BAD_PAGE) + ctf_enum_value("USER", 1UL << TAINT_USER) + ctf_enum_value("DIE", 1UL << TAINT_DIE) + ctf_enum_value("OVERRIDDEN_ACPI_TABLE", 1UL << TAINT_OVERRIDDEN_ACPI_TABLE) + ctf_enum_value("WARN", 1UL << TAINT_WARN) + ctf_enum_value("CRAP", 1UL << TAINT_CRAP) + ctf_enum_value("FIRMWARE_WORKAROUND", 1UL << TAINT_FIRMWARE_WORKAROUND) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) + ctf_enum_value("OOT_MODULE", 1UL << TAINT_OOT_MODULE) +#endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) + ctf_enum_value("UNSIGNED_MODULE", 1UL << TAINT_UNSIGNED_MODULE) +#endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) + ctf_enum_value("SOFTLOCKUP", 1UL << TAINT_SOFTLOCKUP) +#endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) + ctf_enum_value("LIVEPATCH", 1UL << TAINT_LIVEPATCH) +#endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) + ctf_enum_value("AUX", 1UL << TAINT_AUX) +#endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)) + ctf_enum_value("RANDSTRUCT", 1UL << TAINT_RANDSTRUCT) +#endif + ) +) + LTTNG_TRACEPOINT_EVENT(module_load, TP_PROTO(struct module *mod), @@ -33,7 +69,7 @@ LTTNG_TRACEPOINT_EVENT(module_load, TP_ARGS(mod), TP_FIELDS( - ctf_integer(unsigned int, taints, mod->taints) + ctf_enum(taint, unsigned int, taints, mod->taints) ctf_string(name, mod->name) ) )