[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210910223409.3225001-1-keescook@chromium.org>
Date: Fri, 10 Sep 2021 15:34:09 -0700
From: Kees Cook <keescook@...omium.org>
To: linux-kernel@...r.kernel.org
Cc: Kees Cook <keescook@...omium.org>, linux-hardening@...r.kernel.org
Subject: [PATCH] samples/seccomp: Avoid alias warning
Under GCC 4.9, fix the warning due to missing -fno-strict-aliasing:
samples/seccomp/user-trap.c:50:2: warning: dereferencing type-punned pointer will break strict-alias
ing rules [-Wstrict-aliasing]
samples/seccomp/user-trap.c:83:2: warning: dereferencing type-punned pointer will break strict-alias
ing rules [-Wstrict-aliasing]
Signed-off-by: Kees Cook <keescook@...omium.org>
---
samples/seccomp/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/seccomp/Makefile b/samples/seccomp/Makefile
index c85ae0ed8342..a3a3ef20a8fc 100644
--- a/samples/seccomp/Makefile
+++ b/samples/seccomp/Makefile
@@ -3,4 +3,4 @@ userprogs-always-y += bpf-fancy dropper bpf-direct user-trap
bpf-fancy-objs := bpf-fancy.o bpf-helper.o
-userccflags += -I usr/include
+userccflags += -I usr/include -fno-strict-aliasing
--
2.30.2
Powered by blists - more mailing lists