Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1105126ybz; Fri, 1 May 2020 14:44:44 -0700 (PDT) X-Google-Smtp-Source: APiQypKv3UB865m1puHC3H4Diq5O3lB8JQEQXQtFmBEEAyBnYa5Gfz7Fd5t/GTwqKFO8TlDvvWct X-Received: by 2002:a17:906:72c8:: with SMTP id m8mr5386431ejl.318.1588369484680; Fri, 01 May 2020 14:44:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588369484; cv=none; d=google.com; s=arc-20160816; b=OYFK5XILWZc4NhOHAOsOtIGRT0Dt8mTvAGcrBwPfd/MRBSJ96aeBnPjoXrkMrLPvXC USJnBtwanrtcxoEucy8QC7hvPcN8YZZ9afqtSZfvM/XRIVtZdAgZq0ucn1hj2+ptJQx+ 1l5xvA6ohZGwpUiLr3j9tDpFeiFw7GsiUu8egejSbUobSkZRIeFwzB4/GWVkahOq8sSn XFsYUnZ81vBW0F6lk+ymy/TC731knlUSpvdzmwYS5Sa2KgIgpgJMFYC1POiNMeBkG9O/ Yz43e93BaFbddf+ehvyuVKyu4fOpRB2HntO3EdEEZMlNW/pdV0CAVB9k0vJBgm3+jkNQ Igmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=I12zjAWw9Dy3d0XZAS5RE4gGqfY1/D9xZIxCP+fkvqs=; b=PAYQCg/xHV6OXk++u0z3K7WDv/3VNf7nuAHh2ejuMeUmp3kUERzgKVZQvd88lqwJuy tGBVdXRTKrVct7PAxNPa8nDFE8Dqik2OsCgQtwkIsliXy9wn0tw/DS/P52qimMDbKyml wqUa74aIHd4yAmG0EUg0CnaQmk0SYNAH6my5q0sR5QprpBfXY3YxhpxSttEimaBgWJbY ZzJfoeEze0J76HyfPqKSQeeSXcq0Z1XxP8J4yBT09Sg607ONnPOxN/xaut3/SVhnglsa fnj8VgrNR9XCCUA/QxCziW1WdhbKjvqKESY43BKsbk22S+bHeigcNs/PQX3lUCjx8N+J TxBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QuZO5B22; 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 u3si2315335edy.541.2020.05.01.14.44.21; Fri, 01 May 2020 14:44:44 -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; dkim=pass header.i=@kernel.org header.s=default header.b=QuZO5B22; 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 S1726745AbgEAVkO (ORCPT + 99 others); Fri, 1 May 2020 17:40:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:48354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726381AbgEAVkO (ORCPT ); Fri, 1 May 2020 17:40:14 -0400 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D82A5208DB; Fri, 1 May 2020 21:40:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588369214; bh=Sf1CjCAyqOr0UNF/g7ou7MfB5fu7V7sjILqyAKMj9vE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QuZO5B22cENrs6n9cwxqybNkxW96tpM3CfM/CbMWH/DLPAU7LR8+VHqzyE/5R3S7T +A5vffzi84QyChoLss14ght+j8XqK78R2Kui4DGyOMNAerqQesoZLI8DkXZDxm3Lqh 5YoD2ZdWfCkfTNzpuO/3ZIDrQJXv4nWCcBmiKryU= Date: Fri, 1 May 2020 14:40:13 -0700 From: Andrew Morton To: Al Viro Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] exec: open code copy_string_kernel Message-Id: <20200501144013.be5bf036ab7f2d2303676bce@linux-foundation.org> In-Reply-To: <20200501213048.GO23230@ZenIV.linux.org.uk> References: <20200501104105.2621149-1-hch@lst.de> <20200501104105.2621149-3-hch@lst.de> <20200501141903.5f7b1f81fdd38ae372d91f0e@linux-foundation.org> <20200501213048.GO23230@ZenIV.linux.org.uk> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 1 May 2020 22:30:48 +0100 Al Viro wrote: > On Fri, May 01, 2020 at 02:19:03PM -0700, Andrew Morton wrote: > > On Fri, 1 May 2020 12:41:05 +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 don't get why this is better? copy_strings() is still there and > > won't be going away - what's wrong with simply reusing it in this > > fashion? > > > > I guess set_fs() is a bit hacky, but there's the benefit of not having > > to maintain two largely similar bits of code? > > Killing set_fs() would be a very good thing... Why is that? And is there a project afoot to do this?