Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752966AbbBYJ14 (ORCPT ); Wed, 25 Feb 2015 04:27:56 -0500 Received: from terminus.zytor.com ([198.137.202.10]:39504 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752634AbbBYJ1y (ORCPT ); Wed, 25 Feb 2015 04:27:54 -0500 Message-ID: <54ED957D.8000709@zytor.com> Date: Wed, 25 Feb 2015 01:27:25 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Ingo Molnar CC: Andy Lutomirski , Denys Vlasenko , Linus Torvalds , Steven Rostedt , Borislav Petkov , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , X86 ML , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/4] x86: entry.S: tidy up several suboptimal insns References: <1424803895-4420-1-git-send-email-dvlasenk@redhat.com> <54ED00B5.3020203@zytor.com> <20150225092043.GB16165@gmail.com> In-Reply-To: <20150225092043.GB16165@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 774 Lines: 21 On 02/25/2015 01:20 AM, Ingo Molnar wrote: > > I think the fundamental fragility is that we allow the high > 32 bits to be nonzero. > > So could we just zap the high 32 bits of RAX early in the > entry code, and then from that point on we could both use > 32-bit ops and won't have to remember the possibility > either? > We do that, but people keep "optimizing" the zero extend away. We have had this cause a wide-open security hole twice already. So the extra REX prefix is a cheap cost to avoid this happen again. -hpa -- 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/