All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Cc: linux-kernel@vger.kernel.org, corbet@lwn.net, tglx@linutronix.de,
	mingo@redhat.com, hpa@zytor.com, x86@kernel.org,
	andriy.shevchenko@linux.intel.com, boon.leong.ong@intel.com,
	fengguang.wu@intel.com, linux-doc@vger.kernel.org
Subject: Re: [PATCH] x86/intel/quark: Parameterize the kernel's IMR lock logic
Date: Thu, 18 Feb 2016 19:53:22 +0100	[thread overview]
Message-ID: <20160218185322.GC16753@gmail.com> (raw)
In-Reply-To: <1455791503.31619.246.camel@nexus-software.ie>


* Bryan O'Donoghue <pure.logic@nexus-software.ie> wrote:

> On Thu, 2016-02-18 at 08:58 +0100, Ingo Molnar wrote:
> > So why not simply do the patch below? Very few people use boot
> > parameters, and the 
> > complexity does not seem to be worth it.
> > 
> > Furthermore I think an IMR range in itself is safe enough - it's not
> > like such 
> > register state is going to be randomly corrupted, even with the
> > 'lock' bit unset. 
> 
> 
> Hi Ingo.
> 
> I agree - to flip the lock bit you need to be in ring-0 anyway.
> 
> > So it's a perfectly fine protective measure against accidental memory
> > corruption 
> > from the DMA space. It should not try to be more than that.
> > 
> > And once we do this, I suggest we get rid of the 'lock' parameter
> > altogether - 
> > that will further simplify the code.
> > 
> > Thanks,
> > 
> >         Ingo
> 
> That was the V1 of this patch
> 
> https://groups.google.com/forum/#!topic/linux.kernel/6ZuVOF3TJow

heh ;-)

> Andriy asked for the boot parameter to control the state of the IMR
> lock bit, I'm just as happy to go back to that version TBH

I really think it's over-engineered - especially considering that with the kernel 
lock-down removed there's no other IMR area that is really locked down - so we 
could get rid of the whole 'locked' logic that would simplify the code throughout.

Yeah, it's a nice looking hardware feature - but I don't think it's particularly 
useful in terms of extra protection.

Thanks,

	Ingo

  reply	other threads:[~2016-02-18 18:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18  3:29 [PATCH] x86/intel/quark: Parameterize the kernel's IMR lock logic Bryan O'Donoghue
2016-02-18  7:58 ` Ingo Molnar
2016-02-18 10:31   ` Bryan O'Donoghue
2016-02-18 18:53     ` Ingo Molnar [this message]
2016-02-19  1:07       ` Bryan O'Donoghue

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=20160218185322.GC16753@gmail.com \
    --to=mingo@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=boon.leong.ong@intel.com \
    --cc=corbet@lwn.net \
    --cc=fengguang.wu@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pure.logic@nexus-software.ie \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.