summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorTimothy Sham <tsham@codeaurora.org>2018-05-28 17:17:41 -0400
committerTimothy Sham <tsham@codeaurora.org>2018-06-01 13:35:21 -0400
commit49662914af86d4b7ef721a87c07f1dbff8c96387 (patch)
tree7cc696579a1684d70900f204db3f58b9a437b661 /include/uapi/linux
parent5cb5749cd7fc25ad09fce7ce083aeb38e2a42fe5 (diff)
soc: msm: add size check to fix out of bounds on ANC
Before calling audio ANC ioctl functions, compare the allocated buffer size to the size of the header and ANC cmd header to ensure the buffer is big enough. Change-Id: I8fcd0a830853d802bbb11fc243a4d392fbe384f3 Signed-off-by: Timothy Sham <tsham@codeaurora.org>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/msm_audio_anc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/uapi/linux/msm_audio_anc.h b/include/uapi/linux/msm_audio_anc.h
index 028d381bc1a6..d628f7ce9267 100644
--- a/include/uapi/linux/msm_audio_anc.h
+++ b/include/uapi/linux/msm_audio_anc.h
@@ -16,6 +16,7 @@
#define ANC_CMD_RPM 2
#define ANC_CMD_BYPASS_MODE 3
#define ANC_CMD_ALGO_MODULE 4
+#define ANC_CMD_ALGO_CALIBRATION 5
/* room for ANC_CMD define extend */
#define ANC_CMD_MAX 0xFF
@@ -39,10 +40,16 @@ struct audio_anc_algo_module_info {
int32_t module_id;
};
+struct audio_anc_algo_calibration_info {
+ int32_t payload_size;
+ /* num bytes of payload specificed in payload_size followed */
+};
+
union audio_anc_data {
struct audio_anc_rpm_info rpm_info;
struct audio_anc_bypass_mode bypass_mode_info;
struct audio_anc_algo_module_info algo_info;
+ struct audio_anc_algo_calibration_info algo_cali_info;
};
struct audio_anc_packet {