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, 21 Apr 2008 15:17:26 -0600
From:	Jordan Crouse <jordan.crouse@....com>
To:	Andres Salomon <dilinger@...ued.net>
Cc:	David Woodhouse <dwmw2@...radead.org>,
	Mitch Bradley <wmb@...mworks.com>,
	Yinghai Lu <yhlu.kernel@...il.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Joseph Fannin <jfannin@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: OLPC: only check for OFW signature on VSA-less Geodes

On 21/04/08 17:02 -0400, Andres Salomon wrote:
> On Mon, 21 Apr 2008 21:25:17 +0100
> David Woodhouse <dwmw2@...radead.org> wrote:
> 
> > On Mon, 2008-04-21 at 15:46 -0400, Andres Salomon wrote:
> > > Well, no, it wasn't already working; that's the reason this whole
> > > thread started.  It was crashing someone's machine.  That's why the OFW
> > > interface, as imperfect as it is, is an _improvement_.
> > 
> > You're proposing a new interface between bootloader and kernel as a
> > temporary hack just to work around that until we fix it properly?
> > 
> > That seems like overkill to me. I'd just go for is_geode() as you
> > suggested, and maybe PCI configuration tricks to detect the lack of VSA
> > so we can be _fairly_ sure it's OLPC before we poke at it?
> > 
> > Or why not try '!page_is_ram(0xffffffc0 >> PAGE_SHIFT)' if it's just to
> > avoid that particular warning? :)
> > 
> 
> 
> Okay, does anyone have a problem with this?
> 
>     
> 
> 
> 
> 
> The OFW sig check requires an ioremap that is dangerous on non-OLPC
> systems.  Long term, we should be getting the signature from the
> device tree (/openprom/model), but for right now just limit the
> check to only run on a subset of Geode (GX2/LX) systems.
> 
> Signed-off-by: Andres Salomon <dilinger@...ian.org>

Acked-by: Jordan Crouse <jordan.crouse@....com>

> diff --git a/arch/x86/kernel/olpc.c b/arch/x86/kernel/olpc.c
> index 11670be..3e66722 100644
> --- a/arch/x86/kernel/olpc.c
> +++ b/arch/x86/kernel/olpc.c
> @@ -211,6 +211,10 @@ static int __init olpc_init(void)
>  {
>  	unsigned char *romsig;
>  
> +	/* The ioremap check is dangerous; limit what we run it on */
> +	if (!is_geode() || geode_has_vsa2())
> +		return 0;
> +
>  	spin_lock_init(&ec_lock);
>  
>  	romsig = ioremap(0xffffffc0, 16);
> -- 
> 1.5.4.4
> 
> 
> -- 
> Need a kernel or Debian developer?  Contact me, I'm looking for contracts.
> 

-- 
Jordan Crouse
Systems Software Development Engineer 
Advanced Micro Devices, Inc.

--
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