aboutsummaryrefslogtreecommitdiff
path: root/net/unix/garbage.c
diff options
context:
space:
mode:
authorPeter Zijlstra <[email protected]>2022-06-14 23:15:48 +0200
committerBorislav Petkov <[email protected]>2022-06-27 10:33:59 +0200
commita149180fbcf336e97ce4eb2cdc13672727feb94d (patch)
tree465e0b2ebf7a147d686abed224a732907c475c1b /net/unix/garbage.c
parent951ddecf435659553ed15a9214e153a3af43a9a1 (diff)
x86: Add magic AMD return-thunk
Note: needs to be in a section distinct from Retpolines such that the Retpoline RET substitution cannot possibly use immediate jumps. ORC unwinding for zen_untrain_ret() and __x86_return_thunk() is a little tricky but works due to the fact that zen_untrain_ret() doesn't have any stack ops and as such will emit a single ORC entry at the start (+0x3f). Meanwhile, unwinding an IP, including the __x86_return_thunk() one (+0x40) will search for the largest ORC entry smaller or equal to the IP, these will find the one ORC entry (+0x3f) and all works. [ Alexandre: SVM part. ] [ bp: Build fix, massages. ] Suggested-by: Andrew Cooper <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Josh Poimboeuf <[email protected]> Signed-off-by: Borislav Petkov <[email protected]>
Diffstat (limited to 'net/unix/garbage.c')
0 files changed, 0 insertions, 0 deletions