diff mbox

[3.19.y-ckt,stable] Patch "powerpc: Simplify module TOC handling" has been added to the 3.19.y-ckt tree

Message ID 20160209231930.GA11459@bubble.grove.modra.org
State New
Headers show

Commit Message

Alan Modra Feb. 9, 2016, 11:19 p.m. UTC
On Tue, Feb 09, 2016 at 02:41:48PM -0800, Kamal Mostafa wrote:
> This is a note to let you know that I have just added a patch titled
> 
>     powerpc: Simplify module TOC handling
> 
> to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree 
> which can be found at:
> 
>     http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue

Please also add this followup patch by Anton:

https://build.opensuse.org/package/view_file/Base:System/kmod/depmod-Ignore_PowerPC64_ABIv2_.TOC.symbol.patch

depmod: Ignore PowerPC64 ABIv2 .TOC. symbol

The .TOC. symbol on the PowerPC64 ABIv2 identifies the GOT
pointer, similar to how other architectures use _GLOBAL_OFFSET_TABLE_.

This is not a symbol that needs relocation, and should be ignored
by depmod.

---
 tools/depmod.c | 2 ++
 1 file changed, 2 insertions(+)

--
2.5.0

Comments

Kamal Mostafa Feb. 10, 2016, 7:53 p.m. UTC | #1
On Wed, 2016-02-10 at 09:49 +1030, Alan Modra wrote:
> On Tue, Feb 09, 2016 at 02:41:48PM -0800, Kamal Mostafa wrote:
> > This is a note to let you know that I have just added a patch titled
> > 
> >     powerpc: Simplify module TOC handling
> > 
> > to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree 
> > which can be found at:
> > 
> >     http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue

Hi Alan-

Thanks for your review, but I'm not sure what to do with this:

> Please also add this followup patch by Anton:
> 
> https://build.opensuse.org/package/view_file/Base:System/kmod/depmod-Ignore_PowerPC64_ABIv2_.TOC.symbol.patch
> 
> depmod: Ignore PowerPC64 ABIv2 .TOC. symbol

That ("depmod: Ignore PowerPC64 ABIv2 .TOC. symbol") is a patch to
'kmod' which is not part of the kernel source tree.  So I can't include
that patch in a stable kernel release -- each distro's kmod package
would have to do that.

Unless there are any objections, I'll proceed to include the kernel
patch ("powerpc: Simplify module TOC handling") in stable kernels.

 -Kamal


> The .TOC. symbol on the PowerPC64 ABIv2 identifies the GOT
> pointer, similar to how other architectures use _GLOBAL_OFFSET_TABLE_.
> 
> This is not a symbol that needs relocation, and should be ignored
> by depmod.
> 
> ---
>  tools/depmod.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/depmod.c b/tools/depmod.c
> index 6e9bb4d..a2e07c1 100644
> --- a/tools/depmod.c
> +++ b/tools/depmod.c
> @@ -2153,6 +2153,8 @@ static void depmod_add_fake_syms(struct depmod *depmod)
>  	depmod_symbol_add(depmod, "__this_module", true, 0, NULL);
>  	/* On S390, this is faked up too */
>  	depmod_symbol_add(depmod, "_GLOBAL_OFFSET_TABLE_", true, 0, NULL);
> +	/* On PowerPC64 ABIv2, .TOC. is more or less _GLOBAL_OFFSET_TABLE_ */
> +	depmod_symbol_add(depmod, "TOC.", true, 0, NULL);
>  }
> 
>  static int depmod_load_symvers(struct depmod *depmod, const char *filename)
> --
> 2.5.0
>
Kamal Mostafa Feb. 11, 2016, 8:11 p.m. UTC | #2
> > On Tue, Feb 09, 2016 at 02:41:48PM -0800, Kamal Mostafa wrote:
> > > This is a note to let you know that I have just added a patch titled
> > >     powerpc: Simplify module TOC handling
> > > to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree 

> On Wed, 2016-02-10 at 09:49 +1030, Alan Modra wrote:
> > Please also add this followup patch by Anton:
> > https://build.opensuse.org/package/view_file/Base:System/kmod/depmod-Ignore_PowerPC64_ABIv2_.TOC.symbol.patch
> > depmod: Ignore PowerPC64 ABIv2 .TOC. symbol

On Wed, 2016-02-10 at 11:53 -0800, Kamal Mostafa wrote:
> That ("depmod: Ignore PowerPC64 ABIv2 .TOC. symbol") is a patch to
> 'kmod' which is not part of the kernel source tree.  So I can't include
> that patch in a stable kernel release -- each distro's kmod package
> would have to do that.

Okay, I now realize that the stable kernel patch ("powerpc: Simplify
module TOC handling") will break the ppc64 build for hosts that don't
have that depmod patch.

So, pending any further discussion here, I'm going to drop this from 4.2
and 3.19 -stable after all:

c153693d powerpc: Simplify module TOC handling

Sasha, note that you have this queued-up for 4.1 and 3.18 -stable. You
might consider dropping it also.

 -Kamal
Michael Ellerman Feb. 15, 2016, 9:22 a.m. UTC | #3
On Thu, 2016-02-11 at 12:11 -0800, Kamal Mostafa wrote:
> > > On Tue, Feb 09, 2016 at 02:41:48PM -0800, Kamal Mostafa wrote:
> > > > This is a note to let you know that I have just added a patch titled
> > > >     powerpc: Simplify module TOC handling
> > > > to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree 
> 
> > On Wed, 2016-02-10 at 09:49 +1030, Alan Modra wrote:
> > > Please also add this followup patch by Anton:
> > > https://build.opensuse.org/package/view_file/Base:System/kmod/depmod-Ignore_PowerPC64_ABIv2_.TOC.symbol.patch
> > > depmod: Ignore PowerPC64 ABIv2 .TOC. symbol
> 
> On Wed, 2016-02-10 at 11:53 -0800, Kamal Mostafa wrote:
>
> > That ("depmod: Ignore PowerPC64 ABIv2 .TOC. symbol") is a patch to
> > 'kmod' which is not part of the kernel source tree.  So I can't include
> > that patch in a stable kernel release -- each distro's kmod package
> > would have to do that.
> 
> Okay, I now realize that the stable kernel patch ("powerpc: Simplify
> module TOC handling") will break the ppc64 build for hosts that don't
> have that depmod patch.
> 
> So, pending any further discussion here, I'm going to drop this from 4.2
> and 3.19 -stable after all:
> 
> c153693d powerpc: Simplify module TOC handling

Yep, OK.

For some reason my build process didn't catch the failure, so I didn't realise
the depmod patch was required when I merged it.

The dilemma we have now is if we don't backport it then the branches that don't
have it won't be able to build with future binutils. But I guess that's a
problem for the future whereas the depmod breakage is happening right now.

cheers
diff mbox

Patch

diff --git a/tools/depmod.c b/tools/depmod.c
index 6e9bb4d..a2e07c1 100644
--- a/tools/depmod.c
+++ b/tools/depmod.c
@@ -2153,6 +2153,8 @@  static void depmod_add_fake_syms(struct depmod *depmod)
 	depmod_symbol_add(depmod, "__this_module", true, 0, NULL);
 	/* On S390, this is faked up too */
 	depmod_symbol_add(depmod, "_GLOBAL_OFFSET_TABLE_", true, 0, NULL);
+	/* On PowerPC64 ABIv2, .TOC. is more or less _GLOBAL_OFFSET_TABLE_ */
+	depmod_symbol_add(depmod, "TOC.", true, 0, NULL);
 }

 static int depmod_load_symvers(struct depmod *depmod, const char *filename)