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: <Y5kFQ0R7o20Fycvp@bombadil.infradead.org>
Date:   Tue, 13 Dec 2022 15:05:39 -0800
From:   Luis Chamberlain <mcgrof@...nel.org>
To:     Michał Lach <michal.lach@...sung.com>
Cc:     linux-kernel@...r.kernel.org, russell.h.weight@...el.com,
        gregkh@...uxfoundation.org, rafael@...nel.org, tiwai@...e.de
Subject: Re: [PATCH] drivers/firmware_loader: remove list entry before
 deallocation

On Mon, Dec 12, 2022 at 06:52:51PM +0100, Michał Lach wrote:
> On 12/12/22 07:04, Luis Chamberlain wrote:
> > Hey Michal! Thanks for your patch! I have a few doubts though!
> 
> :-)
> 
> > To account for not having to deal with specific drivers we have the
> > Linux kernel selftests. And so you can test the firmware loader with all
> > sorts of crazy situations which any driver could use and try to see
> > if you can re-recreate the issue.
> > 
> > The kernel selftests driver for the firmware loader is in
> > lib/test_firmware.c and you can use thetools/testing/selftests/firmware/fw_run_tests.sh
> > to run all the tests. To test the firmware fallback alone you can use
> > just fw_fallback.sh.
> > 
> > If you want to just virtualize this and you can also use kdevops [0] and
> > enable the firmware loader selftest and use:;
> > 
> > make menuconfig          #  enable selftests and just the firmware test
> > make linux               #  build linux, pick linux-next
> > make selftests
> > make selftests-firmware
> > 
> > But this may be something more you can use later once you get your flow
> > going. Just compiling the kernel and running the selftest manually with
> > fw_fallback.sh should suffice.
> 
> Thanks a lot, I had no idea that there is something like this.

selftests has been there for ages, kdevops support for selftests is
pretty new, like 1 week old only :)

> > OK so this proves the bug can happen but I'd like to see the full trace
> > and the exact kernel version showing that this can happen on a recent
> > kernel. Without that I'm not seeing how this can trigger yet.
> 
> Unfortunately I cannot provide a trace. The kernel version was 5.15.41 (-stable).

Ah, I suspected as much, given I couldn't see how this could happen in
linux-next.

> Keeping that in mind, I will try to reproduce this behaviour with in-tree
> code and provide proof.

Yes please use linux-next, if you can't reproduce there then likely
your kernel is missing some fixes.

  Luis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ