Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4760155ybl; Mon, 26 Aug 2019 15:41:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/mP+OgpeA0LHYf/ppZUTSS1rktHY89Q+By5Wn7P0rTaEW5pyGIyLEwv+OWq16dG3ty0Av X-Received: by 2002:aa7:8a0a:: with SMTP id m10mr6410156pfa.100.1566859299452; Mon, 26 Aug 2019 15:41:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566859299; cv=none; d=google.com; s=arc-20160816; b=InCPVBYi/maTQoal3wqbFMeiF3OlbVeP6KsQsHuTGw1EqIATWEFLEOs+zJ22piutTA bnvqZVsesgCb+e698vWq/AKxtuBThJ0/XjeSvDlVN9LE4LGSa93jn1Gp2wyyxYC/NNyE l72wg6BGo0QB6NE0FKaRVdrsfm1W4G24QEHOac+CXkyIsEiWiRxGPohG9euTqXSJoXWW rgFqw+gOITsl32vTLX8LvnaVuzG81vkWD14x6gFZRsf5Hi0apT9dbNm09SWTvpA1sMHz odes+8oJmr7dgXc+oUIjHfi71PkWvVubv8Z97+fFCrPuoNJE3aVLyry0tHWXaYjAdyuN yuGA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Pj4uAQaXeIdkvaCK98IbRx1uvJ/X01xMarlBi5RxG2U=; b=OODEB7voRAe8BvhFB+qai0j40UYMoC6iRW9BKCyRx35Mm8y9Sgw+DydMBkSBuuZCcb NT6Fq0G44WpqxbKAJYYBHMHxnBlKI1x3HNtmvXIzC0Uilm0F1w7SQ5DkuYF7STGvCW+R sKJnqAF0Ee1h/LL5PChzabGcaMcOQ/GHGOhbaP3WN9Wc4P+drObqysc2khD5fpXy+KKt iiP+SaezVA7BGPfjB02UgFLPxozK/9kGS1HyQyikpzgK+QqTTwwnCJUBnOE2F/9VPE0A R2BwZrcO2QoiPs4e04m9PAqEHOsxgXVOLviTFMMT+6hJ22cXJ4b75g+x1FpIxEfI97lu //qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=XvRR+Yjr; 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 cm7si723229pjb.15.2019.08.26.15.41.24; Mon, 26 Aug 2019 15:41:39 -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; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=XvRR+Yjr; 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 S1726994AbfHZWi7 (ORCPT + 99 others); Mon, 26 Aug 2019 18:38:59 -0400 Received: from mout.gmx.net ([212.227.15.18]:38547 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726278AbfHZWi7 (ORCPT ); Mon, 26 Aug 2019 18:38:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1566859062; bh=Pj4uAQaXeIdkvaCK98IbRx1uvJ/X01xMarlBi5RxG2U=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=XvRR+Yjrj/lxPKk9HoTw93NPc2fxEA57GnjWJuC9bbXUlad8hyT40BS7HHIy8tWJf HKhXHa5+08OHFjwRDtYFkVp0gn+1SjXZVa56LhxNDbkvaFA5/1SjLkQmHLLevfod3w 5gqrRzYlgA3oUOBtXpspo13yWY+5lQ1efwYudJbU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.179.28] ([217.238.204.231]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MaZWz-1hnB5L0pIX-00K8b7; Tue, 27 Aug 2019 00:37:42 +0200 Subject: Re: [PATCH RESEND 0/8] Fix mmap base in bottom-up mmap To: Alexandre Ghiti , Andrew Morton Cc: "James E . J . Bottomley" , 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 References: <20190620050328.8942-1-alex@ghiti.fr> From: Helge Deller Message-ID: <9639ebd4-7dcb-0ea5-e0a6-adb8eaecd92a@gmx.de> Date: Tue, 27 Aug 2019 00:37:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:RU5C0dBXjxrRCewq0WWznMGgYJRZJCVSduSK741vTuSXvO8YQ3k e4ipIkY98zehrL5bn2+bhdKDyYEyZ8Bp5SzGjyBxqCZTsoVramKj/Vyd4ck1V830ylao4wf HP5VvjUpOf3gI4uCw2J6OcIgqDuwqloj8mNLmpjVrXYZLCwcKWdSIESQi0IEfnXZU5JrW6G PPkeHq2ID2V1aVdIp6hwg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:nmHZZR9ejPA=:6g+P4z9PhbuHnBsl9sJG2S uDi9RYwCeGIVcZqCxIaH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KClj9EdnErvSOmCvB+3ArYDFuwiWP9x9LQ79XKf3uReDC+OC+N0coj4IPoAESrdjWpZWzc 1PsgKx/NTOXIyGmKTnJzPfsJXFQ9tK7lrDyVBrTvWDNqjVzQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26.08.19 09:34, Alexandre Ghiti wrote: > On 6/20/19 7:03 AM, Alexandre Ghiti wrote: >> This series fixes the fallback of the top-down mmap: in case of >> failure, a bottom-up scheme can be tried as a last resort between >> the top-down mmap base and the stack, hoping for a large unused stack >> limit. >> >> Lots of architectures and even mm code start this fallback >> at TASK_UNMAPPED_BASE, which is useless since the top-down scheme >> already failed on the whole address space: instead, simply use >> mmap_base. >> >> Along the way, it allows to get rid of of mmap_legacy_base and >> mmap_compat_legacy_base from mm_struct. >> >> Note that arm and mips already implement this behaviour. >> >> Alexandre Ghiti (8): >> =C2=A0=C2=A0 s390: Start fallback of top-down mmap at mm->mmap_base >> =C2=A0=C2=A0 sh: Start fallback of top-down mmap at mm->mmap_base >> =C2=A0=C2=A0 sparc: Start fallback of top-down mmap at mm->mmap_base >> =C2=A0=C2=A0 x86, hugetlbpage: Start fallback of top-down mmap at mm->m= map_base >> =C2=A0=C2=A0 mm: Start fallback top-down mmap at mm->mmap_base >> =C2=A0=C2=A0 parisc: Use mmap_base, not mmap_legacy_base, as low_limit = for >> =C2=A0=C2=A0=C2=A0=C2=A0 bottom-up mmap >> =C2=A0=C2=A0 x86: Use mmap_*base, not mmap_*legacy_base, as low_limit f= or bottom-up >> =C2=A0=C2=A0=C2=A0=C2=A0 mmap >> =C2=A0=C2=A0 mm: Remove mmap_legacy_base and mmap_compat_legacy_code fi= elds from >> =C2=A0=C2=A0=C2=A0=C2=A0 mm_struct >> >> =C2=A0 arch/parisc/kernel/sys_parisc.c=C2=A0 |=C2=A0 8 +++----- >> =C2=A0 arch/s390/mm/mmap.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 2 +- >> =C2=A0 arch/sh/mm/mmap.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 2 +- >> =C2=A0 arch/sparc/kernel/sys_sparc_64.c |=C2=A0 2 +- >> =C2=A0 arch/sparc/mm/hugetlbpage.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2= =A0 2 +- >> =C2=A0 arch/x86/include/asm/elf.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |= =C2=A0 2 +- >> =C2=A0 arch/x86/kernel/sys_x86_64.c=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 4 += +-- >> =C2=A0 arch/x86/mm/hugetlbpage.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 |=C2=A0 7 ++++--- >> =C2=A0 arch/x86/mm/mmap.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 20 +++++++++----------- >> =C2=A0 include/linux/mm_types.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 |=C2=A0 2 -- >> =C2=A0 mm/debug.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 |=C2=A0 4 ++-- >> =C2=A0 mm/mmap.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 |=C2=A0 2 +- >> =C2=A0 12 files changed, 26 insertions(+), 31 deletions(-) >> > > Any thoughts about that series ? As said before, this is just a preparat= ory patchset in order to > merge x86 mmap top down code with the generic version. I just tested your patch series successfully on the parisc architeture. You may add: Tested-by: Helge Deller # parisc Thanks! Helge