Linux-Development-Sys Digest #667, Volume #7     Fri, 10 Mar 00 03:13:15 EST

Contents:
  Re: How to set kernel name? I have (none). (Paul Kimoto)
  Re: ERROR MESSAGE: Unable to load interpreter (Juergen Heinzl)
  Re: Linux or Windows (Lee Webb)
  FastTrak66 driver? (Harvey Taylor)
  Re: kmalloc allocate swappable memory? (Fabrice Peix)
  Re: System hanging with SMP-Kernel 2.2.13 (SuSE6.3)? (Robert Redelmeier)
  Bus-master PCI slots (Timothy J. Lee)
  Tracking down kernel memory corruption?? (Mike McDonald)
  Re: Linux or Windows (Paul Jackson)
  Re: Which Package? (Christopher Browne)
  How do I run my stereo sound device as two sound devices??? ("Bob Cheng")
  kernel in C++ (Saurabh Shrivastava)
  Re: kernel in C++ (Christopher Browne)
  Re: kernel in C++ (Kaz Kylheku)
  strange "pwdd <defunct>" processes running in Linux (morgan)
  Re: strange "pwdd <defunct>" processes running in Linux (Kaz Kylheku)

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

From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: How to set kernel name? I have (none).
Date: 9 Mar 2000 16:27:34 -0500
Reply-To: [EMAIL PROTECTED]

In article <8a8thc$hqm$[EMAIL PROTECTED]>, M Sweger wrote:
>       How does one set the kernel name? In my syslog output the
> kernel name is (none) kernel:   some message.
>
> My uname -s is Linux. I've even set the profile so that BOOT_IMAGE
> is set to Linux in the environment like the man page for lilo says. Note:
> I don't have lilo or ext2, I have UMSDOS.

(This is probably off topic for c.o.l.d.system.)

Here "(none)" stands in for the hostname, not a name of the kernel.
Has yours been set in the standard way(s)?

-- 
Paul Kimoto             <[EMAIL PROTECTED]>

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

From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: ERROR MESSAGE: Unable to load interpreter
Date: Thu, 09 Mar 2000 21:36:13 GMT

In article <8a8gom$[EMAIL PROTECTED]>, Mark Tranchant wrote:
>I have RH6.1 on my 486. I'm not a Linux newbie, having used it since 1.0.9
>days. I'm stumped with this one, though:
>
>I've just compiled and installed 2.2.14, replacing 2.2.12-20 that comes with
>RH6.1. I use LOADLIN, so I put the newly-created bzImage on my DOS
>partition, which is booted from a CONFIG.SYS menu. It boots fine, until init
>starts. I get (from memory):
>
>INIT version 2.77 starting      (big pause)
>Unable to load interpreter      (small pause)
>NET version... etc.
>
>From then on the boot is normal and the system appears to work as expected.
>
>Any ideas? I've made as much as possible as modules, which are correctly
>installed. ELF and IDE are not modules, however, so it isn't that. I had to
>put System.map in /boot to get rid of some error messages, and remove a
>modules-info-2.2.12-20 (or something) file in /boot.

Could be there is an a.out application lurking around but the kernel
was not compiled with support for this format.

I've seen it twice for some other reason, not having set limits during
development enough something needed a wee bit too much of memory, but
having become much older and little bit wiser I cannot tell whether
it is possible to get that message with newer installations too.

No, I am not going to try either ;)

See /etc/inittab what is being started up in the default runlevel
and see the initscripts too. Might be enough to get a hint what
it is.

You can do a diff /usr/src/linux/.config /usr/src/linux/.config.old
too and again, might be something rings a bell.

Ta',
Juergen

-- 
\ Real name     : J�rgen Heinzl                 \       no flames      /
 \ EMail Private : [EMAIL PROTECTED] \ send money instead /

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

From: Lee Webb <[EMAIL PROTECTED]>
Subject: Re: Linux or Windows
Date: Thu, 09 Mar 2000 22:17:21 +0000

Apologies for being silly here, but for which OS?

Lee.

Dark wrote:
> 
> >I too am a new  linux user and i have to say i LOVE it now that i finally
> got it online since i had a crappy winmodem i couldnt connect right away but
> now its up and i love it the only reason i boot windows anymore is for
> graphics programs i have a 2 gb hd that i run both linuk and windows on and
> use a boot disk for winblows ooops i mean windows
> ps how do i get the menu @ boot time?

-- 
Boycott Amazon: http://www.gnu.org/philosophy/amazon.html

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

From: Harvey Taylor <[EMAIL PROTECTED]>
Subject: FastTrak66 driver?
Date: Thu, 09 Mar 2000 17:01:44 -0800

Hi,
        Does anybody happen to know about any Promise FastTrak66 
        driver development happening?
<ciao>
-het


---
"Assembly of Japanese bicycle require great peace of mind."
        - Instruction manual mentioned by R. Pirsig

Harvey Taylor  mailto:[EMAIL PROTECTED]  http://www.pangea.ca/~het

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

From: Fabrice Peix <[EMAIL PROTECTED]>
Subject: Re: kmalloc allocate swappable memory?
Date: Fri, 10 Mar 2000 00:04:34 +0100

> Raj Suri wrote:
> 
> I was curious as to whether or not the Linux kernal can swap pages of
> memory to disk which were allocated using kmalloc in kernel space.  Or
> does that memory have to stay in physical memory?  Is there any
> resource that explains this in detail??
Memory allocated using kmalloc can be swap.

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

From: Robert Redelmeier <[EMAIL PROTECTED]>
Subject: Re: System hanging with SMP-Kernel 2.2.13 (SuSE6.3)?
Date: Thu, 09 Mar 2000 18:25:09 -0800

[EMAIL PROTECTED] wrote:

> repeating the same procedure.). And a normal
> user's job shouldn't kill the Unix system, should
> it?

Not if the hardware is OK.

But I've written (GPL) testing utilities `burnP6` and `burnBX`
that run as normal user processes.  Since they are written
in optimized asm, they _do_ work the processor/Northbridge/RAM
very hard, and can provoke lockups and/or errors when the
hardware is excessively clocked or weak in some other 
respect (cooling and power supply).  Give'em a try.

-- Robert  author `cpuburn`   http://users.ev1.net/~redelm

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

From: [EMAIL PROTECTED] (Timothy J. Lee)
Subject: Bus-master PCI slots
Date: 10 Mar 2000 01:04:12 GMT
Reply-To: see-signature-for-email-address---junk-not-welcome

In kernels 2.0.* and 2.2.*, what are the ways to tell if a device
is in a bus-master capable PCI slot?

--
========================================================================
Timothy J. Lee                                                   timlee@
Unsolicited bulk or commercial email is not welcome.             netcom.com
No warranty of any kind is provided with this message.

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

Reply-To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED] (Mike McDonald)
Subject: Tracking down kernel memory corruption??
Date: Fri, 10 Mar 2000 01:20:29 GMT


  In a 2.2.14 kernel, someone is writing into the middle of del_timer() in the
kswapd process. I'm at a loss on how to track this stray write down. I don't
have access to a logic analyzer which would be real useful right now. I should
point out this is during the starting up of the initial process from RAMdisk.

  Any ideas on how to procede would be greatly appreciated.

  Mike McDonald
  [EMAIL PROTECTED]

EXT2-fs warning: checktime reached, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 32k freed
Warning: unable to open an initial console.
execve: /bin/sh
[kswapd:5] Illegal instruction at 80026fb0 ra=80027094
        a0=80129f40 a1=10000c01 a2=10000c01 
        status=10000c02 cause=00000328 instr=00000001
[kswapd:5] Illegal instruction at 80026fb4 ra=80027094
        a0=80129f40 a1=10000c01 a2=10000c01 
        status=10000c02 cause=00000328 instr=7fffffdd
[kswapd:5] Illegal instruction at 80026fbc ra=80027094
        a0=80129f40 a1=10000c01 a2=10000c01 
        status=10000c02 cause=00000328 instr=7fffffde
[kswapd:5] Illegal instruction at 80026fc0 ra=80027094
        a0=80129f40 a1=10000c01 a2=10000c01 
        status=10000c02 cause=00000328 instr=7fffffdf

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

From: [EMAIL PROTECTED] (Paul Jackson)
Subject: Re: Linux or Windows
Date: 10 Mar 2000 01:24:44 GMT

Dark wrote:
> ps how do i get the menu @ boot time?

Lee Webb asked:
> for which OS?

I think Dark means a boot menu - which would list both Windows
and Linux, so that he didn't have to boot Windows off a floppy.

The 3 choices I am familiar with are:

  1) System Commander - commercial product, well documented,
     my favorite if money is not an issue.

  2) Boot Magic - PowerQuests answer to System Commander,
     works about as well, and what I use if I already have
     purchased PowerQuests Partition Magic for that system.

  3) lilo - the free Linux multi-boot manager.  You end
     up adding a section to the Linux /etc/lilo.conf
     file that describes your bootable Windows partition,
     and then prompting at boot time for the choice to
     boot (tab gets you a list).  Not sexy, but free and
     solid.  See further /usr/doc/howto/en/html/mini/LILO.html.

-- 

=======================================================================
I won't rest till it's the best ...        Software Production Engineer
Paul Jackson ([EMAIL PROTECTED]; [EMAIL PROTECTED]) 3x1373 http://sam.engr.sgi.com/pj

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

From: [EMAIL PROTECTED] (Christopher Browne)
Crossposted-To: comp.os.linux,comp.os.linux.development
Subject: Re: Which Package?
Reply-To: [EMAIL PROTECTED]
Date: Fri, 10 Mar 2000 01:28:57 GMT

Centuries ago, Nostradamus foresaw a time when N. T. Programmer would say:
>Hello All,
>
>    I'm a NT systems programmer of 6 years.  I like getting into the
>OS as much as possible (which MS likes keeping you out of).  I'm very
>strong in C/C++. 
>
>I'm wanting to expand my horizons to UNIX.  I'm highly interested in
>Linux.  Here are my questions/concerns:
>
>    1.  How much like UNIX is Linux?  If I use Linux on a regular
>basis will it be just like being on a Sun or HP box in functionality?

Linux is sort of like the "300Z" of UNIXes.  

Power everything, seat warmer, and fuzzy dice.

A default install tends to provide lots of tools like Perl, Python,
and GNU file utilities that aren't necessarily there "by default" on
the Big Iron UNIXes.

After getting used to Bash or Zsh (as shell), XEmacs (as text editor),
and Python (as scripting language), it may be a bit of an adjustment
to "move down" to Ksh/vi/awk, if you are at a site running Solaris
where they are sufficiently anal-retentive that they refuse to allow
use of such tools...

>    2.  I have a dual CPU and I'd like Linux to take advantage of it.
>Does it? 

This would be the rare situation where there is benefit to recompiling
the kernel.

Yes, Linux can take advantage of SMP on Intel hardware.  It's fairly
likely that you'll need to recompile the kernel in order to do so.
(Since most people *don't* have SMP hardware, distributions don't
usually come with SMP support compiled into the kernel.)

>    3.  Which Linux package is best for me to buy?  I like systems
>programming, so that's what I plan on doing with Linux.  Which
>package comes with the best add-on tools for sys prog?

The distribution that allows you to bring along an 20m-long cargo
trailer full of development tools is Debian.  <http://www.debian.org/>
It's up to about 5000 packages, including a *VAST* array of
development tools.

>    4.  I want to have Linux and NT share the same box, which package
>has the best Multi-boot integrator for sharing with NT?

This one's a largely irrelevant question; *ALL* the IA-32-based
distributions (at least all of any note) use the same boot utility,
LILO, and thus have *identical* capabilities in this regard.
-- 
"Linux  and  other  OSS  advocates  are making  a  progressively  more
credible argument  that OSS software is  at least as robust  -- if not
more  -- than  commercial  alternatives." -  Microsoft lamenting  Open
Source Software in the "Halloween Document"
[EMAIL PROTECTED] <http://www.ntlug.org/~cbbrowne/linuxdistributions.html>

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

From: "Bob Cheng" <[EMAIL PROTECTED]>
Subject: How do I run my stereo sound device as two sound devices???
Date: 10 Mar 2000 03:07:26 GMT
Reply-To: "Bob Cheng" <[EMAIL PROTECTED]>

Hi:

  How can I make two sound devices like /dev/dsp-left and /dev/dsp-right
that
mixes sound data to /dev/dsp0? That is, I can use "play -ddsp-left left.au"
command
to hear left.au from my left speaker and "play -ddsp-right right.au" to send
right.au to
my right speaker, simultaneously?  What I want to do is to drive two
mono-phone
devices through one sound card at the same time.

Any suggestions are welcomed.




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

From: Saurabh Shrivastava <"Saurabh Shrivastava"@efi.com>
Subject: kernel in C++
Date: Thu, 09 Mar 2000 20:26:00 -0800

hi everybody,
              people say, kernel cant be written in C++. Is it true ?

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

From: [EMAIL PROTECTED] (Christopher Browne)
Subject: Re: kernel in C++
Reply-To: [EMAIL PROTECTED]
Date: Fri, 10 Mar 2000 04:56:28 GMT

Centuries ago, Nostradamus foresaw a time when Saurabh Shrivastava
would say:
>hi everybody,
>              people say, kernel cant be written in C++. Is it true ?

People say lots of things.

It's fair to say that:
 - The Linux kernel *isn't* written in C++.
 - It's not likely to get changed over to C++.

If you want to write an OS kernel in C++, feel free.  It is a *big*
waste of time to waste breath on the idea of redoing Linux in C++,
though.  

I think you'd get more interest in:
a) An OS kernel written in Scheme,
b) A kernel written in Modula-3, or
c) A kernel written in ML.
-- 
Windows NT: The Mister Hankey of operating systems
[EMAIL PROTECTED] - - <http://www.hex.net/~cbbrowne/lsf.html>

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: kernel in C++
Reply-To: [EMAIL PROTECTED]
Date: Fri, 10 Mar 2000 06:03:10 GMT

On Thu, 09 Mar 2000 20:26:00 -0800, Saurabh Shrivastava <@efi.com> wrote:
>hi everybody,
>              people say, kernel cant be written in C++. Is it true ?

You can't write a kernel in C++ or C. That is to say, if you take the ISO C or
C++ standard and stick to the language features described there, you won't get
anywhere.

To make a kernel, you have to provide supporting code to glue the system
to the hardware. Also, you have to provide whatever run-time support
the language needs.

This run time support is bigger in C++, primarily due to the exception
handling (which, of course, you *can* do without).

Also, the operations new and delete are a little bit naive in C++.  If you look
in the Linux kernel, you have atomic allocations, DMA-able allocations, page
allocation versus kmalloc, etc.  Memory allocation in embedded work is
sometimes a bit of a hodge podge; not the clean ``one-size-fits-all'' paradigm
provided by new and delete. Even overriding new and delete on a class basis
might not be enough, because the same class object may need to be allocated
in different ways in different circumstances.

Global constructions are another pain in the ass in C++.  In C you know that a
static variable can be initialized before the kernel starts, or before your
module is executed, and so on.

What happens with something like

    void foo()
    {
        static int x = compute();
    }

This is not allowed in C, for very good reasons. The crazy C++ language
allows it. Compilers do evil things behind your back to support that.
For example, g++ generates a secret flag variable associated with
the x object. The initialization is actually translated into something
like this:

    if (_secret_flag_x == 0) {
        x = compute();
        _secret_flag_x = 1;
    }

can you say race condition?  The problem with this construct is that there is
no way to implement it right for all circumstances. Eliminating the race
condition depends entirely on the execution context.  The solution would be
different if two or more kernel threads were to execute the code correcty,
versus two or more interrupt service routines, or two or more user-level POSIX
threads.

C++ is full of this kind of crap that requires implementations to do things
behind the programmer's back---things that require dubious assumptions
regarding the execution environment and context.

Look at the exception handling support in libgcc.a .  It contains calls to the
pthread_* functions, or other, depending on the platform. To do C++ exception
handling in the kernel, this support code would have to be retargetted to
the constructs supported by the kernel.

How do you ensure that exceptions can be concurrently thrown in any context?
Say in an interrupt service routine on CPU 0, and at the same time by some
kernel thread on CPU 1. Someone has to work that out and port the throw
logic to do that correctly.

On the other hand, you don't have to retarget any part of the the GNU *C*
compiler specifically to do kernel work. There is the odd run time support
problem, like gcc generating a call to malloc which isn't there.

Of course C hides many things from the programmer, such as the mechanisms
for parameter passing and function return, and the machine instruction set. 
Undeniably, some C compilers have done evil things in the past, like using
static storage for returning structs.

But for the most part, the C constructs map well to concurrency. There are no
surprises from reasonable compilers. Objects don't have secret fields (or at
least, not in 1989 C anyway.)  Any reentrancy problems are going to be ones
that you cause explicitly, not ones introduced by the compiler. With any decent
compiler, if you write C code that looks reentrant, you get clean, reentrant
machine code that works in any context.

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

From: morgan <[EMAIL PROTECTED]>
Subject: strange "pwdd <defunct>" processes running in Linux
Date: Fri, 10 Mar 2000 15:17:37 +0800
Reply-To: [EMAIL PROTECTED]

Hi,

Please help. Thanks in advance.

I wrote a server program using C in linux.
The program is supposed to accept socket connections, and change the
linux password of the existing user.

My program works in this way:
. It runs as a server process.
. Waits for connection from remote client.
. Upon accepting socket, fork() a new process.
. This new process child0, will read in the username, oldpasswd,
newpasswd from the socket.
. child0 will inturn fork() another child processes, child1, to execute
the linux passwd program to change the password of the given user.
child0 is actually the master which will send the input data to child1
using pseudo-terminal.
. After execution, the children child0 & child1 will exit.

However, I found that I'll get a "root     31273 31214  0 14:59 pts/1
00:00:00 [passwdd <defunct>]" entry from ps-ef, everytime I do a
password change request through the socket.

Are these the zombie processes, how do I get rid of them?

Kind regards,
Morgan


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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: strange "pwdd <defunct>" processes running in Linux
Reply-To: [EMAIL PROTECTED]
Date: Fri, 10 Mar 2000 07:25:34 GMT

On Fri, 10 Mar 2000 15:17:37 +0800, morgan <[EMAIL PROTECTED]> wrote:
>Hi,
>
>Please help. Thanks in advance.
>
>I wrote a server program using C in linux.
>The program is supposed to accept socket connections, and change the
>linux password of the existing user.
>
>My program works in this way:
>. It runs as a server process.
>. Waits for connection from remote client.
>. Upon accepting socket, fork() a new process.
>. This new process child0, will read in the username, oldpasswd,
>newpasswd from the socket.
>. child0 will inturn fork() another child processes, child1, to execute
>the linux passwd program to change the password of the given user.
>child0 is actually the master which will send the input data to child1
>using pseudo-terminal.
>. After execution, the children child0 & child1 will exit.

Lovely security hole. How about the following modification:

    1. inetd waits for connection from remote client
    2. inetd spawns sshd.
    3. sshd authenticates user, allocates pseudo tty and executes passwd in
       a shell.
    4. user types old password, confirms new password.
    5. passwd, shell and sshd terminate

On the downside, this requires next to no programming, which is no fun.

Just do

    ssh -t <hostname> passwd

>However, I found that I'll get a "root     31273 31214  0 14:59 pts/1
>00:00:00 [passwdd <defunct>]" entry from ps-ef, everytime I do a
>password change request through the socket.
>
>Are these the zombie processes, how do I get rid of them?

You need to collect child processes with one of the wait system calls.
I'm sure comp.unix.programmer has entries in its FAQ that discuss this.

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


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