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:	Tue, 3 Mar 2009 23:45:00 -0500 (EST)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	"H. Peter Anvin" <hpa@...or.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Theodore Tso <tytso@....edu>,
	Arjan van de Ven <arjan@...radead.org>,
	Pekka Paalanen <pq@....fi>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Mathieu Desnoyers <compudj@...stal.dyndns.org>,
	Martin Bligh <mbligh@...gle.com>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	Tom Zanussi <tzanussi@...il.com>,
	Masami Hiramatsu <mhiramat@...hat.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Jason Baron <jbaron@...hat.com>,
	Christoph Hellwig <hch@...radead.org>,
	Jiaying Zhang <jiayingz@...gle.com>,
	Eduard - Gabriel Munteanu <eduard.munteanu@...ux360.ro>,
	mrubin@...gle.com, md@...gle.com,
	Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 5/5] tracing: add binary buffer files for use with
 splice



On Tue, 3 Mar 2009, H. Peter Anvin wrote:

> Steven Rostedt wrote:
> > > Conventionally a read() system call will return the number of bytes
> > > copied, and will only return -EFOO if the number of bytes copied was
> > > zero.
> > > 
> > > Lots of parts of the kernel break this, but it's usually device drivers
> > > and scruffy pseudo files, in which case a partial file read doesn't
> > > make much sense.  This doesn't make the broken behaviour right, but at
> > > least we have a bit of a weaselly excuse in that case.
> > 
> > I just went by the read man page:
> > 
> >        EFAULT buf is outside your accessible address space.
> 
> Yes, and that is the correct value if no bytes were copied.

Yuck. IMHO I rather have a read return a failure to my user app if I'm 
trying to write to more than I allocated. I guess I can change it, but it 
just seems to be hiding a bug in a user app.

-- Steve

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