mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Levi Yun <ppbuk5246@gmail.com>
Cc: keescook@chromium.org, ebiederm@xmission.com,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs/exec.c: Avoid a race in formats
Date: Wed, 23 Feb 2022 23:24:08 +0000	[thread overview]
Message-ID: <YhbCGDzlTWp2OJzI@zeniv-ca.linux.org.uk> (raw)
In-Reply-To: <20220223231752.52241-1-ppbuk5246@gmail.com>

On Thu, Feb 24, 2022 at 08:17:52AM +0900, Levi Yun wrote:
> Suppose a module registers its own binfmt (custom) and formats is like:
> 
> +---------+    +----------+    +---------+
> | custom  | -> |  format1 | -> | format2 |
> +---------+    +----------+    +---------+
> 
> and try to call unregister_binfmt with custom NOT in __exit stage.

Explain, please.  Why would anyone do that?  And how would such
module decide when it's safe to e.g. dismantle data structures
used by methods of that binfmt, etc.?

Could you give more detailed example?  Because it looks like
papering over an inherently unsafe use of binfmt interfaces...

  reply	other threads:[~2022-02-23 23:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 23:17 Levi Yun
2022-02-23 23:24 ` Al Viro [this message]
2022-02-23 23:59   ` Yun Levi
2022-02-24  0:10     ` Yun Levi
2022-02-24  0:41       ` Eric W. Biederman
2022-02-24  0:51         ` Yun Levi
2022-02-24  2:24           ` Eric W. Biederman
2022-02-24  2:28             ` Yun Levi
2022-02-24  3:00     ` Al Viro
2022-02-24  3:13       ` Yun Levi

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=YhbCGDzlTWp2OJzI@zeniv-ca.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=ebiederm@xmission.com \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ppbuk5246@gmail.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®