[parisc-linux] HP-UX binary compatibility

Neulinger, Nathan nneul@umr.edu
Thu, 4 Oct 2001 15:56:41 -0500


Hey, thanks. That's exactly what I needed... Got it working now. 

I've added a bunch more direct syscall calls (for the most part, call
behavior looked close enough or same in man pages) and some stub wrappers.
statfs seems semi-functional as moment, but not quite correct since a few
fields are returned as garbage (just calling real one at moment and ignoring
extra hp fields).

I'll send a patch tomorrow maybe to add some of these. i'm sure some leaves
a lot to be desired, but it's at least a bit more functional for some stuff
I've tested. 

-- Nathan

> -----Original Message-----
> From: Matthew Wilcox [mailto:willy@debian.org]
> Sent: Thursday, October 04, 2001 3:10 PM
> To: Neulinger, Nathan
> Cc: parisc-linux@lists.parisc-linux.org
> Subject: Re: [parisc-linux] HP-UX binary compatibility
> 
> 
> On Thu, Oct 04, 2001 at 12:58:18PM -0500, Neulinger, Nathan wrote:
> > int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2)
> > {
> > /*Unimplemented HP-UX syscall emulation. Syscall #334 (sysfs)
> >   Args: 1 80057bf4 0 400179f0 0 0 0 */
> > 
> >         if ( opcode == 1 ) { /* GETFSIND */
> >                 printk(KERN_DEBUG "hpux_sysfs called with 
> '%s'", (char
> > *)arg1);
> >         }
> > 
> >         printk(KERN_DEBUG "hpux_sysfs called with opcode = 
> %d\n", opcode);
> > }
> 
> You can't do that.  `arg1' points to a user address, not a kernel
> address.  You need to use things like strlen_user and 
> copy_from_user --
> see include/asm-parisc/uaccess.h.
> 
> -- 
> Revolutions do not require corporate support.
>