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>] [day] [month] [year] [list]
Date:   Sun, 30 Jul 2017 10:25:37 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     LKML <linux-kernel@...r.kernel.org>,
        Al Viro <viro@...iv.linux.org.uk>
Cc:     Michal Simek <monstr@...str.eu>,
        Fengguang Wu <fengguang.wu@...el.com>
Subject: [PATCH] binfmt_flat: fix arch/m32r and arch/microblaze
 flat_put_addr_at_rp()

From: Randy Dunlap <rdunlap@...radead.org>

Change the m32r flat_put_addr_at_rp() function to return int and
always return 0.

The microblaze function already returned 0 so just change its
function return type from void to int.

Seven (7) other arch-es already have this function as returning
an int type result.

Fixes: 468138d78510 (binfmt_flat: flat_{get,put}_addr_from_rp()
	should be able to fail)

Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
Cc: Al Viro <viro@...iv.linux.org.uk>
Reported-by: kbuild test robot <fengguang.wu@...el.com>
---
 arch/m32r/include/asm/flat.h       |    3 ++-
 arch/microblaze/include/asm/flat.h |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

Al, is this sufficient?

--- lnx-413-rc2.orig/arch/m32r/include/asm/flat.h
+++ lnx-413-rc2/arch/m32r/include/asm/flat.h
@@ -95,7 +95,7 @@ static inline unsigned long m32r_flat_ge
 	return ~0;      /* bogus value */
 }
 
-static inline void flat_put_addr_at_rp(u32 *rp, u32 addr, u32 relval)
+static inline int flat_put_addr_at_rp(u32 *rp, u32 addr, u32 relval)
 {
         unsigned int reloc = flat_m32r_get_reloc_type (relval);
 	if (reloc & 0xf0) {
@@ -133,6 +133,7 @@ static inline void flat_put_addr_at_rp(u
 			break;
 		}
 	}
+	return 0;
 }
 
 // kludge - text_len is a local variable in the only user.
--- lnx-413-rc2.orig/arch/microblaze/include/asm/flat.h
+++ lnx-413-rc2/arch/microblaze/include/asm/flat.h
@@ -60,7 +60,7 @@ static inline int flat_get_addr_from_rp(
  * unaligned.
  */
 
-static inline void
+static inline int
 flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 relval)
 {
 	u32 *p = (__force u32 *)rp;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ