* FAILED: patch "[PATCH] selftests/seccomp: Support glibc 2.26 siginfo_t.h" failed to apply to 4.4-stable tree
@ 2017-10-02 11:49 gregkh
2017-10-02 22:50 ` Shuah Khan
0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2017-10-02 11:49 UTC (permalink / raw)
To: keescook, luto, seth.forshee, shuah, shuahkh, wad; +Cc: stable
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 10859f3855db4c6f10dc7974ff4b3a292f3de8e0 Mon Sep 17 00:00:00 2001
From: Kees Cook <keescook@chromium.org>
Date: Thu, 7 Sep 2017 16:32:46 -0700
Subject: [PATCH] selftests/seccomp: Support glibc 2.26 siginfo_t.h
The 2.26 release of glibc changed how siginfo_t is defined, and the earlier
work-around to using the kernel definition are no longer needed. The old
way needs to stay around for a while, though.
Reported-by: Seth Forshee <seth.forshee@canonical.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Will Drewry <wad@chromium.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Tested-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index 4d6f92a9df6b..19cd272c234d 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
@@ -6,10 +6,18 @@
*/
#include <sys/types.h>
-#include <asm/siginfo.h>
-#define __have_siginfo_t 1
-#define __have_sigval_t 1
-#define __have_sigevent_t 1
+
+/*
+ * glibc 2.26 and later have SIGSYS in siginfo_t. Before that,
+ * we need to use the kernel's siginfo.h file and trick glibc
+ * into accepting it.
+ */
+#if !__GLIBC_PREREQ(2, 26)
+# include <asm/siginfo.h>
+# define __have_siginfo_t 1
+# define __have_sigval_t 1
+# define __have_sigevent_t 1
+#endif
#include <errno.h>
#include <linux/filter.h>
@@ -676,7 +684,7 @@ TEST_F_SIGNAL(TRAP, ign, SIGSYS)
syscall(__NR_getpid);
}
-static struct siginfo TRAP_info;
+static siginfo_t TRAP_info;
static volatile int TRAP_nr;
static void TRAP_action(int nr, siginfo_t *info, void *void_context)
{
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: FAILED: patch "[PATCH] selftests/seccomp: Support glibc 2.26 siginfo_t.h" failed to apply to 4.4-stable tree
2017-10-02 11:49 FAILED: patch "[PATCH] selftests/seccomp: Support glibc 2.26 siginfo_t.h" failed to apply to 4.4-stable tree gregkh
@ 2017-10-02 22:50 ` Shuah Khan
0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2017-10-02 22:50 UTC (permalink / raw)
To: keescook; +Cc: gregkh, luto, seth.forshee, shuah, wad, stable, Shuah Khan
On 10/02/2017 05:49 AM, gregkh@linuxfoundation.org wrote:
>
> The patch below does not apply to the 4.4-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
>
> thanks,
>
> greg k-h
Hi Kees,
Could you please send a patch for 4.4 stable if this fix is applicable
>
> ------------------ original commit in Linus's tree ------------------
>
>>>From 10859f3855db4c6f10dc7974ff4b3a292f3de8e0 Mon Sep 17 00:00:00 2001
> From: Kees Cook <keescook@chromium.org>
> Date: Thu, 7 Sep 2017 16:32:46 -0700
> Subject: [PATCH] selftests/seccomp: Support glibc 2.26 siginfo_t.h
>
> The 2.26 release of glibc changed how siginfo_t is defined, and the earlier
> work-around to using the kernel definition are no longer needed. The old
> way needs to stay around for a while, though.
>
> Reported-by: Seth Forshee <seth.forshee@canonical.com>
> Cc: Andy Lutomirski <luto@amacapital.net>
> Cc: Will Drewry <wad@chromium.org>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: stable@vger.kernel.org
> Signed-off-by: Kees Cook <keescook@chromium.org>
> Tested-by: Seth Forshee <seth.forshee@canonical.com>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>
> diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
> index 4d6f92a9df6b..19cd272c234d 100644
> --- a/tools/testing/selftests/seccomp/seccomp_bpf.c
> +++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
> @@ -6,10 +6,18 @@
> */
>
> #include <sys/types.h>
> -#include <asm/siginfo.h>
> -#define __have_siginfo_t 1
> -#define __have_sigval_t 1
> -#define __have_sigevent_t 1
> +
> +/*
> + * glibc 2.26 and later have SIGSYS in siginfo_t. Before that,
> + * we need to use the kernel's siginfo.h file and trick glibc
> + * into accepting it.
> + */
> +#if !__GLIBC_PREREQ(2, 26)
> +# include <asm/siginfo.h>
> +# define __have_siginfo_t 1
> +# define __have_sigval_t 1
> +# define __have_sigevent_t 1
> +#endif
>
> #include <errno.h>
> #include <linux/filter.h>
> @@ -676,7 +684,7 @@ TEST_F_SIGNAL(TRAP, ign, SIGSYS)
> syscall(__NR_getpid);
> }
>
> -static struct siginfo TRAP_info;
> +static siginfo_t TRAP_info;
> static volatile int TRAP_nr;
> static void TRAP_action(int nr, siginfo_t *info, void *void_context)
> {
>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-02 22:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-02 11:49 FAILED: patch "[PATCH] selftests/seccomp: Support glibc 2.26 siginfo_t.h" failed to apply to 4.4-stable tree gregkh
2017-10-02 22:50 ` Shuah Khan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.