Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4686389yba; Tue, 30 Apr 2019 02:41:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzchYmGcaG6OGvzn0VnQHhlls4rfloy7xqCq7lKh7A8p72+jNVyIOnmQW4baCnY3YKAZH4W X-Received: by 2002:a65:6212:: with SMTP id d18mr65044098pgv.162.1556617263235; Tue, 30 Apr 2019 02:41:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556617263; cv=none; d=google.com; s=arc-20160816; b=HYhiR82r/qMGGYLtCMH4qkyRKsN+Hc1eU0dlRzDGgZJRiECPji2eIF9SqL6CEJZ5kk SpgTbkrANS/uPSGTtYv40GUJBZx8EL0HUJgXXtf80ndAGgevJBpqAhGG2pzTStf6yn63 VKUXd0XlpfTqgkuazsLWFaqgAKWwSiCsW2sTp4fJMkz6gl8d6VreJb04ocZmiBQWsnOy /Liigb/vW2xYdAPR76EM0Kcw+QjsSS5dAZ9XK2HZwboUNtL3w0R/gtZwqda2dnsx4BfJ ghRoxuFYApoED9m3SHqoMxj78xJMmdPVcf/7clLmEzgg7s97/NrYJJa5/eRtI67THRMo fwMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zYjnml+G09Y2iH7YOBy1RnUmEBfOtgqF9A/Rh/pjRIY=; b=AMNx049artFMVVa5C2UJdc/lD5NmiMY7oLiaPyX9Ld6fowdB3IYeaNBDFrhesGB+5s EngXKtWvMZeYv32gG+o3zTpqG+66ld7kMulbXUOWL/bXMS8RqICoxqQQ2D7fETZjNFAo LYP5a14gee1L3n0/FeJoMcVlULpjDQdTJ0Y2nkiR1dZ+N6MMnQlaOaCXpmjkDVzCa98U CImbP0UFAqw+ZXhvmyv1AZfsu6Jfsg3F3s5va0+DizN/QMB50dUPe4mNkyo5jD3h12nn F8lZe85pP1eWO+Ag77rkR25ERHoXNEL2y93orCVq5EdG5lPZZj3AiPoYq3uiO92k6iuS kW2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ukGEBlNW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si27895725pgp.562.2019.04.30.02.40.47; Tue, 30 Apr 2019 02:41:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ukGEBlNW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727046AbfD3JiM (ORCPT + 99 others); Tue, 30 Apr 2019 05:38:12 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:46228 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726129AbfD3JiM (ORCPT ); Tue, 30 Apr 2019 05:38:12 -0400 Received: by mail-lj1-f193.google.com with SMTP id h21so12084958ljk.13 for ; Tue, 30 Apr 2019 02:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=zYjnml+G09Y2iH7YOBy1RnUmEBfOtgqF9A/Rh/pjRIY=; b=ukGEBlNWpw3ngsxHEBXIQvlOeQhk4/p8R6GklmoB2a/Xv4c2NAwqOW+cNq7yBLyL2B dBM9smuHxp7kZy66IxNEH6kzgwI4RJd82xvidtZDKhUdNbLaEsENurzJ+oj57ObbDtPs 2gPE4aJopsgxoW0EJ3MNExq6DgBsaZ+Kv6Jfluqf0CtBIn88GNQzHCmQolL80H1brM2K yijxEgwd99V9DqOpzUHXvBwaNvpoxs9k9tTcEX9MRgfaanxEYssrdayZTUb/xuilfH7/ y9GV0XIkScDJQx2nQUJrqtsIXjr2x18uJzzzUjE/TilqtUizxTCPjBmxTC6/AOgrlhFc HKig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zYjnml+G09Y2iH7YOBy1RnUmEBfOtgqF9A/Rh/pjRIY=; b=oA8rZ3PBj06sSA8s3hBgKX35s1u//j9t2mdi8WBxvBZbKcVG8WqjYHi3vqkFOXvJ4H cYPHTeMyFEdMmzXUSd0OuEr66OdZ7kxgC8EBRCKZOKByWSRupbJzVYW9Zp+rpXnvj42D Sm0qsl10YicI1ReeTa3Rv804AJ9noQQnPa5+w69BNcZbLL9xq2pFCJvfFMZgPcCn/FGM dcImPFk2/gSjBaT5ShtXl0tcxaZTF3SX3sSWpc1J6aMCGM4Rl/DhXH/AMwjVRAtIVUmy K8TXNa74b4gLyyZr4o3OdtQP3NTp/WCy3CRqBShepihlxZSjS6wusnRZFI1Toaio6pbN aBWw== X-Gm-Message-State: APjAAAUhxMieGq2E5TVCc35Ki6Y2f/QIO4GBxZ4oILhosX4ZtDPvyNwx VyjrVcuQ2/KQIrOMbPqrAwY= X-Received: by 2002:a2e:8648:: with SMTP id i8mr36897627ljj.166.1556617090058; Tue, 30 Apr 2019 02:38:10 -0700 (PDT) Received: from uranus.localdomain ([5.18.103.226]) by smtp.gmail.com with ESMTPSA id l16sm7876890lfk.44.2019.04.30.02.38.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Apr 2019 02:38:09 -0700 (PDT) Received: by uranus.localdomain (Postfix, from userid 1000) id 840A24603CA; Tue, 30 Apr 2019 12:38:08 +0300 (MSK) Date: Tue, 30 Apr 2019 12:38:08 +0300 From: Cyrill Gorcunov To: Kirill Tkhai Cc: Michal =?iso-8859-1?Q?Koutn=FD?= , akpm@linux-foundation.org, arunks@codeaurora.org, brgl@bgdev.pl, geert+renesas@glider.be, ldufour@linux.ibm.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mguzik@redhat.com, mhocko@kernel.org, rppt@linux.ibm.com, vbabka@suse.cz Subject: Re: [PATCH 1/3] mm: get_cmdline use arg_lock instead of mmap_sem Message-ID: <20190430093808.GD2673@uranus.lan> References: <20190418182321.GJ3040@uranus.lan> <20190430081844.22597-1-mkoutny@suse.com> <20190430081844.22597-2-mkoutny@suse.com> <4c79fb09-c310-4426-68f7-8b268100359a@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4c79fb09-c310-4426-68f7-8b268100359a@virtuozzo.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 30, 2019 at 12:09:57PM +0300, Kirill Tkhai wrote: > > This looks OK for me. > > But speaking about existing code it's a secret for me, why we ignore arg_lock > in binfmt code, e.g. in load_elf_binary(). Well, strictly speaking we probably should but you know setup of the @arg_start by kernel's elf loader doesn't cause any side effects as far as I can tell (its been working this lockless way for years, mmap_sem is taken later in the loader code). Though for consistency sake we probably should set it up under the spinlock.