All of lore.kernel.org
 help / color / mirror / Atom feed
* [folded-merged] kallsyms-increase-marker-density-to-16-1-to-accelerate-lookups-fix.patch removed from -mm tree
@ 2026-10-11 15:13 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-10-11 15:13 UTC (permalink / raw)
  To: mm-commits, thunder.leizhen, thomas.weissschuh, rostedt, pmladek,
	olsajiri, nsc, nathan, mcgrof, masahiroy, ljs, kees, geert,
	denis.benato, david.laight.linux, chewi, andrey.grodzovsky,
	abelvesa, jim.cromie, akpm

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4241 bytes --]


The quilt patch titled
     Subject: kallsyms: copy constants from __KERNEL__ to user, drop the inclusion
has been removed from the -mm tree.  Its filename was
     kallsyms-increase-marker-density-to-16-1-to-accelerate-lookups-fix.patch

This patch was dropped because it was folded into kallsyms-increase-marker-density-to-16-1-to-accelerate-lookups.patch

------------------------------------------------------
From: Jim Cromie <jim.cromie@gmail.com>
Subject: kallsyms: copy constants from __KERNEL__ to user, drop the inclusion
Date: Thu, 08 Oct 2026 17:19:12 -0600

commit 4fafd1165b33 replaced hardcoded values which determine marker array
size, with new values that accelerate symbol-name lookups.  These symbols
are needed in user-space to generate the lookup tables, and in kernel to
read the generated table.

To avoid 2-defns problem, they were added to a kernel header (with ifdef
guards) and included by scripts/kallsyms.c.  But that creates packaging
problems elsewhere, so just add the 2nd defns, with an explicit comment
about the user-kernel coupling.

Link: https://lore.kernel.org/20261008-fix-kallsyms-v1-1-3339fdac2ab3@gmail.com
Fixes: 4fafd1165b33 ("kallsyms: increase marker density to 16:1 to accelerate lookups")
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: Nicolas Schier <nsc@kernel.org>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Denis Benato <denis.benato@linux.dev>
Cc: Kees Cook <kees@kernel.org>
Cc: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Cc: James Le Cuirot <chewi@gentoo.org>
Cc: Abel Vesa <abelvesa@kernel.org>
Cc: Andrey Grodzovsky <andrey.grodzovsky@crowdstrike.com>
Cc: David Laight <david.laight.linux@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jiri Olsa <olsajiri@gmail.com>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
---

 kernel/kallsyms_internal.h |   12 +++++-------
 scripts/kallsyms.c         |    9 ++++++++-
 2 files changed, 13 insertions(+), 8 deletions(-)

--- a/kernel/kallsyms_internal.h~kallsyms-increase-marker-density-to-16-1-to-accelerate-lookups-fix
+++ a/kernel/kallsyms_internal.h
@@ -2,18 +2,17 @@
 #ifndef LINUX_KALLSYMS_INTERNAL_H_
 #define LINUX_KALLSYMS_INTERNAL_H_
 
+#include <linux/types.h>
+
 /*
- * Provide compile-constants for scripts/kallsyms.c
- * so it can build the corresponding kallsyms_marker[] table.
- * and wrap the rest in __KERNEL__
+ * These constants determine the size of the kallsyms_markers array
+ * written by scripts/kallsyms.c during the build.  The symbol values
+ * must be kept in sync.
  */
 #define KALLSYMS_MARKER_SHIFT 4
 #define KALLSYMS_MARKER_SIZE  (1U << KALLSYMS_MARKER_SHIFT)
 #define KALLSYMS_MARKER_MASK  (KALLSYMS_MARKER_SIZE - 1U)
 
-#ifdef __KERNEL__
-#include <linux/types.h>
-
 extern const int kallsyms_offsets[];
 extern const u8 kallsyms_names[];
 
@@ -24,6 +23,5 @@ extern const u16 kallsyms_token_index[];
 
 extern const unsigned int kallsyms_markers[];
 extern const u8 kallsyms_seqs_of_names[];
-#endif /* __KERNEL__ */
 
 #endif // LINUX_KALLSYMS_INTERNAL_H_
--- a/scripts/kallsyms.c~kallsyms-increase-marker-density-to-16-1-to-accelerate-lookups-fix
+++ a/scripts/kallsyms.c
@@ -29,7 +29,14 @@
 
 #include <xalloc.h>
 
-#include "../kernel/kallsyms_internal.h"
+/*
+ * These constants determine the size of the marker array filled here,
+ * and they're duplicated in kernel/kallsyms.c, where they're used in
+ * get_symbol_offset().  They must be kept in agreement.
+ */
+#define KALLSYMS_MARKER_SHIFT 4
+#define KALLSYMS_MARKER_SIZE  (1U << KALLSYMS_MARKER_SHIFT)
+#define KALLSYMS_MARKER_MASK  (KALLSYMS_MARKER_SIZE - 1U)
 
 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
 
_

Patches currently in -mm which might be from jim.cromie@gmail.com are

kallsyms-match-compressed-tokens-on-the-fly-during-binary-search.patch
kallsyms-increase-marker-density-to-16-1-to-accelerate-lookups.patch
kallsyms-unroll-24-bit-sequence-reconstruction-in-get_symbol_seq.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-11 15:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-11 15:13 [folded-merged] kallsyms-increase-marker-density-to-16-1-to-accelerate-lookups-fix.patch removed from -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.