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.  If you can't find it, email me & I'll send you a
copy.

        Jerry

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

From: "Anthony W. Youngman" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.development.apps,comp.os.linux.apps,comp.os.linux.misc,comp.lang.java.databases,comp.databases.informix,comp.databases.oracle.server,comp.databases.sybase,comp.databases.pick,comp.databases.ibm-db2,comp.databases.oracle.misc
Subject: Re: Database in Redhat Linux
Date: Fri, 1 Dec 2000 21:02:59 +0000
Reply-To: "Anthony W. Youngman" <[EMAIL PROTECTED]>

In article <904rq3$54b$[EMAIL PROTECTED]>, Victor Wagner
<[EMAIL PROTECTED]> writes
>In comp.os.linux.misc Anthony W. Youngman <[EMAIL PROTECTED]> wrote:
>: In article <8vmgld$om4$[EMAIL PROTECTED]>, Victor Wagner
>: <[EMAIL PROTECTED]> writes
>:>In comp.os.linux.misc Freelancer <[EMAIL PROTECTED]> wrote:
>:>: I need decide which database going to run for Redhat Linux.
>:>: I know MySQL is the most popular one in Linux world. I need
>:>: you help me to fill out the blank and hole (?) in table below.
>:>
>:>Its a pity for Linux World, that most hype is done by people who don't
>:>know what real database is. So they promote mySQL which is no more than
>:>fast flat-file search engine with SQL-like syntax.
>
>: And it's a real pity that there are so many people who think that the
>: only valid type of database is a SQL database.
>
>Sincerely, I never seen any other kind of database which is usable
>without writing special program for any query. SQL is only practical
>solution've seen, which allows you to type queries in interactively.
>There is also QBE, but it doesn't count, becouse it is
>a) relational
>b) if fully implementted is functionally equivalent to SQL.
>
Ask an END USER to run a query over four entities. Oh, by the way,
there's a many-to-many relationship in there somewhere...

Dead easy for us, unless you assume the user is an idiot and stick a GUI
in the way - unfortunately that's usually a self-fulfilling prophecy :-(
>
>Restriction which mySQL places on the programmers are worst of all - they
>causes them to PROGRAM, instead of to DESIGN.
>
I don't know mySQL that well, but you need some programming for
anything. If you mean triggers, data integrity etc, I gather mySQL was
designed for fast extraction, and it sounds like you're using the wrong
tool for the job...
>
>
>:>
>:>But database is much more than just search engine. It also should ensure
>:>integrity of data both by enforcing some conditions of them (i.e.
>:>foreign keys and triggers) and by rolling failed transactio back to
>:>consistent state.
>
>: And to me, a database is a complete environment, aka AS/400, Pick, etc.
>: A SQL back-end is to databases what the rear legs are to pantomime
>: donkey - it can stand on its own but is useless without the other half.
>
>SQL + storage manager behind them. Nothing more. Even OS is not always
>neccessary.
>May be FORTRAN
>preprocessor. Clients should be written on normal using
>jdbc, odbc, dbi or some other kind of standartized interface.
>
>Of course good interactive shell is good, but I always have dbish.
>
A good interactive shell makes life easy...
>:>
>:>So, only free database is PostgreSQL. But PostgreSQL start to
>:>resemble real database only since 7.0 version, becouse before there was
>:>no foreign keys. I would consider that it IS a database, not RESEMBLES
>:>one only when it begin to support outer joins and binary large objects.
>:>Both are scheduled for 7.1.
>:>
>: I think you mean the only free *relational* database - which is not the
>: same thing at all. There are much better databases out there. While I
>
>Please name _free_ non-relational database which is comparable with
>commercial ones. As far as I know, most free non-relational things are
>compared with say Adabas, like mySQL to Oracle or worse.

I don't know of any _free_ ones that are currently usable. I'm working
on MaVerick...
>
>: would strongly suggest that all database programmers should know
>: relational theory (it helps design immensely), there are a load of far
>: better databases out there. SQL and relational databases put theoretical
>: purity above practicality and functionality, which is why Oracle is such
>: a beast - I could probably write programs that run faster, do more, and
>: handle larger datasets, and all on a system half the size! just because
>: I don't believe "relational is best".
>
>Guys who wrote mySQL think same way. Unfortunately, they was wrong.
>Becouse there is nothing more practical then good theory.
>
>Theoretical purity gives flexibility, scalability and tunability.
>This is why people don't write on CODASIL anymore.
>
Rules are for the guidance of wise men, and the obedience of fools. The
real world is not amenable to forcing into a relational mould. For some
things it works fine, but trying to force non-relational data into a
relational straitjacket can (will?) make life difficult later on. Why
are people now throwing so much effort at object databases? Try running
a data warehouse on a relational db - a big warehouse will bring a Cray
to its knees...

That's why I said I could blow Oracle into a cocked hat - I take their
strengths, add them to mine, and dodge their straitjacket :-)
-- 
Anthony W. Youngman <[EMAIL PROTECTED]>
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the 
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man 
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - <http://www.maverick-dbms.org> Open Source Pick

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

From: "Lee Ho" <[EMAIL PROTECTED]>
Subject: Re: How to install a NMI ISR
Date: Sat, 02 Dec 2000 01:45:15 GMT

[EMAIL PROTECTED] Writes:
>Does anybody know how to install a NMI interrupt handler for Intel PII
>and PIII motherboards.

>
>I know you call call request_irq() and free_irq() for irq 0-15. But are
>there similar routines for the NMI.


Precisely speaking, NMI is a kind of trap not of interrupt, and kernel offers
no API which can change trap handler to modules or other parts
of kernel. Internally, kernel uses set_trap_gate() (arch/i386/kernel/trap.S)
to install trap handler, and install NMI handler in trap_init() function.
But, this function is not exported and the data structure containg IDT table
(idt_table) is not exported too. IMHO, the possible ways are to change
trap handler while initializing trap, or get the address of IDT table and modify
the descriptor manually. (I think both are not good methods)

*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
Lee, Ho. Software Engineer, Embedded Linux Dep, LinuxOne
Mail : [EMAIL PROTECTED] (work), [EMAIL PROTECTED] (personal)
Homepage : http://flyduck.com, http://linuxkernel.to





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

From: [EMAIL PROTECTED] (Frank Sweetser)
Subject: Re: ATM support on Linux
Date: 2 Dec 2000 07:15:00 GMT

Fernando Alfonso Villanueva <[EMAIL PROTECTED]> wrote:
>Hi, I'm a tech student and I'm looking for some information about ATM
>support on Linux.
>
>First, I´ve found in the web that there´s an ATM API developed in
>Switzerland called ATM on Linux, and the driver for the ATM adapter card
>I've got (FORE PCA-200 E) is avaliable at Dresden University Web Page.
>But this information seems to be a little obsolete, as I've heard that
>Linux kernel versions 2.4 and late 2.3 include support for ATM as well
>as the adapter driver. So, I would like you to confirm me wich is the
>current state of the ATM support on Linux

You realize you posted this about a dozen times?  might want to
check your newsreader config...

And yes, I've had this card working under 2.4 kernel fine.

-- 
Frank Sweetser rasmusin at wpi.edu, fs at suave.net  | $ x 14
Full-time WPI Network Tech, Part time Linux/Perl guy |
In most countries selling harmful things like drugs is punishable.
Then howcome people can sell Microsoft software and go unpunished?
(By [EMAIL PROTECTED], Hasse Skrifvars)

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

From: "Andre Weigandt" <[EMAIL PROTECTED]>
Subject: Linux installer
Date: Sat, 2 Dec 2000 08:57:44 +0100

Hi NG,

we have a small project, where we developed an embedded application based on
linux, for browsing internet and playing musik: basicaly only kernel,
networking, X, browser and some multimedia stuff (MP3), with very low RAM
and Harddisk usage and fast boot. Since we had dedicated hardware, there was
no need for installer.

Some PC users came to use and told, that they don't need more functionality
too, and want to have our Software on CD to install it on a regular PC.
Now we want to add support for some more hardware, wich is not a problem,
and an "newbie-ready" installer.

Do somebody know any installer programms wich we could use? I know RedHat
and Co. have nice graphical installares, but do we have to buy a commercial
license for them first? Are there some projects on developing installers for
linux? Any information or links or everything else will be greatly
appreciated.

Thanks a lot.

Andre





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

From: Michael V. Ferranti <[EMAIL PROTECTED]>
Subject: Re: this sucks!
Date: Sat, 02 Dec 2000 10:32:17 +0000

And [EMAIL PROTECTED] spoke thusly:

>I really can't figure out exactly WHAT you all Linux geeks thinks is
>soooo good with linux!?

        Lack of knowledge will do that to ya. <ducks>  It's easy.  Linux
doesn't sugar-coat everything and make us only *believe* that we know
something about computers.  Sorry I can't answer your question...yet.

--               Michael V. Ferranti [blades&inreach*com]
Linux Counter Reg.ID# 177869    http://counter.li.org    GNUke The Planet!
Hell, let's just reinstall Windows.  That always seems to work for awhile.

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

From: Michael Kerrisk <[EMAIL PROTECTED]>
Subject: Search order for shared libraries (ld-linux.so and ldconfig)
Date: Sat, 02 Dec 2000 15:00:47 +0100

Hello,

Two questions about the search order for shared libraries, one to do
with run-time name resolution, and one to do with ldconfig.

QUESTION 1

According to ld.so(8) man page the dynamic linker searches for shared
libraries in the following order

1. Dirs listed in LD_LIBRARY_PATH

2. Libraries listed in /etc/ld.so.cache

3. /usr/lib AND THEN /lib

My tests (SuSE 6.4, kernel 2.2.14, glibc 2.1.3) indicate that the last
of these is wrong - that is, /lib is searched before /usr/lib.  (Using
the dlopen() API, unsurprisingly, gives the same results)

Am I seeing a configuration issue or a documentation bug?  A couple of
things make me think the latter.  One is that the linker (ld) seaches
for libraries in the order /lib and then /usr/lib.  The other is that
the order seems more 'intuitive' - /lib contains the essential libraries
for startup, and thus seems a more natural place to start the search.

I have had a long trawl through glibc (elf sub-dir) sources and cannot
find the code specifically defining the search order.  If anyone happens
to know the piece of code, I'd be interested to know where it is.

QUESTION 2 (Closely related to the previous)

The ldconfig man page isn't precise, but states that in building the
cache (/etc/ld.so.cache) that it searches for libraries :

"in the directories specified on the command line, in the file
/etc/ld.so.conf, and in the trusted directories /usr/lib and /lib"

There is an implied order in this statement, but my testing indicates
the order is this

1. Dirs on cmd line
2. /lib
3. /usr/lib
4. Dirs listed in /etc/ld.so.conf

Can anyone confirm this (and again pointers to the appropriate point in
the source would be handy if anyone has them) or tell me whether it is a
configuration issue?

Thanks

Michael
=========================================

Michael Kerrisk,
michael.kerrisk (AT) gmx.net

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

From: [EMAIL PROTECTED]
Subject: Re: Linux installer
Date: Sat, 02 Dec 2000 14:03:09 GMT

"Andre Weigandt" <[EMAIL PROTECTED]> writes:
> we have a small project, where we developed an embedded application
> based on linux, for browsing internet and playing musik: basicaly
> only kernel, networking, X, browser and some multimedia stuff (MP3),
> with very low RAM and Harddisk usage and fast boot. Since we had
> dedicated hardware, there was no need for installer.

> Some PC users came to use and told, that they don't need more
> functionality too, and want to have our Software on CD to install it
> on a regular PC.  Now we want to add support for some more hardware,
> wich is not a problem, and an "newbie-ready" installer.

> Do somebody know any installer programms wich we could use? I know
> RedHat and Co. have nice graphical installares, but do we have to
> buy a commercial license for them first? Are there some projects on
> developing installers for linux? Any information or links or
> everything else will be greatly appreciated.

You're thinking of RPM, no?  <http://www.rpm.org/> 

RPM, formerly known as the "Red Hat Package Manager," although, these
days, is apparently known more recursively as the "RPM Package
Manager," and was originally sponsored by Caldera [which conspicuously
is _another company_ than Red Hat Software].

Two misunderstandings appear conspicuous:

a) It's _not_ a graphical "install tool;" it requires no participation
   of anything graphical in order to work;

b) Intensive research demonstrates that the licensing is extremely
   liberal; for more details, please see: <a href=
   "http://www.rpm.org/RPM-HOWTO/index.html"> RPM HOWTO </a>

You may want, as well, to extend your research to include third-party
"RPM-related" software, which includes a variety of graphical tools to
select packages; see <a href="http://www.rpm.org/software.html"> RPM
related software </a> for a list thereof.  There are ten "graphical
front ends" listed of varying provenance; none appear to be
proprietary to Red Hat Software, save, arguably, for the deprecated
"grpm" package.

-- 
(concatenate 'string "cbbrowne" "@hex.net") <http://www.ntlug.org/~cbbrowne/>
E.V.A., pod 5, launching...

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

Date: Sat, 02 Dec 2000 10:17:30 -0700
From: Russell & Kristal Suter <[EMAIL PROTECTED]>
Subject: videosync

DQpJIG5lZWQgdG8gYmUgYWJsZSB0byBzeW5jIHdpdGggbXkgTlZpZGlhDQpRdWFkcm8gYmFz
ZWQgY2FyZC4gIEFueW9uZSBrbm93IG9mIGENCndheSB0byBkbyB0aGlzPw0KDQo=

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

From: "Julie Churchwell" <[EMAIL PROTECTED]>
Subject: Re: this sucks!
Date: Sat, 02 Dec 2000 17:27:59 GMT

It sure does!

Many of us know how you feel Eric, and what you are going through right now
does suck, at least it did for me. Personally I just hung in there with
Linux out of stubbornness and kept my mouth shut out of embarassment because
everybody else seemed to be "getting it" while I just got frustrated. I
thought I had made a big mistake and I almost gave up and even after the
better part of a year I still consider myself a newbie. I have actually
spent thousands of dollars worth of my time trying  to master it so Linux is
NOT free if your time is worth anything, and mine is, so I am doubly pissed.
Even though I favor Linux now, I catch myself getting really irritated at
some of the ignorant ranting against Windows, and building up of Linux.
That's like ranting because apples are not oranges. Maybe you are irritated
because the evangelist types made it all sound so heavenly, when its really
a whole lot of work that you didn't need just yet.  The fact is that Windows
will not do what I want it to do, and Linux does and I like the idea that I
can do anything that anyone else can do and the only catch is that I have to
learn how. For me I think I just processed one too many license agreements
and rebooted one too many times, and went bonkers. The light went on and I
realized that no matter how good I got with any of my commercial software I
never get to have full control of my own hardware. I realized that I wasn't
operating my computer, it was operating me! My hard drive would always be
packed with files whose only purpose is to enable somebody else to keep
their hand in my pocket. I don't like being forced to process, store and
manage everybody elses copyright protection schemes, s0ftware contracts and
marketing schemes. I don't want to be forced to buy hardware that I don't
need to keep up with the storage and processing needs of software that does
way more than I want it to do, but never QUITE what I ask it to.  I didn't
buy my computer to be a tool for somebody else to use to bombard me with
constant advertising and legal documents at my own expense. I didn't install
a phone so that telephone solicitors could market to me and waste my time,
and I didn't buy my TV to watch commercials.  That is why many people are
willing to pay the high price of the learning curve and is also why Linux
has to be free.

Exactly WHAT all we geeks think?

Hmmm....Well, I am only a newbie, but I think Linux is only as good or as
bad as we make it-which is exactly what I want. It's about potential and
mastery and creative liberty and about being in control.  I suppose there is
a serious possibility that some of us may be control freaks? Not me of
course.

I LOVE the nerdy source code comments! and I actually READ the docs! and
even get a charge out of some of them because the personality of the writer
isn't edited out.  I mean really, WHERE else can you get a chuckle reading a
help file? I bet Bill Gates reads our Docs for entertainment!  Aussies,
Brits, Asians, Germans, Russians, Scandihooligans and more who all sounded
like their authentic colorful selves. I really love the Docs! It's so weird,
I just realized that in the last few months I have actually written and
thanked 4 different authors for their wonderful Docs. I must be loosing
touch with reality!

All that aside, Linux is a pain in the ass, it's way too much work and I
have no idea why I am doing it either! If you figure it out let me know,
please. Meanwhile I hope you are writing me a driver for my sound card, I am
sooo frustrated.

Julie


<[EMAIL PROTECTED]> wrote in message
news:907oo8$ohn$[EMAIL PROTECTED]...
> Ok, I've asked two really simple questions soo far in this group, but
> haven't received one single answer. I'm new to linux drivers, and I
> really can't figure out exactly WHAT you all Linux geeks thinks is
> soooo good with linux!? I've written drivers for
> Win95/98/ME/CE/NT4/2000 and that is heaven compared with this shit!
>
> Open source - so what!? A good documentation can't be replaced by some
> nerdish source-code comments!
>
> Will you please do two things right for once?
> 1. Tell me how to open a tty device from a kernel model.
> 2. Buy a belt to those too-short and too-often weared jeans of yours.
>
> /E. D.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.



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


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