From patchwork Tue Nov 10 01:31:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 7587521 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9ED74C05C6 for ; Tue, 10 Nov 2015 01:37:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C57F7205E1 for ; Tue, 10 Nov 2015 01:37:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D51F8205DD for ; Tue, 10 Nov 2015 01:37:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752521AbbKJBhM (ORCPT ); Mon, 9 Nov 2015 20:37:12 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:33939 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752186AbbKJBbu (ORCPT ); Mon, 9 Nov 2015 20:31:50 -0500 Received: by padhx2 with SMTP id hx2so208469153pad.1 for ; Mon, 09 Nov 2015 17:31:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt_com.20150623.gappssmtp.com; s=20150623; h=from:to:to:to:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc :cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:subject :date:message-id:in-reply-to:references; bh=OASV5kLUlmb2bgYtV44FKFErPhjM3ckanFBkw4qwlY0=; b=xvZuXKoR+zIXk8d1FmUjyjRBUWILAHnHwbe91oOfBVbF+saropXNXzL+Kn7vls4D20 ZNc0nVgbfmVi55jvZbg6F6yv14sbSjLvaBrtquNRnthA47aIyXAV9W0Qjlgsuu7rs9ea VchDqENoKpgI5XElLU5mSKfipqxch3fKeSAwPH+2/3cM1bmQXeqtRF7T22ApvyJY/qtt ZlEauT9ArDRm+IOnQvTUvxp/C1vvByGPWCshLK6xQVc6PgbxEJc7iW1FL1TP4EyH/wXd hDQ3V7STBKny8e008jaBFU5xurXE2VYEIqjD49DIL3/jeEsVBHaXLYYtTqL2cUMvQKrt cUgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:to:to:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc :cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc :cc:cc:cc:cc:subject:date:message-id:in-reply-to:references; bh=OASV5kLUlmb2bgYtV44FKFErPhjM3ckanFBkw4qwlY0=; b=SnGrAKhVzTuISnmSnb/LhE11MIDY0EQVpqUu1jHqWrjwmYqGfjiUUYggJduqAwkBYp rG4HpJTAZ9yOjwGRzw0CNZSPnWPjz/mGEC4PPP1ufQ6f7LCrmFgYthaqEvKE7kigmlip 5eXa8Cp1W7uNb8n7HzVQJ5KIpkCtUUd6NQRUfsjkulECdJt6N57M39JzQd8RRphILx5O /gMVwT+kLEp3yHA4pc7gvqS+p6KXy606yvbyIVm1Bq93nQAQT2Lg4eG/jq6oOC6lA1RV hSd9b9bXzQq4Oz1GQjsWgYhIpQ+FCG/Z6lRs+OzjofOL3Ba0O9Gm+g0S+Y109wR99v+7 JGtw== X-Gm-Message-State: ALoCoQkpz6MRUxTzhwxPyd+F4tRuMZttbYfoDwWPUwn4SphYEwmmF34nZZCGGOTWdNzdeuJBkY3S X-Received: by 10.66.170.238 with SMTP id ap14mr1500012pac.128.1447119110344; Mon, 09 Nov 2015 17:31:50 -0800 (PST) Received: from localhost (wap-cal.CS.Berkeley.EDU. [128.32.35.228]) by smtp.gmail.com with ESMTPSA id we9sm623081pab.3.2015.11.09.17.31.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Nov 2015 17:31:49 -0800 (PST) From: Palmer Dabbelt To: arnd@arndb.de To: dhowells@redhat.com To: peterz@infradead.org Cc: viro@zeniv.linux.org.uk Cc: ast@plumgrid.com Cc: aishchuk@linux.vnet.ibm.com Cc: aarcange@redhat.com Cc: akpm@linux-foundation.org Cc: luto@kernel.org Cc: acme@kernel.org Cc: bhe@redhat.com Cc: 3chas3@gmail.com Cc: chris@zankel.net Cc: dave@sr71.net Cc: dyoung@redhat.com Cc: drysdale@google.com Cc: davem@davemloft.net Cc: ebiederm@xmission.com Cc: geoff@infradead.org Cc: gregkh@linuxfoundation.org Cc: hpa@zytor.com Cc: mingo@kernel.org Cc: iulia.manda21@gmail.com Cc: plagnioj@jcrosoft.com Cc: jikos@kernel.org Cc: josh@joshtriplett.org Cc: linux-api@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-xtensa@linux-xtensa.org Cc: mathieu.desnoyers@efficios.com Cc: jcmvbkbc@gmail.com Cc: paulmck@linux.vnet.ibm.com Cc: a.p.zijlstra@chello.nl Cc: tglx@linutronix.de Cc: tomi.valkeinen@ti.com Cc: vgoyal@redhat.com Cc: x86@kernel.org Cc: Palmer Dabbelt Subject: [PATCH 04/14] Always expose MAP_UNINITIALIZED to userspace Date: Mon, 9 Nov 2015 17:31:01 -0800 Message-Id: <1447119071-19392-5-git-send-email-palmer@dabbelt.com> X-Mailer: git-send-email 2.4.10 In-Reply-To: <1447119071-19392-1-git-send-email-palmer@dabbelt.com> References: <1446579994-9937-1-git-send-email-palmer@dabbelt.com> <1447119071-19392-1-git-send-email-palmer@dabbelt.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This used to be hidden behind CONFIG_MMAP_ALLOW_UNINITIALIZED, so userspace wouldn't actually ever see it be non-zero. While I had originally hoped to avoid hiding it, it looks like this conflicts with MAP_HUGE_SHIFT so I think it's safer to just keep this 0. Architectures that want to define this can still override it. In fact, the Xtensa port already overrides it in a very similar manner to the previously broken one (but due to lots of conflicting opinions on how to solve this correctly, I'm just taking the easy way out and letting their arch maintainers deal with it -- sorry). Signed-off-by: Palmer Dabbelt Reviewed-by: Andrew Waterman Reviewed-by: Albert Ou --- include/uapi/asm-generic/mman-common.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/uapi/asm-generic/mman-common.h b/include/uapi/asm-generic/mman-common.h index a74dd84..25ca92c 100644 --- a/include/uapi/asm-generic/mman-common.h +++ b/include/uapi/asm-generic/mman-common.h @@ -19,9 +19,7 @@ #define MAP_TYPE 0x0f /* Mask for type of mapping */ #define MAP_FIXED 0x10 /* Interpret addr exactly */ #define MAP_ANONYMOUS 0x20 /* don't use a file */ -#ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED -# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be uninitialized */ -#else +#ifndef MAP_UNINITIALIZED # define MAP_UNINITIALIZED 0x0 /* Don't support this flag */ #endif