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) {
63 exit(1);
65 if (mount(NULL, "/", NULL, MS_PRIVATE|MS_REC, NULL) == -1) {
66 exit(1);
68 if (mount(NULL, "/tmp", "tmpfs", 0, NULL) == -1) {
69 exit(1);
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';
170 h.e_ident[5] = 1;
171 h.e_ident[6] = 1;
175 h.e_version = 1;
182 h.e_phnum = 1;
188 ph.p_type = 1;
189 ph.p_flags = (1<<2)|1;
198 if (fd == -1) {
199 exit(1);
203 exit(1);
217 * 1: vsyscall VMA is --xp vsyscall=xonly
246 exit(1);
269 g_vsyscall = 1;
280 exit(1);
294 case 1:
308 /* Reserve fd 0 for 1-byte pipe ping from child. */
311 return 1;
316 if (pipe(pipefd) == -1) {
317 return 1;
319 if (dup2(pipefd[1], 0) != 0) {
320 return 1;
324 if (pid == -1) {
325 return 1;
329 return 1;
333 if (read(pipefd[0], &_, 1) != 1) {
334 return 1;
338 if (fstat(exec_fd, &st) == -1) {
339 return 1;
363 if (fd == -1) {
364 return 1;
382 if (fd == -1) {
383 return 1;
391 #define RSS1 "Rss: 4 kB\n"
392 #define RSS2 "Rss: 0 kB\n"
393 #define PSS1 "Pss: 4 kB\n"
394 #define PSS2 "Pss: 0 kB\n"
401 "Size: 4 kB\n",
402 "KernelPageSize: 4 kB\n",
403 "MMUPageSize: 4 kB\n",
404 "Anonymous: 0 kB\n",
405 "AnonHugePages: 0 kB\n",
406 "Shared_Hugetlb: 0 kB\n",
407 "Private_Hugetlb: 0 kB\n",
408 "Locked: 0 kB\n",
438 if (fd == -1) {
439 return 1;
453 "Anonymous: 0 kB\n",
454 "AnonHugePages: 0 kB\n",
455 "Shared_Hugetlb: 0 kB\n",
456 "Private_Hugetlb: 0 kB\n",
457 "Locked: 0 kB\n",
474 if (fd == -1) {
475 return 1;
480 assert(buf[0] == '1'); /* ->total_vm */
481 assert(buf[1] == ' ');
482 assert(buf[2] == '0' || buf[2] == '1'); /* rss */
484 assert(buf[4] == '0' || buf[2] == '1'); /* file rss */
486 assert(buf[6] == '1'); /* ELF executable segments */
504 if (fd == -1)
505 return 1;
507 /* CASE 1: exact MATCH at VADDR */
533 assert(q.vma_name_size == strlen(exp_path_buf) + 1);
536 /* CASE 2: NO MATCH at VADDR-1 */
539 q.query_addr = VADDR - 1;
546 /* CASE 3: MATCH COVERING_OR_NEXT_VMA at VADDR - 1 */
549 q.query_addr = VADDR - 1;
555 assert(q.query_addr == VADDR - 1);