Displaying 20 results from an estimated 21 matches for "_klibc_needs_sa_restorer".
2020 Aug 27
0
[klibc:master] signal: Note another reason to define _KLIBC_NEEDS_SA_RESTORER
...=commit;h=ccc5c14c44f3fa76f61b8aae947cf3b853a6c833
Author: Ben Hutchings <ben at decadent.org.uk>
AuthorDate: Tue, 25 Aug 2020 00:43:33 +0100
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Thu, 27 Aug 2020 15:00:33 +0100
[klibc] signal: Note another reason to define _KLIBC_NEEDS_SA_RESTORER
On some architectures we should set SA_RESTORER to avoid the need for
a signal trampoline and executable stack.
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/include/klibc/sysconfig.h | 3 ++-
usr/klibc/sigaction.c | 2 --
2 files changed, 2 insertions(+), 3 deleti...
2019 Feb 02
0
[PATCH 2/2] ia64: Fix sigaction struct layout and function implementation
...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 = &sa;
@@ -37,6 +54,26 @@ int sigaction(int sig, c...
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 27
0
[klibc:master] signal: Add sysconfig setting to force SA_SIGINFO on
...7c5c9d 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 & needed_flags) != needed_flags) {
sa = *act;
+ sa.sa_flags |= needed_fl...
2020 Aug 29
0
[klibc:master] signal: Add config flag for additional sigaction fixup
...ion *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_NEEDS_SA_RESTORER
@@ -46,9 +54,9 @@ int sigaction(int sig, const struct sigaction *act, struct sigaction *oact)
+ sizeof(sigset_t) == sizeof(struct sigaction)
? 1 : -1]);
- rv = __rt_sigaction(sig, act, oact, sizeof(sigset_t));
+ rv = __rt_sigaction(sig, (act_type)act, oact, sizeof(sigset_t));
#else
-...
2020 Jul 25
0
[klibc:execstack-fixes] s390: Set sa_restorer for signals and disable executable stack
...4c45f98a 100644
--- a/usr/include/arch/s390/klibc/archconfig.h
+++ b/usr/include/arch/s390/klibc/archconfig.h
@@ -12,4 +12,7 @@
/* Both s390 and s390x use the "32-bit" version of this structure */
#define _KLIBC_STATFS_F_TYPE_64 0
+/* So that we can avoid stack trampolines */
+#define _KLIBC_NEEDS_SA_RESTORER 1
+
#endif /* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
index 461d9bf6..16faabcb 100644
--- a/usr/klibc/SYSCALLS.def
+++ b/usr/klibc/SYSCALLS.def
@@ -228,6 +228,7 @@ int sigprocmask(int, const sigset_t *, sigset_t *);
*/
<sh,sparc,alpha,ppc,sparc6...
2020 Jul 25
0
[klibc:execstack-fixes] sparc: Set sa_restorer for signals and disable executable stack
...44
--- a/usr/include/arch/sparc/klibc/archconfig.h
+++ b/usr/include/arch/sparc/klibc/archconfig.h
@@ -12,4 +12,7 @@
#define _KLIBC_USE_RT_SIG 1 /* Use rt_* signals */
#define _KLIBC_SYS_SOCKETCALL 1 /* Use sys_socketcall unconditionally */
+/* So that we can avoid stack trampolines */
+#define _KLIBC_NEEDS_SA_RESTORER 1
+
#endif /* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
index 16faabcb..0768df0d 100644
--- a/usr/klibc/SYSCALLS.def
+++ b/usr/klibc/SYSCALLS.def
@@ -212,7 +212,7 @@ ssize_t sendfile64,sendfile::sendfile(int, int, off_t *, size_t, off_t);
int rt_sigsus...
2020 Aug 20
0
[klibc:execstack-fixes] s390: Set sa_restorer for signals and disable executable stack
...4c45f98a 100644
--- a/usr/include/arch/s390/klibc/archconfig.h
+++ b/usr/include/arch/s390/klibc/archconfig.h
@@ -12,4 +12,7 @@
/* Both s390 and s390x use the "32-bit" version of this structure */
#define _KLIBC_STATFS_F_TYPE_64 0
+/* So that we can avoid stack trampolines */
+#define _KLIBC_NEEDS_SA_RESTORER 1
+
#endif /* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
index 461d9bf6..16faabcb 100644
--- a/usr/klibc/SYSCALLS.def
+++ b/usr/klibc/SYSCALLS.def
@@ -228,6 +228,7 @@ int sigprocmask(int, const sigset_t *, sigset_t *);
*/
<sh,sparc,alpha,ppc,sparc6...
2020 Aug 20
0
[klibc:execstack-fixes] sparc: Set sa_restorer for signals and disable executable stack
...44
--- a/usr/include/arch/sparc/klibc/archconfig.h
+++ b/usr/include/arch/sparc/klibc/archconfig.h
@@ -12,4 +12,7 @@
#define _KLIBC_USE_RT_SIG 1 /* Use rt_* signals */
#define _KLIBC_SYS_SOCKETCALL 1 /* Use sys_socketcall unconditionally */
+/* So that we can avoid stack trampolines */
+#define _KLIBC_NEEDS_SA_RESTORER 1
+
#endif /* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
index 16faabcb..0768df0d 100644
--- a/usr/klibc/SYSCALLS.def
+++ b/usr/klibc/SYSCALLS.def
@@ -212,7 +212,7 @@ ssize_t sendfile64,sendfile::sendfile(int, int, off_t *, size_t, off_t);
int rt_sigsus...
2020 Aug 28
0
[klibc:ia64-signal-fix] signal: Add config flag for additional sigaction fixup
...ion *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_NEEDS_SA_RESTORER
2020 Aug 27
0
[klibc:master] sparc: Set sa_restorer for signals and disable executable stack
...44
--- a/usr/include/arch/sparc/klibc/archconfig.h
+++ b/usr/include/arch/sparc/klibc/archconfig.h
@@ -12,4 +12,9 @@
#define _KLIBC_USE_RT_SIG 1 /* Use rt_* signals */
#define _KLIBC_SYS_SOCKETCALL 1 /* Use sys_socketcall unconditionally */
+/* So that we can avoid stack trampolines */
+#define _KLIBC_NEEDS_SA_RESTORER 1
+/* Our restorer will call rt_sigreturn() */
+#define _KLIBC_NEEDS_SA_SIGINFO 1
+
#endif /* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
index 30ff58b8..b639fceb 100644
--- a/usr/klibc/SYSCALLS.def
+++ b/usr/klibc/SYSCALLS.def
@@ -228,7 +228,7 @@ int sig...
2020 Jul 25
0
[klibc:execstack-fixes] alpha: Set sa_restorer for signals and disable executable stack
...de/arch/alpha/klibc/archconfig.h
index 272fee0a..b80d299f 100644
--- a/usr/include/arch/alpha/klibc/archconfig.h
+++ b/usr/include/arch/alpha/klibc/archconfig.h
@@ -12,4 +12,7 @@
#define _KLIBC_USE_RT_SIG 1
#define _KLIBC_STATFS_F_TYPE_64 0
+/* So that we can avoid stack trampolines */
+#define _KLIBC_NEEDS_SA_RESTORER 1
+
#endif /* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/klibc/arch/alpha/Kbuild b/usr/klibc/arch/alpha/Kbuild
index 2e566eb6..eef7cfb4 100644
--- a/usr/klibc/arch/alpha/Kbuild
+++ b/usr/klibc/arch/alpha/Kbuild
@@ -9,7 +9,7 @@
always := crt0.o
targets := crt0.o
-klib-y := pipe.o setjmp.o sysc...
2020 Aug 20
0
[klibc:execstack-fixes] alpha: Set sa_restorer for signals and disable executable stack
...de/arch/alpha/klibc/archconfig.h
index 272fee0a..b80d299f 100644
--- a/usr/include/arch/alpha/klibc/archconfig.h
+++ b/usr/include/arch/alpha/klibc/archconfig.h
@@ -12,4 +12,7 @@
#define _KLIBC_USE_RT_SIG 1
#define _KLIBC_STATFS_F_TYPE_64 0
+/* So that we can avoid stack trampolines */
+#define _KLIBC_NEEDS_SA_RESTORER 1
+
#endif /* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/klibc/arch/alpha/Kbuild b/usr/klibc/arch/alpha/Kbuild
index 2e566eb6..eef7cfb4 100644
--- a/usr/klibc/arch/alpha/Kbuild
+++ b/usr/klibc/arch/alpha/Kbuild
@@ -9,7 +9,7 @@
always := crt0.o
targets := crt0.o
-klib-y := pipe.o setjmp.o sysc...
2020 Aug 27
0
[klibc:master] s390: Set sa_restorer for signals and disable executable stack
...b08bbb3f 100644
--- a/usr/include/arch/s390/klibc/archconfig.h
+++ b/usr/include/arch/s390/klibc/archconfig.h
@@ -12,4 +12,9 @@
/* Both s390 and s390x use the "32-bit" version of this structure */
#define _KLIBC_STATFS_F_TYPE_64 0
+/* So that we can avoid stack trampolines */
+#define _KLIBC_NEEDS_SA_RESTORER 1
+/* Our restorer will call rt_sigreturn() */
+#define _KLIBC_NEEDS_SA_SIGINFO 1
+
#endif /* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
index 461d9bf6..30ff58b8 100644
--- a/usr/klibc/SYSCALLS.def
+++ b/usr/klibc/SYSCALLS.def
@@ -212,7 +212,6 @@ ssize_t...
2006 Jun 26
0
[klibc 36/43] sparc64 support for klibc
...c/archconfig.h
@@ -0,0 +1,15 @@
+/*
+ * include/arch/sparc64/klibc/archconfig.h
+ *
+ * See include/klibc/sysconfig.h for the options that can be set in
+ * this file.
+ *
+ */
+
+#ifndef _KLIBC_ARCHCONFIG_H
+#define _KLIBC_ARCHCONFIG_H
+
+#define _KLIBC_USE_RT_SIG 1 /* Use rt_* signals */
+#define _KLIBC_NEEDS_SA_RESTORER 1 /* Need a restorer function */
+
+#endif /* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/include/arch/sparc64/klibc/archsetjmp.h b/usr/include/arch/sparc64/klibc/archsetjmp.h
new file mode 100644
index 0000000..9e825bd
--- /dev/null
+++ b/usr/include/arch/sparc64/klibc/archsetjmp.h
@@ -0,0 +1,16 @@...
2012 May 05
3
[PATCH] fix non-RT sigsuspend()
...+
#endif /* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/include/arch/sparc64/klibc/archconfig.h b/usr/include/arch/sparc64/klibc/archconfig.h
index 794d15b..f866438 100644
--- a/usr/include/arch/sparc64/klibc/archconfig.h
+++ b/usr/include/arch/sparc64/klibc/archconfig.h
@@ -13,4 +13,6 @@
#define _KLIBC_NEEDS_SA_RESTORER 1 /* Need a restorer function */
#define _KLIBC_SYS_SOCKETCALL 1 /* Use sys_socketcall unconditionally */
+#define _KLIBC_SIGSUSPEND_L_1
+
#endif /* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
index 6ed6bdf..7abab15 100644
--- a/usr/klibc/SYSCALLS.def...
2011 Aug 08
0
[PATCH/RFC] Add initial avr32 port
...876922
--- /dev/null
+++ b/usr/include/arch/avr32/klibc/archconfig.h
@@ -0,0 +1,14 @@
+/*
+ * include/arch/avr32/klibc/archconfig.h
+ *
+ * See include/klibc/sysconfig.h for the options that can be set in
+ * this file.
+ *
+ */
+
+#ifndef _KLIBC_ARCHCONFIG_H
+#define _KLIBC_ARCHCONFIG_H
+
+#define _KLIBC_NEEDS_SA_RESTORER 1
+
+#endif /* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/include/arch/avr32/klibc/archsetjmp.h b/usr/include/arch/avr32/klibc/archsetjmp.h
new file mode 100644
index 0000000..da59124
--- /dev/null
+++ b/usr/include/arch/avr32/klibc/archsetjmp.h
@@ -0,0 +1,14 @@
+/*
+ * arch/avr32/include/klibc/arc...
2006 Jun 26
0
[klibc 37/43] x86_64 support for klibc
...archconfig.h
@@ -0,0 +1,15 @@
+/*
+ * include/arch/x86_64/klibc/archconfig.h
+ *
+ * See include/klibc/sysconfig.h for the options that can be set in
+ * this file.
+ *
+ */
+
+#ifndef _KLIBC_ARCHCONFIG_H
+#define _KLIBC_ARCHCONFIG_H
+
+/* x86-64 doesn't provide a default sigreturn. */
+#define _KLIBC_NEEDS_SA_RESTORER 1
+
+#endif /* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/include/arch/x86_64/klibc/archsetjmp.h b/usr/include/arch/x86_64/klibc/archsetjmp.h
new file mode 100644
index 0000000..454fc60
--- /dev/null
+++ b/usr/include/arch/x86_64/klibc/archsetjmp.h
@@ -0,0 +1,21 @@
+/*
+ * arch/x86_64/include/klibc...
2012 May 15
5
[PATCH 0/5] resubmitting pending patches
Hi,
I?ve gone through the mailing list archives and hereby want
to resubmit my pending patches. Most are independent of each
other, except the m68k patch which will only be complete if
sigsuspend is also fixed. (It can be applied before that,
though.)
http://www.zytor.com/pipermail/klibc/2012-January/003173.html
[PATCH] fix m68k support
Resubmitted here as 0005. While there was a question from
2006 Jun 26
0
[klibc 24/43] i386 support for klibc
...G_H
+#define _KLIBC_ARCHCONFIG_H
+
+/* On i386, only half the signals are accessible using the legacy calls. */
+#define _KLIBC_USE_RT_SIG 1
+
+/* The stock i386 kernel is fine, but a whole string of Fedora kernels
+ had a broken default restorer. It's easier to enable this here. */
+#define _KLIBC_NEEDS_SA_RESTORER 1
+
+#endif /* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/include/arch/i386/klibc/archsetjmp.h b/usr/include/arch/i386/klibc/archsetjmp.h
new file mode 100644
index 0000000..ea1ba3d
--- /dev/null
+++ b/usr/include/arch/i386/klibc/archsetjmp.h
@@ -0,0 +1,19 @@
+/*
+ * arch/i386/include/klibc/archset...