Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752909AbcKQXdp (ORCPT ); Thu, 17 Nov 2016 18:33:45 -0500 Received: from mail-vk0-f50.google.com ([209.85.213.50]:36101 "EHLO mail-vk0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbcKQXdm (ORCPT ); Thu, 17 Nov 2016 18:33:42 -0500 MIME-Version: 1.0 In-Reply-To: <20161114061858.gklgk5go2qxq4b5y@pd.tnic> References: <20161111101930.32559-1-bp@alien8.de> <20161112110649.GA28774@gmail.com> <20161112122736.fmiowshbus5hjjnb@pd.tnic> <20161114061858.gklgk5go2qxq4b5y@pd.tnic> From: Andy Lutomirski Date: Thu, 17 Nov 2016 15:33:21 -0800 Message-ID: Subject: Re: [RFC PATCH] x86/debug: Dump more detailed segfault info To: Borislav Petkov Cc: Ingo Molnar , X86 ML , LKML , Peter Zijlstra , Linus Torvalds Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 590 Lines: 16 On Nov 13, 2016 10:18 PM, "Borislav Petkov" wrote: > > On Sun, Nov 13, 2016 at 08:15:01AM -0800, Andy Lutomirski wrote: > > How about dropping the __ in front of the copy? > > In front of __copy_from_user_inatomic()? > > If so, is there even a global helper by that name? > > $ git grep -E "[^_]copy_from_user_inatomic" > drivers/gpu/drm/msm/msm_gem_submit.c:98: ret = copy_from_user_inatomic(&submit_bo, userptr, sizeof(submit_bo)); > > is all I can find. Huh, go figure. How about access_ok() instead? There's also pagefault_disable() + copy_from_user().