From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426319AbcBRKbt (ORCPT ); Thu, 18 Feb 2016 05:31:49 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:35011 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425184AbcBRKbp (ORCPT ); Thu, 18 Feb 2016 05:31:45 -0500 Message-ID: <1455791503.31619.246.camel@nexus-software.ie> Subject: Re: [PATCH] x86/intel/quark: Parameterize the kernel's IMR lock logic From: "Bryan O'Donoghue" To: Ingo Molnar 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 Date: Thu, 18 Feb 2016 10:31:43 +0000 In-Reply-To: <20160218075810.GA16041@gmail.com> References: <1455766168-17335-1-git-send-email-pure.logic@nexus-software.ie> <20160218075810.GA16041@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5-1ubuntu3.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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