diff options
| author | cvs2svn <admin@example.com> | 2015-08-02 21:54:23 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2015-08-02 21:54:23 +0000 |
| commit | 67fcb4ef3942fb3a0f1e18f8ebbe7464120d485a (patch) | |
| tree | 5609c82060f75c53af0a7641d9b33a88574876cd /src/lib/libcrypto/s390xcap.c | |
| parent | ed40f444ba01bcae1d8540f9c26d79537ab5baf2 (diff) | |
| download | openbsd-libressl-v2.2.2.tar.gz openbsd-libressl-v2.2.2.tar.bz2 openbsd-libressl-v2.2.2.zip | |
This commit was manufactured by cvs2git to create branch 'OPENBSD_5_8'.libressl-v2.2.2
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/s390xcap.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/lib/libcrypto/s390xcap.c b/src/lib/libcrypto/s390xcap.c deleted file mode 100644 index 6fc60f27f2..0000000000 --- a/src/lib/libcrypto/s390xcap.c +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | /* $OpenBSD: s390xcap.c,v 1.3 2014/06/12 15:49:27 deraadt Exp $ */ | ||
| 2 | #include <stdio.h> | ||
| 3 | #include <stdlib.h> | ||
| 4 | #include <string.h> | ||
| 5 | #include <setjmp.h> | ||
| 6 | #include <signal.h> | ||
| 7 | |||
| 8 | extern unsigned long OPENSSL_s390xcap_P[]; | ||
| 9 | |||
| 10 | static sigjmp_buf ill_jmp; | ||
| 11 | static void ill_handler (int sig) | ||
| 12 | { | ||
| 13 | siglongjmp(ill_jmp, sig); | ||
| 14 | } | ||
| 15 | |||
| 16 | unsigned long OPENSSL_s390x_facilities(void); | ||
| 17 | |||
| 18 | void | ||
| 19 | OPENSSL_cpuid_setup(void) | ||
| 20 | { | ||
| 21 | sigset_t oset; | ||
| 22 | struct sigaction ill_act, oact; | ||
| 23 | |||
| 24 | if (OPENSSL_s390xcap_P[0]) | ||
| 25 | return; | ||
| 26 | |||
| 27 | OPENSSL_s390xcap_P[0] = 1UL << (8*sizeof(unsigned long) - 1); | ||
| 28 | |||
| 29 | memset(&ill_act, 0, sizeof(ill_act)); | ||
| 30 | ill_act.sa_handler = ill_handler; | ||
| 31 | sigfillset(&ill_act.sa_mask); | ||
| 32 | sigdelset(&ill_act.sa_mask, SIGILL); | ||
| 33 | sigdelset(&ill_act.sa_mask, SIGTRAP); | ||
| 34 | sigprocmask(SIG_SETMASK, &ill_act.sa_mask, &oset); | ||
| 35 | sigaction (SIGILL, &ill_act, &oact); | ||
| 36 | |||
| 37 | /* protection against missing store-facility-list-extended */ | ||
| 38 | if (sigsetjmp(ill_jmp, 1) == 0) | ||
| 39 | OPENSSL_s390x_facilities(); | ||
| 40 | |||
| 41 | sigaction (SIGILL, &oact, NULL); | ||
| 42 | sigprocmask(SIG_SETMASK, &oset, NULL); | ||
| 43 | } | ||
