Re: [PATCH printk v5 6/6] printk: reimplement log_cont using record extension

From: Marek Szyprowski
Date: Fri Sep 25 2020 - 16:17:26 EST


Hi again,

On 25.09.2020 21:08, Marek Szyprowski wrote:
> Hi John,
>
> On 14.09.2020 14:33, John Ogness wrote:
>> Use the record extending feature of the ringbuffer to implement
>> continuous messages. This preserves the existing continuous message
>> behavior.
>>
>> Signed-off-by: John Ogness <john.ogness@xxxxxxxxxxxxx>
>> Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>
>
> This patch landed recently in linux-next as commit f5f022e53b87
> ("printk: reimplement log_cont using record extension"). I've noticed
> that it causes a regression on my test system (ARM 32bit Samsung
> Exynos 4412-based Trats2 board). The messages are printed correctly on
> the serial console during boot, but then when I run 'dmesg' command,
> the log is truncated.
>
> Here is are the last lines of the dmesg log after this patch:
>
> [    6.649018] Waiting 2 sec before mounting root device...
> [    6.766423] dwc2 12480000.hsotg: new device is high-speed
> [    6.845290] dwc2 12480000.hsotg: new device is high-speed
> [    6.914217] dwc2 12480000.hsotg: new address 51
> [    8.710351] RAMDISK: squashfs filesystem found at block 0
>
> The corresponding dmesg lines before applying this patch:
>
> [    8.864320] RAMDISK: squashfs filesystem found at block 0
> [    8.868410] RAMDISK: Loading 37692KiB [1 disk] into ram disk... /
> [    9.071670] /
> [    9.262498] /
> [    9.540711] /
> [    9.818031] done.
> [   10.660074] VFS: Mounted root (squashfs filesystem) readonly on
> device 1:0.
> [   10.739525] EXT4-fs (mmcblk0p1): INFO: recovery required on
> readonly filesystem
> [   10.745347] EXT4-fs (mmcblk0p1): write access will be enabled
> during recovery
> [   10.861129] EXT4-fs (mmcblk0p1): recovery complete
> [   10.878150] EXT4-fs (mmcblk0p1): mounted filesystem with ordered
> data mode. Opts: (null)
> [   10.881811] VFS: Mounted root (ext4 filesystem) readonly on device
> 179:49.
> [   10.889858] Trying to move old root to /initrd ...
> [   10.895192] okay
> [   10.914411] devtmpfs: mounted
> [   10.925087] Freeing unused kernel memory: 1024K
> [   10.933222] Run /sbin/init as init process
> [   10.941723]   with arguments:
> [   10.949890]     /sbin/init
> [   10.949900]   with environment:
> [   10.949909]     HOME=/
> [   10.949917]     TERM=linux
> [   12.415991] random: systemd-udevd: uninitialized urandom read (16
> bytes read)
> [   12.425361] random: systemd-udevd: uninitialized urandom read (16
> bytes read)
> [   12.438578] random: systemd-udevd: uninitialized urandom read (16
> bytes read)
>
> ...
>
> I can provide a complete logs if that helps.

One more information - this issue happens only if the kernel is compiled
from exynos_defconfig. If use multi_v7_defconfig, the dmesg works fine
on that board. exynos_defconfig has quite a lots of debugging options
enabled...

Best regards

--
Marek Szyprowski, PhD
Samsung R&D Institute Poland