Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753082AbbD0QAM (ORCPT ); Mon, 27 Apr 2015 12:00:12 -0400 Received: from mail-ig0-f172.google.com ([209.85.213.172]:34438 "EHLO mail-ig0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751086AbbD0QAJ (ORCPT ); Mon, 27 Apr 2015 12:00:09 -0400 MIME-Version: 1.0 In-Reply-To: <20150427154631.GB28871@pd.tnic> References: <5d120f358612d73fc909f5bfa47e7bd082db0af0.1429841474.git.luto@kernel.org> <20150425211206.GE32099@pd.tnic> <20150427085305.GB6774@pd.tnic> <20150427113506.GG6774@pd.tnic> <20150427154631.GB28871@pd.tnic> Date: Mon, 27 Apr 2015 09:00:08 -0700 X-Google-Sender-Auth: G71NFj_n8h2j_dGgP8AUEvjLuWM 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: 1257 Lines: 29 On Mon, Apr 27, 2015 at 8:46 AM, Borislav Petkov wrote: > > Right, what about the false positives: Anybody who tries to return to kernel addresses with sysret is suspect. It's more likely to be an attack vector than anything else (ie somebody who is trying to take advantage of a CPU bug). I don't think there are any false positives. The only valid sysret targets are in normal user space. There's the "vsyscall" area, I guess, but we are actively discouraging people from using it (it's emulated by default) and using iret to return from it is fine if somebody ends up using it natively. It was a mistake to have fixed addresses with known code in it, so I don't think we should care. We've had the inexact version for a long time, and the exact canonical address check hasn't even hit my tree yet. I wouldn't worry about it. And since we haven't even merged the "better check for canonical addresses" it cannot even be a regression if we never really use it. 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/