diff options
author | Matt Barden <mbarden@tintri.com> | 2021-02-10 16:38:21 -0500 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2021-03-12 14:31:59 -0500 |
commit | 915894ef19890baaed00080f85f6b69e225cda98 (patch) | |
tree | be6a9fd4fc57e6d3c668c133d26e8bf477dee226 /usr/src/lib/libc | |
parent | b8ccc4133d4adaea81b30537c9a156ae726b2146 (diff) | |
download | illumos-gate-915894ef19890baaed00080f85f6b69e225cda98.tar.gz |
13508 door_layout() should align the stack to 16 bytes for i386 processes
Reviewed by: Robert Mustacchi <rm+illumos@fingolfin.org>
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Gordon Ross <gordon.ross@tintri.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/lib/libc')
-rw-r--r-- | usr/src/lib/libc/i386/sys/door.s | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr/src/lib/libc/i386/sys/door.s b/usr/src/lib/libc/i386/sys/door.s index 1e5561c387..d0785af1bc 100644 --- a/usr/src/lib/libc/i386/sys/door.s +++ b/usr/src/lib/libc/i386/sys/door.s @@ -22,6 +22,8 @@ /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * + * Copyright 2021 Tintri by DDN, Inc. All rights reserved. */ .file "door.s" @@ -110,7 +112,7 @@ /* * int * __door_return( - * void *data_ptr, + * void *data_ptr, * size_t data_size, (in bytes) * door_return_desc_t *door_ptr, (holds returned desc info) * caddr_t stack_base, @@ -142,6 +144,8 @@ door_restart: * data (if any) * sp-> struct door_results * + * The stack will be aligned to 16 bytes; we must maintain that + * alignment prior to any call instruction. * struct door_results has the arguments in place for the server proc, * so we just call it directly. */ @@ -152,14 +156,16 @@ door_restart: * this is the last server thread - call creation func for more */ movl DOOR_INFO_PTR(%esp), %eax + subl $12, %esp pushl %eax /* door_info_t * */ call door_depletion_cb@PLT - addl $4, %esp + addl $16, %esp 1: /* Call the door server function now */ movl DOOR_PC(%esp), %eax call *%eax /* Exit the thread if we return here */ + subl $12, %esp pushl $0 call _thrp_terminate /* NOTREACHED */ |