[Wine] Want to use Digital Oszilloscope DSO-2100 at parport LPT1

Martin Gregorie martin at gregorie.org
Sat Feb 6 19:34:38 CST 2010


On Sun, 2010-02-07 at 00:13 +0200, Gert van den Berg wrote:
> Sorry, haven't seen this reply...
> 
> On Fri, Feb 5, 2010 at 00:32, Martin Gregorie <martin at gregorie.org> wrote:
> > However, what are we trying to do? I'm asking because I'm not sure its
> > being achieved. In particular, you *must* use execve() to pass the
> > changed permissions along to a child process (in this case to wine.exe).
> > Then somebody would need to dig into Wine to know whether it passes them
> > on to the program we're asking it to run, since that's where they are
> > needed.
> 
> exec and friends are quite new to me ;) The permissions involved here
> are at the CPU level though...
> 
Sure, but when threads and/or child processes are involved there is
normally some sort of permission, e.g suid, needed for the process to
use kernel-level access permissions. This is to keep malicious and/or
sloppily programmed process from causing damage.
 
> > Is this something that would be better handled by other methods, i.e. by
> > changing the device file permissions? The obvious ways are, in ascending
> > order of difficulty:
> >
> To program / sys file are probably using in and out instructions to
> access the ports... It is the CPU itself denying the access, not the
> OS (but the OS can se up the initial permissions)
> 
> See http://en.wikipedia.org/wiki/X86_instruction_listings#Original_8086.2F8088_instructions
> 
> http://en.wikipedia.org/wiki/Protected_mode#Privilege_levels is what
> is blocking the instructions...
> 
ioperm() sets the *process* port access permission bits for access to
the specified port range. So they must be passed wrapper->Wine->app to
be any use.
  
> Additional ports can be set to be accessible (which is what ioperm
> does (iopl lets the application run in ring 0, which gives it the same
> I/O access as the kernel))
> 
Exactly. However as the process that was given the permissions by
calling ioperm() is only the wrapper it must pass them to the
application via Wine before they can be any use. "man ioperm" tells all.


Martin





More information about the wine-users mailing list