Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1491784ybi; Wed, 19 Jun 2019 22:05:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+eul/fOiBnFWRr/B8kI2aRHZ/vpYIJgw8Xw7bfjVI4gJ2HlmpezCDb7T3A4gBOL7y6R59 X-Received: by 2002:a17:90a:5887:: with SMTP id j7mr1064390pji.136.1561007133934; Wed, 19 Jun 2019 22:05:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561007133; cv=none; d=google.com; s=arc-20160816; b=YPtD3exZ0toGXrfEpWHylYV0sHw2ZsafiKiq4AISydlHzjKxnUgLFvbBo4OUM8wOLX pW1vy3SDpyiA1Ie2NftLJb/tYWmZRqcc/mE5UK7ANGul4JZM4rIEgGtuIMRi/YIir+Me FeOhKj5pnvAoPSvsGRvAPHuhgT1Qnhs7uyVjRrM/vmt3iogULreK/fshQ5NqblBBPwj1 YNIN/bPOC3x4IY06HlwIB5t66/1274VcC6Y9YetkG6CSYgpiml4F5hACTrslZDIploRr ap+VZWylQ+4BQgbrihSAfDWa9cuAnOFoTIkiVsWZDSb/bix1DZmpJ8PbfQOQxlor4zg6 5g2g== 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=iqIwla2j0Q0Q8bfEfEzq9djhmzJoPVi/GHh6q4wh8ApdDMGq3MunkBEvK2jDKBs/Jz BQcubwb1bBNDLozyh3Oqtmyo8Lb6OuMXFAfZbCPn9UgTme5w0WFWd+6IYCsw/PpQedC+ VV//THnZebG9FcMOnJWIOxLdZTFftn/qsdTNGJ5BoH99s5648+agEVbh0UMmGpoIRxu7 /sOZFtj1Ndlwd5kxSaaEXNakD0jooc/kHJ9pSZ0mz6cAQ9VRfpjzZscVvAZW88RlK6xk HlwyVOeSh1fBvS2+ZmyoDWw8fj3JfAfNrWY4uw1C9kbKQE2xaN9xVJ8Ptn/E5hwMRF1+ 5t0A== 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 g9si18770699plm.207.2019.06.19.22.05.18; Wed, 19 Jun 2019 22:05:33 -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 S1726353AbfFTFFL (ORCPT + 99 others); Thu, 20 Jun 2019 01:05:11 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:57929 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbfFTFFL (ORCPT ); Thu, 20 Jun 2019 01:05:11 -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 DA6C6FF804; Thu, 20 Jun 2019 05:04:55 +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 RESEND 1/8] s390: Start fallback of top-down mmap at mm->mmap_base Date: Thu, 20 Jun 2019 01:03:21 -0400 Message-Id: <20190620050328.8942-2-alex@ghiti.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190620050328.8942-1-alex@ghiti.fr> References: <20190620050328.8942-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