Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp632781ybz; Fri, 1 May 2020 05:52:37 -0700 (PDT) X-Google-Smtp-Source: APiQypJ7H/H/T7LUoh3Cep5IK2BlMDMH6cnHNWv/grquKYIP7S2a6VA1hqcfzvqvpJV/9D/MB5TL X-Received: by 2002:a17:906:cd0d:: with SMTP id oz13mr3039653ejb.82.1588337557104; Fri, 01 May 2020 05:52:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588337557; cv=none; d=google.com; s=arc-20160816; b=Gs0YvidqSN+MocjqkR2UkyTUTOvPzRgL7DphnXu4g+dcexU10Bjf7bzu2bi3AYHOmc PrgLyTjMM67qsD7yrTCraVIBD7nVf/NtLC90rTK33EhLpWIMUbEHr9FRYEoB25bbCpfe r1hgFH25Kup5BkaBWKTI0zxCQSIAbp7m3B94Lok1hkkuiCCEAInZAhCQlY4NtnYCDu/1 Zr5AhiZuzWdthvjBAB596lMZBRsP7vH0dTOXljtezzU389M+5dN/p7DJqHMfh5rGa364 kZbs8XjaZLZFMy+/zzBkxmhjLgE7U08KdG+lWQhgWmAhMC89E1oO83PqzsT3pn2AKCDz 1AJg== 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=bcQFgOWcM9cMB3D64yDSO/yFG5gF+BXvcFXd2ppmZCE=; b=MwTdWGGcNptSUv+zg+I5d9dYQqYfBEKmvdpcsS3c4YX9312xLwFm52IufYR9RaVpgZ RjKtN7x1nPW7xK/LqKgkqX3AZYJrNTBWBt8pUMHQxr5AcxGMbYUBQ2FaUOR0Z02GoQj7 ZoIHayyTXuCkgN7LcbSYrzF+LtTx8B/aZLqukuh8dtQ4iLNtjtXv6ac6giNIvVkdD3Rz ko/UAupKjWKFKAstUcvp+BhiLAcctXt8zRMrADPb56rfpXQRLAl6z873WztOsHsHRfuB Nvr7gWkPQpChRmck9kKxIKQ8CjAqEhhlwrBtA52uZDxOLY8JWaUxqULkh60a9JKMmS0a P0fw== 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 q24si1672006ejz.458.2020.05.01.05.52.14; Fri, 01 May 2020 05:52:37 -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 S1728760AbgEAMu4 (ORCPT + 99 others); Fri, 1 May 2020 08:50:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728443AbgEAMuz (ORCPT ); Fri, 1 May 2020 08:50:55 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A531C061A0C; Fri, 1 May 2020 05:50:55 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUV7x-00FtME-PR; Fri, 01 May 2020 12:50:49 +0000 Date: Fri, 1 May 2020 13:50:49 +0100 From: Al Viro To: Christoph Hellwig Cc: Andrew Morton , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] exec: open code copy_string_kernel Message-ID: <20200501125049.GL23230@ZenIV.linux.org.uk> References: <20200501104105.2621149-1-hch@lst.de> <20200501104105.2621149-3-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200501104105.2621149-3-hch@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 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?