Re: ubiblock: null pointer dereference using scatterlist in work_queue

Wurm, Stephan
2023-07-21T07:41:55Z

Am 19.07.2023 um 16:38 hat Stephan Wurm geschrieben:
> Am 19.07.2023 um 16:31 hat Richard Weinberger geschrieben:
> > ----- Ursprüngliche Mail -----
> > > Von: "Stephan Wurm" <stephan.wurm@a-eberle.de>
> > >> > We did not check other stacked devices, but we'll give this a try.
> >
> > Did you find the time to check with dmcrypt?
> Unfortunately not. I am still preparing this and I do not have access on
> the hardware until Friday.
Today I was able to build the system with dm-crypt (using LUKS2 and
PBKDF2) and successfully boot from sdcard.

But when booting from the ubiblock device, I get the same null pointer
dereference as for dm-verity.

This really seems to be related to devicemapper interfering with the
ubiblock device.

To add some more details on the setup, here is the output of ubinfo:

# ubinfo -a
UBI version: 1
Count of UBI devices: 1
UBI control device major/minor: 10:125
Present UBI devices: ubi0

ubi0
Volumes count: 5
Logical eraseblock size: 253952 bytes, 248.0 KiB
Total amount of logical eraseblocks: 4092 (1039171584 bytes, 991.0
MiB)
Amount of available logical eraseblocks: 177 (44949504 bytes, 42.8 MiB)
Maximum count of volumes 128
Count of bad physical eraseblocks: 4
Count of reserved physical eraseblocks: 76
Current maximum erase counter value: 56
Minimum input/output unit size: 4096 bytes
Character device major/minor: 242:0
Present volumes: 0, 1, 2, 3, 4

Volume ID: 0 (on ubi0)
Type: dynamic
Alignment: 1
Size: 248 LEBs (62980096 bytes, 60.0 MiB)
State: OK
Name: fit0
Character device major/minor: 242:1
-----------------------------------
Volume ID: 1 (on ubi0)
Type: dynamic
Alignment: 1
Size: 248 LEBs (62980096 bytes, 60.0 MiB)
State: OK
Name: fit1
Character device major/minor: 242:2
-----------------------------------
Volume ID: 2 (on ubi0)
Type: static
Alignment: 1
Size: 1404 LEBs (356548608 bytes, 340.0 MiB)
Data bytes: 137355264 bytes (130.9 MiB)
State: OK
Name: root0
Character device major/minor: 242:3
-----------------------------------
Volume ID: 3 (on ubi0)
Type: static
Alignment: 1
Size: 1404 LEBs (356548608 bytes, 340.0 MiB)
Data bytes: 168460288 bytes (160.6 MiB)
State: OK
Name: root1
Character device major/minor: 242:4
-----------------------------------
Volume ID: 4 (on ubi0)
Type: dynamic
Alignment: 1
Size: 529 LEBs (134340608 bytes, 128.1 MiB)
State: OK
Name: data
Character device major/minor: 242:5

Thanks
--
Stephan Wurm <stephan.wurm@a-eberle.de>