Remove MAP_INHERIT flag from mmaps.

This commit is contained in:
Matthew Dillon 2001-08-25 18:06:32 +00:00
parent ef3f517f37
commit bbe67657cf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=82325
4 changed files with 11 additions and 11 deletions

View File

@ -1121,7 +1121,7 @@ init_mapfile()
*/
if (mmap((caddr_t)ems_frame_addr, 64 * 1024,
PROT_EXEC | PROT_READ | PROT_WRITE,
MAP_ANON | MAP_FIXED | MAP_INHERIT | MAP_SHARED,
MAP_ANON | MAP_FIXED | MAP_SHARED,
-1, 0) == MAP_FAILED) {
debug(D_ALWAYS, "Could not map EMS page frame, ");
goto fail;
@ -1169,14 +1169,14 @@ map_page(u_long pagenum, u_char position, short handle, int unmaponly)
*/
if (mmap((caddr_t)ems_frame_addr, 64 * 1024,
PROT_EXEC | PROT_READ | PROT_WRITE,
MAP_ANON | MAP_FIXED | MAP_INHERIT | MAP_SHARED,
MAP_ANON | MAP_FIXED | MAP_SHARED,
-1, 0) == MAP_FAILED)
fatal("Could not map EMS page frame during unmap only\n");
return;
}
if (mmap(map_addr, len,
PROT_EXEC | PROT_READ | PROT_WRITE,
MAP_FILE | MAP_FIXED | MAP_INHERIT | MAP_SHARED,
MAP_FILE | MAP_FIXED | MAP_SHARED,
mapfile_fd, file_offs) == MAP_FAILED) {
fatal("EMS mapping error: %s\nCannot recover\n", strerror(errno));
}

View File

@ -254,7 +254,7 @@ console_init()
}
addr = mmap((caddr_t)0xA0000, 5 * 64 * 1024,
PROT_EXEC | PROT_READ | PROT_WRITE,
MAP_FILE | MAP_FIXED | MAP_INHERIT | MAP_SHARED,
MAP_FILE | MAP_FIXED | MAP_SHARED,
fd, 0);
if (addr != (caddr_t)0xA0000) {
perror("mmap");
@ -264,7 +264,7 @@ console_init()
#if 0
addr = mmap((caddr_t)0x100000 - 0x1000, 0x1000,
PROT_EXEC | PROT_READ | PROT_WRITE,
MAP_FILE | MAP_FIXED | MAP_INHERIT | MAP_SHARED,
MAP_FILE | MAP_FIXED | MAP_SHARED,
fd, 0);
if (addr != (caddr_t)(0x100000 - 0x1000)) {
perror("mmap");

View File

@ -467,7 +467,7 @@ init_mode(int mode)
SIGSEGV?), which is handled in 'trap.c:sigbus()'. */
if (vmode.type == GRAPHICS) {
vmem = mmap((void *)0xa0000, 64 * 1024, PROT_NONE,
MAP_ANON | MAP_FIXED | MAP_INHERIT | MAP_SHARED, -1, 0);
MAP_ANON | MAP_FIXED | MAP_SHARED, -1, 0);
if (vmem == NULL)
fatal("Could not mmap() video memory");

View File

@ -360,7 +360,7 @@ void initHMA()
if (mmap((caddr_t)0x000000, 0x100000,
PROT_EXEC | PROT_READ | PROT_WRITE,
MAP_ANON | MAP_FIXED | MAP_INHERIT | MAP_SHARED,
MAP_ANON | MAP_FIXED | MAP_SHARED,
-1, 0) == MAP_FAILED) {
perror("Error mapping HMA, HMA disabled: ");
HMA_a20 = -1;
@ -370,7 +370,7 @@ void initHMA()
}
if (mmap((caddr_t)0x000000, 64 * 1024,
PROT_EXEC | PROT_READ | PROT_WRITE,
MAP_FILE | MAP_FIXED | MAP_INHERIT | MAP_SHARED,
MAP_FILE | MAP_FIXED | MAP_SHARED,
HMA_fd_off, 0) == MAP_FAILED) {
perror("Error mapping HMA, HMA disabled: ");
HMA_a20 = -1;
@ -380,7 +380,7 @@ void initHMA()
}
if (mmap((caddr_t)0x100000, 64 * 1024,
PROT_EXEC | PROT_READ | PROT_WRITE,
MAP_FILE | MAP_FIXED | MAP_INHERIT | MAP_SHARED,
MAP_FILE | MAP_FIXED | MAP_SHARED,
HMA_fd_off, 0) == MAP_FAILED) {
perror("Error mapping HMA, HMA disabled: ");
HMA_a20 = -1;
@ -411,7 +411,7 @@ static void enable_a20()
/* Map memory for the HMA with fd = HMA_fd_on */
if (mmap((caddr_t)0x100000, 64 * 1024,
PROT_EXEC | PROT_READ | PROT_WRITE,
MAP_FILE | MAP_FIXED | MAP_INHERIT | MAP_SHARED,
MAP_FILE | MAP_FIXED | MAP_SHARED,
HMA_fd_on, 0) == MAP_FAILED) {
fatal("HMA mapping error: %s\nCannot recover\n", strerror(errno));
}
@ -431,7 +431,7 @@ static void disable_a20()
/* Remap the wrap around area */
if (mmap((caddr_t)0x100000, 64 * 1024,
PROT_EXEC | PROT_READ | PROT_WRITE,
MAP_FILE | MAP_FIXED | MAP_INHERIT | MAP_SHARED,
MAP_FILE | MAP_FIXED | MAP_SHARED,
HMA_fd_off, 0) == MAP_FAILED) {
fatal("HMA mapping error: %s\nCannot recover\n", strerror(errno));
}