All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] busybox: Fix excluding .debug from depmod
@ 2023-02-14 13:17 Anton Kikin
  2023-02-14 16:34 ` [OE-core] " Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Anton Kikin @ 2023-02-14 13:17 UTC (permalink / raw)
  To: openembedded-core; +Cc: 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 <a.kikin@tano-systems.com>
---
 .../busybox/0001-depmod-Ignore-.debug-directories.patch    | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox/0001-depmod-Ignore-.debug-directories.patch b/meta/recipes-core/busybox/busybox/0001-depmod-Ignore-.debug-directories.patch
index 354f83a4a5..3398a354c5 100644
--- a/meta/recipes-core/busybox/busybox/0001-depmod-Ignore-.debug-directories.patch
+++ b/meta/recipes-core/busybox/busybox/0001-depmod-Ignore-.debug-directories.patch
@@ -1,6 +1,6 @@
 From 5f6ed003f10ee0bd4a508d5f59129a29f0920dfc Mon Sep 17 00:00:00 2001
-From: Saul Wold <saul.wold@windriver.com>
-Date: Thu, 31 Mar 2022 11:21:45 -0700
+From: Anton Kikin <a.kikin@tano-systems.com>
+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 <saul.wold@windriver.com>
+Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
 ---
  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)
-- 
2.34.1.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [OE-core] [PATCH] busybox: Fix excluding .debug from depmod
  2023-02-14 13:17 [PATCH] busybox: Fix excluding .debug from depmod Anton Kikin
@ 2023-02-14 16:34 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2023-02-14 16:34 UTC (permalink / raw)
  To: Anton Kikin; +Cc: openembedded-core

Hello,

Saul sent this on Friday:
https://lore.kernel.org/openembedded-core/20230210153255.2716448-1-saul.wold@windriver.com/

On 14/02/2023 16:17:34+0300, Anton Kikin wrote:
> 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 <a.kikin@tano-systems.com>
> ---
>  .../busybox/0001-depmod-Ignore-.debug-directories.patch    | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-core/busybox/busybox/0001-depmod-Ignore-.debug-directories.patch b/meta/recipes-core/busybox/busybox/0001-depmod-Ignore-.debug-directories.patch
> index 354f83a4a5..3398a354c5 100644
> --- a/meta/recipes-core/busybox/busybox/0001-depmod-Ignore-.debug-directories.patch
> +++ b/meta/recipes-core/busybox/busybox/0001-depmod-Ignore-.debug-directories.patch
> @@ -1,6 +1,6 @@
>  From 5f6ed003f10ee0bd4a508d5f59129a29f0920dfc Mon Sep 17 00:00:00 2001
> -From: Saul Wold <saul.wold@windriver.com>
> -Date: Thu, 31 Mar 2022 11:21:45 -0700
> +From: Anton Kikin <a.kikin@tano-systems.com>
> +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 <saul.wold@windriver.com>
> +Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
>  ---
>   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)
> -- 
> 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: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-14 16:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14 13:17 [PATCH] busybox: Fix excluding .debug from depmod Anton Kikin
2023-02-14 16:34 ` [OE-core] " Alexandre Belloni

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.