Messages in this thread | | | Date | Wed, 24 Mar 2021 16:46:47 +0000 | From | Qais Yousef <> | Subject | Re: [PATCH v7 2/2] ARM: ftrace: Add MODULE_PLTS support |
| |
On 03/24/21 17:33, Alexander Sverdlin wrote: > Hello Qais, > > On 24/03/2021 16:57, Qais Yousef wrote: > >>> FWIW my main concern is about duplicating the range check in > >>> ftrace_call_replace() and using magic values that already exist in > >>> __arm_gen_branch_{arm, thumb2}() and better remain encapsulated there. > >> could you please check the negative limits? I have an opinion, my limits are > >> correct. I could add extra parameter to arm_gen_branch_link(), but for this > >> I first need to fix its negative limits, which, I believe, well... Approximate :) > > Can you elaborate please? > > > > If you look at Arm ARM [1] the ranges are defined in page 347 > > > > Encoding T1 Even numbers in the range –16777216 to 16777214. > > Encoding T2 Multiples of 4 in the range –16777216 to 16777212. > > Encoding A1 Multiples of 4 in the range –33554432 to 33554428. > > Encoding A2 Even numbers in the range –33554432 to 33554430. > > > > which matches what's in the code (T1 for thumb2 and A1 for arm). > > > > Why do you think it's wrong? > > thanks for checking this! I'll re-send v8 with your proposal.
If you felt some details need tweaking I don't mind, my proposal was an attempt to help rather than impose.
Thanks!
-- Qais Yousef
| |