diff options
author | dchagin <dchagin@FreeBSD.org> | 2016-01-09 17:22:51 +0000 |
---|---|---|
committer | dchagin <dchagin@FreeBSD.org> | 2016-01-09 17:22:51 +0000 |
commit | 858c17f9b39e5e111f83a39fadf4c15c4d88f9fe (patch) | |
tree | f2d3454bda4e30a54c1e1cac989a8a9ec4db70b7 /sys/amd64/linux32 | |
parent | bd5b80090e283fca902bf50d3b1e6f7981feb016 (diff) | |
download | FreeBSD-src-858c17f9b39e5e111f83a39fadf4c15c4d88f9fe.zip FreeBSD-src-858c17f9b39e5e111f83a39fadf4c15c4d88f9fe.tar.gz |
MFC r283471:
According to Linux man sigaltstack(3) shall return EINVAL if the ss
argument is not a null pointer, and the ss_flags member pointed to by ss
contains flags other than SS_DISABLE. However, in fact, Linux also
allows SS_ONSTACK flag which is simply ignored.
For buggy apps (at least mono) ignore other than SS_DISABLE
flags as a Linux do.
While here move MI part of sigaltstack code to the appropriate place.
Diffstat (limited to 'sys/amd64/linux32')
-rw-r--r-- | sys/amd64/linux32/linux.h | 3 | ||||
-rw-r--r-- | sys/amd64/linux32/linux32_machdep.c | 24 |
2 files changed, 0 insertions, 27 deletions
diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index 001c86b..d76b44c 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -328,9 +328,6 @@ struct l_statfs64 { #define LINUX_SS_ONSTACK 1 #define LINUX_SS_DISABLE 2 -int linux_to_bsd_sigaltstack(int lsa); -int bsd_to_linux_sigaltstack(int bsa); - typedef l_uintptr_t l_handler_t; typedef l_ulong l_osigset_t; diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index 6dca647..214d845 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -84,34 +84,10 @@ struct l_old_select_argv { l_uintptr_t timeout; } __packed; -int -linux_to_bsd_sigaltstack(int lsa) -{ - int bsa = 0; - - if (lsa & LINUX_SS_DISABLE) - bsa |= SS_DISABLE; - if (lsa & LINUX_SS_ONSTACK) - bsa |= SS_ONSTACK; - return (bsa); -} - static int linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot, l_int flags, l_int fd, l_loff_t pos); -int -bsd_to_linux_sigaltstack(int bsa) -{ - int lsa = 0; - - if (bsa & SS_DISABLE) - lsa |= LINUX_SS_DISABLE; - if (bsa & SS_ONSTACK) - lsa |= LINUX_SS_ONSTACK; - return (lsa); -} - static void bsd_to_linux_rusage(struct rusage *ru, struct l_rusage *lru) { |