.\" the source, must acknowledge the copyright and authors of this work.
.\" %%%LICENSE_END
.\"
-.TH PKEYS 7 2016-12-12 "Linux" "Linux Programmer's Manual"
+.TH PKEYS 7 2019-03-06 "Linux" "Linux Programmer's Manual"
.SH NAME
pkeys \- overview of Memory Protection Keys
.SH DESCRIPTION
unsigned int ecx = 0;
unsigned int edx = 0;
- asm volatile(".byte 0x0f,0x01,0xef\\n\\t"
+ asm volatile(".byte 0x0f,0x01,0xef\en\et"
: : "a" (eax), "c" (ecx), "d" (edx));
}
return syscall(SYS_pkey_free, pkey);
}
-#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
+#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
int
* Put some random data into the page (still OK to touch)
*/
*buffer = __LINE__;
- printf("buffer contains: %d\\n", *buffer);
+ printf("buffer contains: %d\en", *buffer);
/*
* Allocate a protection key:
if (status == -1)
errExit("pkey_mprotect");
- printf("about to read buffer again...\\n");
+ printf("about to read buffer again...\en");
/*
* This will crash, because we have disallowed access
*/
- printf("buffer contains: %d\\n", *buffer);
+ printf("buffer contains: %d\en", *buffer);
status = pkey_free(pkey);
if (status == -1)
exit(EXIT_SUCCESS);
}
+.EE
.SH SEE ALSO
.BR pkey_alloc (2),
.BR pkey_free (2),