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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/04/2017 03:40 PM, Dave Hansen wrote:
On 01/04/2017 03:35 PM, Rob Gardner wrote:
Tags are not cleared at all when memory is freed, but rather, lazily
(and automatically) cleared when memory is allocated.
What does "allocated" mean in this context?  Physical or virtual? What
does this do, for instance?

The first time a virtual page is touched by a process after the malloc, the kernel does clear_user_page() or something similar, which zeroes the memory. At the same time, the memory tags are cleared.

Rob



	ptr = malloc(PAGE_SIZE);
	set_tag(ptr, 14);
	madvise(ptr, PAGE_SIZE, MADV_FREE);
	printf("tag: %d\n", get_tag(ptr));
	free(ptr);
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]