#
edd438b8 |
|
11-Oct-2017 |
Mark Seaborn <mseaborn@google.com> |
[kernel][x86] Implement startup-time code patching for SMAP instructions Add a macro, APPLY_CODE_PATCH_FUNC(), which allocates some placeholder instructions and declares how to replace them with working code on kernel startup. The initial use case is filling out the STAC and CLAC instructions conditionally depending on whether the CPU supports SMAP. The mechanism is a little more general than this initial use case requires. My intention is the mechanism will be usable for inline assembly that can get inlined into multiple places. Change-Id: I213504db574f58c2d093d2648771c03048775c09
|