ANDROID: Setting up GS before calling __restore_processor_state.
Android Common Kernel compiled by clang with Shadow Call Stack will
use GS segment. However, __restore_processor_state is called when
system wakes up from S3 and at the moment GS is not restored yet.
This is a hack by copying a small code snippet(setting gs base) from
__restore_processor_state to restore_processor_state. It prepares GS
before __restore_processor_state is called. At the same time,
restore_processor_state is still small enough so that SCS is not on,
as SCS seems to be on only for large functions.
Bug: 166163480
Change-Id: I3bfe4ac61dee876da57de6578c9a7f01431a1743
Signed-off-by:
Haitao Shan <hshan@google.com>
Loading
Please register or sign in to comment