Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp826185ybz; Wed, 29 Apr 2020 10:04:06 -0700 (PDT) X-Google-Smtp-Source: APiQypKyP1z5rVZqOjibRI08rwDYhZOd4PJrSIwyarl3JLg5T0XErQiQot86Fjo1S0eS27wJ+ObV X-Received: by 2002:a17:906:9718:: with SMTP id k24mr3571092ejx.229.1588179846311; Wed, 29 Apr 2020 10:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588179846; cv=none; d=google.com; s=arc-20160816; b=g16ne8kKPQ+wTzoAKMwyYV4onj9DJIMMuqFmSd2eVD+0ptFsVZuyZe2VW5SsH39AVx 4I4SbVyFm30RsZAyNQN3vQHJMmc8xxNGqVuXJ8A2bzfOiKU6ypOAXu8qRa2ZBsaZzVlV o6doTW5YSzGG8wQ+uDk00Od0nbBYSqXs1JROVf6XRDb9ujcN2dKi/FfUieO/0vWhgulY L79Tgi9q70h7Cp/WTxmAIQNNng+AgPLWjNc3VK+/cKS7tGbGQmlKNtxAPR3PXGo64xFN 27bcZImd7wh57oCy2tpILb9UP4EnfKn72XbKrcb2TwmphrJXFcde+1q+G+sX5U3GRpYH +org== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:cc:from:references:to:subject; bh=jjdvSxxwgiYLfr27Fov56kWRdYJ03BD3LFGIZ5HQ0KI=; b=Shfeniu1dYpvRcYw+Q1hnZBn5inIG4mSUlXqqTqLku9slJn4FHAMaAoepmSC2b/BGD WjY+ELSmFY7s3bWNidlFPSYlqxKAMhBp8WkCs4lwESa5FixMHN12icuL2gVWqjv2waU/ 5GlIs8RklUW6tuCV45PtoZmbmIpPQgeDjHP4AYCJd99jelQjLD6ievsaMn26viXwK9QZ veTj/oWytmsDV2/tPnSwRZmMoOjqJloLuIHl28ljagaRu1dvOfYf7HZfs4/kmxhHbeGy 9167sXJV4jq5JAXrc0SowApVG6HAHvaHwU6Q42wpNWaaNCql/nHokEQAc0Au5a6LLUBH Wbgw== 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 n20si3928899edq.397.2020.04.29.10.03.41; Wed, 29 Apr 2020 10:04:06 -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 S1727768AbgD2RBQ (ORCPT + 99 others); Wed, 29 Apr 2020 13:01:16 -0400 Received: from foss.arm.com ([217.140.110.172]:42416 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726635AbgD2RBP (ORCPT ); Wed, 29 Apr 2020 13:01:15 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2104C11D4; Wed, 29 Apr 2020 10:01:15 -0700 (PDT) Received: from [192.168.0.14] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A5CC93F73D; Wed, 29 Apr 2020 10:01:12 -0700 (PDT) Subject: Re: [PATCH v9 05/18] arm64: trans_pgd: pass NULL instead of init_mm to *_populate functions To: Pavel Tatashin References: <20200326032420.27220-1-pasha.tatashin@soleen.com> <20200326032420.27220-6-pasha.tatashin@soleen.com> From: James Morse Cc: jmorris@namei.org, sashal@kernel.org, ebiederm@xmission.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, corbet@lwn.net, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, maz@kernel.org, vladimir.murzin@arm.com, matthias.bgg@gmail.com, bhsharma@redhat.com, linux-mm@kvack.org, mark.rutland@arm.com, steve.capper@arm.com, rfontana@redhat.com, tglx@linutronix.de, selindag@gmail.com Message-ID: Date: Wed, 29 Apr 2020 18:01:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200326032420.27220-6-pasha.tatashin@soleen.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pavel, On 26/03/2020 03:24, Pavel Tatashin wrote: > trans_pgd_* should be independent from mm context because the tables that > are created by this code are used when there are no mm context around, as > it is between kernels. Simply replace mm_init's with NULL. arm64's p?d_populate() helpers don't use the mm parameter, so it doesn't make any difference. This was originally done so that if we ever needed anything from the mm, we didn't get a NULL dereference or EL0 behaviour due to a future '!= &init_mm'. If you think it matters, Acked-by: James Morse Thanks, James