All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kristof Havasi <havasiefr@gmail.com>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>, linux-mtd@lists.infradead.org
Subject: Re: UBIFS-AUTH panic after reboot
Date: Mon, 21 Sep 2020 11:23:11 +0200	[thread overview]
Message-ID: <CADBnMvhcowEVqUYwg3vVK-F-=N+mRNQAsaihXuUorW-iWnWcxg@mail.gmail.com> (raw)
In-Reply-To: <CAFLxGvyHWFmLTYmyqmJo9Rfm87D_ZafBWyQSMvdYKLFTUM9p+Q@mail.gmail.com>

On Sat, 19 Sep 2020 at 22:54, Richard Weinberger
<richard.weinberger@gmail.com> wrote:
>
> On Sat, Sep 19, 2020 at 10:02 PM Richard Weinberger
> <richard.weinberger@gmail.com> wrote:
> >
> > On Thu, Sep 17, 2020 at 4:48 PM Kristof Havasi <havasiefr@gmail.com> wrote:
> > > Without "chk_lprops" the panic is only visible after the restart, but if it was
> > > enabled the following assertion was triggering an immediate panic:
> > > (Should I "reformat" long log lines in the future or leave them verbatim?)
> > >
> > > UBIFS error (ubi0:4 pid 649): ubifs_assert_failed: UBIFS assert
> > > failed: (val >> nrbits) == 0 || nrbits == 32, in fs/ubifs/lpt.c:231
> > > UBIFS warning (ubi0:4 pid 649): ubifs_ro_mode.part.1: switched to
> >
> > Hm, the number of bits we ask to pack is smaller than val.
> > Maybe we have some subtle bug where a node length is not correctly
> > calculated.
> >
> > From your other mail:
> > > >         0: free 0 dirty 255408 flags 1 lnum 0
> >
> > Dirty is larger than LEB size (253952). Must not happen.
> >
> > > >         1: free 0 dirty 190192 flags 1 lnum 0
> > > >         2: free 0 dirty 255360 flags 1 lnum 0
> >
> > Same.
> >
> > > >         3: free 0 dirty 248896 flags 1 lnum 0
> >
> > Does the problem also trigger with encryption disabled? So just with
> > authentication?

I couldn't trigger the same error with encryption disabled and authentication
enabled. Even if I enabled all the chk_* knobs under kernel/debug/ubifs/, no
failed assertion or error/warning log could be observed.

ubi0: attached mtd1 (name "ubivols", size 1023 MiB)
ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
ubi0: good PEBs: 4063, bad PEBs: 32, corrupted PEBs: 0
ubi0: user volume: 5, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence
number: 460709978
ubi0: available PEBs: 0, total reserved PEBs: 4063, PEBs reserved for
bad PEB handling: 48
ubi0: background thread "ubi_bgt0d" started, PID 638
rtc-rv8803 1-0032: setting system clock to 2020-09-21T09:11:23 UTC (1600679483)
UBIFS (ubi0:4): Mounting in authenticated mode
UBIFS (ubi0:4): background thread "ubifs_bgt0_4" started, PID 642
UBIFS (ubi0:4): UBIFS: mounted UBI device 0, volume 4, name "rootfs"
UBIFS (ubi0:4): LEB size: 253952 bytes (248 KiB), min./max. I/O unit
sizes: 4096 bytes/4096 bytes
UBIFS (ubi0:4): FS size: 1004888064 bytes (958 MiB, 3957 LEBs),
journal size 9404416 bytes (8 MiB, 38 LEBs)
UBIFS (ubi0:4): reserved for root: 0 bytes (0 KiB)
UBIFS (ubi0:4): media format: w4/r0 (latest is w5/r0), UUID
7BFF4409-EE99-4BAB-9091-16FFDEBBD78A, small LPT model
VFS: Mounted root (ubifs filesystem) on device 0:13.

>
> One more question, when you mount ubifs successuflly, you see a line like:
> UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID
> 942AA41D-81B8-4F57-9CE6-0548D0D0DCB0, big LPT model
>
> Does it print big LPT or small LPT model?

small LPT model.

UBIFS (ubi0:4): Mounting in authenticated mode
UBIFS (ubi0:4): Successfully verified super block signature
UBIFS (ubi0:4): background thread "ubifs_bgt0_4" started, PID 634
UBIFS (ubi0:4): UBIFS: mounted UBI device 0, volume 4, name "rootfs"
UBIFS (ubi0:4): LEB size: 253952 bytes (248 KiB), min./max. I/O unit
sizes: 4096 bytes/4096 bytes
UBIFS (ubi0:4): FS size: 1004888064 bytes (958 MiB, 3957 LEBs),
journal size 9404416 bytes (8 MiB, 38 LEBs)
UBIFS (ubi0:4): reserved for root: 0 bytes (0 KiB)
UBIFS (ubi0:4): media format: w5/r0 (latest is w5/r0), UUID
3F835B56-9D63-49F9-A3A8-4EFDF2800462, small LPT model
VFS: Mounted root (ubifs filesystem) on device 0:13.
fscrypt: AES-256-CTS-CBC using implementation "cts(atmel-cbc-aes)"
devtmpfs: mounted
Freeing unused kernel memory: 1024K
fscrypt: AES-256-XTS using implementation "xts(atmel-ecb-aes)"

Thank you,
        Kristof


On Sat, 19 Sep 2020 at 22:54, Richard Weinberger
<richard.weinberger@gmail.com> wrote:
>
> On Sat, Sep 19, 2020 at 10:02 PM Richard Weinberger
> <richard.weinberger@gmail.com> wrote:
> >
> > On Thu, Sep 17, 2020 at 4:48 PM Kristof Havasi <havasiefr@gmail.com> wrote:
> > > Without "chk_lprops" the panic is only visible after the restart, but if it was
> > > enabled the following assertion was triggering an immediate panic:
> > > (Should I "reformat" long log lines in the future or leave them verbatim?)
> > >
> > > UBIFS error (ubi0:4 pid 649): ubifs_assert_failed: UBIFS assert
> > > failed: (val >> nrbits) == 0 || nrbits == 32, in fs/ubifs/lpt.c:231
> > > UBIFS warning (ubi0:4 pid 649): ubifs_ro_mode.part.1: switched to
> >
> > Hm, the number of bits we ask to pack is smaller than val.
> > Maybe we have some subtle bug where a node length is not correctly
> > calculated.
> >
> > From your other mail:
> > > >         0: free 0 dirty 255408 flags 1 lnum 0
> >
> > Dirty is larger than LEB size (253952). Must not happen.
> >
> > > >         1: free 0 dirty 190192 flags 1 lnum 0
> > > >         2: free 0 dirty 255360 flags 1 lnum 0
> >
> > Same.
> >
> > > >         3: free 0 dirty 248896 flags 1 lnum 0
> >
> > Does the problem also trigger with encryption disabled? So just with
> > authentication?
>
> One more question, when you mount ubifs successuflly, you see a line like:
> UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID
> 942AA41D-81B8-4F57-9CE6-0548D0D0DCB0, big LPT model
>
> Does it print big LPT or small LPT model?
>
> --
> Thanks,
> //richard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2020-09-21  9:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 14:43 UBIFS-AUTH panic after reboot Kristof Havasi
2020-09-17 13:23 ` Richard Weinberger
2020-09-17 14:48   ` Kristof Havasi
2020-09-19 20:02     ` Richard Weinberger
2020-09-19 20:54       ` Richard Weinberger
2020-09-21  9:23         ` Kristof Havasi [this message]
2020-09-21  9:51           ` Richard Weinberger
2020-09-21 10:41             ` Kristof Havasi
2020-09-27 19:27               ` Richard Weinberger
2020-09-28  8:56                 ` Kristof Havasi
     [not found]                   ` <CADBnMvhxXdvjrA80z65zjzGffpT59+KcVq7bhqyQ7oBUpc=5=w@mail.gmail.com>
2020-09-29  8:45                     ` Richard Weinberger

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='CADBnMvhcowEVqUYwg3vVK-F-=N+mRNQAsaihXuUorW-iWnWcxg@mail.gmail.com' \
    --to=havasiefr@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard.weinberger@gmail.com \
    --cc=s.hauer@pengutronix.de \
    /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.