[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56045C8A.50102@tycho.nsa.gov>
Date: Thu, 24 Sep 2015 16:26:50 -0400
From: Stephen Smalley <sds@...ho.nsa.gov>
To: x86@...nel.org
Cc: Kees Cook <keescook@...omium.org>,
lkml <linux-kernel@...r.kernel.org>
Subject: Fwd: rwx mapping between ex_table and rodata
Hi,
With the attached config and 4.3-rc2 on x86_64, I see the following in /sys/kernel/debug/kernel_page_tables:
...
---[ High Kernel Mapping ]---
0xffffffff80000000-0xffffffff81000000 16M pmd
0xffffffff81000000-0xffffffff81600000 6M ro PSE GLB x pmd
0xffffffff81600000-0xffffffff81775000 1492K ro GLB x pte
0xffffffff81775000-0xffffffff81800000 556K RW GLB x pte
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0xffffffff81800000-0xffffffff81a00000 2M ro PSE GLB NX pmd
0xffffffff81a00000-0xffffffff81b43000 1292K ro GLB NX pte
0xffffffff81b43000-0xffffffff82000000 4852K RW GLB NX pte
0xffffffff82000000-0xffffffff82200000 2M RW PSE GLB NX pmd
0xffffffff82200000-0xffffffffa0000000 478M pmd
...
This region seems to be between the end of ex_table and the start of rodata,
$ objdump -x vmlinux | sort
...
ffffffff817728b0 g __ex_table 0000000000000000 __start___ex_table
ffffffff817728b0 l d __ex_table 0000000000000000 __ex_table
ffffffff81774998 g __ex_table 0000000000000000 __stop___ex_table
ffffffff81800000 g .rodata 0000000000000000 __start_rodata
ffffffff81800000 l d .rodata 0000000000000000 .rodata
...
$ readelf -a vmlinux
...
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
...
[ 3] __ex_table PROGBITS ffffffff817728b0 009728b0
00000000000020e8 0000000000000000 A 0 0 8
[ 4] .rodata PROGBITS ffffffff81800000 00a00000
00000000002eefd2 0000000000000000 A 0 0 64
...
I see a similar rwx mapping with the stock Fedora kernels (e.g. 4.1.6), so it isn't new to 4.3.
(fixed typo in x86 address; sorry for the re-send for others)
View attachment "config-rwx" of type "text/plain" (160700 bytes)
Powered by blists - more mailing lists