Commit 32e278c3 authored by Anton Blanchard's avatar Anton Blanchard

ppc64: fix exception handling in socket multiplexer

parent a7ddb0fc
...@@ -64,140 +64,254 @@ _GLOBAL(sys32_socketcall) /* r3=call, r4=args */ ...@@ -64,140 +64,254 @@ _GLOBAL(sys32_socketcall) /* r3=call, r4=args */
/* Socket function vectored fix ups for 32 bit */ /* Socket function vectored fix ups for 32 bit */
_STATIC(do_sys_socket) /* sys_socket(int, int, int) */ _STATIC(do_sys_socket) /* sys_socket(int, int, int) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwa r4,4(r10) 2: lwa r4,4(r10)
lwa r5,8(r10) 3: lwa r5,8(r10)
b .sys_socket b .sys_socket
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.llong 3b,.do_efault
.previous
_STATIC(do_sys_bind) /* sys_bind(int fd, struct sockaddr *, int) */ _STATIC(do_sys_bind) /* sys_bind(int fd, struct sockaddr *, int) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwz r4,4(r10) 2: lwz r4,4(r10)
lwa r5,8(r10) 3: lwa r5,8(r10)
b .sys_bind b .sys_bind
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.llong 3b,.do_efault
.previous
_STATIC(do_sys_connect) /* sys_connect(int, struct sockaddr *, int) */ _STATIC(do_sys_connect) /* sys_connect(int, struct sockaddr *, int) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwz r4,4(r10) 2: lwz r4,4(r10)
lwa r5,8(r10) 3: lwa r5,8(r10)
b .sys_connect b .sys_connect
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.llong 3b,.do_efault
.previous
_STATIC(do_sys_listen) /* sys_listen(int, int) */ _STATIC(do_sys_listen) /* sys_listen(int, int) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwa r4,4(r10) 2: lwa r4,4(r10)
b .sys_listen b .sys_listen
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.previous
_STATIC(do_sys_accept) /* sys_accept(int, struct sockaddr *, int *) */ _STATIC(do_sys_accept) /* sys_accept(int, struct sockaddr *, int *) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwz r4,4(r10) 2: lwz r4,4(r10)
lwz r5,8(r10) 3: lwz r5,8(r10)
b .sys_accept b .sys_accept
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.llong 3b,.do_efault
.previous
_STATIC(do_sys_getsockname) /* sys_getsockname(int, struct sockaddr *, int *) */ _STATIC(do_sys_getsockname) /* sys_getsockname(int, struct sockaddr *, int *) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwz r4,4(r10) 2: lwz r4,4(r10)
lwz r5,8(r10) 3: lwz r5,8(r10)
b .sys_getsockname b .sys_getsockname
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.llong 3b,.do_efault
.previous
_STATIC(do_sys_getpeername) /* sys_getpeername(int, struct sockaddr *, int *) */ _STATIC(do_sys_getpeername) /* sys_getpeername(int, struct sockaddr *, int *) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwz r4,4(r10) 2: lwz r4,4(r10)
lwz r5,8(r10) 3: lwz r5,8(r10)
b .sys_getpeername b .sys_getpeername
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.llong 3b,.do_efault
.previous
_STATIC(do_sys_socketpair) /* sys_socketpair(int, int, int, int *) */ _STATIC(do_sys_socketpair) /* sys_socketpair(int, int, int, int *) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwa r4,4(r10) 2: lwa r4,4(r10)
lwa r5,8(r10) 3: lwa r5,8(r10)
lwz r6,12(r10) 4: lwz r6,12(r10)
b .sys_socketpair b .sys_socketpair
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.llong 3b,.do_efault
.llong 4b,.do_efault
.previous
_STATIC(do_sys_send) /* sys_send(int, void *, size_t, unsigned int) */ _STATIC(do_sys_send) /* sys_send(int, void *, size_t, unsigned int) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwz r4,4(r10) 2: lwz r4,4(r10)
lwz r5,8(r10) 3: lwz r5,8(r10)
lwz r6,12(r10) 4: lwz r6,12(r10)
b .sys_send b .sys_send
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.llong 3b,.do_efault
.llong 4b,.do_efault
.previous
_STATIC(do_sys_recv) /* sys_recv(int, void *, size_t, unsigned int) */ _STATIC(do_sys_recv) /* sys_recv(int, void *, size_t, unsigned int) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwz r4,4(r10) 2: lwz r4,4(r10)
lwz r5,8(r10) 3: lwz r5,8(r10)
lwz r6,12(r10) 4: lwz r6,12(r10)
b .sys_recv b .sys_recv
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.llong 3b,.do_efault
.llong 4b,.do_efault
.previous
_STATIC(do_sys_sendto) /* sys32_sendto(int, u32, compat_size_t, unsigned int, u32, int) */ _STATIC(do_sys_sendto) /* sys32_sendto(int, u32, compat_size_t, unsigned int, u32, int) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwz r4,4(r10) 2: lwz r4,4(r10)
lwz r5,8(r10) 3: lwz r5,8(r10)
lwz r6,12(r10) 4: lwz r6,12(r10)
lwz r7,16(r10) 5: lwz r7,16(r10)
lwa r8,20(r10) 6: lwa r8,20(r10)
b .sys32_sendto b .sys32_sendto
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.llong 3b,.do_efault
.llong 4b,.do_efault
.llong 5b,.do_efault
.llong 6b,.do_efault
.previous
_STATIC(do_sys_recvfrom) /* sys32_recvfrom(int, u32, compat_size_t, unsigned int, u32, u32) */ _STATIC(do_sys_recvfrom) /* sys32_recvfrom(int, u32, compat_size_t, unsigned int, u32, u32) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwz r4,4(r10) 2: lwz r4,4(r10)
lwz r5,8(r10) 3: lwz r5,8(r10)
lwz r6,12(r10) 4: lwz r6,12(r10)
lwz r7,16(r10) 5: lwz r7,16(r10)
lwz r8,20(r10) 6: lwz r8,20(r10)
b .sys32_recvfrom b .sys32_recvfrom
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.llong 3b,.do_efault
.llong 4b,.do_efault
.llong 5b,.do_efault
.llong 6b,.do_efault
.previous
_STATIC(do_sys_shutdown) /* sys_shutdown(int, int) */ _STATIC(do_sys_shutdown) /* sys_shutdown(int, int) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwa r4,4(r10) 2: lwa r4,4(r10)
b .sys_shutdown b .sys_shutdown
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.previous
_STATIC(do_sys_setsockopt) /* sys32_setsockopt(int, int, int, char *, int) */ _STATIC(do_sys_setsockopt) /* sys32_setsockopt(int, int, int, char *, int) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwa r4,4(r10) 2: lwa r4,4(r10)
lwa r5,8(r10) 3: lwa r5,8(r10)
lwz r6,12(r10) 4: lwz r6,12(r10)
lwa r7,16(r10) 5: lwa r7,16(r10)
b .sys32_setsockopt b .sys32_setsockopt
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.llong 3b,.do_efault
.llong 4b,.do_efault
.llong 5b,.do_efault
.previous
_STATIC(do_sys_getsockopt) /* sys32_getsockopt(int, int, int, u32, u32) */ _STATIC(do_sys_getsockopt) /* sys32_getsockopt(int, int, int, u32, u32) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwa r4,4(r10) 2: lwa r4,4(r10)
lwa r5,8(r10) 3: lwa r5,8(r10)
lwz r6,12(r10) 4: lwz r6,12(r10)
lwz r7,16(r10) 5: lwz r7,16(r10)
b .sys32_getsockopt b .sys32_getsockopt
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.llong 3b,.do_efault
.llong 4b,.do_efault
.llong 5b,.do_efault
.previous
_STATIC(do_sys_sendmsg) /* sys32_sendmsg(int, struct msghdr32 *, unsigned int) */ _STATIC(do_sys_sendmsg) /* sys32_sendmsg(int, struct msghdr32 *, unsigned int) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwz r4,4(r10) 2: lwz r4,4(r10)
lwa r5,8(r10) 3: lwa r5,8(r10)
b .sys32_sendmsg b .sys32_sendmsg
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.llong 3b,.do_efault
.previous
_STATIC(do_sys_recvmsg) /* sys32_recvmsg(int, struct msghdr32 *, unsigned int) */ _STATIC(do_sys_recvmsg) /* sys32_recvmsg(int, struct msghdr32 *, unsigned int) */
mr r10,r4 mr r10,r4
lwa r3,0(r10) 1: lwa r3,0(r10)
lwz r4,4(r10) 2: lwz r4,4(r10)
lwa r5,8(r10) 3: lwa r5,8(r10)
b .sys32_recvmsg b .sys32_recvmsg
.section __ex_table,"a"
.align 3
.llong 1b,.do_efault
.llong 2b,.do_efault
.llong 3b,.do_efault
.previous
_STATIC(do_einval) _STATIC(do_einval)
li r3,-EINVAL li r3,-EINVAL
b .ret_from_syscall_1 blr
_STATIC(do_efault) _STATIC(do_efault)
li r3,-EFAULT li r3,-EFAULT
b .ret_from_syscall_1 blr
.data .data
.align 8 .align 8
...@@ -220,10 +334,3 @@ _GLOBAL(socketcall_table_begin) ...@@ -220,10 +334,3 @@ _GLOBAL(socketcall_table_begin)
.llong .do_sys_sendmsg .llong .do_sys_sendmsg
.llong .do_sys_recvmsg .llong .do_sys_recvmsg
_GLOBAL(socketcall_table_end) _GLOBAL(socketcall_table_end)
.section __ex_table,"a"
.align 3
.llong .socketcall_table_begin
.llong 0
.llong .socketcall_table_end
.llong .do_efault
.previous
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment