Bruce O'Neel | 5 Sep 14:16

Unable to run linuxppc version on Ubuntu Hardy Heron

Hi,

On my Debian ppc systems ppccl runs fine.  I have to build it from source, but, no 
problem.

A uname -a shows:

Linux gnosca 2.6.18-6-powerpc #1 Tue Aug 19 04:51:39 UTC 2008 ppc GNU/Linux

On my ubuntu hardy heron system the downloaded one, or, one built from source, doesn't run.
It doesn't matter whether one tries the trunk svn checkout or the 1.2 release.

edoneel <at> jungfrau:~/tmp/ccl$ ./ppccl 
Killed
edoneel <at> jungfrau:~/tmp/ccl$ strace ./ppccl
execve("./ppccl", ["./ppccl"], [/* 21 vars */]) = -1 EACCES (Permission denied)
+++ killed by SIGKILL +++
Process 6042 detached
edoneel <at> jungfrau:~/tmp/ccl$ 

I do have permission to read, write, and execute the ppccl
executable.

Any ideas?

Thanks!

cheers

bruce
(Continue reading)

Bruce O'Neel | 5 Sep 14:25

Re: Unable to run linuxppc version on Ubuntu Hardy Heron

Hi,

I forgot.  On hardy the uname -a shows:

Linux jungfrau 2.6.24-19-powerpc #1 Wed Aug 20 18:48:30 UTC 2008 ppc GNU/Linux

Thanks!

cheers

bruce

On Fri, Sep 05, 2008 at 02:19:05PM +0200, Bruce O'Neel wrote:
> Hi,
> 
> On my Debian ppc systems ppccl runs fine.  I have to build it from source, but, no 
> problem.
> 
> A uname -a shows:
> 
> Linux gnosca 2.6.18-6-powerpc #1 Tue Aug 19 04:51:39 UTC 2008 ppc GNU/Linux
> 
> On my ubuntu hardy heron system the downloaded one, or, one built from source, doesn't run.
> It doesn't matter whether one tries the trunk svn checkout or the 1.2 release.
> 
> edoneel <at> jungfrau:~/tmp/ccl$ ./ppccl 
> Killed
> edoneel <at> jungfrau:~/tmp/ccl$ strace ./ppccl
> execve("./ppccl", ["./ppccl"], [/* 21 vars */]) = -1 EACCES (Permission denied)
> +++ killed by SIGKILL +++
(Continue reading)

Gary Byers | 5 Sep 15:14

Re: Unable to run linuxppc version on Ubuntu Hardy Heron

The PPC offers addressing modes which make it easy to deal with 16-bit
constants and 16-bit absolute addresses.  CCL exploits this: things
like NIL and T are 16-bit constants (and the addresses of things
that are mapped into low memory); conditional calls to runtime 
support routines can use "branch absolute" instructions to call
those routines (which are also mapped into the low 16 bits of
the address space.)  Apple uses a similar scheme to reference
critical library routines in OSX (since the addressing mode
generally involved signed 16-bit addresses, Apple's scheme uses
addresses in the high 16 bits of the address space.)  That sort
of thing is what the addressing modes are for, after all.

Recent Linux kernels can be configured to enforce an upper limit on the
range of addresses that a (non-root) process is allowed to map
into its address space; this is intended (if I understand correctly)
to avoid problems having to do with NULL pointer references in the
Linux kernel.  It's not clear how effective this is in dealing
with those problems, but at least Ubuntu 8.04 and Fedora 9 ship
with the feature enabled and with a tunable parameter set to
restrict a process's access to the low 64K of its address space.
Whether this makes sense or not on other architectures is debatable;
on the PPC, it means that applications that want to exploit 16-bit
PPC addressing are prohibited from doing so.  I honestly don't
know if anyone involved in this decision thought about this issue
or what they concluded if so.  It's a little hard to believe
that much thought went into that decision.

Fortunately, there are a few workarounds:

- the restriction doesn't apply to processes running as root,
(Continue reading)

Bruce O'Neel | 5 Sep 22:14

Re: Unable to run linuxppc version on Ubuntu Hardy Heron

Hi,

Brilliant!  Thank you very much.  I was quite sad to think that
ccl wouldn't continue to run on my ppc systems.

Thanks!

cheers

bruce

On Fri, Sep 05, 2008 at 07:14:59AM -0600, Gary Byers wrote:
> The PPC offers addressing modes which make it easy to deal with 16-bit
> constants and 16-bit absolute addresses.  CCL exploits this: things
> like NIL and T are 16-bit constants (and the addresses of things
> that are mapped into low memory); conditional calls to runtime 
> support routines can use "branch absolute" instructions to call
> those routines (which are also mapped into the low 16 bits of
> the address space.)  Apple uses a similar scheme to reference
> critical library routines in OSX (since the addressing mode
> generally involved signed 16-bit addresses, Apple's scheme uses
> addresses in the high 16 bits of the address space.)  That sort
> of thing is what the addressing modes are for, after all.
> 
> Recent Linux kernels can be configured to enforce an upper limit on the
> range of addresses that a (non-root) process is allowed to map
> into its address space; this is intended (if I understand correctly)
> to avoid problems having to do with NULL pointer references in the
> Linux kernel.  It's not clear how effective this is in dealing
> with those problems, but at least Ubuntu 8.04 and Fedora 9 ship
(Continue reading)


Gmane