Received: by 10.223.164.202 with SMTP id h10csp8293wrb; Mon, 13 Nov 2017 01:35:56 -0800 (PST) X-Google-Smtp-Source: AGs4zMZaFSw0CcdyYkv8HW6sWEbvaODNRhdZqvmf4R5Itiolmz9cTfJ2u6LSlPrbpsI1aTnPXOzI X-Received: by 10.159.204.146 with SMTP id t18mr8382635plo.70.1510565756544; Mon, 13 Nov 2017 01:35:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510565756; cv=none; d=google.com; s=arc-20160816; b=AyQbg+kfoZTJ44DaBsKUq15LnSX7nO2qC96YWLm2X9ufjW6mExJepVmibJOUbTEMTS rUap7r3xdpRp6lXQVgUtuEtN+QXTPiV7ycTDVGEv1WKx+itApKOdsMsw8Xret61r/twd 2AkWGtgTaqTakon1K17vbCn5fNEuRA8q3nzyx2J8jhH7niZhFMh2t1C0IhhVJCFeru1s UYA4Pt32O7unAeUAfevLNHS0rQV2xSTIIki2eqrMkBBDyOF8UBs2c5jgpTYwKLpS0I5s NstIMDDG7xi91VZl7tarW5+p8OEyEuBCK8Ma5LnMK1vj36F0WwPzAlJU9dHqsdSeBdDD /p6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=eK1ao186buJ06gfFRHfw9w7U+PInzc4QYOEtEp9r/X0=; b=yQvowtaieu3QaQEpQ7J5ud7pnDXSgenonp3tuD8AgRkxzQ34ZefhEZ5hIFUQ/duXO/ sSgLYPL0i3syHZP+xN8A8PVWJatfDnYRDMxjLrgsHz1MOo+1oAGYbq3L8Nr3G+ikK7Pm Ksy9bP8pvoQFSTlbFkKmd1UWOelhTe+OLIEgVM9gP7sZeLVAlRvDymiEuAzK+CTR7aTT CWJI3iQFIQdbg+nCWe+YydT95G4sSXir4O41feuNeOx9ABdFjqyZjsUGHinbJKd2l8Lp hNw+6k82yaUYFpmc4vHVc3B8F+bxBvSaToMwp1UEU4IVT+hs64AEh0klRI4fE39eQmu7 P/4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=HdyndZjl; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 44si13698655pla.69.2017.11.13.01.35.43; Mon, 13 Nov 2017 01:35:56 -0800 (PST) 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=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=HdyndZjl; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751511AbdKMJer (ORCPT + 92 others); Mon, 13 Nov 2017 04:34:47 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:48924 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751018AbdKMJep (ORCPT ); Mon, 13 Nov 2017 04:34:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=eK1ao186buJ06gfFRHfw9w7U+PInzc4QYOEtEp9r/X0=; b=HdyndZjljlDakDInZmGugYRNlChSnId8ks1gAnjxMj7i5dFwuAKHpkIKDT8zLhIWEPGXkEYSDb+VrnfytS+gsx4lC3xxla42+WZCDWHylD+2ubTrT8aZQiNVMUCbpn9u+iuhOnvppQmAlON/Z3jlETza0b4wsYwL3I/Eh3d8olg=; Received: from n2100.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:4f86]:54341) by pandora.armlinux.org.uk with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1eEB8O-00043Q-U7; Mon, 13 Nov 2017 09:34:29 +0000 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.76) (envelope-from ) id 1eEB8K-0002zy-MA; Mon, 13 Nov 2017 09:34:24 +0000 Date: Mon, 13 Nov 2017 09:34:23 +0000 From: Russell King - ARM Linux To: Michal Hocko Cc: Joel Stanley , Stephen Rothwell , Andrew Morton , Linux-Next Mailing List , Linux Kernel Mailing List , linux-arm-kernel@lists.infradead.org, Benjamin Herrenschmidt , Michael Ellerman , Abdul Haleem , linuxppc-dev@lists.ozlabs.org Subject: Re: linux-next: Tree for Nov 7 Message-ID: <20171113093423.GI12318@n2100.armlinux.org.uk> References: <20171107162217.382cd754@canb.auug.org.au> <20171108142050.7w3yliulxjeco3b7@dhcp22.suse.cz> <20171110123054.5pnefm3mczsfv7bz@dhcp22.suse.cz> <20171113092006.cjw2njjukt6limvb@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171113092006.cjw2njjukt6limvb@dhcp22.suse.cz> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 13, 2017 at 10:20:06AM +0100, Michal Hocko wrote: > [Cc arm and ppc maintainers] > > Thanks a lot for testing! > > On Sun 12-11-17 11:38:02, Joel Stanley wrote: > > On Fri, Nov 10, 2017 at 11:00 PM, Michal Hocko wrote: > > > Hi Joel, > > > > > > On Wed 08-11-17 15:20:50, Michal Hocko wrote: > > > [...] > > >> > There are a lot of messages on the way up that look like this: > > >> > > > >> > [ 2.527460] Uhuuh, elf segement at 000d9000 requested but the > > >> > memory is mapped already > > >> > [ 2.540160] Uhuuh, elf segement at 000d9000 requested but the > > >> > memory is mapped already > > >> > [ 2.546153] Uhuuh, elf segement at 000d9000 requested but the > > >> > memory is mapped already > > >> > > > >> > And then trying to run userspace looks like this: > > >> > > >> Could you please run with debugging patch posted > > >> http://lkml.kernel.org/r/20171107102854.vylrtaodla63kc57@dhcp22.suse.cz > > > > > > Did you have chance to test with this debugging patch, please? > > > > Lots of this: > > > > [ 1.177266] Uhuuh, elf segement at 000d9000 requested but the memory is mapped already, got 000dd000 > > [ 1.177555] Clashing vma [dd000, de000] flags:100873 name:(null) > > This smells like the problem I've expected that mmap with hint doesn't > respect the hint even though there is no clashing mapping. The above > basically says that we didn't map at 0xd9000 but it has placed it at > 0xdd000. The nearest (clashing) vma is at 0xdd000 so this is our new > mapping. find_vma returns the closest vma (with addr < vm_end) for the > given address 0xd9000 so this address cannot be mapped by any other vma. > > Now that I am looking at arm's arch_get_unmapped_area it does perform > aligning for shared vmas. We do not do that for MAP_FIXED. Powepc, > reported earlier [1] seems to suffer from the similar problem. > slice_get_unmapped_area alignes to slices, whatever that means. > > I can see two possible ways around that. Either we explicitly request > non-aligned mappings via a special MAP_$FOO (e.g. MAP_FIXED_SAFE) or > simply opt out from the MAP_FIXED protection via ifdefs. The first > option sounds more generic to me but also more tricky to not introduce > other user visible effects. The later is quite straightforward. What do > you think about the following on top of the previous patch? > > It is rather terse and disables the MAP_FIXED protection for arm > comletely because I couldn't find a way to make it conditional on > CACHEID_VIPT_ALIASING. But this can be always handled later. I find the > protection for other archtectures useful enough to have this working for > most architectures now and handle others specially. Can someone provide the background information for this please? -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up From 1583942095406494928@xxx Mon Nov 13 09:21:35 +0000 2017 X-GM-THRID: 1583423641769727671 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread