All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Hesse <mail@eworm.de>
To: Lizhi Xu <lizhi.xu@windriver.com>
Cc: <axboe@kernel.dk>, <christian@heusel.eu>, <hch@infradead.org>,
	<linux-block@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<ming.lei@redhat.com>,
	<syzbot+6af973a3b8dfd2faefdc@syzkaller.appspotmail.com>,
	<syzkaller-bugs@googlegroups.com>
Subject: Re: [PATCH V5] loop: Add sanity check for read/write_iter
Date: Tue, 20 May 2025 07:39:01 +0200	[thread overview]
Message-ID: <20250520073901.6fdfbee4@leda.eworm.net> (raw)
In-Reply-To: <20250520030051.177205-1-lizhi.xu@windriver.com>

[-- Attachment #1: Type: text/plain, Size: 1756 bytes --]

Lizhi Xu <lizhi.xu@windriver.com> on Tue, 2025/05/20 11:00:
> On Mon, 19 May 2025 17:56:40 +0200, Christian Hesse wrote:
> > $ losetup --find --show --read-only --
> > /run/archiso/bootmnt/arch/x86_64/airootfs.sfs losetup:
> > /run/archiso/bootmnt/arch/x86_64/airootfs.sfs: failed to set up loop
> > device: Invalid argument
>
> I tried to reproduce the problem you mentioned using the kernel containing
> "commit:f5c84eff", but failed to reproduce it.
> The complete reproduction steps are as follows:
> 
> sudo apt install squashfs-tools debootstrap
> sudo debootstrap --arch=amd64 focal rootfs http://archive.ubuntu.com/ubuntu/
> sudo mksquashfs rootfs rootfs.sfs -comp xz -e boot
> [...]

That's the wrong end of the stack. After all squashfs is not directly
involved here (that was just an etxra info on why we have a loopback file
inside iso9660).

The issue is setting up the loopback file inside a mounted iso9660 filesystem.
Take these steps for easy reproduction:

root@leda ~ # mkdir iso.d 
root@leda ~ # truncate -s 10m iso.d/loopback.img
root@leda ~ # mkisofs -o iso.iso iso.d/
Setting input-charset to 'UTF-8' from locale.
 94,75% done, estimate finish Tue May 20 07:34:52 2025
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
5294 extents written (10 MB)
root@leda ~ # mount -o loop iso.iso /mnt/tmp 
mount: /mnt/tmp: WARNING: source write-protected, mounted read-only.
root@leda ~ # losetup --find --show --read-only -- /mnt/tmp/loopback.img 
losetup: /mnt/tmp/loopback.img: failed to set up loop device: Invalid argument

Hope that helps, let me know if you need more assistance.
-- 
Best regards,
Chris

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2025-05-20  5:39 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24 14:08 [syzbot] [block?] BUG: unable to handle kernel NULL pointer dereference in lo_rw_aio syzbot
2025-04-25  1:19 ` [syzbot] " syzbot
2025-04-25  1:55 ` syzbot
2025-04-25  3:40 ` [PATCH] loop: Add sanity check for read/write_iter Lizhi Xu
2025-04-25  4:06   ` Zhu Yanjun
2025-04-25  4:19     ` Lizhi Xu
2025-04-25  4:20   ` Ming Lei
2025-04-25  4:33     ` Lizhi Xu
2025-04-25  5:38     ` [PATCH V2] " Lizhi Xu
2025-04-25 13:28       ` Christoph Hellwig
2025-04-26  1:50         ` Lizhi Xu
2025-04-28 12:46           ` Christoph Hellwig
2025-04-28 13:48             ` Lizhi Xu
2025-04-28 13:49               ` Christoph Hellwig
2025-04-26  2:10         ` [PATCH V3] " Lizhi Xu
2025-04-28 12:49           ` Christoph Hellwig
2025-04-28 13:42             ` Lizhi Xu
2025-04-28 13:48               ` Christoph Hellwig
2025-04-28 14:15                 ` [PATCH V4] " Lizhi Xu
2025-04-28 14:26                   ` Christoph Hellwig
2025-04-28 14:36                     ` [PATCH V5] " Lizhi Xu
2025-05-05  6:30                       ` Christoph Hellwig
2025-05-05 13:18                       ` Jens Axboe
2025-05-19 15:56                       ` Christian Hesse
2025-05-20  3:00                         ` Lizhi Xu
2025-05-20  5:39                           ` Christian Hesse [this message]
2025-05-20  6:29                             ` 回复: " Xu, Lizhi
2025-05-20  6:31                               ` Christian Hesse
2025-05-20  6:49                                 ` Xu, Lizhi
2025-05-20  6:46                               ` 回复: " hch
2025-05-20  6:59                                 ` 回复: " Xu, Lizhi
2025-05-20 11:28                                   ` hch
2025-05-20 11:39                                     ` 回复: " Xu, Lizhi
2025-05-20 11:41                                       ` hch
2025-05-20 11:44                                         ` 回复: " Xu, Lizhi
2025-05-20 11:52                                           ` Xu, Lizhi
2025-05-20 12:27                                 ` Xu, Lizhi
2025-05-20 12:46                                   ` Christian Hesse
2025-05-20 12:49                                     ` hch
2025-05-20 13:12                                       ` Xu, Lizhi
2025-05-20 16:53                                       ` christian
2025-05-20 12:46                                   ` hch
2025-04-25  4:54 ` [syzbot] Re: [syzbot] [block?] BUG: unable to handle kernel NULL pointer dereference in lo_rw_aio syzbot

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=20250520073901.6fdfbee4@leda.eworm.net \
    --to=mail@eworm.de \
    --cc=axboe@kernel.dk \
    --cc=christian@heusel.eu \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizhi.xu@windriver.com \
    --cc=ming.lei@redhat.com \
    --cc=syzbot+6af973a3b8dfd2faefdc@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.