From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]:59114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752063AbeEQJYZ (ORCPT ); Thu, 17 May 2018 05:24:25 -0400 Date: Thu, 17 May 2018 11:24:07 +0200 From: Greg Kroah-Hartman To: Ben Hutchings Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Robin Murphy , Will Deacon , Sasha Levin Subject: Re: [PATCH 4.4 099/190] arm64: futex: Fix undefined behaviour with FUTEX_OP_OPARG_SHIFT usage Message-ID: <20180517092407.GI25318@kroah.com> References: <20180411183550.114495991@linuxfoundation.org> <20180411183556.339662900@linuxfoundation.org> <1526426136.9159.85.camel@codethink.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1526426136.9159.85.camel@codethink.co.uk> Sender: stable-owner@vger.kernel.org List-ID: On Wed, May 16, 2018 at 12:15:36AM +0100, Ben Hutchings wrote: > On Wed, 2018-04-11 at 20:35 +0200, Greg Kroah-Hartman wrote: > > 4.4-stable review patch.��If anyone has any objections, please let me know. > > > > ------------------ > > > > > From: Will Deacon > > > > > > [ Upstream commit 5f16a046f8e144c294ef98cd29d9458b5f8273e5 ] > > > > FUTEX_OP_OPARG_SHIFT instructs the futex code to treat the 12-bit oparg > > field as a shift value, potentially leading to a left shift value that > > is negative or with an absolute value that is significantly larger then > > the size of the type. UBSAN chokes with: > [...] > > Whilst I think this catches all of the issues, I'd much prefer to remove > > this stuff, as I think it's unused and the bugs are copy-pasted between > > a bunch of architectures. > [...] > > Indeed. That more complete fix was done upstream by: > > commit 30d6e0a4190d37740e9447e4e4815f06992dd8c3 > Author: Jiri Slaby > Date:���Thu Aug 24 09:31:05 2017 +0200 > > ����futex: Remove duplicated code and fix undefined behaviour > > It's a bit big for stable - though most of the changes are deletions. > What do you think? I think it makes a lot of sense, I've done the backport now, thanks. greg k-h