From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758048Ab1GAXOW (ORCPT ); Fri, 1 Jul 2011 19:14:22 -0400 Received: from terminus.zytor.com ([198.137.202.10]:39332 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756745Ab1GAXOV (ORCPT ); Fri, 1 Jul 2011 19:14:21 -0400 Message-ID: <4E0E532C.2060807@zytor.com> Date: Fri, 01 Jul 2011 16:07:24 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10 MIME-Version: 1.0 To: Kees Cook CC: linux-kernel@vger.kernel.org, Len Brown , Pavel Machek , "Rafael J. Wysocki" , Thomas Gleixner , Ingo Molnar , x86@kernel.org, Pekka Enberg , Brian Gerst , Alan Cox Subject: Re: [PATCH] x86: add missing verify_cpu to 32bit wakeup References: <20110701211943.GA7042@outflux.net> <4E0E3B83.3000403@zytor.com> <20110701223623.GV32221@outflux.net> In-Reply-To: <20110701223623.GV32221@outflux.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/01/2011 03:36 PM, Kees Cook wrote: >> >> For S3, we should save/restore MISC_ENABLE instead... in fact, we >> already save it, we just restore it too late. > > Given that MISC_ENABLE may not be available for a given CPU, it seems that > it's basically the same detection code as in verify_cpu() already. Since > this bit is the only part that is needed that early, I think the patch is > good the way it is (especially since it balances the 64bit path which > already calls this logic). I don't think doing the full early MISC_ENABLE > save/restore this early is worth it. Thoughts? > We already save it, including if it exists, so we should just restore it early, and then we don't have to do it again. -hpa