diff options
author | Martin Pärtel <martin.partel@gmail.com> | 2012-08-01 18:49:17 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2012-08-01 18:49:17 -0400 |
commit | d3c1cfcdb43e023ab1b1c7a555cd9e929026500a (patch) | |
tree | ad79f90d97a0316ae4058e4501e7b6ad54540ff4 /arch/um/include | |
parent | d4afcba95fca4dd0f831fe72c1fa4f0638f23765 (diff) |
um: pass siginfo to guest process
UML guest processes now get correct siginfo_t for SIGTRAP, SIGFPE,
SIGILL and SIGBUS. Specifically, si_addr and si_code are now correct
where previously they were si_addr = NULL and si_code = 128.
Signed-off-by: Martin Pärtel <martin.partel@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/include')
-rw-r--r-- | arch/um/include/shared/as-layout.h | 3 | ||||
-rw-r--r-- | arch/um/include/shared/irq_user.h | 3 | ||||
-rw-r--r-- | arch/um/include/shared/kern_util.h | 13 |
3 files changed, 11 insertions, 8 deletions
diff --git a/arch/um/include/shared/as-layout.h b/arch/um/include/shared/as-layout.h index 896e16602176..86daa5461815 100644 --- a/arch/um/include/shared/as-layout.h +++ b/arch/um/include/shared/as-layout.h | |||
@@ -60,7 +60,8 @@ extern unsigned long host_task_size; | |||
60 | 60 | ||
61 | extern int linux_main(int argc, char **argv); | 61 | extern int linux_main(int argc, char **argv); |
62 | 62 | ||
63 | extern void (*sig_info[])(int, struct uml_pt_regs *); | 63 | struct siginfo; |
64 | extern void (*sig_info[])(int, struct siginfo *si, struct uml_pt_regs *); | ||
64 | 65 | ||
65 | #endif | 66 | #endif |
66 | 67 | ||
diff --git a/arch/um/include/shared/irq_user.h b/arch/um/include/shared/irq_user.h index c6c784df2673..2b6d703925b5 100644 --- a/arch/um/include/shared/irq_user.h +++ b/arch/um/include/shared/irq_user.h | |||
@@ -20,7 +20,8 @@ struct irq_fd { | |||
20 | 20 | ||
21 | enum { IRQ_READ, IRQ_WRITE }; | 21 | enum { IRQ_READ, IRQ_WRITE }; |
22 | 22 | ||
23 | extern void sigio_handler(int sig, struct uml_pt_regs *regs); | 23 | struct siginfo; |
24 | extern void sigio_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs); | ||
24 | extern void free_irq_by_fd(int fd); | 25 | extern void free_irq_by_fd(int fd); |
25 | extern void reactivate_fd(int fd, int irqnum); | 26 | extern void reactivate_fd(int fd, int irqnum); |
26 | extern void deactivate_fd(int fd, int irqnum); | 27 | extern void deactivate_fd(int fd, int irqnum); |
diff --git a/arch/um/include/shared/kern_util.h b/arch/um/include/shared/kern_util.h index 00965d06d2ca..af6b6dc868ba 100644 --- a/arch/um/include/shared/kern_util.h +++ b/arch/um/include/shared/kern_util.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #include "sysdep/ptrace.h" | 9 | #include "sysdep/ptrace.h" |
10 | #include "sysdep/faultinfo.h" | 10 | #include "sysdep/faultinfo.h" |
11 | 11 | ||
12 | struct siginfo; | ||
13 | |||
12 | extern int uml_exitcode; | 14 | extern int uml_exitcode; |
13 | 15 | ||
14 | extern int ncpus; | 16 | extern int ncpus; |
@@ -22,7 +24,7 @@ extern void free_stack(unsigned long stack, int order); | |||
22 | 24 | ||
23 | extern int do_signal(void); | 25 | extern int do_signal(void); |
24 | extern void interrupt_end(void); | 26 | extern void interrupt_end(void); |
25 | extern void relay_signal(int sig, struct uml_pt_regs *regs); | 27 | extern void relay_signal(int sig, struct siginfo *si, struct uml_pt_regs *regs); |
26 | 28 | ||
27 | extern unsigned long segv(struct faultinfo fi, unsigned long ip, | 29 | extern unsigned long segv(struct faultinfo fi, unsigned long ip, |
28 | int is_user, struct uml_pt_regs *regs); | 30 | int is_user, struct uml_pt_regs *regs); |
@@ -33,9 +35,8 @@ extern unsigned int do_IRQ(int irq, struct uml_pt_regs *regs); | |||
33 | extern int smp_sigio_handler(void); | 35 | extern int smp_sigio_handler(void); |
34 | extern void initial_thread_cb(void (*proc)(void *), void *arg); | 36 | extern void initial_thread_cb(void (*proc)(void *), void *arg); |
35 | extern int is_syscall(unsigned long addr); | 37 | extern int is_syscall(unsigned long addr); |
36 | extern void timer_handler(int sig, struct uml_pt_regs *regs); | ||
37 | 38 | ||
38 | extern void timer_handler(int sig, struct uml_pt_regs *regs); | 39 | extern void timer_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs); |
39 | 40 | ||
40 | extern int start_uml(void); | 41 | extern int start_uml(void); |
41 | extern void paging_init(void); | 42 | extern void paging_init(void); |
@@ -59,9 +60,9 @@ extern unsigned long from_irq_stack(int nested); | |||
59 | extern void syscall_trace(struct uml_pt_regs *regs, int entryexit); | 60 | extern void syscall_trace(struct uml_pt_regs *regs, int entryexit); |
60 | extern int singlestepping(void *t); | 61 | extern int singlestepping(void *t); |
61 | 62 | ||
62 | extern void segv_handler(int sig, struct uml_pt_regs *regs); | 63 | extern void segv_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs); |
63 | extern void bus_handler(int sig, struct uml_pt_regs *regs); | 64 | extern void bus_handler(int sig, struct siginfo *si, struct uml_pt_regs *regs); |
64 | extern void winch(int sig, struct uml_pt_regs *regs); | 65 | extern void winch(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs); |
65 | extern void fatal_sigsegv(void) __attribute__ ((noreturn)); | 66 | extern void fatal_sigsegv(void) __attribute__ ((noreturn)); |
66 | 67 | ||
67 | 68 | ||