Thread (30 messages) 30 messages, 6 authors, 2021-03-24

Re: [PATCH v7 2/2] ARM: ftrace: Add MODULE_PLTS support

From: Alexander Sverdlin <hidden>
Date: 2021-03-24 16:34:06
Also in: lkml

Hello Qais,

On 24/03/2021 16:57, Qais Yousef wrote:
quoted
quoted
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.

-- 
Best regards,
Alexander Sverdlin.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help