From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754594AbZCDEoW (ORCPT ); Tue, 3 Mar 2009 23:44:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752504AbZCDEoM (ORCPT ); Tue, 3 Mar 2009 23:44:12 -0500 Received: from terminus.zytor.com ([198.137.202.10]:54729 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752357AbZCDEoM (ORCPT ); Tue, 3 Mar 2009 23:44:12 -0500 Message-ID: <49AE05CD.9000402@zytor.com> Date: Tue, 03 Mar 2009 20:38:37 -0800 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Steven Rostedt CC: Andrew Morton , linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Frederic Weisbecker , Theodore Tso , Arjan van de Ven , Pekka Paalanen , Arnaldo Carvalho de Melo , Mathieu Desnoyers , Martin Bligh , "Frank Ch. Eigler" , Tom Zanussi , Masami Hiramatsu , KOSAKI Motohiro , Jason Baron , Christoph Hellwig , Jiaying Zhang , Eduard - Gabriel Munteanu , mrubin@google.com, md@google.com, Steven Rostedt Subject: Re: [PATCH 5/5] tracing: add binary buffer files for use with splice References: <20090304024921.153061228@goodmis.org> <20090304025251.015368537@goodmis.org> <20090303193501.0055e329.akpm@linux-foundation.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -hpa