Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 29 Jan 2014 08:57:40 -0800
From: Kees Cook <keescook@...omium.org>
To: David Woodhouse <dwmw2@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>, "x86@...nel.org" <x86@...nel.org>, 
	"kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>, Aaron Durbin <adurbin@...gle.com>, 
	Eric Northup <digitaleric@...gle.com>, Julien Tinnes <jln@...gle.com>, Will Drewry <wad@...gle.com>, 
	Mathias Krause <minipli@...glemail.com>, Zhang Yanfei <zhangyanfei@...fujitsu.com>, 
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] x86, boot: fix word-size assumptions in has_eflag()
 inline asm

On Wed, Jan 29, 2014 at 4:01 AM, David Woodhouse <dwmw2@...radead.org> wrote:
> Commit dd78b97367bd575918204cc89107c1479d3fc1a7 ("x86, boot: Move CPU
> flags out of cpucheck") introduced ambiguous inline asm in the
> has_eflag() function. We want the instruction to be 'pushfl', but we
> just say 'pushf' and hope the compiler does what we wanted.
>
> When building with 'clang -m16', it won't, because clang doesn't use
> the horrid '.code16gcc' hack that even 'gcc -m16' uses internally.
>
> Say what we mean and don't make the compiler make assumptions.
>
> Signed-off-by: David Woodhouse <David.Woodhouse@...el.com>

Yes, excellent point. Thanks!

Acked-by: Kees Cook <keescook@...omium.org>

-Kees

-- 
Kees Cook
Chrome OS Security

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.