Linux-Development-Sys Digest #292, Volume #8     Tue, 21 Nov 00 11:13:22 EST

Contents:
  Re: injecting keystrokes into virtual console ([EMAIL PROTECTED])
  GLIBC Hash Functions - Please Help... (Stephanie & Gary Sanders)
  Re: Problems with more than one Decision PCCom 8 port Serial card at a  (Arne 
Driescher)
  Changin process name (Nils Henrik Lorentzen)
  Re: Problems with more than one Decision PCCom 8 port Serial card at a    time 
(Leendert Meyer)
  query: Controlling SCSI disks under Linux ([EMAIL PROTECTED])
  Re: non-portable port (Nix)
  Re: Runtime file size modifying (Nix)
  Re: Using semaphores in kernel driver ([EMAIL PROTECTED])
  Re: Runtime file size modifying (Alexander Viro)
  Re: IPC bug? (Janne Himanka)
  Re: What distro does Linus Torvalds use? (DaZaffiro)
  Re: Triton problem with 2.2.X... ([EMAIL PROTECTED])
  Re: Triton problem with 2.2.X... ("Guennadi V. Liakhovetski")
  Re: query: Controlling SCSI disks under Linux (Alain-Pierre CHERTIER)
  IOCTL to control network card buffer (Johan)
  Re: raw packet socket; how to retransmit ("Vadim Model")
  ext2 fs on magneto optical disks ("Massimiliano Caovilla")
  Where can I obtain info about the latest kernels? (Mike Dowling)

----------------------------------------------------------------------------

From: [EMAIL PROTECTED]
Subject: Re: injecting keystrokes into virtual console
Date: Tue, 21 Nov 2000 08:18:39 -0000

On Mon, 20 Nov 2000 19:52:33 -0600 Bryan Hackney <[EMAIL PROTECTED]> wrote:

|  Well, normally getty reads and validates a login, and execs a shell. I can
| imagine dozens of alternate actions instead of only going through the login
| process. This could all be done and preserve the login door also.

I don't see how getty is going to be able to feed in some input to the
session, and then hand that session over to a real input source (e.g.
the virtual console keyboard) without sitting there with the pty open
on one side (the other end of the pty being open by the shell and the
programs it runs), and the real tty open on the other side, just moving
data back and forth between real pty and tty forever once the session
is set up.

It's this extra process, times the 40+ sessions I will have open, which
I am trying to avoid.


| I assume security is not an issue here. Say mygetty execs a shell on a signal X.
|
| killall -SIGX mygetty

OK.  But how do I feed it input, and then get the process out of the way
with that shell/program now getting its input from a real keyboard?


| Or it could be listening on a FIFO, socket, or communication through shared memory.

But what does this have to do with feeding input in?

-- 
| Phil Howard - KA9WGN | My current websites: linuxhomepage.com, ham.org
| phil  (at)  ipal.net +----------------------------------------------------
| Dallas - Texas - USA | [EMAIL PROTECTED]

------------------------------

From: Stephanie & Gary Sanders <[EMAIL PROTECTED]>
Subject: GLIBC Hash Functions - Please Help...
Date: Tue, 21 Nov 2000 08:23:40 GMT

I can't seem to find any decent documentation on the glibc functions. 
The HOWTO I found is all about compiling it, and nothing about using
it.  Any help ( particularly with the hash functions ) would be greatly
appreciated.

BTW, please CC my work email address when replying -
[EMAIL PROTECTED]

Many Thanks,
Gary

------------------------------

From: Arne Driescher <[EMAIL PROTECTED]>
Subject: Re: Problems with more than one Decision PCCom 8 port Serial card at a 
Date: Tue, 21 Nov 2000 09:30:10 +0100

Leendert Meyer wrote:
> 
> Hi there,
> 
> I just want to know if I am the the only one who struggles to get
> more than one PCCom 8 port serial card to work in one machine.
> 
> I am using Mandrake 7.2 with kernel 2.2.17-21
> 
> According to the kernel hack I had to backstitch into the kernel,
> two  Decision PCCom 8 port cards can be used at once.
> 
> I think the problem lies in the driver/patch since the kernel detects both
> cards on the same IRQ and IO address. The IRQ I can understand and agree
> with since IRQ sharing is enabled. But surely the IO address can't be the
> same.
> 
> Anyone out there that can help,  please shout.
> 
> Thanks in advance.
> 
> Leendert.
Hmm, don't know if I can really help ....

First, why do you need a kernel hack? My card does
work with the plain kernel. I only have to set the
IO-addr and IRQ useing setserial.

How have you found out, that both cards have the same
IO-addr.?  Any pci card should automatically get its
own port addr. assigned by the bios/operation system.
If this fails, either your bios is broken or you have
found a bug in the pci section of the kernel (unlikely).
Try a lspci or cat /proc/pci to verify the port addr.
of your cards.

Haveing the same IRQs assigned to both cards should work. 
However, I would rather start with different IRQs. On
most motherboards you can assign the IRQ per pci-slot
in your bios. Changeing the slot sometimes helps a lot!


-Arne

------------------------------

From: Nils Henrik Lorentzen <[EMAIL PROTECTED]>
Subject: Changin process name
Date: Tue, 21 Nov 2000 09:34:05 +0100


This is probably a dumb question, but is
it possible to change the name that occurs when
I run 'ps', for a newly forked process ?
If I create a new process via fork() I would
like it to show up with an other name than
the parent process. Is there a simple way to do this ?

Nils Henrik

------------------------------

From: Leendert Meyer <[EMAIL PROTECTED]>
Subject: Re: Problems with more than one Decision PCCom 8 port Serial card at a    time
Date: Tue, 21 Nov 2000 10:21:26 +0200

Arne Driescher wrote:

> Hmm, don't know if I can really help ....
> 
> First, why do you need a kernel hack? My card does
> work with the plain kernel. 

I could not find the card in the list of cards specified when I 
did a make menuconfig. So I used the driver patch supplied by 
Decision. I also tried to use the kernel module they supply, but that
only managed to hang the system.

Therefor I applied the patch they provided by hand.

Come to think of it I should have tried the setserial thingy from 
the word go. 

I am going to ditch the mods I hacked into the kernel now and try with a 
vanilla kernel again.

You don't happen to have a configured rc.serial file that uses the 
setserial command about you , do you ?


> How have you found out, that both cards have the same
> IO-addr.?  

Lenny says: "My buggy kernel hack reported that to me."  (Haning his head 
in shame )

> Any pci card should automatically get its
> own port addr. assigned by the bios/operation system.

Lenny says: "I know. But I didn't believe /proc/pci. My kernel hack ...."

> 
> Haveing the same IRQs assigned to both cards should work.
> However, I would rather start with different IRQs. On
> most motherboards you can assign the IRQ per pci-slot
> in your bios. Changeing the slot sometimes helps a lot!
> 

Will try. Thanks a lot for the help.


------------------------------

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps,comp.periphs.scsi
Subject: query: Controlling SCSI disks under Linux
Date: Tue, 21 Nov 2000 09:59:10 GMT

Environment: RedHat 7.0 (kernel 2.2.16-22)
==========================================

Hello,
I have a couple of questions regarding controlling
SCSI disks from an application. I've read Heiko
Eibfeldt's "SCSI Programming HOWTO" but have some
more queries.

1. What is the recommended way to control SCSI disks ?
   a. ioctls
      OR
   b. write/read operations to /dev/sg* devices

2. How do I get disk ids via write/read operations
   to the /dev/sg* devices ?
   How do I get the mapping between disk ids and /dev/sg* ?

All help is appreciated.

Regards,
-Milind


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: Nix <$}xinix{[email protected]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: non-portable port
Date: 21 Nov 2000 08:04:23 +0000

[EMAIL PROTECTED] (Alexander Viro) writes:

> In article <[EMAIL PROTECTED]>,
> Kasper Dupont  <[EMAIL PROTECTED]> wrote:
> >                      The BIOS is needed while
> >loading the kernel, but after that it should
> >not be used at all. Even the kernel will not
> >use BIOS calls.
> 
> Actually, sometimes it will (for extra points list the places where it
> happens)

and the ways in which broken BIOSes make each such call malfunction :(

-- 
`The phrase `causes storage to be reserved', doesn't mean that it causes
 storage to be reserved.  This is a fundamental misunderstanding of
 Standardeze.' --- Mike Stump on the GCC list

------------------------------

From: Nix <$}xinix{[email protected]>
Subject: Re: Runtime file size modifying
Date: 21 Nov 2000 08:17:06 +0000

"Z" <[EMAIL PROTECTED]> writes:

> It depends on how you want to reduce the size of the file.
> If you simply want to cut of the back from a file like 
> hte head unix command does, you can simply use truncate().
> But since it is a growing file (I assume some log file)
> it is likly that you want to tail the file. Which means
> you want to keep the newest entries in the file but throw
> away the oldest.
> There is no simple way to do this with just one function
> in C

Unix needs a holepunch() function :(

-- 
`The phrase `causes storage to be reserved', doesn't mean that it causes
 storage to be reserved.  This is a fundamental misunderstanding of
 Standardeze.' --- Mike Stump on the GCC list

------------------------------

From: [EMAIL PROTECTED]
Subject: Re: Using semaphores in kernel driver
Date: Tue, 21 Nov 2000 10:35:18 GMT

Bernhard Drixler <[EMAIL PROTECTED]> wrote:
: I am trying to port an existing device driver implementation to Linux. The
: current implementation does not dstinguish between user and kernel space. It
: creates Events, Mutexes and Semaphores ( in Linux user space) and passes
: their IDs to the driver (kernel space) where they shall be locked until they
: are unlocked by the ISR. Which is the best way to port such an
: implementation to Linux ? How can the kenel handle semaphores created by an
: application ? I would like to avoid to completely re-implement this driver.

Turn your problem inside out -- have your application request
semaphores from the kernel.  Things work -much- better that way.

For an example of shared kernel/userspace locking, the sources for
the Direct Rendering Manager (DRM) in the kernel source tree, and
the XFree86 DRI tree.

        Jeff



-- 
Jeff Garzik             |
Building 1024           | The chief enemy of creativity is "good" sense
MandrakeSoft            |          -- Picasso

------------------------------

From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: Runtime file size modifying
Date: 21 Nov 2000 05:32:20 -0500

In article <[EMAIL PROTECTED]>,
Nix  <$}xinix{[email protected]> wrote:

>Unix needs a holepunch() function :(

No, it doesn't. truncate() is evil enough. OTOH, if you want to implement
it... Feel free - it's going to be interesting to watch.

-- 
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid.  Get yourself a better computer" - Dilbert.

------------------------------

Subject: Re: IPC bug?
From: Janne Himanka <[EMAIL PROTECTED]>
Date: Tue, 21 Nov 2000 10:52:54 GMT

Andi Kleen <[EMAIL PROTECTED]> writes:

> Janne Himanka <[EMAIL PROTECTED]> writes:
> > 
> > Machine is Intel PIII 866 MHz, kernel 2.4.0test10, kernel was
> > compiled with the stock redhat 7.0 gcc (the controversial version
>                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > 2.96). Anybody know a fix for this?
> ^^^^^^^
> 
> You probably just discovered one of the reasons why it is controversal. Try
> not doing it when it hurts. When the program still occurrs with kgcc 
> run the oops through ksymoops and send it to [EMAIL PROTECTED]
> 

OK, I compiled with kgcc, then again with kgcc and test11 kernel; all
produced more or less the same result. I'll report the problem to the
address you mentioned, with ksymoops output.

Thanks,

Janne


------------------------------

From: DaZaffiro <[EMAIL PROTECTED]>
Subject: Re: What distro does Linus Torvalds use?
Date: Tue, 21 Nov 2000 11:57:28 +0100

"Michael V. Ferranti" wrote:

>         TSIA.  He's writing the kernel, so I figure what better flavor of
> distro to use than what he's got running...
>
> --               Michael V. Ferranti [blades&inreach*com]
> Warning: The Surgeon General has deemed that excessive displays of warning
> labels and public service announcements produce stress and shortens lives.

Well he isn't using Redhat I guess... "make install" doesn't work for the
kernel...

A distro it *does* work for is Slackware and I've heard someone saying that
it was the only distro it worked for...

But he's not using any distro I think... What would he need it for?
You can use a distro as a start, but after that you can
install/remove/upgrade anything you like...
A distro then is *nice* if you're lazy or have a slow and expensive internet
connection...
(The conversion from a.out to ELF a few yearsago was an exception, that was a
/virtually/ impossible upgrade)

But *if* he is using some distro it will be some development distro (I
remember Walnut Creek's CDROM had one, don't know if they still have) But
then again, it would be too unstable for you to use daily...


--
Never look up when dragons fly overhead.




------------------------------

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.hardware
Subject: Re: Triton problem with 2.2.X...
Date: Tue, 21 Nov 2000 12:03:07 GMT

In article <[EMAIL PROTECTED]>,
  Daniel =?iso-8859-1?Q?Fern=E1ndez?= Garrido <[EMAIL PROTECTED]>
wrote:

>    I'm trying to compile a 2.2 kernel on a Pentium machine with a TX
> chipset and a i82371 Triton PCI.
>
>    When I use a 2.0.36 kernel and activate the triton module, it works
> perfectly. But when I build a 2.2.17 (or 2.2.12, or any 2.2.X) that
> module does not exist, but it exists a Generic DMA bus mastering
module
> instead.
>    I enable this module and when the kernel starts, it crashes. It
just
> reboots the machine after checking PCI and saying he has encountered a
> PIIX4 and trying to detect hda (I can't read many things here, it's
> reboots really fast!).

I've got a similar problem. But a milder one. I've got a trinitron
chipset too, the kernel 2.2.13 and 2.2.17 compiled ok with the Generic
DMA support, I can use the drive, everything seems to be fine BUT -
hdparm -tT reports speeds of about 4.9 MB/sec maximum with -m16c1u1
options. hdparm -I gives
...
 DblWordIO=no, maxPIO=2(fast), DMA=yes, maxDMA=0(slow)
...
 tDMA={min:120,rec:120}, DMA modes: mword0 mword1 *mword2
 IORDY=on/off, tPIO={min:160,w/IORDY:120}, PIO modes: mode3 mode4
...
from which I was not sure whether or not DMA is enabled. And the problem
appear when I try hdparm -d1 (-X12):
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 setting xfermode to 12 (PIO flow control mode4)
 using_dma    =  0 (off)

I posted this problem on comp.os.linux.networking before (it started as
'slow connection?') and Karl Heyes suggested that I use
CONFIG_BLK_DEV_PIIX and CONFIG_PIIX_TUNING options in the kernel
configuration. BUT - this options ARE present in 2.2.13 for instance,
but NOT in 2.2.17... BTW, Daniel, you can try 2.2.13 with these options
enabled and let me know the result - I have a smallish (1.6G WDC
AC21600H) disk and can't keep several kernels, sorry...

Anybody - any ideas?

Thanks
G. Liakhovetski


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: "Guennadi V. Liakhovetski" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: Triton problem with 2.2.X...
Date: Tue, 21 Nov 2000 12:25:34 +0000

> I've got a similar problem. But a milder one. I've got a trinitron

Ops, I meant triton, of course:-)

G. Liakhovetski
___

Dr. Guennadi V. Liakhovetski
Department of Applied Mathematics
University of Sheffield
U.K.
email: [EMAIL PROTECTED]



------------------------------

From: Alain-Pierre CHERTIER <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.periphs.scsi
Subject: Re: query: Controlling SCSI disks under Linux
Date: Tue, 21 Nov 2000 12:58:42 GMT

Hello !

/dev/sg is lower level access way to disks than /dev/sd (my oppinion).
/dev/sg is a minimal abstraction layer to scsi protocol i/o's
with operating in character mode.

/dev/sd is a specialized block mode device layer.

With /dev/sg, you have to prepare each scsi request you want
and issue it on the scsi bus by a write operation. Then, you should
have to "read the scsi bus" by issuing (writing) the same way
the wanted scsi request and do what you want with read "user" data,
scsi status, and so on...

If I remember, the SCSI Programming Howto gives a complete example
about identifying all on-line devices on the scsi bus by operations
on /dev/sg.

But, what I don't know, is how to determine the correspondance
between dynamically allocated /dev/sgx device names and physical
SCSI ID numbers (/dev/sgx are allocated in the /dev/sga, /dev/sgb,
order, depending on the effective "power-on"/"on-line" status of
scsi devices on the scsi bus when the scsi controller driver
asks for the bus...).

Please send me your email address, I will take a look to the
example source I told you about and will send it to you as soon
as possible.

;-) Kind regards.

Alain-Pierre CHERTIER   <[EMAIL PROTECTED]>


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: Johan <[EMAIL PROTECTED]>
Subject: IOCTL to control network card buffer
Date: Tue, 21 Nov 2000 14:45:49 +0100

Hi,

Does anyone know how I can use a IOCTL call to make a network card hand
back the IP packets in its transmit buffer to the IP layer. I would like
to do this to get better performance when switching between different
interfaces.

/Johan


------------------------------

From: "Vadim Model" <[EMAIL PROTECTED]>
Subject: Re: raw packet socket; how to retransmit
Date: Tue, 21 Nov 2000 18:41:43 +0300

>The result is that writing a driver for NT is an order of
>magnitude more work than writing one for Unix -- and the
>results under NT are less stable and harder to test.


Can not agree on this. I'm in driver development for the last five years and
have experience with NT,VMS,BSD, and Linux. I would say that it is difficult
to make good product in any of them. Mostly because of lack of
documentation. But, actually, now I feel better in NT/2000, sorry. Several
years ago I did prefer Linux. But nowadays ... No.

Advantage (and disadvantage at the same time) of Linux is availability of
the source code -- provided that you have *time* you can figure out any
detail you need. At the same time there is no guarantee that your driver
developed under RH will work under SuSe after a while.

And one more thing. IMVHO, Operating should not provide any additional
difficulties for software developer.

>All you have to do is add a table of service routines
>(open/close/write are all you'd need) and register them with
>the kernel.  The write() call would wait until the Tx hardware
>is available, send the packet, check the Tx status, and return.


Well, I would prefer higher layer -- do not want to modify *all* existing
network drivers. Or for example use O_SYNC (or something like that) to
enable synchronous write() operations on raw packet socket. But I'm not in
the kernel development team...

Regards,
    Vadim

>
>--
>Grant Edwards                   grante             Yow!  YOW!! Everybody
out
>                                  at               of the GENETIC POOL!
>                               visi.com



------------------------------

From: "Massimiliano Caovilla" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: ext2 fs on magneto optical disks
Date: Tue, 21 Nov 2000 16:41:12 +0100

 Hi,
I'm trying to use ext2 fs on a magneto optical disk with block size of 2048
and a total size of 2.6 Gb: I have a problem whenever I try to mkfs a
partition larger then 1 Gb (made  with fdisk): I get weird scsi errors (the
mo drive is /dev/sda), while if I mkfs the whole disk without partitioning I
have no problems at all. It feels like mke2fs doesn't like partitions larger
then 1Gb on my mo disk.
    Any suggestions?

ciao & thanks



------------------------------

From: [EMAIL PROTECTED] (Mike Dowling)
Subject: Where can I obtain info about the latest kernels?
Date: 21 Nov 2000 16:02:07 GMT

I believe that there is a web URL somewhere that archives mailing lists
concerning discussion on the latest kernels.  Does anybody have it at
hand?  (I would rather not join a high volume mailing list.)

2.4.0-pre11 caused me problems with networking, and so I wanted to see
what the experts are saying about it.

Cheers,
Mike
-- 
My email address [EMAIL PROTECTED] above is a valid email
address.  It is a mail alias.  Once spammed, the alias is deleted, and
the integer 'N' incremented.  Currently, mike[36,37] are valid.  If
email to mikeN bounces, try mikeN+1.

------------------------------


** 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
******************************

Reply via email to