linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Louis Taylor <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: ndesaulniers@google.com, louis@kragniz.eu,
	natechancellor@gmail.com, linux-kernel@vger.kernel.org,
	hpa@zytor.com, mingo@kernel.org, tglx@linutronix.de
Subject: [tip:x86/boot] x86/boot/KASLR: Always return a value from process_mem_region
Date: Wed, 6 Mar 2019 12:34:08 -0800	[thread overview]
Message-ID: <tip-d9a9db4625362b062ee40c9065a06307f7b5c0c9@git.kernel.org> (raw)
In-Reply-To: <20190302184929.28971-1-louis@kragniz.eu>

Commit-ID:  d9a9db4625362b062ee40c9065a06307f7b5c0c9
Gitweb:     https://git.kernel.org/tip/d9a9db4625362b062ee40c9065a06307f7b5c0c9
Author:     Louis Taylor <louis@kragniz.eu>
AuthorDate: Sat, 2 Mar 2019 18:49:29 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 6 Mar 2019 21:29:23 +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@kragniz.eu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Cc: bp@alien8.de
Cc: hpa@zytor.com
Cc: fanc.fnst@cn.fujitsu.com
Cc: bhe@redhat.com
Cc: kirill.shutemov@linux.intel.com
Cc: jflat@chromium.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

  parent reply	other threads:[~2019-03-06 20:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-02 18:49 [PATCH] x86/KASLR: always return a value from process_mem_region Louis Taylor
2019-03-03  3:04 ` Nathan Chancellor
2019-03-04  1:20 ` Chao Fan
2019-03-04 18:10 ` Nick Desaulniers
2019-03-06 20:02 ` Thomas Gleixner
2019-03-06 20:13   ` Thomas Gleixner
2019-03-06 20:37   ` Louis Taylor
2019-03-06 21:37     ` Nick Desaulniers
2019-03-06 21:57       ` Thomas Gleixner
2019-03-06 20:34 ` tip-bot for Louis Taylor [this message]
2019-03-06 21:55 ` [tip:x86/boot] x86/boot/KASLR: Always " tip-bot for Louis Taylor
2019-03-06 21:58 ` tip-bot for Louis Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-d9a9db4625362b062ee40c9065a06307f7b5c0c9@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=louis@kragniz.eu \
    --cc=mingo@kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).