From 414e6c8e941caae43f7b25f8014c2b5e2100679d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 28 Mar 2022 17:30:06 +0200 Subject: [PATCH] ANDROID: fix up abi issue with struct snd_pcm_runtime A portion of the fix for CVE-2022-1048, commit 0f6947f5f520 ("ALSA: pcm: Fix races among concurrent hw_params and hw_free calls"), caused an ABI break by adding a new field to struct snd_pcm_runtime. Because we have to keep this new addition, it is safe to move it to the end of the structure because this is only ever created by the sound core, and referenced as a pointer everywhere else. This does require a .xml update also to handle the increased structure size: Leaf changes summary: 1 artifact changed Changed leaf types summary: 1 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable 'struct snd_pcm_runtime at pcm.h:344:1' changed: type size changed from 6144 to 6528 (in bits) 1 data member insertion: 'mutex buffer_mutex', at offset 6144 (in bits) at pcm.h:432:1 120 impacted interfaces Bug: 161946584 Fixes: 0f6947f5f520 ("ALSA: pcm: Fix races among concurrent hw_params and hw_free calls") Signed-off-by: Greg Kroah-Hartman Change-Id: I525799616e06c1d2c5513821a3361e99dcb7e553 --- android/abi_gki_aarch64.xml | 974 ++++++++++++++++-------------------- include/sound/pcm.h | 4 +- 2 files changed, 446 insertions(+), 532 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 13e355956e3c..55c8cf0e58db 100755 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -9452,12 +9452,12 @@ - + - + - + @@ -12635,46 +12635,46 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -14557,89 +14557,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -15774,27 +15691,27 @@ - + - + - + - + - + - + - + - + @@ -26566,87 +26483,87 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -42512,30 +42429,30 @@ - + - + - + - + - + - + - + - + - + @@ -42963,18 +42880,18 @@ - + - + - + - + - + @@ -52715,54 +52632,54 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -66458,14 +66375,7 @@ - - - - - - - - + @@ -77774,7 +77684,7 @@ - + @@ -83646,7 +83556,7 @@ - + @@ -83821,6 +83731,9 @@ + + + @@ -91263,7 +91176,6 @@ - @@ -95181,48 +95093,48 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -103654,27 +103566,27 @@ - + - + - + - + - + - + - + - + @@ -110428,45 +110340,45 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -114132,8 +114044,8 @@ - - + + @@ -115076,9 +114988,9 @@ - - - + + + @@ -115087,10 +114999,10 @@ - - - - + + + + @@ -118320,9 +118232,9 @@ - - - + + + @@ -118383,10 +118295,10 @@ - - - - + + + + @@ -118396,8 +118308,8 @@ - - + + @@ -119311,24 +119223,24 @@ - - - - + + + + - - - + + + - - + + - - - + + + @@ -119458,8 +119370,8 @@ - - + + @@ -119827,9 +119739,9 @@ - - - + + + @@ -120401,12 +120313,12 @@ - - + + - - + + @@ -120733,9 +120645,9 @@ - - - + + + @@ -121217,14 +121129,14 @@ - - - + + + - - - + + + @@ -122155,8 +122067,8 @@ - - + + @@ -122331,8 +122243,8 @@ - - + + @@ -123932,8 +123844,8 @@ - - + + @@ -124519,9 +124431,9 @@ - - - + + + @@ -125644,9 +125556,9 @@ - - - + + + @@ -125692,9 +125604,9 @@ - - - + + + @@ -126545,18 +126457,18 @@ - - - + + + - - - + + + - - + + @@ -126569,8 +126481,8 @@ - - + + @@ -126821,8 +126733,8 @@ - - + + @@ -127149,8 +127061,8 @@ - - + + @@ -127188,12 +127100,12 @@ - - - - - - + + + + + + @@ -127655,10 +127567,10 @@ - + - + @@ -127888,9 +127800,9 @@ - - - + + + @@ -127903,18 +127815,18 @@ - - - + + + - - - + + + @@ -127935,41 +127847,41 @@ - - - - + + + + - - + + - - + + - - + + - - - - - + + + + + @@ -127987,9 +127899,9 @@ - - - + + + @@ -127997,9 +127909,9 @@ - - - + + + @@ -129234,12 +129146,12 @@ - - + + - - + + @@ -129272,16 +129184,16 @@ - - + + - - + + - - + + @@ -130048,11 +129960,11 @@ - - - - - + + + + + @@ -130798,8 +130710,8 @@ - - + + @@ -131270,12 +131182,12 @@ - + - - - + + + @@ -132003,12 +131915,12 @@ - - - - - - + + + + + + @@ -132350,13 +132262,13 @@ - - + + - - - + + + @@ -132365,16 +132277,16 @@ - - - - + + + + - - - - + + + + @@ -133403,12 +133315,12 @@ - - + + - - + + @@ -135653,7 +135565,7 @@ - + @@ -135838,8 +135750,8 @@ - - + + @@ -136563,59 +136475,59 @@ - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - - + + @@ -138795,16 +138707,16 @@ - - - - - - - + + + + + + + - + @@ -138896,13 +138808,13 @@ - - - + + + - - + + @@ -138911,29 +138823,29 @@ - - - + + + - - - - - - + + + + + + - - - - - - + + + + + + @@ -138954,16 +138866,16 @@ - - + + - - - - - - + + + + + + @@ -138976,7 +138888,7 @@ - + @@ -139008,16 +138920,16 @@ - - - + + + - - - - - + + + + + @@ -139346,19 +139258,19 @@ - - - + + + - - - + + + - - - + + + @@ -139376,9 +139288,9 @@ - - - + + + @@ -139386,9 +139298,9 @@ - - - + + + @@ -139408,10 +139320,10 @@ - - - - + + + + @@ -139509,19 +139421,19 @@ - - - + + + - - - + + + - - - + + + @@ -140756,12 +140668,12 @@ - - + + - - + + @@ -140774,8 +140686,8 @@ - - + + @@ -140804,8 +140716,8 @@ - - + + @@ -140890,7 +140802,7 @@ - + @@ -141882,8 +141794,8 @@ - - + + @@ -144111,7 +144023,7 @@ - + @@ -144261,13 +144173,13 @@ - - - + + + - - + + @@ -144335,7 +144247,7 @@ - + @@ -144522,13 +144434,13 @@ - + - - - - + + + + @@ -144592,15 +144504,15 @@ - - - - + + + + - - - + + + @@ -144624,19 +144536,19 @@ - - - + + + - - - - + + + + @@ -144649,9 +144561,9 @@ - - - + + + @@ -144673,9 +144585,9 @@ - - - + + + @@ -144698,9 +144610,9 @@ - - - + + + @@ -144750,8 +144662,8 @@ - - + + diff --git a/include/sound/pcm.h b/include/sound/pcm.h index ab966563e852..7bc7581788ed 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -398,7 +398,6 @@ struct snd_pcm_runtime { wait_queue_head_t tsleep; /* transfer sleep */ struct fasync_struct *fasync; bool stop_operating; /* sync_stop will be called */ - struct mutex buffer_mutex; /* protect for buffer changes */ /* -- private section -- */ void *private_data; @@ -429,6 +428,9 @@ struct snd_pcm_runtime { /* -- OSS things -- */ struct snd_pcm_oss_runtime oss; #endif +#ifndef __GENKSYMS__ + struct mutex buffer_mutex; /* protect for buffer changes */ +#endif }; struct snd_pcm_group { /* keep linked substreams */