• Home
  • Raw
  • Download

Lines Matching +full:1 +full:kb

17  * Fork and exec tiny 1 page executable which precisely controls its VM.
56 if (unshare(CLONE_NEWNS) == -1) { in make_private_tmp()
60 exit(1); in make_private_tmp()
62 if (mount(NULL, "/", NULL, MS_PRIVATE|MS_REC, NULL) == -1) { in make_private_tmp()
63 exit(1); in make_private_tmp()
65 if (mount(NULL, "/tmp", "tmpfs", 0, NULL) == -1) { in make_private_tmp()
66 exit(1); in make_private_tmp()
70 static pid_t pid = -1;
108 #define VADDR (1UL << 32)
129 mov_rsi((1ULL << 47) - 4096 - VADDR - 4096),
134 /* write(0, &c, 1); */
137 0xba, 0x01, 0x00, 0x00, 0x00, /* mov edx, 1 */
138 mov_eax(1),
141 /* 1: pause(); */
145 0xeb, 0xf7, /* jmp 1b */
163 h.e_ident[1] = 'E'; in make_exe()
167 h.e_ident[5] = 1; in make_exe()
168 h.e_ident[6] = 1; in make_exe()
172 h.e_version = 1; in make_exe()
179 h.e_phnum = 1; in make_exe()
185 ph.p_type = 1; in make_exe()
186 ph.p_flags = (1<<2)|1; in make_exe()
195 if (fd == -1) { in make_exe()
196 exit(1); in make_exe()
200 exit(1); in make_exe()
220 _exit(1); in sigaction_SIGSEGV()
234 exit(1); in vsyscall()
267 /* Reserve fd 0 for 1-byte pipe ping from child. */ in main()
270 return 1; in main()
275 if (pipe(pipefd) == -1) { in main()
276 return 1; in main()
278 if (dup2(pipefd[1], 0) != 0) { in main()
279 return 1; in main()
283 if (pid == -1) { in main()
284 return 1; in main()
288 return 1; in main()
292 if (read(pipefd[0], &_, 1) != 1) { in main()
293 return 1; in main()
297 if (fstat(exec_fd, &st) == -1) { in main()
298 return 1; in main()
322 if (fd == -1) { in main()
323 return 1; in main()
341 if (fd == -1) { in main()
342 return 1; in main()
350 #define RSS1 "Rss: 4 kB\n" in main()
351 #define RSS2 "Rss: 0 kB\n" in main()
352 #define PSS1 "Pss: 4 kB\n" in main()
353 #define PSS2 "Pss: 0 kB\n" in main()
360 "Size: 4 kB\n", in main()
361 "KernelPageSize: 4 kB\n", in main()
362 "MMUPageSize: 4 kB\n", in main()
363 "Anonymous: 0 kB\n", in main()
364 "AnonHugePages: 0 kB\n", in main()
365 "Shared_Hugetlb: 0 kB\n", in main()
366 "Private_Hugetlb: 0 kB\n", in main()
367 "Locked: 0 kB\n", in main()
397 if (fd == -1) { in main()
398 return 1; in main()
412 "Anonymous: 0 kB\n", in main()
413 "AnonHugePages: 0 kB\n", in main()
414 "Shared_Hugetlb: 0 kB\n", in main()
415 "Private_Hugetlb: 0 kB\n", in main()
416 "Locked: 0 kB\n", in main()
433 if (fd == -1) { in main()
434 return 1; in main()
439 assert(buf[0] == '1'); /* ->total_vm */ in main()
440 assert(buf[1] == ' '); in main()
441 assert(buf[2] == '0' || buf[2] == '1'); /* rss */ in main()
443 assert(buf[4] == '0' || buf[2] == '1'); /* file rss */ in main()
445 assert(buf[6] == '1'); /* ELF executable segments */ in main()