CONFIG_LOG_BUF_SHIFT set to 14 is too low on arm64
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Invalid
|
Undecided
|
Unassigned | ||
Disco |
Fix Released
|
Undecided
|
Unassigned | ||
Eoan |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* Too small dmsg kernel buf ring size leads to loosing/missing early boot kernel messages which happen before journald starts slurping them up and storing them on disc. This results in messages similar to this one on boot "missed NN kernel messages on boot". This is especially pronounced on arm64 as the default setting there is way lower than any other 32bit or 64bit architecture we ship. Also amd64 appears to have the highest setting of 18 among all architectures we ship. The best course of action to bump all 64bit arches to 18, and keep all 32bit arches at the current & upstream default of 17.
[Test Case]
* $ cat /boot/config-`uname -r` | grep CONFIG_
on 64bit arches result should be: CONFIG_
on 32bit arches result should be: CONFIG_
* run systemd adt test, the boot-and-services test case should not fail journald tests with "missed kernel messages" visible in the error logs.
[Regression Potential]
* Increasing the size of the log_buf, will increase kernel memory usage which cannot be reclaimed. It will now become 256kb on arm64, ppc64el, s390x instead of 8kB/128kb/128kb respectively. 32bit arches remain unchanged at 128kb.
[Other Info]
* Original bug report
CONFIG_
policy<{
'amd64' : '18',
'arm64' : '14',
'armhf' : '17',
'i386' : '17',
'ppc64el': '17',
's390x' : '17'}>
Please set CONFIG_
Potentially bump all 64-bit arches to 18 (or higher!) as was done on amd64, meaning set 18 on arm64 s390x ppc64el.
I have a systemd autopkgtest test that asserts that we see Linux kernel command line in the dmesg (journalctl -k -b). And it is consistently failing on arm64 scalingstack KVM EFI machines with messages of "missing 81 kernel messages".
config LOG_BUF_SHIFT
int "Kernel log buffer size (16 => 64KB, 17 => 128KB)"
range 12 25
default 17
depends on PRINTK
help
Select the minimal kernel log buffer size as a power of 2.
The final size is affected by LOG_CPU_
by "log_buf_len" boot parameter.
Examples:
14 sounds like redictiously low for arm64. given that 17 is default across 32-bit arches, and 18 is default on amd64.
On a related note, we have CONFIG_
I'm not sure if we want to bump these up to LOG_BUF_SHIFT size or not.
Please backport this to xenial and up.
=== systemd ===
systemd, boot-and-services test case can bump the ring buffer before running the tests.
CVE References
tags: | added: bot-stop-nagging |
summary: |
- CONFIG_LOG_BUF_SHIFT is too low on arm64 + CONFIG_LOG_BUF_SHIFT set to 14 is too low on arm64 |
description: | updated |
Changed in linux (Ubuntu Disco): | |
status: | Incomplete → Confirmed |
Changed in linux (Ubuntu Cosmic): | |
status: | Incomplete → Confirmed |
Changed in linux (Ubuntu Bionic): | |
status: | Incomplete → Confirmed |
Changed in linux (Ubuntu Xenial): | |
status: | Incomplete → Confirmed |
description: | updated |
description: | updated |
Changed in linux (Ubuntu Disco): | |
status: | Confirmed → Fix Committed |
Changed in linux (Ubuntu Eoan): | |
status: | Confirmed → Fix Released |
Changed in linux (Ubuntu Bionic): | |
status: | Confirmed → Fix Committed |
Changed in linux (Ubuntu Cosmic): | |
status: | Confirmed → Fix Committed |
Changed in linux (Ubuntu Xenial): | |
status: | Confirmed → Fix Committed |
Changed in linux (Ubuntu Cosmic): | |
status: | Fix Committed → Invalid |
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1824864
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.