mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Kees Cook <keescook@chromium.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Alex Shi <alex.shi@intel.com>,
	Borislav Petkov <borislav.petkov@amd.com>,
	Alexander Duyck <alexander.h.duyck@intel.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	xen-devel@lists.xensource.com,
	virtualization@lists.linux-foundation.org,
	kernel-hardening@lists.openwall.com,
	Dan Rosenberg <drosenberg@vsecurity.com>,
	Julien Tinnes <jln@google.com>, Will Drewry <wad@chromium.org>,
	Eric Northup <digitaleric@google.com>
Subject: Re: [PATCH] x86: make IDT read-only
Date: Mon, 8 Apr 2013 23:56:29 +0100 (BST)	[thread overview]
Message-ID: <alpine.LFD.2.03.1304082350540.25182@linux-mips.org> (raw)
In-Reply-To: <20130408224328.GA17641@www.outflux.net>

On Mon, 8 Apr 2013, Kees Cook wrote:

> This makes the IDT unconditionally read-only. This primarily removes
> the IDT from being a target for arbitrary memory write attacks. It has
> an added benefit of also not leaking (via the "sidt" instruction) the
> kernel base offset, if it has been relocated.
[...]
> --- a/arch/x86/kernel/cpu/intel.c
> +++ b/arch/x86/kernel/cpu/intel.c
> @@ -215,7 +201,6 @@ static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c)
>  
>  		c->f00f_bug = 1;
>  		if (!f00f_workaround_enabled) {
> -			trap_init_f00f_bug();
>  			printk(KERN_NOTICE "Intel Pentium with F0 0F bug - workaround enabled.\n");
>  			f00f_workaround_enabled = 1;
>  		}

 FWIW the change looks reasonable to me, however given that that it makes 
the arrangement unconditional and there is no longer a workaround to 
enable I think it would make sense to remove the conditional block quoted 
above altogether, along with the f00f_workaround_enabled variable itself 
(alternatively "Intel Pentium with F0 0F bug" alone could be printed 
instead and the name of the variable adjusted to make sense with the new 
meaning -- up to you to decide).

  Maciej

  parent reply	other threads:[~2013-04-08 23:01 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08 22:43 Kees Cook
2013-04-08 22:47 ` H. Peter Anvin
2013-04-08 22:55   ` Kees Cook
2013-04-08 22:48 ` H. Peter Anvin
2013-04-09  9:23   ` Thomas Gleixner
2013-04-09 18:22     ` [kernel-hardening] " Kees Cook
2013-04-09 18:26       ` H. Peter Anvin
2013-04-09 18:31         ` Kees Cook
2013-04-09 18:39           ` H. Peter Anvin
2013-04-09 18:46             ` Kees Cook
2013-04-09 18:50               ` H. Peter Anvin
2013-04-09 18:53                 ` Kees Cook
2013-04-09 18:54               ` Eric Northup
2013-04-09 18:59                 ` H. Peter Anvin
2013-04-10  0:43                 ` Readonly GDT H. Peter Anvin
2013-04-10  0:53                   ` Steven Rostedt
2013-04-10  0:58                     ` H. Peter Anvin
2013-04-10  9:42                   ` [Xen-devel] " Jan Beulich
2013-04-10 14:16                     ` H. Peter Anvin
2013-04-10 18:28                     ` H. Peter Anvin
2013-04-10  9:41               ` [kernel-hardening] Re: [PATCH] x86: make IDT read-only Ingo Molnar
2013-04-10  0:03       ` H. Peter Anvin
2013-04-10  9:52         ` Ingo Molnar
2013-04-09  9:45   ` Eric W. Biederman
2013-04-10  9:57     ` Ingo Molnar
2013-04-10 10:40       ` Eric W. Biederman
2013-04-10 16:31         ` Eric Northup
2013-04-10 16:48           ` H. Peter Anvin
2013-04-08 22:56 ` Maciej W. Rozycki [this message]
2013-04-08 23:00   ` Kees Cook
2013-04-08 23:05   ` Kees Cook
2013-04-08 23:42     ` Maciej W. Rozycki

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=alpine.LFD.2.03.1304082350540.25182@linux-mips.org \
    --to=macro@linux-mips.org \
    --cc=alex.shi@intel.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=borislav.petkov@amd.com \
    --cc=digitaleric@google.com \
    --cc=drosenberg@vsecurity.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=jln@google.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wad@chromium.org \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xensource.com \
    /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

Powered by JetHome