All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the modules tree with the kbuild tree
@ 2022-05-23  2:08 Stephen Rothwell
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2022-05-23  2:08 UTC (permalink / raw)
  To: Luis Chamberlain, Masahiro Yamada
  Cc: Aaron Tomlin, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2056 bytes --]

Hi all,

Today's linux-next merge of the modules tree got a conflict in:

  kernel/module/main.c

between commit:

  98d8a9b5e17d ("kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS")

from the kbuild tree and commit:

  47889798da43 ("module: Move version support into a separate file")

from the modules tree.

I fixed it up (I used the latter version of this file and applied the
following patch) and can carry the fix as necessary. This is now fixed
as far as linux-next is concerned, but any non trivial conflicts should
be mentioned to your upstream maintainer when your tree is submitted for
merging.  You may also want to consider cooperating with the maintainer
of the conflicting tree to minimise any particularly complex conflicts.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 23 May 2022 12:04:00 +1000
Subject: [PATCH] fix up for "module: Move version support into a separate file"

interacting with "kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 kernel/module/version.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/kernel/module/version.c b/kernel/module/version.c
index adaedce1dc97..53f43ac5a73e 100644
--- a/kernel/module/version.c
+++ b/kernel/module/version.c
@@ -10,11 +10,6 @@
 #include <linux/printk.h>
 #include "internal.h"
 
-static u32 resolve_rel_crc(const s32 *crc)
-{
-	return *(u32 *)((void *)crc + *crc);
-}
-
 int check_version(const struct load_info *info,
 		  const char *symname,
 			 struct module *mod,
@@ -43,10 +38,7 @@ int check_version(const struct load_info *info,
 		if (strcmp(versions[i].name, symname) != 0)
 			continue;
 
-		if (IS_ENABLED(CONFIG_MODULE_REL_CRCS))
-			crcval = resolve_rel_crc(crc);
-		else
-			crcval = *crc;
+		crcval = *crc;
 		if (versions[i].crc == crcval)
 			return 1;
 		pr_debug("Found checksum %X vs module %lX\n",
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: manual merge of the modules tree with the kbuild tree
  2023-10-04  0:43 Stephen Rothwell
@ 2023-11-02 22:24 ` Stephen Rothwell
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2023-11-02 22:24 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Luis Chamberlain, Jack Brennen, Linux Kernel Mailing List,
	Linux Next Mailing List, Tiezhu Yang

[-- Attachment #1: Type: text/plain, Size: 2157 bytes --]

Hi all,

On Wed, 4 Oct 2023 11:43:54 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the modules tree got a conflict in:
> 
>   scripts/mod/modpost.c
> 
> between commit:
> 
>   4074532758c5 ("modpost: Optimize symbol search from linear to binary search")
> 
> from the kbuild tree and commit:
> 
>   dc95e422c283 ("module: Make is_valid_name() return bool")
> 
> from the modules tree.
> 
> I fixed it up (I used the former version of this files and applied the
> following merge resolution patch) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 4 Oct 2023 11:39:03 +1100
> Subject: [PATCH] fix up for "module: Make is_valid_name() return bool"
> 
> interacting with commit
> 
>   4074532758c5 ("modpost: Optimize symbol search from linear to binary search")
> 
> from the kbuild tree.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  scripts/mod/modpost.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h
> index 6413f26fcb6b..5a0324f3257f 100644
> --- a/scripts/mod/modpost.h
> +++ b/scripts/mod/modpost.h
> @@ -163,12 +163,12 @@ static inline unsigned int get_secindex(const struct elf_info *info,
>   *
>   * Internal symbols created by tools should be ignored by modpost.
>   */
> -static inline int is_valid_name(struct elf_info *elf, Elf_Sym *sym)
> +static inline bool is_valid_name(struct elf_info *elf, Elf_Sym *sym)
>  {
>  	const char *name = elf->strtab + sym->st_name;
>  
>  	if (!name || !strlen(name))
> -		return 0;
> +		return false;
>  	return !is_mapping_symbol(name);
>  }

This is now a conflict between the kbuild tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: manual merge of the modules tree with the kbuild tree
@ 2023-10-04  0:43 Stephen Rothwell
  2023-11-02 22:24 ` Stephen Rothwell
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2023-10-04  0:43 UTC (permalink / raw)
  To: Luis Chamberlain, Masahiro Yamada
  Cc: Jack Brennen, Linux Kernel Mailing List, Linux Next Mailing List,
	Tiezhu Yang

[-- Attachment #1: Type: text/plain, Size: 1911 bytes --]

Hi all,

Today's linux-next merge of the modules tree got a conflict in:

  scripts/mod/modpost.c

between commit:

  4074532758c5 ("modpost: Optimize symbol search from linear to binary search")

from the kbuild tree and commit:

  dc95e422c283 ("module: Make is_valid_name() return bool")

from the modules tree.

I fixed it up (I used the former version of this files and applied the
following merge resolution patch) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 4 Oct 2023 11:39:03 +1100
Subject: [PATCH] fix up for "module: Make is_valid_name() return bool"

interacting with commit

  4074532758c5 ("modpost: Optimize symbol search from linear to binary search")

from the kbuild tree.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 scripts/mod/modpost.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h
index 6413f26fcb6b..5a0324f3257f 100644
--- a/scripts/mod/modpost.h
+++ b/scripts/mod/modpost.h
@@ -163,12 +163,12 @@ static inline unsigned int get_secindex(const struct elf_info *info,
  *
  * Internal symbols created by tools should be ignored by modpost.
  */
-static inline int is_valid_name(struct elf_info *elf, Elf_Sym *sym)
+static inline bool is_valid_name(struct elf_info *elf, Elf_Sym *sym)
 {
 	const char *name = elf->strtab + sym->st_name;
 
 	if (!name || !strlen(name))
-		return 0;
+		return false;
 	return !is_mapping_symbol(name);
 }
 
-- 
2.40.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: manual merge of the modules tree with the kbuild tree
@ 2019-09-15 22:05 Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2019-09-15 22:05 UTC (permalink / raw)
  To: Jessica Yu, Masahiro Yamada, Matthias Maennich
  Cc: Linux Next Mailing List, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1370 bytes --]

Hi all,

Today's linux-next merge of the modules tree got a conflict in:

  scripts/Makefile.modpost

between commit:

  9b9a3f20cbe0ba ("kbuild: split final module linking out into Makefile.modfinal")

from the kbuild tree and commit:

  eb8305aecb958e ("cripts: Coccinelle script for namespace dependencies.")

from the modules tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc scripts/Makefile.modpost
index 9800a3988f23e,743fe3a2e885f..0000000000000
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
diff --git a/scripts/Makefile.modfinal b/scripts/Makefile.modfinal
index 411c1e600e7dd..c164d644138ab 100644
--- a/scripts/Makefile.modfinal
+++ b/scripts/Makefile.modfinal
@@ -42,6 +42,8 @@ $(modules): %.ko: %.o %.mod.o $(KBUILD_LDS_MODULE) FORCE
 
 targets += $(modules) $(modules:.ko=.mod.o)
 
+nsdeps: __modpost
+
 # Add FORCE to the prequisites of a target to force it to be always rebuilt.
 # ---------------------------------------------------------------------------
 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: manual merge of the modules tree with the kbuild tree
@ 2015-11-01  8:31 Stephen Rothwell
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2015-11-01  8:31 UTC (permalink / raw)
  To: Rusty Russell, Michal Marek
  Cc: linux-next, linux-kernel, Nicolas Boichat, Andi Kleen

Hi Rusty,

Today's linux-next merge of the modules tree got a conflict in:

  scripts/Makefile.modpost

between commit:

  19a3cc83353e ("Kbuild, lto: Add Link Time Optimization support v3")

from the kbuild tree and commit:

  47490ec141b9 ("modpost: Add flag -E for making section mismatches fatal")

from the modules tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc scripts/Makefile.modpost
index 9c40daea846c,1366a94b6c39..000000000000
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@@ -77,8 -77,8 +77,9 @@@ modpost = scripts/mod/modpos
   $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \
   $(if $(KBUILD_EXTMOD),-o $(modulesymfile))      \
   $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S)      \
+  $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E)  \
 - $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w)
 + $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) \
 + $(if $(CONFIG_LTO),-w)
  
  MODPOST_OPT=$(subst -i,-n,$(filter -i,$(MAKEFLAGS)))
  

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

end of thread, other threads:[~2023-11-02 22:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-23  2:08 linux-next: manual merge of the modules tree with the kbuild tree Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2023-10-04  0:43 Stephen Rothwell
2023-11-02 22:24 ` Stephen Rothwell
2019-09-15 22:05 Mark Brown
2015-11-01  8:31 Stephen Rothwell

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.