Preserve x18 while calling aptX encoder libraries.
Shadow call stack (SCS) is a security mitigation that uses a separate stack (the SCS) for return addresses. In versions of Android newer than P, the compiler normally cooperates with the system to ensure that the SCS address is always stored in register x18. This requires that everything in a process that uses SCS is built with -ffixed-x18. However, two libraries (libaptX_encoder.so and libaptXHD_encoder.so) are supplied in binary format and were not compiled with -ffixed-x18. We are working with the vendor to get these libraries rebuilt with -ffixed-x18, but until then, we need to prevent this library from clobbering x18 so that we can turn on SCS in the Bluetooth process. Bug: 112907825 Bug: 120621517 Change-Id: Id27829ed5696903c42b4aeb75c3b3880c97a3a36
Loading
Please register or sign in to comment