lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_zk94RFo2bK85iJ@gmail.com>
Date: Mon, 14 Apr 2025 12:35:35 +0200
From: Ingo Molnar <mingo@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>,
	Frederic Weisbecker <frederic@...nel.org>,
	"H . Peter Anvin" <hpa@...or.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 00/17] timers: Complete the timer_*() API renames


* Ingo Molnar <mingo@...nel.org> wrote:

> Complete the timer API namespace cleanup that begun with:
> 
>   8fa7292fee5c treewide: Switch/rename to timer_delete[_sync]()
> 
> The best way to view this series is to look at the right side
> column of this table of renames, in order of API appearance
> in <linux/timer.h>:
> 
>        add_timer_global()                  =>          timer_add_global()
>        add_timer_local()                   =>          timer_add_local()
>        from_timer()                        =>          timer_container_of()
>        mod_timer_pending()                 =>          timer_mod_pending()
>        timer_delete()              ... [unchanged] ... timer_delete()
>        timer_reduce()              ... [unchanged] ... timer_reduce()
>        timer_shutdown()            ... [unchanged] ... timer_shutdown()
>        timer_shutdown_sync()       ... [unchanged] ... timer_shutdown_sync()
>        try_to_del_timer_sync()             =>          timer_delete_sync_try()
>        add_timer()                         =>          timer_add()
>        add_timer_on()                      =>          timer_add_on()
>        mod_timer()                         =>          timer_mod()

BTW., my suggestion would be to maybe change this to timer_modify(), 
because timer_mod() reads a bit weirdly.

This would be similar to how del_timer() was changed to timer_delete().

I didn't want to make bigger, discretionary changes in the first 
iteration, but I can easily propagate any such suggestions into future 
versions of this series.

If we do that, we'd also do timer_modify_pending().

>        timer_delete_sync()         ... [unchanged] ... timer_delete_sync()
>        timer_setup_on_stack()      ... [unchanged] ... timer_setup_on_stack()
>        destroy_timer_on_stack()            =>          timer_destroy_on_stack()
>        timer_pending()             ... [unchanged] ... timer_pending()
>        timer_setup()               ... [unchanged] ... timer_setup()
>        init_timer_key()                    =>          timer_init_key()
>        init_timer_on_stack_key()           =>          timer_init_on_stack_key()

Maybe timer_init_key_on_stack()? Because the base name should be 'timer_init_key'.

That would similar to how we have:

		__timer_init()
		__timer_init_on_stack()

where _on_stack is a suffix.

> 
>        __init_timer()                      =>          __timer_init()
>        __init_timer_on_stack()             =>          __timer_init_on_stack()
> 
>        NEXT_TIMER_MAX_DELTA                =>          TIMER_NEXT_MAX_DELTA
> 
>        init_timers()                       =>          timers_init()
>        timers_dead_cpu()           ... [unchanged] ... timers_dead_cpu()
>        timers_prepare_cpu()        ... [unchanged] ... timers_prepare_cpu()

Note that with this rename there's now a unified timers_*() namespace 
for subsystem-wide functionality, such as boot-time setup or hotplug 
callbacks.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ