Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Oliver Upton <oliver.upton@linux.dev>,
	linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Hanjun Guo <guohanjun@huawei.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Marc Zyngier <maz@kernel.org>,
	Zheng Zengkai <zhengzengkai@huawei.com>
Subject: Re: [PATCH] ACPI: GTDT: Relax sanity checking on Platform Timers array count
Date: Thu, 13 Feb 2025 11:45:04 +0000	[thread overview]
Message-ID: <20250213114503.GA11508@willie-the-truck> (raw)
In-Reply-To: <Z6x4987CJ0zgmw3s@lpieralisi>

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


  reply	other threads:[~2025-02-13 12:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-28  0:17 [PATCH] ACPI: GTDT: Relax sanity checking on Platform Timers array count Oliver Upton
2025-01-28  8:46 ` Marc Zyngier
2025-01-28 10:50 ` Lorenzo Pieralisi
2025-01-28 20:42   ` Oliver Upton
2025-01-30 17:37     ` Lorenzo Pieralisi
2025-02-12 10:33     ` Lorenzo Pieralisi
2025-02-13 11:45       ` Will Deacon [this message]
2025-02-13 13:59 ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250213114503.GA11508@willie-the-truck \
    --to=will@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=guohanjun@huawei.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=sudeep.holla@arm.com \
    --cc=zhengzengkai@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox