Remove MAP_INHERIT flag from mmaps.
This commit is contained in:
parent
5fe4233238
commit
d90cfb096d
@ -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));
|
||||
}
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user