Hello
On my cubieboard2 (ARM) I have the following crash when modprobing any module.
Without CONFIG_DEBUG_SET_MODULE_RONX the crash goes away.
I bisected this issue to 85c898db6327353d38f3dd428457384cf81f83f8 module: clean up RO/NX handling.
Regards
[ 622.257293] ------------[ cut here ]------------
[ 622.312558] kernel BUG at ../mm/memory.c:1874!
[ 622.365715] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[ 622.435510] Modules linked in:
[ 622.472128] CPU: 1 PID: 7098 Comm: modprobe Not tainted 4.5.0-rc2+ #79
[ 622.550239] Hardware name: Allwinner sun7i (A20) Family
[ 622.612753] task: ecdba1c0 ti: df920000 task.ti: df920000
[ 622.677360] PC is at apply_to_page_range+0x22c/0x24c
[ 622.736756] LR is at change_memory_common+0x8c/0xd8
[ 622.795110] pc : [<c00fb71c>] lr : [<c001d8cc>] psr: 600e0013
sp : df921da8 ip : df921e00 fp : df921dfc
[ 622.932504] r10: bf00316c r9 : 00000080 r8 : df921e10
[ 622.995015] r7 : c001d804 r6 : bf007000 r5 : bf00316c r4 : bf007000
[ 623.073125] r3 : c001d804 r2 : bf007000 r1 : bf007000 r0 : c078e488
[ 623.151240] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 623.236627] Control: 10c5387d Table: 5f99006a DAC: 00000051
[ 623.305377] Process modprobe (pid: 7098, stack limit = 0xdf920210)
[ 623.379328] Stack: (0xdf921da8 to 0xdf922000)
[ 623.431443] 1da0: c00fb63c c001d810 c078e488 c078e4bc c078e488 c078e488
[ 623.529319] 1dc0: 00000000 bf006fff c078e488 bf007000 c078e488 bf007000 bf00316c bf007000
[ 623.627196] 1de0: bf003040 00000000 00000080 bf00316c df921e3c df921e00 c001d8cc c00fb4fc
[ 623.725073] 1e00: df921e10 c00168d8 df921e18 00000001 00000080 00000000 c001d918 bf00316c
[ 623.822951] 1e20: bf003140 bf003040 bf003140 c077f48c df921e4c df921e40 c001d930 c001d84c
[ 623.920828] 1e40: df921e64 df921e50 c009f6d0 c001d924 c001f728 c001d918 df921e84 df921e68
[ 624.018705] 1e60: c00a1120 c009f68c c07a4480 00000000 bf00304c df921f48 df921f44 df921e88
[ 624.116582] 1e80: c00a2ba0 c00a10e0 00000000 ee995300 ee995300 df921f48 df921ec4 00000000
[ 624.214459] 1ea0: c077f48c 0002ba44 000000df bf004000 000000df bf00304c df921f44 df921ec8
[ 624.312336] 1ec0: bf002024 00000003 bf00203c 00000001 00000000 00000000 6e72656b 00006c65
[ 624.410212] 1ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 624.508089] 1f00: 00000000 00000000 00000000 00000000 00000000 dc8ba700 00000130 00000000
[ 624.605967] 1f20: 00000003 0002ba44 0000017b c000ff64 df920000 00000000 df921fa4 df921f48
[ 624.703845] 1f40: c00a34c4 c00a2208 f0a68000 000256a0 f0a8ce80 f0a8256a f0a83534 00004000
[ 624.801721] 1f60: 00004800 00000000 00000000 00000001 00000032 00000033 0000001d 0000001a
[ 624.899598] 1f80: 00000017 00000000 00000000 000cb180 0003e230 a1b06500 00000000 df921fa8
[ 624.997474] 1fa0: c000fda0 c00a3464 000cb180 0003e230 00000003 0002ba44 00000000 000cb898
[ 625.095353] 1fc0: 000cb180 0003e230 a1b06500 0000017b 0002ba44 00000000 000cb310 000cb210
[ 625.193229] 1fe0: beedbf20 beedbf10 00020cdc b6ee50f0 600e0010 00000003 01615c00 00000074
[ 625.291099] Backtrace:
[ 625.320441] [<c00fb4f0>] (apply_to_page_range) from [<c001d8cc>] (change_memory_common+0x8c/0xd8)
[ 625.426634] r10:bf00316c r9:00000080 r8:00000000 r7:bf003040 r6:bf007000 r5:bf00316c
[ 625.520860] r4:bf007000
[ 625.551239] [<c001d840>] (change_memory_common) from [<c001d930>] (set_memory_ro+0x18/0x1c)
[ 625.651187] r9:c077f48c r8:bf003140 r7:bf003040 r6:bf003140 r5:bf00316c r4:c001d918
[ 625.744382] [<c001d918>] (set_memory_ro) from [<c009f6d0>] (frob_rodata+0x50/0x60)
[ 625.834984] [<c009f680>] (frob_rodata) from [<c00a1120>] (module_enable_ro+0x4c/0x50)
[ 625.928693] r4:c001d918 r3:c001f728
[ 625.971660] [<c00a10d4>] (module_enable_ro) from [<c00a2ba0>] (load_module+0x9a4/0x1114)
[ 626.068487] r6:df921f48 r5:bf00304c r4:00000000 r3:c07a4480
[ 626.136519] [<c00a21fc>] (load_module) from [<c00a34c4>] (SyS_finit_module+0x6c/0x7c)
[ 626.230228] r10:00000000 r9:df920000 r8:c000ff64 r7:0000017b r6:0002ba44 r5:00000003
[ 626.324456] r4:00000000
[ 626.354733] [<c00a3458>] (SyS_finit_module) from [<c000fda0>] (ret_fast_syscall+0x0/0x3c)
[ 626.452605] r6:a1b06500 r5:0003e230 r4:000cb180
[ 626.508153] Code: e083a10c eaffffb6 e5191008 eaffffa7 (e7f001f2)
[ 626.581088] ---[ end trace 61eba2aaa1ce3da6 ]---