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: <159896088820.20229.8665357366832877434.tip-bot2@tip-bot2>
Date:   Tue, 01 Sep 2020 11:48:08 -0000
From:   "tip-bot2 for Peter Zijlstra" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>,
        Miroslav Benes <mbenes@...e.cz>, Jessica Yu <jeyu@...nel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>, x86 <x86@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: [tip: core/static_call] module: Properly propagate
 MODULE_STATE_COMING failure

The following commit has been merged into the core/static_call branch of tip:

Commit-ID:     59cc8e0a906ea23190922e5e0252e5b5a60d70c2
Gitweb:        https://git.kernel.org/tip/59cc8e0a906ea23190922e5e0252e5b5a60d70c2
Author:        Peter Zijlstra <peterz@...radead.org>
AuthorDate:    Tue, 18 Aug 2020 15:57:38 +02:00
Committer:     Ingo Molnar <mingo@...nel.org>
CommitterDate: Tue, 01 Sep 2020 09:58:04 +02:00

module: Properly propagate MODULE_STATE_COMING failure

Now that notifiers got unbroken; use the proper interface to handle
notifier errors and propagate them.

There were already MODULE_STATE_COMING notifiers that failed; notably:

 - jump_label_module_notifier()
 - tracepoint_module_notify()
 - bpf_event_notify()

By propagating this error, we fix those users.

Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Reviewed-by: Miroslav Benes <mbenes@...e.cz>
Acked-by: Jessica Yu <jeyu@...nel.org>
Acked-by: Josh Poimboeuf <jpoimboe@...hat.com>
Link: https://lore.kernel.org/r/20200818135804.444372853@infradead.org
---
 kernel/module.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index 1c5cff3..3c465cf 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3792,9 +3792,13 @@ static int prepare_coming_module(struct module *mod)
 	if (err)
 		return err;
 
-	blocking_notifier_call_chain(&module_notify_list,
-				     MODULE_STATE_COMING, mod);
-	return 0;
+	err = blocking_notifier_call_chain_robust(&module_notify_list,
+			MODULE_STATE_COMING, MODULE_STATE_GOING, mod);
+	err = notifier_to_errno(err);
+	if (err)
+		klp_module_going(mod);
+
+	return err;
 }
 
 static int unknown_module_param_cb(char *param, char *val, const char *modname,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ