Skip to contentSkip to conversation

Patch "mm: fix RODATA_TEST failure "rodata_test: test data was not read only"" has been added to the 4.13-stable tree

PATCH [email protected] 1 participant 1 message Oct 9, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

mm: fix RODATA_TEST failure "rodata_test: test data was not read only"

to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
mm-fix-rodata_test-failure-rodata_test-test-data-was-not-read-only.patch
and it can be found in the queue-4.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From a872eb2131e91ce7c89a8888974a5e22a272b12f Mon Sep 17 00:00:00 2001

From: Christophe Leroy <[email protected]>
Date: Tue, 3 Oct 2017 16:15:16 -0700
Subject: mm: fix RODATA_TEST failure "rodata_test: test data was not read only"

From: Christophe Leroy <[email protected]>

commit a872eb2131e91ce7c89a8888974a5e22a272b12f upstream.

On powerpc, RODATA_TEST fails with message the following messages:

Freeing unused kernel memory: 528K
rodata_test: test data was not read only

This is because GCC allocates it to .data section:

c0695034 g O .data 00000004 rodata_test_data

Since commit 056b9d8a7692 ("mm: remove rodata_test_data export, add pr_fmt"), rodata_test_data is used only inside rodata_test.c By declaring it static, it gets properly allocated into .rodata section instead of .data:

c04df710 l O .rodata 00000004 rodata_test_data

Fixes 056b9d8a7692 ("mm: remove rodata_test_data export, add pr_fmt")
Cc Kees Cook <[email protected]>
Cc Jinbum Park <[email protected]>
Cc Segher Boessenkool <[email protected]>
Cc David Laight <[email protected]>
---
 mm/rodata_test.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/rodata_test.c +1 -1
@@ -14,7 +14,7 @@
 #include <linux/uaccess.h>
 #include <asm/sections.h>
 
-const int rodata_test_data = 0xC3;
+static const int rodata_test_data = 0xC3;
 
 void rodata_test(void)
 {

Patches currently in stable-queue which might be from [email protected] are

queue-4.13/mm-fix-rodata_test-failure-rodata_test-test-data-was-not-read-only.patch