mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Carlos Maiolino <cem@kernel.org>
To: 铮 <fengaojigui88@gmail.com>
Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [BUG] xfs: undersized log triggers assertion in xfs_log_mount()
Date: Tue, 27 Oct 2026 18:32:44 +0100	[thread overview]
Message-ID: <auDbrRoBQaxWnsE9@cronus.toxiclabs.cc> (raw)
In-Reply-To: <CAO-4RZ25PZ5BM+83Vk8t5NUY3ksLGz5nzONrncipu2_MZhFSsg@mail.gmail.com>

On Wed, Oct 28, 2026 at 01:00:54AM +0800, 铮 wrote:
> Hi Carlos,
> 
> Executing the stored syzkaller testcases on Linux 7.3.0 ultimately triggers
> an assertion in xfs_log_mount():
> 
>   XFS (loop0): AAIEEE! Log failed size checks. Abort!
>   XFS: Assertion failed: 0, file: fs/xfs/xfs_log.c, line: 597
>   kernel BUG at fs/xfs/xfs_message.c:102!
>   ...
>   xfs_log_mount+0x4e3/0x590
>   xfs_mountfs+0x10b9/0x2270
>   xfs_fs_fill_super+0x15cc/0x20b0
>   ...
>   Kernel panic - not syncing: Fatal exception
> 
> The log size check reports 516 blocks, below the required minimum of
> 636 blocks.
> 
> Is this an expected assertion with my XFS debug configuration, or should
> this malformed image be rejected without triggering a kernel BUG?

You have bug_on_assert set on your system, so yes, this is intended. If
you don't want to panic() the machine there, you need to disable it on
sysfs, but...

> Questions
> ---------
> - Is triggering a fatal assertion for an undersized V5 log intentional
>   with CONFIG_XFS_DEBUG=y and CONFIG_XFS_ASSERT_FATAL=y, or should this
>   case return -EINVAL without triggering a BUG?

The config you have enable explicitly says asserts are fatal. I'm not
sure if I misunderstood you or you misunderstood the configuration
option.


> - If a diagnostic dump would help, what state should be printed before the
>   assertion so the malformed image/log geometry can be identified?

You are running a kernel configured with debug configuration that are
meant to crash the system when some issue is found. Those are
configuration settings used for development and debug purposes, not to
use on a production or semi-production system.

Cheers,
Carlos

  reply	other threads:[~2026-10-27 17:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 17:00 铮
2026-10-27 17:32 ` Carlos Maiolino [this message]
2026-10-28  0:39   ` 铮
  -- strict thread matches above, loose matches on Subject: below --
2026-10-27 16:35 铮

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=auDbrRoBQaxWnsE9@cronus.toxiclabs.cc \
    --to=cem@kernel.org \
    --cc=fengaojigui88@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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®