* [PATCH] Revert "tty: serial: 8250: add CON_CONSDEV to flags"
@ 2016-12-11 2:05 Herbert Xu
2016-12-11 7:12 ` Greg Kroah-Hartman
0 siblings, 1 reply; 7+ messages in thread
From: Herbert Xu @ 2016-12-11 2:05 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-serial, Linux Kernel Mailing List,
Matthew Leach
This commit needs to be reverted because it prevents people from
using the serial console as a secondary console with input being
directed to tty0.
IOW, if you boot with console=ttyS0 console=tty0 then all kernels
prior to this commit will produce output on both ttyS0 and tty0
but input will only be taken from tty0. With this patch the serial
console will always be the primary console instead of tty0,
potentially preventing people from getting into their machines in
emergency situations.
Fixes: d03516df8375 ("tty: serial: 8250: add CON_CONSDEV to flags")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 240a361..e8819aa 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -675,7 +675,7 @@ static int univ8250_console_match(struct console *co, char *name, int idx,
.device = uart_console_device,
.setup = univ8250_console_setup,
.match = univ8250_console_match,
- .flags = CON_PRINTBUFFER | CON_ANYTIME | CON_CONSDEV,
+ .flags = CON_PRINTBUFFER | CON_ANYTIME,
.index = -1,
.data = &serial8250_reg,
};
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] Revert "tty: serial: 8250: add CON_CONSDEV to flags"
2016-12-11 2:05 [PATCH] Revert "tty: serial: 8250: add CON_CONSDEV to flags" Herbert Xu
@ 2016-12-11 7:12 ` Greg Kroah-Hartman
0 siblings, 0 replies; 7+ messages in thread
From: Greg Kroah-Hartman @ 2016-12-11 7:12 UTC (permalink / raw)
To: Herbert Xu; +Cc: linux-serial, Linux Kernel Mailing List, Matthew Leach
On Sun, Dec 11, 2016 at 10:05:49AM +0800, Herbert Xu wrote:
> This commit needs to be reverted because it prevents people from
> using the serial console as a secondary console with input being
> directed to tty0.
>
> IOW, if you boot with console=ttyS0 console=tty0 then all kernels
> prior to this commit will produce output on both ttyS0 and tty0
> but input will only be taken from tty0. With this patch the serial
> console will always be the primary console instead of tty0,
> potentially preventing people from getting into their machines in
> emergency situations.
>
> Fixes: d03516df8375 ("tty: serial: 8250: add CON_CONSDEV to flags")
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
> index 240a361..e8819aa 100644
> --- a/drivers/tty/serial/8250/8250_core.c
> +++ b/drivers/tty/serial/8250/8250_core.c
> @@ -675,7 +675,7 @@ static int univ8250_console_match(struct console *co, char *name, int idx,
> .device = uart_console_device,
> .setup = univ8250_console_setup,
> .match = univ8250_console_match,
> - .flags = CON_PRINTBUFFER | CON_ANYTIME | CON_CONSDEV,
> + .flags = CON_PRINTBUFFER | CON_ANYTIME,
> .index = -1,
> .data = &serial8250_reg,
> };
Ok, this is the second time this has been reported. Matthew seems to be
ignoring my email about this, so I guess I'll just revert the patch, as
it's obviously causing problems...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] Revert "tty: serial: 8250: add CON_CONSDEV to flags"
@ 2016-11-14 2:53 Huacai Chen
2016-11-14 11:49 ` Greg Kroah-Hartman
0 siblings, 1 reply; 7+ messages in thread
From: Huacai Chen @ 2016-11-14 2:53 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-serial, Matthew Leach, Huacai Chen, stable, Ce Sun
This reverts commit d03516df837587368fc6e75591f6329c072b9eb5. From
Documentation/serial-console.txt we can know that serial port becomes
the system console only when it appears in the kernel parameters as the
last console device. But commit d03516df837587 adds a CON_CONSDEV flag
to univ8250_console and breaks this convention. After that either we
use "console=tty console=ttyS0" or "console=ttyS0 console=tty", serial
port will always be the system console.
Cc: stable@vger.kernel.org
Signed-off-by: Ce Sun <sunc@lemote.com>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
drivers/tty/serial/8250/8250_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 240a361..e8819aa 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -675,7 +675,7 @@ static struct console univ8250_console = {
.device = uart_console_device,
.setup = univ8250_console_setup,
.match = univ8250_console_match,
- .flags = CON_PRINTBUFFER | CON_ANYTIME | CON_CONSDEV,
+ .flags = CON_PRINTBUFFER | CON_ANYTIME,
.index = -1,
.data = &serial8250_reg,
};
--
2.7.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] Revert "tty: serial: 8250: add CON_CONSDEV to flags"
2016-11-14 2:53 Huacai Chen
@ 2016-11-14 11:49 ` Greg Kroah-Hartman
2017-01-17 7:34 ` 陈华才
0 siblings, 1 reply; 7+ messages in thread
From: Greg Kroah-Hartman @ 2016-11-14 11:49 UTC (permalink / raw)
To: Huacai Chen; +Cc: linux-serial, Matthew Leach, stable, Ce Sun
On Mon, Nov 14, 2016 at 10:53:41AM +0800, Huacai Chen wrote:
> This reverts commit d03516df837587368fc6e75591f6329c072b9eb5. From
> Documentation/serial-console.txt we can know that serial port becomes
> the system console only when it appears in the kernel parameters as the
> last console device. But commit d03516df837587 adds a CON_CONSDEV flag
> to univ8250_console and breaks this convention. After that either we
> use "console=tty console=ttyS0" or "console=ttyS0 console=tty", serial
> port will always be the system console.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Ce Sun <sunc@lemote.com>
> Signed-off-by: Huacai Chen <chenhc@lemote.com>
> ---
> drivers/tty/serial/8250/8250_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
> index 240a361..e8819aa 100644
> --- a/drivers/tty/serial/8250/8250_core.c
> +++ b/drivers/tty/serial/8250/8250_core.c
> @@ -675,7 +675,7 @@ static struct console univ8250_console = {
> .device = uart_console_device,
> .setup = univ8250_console_setup,
> .match = univ8250_console_match,
> - .flags = CON_PRINTBUFFER | CON_ANYTIME | CON_CONSDEV,
> + .flags = CON_PRINTBUFFER | CON_ANYTIME,
> .index = -1,
> .data = &serial8250_reg,
> };
Odd. Matthew, any thoughts here? This seems to be the opposite of why
you submitted this change...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] Revert "tty: serial: 8250: add CON_CONSDEV to flags"
2016-11-14 11:49 ` Greg Kroah-Hartman
@ 2017-01-17 7:34 ` 陈华才
2017-01-17 7:54 ` Greg Kroah-Hartman
0 siblings, 1 reply; 7+ messages in thread
From: 陈华才 @ 2017-01-17 7:34 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-serial, Matthew Leach, stable, Ce Sun
Ping?
------------------ Original ------------------
From: "Greg Kroah-Hartman"<gregkh@linuxfoundation.org>;
Date: Mon, Nov 14, 2016 07:49 PM
To: "Huacai Chen"<chenhc@lemote.com>;
Cc: "linux-serial"<linux-serial@vger.kernel.org>; "Matthew Leach"<matthew.leach@codethink.co.uk>; "stable"<stable@vger.kernel.org>; "Ce Sun"<sunc@lemote.com>;
Subject: Re: [PATCH] Revert "tty: serial: 8250: add CON_CONSDEV to flags"
On Mon, Nov 14, 2016 at 10:53:41AM +0800, Huacai Chen wrote:
> This reverts commit d03516df837587368fc6e75591f6329c072b9eb5. From
> Documentation/serial-console.txt we can know that serial port becomes
> the system console only when it appears in the kernel parameters as the
> last console device. But commit d03516df837587 adds a CON_CONSDEV flag
> to univ8250_console and breaks this convention. After that either we
> use "console=tty console=ttyS0" or "console=ttyS0 console=tty", serial
> port will always be the system console.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Ce Sun <sunc@lemote.com>
> Signed-off-by: Huacai Chen <chenhc@lemote.com>
> ---
> drivers/tty/serial/8250/8250_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
> index 240a361..e8819aa 100644
> --- a/drivers/tty/serial/8250/8250_core.c
> +++ b/drivers/tty/serial/8250/8250_core.c
> @@ -675,7 +675,7 @@ static struct console univ8250_console = {
> .device = uart_console_device,
> .setup = univ8250_console_setup,
> .match = univ8250_console_match,
> - .flags = CON_PRINTBUFFER | CON_ANYTIME | CON_CONSDEV,
> + .flags = CON_PRINTBUFFER | CON_ANYTIME,
> .index = -1,
> .data = &serial8250_reg,
> };
Odd. Matthew, any thoughts here? This seems to be the opposite of why
you submitted this change...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] Revert "tty: serial: 8250: add CON_CONSDEV to flags"
2017-01-17 7:34 ` 陈华才
@ 2017-01-17 7:54 ` Greg Kroah-Hartman
2017-01-17 8:01 ` 陈华才
0 siblings, 1 reply; 7+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-17 7:54 UTC (permalink / raw)
To: 陈华才; +Cc: linux-serial, Matthew Leach, stable, Ce Sun
On Tue, Jan 17, 2017 at 03:34:07PM +0800, 陈华才 wrote:
> Ping?
Huh? This is now in 4.10-rc4, right? What are you pinging for?
confused,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Revert "tty: serial: 8250: add CON_CONSDEV to flags"
2017-01-17 7:54 ` Greg Kroah-Hartman
@ 2017-01-17 8:01 ` 陈华才
0 siblings, 0 replies; 7+ messages in thread
From: 陈华才 @ 2017-01-17 8:01 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-serial, Matthew Leach, stable, Ce Sun
Oh, I'm sorry. I havn't seen that some others submitted a same patch.
Huacai
------------------ Original ------------------
From: "Greg Kroah-Hartman"<gregkh@linuxfoundation.org>;
Date: Tue, Jan 17, 2017 03:54 PM
To: "陈华才"<chenhc@lemote.com>;
Cc: "linux-serial"<linux-serial@vger.kernel.org>; "Matthew Leach"<matthew.leach@codethink.co.uk>; "stable"<stable@vger.kernel.org>; "Ce Sun"<sunc@lemote.com>;
Subject: Re: [PATCH] Revert "tty: serial: 8250: add CON_CONSDEV to flags"
On Tue, Jan 17, 2017 at 03:34:07PM +0800, 陈华才 wrote:
> Ping?
Huh? This is now in 4.10-rc4, right? What are you pinging for?
confused,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-01-17 8:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-11 2:05 [PATCH] Revert "tty: serial: 8250: add CON_CONSDEV to flags" Herbert Xu
2016-12-11 7:12 ` Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2016-11-14 2:53 Huacai Chen
2016-11-14 11:49 ` Greg Kroah-Hartman
2017-01-17 7:34 ` 陈华才
2017-01-17 7:54 ` Greg Kroah-Hartman
2017-01-17 8:01 ` 陈华才
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).