lkml.org 
[lkml]   [1996]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Resource limit test in binfmt_elf
Date
> Thanks. Here's my second try. Besidess, shouldn't it be possible to set the
> limit on a per user base?

Eh? It is settable on a per-process basis. That's what the
current->rlim[...] is all about.

Two little buglets:

for(i=0;i < elf_ex.e_phnum; i++){
if(elf_ppnt->p_flags & PF_W) {
! unsigned int new_data_size = datasize+elf_ppnt->p_memsz;
if (new_data_size > rlim || new_data_size < datasize)
return -ENOMEM;
}
elf_ppnt++;
}
--------
for(i=0;i < elf_ex.e_phnum; i++){
if(elf_ppnt->p_flags & PF_W) {
! unsigned long new_data_size = datasize+elf_ppnt->p_memsz;
if (new_data_size > rlim || new_data_size < datasize)
return -ENOMEM;
+ data_size = new_data_size;
}
elf_ppnt++;
}


r~


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.075 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site