Thread (6 messages) 6 messages, 3 authors, 2022-07-11

Re: [PATCH v2] module: kallsyms: Ensure preemption in add_kallsyms() with PREEMPT_RT

From: Aaron Tomlin <hidden>
Date: 2022-07-07 16:58:08
Also in: linux-rt-users, lkml

On Wed 2022-07-06 10:58 -0700, Luis Chamberlain wrote:
Hey Aaron, thanks again!
Hi Luis,

No problem :)
On Mon, Jul 04, 2022 at 05:17:53PM +0100, Aaron Tomlin wrote:
quoted
To disable preemption in the context of add_kallsyms() is incorrect.
Why, what broke? Did this used to work? Was the commit in question a
regression then? Clarifying all this will help a lot.
Sorry for the confusion! If I understand correctly, nothing broke
intrinsically.

Rather with commit 08126db5ff73 ("module: kallsyms: Fix suspicious rcu
usage") under PREEMPT_RT=y, by disabling preemption, I introduced an
unbounded latency since the loop is not fixed which is generally frowned
upon. So, I would say this was a regression since earlier preemption was
not disabled and we would dereference RCU-protected pointers explicitly
i.e. without using the more appropriate rcu_dereference() family
of primitives. That being said, these pointers cannot change in this
context as explained previously.

Would the above be suitable - just to confirm before I send another
iteration?


Kind regards,

-- 
Aaron Tomlin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help