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: <86jz36dqh1.wl-maz@kernel.org>
Date: Thu, 14 Aug 2025 13:42:34 +0100
From: Marc Zyngier <maz@...nel.org>
To: Steven Price <steven.price@....com>
Cc: Daniel Lezcano <daniel.lezcano@...aro.org>,
	linux-kernel@...r.kernel.org,
	linux-acpi@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	Lorenzo Pieralisi <lpieralisi@...nel.org>,
	Hanjun Guo
 <guohanjun@...wei.com>,
	Sudeep Holla <sudeep.holla@....com>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Thomas Gleixner
 <tglx@...utronix.de>,
	Mark Rutland <mark.rutland@....com>
Subject: Re: [PATCH 2/4] clocksource/drivers/arm_arch_timer: Add standalone MMIO driver

On Thu, 14 Aug 2025 13:23:26 +0100,
Steven Price <steven.price@....com> wrote:
> 
> No - CLOCKSOURCE_MASK() turns into GENMASK_ULL so a simple truncation to
> unsigned long would be ULONG_MAX (all 1s). So an unsigned long cast
> should be fine. My suggestion of MIN(, ULONG_MAX) was just to make that
> more clear.

Huh. yes, Can't think today. Sorry for the noise.

> 
> >> But it also means that the per-cpu timer also gets truncated the same
> >> way, and that has interesting impacts on how often the timer is
> >> reprogrammed.
> > 
> > That question still stand, and I wonder whether we have ugly bugs
> > lurking on 32bit platforms because of that... I'll try and have a
> > look.
> 
> I don't know whether there are other bugs due to the capping to
> ULONG_MAX, but I don't think there's an (additional) bug here, it's
> "just" a ugly warning.

It really isn't about the warning, but how we express the maximum
deadline to the core infrastructure. The MMIO driver is the least of
our worries, and the CPU timer is the thing I'm concerned about, as it
uses the same construct.

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ