Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a52bcdb8 authored by Haitao Shan's avatar Haitao Shan
Browse files

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: default avatarHaitao Shan <hshan@google.com>
parent dea54268
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment