Linux-Development-Sys Digest #749, Volume #7      Fri, 7 Apr 00 08:13:14 EDT

Contents:
  Re: Overrunning the stack (Jon Becker)
  Re: PCI configuration space fun. (Bill Waddington)
  Multiple kernel versions on same system (Dave Nejdl)
  wide character I/O stuff workaround ([EMAIL PROTECTED])
  Re: Multiple kernel versions on same system (Paul Kimoto)
  Re: kernel questions (Anand Krishnamoorthy)
  Re: porting WIN32 to UNIX (Linux) (Kaz Kylheku)
  Problem with PLIP (via laplink cable) (Martin Kahlert)
  Read keycodes how? (Josef Moellers)
  ^%$@# ("FreeBSD")
  L5R entire collection (Richard Braganza)
  how do you do to force to unload a module (philippe Defert)
  Re: how do you do to force to unload a module (Josef Moellers)
  Am I the only person around with a 40 gig HD? ("Victor A. Grinberg")
  Testing folder on ftp.kernel.org (Ajith)
  Re: Am I the only person around with a 40 gig HD? (Steve Martin)
  Re: Am I the only person around with a 40 gig HD? (Josef Moellers)

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

From: [EMAIL PROTECTED] (Jon Becker)
Subject: Re: Overrunning the stack
Date: 6 Apr 2000 23:51:40 GMT

In article <[EMAIL PROTECTED]>,
Kaz Kylheku <[EMAIL PROTECTED]> wrote:
>On Thu, 06 Apr 2000 21:13:24 GMT, Juergen Heinzl
><[EMAIL PROTECTED]> wrote:
>>In article <8cgf6s$d70$[EMAIL PROTECTED]>, Jon Becker wrote:
>>As there is no answer yet I hope this rings a bell, IIRC there was
>>a discussion regarding that issue quite some time ago on ...
>>http://kt.linuxcare.com/
>>... and, again IIRC, the proposed solution was to use a read-only
>>memory page to guard against that problem.
>
>Note that this is not a concern if you are using LinuxThreads (at least for
>threads other than the main one). LinuxThreads does leave an unmapped area at
>the top limit of each stack.
>
>If you are managing your own stacks, you can just mmap the region you need and
>then use mprotect to poke a hole in it somewhere.


Let me be a little clearer.  Suppose I'm running a regular program as
a regular process.  There's nothing special here (almost): no threads,
no special stack management, no nothing.  The only issue is that the
address space is kind of full.  Maybe I link against a whole bunch of
shared libraries, maybe I need to mmap a whole bunch of files,
whatever.  And I have a lot of large stack variables and let's say
some deep recursion, so the stack gets quite big.

If the program isn't doing anything special, if something happens to
get mapped right below the stack, then the stack might crash right
into that memory and corrupt it.  And that's just the way it goes?
That doesn't seem right to me.

In essence, my process is running out of some resource (address
space), and it wouldn't be too hard for the kernel to notice this and
fault my process right away.  But instead, it sounds like my data will
get corrupted and I just have to wait for something to die later as a
result.

Is that really the case?

-Jon

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

From: Bill Waddington <[EMAIL PROTECTED]>
Subject: Re: PCI configuration space fun.
Date: Fri, 07 Apr 2000 00:39:04 GMT

In article <[EMAIL PROTECTED]>,
  grant@nowhere. (Grant Edwards) wrote:
> In article <[EMAIL PROTECTED]>, Bryan Hackney wrote:
>
> >However, past the PCI config space header (64 bytes) is
> >typically device specific registers. On some devices with many
> >registers, it is very convenient to map those registers to a
> >memory structure. The alternative, of reading and writing the
> >PCI controller at I/O 0xfc to address a device's config space
> >is tedious and inelegant, and possibly a performance
> >bottleneck.
> >
> >Now, given the elegance of memory mapping the device specific
> >registers, it's not a stretch to imagine that "many" PCI
> >devices that have device specific registers go ahead and map in
> >the previous 64 bytes. In my experience, this has been the
> >case.
>
> I think we've hammered this one into the ground. :)
>
> The other question that arises is: is there a simple way to
> mmap() a block of I/O space?  I've done if for PCI _memory_
> blocks, but doing it for a block of I/O space always sounded
> difficult.  (I think use of I/O space by PCI boards should be
> deprecated anyway.  Just put it all into memory space, life's
> easier for us software types.)
>

Hello,

Correct me if I'm wrong (believe me, I'm used to it), but don't the x86
processors use separate, explicit instructions to access I/O space?  If
so, it doesn't seem possible to mmap an I/O address.  It could be done
on other architectures perhaps, where the processor doesn't have
explicit I/O instructions, and I/O space is mapped into memory space by
the system's hardware to give the CPU access to I/O space.

Bill

BTW - our boards (the bus chips they use) don't make the config
registers visible in either the I/O or memory map, and I wouldn't want
them to.  (scary)


--
Bill Waddington
[EMAIL PROTECTED]
[EMAIL PROTECTED]


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

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

From: Dave Nejdl <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Multiple kernel versions on same system
Date: Fri, 07 Apr 2000 01:32:57 GMT

I am developing software that interacts with the linux kernel, and I
want to test the software on different
kernel versions(2.0, 2.2, 2.4-soon I hope). I know I can untar the
kernel sources and compile a kernel
anywhere, then add it to lilo.conf and rerun lilo. What I want is to use
the kernel header files of the kernel
version that's running. So if I have the 2.2 source tree in
/usr/src/linux, but I'm running the 2.0 kernel with that
source tree in /usr/src/linux-2.0, is there an easy way to make gcc use
the kernel sources in the 2.0 directory.
Will -I/usr/src/linux-2.0 work? I thought that it searched the default
path before anything defined with -I. Is
this correct?

Any help would be greatly appreciated,
Dave Nejdl


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

Subject: wide character I/O stuff workaround
From: [EMAIL PROTECTED]
Date: 07 Apr 2000 02:02:11 +0200

Hi,

I'm currently porting some programs from Solaris to Linux, which use
the XPG4 wide character I/O functions like *fgetws(), putwchar(),
wprintf() etc.  Unfortunately they are currently not supported by
glibcXYZ.

So, does anybody know, whether there is a "workaround" lib for these
functions, which I can use ???

thanx for your help,
Jens.
-- 
+---[ Jens Elkner ]--------------------------------------------------------+
| Walther-Rathenau-Str. 58                 [EMAIL PROTECTED]              |
| 39104 Magdeburg   GERMANY              http://www.linofee.org/           |
+--------------------------------------------------------------------------+

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

From: [EMAIL PROTECTED] (Paul Kimoto)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Multiple kernel versions on same system
Date: 7 Apr 2000 00:19:33 -0500
Reply-To: [EMAIL PROTECTED]

In article <[EMAIL PROTECTED]>, Dave Nejdl wrote:
> I am developing software that interacts with the linux kernel, and I
> want to test the software on different
> kernel versions(2.0, 2.2, 2.4-soon I hope). I know I can untar the
> kernel sources and compile a kernel
> anywhere, then add it to lilo.conf and rerun lilo. What I want is to use
> the kernel header files of the kernel
> version that's running. So if I have the 2.2 source tree in
> /usr/src/linux, but I'm running the 2.0 kernel with that
> source tree in /usr/src/linux-2.0, is there an easy way to make gcc use
> the kernel sources in the 2.0 directory.
> Will -I/usr/src/linux-2.0 work? I thought that it searched the default
> path before anything defined with -I. Is
> this correct?

Uh, the documentation (gcc info pages, node "Options for Directory Search")
says: 

: `-IDIR'
:      Add the directory DIR to the head of the list of directories to be
:      searched for header files.  This can be used to override a system
:      header file

You could also move /usr/src/linux to /usr/src/linux-2.2 and make
/usr/src/linux a symbolic link to the right place (e.g., using a 
clever script at bootup time).

-- 
Paul Kimoto             <[EMAIL PROTECTED]>

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

From: Anand Krishnamoorthy <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux,comp.os.linux.misc
Subject: Re: kernel questions
Date: Fri, 07 Apr 2000 09:49:39 -0400


==============8BE565C83B0427266FC32E25
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Doug,
Pl. find my answers below:

Also, a way that I can resolve this value to find what
"vm_area_struct" references this portion of memory for the specific
process?
Answering your second Q first, to determine which Virtual Memory Area (VMA)
the address you retrieved it is only necessary to traverse the
vm_area_structs , it is not necessary to go through the page
table/ddirectories etc.

> In the kernel source, the "thread_struct" reflects has values that
> reflect the computers registers.  One of these values is "eip", which is
> the value for the instruction pointer.  Does anyone one know what level
> of the page tables (x86 architecture) this value refers to (pte, pmd,
> pgd)?

Any linear address , in your case that given by EIP , will be split into
three parts(I do not remember offhand how many bits each of the three has
out of the 32 bits).The first part will be the offset into the page
directory, (the base of which is pointed to by CR3 register).At this offset
in the page dir, the base address(physical) of the pmd can be found.The
second part of EIP will now be an offset into the pmd. At this offset, the
base (phy) address of the actual physical page in memory can be found. The
third section of the EIP is an offset into the page

Anand .K

[EMAIL PROTECTED]

==============8BE565C83B0427266FC32E25
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>
Hi Doug,
<BR>Pl. find my answers below:

<P><I>Also, a way that I can resolve this value to find what</I>
<BR><I>"vm_area_struct" references this portion of memory for the specific</I>
<BR><I>process?</I>
<BR>Answering your second Q first, to determine which Virtual Memory Area
(VMA) the address you retrieved it is only necessary to traverse the vm_area_structs
, it is not necessary to go through the page table/ddirectories etc.
<BLOCKQUOTE TYPE=CITE><I>In the kernel source, the "thread_struct" reflects
has values that</I>
<BR><I>reflect the computers registers.&nbsp; One of these values is "eip",
which is</I>
<BR><I>the value for the instruction pointer.&nbsp; Does anyone one know
what level</I>
<BR><I>of the page tables (x86 architecture) this value refers to (pte,
pmd,</I>
<BR><I>pgd)?</I></BLOCKQUOTE>
Any linear address , in your case that given by EIP , will be split into
three parts(I do not remember offhand how many bits each of the three has
out of the 32 bits).The first part will be the offset into the page directory,
(the base of which is pointed to by CR3 register).At this offset in the
page dir, the base address(physical) of the pmd can be found.The second
part of EIP will now be an offset into the pmd. At this offset, the base
(phy) address of the actual physical page in memory can be found. The third
section of the EIP is an offset into the page

<P>Anand .K

<P>[EMAIL PROTECTED]</HTML>

==============8BE565C83B0427266FC32E25==


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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: 
comp.os.linux.development.apps,comp.os.linux.development,comp.os.ms-windows.programmer.win32,comp.os.ms-windows.programmer.misc,comp.unix.programmer,comp.programming
Subject: Re: porting WIN32 to UNIX (Linux)
Reply-To: [EMAIL PROTECTED]
Date: Fri, 07 Apr 2000 04:57:47 GMT

On 05 Apr 2000 16:34:56 -0400, Mark Hamstra <[EMAIL PROTECTED]> wrote:
>Kaz!  I expected better from you.
>
>Wine is not just about running Windows EXE's on Linux, it is also
>very much about compiling existing Win32 code into Linux native
>executables.  Corel has already proven that using Winelib in this
>capacity is certainly well worth a potential porter's time to look
>at closely.

You are right! I apologies for the gaffe. Given that you can use Wine's
Win32 implementation as just another library it's clearly a viable option
to people looking to port fast. In the end it doesn't matter how you do it
as long as it works.

-- 
#exclude <windows.h>

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

From: [EMAIL PROTECTED] (Martin Kahlert)
Subject: Problem with PLIP (via laplink cable)
Date: 7 Apr 2000 06:44:54 GMT
Reply-To: [EMAIL PROTECTED]

Hi,
i just wanted to connect my ooooold laptop (i486) to my
Linux AXP machine using plip (laplink cable), yesterday.

The laptop runs Linux 2.0.35, the alpha box 2.2.14.
If i ping from alpha to the laptop the output of ifconfig plip0
on alpha seems to be o.k. (no errors, counter for transmitted 
packages goes up, but no packages received).

If i ping the alpha from my laptop and look at ifconfig plip1 there,
the counter for the received packages is big (because i pinged 
it from alpha), but no packages transmitted. There are a lot
of errors indicated in the Tx line.
In /var/log/messages i get error messages saying something close like 
plip1: transmit timeout(1,84).

The routing entries seem to be o.k.

Could any kind soul explain this to me and tell me, what i did wrong?

Thanks a lot in advance,
Martin.

-- 
The early bird gets the worm. If you want something else for       
breakfast, get up later.

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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Read keycodes how?
Date: Fri, 07 Apr 2000 08:37:01 +0200

My son would like me to write a remote control for his CyberMaster set.
I have done all the communication stuff but now I need to react on
keypresses.
Rather than read four bytes (ESC [ 0 A for key-up), I'd like to check
whether a key is pressed/depressed by getting the raw keycodes. I think
this must be possible, because X seems to be able to do it. I have
scanned the sources but have been confused by what source belongs where
and does what.
So: how do I get the raw keyboard-events like "key pressed" and "key
released"?

TIA,

Josef
-- =

Josef M=F6llers
Fujitsu Siemens Computers
SHV Server DS 1

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

From: "FreeBSD" <[EMAIL PROTECTED]>
Subject: ^%$@#
Date: Fri, 7 Apr 2000 00:26:24 -0700

http://www.techtalkusa.com Can you believe these guys, they are essentially
telling us that Redhat support sucks! Damn that pisses me off. They made
some tech support call audio stream and said it was a Red Hat Linux support
call. They even had Redhat placed with Windows.



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

From: [EMAIL PROTECTED] (Richard Braganza)
Subject: L5R entire collection
Date: Fri, 07 Apr 2000 07:45:36 GMT

I have decided to sell my entire collection of L5R 

Consisting of:
Mint/near mint
Most Promos - including multiples of Shadow Warrior
4 of the 6 great Swords : Dragon, Clane, Phoenix and Carb
Most of Emerald Edition including 5/6 armours - (not got Unicorn) 
Most of Shadowlands - inc Obsidian Hand
Alot from FK and AoV ( 9 of the 12 black scrolls )
Some from Tov (no wedge)
All HE1,5 and 6
and some from rest of HE and DJH expansions
Multiple complete sets of AD
Two unopened boxes of AD boosters (factory wrapped)
3 each of AD starters (factory wrapped)
Most Heralds (multiple copies)

Card Protectors 100+ each of red, black and see thru
60+ of the extra strong postal versions.

If interested please contact me via email only at
[EMAIL PROTECTED]

I prefer to sell only to UK buyers, so that the buyer has a chance of
seeing my collection first. Richardb



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

From: philippe Defert <[EMAIL PROTECTED]>
Subject: how do you do to force to unload a module
Date: Fri, 07 Apr 2000 13:12:08 +0200
Reply-To: [EMAIL PROTECTED]

when i do rmod name_module, the system respond:
device or ressource are busy

but i want unload this module
how can i do?

Philippe Defert



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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: how do you do to force to unload a module
Date: Fri, 07 Apr 2000 11:45:33 +0200

philippe Defert wrote:
> =

> when i do rmod name_module, the system respond:
> device or ressource are busy
> =

> but i want unload this module
> how can i do?
> =

> Philippe Defert

It may be that your module is still used by another module.
Check the output of lsmod:
        Module                  Size  Used by
        smbfs                  25872   0  (autoclean)
        nls_iso8859-1           2236   0  (autoclean)
        sd_mod                 16688   0  (autoclean) (unused)
        3c90x                  19628   1  (autoclean)
        serial                 42932   0  (autoclean)
        memstat                 1604   0  (unused)
        ad1816                  8656   1  (autoclean)
        sound                  57400   0  (autoclean) [ad1816]
        soundlow                 344   0  (autoclean) [sound]
        soundcore               2340   5  (autoclean) [sound]

This esamnple shows that the soundcore module cannot be removed because
it is used by the sound module. The memstat module can be removed
because it is unused as are the nls_iso8859-1 and the serial modules.
rmmod -a will therefore remove these modules.

If your module is a driver module and some application still has the
driver opened, rmmod will fail too.

-- =

Josef M=F6llers
Fujitsu Siemens Computers
SHV Server DS 1

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

From: "Victor A. Grinberg" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Am I the only person around with a 40 gig HD?
Date: Fri, 07 Apr 2000 03:11:08 -0400

As you can tell I'm proud of my new 40 GB HD :-).  Here's my problem: I
put a 24GB FAT32 partition at the end of the drive, for data, so I could
access it from both win98 and linux.  Win 98 can get to it fine, which
means the partition is properly formatted :-).  Linux can't mount it,
however.  Is this a bug in linux FAT32 support??
 -vg

P.S. RedHat 6.2, stock kernel, i.e. 2.2.14.  The disk also has a boot
win98 partition, an ext2 partition, and a swap partition, all of which
linux can get to.

P.P.S. Before posting this nonsense question I spent at least 20 minutes
on dejanews looking for the answer, and the only thing I can conclude is
that, perhaps, people with >33 GB drives don't use them for FAT32
partitions..  Hmm..

P.P.S. When replying by e-mail, don't forget to remove NOSPAM from the
address (I sometimes do=;)



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

From: Ajith <[EMAIL PROTECTED]>
Subject: Testing folder on ftp.kernel.org
Date: Fri, 07 Apr 2000 11:30:03 GMT

Hi 
   I wanted to know more about the contents of the testing folder under 
pub/linux/kernel/testing/ on the kernel.org server.  I have downloaded the bzip 
utility. I extracted one of the files, pre2-1.bz2 also. My request is to get more 
information on what these files test and how they are used. Is there an FTP server 
that supports anonymous FTP to this folder?
        Thanks in advance for any help.
regards
Ajith       


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

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

From: Steve Martin <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.hardware
Subject: Re: Am I the only person around with a 40 gig HD?
Date: Fri, 07 Apr 2000 08:03:52 -0400

"Victor A. Grinberg" wrote:

> As you can tell I'm proud of my new 40 GB HD :-).  Here's my problem: I
> put a 24GB FAT32 partition at the end of the drive, for data, so I could
> access it from both win98 and linux.  Win 98 can get to it fine, which
> means the partition is properly formatted :-).  Linux can't mount it,
> however.  Is this a bug in linux FAT32 support??

Victor:

I'm running 2.2.14 here, so I took a dash over to /usr/src/linux and
checked... I don't think this kernel even supports FAT32 (at least
there's no option for it in "make xconfig"). It supports FAT,
but no mention of FAT32.

I'm sure there's someone on this ng that knows more about it than
I do, and hopefully they'll speak up if I'm wrong, but you may be
SOL trying to access FAT32.

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

From: Josef Moellers <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: Am I the only person around with a 40 gig HD?
Date: Fri, 07 Apr 2000 14:07:04 +0200

Steve Martin wrote:

> I'm running 2.2.14 here, so I took a dash over to /usr/src/linux and
> checked... I don't think this kernel even supports FAT32 (at least
> there's no option for it in "make xconfig"). It supports FAT,
> but no mention of FAT32.
> =

> I'm sure there's someone on this ng that knows more about it than
> I do, and hopefully they'll speak up if I'm wrong, but you may be
> SOL trying to access FAT32.

I guess, you're wrong. It's called vfat.

My Linux at home happily accesses FAT32 partitions.
My Linux at work doesn't even have any FAT or gristle.

Josef
-- =

Josef M=F6llers
Fujitsu Siemens Computers
SHV Server DS 1

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


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