Linux-Development-Sys Digest #659, Volume #6 Wed, 28 Apr 99 05:14:04 EDT
Contents:
Re: Why so long to mount big ext2 filesystems? ("Stefan Monnier "
<[EMAIL PROTECTED]>)
Re: Malloc-ing out of specific memory (Derek)
Re: Linux system ID, is there such a thing? (Walter Lundby)
Re: regexp-able syslogd (Michel Oosterhof)
Re: Right you are (Peter Samuelson)
Re: Linux for CompactPCI BUS? (Peter Samuelson)
Re: NFS fcntl locking fails (kernel 2.2.5 -> 2.2.2) ("Javier Fern�ndez Baldomero")
Re: A Technical Question about the MBR Boot code. (Josef =?iso-8859-1?Q?M=F6llers?=)
Re: how to make a suggestion (Peter Samuelson)
Re: Can device driver use the filing system? (H. Peter Anvin)
Linux sockets bug? (Luca Deri)
Re: soundblaster 32 AWE (Chollian Newsgroup User)
Re: Linux disk defragmenter (Peter Samuelson)
----------------------------------------------------------------------------
From: "Stefan Monnier <[EMAIL PROTECTED]>"
<[EMAIL PROTECTED]>
Subject: Re: Why so long to mount big ext2 filesystems?
Date: 27 Apr 1999 13:38:41 -0400
>>>>> "Rowan" == Rowan Hughes <[EMAIL PROTECTED]> writes:
> mke2fs -m 0 -i 8192 /dev/hdxxx
[...]
> handle. I've never run out of inodes.
Indeed, the default of one inode per 4096 bytes (which obviously assumes an
average file size of slightly more than 4K) is overly pessimistic for
most uses. I'd argue that it should be changed to 8192 at least.
A cursory check of my filesystems with
ssh-all "<hosts>" 'paste <(df -k) <(df -i) | sed -n "\,^/,p" | awk "{print \$2 \"
1024 * \" \$9 \" / p\"; }"|dc'
gives an actual average filesize between 19085 and 41395 so I could
probably use 16834 without encountering and problem.
Stefan
------------------------------
From: [EMAIL PROTECTED] (Derek)
Subject: Re: Malloc-ing out of specific memory
Date: Tue, 27 Apr 1999 20:40:01 GMT
Marcin Romaszewicz (marcin@asmodean) wrote:
: Hello all,
: I need a malloc which will function on a specific memory area, a big plus
: if it's multiprocess safe. I need to set up a shared memory area between a
: set of processes, and malloc out of that memory area.
: Before I go re-inventing the wheel, I wonder if there already is some
: kind of modified malloc that would do this.
http://www.engelschall.com/sw/mm/
------------------------------
From: Walter Lundby <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Linux system ID, is there such a thing?
Date: Tue, 27 Apr 1999 13:39:15 -0700
mlw wrote:
>
> Neil Radisch wrote:
> >
> > I'm looking for a way of identifying
> > a linux system. The number does not have to be 100% unique,
> > but it should be close. Under Irix and Solaris I can get
> > a motherboard serial number from the OS. Under Linux with
> > ethernet I use the ethernet ID.
> >
> > What can I use if the Linux system has no network card?
> >
> > Neil
>
> This is not as easy as it seems.
>
> The first question is why do you want it?
>
> If it is for some instantaneous transaction, make one up based on time
> of day and a hundred bits of random.
>
> If it is for software licensing, extracting a serial number from
> hardware has a few issues:
>
> What do you do when your customer upgrades the mother board and/or CPU?
> What do you do when you customer replaces the ethernet card?
>
> The only reliable way of license tracking is either a dongle or a remote
> license server. And I, personally, would never use software that relied
> on either.
>
Dongles on Intel based machines require (IN or OUT) instructions that
can be trapped by static means. (the code has to have INs or OUTs
somewhere so a hex based "grep" can find probable calls. Disassembly
around those points yields functions. Functions can then be stubbed
out or spoofed.)
If you truly come up with a good solution, the solution will
make you a very rich man. In the mean time all the other actions
are just pains to the user. IMHO the most interesting potential
solution are those programs that attempt to call home when started.
(netscape to www.netscape.com with cookies)
------------------------------
From: [EMAIL PROTECTED] (Michel Oosterhof)
Crossposted-To: comp.security.unix
Subject: Re: regexp-able syslogd
Date: 27 Apr 1999 08:41:45 GMT
"Stefan Monnier <[EMAIL PROTECTED]>" <[EMAIL PROTECTED]>
writes:
>Is there a syslogd replacement that can do pattern matching to
>decide where to send a given message (rather than being limited
>to severity/facility) ?
>I know I can use pipes as message destinations and finetune the
>filtering outside syslogd, but it would seem so generally useful
>and so much less bug-prone to have such a feature built into syslogd.
Yeah. It's called syslog-ng or something. Search for it on freshmeat.net
mcihel
------------------------------
From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: Right you are
Date: 27 Apr 1999 22:15:06 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>
[Christophe Kumsta <[EMAIL PROTECTED]>]
> On CD RedHat 5.0 :
> /dosutils/fips.exe
>
> On CD RedHat 5.1 :
> /dosutils/fips15c/
>
> On CD RedHat 5.2 :
> /dosutils/fips15c/
> /dosutils/fips20/
>
> On CD Madrake 5.3 :
> /dosutils/fips15c/
> /dosutils/fips20/
>
> On Slackware :
> /install/fips-15/
> /install/fips-15c/
On Debian 1.x/2.0 :
/tools/fips15c.zip [I think]
On Debian 2.1/2.1+ :
/tools/fips20.zip
(Also included, of course, is /tools/unz512x3.exe.)
--
Peter Samuelson
<sampo.creighton.edu!psamuels>
------------------------------
From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: Linux for CompactPCI BUS?
Date: 27 Apr 1999 22:56:58 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>
[(cosc1) 95h02740 <[EMAIL PROTECTED]>]
> That is good. It would be fun to build a telco Central Office
> or Mobile Switch on Linux. But hot swapable is definitely a
> desired feature, and RealTime Linux is also helpful.
How hard would it be to add support for rescanning the PCI bus? That's
basically what is needed, right? Individual devices can be
activated/deactivated easily enough with insmod/rmmod. The only issue
I see would be trying to support the old /proc/pci, since you couldn't
throw away the significant amount of initdata associated with it. Not
a big deal, use pciutils. You'd probably be using pciutils to initiate
the bus rescan anyway.
Related problems include rescanning a SCSI bus, and rescanning a
partition table on a disk with at least one busy partition. I think
all these would be very nice to have. (It is difficult to describe how
handy it is to plug an external tape drive into an AIX box, then tell
it to rescan its SCSI bus ... without taking down the machine or, for
that matter, the rest of the bus.)
--
Peter Samuelson
<sampo.creighton.edu!psamuels>
------------------------------
From: "Javier Fern�ndez Baldomero" <[EMAIL PROTECTED]>
Subject: Re: NFS fcntl locking fails (kernel 2.2.5 -> 2.2.2)
Date: Thu, 22 Apr 1999 14:59:48 +0200
Hello!:
I'm very interested in this too. I have compiled
the kernel with the NFS server support option as a module
and have had a look at the README from
ftp://ftp...th-darmstadt.de/.../okir
as indicated in the help item, but I am confused.
Apparently, the software is *already* included
in the kernel? The README says "when/if Linus gives his
placet" as if it were not yet there... then, I only
need to recompile the tools/ and utils/ subdirs?
Are they available somewhere in RPM's? (ok, I'm lazy, I agree :-)
Having /lib/modules/.../fs/lockd.o nfs.o nfsd.o
as modules... will I remove S60nfs? and then, when the
client asks for NFS mount, the modules are automagically
loaded? I tried, but I must have made something wrong,
since the client says it cannot find a port for nfsd.
How can I use the kernel NFS server? Thank you
very much in advance
Miquel van Smoorenburg wrote:
>
>...
> doesn't support that. Mount your partition with the "nolock" option
> or run the new kernel-level NFS daemon (and statd, and lockd) on
>...
Whoa, the author from /etc/rc.d/init.d/nfsfs etc etc... :-)
Thanks a lot
-javier
------------------------------
From: Josef =?iso-8859-1?Q?M=F6llers?= <[EMAIL PROTECTED]>
Crossposted-To: alt.linux
Subject: Re: A Technical Question about the MBR Boot code.
Date: Wed, 28 Apr 1999 07:59:27 +0200
Modemch wrote:
> =
> [EMAIL PROTECTED] (David Lee) writes:
> =
> > : >1) It says that the the BIOS start up loads the MBR code at addres=
s
> > : >0x7C00 -- this is the RAM memory address right?
> >
> > : This is correct.
> >
> > Related to which segment? is cs=3D0x0000?
> > Since it is in real mode, so this address is an offset.
> =
> IIRC, 0x7c00 is the physical address, so in real mode the logical addre=
ss
> would be 0x7c0:0000.
IIRC, the actual address used is really 0000:7c00. I vaguely recall
having played around with LILO's first level boot code and found out
that CS really was set to 0! However: better not assume this, "to make
an assumption means to fool yourself".
Regards,
Josef
-- =
PS Die hier dargestellte Meinung ist die persoenliche Meinung des
Autors!
PS This article reflects the autor=B4s personal views only!
------------------------------
From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: how to make a suggestion
Date: 28 Apr 1999 01:05:05 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>
[Tomas FRYDRYCH]
> I would like to make a suggestion for a feature to be built-in into
> the Linux OS. Could anyone suggest whom to contact?
Depends on the suggestion, and the tone of it.
If it is kernel-related, or libc-related, or something else as
overarching as those, you should post it here. If it has to do with a
particular program, or a particular library, you should probably post
it in comp.os.linux.development.apps. If it is a minor feature or a
bugfix, you should contact the developer of whatever program it
affects, or whichever Linux distribution you use. (If that is Debian,
start by looking around http://bugs.debian.org/ .)
If your feature change suggestion would be relatively major, you would
do well to sit back and think about it for a few minutes before
spouting it off. Think about how it would change existing systems and
existing practices. Think about costs, and benefits, and whether its
effects would be transparent to those who would not use it. Think
about how hard it would be to implement. Think about implementing it
in proof-of-concept form to see if it does what you think it does.
Listen to what other people say about your hot new idea. Do not brush
off people's opinions that it is stupid or has been unsuccessfully
tried before. Do not get defensive when someone points out that it
would not be practical, or that a great many people would be unhappy
were it implemented, or that it would not be worth anyone's time to do
it for the expected benefits. Above all, remember that many of us have
a lot more respect for someone who has an idea and is willing and able
to try implementing it than for someone who just has an idea and wants
someone else to try implementing it.
So, if I haven't scared you off yet ... what is the feature suggestion?
--
Peter Samuelson
<sampo.creighton.edu!psamuels>
------------------------------
From: [EMAIL PROTECTED] (H. Peter Anvin)
Subject: Re: Can device driver use the filing system?
Date: 28 Apr 1999 06:14:19 GMT
Reply-To: [EMAIL PROTECTED] (H. Peter Anvin)
Followup to: <[EMAIL PROTECTED]>
By author: Philip Boucherat <[EMAIL PROTECTED]>
In newsgroup: comp.os.linux.development.system
>
> Thanks for that, that seems to work fine. So why do most people say not
> to do this? I'm off for the weekend now unless someone tells me I should
> still be worrying.
>
99.9% of the time it is the Wrong Thing[TM] to do. However, 0.1% of
the time it is actually necessary and useful...
For downloading firmware, I would consider this the Wrong Thing[TM] to
do, as it is better done in user space... for one thing, it lets you
do:
zcat firmware.gz > /dev/mydevice
... however, when autofs wants to talk to the daemon over its pipe, it
needs to be able to write() to the pipe...
-hpa
--
"The user's computer downloads the ActiveX code and simulates a 'Blue
Screen' crash, a generally benign event most users are familiar with
and that would not necessarily arouse suspicions."
-- Security exploit description on http://www.zks.net/p3/how.asp
------------------------------
From: Luca Deri <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking
Subject: Linux sockets bug?
Date: Wed, 28 Apr 1999 09:18:10 +0200
Reply-To: [EMAIL PROTECTED]
This is a multi-part message in MIME format.
==============F55A5C1073DB7CC431CAB4D4
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi all,
I'm currently developing a network monitoring application named ntop
(http://www-serra.unipi.it/~ntop/). One of the ntop users (Olaf
Schnapauff) found a very strange problem. This problem occurs only on
Linux i386 (Alpha works for instance).
Please find enclosed a very simple application (packetLogger - based on
Linux sockets) you can use to reproduce the problem. Suppose to have
host A (MAC Address 08:00:69:0B:6F:A1) and host B (MAC Address
00:20:AF:73:C6:2E). Host B is an i386 running Linux 2.X. No matter what
OS runs on A. Now start "packetLogger 08:00:69:0B:6F:A1
00:20:AF:73:C6:2E" in order to filter packets flowing though A and B. I
suppose there's no other traffic (e.g. telnet) between A and B. Now from
A do 'ftp B' and transfer a file C (large, e.g. > 1 MB). Stop
packetLogger, look at the # of packets and restart it. Now from B do
'ftp A' and transfer the very same file C [if A and B are Linux boxes
you can start packetLogger on both hosts]. You will notice that in the
second case you've lost many packets whereas in the first case
everything works fine.
Do you have a clue of what could cause this problem?
Thanks in advance, Luca.
--
Luca Deri Finsiel S.p.A.
Via Matteucci 34/B 56124 Pisa, Italy.
Ph. +39/050/968.639 Fax. +39/050/968.626
Email: [EMAIL PROTECTED] WWW: http://www.tlcpi.finsiel.it/~deri/
Software is about stuff, about getting hands dirty - Jim Coplien
==============F55A5C1073DB7CC431CAB4D4
Content-Type: text/plain; charset=us-ascii;
name="packetLogger.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="packetLogger.c"
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <net/if.h>
#include <linux/if_ether.h>
#include <netinet/in.h>
#include <errno.h>
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
struct ethernet_header {
u_char ether_dhost[6];
u_char ether_shost[6];
u_short ether_type;
};
char* etheraddr_string(const u_char *ep)
{
u_int i, j;
char *cp;
struct enamemem *tp;
static char buf[sizeof("00:00:00:00:00:00")];
char hex[] = "0123456789ABCDEF";
cp = buf;
if ((j = *ep >> 4) != 0)
*cp++ = hex[j];
else
*cp++ = '0';
*cp++ = hex[*ep++ & 0xf];
for(i = 5; (int)--i >= 0;) {
*cp++ = ':';
if ((j = *ep >> 4) != 0)
*cp++ = hex[j];
else
*cp++ = '0';
*cp++ = hex[*ep++ & 0xf];
}
*cp = '\0';
return (buf);
}
int main(int argc, char* argv[]) {
struct ifreq ifr;
struct sockaddr sa;
char *device = "eth0";
unsigned long packetNum=0, totLen=0;
int fd;
if(argc != 3) {
printf("Usage: %s <MAC Addr. host A> <MAC Addr. host B>\n", argv[0]);
printf("Example: %s 08:00:69:0B:6F:A1 00:20:AF:73:C6:2E\n", argv[0]);
return(-1);
}
fd = socket(PF_INET, SOCK_PACKET, htons(ETH_P_ALL));
if (fd < 0) {
printf("Error creating socket.\n");
return(-1);
}
/* Bind to the interface name */
memset(&sa, 0, sizeof(sa));
sa.sa_family = AF_INET;
(void)strncpy(sa.sa_data, device, sizeof(sa.sa_data));
if (bind(fd, &sa, sizeof(sa))) {
printf("bind: error\n");
return(-1);
}
memset(&ifr, 0, sizeof(ifr));
strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name));
if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0 ) {
printf("SIOCGIFHWADDR: error\n");
return(-1);
}
/* Base the buffer size on the interface MTU */
memset(&ifr, 0, sizeof(ifr));
strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name));
if (ioctl(fd, SIOCGIFMTU, &ifr) < 0 ) {
printf("SIOCGIFMTU: error\n");
return(-1);
}
while(1) {
struct sockaddr from;
int fromlen, cc, len=0;
u_char bp[2048], srcHost[64], dstHost[64];
struct ethernet_header *ep;
do {
fromlen = sizeof(from);
cc = recvfrom(fd, bp, 2048, 0, &from, &fromlen);
len += cc;
} while (strcmp(device, from.sa_data));
ep = (struct ethernet_header*)bp;
strcpy(srcHost, etheraddr_string(ep->ether_shost));
strcpy(dstHost, etheraddr_string(ep->ether_dhost));
if(strcmp(srcHost, argv[1]) && strcmp(srcHost, argv[2]))
continue;
else if(strcmp(dstHost, argv[1]) && strcmp(dstHost, argv[2]))
continue;
else {
totLen += len;
printf("%5d\t%8u\t%s -> %s (len=%d)\n",
++packetNum, totLen, srcHost, dstHost, len);
}
}
close(fd);
return(0);
}
==============F55A5C1073DB7CC431CAB4D4==
------------------------------
From: [EMAIL PROTECTED] (Chollian Newsgroup User)
Subject: Re: soundblaster 32 AWE
Crossposted-To:
comp.os.linux.development.apps,comp.os.linux.hardware,comp.os.linux.m68k
Date: Wed, 28 Apr 1999 07:39:56 GMT
Jon Larsson ([EMAIL PROTECTED]) wrote:
: Read the following:
: /usr/src/linux/Documentation/sound/Soundblaster
: /usr/src/linux/Documentation/sound/AWE32
: Jon Larsson <[EMAIL PROTECTED]>
: Canarias, Espana - Spain - wrote:
: >How to make work the
: >soundblaster AWE 32
: >with Red Hat Linux 5.2
: >
: >THE BIG QUESTION !!!
: >
: >[EMAIL PROTECTED]
: >From Spain with S of Sun&Sex&Sangria
: >
: >
------------------------------
From: [EMAIL PROTECTED] (Peter Samuelson)
Crossposted-To: comp.os.linux.advocacy
Subject: Re: Linux disk defragmenter
Date: 28 Apr 1999 02:39:16 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>
[Christopher B. Browne <[EMAIL PROTECTED]>]
> I understand three things about the issue:
> a) Inodes can point off to several blocks, and seem to keep the issue
> from causing gross problems, and
> b) Nobody knows anymore whether data is actually being plased
> continuously on the disk anyways.
> c) Some degree of fragmentation is inherent in having multiple file
> streams active concurrently.
ext2 was designed to resist fragmentation. When you write to a file,
ext2 attempts to pre-allocate a group of (I think) 8 blocks at a time;
when you close the file, whichever blocks you didn't use are freed.
This is in addition to the usual tricks of trying to find a largish
free chunk when it goes to allocate in the first place.
> People keep proposing that algorithms get added to the kernel to
> improve disk access by predicting the physical location of data on
> disk and thereby optimizing the scheduling of accesses; Linus himself
> has been on record as saying that this is pointless because smart new
> disks prevent you from knowing physical locations.
I heard the same objection from Mark Lord, the Linux IDE maintainer.
The context was specifically that someone suggested the IDE block
access elevator be bidirectional, which it currently isn't.
--
Peter Samuelson
<sampo.creighton.edu!psamuels>
------------------------------
** 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
******************************