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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210216103506.416286-2-vincent.donnefort@arm.com>
Date:   Tue, 16 Feb 2021 10:35:04 +0000
From:   vincent.donnefort@....com
To:     peterz@...radead.org, tglx@...utronix.de
Cc:     linux-kernel@...r.kernel.org, valentin.schneider@....com,
        Vincent Donnefort <vincent.donnefort@....com>
Subject: [PATCH v2 1/3] cpu/hotplug: Allowing to reset fail injection

From: Vincent Donnefort <vincent.donnefort@....com>

Currently, the only way of resetting the fail injection is to trigger a
hotplug, hotunplug or both. This is rather annoying for testing
and, as the default value for this file is -1, it seems pretty natural to
let a user write it.

Signed-off-by: Vincent Donnefort <vincent.donnefort@....com>

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 4e11e91010e1..093f96fb0824 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -2200,6 +2200,11 @@ static ssize_t write_cpuhp_fail(struct device *dev,
 	if (ret)
 		return ret;
 
+	if (fail == CPUHP_INVALID) {
+		st->fail = fail;
+		return count;
+	}
+
 	if (fail < CPUHP_OFFLINE || fail > CPUHP_ONLINE)
 		return -EINVAL;
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ