Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4754210yba; Tue, 30 Apr 2019 03:58:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3qQylhYFwdDW87RASKRxFIWi0bEcN55Ioz3sOVz70OgRIIDmeSKkeCtQK7Kn/2XwgdgNm X-Received: by 2002:a62:e201:: with SMTP id a1mr863403pfi.67.1556621911689; Tue, 30 Apr 2019 03:58:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556621911; cv=none; d=google.com; s=arc-20160816; b=yA8I23RJdfz3Jqiqi9JKkBSBYxvQUGiQ08WSXe1oxhx3HaSSAxV5dRXF+Gmoutc4Lu xmPGCLceOXLIyI+r5zLvXDAIFQgTN3CgoO6LYV6S8solOv+JtaG6lc9/2YTXCZiPKH3m uUCcQGBMp1p1J0efT2BxInjgWBIsgfhictMOBvJ1DACMLL1xa9DWXOJtI/94c6SXcJDG wZpyBq26a0XR3MXau0Px7WR34SB+5ewkmPMmeyKwOxGKUWjmrL9JxrFKNb6uVvMXkS2c NgcbCBT1VQRU+OeUHGObfpyR+ac3f7HXz3seLtK3pxzdp1CsNft5Ktv5sc04EmtGw0WW 64tA== 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; bh=oRfcno0+NNETk5R1+SELVe6SDYQYFpKkPSkjR9fOkWY=; b=DR3Le1av/ZxE1tUecueAHgiw9iYhjZ2Vj38Bgcikp8tqfqGxX2OCVzJB+jNFGmsYjy Zn8Q0ue+tSl1ibM958DvsEMeJg/suR+kGt+qOEWHWC8TLukdJvjbAB423ueSHiUQkgpu U6ifQofXb+YiC551nSP7Bp3R1uSNST89RUtJZZ6HmyTJmTlCuWiDWcGtgKJr6eWTjel4 ZhKYZ+1S22pNQfCdYm+x4gBIsycG6gYcFa8L3E4A9hfU1xgW5fKKGNvRf0ZmwXmYkY6A rRXA1mB+OwgKzKVDZ6Cypjtu0AaLwrS2BadVXT7ytj10Fmht9JXArq4o955GbkL99C+v KmlA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d34si37613363pla.224.2019.04.30.03.58.16; Tue, 30 Apr 2019 03:58:31 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727279AbfD3K4P (ORCPT + 99 others); Tue, 30 Apr 2019 06:56:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:58740 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726877AbfD3K4P (ORCPT ); Tue, 30 Apr 2019 06:56:15 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id F2264AD12; Tue, 30 Apr 2019 10:56:13 +0000 (UTC) Date: Tue, 30 Apr 2019 12:56:10 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Cyrill Gorcunov Cc: Kirill Tkhai , brgl@bgdev.pl, arunks@codeaurora.org, geert+renesas@glider.be, mhocko@kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, ldufour@linux.ibm.com, rppt@linux.ibm.com, mguzik@redhat.com, mkoutny@suse.cz, vbabka@suse.cz, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] mm: get_cmdline use arg_lock instead of mmap_sem Message-ID: <20190430105609.GA23779@blackbody.suse.cz> References: <20190418182321.GJ3040@uranus.lan> <20190430081844.22597-1-mkoutny@suse.com> <20190430081844.22597-2-mkoutny@suse.com> <4c79fb09-c310-4426-68f7-8b268100359a@virtuozzo.com> <20190430093808.GD2673@uranus.lan> <1a7265fa-610b-1f2a-e55f-b3a307a39bf2@virtuozzo.com> <20190430104517.GF2673@uranus.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline In-Reply-To: <20190430104517.GF2673@uranus.lan> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 30, 2019 at 01:45:17PM +0300, Cyrill Gorcunov wrote: > It setups these parameters unconditionally. I need to revisit > this moment. Technically (if only I'm not missing something > obvious) we might have a race here with prctl setting up new > params, but this should be harmless since most of them (except > stack setup) are purely informative data. FTR, when I reviewed that usage, I noticed it was missing the synchronization. My understanding was that the mm_struct isn't yet shared at this moment. I can see some of the operations take place after flush_old_exec (where current->mm = mm_struct), so potentially it is shared since then. OTOH, I guess there aren't concurrent parties that could access the field at this stage of exec. My 2 cents, Michal --GvXjxJ+pjyke8COw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE+amhwRV4jZeXdUhoK2l36XSZ9y4FAlzIKcMACgkQK2l36XSZ 9y43Zw//ShZK7DYk6l3lLVR4pXSaBs8MdnbIYo7kKlPHwKewLyueV6qPL2+k7sD9 M0bduFp4pZsGf/v2IG/1k6qStCpTYRFhLwiq9fiNee3j7pUhmxLTbTB6bIHtcU3p 96TrUAJK0J9Ll3vPRHvi3t6pGARq3M/3I7mVs/oWFGYT8wWy5yKoP1B+BHHbKcky 4xx3EaFJlwDeBZA8FgxxyrfbMvzLFJ1PgdSuaifuG8VH0wKYZhhzRtVB0U6o2DYF MPce7LipyB4FG8NPWk0rWcrS/EjWDLV6zqRaOqYHKBryTYrLo2kyxp42QcbBSHsN vSOimjkHLc6wnGE2798Pfsmy53aNucWE1s+vfuoqaGd4hXflp8hYU9MuM8MrV52C OHkjozbWRkW0y6E0UGQ3H//7lYU2CTXOatHB0wRn3XeVhDynWaOXwZdcbG4WuzmM wM04m8KsDFkLoY/uxSOeDKPPJUdwx/CGfzMvI7or47ic/BkN7GOtbsz4ktNiDg66 c6hgOEp8jUi+PPsAcEfzIRX7NKpWhpi5MLLTqfY3KGg6UnszjSOb1us4/XTr1Ok+ WRhUZy+lkVI6/sLy6JlDyCDPQGkM96ZmJC/yRsUqvQeiaUhG99DiU5tL2IZqmbN3 XQSp5NcX0a7or597DEf0zJXfqO0vkHugAenNGardDU17d0iJH9w= =qs9v -----END PGP SIGNATURE----- --GvXjxJ+pjyke8COw--