* [PATCH] x86/KASLR: always return a value from process_mem_region
@ 2019-03-02 18:49 Louis Taylor
2019-03-03 3:04 ` Nathan Chancellor
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: Louis Taylor @ 2019-03-02 18:49 UTC (permalink / raw)
To: tglx
Cc: mingo, bp, hpa, x86, fanc.fnst, bhe, kirill.shutemov,
linux-kernel, clang-built-linux, ndesaulniers, jflat,
Louis Taylor
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 probably have been placed
outside the #endif, so move it there
Link: https://github.com/ClangBuiltLinux/linux/issues/360
Signed-off-by: Louis Taylor <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
--
2.20.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] x86/KASLR: always return a value from process_mem_region
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
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2019-03-03 3:04 UTC (permalink / raw)
To: Louis Taylor
Cc: tglx, mingo, bp, hpa, x86, fanc.fnst, bhe, kirill.shutemov,
linux-kernel, clang-built-linux, ndesaulniers, jflat
On Sat, Mar 02, 2019 at 06:49:29PM +0000, Louis Taylor wrote:
> 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 probably have been placed
> outside the #endif, so move it there
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/360
> Signed-off-by: Louis Taylor <louis@kragniz.eu>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Thanks for the patch!
> ---
> 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
> --
> 2.20.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] x86/KASLR: always return a value from process_mem_region
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
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Chao Fan @ 2019-03-04 1:20 UTC (permalink / raw)
To: Louis Taylor
Cc: tglx, mingo, bp, hpa, x86, bhe, kirill.shutemov, linux-kernel,
clang-built-linux, ndesaulniers, jflat
On Sat, Mar 02, 2019 at 06:49:29PM +0000, Louis Taylor wrote:
>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 probably have been placed
>outside the #endif, so move it there
>
>Link: https://github.com/ClangBuiltLinux/linux/issues/360
>Signed-off-by: Louis Taylor <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;
Make sense, thanks for your PATCH.
Thanks,
Chao Fan
> }
>
> #ifdef CONFIG_EFI
>--
>2.20.1
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] x86/KASLR: always return a value from process_mem_region
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
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Nick Desaulniers @ 2019-03-04 18:10 UTC (permalink / raw)
To: Louis Taylor
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, hpa, x86,
fanc.fnst, bhe, Kirill A . Shutemov, LKML, clang-built-linux,
Jon Flatley
On Sat, Mar 2, 2019 at 10:53 AM Louis Taylor <louis@kragniz.eu> wrote:
>
> 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 probably have been placed
> outside the #endif, so move it there
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/360
> Signed-off-by: Louis Taylor <louis@kragniz.eu>
Thanks for the patch!
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] x86/KASLR: always return a value from process_mem_region
2019-03-02 18:49 [PATCH] x86/KASLR: always return a value from process_mem_region Louis Taylor
` (2 preceding siblings ...)
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 20:34 ` [tip:x86/boot] x86/boot/KASLR: Always " tip-bot for Louis Taylor
` (2 subsequent siblings)
6 siblings, 2 replies; 12+ messages in thread
From: Thomas Gleixner @ 2019-03-06 20:02 UTC (permalink / raw)
To: Louis Taylor
Cc: mingo, bp, hpa, x86, fanc.fnst, bhe, kirill.shutemov,
linux-kernel, clang-built-linux, ndesaulniers, jflat
Louis,
On Sat, 2 Mar 2019, Louis Taylor wrote:
> 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 probably have been placed
> outside the #endif, so move it there
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/360
> Signed-off-by: Louis Taylor <louis@kragniz.eu>
This lacks a
Fixes: commitsha1 (".....")
tag
> 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;
> }
This does not longer apply to mainline because the function does not longer
have a return value. So if that's important, you need to hash that out with
the stable folks.
Thanks,
tglx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] x86/KASLR: always return a value from process_mem_region
2019-03-06 20:02 ` Thomas Gleixner
@ 2019-03-06 20:13 ` Thomas Gleixner
2019-03-06 20:37 ` Louis Taylor
1 sibling, 0 replies; 12+ messages in thread
From: Thomas Gleixner @ 2019-03-06 20:13 UTC (permalink / raw)
To: Louis Taylor
Cc: mingo, bp, hpa, x86, fanc.fnst, bhe, kirill.shutemov,
linux-kernel, clang-built-linux, ndesaulniers, jflat
Louis,
On Wed, 6 Mar 2019, Thomas Gleixner wrote:
>
> This does not longer apply to mainline because the function does not longer
> have a return value. So if that's important, you need to hash that out with
> the stable folks.
Ignore me. Pilot error. Was on the wrong branch.
Thanks,
tglx
^ permalink raw reply [flat|nested] 12+ messages in thread
* [tip:x86/boot] x86/boot/KASLR: Always return a value from process_mem_region
2019-03-02 18:49 [PATCH] x86/KASLR: always return a value from process_mem_region Louis Taylor
` (3 preceding siblings ...)
2019-03-06 20:02 ` Thomas Gleixner
@ 2019-03-06 20:34 ` tip-bot for Louis Taylor
2019-03-06 21:55 ` tip-bot for Louis Taylor
2019-03-06 21:58 ` tip-bot for Louis Taylor
6 siblings, 0 replies; 12+ messages in thread
From: tip-bot for Louis Taylor @ 2019-03-06 20:34 UTC (permalink / raw)
To: linux-tip-commits
Cc: ndesaulniers, louis, natechancellor, linux-kernel, hpa, mingo, tglx
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] x86/KASLR: always return a value from process_mem_region
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
1 sibling, 1 reply; 12+ messages in thread
From: Louis Taylor @ 2019-03-06 20:37 UTC (permalink / raw)
To: Thomas Gleixner
Cc: mingo, bp, hpa, x86, fanc.fnst, bhe, kirill.shutemov,
linux-kernel, clang-built-linux, ndesaulniers, jflat
On Wed, Mar 06, 2019 at 09:02:47PM +0100, Thomas Gleixner wrote:
> On Sat, 2 Mar 2019, Louis Taylor wrote:
>
> > 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 probably have been placed
> > outside the #endif, so move it there
> >
> > Link: https://github.com/ClangBuiltLinux/linux/issues/360
> > Signed-off-by: Louis Taylor <louis@kragniz.eu>
>
> This lacks a
>
> Fixes: commitsha1 (".....")
Fixes: 690eaa532057 ("x86/boot/KASLR: Limit KASLR to extract the kernel in immovable memory only")
Would you like me to resend with that tag?
Cheers,
Louis
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] x86/KASLR: always return a value from process_mem_region
2019-03-06 20:37 ` Louis Taylor
@ 2019-03-06 21:37 ` Nick Desaulniers
2019-03-06 21:57 ` Thomas Gleixner
0 siblings, 1 reply; 12+ messages in thread
From: Nick Desaulniers @ 2019-03-06 21:37 UTC (permalink / raw)
To: Louis Taylor
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
x86, fanc.fnst, bhe, Kirill A . Shutemov, LKML,
clang-built-linux, Jon Flatley
On Wed, Mar 6, 2019 at 12:38 PM Louis Taylor <louis@kragniz.eu> wrote:
>
> On Wed, Mar 06, 2019 at 09:02:47PM +0100, Thomas Gleixner wrote:
> > On Sat, 2 Mar 2019, Louis Taylor wrote:
> >
> > > 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 probably have been placed
> > > outside the #endif, so move it there
> > >
> > > Link: https://github.com/ClangBuiltLinux/linux/issues/360
> > > Signed-off-by: Louis Taylor <louis@kragniz.eu>
> >
> > This lacks a
> >
> > Fixes: commitsha1 (".....")
>
> Fixes: 690eaa532057 ("x86/boot/KASLR: Limit KASLR to extract the kernel in immovable memory only")
>
> Would you like me to resend with that tag?
Looks like it was added.
Looking at https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/boot,
it looks like part of the commit message got cut off. `#endif, so move
it there` is missing?
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 12+ messages in thread
* [tip:x86/boot] x86/boot/KASLR: Always return a value from process_mem_region
2019-03-02 18:49 [PATCH] x86/KASLR: always return a value from process_mem_region Louis Taylor
` (4 preceding siblings ...)
2019-03-06 20:34 ` [tip:x86/boot] x86/boot/KASLR: Always " tip-bot for Louis Taylor
@ 2019-03-06 21:55 ` tip-bot for Louis Taylor
2019-03-06 21:58 ` tip-bot for Louis Taylor
6 siblings, 0 replies; 12+ messages in thread
From: tip-bot for Louis Taylor @ 2019-03-06 21:55 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, tglx, hpa, ndesaulniers, natechancellor, louis, mingo
Commit-ID: 08c25ca37f0b37311dbac1426c356165182c4c99
Gitweb: https://git.kernel.org/tip/08c25ca37f0b37311dbac1426c356165182c4c99
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 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@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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] x86/KASLR: always return a value from process_mem_region
2019-03-06 21:37 ` Nick Desaulniers
@ 2019-03-06 21:57 ` Thomas Gleixner
0 siblings, 0 replies; 12+ messages in thread
From: Thomas Gleixner @ 2019-03-06 21:57 UTC (permalink / raw)
To: Nick Desaulniers
Cc: Louis Taylor, Ingo Molnar, Borislav Petkov, H. Peter Anvin, x86,
fanc.fnst, bhe, Kirill A . Shutemov, LKML, clang-built-linux,
Jon Flatley
On Wed, 6 Mar 2019, Nick Desaulniers wrote:
> On Wed, Mar 6, 2019 at 12:38 PM Louis Taylor <louis@kragniz.eu> wrote:
> Looks like it was added.
> Looking at https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/boot,
> it looks like part of the commit message got cut off. `#endif, so move
> it there` is missing?
Ooops. git is doing something weird there. It doesn't like the #endif
Rephrased and pushed out.
Thanks,
tglx
^ permalink raw reply [flat|nested] 12+ messages in thread
* [tip:x86/boot] x86/boot/KASLR: Always return a value from process_mem_region
2019-03-02 18:49 [PATCH] x86/KASLR: always return a value from process_mem_region Louis Taylor
` (5 preceding siblings ...)
2019-03-06 21:55 ` tip-bot for Louis Taylor
@ 2019-03-06 21:58 ` tip-bot for Louis Taylor
6 siblings, 0 replies; 12+ messages in thread
From: tip-bot for Louis Taylor @ 2019-03-06 21:58 UTC (permalink / raw)
To: linux-tip-commits
Cc: louis, tglx, natechancellor, mingo, hpa, ndesaulniers, linux-kernel
Commit-ID: e4a0bd0308f05c1354d28feec8439e869eae6372
Gitweb: https://git.kernel.org/tip/e4a0bd0308f05c1354d28feec8439e869eae6372
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 22:55:30 +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
ifdeffed region. Move it there.
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2019-03-06 21:58 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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:x86/boot] x86/boot/KASLR: Always " tip-bot for Louis Taylor
2019-03-06 21:55 ` tip-bot for Louis Taylor
2019-03-06 21:58 ` tip-bot for Louis Taylor
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).