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: <Pine.LNX.4.62.0707191100270.8661@pademelon.sonytel.be>
Date:	Thu, 19 Jul 2007 11:02:07 +0200 (CEST)
From:	Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
cc:	Paul Mackerras <paulus@...ba.org>, Jens Axboe <axboe@...nel.dk>,
	"James E.J. Bottomley" <James.Bottomley@...elEye.com>,
	Alessandro Rubini <rubini@...ion.unipv.it>,
	linuxppc-dev@...abs.org, linux-kernel@...r.kernel.org,
	linux-scsi@...r.kernel.org,
	Geoff Levand <geoffrey.levand@...sony.com>
Subject: Re: [patch 2/3] ps3: BD/DVD/CD-ROM Storage Driver

On Wed, 18 Jul 2007, Andrew Morton wrote:
> > +struct ps3rom_private {
> > +	struct ps3_storage_device *dev;
> > +	struct scsi_cmnd *curr_cmd;
> > +};
> > +#define ps3rom_priv(dev)	((dev)->sbd.core.driver_data)
> > +
> 
> Someone should invent a keyboard which delivers an electric shock when the
> operator types "#define".   In the meanwhile, I get to do the honours.
> 
> Please don't implement in a macro anything which can be implemented in C.

All I needed was a shorthand to access driver_data, for both read and write
access (you cannot do the latter with C, unless you decouple read and write).

> > +			kaddr = kmap_atomic(sgpnt->page, KM_IRQ0);
> > +			if (!kaddr)
> > +				return -1;
> 
> kmap_atomic() cannot fail.  On i386, at least.  If it can fail on any other
> arch then we have a biiiiig problem.  (Multiple instances of this)

Thanks, fixed!

With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:    +32 (0)2 700 8453	
Fax:      +32 (0)2 700 8622	
E-mail:   Geert.Uytterhoeven@...ycom.com	
Internet: http://www.sony-europe.com/
 	
Sony Network and Software Technology Center Europe	
A division of Sony Service Centre (Europe) N.V.	
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium	
VAT BE 0413.825.160 · RPR Brussels	
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ