linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: "Michał Lach" <michal.lach@samsung.com>
Cc: linux-kernel@vger.kernel.org, russell.h.weight@intel.com,
	gregkh@linuxfoundation.org, rafael@kernel.org, tiwai@suse.de
Subject: Re: [PATCH] drivers/firmware_loader: remove list entry before deallocation
Date: Tue, 13 Dec 2022 15:05:39 -0800	[thread overview]
Message-ID: <Y5kFQ0R7o20Fycvp@bombadil.infradead.org> (raw)
In-Reply-To: <c1d10d21-f3ca-7633-8b65-5d3916cfa648@samsung.com>

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

      reply	other threads:[~2022-12-13 23:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20221123111806eucas1p23fdcdbe6e5f4a9e714db428fcd6552b9@eucas1p2.samsung.com>
2022-11-23 11:14 ` [PATCH] drivers/firmware_loader: remove list entry before deallocation Michal Lach
2022-11-29 19:06   ` Russ Weight
2022-12-08 10:45   ` Michał Lach
2022-12-08 13:18     ` Greg KH
2022-12-08 15:23       ` Michał Lach
2022-12-08 15:42         ` Greg KH
2022-12-08 16:18           ` Michał Lach
2022-12-08 18:18             ` Greg KH
2022-12-09 14:09               ` Michał Lach
2022-12-12  6:04   ` Luis Chamberlain
2022-12-12 17:52     ` Michał Lach
2022-12-13 23:05       ` Luis Chamberlain [this message]

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=Y5kFQ0R7o20Fycvp@bombadil.infradead.org \
    --to=mcgrof@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lach@samsung.com \
    --cc=rafael@kernel.org \
    --cc=russell.h.weight@intel.com \
    --cc=tiwai@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).