lib-code-tagging-framework.patch removed from -mm tree
The quilt patch titled
Subject: lib: code tagging framework
has been removed from the -mm tree. Its filename was
lib-code-tagging-framework.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Suren Baghdasaryan <[email protected]>
Subject: lib: code tagging framework
Date: Thu, 21 Mar 2024 09:36:32 -0700
Add basic infrastructure to support code tagging which stores tag common information consisting of the module name, function, file name and line number. Provide functions to register a new code tag type and navigate between code tags.
---
include/linux/codetag.h | 68 +++++++++++ lib/Kconfig.debug | 4 lib/Makefile | 1 lib/codetag.c | 219 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 292 insertions(+)
include/linux/codetag.h new file +68 -0
@@ -0,0 +1,68 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* code tagging framework +*/ +#ifndef _LINUX_CODETAG_H +#define _LINUX_CODETAG_H + +#include <linux/types.h> + +struct codetag_iterator ; +struct codetag_type ; +struct codetag_module ; +struct seq_buf ; +struct module ; + +/* +* An instance of this structure is created in a special ELF section at every +* code location being tagged. At runtime, the special section is treated as +* an array of these. +*/ +struct codetag { +unsigned int flags;/* used in later patches */ +unsigned int lineno; +const char *modname; +const char *function; +const char *filename; +}__aligned(8) ; + +union codetag_ref { +struct codetag *ct; +}; + +struct codetag_type_desc { +const char *section; +size_t tag_size; +}; + +struct codetag_iterator { +struct codetag_type *cttype; +struct codetag_module *cmod; +unsigned long mod_id; +struct codetag *ct; +}; + +#ifdef MODULE +#define CT_MODULE_NAME KBUILD_MODNAME +#else +#define CT_MODULE_NAME NULL +#endif + +#define CODE_TAG_INIT { \ + .modname = CT_MODULE_NAME, \ + .function = __func__, \ + .filename = __FILE__, \ + .lineno = __LINE__, \ + .flags = 0, \ +} + +void codetag_lock_module_list (struct codetag_type *cttype,bool lock); +struct codetag_iterator codetag_get_ct_iter (struct codetag_type *cttype); +struct codetag *codetag_next_ct (struct codetag_iterator *iter); + +void codetag_to_text (struct seq_buf *out,struct codetag *ct); + +struct codetag_type * +codetag_register_type (const struct codetag_type_desc *desc); + +#endif /* _LINUX_CODETAG_H */
lib/codetag.c new file +219 -0
219 lines not on this page · raw message
lib/Kconfig.debug renamed from lib/Kconfig.debug~lib-code-tagging-framework +4 -0
@@ -968,6 +968,10 @@ config DEBUG_STACKOVERFLOW If in doubt, say "N". +config CODE_TAGGING + bool + select KALLSYMS + source "lib/Kconfig.kasan" source "lib/Kconfig.kfence" source "lib/Kconfig.kmsan"
lib/Makefile renamed from lib/Makefile~lib-code-tagging-framework +1 -0
@@ -233,6 +233,7 @@ obj-$(CONFIG_OF_RECONFIG_NOTIFIER_ERROR_ of-reconfig-notifier-error-inject.o obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o +obj-$(CONFIG_CODE_TAGGING) += codetag.o lib-$(CONFIG_GENERIC_BUG) += bug.o obj-$(CONFIG_HAVE_ARCH_TRACEHOOK) += syscall.o
_
Patches currently in -mm which might be from [email protected] are
userfaultfd-remove-write_once-when-setting-folio-index-during-uffdio_move.patch