Message ID | 20220531193343.5130-1-tim.gardner@canonical.com |
---|---|
State | New |
Headers | show |
Though limited to the azure kernel, it seems a good candidate for all kernels.
Good work on referring to commit 3cffa06aeef7ece30f6b5ac0ea51f264e8fea4d0,
which was added to our 5.4 kernel before the user_specified parameter was
added, and was thus missing it on a call to __add_prefered_console.
I found no commits upstream with Fixes: or other reference to either of the
commits.
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
On 5/31/22 15:33, Tim Gardner wrote: > BugLink: https://bugs.launchpad.net/bugs/1976399 > > SRU Justification > > [Impact] > > There is duplicate output on the console . LSG team identify the root cause and suggested to apply two patches below. > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ad8cd1db80cc33337bdbee63c453ef6d5132474b > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e369d8227fd211be36242fc44a9dc2209e246b9a > > What we are hitting is exactly in the second commit's log. Ubuntu kernel also needs the following diff: > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index f07367100ece..dca15e27123a 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -2203,7 +2203,7 @@ static int __init console_setup(char *str) > * for exacly this purpose. > */ > if (str[0] == 0 || strcmp(str, "null") == 0) { > - __add_preferred_console("ttynull", 0, NULL, NULL); > + __add_preferred_console("ttynull", 0, NULL, NULL, true); > return 1; > } > > Linux kernel: 5.4.0-1078-azure > Tested in Azure > Host version: 22477.1101-1-0 > Image: Canonical 0002-com-ubuntu-server-arm-preview-bionic 18_04-lts 18.04.202205020 > > From Azure Serial Console, we can see duplicate output. > > Such as: > > [ 3.109140] Platform Keyring initialized > [ 3.109140] Platform Keyring initialized > [ 3.117148] Key type asymmetric registered > [ 3.117148] Key type asymmetric registered > [ 3.122303] Asymmetric key parser 'x509' registered > [ 3.122303] Asymmetric key parser 'x509' registered > > [Test Plan] > > Microsoft tested > > [Where things could go wrong] > > The kernel log could get corrupted. > > [Other Info] > > SF: #00338148 > > Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
On 5/31/22 13:33, Tim Gardner wrote: > BugLink: https://bugs.launchpad.net/bugs/1976399 > > SRU Justification > > [Impact] > > There is duplicate output on the console . LSG team identify the root cause and suggested to apply two patches below. > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ad8cd1db80cc33337bdbee63c453ef6d5132474b > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e369d8227fd211be36242fc44a9dc2209e246b9a > > What we are hitting is exactly in the second commit's log. Ubuntu kernel also needs the following diff: > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index f07367100ece..dca15e27123a 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -2203,7 +2203,7 @@ static int __init console_setup(char *str) > * for exacly this purpose. > */ > if (str[0] == 0 || strcmp(str, "null") == 0) { > - __add_preferred_console("ttynull", 0, NULL, NULL); > + __add_preferred_console("ttynull", 0, NULL, NULL, true); > return 1; > } > > Linux kernel: 5.4.0-1078-azure > Tested in Azure > Host version: 22477.1101-1-0 > Image: Canonical 0002-com-ubuntu-server-arm-preview-bionic 18_04-lts 18.04.202205020 > > From Azure Serial Console, we can see duplicate output. > > Such as: > > [ 3.109140] Platform Keyring initialized > [ 3.109140] Platform Keyring initialized > [ 3.117148] Key type asymmetric registered > [ 3.117148] Key type asymmetric registered > [ 3.122303] Asymmetric key parser 'x509' registered > [ 3.122303] Asymmetric key parser 'x509' registered > > [Test Plan] > > Microsoft tested > > [Where things could go wrong] > > The kernel log could get corrupted. > > [Other Info] > > SF: #00338148 > Applied to focal/linux-azure:master-next. Thanks. -rtg
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index f07367100ece..dca15e27123a 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2203,7 +2203,7 @@ static int __init console_setup(char *str) * for exacly this purpose. */ if (str[0] == 0 || strcmp(str, "null") == 0) { - __add_preferred_console("ttynull", 0, NULL, NULL); + __add_preferred_console("ttynull", 0, NULL, NULL, true); return 1; }