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.44L0.0805161021450.25035-100000@netrider.rowland.org>
Date:	Fri, 16 May 2008 10:32:10 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Harvey Harrison <harvey.harrison@...il.com>
cc:	Bryan Wu <cooloney@...nel.org>, Jie Zhang <jie.zhang@...log.com>,
	Oliver Neukum <oliver@...kum.org>, <david-b@...bell.net>,
	<greg@...ah.com>, <linux-usb@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] usb: file-storage.c use unaligned access helpers

On Thu, 15 May 2008, Harvey Harrison wrote:

> Replace the put_be16/32 and get_be16/32 helpers with the
> common unaligned access routines.  Note that these put_ helpers
> had the pointer/value parameter in the opposite order from the
> common version.

This is fine and it's what I requested.  Still, it's not really the 
best solution.

In many of the places where these helpers are used, we _know_ that the
buffers are in fact aligned properly.  For example, in code like this:

> -			put_be16(&buf[4], 0xffff);
> +			put_unaligned_be16(0xffff, &buf[4]);

we know that buf is aligned.  It would be great if there were helpers 
which would allow us to do

			put_be16(&buf[4], 0xffff);

instead of

			* (__be16 *) &buf[4] = cpu_to_be16(0xffff);

They could also be used to clean up the disputed HCD code.  Is this a
reasonable thing to ask for?  A few simple, arch-independent macros
would be sufficient.

Alan Stern

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