Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753932AbcCHBeb (ORCPT ); Mon, 7 Mar 2016 20:34:31 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:51516 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753390AbcCHBeW (ORCPT ); Mon, 7 Mar 2016 20:34:22 -0500 Subject: Re: [PATCH v2] sparc64: Add support for Application Data Integrity (ADI) To: Khalid Aziz , Dave Hansen , Andy Lutomirski References: <1456951177-23579-1-git-send-email-khalid.aziz@oracle.com> <20160305.230702.1325379875282120281.davem@davemloft.net> <56DD9949.1000106@oracle.com> <56DD9E94.70201@oracle.com> <56DDA6FD.4040404@oracle.com> <56DDBE68.6080709@linux.intel.com> <56DDC47C.8010206@linux.intel.com> <56DDCAD3.3090106@oracle.com> Cc: David Miller , Jonathan Corbet , Andrew Morton , dingel@linux.vnet.ibm.com, bob.picco@oracle.com, "Kirill A. Shutemov" , "Aneesh Kumar K.V" , Andrea Arcangeli , Arnd Bergmann , sparclinux@vger.kernel.org, Michal Hocko , chris.hyser@oracle.com, Richard Weinberger , Vlastimil Babka , Konstantin Khlebnikov , Oleg Nesterov , Greg Thelen , Jan Kara , xiexiuqi@huawei.com, Vineet.Gupta1@synopsys.com, Andrew Lutomirski , "Eric W. Biederman" , bsegall@google.com, Geert Uytterhoeven , Davidlohr Bueso , Alexey Dobriyan , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , linux-arch , Linux API From: Rob Gardner Message-ID: <56DE2B6B.3050503@oracle.com> Date: Mon, 7 Mar 2016 17:31:23 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56DDCAD3.3090106@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1123 Lines: 27 On 03/07/2016 10:39 AM, Khalid Aziz wrote: > On 03/07/2016 11:12 AM, Dave Hansen wrote: >> On 03/07/2016 09:53 AM, Andy Lutomirski wrote: >>> Also, what am I missing? Tying these tags to the physical page seems >>> like a poor design to me. This seems really awkward to use. >> >> Yeah, can you describe the structures that store these things? Surely >> the hardware has some kind of lookup tables for them and stores them in >> memory _somewhere_. >> > > Version tags are tied to virtual addresses, not physical pages. > > Where exactly are the tags stored is part of processor architecture > and I am not privy to that. MMU stores these lookup tables somewhere > and uses it to authenticate access to virtual addresses. It really is > irrelevant to kernel how MMU implements access controls as long as we > have access to the knowledge of how to use it. The tags are stored in physical memory, and you can write a tag directly to that memory via stxa with ASI_MCD_REAL and completely bypass the MMU. When you do that, the tag will still be seen by any virtual address that maps to that physical address. Rob