search for: oact

Displaying 16 results from an estimated 16 matches for "oact".

Did you mean: fact
2019 Feb 02
2
[PATCH 1/2] ia64: Fix invalid memory access in vfork
Commit 8418552 ("[klibc] ia64: Fix shared build") missed this use of the GP register, although the code appears to have been dubious anyway, assuming the address of errno was the first thing pointed to by GP. --- usr/klibc/arch/ia64/vfork.S | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/usr/klibc/arch/ia64/vfork.S b/usr/klibc/arch/ia64/vfork.S index
2020 Aug 28
0
[klibc:ia64-signal-fix] signal: Move rt_sigaction() argument mangling to arch directories
.../ + +#include <signal.h> +#include <sys/syscall.h> + +__extern void __sigreturn(void); +__extern int ____rt_sigaction(int, const struct sigaction *, struct sigaction *, + size_t, void (*)(void)); + +int __rt_sigaction(int sig, const struct sigaction *act, + struct sigaction *oact, size_t size) +{ + return ____rt_sigaction(sig, act, oact, size, &__sigreturn); +} diff --git a/usr/klibc/arch/sparc/Kbuild b/usr/klibc/arch/sparc/Kbuild index d013f5d4..d92bbb0f 100644 --- a/usr/klibc/arch/sparc/Kbuild +++ b/usr/klibc/arch/sparc/Kbuild @@ -8,7 +8,7 @@ targets := crt0.o m4-tar...
2019 Feb 02
0
[PATCH 2/2] ia64: Fix sigaction struct layout and function implementation
...date it, and pass that to the kernel + instead (the descriptor must remain valid after returning from sigaction + until it is replaced). */ +struct { + uintptr_t entry; + uintptr_t gp; +} signal_descriptors[_NSIG]; +#endif + int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) { int rv; -#if _KLIBC_NEEDS_SA_RESTORER +#if _KLIBC_NEEDS_SA_RESTORER || defined(__ia64__) struct sigaction sa; +#endif +#ifdef __ia64__ + uintptr_t old_entry; +#endif +#if _KLIBC_NEEDS_SA_RESTORER if (act && !(act->sa_flags & SA_RESTORER)) { sa = *act; act = &s...
2020 Aug 28
0
[klibc:ia64-signal-fix] ia64: sigaction: Make signal updates atomic
...igaction.c index e512bdcd..7f01ea44 100644 --- a/usr/klibc/arch/ia64/sigaction.c +++ b/usr/klibc/arch/ia64/sigaction.c @@ -21,6 +21,7 @@ __extern int ____rt_sigaction(int, const struct sigaction *, struct sigaction *, int __rt_sigaction(int sig, const struct sigaction *act, struct sigaction *oact, size_t size) { + sigset_t signal_mask, old_signal_mask; uintptr_t old_entry; int rv; @@ -29,6 +30,13 @@ int __rt_sigaction(int sig, const struct sigaction *act, return -1; } + /* Mask the signal to avoid races on access to its descriptor */ + sigemptyset(&signal_mask); + sigaddse...
2020 Aug 29
0
[klibc:master] signal: Add config flag for additional sigaction fixup
...__extern int __rt_sigaction(int, act_type, struct sigaction *, size_t); #else -__extern int __sigaction(int, const struct sigaction *, struct sigaction *); +__extern int __sigaction(int, act_type, struct sigaction *); #endif int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) @@ -28,7 +34,9 @@ int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) struct sigaction sa; int rv; - if (act && (act->sa_flags & needed_flags) != needed_flags) { + if (act && + ((act->sa_flags & needed_flags) != needed_flags || +...
2020 Aug 29
0
[klibc:master] ia64: sigaction: Make signal updates atomic
...ia64/sigaction.c index c1ea5fdd..3d2dbd44 100644 --- a/usr/klibc/arch/ia64/sigaction.c +++ b/usr/klibc/arch/ia64/sigaction.c @@ -21,6 +21,7 @@ __extern int ____rt_sigaction(int, const struct sigaction *, struct sigaction *, int __rt_sigaction(int sig, struct sigaction *act, struct sigaction *oact, size_t size) { + sigset_t signal_mask, old_signal_mask; uintptr_t old_entry; int rv; @@ -29,6 +30,13 @@ int __rt_sigaction(int sig, struct sigaction *act, return -1; } + /* Mask the signal to avoid races on access to its descriptor */ + sigemptyset(&signal_mask); + sigaddset(&amp...
2020 Aug 29
0
[klibc:master] ia64: Fix sigaction function implementation
...action + until it is replaced). */ +static struct { + uintptr_t entry; + uintptr_t gp; +} signal_descriptors[_NSIG]; + +__extern int ____rt_sigaction(int, const struct sigaction *, struct sigaction *, + size_t); + +int __rt_sigaction(int sig, struct sigaction *act, + struct sigaction *oact, size_t size) +{ + uintptr_t old_entry; + int rv; + + if (sig < 0 || sig >= _NSIG) { + errno = EINVAL; + return -1; + } + + if (oact) { + old_entry = signal_descriptors[sig].entry; + } + + if (act && act->sa_handler != SIG_IGN && act->sa_handler != SIG_DFL) { + signa...
2020 Aug 28
0
[klibc:ia64-signal-fix] ia64: Fix sigaction struct layout and function implementation
...+ until it is replaced). */ +static struct { + uintptr_t entry; + uintptr_t gp; +} signal_descriptors[_NSIG]; + +__extern int ____rt_sigaction(int, const struct sigaction *, struct sigaction *, + size_t); + +int __rt_sigaction(int sig, const struct sigaction *act, + struct sigaction *oact, size_t size) +{ + uintptr_t old_entry; + int rv; + + if (sig < 0 || sig >= _NSIG) { + errno = EINVAL; + return -1; + } + + if (oact) { + old_entry = signal_descriptors[sig].entry; + } + + if (act && act->sa_handler != SIG_IGN && act->sa_handler != SIG_DFL) { + signa...
2020 Aug 27
0
[klibc:master] alpha: Pass restorer to rt_sigaction() and disable executable stack
...nt, const struct sigaction *, struct sigaction *, - size_t, void *); + size_t, void (*)(void)); #else __extern int __rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t); @@ -60,7 +60,7 @@ int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) rv = __rt_sigaction(sig, act, oact, restorer, sizeof(sigset_t)); } # elif defined(__alpha__) - rv = __rt_sigaction(sig, act, oact, sizeof(sigset_t), NULL); + rv = __rt_sigaction(sig, act, oact, sizeof(sigset_t), &__sigreturn); # else rv = __rt_sigaction(sig, act, oact, sizeof(sigset_t...
2012 May 29
0
[klibc:master] alpha: fix signal handler setup on DEC Alpha
..._) +__extern int __rt_sigaction(int, const struct sigaction *, struct sigaction *, + size_t, void *); #else __extern int __rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t); @@ -43,6 +46,8 @@ int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) : NULL; rv = __rt_sigaction(sig, act, oact, restorer, sizeof(sigset_t)); } +# elif defined(__alpha__) + rv = __rt_sigaction(sig, act, oact, sizeof(sigset_t), NULL); # else rv = __rt_sigaction(sig, act, oact, sizeof(sigset_t)); # endif
2012 May 25
4
klibc breakage on alpha, need porterbox
Hi, is there a DD-accessible porterbox somewhere (slow would be ok, as this is smallish software) with an up-to-date sid (enough to install the recently-built libklibc-dev 2.0~rc5-1 and all other B-D of mksh 40.9.20120518-1, as well as strace and gdb-minimal)? Similarily to http://www.zytor.com/pipermail/klibc/2012-May/003229.html I found klibc-compiled programmes on Alpha to fail (SIGSEGV
2020 Aug 27
0
[klibc:master] signal: Add compile-time check on signal types
...100644 --- a/usr/klibc/sigaction.c +++ b/usr/klibc/sigaction.c @@ -3,6 +3,7 @@ */ #include <signal.h> +#include <stddef.h> #include <sys/syscall.h> #include <klibc/sysconfig.h> @@ -38,6 +39,13 @@ int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) #endif #if _KLIBC_USE_RT_SIG + /* Check that we have the right signal API definitions */ + (void)sizeof(char[_NSIG >= 64 ? 1 : -1]); + (void)sizeof(char[sizeof(sigset_t) * 8 >= _NSIG ? 1 : -1]); + (void)sizeof(char[offsetof(struct sigaction, sa_mask) + + sizeof(sigset_t) == sizeof(st...
2020 Aug 27
0
[klibc:master] signal: Note another reason to define _KLIBC_NEEDS_SA_RESTORER
...ef _KLIBC_NEEDS_SA_RESTORER # define _KLIBC_NEEDS_SA_RESTORER 0 diff --git a/usr/klibc/sigaction.c b/usr/klibc/sigaction.c index 30ef39ef..966bc1c6 100644 --- a/usr/klibc/sigaction.c +++ b/usr/klibc/sigaction.c @@ -31,8 +31,6 @@ int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) sa = *act; act = &sa; - /* The kernel can't be trusted to have a valid default - restorer */ sa.sa_flags |= SA_RESTORER; sa.sa_restorer = &__sigreturn; }
2020 Aug 27
0
[klibc:master] signal: Add sysconfig setting to force SA_SIGINFO on
...ibc/sigaction.c b/usr/klibc/sigaction.c index 966bc1c6..0d7c5c9d 100644 --- a/usr/klibc/sigaction.c +++ b/usr/klibc/sigaction.c @@ -22,19 +22,26 @@ __extern int __rt_sigaction(int, const struct sigaction *, struct sigaction *, int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) { - int rv; - + unsigned int needed_flags = 0 #if _KLIBC_NEEDS_SA_RESTORER + | SA_RESTORER +#endif +#if _KLIBC_NEEDS_SA_SIGINFO + | SA_SIGINFO +#endif + ; struct sigaction sa; + int rv; - if (act && !(act->sa_flags & SA_RESTORER)) { + if (act && (act->sa_flags &a...
2020 Aug 28
0
[klibc:ia64-signal-fix] signal: Add config flag for additional sigaction fixup
...GACTION_FIXUP 0 +#endif + + /* * _KLIBC_STATFS_F_TYPE_64: * diff --git a/usr/klibc/sigaction.c b/usr/klibc/sigaction.c index d2223843..ed4cf5b5 100644 --- a/usr/klibc/sigaction.c +++ b/usr/klibc/sigaction.c @@ -28,7 +28,9 @@ int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) struct sigaction sa; int rv; - if (act && (act->sa_flags & needed_flags) != needed_flags) { + if (act && + ((act->sa_flags & needed_flags) != needed_flags || + _KLIBC_NEEDS_SIGACTION_FIXUP)) { sa = *act; sa.sa_flags |= needed_flags; #if _KLIBC_NE...
2004 Oct 16
2
Re: Shorewall-users Digest, Vol 23, Issue 33
i''ll need to have a virtal server, but why i can do this?