Linux-Development-Sys Digest #569, Volume #8 Thu, 15 Mar 01 21:13:08 EST
Contents:
Re: Processor ID (Kasper Dupont)
Re: Maximum filename size (Kasper Dupont)
Re: dynamic linking again (Daniel Koerner)
Re: Maximum filename size
Re: missing definitions (linker problem) (Nix)
Re: Maximum filename size ("Amir Shahindoust")
Re: Can linux be trusted? (Peter da Silva)
Re: dynamic linking again (Daniel Koerner)
cvs modules vs. directories ("Bill Alexander")
Select blocking all threads... (Matt Woodyard)
Re: cvs modules vs. directories (Kaz Kylheku)
Re: Select blocking all threads... (Kaz Kylheku)
Re: Select blocking all threads... (Matt Woodyard)
Re: Select blocking all threads... (Kaz Kylheku)
Re: Can linux be trusted? ("Trevor L. Jackson, III")
Re: Allocation of task_struct structure (Alan Donovan)
Re: Select blocking all threads... (Matt Woodyard)
Re: system call interface to insmod ([EMAIL PROTECTED])
Re: Select blocking all threads... ([EMAIL PROTECTED])
----------------------------------------------------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.hardware
Subject: Re: Processor ID
Date: Thu, 15 Mar 2001 18:54:08 +0000
[EMAIL PROTECTED] wrote:
>
> In article <[EMAIL PROTECTED]>,
> Kasper Dupont <[EMAIL PROTECTED]> wrote:
>
> >MAC addresses of ethernet cards on the other
> >hand are sent over the network every time you
> >send a packet.
>
> No, MAC addresses are sent only over your local
> network *segment*.
Correct, but that is much longer than the CPUid
which is not sent anywhere.
>
> >Can anybody explain WHY people are so unhappy
> >about the CPUid?
>
> One example: web browsers could start sending the id
> as part of the http protocol which would increase
> the ability of web sites to track users.
The http protocol does not specify that the
client sends a CPUid.
Oh sure the browser could send a CPUid to a
server. But remember that the browser could also
send your MAC address to the server, together
with a copy of the 5 last emails you wrote, the
10 most frequently used names form your address
book, a listing of the last 20 transactions from
your homebanking system, your private RSA key,
and whatever other information you have stored
on your computer.
I have never heard about a browser doing any of
this, and I doubt anybody would be using it if
it existed.
So if you want to be paranoid look on the
software instead of some serial number on your
CPU, there are much worse thing software could
do.
>
> --
> http://www.spinics.net/linux/
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Maximum filename size
Date: Thu, 15 Mar 2001 18:57:11 +0000
Amir Shahindoust wrote:
>
> Hi,
>
> I'm new to Linux. I need to know what is the maximum number of characters
> that a full path name can have in Linux. can anybody tell me please.
>
> Thanks!
>
> Amir Shahindoust
> [EMAIL PROTECTED]
255 chars pr. component,
4094 in the full path (+/-2 I'm not sure about the exact limit)
--
Kasper Dupont
------------------------------
From: Daniel Koerner <[EMAIL PROTECTED]>
Subject: Re: dynamic linking again
Date: Thu, 15 Mar 2001 20:29:10 +0100
In article <[EMAIL PROTECTED]>, Samuel Hocevar
<[EMAIL PROTECTED]> wrote:
> > Is that tue that dynamic libraries are linked against "sublibraries" ?
> Yes, unless they are statically linked. They are most of the time at
> least linked against ld-linux (which itself is statically linked) and
> the libc.
What a mess ! Chaining all these references :-S You can really get
definition problems what actually the linker itself is. What I'm
concerned I thought that the linker is the program that finally
resolves symbols to memory references. Which expressions would you
prefer to handle this ambiguity ?
> > Or is all linking the job of the main executable ?
>
> More precisely, it's the job of ld-linux, the dynamic linker, to
> resolve symbols between the libraries and the main executable. It also
> loads what you call "sublibraries" when needed.
>
> Note that if an executable is linked against libc and libfoo, then
> libfoo doesn't technically need to be linked against libc because it
> will be loaded nonetheless. But it's a good habit to always link dynamic
> libraries against libc and all the other libraries they may require.
ok. Are there C++ programs which do NOT need libstdc++ ? (My next
question while porting a project)
Daniel
------------------------------
From: [EMAIL PROTECTED] ()
Subject: Re: Maximum filename size
Date: Thu, 15 Mar 2001 19:28:52 -0000
In article <TK7s6.655$[EMAIL PROTECTED]>,
Amir Shahindoust <[EMAIL PROTECTED]> wrote:
>I'm new to Linux. I need to know what is the maximum number of characters
>that a full path name can have in Linux. can anybody tell me please.
You can get those values from limits.h. See the glibc documentation:
http://www.gnu.org/manual/glibc-2.0.6/html_node/libc_toc.html
--
http://www.spinics.net/linux/
------------------------------
From: Nix <$}xinix{[email protected]>
Subject: Re: missing definitions (linker problem)
Date: 15 Mar 2001 20:02:32 +0000
On Tue, 13 Mar 2001, Daniel Koerner spake:
> Hi folks.
>
> Anyone heard about functions like:
>
> undefined reference to `__check_eh_spec'
> undefined reference to `__start_cp_handler'
> undefined reference to `__eh_alloc'
These functions are in the libgcc of GCC-2.8.x only; they're part of an
abortive exception handling scheme that has died the death.
It looks horribly like you are linking C++ objects generated with
GCC-2.8.x with the GCC driver for some other version of GCC. You can't
do that; recompile the C++ objects with the other version (which I hope
is 2.95.2, or at least egcs-{something}.)
> (taken from my linker output - by the way: doing crossompile)
Are all the parts of your cross-compiler from the same version of GCC?
(I hope so.)
What does `gcc -print-libgcc-file-name' print?
--
`I wish the garbage collection service for my apartment was half as aggressive
as the one in GNU ld.' --- Phil Edwards
------------------------------
From: "Amir Shahindoust" <[EMAIL PROTECTED]>
Subject: Re: Maximum filename size
Date: Thu, 15 Mar 2001 20:12:40 GMT
Thanks
"Kasper Dupont" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Amir Shahindoust wrote:
> >
> > Hi,
> >
> > I'm new to Linux. I need to know what is the maximum number of
characters
> > that a full path name can have in Linux. can anybody tell me please.
> >
> > Thanks!
> >
> > Amir Shahindoust
> > [EMAIL PROTECTED]
>
> 255 chars pr. component,
> 4094 in the full path (+/-2 I'm not sure about the exact limit)
>
> --
> Kasper Dupont
------------------------------
From: [EMAIL PROTECTED] (Peter da Silva)
Crossposted-To:
comp.lang.c,comp.os.linux.development.apps,comp.sys.be.programmer,comp.sys.mac.programmer.misc,comp.unix.bsd.freebsd.misc,comp.unix.bsd.misc,gnu.gcc
Subject: Re: Can linux be trusted?
Date: 15 Mar 2001 20:10:22 GMT
In article <oR6s6.163$[EMAIL PROTECTED]>,
Dave Korn <[EMAIL PROTECTED]> wrote:
> Dik T. Winter wrote in message ...
> > > How do you think 0.3 is represented in IEEE floating point?
> >That is irrelevant.
> Only if you have an infinite amount of memory in your computer.
Or if we're talking about how you represent 3.0 in IEEE floating point.
--
`-_-' In hoc signo hack, Peter da Silva.
'U` "A well-rounded geek should be able to geek about anything."
-- [EMAIL PROTECTED]
Disclaimer: WWFD?
------------------------------
From: Daniel Koerner <[EMAIL PROTECTED]>
Subject: Re: dynamic linking again
Date: Thu, 15 Mar 2001 21:38:47 +0100
In article <[EMAIL PROTECTED]>, I asked:
> ok. Are there C++ programs which do NOT need libstdc++ ? (My next
> question while porting a project)
Well - obviously ! (Section 2.2 of the libstdc++ FAQ)
Daniel
---
Want a joke ? Call 0800-672 !
------------------------------
From: "Bill Alexander" <[EMAIL PROTECTED]>
Subject: cvs modules vs. directories
Date: Thu, 15 Mar 2001 21:56:40 GMT
Hi.
We are slowly but surely migrating our development efforts away from Windows
onto a UNIX/Linux platform. The first step is to start using UNIX like
tools. We are using WinCVS to as our library tool to develop some driver
code and I was wondering if it is best to orgainized a multi-directory
project into multiple modules, or just one module with multiple directoies.
Since we all VSS users, we are a getting used to the CVS way of doing things
(although we do find it hard to think of a "check out" as not having
exclusive write access to a file -- that will pass in time, I'm sure).
Bill
------------------------------
Subject: Select blocking all threads...
From: Matt Woodyard <[EMAIL PROTECTED]>
Date: Thu, 15 Mar 2001 22:29:05 GMT
So I've been toying with pthreads on linux 2.2.x recently and I have run
across something I'd like clarified. Should select block all threads? (The
answer is no by the way). Why does it do so on linux. Are there any socket
options I need to set to cause it to only block within a thread or am I
going to have to get my solaris box on the task? Any Information would be
appreciated.
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: cvs modules vs. directories
Reply-To: [EMAIL PROTECTED]
Date: Thu, 15 Mar 2001 23:10:14 GMT
On Thu, 15 Mar 2001 21:56:40 GMT, Bill Alexander
<[EMAIL PROTECTED]> wrote:
>Hi.
>
>We are slowly but surely migrating our development efforts away from Windows
>onto a UNIX/Linux platform.
Rah!
> The first step is to start using UNIX like
>tools. We are using WinCVS to as our library tool to develop some driver
>code and I was wondering if it is best to orgainized a multi-directory
>project into multiple modules, or just one module with multiple directoies.
Your call. Most of the time, the net effect is about the same. Modules
can make it possible to share components; to assemble a project out of
existing modules and some new ones. Repository-side symbolic links
among directories can do the same thing, but there is no protocol for
creating them. You have to go into the repository and make them by
hand. (And of course your CVS server has to be on an OS that supports
symbolic links, and they have to be stored properly in your backups,
needless to say).
On the downside, CVS has a peculiarities related to modules. Firstly,
the repository-side pathnames peek through when you use ``cvs rdiff''
to make a patch. E.g. say your module is
mymodule top &foo &bar
on checkout, the modules top, foo and bar are arranged into
the directory structure:
mymodule
mymodule/foo
mymodule/bar
but if you use cvs rdiff to make a patch over files inside mymodule/foo
and mymodule/bar, they will have the pathnames foo/ and bar/, and the
diff for files in mymodule will have the pathname top/. In essence,
the patch is broken in the sense that it can only be applied straight
by someone who has a flat working copies of the modules, not a copy
formed by exporting through the ``mymodule'' alias.
Another aggravation is that when new modules are added under top
level module, people who have working copies of that module cannot get
the new additions with ``cvs update -d'', whereas if new subdirectories
were added, these would be picked up without a problem. The update
operation completely ignores the modules file, which is only processed
on checkout and export. There are various workarounds, such as
explicitly checking out out the missing items into the appropriate
place in your working tree.
See the gnu.cvs.help newsgroup for CVS help or advice, not
comp.os.linux.development.system!
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Select blocking all threads...
Reply-To: [EMAIL PROTECTED]
Date: Thu, 15 Mar 2001 23:11:12 GMT
On Thu, 15 Mar 2001 22:29:05 GMT, Matt Woodyard <[EMAIL PROTECTED]> wrote:
>So I've been toying with pthreads on linux 2.2.x recently and I have run
>across something I'd like clarified. Should select block all threads? (The
>answer is no by the way). Why does it do so on linux.
It doesn't.
------------------------------
Subject: Re: Select blocking all threads...
From: Matt Woodyard <[EMAIL PROTECTED]>
Date: Thu, 15 Mar 2001 23:31:33 GMT
On 3/15/01 6:11 PM, in article [EMAIL PROTECTED], "Kaz
Kylheku" <[EMAIL PROTECTED]> wrote:
> On Thu, 15 Mar 2001 22:29:05 GMT, Matt Woodyard <[EMAIL PROTECTED]> wrote:
>> So I've been toying with pthreads on linux 2.2.x recently and I have run
>> across something I'd like clarified. Should select block all threads? (The
>> answer is no by the way). Why does it do so on linux.
>
> It doesn't.
Then what am I doing to cause it to? Do I need to setsockopts a particular
way?
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Select blocking all threads...
Reply-To: [EMAIL PROTECTED]
Date: Thu, 15 Mar 2001 23:44:34 GMT
On Thu, 15 Mar 2001 23:31:33 GMT, Matt Woodyard <[EMAIL PROTECTED]> wrote:
>On 3/15/01 6:11 PM, in article [EMAIL PROTECTED], "Kaz
>Kylheku" <[EMAIL PROTECTED]> wrote:
>
>> On Thu, 15 Mar 2001 22:29:05 GMT, Matt Woodyard <[EMAIL PROTECTED]> wrote:
>>> So I've been toying with pthreads on linux 2.2.x recently and I have run
>>> across something I'd like clarified. Should select block all threads? (The
>>> answer is no by the way). Why does it do so on linux.
>>
>> It doesn't.
>Then what am I doing to cause it to? Do I need to setsockopts a particular
Nothing you can do can possibly cause a select() call in one task to
magically suspend others. You are probably somehow misinterpreting the
behavior of whatever program you think is doing this.
------------------------------
From: "Trevor L. Jackson, III" <[EMAIL PROTECTED]>
Crossposted-To:
comp.lang.c,comp.os.linux.development.apps,comp.sys.be.programmer,comp.sys.mac.programmer.misc,comp.unix.bsd.freebsd.misc,comp.unix.bsd.misc,gnu.gcc,linux.dev.gcc
Subject: Re: Can linux be trusted?
Date: Fri, 16 Mar 2001 00:26:57 GMT
Curtis Schofield wrote:
> In article <[EMAIL PROTECTED]>, Stefaan A Eeckels wrote:
> >In article <[EMAIL PROTECTED]>,
> > James Richard Tyrer <[EMAIL PROTECTED]> writes:
> >> Stefaan A Eeckels wrote:
> >>
> >>> Agreed. Division by zero should yield the appropriate error.
> >>
> >> Note that with the IEEE numeric standard that floating point division i
> >> by 0 is legal since the result is true infinity not just the standard
> >> fix up which is the largest number that can be represented.
> >
> >I'm not an expert on IEEE numeric standards -- has infinity a
> >representation or is it just NaN?
> >
>
> infinity has a representation as well.
>
Beware that the value called infinity acts more like overflow than infinity.
In a similar vein the positive and negative zeros are mixtures of positive and
negative underflow with zero. If the IEEE 754 number line were renamed
appropriately there would be a lot less confusion.
------------------------------
From: Alan Donovan <[EMAIL PROTECTED]>
Subject: Re: Allocation of task_struct structure
Date: Thu, 15 Mar 2001 16:49:32 +0000
Julien Cavoizy wrote:
> I'd like to add some new things in the process task_struct structure but
> i cannot find where everything in the task struct are allocated.
>
> In which .c file it is ?
It's the declaration of a struct, used in many .c files, so it's
declared in a header file. Specifically:
#include <linux/sched.h>
find(1) and grep(1) are your friends.
> a second question : Which size have a memory page ? (on an i586
> processor)
It's PAGE_SIZE bytes. Which happens to be 4096 at the moment on
i386 derivatives.
HTH
alan
--
Alan Donovan, ARM Research, ARM Ltd. [EMAIL PROTECTED]
------------------------------
Subject: Re: Select blocking all threads...
From: Matt Woodyard <[EMAIL PROTECTED]>
Date: Fri, 16 Mar 2001 01:02:17 GMT
On 3/15/01 6:44 PM, in article [EMAIL PROTECTED], "Kaz
Kylheku" <[EMAIL PROTECTED]> wrote:
> On Thu, 15 Mar 2001 23:31:33 GMT, Matt Woodyard <[EMAIL PROTECTED]>
> wrote:
>> On 3/15/01 6:11 PM, in article [EMAIL PROTECTED], "Kaz
>> Kylheku" <[EMAIL PROTECTED]> wrote:
>>
>>> On Thu, 15 Mar 2001 22:29:05 GMT, Matt Woodyard <[EMAIL PROTECTED]> wrote:
>>>> So I've been toying with pthreads on linux 2.2.x recently and I have run
>>>> across something I'd like clarified. Should select block all threads? (The
>>>> answer is no by the way). Why does it do so on linux.
>>>
>>> It doesn't.
>> Then what am I doing to cause it to? Do I need to setsockopts a particular
>
> Nothing you can do can possibly cause a select() call in one task to
> magically suspend others. You are probably somehow misinterpreting the
> behavior of whatever program you think is doing this.
I have a program that sends icmp requests in separate threads. Something is
blocking because the pings (as evidenced by tcpdump) are not being spit out
concurrently. For example lets say machine 1 is down, the next machine is
not tested for 5 secs (the select wait time amount). But if the machine is
up then the pings appear more concurrent. Whats the deal? If select is
acctually behaving as you say.
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: system call interface to insmod
Date: Fri, 16 Mar 2001 01:24:04 -0000
On Tue, 13 Mar 2001 23:01:39 GMT Joseph A. Knapka <[EMAIL PROTECTED]> wrote:
| Norm Dresner wrote:
|>
|> Have you tried it. Even if it's not allowed, you're not likely to destroy
|> the computer.
|
| He's asking *if* there even *is* such an API. Hard to experimentally
| call an API when you have no idea what its interface looks like.
|
| Jothi, you can always do
|
| system("modprobe my_module");
Or better yet:
strace modprobe my_module
and find out what the syscall is.
| HTH,
|
| -- Joe
|
|> If you're going to do systems programming, you've got to learn to
|> experiment.
|>
|> Norm
|>
|> Jothi P Neelamegam <[EMAIL PROTECTED]> wrote in message
|> news:[EMAIL PROTECTED]...
|> > Hi All,
|> >
|> > Is there a system call interface to insmod - i.e. can I insmod a module
|> > from inside a c program, rather than from console.
|> >
|> > Thanks
|> > Jothi
|> >
|> >
| -- Joe Knapka
| "It was just a maddened crocodile hidden in a flower bed. It could
| have happened to anyone." -- Pratchett
--
=================================================================
| Phil Howard - KA9WGN | Dallas | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/ |
=================================================================
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Select blocking all threads...
Date: Fri, 16 Mar 2001 01:37:04 -0000
On Fri, 16 Mar 2001 01:02:17 GMT Matt Woodyard <[EMAIL PROTECTED]> wrote:
| I have a program that sends icmp requests in separate threads. Something is
| blocking because the pings (as evidenced by tcpdump) are not being spit out
| concurrently. For example lets say machine 1 is down, the next machine is
| not tested for 5 secs (the select wait time amount). But if the machine is
| up then the pings appear more concurrent. Whats the deal? If select is
| acctually behaving as you say.
Source code might help.
If there is nothing coming in then of course select() should be blocked
until the timeout. Is the same thread sending the ping as receiving?
If so, then of course it won't be awake to send another until one comes
back or the timer pops.
I'm not sure why you even need threads for this. If you are doing
nonblocked I/O you could:
1. select for every fd you are waiting for a ping reply on
2. set your timer to the difference in time to the next time
point you want to send pings on
If each thread is in select with a timeout, how do you even know that
they are all going to be waking at the same time? As soon as any
pings start to come back, if you wake up then, send another ping,
and go back to sleep for the same 5 seconds, each thread is going
to get into different time phases based on those roundtrip times.
The way I do this is to get the current time from gettimeofday()
and calculate when the next point in time is that I want to do
something, calculate the difference until then, and use that for
the select timeout (actually, I'm using poll now days, but the
same concept applies). I can get my pings to come out right at
a specific interval with nothing more than a little clock jitter
instead of accumulated time shifting.
--
=================================================================
| Phil Howard - KA9WGN | Dallas | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/ |
=================================================================
------------------------------
** 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
******************************