In addition, Lis() function is declared static in the code as it exists before this patch, and it has been like that since 2023:
static void lis(int arg, int abs, int count); It is not very surprising that nothing outside of this c file is directly calling lis() The only thing that calls lis() is lip() (from the same c file lock_mon.c) And yes lip() is getting called from other files. But whether internally lip() is implemented using an alias (lis) or the "real" function (lock_info_sort()) doesn't change the behavior. Let me know if anything else can be verified here. Thank you Milos On Fri, Jun 20, 2025 at 7:55 PM Milos Nikic <nikic.mi...@gmail.com> wrote: > Hello, > > I rebuilt the kernel with LOCK_MONITOR enabled (via > CPPFLAGS="-DLOCK_MONITOR") and booted into it successfully. > The system is running normally, and lock monitoring functions like > lock_info_sort are present. > > I also verified that lis() is not used anywhere in the source tree > (confirmed with grep -r "lis(" .), so its removal is safe. > Let me know if you'd like me to do any additional validation. > > Thanks, > Milos > > On Fri, Jun 20, 2025 at 6:44 PM Damien Zammit <dam...@zamaudio.com> wrote: > >> Hi, >> >> Did you try compiling with lock monitoring enabled to make sure you >> didn't break kdb? >> I think there is a caller of lis and/or lip from my memory. >> >> Damien >> >> Sent from Proton Mail Android >> >> >> -------- Original Message -------- >> On 21/6/25 3:20 am, Milos Nikic <nikic.mi...@gmail.com> wrote: >> >> > This change: >> > - Removes the macro aliasing lock_info_sort to lis >> > - Moves lock_info_sort before lip() to eliminate the need for a >> forward declaration >> > - Updates the call in lip() to refer to lock_info_sort directly >> > >> > The result is a cleaner and more straightforward structure without >> changing behavior which also fixes a compiler warning. >> > --- >> > kern/lock_mon.c | 12 ++++-------- >> > 1 file changed, 4 insertions(+), 8 deletions(-) >> > >> > diff --git a/kern/lock_mon.c b/kern/lock_mon.c >> > index 3ca4592c..edc8ae55 100644 >> > --- a/kern/lock_mon.c >> > +++ b/kern/lock_mon.c >> > @@ -51,8 +51,6 @@ >> > #include <ddb/db_sym.h> >> > #include <ddb/db_output.h> >> > >> > -static void lis(int arg, int abs, int count); >> > - >> > def_simple_lock_data(, kdb_lock) >> > def_simple_lock_data(, printf_lock) >> > >> > @@ -169,12 +167,6 @@ decl_simple_lock_data(, *lock) >> > } >> > } >> > >> > -void lip(void) { >> > - lis(4, 1, 0); >> > -} >> > - >> > -#define lock_info_sort lis >> > - >> > static void lock_info_sort(int arg, int abs, int count) >> > { >> > struct lock_info *li, mean; >> > @@ -251,6 +243,10 @@ static void lock_info_sort(int arg, int abs, int >> count) >> > print_lock_info(&mean); >> > } >> > >> > +void lip(void) { >> > + lock_info_sort(4, 1, 0); >> > +} >> > + >> > #define lock_info_clear lic >> > >> > void lock_info_clear(void) >> > -- >> > 2.40.1 >> > >> > >> > >> >