Buildtime exception table sorting for relative entries.
PATCH 2/2 Revert "x86, extable: Disable presorted exception table for now"
In reply to David DaneyFrom: David Daney <[email protected]>
sortextable now works with relative entries, re-enable it.
--- arch/x86/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/Kconfig +1 -0
@@ -82,6 +82,7 @@ config X86 select ARCH_HAVE_NMI_SAFE_CMPXCHG select GENERIC_IOMAP select DCACHE_WORD_ACCESS if !DEBUG_PAGEALLOC + select BUILDTIME_EXTABLE_SORT config INSTRUCTION_DECODER def_bool (KPROBES || PERF_EVENTS)
Signature · 1 line
1.7.7.6
cover Buildtime exception table sorting for relative entries.
From: David Daney <[email protected]>
These are against HPA's x86/extable branch in the tip repo.
Light testing indicates that it works for x86_64, and MIPS64. x86_32 looks good, but I didn't try to boot the resulting kernel. But really, what could go wrong with something so simple?
David Daney (2):
scripts/sortextable: Handle relative entries, and other cleanups. Revert "x86, extable: Disable presorted exception table for now"
arch/x86/Kconfig | 1 + scripts/Makefile | 2 + scripts/sortextable.c | 171 ++++++++++++++++++++++++++++++++----------------- scripts/sortextable.h | 79 +++++++++++++++-------- 4 files changed, 165 insertions(+), 88 deletions(-)
Signature · 1 line
1.7.7.6
PATCH 1/2 scripts/sortextable: Handle relative entries, and other cleanups.
From: David Daney <[email protected]>
x86 is now using relative rather than absolute addresses in its exception table, so we add a sorter for these. If there are relocations on the __ex_table section, they are redundant after the sort, so they are zeroed out leaving them valid and consistent.
Also use the unaligned safe accessors from tools/{be,le}_byteshift.h
--- scripts/Makefile | 2 + scripts/sortextable.c | 171 ++++++++++++++++++++++++++++++++----------------- scripts/sortextable.h | 79 +++++++++++++++-------- 3 files changed, 164 insertions(+), 88 deletions(-)
scripts/Makefile +2 -0
@@ -15,6 +15,8 @@ hostprogs-$(CONFIG_IKCONFIG) += bin2c hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount hostprogs-$(CONFIG_BUILDTIME_EXTABLE_SORT) += sortextable +HOSTCFLAGS_sortextable.o = -I$(srctree)/tools/include + always := $(hostprogs-y) $(hostprogs-m) # The following hostprogs-y programs are only build on demand
scripts/sortextable.c +111 -60
256 lines not on this page · raw message
scripts/sortextable.h +51 -28
149 lines not on this page · raw message
Signature · 1 line
1.7.7.6
[tip:x86/extable] scripts/sortextable: Handle relative entries, and other cleanups
Commit-ID: d59a16836d917548cf41eda3369936684d527f5f Gitweb: http://git.kernel.org/tip/d59a16836d917548cf41eda3369936684d527f5f Author: David Daney <[email protected]> AuthorDate: Tue, 24 Apr 2012 11:23:14 -0700 Committer: H. Peter Anvin <[email protected]> CommitDate: Tue, 24 Apr 2012 11:42:20 -0700
scripts/sortextable: Handle relative entries, and other cleanups
x86 is now using relative rather than absolute addresses in its exception table, so we add a sorter for these. If there are relocations on the __ex_table section, they are redundant and probably incorrect after the sort, so they are zeroed out leaving them valid and consistent.
Also use the unaligned safe accessors from tools/{be,le}_byteshift.h
--- scripts/Makefile | 2 + scripts/sortextable.c | 171 ++++++++++++++++++++++++++++++++----------------- scripts/sortextable.h | 79 +++++++++++++++-------- 3 files changed, 164 insertions(+), 88 deletions(-)
scripts/Makefile +2 -0
@@ -15,6 +15,8 @@ hostprogs-$(CONFIG_IKCONFIG) += bin2c hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount hostprogs-$(CONFIG_BUILDTIME_EXTABLE_SORT) += sortextable +HOSTCFLAGS_sortextable.o = -I$(srctree)/tools/include + always := $(hostprogs-y) $(hostprogs-m) # The following hostprogs-y programs are only build on demand
scripts/sortextable.c +111 -60
256 lines not on this page · raw message
scripts/sortextable.h +51 -28
149 lines not on this page · raw message
[tip:x86/extable] Revert "x86, extable: Disable presorted exception table for now"
In reply to David DaneyCommit-ID: 8b5ad472991796b2347464922c72de2ca5a028f3 Gitweb: http://git.kernel.org/tip/8b5ad472991796b2347464922c72de2ca5a028f3 Author: David Daney <[email protected]> AuthorDate: Tue, 24 Apr 2012 11:23:15 -0700 Committer: H. Peter Anvin <[email protected]> CommitDate: Tue, 24 Apr 2012 11:42:25 -0700
Revert "x86, extable: Disable presorted exception table for now"
sortextable now works with relative entries, re-enable it.
--- arch/x86/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/Kconfig +1 -0
@@ -82,6 +82,7 @@ config X86 select ARCH_HAVE_NMI_SAFE_CMPXCHG select GENERIC_IOMAP select DCACHE_WORD_ACCESS if !DEBUG_PAGEALLOC + select BUILDTIME_EXTABLE_SORT config INSTRUCTION_DECODER def_bool (KPROBES || PERF_EVENTS)