module: set __jump_table alignment to 8
Subsystems (2)
PATCH 1/1 module: set __jump_table alignment to 8
For powerpc the __jump_table section in modules is not aligned, this causes a WARN_ON() splat when loading a module containing a __jump_table.
Strict alignment became necessary with commit 3821fd35b58d ("jump_label: Reduce the size of struct static_key"), currently in linux-next, which uses the two least significant bits of pointers to __jump_table elements.
Fix by forcing __jump_table to 8, which is the same alignment used for this section in the kernel proper.
--- scripts/module-common.lds | 2 ++ 1 file changed, 2 insertions(+)
scripts/module-common.lds +2 -0
@@ -19,4 +19,6 @@ SECTIONS { . = ALIGN(8); .init_array 0 : { *(SORT(.init_array.*)) *(.init_array) } + + __jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) } }
Signature · 1 line
2.9.3
Quoted 2 lines · David Daney
For powerpc the
__jump_tablesection in modules is not aligned, this causes aWARN_ON()splat when loading a module containing a__jump_table.
Thanks for doing the patch.
If it helps:
Quoted 4 lines
Strict alignment became necessary with commit
3821fd35b58d("jump_label: Reduce the size of structstatic_key"), currently in linux-next, which uses the two least significant bits of pointers to__jump_tableelements.
It would obviously be nice if this could go in before the commit that exposes the breakage, but I guess that's problematic because Steve doesn't want to rebase the tracing tree.
Steve I think you've already sent your pull request for this cycle? So I guess if this can go in your first batch of fixes?
Or we could just send it directly to Linus?
cheers
Quoted 22 lines
Fix by forcing
__jump_tableto 8, which is the same alignment used for this section in the kernel proper.Signed-off-by David Daney <[email protected]>Tested-by Sachin Sant <[email protected]>--- scripts/module-common.lds | 2 ++ 1 file changed, 2 insertions(+)scripts/module-common.lds +2
-0@@ -19,4 +19,6 @@ SECTIONS { . = ALIGN(8); .init_array 0 : { *(SORT(.init_array.*)) *(.init_array) } + + __jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) } }Signature · 1 line
2.9.3
Quoted 6 lines · Michael Ellerman
Quoted 4 lines · David Daney
Strict alignment became necessary with commit
3821fd35b58d("jump_label: Reduce the size of structstatic_key"), currently in linux-next, which uses the two least significant bits of pointers to__jump_tableelements.
Quoted 6 lines
It would obviously be nice if this could go in before the commit that exposes the breakage, but I guess that's problematic because Steve doesn't want to rebase the tracing tree.
Steve I think you've already sent your pull request for this cycle? So I guess if this can go in your first batch of fixes?
Ugh. Was looking at the wrong tree - Linus has already merged the commit in question, so the above is all moot.
cheers
Quoted 11 lines · On Thu, 02 Mar 2017 22:18:30 +1100 Michael Ellerman <[email protected]> wrote:
Quoted 10 lines · Michael Ellerman
Quoted 4 lines · David Daney
Strict alignment became necessary with commit
3821fd35b58d("jump_label: Reduce the size of structstatic_key"), currently in linux-next, which uses the two least significant bits of pointers to__jump_tableelements.It would obviously be nice if this could go in before the commit that exposes the breakage, but I guess that's problematic because Steve doesn't want to rebase the tracing tree.
Quoted 5 lines
Quoted 2 lines
Steve I think you've already sent your pull request for this cycle? So I guess if this can go in your first batch of fixes?
Ugh. Was looking at the wrong tree - Linus has already merged the commit in question, so the above is all moot.
No problem. I've got some other "fixes" to push to Linus. That's what the -rc releases are for. To fix up breakage from the merge window ;-)
I'll pull this into my tree.
Thanks!
-- Steve
Quoted 13 lines · Steven Rostedt
Quoted 11 lines · On Thu, 02 Mar 2017 22:18:30 +1100 Michael Ellerman <[email protected]> wrote:
Quoted 10 lines · Michael Ellerman
Quoted 4 lines · David Daney
Strict alignment became necessary with commit
3821fd35b58d("jump_label: Reduce the size of structstatic_key"), currently in linux-next, which uses the two least significant bits of pointers to__jump_tableelements.It would obviously be nice if this could go in before the commit that exposes the breakage, but I guess that's problematic because Steve doesn't want to rebase the tracing tree.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Steve I think you've already sent your pull request for this cycle? So I guess if this can go in your first batch of fixes?
Ugh. Was looking at the wrong tree - Linus has already merged the commit in question, so the above is all moot.
No problem. I've got some other "fixes" to push to Linus. That's what the -rc releases are for. To fix up breakage from the merge window ;-)
Yep, no drama.
Quoted 1 line
I'll pull this into my tree.
Thanks.
cheers
Quoted 8 lines · David Daney
For powerpc the
__jump_tablesection in modules is not aligned, this causes aWARN_ON()splat when loading a module containing a__jump_table.Strict alignment became necessary with commit
3821fd35b58d("jump_label: Reduce the size of structstatic_key"), currently in linux-next, which uses the two least significant bits of pointers to__jump_tableelements.
Quoted 6 lines
Fix by forcing
__jump_tableto 8, which is the same alignment used for this section in the kernel proper.Signed-off-by David Daney <[email protected]>Tested-by Sachin Sant <[email protected]>---
Looks good to me.
Thanks,
-Jason
Can I get an Ack from a module maintainer?
Thanks!
-- Steve
Quoted 28 lines · On Wed, 1 Mar 2017 14:04:53 -0800 David Daney <[email protected]> wrote:
For powerpc the
__jump_tablesection in modules is not aligned, this causes aWARN_ON()splat when loading a module containing a__jump_table.Strict alignment became necessary with commit
3821fd35b58d("jump_label: Reduce the size of structstatic_key"), currently in linux-next, which uses the two least significant bits of pointers to__jump_tableelements.Fix by forcing
__jump_tableto 8, which is the same alignment used for this section in the kernel proper.Signed-off-by David Daney <[email protected]>Tested-by Sachin Sant <[email protected]>--- scripts/module-common.lds | 2 ++ 1 file changed, 2 insertions(+)scripts/module-common.lds +2
-0@@ -19,4 +19,6 @@ SECTIONS { . = ALIGN(8); .init_array 0 : { *(SORT(.init_array.*)) *(.init_array) } + + __jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) } }
Jessica Yu
Acked-by+++ Steven Rostedt [02/03/17 13:11 -0500]:
Quoted 2 lines
Can I get an Ack from a module maintainer?
Thanks!
Jessica
Quoted 32 lines
Quoted 28 lines · On Wed, 1 Mar 2017 14:04:53 -0800 David Daney <[email protected]> wrote:
For powerpc the
__jump_tablesection in modules is not aligned, this causes aWARN_ON()splat when loading a module containing a__jump_table.Strict alignment became necessary with commit
3821fd35b58d("jump_label: Reduce the size of structstatic_key"), currently in linux-next, which uses the two least significant bits of pointers to__jump_tableelements.Fix by forcing
__jump_tableto 8, which is the same alignment used for this section in the kernel proper.Signed-off-by David Daney <[email protected]>Tested-by Sachin Sant <[email protected]>--- scripts/module-common.lds | 2 ++ 1 file changed, 2 insertions(+)scripts/module-common.lds +2
-0@@ -19,4 +19,6 @@ SECTIONS { . = ALIGN(8); .init_array 0 : { *(SORT(.init_array.*)) *(.init_array) } + + __jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) } }
Quoted 9 lines · Jessica Yu
+++ Steven Rostedt [02/03/17 13:11 -0500]:
Quoted 2 lines
Can I get an Ack from a module maintainer?
Acked-by Jessica Yu <[email protected]>Thanks!
Jessica
Thanks Jessica,
Can you also add scripts/module-common.lds to MAINTAINERS so that get_maintainers.pl will indicate that Jessica Yu and Rusty Russell be CCed on things like this in the future?
Quoted 34 lines
Quoted 34 lines
Quoted 29 lines · On Wed, 1 Mar 2017 14:04:53 -0800 David Daney <[email protected]> wrote:
For powerpc the
__jump_tablesection in modules is not aligned, this causes aWARN_ON()splat when loading a module containing a__jump_table.Strict alignment became necessary with commit
3821fd35b58d("jump_label: Reduce the size of structstatic_key"), currently in linux-next, which uses the two least significant bits of pointers to__jump_tableelements.Fix by forcing
__jump_tableto 8, which is the same alignment used for this section in the kernel proper.Signed-off-by David Daney <[email protected]>Tested-by Sachin Sant <[email protected]>--- scripts/module-common.lds | 2 ++ 1 file changed, 2 insertions(+)scripts/module-common.lds +2
-0@@ -19,4 +19,6 @@ SECTIONS { . = ALIGN(8); .init_array 0 : { *(SORT(.init_array.*)) *(.init_array) } + + __jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) } }
+++ David Daney [02/03/17 11:24 -0800]:
Quoted 9 lines · Jessica Yu
Quoted 8 lines
+++ Steven Rostedt [02/03/17 13:11 -0500]:
Quoted 2 lines
Can I get an Ack from a module maintainer?
Acked-by Jessica Yu <[email protected]>Thanks!
Quoted 7 lines
Quoted 1 line
Jessica
Thanks Jessica,
Can you also add
scripts/module-common.ldstoMAINTAINERSso that get_maintainers.pl will indicate that Jessica Yu and Rusty Russell be CCed on things like this in the future?
Sure thing. Thanks for the heads up!
Jessica
Quoted 34 lines
Quoted 33 lines
Quoted 33 lines
Quoted 29 lines · On Wed, 1 Mar 2017 14:04:53 -0800 David Daney <[email protected]> wrote:
For powerpc the
__jump_tablesection in modules is not aligned, this causes aWARN_ON()splat when loading a module containing a__jump_table.Strict alignment became necessary with commit
3821fd35b58d("jump_label: Reduce the size of structstatic_key"), currently in linux-next, which uses the two least significant bits of pointers to__jump_tableelements.Fix by forcing
__jump_tableto 8, which is the same alignment used for this section in the kernel proper.Signed-off-by David Daney <[email protected]>Tested-by Sachin Sant <[email protected]>---
scripts/module-common.lds| 2 ++1 file changed, 2 insertions(+)scripts/module-common.lds +2
-0@@ -19,4 +19,6 @@ SECTIONS { . = ALIGN(8); .init_array 0 : { *(SORT(.init_array.*)) *(.init_array) } + + __jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) } }