mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: linux-kernel@vger.kernel.org, Jose Souza <jose.souza@intel.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 "Rafael J . Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH 1/2] devcoredump: Remove devcoredump device if failing device is gone
Date: Tue, 30 Jan 2024 16:51:57 +0100	[thread overview]
Message-ID: <d1ae193e9728583da3fbfac62ce1b20b0a34b60e.camel@sipsolutions.net> (raw)
In-Reply-To: <ZbkakWFtV5iQrfLP@intel.com>

On Tue, 2024-01-30 at 10:49 -0500, Rodrigo Vivi wrote:
> 
> I will make changes to our driver to make the 'data' a standalone memory
> that devcoredump will free. this ensures no uaf and no null deref.
> data could be read even after unbinding the driver.
> 
> What I meant to userspace 'writing to 'data'' was to ensure that
> on our CI we run something like
> 
> if /sys/.../device/devcd<n> exists, then
> echo 1 > /sys/.../device/devcd<n>/data
> before attempting the rmmod <driver>
> 
> our rmmod cannot get stuck or our CI is blocked, but then ensuring
> the devcd is gone with module_put happening is the only current way
> of not blocking the rmmod.
> 

Ah, you were just concerned about the module removal, sure, that makes
sense.

Though depending on how you make that data pointer: if you just use
*sg() or *v() then you don't have this problem in the first place. OTOH,
it's probably good to have a udev rule to automatically capture the data
in CI anyway (and fail the test if it happened?)

johannes

  reply	other threads:[~2024-01-30 15:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26 15:11 Rodrigo Vivi
2024-01-26 15:11 ` [PATCH 2/2] devcoredump: Remove the mutex serialization Rodrigo Vivi
2024-01-29 15:50   ` Souza, Jose
2024-01-30 12:02   ` Mukesh Ojha
2024-01-30 15:34     ` Rodrigo Vivi
2024-01-31 16:15       ` Mukesh Ojha
2024-01-29 15:50 ` [PATCH 1/2] devcoredump: Remove devcoredump device if failing device is gone Souza, Jose
2024-01-29 17:48 ` Johannes Berg
2024-01-29 21:29   ` Rodrigo Vivi
2024-01-29 21:51     ` Johannes Berg
2024-01-30 15:16       ` Rodrigo Vivi
2024-01-30 15:19         ` Johannes Berg
2024-01-30 15:49           ` Rodrigo Vivi
2024-01-30 15:51             ` Johannes Berg [this message]
2024-01-31 17:22   ` Mukesh Ojha

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=d1ae193e9728583da3fbfac62ce1b20b0a34b60e.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jose.souza@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=rafael@kernel.org \
    --cc=rodrigo.vivi@intel.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

all inboxes | Powered by JetHome®