Lines Matching +full:1 +full:kb

17  * Fork and exec tiny 1 page executable which precisely controls its VM.
59 if (unshare(CLONE_NEWNS) == -1) { in make_private_tmp()
63 exit(1); in make_private_tmp()
65 if (mount(NULL, "/", NULL, MS_PRIVATE|MS_REC, NULL) == -1) { in make_private_tmp()
66 exit(1); in make_private_tmp()
68 if (mount(NULL, "/tmp", "tmpfs", 0, NULL) == -1) { in make_private_tmp()
69 exit(1); in make_private_tmp()
73 static pid_t pid = -1;
111 #define VADDR (1UL << 32)
132 mov_rsi((1ULL << 47) - 4096 - VADDR - 4096),
137 /* write(0, &c, 1); */
140 0xba, 0x01, 0x00, 0x00, 0x00, /* mov edx, 1 */
141 mov_eax(1),
144 /* 1: pause(); */
148 0xeb, 0xf7, /* jmp 1b */
166 h.e_ident[1] = 'E'; in make_exe()
170 h.e_ident[5] = 1; in make_exe()
171 h.e_ident[6] = 1; in make_exe()
175 h.e_version = 1; in make_exe()
182 h.e_phnum = 1; in make_exe()
188 ph.p_type = 1; in make_exe()
189 ph.p_flags = (1<<2)|1; in make_exe()
198 if (fd == -1) { in make_exe()
199 exit(1); in make_exe()
203 exit(1); in make_exe()
217 * 1: vsyscall VMA is --xp vsyscall=xonly
246 exit(1); in vsyscall()
269 g_vsyscall = 1; in vsyscall()
280 exit(1); in vsyscall()
294 case 1: in main()
308 /* Reserve fd 0 for 1-byte pipe ping from child. */ in main()
311 return 1; in main()
316 if (pipe(pipefd) == -1) { in main()
317 return 1; in main()
319 if (dup2(pipefd[1], 0) != 0) { in main()
320 return 1; in main()
324 if (pid == -1) { in main()
325 return 1; in main()
329 return 1; in main()
333 if (read(pipefd[0], &_, 1) != 1) { in main()
334 return 1; in main()
338 if (fstat(exec_fd, &st) == -1) { in main()
339 return 1; in main()
363 if (fd == -1) { in main()
364 return 1; in main()
382 if (fd == -1) { in main()
383 return 1; in main()
391 #define RSS1 "Rss: 4 kB\n" in main()
392 #define RSS2 "Rss: 0 kB\n" in main()
393 #define PSS1 "Pss: 4 kB\n" in main()
394 #define PSS2 "Pss: 0 kB\n" in main()
401 "Size: 4 kB\n", in main()
402 "KernelPageSize: 4 kB\n", in main()
403 "MMUPageSize: 4 kB\n", in main()
404 "Anonymous: 0 kB\n", in main()
405 "AnonHugePages: 0 kB\n", in main()
406 "Shared_Hugetlb: 0 kB\n", in main()
407 "Private_Hugetlb: 0 kB\n", in main()
408 "Locked: 0 kB\n", in main()
438 if (fd == -1) { in main()
439 return 1; in main()
453 "Anonymous: 0 kB\n", in main()
454 "AnonHugePages: 0 kB\n", in main()
455 "Shared_Hugetlb: 0 kB\n", in main()
456 "Private_Hugetlb: 0 kB\n", in main()
457 "Locked: 0 kB\n", in main()
474 if (fd == -1) { in main()
475 return 1; in main()
480 assert(buf[0] == '1'); /* ->total_vm */ in main()
481 assert(buf[1] == ' '); in main()
482 assert(buf[2] == '0' || buf[2] == '1'); /* rss */ in main()
484 assert(buf[4] == '0' || buf[2] == '1'); /* file rss */ in main()
486 assert(buf[6] == '1'); /* ELF executable segments */ in main()
504 if (fd == -1) in main()
505 return 1; in main()
507 /* CASE 1: exact MATCH at VADDR */ in main()
533 assert(q.vma_name_size == strlen(exp_path_buf) + 1); in main()
536 /* CASE 2: NO MATCH at VADDR-1 */ in main()
539 q.query_addr = VADDR - 1; in main()
546 /* CASE 3: MATCH COVERING_OR_NEXT_VMA at VADDR - 1 */ in main()
549 q.query_addr = VADDR - 1; in main()
555 assert(q.query_addr == VADDR - 1); in main()