From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753009AbcHQTb0 (ORCPT ); Wed, 17 Aug 2016 15:31:26 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:35618 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752488AbcHQTbY (ORCPT ); Wed, 17 Aug 2016 15:31:24 -0400 Date: Wed, 17 Aug 2016 20:31:20 +0100 From: Al Viro To: Rob Clark Cc: Vaishali Thakkar , David Airlie , linux-arm-msm , "dri-devel@lists.freedesktop.org" , freedreno@lists.freedesktop.org, Linux Kernel Mailing List , Julia Lawall Subject: Re: Use of copy_from_user in msm_gem_submit.c while holding a spin_lock Message-ID: <20160817193120.GG2356@ZenIV.linux.org.uk> References: <57B44D2E.2030301@oracle.com> <20160817170827.GC2356@ZenIV.linux.org.uk> <20160817191534.GF2356@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 17, 2016 at 03:24:38PM -0400, Rob Clark wrote: > hmm, looks like, at least on arm (not sure about arm64), > > #define __copy_from_user_inatomic __copy_from_user > > ie. copy_from_user() minus the access_ok() and memset in the > !access_ok() path.. but maybe what I want is just the > pagefault_disable() if that disables copy_from_user() being able to > block.. On a bunch of platforms copy_from_user() starts with might_sleep(); again, that'll spread to all of the pretty soon. Right now those primitives are very badly out of sync; this will change, but let's not add more PITA sources.