public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86, kaslr: add missed "static" declarations
@ 2014-02-09 21:56 Kees Cook
  2014-02-21 20:29 ` Kees Cook
  2014-02-26  1:06 ` [tip:x86/urgent] " tip-bot for Kees Cook
  0 siblings, 2 replies; 3+ messages in thread
From: Kees Cook @ 2014-02-09 21:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: H. Peter Anvin, Thomas Gleixner, Ingo Molnar, x86, Kees Cook,
	Wei Yongjun

This silences build warnings about unexported variables and functions.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 arch/x86/boot/compressed/aslr.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c
index 90a21f430117..4dbf967da50d 100644
--- a/arch/x86/boot/compressed/aslr.c
+++ b/arch/x86/boot/compressed/aslr.c
@@ -111,7 +111,7 @@ struct mem_vector {
 };
 
 #define MEM_AVOID_MAX 5
-struct mem_vector mem_avoid[MEM_AVOID_MAX];
+static struct mem_vector mem_avoid[MEM_AVOID_MAX];
 
 static bool mem_contains(struct mem_vector *region, struct mem_vector *item)
 {
@@ -180,7 +180,7 @@ static void mem_avoid_init(unsigned long input, unsigned long input_size,
 }
 
 /* Does this memory vector overlap a known avoided area? */
-bool mem_avoid_overlap(struct mem_vector *img)
+static bool mem_avoid_overlap(struct mem_vector *img)
 {
 	int i;
 
@@ -192,8 +192,9 @@ bool mem_avoid_overlap(struct mem_vector *img)
 	return false;
 }
 
-unsigned long slots[CONFIG_RANDOMIZE_BASE_MAX_OFFSET / CONFIG_PHYSICAL_ALIGN];
-unsigned long slot_max = 0;
+static unsigned long slots[CONFIG_RANDOMIZE_BASE_MAX_OFFSET /
+			   CONFIG_PHYSICAL_ALIGN];
+static unsigned long slot_max;
 
 static void slots_append(unsigned long addr)
 {
-- 
1.7.9.5


-- 
Kees Cook
Chrome OS Security

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86, kaslr: add missed "static" declarations
  2014-02-09 21:56 [PATCH] x86, kaslr: add missed "static" declarations Kees Cook
@ 2014-02-21 20:29 ` Kees Cook
  2014-02-26  1:06 ` [tip:x86/urgent] " tip-bot for Kees Cook
  1 sibling, 0 replies; 3+ messages in thread
From: Kees Cook @ 2014-02-21 20:29 UTC (permalink / raw)
  To: LKML
  Cc: H. Peter Anvin, Thomas Gleixner, Ingo Molnar, x86@kernel.org,
	Kees Cook, Wei Yongjun

On Sun, Feb 9, 2014 at 1:56 PM, Kees Cook <keescook@chromium.org> wrote:
> This silences build warnings about unexported variables and functions.
>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
>  arch/x86/boot/compressed/aslr.c |    9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c
> index 90a21f430117..4dbf967da50d 100644
> --- a/arch/x86/boot/compressed/aslr.c
> +++ b/arch/x86/boot/compressed/aslr.c
> @@ -111,7 +111,7 @@ struct mem_vector {
>  };
>
>  #define MEM_AVOID_MAX 5
> -struct mem_vector mem_avoid[MEM_AVOID_MAX];
> +static struct mem_vector mem_avoid[MEM_AVOID_MAX];
>
>  static bool mem_contains(struct mem_vector *region, struct mem_vector *item)
>  {
> @@ -180,7 +180,7 @@ static void mem_avoid_init(unsigned long input, unsigned long input_size,
>  }
>
>  /* Does this memory vector overlap a known avoided area? */
> -bool mem_avoid_overlap(struct mem_vector *img)
> +static bool mem_avoid_overlap(struct mem_vector *img)
>  {
>         int i;
>
> @@ -192,8 +192,9 @@ bool mem_avoid_overlap(struct mem_vector *img)
>         return false;
>  }
>
> -unsigned long slots[CONFIG_RANDOMIZE_BASE_MAX_OFFSET / CONFIG_PHYSICAL_ALIGN];
> -unsigned long slot_max = 0;
> +static unsigned long slots[CONFIG_RANDOMIZE_BASE_MAX_OFFSET /
> +                          CONFIG_PHYSICAL_ALIGN];
> +static unsigned long slot_max;
>
>  static void slots_append(unsigned long addr)
>  {
> --
> 1.7.9.5
>
>
> --
> Kees Cook
> Chrome OS Security

Ping on this patch; simple build warning fixes...

-Kees

-- 
Kees Cook
Chrome OS Security

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:x86/urgent] x86, kaslr: add missed "static" declarations
  2014-02-09 21:56 [PATCH] x86, kaslr: add missed "static" declarations Kees Cook
  2014-02-21 20:29 ` Kees Cook
@ 2014-02-26  1:06 ` tip-bot for Kees Cook
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Kees Cook @ 2014-02-26  1:06 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, keescook, tglx, hpa

Commit-ID:  e290e8c59dbc2a15088d868170d799f763202fef
Gitweb:     http://git.kernel.org/tip/e290e8c59dbc2a15088d868170d799f763202fef
Author:     Kees Cook <keescook@chromium.org>
AuthorDate: Sun, 9 Feb 2014 13:56:44 -0800
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Tue, 25 Feb 2014 16:59:29 -0800

x86, kaslr: add missed "static" declarations

This silences build warnings about unexported variables and functions.

Signed-off-by: Kees Cook <keescook@chromium.org>
Link: http://lkml.kernel.org/r/20140209215644.GA30339@www.outflux.net
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/boot/compressed/aslr.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c
index 90a21f4..4dbf967 100644
--- a/arch/x86/boot/compressed/aslr.c
+++ b/arch/x86/boot/compressed/aslr.c
@@ -111,7 +111,7 @@ struct mem_vector {
 };
 
 #define MEM_AVOID_MAX 5
-struct mem_vector mem_avoid[MEM_AVOID_MAX];
+static struct mem_vector mem_avoid[MEM_AVOID_MAX];
 
 static bool mem_contains(struct mem_vector *region, struct mem_vector *item)
 {
@@ -180,7 +180,7 @@ static void mem_avoid_init(unsigned long input, unsigned long input_size,
 }
 
 /* Does this memory vector overlap a known avoided area? */
-bool mem_avoid_overlap(struct mem_vector *img)
+static bool mem_avoid_overlap(struct mem_vector *img)
 {
 	int i;
 
@@ -192,8 +192,9 @@ bool mem_avoid_overlap(struct mem_vector *img)
 	return false;
 }
 
-unsigned long slots[CONFIG_RANDOMIZE_BASE_MAX_OFFSET / CONFIG_PHYSICAL_ALIGN];
-unsigned long slot_max = 0;
+static unsigned long slots[CONFIG_RANDOMIZE_BASE_MAX_OFFSET /
+			   CONFIG_PHYSICAL_ALIGN];
+static unsigned long slot_max;
 
 static void slots_append(unsigned long addr)
 {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-26  1:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-09 21:56 [PATCH] x86, kaslr: add missed "static" declarations Kees Cook
2014-02-21 20:29 ` Kees Cook
2014-02-26  1:06 ` [tip:x86/urgent] " tip-bot for Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox