[PATCH] tests: tee: remove usage of flags TEE_IOCTL_SHM_{MAPPED, DMA_BUF}

Andrew Davis afd at ti.com
Wed Jun 8 22:30:31 UTC 2022


These were not valid and have been removed in kernel d8fc1c7c4c9b7
(for 5.19). Remove usage of these flags.

Signed-off-by: Andrew Davis <afd at ti.com>
---
 src/xlat/tee_ioctl_shm_flags.in |  2 +-
 tests/ioctl_tee.c               | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/xlat/tee_ioctl_shm_flags.in b/src/xlat/tee_ioctl_shm_flags.in
index 881044b9d..2a1317498 100644
--- a/src/xlat/tee_ioctl_shm_flags.in
+++ b/src/xlat/tee_ioctl_shm_flags.in
@@ -1,6 +1,6 @@
+/* These ones aren't in uapi */
 TEE_IOCTL_SHM_MAPPED		0x1
 TEE_IOCTL_SHM_DMA_BUF		0x2
-/* These ones aren't in uapi */
 TEE_IOCTL_SHM_EXT_DMA_BUF	0x4
 TEE_IOCTL_SHM_REGISTER		0x8
 TEE_IOCTL_SHM_USER_MAPPED	0x10
diff --git a/tests/ioctl_tee.c b/tests/ioctl_tee.c
index 13ab23f97..317e4f74f 100644
--- a/tests/ioctl_tee.c
+++ b/tests/ioctl_tee.c
@@ -176,27 +176,27 @@ main(void)
 	       (uint32_t) red_beef);
 
 	shm_alloc.size = one_beef;
-	shm_alloc.flags = TEE_IOCTL_SHM_MAPPED | TEE_IOCTL_SHM_DMA_BUF | 0x80;
+	shm_alloc.flags = 0x80;
 	ioctl(-1, TEE_IOC_SHM_ALLOC, &shm_alloc);
 	printf("ioctl(-1, TEE_IOC_SHM_ALLOC, {size=%#llx, "
-	       "flags=TEE_IOCTL_SHM_MAPPED|TEE_IOCTL_SHM_DMA_BUF|0x80})" RVAL_EBADF,
+	       "flags=0x80})" RVAL_EBADF,
 	       (unsigned long long) one_beef);
 
 	shm_register.addr = red_beef;
 	shm_register.length = blu_beef;
-	shm_register.flags = TEE_IOCTL_SHM_MAPPED | 0x80;
+	shm_register.flags = 0x80;
 	ioctl(-1, TEE_IOC_SHM_REGISTER, &shm_register);
 	printf("ioctl(-1, TEE_IOC_SHM_REGISTER, {addr=%#llx, length=%#llx, "
-	       "flags=TEE_IOCTL_SHM_MAPPED|0x80})" RVAL_EBADF,
+	       "flags=0x80})" RVAL_EBADF,
 	       (unsigned long long) red_beef,
 	       (unsigned long long) blu_beef);
 
 	if (fd >= 0) {
 		shm_register_fd.fd = fd;
-		shm_register_fd.flags = TEE_IOCTL_SHM_DMA_BUF;
+		shm_register_fd.flags = 0x0;
 		ioctl(-1, TEE_IOC_SHM_REGISTER_FD, &shm_register_fd);
 		printf("ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0xa4, 0x8, 0x20), "
-		       "{fd=%d, flags=TEE_IOCTL_SHM_DMA_BUF})" RVAL_EBADF, fd);
+		       "{fd=%d})" RVAL_EBADF, fd);
 	}
 
 	/* Beef in buf_data */
-- 
2.36.1



More information about the Strace-devel mailing list