Received: by 10.223.164.202 with SMTP id h10csp109150wrb; Mon, 13 Nov 2017 03:35:50 -0800 (PST) X-Google-Smtp-Source: AGs4zMb1KV4qqGVoj6x2amyffx8t4oGMTmRGtckTOVZl2+QUGW1UuzsiNMFtJizHiOdk5md3uoGM X-Received: by 10.84.242.76 with SMTP id c12mr1746810pll.445.1510572950484; Mon, 13 Nov 2017 03:35:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510572950; cv=none; d=google.com; s=arc-20160816; b=gAvBTMIZHrn5FdZJkSfng0qm4czIIqByEBW/NczN360hYsM6U4jsgTOvBp4ttQC2Na OFO3DAc0hxUoR1eyr6uvFU1SW3YryjyhpO6qaRLQesD9dw+eV13l+gJsiUWWF4jf6Ttw mZSO0YWNgBZgSruw0kIwmrWfTvp0gJOPMugswsUlcSyVdq0yGGD5BqMPENXVVLjN2ppk g55zOCinGUReC1ZTtGFGLB5KyPCUPHVvwo95ilp0WOaoFs/2dORyCB2otvO6XwEtO6jy NeEs04CtiUPah7CC23Ia1IVX/4EUuhQVCykoreBUZdVMoH30nXM7yPKEqnP0OnGUK/g2 dEfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=7RWNwkJEorGmyLPsalECr+GfDQ9qmwQu9tRLGC/FssE=; b=rOFrMA8HE4LpUxO9nLJJF+zs/7aI5AcEqVK9IhjuTQoc+Gi5OVdUvDGzZrwZZBWG/v CfppZdNMFgUKIqpZ1n6HGsJ5QaXO7Anhr07zso8DQLwJLqp9uKFrXB8ZSjwHVvxBJZHU 89LlenHy885g+DBmcgYGu5SeDu9Hs31QsAoHAWNgUFk4maSC8Z+PjJVtQrEowPH6wZ6t nOe2TbG9giU+FSBHkWmaPYYyr1OkahSTj89zxaCLAPTD/9LWJ1LPeseuewjXpXZriGEa wKlUe7TAJJ4zq4/fJFjqeXllkMNJsAkSId7ebllHHuGJvo/LZ1cYYYbCR/8/+1uvd6iI Anhg== 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 x65si5294074pff.290.2017.11.13.03.35.37; Mon, 13 Nov 2017 03:35:50 -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; 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 S1752532AbdKMLe4 (ORCPT + 95 others); Mon, 13 Nov 2017 06:34:56 -0500 Received: from ozlabs.org ([103.22.144.67]:48971 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751842AbdKMLey (ORCPT ); Mon, 13 Nov 2017 06:34:54 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 3yb7ph0fr2z9sBW; Mon, 13 Nov 2017 22:34:52 +1100 (AEDT) From: Michael Ellerman To: Michal Hocko , Joel Stanley Cc: Stephen Rothwell , Andrew Morton , Linux-Next Mailing List , Linux Kernel Mailing List , Russell King , Benjamin Herrenschmidt , Abdul Haleem , Ralf Baechle , "James E.J. Bottomley" , Helge Deller , Yoshinori Sato , Rich Felker , "David S. Miller" , Chris Zankel , Max Filippov , linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org Subject: Re: linux-next: Tree for Nov 7 In-Reply-To: <20171113094203.aofz2e7kueitk55y@dhcp22.suse.cz> References: <20171107162217.382cd754@canb.auug.org.au> <20171108142050.7w3yliulxjeco3b7@dhcp22.suse.cz> <20171110123054.5pnefm3mczsfv7bz@dhcp22.suse.cz> <20171113092006.cjw2njjukt6limvb@dhcp22.suse.cz> <20171113094203.aofz2e7kueitk55y@dhcp22.suse.cz> Date: Mon, 13 Nov 2017 22:34:50 +1100 Message-ID: <87lgjawgx1.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michal, Michal Hocko writes: > On Mon 13-11-17 10:20:06, Michal Hocko wrote: >> [Cc arm and ppc maintainers] > > Hmm, it turned out to be a problem on other architectures as well. > CCing more maintainers. For your reference, we are talking about > http://lkml.kernel.org/r/20171023082608.6167-1-mhocko@kernel.org > which has broken architectures which do apply aligning on the mmap > address hint without MAP_FIXED applied. See below my proposed way > around this issue because I belive that the above patch is quite > valuable on its own to be dropped for all archs. I don't really like your solution sorry :) The fact that you've had to patch seven arches seems like a red flag. I think this is a generic problem with MAP_FIXED, which I've heard userspace folks complain about in the past. Currently MAP_FIXED does two things: 1. makes addr not a hint but the required address 2. blasts any existing mapping You want 1) but not 2). So the right solution IMHO would be to add a new mmap flag to request that behaviour, ie. a fixed address but iff there is nothing already mapped there. I don't know the mm code well enough to know if that's hard for some reason, but it *seems* like it should be doable. cheers From 1583943438026750523@xxx Mon Nov 13 09:42:55 +0000 2017 X-GM-THRID: 1583423641769727671 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread