From c00f729b3887e121ea80d2858b32949e7f9023f9 Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Tue, 3 Aug 2021 14:34:03 +0200 Subject: [PATCH] msm: adsprpc: add stub for FASTRPC_IOCTL_CONTROL An STS test checks for this ioctl and fails if it is not implemented in the kernel, so just add a stub for it so that the tests passes. Issue: SEC-1837 Issue: SEC-2373 Test: run sts-engbuild-no-spl-lock -m StsHostTestCases -t android.security.sts.Poc19_04#testPocCVE_2018_11967 Change-Id: I8a025c10cf1028294f305868f861d25f4856e3ea --- drivers/char/adsprpc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index 56b496d1598..858b1125935 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -1462,6 +1462,11 @@ static long fastrpc_device_ioctl(struct file *file, unsigned int ioctl_num, break; } break; + // Handle FASTRPC_IOCTL_CONTROL so a STS test passes, we don't have most functionality of this driver in 3.4 + // #define FASTRPC_IOCTL_CONTROL _IOWR('R', 12, struct fastrpc_ioctl_control) + case _IOC(_IOC_READ|_IOC_WRITE, 'R', 12, 12): + pr_info("adsprpc: FASTRPC_IOCTL_CONTROL is a stub!\n"); + break; default: err = -ENOTTY; break;