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]
Message-ID: <20201220034505.113118-1-nixiaoming@huawei.com>
Date:   Sun, 20 Dec 2020 11:45:01 +0800
From:   Xiaoming Ni <nixiaoming@...wei.com>
To:     <linux-kernel@...r.kernel.org>, <linux-leds@...r.kernel.org>,
        <pavel@....cz>, <dmurphy@...com>, <akpm@...ux-foundation.org>,
        <keescook@...omium.org>, <gpiccoli@...onical.com>,
        <penguin-kernel@...ove.sakura.ne.jp>, <rdunlap@...radead.org>
CC:     <nixiaoming@...wei.com>, <wangle6@...wei.com>
Subject: [PATCH v2 0/4] panic: Add new API in_panic_state()

For some features (such as hang_task, ledtrig-activity, ledtrig-heartbeat)
different processing logics need to be performed based on whether the
current system is in panic state:
	1: Register hook for panic_notifier_list.
	2. Assign a value to the global variable in the hook function.
	3. Determine whether the system is in panic state based on the
          global variable and perform different processing.
Duplicate code snippets exist, and the timing judgment is relatively lag.
Therefore, consider extracting the new API: bool in_panic_state(void).

----------------

v2: Rename api to in_panic_state as recommended by Pavel Machek, Tetsuo
 Handa, Randy Dunlap.

v1: https://lore.kernel.org/lkml/20201218114406.61906-1-nixiaoming@huawei.com/
  API name: is_being_panic
----------------

Xiaoming Ni (4):
  panic: Add new API in_panic_state()
  hung_task: Replace "did_panic" with in_panic_state()
  leds:trigger:ledtrig-activity Replace "panic_detected" with
    in_panic_state()
  leds:trigger:ledtrig-heartbeat: Replace "panic_heartbeats" with
    in_panic_state()

 drivers/leds/trigger/ledtrig-activity.c  | 19 +------------------
 drivers/leds/trigger/ledtrig-heartbeat.c | 19 +------------------
 include/linux/kernel.h                   |  1 +
 kernel/hung_task.c                       | 17 +----------------
 kernel/panic.c                           |  6 ++++++
 5 files changed, 10 insertions(+), 52 deletions(-)

-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ