Linux-Development-Sys Digest #459, Volume #8 Thu, 1 Feb 01 21:13:07 EST
Contents:
Re: Static linked libraries ("Gard Bjering")
Re: procps 2.0.7 hangs (eventually) on Linux 2.4.1 ("Geoff Winkless")
Windows' DLL equivalent in Linux ("Albert Goodwill")
Re: Windows' DLL equivalent in Linux (Mike Dowling)
Re: procps 2.0.7 hangs (eventually) on Linux 2.4.1 ([EMAIL PROTECTED])
Re: filling /proc ([EMAIL PROTECTED])
Re: Windows' DLL equivalent in Linux ("Arthur H. Gold")
Re: can Linux be secure? ([EMAIL PROTECTED])
Re: filling /proc (Arnaud Westenberg)
Re: How to compile with ROGUE WAVE library ([EMAIL PROTECTED])
what is "wait_o" (wait_on??) state ? (Andrew Daviel)
Re: PCI bus access ("Ken Whaley")
mount() not update mtab ("Ken Wilson")
Re: 2.4.1pre and 2.4.0ac problem: __buggy_fxsr_alignment undefined (Trevor Hemsley)
Re: what is "wait_o" (wait_on??) state ? (Andrew Daviel)
increase number of processes? (Jeff Lacki)
Re: Linux device driver (kernel module) written in C++ ([EMAIL PROTECTED])
----------------------------------------------------------------------------
From: "Gard Bjering" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Static linked libraries
Date: Thu, 1 Feb 2001 17:20:03 +0100
No worries anymore, it works now!!!!
Wrote the makefile like this instead:
:
test04: test04_dm6420.o gbutils.o
$(CC) -o test04 -static test04_dm6420.o gbutils.o
/usr/lib/libncurses.a ../siglib/libsiglib.a
:
------------------------------
From: "Geoff Winkless" <[EMAIL PROTECTED]>
Subject: Re: procps 2.0.7 hangs (eventually) on Linux 2.4.1
Date: Thu, 1 Feb 2001 16:44:32 -0000
"Kasper Dupont" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
: Geoff Winkless wrote:
: >
: > Running 2.4.1, seems good. Suddenly today when I run ps the tty hangs.
Same
: > with top, killall, etc etc
: >
: > If I go into /proc and do an ls through the directories it hangs on one
of
: > the subdirectories.
: >
: > If I try to kill -9 the process ids that subdirectory refers to nothing
: > happens - the subdir is still there.
: >
: > Has anyone else come across this problem?
: >
: > procps is 2.0.7 - the latest version.
: >
: > Any thoughts appreciated.
: >
: > Geoff
:
: Does the kernel report any problems?
: Anything unusual in /var/log/messages?
Nope.
Geoff
------------------------------
From: "Albert Goodwill" <[EMAIL PROTECTED]>
Subject: Windows' DLL equivalent in Linux
Date: Fri, 2 Feb 2001 15:44:10 +1100
I'm new to Linux and would like to learn how to create and use dynamicly
loadable libraries in Linux.
Could some one point any source code to about Linux version of DLL concept?
Thanks.
------------------------------
From: [EMAIL PROTECTED] (Mike Dowling)
Subject: Re: Windows' DLL equivalent in Linux
Date: 1 Feb 2001 17:15:21 GMT
On Fri, 2 Feb 2001 15:44:10 +1100, Albert Goodwill <[EMAIL PROTECTED]> wrote:
>I'm new to Linux and would like to learn how to create and use dynamicly
>loadable libraries in Linux.
You use them all the time. Try
$ ldd <binary of your choice>
If ldd does not list any shared libraries, then delete the binary, find
the sources, compile, install.
>Could some one point any source code to about Linux version of DLL
>concept?
glib-1.3.1.tar.gz from your local GNU mirror.
But be warned, there are probably more sources in this package there
than you care to play with; be quadruply careful before you install
these, as, if you screw up, your system may never be the same again.
No, I'm being unfair.
In Linux we call them "shared libraries". The usually live in /lib and
/usr/lib, and even /usr/local/lib. The libc above is the basic C
library; as most of the Linux binaries are written in C, virtually
nothing will work if you screw up with the libc.
Any self-respecting binary links automatically to the shared libraries
it needs, whence my facetious comment above.
Cheers,
Mike
--
My email address [EMAIL PROTECTED] above is a valid email
address. It is a mail alias. Once spammed, the alias is deleted, and
the integer 'N' incremented. Currently, mike[47,46] are valid. If
email to mikeN bounces, try mikeN+1.
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: procps 2.0.7 hangs (eventually) on Linux 2.4.1
Reply-To: [EMAIL PROTECTED]
Date: 2 Feb 2001 03:31:14 +1100
"Geoff Winkless" <[EMAIL PROTECTED]> writes:
>If I go into /proc and do an ls through the directories it hangs on one of
>the subdirectories.
>If I try to kill -9 the process ids that subdirectory refers to nothing
>happens - the subdir is still there.
>Has anyone else come across this problem?
Yep, although with some earlier 2.4test kernel, and only on one machine.
And for me, killing the process removed the directory and made things
work again (but I would have liked to know what process I was killing ---
kinda made me feel uneasy to just kill a number...). Happened twice, and
not again after that.
I have no idea what caused it, and put it down to something having gone
wrong with the machine in the middle of an Aussie summer (i.e. its HOT
around here). IIRC, it was an SMP machine, so maybe it was some very rare
race condition?
Nothing much to go by, I'm afraid :(
Bernie
--
Peace is much more precious than a piece of land
Anwar al-Sadat
Egyptian President 1970-81
In a speech in Cairo, 8 March 1978
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: filling /proc
Reply-To: [EMAIL PROTECTED]
Date: 2 Feb 2001 03:35:34 +1100
Arnaud Westenberg <[EMAIL PROTECTED]> writes:
>The subdirectories are registered from within a for-loop in wich I use
>sprintf(name, "channel%d", i) to set each subdirectory name. If I use
>the for-loop code four distinct times and 'manually' set each name to
>"channel0" etc. it works fine.
This suggests (and I'll leave actual checking to you :) that the routine
that registers your subdirectory does not take a copy of the passed string,
but simply copies the *pointer* to it somewhere.
That way, all 4 subdirectories have name entries that point towards your
variable "name" --- which of course only holds the latest name.
So instead of
sprintf(name,"channel%d",i);
register_directory(name,....);
you should do something akin to
char* tmp;
sprintf(name,"channel%d",i);
tmp=strdup(name);
register_directory(tmp,....);
that way, you get nice fresh memory for each one (and won't even get punished
when the scope of "name" ends).
Bernie
--
One man's wage increase is another man's price increase
Harold Wilson
British Prime Minister 1964-70 and 1974-76
In a speech at Blackburn, 8 January 1970
------------------------------
Date: Thu, 01 Feb 2001 11:30:29 -0600
From: "Arthur H. Gold" <[EMAIL PROTECTED]>
Subject: Re: Windows' DLL equivalent in Linux
Albert Goodwill wrote:
>
> I'm new to Linux and would like to learn how to create and use dynamicly
> loadable libraries in Linux.
>
> Could some one point any source code to about Linux version of DLL concept?
>
> Thanks.
[posted and emailed]
Look at:
http://www.linux.org/docs/ldp/howto/Program-Library-HOWTO/index.html
HTH,
--ag
--
Artie Gold, Austin, TX (finger the cs.utexas.edu account
for more info)
mailto:[EMAIL PROTECTED] or mailto:[EMAIL PROTECTED]
--
A: Yes I would. But not enough to put it out.
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: can Linux be secure?
Date: Thu, 01 Feb 2001 18:19:08 -0000
On 01 Feb 2001 11:59:45 +0100 Moritz Franosch <[EMAIL PROTECTED]> wrote:
| [EMAIL PROTECTED] writes:
|
|> If a custom made distribution consisting of well audited programs
|> and other components (including especially system and administration
|> facilities) is bundled with the Linux kernel, just how safe is the
|> kernel itself in terms of security, compared to a system like OpenBSD?
|> Assume one used all the same program components as OpenBSD did and
|> just compare the kernels.
|
| There are several security enhancements for the Linux kernel, e.g.
|
| Rule Set Based Access Control (RSBAC) for Linux
| http://www.rsbac.org/
|
| NSA Security-Enhanced Linux
| http://www.nsa.gov/selinux/
|
| and many others (search www.freshmeat.net for 'security kernel').
|
| A fundamental problem with Linux is that the kernel (with all its
| modules) is big and that there can be a security flaw (e.g. a buffer
| overflow) everywhere. A solution might be to compile only what you
| need and hope that this subset is secure. But I think it's the same
| with the BSDs.
I am building some firewalls, so the idea is to keep malicious
users entirely outside of the system. Thus userland expoits are
not nearly the concern as remote network exploits. Of course
the big concern should be the programs running network services.
Those will be few. The installed system will be small. What I
want to do is justify my choice of Linux as the kernel. Then I
can address the security issues of userland programs themselves.
--
=================================================================
| Phil Howard - KA9WGN | Dallas | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/ |
=================================================================
------------------------------
Date: Thu, 01 Feb 2001 19:16:26 +0100
From: Arnaud Westenberg <[EMAIL PROTECTED]>
Subject: Re: filling /proc
Josef, Bernie,
Thanks its working now, the problem was indeed that the function
registering the subdir was refering to the same identifier through the
pointer.
Thanks.
Arnaud
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: How to compile with ROGUE WAVE library
Date: Thu, 1 Feb 2001 18:56:05 GMT
Reply-To: [EMAIL PROTECTED]
In <[EMAIL PROTECTED]> [EMAIL PROTECTED] (InterFan) writes:
>I compile my program with ROGUE WAVE library:
>g++ -I/home/qdcnaka/roguewave/workspaces/SOLARIS25/SUNPRO42/12s
>-I/home/qdcnaka/roguewave/workspaces/SOLARIS25/SUNPRO42/12s/include
> -g -DRWDEBUG=1 -DRW_THR_DEBUG -g -DRW_MULTI_THREAD -D_REENTRANT
>-o test test.cc /home/qdcnaka/roguewave/workspaces/SOLARIS25
>/SUNPRO42/12s/lib/libthr12s.a
>/home/qdcnaka/roguewave/workspaces/SOLARIS25/SUNPRO42/12s/lib/libtls12s.a
>-L/home/qdcnaka/roguewave/workspaces/SOLARIS25/SUNPRO42/12s/lib
>-lstd12s -lintl -lnsl
[link error deleted]
>why?
Because you are using a RogueWave version build for CC4.2 on Solaris
2.5, it seems to me. Recompile on Linux with g++.
HTH,
Uli
--
Dipl. Inf. Ulrich Teichert|e-mail: [EMAIL PROTECTED]
Stormweg 24 |listening to:Something Good To Go By(The Decibels)
24539 Neumuenster, Germany|Cheap Excitement (Stratford Mercenaries)
------------------------------
From: Andrew Daviel <[EMAIL PROTECTED]>
Subject: what is "wait_o" (wait_on??) state ?
Date: 1 Feb 2001 20:15:55 GMT
We have IMAP4rev1 2000.283 running under RedHat 7.0, with various
other things running on the system like sendmail, httpd, mysql etc.
but no shell users.
Recently we seem to get big peaks in system load (14 or so)
I noticed that there are several copies of imapd which "ps" reports
as being in a state of D (" uninterruptible sleep")
with WCHAN = "wait_o". (There are normally lots
of copies of imapd, but they are usually in sleep (S) state).
What is this, and why might it be happening ?
--
Andrew Daviel, TRIUMF, Canada
------------------------------
From: "Ken Whaley" <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux.development.apps,comp.os.linux.hardware,comp.os.linux.misc
Subject: Re: PCI bus access
Date: Thu, 1 Feb 2001 12:45:15 -0800
If you want a quick & dirty "map me my device" then just
do an mmap call on /dev/mem giving the physical range
that you want to map (you can find your device via "cat /proc/pci")
and using the returned virtual address as the base of your device's
memory range. This is a hack, but you asked for "the simplest way"
and that's what this is.
Note that the usual permissions on /dev/mem prevent all but root from
creating writeable maps on /dev/mem).
x86 note: This is assuming that you're in fact talking about a PCI
device's *memory* range, not an i/o port range.
x86 note: If you want any sort of decent write performance
(above about 30MB/sec) to PCI device memory space on PII's or
later then you'll have to write a kernel module and mark the appropriate
portions of your device's address space as USWC via the mtrr_add() function.
Beware: make sure you understand USWC before doing this, because memory
transactions to USWC memory are "weakly" ordered.
General Note: make sure you understand the memory ordering rules of your
host platform, this is especially crucial when accessing PCI device
addresses
that have side effects. Usual problems are: multiple writes to the same
address could be squashed by the processor, or writes can arrive at the
device in a different order than the order they were issued by the program.
Ken
"bjrosen" <[EMAIL PROTECTED]> wrote in message
news:955ggk$7fa$[EMAIL PROTECTED]...
> Is there anyway to do this without a driver? I'm trying to do the same
> thing for a hardware development diagnostic and I haven't been able to
> figure out which #includes and #defines are required to make ioremap
> work. I'm looking for the simplest way to get at PCI memory space.
>
> Thanks
>
> Josh
>
>
> In article <[EMAIL PROTECTED]>,
> Arne Driescher <[EMAIL PROTECTED]> wrote:
> > David Florez wrote:
> > >
> > > Hi All,
> > > Does anybody know if there is a way of mapping
> > > the physical PCI bus addresses into user memory
> > > space (being user root if needed)?
> > >
> > > I need to write an application that will be
> > > accessing the PCI bus VERY often. The only thing
> > > I can think of is adding a module to the kernel
> > > (device driver) that maps the PCI bus to kernel
> > > linear space ( by calling ioremap() ) and
> > > therefore the user app would have to issue a
> > > system call to request a PCI bus data transaction
> > > to the device driver. The idea would be finding a
> > > way of getting rid of these overkilling system
> > > calls.
> > The trick is called mmap. This means you have to write
> > a device driver (module) that implements the mmap system call.
> > Basically it works like:
> > 1) The user uses address=mmap(FileHandle,some parameter ..) to
> > get an address where the mem is mapped.
> > 2) The request is routed to your driver and used to setup
> > some memory mapping.
> >
> > Good luck,
> >
> > Arne
> >
>
>
> Sent via Deja.com
> http://www.deja.com/
------------------------------
From: "Ken Wilson" <[EMAIL PROTECTED]>
Subject: mount() not update mtab
Date: Thu, 1 Feb 2001 13:17:18 -0800
Hi All,
I'm running Red Hat 6.2 with GNOME. My little C program mounts a window
file system
partition using the library call mount(my_dev, "/mnt/my_dir", "vfat",
MS_BGC_VAL | MS_RDONLY, 0).
Then it opens that directory with opendir(my_dir), and reads all contents
with readdir(). It closedir()
but leaves the partition mounted. I observe 2 things:
1. /etc/mtab does not get updated to reflect this partition is mounted.
mount with no arguments
at the shell does not show this partition either even though I can read this
partition "/mnt/my_dir"
2. The system hangs after a little while. Before it hangs, the harddrive
LED blinks and harddrive
makes noises indicating that it is accessing. Don't know it is read or
written to.
Any idea why such behaviors?
------------------------------
From: [EMAIL PROTECTED] (Trevor Hemsley)
Subject: Re: 2.4.1pre and 2.4.0ac problem: __buggy_fxsr_alignment undefined
Date: 1 Feb 2001 22:23:15 GMT
On Thu, 1 Feb 2001 11:23:25, [EMAIL PROTECTED] (J³rgen
Koslowski) wrote:
> Trevor Hemsley ([EMAIL PROTECTED]) wrote:
>
> : That bit of code is #ifdef'ed dependent on you specifying your
> : processor type correctly. You haven't. You've left it as the default
> : of P-III.
>
> Thanks for the reply. I think my configuration was set to 586, and then
> I tried pentium classic, but I'll check this again.
There've also been some posts on the linux-kernel mailing list about
this and they seem to have been resolved by using a different
compiler... apparently gcc 2.95.3 does not work but 2.95.2 does (I
think I got that the right way around).
--
Trevor Hemsley, Brighton, UK.
[EMAIL PROTECTED]
------------------------------
From: Andrew Daviel <[EMAIL PROTECTED]>
Subject: Re: what is "wait_o" (wait_on??) state ?
Date: 1 Feb 2001 23:56:49 GMT
Andrew Daviel <[EMAIL PROTECTED]> wrote:
: Recently we seem to get big peaks in system load (14 or so)
: I noticed that there are several copies of imapd which "ps" reports
: as being in a state of D (" uninterruptible sleep")
: with WCHAN = "wait_o". (There are normally lots
: of copies of imapd, but they are usually in sleep (S) state).
After rebuilding "ps", which seems to truncate the 20-something
character names from System.map to 6 chars, I can see that it's
mostly "wait_on_buffer" with a few wait_on_page, get_request_wait
This on RedHat 7 with 2.2.16-22 kernel, single CPU
Still like to know what's happening
Andrew
------------------------------
From: Jeff Lacki <[EMAIL PROTECTED]>
Subject: increase number of processes?
Date: 2 Feb 2001 00:42:27 GMT
We are working on a RH 6.2 x86 system trying to run
up to 500 server connections on a single box.
We are running into a limit of about 158 right now.
Ive changed linux/tasks.h NR_TASKS to 1024 with no
effect as well as trying 3000 with no effect.
(after rebuilding the kernel of course)
What am I doing wrong? We are also wondering what the
maximum number of socket connections on a 'standard'
RH 6.2 box are and if we need to increase that value as
well.
Any help is much appreciated.
Thanks
Jeff
------------------------------
From: [EMAIL PROTECTED]
Reply-to: [EMAIL PROTECTED]
Subject: Re: Linux device driver (kernel module) written in C++
Date: Fri, 02 Feb 2001 01:29:11 GMT
>>>>> "az0te" == az0te <[EMAIL PROTECTED]> writes:
az0te> Hi, Is this possible to write device driver or kennel module
az0te> using C++? I digged all the Sourceforge and many other
az0te> resources but didn't find any driver/kernel module written in
az0te> C++. I'll very appreciate if someone will provide me with
az0te> answer or link to exsisting project.
It is theoretically possible, but involves a number of challenges, in
roughly increasing order of dauntingness:
* Your module will certainly never be included in the "official"
kernel stream, as the developers of Linux use C, not C++.
* You will need to work around conflicts whereby the standard Linux
kernel headers use C++ keywords for C data structures.
* C++ requires considerable runtime support, including an exception
handler and support for the "new" operator. (And vtables, and RTTI,
and such...) You will need to create your own support for whatever
such aspects that you require.
* Once you have worked around the preceding three challenges, you're
going to be working with some tiny subset of C++ which is likely to
beg the question "Why bother?"
The challenges are significant enough, and you'll get _no_ help from
the people that do serious work on the kernel, so the usual result is
that the would-be "C++ kernel hacker" chooses from two options:
-> Give up altogether, or
-> Give up on using C++, and write the extension in C just like
everyone else does.
You're likely to have best success by deciding to write the extension
in C.
--
(reverse (concatenate 'string "gro.mca@" "enworbbc"))
http://vip.hex.net/~cbbrowne/rdbms.html
For example, if errors are detected in one of the disk drives, the system
will allow read-only access to memory until the problem is resolved. This,
PE claimed, prohibits a damaged disk drive from entering errors into the
system.
-- Computerworld 8 Nov 82 page 4.
------------------------------
** 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
******************************