maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Disabling VDSO (https://talk.maemo.org/showthread.php?t=32696)

adhika_rexuss 2009-10-11 23:48

Disabling VDSO
 
Hi all,

I hope this is the right place to ask this.
I was reading this link and found out that scratchbox does not work when VDSO is enabled.

Currently I'm using Ubuntu Jaunty 9.04 64 bit and the kernel is 2.6.28-11-generic.
It is mentioned that in order to disable it, I need to add vdso32=0 in my boot parameter. Where is this parameter located?
In the next sub title, it also mentioned that I can do that from the sysctl.conf file.

How can I check if currently the VDSO support is enabled in my ubuntu?

Thank you,
Adhika

bdogg64 2009-10-11 23:53

Re: Disabling VDSO
 
sudo nano /proc/sys/vm/vdso_enabled

if the value is 1, then its enabled

tso 2009-10-12 00:10

Re: Disabling VDSO
 
can one do echo 0 > /proc/sys/vm/vdso_enabled to disable it?

allnameswereout 2009-10-12 00:14

Re: Disabling VDSO
 
Quote:

Originally Posted by tso (Post 344060)
can one do echo 0 > /proc/sys/vm/vdso_enabled to disable it?

Not on recent kernel.

This is all very well documented at the wiki entry for Maemo 5 SDK... I cannot say it easier than its written there...

adhika_rexuss 2009-10-12 01:29

Re: Disabling VDSO
 
Thanks a lot Rakia, I forgot that I read that part as well.

I tried looking for /proc/sys/vm/vdso_enabled and /proc/sys/kernel/vdso files but there were no such files.
Is there any particular reason why I cannot see those files?
How can I check if VDSO is enabled now?

Thank you,
Adhika

pelago 2009-10-12 09:56

Re: Disabling VDSO
 
I don't know about checking the /proc things, but if you're running Ubuntu Jaunty 9.04 64 bit and haven't added the boot parameter, then VDSO is enabled. The instructions on the wiki page mention how to disable it, although personally I used kgrubeditor for point-and-clickiness.

One way to check whether it's enabled is to try and login to scratchbox and see if you get the error message mentioned on the wiki page.

adhika_rexuss 2009-10-12 11:01

Re: Disabling VDSO
 
Thanks Pelago, I'll try it and let you all know.

allnameswereout 2009-10-12 20:53

Re: Disabling VDSO
 
Quote:

Originally Posted by adhika_rexuss (Post 344086)
Thanks a lot Rakia, I forgot that I read that part as well.

:D

Quote:

I tried looking for /proc/sys/vm/vdso_enabled and /proc/sys/kernel/vdso files but there were no such files.
Is there any particular reason why I cannot see those files?
How can I check if VDSO is enabled now?
Yes, doesn't work anymore. You cannot edit the feature via proc anymore.

On recent kernels by default VDSO32 is enabled on x86-64, and cannot be disabled except boot loader command. So the default is vdso32=1

Therefore, if /proc/cmdline contains
  • Nothing or vdso32=1 then vdso32 is enabled.
  • vdso32=0 vdso32 is disabled.
  • vdso32=2 compat mode is on (don't know if the latter works with Scratchbox version 1)

So can just check if grep vdso32=0 /proc/cmdline returns anything. If it does return the boot loader command then that means vdso32 is disabled (good thing for Scratchbox v1).

Keep in mind vdso= is for 32 bit on 32 bit kernel, and 64 bit on 64 bit kernel. Therefore, don't touch vdso= in relation to this problem, it won't help.

allnameswereout 2009-10-13 00:09

Re: Disabling VDSO
 
Bah, all this isn't necessary. You don't have to play in your bootloader to disable VDSO32. Its just that the setting has been renamed.

All you have to do is execute

# sysctl abi.vsyscall32=0

or if you prefer to use /proc

# echo 0>/proc/sys/abi/vsyscall32

To make this change permanent type

# echo abi.vsyscall32=0>>/etc/sysctl.conf

It will then be disabled even after reboot.

To check if VDSO32 is enabled execute

# sysctl abi.vsyscall32

or if you prefer to /proc

# cat /proc/sys/abi/vsyscall32

Note this only works on 2.6.25+ x86-64!

adhika_rexuss 2009-10-13 00:25

Re: Disabling VDSO
 
Thanks Rakia, I'll try that later, now I'm stuck with the installation of maemo SDK.
it seems that I have to specify other user when I did

$ sudo ./maemo-scratchbox-install_5.0.sh -u USER

allnameswereout 2009-10-13 01:06

Re: Disabling VDSO
 
Yes, your current user account.

$ sudo ./maemo-scratchbox-install_5.0.sh -u `whoami`

adhika_rexuss 2009-10-13 01:25

Re: Disabling VDSO
 
Rakia, if you read here, it actually said that "Clarification needed: it's not clear to a first-timer whether this should be an existing user name from the host linux system, or a new user name for use only inside the scratchbox environment.]" on steps #3.

On step #5 it mentioned "Proceed further to run the Maemo SDK installer script. This script is run as 'user' outside the scratchbox environment. "

if in step #3 I typed:

$ sudo ./maemo-scratchbox-install_5.0.sh -u adhika

can I run step #5 as user 'adhika' as well?
what does "a user outside scratchbox environment" means?

Thank you,
Adhika

allnameswereout 2009-10-13 08:55

Re: Disabling VDSO
 
Yes, that will work.

A user outside scratchbox environment means a working user account on the Linux system. Usually, that means the non-root account you're using. Your current account you're logged into on the Linux system is probably suitable.

PS: the Maemo SDK documentation on wiki has been updated with clarifications regarding Linux x86-64 and disabling VDSO32. It should be easier with sysctl than editting bootloader such as GRUB(2).

adhika_rexuss 2009-10-13 13:55

Re: Disabling VDSO
 
Thanks a lot Rakia, now I can see the desktop :)

javispedro 2009-10-13 14:21

Re: Disabling VDSO
 
(Hijacking the topic)

In case you're in Scratchbox1 compiling mood, you may want to test this patch which should fix the VDSO issue once for all.

allnameswereout 2009-10-14 12:21

Re: Disabling VDSO
 
Quote:

Originally Posted by javispedro (Post 345366)
(Hijacking the topic)

In case you're in Scratchbox1 compiling mood, you may want to test this patch which should fix the VDSO issue once for all.

(Totally ontopic IMO :D)

If I understand this patches the libc6 which SB1 uses? I just checked, and my SB1 has a newer libc6 (although not as new as most recent Linux distributions), so its questionable whether it still patches and compiles clean since the patch patches a libc6 from 2005.

Does SB2 also have this issue? What is the status of SB2?

You may want to include this in the wiki.

javispedro 2009-10-14 12:36

Re: Disabling VDSO
 
Quote:

Originally Posted by allnameswereout (Post 346171)
I just checked, and my SB1 has a newer libc6 (although not as new as most recent Linux distributions), so its questionable whether it still patches and compiles clean since the patch patches a libc6 from 2005.

Newer? It's still 2.3.2 aka ancient. Check http://www.scratchbox.org/cgi-bin/da...glibc/Makefile . You're probably checking the chroot/target libc version, which should match the versions the devices use.

Quote:

Originally Posted by allnameswereout (Post 346171)
Does SB2 also have this issue?

No AFAIK.

allnameswereout 2009-10-15 16:04

Re: Disabling VDSO
 
Quote:

Originally Posted by javispedro (Post 346184)
Newer? It's still 2.3.2 aka ancient. Check http://www.scratchbox.org/cgi-bin/da...glibc/Makefile . You're probably checking the chroot/target libc version, which should match the versions the devices use.

True. Do you know a way to use APT with deb-src and Scratchbox? I'm now compiling it manually, and this is getting ugly.

javispedro 2009-10-15 16:11

Re: Disabling VDSO
 
Quote:

Originally Posted by allnameswereout (Post 347344)
True. Do you know a way to use APT with deb-src and Scratchbox? I'm now compiling it manually, and this is getting ugly.

I do not know what you mean with deb-src and Scratchbox...

BTW, to use the above glibc patch you need to pull the whole sbox source (and it'll take a lot to build).

allnameswereout 2009-10-18 20:32

Re: Disabling VDSO
 
Quote:

Originally Posted by javispedro (Post 347353)
I do not know what you mean with deb-src and Scratchbox...

BTW, to use the above glibc patch you need to pull the whole sbox source (and it'll take a lot to build).

Yeah I tried that but I have x86-64 bit environment on this machine.

With deb-src I meant to do it in elegant way:
1) Add deb-src entry to get Scratchbox source to /etc/apt/sources.list
2) Exec apt-get -b source scratchbox (or whatever packages are required)
3) Add the patch in scratchbox-directory/debian/files
4) Build the .deb packages.

If one don't care about dirty way then only 1 person just compiles that glibc w/patch and it'd be fixed, right? Not whole scratchbox is required to be recompiled then. Only stuff which linked to glibc static.

javispedro 2009-10-18 20:36

Re: Disabling VDSO
 
Quote:

Originally Posted by allnameswereout (Post 350590)
elegant way

I think that won't be possible. To build sbox I had to use a Debian Sarge VM... :rolleyes:

Quote:

Originally Posted by allnameswereout (Post 350590)
If one don't care about dirty way then only 1 person just compiles that glibc w/patch and it'd be fixed, right? Not whole scratchbox is required to be recompiled then. Only stuff which linked to glibc static.

Well, good luck convincing the sbox build system to do that. Personally, I couldn't make any sense out of it, but if you have more time you might be able to do that :)

OTOH, I could just put my sbox packages somewhere, but they're outdated already (.14 iirc -- but runs fremantle sdk fine).


All times are GMT. The time now is 17:45.

vBulletin® Version 3.8.8