Commit b28a8ee
James Morse
arm64: entry: Add macro for reading symbol addresses from the trampoline
The trampoline code needs to use the address of symbols in the wider
kernel, e.g. vectors. PC-relative addressing wouldn't work as the
trampoline code doesn't run at the address the linker expected.
tramp_ventry uses a literal pool, unless CONFIG_RANDOMIZE_BASE is
set, in which case it uses the data page as a literal pool because
the data page can be unmapped when running in user-space, which is
required for CPUs vulnerable to meltdown.
Pull this logic out as a macro, instead of adding a third copy
of it.
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>1 parent ba26892 commit b28a8ee
1 file changed
Lines changed: 16 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
649 | 658 | | |
650 | 659 | | |
651 | 660 | | |
| |||
676 | 685 | | |
677 | 686 | | |
678 | 687 | | |
679 | | - | |
680 | | - | |
681 | 688 | | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
| 689 | + | |
686 | 690 | | |
687 | 691 | | |
688 | 692 | | |
| |||
765 | 769 | | |
766 | 770 | | |
767 | 771 | | |
| 772 | + | |
768 | 773 | | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
769 | 778 | | |
770 | 779 | | |
771 | 780 | | |
| |||
932 | 941 | | |
933 | 942 | | |
934 | 943 | | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
| 944 | + | |
943 | 945 | | |
944 | 946 | | |
945 | 947 | | |
| |||
962 | 964 | | |
963 | 965 | | |
964 | 966 | | |
965 | | - | |
966 | | - | |
967 | | - | |
968 | | - | |
969 | | - | |
970 | | - | |
971 | | - | |
972 | 967 | | |
973 | 968 | | |
974 | 969 | | |
| |||
0 commit comments