Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964927AbbD0PGT (ORCPT ); Mon, 27 Apr 2015 11:06:19 -0400 Received: from mail-ig0-f169.google.com ([209.85.213.169]:38862 "EHLO mail-ig0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751336AbbD0PGR (ORCPT ); Mon, 27 Apr 2015 11:06:17 -0400 MIME-Version: 1.0 In-Reply-To: References: <5d120f358612d73fc909f5bfa47e7bd082db0af0.1429841474.git.luto@kernel.org> <20150425211206.GE32099@pd.tnic> <20150427085305.GB6774@pd.tnic> <20150427113506.GG6774@pd.tnic> Date: Mon, 27 Apr 2015 08:06:16 -0700 X-Google-Sender-Auth: ZZJ3ruRdx_-15dk_6A2JBoHR5SE Message-ID: Subject: Re: [PATCH] x86_64, asm: Work around AMD SYSRET SS descriptor attribute issue From: Linus Torvalds To: Borislav Petkov Cc: Andy Lutomirski , Andy Lutomirski , X86 ML , "H. Peter Anvin" , Denys Vlasenko , Brian Gerst , Denys Vlasenko , Ingo Molnar , Steven Rostedt , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 919 Lines: 25 On Mon, Apr 27, 2015 at 7:57 AM, Linus Torvalds wrote: > > ..end result is just six bytes. That way you can use alternative to > replace it with one single noop on AMD. Actually, it looks like we have no good 6-byte no-ops on AMD. So you'd get two three-byte ones. Oh well. It's still better than five nops that can't even be decoded all at once. That said, our NOP tables look to be old for AMD. Looking at the AMD optimization guide (family 16h), it says to use 66 0F 1F 44 00 00 which seems to be the same as Intel (it's "nopw 0x0(%rax,%rax,1)"). So maybe our AMD nop tables should be updated? Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/