Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4745984yba; Tue, 30 Apr 2019 03:48:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3OpvZB7wnJxUJGtBGVkiC/zv6ZwfMtp2D+M6d/1DoQEVmavTKNUz0OBwp26LdOTZh+zIu X-Received: by 2002:a17:902:801:: with SMTP id 1mr65485759plk.14.1556621310504; Tue, 30 Apr 2019 03:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556621310; cv=none; d=google.com; s=arc-20160816; b=HFcuOcA0rYIiamN0tN5UaLaGJJx/CueCg8be4EWQi7FeCQ0L/7W/XlLZyd3HxyG1FI iXDJthOig1z+Tukl3EGD2/nbfpYz40C5Twbmzj4LagxnCsrIAG/xb8rNeUuytXo92a1p 3sc80+2oiO6QOB9vYXQhvhbPYtFq9inCfu82oKPfVXdM+NaNelFxdyLe9o+KCDs7RhJx 4s9U3p/ZoEpH8TabWjVqFSz1bXJ+AnhSXVJwkMXXFG3LB+G3bd8v2rwiOrHCYVo0A6V6 P36PSy6N7nn8TVR+HH2EOXhSvptk7mdvfcfmQKqXE4zUMU6F8wjGBpxb68a3UpGNSOP/ ZjfA== 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=D0Zsz5cuLJP69SdJwEsKGX6QwExtlT9EFiLTZhEUga8=; b=UwPIUT8xP87+C6NMN2NFIgfQBmGFDNelowUo/IcUvxNuakitYOh/BcpzYRQMYlvalz 6g11ogV33NnGqeQQ5l6oGcpma+R3fRxcDUE2vTUt6owqg/Ii6umCa0E8Q5gpRTIPu8XA oa0fnRcuOEOdlYph2eSoqAZq11eASl3dBmZBy/lZVCzOCxR/q4t9c/CcvFGZv7ZRAO2g 4Ek1/RXibYstU5p93jqmWxC0+QziACCM0hDLgSz1J4RKxAb26Sq7smk2DRenzBZxYk4P dYRH5vTOc7eOVcFq3QCt/3T4FzuIk1LLYuDYBtCd9eNKG3tDLHcbxweVpLisaZZtwl0y J2vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bxHjCkoa; 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 t16si20243474pgl.97.2019.04.30.03.48.14; Tue, 30 Apr 2019 03:48:30 -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=bxHjCkoa; 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 S1727172AbfD3KpV (ORCPT + 99 others); Tue, 30 Apr 2019 06:45:21 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:37810 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726262AbfD3KpU (ORCPT ); Tue, 30 Apr 2019 06:45:20 -0400 Received: by mail-lj1-f194.google.com with SMTP id b12so11123022lji.4 for ; Tue, 30 Apr 2019 03:45:19 -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=D0Zsz5cuLJP69SdJwEsKGX6QwExtlT9EFiLTZhEUga8=; b=bxHjCkoavoWP0hn9Y3zvg9uBa6/OyLqHI5jEpHTFTvFUZkg/G0SnClzHnlOncwQfd/ 8AJpSAjDKpJaytE5xuwaK8gHuPdq3EOYGTfkU0JbE7sC8Ept3JJ15+MYRxb0x6PzHfl2 AhWWFagFddh06QfYTxLFTEHlZJkd4lu28BlpyDa+VOERo0+dvzK56HWlS3dT7dUGD1DB 9lv1ZMGobUYNU9iAUHymErxAMtS8tuhcTNTsWxyb517TlnsEZ+yHZCXFmOMhDfwxEiNa rLFDeagMOuR1rkkIJHALJXo0SvmLP3t9/Vcc5XhzVX6i+qNdghV+L0LRvWzGPB3Jma5t +fXA== 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=D0Zsz5cuLJP69SdJwEsKGX6QwExtlT9EFiLTZhEUga8=; b=oV7jeVIp58qYyABlFOIiRB3IQJHRXjrG5lkUZyHyYs8PDkPH9y0hePkz1BXSEBXuth Z9MAvf7eKLHmqlHhYQsszJJ3QA69lbMxNsFwCemLKh5/yaIWqWO+oyUaBPLm72r6LS9S pOLkd1pWf/8BAD+Lf2l6N++wPO6kYxQdNLgrjtO6fEk7owXZc2BPUN+LaKbaVKMsCAHH 59Mio1qW76O0/RmXra4FQDeA0bGZkjY6ARjbzHcyQKr7wcX36Kf9sfonbSrFPDidKFB4 bLT2uFwCQ0kDv5PmmVUbxaZ3faeKTi9+XA2L/hhyUT5E48viJRRERHkGxBFkL1pq5xQY a3Eg== X-Gm-Message-State: APjAAAWDyobAUnCARMuiYTkf8pbD8S4GCkrw8kpmtUrIIqMMxpnWnPyS QvO0zP4RxI9aNAe37/qhWus= X-Received: by 2002:a2e:3e0e:: with SMTP id l14mr35352423lja.125.1556621118804; Tue, 30 Apr 2019 03:45:18 -0700 (PDT) Received: from uranus.localdomain ([5.18.103.226]) by smtp.gmail.com with ESMTPSA id f1sm7277893ljc.73.2019.04.30.03.45.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Apr 2019 03:45:18 -0700 (PDT) Received: by uranus.localdomain (Postfix, from userid 1000) id 68F874603CA; Tue, 30 Apr 2019 13:45:17 +0300 (MSK) Date: Tue, 30 Apr 2019 13:45:17 +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: <20190430104517.GF2673@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> <20190430093808.GD2673@uranus.lan> <1a7265fa-610b-1f2a-e55f-b3a307a39bf2@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1a7265fa-610b-1f2a-e55f-b3a307a39bf2@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:53:51PM +0300, Kirill Tkhai wrote: > > > > 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. > > Ok, so elf loader doesn't change these parameters. > Thanks for the explanation. 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.