Linux-Development-Sys Digest #316

2000-12-02 Thread Digestifier

Linux-Development-Sys Digest #316, Volume #8  Sat, 2 Dec 00 13:13:10 EST

Contents:
  Can I use alloca() in a kernel module? (Brian Horton)
  Re: Can I use alloca() in a kernel module? (Andi Kleen)
  Re: Can I use alloca() in a kernel module? (Kaz Kylheku)
  mtio.h -- pass blocksize to tape dev ??? ([EMAIL PROTECTED])
  Re: mtio.h -- pass blocksize to tape dev ??? (Jerry Peters)
  Re: Database in Redhat Linux ("Anthony W. Youngman")
  Re: How to install a NMI ISR ("Lee Ho")
  Re: ATM support on Linux (Frank Sweetser)
  Linux installer ("Andre Weigandt")
  Re: this sucks! (Michael V. Ferranti)
  Search order for shared libraries (ld-linux.so and ldconfig) (Michael Kerrisk)
  Re: Linux installer ([EMAIL PROTECTED])
  videosync (Russell & Kristal Suter)
  Re: this sucks! ("Julie Churchwell")



From: Brian Horton <[EMAIL PROTECTED]>
Subject: Can I use alloca() in a kernel module?
Date: Fri, 01 Dec 2000 10:55:08 -0600

I'm trying to use alloca() in a kernel module -- is that allowed? I'm
blowing the box up (clears the screen and reboots...) using alloca's,
tho doing kmalloc/kfree work. (I don't THINK that I've got a leak, but
yes, I'm looking into that as well. :-)

RedHat 6.2, 2.2.14 kernel

thx.bri.

--

From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: Can I use alloca() in a kernel module?
Date: 01 Dec 2000 19:25:05 +0100

Brian Horton <[EMAIL PROTECTED]> writes:

> I'm trying to use alloca() in a kernel module -- is that allowed? I'm
> blowing the box up (clears the screen and reboots...) using alloca's,
> tho doing kmalloc/kfree work. (I don't THINK that I've got a leak, but
> yes, I'm looking into that as well. :-)

alloca() should work. But remember that the kernel stack 
is very limited: ~6K on IA32 and you need to keep some space for 
interrupts so you should not use more than 3-4K. So usually it is a better 
idea to use kmalloc() or get_free_pages() for bigger allocations. 

You're probably overflowing your stack.

-Andi

--

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Can I use alloca() in a kernel module?
Reply-To: [EMAIL PROTECTED]
Date: Fri, 01 Dec 2000 18:59:58 GMT

On Fri, 01 Dec 2000 10:55:08 -0600, Brian Horton <[EMAIL PROTECTED]> wrote:
>I'm trying to use alloca() in a kernel module -- is that allowed? I'm
>blowing the box up (clears the screen and reboots...) using alloca's,
>tho doing kmalloc/kfree work. (I don't THINK that I've got a leak, but
>yes, I'm looking into that as well. :-)

You don't have a lot of stack space in the kernel. The kernel stack is distinct
from the user space stack.  It is non-swappable memory and there isn't a whole
lot of it, jut a few kilobytes.

There are alternatives to doing dynamic allocation; e.g. perhaps your code can
maintain some persistent context from one call to the next so that it can reuse
the same buffer.

E.g. if you are writing a driver, then you can hang this off the driver
structure.

Do you truly need a lot of temporary space that must be acquired and released
within the same function call?


--

From: [EMAIL PROTECTED]
Subject: mtio.h -- pass blocksize to tape dev ???
Date: Fri, 01 Dec 2000 20:51:47 GMT

Using structs and macros defined in mtio.h, I am not sure how I would
pass a blocksize into ioctl.

In AIX (please do not throw rocks) they have a struct just for changing
the blocksize of the streaming (or magnetic) tape, and it is this struct
that is passed as the 3rd argument to ioctl.

In Linux, the MTSETBLK define is just another possible value in the mtop
struct, but then how do I pass the new blocksize that I want?

I am new at this, so please forgive if too stupid of a question?


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

--

From: Jerry Peters <[EMAIL PROTECTED]>
Subject: Re: mtio.h -- pass blocksize to tape dev ???
Date: Fri, 01 Dec 2000 23:15:30 GMT

[EMAIL PROTECTED] wrote:
> Using structs and macros defined in mtio.h, I am not sure how I would
> pass a blocksize into ioctl.

> In AIX (please do not throw rocks) they have a struct just for changing
> the blocksize of the streaming (or magnetic) tape, and it is this struct
> that is passed as the 3rd argument to ioctl.

> In Linux, the MTSETBLK define is just another possible value in the mtop
> struct, but then how do I pass the new blocksize that I want?

> I am new at this, so please forgive if too stupid of a question?


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

I suggest you find the source for Linux mt. It should be called
something like mt-st-0.5b. It allows setting both the block size &
default block size. 

Linux-Development-Sys Digest #316

1999-01-21 Thread Digestifier

Linux-Development-Sys Digest #316, Volume #6 Thu, 21 Jan 99 23:13:55 EST

Contents:
  Re: Why I'm dumping Linux, going back to Windblows (Gordon Scott)
  Re: silly question (Robert Ribnitz)
  Re: Can I run a DOS Device Driver in an emulator (Andreas Mohr)
  Re: Problem with I/O Access under Linux (Andreas Mohr)
  Re: Linux Sound Engine (Ross Vandegrift)
  How to tell current kernel config? ("Tim Underwood")
  2.2.0-pre[78] + ncr52c8xxx + tape = n.g. (bill davidsen)
  can't telnet to linux (eddycheung)
  Re: Autofs automounter auto.direct (H. Peter Anvin)
  Re: K6-400 "kernel paging request" errors ("David R. Bergstein")
  Re: K6-400 "kernel paging request" errors ("David R. Bergstein")
  Re: 2.2.0-pre[78] + ncr52c8xxx + tape = n.g. (Remco Treffkorn)
  pre8, modules and problem with aha152x (David Ronis)



From: [EMAIL PROTECTED] (Gordon Scott)
Crossposted-To: alt.os.linux,comp.os.linux.development.apps,comp.os.linux.setup
Subject: Re: Why I'm dumping Linux, going back to Windblows
Date: 21 Jan 1999 09:06:13 GMT
Reply-To: Gordon Scott <[EMAIL PROTECTED]>

Allen Versfeld ([EMAIL PROTECTED]) wrote:
: The best help I have ever had on any computer system is definitely
: MS-DOS 6.xx's 'help' command.

Yes, I liked that, too. It wouldn't scale purely in that form for a Unix,
but it might form a model for newbies. On my only 'dumb user' machine
I just built a useful homepage for them.

On my Unifix distribution, the manual can be accessed via the web browser
and the formatting is just by standard html (2.0, I think). The conversion
seems to be done by a 200line perl script (including gunzip if needed).

: I once read a decent windows .hlp file, BTW.  If you have ever installed

Yes, there are a few -- I did substitute 'rarely' for 'never' in my post
because of that.

G.
--
Gordon Scott Opinions expressed are my own.
[EMAIL PROTECTED]   (official) [EMAIL PROTECTED]  (backdoor)
[EMAIL PROTECTED]  (home) http://www.apis.demon.co.uk
Linux  ...   Because I like to _get_ there today.

--

From: [EMAIL PROTECTED] (Robert Ribnitz)
Subject: Re: silly question
Date: Thu, 21 Jan 1999 20:42:02 GMT

On 01 Jan 1999 17:42:55 -0500, [EMAIL PROTECTED] (Adam P. Jenkins)
wrote:

>ebatchelor <[EMAIL PROTECTED]> writes:
>> I am a new user to Linux.  I am an experienced MSDOS user, have written
>> many batch files to accomplish what I want to do, and can recall the
>> names of most DOS utilities I need to use.  Of course, DOS sucks, but
>> Windows cures many of the DOS shortcomings (long file names,
>> multitasking (almost), etc.).  Linux seems to incorporate the best of
>> both worlds,
>> 
>> but
>> 
>> Why the convoluted, hard to recall, someone thought it was funny in 1975
>> utility names?  It seems to me that BASH could be easily recoded to
>> include easy to use and remember identifiers without giving up ANY
>> functionality.  I know it's part of the worship Unix thing, but it seems
>> Linux could be more user friendly with little effort...
>
>I think for the most part it's just different; you think what you're
>used to is more "natural", but really it's just what you learned
>first.  While unix shell command names tend to be a little shorter
>than their DOS counterparts, (if there is even a DOS counterpart),
>most of them are pretty mnemonic.
>
>ls -> "list" files
>rm -> "remove" file
>rmdir  -> remove directory
>mkdir  -> make directory
>cd -> change directory
not to be picky, but thats cwd -> change working directory

>mv -> "move" file
>chmod  -> "change mode" of file
>chown  -> change owner
>sh -> shell
>csh-> C shell
>bash   -> Bourne Again shell (OK, I admit that's being funny)
>man-> manual
>find   -> you guessed it, find files
grep -> get regular expression,  the "find" of msdos

>I could go on, but I think you'll find the "joke" names are far
>outnumbered by the mnemonic names.  In fact the only joke names I can
>think of offhand are bash and bison.  For instance, I definitely don't
>think "del" is any more natural than "rm".  One is short for "delete"
>and one is short for "remove", both equally explainable to a newbie.
>It's only when you get someone who is already used to say, "del", that
>they have trouble with "rm".
Oh, here's the absolute joke: try rm -rf / (only worx as root) its fun
:))

>In any case, you can use the "a