Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp281574ybi; Tue, 18 Jun 2019 22:45:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNA/Rb+wqhjmYwfO8QVp0FjLHg8HAkNaXfiFyAqR4j7gImiQkZ5LDF/v8Tvmwi8SYhgkAY X-Received: by 2002:a17:90a:26e4:: with SMTP id m91mr9291186pje.93.1560923107921; Tue, 18 Jun 2019 22:45:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560923107; cv=none; d=google.com; s=arc-20160816; b=RZblVuT7y3ft744e0haO5iuS3k4fKIKwxJpmOtrJ2WJT/4qljQBzepoy9Xk/SqXBoT TPJ7dmQtUi5BPYdclRCKmJTbJJO/P/0P0vvVd6nsKpTXwF2zkjz+3ZQUuT/v4Ao/sE3D TftXgHifJ65wVqrgVkIeq5ZAKiJtCwnHYuM7Pzvw5nPFky0IEqtyroUNSYgz0b2ggBXZ zdoq4upgj2SZNJ5Ix2jtCAnVZWYq8n7dJdu7E6cwZPos79/3ILJwlH2t63irmlD6RrD9 5WNQ98CHQokAizVjxDtbHPx74qKe8VgDTUou244oM91jDjm3Oeryp5ye62292MA2M9VG RwOg== 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=m7MXGEPFkQVa7ZzKYhJt/d8JioPFicUOgZH+JE7vbvJ84Jxwxzg0j1zx0pS3/4tzTX VOyPAKBlOSrr6DWlTSf3qpatjn2Af9tYacRSxR8BSKZlf5gHiq1lmKzkWhAJVHEji/Jl wCWtkGx7LvawjZ7ZOLEB3G2YWOIXSnRkE6sxCobUXHf0CGorJE/YwLFgAxujLjDsKcmY BEoITnKWqJPz4Q7L7LS2HWt7viRlQTw5DA1s8mYtYD0BNcITFGT/GcWnJUUpEl3TwY0Q b6BO0pJhxCAJuSFSctBXb7nKPpxHfkFNzj8/8k9qzoomg0d3jkOCe15FB7FmVcF096xJ lxcg== 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 k10si2249223pgo.0.2019.06.18.22.44.52; Tue, 18 Jun 2019 22:45:07 -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 S1731004AbfFSFn4 (ORCPT + 99 others); Wed, 19 Jun 2019 01:43:56 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:35507 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbfFSFnz (ORCPT ); Wed, 19 Jun 2019 01:43:55 -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 AC264FF80F; Wed, 19 Jun 2019 05:43:39 +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: Wed, 19 Jun 2019 01:42:17 -0400 Message-Id: <20190619054224.5983-2-alex@ghiti.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190619054224.5983-1-alex@ghiti.fr> References: <20190619054224.5983-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