Red Hat Bugzilla – Bug 229304
[patch] vdso is in user's way when exec-shield is off
Last modified: 2008-06-06 03:44:34 EDT
Description of problem: On i386 the vdso is still being placed randomly even
when exec-shield is off. This interferes with the user address space, because
the vdso cannot be moved. Random placement reduces the contiguous space that
otherwise would be available to the user. This is somewhat OK when exec-shield
is on, but is not reasonable when exec-shield is off. Instead, when exec-shield
is off, then the vdso should be placed at STACK_TOP, in order to interfere as
little as possible with the user's use of address space. i686 boxes still must
provide service for a while longer [before being replaced by x86_64 with 64-bit
address space where the problem does not arise], including running applications
that want maximal contiguous address space.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. echo 0 >/proc/sys/kernel/exec-shield # turn off exec-shield
2. grep vdso /proc/self/maps
00924000-00925000 r-xp 00924000 00:00 0 [vdso]
# or other address below 0x08048000
bffff000-c0000000 r-xp bffff000 00:00 0 [vdso]
# one page below TASK_SIZE
Related: bug 207020 (vDSO placement ignores exec-shield; inhibits NX simulation)
See suggested patch linux-2.6-x86-vdso-stacktop-0.patch (attached.)
Created attachment 148397 [details]
put vdso at STACK_TOP when 0==exec_shield
vDSO randomization is a feature added to the upstream kernel.
I don't think anybody thought about an off switch for it.
You could try:
The only other thing I can suggest is trying the kernel boot parameter
"vdso=0", which will disable it completely. This may or may not be useful,
and your system might not even boot with that set.
Setting to zero all three of vdso, vdso_populate, and randomize_va_space still
gives a random page for vdso in 2.6.19-1.2911.fc6. The f7 development
installers via rescue CD and diskboot.img fail today; I'll test there soon.
Also setting vdso_enabled to zero (along with the three other variables
mentioned before) still gives a random page for vdso in 2.6.19-1.2911.fc6.
Created attachment 148544 [details]
This patch to kernel-2.6.20-1.2936.fc7 places vdso for i386 according to the
value in /proc/sys/vm/vdso_enabled:
0: no vdso at all
1: random free page
3: just below the .text of main
4: just below the .text of PT_INTERP
Did you send your patch to the linux-kernel mailing list?
If not, please do.
fully honor vdso_enabled [i386, sh; x86_64?] John Reiser
Hmm, /proc/sys/vm/legacy_va_layout changes things. Not sure if it's
what you want, though.
Moving to 'devel' as discussed on
You need to disable the vdso at boot time. Once booted it can't be changed
AFAICT. So try booting with "vdso=0".
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.
If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)
Thanks for your help, and we apologize again that we haven't handled
these issues to this point.
The process we're following is outlined here:
We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
The problem persists in 2.6.25-0.195.rc8.git1.fc9.i686, and has gotten worse.
There is no way to turn off the vdso, not even booting with " vdso=0" appended
to the kernel boot commandline. /proc/sys/vm/vdso_enabled says 0, but "grep
vdso /proc/self/maps" still shows a vdso:
$ grep vdso /proc/self/maps
00131000-00132000 r-xp 00131000 00:00 0 [vdso]
Does 'nosep' work?
'nosep' should completely disable any VDSO by pretending the CPU doesn't support
the sysenter instruction.
That's not so, Chuck. That only affects the choice of which vDSO image to use.
Patches were merged upstream for this:
x86 vDSO: don't map 32-bit vdso when disabled
x86 vDSO: don't use disabled vDSO for signal trampoline
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
Patches in 18.104.22.168-27
kernel-22.214.171.124-30.fc9 has been submitted as an update for Fedora 9
kernel-126.96.36.199-30.fc9 has been pushed to the Fedora 9 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update kernel'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-4630
kernel-188.8.131.52-30.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.