linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the kmemleak tree with the x86 tree
@ 2009-05-07  5:54 Stephen Rothwell
  2009-05-07  6:24 ` Sam Ravnborg
  2009-05-07  9:23 ` Ingo Molnar
  0 siblings, 2 replies; 6+ messages in thread
From: Stephen Rothwell @ 2009-05-07  5:54 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: linux-next, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Sam Ravnborg

Hi Catalin,

Today's linux-next merge of the kmemleak tree got a conflict in
arch/x86/kernel/vmlinux_32.lds.S arch/x86/kernel/vmlinux_64.lds.S between
commit 091e52c3551d3031343df24b573b770b4c6c72b6 ("x86, vmlinux.lds: unify
remaining parts") from the x86 tree and commit
31df83f3f517b8ae49ba1f3fe9d5e3dd108a3e37 ("x86: Provide _sdata in the
vmlinux_*.lds.S files") from the kmemleak tree.

The former commit merges the two files while the latter modifies them.
I applied the patch below to the merged file.  I can carry this as
necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index 4c85b2e..0bbb2d1 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -107,6 +107,7 @@ SECTIONS
 
 	/* Data */
 	. = ALIGN(PAGE_SIZE);
+	_sdata = .;			/* Start of data section */
 	.data : AT(ADDR(.data) - LOAD_OFFSET) {
 		DATA_DATA
 		CONSTRUCTORS

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

* Re: linux-next: manual merge of the kmemleak tree with the x86 tree
  2009-05-07  5:54 linux-next: manual merge of the kmemleak tree with the x86 tree Stephen Rothwell
@ 2009-05-07  6:24 ` Sam Ravnborg
  2009-05-07  9:23 ` Ingo Molnar
  1 sibling, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2009-05-07  6:24 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Catalin Marinas, linux-next, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin

On Thu, May 07, 2009 at 03:54:44PM +1000, Stephen Rothwell wrote:
> Hi Catalin,
> 
> Today's linux-next merge of the kmemleak tree got a conflict in
> arch/x86/kernel/vmlinux_32.lds.S arch/x86/kernel/vmlinux_64.lds.S between
> commit 091e52c3551d3031343df24b573b770b4c6c72b6 ("x86, vmlinux.lds: unify
> remaining parts") from the x86 tree and commit
> 31df83f3f517b8ae49ba1f3fe9d5e3dd108a3e37 ("x86: Provide _sdata in the
> vmlinux_*.lds.S files") from the kmemleak tree.
> 
> The former commit merges the two files while the latter modifies them.
> I applied the patch below to the merged file.  I can carry this as
> necessary.
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> 
> diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
> index 4c85b2e..0bbb2d1 100644
> --- a/arch/x86/kernel/vmlinux.lds.S
> +++ b/arch/x86/kernel/vmlinux.lds.S
> @@ -107,6 +107,7 @@ SECTIONS
>  
>  	/* Data */
>  	. = ALIGN(PAGE_SIZE);
> +	_sdata = .;			/* Start of data section */
>  	.data : AT(ADDR(.data) - LOAD_OFFSET) {
>  		DATA_DATA
>  		CONSTRUCTORS

For a relocable kernel we need to put this symbol inside the
output section to aviod that it becomes absolute.

	Sam

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

* Re: linux-next: manual merge of the kmemleak tree with the x86 tree
  2009-05-07  5:54 linux-next: manual merge of the kmemleak tree with the x86 tree Stephen Rothwell
  2009-05-07  6:24 ` Sam Ravnborg
@ 2009-05-07  9:23 ` Ingo Molnar
  2009-05-07 10:37   ` Catalin Marinas
  2009-05-07 11:22   ` Stephen Rothwell
  1 sibling, 2 replies; 6+ messages in thread
From: Ingo Molnar @ 2009-05-07  9:23 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Catalin Marinas, linux-next, Thomas Gleixner, H. Peter Anvin,
	Sam Ravnborg


* Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Catalin,
> 
> Today's linux-next merge of the kmemleak tree got a conflict in
> arch/x86/kernel/vmlinux_32.lds.S arch/x86/kernel/vmlinux_64.lds.S between
> commit 091e52c3551d3031343df24b573b770b4c6c72b6 ("x86, vmlinux.lds: unify
> remaining parts") from the x86 tree and commit
> 31df83f3f517b8ae49ba1f3fe9d5e3dd108a3e37 ("x86: Provide _sdata in the
> vmlinux_*.lds.S files") from the kmemleak tree.
> 
> The former commit merges the two files while the latter modifies them.
> I applied the patch below to the merged file.  I can carry this as
> necessary.
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> 
> diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
> index 4c85b2e..0bbb2d1 100644
> --- a/arch/x86/kernel/vmlinux.lds.S
> +++ b/arch/x86/kernel/vmlinux.lds.S
> @@ -107,6 +107,7 @@ SECTIONS
>  
>  	/* Data */
>  	. = ALIGN(PAGE_SIZE);
> +	_sdata = .;			/* Start of data section */
>  	.data : AT(ADDR(.data) - LOAD_OFFSET) {
>  		DATA_DATA
>  		CONSTRUCTORS

At a quick glance, that line should be moved a line further down, to 
avoid a boot crash of linux-next with CONFIG_RELOCATABLE=y (which 
most distros ship with).

The kmemleak tree change should be submitted to the x86 tree as 
well, so we can merge it properly. (it's fine if the kmemleak tree 
has that commit too [it obviously needs it] - so there will still be 
a conflict - just the resolution will be a straightforward 'pick the 
x86 tree side' step.)

	Ingo

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

* Re: linux-next: manual merge of the kmemleak tree with the x86 tree
  2009-05-07  9:23 ` Ingo Molnar
@ 2009-05-07 10:37   ` Catalin Marinas
  2009-05-07 11:13     ` Ingo Molnar
  2009-05-07 11:22   ` Stephen Rothwell
  1 sibling, 1 reply; 6+ messages in thread
From: Catalin Marinas @ 2009-05-07 10:37 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Stephen Rothwell, linux-next, Thomas Gleixner, H. Peter Anvin,
	Sam Ravnborg

On Thu, 2009-05-07 at 11:23 +0200, Ingo Molnar wrote:
> * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
> > index 4c85b2e..0bbb2d1 100644
> > --- a/arch/x86/kernel/vmlinux.lds.S
> > +++ b/arch/x86/kernel/vmlinux.lds.S
> > @@ -107,6 +107,7 @@ SECTIONS
> >  
> >  	/* Data */
> >  	. = ALIGN(PAGE_SIZE);
> > +	_sdata = .;			/* Start of data section */
> >  	.data : AT(ADDR(.data) - LOAD_OFFSET) {
> >  		DATA_DATA
> >  		CONSTRUCTORS
> 
> At a quick glance, that line should be moved a line further down, to 
> avoid a boot crash of linux-next with CONFIG_RELOCATABLE=y (which 
> most distros ship with).

Fixed, see below (and changed Acked-by back to Cc).

> The kmemleak tree change should be submitted to the x86 tree as 
> well, so we can merge it properly.

OK, once you are fine with its new form.

> (it's fine if the kmemleak tree 
> has that commit too [it obviously needs it] - so there will still be 
> a conflict - just the resolution will be a straightforward 'pick the 
> x86 tree side' step.)

There may not be a conflict if the changes are identical (but it depends
on what else is in the x86 tree).


x86: Provide _sdata in the vmlinux_*.lds.S files

From: Catalin Marinas <catalin.marinas@arm.com>

_sdata is a common symbol defined by many architectures and made
available to the kernel via asm-generic/sections.h. Kmemleak uses this
symbol when scanning the data sections.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/vmlinux_32.lds.S |    1 +
 arch/x86/kernel/vmlinux_64.lds.S |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S
index 62ad500..171a534 100644
--- a/arch/x86/kernel/vmlinux_32.lds.S
+++ b/arch/x86/kernel/vmlinux_32.lds.S
@@ -64,6 +64,7 @@ SECTIONS
   /* writeable */
   . = ALIGN(PAGE_SIZE);
   .data : AT(ADDR(.data) - LOAD_OFFSET) {	/* Data */
+  _sdata = .;			/* Start of data section */
 	DATA_DATA
 	CONSTRUCTORS
 	} :data
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S
index c874250..121319f 100644
--- a/arch/x86/kernel/vmlinux_64.lds.S
+++ b/arch/x86/kernel/vmlinux_64.lds.S
@@ -59,6 +59,7 @@ SECTIONS
   . = ALIGN(PAGE_SIZE);		/* Align data segment to page size boundary */
 				/* Data */
   .data : AT(ADDR(.data) - LOAD_OFFSET) {
+  _sdata = .;			/* Start of data section */
 	DATA_DATA
 	CONSTRUCTORS
 	_edata = .;			/* End of data section */


-- 
Catalin

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

* Re: linux-next: manual merge of the kmemleak tree with the x86 tree
  2009-05-07 10:37   ` Catalin Marinas
@ 2009-05-07 11:13     ` Ingo Molnar
  0 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2009-05-07 11:13 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Stephen Rothwell, linux-next, Thomas Gleixner, H. Peter Anvin,
	Sam Ravnborg


* Catalin Marinas <catalin.marinas@arm.com> wrote:

> > (it's fine if the kmemleak tree has that commit too [it 
> > obviously needs it] - so there will still be a conflict - just 
> > the resolution will be a straightforward 'pick the x86 tree 
> > side' step.)
> 
> There may not be a conflict if the changes are identical (but it 
> depends on what else is in the x86 tree).

They will conflict, because the x86 tree has these changes in that 
area:

 arch/x86/kernel/vmlinux.lds.S             |  430 ++++++++++-
 arch/x86/kernel/vmlinux_32.lds.S          |  229 ------
 arch/x86/kernel/vmlinux_64.lds.S          |  298 -------

spread out in 15 commits.

	Ingo

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

* Re: linux-next: manual merge of the kmemleak tree with the x86 tree
  2009-05-07  9:23 ` Ingo Molnar
  2009-05-07 10:37   ` Catalin Marinas
@ 2009-05-07 11:22   ` Stephen Rothwell
  1 sibling, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2009-05-07 11:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Catalin Marinas, linux-next, Thomas Gleixner, H. Peter Anvin,
	Sam Ravnborg

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

Hi Ingo,

On Thu, 7 May 2009 11:23:10 +0200 Ingo Molnar <mingo@elte.hu> wrote:
>
> * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
> > index 4c85b2e..0bbb2d1 100644
> > --- a/arch/x86/kernel/vmlinux.lds.S
> > +++ b/arch/x86/kernel/vmlinux.lds.S
> > @@ -107,6 +107,7 @@ SECTIONS
> >  
> >  	/* Data */
> >  	. = ALIGN(PAGE_SIZE);
> > +	_sdata = .;			/* Start of data section */
> >  	.data : AT(ADDR(.data) - LOAD_OFFSET) {
> >  		DATA_DATA
> >  		CONSTRUCTORS
> 
> At a quick glance, that line should be moved a line further down, to 
> avoid a boot crash of linux-next with CONFIG_RELOCATABLE=y (which 
> most distros ship with).

Thanks, Sam pointed that out as well. This is, of course, why I publish
these "fixups" - so that those with more knowledge can correct them.
I'll correct my fixup for tomorrow.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

end of thread, other threads:[~2009-05-07 11:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-07  5:54 linux-next: manual merge of the kmemleak tree with the x86 tree Stephen Rothwell
2009-05-07  6:24 ` Sam Ravnborg
2009-05-07  9:23 ` Ingo Molnar
2009-05-07 10:37   ` Catalin Marinas
2009-05-07 11:13     ` Ingo Molnar
2009-05-07 11:22   ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).