Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3857431yba; Tue, 16 Apr 2019 22:27:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqywv4MQZ61t3rOIzPurEG8UYEdS1X/e5w/Q9CKJnEc4CeCz3pH2FZ9F7+4h7MjF5zuLX613 X-Received: by 2002:a62:12d0:: with SMTP id 77mr86200233pfs.15.1555478850950; Tue, 16 Apr 2019 22:27:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555478850; cv=none; d=google.com; s=arc-20160816; b=WVHALVUrikBF91gXc7M6rOywDXLIT3pn+uWgRwQT1d2dE8zNNNpD7CV/6e5/Mj/iRs 9y7uWR4gm2cNIjBS5YNM6NuqIzXsuNM1RBlbuJ63TMHBrnJBPup01Id1tkp9+Y/kzZEO 5MAdep0ulgbz9NuviNUqMfZHsQEf9GFMzocgq4xbRvrQMQ46nWTuLaCQKcYsqXnQmNVz wlWpU5zbpErRdQXaA7wx4fVEp5DkKQ9tNPQozzwvui30pmYGphF776aREShyyMqukbYI v7+irVyE5AYBc+XZpkI6yqp50a7OFYj1OfFwfGjWvKRTgTsjKa6Pm2lKZFKTMHWbqke0 a9Kw== 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=UDJJoD0qMDqsEKa5fIO7G8qbJZY7SvtJV8LUclcf8SQ=; b=pZsnr3ayp5g+UjXLkt8HCNsiZLMChFWXKdAtooRrHl4ty8c7PuBeUFV6iUpAyW2b++ VdKf2e69LjLg419ejZo7xdX/vJuj+GXWn8x1FR2+Tpjlkj+OBMYdZJQLZGQgnMmx1q0m NsRSjDqT0b4l6hgwvchr0CT//MKBP4K1PabbIryb5EzXgXQQKVhQbMds2f4rRpo0khnN SkPuMtyw7EvjE7ul4rFCiJeS2P0E7T8+wmOwWAjLpRLSy0NoslCqietMKBdf1EfHIOGr wEBTX1t2ULyTCgHPRXc1FiS27Yk6NoCIMRKhN9SraM4NSQFXIHt9eujPPtmOsBdKmH3T rnXw== 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 m2si25404075plt.429.2019.04.16.22.27.16; Tue, 16 Apr 2019 22:27: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; 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 S1729507AbfDQFZH (ORCPT + 99 others); Wed, 17 Apr 2019 01:25:07 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:46001 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726395AbfDQFZG (ORCPT ); Wed, 17 Apr 2019 01:25:06 -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 relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 61127FF805; Wed, 17 Apr 2019 05:25:00 +0000 (UTC) From: Alexandre Ghiti To: Andrew Morton Cc: Christoph Hellwig , Russell King , Catalin Marinas , Will Deacon , Ralf Baechle , Paul Burton , James Hogan , Palmer Dabbelt , Albert Ou , Alexander Viro , Luis Chamberlain , 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 v3 02/11] arm64: Make use of is_compat_task instead of hardcoding this test Date: Wed, 17 Apr 2019 01:22:38 -0400 Message-Id: <20190417052247.17809-3-alex@ghiti.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190417052247.17809-1-alex@ghiti.fr> References: <20190417052247.17809-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 --- 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 842c8a5fcd53..ed4f9915f2b8 100644 --- a/arch/arm64/mm/mmap.c +++ b/arch/arm64/mm/mmap.c @@ -54,7 +54,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