Bug 218587

Summary: optee/fTPM access to RPMB via tee-supplicant broken in 6.6.13 compared to 6.5.10
Product: Drivers Reporter: Mikko Rapeli (Linaro) (mikko.rapeli)
Component: MMC/SDAssignee: drivers_mmc-sd
Status: RESOLVED CODE_FIX    
Severity: normal CC: bagasdotme
Priority: P3    
Hardware: ARM   
OS: Linux   
Kernel Version: 6.6.20 Subsystem:
Regression: Yes Bisected commit-id: 1653a8102868264f3488c298a9f20af2add9a288

Description Mikko Rapeli (Linaro) 2024-03-11 13:31:05 UTC
Firmware TPM device (fTPM) use of RPMB storage via optee tee-supplicant client is broken in 6.6.13 compared to 6.5.10 kernel.

Commit which breaks this is in MMC core:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1653a8102868264f3488c298a9f20af2add9a288

mmc: core: Use mrq.sbc in close-ended ffu
commit 4d0c8d0aef6355660b6775d57ccd5d4ea2e15802 upstream.

Field Firmware Update (ffu) may use close-ended or open ended sequence.
Each such sequence is comprised of a write commands enclosed between 2
switch commands - to and from ffu mode. So for the close-ended case, it
will be: cmd6->cmd23-cmd25-cmd6.

Some host controllers however, get confused when multi-block rw is sent
without sbc, and may generate auto-cmd12 which breaks the ffu sequence.
I encountered  this issue while testing fwupd (github.com/fwupd/fwupd)
on HP Chromebook x2, a qualcomm based QC-7c, code name - strongbad.

Instead of a quirk, or hooking the request function of the msm ops,
it would be better to fix the ioctl handling and make it use mrq.sbc
instead of issuing SET_BLOCK_COUNT separately.

Signed-off-by: Avri Altman <avri.altman@wdc.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20231129092535.3278-1-avri.altman@wdc.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

If this change is reverted, then RPMB access works. This error path also triggered a kernel crash reported and fixed via https://bugzilla.kernel.org/show_bug.cgi?id=218542

In failure case optee side fTPM Trusted Application (TA) panics because secure storage operation fails. This happens right after loading kernel side fTPM module.

Here an example from synquacer aarch64 board:

https://ledge.validation.linaro.org/scheduler/job/82680

+ tee-supplicant -d --rpmb-cid 880103534c4436344710565b65a08800
+ sleep 10
+ modprobe tpm_ftpm_tee
E/TC:? 0 
E/TC:? 0 TA panicked with code 0xffff0000
E/LD:  Status of TA bc50d971-d4c9-42c4-82cb-343fb7f37896
E/LD:   arch: aarch64
E/LD:  region  0: va 0x40005000 pa 0x3061b000 size 0x002000 flags rw-s (ldelf)
E/LD:  region  1: va 0x40007000 pa 0x3061d000 size 0x008000 flags r-xs (ldelf)
E/LD:  region  2: va 0x4000f000 pa 0x30625000 size 0x001000 flags rw-s (ldelf)
E/LD:  region  3: va 0x40010000 pa 0x30626000 size 0x004000 flags rw-s (ldelf)
E/LD:  region  4: va 0x40014000 pa 0x3062a000 size 0x001000 flags r--s
E/LD:  region  5: va 0x40015000 pa 0x306b2000 size 0x011000 flags rw-s (stack)
E/LD:  region  6: va 0x40026000 pa 0xe6ac0000 size 0x002000 flags rw-- (param)
E/LD:  region  7: va 0x4005f000 pa 0x00001000 size 0x068000 flags r-xs [0]
E/LD:  region  8: va 0x400c7000 pa 0x00069000 size 0x01f000 flags rw-s [0]
E/LD:   [0] bc50d971-d4c9-42c4-82cb-343fb7f37896 @ 0x4005f000
E/LD:  Call stack:
E/LD:   0x4009d01c
E/LD:   0x4005fb40
E/LD:   0x400601b8
E/LD:   0x4007ef3c
E/LD:   0x40097fc0
E/LD:   0x40060a2c
E/LD:   0x400a31f4
E/LD:   0x40098170
[   15.831833] tpm tpm0: ftpm_tee_tpm_op_send: SUBMIT_COMMAND invoke error: 0xffff3024
[   15.832524] tpm tpm0: tpm_try_transmit: send(): error -53212
[   15.833058] tpm tpm0: ftpm_tee_tpm_op_send: SUBMIT_COMMAND invoke error: 0xffff3024
[   15.833732] tpm tpm0: tpm_try_transmit: send(): error -53212
[   15.834233] optee-ftpm optee-ta-bc50d971-d4c9-42c4-82cb-343fb7f37896: ftpm_tee_probe: tpm_chip_register failed with rc=-53212
[   15.835289] optee-ftpm: probe of optee-ta-bc50d971-d4c9-42c4-82cb-343fb7f37896 failed with error -53212

strace logging of tee-supplicant shows following ioctl()s being called on rockpi4b arm64 board:

https://ledge.validation.linaro.org/scheduler/job/82872

+ strace -f -s 999 -t /usr/sbin/tee-supplicant --rpmb-cid 880103534c4436344710565b65a08800
00:00:04 execve("/usr/sbin/tee-supplicant", ["/usr/sbin/tee-supplicant", "--rpmb-cid", "880103534c4436344710565b65a08800"], 0xffffce0953c0 /* 6 vars */) = 0
00:00:04 brk(NULL)                      = 0xaaaac5a08000
00:00:04 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffffbabab000
00:00:04 faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
00:00:04 openat(AT_FDCWD, "/usr/lib/tee-supplicant/plugins/libteec.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
00:00:04 newfstatat(AT_FDCWD, "/usr/lib/tee-supplicant/plugins/", 0xffffc127f3c0, 0) = -1 ENOENT (No such file or directory)
00:00:04 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
00:00:04 fstat(3, {st_mode=S_IFREG|0644, st_size=6299, ...}) = 0
00:00:04 mmap(NULL, 6299, PROT_READ, MAP_PRIVATE, 3, 0) = 0xffffbaba9000
00:00:04 close(3)                       = 0
00:00:04 openat(AT_FDCWD, "/lib/libteec.so.1", O_RDONLY|O_CLOEXEC) = 3
00:00:04 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0 \1\1\0\0\0\0\0\0\0\0\0@\08\0\t\0@\0\32\0\31\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\250+\0\0\0\0\0\0\250+\0\0\0\0\0\0\0\0\1\0\0\0\0\0\1\0\0\0\6\0\0\0\200\374\0\0\0\0\0\0\200\374\1\0\0\0\0\0\200\374\1\0\0\0\0\0\210\3\0\0\0\0\0\0\300\3\0\0\0\0\0\0\0\0\1\0\0\0\0\0\2\0\0\0\6\0\0\0\270\374\0\0\0\0\0\0\270\374\1\0\0\0\0\0\270\374\1\0\0\0\0\0\20\2\0\0\0\0\0\0\20\2\0\0\0\0\0\0\10\0\0\0\0\0\0\0\4\0\0\0\4\0\0\08\2\0\0\0\0\0\08\2\0\0\0\0\0\08\2\0\0\0\0\0\0 \0\0\0\0\0\0\0 \0\0\0\0\0\0\0\10\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0X\2\0\0\0\0\0\0X\2\0\0\0\0\0\0X\2\0\0\0\0\0\0$\0\0\0\0\0\0\0$\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0S\345td\4\0\0\08\2\0\0\0\0\0\08\2\0\0\0\0\0\08\2\0\0\0\0\0\0 \0\0\0\0\0\0\0 \0\0\0\0\0\0\0\10\0\0\0\0\0\0\0P\345td\4\0\0\0\234&\0\0\0\0\0\0\234&\0\0\0\0\0\0\234&\0\0\0\0\0\0\234\0\0\0\0\0\0\0\234\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0Q\345td\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0R\345td\4\0\0\0\200\374\0\0\0\0\0\0\200\374\1\0\0\0\0\0\200\374\1\0\0\0\0\0\200\3\0\0\0\0\0\0\200\3\0\0\0\0\0\0\1\0\0\0\0\0\0\0\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\0\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\316\324\4\243\\l\273\215\253Q1TG\233\31c\21\215\272u\0\0\0\0\24\0\0\0\37\0\0\0\2\0\0\0\7\0\0\0  \0\n\0\0\0\0@\0\300\10\0\0\31\337\37\0\0\0\0\0\0\0 \0\0\0!\0\0\0\"\0\0\0#\0\0\0\0\0\0\0$\0\0\0&\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'\0\0\0\0\0\0\0(\0\0\0)\0\0\0\0\0\0\0\0\0\0\0*\0\0\0\0\0\0\0\3759\303Q{\234:\347\373\315\7\346\361\255\323\17\231FFa\376\34\300/\333+mG\375\377S\337u#3P\373\253s\325\233B\265\370W\237g\264\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\n\0", 832) = 832
00:00:04 fstat(3, {st_mode=S_IFREG|0755, st_size=67488, ...}) = 0
00:00:04 mmap(NULL, 196672, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0xffffbab41000
00:00:04 mmap(0xffffbab50000, 131136, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0xffffbab50000
00:00:04 munmap(0xffffbab41000, 61440)  = 0
00:00:04 munmap(0xffffbab71000, 64)     = 0
00:00:04 mprotect(0xffffbab53000, 114688, PROT_NONE) = 0
00:00:04 mmap(0xffffbab6f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0xffffbab6f000
00:00:04 close(3)                       = 0
00:00:04 openat(AT_FDCWD, "/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
00:00:04 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300\206\2\0\0\0\0\0@\0\0\0\0\0\0\0\10\"\31\0\0\0\0\0\0\0\0\0@\08\0\f\0@\0<\0;\0\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\240\2\0\0\0\0\0\0\240\2\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0\300|\25\0\0\0\0\0\300|\25\0\0\0\0\0\300|\25\0\0\0\0\0\37\0\0\0\0\0\0\0\37\0\0\0\0\0\0\0\10\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\366\257\30\0\0\0\0\0\366\257\30\0\0\0\0\0\0\0\1\0\0\0\0\0\1\0\0\0\6\0\0\0\340\320\30\0\0\0\0\0\340\320\31\0\0\0\0\0\340\320\31\0\0\0\0\0(E\0\0\0\0\0\0p\16\1\0\0\0\0\0\0\0\1\0\0\0\0\0\2\0\0\0\6\0\0\0\340\372\30\0\0\0\0\0\340\372\31\0\0\0\0\0\340\372\31\0\0\0\0\0\340\1\0\0\0\0\0\0\340\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\340\2\0\0\0\0\0\0\340\2\0\0\0\0\0\0\340\2\0\0\0\0\0\0 \0\0\0\0\0\0\0 \0\0\0\0\0\0\0\10\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0\3\0\0\0\0\0\0\0\3\0\0\0\0\0\0\0\3\0\0\0\0\0\0D\0\0\0\0\0\0\0D\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0\7\0\0\0\4\0\0\0\340\320\30\0\0\0\0\0\340\320\31\0\0\0\0\0\340\320\31\0\0\0\0\0\20\0\0\0\0\0\0\0\210\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0S\345td\4\0\0\0\340\2\0\0\0\0\0\0\340\2\0\0\0\0\0\0\340\2\0\0\0\0\0\0 \0\0\0\0\0\0\0 \0\0\0\0\0\0\0\10\0\0\0\0\0\0\0P\345td\4\0\0\0\340|\25\0\0\0\0\0\340|\25\0\0\0\0\0\340|\25\0\0\0\0\0\334l\0\0\0\0\0\0\334l\0\0\0\0\0\0\4\0\0\0\0\0\0\0Q\345td\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0R\345td\4\0\0\0\340\320\30\0\0\0\0\0\340\320\31\0\0\0\0\0\340\320\31\0\0\0\0\0 /\0\0\0\0\0\0 /\0\0\0\0\0\0\1\0\0\0\0\0\0\0\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\0\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\16\321\234\23\363@\327\21\342\211/\"\272\242\3\235\251\21\231\300\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\5\0\0\0\17\0\0\0", 832) = 832
00:00:04 fstat(3, {st_mode=S_IFREG|0755, st_size=1650952, ...}) = 0
00:00:04 mmap(NULL, 1826640, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0xffffba992000
00:00:04 mmap(0xffffba9a0000, 1761104, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0xffffba9a0000
00:00:04 munmap(0xffffba992000, 57344)  = 0
00:00:04 munmap(0xffffbab4e000, 8016)   = 0
00:00:04 mprotect(0xffffbab2b000, 73728, PROT_NONE) = 0
00:00:04 mmap(0xffffbab3d000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18d000) = 0xffffbab3d000
00:00:04 mmap(0xffffbab42000, 48976, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffffbab42000
00:00:04 close(3)                       = 0
00:00:04 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffffbaba7000
00:00:04 set_tid_address(0xffffbaba70f0) = 159
00:00:04 set_robust_list(0xffffbaba7100, 24) = 0
00:00:04 rseq(0xffffbaba7740, 0x20, 0, 0xd428bc00) = 0
00:00:04 mprotect(0xffffbab3d000, 12288, PROT_READ) = 0
00:00:04 mprotect(0xffffbab6f000, 4096, PROT_READ) = 0
00:00:04 mprotect(0xaaaab032f000, 4096, PROT_READ) = 0
00:00:04 mprotect(0xffffbabb0000, 8192, PROT_READ) = 0
00:00:04 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
00:00:04 munmap(0xffffbaba9000, 6299)   = 0
00:00:04 getrandom("\x45\x61\xf7\xa9\xcb\xf9\x99\x5a", 8, GRND_NONBLOCK) = 8
00:00:04 brk(NULL)                      = 0xaaaac5a08000
00:00:04 brk(0xaaaac5a29000)            = 0xaaaac5a29000
00:00:04 openat(AT_FDCWD, "/usr/lib/tee-supplicant/plugins/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
00:00:04 openat(AT_FDCWD, "/dev/teepriv0", O_RDWR) = 3
00:00:04 ioctl(3, TEE_IOC_VERSION, {impl_id=TEE_IMPL_ID_OPTEE, gen_caps=TEE_GEN_CAP_GP|TEE_GEN_CAP_PRIVILEGED|TEE_GEN_CAP_REG_MEM|TEE_GEN_CAP_MEMREF_NULL, impl_caps=TEE_OPTEE_CAP_TZ}) = 0
00:00:04 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]}+ modprobe tpm_ftpm_tee
 => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0}]}}) = 0
00:00:15 rt_sigaction(SIGRT_1, {sa_handler=0xffffbaa1e330, sa_mask=[], sa_flags=SA_ONSTACK|SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
00:00:15 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
00:00:15 mmap(NULL, 8454144, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0xffffba190000
00:00:15 mprotect(0xffffba1a0000, 8388608, PROT_READ|PROT_WRITE) = 0
00:00:15 rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
00:00:15 clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, child_tid=0xffffba99f270, parent_tid=0xffffba99f270, exit_signal=0, stack=0xffffba190000, stack_size=0x80ea60, tls=0xffffba99f8e0} => {parent_tid=[162]}, 88) = 162
strace: Process 162 attached
[pid   159] 00:00:15 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
[pid   162] 00:00:15 rseq(0xffffba99f8c0, 0x20, 0, 0xd428bc00 <unfinished ...>
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SHM_REGISTER, {addr=0xaaaac5a09000, length=0x208, flags=0} <unfinished ...>
[pid   162] 00:00:15 <... rseq resumed>) = 0
[pid   159] 00:00:15 <... ioctl resumed> => {length=0x208, flags=0, id=1}) = 4
[pid   162] 00:00:15 set_robust_list(0xffffba99f280, 24 <unfinished ...>
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0x1}]} <unfinished ...>
[pid   162] 00:00:15 <... set_robust_list resumed>) = 0
[pid   159] 00:00:15 <... ioctl resumed> => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0x1}]}}) = 0
[pid   162] 00:00:15 rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   162] 00:00:15 <... rt_sigprocmask resumed>NULL, 8) = 0
[pid   159] 00:00:15 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x600, c=0}]}}) = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SHM_REGISTER, {addr=0xaaaac5a0a000, length=0x600, flags=0} => {length=0x600, flags=0, id=2}) = 5
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x600, c=0x2}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x600, c=0x2}]}}) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   162] 00:00:15 <... ioctl resumed> => {num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x600, shm_id=2}]}}) = 0
[pid   162] 00:00:15 openat(AT_FDCWD, "/sys/class/mmc_host", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 6
[pid   162] 00:00:15 fstat(6, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
[pid   162] 00:00:15 mmap(NULL, 134217728, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffffb2190000
[pid   162] 00:00:15 munmap(0xffffb2190000, 31916032) = 0
[pid   162] 00:00:15 munmap(0xffffb8000000, 35192832) = 0
[pid   162] 00:00:15 mprotect(0xffffb4000000, 135168, PROT_READ|PROT_WRITE) = 0
[pid   162] 00:00:15 getdents64(6, 0xffffb4000ba0 /* 5 entries */, 32768) = 120
[pid   162] 00:00:15 openat(AT_FDCWD, "/sys/class/mmc_host/mmc1/mmc1:0001/cid", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid   162] 00:00:15 openat(AT_FDCWD, "/sys/class/mmc_host/mmc2/mmc2:0001/cid", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid   162] 00:00:15 openat(AT_FDCWD, "/sys/class/mmc_host/mmc0/mmc0:0001/cid", O_RDONLY) = 7
[pid   162] 00:00:15 read(7, "880103534c4436344710565b65a08800", 32) = 32
[pid   162] 00:00:15 close(7)           = 0
[pid   162] 00:00:15 close(6)           = 0
[pid   162] 00:00:15 openat(AT_FDCWD, "/dev/mmcblk0rpmb", O_RDWR) = 6
[pid   162] 00:00:15 ioctl(6, MMC_IOC_MULTI_CMD, 0xffffb4000b70) = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=104, buf_ptr={num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x600, shm_id=2}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x600, shm_id=2}]}}) = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   159] 00:00:15 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]}}) = 0
[pid   159] 00:00:15 close(4)           = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]}}) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   162] 00:00:15 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]}}) = 0
[pid   162] 00:00:15 close(5)           = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]}}) = 0
[pid   159] 00:00:15 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0}]}}) = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SHM_REGISTER, {addr=0xaaaac5a09000, length=0x208, flags=0} => {length=0x208, flags=0, id=1}) = 4
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0x1}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0x1}]}}) = 0
[pid   162] 00:00:15 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x600, c=0}]}}) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SHM_REGISTER, {addr=0xffffb4001000, length=0x600, flags=0} => {length=0x600, flags=0, id=2}) = 5
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x600, c=0x2}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x600, c=0x2}]}}) = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   159] 00:00:15 <... ioctl resumed> => {num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x600, shm_id=2}]}}) = 0
[pid   159] 00:00:15 ioctl(6, MMC_IOC_MULTI_CMD, 0xaaaac5a084b0) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=104, buf_ptr={num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x600, shm_id=2}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x600, shm_id=2}]}}) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]}}) = 0
[pid   159] 00:00:15 close(4)           = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]}}) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   162] 00:00:15 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]}}) = 0
[pid   162] 00:00:15 close(5)           = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]}}) = 0
[pid   159] 00:00:15 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0}]}}) = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SHM_REGISTER, {addr=0xaaaac5a09000, length=0x208, flags=0} => {length=0x208, flags=0, id=1}) = 4
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0x1}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0x1}]}}) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   162] 00:00:15 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x200, c=0}]}}) = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SHM_REGISTER, {addr=0xffffb4001000, length=0x200, flags=0} => {length=0x200, flags=0, id=2}) = 5
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x200, c=0x2}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x200, c=0x2}]}}) = 0
[pid   159] 00:00:15 <... ioctl resumed> => {num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x200, shm_id=2}]}}) = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   159] 00:00:15 ioctl(6, MMC_IOC_MULTI_CMD, 0xaaaac5a085d0) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=104, buf_ptr={num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x200, shm_id=2}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x200, shm_id=2}]}}) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   162] 00:00:15 <... ioctl resumed> => {num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x200, shm_id=2}]}}) = 0
[pid   162] 00:00:15 ioctl(6, MMC_IOC_MULTI_CMD, 0xffffb4000cc0) = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=104, buf_ptr={num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x200, shm_id=2}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x200, shm_id=2}]}}) = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   159] 00:00:15 <... ioctl resumed> => {num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x200, shm_id=2}]}}) = 0
[pid   159] 00:00:15 ioctl(6, MMC_IOC_MULTI_CMD, 0xaaaac5a086c0) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=104, buf_ptr={num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x200, shm_id=2}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x200, shm_id=2}]}}) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]}}) = 0
[pid   159] 00:00:15 close(4)           = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]}}) = 0
[pid   162] 00:00:15 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]}}) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   162] 00:00:15 close(5)           = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]}}) = 0
[pid   159] 00:00:15 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0}]}}) = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SHM_REGISTER, {addr=0xaaaac5a09000, length=0x208, flags=0} => {length=0x208, flags=0, id=1}) = 4
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0x1}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0x1}]}}) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   162] 00:00:15 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x200, c=0}]}}) = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SHM_REGISTER, {addr=0xffffb4001000, length=0x200, flags=0} => {length=0x200, flags=0, id=2}) = 5
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x200, c=0x2}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x200, c=0x2}]}}) = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   159] 00:00:15 <... ioctl resumed> => {num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x200, shm_id=2}]}}) = 0
[pid   159] 00:00:15 ioctl(6, MMC_IOC_MULTI_CMD, 0xaaaac5a087e0) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=104, buf_ptr={num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x200, shm_id=2}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x200, shm_id=2}]}}) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]}}) = 0
[pid   159] 00:00:15 close(4)           = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]}}) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   162] 00:00:15 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]}}) = 0
[pid   162] 00:00:15 close(5)           = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]}}) = 0
[pid   159] 00:00:15 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0}]}}) = 0
[pid   162] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SHM_REGISTER, {addr=0xaaaac5a09000, length=0x208, flags=0} => {length=0x208, flags=0, id=1}) = 4
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0x1}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0x1}]}}) = 0
[pid   162] 00:00:15 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x200, c=0}]}}) = 0
[pid   159] 00:00:15 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   162] 00:00:16 ioctl(3, TEE_IOC_SHM_REGISTER, {addr=0xffffb4001000, length=0x200, flags=0} => {length=0x200, flags=0, id=2}) = 5
[pid   162] 00:00:16 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x200, c=0x2}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x200, c=0x2}]}}) = 0
[pid   162] 00:00:16 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   159] 00:00:16 <... ioctl resumed> => {num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x200, shm_id=2}]}}) = 0
[pid   159] 00:00:16 ioctl(6, MMC_IOC_MULTI_CMD, 0xaaaac5a08900) = 0
[pid   159] 00:00:16 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=104, buf_ptr={num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x200, shm_id=2}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x200, shm_id=2}]}}) = 0
[pid   159] 00:00:16 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   162] 00:00:16 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]}}) = 0
[pid   162] 00:00:16 close(4)           = 0
[pid   162] 00:00:16 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]}}) = 0
[pid   159] 00:00:16 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]}}) = 0
[pid   162] 00:00:16 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   159] 00:00:16 close(5)           = 0
[pid   159] 00:00:16 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]}}) = 0
[pid   159] 00:00:16 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]}+ rngd
++ pidof rngd
+ RNGD_PID=165
+ '[' -c /dev/tpm0 ']'
+ mkdir -p /run/dbus
+ dbus-daemon --system
+ DBUS_PID=144
+ ABRMD_PID=170
+ tpm2_dictionarylockout -c
+ tpm2-abrmd --allow-root
 <unfinished ...>
[pid   162] 00:00:16 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0}]}}) = 0
[pid   162] 00:00:16 ioctl(3, TEE_IOC_SHM_REGISTER, {addr=0xaaaac5a09000, length=0x208, flags=0} => {length=0x208, flags=0, id=1}) = 4
[pid   162] 00:00:16 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0x1}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x208, c=0x1}]}}) = 0
[pid   159] 00:00:16 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x600, c=0}]}}) = 0
[pid   162] 00:00:16 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   159] 00:00:16 ioctl(3, TEE_IOC_SHM_REGISTER, {addr=0xaaaac5a0a000, length=0x600, flags=0} => {length=0x600, flags=0, id=2}) = 5
[pid   159] 00:00:16 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x600, c=0x2}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x600, c=0x2}]}}) = 0
[pid   159] 00:00:16 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   162] 00:00:16 <... ioctl resumed> => {num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x600, shm_id=2}]}}) = 0
[pid   162] 00:00:16 ioctl(6, MMC_IOC_MULTI_CMD, 0xffffb4000e40) = 0
[pid   162] 00:00:16 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=104, buf_ptr={num_params=3, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x600, shm_id=2}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT, shm_offs=0, size=0x206, shm_id=1}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT, shm_offs=0, size=0x600, shm_id=2}]}}) = 0
[pid   159] 00:00:16 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]}}) = 0
[pid   162] 00:00:16 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   159] 00:00:16 close(4)           = 0
[pid   159] 00:00:16 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x1, c=0}]}}) = 0
[pid   162] 00:00:16 <... ioctl resumed> => {num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]}}) = 0
[pid   159] 00:00:16 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]} <unfinished ...>
[pid   162] 00:00:16 close(5)           = 0
[pid   162] 00:00:16 ioctl(3, TEE_IOC_SUPPL_SEND, {buf_len=72, buf_ptr={num_params=2, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]} => {ret=0, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT|TEE_IOCTL_PARAM_ATTR_META, a=0x1, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT, a=0, b=0x2, c=0}]}}) = 0
[pid   162] 00:00:16 ioctl(3, TEE_IOC_SUPPL_RECV, {buf_len=168, buf_ptr={func=0, num_params=5, params=[{attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE|TEE_IOCTL_PARAM_ATTR_META, a=0, b=0, c=0}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}, {attr=TEE_IOCTL_PARAM_ATTR_TYPE_NONE}]}E/TC:? 0 
E/TC:? 0 TA panicked with code 0xffff0000
E/LD:  Status of TA bc50d971-d4c9-42c4-82cb-343fb7f37896
E/LD:   arch: aarch64
E/LD:  region  0: va 0x40005000 pa 0x3061b000 size 0x002000 flags rw-s (ldelf)
E/LD:  region  1: va 0x40007000 pa 0x3061d000 size 0x008000 flags r-xs (ldelf)
E/LD:  region  2: va 0x4000f000 pa 0x30625000 size 0x001000 flags rw-s (ldelf)
E/LD:  region  3: va 0x40010000 pa 0x30626000 size 0x004000 flags rw-s (ldelf)
E/LD:  region  4: va 0x40014000 pa 0x3062a000 size 0x001000 flags r--s
E/LD:  region  5: va 0x40015000 pa 0x306b2000 size 0x011000 flags rw-s (stack)
E/LD:  region  6: va 0x40026000 pa 0xe6bb4000 size 0x002000 flags rw-- (param)
E/LD:  region  7: va 0x4005b000 pa 0x00001000 size 0x068000 flags r-xs [0]
E/LD:  region  8: va 0x400c3000 pa 0x00069000 size 0x01f000 flags rw-s [0]
E/LD:   [0] bc50d971-d4c9-42c4-82cb-343fb7f37896 @ 0x4005b000
E/LD:  Call stack:
E/LD:   0x4009901c
E/LD:   0x4005bb40
E/LD:   0x4005c1b8
E/LD:   0x4007af3c
E/LD:   0x40093fc0
E/LD:   0x4005ca2c
E/LD:   0x4009f1f4
E/LD:   0x40094170
[   16.187823] tpm tpm0: ftpm_tee_tpm_op_send: SUBMIT_COMMAND invoke error: 0xffff3024
[   16.188548] tpm tpm0: tpm_try_transmit: send(): error -53212

Good working case with stace output and 6.5.10 kernel is available from https://ledge.validation.linaro.org/scheduler/job/82883
Comment 1 Mikko Rapeli (Linaro) 2024-03-12 15:07:42 UTC
Discussion in https://lore.kernel.org/all/20231129092535.3278-1-avri.altman@wdc.com/ refers that multiple threads are calling the RPMB ioctls through a shared file descriptor. Jens Wiklander <jens.wiklander@linaro.org> provided simple patch to optee_client/tee-supplicant to reduce to single userspace thread:

https://github.com/OP-TEE/optee_client

--- a/tee-supplicant/src/tee_supplicant.c
+++ b/tee-supplicant/src/tee_supplicant.c
@@ -588,6 +588,8 @@ static bool spawn_thread(struct thread_arg *arg)
        int e = 0;
        pthread_t tid;
 
+       return true;
+
        memset(&tid, 0, sizeof(tid));
 
        DMSG("Spawning a new thread");

This does not fix or work around the issue.
Comment 2 Bagas Sanjaya 2024-03-14 02:39:29 UTC
(In reply to Mikko Rapeli (Linaro) from comment #0)
> Firmware TPM device (fTPM) use of RPMB storage via optee tee-supplicant
> client is broken in 6.6.13 compared to 6.5.10 kernel.
> 
> Commit which breaks this is in MMC core:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/
> ?id=1653a8102868264f3488c298a9f20af2add9a288
> 
> mmc: core: Use mrq.sbc in close-ended ffu
> commit 4d0c8d0aef6355660b6775d57ccd5d4ea2e15802 upstream.
> 

Forwarded to [1].

[1]: https://bugzilla.kernel.org/show_bug.cgi?id=218587
Comment 3 Mikko Rapeli (Linaro) 2024-03-14 06:31:23 UTC
Fix proposal submitted:

https://lore.kernel.org/linux-mmc/20240313133744.2405325-1-mikko.rapeli@linaro.org/
Comment 4 Mikko Rapeli (Linaro) 2024-04-09 09:17:13 UTC
Fixed in master v6.9-rc2 and stable tree tags v6.1.84, v6.6.24, v6.7.12, v6.8.3.