|
|
@ -426,14 +426,13 @@ int do_execve2(unsigned long * eip,long tmp,char * filename,
|
|
|
|
unsigned long page;
|
|
|
|
unsigned long page;
|
|
|
|
int block,i;
|
|
|
|
int block,i;
|
|
|
|
unsigned long address=current->start_code;
|
|
|
|
unsigned long address=current->start_code;
|
|
|
|
|
|
|
|
//this part comes from do_no_page as achievement of immediate loading of cs and ds
|
|
|
|
while(address<=current->brk+current->start_code)
|
|
|
|
while(address<=current->brk+current->start_code)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
address &= 0xfffff000;
|
|
|
|
address &= 0xfffff000;
|
|
|
|
temp = address - current->start_code;
|
|
|
|
temp = address - current->start_code;
|
|
|
|
if (share_page(temp))
|
|
|
|
if (share_page(temp))
|
|
|
|
return;
|
|
|
|
return -1;
|
|
|
|
if (!(page = get_free_page()))
|
|
|
|
if (!(page = get_free_page()))
|
|
|
|
oom();
|
|
|
|
oom();
|
|
|
|
block = 1 + temp/BLOCK_SIZE;
|
|
|
|
block = 1 + temp/BLOCK_SIZE;
|
|
|
@ -444,8 +443,6 @@ int do_execve2(unsigned long * eip,long tmp,char * filename,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
free_page(page);
|
|
|
|
free_page(page);
|
|
|
|
oom();
|
|
|
|
oom();
|
|
|
|
printk("error");
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
address+=PAGE_SIZE;
|
|
|
|
address+=PAGE_SIZE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|