sane-project-website/old-archive/1998-12/0069.html

96 wiersze
4.4 KiB
HTML

<!-- received="Mon Dec 7 07:54:14 1998 PST" -->
<!-- sent="Mon, 7 Dec 1998 16:51:14 +0100 (MET)" -->
<!-- name="becka@rz.uni-duesseldorf.de" -->
<!-- email="becka@rz.uni-duesseldorf.de" -->
<!-- subject="Re: SANE standard," -->
<!-- id="199812071551.QAA24621@zeus.rz.uni-duesseldorf.de" -->
<!-- inreplyto="366BCB30.6A4BF12B@ariadne-t.gr" -->
<title>sane-devel: Re: SANE standard,</title>
<h1>Re: SANE standard,</h1>
<a href="mailto:becka@rz.uni-duesseldorf.de"><i>becka@rz.uni-duesseldorf.de</i></a><br>
<i>Mon, 7 Dec 1998 16:51:14 +0100 (MET)</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#69">[ date ]</a><a href="index.html#69">[ thread ]</a><a href="subject.html#69">[ subject ]</a><a href="author.html#69">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0070.html">Chris Riggins: "Re: Solaris v2.6 support?"</a>
<li> <b>Previous message:</b> <a href="0068.html">Milon Firikis: "Re: USB scanners?"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
Hi !<br>
<p>
<i>&gt; SANE hides out scsi interface. You should use sanei_scsi routines and</i><br>
<i>&gt; not direct scsi calls. Unfortunately this isn't true for other kind of</i><br>
<i>&gt; interfaces. </i><br>
<p>
Yes. However I would suggest to try the same for other interfaces.<br>
Parallel and serial ports are available on more than one platform, so this<br>
might be reasonable.<br>
<p>
<i>&gt; Especially for the scanners that have a proprietary ISA card</i><br>
<i>&gt; one should use direct hardware port access giving up both compatibility</i><br>
<i>&gt; (PC only) and security (SANE should be setuid root). </i><br>
<p>
I have a few comments to that:<br>
<p>
1. There are only few ISA cards that are content with just IO access. Most <br>
of those also require DMA and/or IRQ (otherwise they would be CPU hogs),<br>
what makes it impossible to do a usermode driver, at least under Linux.<br>
For the handscanners one can use LHII as an intermediate layer. The bridge <br>
to SANE should be pretty trivial. For more advanced scanners, maybe someone<br>
could make LHII.V2, maybe making it a little more like SANE.<br>
I will gladly give advice on that topic, as well as an LHII-&gt;SANE bridge, <br>
if someone finally takes the challenge.<br>
<p>
2. For those that can do IO-port-only access, abstraction is as simple as<br>
sanei_io_[in/out][b/w/l](IO_address[,data_out]);. Due to the suid-stuff <br>
below, it might as well be a good idea to add sanei_io_[claim/release]()<br>
which would eventually call ioperm/iopl as required in Linux.<br>
<p>
3. Installing SANE suid root is no good idea. I would thus prefer to go via<br>
/dev/port on Linux, which can be given appropriate permissions.<br>
<p>
However someone (I'll do if required) should check, what happens to word and<br>
long accesses there, as some cards do not like "emulated" 16 and 32 bit <br>
accesses by multiple 8 bit accesses.<br>
<p>
Another possible solution to lessen the security threat a setuid SANE <br>
installation _might_ (noone checked thoroughly AFAIK) be, would be to<br>
use saned() to separate the memory spaces of the front- and the backend.<br>
However we should really do a thorough check for common loopholes like<br>
buffer overruns and such, then.<br>
<p>
<i>&gt; &gt;Am I simply allowed to access hardware</i><br>
<i>&gt; &gt; ports from my backend and are there any guidelines dealing with</i><br>
<i>&gt; &gt; compatiblity (what system libraries am I allowed to use) and</i><br>
<i>&gt; &gt; portability?</i><br>
<i>&gt; Give some more info (Hardware, interface, libraries) for a more proper</i><br>
<i>&gt; advise and not a general conversation...</i><br>
<p>
Well - anything that is ANSI-C should usually be o.k. . Everything else<br>
should only be used with care and eventually protected by autoconf.<br>
<p>
CU, Andy<br>
<p>
<pre>
--
Andreas Beck | Email : &lt;<a href="mailto:Andreas.Beck@ggi-project.org">Andreas.Beck@ggi-project.org</a>&gt;
<p>
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0070.html">Chris Riggins: "Re: Solaris v2.6 support?"</a>
<li> <b>Previous message:</b> <a href="0068.html">Milon Firikis: "Re: USB scanners?"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>