lkml.org 
[lkml]   [2013]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/6] x86: kaslr: move CPU flags out of cpucheck
From
On Thu, Apr 25, 2013 at 3:00 PM, H. Peter Anvin <hpa@zytor.com> 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


\
 
 \ /
  Last update: 2013-04-26 18:01    [W:0.054 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site