Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1317513pxa; Sat, 15 Aug 2020 15:44:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxaFkCEhnfzZ2r/KUeu//HxiklhnR9Q3qU9ky0eKpG83Knse5sbKKQwudAYqSBCcsD7jtb X-Received: by 2002:a17:906:38c7:: with SMTP id r7mr8932700ejd.118.1597531464029; Sat, 15 Aug 2020 15:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597531464; cv=none; d=google.com; s=arc-20160816; b=Tp1MY32nN2W4yEAsuikbwM0K+4SGLFTW2nkycSQQkClIy4CWqYQlIE4/W8MREkjGZS MsEw6PYzoEWJGyuCZNs5VMmXyHlFGAkhw4SXap5VErI9gR934NoCqlN6bMWc6cZ2a1lG s+v+Alg1/Zm7CkZ4Gh5sPjxBzNRRyEXq4axoOX96OPLoRT3bt1pMQHiFBSNXBDauUCtm /4kYUwyOiv66fGFsZbzdGkQucNZVJVlp0Tz3jo/mnl/NQ5uHx4CtKl63eNfJBvx6uU5p 8McxlBDtQwplH8/5dE4dil5wokJIiHVZSyzoospunUEmrJBY8EyyqzMSieGFAG35Osi7 jVRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=5BtI4Q6zf5Mn9xhBoLoqAJDh2hu3KIb8119PGk8sFTM=; b=NZWym0EUxZ8drs2lOdSlc+Co2Ih5ReGKzMKnRC7RrAJ2Snmxr9TEVXvq+7M9pAGbQF 67Iut0+96PNqMtc/GU/Ik+/4ERFYyuUG7WbJGjX2rJOGTfOvsr0cnYlMdMQsElV3alpT /g9wLO788lANLyj/m+QkKMEtdMfSHPybIu8p+UEggyx03WSIsdRUu+KWlpuGTA2HGQq7 PPw+8siJ6aHlcfevc+mMpACqad3obUDcIFiRXJw5cGsD4EjX9R66kXbw6Fq8XlIHIwpt 4n1ud63nXcsPJtK3HgG9hgTCz90IffPXna1ia5uQmnpEnwNA565QH1sDthSAvMqhOLpJ jhgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si8009788ejn.5.2020.08.15.15.44.01; Sat, 15 Aug 2020 15:44:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729309AbgHOWmY (ORCPT + 99 others); Sat, 15 Aug 2020 18:42:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728262AbgHOWmX (ORCPT ); Sat, 15 Aug 2020 18:42:23 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E37AC061786; Sat, 15 Aug 2020 15:42:22 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k74sM-00GVHV-SI; Sat, 15 Aug 2020 22:42:11 +0000 Date: Sat, 15 Aug 2020 23:42:10 +0100 From: Al Viro To: Pascal Bouchareine Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, netdev@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Andrew Morton , Alexey Dobriyan Subject: Re: [PATCH 1/2] mm: add GFP mask param to strndup_user Message-ID: <20200815224210.GA1236603@ZenIV.linux.org.uk> References: <20200815182344.7469-1-kalou@tfz.net> <20200815182344.7469-2-kalou@tfz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200815182344.7469-2-kalou@tfz.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 15, 2020 at 11:23:43AM -0700, Pascal Bouchareine wrote: > Let caller specify allocation. > Preserve existing calls with GFP_USER. Bloody bad idea, unless you slap a BUG_ON(flags & GFP_ATOMIC) on it, to make sure nobody tries _that_. Note that copying from userland is an inherently blocking operation, and this interface invites just that. What do you need that flag for, anyway?