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] [day] [month] [year] [list]
Message-ID: <20131127155412.GA26883@gmail.com>
Date:	Wed, 27 Nov 2013 16:54:12 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	David Ahern <dsahern@...il.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Mike Galbraith <efault@....de>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] tools/perf/util: Document and clean up readn() a bit


* Jiri Olsa <jolsa@...hat.com> wrote:

> On Wed, Nov 27, 2013 at 08:19:13AM -0700, David Ahern wrote:
> > On 11/27/13, 4:57 AM, Ingo Molnar wrote:
> > >Okay, I thought this was an intentional 'all or nothing' interface -
> > >but looking at the readn() users they can tolerate partial results
> > >just fine.
> > 
> > I believe that is the intent -- an all or nothing interface.
> 
> all the users either checks the returned value with the size
> or do (ret < 0) and fail

so, a 'ret < 0' check would actually be sensitive to whether readn() 
is an all-or-nothing interface (today), or a partial interface (the 
suggestion).

So it appears keeping it all-or-nothing (i.e. my patch) is the right 
approach.

> and one instance in the read_attr does not check anything and 
> blindly hopes it will read all ;-)
> 
> I have similar patch that also change callers to use proper ssize_t 
> instead of int.. I can rebase and send it separately or combine it 
> with yours.. let me know

Sure ... I just noticed a few patterns. Feel free to use all (or none 
;-) of my patch in your series.

Thanks,

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