FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Embedded

 
 
LinkBack Thread Tools
 
Old 03-22-2011, 09:26 AM
Martin Gysel
 
Default locales / sandbox violations

Hi

I installed a dev chroot on 2 different systems each, both x64, one
gentoo, one ubuntu as host. in both chroots I created a x-compiler using
crossdev. in the first one I downloaded a prebuilt armv5tel stage and
rebuilt it so it uses my USE flags using the x-compiler and qemu
(depending on pkg). everything went fine so far. in the second chroot I
used the binpkg from the first one to set up the arm sysroot/root. now
if I chroot into the sysroot on the second using qemu I get some access
violations from the sandbox:
ACCESS DENIED open_wr: /dev/null
/usr/lib/portage/bin/ebuild.sh: line 1558: /dev/null: Permission denied
<snip>
--------------------------- ACCESS VIOLATION SUMMARY
---------------------------
LOG FILE "/var/log/sandbox/sandbox-10088.log"

VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: open_wr
S: deny
P: /dev/null
A: /dev/null
R: /dev/null
C: /qemu-wrapper -cpu arm926 /bin/bash /usr/lib/portage/bin/ebuild.sh unpack

after some googling I found a forum thread saying it's a locale issue.
so I tried to play with the locale settings. now depending on the locale
it stop at different stages during emerge. switching of the sandbox also
works... (which I sometimes need to do anyway as the there's a
sandbox/qemu 'malloc' issue)
has someone experienced a similar behavior or knows a solution for this?
does it help if I try to rebuild everything with my 'new' locale
settings? can it be a problem to have not set the same locales in the
'sysroot/qemu chroot' than for the x-compiler?

btw, the glibc natively built using qemu dosen't work but the x-compiled
works fine...

thanks
martin
 
Old 03-22-2011, 12:30 PM
Kfir Lavi
 
Default locales / sandbox violations

On Tue, Mar 22, 2011 at 12:26 PM, Martin Gysel <m.gysel@gmx.ch> wrote:


Hi



I installed a dev chroot on 2 different systems each, both x64, one

gentoo, one ubuntu as host. in both chroots I created a x-compiler using

crossdev. in the first one I downloaded a prebuilt armv5tel stage and

rebuilt it so it uses my USE flags using the x-compiler and qemu

(depending on pkg). everything went fine so far. in the second chroot I

used the binpkg from the first one to set up the arm sysroot/root. now

if I chroot into the sysroot on the second using qemu I get some access

violations from the sandbox:

ACCESS DENIED *open_wr: * * */dev/null

/usr/lib/portage/bin/ebuild.sh: line 1558: /dev/null: Permission denied

<snip>

--------------------------- ACCESS VIOLATION SUMMARY

---------------------------

LOG FILE "/var/log/sandbox/sandbox-10088.log"



VERSION 1.0

FORMAT: F - Function called

FORMAT: S - Access Status

FORMAT: P - Path as passed to function

FORMAT: A - Absolute Path (not canonical)

FORMAT: R - Canonical Path

FORMAT: C - Command Line



F: open_wr

S: deny

P: /dev/null

A: /dev/null

R: /dev/null

C: /qemu-wrapper -cpu arm926 /bin/bash /usr/lib/portage/bin/ebuild.sh unpack



after some googling I found a forum thread saying it's a locale issue.

so I tried to play with the locale settings. now depending on the locale

it stop at different stages during emerge. switching of the sandbox also

works... (which I sometimes need to do anyway as the there's a

sandbox/qemu 'malloc' issue)

has someone experienced a similar behavior or knows a solution for this?

does it help if I try to rebuild everything with my 'new' locale

settings? can it be a problem to have not set the same locales in the

'sysroot/qemu chroot' than for the x-compiler?



btw, the glibc natively built using qemu dosen't work but the x-compiled

works fine...



thanks

martin



If I'm understanding correctly, when you chroot on your Gentoo machine, everything goes fine.
If you chroot on the Ubuntu machine, you get this problem.
Is that correct?
chroot also depends on the kernel running. On the Ubuntu, the kernel will be the Ubuntu kernel. Is there


any diffs between the Gentoo kernel and the Ubuntu kernel?
Version of qemu, are close or the Ubuntu one is old?
I can't see why locales are involved here. Can you post the link to the forum thread that state this?


Is 'ls -l /dev/null' the same in each chroot environment (after you bind /dev)?

Kfir
 
Old 03-22-2011, 01:18 PM
Mike Frysinger
 
Default locales / sandbox violations

On Tue, Mar 22, 2011 at 6:26 AM, Martin Gysel wrote:
> now if I chroot into the sysroot on the second using qemu I get some
> access violations from the sandbox:

i doubt qemu handles ptrace and sandbox correctly. probably saner to
just disable sandbox when chrooting via qemu.
-mike
 

Thread Tools




All times are GMT. The time now is 05:15 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org