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:	Thu, 8 Oct 2015 13:36:53 -0400
From:	Josh Boyer <jwboyer@...oraproject.org>
To:	"Luis R. Rodriguez" <mcgrof@...not-panic.com>
Cc:	Greg KH <gregkh@...uxfoundation.org>,
	Ming Lei <ming.lei@...onical.com>,
	Jonathan Corbet <corbet@....net>,
	"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>,
	linux-doc@...r.kernel.org, David Woodhouse <dwmw2@...radead.org>,
	David Howells <dhowells@...hat.com>,
	Seth Forshee <seth.forshee@...onical.com>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Michal Marek <mmarek@...e.cz>,
	Matthew Garrett <mjg59@...f.ucam.org>, kyle@...nel.org,
	linux-security-module <linux-security-module@...r.kernel.org>,
	keyrings@...ux-nfs.org, "Luis R. Rodriguez" <mcgrof@...e.com>,
	Tom Gundersen <teg@...m.no>
Subject: Re: [PATCH v2 4/5] firmware: generalize reading file contents as a helper

On Thu, Oct 1, 2015 at 1:44 PM, Luis R. Rodriguez
<mcgrof@...not-panic.com> wrote:
> From: David Howells <dhowells@...hat.com>
>
> We'll want to reuse this same code later in order to
> read two separate types of file contents. This generalizes
> fw_read_file() for reading a file rebrands it as fw_read_file().

Er, maybe that should read "...fw_read_file_contents() for reading a
file and rebrands it as fw_read_file()." ?

> This caller lets us pegs arbitrary data onto the target
> buffer and size if the file is found.

This sentence is somewhat confusing.  The data isn't arbitrary. It is
what the caller wants you to read from path.  What is arbitrary, at
least in the context of this function, is the path passed to it.
Maybe rewrite this as:

"The new function allows us to read file contents from arbitrary paths
and return the data and size of the files read."

> While at it this cleans up the exit paths on fw_read_file().
>
> Signed-off-by: David Howells <dhowells@...hat.com>
> Signed-off-by: Luis R. Rodriguez <mcgrof@...e.com>

The code changes themselves look fine.

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