Commit 52842ef
create-diff-object: add aarch64 ASSERT_RTNL macro detection
On aarch64, only the ASSERT_RTNL macro is affected by source line number
changes (WARN, BUG, etc. no longer embed line numbers in the instruction
stream.) A small test function that invokes the macro for a line change
from 42 to 43:
0000000000000000 <test_assert_rtnl>:
0: d503245f bti c
4: d503201f nop
8: d503201f nop
c: d503233f paciasp
10: a9bf7bfd stp x29, x30, [sp, #-16]!
14: 910003fd mov x29, sp
18: 94000000 bl 0 <rtnl_is_locked>
18: R_AARCH64_CALL26 rtnl_is_locked
1c: 34000080 cbz w0, 2c <test_assert_rtnl+0x2c>
20: a8c17bfd ldp x29, x30, [sp], dynup#16
24: d50323bf autiasp
28: d65f03c0 ret
2c: 90000000 adrp x0, 0 <test_assert_rtnl>
2c: R_AARCH64_ADR_PREL_PG_HI21 .data.once
30: 39400001 ldrb w1, [x0]
30: R_AARCH64_LDST8_ABS_LO12_NC .data.once
34: 35ffff61 cbnz w1, 20 <test_assert_rtnl+0x20>
38: 52800022 mov w2, #0x1 // #1
3c: 90000001 adrp x1, 0 <test_assert_rtnl>
3c: R_AARCH64_ADR_PREL_PG_HI21 .rodata.str1.8+0x8
40: 39000002 strb w2, [x0]
40: R_AARCH64_LDST8_ABS_LO12_NC .data.once
44: 91000021 add x1, x1, #0x0
44: R_AARCH64_ADD_ABS_LO12_NC .rodata.str1.8+0x8
- 48: 52800542 mov w2, #0x2a // dynup#42
+ 48: 52800562 mov w2, #0x2b // dynup#43
4c: 90000000 adrp x0, 0 <test_assert_rtnl>
4c: R_AARCH64_ADR_PREL_PG_HI21 .rodata.str1.8+0x20
50: 91000000 add x0, x0, #0x0
50: R_AARCH64_ADD_ABS_LO12_NC .rodata.str1.8+0x20
54: 94000000 bl 0 <__warn_printk>
54: R_AARCH64_CALL26 __warn_printk
58: d4210000 brk #0x800
5c: 17fffff1 b 20 <test_assert_rtnl+0x20>
Create an implementation of kpatch_line_macro_change_only() for aarch64
modeled after the other architectures. Only look for relocations to
__warn_printk that ASSERT_RTNL invokes.
Based-on-s390x-code-by: C. Erastus Toe <ctoe@redhat.com>
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>1 parent 3650f3a commit 52842ef
2 files changed
Lines changed: 65 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
861 | 861 | | |
862 | 862 | | |
863 | 863 | | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
864 | 926 | | |
865 | 927 | | |
866 | 928 | | |
867 | 929 | | |
868 | 930 | | |
869 | | - | |
870 | | - | |
| 931 | + | |
871 | 932 | | |
872 | 933 | | |
873 | 934 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
280 | 282 | | |
281 | 283 | | |
282 | 284 | | |
| |||
0 commit comments