Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1727537

Re: [PATCH v7 9/9] sparc64: Add support for ADI (Application Data Integrity)

From Khalid Aziz <khalid.aziz@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH v7 9/9] sparc64: Add support for ADI (Application Data Integrity)
Date 2017-09-06 16:20 +0200
Message-ID <umJlp-2UP-23@gated-at.bofh.it> (permalink)
References <ucGI9-4oh-7@gated-at.bofh.it> <ucGIa-4oh-25@gated-at.bofh.it> <um2q6-7L6-9@gated-at.bofh.it>
Organization Oracle Corp

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v7 9/9] sparc64: Add support for ADI (Application Data  Integrity) Pavel Machek <pavel@ucw.cz> - 2017-09-04 18:30 +0200
  Re: [PATCH v7 9/9] sparc64: Add support for ADI (Application Data  Integrity) David Miller <davem@davemloft.net> - 2017-09-05 23:50 +0200
    Re: [PATCH v7 9/9] sparc64: Add support for ADI (Application Data  Integrity) Pavel Machek <pavel@ucw.cz> - 2017-09-07 00:40 +0200
      Re: [PATCH v7 9/9] sparc64: Add support for ADI (Application Data  Integrity) Steven Sistare <steven.sistare@oracle.com> - 2017-09-08 14:30 +0200
  Re: [PATCH v7 9/9] sparc64: Add support for ADI (Application Data  Integrity) Khalid Aziz <khalid.aziz@oracle.com> - 2017-09-06 16:20 +0200

csiph-web