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: <tip-08c25ca37f0b37311dbac1426c356165182c4c99@git.kernel.org>
Date:   Wed, 6 Mar 2019 13:55:07 -0800
From:   tip-bot for Louis Taylor <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, tglx@...utronix.de, hpa@...or.com,
        ndesaulniers@...gle.com, natechancellor@...il.com,
        louis@...gniz.eu, mingo@...nel.org
Subject: [tip:x86/boot] x86/boot/KASLR: Always return a value from
 process_mem_region

Commit-ID:  08c25ca37f0b37311dbac1426c356165182c4c99
Gitweb:     https://git.kernel.org/tip/08c25ca37f0b37311dbac1426c356165182c4c99
Author:     Louis Taylor <louis@...gniz.eu>
AuthorDate: Sat, 2 Mar 2019 18:49:29 +0000
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 6 Mar 2019 22:53:16 +0100

x86/boot/KASLR: Always return a value from process_mem_region

When compiling with -Wreturn-type, clang warns:

arch/x86/boot/compressed/kaslr.c:704:1: warning: control may reach end of
      non-void function [-Wreturn-type]

This function's return statement should have been placed outside the

Fixes: 690eaa532057 ("x86/boot/KASLR: Limit KASLR to extract the kernel in immovable memory only")
Signed-off-by: Louis Taylor <louis@...gniz.eu>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Nathan Chancellor <natechancellor@...il.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: bp@...en8.de
Cc: hpa@...or.com
Cc: fanc.fnst@...fujitsu.com
Cc: bhe@...hat.com
Cc: kirill.shutemov@...ux.intel.com
Cc: jflat@...omium.org
Link: https://lkml.kernel.org/r/20190302184929.28971-1-louis@kragniz.eu
---
 arch/x86/boot/compressed/kaslr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
index fa0332dda9f2..2e53c056ba20 100644
--- a/arch/x86/boot/compressed/kaslr.c
+++ b/arch/x86/boot/compressed/kaslr.c
@@ -697,8 +697,8 @@ static bool process_mem_region(struct mem_vector *region,
 			return 1;
 		}
 	}
-	return 0;
 #endif
+	return 0;
 }
 
 #ifdef CONFIG_EFI

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ