Linux-Development-Sys Digest #69, Volume #8 Mon, 7 Aug 00 12:13:13 EDT
Contents:
VM86 bugs (Kasper Dupont)
Attach to the kernel's functions ("davidz")
Some Qs about parallel port programming (in EPP mode) ([EMAIL PROTECTED])
Re: VM86 bugs (Uwe Bonnes)
Re: Some Qs about parallel port programming (in EPP mode) (Uwe Bonnes)
GET_CURRENT?? ("WSH")
Re: Attach to the kernel's functions (Byron A Jeff)
Re: Camera Application software run on Linux PC ([EMAIL PROTECTED])
How to develope a system performance program (agneskfc)
max # of accepts (Bhavin Shah)
Re: GET_CURRENT?? (Pete Zaitcev)
Re: VM86 bugs (jwk)
Re: Some Qs about parallel port programming (in EPP mode) (Petter Reinholdtsen)
Which protocols layer is ipchain ("Robert")
Re: Camera Application software run on Linux PC (Rod Smith)
----------------------------------------------------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: VM86 bugs
Date: Sun, 06 Aug 2000 18:28:52 +0200
I have found some bugs in: linux/arch/i386/kernel/vm86.c
Instructions emulated in kernel space do not make a
trace interrupt when the trace flag is enabled. That
makes the DOS debugger work incorrectly in some
situations. The same emulations does some userspace
memory access without checking, that causes oopses in
some situations.
Is there someone maintaining vm86 or is anybody already
working on those bugs? Otherwise I will try to fix them
by myself.
--
Kasper Dupont
------------------------------
From: "davidz" <[EMAIL PROTECTED]>
Crossposted-To:
alt.uu.comp.os.linux.questions,comp.os.linux,comp.os.linux.development.apps
Subject: Attach to the kernel's functions
Date: Sun, 6 Aug 2000 20:15:37 +0200
Hi !
Do you any body now , if i want to call to some functions that reside in
specific kernel driver(like pci.o ,ioremap.o )
after the kernel running , how i do it ? that mean which or what libraries i
must to link to my code ,for passing
the completion? (i try libpci.a or ioremap.o but it fault )
Bye
David
------------------------------
From: [EMAIL PROTECTED]
Subject: Some Qs about parallel port programming (in EPP mode)
Date: Sun, 06 Aug 2000 18:38:38 GMT
Hi all,
I am a newie in Linux device driver programming. I need to write a
parallel port driver in EPP mode and have read the parallel port
spec. in the past two weeks. However, I still get confused and hope
for the help.
1. Is it right that I just write/read the PARPORT_PORT_BASE+4, the
hardware will do the EPP handshake itself and transfer the data?
If not, any bits in the register I need to (de)active?
2. I have read lp.c in Linux Kernel Source and found the following
code. Why it use do { ... } while (0) to enclose the actual code?
#define w_dtr(x,y) \
do { parport_write_data(lp_table[(x)].dev->port, (y)); } while (0)
3. Have any web sites discuss how to program the parallel port driver
in EPP mode?
Thanks for any help.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Uwe Bonnes <[EMAIL PROTECTED]>
Subject: Re: VM86 bugs
Date: 6 Aug 2000 19:16:17 GMT
Kasper Dupont <[EMAIL PROTECTED]> wrote:
: I have found some bugs in: linux/arch/i386/kernel/vm86.c
: Instructions emulated in kernel space do not make a
: trace interrupt when the trace flag is enabled. That
: makes the DOS debugger work incorrectly in some
: situations. The same emulations does some userspace
: memory access without checking, that causes oopses in
: some situations.
: Is there someone maintaining vm86 or is anybody already
: working on those bugs? Otherwise I will try to fix them
: by myself.
You should talk to the dosemu devellopers. A first try would be subscribing
to [EMAIL PROTECTED] ( mail to [EMAIL PROTECTED] for
help).
Or mail to Hans Lermen, the dosemu mantainer ( also I guess he is on
vacation now). Have a look at www.dosemu.org for a start ( also the
information there isn't the most actual...)
Think also about possible security implications. VM86 had a hard fight to
get into the kernel in its present form. If those malfunctions are only with
the experimental, most recent kernels, things will get fixed with time, I
think.
Bye
--
Uwe Bonnes [EMAIL PROTECTED]
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
========= Tel. 06151 162516 ======== Fax. 06151 164321 ==========
------------------------------
From: Uwe Bonnes <[EMAIL PROTECTED]>
Subject: Re: Some Qs about parallel port programming (in EPP mode)
Date: 6 Aug 2000 19:17:51 GMT
[EMAIL PROTECTED] wrote:
: Hi all,
: I am a newie in Linux device driver programming. I need to write a
: parallel port driver in EPP mode and have read the parallel port
: spec. in the past two weeks. However, I still get confused and hope
: for the help.
: 1. Is it right that I just write/read the PARPORT_PORT_BASE+4, the
: hardware will do the EPP handshake itself and transfer the data?
: If not, any bits in the register I need to (de)active?
: 2. I have read lp.c in Linux Kernel Source and found the following
: code. Why it use do { ... } while (0) to enclose the actual code?
: #define w_dtr(x,y) \
: do { parport_write_data(lp_table[(x)].dev->port, (y)); } while (0)
: 3. Have any web sites discuss how to program the parallel port driver
: in EPP mode?
Start with reading /usr/src/linux/Documentation/parport.txt...
--
Uwe Bonnes [EMAIL PROTECTED]
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
========= Tel. 06151 162516 ======== Fax. 06151 164321 ==========
------------------------------
From: "WSH" <[EMAIL PROTECTED]>
Subject: GET_CURRENT??
Date: Mon, 7 Aug 2000 05:02:54 +0800
hi
can anyone tell me why this macro can get current task_struct pointer??
#define GET_CURRENT(reg) \
movl %esp, reg; \
andl $-8192, reg;
I had worked with it for a long time, but still can't solve it...
thanks
------------------------------
From: [EMAIL PROTECTED] (Byron A Jeff)
Subject: Re: Attach to the kernel's functions
Date: 6 Aug 2000 18:44:15 -0400
In article <8mk68l$rtu$[EMAIL PROTECTED]>,
davidz <[EMAIL PROTECTED]> wrote:
>Hi !
Posted and Mailed to David.
Also please don't crosspost to so many groups. I'm limiting my response to
cold.system.
>
>Do you any body now , if i want to call to some functions that reside in
>specific kernel driver(like pci.o ,ioremap.o )
>after the kernel running , how i do it ? that mean which or what libraries i
>must to link to my code ,for passing
>the completion? (i try libpci.a or ioremap.o but it fault )
Call from where? If you're writing a kernel module, you can access any
function that isn't static and has its name exported in the System Map.
You can't call any kernel function directly from user space. Here are a few
mechanisms by which kernel functions are involked from user space:
1) System call. Requires updating the kernel's system call map.
2) FileSystem interface. Calls to kernel function can be involked by opening,
reading/writing a file. Note that the kernel driver must have specifically
have bound a file interface to the required functions.
3) /proc interface. Similar to 2 but gives a virtual interface to kernel
information. Again the kernel driver must specifically hook functions into
the proc interface.
BTW you can put the two together by writing your own kernel module. Your
app calls your module with the information you wish to pass to the function,
then your module can then call the function with in the requested info...
I have a feeling that you may be asking a misdirected question. Why not tell
us what it is that you're trying to get done, instead of asking for a method
of getting a task done? Then we can suggest realistic ways of solving the
problem.
Hope this helps,
BAJ
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.setup,linux.dev.c-programming
Subject: Re: Camera Application software run on Linux PC
Date: 06 Aug 2000 19:05:55 -0500
Hi,
I was attempting some USB camera work myself and I got the impression that
USB is not supported in Kernel 2.2 and I have to upgrade to 2.4 ( which I
am going right now). Anyway, is this right. Additionally, any one knows
where I can get a driver for a Intel USB camera?
Thanks a ton in advance,
Aseem
--
------------------------------
From: agneskfc <[EMAIL PROTECTED]>
Subject: How to develope a system performance program
Date: 7 Aug 2000 02:37:10 GMT
Reply-To: [EMAIL PROTECTED]
Hi,
I am writing a program that gets the system performance data from Linux.
Those data include CPU usage, process status, memory usage, ..etc.
What kind of APIs should I use?
Thanks.
agnes
------------------------------
From: Bhavin Shah <[EMAIL PROTECTED]>
Subject: max # of accepts
Date: Sun, 6 Aug 2000 20:08:09 -0700
Hi,
Is there a max number of allowable accepts? I'm
using a select() call with a timeout of 5 to
determine when a connect request was called and
after about 130 or so successful accepts (one after
another), I cannot accept any more connections.
I don't even get a return from select or accept. I
don't even see accept timing out. Thanks in advance.
Bhavin
------------------------------
From: [EMAIL PROTECTED] (Pete Zaitcev)
Subject: Re: GET_CURRENT??
Date: Mon, 07 Aug 2000 03:23:37 GMT
On Mon, 7 Aug 2000 05:02:54 +0800, WSH <[EMAIL PROTECTED]> wrote:
> hi
> can anyone tell me why this macro can get current task_struct pointer??
>
> #define GET_CURRENT(reg) \
> movl %esp, reg; \
> andl $-8192, reg;
>
> I had worked with it for a long time, but still can't solve it...
>
> thanks
+ - - - - - stack bottom == A + 8K
#
+------- %esp (grows down here)
!
!
!
# - - - - - task_current
+ - - - - - stack base == A
--Pete
------------------------------
From: [EMAIL PROTECTED] (jwk)
Subject: Re: VM86 bugs
Date: 7 Aug 2000 05:12:37 GMT
Reply-To: [EMAIL PROTECTED]
On Sun, 06 Aug 2000 18:28:52 +0200, Kasper Dupont
<[EMAIL PROTECTED]> wrote:
>I have found some bugs in: linux/arch/i386/kernel/vm86.c
>
>Instructions emulated in kernel space do not make a
>trace interrupt when the trace flag is enabled. That
>makes the DOS debugger work incorrectly in some
>situations. The same emulations does some userspace
>memory access without checking, that causes oopses in
>some situations.
>
>Is there someone maintaining vm86 or is anybody already
>working on those bugs? Otherwise I will try to fix them
>by myself.
>
Get on the kernel mailing-list and ask again. I'm not sure all the
relevant kernel hackers read this, but I am sure they read the kernel
mailinglist.
Good luck,
Jurriaan
--
Software Engineering: How to program if you cannot.
Edsger W. Dijkstra
GNU/Linux 2.2.17pre15 SMP 2 users load av: 0.01 0.03 0.01
------------------------------
From: [EMAIL PROTECTED] (Petter Reinholdtsen)
Subject: Re: Some Qs about parallel port programming (in EPP mode)
Date: 7 Aug 2000 10:41:42 GMT
[Uwe Bonnes]
> Start with reading /usr/src/linux/Documentation/parport.txt...
And then you read the documentation available from
<URL:http://people.redhat.com/twaugh/parport/>.
--
##> Petter Reinholdtsen <## | [EMAIL PROTECTED]
------------------------------
From: "Robert" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Which protocols layer is ipchain
Date: Mon, 07 Aug 2000 12:40:14 GMT
Hello
I am little carouse about ipchain. I have read most of document about
ipchain. It looks that it do all the job an IP protocol do. I was wondering,
if ipchain is working inside the IP protocol, or it is between network
driver software and IP protocol.
Thanks for your concern Robert
------------------------------
Reply-To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED] (Rod Smith)
Subject: Re: Camera Application software run on Linux PC
Crossposted-To: comp.os.linux.setup,linux.dev.c-programming
Date: Mon, 07 Aug 2000 14:32:42 GMT
[Posted and mailed]
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] writes:
>
> Hi,
>
> I was attempting some USB camera work myself and I got the impression that
> USB is not supported in Kernel 2.2 and I have to upgrade to 2.4 ( which I
> am going right now). Anyway, is this right.
Sort of. IIRC, some 2.2.x kernels have some very minimal USB support,
but for anything serious, you must do one of two things:
1) Upgrade to a 2.3/2.4 kernel
2) Patch a 2.2.x kernel with a 2.3.x USB support tree. Such patches are
available at http://www.linux-usb.org.
> Additionally, any one knows
> where I can get a driver for a Intel USB camera?
Check http://www.linux-usb.org. This site has a database of hardware
reports, including pointers to which USB drivers work for any given
device.
--
Rod Smith, [EMAIL PROTECTED]
http://www.rodsbooks.com
Author of books on Linux & multi-OS configuration
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************