linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org, keescook@chromium.org,
	tglx@linutronix.de, hpa@linux.intel.com,
	linux-tip-commits@vger.kernel.org
Subject: Re: [PATCH v2] x86, boot: Fix word-size assumptions in has_eflag () inline asm
Date: Thu, 30 Jan 2014 14:08:19 +0000	[thread overview]
Message-ID: <1391090899.26079.103.camel@shinybook.infradead.org> (raw)
In-Reply-To: <a78f892e-ad61-4a51-9ffe-466b473d3cde@email.android.com>

[-- Attachment #1: Type: text/plain, Size: 877 bytes --]

On Thu, 2014-01-30 at 05:45 -0800, H. Peter Anvin wrote:
> This would seem like a job for <asm/asm.h>.

Except that's all done on CONFIG_X86_32 which isn't useful for what we
are doing here.

We could, potentially, *change* <asm/asm.h> so that it actually makes
its choices based on whether __x86_64__ is defined?

Which would probably work, except for the next horrid corner case I
haven't discovered/realised yet :)

I think I'm inclined to keep this fairly localised, unless we really see
a case for doing it elsewhere in the kernel. Which is unlikely since a
bare 'pushf' should always do the right thing except in the weird
no-mans-land that is building 16-bit code with a 32-bit compiler.

I note that BITS_PER_LONG==64 even when building the 16-bit code as part
of a 64-bit kernel, too. That one is just waiting to bite us some day...

-- 
dwmw2


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5745 bytes --]

  reply	other threads:[~2014-01-30 14:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-03 20:53 [PATCH v7 0/7] Kernel base address randomization on x86 Kees Cook
2013-10-03 20:53 ` [PATCH 1/7] x86, boot: move CPU flags out of cpucheck Kees Cook
2014-01-29 12:01   ` [PATCH] x86, boot: fix word-size assumptions in has_eflag() inline asm David Woodhouse
2014-01-29 16:57     ` Kees Cook
2014-01-29 17:13     ` [tip:x86/build] x86, boot: Fix word-size assumptions in has_eflag () " tip-bot for David Woodhouse
2014-01-30  9:09       ` Ingo Molnar
2014-01-30 10:28         ` Woodhouse, David
2014-01-30 11:00         ` [PATCH v2] " David Woodhouse
2014-01-30 13:45           ` H. Peter Anvin
2014-01-30 14:08             ` David Woodhouse [this message]
2014-01-30 16:10           ` [tip:x86/build] " tip-bot for David Woodhouse
2014-01-30 23:01           ` [PATCH v2] " David Rientjes
2013-10-03 20:53 ` [PATCH 2/7] x86, kaslr: return location from decompress_kernel Kees Cook
2013-10-03 20:53 ` [PATCH 3/7] x86, kaslr: find minimum safe relocation position Kees Cook
2013-10-03 22:23   ` H. Peter Anvin
2013-10-03 22:43     ` Kees Cook
2013-10-03 22:46       ` H. Peter Anvin
2013-10-03 20:53 ` [PATCH 4/7] x86, kaslr: select random base offset Kees Cook
2013-10-03 20:53 ` [PATCH 5/7] x86, kaslr: select memory region from e820 maps Kees Cook
2013-10-03 20:53 ` [PATCH 6/7] x86, kaslr: report kernel offset on panic Kees Cook
2013-10-03 20:53 ` [PATCH 7/7] x86, kaslr: raise max positions to 1GiB on x86_64 Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1391090899.26079.103.camel@shinybook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).