[PATCH] ACPI: GTDT: Relax sanity checking on Platform Timers array count
Will Deacon
will at kernel.org
Thu Feb 13 03:45:04 PST 2025
On Wed, Feb 12, 2025 at 11:33:27AM +0100, Lorenzo Pieralisi wrote:
> > > I think this should be fine as things stand (but see above).
> > >
> > > It is used in:
> > >
> > > gtdt_sbsa_gwdt_init() - just to check if there are platform timers entries
> > >
> > > arch_timer_mem_acpi_init() - to create a temporary array to init arch mem timer
> > > entries (the array is oversized because it
> > > includes watchdog entries in the count)
> > >
> > > In both cases taking the
> > >
> > > min(cnt, gtdt->platform_timer_count);
> > >
> > > should work AFAICS
> >
> > It was probably worth noting in the changelog that I did this to
> > gracefully handle the reverse of this issue where we could dereference
> > platform timer entries that are within the bounds of the GTDT but exceed
> > gtdt->platform_timer_count.
>
> Hi Oliver,
>
> I was about to ask Catalin/Will to pick this up, don't know if you have
> time to update the changelog and send a v2 - a Link: to this thread will
> be added anyway.
I'll pick it up with the Link: tag, no need to resend.
Thanks, both!
Will
More information about the linux-arm-kernel
mailing list