[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6494b4c4-6d5b-7e45-f053-00535bb898aa@oracle.com>
Date: Wed, 6 Sep 2017 08:10:05 -0600
From: Khalid Aziz <khalid.aziz@...cle.com>
To: Pavel Machek <pavel@....cz>
Cc: davem@...emloft.net, dave.hansen@...ux.intel.com, corbet@....net,
bob.picco@...cle.com, steven.sistare@...cle.com,
pasha.tatashin@...cle.com, mike.kravetz@...cle.com,
mingo@...nel.org, nitin.m.gupta@...cle.com,
kirill.shutemov@...ux.intel.com, tom.hromatka@...cle.com,
eric.saint.etienne@...cle.com, allen.pais@...cle.com,
cmetcalf@...lanox.com, akpm@...ux-foundation.org,
geert@...ux-m68k.org, tklauser@...tanz.ch, atish.patra@...cle.com,
vijay.ac.kumar@...cle.com, peterz@...radead.org, mhocko@...e.com,
jack@...e.cz, lstoakes@...il.com, hughd@...gle.com,
thomas.tai@...cle.com, paul.gortmaker@...driver.com,
ross.zwisler@...ux.intel.com, dave.jiang@...el.com,
willy@...radead.org, ying.huang@...el.com, zhongjiang@...wei.com,
minchan@...nel.org, vegard.nossum@...cle.com,
imbrenda@...ux.vnet.ibm.com, aneesh.kumar@...ux.vnet.ibm.com,
aarcange@...hat.com, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, sparclinux@...r.kernel.org,
linux-mm@...ck.org, Khalid Aziz <khalid@...ehiking.org>
Subject: Re: [PATCH v7 9/9] sparc64: Add support for ADI (Application Data
Integrity)
On 09/04/2017 10:25 AM, Pavel Machek wrote:
> Hi!
>
>> ADI is a new feature supported on SPARC M7 and newer processors to allow
>> hardware to catch rogue accesses to memory. ADI is supported for data
>> fetches only and not instruction fetches. An app can enable ADI on its
>> data pages, set version tags on them and use versioned addresses to
>> access the data pages. Upper bits of the address contain the version
>> tag. On M7 processors, upper four bits (bits 63-60) contain the version
>> tag. If a rogue app attempts to access ADI enabled data pages, its
>> access is blocked and processor generates an exception. Please see
>> Documentation/sparc/adi.txt for further details.
>
> I'm afraid I still don't understand what this is meant to prevent.
>
> IOMMU ignores these, so this is not to prevent rogue DMA from doing
> bad stuff.
>
> Will gcc be able to compile code that uses these automatically? That
> does not sound easy to me. Can libc automatically use this in malloc()
> to prevent accessing freed data when buffers are overrun?
>
> Is this for benefit of JITs?
>
David explained it well. Yes, preventing buffer overflow is one of the
uses of ADI. Protecting critical data from wild writes caused by
programming errors is another use. ADI can be used for debugging as well
during development.
Thanks,
Khalid
Powered by blists - more mailing lists