Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6397626ybh; Wed, 7 Aug 2019 23:21:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqygyhSbd6s0PShxiJ6HRVN3vvtg6TPlF5JsMK2ZQa/gpyBNUsh8xx12mniVwAgOI6CGhvrh X-Received: by 2002:a62:764d:: with SMTP id r74mr14194953pfc.110.1565245283908; Wed, 07 Aug 2019 23:21:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565245283; cv=none; d=google.com; s=arc-20160816; b=TqiLAxlDFsyLV9mmmX/C8TZe6CZk3xMXmsPgIOefkzJOEgGRyhsoFZpQgaqtnGeeID qI0xmJz6TX7M51ABtB2RSxhxI8uMQoe0SDGjOhS8HdieWB73eGxD9d0SyhGJKBL1YelU WpUyn7JpQcDfLkVL/I0VF1pDdjkeKjyvxtdAz+Km3jONdbLH8E/F23/cb2uk0UWC7w7Z FniF4ckojSSajl8458YtZUBwQkb/LxhlAt4DcD3ZzkW7le1Y9FOhN/febRh8XII+bC+0 UMvrnvVSwoIa6M/juWxVpWSaF2OIvbgsWDOlDpvGEojvRfazDLMvZ/h+enWYpRkDSIiE dLvw== 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:date:subject:cc:to:from; bh=LklZI+jjNy9P/Vf1oDAlKWfBdOZ3w4ODTtcULXIYH+w=; b=oKAneRrR+WISO2I4dvZbdEyxTHHtWqRbMC9KFxIFVs3oUwUjfgTfwIOAIH5aaukjMl wARidBXC4yzD9WWo6Nm1z9J6IMGov5IHPYqUuVn/vgf8epmQ13JAZCfgI6nT1c1/VnJN FyqFjSaBJxUO4o6MtIQe83HpLmxQGjkFMJJm69JUG/1qCWnUsDqEAaSI534pCmP8pnHb 8KA6+tyXYyJRiScA8mzfNxaiLH9cPQpZK/piDAVjd7OsWRMklVW/6xDM4IwIYrS8+rta iCHfhBH0S282Ng+GCcDzTY7rKDM7HXuowp3pCIjc1rlwO5sF2b+wv/MIkn/ga0BEoRnD nZdA== 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 q4si14298902pgv.106.2019.08.07.23.21.08; Wed, 07 Aug 2019 23:21:23 -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 S1731129AbfHHGUU (ORCPT + 99 others); Thu, 8 Aug 2019 02:20:20 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:53183 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbfHHGUU (ORCPT ); Thu, 8 Aug 2019 02:20:20 -0400 X-Originating-IP: 79.86.19.127 Received: from alex.numericable.fr (127.19.86.79.rev.sfr.net [79.86.19.127]) (Authenticated sender: alex@ghiti.fr) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 50D2420008; Thu, 8 Aug 2019 06:20:14 +0000 (UTC) From: Alexandre Ghiti To: Andrew Morton Cc: Paul Walmsley , Luis Chamberlain , Christoph Hellwig , Russell King , Catalin Marinas , Will Deacon , Ralf Baechle , Paul Burton , James Hogan , Palmer Dabbelt , Albert Ou , Alexander Viro , Kees Cook , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Alexandre Ghiti Subject: [PATCH v6 02/14] arm64: Make use of is_compat_task instead of hardcoding this test Date: Thu, 8 Aug 2019 02:17:44 -0400 Message-Id: <20190808061756.19712-3-alex@ghiti.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190808061756.19712-1-alex@ghiti.fr> References: <20190808061756.19712-1-alex@ghiti.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Each architecture has its own way to determine if a task is a compat task, by using is_compat_task in arch_mmap_rnd, it allows more genericity and then it prepares its moving to mm/. Signed-off-by: Alexandre Ghiti Acked-by: Catalin Marinas Acked-by: Kees Cook Reviewed-by: Christoph Hellwig Reviewed-by: Luis Chamberlain --- arch/arm64/mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/mm/mmap.c b/arch/arm64/mm/mmap.c index b050641b5139..bb0140afed66 100644 --- a/arch/arm64/mm/mmap.c +++ b/arch/arm64/mm/mmap.c @@ -43,7 +43,7 @@ unsigned long arch_mmap_rnd(void) unsigned long rnd; #ifdef CONFIG_COMPAT - if (test_thread_flag(TIF_32BIT)) + if (is_compat_task()) rnd = get_random_long() & ((1UL << mmap_rnd_compat_bits) - 1); else #endif -- 2.20.1