diff options
author | Dan McDonald <danmcd@mnx.io> | 2022-12-07 13:54:30 -0500 |
---|---|---|
committer | Dan McDonald <danmcd@mnx.io> | 2022-12-07 13:54:30 -0500 |
commit | 3547bb669fbf4cedd7c88a4fe342f14b059fc311 (patch) | |
tree | c61dc1099a4998642c5bcade8bdeb6847635ddf6 /usr/src/lib | |
parent | 519ebb012f55b339005b58a1bd1735e4969abf7e (diff) | |
parent | 3f3c90a958c5abf8ec0ed5d1fad2e40bd9905a50 (diff) | |
download | illumos-joyent-3547bb669fbf4cedd7c88a4fe342f14b059fc311.tar.gz |
[illumos-gate merge]
commit 3f3c90a958c5abf8ec0ed5d1fad2e40bd9905a50
15206 setcontext(2) should not restore %fsbase
commit 7f5d80fd842f21a48514cca6718c3bbdaf592316
15184 SMB Service fails to restart
15185 SMB sessions linger after disconnect
15186 SMB use smb_llist_post in srv_oplock
commit f92d0ef50ade5e261591e634cd91553a9658cf72
15191 Convert sharemgr(8) to mandoc
Conflicts:
usr/src/test/os-tests/tests/Makefile
Diffstat (limited to 'usr/src/lib')
-rw-r--r-- | usr/src/lib/libc/port/threads/sigaction.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/usr/src/lib/libc/port/threads/sigaction.c b/usr/src/lib/libc/port/threads/sigaction.c index 6a283be33b..8c48989a17 100644 --- a/usr/src/lib/libc/port/threads/sigaction.c +++ b/usr/src/lib/libc/port/threads/sigaction.c @@ -25,6 +25,10 @@ * Copyright 2015 Joyent, Inc. */ +/* + * Copyright 2022 OmniOS Community Edition (OmniOSce) Association. + */ + #include "lint.h" #include <sys/feature_tests.h> /* @@ -601,7 +605,13 @@ setcontext(const ucontext_t *ucp) #if defined(__sparc) uc.uc_mcontext.gregs[REG_G7] = (greg_t)self; #elif defined(__amd64) - uc.uc_mcontext.gregs[REG_FS] = (greg_t)0; /* null for fsbase */ + /* + * 64-bit processes must have a selector value of zero for %fs + * in order to use the 64-bit fs_base (the full 64-bit address + * range cannot be expressed in a long mode descriptor). + */ + uc.uc_mcontext.gregs[REG_FS] = (greg_t)0; + uc.uc_mcontext.gregs[REG_FSBASE] = (greg_t)self; #elif defined(__i386) uc.uc_mcontext.gregs[GS] = (greg_t)LWPGS_SEL; #else |