From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: [PATCH] x86: General protection fault after STR (32 bit systems only) Date: Sat, 13 Jun 2015 16:20:05 +0200 Message-ID: <20150613142005.GA29207@amd> References: <1434066338-6619-1-git-send-email-srinivas.pandruvada@linux.intel.com> <20150612060747.GA25024@gmail.com> <20150612075013.GA8759@gmail.com> <20150612083625.GA22760@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Denys Vlasenko Cc: Brian Gerst , Ingo Molnar , "H. Peter Anvin" , Andy Lutomirski , Srinivas Pandruvada , Ingo Molnar , Thomas Gleixner , "Rafael J. Wysocki" , X86 ML , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Denys Vlasenko , Borislav Petkov , Linus Torvalds List-Id: linux-pm@vger.kernel.org On Sat 2015-06-13 00:45:29, Denys Vlasenko wrote: > On Fri, Jun 12, 2015 at 5:48 PM, Brian Gerst wrote: > > If you follow the convoluted flow of the calls in this file, > > ... > > Speaking of which. It is indeed quite bad. > > For one, saved_eip is only ever set to point to ret_point: > > ENTRY(saved_eip) .long 0 > ... > > movl $ret_point, saved_eip > > and it has just a single user, where an indirect jump > through it is performed: > > # jump to place where we left off > movl saved_eip, %eax > jmp *%eax > > No comments why it is so. > > All this seems to be equivalent to trivial > > # jump to place where we left off > jmp ret_point > > Am I missing something? I don't think so. Its just that slowdown was not bad enough tofix it. ...patch would be welcome, and even better if you could check the issue on 64-bit kernel, too... Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html