From: Luis Chamberlain <mcgrof@kernel.org>
To: Shuah Khan <skhan@linuxfoundation.org>
Cc: Anirudh Rayabharam <mail@anirudhrb.com>,
Shuah Khan <shuah@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Junyong Sun <sunjy516@gmail.com>,
syzbot+de271708674e2093097b@syzkaller.appspotmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] firmware_loader: fix use-after-free in firmware_fallback_sysfs
Date: Fri, 23 Apr 2021 18:40:33 +0000 [thread overview]
Message-ID: <20210423184033.GQ4332@42.do-not-panic.com> (raw)
In-Reply-To: <1e12bb24-9bb8-dad7-d852-02173ce41b6a@linuxfoundation.org>
On Wed, Apr 14, 2021 at 09:26:55AM -0600, Shuah Khan wrote:
> On 4/14/21 6:55 AM, Luis Chamberlain wrote:
> > In either case I documented well *why* we do these error checks
> > before sending a code to userspace on fw_sysfs_wait_timeout() since
> > otherwise it would be easy to regress that code, so please also
> > document that as I did.
> >
> > I'll re-iterate again also:
> >
> > Shuah's commit 0542ad88fbdd81bb ("firmware loader: Fix
> > _request_firmware_load() return val for fw load abort") also wanted to
> > distinguish the timeout vs -ENOMEM, but for some reason in the timeout
> > case -EAGAIN was being sent back to userspace. I am no longer sure if
> > that is a good idea, but since we started doing that at some point I
> > guess we want to keep that behaviour.
> >
> > Shuah, can you think of any reason to retain -EAGAIN other than you
> > introduced it here? If there's no real good reason I think it can
> > simplify the error handling here. But, we *would* change what we do
> > to userspace... and for that reason we may have to live with it.
> >
>
> As I recall the reason for this patch was to be able to differentiate
> between timing out vs no memory case when driver was attempting to
> load firmware. I wish I added why to the change log.
>
> The code seems to have changed a lot since my commit. I will take a look
> at the closely and let you know if this is still necessary late on
> today.
Shuah, *poke*
Luis
next prev parent reply other threads:[~2021-04-23 18:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-14 8:54 [PATCH v3] firmware_loader: fix use-after-free in firmware_fallback_sysfs Anirudh Rayabharam
2021-04-14 12:55 ` Luis Chamberlain
2021-04-14 15:26 ` Shuah Khan
2021-04-15 14:10 ` Shuah Khan
2021-04-23 18:44 ` Shuah Khan
2021-04-23 18:40 ` Luis Chamberlain [this message]
2021-04-23 18:44 ` Shuah Khan
2021-04-15 6:05 ` Anirudh Rayabharam
2021-04-30 2:49 ` Anirudh Rayabharam
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=20210423184033.GQ4332@42.do-not-panic.com \
--to=mcgrof@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@anirudhrb.com \
--cc=rafael@kernel.org \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=sunjy516@gmail.com \
--cc=syzbot+de271708674e2093097b@syzkaller.appspotmail.com \
/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).