04 Oct, 2017

1 commit

  • 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")
    Link: http://lkml.kernel.org/r/20170921093729.1080368AC1@po15668-vm-win7.idsi0.si.c-s.fr
    Signed-off-by: Christophe Leroy
    Cc: Kees Cook
    Cc: Jinbum Park
    Cc: Segher Boessenkool
    Cc: David Laight
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christophe Leroy
     

04 May, 2017

1 commit

  • Since commit 3ad38ceb2769 ("x86/mm: Remove CONFIG_DEBUG_NX_TEST"),
    nothing is using the exported rodata_test_data variable, so drop the
    export.

    This additionally updates the pr_fmt to avoid redundant strings and
    adjusts some whitespace.

    Link: http://lkml.kernel.org/r/20170307005313.GA85809@beast
    Signed-off-by: Kees Cook
    Cc: Jinbum Park
    Cc: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     

28 Feb, 2017

1 commit

  • This patch makes arch-independent testcases for RODATA. Both x86 and
    x86_64 already have testcases for RODATA, But they are arch-specific
    because using inline assembly directly.

    And cacheflush.h is not a suitable location for rodata-test related
    things. Since they were in cacheflush.h, If someone change the state of
    CONFIG_DEBUG_RODATA_TEST, It cause overhead of kernel build.

    To solve the above issues, write arch-independent testcases and move it
    to shared location.

    [jinb.park7@gmail.com: fix config dependency]
    Link: http://lkml.kernel.org/r/20170209131625.GA16954@pjb1027-Latitude-E5410
    Link: http://lkml.kernel.org/r/20170129105436.GA9303@pjb1027-Latitude-E5410
    Signed-off-by: Jinbum Park
    Acked-by: Kees Cook
    Cc: Ingo Molnar
    Cc: H. Peter Anvin
    Cc: Arjan van de Ven
    Cc: Laura Abbott
    Cc: Russell King
    Cc: Valentin Rothberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jinbum Park