From c237072776a6414f77189470b29d386bf2eba4c5 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sat, 12 Jun 2021 10:31:26 +0200 Subject: [PATCH] subpage_prot.2: Use syscall(SYS_...); for system calls without a wrapper Signed-off-by: Alejandro Colomar Signed-off-by: Michael Kerrisk --- man2/subpage_prot.2 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/man2/subpage_prot.2 b/man2/subpage_prot.2 index dc07753b5..91bb789e1 100644 --- a/man2/subpage_prot.2 +++ b/man2/subpage_prot.2 @@ -32,12 +32,18 @@ subpage_prot \- define a subpage protection for an address range .SH SYNOPSIS .nf -.BI "int subpage_prot(unsigned long " addr ", unsigned long " len \ -", uint32_t *" map ); +.BR "#include " " /* Definition of " SYS_* " constants */" +.B #include +.PP +.BI "int syscall(SYS_subpage_prot, unsigned long " addr ", unsigned long " len , +.BI " uint32_t *" map ); .fi .PP .IR Note : -There is no glibc wrapper for this system call; see NOTES. +glibc provides no wrapper for +.BR subpage_prot (), +necessitating the use of +.BR syscall (2). .SH DESCRIPTION The PowerPC-specific .BR subpage_prot () @@ -96,9 +102,6 @@ No library support is provided. .SH CONFORMING TO This system call is Linux-specific. .SH NOTES -Glibc does not provide a wrapper for this system call; call it using -.BR syscall (2). -.PP Normal page protections (at the 64-kB page level) also apply; the subpage protection mechanism is an additional constraint, so putting 0 in a 2-bit field won't allow writes to a page that is otherwise