Re: [PATCH] x86/hpet: Mark boot-time variables as __ro_after_init
From: Dave Hansen
Date: Thu Nov 19 2026 - 14:41:01 EST
On 11/17/26 04:29, Habil Eren Türker wrote:
> The following variables are only written during early boot or __init
> functions and remain read-only at runtime:
>
> - hpet_blockid: set once in acpi_parse_hpet() (__init)
> - hpet_msi_disable: set only in force_disable_hpet_msi() (early PCI quirk)
> - hpet_freq: set only in hpet_enable() (__init)
> - boot_hpet_disable: set only in force_disable_hpet() (early-quirks.c)
> and __init setup functions (hpet_setup(), disable_hpet(),
> hpet_is_pc10_damaged())
>
> Mark them as __ro_after_init to protect them against unintended runtime
> modifications.
How did you find this? Why does it matter?