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: <CABVgOS=FzA5oKkTEJLMp6=funMiLqp5SzcwOcoqdfVeuxMQLqA@mail.gmail.com>
Date:   Tue, 12 Jul 2022 15:19:17 +0800
From:   David Gow <davidgow@...gle.com>
To:     Daniel Latypov <dlatypov@...gle.com>
Cc:     Brendan Higgins <brendanhiggins@...gle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        KUnit Development <kunit-dev@...glegroups.com>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        Shuah Khan <skhan@...uxfoundation.org>,
        linux-clk@...r.kernel.org, Stephen Boyd <sboyd@...nel.org>,
        Maxime Ripard <maxime@...no.tech>
Subject: Re: [PATCH] clk: explicitly disable CONFIG_UML_PCI_OVER_VIRTIO in .kunitconfig

On Tue, Jul 12, 2022 at 12:27 AM 'Daniel Latypov' via KUnit
Development <kunit-dev@...glegroups.com> wrote:
>
> CONFIG_UML_PCI_OVER_VIRTIO=y is needed to enable CONFIG_PCI=y on UML.
> However, this causes test failures when running the clk tests, i.e.
> $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/clk
>
> A snippet of the particular error is:
> >     ok 1 - clk_gate_test_parent_rate
> > ------------[ cut here ]------------
> > WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0
>
> This is triggered by this cast in the test:
>    143          ctx->fake_mem = (void __force __iomem *)&ctx->fake_reg;
> this seems to work except when logic iomem is enabled, i.e.
> CONFIG_INDIRECT_IOMEM=y.
>
> As a short-term fix, explicitly disable CONFIG_UML_PCI_OVER_VIRTIO in
> drivers/clk/.kunitconfig so we can enable it for everyone else by
> default in kunit.py.
>
> The long-term fix probably requires something more complicated, like
>   #ifdef CONFIG_INDIRECT_IOMEM
>     logic_iomem_add_region(...);
>   #endif
>
> Signed-off-by: Daniel Latypov <dlatypov@...gle.com>
> Reported-by: Maxime Ripard <maxime@...no.tech>
> Tested-by: Maxime Ripard <maxime@...no.tech>
> ---
> Note: this targeting the -kselftest kunit branch.
> There's a commit that triggers this by enabling logic iomem by default
> [1] and there's also a commit that lets disable it via kunitconfig file
> [2], which this fix relies on.
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=kunit&id=6fc3a8636a7b0f7dbd6d0a4e450e765dc17518d4
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=kunit&id=8a7c6f859a20ca36a9e3ce71662de697898c9ef5
> ---

Looks good, works for me (and doesn't break either i386 or arm64,
which I also tested on).

Reviewed-by: David Gow <davidgow@...gle.com>

Cheers,
-- David

>  drivers/clk/.kunitconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clk/.kunitconfig b/drivers/clk/.kunitconfig
> index cdbc7d7deba9..2fbeb71316f8 100644
> --- a/drivers/clk/.kunitconfig
> +++ b/drivers/clk/.kunitconfig
> @@ -2,3 +2,4 @@ CONFIG_KUNIT=y
>  CONFIG_COMMON_CLK=y
>  CONFIG_CLK_KUNIT_TEST=y
>  CONFIG_CLK_GATE_KUNIT_TEST=y
> +CONFIG_UML_PCI_OVER_VIRTIO=n
>
> base-commit: 7635778bac7e46458392c1261e3916e8e9e86860
> --
> 2.37.0.rc0.161.g10f37bed90-goog
>
> --
> You received this message because you are subscribed to the Google Groups "KUnit Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kunit-dev+unsubscribe@...glegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/kunit-dev/20220711162713.2467476-1-dlatypov%40google.com.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ