Linux-Development-Sys Digest #159, Volume #8     Tue, 19 Sep 00 22:13:17 EDT

Contents:
  Re: 64M buffer passed from user to kernel ("Norm Dresner")
  Re: ASM problem building kernel (Myke Morgan)
  Re: Memprof -- lack of behavior. (Art Haas)
  Suse 7.0 (Javier Burguillo)
  gethostbyaddr_r (Ben Sapp)
  Re: Message distribution manager / server ("Ross Jones")
  Re: 64M buffer passed from user to kernel (Pete Zaitcev)
  Re: gethostbyaddr_r (Frank Sweetser)
  Re: New OS Project ("Ben Green")
  Re: Memprof -- lack of behavior. (Szabolcs Csetey)
  how to set sockaddr_ll for LO interface? ("Dave Rhodes")
  Compiling kernel with gcc 2.95? (Paul Hughett)
  Re: 64M buffer passed from user to kernel (Mario Klebsch)
  Re: new windowing system (Mario Klebsch)
  Re: Compiling kernel with gcc 2.95? (Karl Heyes)
  Re: MS Visual Studio -> CodeForge?? (Larry Ebbitt)
  Re: ASM problem building kernel (Paul Kimoto)
  Re: Compiling kernel with gcc 2.95? (Paul Kimoto)

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

Reply-To: "Norm Dresner" <[EMAIL PROTECTED]>
From: "Norm Dresner" <[EMAIL PROTECTED]>
Subject: Re: 64M buffer passed from user to kernel
Date: Tue, 19 Sep 2000 18:21:01 GMT

Here's an excerpt from the beginning of my /etc/lilo.conf from my RH 5.2
system (k2.0.36):
    boot=/dev/hda
    map=/boot/map
    install=/boot/boot.b
    prompt
    timeout=500
    image=/boot/vmlinuz-2.0.36-0.7
         label=linux
         root=/dev/hda3
         append="mem=122m  shm=0x3FFC00"
         initrd=/boot/initrd-2.0.36-0.7.img
         read-only
    ...

The "mem=122m" tells the kernel that there are only 122 MB of RAM;  there
are more, but it won't even try to use it.  In this system that leaves 127 -
122 = 5 MB for "other" things.

Another way to do this, assuming (1) that you use lilo and (2) that your
kernel-image is called "linux" is to respond to the lilo prompt with
    linux    append="mem=122m"

The quotes are necessary exactly as shown.  If there are multiple
append-strings, they are separated by one or more spaces as shown in the
excerpt from lilo.conf

    Norm



lsnover <[EMAIL PROTECTED]> wrote in message
news:8q87md$10q$[EMAIL PROTECTED]...
> In article <[EMAIL PROTECTED]>,
>
> I like the idea of reserving memory at boot time.  Could you give me
> more information on how to do this.  Again, I am a newbie coming from
> the vxWorks world.
> Lisa
>



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

From: Myke Morgan <[EMAIL PROTECTED]>
Subject: Re: ASM problem building kernel
Date: Tue, 19 Sep 2000 11:25:15 -0700

Paul Kimoto wrote:
> 
> In article <[EMAIL PROTECTED]>, Myke Morgan wrote:
> >> In article <[EMAIL PROTECTED]>, Myke Morgan wrote:
> >>> I'm trying to build the 2.2.14 kernel that came right off the RedHat 6.2
> >>> CDROM and using gcc 2.95.2. The error is nowhere near the single file I
> >>> altered.
> 
> >>> {standard input}: Assembler messages:
> >>> {standard input}:978: Error: no such 386 instruction: `movups'
> >>> {standard input}:979: Error: no such 386 instruction: `movups'
> 
> >>> % as -v
> >>> GNU assembler version 2.9.1 (i686-pc-linux-gnu), using BFD version 2.9.1
> 
> >  I did get the very latest binutils 2.10.0.24 and
> > the same thing happened.
> 
> Using strings(1), grep(1), find(1), etc., I found that the (binary)
> assembler program on my system contains the strings "movups", but neither
> the compiler nor the *.[sSh] files in linux-2.2.18-pre6 do.  (I don't see
> that string in the i386 part of the gcc source code, either.)
> 
> Can you figure out what is producing these instructions (that the assembler
> isn't understanding)?  (Remember that the compiler is actually
> /GCC_PREFIX/lib/gcc-lib/i*86-linux*/VERSION_NUMBER/cc1.)
> 
> Perhaps Red Hat has messed with the kernel source code or the compiler in
> a way that requires some particular assembler.
>

Well, that would not surprise me. But anyway...

One of the places responsible is in the kernel include files. The C code
responsible in the case I was working on is the macro unlazy_fpu(),
which
in turn calls another macro save_kern_fpu. This is in the
include/asm-i386/i387.h file. I have tried turning on and off the kernel
configure option for math coprocessors to no avail.

This is the 2.2.14 source.
 
> --
> Paul Kimoto

--
myke

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

From: Art Haas <[EMAIL PROTECTED]>
Subject: Re: Memprof -- lack of behavior.
Date: 19 Sep 2000 13:17:00 -0500

[EMAIL PROTECTED] (Thaddeus L Olczyk) writes:

> On 19 Sep 2000 11:01:21 -0500, Art Haas <[EMAIL PROTECTED]>
> wrote:
> 
> >[EMAIL PROTECTED] (Thaddeus L Olczyk) writes:
> >
> > [ ... snippage ... ]
> >
> Sort of works ( I had to kick 1000 up to 10000 ), but no stack
> traceback.
> Also it only seems to catch the memory leak associated with malloc and
> not the one asociated with new.

I didn't think it would catch new() leaks, but I wasn't sure.

Purify catches these problems, but if you want an open-source type
tool, it won't do. I've seen it in action, though, and it does a great
job at finding these problems. There is the GNU Checker program, which
does similar things, but it doesn't seem to be maintained. Perhaps
there is a CVS repository for current development, but I don't know of
it. The latest version of the Checker program I've seen are at

ftp://alpha.gnu.org/pub/gnu

If there is a more recent version of this, or information regarding
current development (webpage, CVS site, etc.) I'd love to know it.

-- 
###############################
# Art Haas
# (713) 689-2417
###############################

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

From: Javier Burguillo <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup,comp.os.linux.admin
Subject: Suse 7.0
Date: Tue, 19 Sep 2000 20:39:44 +0200

I want to install Suse 7.0 �is there any mirror to download the complete
version?


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

From: Ben Sapp <[EMAIL PROTECTED]>
Subject: gethostbyaddr_r
Date: Tue, 19 Sep 2000 13:30:26 -0600
Reply-To: [EMAIL PROTECTED]


I have used gethotbyaddr succesfully on Linux.   I need to switch to
gethostbyaddr_r because the program I need it in is multithreaded.   I
looked in header files to determin what I thought was the syntax.  Now
my calls to gethostbyaddr_r work some of the time.   However,  some
times it cause the program to crash.   Is the use of this function
documented somewhere?    Do you have program that uses it successfully
that I can have a look at?    

Thanks for any help.    

-- 
Ben Sapp                         Los Alamos National Laboratory
email: <mailto:[EMAIL PROTECTED]>   Phone: (505)667-3277
Fax:   (505)665-7920             URL:   http://www.neutrino.lanl.gov/
--

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

From: "Ross Jones" <[EMAIL PROTECTED]>
Subject: Re: Message distribution manager / server
Date: Tue, 19 Sep 2000 21:02:53 +0100


Dave Vance  wrote

> Can anybody tell me if there is such a thing as an Event Distribution
> Manager / Event Notification Server / Message Queue Manager / Message
> Distribution Manager / Message Notification Server.. for Linux?

On the assumption that you are talking about processes on the same box you
could probably use message queues to obtain the same results ...

sys/msg.h
msgget()
msgsnd()
msgrcv()
msgctl()

If a Java/JMS solution is appropriate you could try iBus from
www.softwired.ch

HTH

R.



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

From: [EMAIL PROTECTED] (Pete Zaitcev)
Subject: Re: 64M buffer passed from user to kernel
Date: Tue, 19 Sep 2000 20:00:44 GMT

> > No, there are other possible solutions. I prefer reserving memory at
> > boot time by passing a mem switch to kernel.
> > Its IMHO a cleaner solution then patching a kernel.
> >
> > Mathias
> 
> I like the idea of reserving memory at boot time.  Could you give me
> more information on how to do this.  Again, I am a newbie coming from
> the vxWorks world.
> Lisa

Don't be stupid, Lisa. In what respect bigphisarea is "dirtier"
than using "mem="? Mathias advocates to pull the subtle work of
picking at mem_start/memory_end inside your driver. If you do that,
you have to deal with any bugs, have intricate understanding how
the memory is allocated, and support multiply kernel revisions.
Certainly a well defined interface of bigphisarea, tested by
numerous developers, provides you a better option.

Just go to the following URL and get the bigphisarea:
 http://www.polyware.nl/~middelin/En/hob-v4l.html

--Pete

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

From: [EMAIL PROTECTED] (Frank Sweetser)
Subject: Re: gethostbyaddr_r
Date: 19 Sep 2000 20:03:42 GMT

Ben Sapp <[EMAIL PROTECTED]> wrote:
>
>I have used gethotbyaddr succesfully on Linux.   I need to switch to
>gethostbyaddr_r because the program I need it in is multithreaded.   I
>looked in header files to determin what I thought was the syntax.  Now
>my calls to gethostbyaddr_r work some of the time.   However,  some
>times it cause the program to crash.   Is the use of this function
>documented somewhere?    Do you have program that uses it successfully
>that I can have a look at?    

info libc
s (s is the search command) gethostbyaddr_r

-- 
Frank Sweetser rasmusin at wpi.edu, fs at suave.net  | $ x 9
Full-time WPI Network Tech, Part time Linux/Perl guy |
What do people mean when they say the computer went down on me? 
 --Marilyn Pittman

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

From: "Ben Green" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.minix
Subject: Re: New OS Project
Date: Tue, 19 Sep 2000 21:37:28 +0100

Well said Neil!



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

From: Szabolcs Csetey <[EMAIL PROTECTED]>
Subject: Re: Memprof -- lack of behavior.
Date: Tue, 19 Sep 2000 20:31:38 GMT

  Art Haas <[EMAIL PROTECTED]> wrote:
> I didn't think it would catch new() leaks, but I wasn't sure.

new() uses malloc internally so all mem debug tool catches those leaks
as well.

> Purify catches these problems, but if you want an open-source type
> tool, it won't do. I've seen it in action, though, and it does a great
> job at finding these problems. There is the GNU Checker program, which
> does similar things, but it doesn't seem to be maintained. Perhaps

There are quite a lot of tools, a quick search should give you back tons
of them. My favourits are yamd and mpatrol (both are free), of course
they caught both leaks.

WARNING: Memory leak
Address 0x4017bff6, size 10
Allocated by malloc at
  /lib/libc.so.6(malloc+0x2a)[0x400dea8a]
  /home/csz/test/memleak.cc:6(main)[0x8048efc]
  /lib/libc.so.6(__libc_start_main+0xff)[0x4009d9ab]
  (null):0(_init)[0x8048e41]

WARNING: Memory leak
Address 0x40023ff6, size 10
Allocated by malloc at
  /lib/libc.so.6(malloc+0x2a)[0x400dea8a]
  /usr/lib/libstdc++-libc6.1-1.so.2(__builtin_new+0x26)[0x40057006]
  /usr/lib/libstdc++-libc6.1-1.so.2(__builtin_vec_new+0x1c)[0x400571dc]
  /home/csz/test/memleak.cc:5(main)[0x8048eed]
  /lib/libc.so.6(__libc_start_main+0xff)[0x4009d9ab]
  (null):0(_init)[0x8048e41]


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

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

From: "Dave Rhodes" <[EMAIL PROTECTED]>
Subject: how to set sockaddr_ll for LO interface?
Date: Tue, 19 Sep 2000 17:28:48 -0400

Hi folks-

What is the proper way to set the sockaddr_ll struct
for use in sendto when the interface is the loopback, lo?

>From ethereal snoops, it looks like the kernel sends
these with all 0's in the hardware address, yet this does
not seem to work for me?

thanks,
dave




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

From: Paul Hughett <[EMAIL PROTECTED]>
Subject: Compiling kernel with gcc 2.95?
Date: 19 Sep 2000 21:44:52 GMT

I am working on a joint project for which the use of gcc 2.95 has just
become mandatory--the code won't compile under the older compilers.
However, I still would like to be able to compile custom kernels when
necessary.  Is it safe to do this using gcc 2.95, or do I have to go
to the trouble of maintaining two versions of the compiler?  I'm
currently at kernel version 2.2.16 and don't really plan to do
anything with older kernels.

Thanks.

Paul Hughett

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

From: [EMAIL PROTECTED] (Mario Klebsch)
Subject: Re: 64M buffer passed from user to kernel
Date: Tue, 19 Sep 2000 23:21:51 +0200

"Norm Dresner" <[EMAIL PROTECTED]> writes:

>The "mem=122m" tells the kernel that there are only 122 MB of RAM;  there
>are more, but it won't even try to use it.  In this system that leaves 127 -
>122 = 5 MB for "other" things.

Loock like a really ugly trick :-(

There still are some people in this world, who are not using lilo or
any other booter. E.g Linux boots fine from floppy disk. Any driver,
which requires the user to routinely pass parameters to the kernel
IMHO is badly broken. The kernel has to work when no parameters are
passed!

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]
PGP-Key available at http://www.klebsch.de/public.key
Fingerprint DSS: EE7C DBCC D9C8 5DC1 D4DB  1483 30CE 9FB2 A047 9CE0
 Diffie-Hellman: D447 4ED6 8A10 2C65 C5E5  8B98 9464 53FF 9382 F518

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

From: [EMAIL PROTECTED] (Mario Klebsch)
Crossposted-To: comp.os.linux.x,comp.windows.x
Subject: Re: new windowing system
Date: Tue, 19 Sep 2000 23:33:54 +0200

[EMAIL PROTECTED] writes:

>Not having writen any code for X, and not really understanding how the
>core of X works... I would like to know why, WHY!!!, are not these great
>features set up as run time loadable modules like the kernel modules of
>Linux?

Because the client-servar architecture of X is not a feature, but a
concept. You cannot change the concept of any program, just by loading
some routines.

>Having only one person use my computer, me, and only having one instance
>of it running at a time, and not needing may of the "server" needs of
>other, I think that about 50 to 80% of the bloat could be turned off by
>not loading a module or a few.

You should take a look on Windows, if you want to see, how a system
would look like if you are not using a client-server-architecture.
Looking at the Macintosh or the Atari ST could give some valuable
hints, too.

>Let me thin down my X, let me run lean!

You would be amazed to see, how thin X11 is. X11 was developed on
machines using CPUs of the 68020 class running at 25MHz. 16MByte RAM
was plenty at that time. I often ran X11 on machines with only 4MByte
of RAM.

How much thinner do you want it to be?

If you have the impression oy the X11 system being bloated, in more
than 99% of the cases, the bloat is on the client side, the
application. Just look at Qt-, GTK- or Motif-based programs. But this
has noting to do with the X11 client-server architecture.

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]
PGP-Key available at http://www.klebsch.de/public.key
Fingerprint DSS: EE7C DBCC D9C8 5DC1 D4DB  1483 30CE 9FB2 A047 9CE0
 Diffie-Hellman: D447 4ED6 8A10 2C65 C5E5  8B98 9464 53FF 9382 F518

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

From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: Compiling kernel with gcc 2.95?
Date: Wed, 20 Sep 2000 01:04:48 +0000

In article <8q8mok$eb4$[EMAIL PROTECTED]>, Paul Hughett
<[EMAIL PROTECTED]> wrote:
> I am working on a joint project for which the use of gcc 2.95 has just become
> mandatory--the code won't compile under the older compilers. However, I still
> would like to be able to compile custom kernels when necessary.  Is it safe
> to do this using gcc 2.95, or do I have to go to the trouble of maintaining
> two versions of the compiler?  I'm currently at kernel version 2.2.16 and
> don't really plan to do anything with older kernels.
> 

The kernel people don't recommend it yet, purely because they are not sure
about all the extra optimisations that are done in 2.95.  But many people  have
used the compiler on the kernel.  Continue, but just bear it in mind, if
anything odd is going on.

karl.


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

Date: Tue, 19 Sep 2000 20:18:13 -0400
From: Larry Ebbitt <[EMAIL PROTECTED]>
Subject: Re: MS Visual Studio -> CodeForge??

Me wrote:
> 

> 
> Is there anything like it in Linux? We're currently looking at CodeForge. So
> far, so good, but would like to consider other options if they are
> available.
> 

If y'all are working in C/C++, Kdevelop is quite good.  In any cas, CVS is
very good.

-- 
Larry Ebbitt - Linux + OS/2 - Atlanta

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

From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: ASM problem building kernel
Date: 19 Sep 2000 21:22:57 -0500
Reply-To: [EMAIL PROTECTED]

In article <[EMAIL PROTECTED]>, Myke Morgan wrote:
>> In article <[EMAIL PROTECTED]>, Myke Morgan wrote:
>>>> In article <[EMAIL PROTECTED]>, Myke Morgan wrote:
>>>>> {standard input}: Assembler messages:
>>>>> {standard input}:978: Error: no such 386 instruction: `movups'
>>>>> {standard input}:979: Error: no such 386 instruction: `movups'

> One of the places responsible is in the kernel include files. The C code
> responsible in the case I was working on is the macro unlazy_fpu(),
> which
> in turn calls another macro save_kern_fpu. This is in the
> include/asm-i386/i387.h file. I have tried turning on and off the kernel
> configure option for math coprocessors to no avail.
>
> This is the 2.2.14 source.

I don't think so.  As far as I can tell, there is no save_kern_fpu or
i387.h file in the Torvalds/Cox 2.2.{14,15,16,17,18-pre6} kernels.  In any
case, you should be using 2.2.16 or later for security reasons; see the
release notes at http://www.linux.org.uk/.

In linux-2.2.18-pre6/include/asm-i386/processor.h, I have

: /*
:  * FPU lazy state save handling..
:  */
: #define save_fpu(tsk) do { \
:         asm volatile("fnsave %0\n\tfwait":"=m" (tsk->tss.i387)); \
:         tsk->flags &= ~PF_USEDFPU; \
:         stts(); \
: } while (0)
:
: #define unlazy_fpu(tsk) do { \
:         if (tsk->flags & PF_USEDFPU) \
:                 save_fpu(tsk); \
: } while (0)
:
: #define clear_fpu(tsk) do { \
:         if (tsk->flags & PF_USEDFPU) { \
:                 tsk->flags &= ~PF_USEDFPU; \
:                 stts(); \
:         } \
: } while (0)

(There is a file called i387.h in 2.4.0-test8, but it doesn't say anything
about "movups".)

-- 
Paul Kimoto
This message was originally posted in plain text.  Any images, 
hyperlinks, or the like shown here have been added without my
consent, and may be a violation of international copyright law.

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

From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: Compiling kernel with gcc 2.95?
Date: 19 Sep 2000 21:24:32 -0500
Reply-To: [EMAIL PROTECTED]

In article <8q8v01$18h$[EMAIL PROTECTED]>, Karl Heyes wrote:
> The kernel people don't recommend it yet, purely because they are not sure
> about all the extra optimisations that are done in 2.95.

The 2.2.17 release notes
(http://www.linux.org.uk/VERSION/relnotes.2217.html) say: 

: This code is intended to build with gcc 2.7.2 and egcs 1.1.2. Patches for
: building with gcc 2.95 are merged but less tested than other
: compilers. Caution is recommended when using gcc 2.95 and feedback is
: sought.

-- 
Paul Kimoto
This message was originally posted in plain text.  Any images, 
hyperlinks, or the like shown here have been added without my
consent, and may be a violation of international copyright law.

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


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