Linux-Development-Sys Digest #780, Volume #7     Mon, 17 Apr 00 05:13:13 EDT

Contents:
  Re: MPROTECT ("Arthur H. Gold")
  Re: MS caught breaking web sites (David Steuber)
  Re: MS caught breaking web sites (David Steuber)
  Re: cli() & sti()... (Badrinath Venkatachari)
  Re: THE SKY IS FALLING! THE SKY IS FALLING! Was (Re: MICROSOFT IT THRU!  MICROSOFT 
IS THRU! ("2 + 2")
  Re: high resolution timers ??? (nilesh patel)
  Re: Win32 Drivers running under Linux (Klamer Schutte)
  RE: Where are the environment variables?  (HPBudlong)
  How do I make a program run on localhost:200 ("Peet Grobler")
  Re: newbie (David T. Blake)
  Re: Put the lib into the libc?  (was: Re: Simple but...) (Nate Eldredge)
  Locking user space pointers in the kernel. (liran)
  Re: Simple but confusing C code query... ([EMAIL PROTECTED])
  Compiling glibc-2.1.3 (W R Carr)
  Network Protocol at Kernel Space ([EMAIL PROTECTED])

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

Date: Sun, 16 Apr 2000 22:21:25 -0500
From: "Arthur H. Gold" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: MPROTECT

David wrote:
> 
> I can unmap code and data  pages, but if I change their access
> permisions I enter into defunct state.
That can certainly happen in a case where you can't get to code you'd
need to run. It would throw a SIGSEGV, look for handler code to deal
with the SIGSEGV, throw another one...and ultimately blow out the stack.
> 
> strace no give me information. Simply say nothing. More, mprotect
> function does not appear as a system call (like wait or fork).
This sounds strange. You'll have to tell us more in order to get help (I
don't think there's a clairvoyant among us).
> 
> Any Idea?
> 
> thaks in advance,
> DTM

HTH,
--ag

-- 
Artie Gold, Austin, TX  (finger the cs.utexas.edu account for more info)
mailto:[EMAIL PROTECTED] or mailto:[EMAIL PROTECTED]
--
A: Look for a lawyer who speaks Aramaic...about trademark infringement.

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

Crossposted-To: 
comp.os.linux.advocacy,comp.os.ms-windows.advocacy,comp.os.ms-windows.nt.advocacy,comp.os.linux.networking,comp.os.linux.security,comp.os.ms-windows.networking.tcp-ip,alt.conspiracy.area51
Subject: Re: MS caught breaking web sites
From: David Steuber <[EMAIL PROTECTED]>
Date: Mon, 17 Apr 2000 04:00:03 GMT

[EMAIL PROTECTED] (Robert Hampf) writes:

' Boris <[EMAIL PROTECTED]> h=E9lt =FEessu fram:
' : Can you post your BS on linux newsgroups. That's were it belongs righ=
t. Just fuck off NT
' : newsgroups you idiot.
' =

' Why?  It hasn't got anything to do with Linux.

It also appears to have no relevance to linux networking.  In fact,
the title is a lie.

Now that I look at the headers, I'm hard pressed to find any place
that this belongs.   Setting followups to something appropriate.

-- =

David Steuber   |   Hi!  My name is David Steuber, and I am
NRA Member      |   a hoploholic.

http://www.packetphone.org/

A great many people think they are thinking when they are merely
rearranging their prejudices.
                -- William James

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

Crossposted-To: 
comp.os.linux.advocacy,comp.os.ms-windows.advocacy,comp.os.ms-windows.nt.advocacy,comp.os.linux.networking,comp.os.linux.security,comp.os.ms-windows.networking.tcp-ip,alt.conspiracy.area51
Subject: Re: MS caught breaking web sites
From: David Steuber <[EMAIL PROTECTED]>
Date: Mon, 17 Apr 2000 04:00:02 GMT

laugh <[EMAIL PROTECTED]> writes:

' Robert,
' 
'     What can I say? Microsoft does so many evil things that the story seemed
' credible. Have to admit to a certain predisposition towards belief in this area.

I'm that way too.

'     Well, I can take some comfort from the fact that Microsoft stock is in
' freefall,
' and Mr. Bill  has lost tens of billions of dollars of net worth.

Pocket change for him.
' 
'     And with Linux growing to 35% of all servers and 10% of desktops this year
' alone

Do you have a citation for this?  I would like to see it.  I don't
think Apple even has 10% of the desktops.

'      Go ahead and call me a fudster if that eases the pain, just don't put any
' money in
' Microsoft stock....No, wait, I take that back, please put ALL your money in MS
' stock....

I would love to short it, but I don't have the credit.

Then again, the 50 day moving average has just crossed the 200 day
moving average in a downward trend.  The stock is near its 52 week
low.  I think I would just stay away from that issue if I had some
real money to play with.

-- 
David Steuber   |   Hi!  My name is David Steuber, and I am
NRA Member      |   a hoploholic.

http://www.packetphone.org/

Preudhomme's Law of Window Cleaning:
        It's on the other side.

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

From: Badrinath Venkatachari <[EMAIL PROTECTED]>
Subject: Re: cli() & sti()...
Date: Mon, 17 Apr 2000 00:22:50 -0700

Hi,
 Thanks for the detailed explanation. It got some of my thoughts clear. For now,  I
am on a single P machine. What I am trying to do is to Q up read/reada requests as
they come in, have the process that issued the requests sleep, have a timer-driven
function dQ the requests at regular intervals  and issue make_requests on behalf of
the original process and wake up the original process that slept after its request
got Qed.

 In my mechanism, the process sleeps (till its request is satisfied) by invoking
sleep_on() which I assume will pre-empt the process by invoking the scheduler. Is
this correct ?? Actually, I want to be able to pre-empt the process when it sleeps
so that I can Qup more requests from other processes while I wait for the
timer-driven function to kick off and dQ some of the requests to call
make_request().

Also I want to imitate "dropping" of some or all requests made by an application at
the disk scheduler. Is it ok if I just returned without issuing make_request() or
by issuing make_requests for lesser no. of blocks than requested?? Are there any
other issues that I have to take care of ?? For now I would want to assume that I
am not at the end of any file...so that a return value of 0 or anything less than
the requested no. of bytes unambigously means some/all  requests were not serviced
by the disk scheduler and that they were dropped.

thanks in advance

regards
badri

Kaz Kylheku wrote:

> On Sun, 16 Apr 2000 19:38:20 -0700, Badrinath Venkatachari <[EMAIL PROTECTED]>
> wrote:
> >Hi,
> > If I happen to have this pair cli() to disable interrupts and sti() to
> >enable interrupts, then can it be assumed that the process cannot be
> >preempted while executing code in between them ???
> >
> >cli()
> >
> >/* code comes here */
> >
> >sti()
>
> First, let's take a look at your terminology. A process executing kernel code
> already cannot be preempted. So if you are looking for a way to not have your
> process preempted the way you assure this is by not calling anything that will
> invoke the scheduler.  So long as you don't call the scheduler, you aren't
> preempted.
>
> The lack of preemptiveness does not assure mutual exclusion against other
> processes under SMP, because processes can come into the kernel on another
> processor. And even on uP, non-preemptiveness doesn't protect against interrupt
> service routines. You should use spinlocks to protect against other processors.
>
> Prior to SMP, cli() and sti() (or alternately, save_flags(), cli() and
> restore_flags()) were the primary mechanism int he kernel to assure exclusion
> against anything: for example, between a process and an interrupt service
> routine. However, under SMP, this mechanism breaks down because disabling
> interrupts on the local processor does not keep out other processors.
>
> What happens is that cli() and sti() are emulated in a bletcherous way on SMP.
> The point I'm trying to get to is that cli() and sti() are obsolete, legacy
> operations---do not use them! Use spinlocks. The operations spin_lock_irqsave()
> and spin_unlock_irqrestore() work correclty under SMP and on a uP kernel they
> collapse into save_flags(); cli() and restore_flags().
>
> For protecting shared data from concurrent access by two processes running on
> separate processors, if no interrupt service routines or bottom half handlers
> are involved, you can use the variants of spinlocks that do not disable and
> restore interrupts.
>
> For synchronization among processes that requires scheduling delays, you
> can use semaphores or wait queues.
>
> --
> #exclude <windows.h>


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

From: "2 + 2" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.advocacy,comp.os.ms-windows.advocacy,comp.os.ms-windows.nt.advocacy,comp.os.linux.networking,comp.os.linux.security,comp.os.ms-windows.networking.tcp-ip,alt.conspiracy.area51
Subject: Re: THE SKY IS FALLING! THE SKY IS FALLING! Was (Re: MICROSOFT IT THRU!  
MICROSOFT IS THRU!
Date: Mon, 17 Apr 2000 01:47:39 -0400

Oops, I didn't mean to make an accidental comment on the stock market.

Sorry.

2 + 2


2 + 2 <[EMAIL PROTECTED]> wrote in message
<8db0g2$gt$[EMAIL PROTECTED]>...
>THE SKY IS FALLING! THE SKY IS FALLING!
>
>Uhmmmm . . .
>
>Am I repeating myself?
>
>No matter.
>
>THE SKY IS FALLING! THE SKY IS FALLING!
>
>Ahhhh. BTW, this is not directed at those who have LOST MONEY in the stock
>market.
>
>And please don't jump.
>
>This is more in the astronomical news.
>
>Or the aerospace news. For the defense contractors who might get the
>contract to PROP the sky up.
>
>2 + 2
>
>
>Charlie Ebert wrote in message <[EMAIL PROTECTED]>...
>>MICROSOFT IS THRU!
>>MICROSOFT IS THRU!
>>MICROSOFT IS THRU!
>>MICROSOFT IS THRU!
>>MICROSOFT IS THRU!
>>MICROSOFT IS THRU!
>>
>>
>>TELL EVERYONE!
>>
>>Microsoft has been forced to admit they created secret back doors to every
>>computer
>>system they sold out the DOOR!
>>
>>This MEANS to the STUPID and IGNORANT that the U.S. Government has ACCESS
>>to every MS equipped machine in the world and therefore they
>>CAN NOT BE TRUSTED ANYMORE!
>>
>>Charlie
>>
>>
>
>



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

From: nilesh patel <[EMAIL PROTECTED]>
Subject: Re: high resolution timers ???
Date: Mon, 17 Apr 2000 11:31:09 +0530

Robert Redelmeier wrote:

> Badrinath Venkatachari wrote:
> >
> > Hi,
> >  I have this mechanism in the kernel where I Q up read requests when
> > they
> > come in and make the processes that issued the requests sleep on a
> > wait_queue. Then the idea is to have a timer driven function dQ them at
> > regular intervals, issue the requests dQed and wake up the processes
> > waiting for the request servicing.
> >
> > Currently, I have this timer getting woken up at millisecond precision
> > (basically using jiffies with add_timer()). I would however, like to use
> > a
> > higher resolution timer for this purpose (microseconds). Is there one
> > available ???
>
> Yes, on the PC there is a Programmable Interrupt Timer living
> on certain IO ports that you can use to generate interrupts.
> IIRC, it runs at 1.19 MHz.  In general, though, I would think
> the easiest thing is just to adjust HZ from the x86 default of
> 100 up to 1000 or even 10,000.  Alphas run at 1000, so software
> should be variable HZ aware.
>
> -- Robert

It is not advisable to touch the HZ value , because it is already tuned to
have optimum performane . By increasing them the system's responsiveness
would increase but will cost you on throghput .

Nilesh



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

From: [EMAIL PROTECTED] (Klamer Schutte)
Subject: Re: Win32 Drivers running under Linux
Date: 17 Apr 2000 06:53:00 GMT

In article <[EMAIL PROTECTED]>, Alan Donovan wrote:
>David Findlay wrote:

>> would
>> it be possible to use Wine to run Win32 drivers under Linux. It might not be
>> the best thing to do, but it would avoid hardware non-compatablility issues.
>
>Wine allows you to run unmodified Win 3.1 / Win32 binaries in usermode
>in Linux. That this is at all possible is itself quite surprising.
>However it does not emulate any of the various Windows driver models. To
>do so would be impossibly hard work and also of limited use as driver
>code must be both fast and reliable and in general, emulators are not.

Wine is not an emulator -- it is a set of libraries which allow execution
of Win code in a UNIX environment, together with some interception
hooks. However, it is a USER level set of libraries; if you can have
FreeBSD running Linux ELF programs that does not mean you can use
Linux kernel modules in FreeBSD.

I can see no real problems in using Win 32 drivers in a Linux environment,
but note that:
- it will require a lot of effort, as the whole Win 32 kernel 
  infrastructure should be implemented; and this could be quite different
  from 'standard' Linux kernel infrastructure!
- this will introduce to Linux the same set of stability problems which
  Win32 has. The Linux approach is to prefer source level kernel
  modules which get an exact fit at compile time, or use quite a
  strict kernel version numbering scheme. Win32 is much more sloppy about
  this, which can lead to major instability problems (ever seen a blue
  screen with Win32 ? ;-)

Klamer
-- 
Klamer Schutte, E-mail: [EMAIL PROTECTED]
Electro-Optical Systems, TNO Physics and Electronics Laboratory
Tel: +31-70-3740469 -- Fax: +31-70-3740654 -- Mobile: +31-6-51316671

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

From: [EMAIL PROTECTED] (HPBudlong)
Subject: RE: Where are the environment variables? 
Date: 17 Apr 2000 07:00:39 GMT

RE: Where are the environment variables?

bash, sh, and ksh and similar shells use environment variables such as $PS1,
$PS2. printenv lists some but not all of these, e.g. $PS1 is listed, $PS2 is
not, though $PS2 clearly has a value and shows up with 
echo $PS2

This is true with other environment variables as well. 

Why don't they all show up in printenv?

Best wishes
Helen Budlong

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

From: "Peet Grobler" <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.questions,comp.unix.programmer,comp.os.linux.development.apps
Subject: How do I make a program run on localhost:200
Date: Mon, 17 Apr 2000 09:31:20 +0200

Okay, I assume this must be possible, otherwise nobody would be using UNIX.

Anyways, running Mandrake Linux 7.0 at home. I was thinking, how would you
make a program run on a specified port?

E.g. in /etc/inittab, you have an entry that respawns getty on tty1 to tty6.
I want to do something like that, just on a specified port.

E.g. let's say I wrote a special getty program. I want it to sit on port
200, waiting for connections. Do I have to write the program to specifically
open a port, or can I use some script somewhere to get the program's stdin
to be changed to a port???

Any help appreciated



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

From: [EMAIL PROTECTED] (David T. Blake)
Subject: Re: newbie
Date: 17 Apr 2000 04:08:54 GMT
Reply-To: [EMAIL PROTECTED]

customer <[EMAIL PROTECTED]> wrote:
>  have just installed Redhat 6.1, and the installation went al right.
> Now I have a few questions though.

Please repost to comp.os.linux.setup. This is the wrong 
newsgroup.

-- 
Dave Blake
[EMAIL PROTECTED]

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

From: Nate Eldredge <[EMAIL PROTECTED]>
Crossposted-To: 
uk.comp.os.linux,uklinux.help.newbies,comp.os.linux.development,comp.os.linux.questions,comp.os.linux.development.apps
Subject: Re: Put the lib into the libc?  (was: Re: Simple but...)
Date: 16 Apr 2000 17:03:26 -0700

Matthias Kleinmann <[EMAIL PROTECTED]> writes:

> At least you have to kick all users; but the real problem are services
> such as httpd or httpd. But consider the following:
> 
> You have a measurment running for serveral years and a program that
> steadily writes the raw data on the disk (or buffers it to fifo for
> fruther calculation). You may not stop this process and it needs the
> libc (formated writung like printf()). But for a rather short time you
> may stop the process that reads the file.
> 
> Ok this is special and not too realistic, but maybe a general reason for
> small libs.

Hmm, running processes will be unaffected.  They already have the old
lib mmap'ed in, and whatever happens on the fs won't change that.
It's only when a new process is started that the new lib will be used.

> 
> BTW:
> Is it even possible to change a lib of a runing process via SIGSTOP and 
> SIGCONT ?

No.  You'd have to restart it.  (It could do clever stuff with dlopen
if it really wanted, but nobody does.)

-- 

Nate Eldredge
[EMAIL PROTECTED]

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

From: liran <[EMAIL PROTECTED]>
Subject: Locking user space pointers in the kernel.
Date: Mon, 17 Apr 2000 01:02:48 -0700

Hi,
In my driver i want to lock the buffer i get from the user
to avoid the buffer been swaped out
and then wait until it will be swaped in.
How do i do that?
Where can i read about the interface the kernel gives on
manipulate user space address in kernel space?

Thanks Liran.


* Sent from AltaVista http://www.altavista.com Where you can also find related Web 
Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful

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

From: [EMAIL PROTECTED]
Subject: Re: Simple but confusing C code query...
Crossposted-To: 
uk.comp.os.linux,uklinux.help.newbies,comp.os.linux.development,comp.os.linux.questions,comp.os.linux.development.apps
Date: Mon, 17 Apr 2000 03:53:48 +0100

In comp.os.linux.development.system Johan Kullstam <[EMAIL PROTECTED]> wrote:
: you need to link with the math library libm.

: $ gcc prog.c -o prog -lm

: (yes this is stupid and libm should have been rolled into libc about
: 20 years ago but here we are.)

Excluding libm from libc makes sense if it allows you to build
executables which don't have any floating point code in them
at initialization time. Such executables run faster since the
kernel can notice this and won't bother swapping the floating
point registers on each context switch.

Rich.

-- 
[EMAIL PROTECTED] | Free email for life at: http://www.postmaster.co.uk/
BiblioTech Ltd, Unit 2 Piper Centre, 50 Carnwath Road, London, SW6 3EG.
+44 171 384 6917 | Click here to play XRacer: http://xracer.annexia.org/
--- Original message content Copyright � 2000 Richard Jones ---

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

From: W R Carr <[EMAIL PROTECTED]>
Subject: Compiling glibc-2.1.3
Date: Mon, 17 Apr 2000 03:46:52 -0500

I've been trying for several months to compile glibc-2.1.3 optimized for
a K6-III. Although the "make" runs fine and throws no errors, the "make
check" halts in the ./math directory with an error from "test-float".
When I manually invoke "./test-float", I receive the following message:

./test-float
testing float (without inline functions)
Fail: real(cacosh(-2 - i 3)) == -1.98338...

Test suite completed:
  2278 test cases plus 2266 tests for exception flags executed.
  1 errors occurred.

My configuration command:

../glibc-2.1.3/configure --enable-shared
--enable-add-ons=crypt,linuxthreads --prefix=/usr
--with-headers=/usr/src/linux/include

I am using pgcc-2.95.3. The only options I have added to CFLAGS are
"-march=k6 -mk6", and binutils are 2.9.5. Currently, I am running the
2.3.99-pre5 kernel with the pre6-3 patch applied. It (glibc) would also
not build properly when I was running the 2.2.14 kernel.

My hardware is a K6-III/450 running on a Tyan S1598 w/2M cache and 256M
PC133 ECC memory. I've also tried to build this on a second system
composed of a K6-III/400 running on an I'Will XA100+ w/512K cache and
128M PC100 non-parity memory. Doesn't build there, either.

Is there a problem with the FPU on the K6-III's? Can anyone tell me
what's wrong?

Thanks,
Ray

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

From: [EMAIL PROTECTED]
Subject: Network Protocol at Kernel Space
Date: Mon, 17 Apr 2000 08:52:17 GMT

Hello,

I would like to implement a network protocol in kernel
space. I know about the packet(7) but this is for user
space only. Could you please help me.

Regards,
Bhagyashree


Sent via Deja.com http://www.deja.com/
Before you buy.

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


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