avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] Other parallel ports on Windows


From: Bernhard Walle
Subject: Re: [avrdude-dev] Other parallel ports on Windows
Date: Wed, 27 Oct 2004 19:27:37 +0200
User-agent: Mutt/1.5.6i

Hello,

* Brian Dean <address@hidden> [2004-10-27 03:56]:
> On Tue, Oct 26, 2004 at 06:32:13AM -0600, E. Weddington wrote:
> 
> > In theory this could be done. I'd like to hear from one of the other
> > developers or admins about whether or not this is desirable.
> 
> I'm not really familiar with how Windows manages this stuff.  In an
> ideal world, it would be like Unix where device access is just through
> the file system and changing devices is as simple as typing in a
> different file name :-)

I personally use Linux and so I aggree with that, of course. :) A
friend of me uses avrdude on Windows (I gave him the hint with avrdude
because he had problems with his programming software for Windows).

> I guess the Windows "way" would be to query the OS to map the name to
> device specific information, i.e., LPT1 at 0x378 etc.  I'm assuming
> there's an API for that in Windows.

As far as I know, to implement parallel port access in a clean way
without the address hacking, you need to write a device driver. So you
need the DDK from Microsoft which is not accessible for free, at least
for Windows XP. But I don't know really.

> One simpler possibility that might not be too hard to do considering
> the existing code might be to simply accept a hex number as a parallel
> port device name.  If the name given begins with "0x", then use
> whatever is given as the base address for the parallel port.
> 
> On second thought, though, that might not be such a good idea since
> that would allow someone to potentially hose up their machine pretty
> good in the case that they pass a bad value in, like maybe an i/o
> register associated with something else entirely, like a disk
> controller or something.  So, um, scratch that.

Well, lots of programs that access the parallel port in the "raw" mode
use something like giveio to access the addresses. For example, the 
ispVM software from Lattice to program CPLDs lets enter you the I/O
address of the parallel port which is what I want in avrdude, too. 

If you run something like giveio which avrdude needs, you _have_
access to the addresses which other hardware like the disk controller
uses. So, if someone $EVIL wants to exploit that, he can. For example
you can edit the avrdude binary and change the address here.

So the problem is already here! To protect the user from accidentally
access, you can give a warning which the user must confirm if the
address is something non-standard. 

But there must be simply a solution: Often avrdude is used to access
self-built hardware. It's a bad idea to connect this hardware to the
mainboard parallel port because if there's something wrong you can
damage the whole mainboard (as far as I know), which is simply more
dangerous than entering a wrong I/O address in a config file.

I hope you can think over your attitude, it's still an important
problem for avrdude on Windows.


Gruß,
Bernhard





reply via email to

[Prev in Thread] Current Thread [Next in Thread]