busybox: Fix excluding .debug from depmod
PATCH 1/1 busybox: Fix excluding .debug from depmod
The previously added patch for excluding .debug from depmod has an invalid expression in the condition. The strstr function returns NULL if substring is NOT found [1]. Therefore, the existing patch, on the opposite, handles only modules that have a .debug substring in the path. This commit fixes the condition in the patch to the correct one.
[1]: https://man7.org/linux/man-pages/man3/strstr.3.html
--- .../busybox/0001-depmod-Ignore-.debug-directories.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes-core/busybox/busybox/0001-depmod-Ignore-.debug-directories.patch +4 -3
@@ -1,6 +1,6 @@ From 5f6ed003f10ee0bd4a508d5f59129a29f0920dfc Mon Sep 17 00:00:00 2001 -From: Saul Wold <[email protected]> -Date: Thu, 31 Mar 2022 11:21:45 -0700 +From: Anton Kikin <[email protected]> +Date: Tue, 14 Feb 2023 15:46:42 +0300 Subject: [PATCH] depmod: Ignore .debug directories The .debug/<module>.ko files do not have the correct symbol information
@@ -9,6 +9,7 @@ since it's split away from the actual <module>.ko file. Just ignore it. Upstream-Status: Pending Signed-off-by: Saul Wold <[email protected]> +Signed-off-by: Anton Kikin <[email protected]> --- modutils/depmod.c | 3 +++ 1 file changed, 3 insertions(+)
@@ -21,7 +22,7 @@ index bb42bbe..aa5a2de 100644 /* Arbitrary. Was sb->st_size, but that breaks .gz etc */ size_t len = (64*1024*1024 - 4096); -+ if (strstr(fname, ".debug") == NULL) ++ if (strstr(fname, ".debug")) + return TRUE; + if (strrstr(fname, ".ko") == NULL)
Signature · 1 line
2.34.1.windows.1
Hello,
Saul sent this on Friday:
https://lore.kernel.org/openembedded-core/[email protected]/
Quoted 57 lines · Anton Kikin
The previously added patch for excluding .debug from depmod has an invalid expression in the condition. The strstr function returns NULL if substring is NOT found [1]. Therefore, the existing patch, on the opposite, handles only modules that have a .debug substring in the path. This commit fixes the condition in the patch to the correct one.
[1]: https://man7.org/linux/man-pages/man3/strstr.3.html
Signed-off-by Anton Kikin <[email protected]>--- .../busybox/0001-depmod-Ignore-.debug-directories.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)meta/recipes-core/busybox/busybox/0001-depmod-Ignore-.debug-directories.patch +4
-3@@ -1,6 +1,6 @@ From 5f6ed003f10ee0bd4a508d5f59129a29f0920dfc Mon Sep 17 00:00:00 2001 -From: Saul Wold <[email protected]> -Date: Thu, 31 Mar 2022 11:21:45 -0700 +From: Anton Kikin <[email protected]> +Date: Tue, 14 Feb 2023 15:46:42 +0300 Subject: [PATCH] depmod: Ignore .debug directories The .debug/<module>.ko files do not have the correct symbol information@@ -9,6 +9,7 @@ since it's split away from the actual <module>.ko file. Just ignore it. Upstream-Status: Pending Signed-off-by: Saul Wold <[email protected]> +Signed-off-by: Anton Kikin <[email protected]> --- modutils/depmod.c | 3 +++ 1 file changed, 3 insertions(+)@@ -21,7 +22,7 @@ index bb42bbe..aa5a2de 100644 /* Arbitrary. Was sb->st_size, but that breaks .gz etc */ size_t len = (64*1024*1024 - 4096); -+ if (strstr(fname, ".debug") == NULL) ++ if (strstr(fname, ".debug")) + return TRUE; + if (strrstr(fname, ".ko") == NULL)Signature · 11 lines
2.34.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#177141): https://lists.openembedded.org/g/openembedded-core/message/177141 Mute This Topic: https://lists.openembedded.org/mt/96959409/3617179 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com