All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: drop unused DEBUG_RODATA from XIP_KERNEL
@ 2016-02-16 20:29 ` Kees Cook
  0 siblings, 0 replies; 8+ messages in thread
From: Kees Cook @ 2016-02-16 20:29 UTC (permalink / raw
  To: Russell King
  Cc: Ard Biesheuvel, Arnd Bergmann, Geert Uytterhoeven, Chris Brandt,
	Will Deacon, Nicolas Pitre, Marc Zyngier, linux-arm-kernel,
	linux-kernel

With CONFIG_DEBUG_RODATA not being sensible under XIP_KERNEL, remove it
from the XIP linker script.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
Effectively the patch after Arnd's "ARM: mm: hide
__start_rodata_section_aligned for non-debug builds"
---
 arch/arm/kernel/vmlinux-xip.lds.S | 10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S
index 40bc4cadb959..cba1ec899a69 100644
--- a/arch/arm/kernel/vmlinux-xip.lds.S
+++ b/arch/arm/kernel/vmlinux-xip.lds.S
@@ -8,9 +8,6 @@
 #include <asm/thread_info.h>
 #include <asm/memory.h>
 #include <asm/page.h>
-#ifdef CONFIG_DEBUG_RODATA
-#include <asm/pgtable.h>
-#endif
 
 #define PROC_INFO							\
 	. = ALIGN(4);							\
@@ -92,10 +89,6 @@ SECTIONS
 		HEAD_TEXT
 	}
 
-#ifdef CONFIG_DEBUG_RODATA
-	. = ALIGN(1<<SECTION_SHIFT);
-#endif
-
 	.text : {			/* Real text segment		*/
 		_stext = .;		/* Text and read-only data	*/
 			IDMAP_TEXT
@@ -115,9 +108,6 @@ SECTIONS
 			ARM_CPU_KEEP(PROC_INFO)
 	}
 
-#ifdef CONFIG_DEBUG_RODATA
-	. = ALIGN(1<<SECTION_SHIFT);
-#endif
 	RO_DATA(PAGE_SIZE)
 
 	. = ALIGN(4);
-- 
2.6.3


-- 
Kees Cook
Chrome OS & Brillo Security

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

* [PATCH] ARM: drop unused DEBUG_RODATA from XIP_KERNEL
@ 2016-02-16 20:29 ` Kees Cook
  0 siblings, 0 replies; 8+ messages in thread
From: Kees Cook @ 2016-02-16 20:29 UTC (permalink / raw
  To: linux-arm-kernel

With CONFIG_DEBUG_RODATA not being sensible under XIP_KERNEL, remove it
from the XIP linker script.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
Effectively the patch after Arnd's "ARM: mm: hide
__start_rodata_section_aligned for non-debug builds"
---
 arch/arm/kernel/vmlinux-xip.lds.S | 10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S
index 40bc4cadb959..cba1ec899a69 100644
--- a/arch/arm/kernel/vmlinux-xip.lds.S
+++ b/arch/arm/kernel/vmlinux-xip.lds.S
@@ -8,9 +8,6 @@
 #include <asm/thread_info.h>
 #include <asm/memory.h>
 #include <asm/page.h>
-#ifdef CONFIG_DEBUG_RODATA
-#include <asm/pgtable.h>
-#endif
 
 #define PROC_INFO							\
 	. = ALIGN(4);							\
@@ -92,10 +89,6 @@ SECTIONS
 		HEAD_TEXT
 	}
 
-#ifdef CONFIG_DEBUG_RODATA
-	. = ALIGN(1<<SECTION_SHIFT);
-#endif
-
 	.text : {			/* Real text segment		*/
 		_stext = .;		/* Text and read-only data	*/
 			IDMAP_TEXT
@@ -115,9 +108,6 @@ SECTIONS
 			ARM_CPU_KEEP(PROC_INFO)
 	}
 
-#ifdef CONFIG_DEBUG_RODATA
-	. = ALIGN(1<<SECTION_SHIFT);
-#endif
 	RO_DATA(PAGE_SIZE)
 
 	. = ALIGN(4);
-- 
2.6.3


-- 
Kees Cook
Chrome OS & Brillo Security

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

* Re: [PATCH] ARM: drop unused DEBUG_RODATA from XIP_KERNEL
  2016-02-16 20:29 ` Kees Cook
@ 2016-02-16 20:41   ` Nicolas Pitre
  -1 siblings, 0 replies; 8+ messages in thread
From: Nicolas Pitre @ 2016-02-16 20:41 UTC (permalink / raw
  To: Kees Cook
  Cc: Russell King, Ard Biesheuvel, Arnd Bergmann, Geert Uytterhoeven,
	Chris Brandt, Will Deacon, Marc Zyngier, linux-arm-kernel,
	linux-kernel

On Tue, 16 Feb 2016, Kees Cook wrote:

> With CONFIG_DEBUG_RODATA not being sensible under XIP_KERNEL, remove it
> from the XIP linker script.

If so you should also make DEBUG_RODATA depend on !XIP_KERNEL in Kconfig 
to avoid offering a config option that does nothing.

> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> Effectively the patch after Arnd's "ARM: mm: hide
> __start_rodata_section_aligned for non-debug builds"
> ---
>  arch/arm/kernel/vmlinux-xip.lds.S | 10 ----------
>  1 files changed, 0 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S
> index 40bc4cadb959..cba1ec899a69 100644
> --- a/arch/arm/kernel/vmlinux-xip.lds.S
> +++ b/arch/arm/kernel/vmlinux-xip.lds.S
> @@ -8,9 +8,6 @@
>  #include <asm/thread_info.h>
>  #include <asm/memory.h>
>  #include <asm/page.h>
> -#ifdef CONFIG_DEBUG_RODATA
> -#include <asm/pgtable.h>
> -#endif
>  
>  #define PROC_INFO							\
>  	. = ALIGN(4);							\
> @@ -92,10 +89,6 @@ SECTIONS
>  		HEAD_TEXT
>  	}
>  
> -#ifdef CONFIG_DEBUG_RODATA
> -	. = ALIGN(1<<SECTION_SHIFT);
> -#endif
> -
>  	.text : {			/* Real text segment		*/
>  		_stext = .;		/* Text and read-only data	*/
>  			IDMAP_TEXT
> @@ -115,9 +108,6 @@ SECTIONS
>  			ARM_CPU_KEEP(PROC_INFO)
>  	}
>  
> -#ifdef CONFIG_DEBUG_RODATA
> -	. = ALIGN(1<<SECTION_SHIFT);
> -#endif
>  	RO_DATA(PAGE_SIZE)
>  
>  	. = ALIGN(4);
> -- 
> 2.6.3
> 
> 
> -- 
> Kees Cook
> Chrome OS & Brillo Security
> 
> 

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

* [PATCH] ARM: drop unused DEBUG_RODATA from XIP_KERNEL
@ 2016-02-16 20:41   ` Nicolas Pitre
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Pitre @ 2016-02-16 20:41 UTC (permalink / raw
  To: linux-arm-kernel

On Tue, 16 Feb 2016, Kees Cook wrote:

> With CONFIG_DEBUG_RODATA not being sensible under XIP_KERNEL, remove it
> from the XIP linker script.

If so you should also make DEBUG_RODATA depend on !XIP_KERNEL in Kconfig 
to avoid offering a config option that does nothing.

> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> Effectively the patch after Arnd's "ARM: mm: hide
> __start_rodata_section_aligned for non-debug builds"
> ---
>  arch/arm/kernel/vmlinux-xip.lds.S | 10 ----------
>  1 files changed, 0 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S
> index 40bc4cadb959..cba1ec899a69 100644
> --- a/arch/arm/kernel/vmlinux-xip.lds.S
> +++ b/arch/arm/kernel/vmlinux-xip.lds.S
> @@ -8,9 +8,6 @@
>  #include <asm/thread_info.h>
>  #include <asm/memory.h>
>  #include <asm/page.h>
> -#ifdef CONFIG_DEBUG_RODATA
> -#include <asm/pgtable.h>
> -#endif
>  
>  #define PROC_INFO							\
>  	. = ALIGN(4);							\
> @@ -92,10 +89,6 @@ SECTIONS
>  		HEAD_TEXT
>  	}
>  
> -#ifdef CONFIG_DEBUG_RODATA
> -	. = ALIGN(1<<SECTION_SHIFT);
> -#endif
> -
>  	.text : {			/* Real text segment		*/
>  		_stext = .;		/* Text and read-only data	*/
>  			IDMAP_TEXT
> @@ -115,9 +108,6 @@ SECTIONS
>  			ARM_CPU_KEEP(PROC_INFO)
>  	}
>  
> -#ifdef CONFIG_DEBUG_RODATA
> -	. = ALIGN(1<<SECTION_SHIFT);
> -#endif
>  	RO_DATA(PAGE_SIZE)
>  
>  	. = ALIGN(4);
> -- 
> 2.6.3
> 
> 
> -- 
> Kees Cook
> Chrome OS & Brillo Security
> 
> 

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

* Re: [PATCH] ARM: drop unused DEBUG_RODATA from XIP_KERNEL
  2016-02-16 20:29 ` Kees Cook
@ 2016-02-16 21:24   ` Arnd Bergmann
  -1 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2016-02-16 21:24 UTC (permalink / raw
  To: linux-arm-kernel
  Cc: Kees Cook, Russell King, Nicolas Pitre, Marc Zyngier,
	Ard Biesheuvel, Will Deacon, linux-kernel, Chris Brandt,
	Geert Uytterhoeven

On Tuesday 16 February 2016 12:29:57 Kees Cook wrote:
> With CONFIG_DEBUG_RODATA not being sensible under XIP_KERNEL, remove it
> from the XIP linker script.
> 
> Signed-off-by: Kees Cook <keescook@chromium.org>
> 

Acked-by: Arnd Bergmann <arnd@arndb.de>

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

* [PATCH] ARM: drop unused DEBUG_RODATA from XIP_KERNEL
@ 2016-02-16 21:24   ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2016-02-16 21:24 UTC (permalink / raw
  To: linux-arm-kernel

On Tuesday 16 February 2016 12:29:57 Kees Cook wrote:
> With CONFIG_DEBUG_RODATA not being sensible under XIP_KERNEL, remove it
> from the XIP linker script.
> 
> Signed-off-by: Kees Cook <keescook@chromium.org>
> 

Acked-by: Arnd Bergmann <arnd@arndb.de>

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

* Re: [PATCH] ARM: drop unused DEBUG_RODATA from XIP_KERNEL
  2016-02-16 20:41   ` Nicolas Pitre
@ 2016-02-16 21:55     ` Kees Cook
  -1 siblings, 0 replies; 8+ messages in thread
From: Kees Cook @ 2016-02-16 21:55 UTC (permalink / raw
  To: Nicolas Pitre
  Cc: Russell King, Ard Biesheuvel, Arnd Bergmann, Geert Uytterhoeven,
	Chris Brandt, Will Deacon, Marc Zyngier,
	linux-arm-kernel@lists.infradead.org, LKML

On Tue, Feb 16, 2016 at 12:41 PM, Nicolas Pitre
<nicolas.pitre@linaro.org> wrote:
> On Tue, 16 Feb 2016, Kees Cook wrote:
>
>> With CONFIG_DEBUG_RODATA not being sensible under XIP_KERNEL, remove it
>> from the XIP linker script.
>
> If so you should also make DEBUG_RODATA depend on !XIP_KERNEL in Kconfig
> to avoid offering a config option that does nothing.

Yeah, that's what Arnd's other patch does. This is intended to follow
his cleanups that do this.

-Kees

>
>> Signed-off-by: Kees Cook <keescook@chromium.org>
>> ---
>> Effectively the patch after Arnd's "ARM: mm: hide
>> __start_rodata_section_aligned for non-debug builds"
>> ---
>>  arch/arm/kernel/vmlinux-xip.lds.S | 10 ----------
>>  1 files changed, 0 insertions(+), 10 deletions(-)
>>
>> diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S
>> index 40bc4cadb959..cba1ec899a69 100644
>> --- a/arch/arm/kernel/vmlinux-xip.lds.S
>> +++ b/arch/arm/kernel/vmlinux-xip.lds.S
>> @@ -8,9 +8,6 @@
>>  #include <asm/thread_info.h>
>>  #include <asm/memory.h>
>>  #include <asm/page.h>
>> -#ifdef CONFIG_DEBUG_RODATA
>> -#include <asm/pgtable.h>
>> -#endif
>>
>>  #define PROC_INFO                                                    \
>>       . = ALIGN(4);                                                   \
>> @@ -92,10 +89,6 @@ SECTIONS
>>               HEAD_TEXT
>>       }
>>
>> -#ifdef CONFIG_DEBUG_RODATA
>> -     . = ALIGN(1<<SECTION_SHIFT);
>> -#endif
>> -
>>       .text : {                       /* Real text segment            */
>>               _stext = .;             /* Text and read-only data      */
>>                       IDMAP_TEXT
>> @@ -115,9 +108,6 @@ SECTIONS
>>                       ARM_CPU_KEEP(PROC_INFO)
>>       }
>>
>> -#ifdef CONFIG_DEBUG_RODATA
>> -     . = ALIGN(1<<SECTION_SHIFT);
>> -#endif
>>       RO_DATA(PAGE_SIZE)
>>
>>       . = ALIGN(4);
>> --
>> 2.6.3
>>
>>
>> --
>> Kees Cook
>> Chrome OS & Brillo Security
>>
>>



-- 
Kees Cook
Chrome OS & Brillo Security

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

* [PATCH] ARM: drop unused DEBUG_RODATA from XIP_KERNEL
@ 2016-02-16 21:55     ` Kees Cook
  0 siblings, 0 replies; 8+ messages in thread
From: Kees Cook @ 2016-02-16 21:55 UTC (permalink / raw
  To: linux-arm-kernel

On Tue, Feb 16, 2016 at 12:41 PM, Nicolas Pitre
<nicolas.pitre@linaro.org> wrote:
> On Tue, 16 Feb 2016, Kees Cook wrote:
>
>> With CONFIG_DEBUG_RODATA not being sensible under XIP_KERNEL, remove it
>> from the XIP linker script.
>
> If so you should also make DEBUG_RODATA depend on !XIP_KERNEL in Kconfig
> to avoid offering a config option that does nothing.

Yeah, that's what Arnd's other patch does. This is intended to follow
his cleanups that do this.

-Kees

>
>> Signed-off-by: Kees Cook <keescook@chromium.org>
>> ---
>> Effectively the patch after Arnd's "ARM: mm: hide
>> __start_rodata_section_aligned for non-debug builds"
>> ---
>>  arch/arm/kernel/vmlinux-xip.lds.S | 10 ----------
>>  1 files changed, 0 insertions(+), 10 deletions(-)
>>
>> diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S
>> index 40bc4cadb959..cba1ec899a69 100644
>> --- a/arch/arm/kernel/vmlinux-xip.lds.S
>> +++ b/arch/arm/kernel/vmlinux-xip.lds.S
>> @@ -8,9 +8,6 @@
>>  #include <asm/thread_info.h>
>>  #include <asm/memory.h>
>>  #include <asm/page.h>
>> -#ifdef CONFIG_DEBUG_RODATA
>> -#include <asm/pgtable.h>
>> -#endif
>>
>>  #define PROC_INFO                                                    \
>>       . = ALIGN(4);                                                   \
>> @@ -92,10 +89,6 @@ SECTIONS
>>               HEAD_TEXT
>>       }
>>
>> -#ifdef CONFIG_DEBUG_RODATA
>> -     . = ALIGN(1<<SECTION_SHIFT);
>> -#endif
>> -
>>       .text : {                       /* Real text segment            */
>>               _stext = .;             /* Text and read-only data      */
>>                       IDMAP_TEXT
>> @@ -115,9 +108,6 @@ SECTIONS
>>                       ARM_CPU_KEEP(PROC_INFO)
>>       }
>>
>> -#ifdef CONFIG_DEBUG_RODATA
>> -     . = ALIGN(1<<SECTION_SHIFT);
>> -#endif
>>       RO_DATA(PAGE_SIZE)
>>
>>       . = ALIGN(4);
>> --
>> 2.6.3
>>
>>
>> --
>> Kees Cook
>> Chrome OS & Brillo Security
>>
>>



-- 
Kees Cook
Chrome OS & Brillo Security

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

end of thread, other threads:[~2016-02-16 21:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-16 20:29 [PATCH] ARM: drop unused DEBUG_RODATA from XIP_KERNEL Kees Cook
2016-02-16 20:29 ` Kees Cook
2016-02-16 20:41 ` Nicolas Pitre
2016-02-16 20:41   ` Nicolas Pitre
2016-02-16 21:55   ` Kees Cook
2016-02-16 21:55     ` Kees Cook
2016-02-16 21:24 ` Arnd Bergmann
2016-02-16 21:24   ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.