Linux-Development-Sys Digest #785, Volume #8     Wed, 13 Jun 01 18:13:16 EDT

Contents:
  Come poter spegnere linux senza fare lo shutdown? ("LOGOS s.r.l.")
  Caldera 3.1 beta problem with depmod -a ("Richard Hilditch")
  GTK Window ("Ian Frawley")
  Re: udelay in newer kernels ([EMAIL PROTECTED])
  Real time extensions (Shane D'Arcy)
  Re: Shared memory RDONLY question (Rob Yampolsky)
  Re: thundering herd problem: the REAL scoop (Rasputin)
  Re: Shared memory RDONLY question (Dragan Cvetkovic)
  Weird behaviour with segment registers fs and gs (=?ISO-8859-1?Q?Dani=EBl_Mantione?=)
  Re: "Locked Directory" for floppy & CDROM (Jose W. Shermanson)
  Re: Shared memory RDONLY question (Rob Yampolsky)
  flushing the buffer during bootup (Aravindh)
  Re: Real time extensions (Adam Fineman)
  Re: Real time extensions ("Karl Heyes")
  i386 or i586 (dl)
  Re: i386 or i586
  pause the bootup (Aravindh)

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

From: "LOGOS s.r.l." <[EMAIL PROTECTED]>
Subject: Come poter spegnere linux senza fare lo shutdown?
Date: Wed, 13 Jun 2001 11:32:47 +0200

Buongiorno a tutti.

Dovrei poter spegnere una macchina linux senza dover fare lo shutdown.
All'accensione la macchina deve ripartire come se niente fosse accaduto.

Come posso fare?

Grazie a tutti.


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

From: "Richard Hilditch" <[EMAIL PROTECTED]>
Subject: Caldera 3.1 beta problem with depmod -a
Date: Wed, 13 Jun 2001 12:39:05 +0100

I have installed the Caldera Open Linux Server 3.1 on a Gateway Pentium PRO
system. I want to install some more software which needs kernel modules and
so needs to run depmod -a. However depmod -ae reports unresolved symbols as
follows:

depmod -ae
depmod: /lib/modules//2.4.2/modules.dep is not an ELF file
depmod: error reading ELF header /lib/modules//2.4.2/modules.generic_string:
No such file or directory
depmod: /lib/modules//2.4.2/modules.isapnpmap is not an ELF file
depmod: /lib/modules//2.4.2/modules.parportmap is not an ELF file
depmod: /lib/modules//2.4.2/modules.pcimap is not an ELF file
depmod: /lib/modules//2.4.2/modules.usbmap is not an ELF file
depmod: *** Unresolved symbols in
/lib/modules/2.4.2/kernel/drivers/video/aty/atyfb_base.o
depmod:         atyfb_cursor
depmod:         aty_init_cursor
depmod:         aty_set_cursor_color
depmod:         atyfb_set_font
depmod:         aty_pll_ct
depmod:         aty_dac_ct
depmod:         aty_set_cursor_shape
depmod: *** Unresolved symbols in
/lib/modules//2.4.2/kernel/drivers/video/aty/atyfb_base.o
depmod:         atyfb_cursor
depmod:         aty_init_cursor
depmod:         aty_set_cursor_color
depmod:         atyfb_set_font
depmod:         aty_pll_ct
depmod:         aty_dac_ct
depmod:         aty_set_cursor_shape

Any ideas?

Richard Hilditch




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

From: "Ian Frawley" <[EMAIL PROTECTED]>
Subject: GTK Window
Date: Wed, 13 Jun 2001 14:03:20 +0100

Hi all

I don't know if I am posting in the right group but.........

I am writing an application with a front end on Linux 6.2. I want to use a
gtk_window that can be altered dynamically i.e. I post a query and the
results are then displayed on the same window as they are received. Can
anyone tell me the best way to go about this. I am really new to using GTK+
etc. so I really need some advise

Thanks in advance
--


Ian Frawley
Software Engineer
Opal Telecom
Tel: 0161 222 2122
E-Mail: [EMAIL PROTECTED]




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

From: [EMAIL PROTECTED]
Subject: Re: udelay in newer kernels
Date: 13 Jun 2001 13:21:42 GMT

Pete Zaitcev <[EMAIL PROTECTED]> wrote:
>> The code line where I use it is "udelay(500000);"
>> 
>> The error message is: "unresolved symbol __bad_udelay"
> Use mdelay if your counter is that large.

While grepping around I found in include/asm-ppc/delay.h an explanation
why __bad_udelay() gives you a linker error:

extern void __bad_udelay(void);         /* deliberately undefined */

Obviously they really wanted to make sure, that you can't use udelay()
for too large values - not the nicest way to make it stick, but obviously
it worked in your case ;-)
                                         Regards, Jens
-- 
      _  _____  _____
     | ||_   _||_   _|        [EMAIL PROTECTED]
  _  | |  | |    | |          AG Moebius, Institut fuer Molekuelphysik
 | |_| |  | |    | |          Fachbereich Physik, Freie Universitaet Berlin
  \___/ens|_|homs|_|oerring   Tel: ++49 (0)30 838 - 53394 / FAX: - 56046

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

From: [EMAIL PROTECTED] (Shane D'Arcy)
Subject: Real time extensions
Date: Wed, 13 Jun 2001 15:18:03 +0000 (UTC)

Hi all,

I want to use named shared memory, named semaphores and named mutex
functions among various other realtime functions. However when I try and
use the sem_open() function, it returns ENOSYS. These functions are
defined in header files but their implementation is meant to be in
librt. Is there a kernel compiler option that I can set to get this
extended functionality, if so what is it ? If not do I need one of the
realtime kernel patches to get this functionality.=20

If all else fails, can anyone suggest a way that I can lock/block access
to a resource between processes (not just threads in a single process).

Kind regards
Shane           =20


-- 
Posted from [194.125.101.251] 
via Mailgate.ORG Server - http://www.Mailgate.ORG

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

From: Rob Yampolsky <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.aix,comp.unix.programmer
Subject: Re: Shared memory RDONLY question
Date: Wed, 13 Jun 2001 11:19:13 -0400

Ulrich Weigand wrote:

>>Yep.  I found mprotect() after I posted my question.  But do you have to 
>>use mmap() in order to use mprotect()?  I'm using shmget(), shmat(). 
>>And I'm using a well-known integer as my IPC key.  To switch to mmap() 
>>would require some restructuring.
>>
> 
> No, you should be able to use mprotect() on any part of the address
> space, no matter what's mapped there.
> 
> 


Ummm.  I tried it and it didn't work.

First I tried setting SHM_RDONLY on my shmat() call, and then using 
mprotect(...,PROT_READ|PROT_WRITE) to unprotect the shared memory 
segment when I needed to write to it.  This didn't work.  I still got a 
segmentation violation.

Then, I tried leaving out the SHM_RDONLY flag and using only mprotect to 
initially flag the segment as protected and then unprotecte it when I 
needed to write to it.  This also didn't work.  The memory remains 
unprotected regardles of the mprotect() call.  I tried leaving out the 
'unprotect' call, and was still able to write to the memory without 
getting a segmentation violation.

The system I'm working on is running AIX3.2.5.

This excerpt from the AIX3&4 man pages for mprotect explicitly mentions 
mmap:


The mprotect subroutine modifies the access protection of a mapped file 
region or anonymous memory region created by the mmap subroutine.

The man page on Linux 2.2 doesn't explicitly say you need to use mmap 
(and in fact has an example of using mprotect on a malloc'd buffer). 
But it does carry a footnote that states:

POSIX.1b says that mprotect can be used only on regions of memory 
obtained from mmap(2).

So, what's the bottom line?  Can't do it on AIX, can on Linux?

If I were to convert my shmat() stuff to mmap, would I have to map the 
memory to the filesystm?  Don't see any way for multiple processes to 
share the same segment other than via the 'fildes' parameter.

Oh, and if converting to mmap turns out to be too much of a pain, would 
you care to comment on how inefficient it would be to shmdt/shmat 
whenever I need to change the read-only status.

Thanks,
Rob
[EMAIL PROTECTED]


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

Crossposted-To: comp.unix.programmer,comp.unix.bsd.freebsd.misc
From: [EMAIL PROTECTED] (Rasputin)
Subject: Re: thundering herd problem: the REAL scoop
Date: Wed, 13 Jun 2001 15:44:52 GMT

In article <[EMAIL PROTECTED]>, Andrew Gierth wrote:
>>>>>> "phil" == phil-news-nospam  <[EMAIL PROTECTED]> writes:
> 
> phil> FreeBSD's kqueue/kevent syscalls could easily be made to solve
> phil> this problem.
> 
> I think this is harder than it sounds. Since kqueues can't be shared
> between processes (at least in -STABLE), you have essentially the same
> problem in that you have N processes each with a kevent filter for the
> accept, and you have to direct the incoming connection to exactly one
> of them; the kernel has no way to choose which is the right one.

IANA kernel hacker, but reading the kqueue docs, it appears that the 
design is proposed as an alternative to multiple children/threads.

It's supposed to allow a single process to manage many file descriptors
without the conventional overhead of mechanisms like select/poll.

-- 
"These are the propulsion systems used by NASA for the moonshots,"
                said Tom apologetically. 
Rasputin :: Jack of All Trades - Master of Nuns ::

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

Crossposted-To: comp.unix.aix,comp.unix.programmer
Subject: Re: Shared memory RDONLY question
From: Dragan Cvetkovic <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: 13 Jun 2001 11:53:53 -0400

Rob Yampolsky <[EMAIL PROTECTED]> writes:
> 
> Ummm.  I tried it and it didn't work.
> 
> First I tried setting SHM_RDONLY on my shmat() call, and then using 
> mprotect(...,PROT_READ|PROT_WRITE) to unprotect the shared memory 
> segment when I needed to write to it.  This didn't work.  I still got a 
> segmentation violation.

The reason might be that the initial permission of the original object is
too restrictive. For example, if you mmap read only file and that change
the permission to PROT_WRITE using mprotect, mprotect shall fail.


> 
> Then, I tried leaving out the SHM_RDONLY flag and using only mprotect to 
> initially flag the segment as protected and then unprotecte it when I 
> needed to write to it.  This also didn't work.  The memory remains 
> unprotected regardles of the mprotect() call.  I tried leaving out the 
> 'unprotect' call, and was still able to write to the memory without 
> getting a segmentation violation.
       
        What is the return value of mprotect() (-1 probably) and the errno?

> 
> This excerpt from the AIX3&4 man pages for mprotect explicitly mentions 
> mmap:
> 
> 
> The mprotect subroutine modifies the access protection of a mapped file 
> region or anonymous memory region created by the mmap subroutine.
> 

Yes, the POSIX standard also has the similar wording:

        "The behavour of this function is unspecified if the mapping was
        not established by a call to mmap()"

Bye, Dragan

-- 
Dragan Cvetkovic, 

To be or not to be is true. G. Boole

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

From: =?ISO-8859-1?Q?Dani=EBl_Mantione?= <[EMAIL PROTECTED]>
Subject: Weird behaviour with segment registers fs and gs
Date: Wed, 13 Jun 2001 18:26:24 +0200

Hello,

I have a program that

1) makes use of segment registers
2) uses a signal handler to intercept cli and sti instructions

The allocation of the segment registers with modify_ldt goes without
problems, and they can be used too.

Intercepting a cli or sti usually goes without problems too, but sometimes
something weird happens: both segment registers are set to zero *after*
the signal handler returns; my signal handler has a line of debug code
which checks it just before returning.

Does someone have an idea what is going on? I'm one big question mark.

I have tested this with multiple 2.2 kernels, all have the same behaviour.

Greetings,

Dani=EBl Mantione


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

From: Jose W. Shermanson <[EMAIL PROTECTED]>
Subject: Re: "Locked Directory" for floppy & CDROM
Date: Wed, 13 Jun 2001 16:30:05 -0000


Kasper Dupont wrote:
> 
> Jose W. Shermanson wrote:
> > 
> > I'm not sure this is a kernal question or a file system one but I
cannot
> > access my CDROM nor my floppy.  I recently loaded Mandrake Linux v8.0. 
All
> > went well for about 2 weeks and then, for some reason unknown to me,
when I
> > attempt to access my CDROM or floppy, I get an error message "You do
not
> > have enough permissions to read file:/mnt/floppy."  The "file type"
column
> > displayed by konqueror says "locked directory."  I suspect I somehow
shut
> > down LINUX while these devices were busy and the condition hasn't been
> > cleared.  Any suggestions short of re-installing would be appreciated. 
I
> > am a total novice to LINUX but have 30+ years experience with mainframe
> > OSs.  Thanks.  Jose
> > 
> > --
> > Posted via CNET Help.com
> > http://www.help.com/
> 
> What do you get when you type the
> following commands in a shell?
>    cat /etc/fstab
>    ls -l /mnt
>    mount /mnt/floppy
>    mount /mnt/cdrom
>    ls -l /mnt
> 
> Have you tried with different
> floppies and CDROMs?
> 
> -- 
> Kasper Dupont
Kasper,  Looks like the CDROM & the floppy are supermounted.

$cat /etc/fstab
/dev/hdb5/ ext2 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/mnt/cdrom /mnt cdrom supermount fs=iso9660,dev=/dev/cdrom 0 0
/mnt/floppy     /mnt/floppy     supermount       exec,dev,suid,rw,fs=vfat 0
0
<deleted>
$ls -1 /mnt
cdrom/
disk/
floppy/
win_c/
win_c2/
win_d/
$mount /mnt/floppy
mount: according to mtab, /mnt/floppy is already mounted on /mnt/floppy
mount failed

Sorry but I'm too new to linux to know how to unmount the devices and
re-mount them.  I tried the unmount command but bash says it can't fine the
command.

Any more suggestions?

Jose

--
Posted via CNET Help.com
http://www.help.com/

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

From: Rob Yampolsky <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.aix,comp.unix.programmer
Subject: Re: Shared memory RDONLY question
Date: Wed, 13 Jun 2001 12:51:04 -0400

Dragan Cvetkovic wrote:

>>
>>First I tried setting SHM_RDONLY on my shmat() call, and then using 
>>mprotect(...,PROT_READ|PROT_WRITE) to unprotect the shared memory 
>>segment when I needed to write to it.  This didn't work.  I still got a 
>>segmentation violation.
>
> The reason might be that the initial permission of the original object is
> too restrictive. For example, if you mmap read only file and that change
> the permission to PROT_WRITE using mprotect, mprotect shall fail.
>


That's what I thought.  That's why I then tried shmat() with read/write 
permission and solely using mprotect() to modify the read/write status.

 
>What is the return value of mprotect() (-1 probably) and the errno?


mprotect returned 0 in all cases.  But it did nothing.


By the way, I went ahead and coded shmdt/shmat pairs for each read/write

permission change, and it seems to work.  I can't detect a performance penalty,

but there HAS to be one, right?  For now, I'm only doing this on my 
development machine.  If anybody out there can verify that it really 
isn't a significant performance hit, then I might just enable this 
kludge everywhere.


Rob


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

From: [EMAIL PROTECTED] (Aravindh)
Subject: flushing the buffer during bootup
Date: 13 Jun 2001 10:12:26 -0700

hi,

i am working on a proprietery hardware system running linux. some of
the errors during bootup are getting lost in the buffer before it hits
the screen.

i want to change the code of the output statements used to display
messages during bootup of the kernel and then recompile the kernel.

i just want to do a fflush at the end of every write. i thought the
easiest way to do this was in the source of commands like printk, puts
etc. but is there an easier way to do so?

i also tried to use the standard fflush in printk.c and it did not
work. any other ways to flush the buffer?

thanks
aravindh

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

From: Adam Fineman <[EMAIL PROTECTED]>
Subject: Re: Real time extensions
Date: Wed, 13 Jun 2001 13:59:40 +0000

Shane D'Arcy wrote:
> 
> Hi all,
> 
> I want to use named shared memory, named semaphores and named mutex
> functions among various other realtime functions. However when I try and
> use the sem_open() function, it returns ENOSYS. These functions are
> defined in header files but their implementation is meant to be in
> librt. Is there a kernel compiler option that I can set to get this
> extended functionality, if so what is it ? If not do I need one of the
> realtime kernel patches to get this functionality.
> 
> If all else fails, can anyone suggest a way that I can lock/block access
> to a resource between processes (not just threads in a single process).
> 
What library is the sem_open() function from?  Or do you mean
sem_init(), from linuxthreads?  If so, LinuxThreads does not support
process-shared threads, at all.   POSIX 1003.1b semaphores, as
implemented on Linux, will not work between processes, only between
threads of the same process.

You can use the SystemV semaphores (see manpages for semget, semop,
semctl), which will work between processes.  You have to be very careful
of two things when using them: 1) watch out for deadlocks 2) make _sure_
that the semaphore resources are properly cleaned up, even if your
program terminates abnormally.

HTH
--
Adam

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

From: "Karl Heyes" <[EMAIL PROTECTED]>
Subject: Re: Real time extensions
Date: Wed, 13 Jun 2001 20:11:45 +0100

In article <[EMAIL PROTECTED]>,
"Shane D'Arcy" <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> I want to use named shared memory, named semaphores and named mutex
> functions among various other realtime functions. However when I try and use
> the sem_open() function, it returns ENOSYS. These functions are defined in
> header files but their implementation is meant to be in librt. Is there a
> kernel compiler option that I can set to get this extended functionality, if
> so what is it ? If not do I need one of the realtime kernel patches to get
> this functionality.

Have you enable the virtual memory filesystem support and mounted it.  This
provide the posix named shared memory.  I would of thought it provides the
posix semaphore implementation as well. 

karl.

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

From: [EMAIL PROTECTED] (dl)
Subject: i386 or i586
Date: 13 Jun 2001 13:23:37 -0700

what is the difference between i386 and i586?

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

From: [EMAIL PROTECTED] ()
Subject: Re: i386 or i586
Date: Wed, 13 Jun 2001 20:40:50 -0000

In article <[EMAIL PROTECTED]>,
dl <[EMAIL PROTECTED]> wrote:

>what is the difference between i386 and i586?

In what context?

--
http://www.spinics.net/linux/

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

From: [EMAIL PROTECTED] (Aravindh)
Subject: pause the bootup
Date: 13 Jun 2001 14:29:33 -0700

hi,

i want to pause the bootup process by inserting "gets or scanf" inside
the kernel code. how do i go about doing this. for example, i know
that printk() is used to display messages. Is there some command I can
add to the printk function that will wait for the user to press a key
before continuing with the boot?

thanks
aravindh

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


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