Linux-Development-Sys Digest #409, Volume #8 Thu, 11 Jan 01 20:13:14 EST
Contents:
bit fields, gcc arguments (Matthew Copeland)
Re: Problems with MINORS in Device Driver Writing ([EMAIL PROTECTED])
Re: The magic address 0x8048000 (Andi Kleen)
Internet Technologies Symposium: USITS 01 Program Now Online (Sasha Keller)
How do you keep putty from timing out? ([EMAIL PROTECTED])
Re: about pci_find_device function (Andrey Valik)
Adding a system call via a kernel module (Bob Dilworth)
Re: Extending /proc filesystem on Solaris 7/8? (Philip Brown)
Re: Kernel -> user mode data tranfer ???? (byteme)
Re: Problems with MINORS in Device Driver Writing ([EMAIL PROTECTED])
Re: How do you keep putty from timing out? (Kaz Kylheku)
Re: Adding a system call via a kernel module (Erik Hensema)
Re: ppp 2.3.10 fails (LCP Timeout) after installing 2.4.0 kernel. (Jerry Peters)
Keyboard input ("Bernd Oliver Christiansen")
Re: NFS server probs in 2.2.18 AND 2.4.0 (=?iso-8859-1?Q?Rasmus_B=F8g_Hansen?=)
Re: UNIX98 Pty's ???? ("Karl Heyes")
parallel-clustering (Axel Haenssen)
----------------------------------------------------------------------------
From: Matthew Copeland <[EMAIL PROTECTED]>
Subject: bit fields, gcc arguments
Date: Thu, 11 Jan 2001 11:22:10 -0600
Reply-To: [EMAIL PROTECTED]
Does anyone know of a command line argument to gcc that will
get it to
assign bit fields left-to-right rather than right-to-left?
See below if
you want some example code to see what I am talking about.
Matthew M. Copeland
[EMAIL PROTECTED]
(Intel Arch.)
Example Code:
#include <stdio.h>
struct nak_packet
{
unsigned char type:4;
unsigned char flag:4;
} __attribute__ ((packed));
int main()
{
struct nak_packet* nak;
char segment_nak_packet[1];
segment_nak_packet[0] = 0x23; /*type and flag*/
nak = (struct nak_packet*) segment_nak_packet;
printf("type == %x\n", nak->type);
printf("flag == %x\n", nak->flag);
printf("original == %02x\n",(unsigned char)
segment_nak_packet[0]);
return 1;
}
Example Output:
type == 3
flag == 2
original == 23
So type and flag were assigned left to right, and I
am trying to
get it to be right to left.
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Problems with MINORS in Device Driver Writing
Date: Thu, 11 Jan 2001 18:12:33 GMT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] () wrote:
> In article <93i0kv$u5f$[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
wrote:
>
> >Thanks for the reply Ninja, but yes I have tried the Minor macro but
> >somehow, it returns a 0 every time. Like I said, its like the inode
> >structure from the OS is coming back empty.
>
> Maybe this is what you are wanting:
>
> MINOR(file->f_dentry->d_inode->i_rdev)
>
> --
> http://www.spinics.net/linux
>
Hi ellis,
Thanks a million, it works. Is MINOR(inode->i_rdev); not the way to
get the minor number from the filesystem, why do I have to go to the
file structure for it?
Thanks again
Luke Ng
Grad Student
University of Waterloo
Sent via Deja.com
http://www.deja.com/
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: The magic address 0x8048000
Date: 11 Jan 2001 19:18:10 +0100
Zhihui Zhang <[EMAIL PROTECTED]> writes:
> The code of a process seems to start from some place around 0x800,0000.
> Why it does not start from virtual address 0? Is there a way to achieve
> this? Thanks for your help.
Just give the linker your own linker script. See the binutils documentation
for details (info binutils). The standard scripts are normally
in /usr/lib/ldscripts. You could just copy and modify them.
-Andi
------------------------------
From: Sasha Keller <[EMAIL PROTECTED]>
Crossposted-To:
comp.org.ieee,comp.os.linux.admin,comp.os.linux.misc,comp.os.ms-windows.nt.admin.misc,comp.os.ms-windows.nt.admin.networking,comp.os.ms-windows.nt.admin.security,comp.security
Subject: Internet Technologies Symposium: USITS 01 Program Now Online
Reply-To: [EMAIL PROTECTED]
Date: Wed, 10 Jan 2001 16:27:49 -0800
The Internet continues to evolve in interesting and unexpected ways.
We invite you to join us at USITS '01 to examine what's next for the
Internet.
The 3rd USENIX Symposium on Internet Technologies and Systems
(USITS '01)
March 26-28, 2001
Cathedral Hill Hotel
San Francisco, California USA
http://www.usenix.org/events/usits01
======================================
REGISTER by March 2, 2001, and save $100!
======================================
Sponsored by USENIX, the Advanced Computing Systems Association
Highlights include:
*Keynote Address by Scott Guthery, one of the world's leading
smartcard researchers, on "Interfaces Are Forever"
*Invited Talk by Mike Burrows, now with Compaq, on developing
the Altavista search engine
*Refereed papers on streaming media, new architectures, Internet
measurements, managing mobility, and more . . .
*Opportunities to meet peers and gurus at Birds-of-a-Feather sessions,
Work-in-Progress reports, receptions, luncheons, and the hallway track.
Please come and share your expertise with us! And remember, register
by March 2, 2001, to receive the early bird rates for registration and
hotel rooms. We look forward to seeing you in San Francisco, March
26-28! Visit our Web site for more information:
http://www.usenix.org/events/usits01
=======================================================
USENIX Symposium on Internet Technologies and Systems is sponsored by
USENIX, the Advanced Computing Systems Association, USENIX is an
international membership society.
=======================================================
------------------------------
From: [EMAIL PROTECTED]
Subject: How do you keep putty from timing out?
Date: Thu, 11 Jan 2001 18:49:42 GMT
I was wondering how you can keep putty from
timing out a user. On the configuration window,
i tried typing "0" but doesn't seem to work?...is
it that I have to type "turn off"?...
Thanx in advance
Sent via Deja.com
http://www.deja.com/
------------------------------
From: Andrey Valik <[EMAIL PROTECTED]>
Subject: Re: about pci_find_device function
Date: Thu, 11 Jan 2001 22:14:07 +0500
ShawnTsao wrote:
>
> Hi
>
> sorry, i forgot to write the header
>
> #inlcude <linux/module.h>
> .
> .
> #include <linux/modversions.h>
> .
> .
> #include <linux/types.h>
> #include <linux/kernel.h>
> #include <linux/pci.h>
> .
> .
> .
>
> Thanks for your help
>
> Shawn Tsao
How about compiler option -D__KERNEL__ - present ?
--
+----------------------+
| Andrey V. Valik |
| Papillon Systems |
|Mailto:[EMAIL PROTECTED]|
+----------------------+
------------------------------
From: Bob Dilworth <[EMAIL PROTECTED]>
Subject: Adding a system call via a kernel module
Date: Thu, 11 Jan 2001 14:26:13 -0500
All:
Does anyone know the definitive answer to the question of whether or not
a new system call can be added via a module. In looking through old
threads in dejanews I've found that some folks say yes and others say
no. I realize that system call numbers are reserved and that adding one
would require re-numbering it in one's private kernel after installing a
new version. Ori Pommerantz's (spelling) Module Programming Guide has
an example of piggybacking code on an existing system call but this
isn't
exactly the same thing.
So ... can a new call be added through a module and if so how frought
with peril would it be compared to adding it directly to the kernel and
re-compiling?
Thanks in advance!!!!!!!!!
Bob Dilworth
Toledo, Ohio
[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Philip Brown)
Crossposted-To: comp.unix.solaris
Subject: Re: Extending /proc filesystem on Solaris 7/8?
Reply-To: [EMAIL PROTECTED]
Date: Thu, 11 Jan 2001 19:34:29 GMT
On 10 Jan 2001 12:11:26 -0800, [EMAIL PROTECTED] wrote:
>...
>Hmmm, now although my *particular* module bends the Linux recommendations
>and uses a binary representation for *some* of its /proc entries, let me
>play Devil's advocate for a moment here...
>
>What we've seen going on in the networking world for the past few decades
>is that text-based protocols survive and evolve, while binary ones tend
>not to fare well.
That is not as applicable as you seem to thing.
That argument is on "protocols". You can also use it for file formats.
But the topic at hand is a **kernel API**.
Different kettle of fish altogether.
Otherwise I want to hear you argue how OpenGL/X/OSS/ALSA are all failures,
because they use libraries and binary communications instead of "text based
protocols" :-)
--
[Trim the no-bots from my address to reply to me by email!]
[ Do NOT email-CC me on posts. Pick one or the other.]
S.1618 http://thomas.loc.gov/cgi-bin/bdquery/z?d105:SN01618:@@@D
The word of the day is mispergitude
------------------------------
From: [EMAIL PROTECTED] (byteme)
Subject: Re: Kernel -> user mode data tranfer ????
Date: Thu, 11 Jan 2001 19:50:53 GMT
On Thu, 11 Jan 2001 08:44:39 +0000, Kasper Dupont
<[EMAIL PROTECTED]> wrote:
I know I was quite vauge in my description.
>What exactly do you mean by an awaiting user space process?
A Daemon such as syslogd or apache. The Daemon is not the imortant
part. It just takes input from the module does some checking on the
data & spits it out to another machine.
The module looks for certain events that happen in the kernel and
reports them to the daemon. Then the daemon decides what to do about
the event. I don't want the daemon to poll the module to see if there
is any data waiting for it because the info is very time critical. I
only want the daemon to do something when the mod is ready to send
some data. Eliminating any delay between polls.
>
>A process changes between user mode and kernel mode many
>times when doing some work. Also notice that a waiting
>process cannot be in user mode, to wait the process must
>call the scheduler which can only happen in kernel mode.
No I don't mean waiting in the sense of a wait queue. Maybe listening
would be a better desc.
>
>If the process has requested some information by using a
>syscall, you just have to use put_user and nothing else.
>In that case your module is called as a function, when
>you have written the string you return. It is not
>different from a function call in any program.
The proccess is reactive & will make no requests to the module
directly. I realized that put_user won't work after I wrote the msg.
>
>If the process has requested the information, but it has
>to sleep before the information arrives, you will have
>to use a wait queue. The copying of the string cannot be
>done by another process. The process must be waked up,
>when it is awake it copy the string itself and then
>simply returns.
>
Same as above
>If the process has not requested the information, you
>cannot just use put_user. You can use either a signal
>with a signal context or a filesystem object like a
>socket.
This looks to be my best bet. I assume that I can't use the standard
functions like sockfd = socket(AF_UNIX, SOCK_STREAM, 0) while in the
module.
>
>It is posible to make a callback function, but that
>would create a large security hole. Signals is the safe
>alternative to callbacks.
>
>If you give an example of how you would like the user
>program to look I might be able to give a better answer.
>
The daemon has no real restrictions apon it. The best way to get the
data out of the module will determine how to write the Daemon. Iv'e
got most of the module done and it's working just fine up to the point
of passing the data to the daemon
kevin
>
>Kasper Dupont
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Problems with MINORS in Device Driver Writing
Date: Thu, 11 Jan 2001 19:43:49 GMT
In article <93kt27$fs9$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] () wrote:
> > In article <93i0kv$u5f$[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> wrote:
> >
> > >Thanks for the reply Ninja, but yes I have tried the Minor macro
but
> > >somehow, it returns a 0 every time. Like I said, its like the
inode
> > >structure from the OS is coming back empty.
> >
> > Maybe this is what you are wanting:
> >
> > MINOR(file->f_dentry->d_inode->i_rdev)
> >
> > --
> > http://www.spinics.net/linux
> >
>
> Hi ellis,
>
> Thanks a million, it works. Is MINOR(inode->i_rdev); not the way to
> get the minor number from the filesystem, why do I have to go to the
> file structure for it?
>
> Thanks again
> Luke Ng
> Grad Student
> University of Waterloo
>
> Sent via Deja.com
> http://www.deja.com/
>
Hi Ellis,
I was a little anxious in saying it works. It works and it doesn't
work. I tried MINOR(file->f_dentry->d_inode->i_rdev); it makes the OS
respond with a message saying that the right minor device has been
opened, however, it causes a segmentation fault which I tracked to the
to file->f_dentry pointer, it reports that this pointer is located at
0x00000000 is something really screwed or what. When it tries to
report the file->f_dentry->d_inode it causes a CPU dump. Any further
help would be appreciated.
Thanks for the reply
Luke Ng
Grad Student
University of Waterloo
Sent via Deja.com
http://www.deja.com/
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: How do you keep putty from timing out?
Reply-To: [EMAIL PROTECTED]
Date: Thu, 11 Jan 2001 20:54:59 GMT
On Thu, 11 Jan 2001 18:49:42 GMT, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>I was wondering how you can keep putty from
>timing out a user.
You might want to try a SSH newsgroup for this question? (I take it
you are talking about Putty, the open source SSH1 client suite for
Windows).
Perhaps there is a server-side IdleTimeout setting in the
/etc/sshd_conf file?
------------------------------
From: [EMAIL PROTECTED] (Erik Hensema)
Subject: Re: Adding a system call via a kernel module
Date: Thu, 11 Jan 2001 21:53:08 +0100
Reply-To: [EMAIL PROTECTED]
Bob Dilworth ([EMAIL PROTECTED]) wrote:
>All:
>Does anyone know the definitive answer to the question of whether or
>not
>a new system call can be added via a module. In looking through old
>threads in dejanews I've found that some folks say yes and others say
>no. I realize that system call numbers are reserved and that adding
>one
>would require re-numbering it in one's private kernel after
>installing a
>new version. Ori Pommerantz's (spelling) Module Programming Guide
>has an example of piggybacking code on an existing system call but
>this isn't exactly the same thing.
>So ... can a new call be added through a module and if so how frought
>with peril would it be compared to adding it directly to the kernel
>and re-compiling?
According to Linus himself, the answer is simply no. You'll have to modify
entry.S to do so, I think.
The normal way to create new calls it to create a device inode and to use
ioctl's.
--
Erik Hensema ([EMAIL PROTECTED])
Registered Linux user #38371 -- http://counter.li.org
------------------------------
From: Jerry Peters <[EMAIL PROTECTED]>
Subject: Re: ppp 2.3.10 fails (LCP Timeout) after installing 2.4.0 kernel.
Date: Thu, 11 Jan 2001 22:01:51 GMT
Clifford Kite <[EMAIL PROTECTED]> wrote:
> Gene Heskett <[EMAIL PROTECTED]> wrote:
>> Gene Heskett sends Greetings to Jerry Peters;
>> JP> Definitely not my pppd, which came from cs.anu.edu.au. It expects
>> JP> everything in /etc/ppp. I would suspect a distribution customized
>> JP> pppd. If the distro has changed the location of the config files,
>> JP> then the distro should have changed the man pages accordingly.
>> Jerry, I'd *almost* argue that point, because I'm quite sure I got that
>> tar.gz from the .au site Clifford Kite gave me a few weeks back. Of
>> course .au is a heck of a lot of square miles, so it might not have been
>> the same site, but it most certainly was an aussie site I got it from.
>> Is that the same site you gave me Clifford?
> No. The site for the new 2.4.0 pppd source packages, and any later 2.4.x
> pppd that Paul Mackerras generates, is linuxcare.com.au. The ANU site
> only has the previous 2.3.x kernel series, unless there's a good hiding
> place there that I haven't discovered.
> But, again, there is no standard track ppp-2.4.1, it's got to be Red Hat
> that generates that. Maybe it was a typo? Even when RH dithers an
> original package, in the past it would have been named something like
> ppp-2.4.0-1. There has been no change in the location of the secrets
> files in the standard 2.4.0 either.
> The way RH does configuration for connecting with pppd, and perhaps
> also changing pppd to suit them, are covered by the "a distribution
> thing" I mentioned. In order to make progress, changes must occur, but
> not all changes are good. I think RH often does the Linux community a
> disservice when it obfuscates configuration while attempting to ease the
> transistion to Linux from MS (and thereby promote it's distribution in
> the process).
> --
> Clifford Kite <kite@inet%port.com> Not a guru. (tm)
> /* For every credibility gap, there is a gullibility fill.
> -- R. Clopton */
I would _deinitely_ agree with you on this. There are reasonably
standard places for config files and there is no good reason for most
of their changes, except for obfuscation. That's why I use slackware.
Jerry
------------------------------
From: "Bernd Oliver Christiansen" <[EMAIL PROTECTED]>
Subject: Keyboard input
Date: Thu, 11 Jan 2001 15:30:23 -0800
Hello:
I'd like to learn more about programming the keyboard under Linux. I
basically need a way to read all keys and modifiers (e.g., I'd like to be
able to read SHIFT-LEFT, PAGE UP, etc.). Where can I find more information
on this topic?
Also, in general, what's a good starting point for exploring the various
Linux APIs?
Thanks,
-Bernd
------------------------------
From: =?iso-8859-1?Q?Rasmus_B=F8g_Hansen?= <[EMAIL PROTECTED]>
Subject: Re: NFS server probs in 2.2.18 AND 2.4.0
Date: Fri, 12 Jan 2001 00:54:54 +0100
On Thu, 11 Jan 2001 [EMAIL PROTECTED] wrote:
> Ok, here I go:
>
> NFS server support working fine in <2.2.18 as I had several exported
> directories to other machines on my lan.
> After downloading and compiling 2.2.18 and specifying NFS server
> support, I get a "NFS server lockdsvc" error on bootup (if nfsd.o is
> compiled in) or "undefined symbols in nfsd.o" if i compile it as a
> module.
>
> I had given up on getting it working and changed to using samba shares
> instead. Now getting the source for 2.4.0 and all the required util
> upgrades I get the SAME errors.
You have to comment out the line which calls rpc.lockd in your nfsd
startup script, as lockd is now started automatically by the kernel.
> I really need a helping hand here.
>
> John
> --
> "If you're not scared, then you're not going fast enough"
>
> http://www.btinternet.com/~megatron
Rasmus B�g Hansen
------------------------------
From: "Karl Heyes" <[EMAIL PROTECTED]>
Subject: Re: UNIX98 Pty's ????
Date: Fri, 12 Jan 2001 00:26:29 +0000
In article <93kj2s$gut$[EMAIL PROTECTED]>, "Morten B�hmer"
<[EMAIL PROTECTED]> wrote:
> Ok, thanks for the lesson.
>
> I still get an error with kwrited (KDE) when I start X(with KDE)
>
> It seems like kwrited wants to create the file pts/0 but it cannot.
> Do you now why this is?
>
> I have managed to get other programs to create files in the pts/
> dir.
The pts/* files should appear automatically. kwrited should not try
to create the file. The process should open /dev/ptmx then call
ptsname() libc call to get the tty name. I don't use KDE so I'not
sure what kwrited does.
karl.
------------------------------
From: Axel Haenssen <[EMAIL PROTECTED]>
Subject: parallel-clustering
Date: Thu, 11 Jan 2001 20:29:01 -0500
Reply-To: [EMAIL PROTECTED]
Hi Guys,
I need some Information concerning how to set up a
parallel-processing-linux-cluster (Beowulf?!Concept). Demanded is an 16
nodes rack mounted system for mathematical models in Biology. I have to
come up with a good hardwaresolution within a week and was wondering if
anybody has setup a system like this and can give me some tips.
Thanks very much in advance
Please contact me via email
Axel
--
Axel Haenssen
Princeton Environmental Institute
Princeton University
Princeton, NJ 08544
voice:(609)258-6999
email: [EMAIL PROTECTED]
------------------------------
** 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 by posting to the
comp.os.linux.development.system newsgroup.
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
******************************