Linux-Development-Sys Digest #925, Volume #7      Thu, 1 Jun 00 10:13:12 EDT

Contents:
  Re: viruses on Linux (Ferriere65)
  Re: Detecting whether another process has a file open (Nick Craig-Wood)
  Outoor camera with linux (Thierry BUCCO)
  Re: viruses on Linux (Michel Talon)
  Re: 2 GB File size limit? (Aki M Laukkanen)
  Network Drivers: How to write them? ("Paolo Scaffardi")
  Re: GCC EGCS libc libg ("David A. Frantz")
  Re: Detecting whether another process has a file open (Paul Flinders)
  Malformed archive error while building a library with ar ("Timo Volkmer")
  Re: Poor performance of IPC on SMP machine ! ("XuYifeng")
  Why compiling "-static" creates HUGE binary??? ("RMain")
  Re: Winmodems )Re: Need ideas for university funded project for linux) 
([EMAIL PROTECTED])
  Re: Why compiling "-static" creates HUGE binary??? (Erik de Castro Lopo)
  Re: 2 GB File size limit? (Christopher Browne)
  reading from files (Philip)
  Re: Why compiling "-static" creates HUGE binary??? ("RM")

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

From: [EMAIL PROTECTED] (Ferriere65)
Subject: Re: viruses on Linux
Date: 01 Jun 2000 05:38:09 GMT

>Hi,
>is there viruses on linux? Do I need any antivirus program on my linux
>server?

Hi, just visit http://www.big.net.au/~silvio/


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

From: [EMAIL PROTECTED] (Nick Craig-Wood)
Subject: Re: Detecting whether another process has a file open
Date: Thu, 01 Jun 2000 07:02:59 GMT

[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> may be you can look at 'lsof'

I did thank you!  It suffers from the same problems as fuser namely it
doesn't see all files unless you run it as root.  I didn't look to see
how it works though.

-- 
Nick Craig-Wood
[EMAIL PROTECTED]

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

From: Thierry BUCCO <[EMAIL PROTECTED]>
Subject: Outoor camera with linux
Date: Thu, 01 Jun 2000 00:13:37 -0700

Hi,

I would like to make a program wich retrieve video and sound from an outdoor
video camera (like surveilance video, or doorman camera) and display in real
time into the PC screen.

I would like to know several things...

What kind of video camera have i to buy (cheap and good) ?
What kind of connection Camera->PC (most common, and cheap) ?
Must i get a compression card ?
Must i make all the drivers ?

Thanks a lot for your help, because it's difficult for me, i don't know
electronic.

The camera will located up to 20 meters (approximately).

Thanks a lot for your help.

thierry


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

From: Michel Talon <[EMAIL PROTECTED]>
Subject: Re: viruses on Linux
Date: Wed, 31 May 2000 17:59:11 +0200

Mike Dowling <[EMAIL PROTECTED]> wrote:
> On Wed, 31 May 2000 14:04:09 +0200, Josef Moellers <[EMAIL PROTECTED]> 
>wrote:
>>It might be possible to develop a worm which will flood your network
>>with mail messages and perhaps infect some of your own files, but none
>>have been reported yet.

Many stack overflow programs have been devised which allow an intruder to get
root access and do all damages they want. This assumes some suid program has
for example string manipulation functions with unchecked (or badly checked)
bounds. Notable examples have been lprm, bind, etc. Beleiving that security is
provided by the mere fact of file permissions in Unix is very false.
This is the reason why one uses firewalling code in the kernel, and one has to
check carefully the code in userland, a speciality of OpenBSD.

> I'm curious.  Are there any mail user agents for Linux out there that
> can automatically execute programs?  Mine (mutt) certainly cannot.  Mutt
> cannot recognise an executable if it saw one, although it must easy to
> patch it to recognise, say a perl script, and to execute it if found.

It can fire up executables to interpret mail messages, it's a question only of
having a corresponding .mailcap entry. So in principle you could fire up a
perl executing the body of the message and producing nice results!!
if you have introduced such an entry in your mailcap.

> Personally, I am convinced that anybody who wrote such MTA is as
> culpable as anbody caught red handed spreading viruses.  It is such an
> obvious thing _not_ to do.

> Cheers,
> Mike
> -- 
> My email address [EMAIL PROTECTED] above is a valid email address.
> It is, in fact, a sendmail alias; the digit 'N' is incremented regularly.
> Spammed aliases will be deleted.  Currently, mike[26,27]
> are valid.  If email to mikeN bounces, try mikeN+1.

-- 
Michel Talon

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

From: [EMAIL PROTECTED] (Aki M Laukkanen)
Crossposted-To: comp.os.linux.hardware
Subject: Re: 2 GB File size limit?
Date: 1 Jun 2000 08:45:03 GMT

In article <ZciZ4.138618$[EMAIL PROTECTED]>, 
Christopher Browne wrote:
>ext2 permits (and has, for a couple years now) file sizes up to 2TB,
>but is throttled, on 32 bit platforms, to 2GB, because the file
>descriptor format used, by default, in virtually all applications, is
>limited to 32 bits on 32 bit platforms.

May I just point out that this is no longer true in 2.3. Also atleast RedHat 
packaged the kernel with the LFS (Large File Summit) patches applied in RedHat 
6.2.Presumably other distributions might have done the same thing in their 
latest incarnations. So 64-bit file sizes for your favourite applications are 
just a recompile (with -D_LARGEFILE64_SOURCE) away.
-- 
D.

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

From: "Paolo Scaffardi" <[EMAIL PROTECTED]>
Crossposted-To: linux.redhat.development,comp.os.linux.development.apps
Subject: Network Drivers: How to write them?
Date: Thu, 1 Jun 2000 10:48:40 +0200

I have to write a network driver for Linux that works on a proprietary NIC
interface, but i dont know how to develop it. I looked the
/usr/src/linux/drivers/net/skeleton.c example, but it is not sufficient to
me.

I'd like to find any simple network driver source... for example for a
NULL-MODEM 3 pin cable... but i dont know where to find it!

Is there any starting point on internet or any network drivers developer's
bible?
Can anyone help me?

(please answer me in e-mail, too)

Bye,
Arsenio Pinguin ([EMAIL PROTECTED], [EMAIL PROTECTED])

--> MAY THE PINGUIN B WITH U! <--



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

From: "David A. Frantz" <[EMAIL PROTECTED]>
Crossposted-To: linux.dev.gcc,linux.dev,comp.os.linux.questions,linux.dev.kernel
Subject: Re: GCC EGCS libc libg
Date: Thu, 01 Jun 2000 05:42:27 -0400
Reply-To: [EMAIL PROTECTED]

John Gluck wrote:

> Hi
>
> I am trying to figure out some compiler/lib choices. Being a bit new at
> this I have a few questions I can't seem to find a satisfactory answer
> for.
>
> 1- There is a Pentium optimised compiler that appears to be based on
> gcc. Is it safe for compiling kernels and libs as well as other apps for
> linux???
>
> 2- Egcs seems to be the new order for gcc. I can't seem to find any egcs
> source tar files. All I find is gcc. Which are egcs files???
>
> 3- What is the difference between libc5 libc6 and libg (or is it
> glibc)???
>
> I am running linux (originally SUSE 6.3) with the 2.4-test1 kernel
> compiled.
> I don't mind being on the bleeding edge (I do this for fun). But I do
> want to know what works and what's broke.
>
> I do software design for a living. Currently I do RTOS design at Nortel.
>
> One of my own systems is a Dual Pentium III, 256Meg RAM, SCSI and IDE
> drives, a 10baseT port and a 10/100baseT port, an SB Live, Matrox G400
> 32Meg Dual Head, USB ports and the usual Serial and parallel ports. I
> have an ADSL modem as well as a regular 33.6K dialup modem. The other 2
> systems are a Celeron and an old Pentium (1st incarnation)
>
> I need PPOE for the ADSL which I haven't quite gotten working yet. But
> then I haven't really put any effort into it yet.
>
> Anyway, I would very much like to get involved in some
> testing/debugging/testing of linux. Very much preferably the bleeding
> edge stuff..
>
> Note: This is for my own amusement and has nothing to do with my
> employer.
>
> I would appreciate if anyone who replies e-mail me as well as post to
> the NG
>
> TIA
>
> John Gluck
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]

Hi John;

ECGS has been rolleed back into the GCC tree if I recall correctly.
EGCS was an attempt, largely successful, to speed up the development of
GCC.

There is a pentium optimizing compiler, a variant of GCC, available but
can't say much about it.

The thing to be careful about with the very latest version of GCC (2.95.3 I
think) is that it may not be compatiable with libs generated from earlier
releases of GCC or EGCS.     To be honest I'm not a compiler expert so it
wouldbe best to check with someone who is to find out what the limitations
are.     As far as the kernel goes it will compile successfully but every
once and a while issues do crop up.

Dave



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

From: Paul Flinders <[EMAIL PROTECTED]>
Subject: Re: Detecting whether another process has a file open
Date: 01 Jun 2000 11:59:45 +0100


[EMAIL PROTECTED] (Nick Craig-Wood) writes:

> What I need is a foolproof way of detecting whether another process
> has a file open on the local machine.  My program needs to process
> files in a directory after they have been completely written from
> another process (or possibly from a network file system).
> 
> [snip]
>
> Given that I don't have any control over the process which is creating
> the files (I can't make it use locking or any renaming scheme) what
> can I do? 

*If* the program in question is dynamically linked then write a
wrapper (using LD_PRELOAD) for fopen and fclose (or open(3) and
close(3) as appropriate) which lock the file. Then co-operate
with that lock.

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

From: "Timo Volkmer" <[EMAIL PROTECTED]>
Subject: Malformed archive error while building a library with ar
Date: Wed, 31 May 2000 19:00:01 +0200

Hi everybody,

has anyone had experiences with an error like "Malformed archive" while
building a static lib with ar under Linux?

I  have had this kind error several times now. I have used ar with options
"rv" to build an archive which already had been build before. Usually ar
should overwrite this archive but in some cases it seems not to do so.

I am a kind of deserted here and will appreciate any help you can give me.

Thanks!

Timo Volkmer.



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

From: "XuYifeng" <[EMAIL PROTECTED]>
Subject: Re: Poor performance of IPC on SMP machine !
Date: Thu, 1 Jun 2000 19:27:13 +0800


Linux's IPC is single thread, it's a known problem, it sucks.

XuYifeng

"Boczi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> I'm writiting my thesis, and one part concerns IPC performance on Linux.
>
> I wrote some tests. Classic ping-pong using pipes, message queues and my
> brand new QNX like message passing.
>
> I ran my tests on 2.2.14 kernel with SMP support and the machine was dual
> Pentium 166 MMX with 64 MB of memory. No other processes.
>
> I measured time using gettimeofday at the begining and the end of
ping-pong.
> To ensure, that the measurement are worth anything, processes exchangeg
data
> 10000 times.
>
> The first test I ran with two processors on board.
> Then I turned off the machine, removed one processor and ran the tests
again.
>
> And then I was shocked. Results on one-processor machine were ~60% BETTER
!!
>
> And here are some results.
>
> 1. Average time of passing one (of 10000) messages of 1000 bytes:
>
>
>        |  1 CPU   |  2 CPU
> -------+----------+-----------
> MSG    | 46.7 us  | 111.7 us
> PIPE   | 34.0 us  |  65.2 us
> QNX    | 29.9 us  |  70.8 us
>
> Where:
> - MSG is message passing with msgsnd/msgrcv
> - PIPE is read/write through pipe
> - QNX is my own Send/Receive/Reply method
>
> 2. The same, but passing 4000 bytes
>
>        |  1 CPU   |  2 CPU
> -------+----------+-----------
> MSG    | 100.4 us | 258.8 us
> PIPE   | 132.6 us | 256.4 us
> QNX    |  44.1 us | 162.5 us
>
>
> Of course I made much more tests with diffrent paramteres (message size,
> number of communications), but all of them looked similar.
> When I saw the results, I though, I mistaken the reults, and I repeated
the
> tests. The same results.
>
> Anybody got ani idea, what is wrong?
>
> WHY DUAL CPU COMPUTER IS 2 TIMES SLOWER THAN SINGLE CPU ?????
>
>
> Best regards
>
> Boczi
> --
> Andrzej Boczek  (boczi<at>pol.pl)
>



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

From: "RMain" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,linux.dev.c-programming,linux.dev.gcc
Subject: Why compiling "-static" creates HUGE binary???
Date: Thu, 1 Jun 2000 08:15:30 -0400

If I compile the following program (test.c):

    int main( void )
    {
        return( 0 );
    }

with gcc as follows:

    gcc -m386 -O2 -Wall -fomit-frame-pointer -static -o test test.c

I get a 940KB binary????

If I remove "-static" from the command line, the binary reduces to 11.5 KB.

I realize "-static" is forcing the linker to statically link all required
functions into the binary, but surely the startup code does not require
928KB of library code, does it?  The program code itself certainly doesn't.
Is there some other tag I should be using, or some tag that I should use in
conjunction with "-static"???

The program I started with was compiled with "-static" because it was to
become "linuxrc", which runs in an initrd environment, and will not have
access to shared libraries.  When the kernel itself is below 700KB (well
compressed, anyway...), I'm sure a do-nothing program should not result in a
900KB binary.

Any help or suggestions would be appreciated.
R. Main.

Make obvious (?) modifications to return address to reply.



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

Crossposted-To: 
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.setup,comp.os.linux.advocacy
Subject: Re: Winmodems )Re: Need ideas for university funded project for linux)
From: [EMAIL PROTECTED]
Date: Thu, 01 Jun 2000 12:21:14 GMT

David Steuber <[EMAIL PROTECTED]> writes:

> Maybe what you need to do is buy a power supply that is actually rated 
> for the load you put on it. ;-)

Yeah.  That's the plan.  My motherboard manual says 300W, which is
what I have now (I give it another two months, it's starting to make
noise and smell like burning electronics).  Problem is, it's damn hard
to find >250W power supplies that don't come in $250 hot-swap
redundant 400W convifugrations.

Probably I'll end up just buying a new case (with the aforementioned
dual hot-swappable 400W supplies) because my current one is completely
inadequate for the task.  Too bad all the ones I'm looking at cost
$850, which I refuse to pay.

-- 
Eric P. McCoy ([EMAIL PROTECTED])

non-combatant, n.  A dead Quaker.
        - Ambrose Bierce, _The Devil's Dictionary_

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

From: Erik de Castro Lopo <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,linux.dev.c-programming,linux.dev.gcc
Subject: Re: Why compiling "-static" creates HUGE binary???
Date: Thu, 01 Jun 2000 12:34:46 +0000

RMain wrote:
> 
> If I compile the following program (test.c):
> 
>     int main( void )
>     {
>         return( 0 );
>     }
> 
> with gcc as follows:
> 
>     gcc -m386 -O2 -Wall -fomit-frame-pointer -static -o test test.c
> 
> I get a 940KB binary????
> 
> If I remove "-static" from the command line, the binary reduces to 11.5 KB.
> 
> I realize "-static" is forcing the linker to statically link all required
> functions into the binary, but surely the startup code does not require
> 928KB of library code, does it?  The program code itself certainly doesn't.
> Is there some other tag I should be using, or some tag that I should use in
> conjunction with "-static"???
> 
> The program I started with was compiled with "-static" because it was to
> become "linuxrc", which runs in an initrd environment, and will not have
> access to shared libraries.  When the kernel itself is below 700KB (well
> compressed, anyway...), I'm sure a do-nothing program should not result in a
> 900KB binary.
> 
> Any help or suggestions would be appreciated.

Have you stripped the binary of debugging infor etc?

Do "strip program". It will probably reduce the size considerably.

Erik
-- 
+-------------------------------------------------+
     Erik de Castro Lopo     [EMAIL PROTECTED]
+-------------------------------------------------+
Seen on usenet (possibly a quote from an IBM exec):
"Each large company needs its Vietnam, and Microsoft will
 experience it with NT..."

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

From: [EMAIL PROTECTED] (Christopher Browne)
Crossposted-To: comp.os.linux.hardware
Subject: Re: 2 GB File size limit?
Reply-To: [EMAIL PROTECTED]
Date: Thu, 01 Jun 2000 12:50:35 GMT

Centuries ago, Nostradamus foresaw a time when Aki M Laukkanen would say:
>In article <ZciZ4.138618$[EMAIL PROTECTED]>, 
>Christopher Browne wrote:
>>ext2 permits (and has, for a couple years now) file sizes up to 2TB,
>>but is throttled, on 32 bit platforms, to 2GB, because the file
>>descriptor format used, by default, in virtually all applications, is
>>limited to 32 bits on 32 bit platforms.
>
>May I just point out that this is no longer true in 2.3. Also atleast RedHat 
>packaged the kernel with the LFS (Large File Summit) patches applied in RedHat 
>6.2.Presumably other distributions might have done the same thing in their 
>latest incarnations. So 64-bit file sizes for your favourite applications are 
>just a recompile (with -D_LARGEFILE64_SOURCE) away.

If you are running an application that has not been explicitly recompiled
to make use of the LFS extension, then you remain with a 2GB limitation.

Note that that sentence makes no mention of kernels, which means that
it isn't purely a _kernel_ dependancy.
-- 
[EMAIL PROTECTED] - <http://www.ntlug.org/~cbbrowne/linux.html>
Microsoft: The Scientology of Computing

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

From: Philip <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps
Subject: reading from files
Date: Thu, 01 Jun 2000 13:24:15 GMT

I have a configuration file with lines like this :

/etc/myfile.conf ->

chars_a1                chars_b1,chars_b2,chars_b3      chars_c1,charsc1
chars_a2                chars_b1,chars_b2,chars_b3      chars_c2
chars_a3                chars_b1,chars_b2               chars_c3
chars_a4                1,2,3,rrr,5,gg,6,jj,7,7,dd      chars_c3,3,2,1


I want to put this data in
char *chars_a, **chars_b, **chars_c;



for example

int read_configfile
{
char *chars_a, **chars_b, **chars_c;
FILE *myfile;
if (fopen (myfile,"r"))
{

        while (what_i_need(myfile,&chars_a,&chars_b,&chars_c)!=NULL)
        {
                process_a_configstring(chars_a,chars_b,chars_c);                
        }

fclose(myfile);
return 1;
} else {
 return 0;
}


}



How do I do this ? I can't find any opensource example and the way I
would do this is by reading everything char per char and when I find a
'\t' or a ',' I would write the gathered string to the char .. but I am
sure that there are better ways ti do this .. so if you know how :)
please help me out ;o)

* I don't know the size of the strings 
        (so using fgets() is rather difficult for this case)

* I don't know how many strings there are for cases char_b and char_c


-- 
Philip van Hoof aka freax         _/_/_/                                
http://users.pandora.be/skatan  _/_/  _/ _/_/   _/_/_/    _/_/   _/   _/
mailto:[EMAIL PROTECTED]        _/_/     _/ _/  _/       _/  _/   _/  _/ 
Microsoft OS are bad, and   _/_/_/_/   _/  _/ _/_/    _/_/_/_/   _/_/   
their morals are even worse  _/_/     _/     _/      _/    _/  _/  _/   
(Linus Torvalds 8 Sept.1996)_/_/     _/      _/_/_/ _/    _/ _/     _/

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

Reply-To: "RM" <[EMAIL PROTECTED]>
From: "RM" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,linux.dev.c-programming,linux.dev.gcc
Subject: Re: Why compiling "-static" creates HUGE binary???
Date: Thu, 1 Jun 2000 10:09:26 -0400

Erik,

Thanks.  I did "strip test", and it did reduce the size considerably.  The
striped file is now 205KB.  Better, but still....
For that matter, why does "-static" add so much debug info to the file in
the first place?  GCC has command line options to explicitly control debug
symbols.  This still doesn't make much sense.

Robb.

Erik de Castro Lopo <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> Have you stripped the binary of debugging infor etc?
>
> Do "strip program". It will probably reduce the size considerably.
>
> Erik
> --
> +-------------------------------------------------+
>      Erik de Castro Lopo     [EMAIL PROTECTED]
> +-------------------------------------------------+
> Seen on usenet (possibly a quote from an IBM exec):
> "Each large company needs its Vietnam, and Microsoft will
>  experience it with NT..."



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


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