From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754277AbdGNM54 (ORCPT ); Fri, 14 Jul 2017 08:57:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26635 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753626AbdGNM5y (ORCPT ); Fri, 14 Jul 2017 08:57:54 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B9587C04D2EF Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fdinitto@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B9587C04D2EF Subject: Re: [PATCH 0/2] Avoid crashes by early (boot) consoles using init memory To: Petr Mladek , Sergey Senozhatsky , Steven Rostedt Cc: Andrew Morton , Peter Zijlstra , Matt Redfearn , Greg Kroah-Hartman , Jiri Slaby , "David S. Miller" , Alan Cox , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky References: <1500036673-7122-1-git-send-email-pmladek@suse.com> From: "Fabio M. Di Nitto" Message-ID: <956ce40c-1640-387a-0ec9-9045c7d8af4b@redhat.com> Date: Fri, 14 Jul 2017 14:57:45 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1500036673-7122-1-git-send-email-pmladek@suse.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 14 Jul 2017 12:57:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Petr, On 7/14/2017 2:51 PM, Petr Mladek wrote: > 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. Let´s just keep in mind that keep_bootcon was introduced only to debug issues (read crashes or hangs) that could happen between disabling bootconsole and enabling the real console. It shouldn´t be used for anything else really. If the new code can replace keep_bootcon, by all mean, go for it :-) Cheers Fabio > 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(-) >