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: <6336a324-3597-4726-b2ff-fe0f561c59bc@linaro.org>
Date: Wed, 12 Nov 2025 11:00:05 +0100
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Johan Hovold <johan@...nel.org>, Mark Rutland <mark.rutland@....com>,
 Marc Zyngier <maz@...nel.org>, Thomas Gleixner <tglx@...utronix.de>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] clocksource/drivers/nxp-pit: Prevent driver unbind

On 11/11/25 16:32, Johan Hovold wrote:
> The driver does not support unbinding (e.g. as clockevents cannot be
> deregistered) so suppress the bind attributes to prevent the driver from
> being unbound and rebound after registration (and disabling the timer
> when reprobing fails).
> 
> Even if the driver can currently only be built-in, also switch to
> builtin_platform_driver() to prevent it from being unloaded should
> modular builds ever be enabled.
> 
> Fixes: bee33f22d7c3 ("clocksource/drivers/nxp-pit: Add NXP Automotive s32g2 / s32g3 support")
> Signed-off-by: Johan Hovold <johan@...nel.org>
> ---
>   drivers/clocksource/timer-nxp-pit.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/timer-nxp-pit.c b/drivers/clocksource/timer-nxp-pit.c
> index 2d0a3554b6bf..d1740f18f718 100644
> --- a/drivers/clocksource/timer-nxp-pit.c
> +++ b/drivers/clocksource/timer-nxp-pit.c
> @@ -374,9 +374,10 @@ static struct platform_driver nxp_pit_driver = {
>   	.driver = {
>   		.name = "nxp-pit",
>   		.of_match_table = pit_timer_of_match,
> +		.suppress_bind_attrs = true,
>   	},
>   	.probe = pit_timer_probe,
>   };
> -module_platform_driver(nxp_pit_driver);
> +builtin_platform_driver(nxp_pit_driver);

Do not use builtin_platform here. You can add the tristate Kconfig 
option for this driver, I tested it.


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ