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]
Message-ID: <20110102090019.GC32469@atrey.karlin.mff.cuni.cz>
Date:	Sun, 2 Jan 2011 10:00:19 +0100
From:	Pavel Machek <pavel@....cz>
To:	Nicolas Pitre <nico@...xnic.net>
Cc:	Stephen Boyd <sboyd@...eaurora.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	Tony Lindgren <tony@...mide.com>,
	Arnd Bergmann <arnd@...db.de>,
	Daniel Walker <dwalker@...eaurora.org>
Subject: Re: [PATCH 1/3] hvc_dcc: Fix bad code generation by marking
	assembly volatile

Hi!

> > diff --git a/drivers/char/hvc_dcc.c b/drivers/char/hvc_dcc.c
> > index 6470f63..155ec10 100644
> > --- a/drivers/char/hvc_dcc.c
> > +++ b/drivers/char/hvc_dcc.c
> > @@ -33,8 +33,7 @@
> >  static inline u32 __dcc_getstatus(void)
> >  {
> >  	u32 __ret;
> > -
> > -	asm("mrc p14, 0, %0, c0, c1, 0	@ read comms ctrl reg"
> > +	asm volatile("mrc p14, 0, %0, c0, c1, 0	@ read comms ctrl reg"
> >  		: "=r" (__ret) : : "cc");
> >  
> >  	return __ret;

Is volatile needed here? If __dcc_getstatus() return value is
discarded, we want assembly discarded, right?


> > @@ -58,7 +57,7 @@ static inline char __dcc_getchar(void)
> >  {
> >  	char __c;
> >  
> > -	asm("mrc p14, 0, %0, c0, c5, 0	@ read comms data reg"
> > +	asm volatile("mrc p14, 0, %0, c0, c5, 0	@ read comms data reg"
> >  		: "=r" (__c));
> >  
> >  	return __c;

Same here?
									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