Linux-Development-Sys Digest #597, Volume #8     Thu, 29 Mar 01 13:13:08 EST

Contents:
  Re: Module debugging (Kasper Dupont)
  Re: wipeinfo, secure delete, device driver (Kasper Dupont)
  Re: why it should be changed  to 36?? (Kasper Dupont)
  What is the size of Linux 2.4.1 Kernel ("Alan Po")
  Re: How to handle newline character(s) in a TCP server (Kasper Dupont)
  The differences between Ash and Bash ("Alan Po")
  boot disk creation ("oleg")
  Re: what means pgrp in the task struct ? (Kasper Dupont)
  Re: The differences between Ash and Bash (Jonathan Kamens)
  Re: What is the size of Linux 2.4.1 Kernel (Alumne FIB - MARC COLL CARRILLO)
  Re: What is the size of Linux 2.4.1 Kernel (mlw)
  Re: boot disk creation (Kasper Dupont)
  Re: How to handle newline character(s) in a TCP server (Terran Melconian)
  Re: The differences between Ash and Bash (Young4ert)
  Re: What is the size of Linux 2.4.1 Kernel (Dave Blake)
  Kernel 2.4.2 won't compile on non-PCI Alphas ("Kevin Read")
  Re: wipeinfo, secure delete, device driver
  How does Linux implement the time calls and what's the resolution? ("Rafa Faus")
  driver intercommunication ("Niels Sterrenburg")
  Re: wipeinfo, secure delete, device driver (Paul Repacholi)
  TEST (Hisashi Nakazawa)
  Re: Shared libs and memory usage (Phil Ehrens)
  Re: How to change the source IP address in UDP Socket ([EMAIL PROTECTED])
  Re: Shared libs and memory usage ("Gianluca Puggelli (Gianluca)")

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Module debugging
Date: Thu, 29 Mar 2001 12:21:49 +0000

S. Miller wrote:
[...]
> "initialization".  It refuses to be rmmoded (module busy) and of course
> I can't do another insmod.  Is there any way short of a reboot to clear
[...]

Sometimes you actually can insmod another copy
if you just give it another name with the -o
option to insmod.

You will of course sometimes need to reboot,
the reboot can be speeded up a bit if you use
the monte util. (A very warm boot.)

It can be downloaded from <http://www.scyld.com/>

-- 
Kasper Dupont

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: wipeinfo, secure delete, device driver
Date: Thu, 29 Mar 2001 12:26:01 +0000

[EMAIL PROTECTED] wrote:
[...]
> dd if=/dev/zero of=/dev/hda? would not be sufficient. On the other hand
> simply deleting the file is insufficient since Linux, i think, does
> not zero out the blocks of the file. This allows to sometimes recover
> files inadvertantly deleted. There has recently appeared a security
> notice on freebsd precisely on this subject. If i remember well,
> the kernel has been modified to zero out all blocks of a deleted
> file. Of course if this is really done, you cannot any more recover
> in any way deleted files, which may be bad.
[...]

I think there has been defined some interface to mark files
which are to be zeroed on deletion. I don't know if any fs
has yet implemented this interface.

-- 
Kasper Dupont

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: why it should be changed  to 36??
Date: Thu, 29 Mar 2001 12:42:45 +0000

hushui wrote:
> 
> In bootsect.S,
> ....
> movb 4(di),*36  ! patch sector count
> seg fs
> mov (bx),di          ! di=#0x4000-12
> seg fs
> mov 2(bx),es           !es =INITSEG(0x9000)
> ..........
> 
> di=0x78h
> 0000:0078 is int 1Eh Interrupt Vector. The disk parament is set here. What
> is the use of change it to 36 ???
> I am really confused about it.

This interrupt vector does not point to an interrupt
procedure but a structure containing disk parameters.
2880KB floppies have 36 sectors pr. track. (36*2*80)
No floppy formats have more than that.

-- 
Kasper Dupont

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

From: "Alan Po" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.advocacy,comp.os.linux.development.apps,comp.os.linux.help,comp.os.linux.misc
Subject: What is the size of Linux 2.4.1 Kernel
Date: Thu, 29 Mar 2001 20:46:56 +0800

Dear all

Would you tell me the size of Linux 2.4.1 kernel? Is it very large?

Thanks a lot

Alan PO



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

From: Kasper Dupont <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.programmer,comp.os.linux.development.apps
Subject: Re: How to handle newline character(s) in a TCP server
Date: Thu, 29 Mar 2001 12:52:40 +0000

Michel Bardiaux wrote:
> 
> InterFan wrote:
> >
> > I want to design a TCP server. It just receives a line from client and
> > handles it. Then, it sends the response back to the client. The
> > problem is that a line of message may end with ASCII characeter 13, 10
> > or 13+10. I use blocking I/O function. How can I handle these
> > conditions smoothly.
> >
> > Thank a lot.
> >
> > Best Regards,
> > Chuan He
> 
> If '\r' ends a line, then the sequence '\r''\n' is ambiguous, is it one
> or 2 lines, the 2nd one being empty?
> 

I have not seen any programs using ascii 13 as a line break.
But even that could be handled, I think you can assume that
a single client always uses the same sequence.

I think this approach would work for almost anything:

int mygetchar()
{
   static int state=0;
   while (1) {
      int c=getchar();
      switch(c) {
         case 10:
            if (state==13) state=0;
            else { state=10; return 10; }
            break;
         case 13:
            if (state==10) state=0;
            else { state=13; return 10; }
            break;
         default:
           state=0;
           return c;
      }
   }
}

The next problem is how to respond to the client,
you can either respond with the same linebreak as
the client, or you can choose a fixed style.         

-- 
Kasper Dupont

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

From: "Alan Po" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.admin,comp.os.linux.development,comp.os.linux.help,comp.os.linux.misc
Subject: The differences between Ash and Bash
Date: Thu, 29 Mar 2001 20:51:04 +0800

Dear all

The great difference of the size of Ash and Bash make me want to ask a
question. What is the differences between them in function?

Please tell me.

Thanks a lot

Alan Po
[EMAIL PROTECTED]



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

From: "oleg" <[EMAIL PROTECTED]>
Subject: boot disk creation
Date: Thu, 29 Mar 2001 15:52:42 +0300

Hello,
can anybody help me with boot disk creation. I've compiled
a new kernel and done like bzdisk - to copy on /dev/fd0
but I can't use this disk on another mashine, only where the kernel
has been compiled...
f1



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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: what means pgrp in the task struct ?
Date: Thu, 29 Mar 2001 13:05:15 +0000

Benjamin Lussier wrote:
> 
> Kasper Dupont wrote:
> > It is always the init task who inherrits children
> > of dead tasks.
> What then of the following comment (and code) in kernel/exit.c ?
> 
> 148  * When we die, we re-parent all our children.
> 149  * Try to give them to another thread in our process
> 150  * group, and if no such member exists, give it to
> 151  * the global child reaper process (ie "init")
> 152  */
> 153 static inline void forget_original_parent(struct task_struct *
> father)
> 154 {
> 155         struct task_struct * p, *reaper;
> 156
> 157         read_lock(&tasklist_lock);
> 158
> 159         /* Next in our thread group */
> 160         reaper = next_thread(father);
> 161         if (reaper == father)
> 162                 reaper = child_reaper;
> (child_reaper = init)
> 
> > I think there are also some special rules about
> > sending signals where you can send signals to
> > processes in your group even if the UID does not
> > match.
> >(Correct me if I'm wrong about this.)
> I bet I'm not knowledgeable enough to do that :P
> 

OK, so it looks like it is possible for other processes
than init to inherit children. Under what circumstances
does this happen, I have not been able to make it happen.

-- 
Kasper Dupont

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

From: [EMAIL PROTECTED] (Jonathan Kamens)
Crossposted-To: comp.os.linux.admin,comp.os.linux.help,comp.os.linux.misc
Subject: Re: The differences between Ash and Bash
Date: 29 Mar 2001 13:17:03 GMT

(Removed bogus "comp.os.linux.development" newsgroup from Newsgroups
line.)

Ash does not have most of the functionality that bash has.  It's
pretty much a pared-down Bourne shell, whereas bash has all kinds of
functionality which didn't exist in the original Bourne shell.

The point of ash is to give you a small, fast shell without all of
bash's baggage, e.g., so that you can put a shell on a floppy rescue
disk that won't take up tons of space that you need for more important
functionality.

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

From: Alumne FIB - MARC COLL CARRILLO <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.advocacy,comp.os.linux.development.apps,comp.os.linux.help,comp.os.linux.misc
Subject: Re: What is the size of Linux 2.4.1 Kernel
Date: Thu, 29 Mar 2001 15:20:14 +0200

The compressed file is about 20 Mb. Once uncompressed, it can grow up to
100 Mb.

Alan Po wrote:

> Dear all
>
> Would you tell me the size of Linux 2.4.1 kernel? Is it very large?
>
> Thanks a lot
>
> Alan PO


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

From: mlw <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.advocacy,comp.os.linux.development.apps,comp.os.linux.help,comp.os.linux.misc
Subject: Re: What is the size of Linux 2.4.1 Kernel
Date: Thu, 29 Mar 2001 08:35:51 -0500

Alan Po wrote:
> 
> Dear all
> 
> Would you tell me the size of Linux 2.4.1 kernel? Is it very large?
> 
> Thanks a lot
> 
> Alan PO

Do you mean built, source, or for download?

It is between 20 and 30 meg to download.

It extracts to a very large source tree, over 100 meg.

When building, the object files take a lot of space.

A bootable kernel file can be less than a 1meg. A full blown working kernel
with all the modules compiled, can be about 15-20 meg in the
/lib/modules/2.4.xxx.


-- 
I'm not offering myself as an example; every life evolves by its own laws.
========================
http://www.mohawksoft.com

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: boot disk creation
Date: Thu, 29 Mar 2001 13:41:35 +0000

oleg wrote:
> 
> Hello,
> can anybody help me with boot disk creation. I've compiled
> a new kernel and done like bzdisk - to copy on /dev/fd0
> but I can't use this disk on another mashine, only where the kernel
> has been compiled...
> f1

Why don't you tell us what happens when you try
to boot, so we won't have to guess everything.

I guess your problem is that the two systems are
using different root partitions. You can change
the root partition on the floppy with the rdev
command.

If you need to be able to boot different root
partitions from the same floppy you need to
install another boot loader on the floppy. I
suggest you use either SYSLINUX or LILO.

SYSLINUX only works on FAT formated floppy
disks, but it is easy to configure.

LILO has lots of features. It does not know
any filesystems, instead it relies on info
from the kernel. This means that it is harder
to configure, as you have to recreate its map
files every time you change any of the boot
configuration.

-- 
Kasper Dupont

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

From: [EMAIL PROTECTED] (Terran Melconian)
Crossposted-To: comp.unix.programmer,comp.os.linux.development.apps
Subject: Re: How to handle newline character(s) in a TCP server
Date: 29 Mar 2001 09:35:41 -0500

In article <[EMAIL PROTECTED]>,
Kasper Dupont  <[EMAIL PROTECTED]> wrote:
>I have not seen any programs using ascii 13 as a line break.

I believe MacIntosh programs do that, though it's been a long time and
I could be remembering wrong.

10 (\n):      UNIX
13,10 (\r\n): Microsoft
13 (\r):      Macintosh

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

From: Young4ert <[EMAIL PROTECTED]>
Subject: Re: The differences between Ash and Bash
Crossposted-To: comp.os.linux.admin,comp.os.linux.help,comp.os.linux.misc
Date: Thu, 29 Mar 2001 14:23:53 GMT

Jonathan Kamens wrote:

> (Removed bogus "comp.os.linux.development" newsgroup from Newsgroups
> line.)
> 
> Ash does not have most of the functionality that bash has.  It's
> pretty much a pared-down Bourne shell, whereas bash has all kinds of
> functionality which didn't exist in the original Bourne shell.
> 

What about tcsh?

> The point of ash is to give you a small, fast shell without all of
> bash's baggage, e.g., so that you can put a shell on a floppy rescue
> disk that won't take up tons of space that you need for more important
> functionality.
> 


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

From: [EMAIL PROTECTED] (Dave Blake)
Crossposted-To: 
comp.os.linux.advocacy,comp.os.linux.development.apps,comp.os.linux.help,comp.os.linux.misc
Subject: Re: What is the size of Linux 2.4.1 Kernel
Date: 29 Mar 2001 14:50:55 GMT
Reply-To: [EMAIL PROTECTED]

Alan Po <[EMAIL PROTECTED]> wrote:
> Dear all
> 
> Would you tell me the size of Linux 2.4.1 kernel? Is it very large?

Kernel source, about 100 MBytes.

Compressed, about 20 MBytes.

Kernel binary on my machines runs about 600kbytes.


-- 
Dave Blake
[EMAIL PROTECTED]

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

From: "Kevin Read" <[EMAIL PROTECTED]>
Subject: Kernel 2.4.2 won't compile on non-PCI Alphas
Date: Thu, 29 Mar 2001 15:56:02 +0200
Crossposted-To: comp.os.linux.alpha

Hi!

kernel 2.4.x won't compile on non-PCI Alphas like the Jensen. It tries to
find some PCI symbols in the arch-dependent stuff. Is there a known
workaround at the moment?

Thanks,


        Kevin

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

From: <[EMAIL PROTECTED]>
Subject: Re: wipeinfo, secure delete, device driver
Date: Thu, 29 Mar 2001 15:11:12 GMT

Kasper Dupont <[EMAIL PROTECTED]> wrote:
> I think there has been defined some interface to mark files
> which are to be zeroed on deletion. I don't know if any fs
> has yet implemented this interface.

The other way around, actually. ext2 provides a file attribute to zero
on deletion, but the kernel doesn't support it yet.

-- 
Matt Gauthier <[EMAIL PROTECTED]>

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

From: "Rafa Faus" <[EMAIL PROTECTED]>
Subject: How does Linux implement the time calls and what's the resolution?
Date: Thu, 29 Mar 2001 18:18:32 +0200

As you know, the time resolution in Windows is 1ms, so if you want to do a
for loop and wait by software, the minimum time you can wait is 1ms.
I would like to know how Linux implements the time calls, and what the
resolution is.

Thanks in advance,

Rafa



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

From: "Niels Sterrenburg" <[EMAIL PROTECTED]>
Subject: driver intercommunication
Date: Thu, 29 Mar 2001 17:40:19 +0200

I need to write a device driver which acts like an OSS or ALSA compatible
sounddriver to user space, and which uses a low level hardware driver to
play sound on a universial dsp board. (see attached image)

How can I communicate with the hardware driver from kernel space?

1) I can call the shared functions of de driver directly
2) I use the /dev filesystem interface just like from user space
3) Something with a functable ???? to link you're own funcs to system call's

1. Is very difficult because I have to know a lot about the hardware driver
funcs (I have the source so it is possible)

2. Can work (I believe) I saw some samples on the net in which they did a
getfs() and setfs() and after that an open("/dev/mydevice",O_RWRD), but I
can't get it compiled (unresolved
    funcs -> getfs, open etc)

3. don't understand working of it.

What would you suggest ??????

How DO software modules normally communicate with hardware modules within
kernel space ????????????????

thanks in advance

Niels Sterrenburg



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

Subject: Re: wipeinfo, secure delete, device driver
From: Paul Repacholi <[EMAIL PROTECTED]>
Date: 29 Mar 2001 21:50:10 +0800

Kasper Dupont <[EMAIL PROTECTED]> writes:

> I think there has been defined some interface to mark files which
> are to be zeroed on deletion. I don't know if any fs has yet
> implemented this interface.

ODS-2 on VMS has had this for 15 years or so at least. Infact, a DSE,
Data Security Erase is built into MSCP controllers for both disk and
tape.

-- 
Paul Repacholi                               1 Crescent Rd.,
+61 (08) 9257-1001                           Kalamunda.
                                             West Australia 6076
Raw, Cooked or Well-done, it's all half baked.

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

From: Hisashi Nakazawa <[EMAIL PROTECTED]>
Subject: TEST
Date: Fri, 30 Mar 2001 01:00:49 +0900




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

From: [EMAIL PROTECTED] (Phil Ehrens)
Subject: Re: Shared libs and memory usage
Date: 29 Mar 2001 17:18:47 GMT
Reply-To: -@-

Giuliano Pochini wrote:
>I wrote a cgi that uses a library. I recompiled the library
>as shared in the attempt to reduce memory usage (I have up
>to 400 of this cgi's running at the same time), but it
>doesn't.... it even uses a few KB more. Shouldn't the library
>text be shared between tasks ?  Why it doesn't ?  I only gain
>a bit of disk space, but it isn't really an issue here.

Run top and watch the total memory usage as you run many copies
of the program.  You will see that the total memory usage grows
by some fraction of the size of the first process.  If you
look at the "top" lines for the processes, the "SHARE" column
shows the amount of memory "shared" with the other processes.

For instance:
  PID USER       PRI NI SIZE RSS  SHARE STAT  LIB %CPU %MEM   TIME COMMAND
  133 root       0   0   980  980   912 S       0  0.0  1.2   0:00 httpd
  134 nobody     0   0  1084 1084   972 S       0  0.0  1.3   0:00 httpd
  135 nobody     0   0   956  956   896 S       0  0.0  1.1   0:00 httpd
  136 nobody     0   0   956  956   896 S       0  0.0  1.1   0:00 httpd
  137 nobody     0   0   956  956   896 S       0  0.0  1.1   0:00 httpd
  138 nobody     0   0   888  852   752 S       0  0.0  1.0   0:00 httpd

Without going into great detail, we see that each instance of the apache
httpd is sharing ~900k, so each new process requires about 60k.

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

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps
Subject: Re: How to change the source IP address in UDP Socket
Date: Thu, 29 Mar 2001 12:41:55 -0500

I've received a lot of replies since my original question. Raw socket
is the way.  Richard Stevens's "Unix Network Programming Vol 1" covers
raw sockets in great details. There's even a library which helps to do
the job easily.  This is Libnet
http://www.packetfactory.net/Projects/Libnet/.  I highly recommend it.

Some people had taken it into a very interesting spin.  I'd think this
is like any other knowledge, invention and technology, eg. Dynamite.
They are double-edged swords.  If you think fire can be covered with
paper wrapper or flood can be stopped with dams, the worst is yet to
come.

Thanks so much for all the help.

w 


On 9 Mar 2001 22:02:30 GMT, Matthew Impett
<[EMAIL PROTECTED]> wrote:

>The problems we see are not that to many people are learning how to spoof
>IP packets from a mailing list, but that not enough people are aware of the
>problems associated with this and not enough work has been done to stop them.
>The more people that learn how to do such attacks, the more people that will
>attempt them. It will become a major problem, and people will realize this
>and fix the security hole. Problem solved, not band-aided by not telling 
>people how to do the attack in the first place..
>
>Therefore, I say make is EASY to do, and soon it won't be a problem anymore..
>
>Matt
>
>: Of course I do not believe this!
>: But I wouldn't tell somebody HOW to do it you see?
>: If somebdoy wants to hack a forged IP address, it should be DIFFICULT TO DO,
>: and he should work like a fool to do his/her hack!!! It shouldn't be so easy
>: as just to post a message to a discussion group and then have all the
>: necessary details being sent to you!!!
>
>: Please guys:
>: next time a question like:
>
>: How can I crack the PAM modules?
>: appears here, would you PLEASE keep your knowledge to yourselves?
>
>:> You cannot prevent people from sending packets with faked
>:> source IP, so the OS might as well allow it. (Otherwise
>:> people will use another OS with more features.) You might
>:> ask why it should be allowed, the answer is simply because
>:> sometimes people do have the need for legal reasons.
>
>: Of course I can't prevent them, but we should not make this EASIER for
>: them!!!
>
>
>


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

From: "Gianluca Puggelli (Gianluca)" <[EMAIL PROTECTED]>
Subject: Re: Shared libs and memory usage
Date: Thu, 29 Mar 2001 19:43:19 +0100
Reply-To: [EMAIL PROTECTED], [EMAIL PROTECTED]

Giuliano Pochini wrote:

> Hi!
>
> I wrote a cgi that uses a library. I recompiled the library
> as shared in the attempt to reduce memory usage (I have up
> to 400 of this cgi's running at the same time), but it
> doesn't.... it even uses a few KB more. Shouldn't the library
> text be shared between tasks ?  Why it doesn't ?  I only gain
> a bit of disk space, but it isn't really an issue here.
>
> Bye.

    Hello Giuliano,
    For sure you have to recompile also the cgi, anyway
    you can use the ldd command to check if the shared
    lib is used by the cgi or not.

    regards
    gianluca




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


** 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 by posting to the
comp.os.linux.development.system newsgroup.

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