mailing list of musl libc
 help / color / mirror / code / Atom feed
535787b9ec527bb12acbb80a53aadc4ab760c7b3 blob 325 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 
#include <sys/mman.h>
#include "libc.h"
#include "syscall.h"

int __mprotect(void *addr, size_t len, int prot)
{
	size_t start, end;
	start = (size_t)addr & -PAGE_SIZE;
	end = (size_t)((char *)addr + len + PAGE_SIZE-1) & -PAGE_SIZE;
	return syscall(SYS_mprotect, start, end-start, prot);
}

weak_alias(__mprotect, mprotect);
debug log:

solving 535787b ...
found 535787b in https://git.vuxu.org/mirror/musl/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).