Re: [PATCH v2 2/2] dyndbg: use the module notifier callbacks
From: Jason Baron <jbaron@akamai.com>
Date: 2023-02-28 21:57:24
Also in:
lkml
On 2/28/23 3:44 PM, Luis Chamberlain wrote:
On Tue, Feb 28, 2023 at 02:35:02PM -0500, Jason Baron wrote:quoted
As part of Jim Cromie's new dynamic debug classmap feature, the new code tries to toggle a jump label from dynamic_debug_setup(). However, dynamic_debug_setup() is called before the 'module_notify_list' notifier chain is invoked. And jump labels are initialized via the module notifier chain. Note this is an issue for a new feature not yet merged and doesn't affect any existing codepaths.I think we can summarize this to "in preperation for some future work where ordering matters with respect to jump labels" or something like that. Because that is then making it specific to the future use case and creates the current justification.quoted
We could just move dynamic_debug_setup() earlier in load_module(). But let's instead ensure the ordering via the 'priority' in the module list notifier."becuase the notifier for jump labels jump_label_module_nb uses a priority of 1" or something like that would be nice to get added.quoted
This brings dynamic debug more in line with other subsystems and pulls code out of the core module code.This should be the main reason for this change, as explained in the commit log. A secondary benefit would be it fixes the first future bug mentioned. With those changes I can take this into modules-next to start getting this tested sooner rather than later. Luis
Hi Luis, Ok, I can fix up the commit message and re-post. I'm thinking maybe we should separate these patches as they are independent. The 2nd one I think makes sense to go through modules-next, but the first one is internal to dynamic debug and can be a part of Jim's series. Make sense? Thanks, -Jason