Displaying 2 results from an estimated 2 matches for "966bc1c6".
Did you mean:
65bc1c6
2020 Aug 27
0
[klibc:master] signal: Note another reason to define _KLIBC_NEEDS_SA_RESTORER
...efore must have
- * SA_RESTORER set.
+ * SA_RESTORER set. On others, the default sigreturn requires an
+ * executable stack, which we should avoid.
*/
#ifndef _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_RESTORE...
2020 Aug 27
0
[klibc:master] signal: Add sysconfig setting to force SA_SIGINFO on
...de our
+ * own restorer function, this must also be set so that the
+ * restorer can always use rt_sigreturn().
+ */
+#ifndef _KLIBC_NEEDS_SA_SIGINFO
+# define _KLIBC_NEEDS_SA_SIGINFO 0
+#endif
+
+
/*
* _KLIBC_STATFS_F_TYPE_64:
*
diff --git a/usr/klibc/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...