linux/tools
Christian Brauner 72c7fa7466 seccomp: avoid overflow in implicit constant conversion
commit 223e660bc7 upstream.

USER_NOTIF_MAGIC is assigned to int variables in this test so set it to INT_MAX
to avoid warnings:

seccomp_bpf.c: In function ‘user_notification_continue’:
seccomp_bpf.c:3088:26: warning: overflow in implicit constant conversion [-Woverflow]
 #define USER_NOTIF_MAGIC 116983961184613L
                          ^
seccomp_bpf.c:3572:15: note: in expansion of macro ‘USER_NOTIF_MAGIC’
  resp.error = USER_NOTIF_MAGIC;
               ^~~~~~~~~~~~~~~~

Fixes: 6a21cc50f0 ("seccomp: add a return code to trap to userspace")
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Reviewed-by: Tyler Hicks <tyhicks@canonical.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Will Drewry <wad@chromium.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Song Liu <songliubraving@fb.com>
Cc: Yonghong Song <yhs@fb.com>
Cc: Tycho Andersen <tycho@tycho.ws>
Cc: stable@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: bpf@vger.kernel.org
Reviewed-by: Tycho Andersen <tycho@tycho.ws>
Link: https://lore.kernel.org/r/20190920083007.11475-3-christian.brauner@ubuntu.com
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-17 19:56:43 +01:00
..
accounting
arch x86/insn: Fix awk regexp warnings 2019-11-29 10:09:45 +01:00
bpf tools: bpf: Use !building_out_of_srctree to determine srctree 2019-09-30 10:53:34 +02:00
build
cgroup
debugging
firewire
firmware
gpio tools: gpio: Correctly add make dependencies for gpio_utils 2019-11-13 13:46:04 +01:00
hv
iio
include tools headers UAPI: Sync sched.h with the kernel 2019-10-15 12:44:00 -03:00
io_uring
kvm/kvm_stat
laptop
leds
lib Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-10-19 17:09:11 -04:00
memory-model
nfsd
objtool KVM: x86: Check kvm_rebooting in kvm_spurious_fault() 2019-09-25 15:23:33 +02:00
pci
pcmcia
perf perf tests: Fix out of bounds memory access 2019-12-17 19:56:23 +01:00
power
scripts
spi
testing seccomp: avoid overflow in implicit constant conversion 2019-12-17 19:56:43 +01:00
thermal/tmon
time
usb usbip: tools: fix fd leakage in the function of read_attr_usbip_status 2019-11-29 10:10:21 +01:00
virtio tools/virtio: xen stub 2019-10-13 09:38:27 -04:00
vm
wmi
Makefile