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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 10 Apr 2017 19:23:28 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     Sergei Trofimovich <slyfox@...too.org>, linux-ia64@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Fenghua Yu <fenghua.yu@...el.com>,
        "H. J. Lu" <hjl.tools@...il.com>, Tony Luck <tony.luck@...el.com>
Subject: Re: [PATCH v3] ia64: fix module loading for gcc-5.4+

> +++ b/arch/ia64/kernel/module.c
> @@ -153,7 +153,7 @@ slot (const struct insn *insn)
>  static int
>  apply_imm64 (struct module *mod, struct insn *insn, uint64_t val)
>  {

I have got another idea (after your clarification) for the suggested change.


> -	if (slot(insn) != 2) {
> +	if (slot(insn) != 1 && slot(insn) != 2) {

+	int const s = slot(insn);
+	if (s < 1 || s > 2) {

Do run time characteristics matter for such a condition check here?


>  		printk(KERN_ERR "%s: invalid slot number %d for IMM64\n",

-  		       mod->name, slot(insn));
+  		       mod->name, s);


>  		return 0;


How do you think about my update suggestion for this function implementation?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ