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:	Fri, 27 Oct 2006 13:30:01 +0200
From:	Pavel Machek <pavel@....cz>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	Andrew Morton <akpm@...l.org>,
	lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>,
	virtualization <virtualization@...ts.osdl.org>
Subject: Re: [PATCH 1/4] Prep for paravirt: Be careful about touching BIOS address space

Hi!

> (Andrew had already taken that last one, I meant to send this)
> 
> Subject: Be careful about touching BIOS address space
> 
> BIOS ROM areas may not be mapped into the guest address space, so be careful
> when touching those addresses to make sure they appear to be mapped.
> 
> Signed-off-by: Jeremy Fitzhardinge <jeremy@...source.com>
> Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
> 
> ===================================================================
> --- a/arch/i386/kernel/setup.c
> +++ b/arch/i386/kernel/setup.c
> @@ -270,7 +270,14 @@ static struct resource standard_io_resou
>  	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
>  } };
>  
> -#define romsignature(x) (*(unsigned short *)(x) == 0xaa55)
> +static inline int romsignature(const unsigned char *x)
> +{
> +     unsigned short sig;
> +     int ret = 0;
> +     if (__get_user(sig, (const unsigned short *)x) == 0)
> +	  ret = (sig == 0xaa55);

Indentation is b0rken here.

And... is get_user right primitive for accessing area that may not be
there?
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
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