kopia lustrzana https://gitlab.com/sane-project/website
94 wiersze
4.0 KiB
HTML
94 wiersze
4.0 KiB
HTML
<!-- received="Tue Dec 8 05:37:17 1998 PST" -->
|
|
<!-- sent="Tue, 8 Dec 1998 14:26:06 +0100 (MET)" -->
|
|
<!-- name="becka@rz.uni-duesseldorf.de" -->
|
|
<!-- email="becka@rz.uni-duesseldorf.de" -->
|
|
<!-- subject="Re: SANE standard," -->
|
|
<!-- id="199812081326.OAA24242@zeus.rz.uni-duesseldorf.de" -->
|
|
<!-- inreplyto="366C13DD.7BB00BA6@tu-bs.de" -->
|
|
<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>Tue, 8 Dec 1998 14:26:06 +0100 (MET)</i>
|
|
<p>
|
|
<ul>
|
|
<li> <b>Messages sorted by:</b> <a href="date.html#104">[ date ]</a><a href="index.html#104">[ thread ]</a><a href="subject.html#104">[ subject ]</a><a href="author.html#104">[ author ]</a>
|
|
<!-- next="start" -->
|
|
<li> <b>Next message:</b> <a href="0105.html">Kevin R. Charter: "Re: SnapScan backend"</a>
|
|
<li> <b>Previous message:</b> <a href="0103.html">Jan Starzynski: "SANE_CURRENT_MAJOR"</a>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
</ul>
|
|
<!-- body="start" -->
|
|
Hi <br>
|
|
<p>
|
|
<i>> > 2. For those that can do IO-port-only access, abstraction is as simple as</i><br>
|
|
<i>> > sanei_io_[in/out][b/w/l](IO_address[,data_out]);. </i><br>
|
|
<p>
|
|
<i>> Where are these functions definded? I can't find them anywhere in the</i><br>
|
|
<i>> include/sane/ directory.</i><br>
|
|
<p>
|
|
They aren't yet. I "proposed" - or rather made them up - while writing.<br>
|
|
Suggestions are welcome.<br>
|
|
<p>
|
|
<i>> > 3. Installing SANE suid root is no good idea. I would thus prefer to go</i><br>
|
|
<i>> > via /dev/port on Linux, which can be given appropriate permissions.</i><br>
|
|
<br>
|
|
<i>> Hmmm, could you explain this in more detail? What do you mean by "via</i><br>
|
|
<i>> /dev/port"?</i><br>
|
|
<p>
|
|
Hmm - that might not apply to you, as you detail below, but for those few <br>
|
|
devices that use pretty simple IO-style access, one could go via the special<br>
|
|
file /dev/port which does io-instructions via read()/write() calls.<br>
|
|
This allows to reduce the permission problem from being root to having<br>
|
|
access to /dev/port. This is still a security problem, but less critical<br>
|
|
with respect to reading files one shouldn't and such and harder to<br>
|
|
exploit.<br>
|
|
<p>
|
|
<i>> I thought about writing a linux kernel driver for the direct hardware</i><br>
|
|
<i>> dependend parts of the interface which then would be accessable vi</i><br>
|
|
<i>> /dev/something and ioctl calls, but I don't either know if this was a</i><br>
|
|
<i>> good idea (one more program layer) nor if this is allowed according to</i><br>
|
|
<i>> platform independence. </i><br>
|
|
<p>
|
|
On Linux you will _have_ to do this for most proprietary ISA cards, so <br>
|
|
portability isn't "available" here at all.<br>
|
|
<p>
|
|
<i>> On the other hand, the hard stuff would be nicely encapsulated. Comments?</i><br>
|
|
<p>
|
|
Yes. For most ISA HW I see no other way. There might be a few cards that<br>
|
|
in theory could use what I suggested, but I don't think it is worth the<br>
|
|
bother.<br>
|
|
<p>
|
|
<p>
|
|
<i>> In my case, the question is which direct io port handling routines am I</i><br>
|
|
<i>> allowed to use.</i><br>
|
|
<p>
|
|
The question is: Is IO port access all you need ?<br>
|
|
<p>
|
|
In that case we might want to make up a usermode scheme for it to keep<br>
|
|
it somewhat portable.<br>
|
|
<p>
|
|
However most hardware won't work with that anyway. You will need DMA, IRQ<br>
|
|
or maintain tight timings.<br>
|
|
<p>
|
|
CU, Andy<br>
|
|
<p>
|
|
<pre>
|
|
--
|
|
Andreas Beck | Email : <<a href="mailto:Andreas.Beck@ggi-project.org">Andreas.Beck@ggi-project.org</a>>
|
|
<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="0105.html">Kevin R. Charter: "Re: SnapScan backend"</a>
|
|
<li> <b>Previous message:</b> <a href="0103.html">Jan Starzynski: "SANE_CURRENT_MAJOR"</a>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
</ul>
|