Thread (62 messages) 62 messages, 8 authors, 2016-03-08

Re: [PATCH v2] sparc64: Add support for Application Data Integrity (ADI)

From: David Miller <davem@davemloft.net>
Date: 2016-03-06 04:07:13
Also in: linux-arch, linux-mm, lkml, sparclinux

From: Khalid Aziz <redacted>
Date: Wed,  2 Mar 2016 13:39:37 -0700
	In this
	first implementation I am enabling ADI for hugepages only
	since these pages are locked in memory and hence avoid the
	issue of saving and restoring tags.
This makes the feature almost entire useless.

Non-hugepages must be in the initial implementation.
+	PR_ENABLE_SPARC_ADI - Enable ADI checking in all pages in the address
+		range specified. The pages in the range must be already
+		locked. This operation enables the TTE.mcd bit for the
+		pages specified. arg2 is the starting address for address
+		range and must be page aligned. arg3 is the length of
+		memory address range and must be a multiple of page size.
I strongly dislike this interface, and it makes the prtctl cases look
extremely ugly and hide to the casual reader what the code is actually
doing.

This is an mprotect() operation, so add a new flag bit and implement
this via mprotect please.

Then since you are guarenteed to have a consistent ADI setting for
every single VMA region, you never "lose" the ADI state when you swap
out.  It's implicit in the VMA itself, because you'll store in the VMA
that this is an ADI region.

I also want this enabled unconditionally, without any Kconfig knobs.

Thanks.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help