lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 28 Apr 2008 20:01:48 -0700
From:	"Yinghai Lu" <yhlu.kernel@...il.com>
To:	"Andrew Morton" <akpm@...ux-foundation.org>
Cc:	"Yinghai Lu" <yhlu.kernel.send@...il.com>,
	"Ingo Molnar" <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	"Thomas Gleixner" <tglx@...utronix.de>,
	"Gabriel C" <nix.or.die@...glemail.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Mika Fischer" <mika.fischer@...pnet.de>
Subject: Re: [PATCH] x86: mtrr cleanup for converting continuous to discrete layout v5

On Mon, Apr 28, 2008 at 7:42 PM, Andrew Morton
<akpm@...ux-foundation.org> wrote:
> On Mon, 28 Apr 2008 15:05:05 -0700 Yinghai Lu <yhlu.kernel.send@...il.com> wrote:
>
>  >
>  > some BIOS like to use continus MTRR layout, and may X driver can not add
>  > WB entries for graphical cards when 4g or more RAM installed.
>  >
>  > the patch will change MTRR to discrete.
>  >
>  > mtrr_chunk_size= could be used to have smaller continuous block to hold holes.
>  > default is 256m, could be set according to size of graphics card memory.
>  >
>  > v2: fix -1 for UC checking
>  > v3: default to disable, and need use enable_mtrr_cleanup to enable this feature
>  >     skip the var state change warning.
>  >     remove next_basek in range_to_mtrr()
>  > v4: correct warning mask.
>  > v5: CONFIG_MTRR_SANITIZER
>  >
>  > Signed-off-by: Yinghai Lu <yhlu.kernel@...il.com>
>
>
> > +#ifdef CONFIG_MTRR_SANITIZER
>  > +
>  > +#ifdef CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT
>
>  I don't think these newly-added config items should exist, sorry.  But
>  then, the changelog does't describe _why_ they exist (it should!) and I
>  probably missed it in the discusson.
>
>  Anyone who distributes a kernel will need to enable both
>  CONFIG_MTRR_SANITIZER and CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT, so the
>  config items are only useful for saving a bit of kernel text in custom
>  kernel builds.
>
>
>  > +static int enable_mtrr_cleanup __initdata = 1;
>  > +#else
>  > +static int enable_mtrr_cleanup __initdata;
>
>  The disable_mtrr_cleanup and enable_mtrr_cleanup boot options are also
>  problematic.  We really really want this stuff to all happen automatically.
>
>  What happens with this sort of thing is that people's machines misbehave
>  and I expect most of them never find out about the magic option.  They
>  give up on Linux or use a different computer or use a different distro
>  which happened to set the option the other way, etc, etc.  Some people will
>  think to do a bit of googling and might stumble across the option after a
>  while.
>
>  It's all rather user-unfriendly and we should try really hard to just make
>  things work.  Is this at all possible?

Eric or Andi said it is too risky to touch mtrr.

>
>
>  Anyway.  I think the problem which you have identified is solveable in
>  userspace, isn't it?  Read the existing mtrr settings and rewrite them in a
>  better form?  If so, we could prepare a little program which does that and
>  make the X people and distributors aware of it.  This has the significant
>  advantage that it will fix pre-2.6.26 kernels too.

sounds good.

YH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ