Displaying 19 results from an estimated 19 matches for "__sigreturn".
Did you mean:
rt_sigreturn
2020 Aug 27
0
[klibc:master] alpha: Pass restorer to rt_sigaction() and disable executable stack
...port the SA_RESTORER flag, but allows specifiying a
restorer callback as an additional parameter to rt_sigaction(). We
should do this to avoid needing an executable stack.
* Force the SA_SIGINFO flag on for all signal handlers, so that we can
always return from them with rt_sigreturn
* Define a __sigreturn() routine that calls rt_sigreturn
* Pass that routine as the last argument to rt_sigaction()
* Set KLIBCEXECSTACK=n
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/include/arch/alpha/klibc/archconfig.h | 2 ++
usr/klibc/arch/alpha/Kbuild | 2 +-
usr/klibc/arch...
2020 Aug 20
0
[klibc:execstack-fixes] alpha: Set sa_restorer for signals and disable executable stack
...714800a8ac9c4dd74
Author: Ben Hutchings <ben at decadent.org.uk>
AuthorDate: Thu, 30 Apr 2020 13:31:32 +0100
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Thu, 20 Aug 2020 23:22:58 +0100
[klibc] alpha: Set sa_restorer for signals and disable executable stack
Add a __sigreturn routine and point sa_restorer to it by default, so
that the kernel doesn't create stack trampolines for signal return.
With that done, we no longer need an executable stack.
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/include/arch/alpha/klibc/archconfig.h | 3 +++
us...
2020 Jul 25
0
[klibc:execstack-fixes] alpha: Set sa_restorer for signals and disable executable stack
...c1acd2099463f68d4
Author: Ben Hutchings <ben at decadent.org.uk>
AuthorDate: Thu, 30 Apr 2020 13:31:32 +0100
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 25 Jul 2020 17:33:29 +0100
[klibc] alpha: Set sa_restorer for signals and disable executable stack
Add a __sigreturn routine and point sa_restorer to it by default, so
that the kernel doesn't create stack trampolines for signal return.
With that done, we no longer need an executable stack.
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/include/arch/alpha/klibc/archconfig.h | 3 +++
us...
2020 Aug 28
0
[klibc:ia64-signal-fix] signal: Move rt_sigaction() argument mangling to arch directories
...diff --git a/usr/klibc/arch/alpha/sigaction.c b/usr/klibc/arch/alpha/sigaction.c
new file mode 100644
index 00000000..53e830b5
--- /dev/null
+++ b/usr/klibc/arch/alpha/sigaction.c
@@ -0,0 +1,16 @@
+/*
+ * sigaction.c
+ */
+
+#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);
+}...
2020 Aug 27
0
[klibc:master] sparc: Set sa_restorer for signals and disable executable stack
...tter: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Thu, 27 Aug 2020 15:00:33 +0100
[klibc] sparc: Set sa_restorer for signals and disable executable stack
sparc allows specifiying a signal restorer in the usual way. We
should do this to avoid needing an executable stack.
* Define a __sigreturn() routine that calls rt_sigreturn
* Force the SA_RESTORER flag on for all signal handlers, and set
__sigreturn as the restorer if none is already set
* Force the SA_SIGINFO flag on for all signal handlers, so that we can
always return from them with rt_sigreturn
* Set KLIBCEXECSTACK=n
Signed-o...
2020 Aug 27
0
[klibc:master] s390: Set sa_restorer for signals and disable executable stack
...mitter: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Thu, 27 Aug 2020 15:00:33 +0100
[klibc] s390: Set sa_restorer for signals and disable executable stack
s390 allows specifiying a signal restorer in the usual way. We
should do this to avoid needing an executable stack.
* Define a __sigreturn() routine that calls rt_sigreturn
* Force the SA_RESTORER flag on for all signal handlers, and set
__sigreturn as the restorer if none is already set
* Force the SA_SIGINFO flag on for all signal handlers, so that we can
always return from them with rt_sigreturn
* Set KLIBCEXECSTACK=n
Signed-o...
2020 Jul 25
0
[klibc:execstack-fixes] sparc: Set sa_restorer for signals and disable executable stack
...424dec81cd8b1b1ab
Author: Ben Hutchings <ben at decadent.org.uk>
AuthorDate: Thu, 30 Apr 2020 13:56:47 +0100
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 25 Jul 2020 17:33:29 +0100
[klibc] sparc: Set sa_restorer for signals and disable executable stack
Add a __sigreturn stub and point sa_restorer to it by default, so
that the kernel doesn't create stack trampolines for signal return.
With that done, we no longer need an executable stack.
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/include/arch/sparc/klibc/archconfig.h | 3 +++
usr/kl...
2020 Aug 20
0
[klibc:execstack-fixes] sparc: Set sa_restorer for signals and disable executable stack
...05932caef78d467ee
Author: Ben Hutchings <ben at decadent.org.uk>
AuthorDate: Thu, 30 Apr 2020 13:56:47 +0100
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Thu, 20 Aug 2020 23:23:04 +0100
[klibc] sparc: Set sa_restorer for signals and disable executable stack
Add a __sigreturn stub and point sa_restorer to it by default, so
that the kernel doesn't create stack trampolines for signal return.
With that done, we no longer need an executable stack.
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/include/arch/sparc/klibc/archconfig.h | 3 +++
usr/kl...
2011 Aug 08
0
[PATCH/RFC] Add initial avr32 port
...--git a/usr/klibc/arch/avr32/sigreturn.S b/usr/klibc/arch/avr32/sigreturn.S
new file mode 100644
index 0000000..6627694
--- /dev/null
+++ b/usr/klibc/arch/avr32/sigreturn.S
@@ -0,0 +1,15 @@
+/*
+ * arch/avr32/sigreturn.S
+ */
+
+#include <asm/unistd.h>
+
+ .text
+ .align 4
+ .globl __sigreturn
+ .type __sigreturn, @function
+__sigreturn:
+ mov r8, __NR_rt_sigreturn
+ scall
+
+ .size __sigreturn, . - __sigreturn
diff --git a/usr/klibc/arch/avr32/syscall.S b/usr/klibc/arch/avr32/syscall.S
new file mode 100644
index 0000000..230542f
--- /dev/null
+++ b/usr/klibc/arch/avr...
2020 Jul 25
0
[klibc:execstack-fixes] s390: Set sa_restorer for signals and disable executable stack
...19f07ca451dcfdd214
Author: Ben Hutchings <ben at decadent.org.uk>
AuthorDate: Thu, 30 Apr 2020 03:38:34 +0100
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 25 Jul 2020 17:33:29 +0100
[klibc] s390: Set sa_restorer for signals and disable executable stack
Add a __sigreturn stub and point sa_restorer to it by default, so
that the kernel doesn't create stack trampolines for signal return.
With that done, we no longer need an executable stack.
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/include/arch/s390/klibc/archconfig.h | 3 +++
usr/kli...
2020 Aug 20
0
[klibc:execstack-fixes] s390: Set sa_restorer for signals and disable executable stack
...26eda57c24ec33b275
Author: Ben Hutchings <ben at decadent.org.uk>
AuthorDate: Thu, 30 Apr 2020 03:38:34 +0100
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Thu, 20 Aug 2020 23:21:25 +0100
[klibc] s390: Set sa_restorer for signals and disable executable stack
Add a __sigreturn stub and point sa_restorer to it by default, so
that the kernel doesn't create stack trampolines for signal return.
With that done, we no longer need an executable stack.
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/include/arch/s390/klibc/archconfig.h | 3 +++
usr/kli...
2020 Aug 27
0
[klibc:master] signal: Add sysconfig setting to force SA_SIGINFO on
...+ int rv;
- if (act && !(act->sa_flags & SA_RESTORER)) {
+ if (act && (act->sa_flags & needed_flags) != needed_flags) {
sa = *act;
+ sa.sa_flags |= needed_flags;
+#if _KLIBC_NEEDS_SA_RESTORER
+ if (!(act->sa_flags & SA_RESTORER))
+ sa.sa_restorer = &__sigreturn;
+#endif
act = &sa;
-
- sa.sa_flags |= SA_RESTORER;
- sa.sa_restorer = &__sigreturn;
}
-#endif
#if _KLIBC_USE_RT_SIG
/* Check that we have the right signal API definitions */
2006 Jun 26
0
[klibc 37/43] x86_64 support for klibc
...p
diff --git a/usr/klibc/arch/x86_64/sigreturn.S b/usr/klibc/arch/x86_64/sigreturn.S
new file mode 100644
index 0000000..46a5a0b
--- /dev/null
+++ b/usr/klibc/arch/x86_64/sigreturn.S
@@ -0,0 +1,15 @@
+/*
+ * arch/x86_64/sigreturn.S
+ */
+
+#include <asm/unistd.h>
+
+ .text
+ .align 4
+ .globl __sigreturn
+ .type __sigreturn, at function
+__sigreturn:
+ movl $__NR_rt_sigreturn,%eax
+ syscall
+
+ .size __sigreturn,.-__sigreturn
diff --git a/usr/klibc/arch/x86_64/syscall.S b/usr/klibc/arch/x86_64/syscall.S
new file mode 100644
index 0000000..1797797
--- /dev/null
+++ b/usr/klibc/arch/x86_64/syscall.S...
2006 Jun 26
0
[klibc 24/43] i386 support for klibc
...jmp,.-longjmp
diff --git a/usr/klibc/arch/i386/sigreturn.S b/usr/klibc/arch/i386/sigreturn.S
new file mode 100644
index 0000000..f2a3241
--- /dev/null
+++ b/usr/klibc/arch/i386/sigreturn.S
@@ -0,0 +1,15 @@
+#
+# arch/i386/sigreturn.S
+#
+
+#include <asm/unistd.h>
+
+ .text
+ .align 4
+ .globl __sigreturn
+ .type __sigreturn, at function
+__sigreturn:
+ pop %eax # Have no idea why this is needed...
+ movl $__NR_sigreturn,%eax
+ int $0x80
+ .size __sigreturn,.-__sigreturn
diff --git a/usr/klibc/arch/i386/socketcall.S b/usr/klibc/arch/i386/socketcall.S
new file mode 100644
index 0000000..816db34
---...
2020 Aug 27
0
[klibc:master] signal: Note another reason to define _KLIBC_NEEDS_SA_RESTORER
...ction.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 29
0
[klibc:master] signal: Add config flag for additional sigaction fixup
...e _KLIBC_NEEDS_SIGACTION_FIXUP 0
+#endif
+
+
/*
* _KLIBC_STATFS_F_TYPE_64:
*
diff --git a/usr/klibc/sigaction.c b/usr/klibc/sigaction.c
index d2223843..a8181a41 100644
--- a/usr/klibc/sigaction.c
+++ b/usr/klibc/sigaction.c
@@ -8,11 +8,17 @@
#include <klibc/sysconfig.h>
__extern void __sigreturn(void);
+
+#if _KLIBC_NEEDS_SIGACTION_FIXUP
+typedef struct sigaction *act_type;
+#else
+typedef const struct sigaction *act_type;
+#endif
+
#if _KLIBC_USE_RT_SIG
-__extern int __rt_sigaction(int, const struct sigaction *, struct sigaction *,
- size_t);
+__extern int __rt_sigaction(int, act_t...
2012 May 05
3
[PATCH] fix non-RT sigsuspend()
...HCONFIG_H */
diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
index 6ed6bdf..7abab15 100644
--- a/usr/klibc/SYSCALLS.def
+++ b/usr/klibc/SYSCALLS.def
@@ -206,9 +206,20 @@ int rt_sigprocmask::__rt_sigprocmask(int, const sigset_t *, sigset_t *, size_t);
<sparc64> void rt_sigreturn::__sigreturn();
#else
int sigaction::__sigaction(int, const struct sigaction *, struct sigaction *);
-int sigsuspend(const sigset_t *);
int sigpending(sigset_t *);
int sigprocmask(int, const sigset_t *, sigset_t *);
+/*
+ * There is no single calling convention for the old sigsuspend.
+ * If your architectu...
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 28
35
[klibc 00/31] klibc as a historyless patchset (updated and reorganized)
I have updated the klibc patchset based on feedback received. In
particular, the patchset has been reorganized so as not to break
git-bisect.
Additionally, this updates the patch base to 2.6.17-git12
(d38b69689c349f35502b92e20dafb30c62d49d63) and klibc 1.4.8; the main
difference on the klibc side is removal of obsolete code.
This is also available as a git tree at: