lkml.org 
[lkml]   [2004]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [ACPI] Re: [PATCH/RFC] exposing ACPI objects in sysfs
From
Date
On Tue, 2004-09-21 at 21:06 +0200, Andi Kleen wrote:
> On Tue, Sep 21, 2004 at 07:26:25PM +0200, Pavel Machek wrote:
> > > +struct special_cmd {
> > > + u32 magic;
> > > + unsigned int cmd;
> > > + char *args;
> > > +};
> >
> > Talk to Andi Kleen; passing such structures using read/write is evil,
> > because (unlike ioctl) there's no place to put 32/64bit
> > translation. Imagine i386 application running on x86-64 system.
>
> Yes, Pavel is right. Please don't pass pointers by read/write
> because it cannot be 32bit emulated.

All pointers are actually interpreted as offsets into the buffer for
this interface. They are not actually pointers. I believe the 32bit
emulation problem is limited to an ILP32 application generating data
structures appropriate for an LP64 kernel. While difficult, it can be
done.

Alex

--
Alex Williamson HP Linux & Open Source Lab

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.072 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site