From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 2/2] drm/i915: Treat using a purged buffer as a source of EFAULT Date: Tue, 4 Feb 2014 14:23:48 +0100 Message-ID: <20140204132348.GS17001@phenom.ffwll.local> References: <1391168098-23161-1-git-send-email-chris@chris-wilson.co.uk> <1391168098-23161-2-git-send-email-chris@chris-wilson.co.uk> <20140204110513.GJ17001@phenom.ffwll.local> <20140204113639.GE11603@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) by gabe.freedesktop.org (Postfix) with ESMTP id 332EB10640F for ; Tue, 4 Feb 2014 07:06:40 -0800 (PST) Received: by mail-ee0-f53.google.com with SMTP id t10so4384161eei.40 for ; Tue, 04 Feb 2014 07:06:40 -0800 (PST) Content-Disposition: inline In-Reply-To: <20140204113639.GE11603@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Chris Wilson , Daniel Vetter , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Feb 04, 2014 at 11:36:39AM +0000, Chris Wilson wrote: > On Tue, Feb 04, 2014 at 12:05:13PM +0100, Daniel Vetter wrote: > > On Fri, Jan 31, 2014 at 11:34:58AM +0000, Chris Wilson wrote: > > > Since a purged buffer is one without any associated pages, attempting to > > > use it should generate EFAULT rather than EINVAL, as it is not strictly > > > an invalid parameter. > > > > > > Signed-off-by: Chris Wilson > > > > Care to drop a quick testcase into i-g-t to encode this return value > > change? Also, any plans to use this with userspace somehow, or what's the > > motivation for this? > > Just that we have other paths where inaccessible pages are reported back > to userspace as EFAULT, and this is another case where we could distinguish > the errno and so be more consistent. Makes sense. I'll merge the patches once we have a bit of igt to enshrine this. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch