Linux-Development-Sys Digest #193, Volume #8      Thu, 5 Oct 00 12:13:09 EDT

Contents:
  Re: vlock and PAM magic? (Kasper Dupont)
  Re: How SMP works in Linux (Art Wagner)
  Re: waitpid() and race conditions (Aurel Balmosan)
  newbie NFS question (Pollini Andrea)
  SMP Problem ([EMAIL PROTECTED])
  Re: Kernel panic: VFS :Unable to mount root (rich)
  Re: extract value form the kernel (Kasper Dupont)
  Re: ioremap not in namespce...? (Kasper Dupont)
  Re: How SMP works in Linux (Michel Bardiaux)
  Re: Rerouting serial input to keyboard ? (Rick Miller)
  Re: patch file (Rick Miller)
  Re: Rerouting serial input to keyboard ? ("Gordon Durnell")
  Re: hello,I want to begin with linux kernal programming?? 
("[EMAIL PROTECTED]")
  Re: How SMP works in Linux (Malcolm Beattie)
  Re: Ensuring graceful treatment of mem shortage (Keith Brown)
  Re: insmod with new kernel: unresolved symbols (Thomas Berkefeld)
  Re: vmlinuz ("[EMAIL PROTECTED]")
  Re: Red Hat 7.0 and Kernel 2.4.0-test9 question? ("[EMAIL PROTECTED]")
  SCSI drivers (Carlos A. =?iso-8859-1?Q?L=E1zaro?= Carrascosa)

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: vlock and PAM magic?
Date: Thu, 05 Oct 2000 09:10:52 +0200

J.H.M. Dassen (Ray) wrote:
> 
> James Avery <[EMAIL PROTECTED]> wrote:
> >For some reason or other, PAMified /usr/bin/vlock does not have to be suid
> >root to work - using pam_unix_auth.so. This means, that in some sneaky way,
> >the PAM module is able to read the shadowed passwords in the context of a
> >process belonging to a regular user.
> >
> >How on earth is that possible? They're just normal library function calls
> >and executed with the normal users priviledges and memory space?
> 
> Indeed. But they can execute SUID binaries, like /sbin/unix_chkpwd(8).
> --
> Ray Dassen <[EMAIL PROTECTED]>

If you want to know exactly how it does
try doing a "strace vlock".

-- 
Kasper Dupont

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

From: Art Wagner <[EMAIL PROTECTED]>
Subject: Re: How SMP works in Linux
Date: Thu, 05 Oct 2000 01:25:46 -0700

??? wrote:
> 
> Isn't there any FAQ?
> 
> my question is:
> Q1: What happens when one of two cpu dies in SMP kernel ?
> 
> Q2: When one CPU is processing kernel code, can the other CPU process
> application code ?
> 
> Q3: TUX, a web server which runs in kernel mode, can be accelarated by
> multi-CPU ?

There is a good if not complete discussion of SMP in the kernel
source tree at; /usr/src/linux/Documentation/SMP.tex

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

From: Aurel Balmosan <[EMAIL PROTECTED]>
Subject: Re: waitpid() and race conditions
Date: Thu, 5 Oct 2000 07:59:38 GMT

[EMAIL PROTECTED] wrote:
> Hi,
>       

> 1.    from what i can gather I think I have written a piece of kernel code
> that has a race condition. ie. it actually calls out to a user space
> program using execve(). the userspace program verifies a digital
> signature in a file. 

This does not sound good that you want to do a execve within the kernel. 


> I need someway to block access to the filesystem from other processes so
> they cannot rename files and the like...

When a user process has opened a file other processes are free to rename/
remove it without interrupting the one user process who opened it first.
If the user proecess open and lock it it is guaranteed that no other
process can modify this file.

Therefore it seems to be not necessary to lock the whole filesystem.

If you are working with files and you want to verify a signature and you
want to guarantee that after check the file is still the same you either
have to do it in a filesystem (a virtual file system like umsdos or so)
or you have to do it in one process using a library. That library has to
return an open file descriptor back which was verified. Then it is
guaranteed that the file IS valid until the file descriptor is closed.

> 2. waitpid() has an argument in which you can grab the exitstatus of the
> process it was waiting for.... however you use the macro WEXITSTATUS to
> get this value.  have included linux/wait.h yet for some reason it still
> doesn't recognise the macro when I try and compile it... Is it available
> to kernel programmers.??

I don't think that you can use high level API functions in a kernel. This 
would require to link in some parts of the c-lib, doesn't it?

> thanks

> dan
-- 
================================================================
Aurel Balmosan                |  [EMAIL PROTECTED], [EMAIL PROTECTED] 
http://gaia.owl.de/~aurel/    |                                 
================================================================

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

From: Pollini Andrea <[EMAIL PROTECTED]>
Subject: newbie NFS question
Date: Thu, 05 Oct 2000 11:32:46 +0200

I have to modify NFSv2 for my thesis and I wonder where I can find the
sources of rpc.nfsd ,rpc.mountd ....
Can you give me an help ??? ;-))

        Andrea Pollini

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

From: [EMAIL PROTECTED]
Subject: SMP Problem
Date: Thu, 05 Oct 2000 09:42:40 GMT

Hello,

I have some issues with the installation of driver on linux machines
with smp image. Basically I have one machine from dell which is non smp
machine but the kernel image in this machine is vmlinux-2.12...smp and
kernel flag CONFIG_SMP is not set in this image.

To build my driver on this machine i am using -D__SMP__ flag while
compilation. But still while insmod it gives me Unresolved symbols for
almost all kernel function even printk.

So can you tell me what must be the problem. I am very surprised with
the kernel image since the kernel smp flag is not set and machine is
not smp still the image is smp.

Regards,
Bhagyashree


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

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

From: rich <[EMAIL PROTECTED]>
Subject: Re: Kernel panic: VFS :Unable to mount root
Date: Thu, 05 Oct 2000 10:29:44 -0000


Konrad Mierendorff wrote:
> 
> No suggestions, but I have a similar problem:
> 
> I'm trying to get my Debian 2.2 (i.e. potato) box to work with kernel
> 2.4.0-test8. However, while booting I get a Kernel panic after the
> partition check. This looks as follows:
> -------------------
> Partitions check:
> hda: hda1 hda2
> hdc: hdc1 hdc2 hdc3 hdc4
> Kernel panic: VFS: Unable to mount root fs on 16:02
> -------------------
> The 2.2.14 kernel does not complain.
> 
Hi Konrad

Thanks for responding to my request for help.

I've decided to use the kernel-2.2.14 supplied with RedHat6.2, instead of 
building a custom monolithic kernel.  Hopefully this will fix my problems 
of mounting RAID drives.

love
rich handler
Cape Town South Africa

--
Posted via CNET Help.com
http://www.help.com/

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: extract value form the kernel
Date: Thu, 05 Oct 2000 12:49:52 +0200

Frank Contrepois wrote:
> 
> I need to extract the values of diferent variables of the linux kernel
> how can I do that .
> I'm totaly new with kernel hacking
> I've thought of using proc or a device...
> 
> thanx
> 
> --
> Pazzooo

For most variables the right way to do it
is through the /proc filesystem. If the
information is not already available in
the /proc filesystem, you can make a new
kernel module.

Many variables in the kernel should not
be readable by anybody but root, so be
carefull.

You could perhaps get some inspiration
from: drivers/sound/soundcard.c

-- 
Kasper Dupont

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: ioremap not in namespce...?
Date: Thu, 05 Oct 2000 12:54:31 +0200

Arne Driescher wrote:
> 
> >
> > Hmmm... I DO see the same __ioremap in my System.map file - I don't see it when I
> > run ksyms however.
> > I must admit, I'm confused. Where exactly does the module look for it? I thought
> > that in order for a module to access it, it would
> > have to be listed in ksyms' output...but Why would it be in my System.map and not 
>in
> > ksyms' output?
> >
> Don't qoute me on this but as far as I know the module loader
> uses System.map to resolve references to kernel functions.
> Running ksyms on my system:
> pc45:[~]> ksyms -a | grep ioremap
> c010ee54  __ioremap
> shows the reference to ioremap.
> From System.map:
> c010ee54 T __ioremap
> 
> Both are the same. Perhaps you should start to build new
> kernel until you have the same result in both cases.
> 
> -Arne

It is for sure the module loader, that has to find
the symbol. You could try using strace to see what
the module loader actually does. "strace insmod
module.o" or similar.

-- 
Kasper Dupont

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

From: Michel Bardiaux <[EMAIL PROTECTED]>
Subject: Re: How SMP works in Linux
Date: Thu, 05 Oct 2000 11:58:17 GMT

Karl Heyes wrote:
> 
> Does the hardwars support hot swap/recoverable CPUs?.  Linux tries to
> provide what the majority require.  This isn't a big issue for the majority
> of linux installations out there, and support for it will appear in some
> form.
> 
> > Q2: When one CPU is processing kernel code, can the other CPU process
> > application code ?
> >
> 

The approach usually taken towards High-Availability-Linux is either
hot-standby or clustering at the *box* level.

-- 
Michel Bardiaux
Peaktime Belgium S.A.  Rue Margot, 37  B-1457 Nil St Vincent
Tel : +32 10 65.44.15  Fax : +32 10 65.44.10

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

From: Rick Miller <[EMAIL PROTECTED]>
Subject: Re: Rerouting serial input to keyboard ?
Date: Thu, 05 Oct 2000 05:55:18 -0700

Can you be more specific about the device?

What device are you using?  Do you mean that it automatically does handwriting
recognition of some sort and outputs ASCII via serial?  (Sounds like an easy
Palm app...)

In short, "What's an 'OCR pen'?"

Rick Miller


Gordon Durnell wrote:

> Is it possible to reroute the input coming into a serial port to make it
> look like it is coming from the keyboard?
>
> I am trying to find an OCR pen that will work as a keyboard wedge under
> Linux, but they all seem to use RS232 and a Windows/Mac program to read it.
> I'm hoping I won't have to write a daemon that reads the serial port and
> pokes data into the keyboard buffer (but may have to in order to filter out
> garbage...).


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

From: Rick Miller <[EMAIL PROTECTED]>
Subject: Re: patch file
Date: Thu, 05 Oct 2000 06:11:34 -0700

C'mon, Jim.  Give the newbie a break.

I recommend the "diff" and "patch" man pages (just type "man diff", and "man
patch"at the command line or use "man page" lookup utilities if your
distribution has them in graphical form) rather than the source code.

The "diff" program originally produced a text output file which could be fed
to a line-based editor program as standard input (thus, "automatically"
editing the file from its prior form to its new form).  There was no
"patch" program, it was the line-editor.  Since then (long, long ago in a
land as far away as NASA's JPL) Larry Wall improved "diff" and invented
"patch" to handle those improvements.

The handiest kind of "diff" is a context diff (the "-u" command line option)
because it recognises lines of context around a change and allows "patch" to
find the correct place even if someone else has inserted an extra line of
comment at the beginning of the file to insert your own e-mail address in
the credits section.  Context diffs are much easier for maintainers to apply
than raw diffs in the old line-editor format.

Watch the output of the "patch" command.  Heck, set it to "verbose".  It's a
wonder to behold.  Then send a thank-you letter to Larry Wall in homage.

Rick Miller   :-)
[EMAIL PROTECTED]


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

From: "Gordon Durnell" <[EMAIL PROTECTED]>
Subject: Re: Rerouting serial input to keyboard ?
Date: Thu, 5 Oct 2000 08:34:13 -0500

I'm looking at using either the WizCom QuickLink pen (
http://www.wizcomtech.com/products/quicklink.html ) or the PocketReader (
http://us.pocketreader.com/ ).

Basically, they scan printed text (use like a highlighting pen), do OCR,
then store the ASCII text or dump it to a serial port (or optionally beam to
a Palm, in the case of the QuickLink).  They are a bit limited in what fonts
they can scan -- handwriting is pretty much beyond their capacities.
Whaddya want for around US$100? <g>

I just got email from support at WizCom and it looks like I'll be able to
get the specs for the serial in/out so I can write a Linux driver for the
QuickLink.  My main goal is to write something that behave like a keyboard
wedge -- printed text scanned into the pen looks like it's coming from the
keyboard.

Gordon

"Rick Miller" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Can you be more specific about the device?
>
> What device are you using?  Do you mean that it automatically does
handwriting
> recognition of some sort and outputs ASCII via serial?  (Sounds like an
easy
> Palm app...)
>
> In short, "What's an 'OCR pen'?"
>
> Rick Miller
>
>
> Gordon Durnell wrote:
>
> > Is it possible to reroute the input coming into a serial port to make it
> > look like it is coming from the keyboard?
> >
> > I am trying to find an OCR pen that will work as a keyboard wedge under
> > Linux, but they all seem to use RS232 and a Windows/Mac program to read
it.
> > I'm hoping I won't have to write a daemon that reads the serial port and
> > pokes data into the keyboard buffer (but may have to in order to filter
out
> > garbage...).
>



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

From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Subject: Re: hello,I want to begin with linux kernal programming??
Date: Thu, 05 Oct 2000 15:48:54 +0200

Hi

Also try some documentation like at www.linuxdoc.org
or get the book linux device drivers, old but still good.

Richard

hushui wrote:

> I want to know how to know how to start??
> can anybody help me??
> just send a simple souce to me ??
> thank you


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

From: [EMAIL PROTECTED] (Malcolm Beattie)
Subject: Re: How SMP works in Linux
Date: 5 Oct 2000 14:01:17 GMT

In article <8rfa9a$rac$[EMAIL PROTECTED]>,
??? <[EMAIL PROTECTED]> wrote:
>Isn't there any FAQ?
>
>my question is:
>Q1: What happens when one of two cpu dies in SMP kernel ?

If you're running Linux on a S/390 and one CPU dies (or the dual
execution units in one CPU fail to agree on the result of an
operation) then execution is transferred transparently to a hot
spare CPU and the system continues running (and it rings up IBM
to tell them about the fault). "CP sparing" is the technical term.
If you're on most other hardware, you'd be stuffed of course.

--Malcolm

-- 
Malcolm Beattie <[EMAIL PROTECTED]>
Oxford University Computing Services
"I permitted that as a demonstration of futility" --Grey Roger

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

From: Keith Brown <[EMAIL PROTECTED]>
Subject: Re: Ensuring graceful treatment of mem shortage
Date: 5 Oct 2000 09:02:03 -0500

Bernd Strieder wrote:
> 
> Keith Brown wrote:
> >
> > What "memory overcommitment feature"? I never heard of this, and I can't see
> > why the system would allocate memory to a process that isn't available. I'd
> > like to see some references or more details on this.
> >
> 
> This feature (at least in kernel 2.2) is controlled via the file
> /proc/sys/vm/overcommit_memory. If you turn it on, then the kernel does
> not immediately reserve big chunks of memory you allocate, probably by
> mmap via a malloc call. A certain range of addresses is reserved but not
> the memory itself. The memory is assigned page per page to the addresses
> as the app uses them. What makes this bad, that you can allocate more
> memory than there is in the system, in the hope that no problems come
> up, since not all the memory allocated is actually used. The SIGSEGV
> happens when an app accesses an address without memory assigned to,
> which Linux tries to find then. If that fails, it has to wait for free
> memory pages or to raise SIGSEGV. AFAIK SIGSEGV happens currently. And
> this happens to every app, even those where memory allocation errors are
> treated according to best practices.
> 
> That feature has a benefit for systems with apps that allocate a lot of
> memory at once without using it fully, which in turn makes it easier for
> the sloppy programmer to get their apps working on not too loaded
> systems. You buy instability on loaded systems. At least it is turned
> off by default.
> 

Well I learned something today. Thanks Bernd :-) After doing a little surfing,
it appears that memory overcommit is somewhat controversial. On the other
hand, Linux ALLWAYS overcommits. /proc/sys/vm/overcommit_memory turns off
sanity checking so that any request under the maximum for the current machine
will be returned, while normally, it will check the amount requested against
the available memory that is UNUSED, which may include memory allocated to
other processes. So even with overcommit_memory turned off, it is still very
possible to have more memory allocated than is actually available at any given
moment.

I don't get the impression, however, that the impetus behind overcommit_memory
was protecting sloppy programmers.

The issues are a lot more complex than I first thought and involve aspects of
application developement, kernel configuration, system configuration, and
system administration. I don't think there is any magic bullet. Seems all you
can do as a developer is ensure your app is as robust as possible, and try to
inform and support the user as much as practical when the system configuration
causes problems. I don't see that this is any different from dealing with
other software/hardware compatibility issues.
 
-- 
Keith Brown           | I am a professional Air Traffic Controller -- 
[EMAIL PROTECTED]       | There are hours when I may be overpaid, 
web.wt.net/~bahalana  | but there are seconds when you can't pay me enough.

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

From: [EMAIL PROTECTED] (Thomas Berkefeld)
Subject: Re: insmod with new kernel: unresolved symbols
Date: Thu, 05 Oct 2000 16:22:56 +0200

In article <8r13vb$gs6$[EMAIL PROTECTED]>, Moya
<[EMAIL PROTECTED]> wrote:

> Thomas Berkefeld <[EMAIL PROTECTED]> wrote:
> > Hello,
> > after updating the kernel from 2.2.14 to 2.2.17pre15, a module that
has been 
> > compiled afterwards cannot be loaded. insmod says "unresolved symbol" 
> > for all symbols. Any ideas?
> 
>         Have u resolved this problem??
>         Would you please tell me how to fix it finally?
>         Thanks...

I think I installed the original system 2.2.14 from scratch and then  
compiled the new kernel, the modules and the System.map. After moving
everything to the right place, it worked.

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

From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Subject: Re: vmlinuz
Date: Thu, 05 Oct 2000 18:01:21 +0200

Hi,
I guess this is redhat 6.

after make bzImage
type make install

Richard.

Bo - Sun wrote:

> hi, there:
>
> Can some one tell me what is the difference between the 2 files
> vmLinux-2.2.14.5.0 and vmLinuz-2.2.14.5.0
>
> I am trying to upgrade my kernel, but after compiling the kernel(make
> bzImage), I don't know how to modify /etc/lilo.conf.
>
> thanks,
>
> Bo


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

From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Subject: Re: Red Hat 7.0 and Kernel 2.4.0-test9 question?
Date: Thu, 05 Oct 2000 18:03:34 +0200

Hi,

Maybe Redhat 7 uses XFree86 4,
This has some incompatibilities,

Richard.


E-mu wrote:

> Has anyone installed this kernel on Red hat version 7.0 yet?  Any problems?
> I had a problem with test8, I couldn't get the PASSWORD script after the
> LOGIN script.
>
> Finally is anyone having problems getting the graphical mode during the
> install of red hat 7.0.  I have a Dell Laptop Inspirion 7500, and had no
> problems with Red Hat version 6.2 but with Red Hat 7.0,  it will only
> install in TEXT mode  :(
>
> Thanks


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

From: Carlos A. =?iso-8859-1?Q?L=E1zaro?= Carrascosa 
Crossposted-To: comp.os.linux.development.apps
Subject: SCSI drivers
Date: Thu, 05 Oct 2000 17:08:17 +0200

Anyone know if exists any  driver for the:

Future Domain Corp
TMC-850MEX (pt)

SCSI card ?

And, of course, where i can get it ;-)

thanks in advance.

Carlos.



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


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