Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753798AbdLSVfy (ORCPT ); Tue, 19 Dec 2017 16:35:54 -0500 Received: from gate.crashing.org ([63.228.1.57]:45485 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753484AbdLSVfu (ORCPT ); Tue, 19 Dec 2017 16:35:50 -0500 Message-ID: <1513719296.2743.12.camel@kernel.crashing.org> Subject: Re: [PATCH v9 29/51] mm/mprotect, powerpc/mm/pkeys, x86/mm/pkeys: Add sysfs interface From: Benjamin Herrenschmidt To: Dave Hansen , Ram Pai Cc: mpe@ellerman.id.au, mingo@redhat.com, akpm@linux-foundation.org, corbet@lwn.net, arnd@arndb.de, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, x86@kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, paulus@samba.org, khandual@linux.vnet.ibm.com, aneesh.kumar@linux.vnet.ibm.com, bsingharora@gmail.com, hbabu@us.ibm.com, mhocko@kernel.org, bauerman@linux.vnet.ibm.com, ebiederm@xmission.com Date: Wed, 20 Dec 2017 08:34:56 +1100 In-Reply-To: References: <1509958663-18737-1-git-send-email-linuxram@us.ibm.com> <1509958663-18737-30-git-send-email-linuxram@us.ibm.com> <20171218221850.GD5461@ram.oc3035372033.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.2 (3.26.2-1.fc27) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 651 Lines: 16 On Mon, 2017-12-18 at 14:28 -0800, Dave Hansen wrote: > > We do not have generic support for something like that on ppc. > > The kernel looks at the device tree to determine what hardware features > > are available. But does not have mechanism to tell the hardware to track > > which of its features are currently enabled/used by the kernel; atleast > > not for the memory-key feature. > > Bummer. You're missing out. > > But, you could still do this with a syscall. "Hey, kernel, do you > support this feature?" I'm not sure I understand Ram's original (quoted) point, but informing userspace of CPU features is what AT_HWCAP's are about. Ben.