linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Avoid crashes by early (boot) consoles using init memory
@ 2017-07-14 12:51 Petr Mladek
  2017-07-14 12:51 ` [PATCH 1/2] printk/console: Always disable boot consoles that use init memory before it is freed Petr Mladek
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Petr Mladek @ 2017-07-14 12:51 UTC (permalink / raw)
  To: Sergey Senozhatsky, Steven Rostedt
  Cc: Andrew Morton, Peter Zijlstra, Matt Redfearn, Greg Kroah-Hartman,
	Jiri Slaby, David S. Miller, Alan Cox, Fabio M. Di Nitto,
	linux-serial, linux-kernel, Sergey Senozhatsky, Petr Mladek

Some early consoles have code and data in the init section. It makes some
sense but this might cause problems when they are not replaced by
the real console in time. The two patches fix the safequard and
help to avoid the problems.

I though about removing keep_bootcon option completely. But it is useful
at least for now. There is not an easy way to disable a particular bootconsole
when the related real console is installed. Instead all bootconsoles are
removed when the preferred (last on the commandline) console is registered.
But this is a bit cumbersome and non-intuitive.

In addition, the same problems might happen when the real console is
registered using a deferred probe or when it is not registered at all
for some reason.

The patchset is based on and inspired by the original patch from
Matt Redfearn, see the discussion starting by the mail
https://lkml.kernel.org/r/1499337481-19397-1-git-send-email-matt.redfearn@imgtec.com

Matt Redfearn (1):
  printk/console: Always disable boot consoles that use init memory
    before it is freed

Petr Mladek (1):
  printk/console: Enhance the check for consoles using init memory

 kernel/printk/printk.c | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

-- 
1.8.5.6

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-07-27 10:08 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-14 12:51 [PATCH 0/2] Avoid crashes by early (boot) consoles using init memory Petr Mladek
2017-07-14 12:51 ` [PATCH 1/2] printk/console: Always disable boot consoles that use init memory before it is freed Petr Mladek
2017-07-26 13:07   ` Sergey Senozhatsky
2017-07-14 12:51 ` [PATCH 2/2] printk/console: Enhance the check for consoles using init memory Petr Mladek
2017-07-14 22:06   ` Sergey Senozhatsky
2017-07-21 14:32     ` Petr Mladek
2017-07-24  2:03       ` Sergey Senozhatsky
2017-07-27  9:28         ` Petr Mladek
2017-07-27  9:52           ` Sergey Senozhatsky
2017-07-26 13:08   ` Sergey Senozhatsky
2017-07-27  9:29     ` Petr Mladek
2017-07-27  9:51       ` Sergey Senozhatsky
2017-07-27 10:08         ` Petr Mladek
2017-07-14 12:57 ` [PATCH 0/2] Avoid crashes by early (boot) " Fabio M. Di Nitto
2017-07-14 14:37   ` Petr Mladek
2017-07-15  5:05     ` Fabio M. Di Nitto

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).