[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1610261321510.4983@nanos>
Date: Wed, 26 Oct 2016 13:22:29 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Jiri Slaby <jslaby@...e.cz>
cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] futex: make FUTEX_OP_OPARG_SHIFT unsigned
On Mon, 24 Oct 2016, Jiri Slaby wrote:
> FUTEX_OP_OPARG_SHIFT is shifted left by 28 in futex_atomic_op_inuser and
> other places. Since FUTEX_OP_OPARG_SHIFT is 8, we actually do (8 << 28).
> But given both are ints, we perform operation with undefined behaviour
> about which UBSAN reports:
> UBSAN: Undefined behaviour in arch/x86/include/asm/futex.h:53:13
> shift exponent 776 is too large for 32-bit type 'int'
shift exponent 776 ????
Thanks,
tglx
Powered by blists - more mailing lists