kernel: make user stack segment non-executable
This commit is contained in:
parent
1e773c97e7
commit
d25ca13ed8
1 changed files with 1 additions and 1 deletions
|
@ -429,7 +429,7 @@ sysexec(va_list list)
|
||||||
if(tstk <= USTKSIZE)
|
if(tstk <= USTKSIZE)
|
||||||
error(Enovmem);
|
error(Enovmem);
|
||||||
} while((s = isoverlap(tstk-USTKSIZE, USTKSIZE)) != nil);
|
} while((s = isoverlap(tstk-USTKSIZE, USTKSIZE)) != nil);
|
||||||
up->seg[ESEG] = newseg(SG_STACK, tstk-USTKSIZE, USTKSIZE/BY2PG);
|
up->seg[ESEG] = newseg(SG_STACK | SG_NOEXEC, tstk-USTKSIZE, USTKSIZE/BY2PG);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Args: pass 2: assemble; the pages will be faulted in
|
* Args: pass 2: assemble; the pages will be faulted in
|
||||||
|
|
Loading…
Reference in a new issue