Commit f1883f86dea84fe47a71a39fc1afccc005915ed8
Committed by
Linus Torvalds
1 parent
eaccbfa564
Exists in
master
and in
4 other branches
Remove remaining unwinder code
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Gabor Gombas <gombasg@sztaki.hu> Cc: Jan Beulich <jbeulich@novell.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Ingo Molnar <mingo@elte.hu>, Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 7 changed files with 0 additions and 105 deletions Side-by-side Diff
arch/x86/include/asm/unwind.h
1 | -#ifndef _ASM_X86_UNWIND_H | |
2 | -#define _ASM_X86_UNWIND_H | |
3 | - | |
4 | -#define UNW_PC(frame) ((void)(frame), 0UL) | |
5 | -#define UNW_SP(frame) ((void)(frame), 0UL) | |
6 | -#define UNW_FP(frame) ((void)(frame), 0UL) | |
7 | - | |
8 | -static inline int arch_unw_user_mode(const void *info) | |
9 | -{ | |
10 | - return 0; | |
11 | -} | |
12 | - | |
13 | -#endif /* _ASM_X86_UNWIND_H */ |
arch/x86/kernel/traps.c
... | ... | @@ -20,7 +20,6 @@ |
20 | 20 | #include <linux/module.h> |
21 | 21 | #include <linux/ptrace.h> |
22 | 22 | #include <linux/string.h> |
23 | -#include <linux/unwind.h> | |
24 | 23 | #include <linux/delay.h> |
25 | 24 | #include <linux/errno.h> |
26 | 25 | #include <linux/kexec.h> |
... | ... | @@ -51,7 +50,6 @@ |
51 | 50 | #include <asm/debugreg.h> |
52 | 51 | #include <asm/atomic.h> |
53 | 52 | #include <asm/system.h> |
54 | -#include <asm/unwind.h> | |
55 | 53 | #include <asm/traps.h> |
56 | 54 | #include <asm/desc.h> |
57 | 55 | #include <asm/i387.h> |
include/linux/module.h
... | ... | @@ -294,9 +294,6 @@ |
294 | 294 | /* The size of the executable code in each section. */ |
295 | 295 | unsigned int init_text_size, core_text_size; |
296 | 296 | |
297 | - /* The handle returned from unwind_add_table. */ | |
298 | - void *unwind_info; | |
299 | - | |
300 | 297 | /* Arch-specific module values */ |
301 | 298 | struct mod_arch_specific arch; |
302 | 299 |
include/linux/unwind.h
1 | -#ifndef _LINUX_UNWIND_H | |
2 | -#define _LINUX_UNWIND_H | |
3 | - | |
4 | -/* | |
5 | - * Copyright (C) 2002-2006 Novell, Inc. | |
6 | - * Jan Beulich <jbeulich@novell.com> | |
7 | - * This code is released under version 2 of the GNU GPL. | |
8 | - * | |
9 | - * A simple API for unwinding kernel stacks. This is used for | |
10 | - * debugging and error reporting purposes. The kernel doesn't need | |
11 | - * full-blown stack unwinding with all the bells and whistles, so there | |
12 | - * is not much point in implementing the full Dwarf2 unwind API. | |
13 | - */ | |
14 | - | |
15 | -struct module; | |
16 | - | |
17 | -struct unwind_frame_info {}; | |
18 | - | |
19 | -static inline void unwind_init(void) {} | |
20 | -static inline void unwind_setup(void) {} | |
21 | - | |
22 | -#ifdef CONFIG_MODULES | |
23 | - | |
24 | -static inline void *unwind_add_table(struct module *mod, | |
25 | - const void *table_start, | |
26 | - unsigned long table_size) | |
27 | -{ | |
28 | - return NULL; | |
29 | -} | |
30 | - | |
31 | -static inline void unwind_remove_table(void *handle, int init_only) | |
32 | -{ | |
33 | -} | |
34 | - | |
35 | -#endif | |
36 | - | |
37 | -static inline int unwind_init_frame_info(struct unwind_frame_info *info, | |
38 | - struct task_struct *tsk, | |
39 | - const struct pt_regs *regs) | |
40 | -{ | |
41 | - return -ENOSYS; | |
42 | -} | |
43 | - | |
44 | -static inline int unwind_init_blocked(struct unwind_frame_info *info, | |
45 | - struct task_struct *tsk) | |
46 | -{ | |
47 | - return -ENOSYS; | |
48 | -} | |
49 | - | |
50 | -static inline int unwind_init_running(struct unwind_frame_info *info, | |
51 | - asmlinkage int (*cb)(struct unwind_frame_info *, | |
52 | - void *arg), | |
53 | - void *arg) | |
54 | -{ | |
55 | - return -ENOSYS; | |
56 | -} | |
57 | - | |
58 | -static inline int unwind(struct unwind_frame_info *info) | |
59 | -{ | |
60 | - return -ENOSYS; | |
61 | -} | |
62 | - | |
63 | -static inline int unwind_to_user(struct unwind_frame_info *info) | |
64 | -{ | |
65 | - return -ENOSYS; | |
66 | -} | |
67 | - | |
68 | -#endif /* _LINUX_UNWIND_H */ |
init/main.c
... | ... | @@ -50,7 +50,6 @@ |
50 | 50 | #include <linux/rmap.h> |
51 | 51 | #include <linux/mempolicy.h> |
52 | 52 | #include <linux/key.h> |
53 | -#include <linux/unwind.h> | |
54 | 53 | #include <linux/buffer_head.h> |
55 | 54 | #include <linux/page_cgroup.h> |
56 | 55 | #include <linux/debug_locks.h> |
... | ... | @@ -537,7 +536,6 @@ |
537 | 536 | * Need to run as early as possible, to initialize the |
538 | 537 | * lockdep hash: |
539 | 538 | */ |
540 | - unwind_init(); | |
541 | 539 | lockdep_init(); |
542 | 540 | debug_objects_early_init(); |
543 | 541 | cgroup_init_early(); |
... | ... | @@ -559,7 +557,6 @@ |
559 | 557 | setup_arch(&command_line); |
560 | 558 | mm_init_owner(&init_mm, &init_task); |
561 | 559 | setup_command_line(command_line); |
562 | - unwind_setup(); | |
563 | 560 | setup_per_cpu_areas(); |
564 | 561 | setup_nr_cpu_ids(); |
565 | 562 | smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */ |
kernel/module.c
... | ... | @@ -43,7 +43,6 @@ |
43 | 43 | #include <linux/device.h> |
44 | 44 | #include <linux/string.h> |
45 | 45 | #include <linux/mutex.h> |
46 | -#include <linux/unwind.h> | |
47 | 46 | #include <linux/rculist.h> |
48 | 47 | #include <asm/uaccess.h> |
49 | 48 | #include <asm/cacheflush.h> |
... | ... | @@ -1449,8 +1448,6 @@ |
1449 | 1448 | remove_sect_attrs(mod); |
1450 | 1449 | mod_kobject_remove(mod); |
1451 | 1450 | |
1452 | - unwind_remove_table(mod->unwind_info, 0); | |
1453 | - | |
1454 | 1451 | /* Arch-specific cleanup. */ |
1455 | 1452 | module_arch_cleanup(mod); |
1456 | 1453 | |
... | ... | @@ -1867,7 +1864,6 @@ |
1867 | 1864 | unsigned int symindex = 0; |
1868 | 1865 | unsigned int strindex = 0; |
1869 | 1866 | unsigned int modindex, versindex, infoindex, pcpuindex; |
1870 | - unsigned int unwindex = 0; | |
1871 | 1867 | unsigned int num_kp, num_mcount; |
1872 | 1868 | struct kernel_param *kp; |
1873 | 1869 | struct module *mod; |
... | ... | @@ -1957,9 +1953,6 @@ |
1957 | 1953 | versindex = find_sec(hdr, sechdrs, secstrings, "__versions"); |
1958 | 1954 | infoindex = find_sec(hdr, sechdrs, secstrings, ".modinfo"); |
1959 | 1955 | pcpuindex = find_pcpusec(hdr, sechdrs, secstrings); |
1960 | -#ifdef ARCH_UNWIND_SECTION_NAME | |
1961 | - unwindex = find_sec(hdr, sechdrs, secstrings, ARCH_UNWIND_SECTION_NAME); | |
1962 | -#endif | |
1963 | 1956 | |
1964 | 1957 | /* Don't keep modinfo and version sections. */ |
1965 | 1958 | sechdrs[infoindex].sh_flags &= ~(unsigned long)SHF_ALLOC; |
... | ... | @@ -1969,8 +1962,6 @@ |
1969 | 1962 | sechdrs[symindex].sh_flags |= SHF_ALLOC; |
1970 | 1963 | sechdrs[strindex].sh_flags |= SHF_ALLOC; |
1971 | 1964 | #endif |
1972 | - if (unwindex) | |
1973 | - sechdrs[unwindex].sh_flags |= SHF_ALLOC; | |
1974 | 1965 | |
1975 | 1966 | /* Check module struct version now, before we try to use module. */ |
1976 | 1967 | if (!check_modstruct_version(sechdrs, versindex, mod)) { |
... | ... | @@ -2267,11 +2258,6 @@ |
2267 | 2258 | add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs); |
2268 | 2259 | add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs); |
2269 | 2260 | |
2270 | - /* Size of section 0 is 0, so this works well if no unwind info. */ | |
2271 | - mod->unwind_info = unwind_add_table(mod, | |
2272 | - (void *)sechdrs[unwindex].sh_addr, | |
2273 | - sechdrs[unwindex].sh_size); | |
2274 | - | |
2275 | 2261 | /* Get rid of temporary copy */ |
2276 | 2262 | vfree(hdr); |
2277 | 2263 | |
... | ... | @@ -2370,7 +2356,6 @@ |
2370 | 2356 | mutex_lock(&module_mutex); |
2371 | 2357 | /* Drop initial reference. */ |
2372 | 2358 | module_put(mod); |
2373 | - unwind_remove_table(mod->unwind_info, 1); | |
2374 | 2359 | module_free(mod, mod->module_init); |
2375 | 2360 | mod->module_init = NULL; |
2376 | 2361 | mod->init_size = 0; |
lib/fault-inject.c