Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1107477ybz; Fri, 1 May 2020 14:48:16 -0700 (PDT) X-Google-Smtp-Source: APiQypJkvqwU0p7z4Np303Bx/vpQxqS5m7w9t/TsAfh1Cw5FIAsVtO6XxzIC8ohJdbI3AXSELg4b X-Received: by 2002:aa7:d606:: with SMTP id c6mr5430117edr.107.1588369696519; Fri, 01 May 2020 14:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588369696; cv=none; d=google.com; s=arc-20160816; b=KXPcO1QLi2QS30AiXGLhQlGNSsQ1Mt6CGYIilaJ5awkUjccb2OYpebY9i3I2q1Sqoy bLWYuoG2xaqQHpRBwjOdkb6AKZpVuSVe6JYlEh0ynEFK46lixQIZ/+FG4rQcqSBcUl4x Ba7xzqW9nwbWBAB1CuxX6c+lsOaa6vkY5AOt+nPij2KKyA1qOtn3m0Iw6/2uxHmI0qst yxMCM0VN6Fx9OuiIdawp1EwMJbEliuHdQ4tS/om+ONT80w24rOQHtuDB0Cg8P2XsUW3/ Yr2+GoC+ko1I0TqJu3HZ4ZEgwiuuatrHSb5WUDk/dbuMbMLkb5nOBsshpuyrkX/j8n/C /KHw== 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=MG+IJq9dI6LigljA/jzhZcrzFmBnZJqTKSE06oyZIFw=; b=TTEFXad5jmHgAOUfsaMaXGolw75+QKjc3R3L641hcyfUMKUZ816lVfNh3Ohv+y+tpm t7+L3RxUEn5bnj0QbkS6wbyi+RIHZWPT887q52AJk7UTAqfCxkBxRaO1w+jPDURtCC+M rvOfwQIraiV9XGhTvr4e5TOvyVgcOsQGLBwfOlAJkCIdDTXvR8aVfrxm+eBd6o6PTWEd MEvNsswn6kvsW1GrWTOKqI6OBURQHV132VR/kPDMvtQr0hA/3Ln45sOK3TxgzaGZPjIn 2rJwMEHPXBR1RyGkO0Ml3CytcbjlzbCIPAQ37h3IF1IkLWYaeFrkD2TUzQs9Df1FfcV1 aM4Q== 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 da12si2244721edb.439.2020.05.01.14.47.53; Fri, 01 May 2020 14:48:16 -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 S1726841AbgEAVn7 (ORCPT + 99 others); Fri, 1 May 2020 17:43:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726045AbgEAVn6 (ORCPT ); Fri, 1 May 2020 17:43:58 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79507C061A0C; Fri, 1 May 2020 14:43:58 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUdRr-00GF1O-Dm; Fri, 01 May 2020 21:43:55 +0000 Date: Fri, 1 May 2020 22:43:55 +0100 From: Al Viro To: Christoph Hellwig Cc: Andrew Morton , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, aaw@google.com Subject: Re: [PATCH 2/2] exec: open code copy_string_kernel Message-ID: <20200501214355.GP23230@ZenIV.linux.org.uk> References: <20200501104105.2621149-1-hch@lst.de> <20200501104105.2621149-3-hch@lst.de> <20200501125049.GL23230@ZenIV.linux.org.uk> <20200501192639.GA25896@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200501192639.GA25896@lst.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 01, 2020 at 09:26:39PM +0200, Christoph Hellwig wrote: > On Fri, May 01, 2020 at 01:50:49PM +0100, Al Viro wrote: > > On Fri, May 01, 2020 at 12:41:05PM +0200, Christoph Hellwig wrote: > > > Currently copy_string_kernel is just a wrapper around copy_strings that > > > simplifies the calling conventions and uses set_fs to allow passing a > > > kernel pointer. But due to the fact the we only need to handle a single > > > kernel argument pointer, the logic can be sigificantly simplified while > > > getting rid of the set_fs. > > > > I can live with that... BTW, why do we bother with flush_cache_page() (by > > way of get_arg_page()) here and in copy_strings()? How could *anything* > > have accessed that page by its address in new mm - what are we trying to > > flush here? > > s/get_arg_page/flush_arg_page/ ? of course - sorry... > No idea, what the use case is, but this comes from: > > commit b6a2fea39318e43fee84fa7b0b90d68bed92d2ba > Author: Ollie Wild > Date: Thu Jul 19 01:48:16 2007 -0700 > > mm: variable length argument support I know. And it comes with no explanations in there ;-/ AFAICS, back then the situation hadn't been any different - mm we are inserting the arg pages into is not active, so there shouldn't be anything in anyone's cache for that virtual address in that vma...