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] [day] [month] [year] [list]
Message-ID: <20180625090258.mkai3zmgt6bkafgx@linux-5o07>
Date:   Mon, 25 Jun 2018 11:02:58 +0200
From:   Jessica Yu <jeyu@...nel.org>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] module: print sensible error code

+++ Jason A. Donenfeld [22/06/18 17:38 +0200]:
>Printing "err 0" to the user in the warning message is not particularly
>useful, especially when this gets transformed into a -ENOENT for the
>remainder of the call chain.
>
>Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>

Applied, thanks.

Jessica

>---
> kernel/module.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/kernel/module.c b/kernel/module.c
>index f475f30eed8c..c666ab4139f4 100644
>--- a/kernel/module.c
>+++ b/kernel/module.c
>@@ -2282,9 +2282,9 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
> 			if (!ksym && ELF_ST_BIND(sym[i].st_info) == STB_WEAK)
> 				break;
>
>-			pr_warn("%s: Unknown symbol %s (err %li)\n",
>-				mod->name, name, PTR_ERR(ksym));
> 			ret = PTR_ERR(ksym) ?: -ENOENT;
>+			pr_warn("%s: Unknown symbol %s (err %d)\n",
>+				mod->name, name, ret);
> 			break;
>
> 		default:
>-- 
>2.17.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ