Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp258310ybi; Tue, 18 Jun 2019 22:12:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOB7fnh1IJkjaVT0Cn1cmvl9h73v8XRiQndyDhE5aMKhqSIhzIEFZVtHkKLJXkiW2IbsSh X-Received: by 2002:a63:c94f:: with SMTP id y15mr6083485pgg.159.1560921151438; Tue, 18 Jun 2019 22:12:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560921151; cv=none; d=google.com; s=arc-20160816; b=YnxGfmZSVwlGW869EKL+W1ml/Mc5uehzVmmSvZ0qshZLMe/+CQ7q0UfW/2HOoQvtSf qUtuziuUZGAwcBhnrTev2N6QQf/Bz6uYuBkbjZ8MG1eYo0yUt/ljk0VJCoSq40a39EcT BrKpQBFs/4ALoAr86BZF3Rnft6E9SXpTSpCrqpLCowjxvB4O/soG4OqCVBg7oN/rRpzt NvG1iQ+EJMeAsGPA2HDeYDcuungCnQl+CfKaILteEGp/ZB8NciqYmrxbXtjE7X2EK2De dwQvfQPTAty1RCQSgOJrVxs1LZYqhd+Vo4aEyGBGEJxQM39nRjeHXSnu5UN2LmL+2Bpv dzOg== 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=suPCocrA3QM64gsofO1CrTBeyBcHKAtqoGrxzUvLo4k=; b=Xi/7h6Zv7AHH6lPa8aFWxQJO8ImeQQu8WyTrESBrjuKZVJZRxzJXXdqqAItc2zTcrN Gjhtexoqcx5fJloeh/2ThPbBPVH6YDgur/vSEV6/dZ5ol7XpSNiyu9Tjg0IpyF2g3Rnl 2Rh/kdzG0RfX4dcH8rMbjzGZuddTkQN7ewElgc95GMvOdqW5dRs7RN7jnLxWNXwvFL6q QywU4Dgt350JeYKW4rQIfY+SpaDGcAFr5okKUX4sH1wHUznz89QNz3I8Bv3cFvLpF62Q ZzdOyqTK8VUVFivCkftPuOZn/j8XWk8VNtdVB5buLwwAXYS/8jcFfoADxFAZY+kuzxDi Fovg== 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 e7si15583687pfi.130.2019.06.18.22.12.15; Tue, 18 Jun 2019 22:12: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 S1730532AbfFSFKT (ORCPT + 99 others); Wed, 19 Jun 2019 01:10:19 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:59159 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbfFSFKS (ORCPT ); Wed, 19 Jun 2019 01:10:18 -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 C1E8920008; Wed, 19 Jun 2019 05:10:11 +0000 (UTC) From: Alexandre Ghiti To: Andrew Morton Cc: "James E . J . Bottomley" , Helge Deller , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Yoshinori Sato , Rich Felker , "David S . Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , x86@kernel.org, Dave Hansen , Andy Lutomirski , Peter Zijlstra , linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-mm@kvack.org, Alexandre Ghiti Subject: [PATCH 1/8] s390: Start fallback of top-down mmap at mm->mmap_base Date: Wed, 19 Jun 2019 01:08:37 -0400 Message-Id: <20190619050844.5294-2-alex@ghiti.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190619050844.5294-1-alex@ghiti.fr> References: <20190619050844.5294-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 In case of mmap failure in top-down mode, there is no need to go through the whole address space again for the bottom-up fallback: the goal of this fallback is to find, as a last resort, space between the top-down mmap base and the stack, which is the only place not covered by the top-down mmap. Signed-off-by: Alexandre Ghiti --- arch/s390/mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c index cbc718ba6d78..4a222969843b 100644 --- a/arch/s390/mm/mmap.c +++ b/arch/s390/mm/mmap.c @@ -166,7 +166,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, if (addr & ~PAGE_MASK) { VM_BUG_ON(addr != -ENOMEM); info.flags = 0; - info.low_limit = TASK_UNMAPPED_BASE; + info.low_limit = mm->mmap_base; info.high_limit = TASK_SIZE; addr = vm_unmapped_area(&info); if (addr & ~PAGE_MASK) -- 2.20.1