lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 9 Apr 2019 23:17:14 +0900
From:   Jinyoung Park <gt.jypark@...il.com>
To:     Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will.deacon@....com>,
        Alex Van Brunt <avanbrunt@...dia.com>,
        Ketan Patil <ketanp@...dia.com>
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] arch: arm64: process: Unlock console after SMP stopped

If the console lock is held by other CPU running while the system is
restarting or shutting down, the Kernel messages in the printk log buffer
can not be printed out to the console drivers. The Kernel messages can be
lost or messed up.
This change calls console_unlock after SMP stopped to flush the kernel
messages in the printk log buffer to the console drivers.

Signed-off-by: Jinyoung Park <jinyoungp@...dia.com>
---
 arch/arm64/kernel/process.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index 3767fb21a5b8..d629a75c7602 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -49,6 +49,7 @@
 #include <trace/events/power.h>
 #include <linux/percpu.h>
 #include <linux/thread_info.h>
+#include <linux/console.h>

 #include <asm/alternative.h>
 #include <asm/arch_gicv3.h>
@@ -164,6 +165,7 @@ void machine_halt(void)
 {
  local_irq_disable();
  smp_send_stop();
+ console_unlock();
  while (1);
 }

@@ -177,6 +179,7 @@ void machine_power_off(void)
 {
  local_irq_disable();
  smp_send_stop();
+ console_unlock();
  if (pm_power_off)
  pm_power_off();
 }
@@ -195,6 +198,7 @@ void machine_restart(char *cmd)
  /* Disable interrupts first */
  local_irq_disable();
  smp_send_stop();
+ console_unlock();

  /*
  * UpdateCapsule() depends on the system being reset via
-- 
2.19.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ