Lines Matching refs:lam

74 	unsigned long lam;
145 static int set_lam(unsigned long lam)
150 if (lam != LAM_U57_BITS && lam != LAM_NONE)
154 syscall(SYS_arch_prctl, ARCH_ENABLE_TAGGED_ADDR, lam);
160 if (lam == LAM_U57_BITS)
162 else if (lam == LAM_NONE)
171 int lam = LAM_NONE;
180 lam = LAM_U57_BITS;
182 lam = LAM_NONE;
183 exit(lam);
186 lam = WEXITSTATUS(ret);
189 return lam;
215 static uint64_t set_metadata(uint64_t src, unsigned long lam)
221 switch (lam) {
243 static int handle_lam_test(void *src, unsigned int lam)
249 ptr = (char *)set_metadata((uint64_t)src, lam);
276 * Test lam feature through dereference pointer get from malloc.
284 if (test->later == 0 && test->lam != 0)
285 if (set_lam(test->lam) == -1)
297 ret = handle_lam_test(ptr, test->lam);
302 if (test->later != 0 && test->lam != 0)
303 if (set_lam(test->lam) == -1 && ret == 0)
317 if (test->later == 0 && test->lam != 0)
318 if (set_lam(test->lam) != 0)
330 if (test->later != 0 && test->lam != 0)
331 if (set_lam(test->lam) != 0)
337 ret = handle_lam_test(ptr, test->lam);
352 if (test->later == 0 && test->lam != 0)
353 if (set_lam(test->lam) != 0)
358 pu = (struct utsname *)set_metadata((uint64_t)&unme, test->lam);
366 if (test->later != 0 && test->lam != 0)
367 if (set_lam(test->lam) != -1 && ret == 0)
505 int handle_uring_sq(struct io_ring *ring, struct file_io *fi, unsigned long lam)
527 fi->iovecs[cur_block].iov_base = (void *)set_metadata((uint64_t)buf, lam);
567 int do_uring(unsigned long lam)
607 if (handle_uring_sq(ring, fi, lam))
619 switch (lam) {
638 if (test->later == 0 && test->lam != 0)
639 if (set_lam(test->lam) != 0)
644 ret = do_uring(test->lam);
675 int lam = test->lam;
686 if (set_lam(lam) != 0)
711 int lam = test->lam;
715 if (set_lam(lam) != 0)
731 if (lam != ret)
747 return set_lam(test->lam);
754 int lam = 0;
759 lam = test->lam;
760 if (set_lam(lam) != 0)
774 if (lam != ret)
778 if (set_lam(test->lam) != 0)
789 int lam = test->lam;
802 if (lam != ret)
836 .lam = LAM_U57_BITS,
843 .lam = LAM_U57_BITS,
852 .lam = LAM_U57_BITS,
859 .lam = LAM_U57_BITS,
875 .lam = LAM_U57_BITS,
882 .lam = LAM_U57_BITS,
892 .lam = LAM_U57_BITS,
900 .lam = LAM_U57_BITS,
908 .lam = LAM_U57_BITS,
918 .lam = LAM_U57_BITS,
924 .lam = LAM_U57_BITS,
930 .lam = LAM_U57_BITS,
937 .lam = LAM_U57_BITS,
943 .lam = LAM_U57_BITS,
951 printf("usage: lam [-h] [-t test list]\n");
1093 /* run set lam mode*/
1209 * the option used by test case(execve) to check the lam mode in
1210 * process generated by execve, the process read back lam mode and
1211 * check with lam mode in parent process.