Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754042AbdCHTjD (ORCPT ); Wed, 8 Mar 2017 14:39:03 -0500 Received: from mga09.intel.com ([134.134.136.24]:45526 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752094AbdCHTjB (ORCPT ); Wed, 8 Mar 2017 14:39:01 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,265,1486454400"; d="scan'208";a="73209035" Date: Wed, 8 Mar 2017 11:39:00 -0800 From: Andi Kleen To: Davidlohr Bueso Cc: akpm@linux-foundation.org, mhocko@suse.com, mtk.manpages@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: Re: [PATCH] mm,hugetlb: compute page_size_log properly Message-ID: <20170308193900.GC32070@tassilo.jf.intel.com> References: <1488992761-9464-1-git-send-email-dave@stgolabs.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1488992761-9464-1-git-send-email-dave@stgolabs.net> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 756 Lines: 21 > One example of the problems with extra layers what this patch fixes: > mmap_pgoff() should never be using SHM_HUGE_* logic. This was > introduced by: > > 091d0d55b28 (shm: fix null pointer deref when userspace specifies invalid hugepage size) > > It is obviously harmless but lets just rip out the whole thing -- > the shmget.2 manpage will need updating, as it should not be > describing kernel internals. The SHM_* defines were supposed to be exported to user space, but somehow they didn't make it into uapi. But something like this is useful, it's a much nicer interface for users than to hard code the bit position So I would rather if you move it to uapi instead of removing. What the kernel uses internally doesn't really matter. -Andi