All of lore.kernel.org
 help / color / mirror / Atom feed
* [folded-merged] module-add-printk-formats-to-add-module-build-id-to-stacktraces-fix-2.patch removed from -mm tree
@ 2021-07-08  0:32 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-07-08  0:32 UTC (permalink / raw)
  To: mm-commits, rdunlap


The patch titled
     Subject: buildid: fix build when CONFIG_MODULES is not set
has been removed from the -mm tree.  Its filename was
     module-add-printk-formats-to-add-module-build-id-to-stacktraces-fix-2.patch

This patch was dropped because it was folded into module-add-printk-formats-to-add-module-build-id-to-stacktraces.patch

------------------------------------------------------
From: Randy Dunlap <rdunlap@infradead.org>
Subject: buildid: fix build when CONFIG_MODULES is not set

Omit the static_assert() when CONFIG_MODULES is not set/enabled.
Fixes these build errors:

../kernel/kallsyms.c: In function `__sprint_symbol':
../include/linux/kernel.h:53:43: error: dereferencing pointer to incomplete type `struct module'
 #define typeof_member(T, m) typeof(((T*)0)->m)
                                           ^
../include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(typeof_member(struct module, build_id)) == 20"
 #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
                                         ^
../kernel/kallsyms.c:454:4: note: in expansion of macro `static_assert'
    static_assert(sizeof(typeof_member(struct module, build_id)) == 20);
    ^~~~~~~~~~~~~

Link: https://lkml.kernel.org/r/20210513171510.20328-1-rdunlap@infradead.org
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 kernel/kallsyms.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/kernel/kallsyms.c~module-add-printk-formats-to-add-module-build-id-to-stacktraces-fix-2
+++ a/kernel/kallsyms.c
@@ -451,7 +451,9 @@ static int __sprint_symbol(char *buffer,
 #if IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID)
 		if (add_buildid && buildid) {
 			/* build ID should match length of sprintf */
+#if IS_ENABLED(CONFIG_MODULES)
 			static_assert(sizeof(typeof_member(struct module, build_id)) == 20);
+#endif
 			len += sprintf(buffer + len, " %20phN", buildid);
 		}
 #endif
_

Patches currently in -mm which might be from rdunlap@infradead.org are

module-add-printk-formats-to-add-module-build-id-to-stacktraces.patch


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

only message in thread, other threads:[~2021-07-08  0:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08  0:32 [folded-merged] module-add-printk-formats-to-add-module-build-id-to-stacktraces-fix-2.patch removed from -mm tree akpm

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.