Date: Tue, 6 Feb 2018 14:52:59 -0800 From: Linus Torvalds <torvalds@...ux-foundation.org> To: Dan Williams <dan.j.williams@...el.com> Cc: Andy Lutomirski <luto@...nel.org>, Luis Henriques <lhenriques@...e.com>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, linux-arch <linux-arch@...r.kernel.org>, Kernel Hardening <kernel-hardening@...ts.openwall.com>, Greg KH <gregkh@...uxfoundation.org>, X86 ML <x86@...nel.org>, Ingo Molnar <mingo@...hat.com>, "H. Peter Anvin" <hpa@...or.com>, Thomas Gleixner <tglx@...utronix.de>, Andrew Morton <akpm@...ux-foundation.org>, Alan Cox <alan@...ux.intel.com> Subject: Re: [PATCH v4 07/10] x86: narrow out of bounds syscalls to sys_read under speculation On Tue, Feb 6, 2018 at 1:37 PM, Dan Williams <dan.j.williams@...el.com> wrote: > > At that point we're basically just back to the array_ptr() version > that returned a sanitized pointer to an array element. .. that one does an extra unnecessary 'andq' instead of the duplicated cmp. But at least it avoids comparing that 32-bit integer twice, so it's probably slightly smaller. (And your code generation is without the "r" -> "ir" fix for the size argument) Probably doesn't matter. But a "asm goto" would give you at least potentially optimal code. Linus
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.