Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756499Ab3DZP2x (ORCPT ); Fri, 26 Apr 2013 11:28:53 -0400 Received: from mail-oa0-f44.google.com ([209.85.219.44]:41198 "EHLO mail-oa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756468Ab3DZP2w (ORCPT ); Fri, 26 Apr 2013 11:28:52 -0400 MIME-Version: 1.0 In-Reply-To: <5179A797.9040200@zytor.com> References: <1366926860-26776-1-git-send-email-keescook@chromium.org> <1366926860-26776-3-git-send-email-keescook@chromium.org> <5179A797.9040200@zytor.com> Date: Fri, 26 Apr 2013 08:28:51 -0700 X-Google-Sender-Auth: YRMXpljAR-l3NMjBCKW14lOPhLo Message-ID: Subject: Re: [PATCH 2/6] x86: kaslr: move CPU flags out of cpucheck From: Kees Cook To: "H. Peter Anvin" Cc: LKML , "kernel-hardening@lists.openwall.com" , Thomas Gleixner , Ingo Molnar , "x86@kernel.org" , Jarkko Sakkinen , Matthew Garrett , Matt Fleming , Eric Northup , Dan Rosenberg , Julien Tinnes , Will Drewry Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 886 Lines: 25 On Thu, Apr 25, 2013 at 3:00 PM, H. Peter Anvin wrote: > On 04/25/2013 02:54 PM, Kees Cook wrote: >> Since has_eflag() and has_fpu() are 32-bit only, short-circuit the >> routines on 64-bit when they are built without -m32. This also refactors >> the calls to cpuid to make them PIC-safe on 32-bit. > > These functions can trivially be made 32- and 64-bit agnostic by > changing "u32" to "unsigned long" and drop the -l suffixes in the > assembly code. Ah, good call. I found what was stopping me earlier. The u32 argument needed to be switched to unsigned long too. Duh. :) Thanks! -Kees -- Kees Cook Chrome OS Security -- 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/