Re: [PATCH 4.9 27/33] futex: Remove duplicated code and fix undefined behaviour
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Jiri Slaby <jslaby@xxxxxxx>
- Subject: Re: [PATCH 4.9 27/33] futex: Remove duplicated code and fix undefined behaviour
- From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 18 May 2018 11:01:41 +0200
- Cc: linux-kernel@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Russell King <rmk+kernel@xxxxxxxxxxxxxxx>, "Darren Hart (VMware)" <dvhart@xxxxxxxxxxxxx>, linux-mips@xxxxxxxxxxxxxx, Rich Felker <dalias@xxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, peterz@xxxxxxxxxxxxx, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Max Filippov <jcmvbkbc@xxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, sparclinux@xxxxxxxxxxxxxxx, Jonas Bonn <jonas@xxxxxxxxxxxx>, linux-s390@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, linux-hexagon@xxxxxxxxxxxxxxx, Helge Deller <deller@xxxxxx>, "James E.J. Bottomley" <jejb@xxxxxxxxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Matt Turner <mattst88@xxxxxxxxx>, linux-snps-arc@xxxxxxxxxxxxxxxxxxx, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, linux-xtensa@xxxxxxxxxxxxxxxx, Stefan Kristiansson <stefan.kristiansson@xxxxxxxxxxxxx>, openrisc@xxxxxxxxxxxxxxxxxxxx, Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx>, Stafford Horne <shorne@xxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, Richard Henderson <rth@xxxxxxxxxxx>, Chris Zankel <chris@xxxxxxxxxx>, Michal Simek <monstr@xxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, linux-parisc@xxxxxxxxxxxxxxx, Vineet Gupta <vgupta@xxxxxxxxxxxx>, Ralf Baechle <ralf@xxxxxxxxxxxxxx>, Richard Kuo <rkuo@xxxxxxxxxxxxxx>, linux-alpha@xxxxxxxxxxxxxxx, Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxxxxx>, Ben Hutchings <ben.hutchings@xxxxxxxxxxxxxxx>
- In-reply-to: <e8dc5f94-3b52-dcf0-3b5e-b442bde7d803@suse.cz>
- References: <20180518081535.096308218@linuxfoundation.org> <20180518081536.166573281@linuxfoundation.org> <e8dc5f94-3b52-dcf0-3b5e-b442bde7d803@suse.cz>
- User-agent: Mutt/1.9.5 (2018-04-13)
On Fri, May 18, 2018 at 10:30:24AM +0200, Jiri Slaby wrote:
> On 05/18/2018, 10:16 AM, Greg Kroah-Hartman wrote:
> > 4.9-stable review patch. If anyone has any objections, please let me know.
> >
> > ------------------
> >
> > From: Jiri Slaby <jslaby@xxxxxxx>
> >
> > commit 30d6e0a4190d37740e9447e4e4815f06992dd8c3 upstream.
> ...
> > --- a/kernel/futex.c
> > +++ b/kernel/futex.c
> > @@ -1458,6 +1458,45 @@ out:
> > return ret;
> > }
> >
> > +static int futex_atomic_op_inuser(unsigned int encoded_op, u32 __user *uaddr)
> > +{
> > + unsigned int op = (encoded_op & 0x70000000) >> 28;
> > + unsigned int cmp = (encoded_op & 0x0f000000) >> 24;
> > + int oparg = sign_extend32((encoded_op & 0x00fff000) >> 12, 12);
> > + int cmparg = sign_extend32(encoded_op & 0x00000fff, 12);
>
> 12 is wrong here – wherever you apply this, you need also a follow-up fix:
> commit d70ef22892ed6c066e51e118b225923c9b74af34
> Author: Jiri Slaby <jslaby@xxxxxxx>
> Date: Thu Nov 30 15:35:44 2017 +0100
>
> futex: futex_wake_op, fix sign_extend32 sign bits
Thanks for letting me know, I've now queued it up to the needed trees.
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]