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] [day] [month] [year] [list]
Message-ID: <CABVgOSn7MPrwQBxL6fnP_1H0BctypdZtA7opzoYfFx5ULoAM=A@mail.gmail.com>
Date: Fri, 28 Nov 2025 16:46:39 +0800
From: David Gow <davidgow@...gle.com>
To: Johannes Berg <johannes@...solutions.net>
Cc: "Peng Fan (OSS)" <peng.fan@....nxp.com>, Michael Turquette <mturquette@...libre.com>, 
	Stephen Boyd <sboyd@...nel.org>, Thomas Weißschuh <thomas.weissschuh@...utronix.de>, 
	Shuah Khan <skhan@...uxfoundation.org>, Brian Masney <bmasney@...hat.com>, 
	linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Peng Fan <peng.fan@....com>
Subject: Re: [PATCH] clk: Disable KUNIT_UML_PCI

On Fri, 28 Nov 2025 at 15:44, Johannes Berg <johannes@...solutions.net> wrote:
>
> >
> > commit 031cdd3bc3f3 ("kunit: Enable PCI on UML without triggering WARN()")
> > causes clk gate test fail. Deselect KUNIT_UML_PCI to avoid the failure.
>
> While probably _true_ that this "caused" it, it also seems a bit
> dishonest to blame it on that without giving any information as to why
> the clk tests trigger some edge case or so?
>
> FTR, the warning only happens when you pass an address to ioread(),
> iowrite() or similar that wasn't obtained from ioremap(). Which ought to
> not be valid, and I'm pretty convinced that a unit test should never
> even end up here.
>
> So no, I don't think this is a valid change, I think the clk unit tests
> that end up doing readl() in the gate code for a non-existing device are
> broken.

Yeah, the correct solution here is definitely to rework the test to not do this.

Unfortunately, I don't think there's a really pleasant way of faking
these in KUnit tests, but a path forward might involve logic_iomem
(possibly with some changes). Otherwise, reworking the test to put
these writes behind a function which can be mocked would be nice.

Ultimately, I don't have a problem with us disabling this in the
meantime for clk tests -- ultimately it's up to clk folks what their
test config is, and having tests which always fail isn't great -- but
it'd be nice to eliminate the cast-a-random-pointer-to-iomem hacks in
tests.

Cheers,
-- David

Download attachment "smime.p7s" of type "application/pkcs7-signature" (5281 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ