summaryrefslogtreecommitdiff
path: root/kernel/extable.c
AgeCommit message (Collapse)Author
2004-06-26[PATCH] Fix race between CONFIG_DEBUG_SLABALLOC and modulesRusty Russell
store_stackinfo() does an unlocked module list walk during normal runtime which opens up a race with the module load/unload code. This can be triggered by simply unloading and loading a module in a loop with CONFIG_DEBUG_PAGEALLOC resulting in store_stackinfo() tripping over bad list pointers. kernel_text_address doesn't take any locks, because during an OOPS we don't want to deadlock. Rename that to __kernel_text_address, and make kernel_text_address take the lock. Signed-off-by: Zwane Mwaikambo <zwane@fsmlabs.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (modified) Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-01-19[PATCH] sort exception tablesPaul Mackerras
This patch arranges for the exception tables to be sorted on most architectures. It sorts the main kernel exception table on startup and the module exception tables when they get loaded. The main table is sorted reasonably early - just after kmem_cache_init - but that could be moved even earlier if necessary. There is now a lib/extable.c which includes the sort_extable() function from arch/ppc/mm/extable.c and the search_extable() function from arch/i386/mm/extable.c, which had been copied to many architectures. On many architectures, arch/$(ARCH)/mm/extable.c became empty and so I have removed it. There are four architectures which do things differently from i386: alpha, ia64, sparc and sparc64. Alpha and ia64 store the offset from the offset from the exception table entry to the instruction, and sparc and sparc64 have range entries in the table. For those architectures I have added empty sort_extable functions. The maintainers for those architectures can implement something better if they care to. As it is they are no worse off than before. Although it is a moderately sizable patch, it ends up with a net reduction of 377 lines in the size of the kernel source. :) I have tested this on x86 and ppc with a module that uses __get_user in an init function, deliberately laid out to get the exception table out of order, and it works (whereas it oopsed without this patch).
2003-07-18[PATCH] Centralize Linker SymbolsRusty Russell
Richard Henderson point out a while back that linker generated symbols should be declared as: "char _text[]" so that the compiler can't make assumptions about them sitting in small sections, etc. Centralize these defintions in asm/sections.h (where some already are on x86).
2003-04-12[PATCH] Put all functions in kallsymsAndrew Morton
From: Rusty Russell <rusty@rustcorp.com.au> Introduce _sinittext and _einittext (cf. _stext and _etext), so kallsyms includes __init functions. TODO: Use huffman name compression and 16-bit offsets (see IDE oopser patch)
2003-04-01[PATCH] Extable list removalRusty Russell
This removes the extable list, and the struct exception_table, in favour of just iterating through the modules. Now all iteration is within kernel/module.c, this is a fairly trivial cleanup.
2003-04-01[PATCH] module_text_address returns the module pointerRusty Russell
By making module_text_address return the module it found, we simplify symbol_put_addr significantly.
2003-01-05[PATCH] Remove mod_bound macro and unify kernel_text_address().Rusty Russell
Various archs (i386, m68k, s390, s390x, m68k, parisc, um, x86_64) implement kernel_text_address. Put this in kernel/extable.c, and the module iteration inside module.c. Other than cleanliness, this finally allows the module list and lock to be static to kernel/module.c (you didn't think I actually cared about those archs did you?) It also drops the module->init_size to zero when it's discarded, so bounds checking is simplified (and the /proc/modules size statistic will be more accurate, too).
2003-01-05[PATCH] Exception table cleanupRusty Russell
This patch combines the common exception table searching functionality for various architectures, to avoid unneccessary (and currently buggy) duplication, and so that the exception table list and lock can be kept private to module.c. The archs provide "struct exception_table" and "search_extable": the generic infrastructure drives the rest.
2003-01-05[PATCH] MODULE_LICENSE and EXPORT_SYMBOL_GPL supportRusty Russell
This implements EXPORT_SYMBOL_GPL and MODULE_LICENSE properly (so restrictions are enforced). Also fixes "proprietory" spelling.
2002-11-18Parts of "module.c" was needed even when no module supportLinus Torvalds
was enabled, so split it up into "extable.c"