Re: [PATCH] x86/hpet: Mark boot-time variables as __ro_after_init

From: Dave Hansen

Date: Thu Nov 19 2026 - 17:45:30 EST


On 11/19/26 12:37, Habil Eren Türker wrote:
> Marking these as __ro_after_init hardens the kernel by placing them in the
> read-only data section post-init. This prevents accidental or malicious
> runtime modifications (e.g., via a memory corruption exploit) that could
> silently corrupt HPET frequencies or block IDs, causing severe timing
> issues or system hangs.

Heh, I'm familiar with the concept of __ro_after_init.

Maybe it's a sign of the times, but I'm doubting the veracity of the
claim that this was found through a random human audit of the HPET code.

I mean, if you're using an LLM to find these, generate the patches, and
respond to my emails, that *fine*. Just please be transparent about it
when I ask.