process: okay don't mark stack protectors nx...
This commit is contained in:
parent
f52e4b8f3d
commit
0913598bb0
@ -330,7 +330,7 @@ process_t * spawn_kidle(int bsp) {
|
||||
idle->image.stack = (uintptr_t)valloc(KERNEL_STACK_SIZE)+ KERNEL_STACK_SIZE;
|
||||
mmu_frame_allocate(
|
||||
mmu_get_page(idle->image.stack - KERNEL_STACK_SIZE, 0),
|
||||
MMU_FLAG_KERNEL | MMU_FLAG_NOEXECUTE);
|
||||
MMU_FLAG_KERNEL);
|
||||
|
||||
/* TODO arch_initialize_context(uintptr_t) ? */
|
||||
idle->thread.context.ip = bsp ? (uintptr_t)&_kidle : (uintptr_t)&_kburn;
|
||||
@ -383,7 +383,7 @@ process_t * spawn_init(void) {
|
||||
init->image.stack = (uintptr_t)valloc(KERNEL_STACK_SIZE) + KERNEL_STACK_SIZE;
|
||||
mmu_frame_allocate(
|
||||
mmu_get_page(init->image.stack - KERNEL_STACK_SIZE, 0),
|
||||
MMU_FLAG_KERNEL | MMU_FLAG_NOEXECUTE);
|
||||
MMU_FLAG_KERNEL);
|
||||
init->image.shm_heap = 0x200000000; /* That's 8GiB? That should work fine... */
|
||||
|
||||
init->flags = PROC_FLAG_STARTED | PROC_FLAG_RUNNING;
|
||||
@ -438,7 +438,7 @@ process_t * spawn_process(volatile process_t * parent, int flags) {
|
||||
proc->image.stack = (uintptr_t)valloc(KERNEL_STACK_SIZE) + KERNEL_STACK_SIZE;
|
||||
mmu_frame_allocate(
|
||||
mmu_get_page(proc->image.stack - KERNEL_STACK_SIZE, 0),
|
||||
MMU_FLAG_KERNEL | MMU_FLAG_NOEXECUTE);
|
||||
MMU_FLAG_KERNEL);
|
||||
proc->image.shm_heap = 0x200000000; /* FIXME this should be a macro def */
|
||||
|
||||
if (flags & PROC_REUSE_FDS) {
|
||||
|
@ -152,7 +152,7 @@ void fix_signal_stacks(void) {
|
||||
if (!p->signal_kstack) {
|
||||
printf("Cannot restore signal stack for pid=%d - unset?\n", p->id);
|
||||
} else {
|
||||
memcpy((void *)(p->image.stack - KERNEL_STACK_SIZE), p->signal_kstack, KERNEL_STACK_SIZE);
|
||||
memcpy((char *)(p->image.stack - KERNEL_STACK_SIZE + 0x1000), p->signal_kstack + 0x1000, KERNEL_STACK_SIZE - 0x1000);
|
||||
free(p->signal_kstack);
|
||||
p->signal_kstack = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user