Linux-Development-Sys Digest #752, Volume #7      Sat, 8 Apr 00 21:13:15 EDT

Contents:
  Re: error confinement (ravi Venkat)
  Integrate library functions into kernel?? (Chih-Kuo Chiang)
  Re: How compatible is Linux with .. Linux (John Alvord)
  Re: Overrunning the stack (Jon Becker)
  Re: Read keycodes how? (Manu)
  GAMES/TOYS (REQ) FROM COMP + INVENT ("gamesplayuk")
  type inconsistency in open(2) (Weiguang Shi)
  Filesize of large files ( 64 bit ) in linux ("Mike")

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

From: ravi Venkat <[EMAIL PROTECTED]>
Subject: Re: error confinement
Date: Fri, 07 Apr 2000 18:51:26 -0700

Pankaj Ratan Lal wrote:

> Hi All,
>
> I am doing a project on error confinement in the context of loadable modules
> in linux. Maurice bach is what I have for Unix, but I am unable to find any
> such thing for linux. Can somebody help me on this, by providing me info
> 'bout any book on linux internals and may be coming close to this topic.Are
> there any web links which I can get. The lkg download from sunsite seems to
> be too general. If there is nothing on this which parts of the kernel source
> should I look at.
>
> Any help will be greatly appreciated.
>
> Thanks All,
>
> Pankaj Ratan Lal

Recently I bought this book "Linux Kernel Internals" - II Ed
by M Beck, H Bohme, M Dziadzka,  U Kunitz, R Magnus, D Verworner
It is the best one I found in the market for understanding Linux Internals.

happy reading,

Ravi


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

From: [EMAIL PROTECTED] (Chih-Kuo Chiang)
Subject: Integrate library functions into kernel??
Date: 8 Apr 2000 03:54:59 GMT
Reply-To: [EMAIL PROTECTED]

        I have a part time job about embedded Linux, the hard part is
how can I integrate those needed library functions, modules an drivers
into kernel. I bought several books, but no one mentions about it.
Could somebody give me a hand?? Or where I can find those informations.
Thanks in advance. 

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

From: [EMAIL PROTECTED] (John Alvord)
Subject: Re: How compatible is Linux with .. Linux
Date: Sat, 08 Apr 2000 04:37:49 GMT

On Fri, 7 Apr 2000 14:04:09 -0400, "The Wogster"
<[EMAIL PROTECTED]> wrote:

>
>Peter T. Breuer wrote in message <8ccqgp$eg2$[EMAIL PROTECTED]>...
>>In comp.os.linux.development.system The Wogster <[EMAIL PROTECTED]>
>wrote:
>>
>>
>>: VMS, HPUX, AIX, Irix, MVS, VSE or other environment.   Heck, three years
>>: ago, I could have asked the same question!
>>
>>OK, what IS the difference between VMS and MVS, then! Apart from the
>>first letter (of their manufacturer).
>>
>
>Gee now maybe a number of people can berate you on not knowing the
>difference between a mini and big iron.....
>
>VMS: OS used by Digital Equipment Corporation on it's VAX series of
>computers, these are classed as mini computers, very similar to Unix in many
>ways, really different in other ways.  Best feature, smooth scrolling on
>text based terminals no less.  Could be crashed by 45 College students
>starting a COBOL compile at the same time.
>
>MVS: OS used by International Business Machines on their biggest iron, the
>only similarity to Unix is the fact that it runs multiple users and multiple
>tasks at the same time.  Best feature, you can actually run MVS as an
>application under MVS (VM the other IBM Big Iron OS also has this feature).
>MVS (and VM) are almost totally crash proof I used to work with these
>systems, and running for many months is common.

MVS under MVS is new to me (and I have been watching it since 1969).
VM has the only virtualizing operating system in the IBM world.

MVS also has a pretty good unix-posix services feature the last few
years.

john alvord


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

From: [EMAIL PROTECTED] (Jon Becker)
Subject: Re: Overrunning the stack
Date: 8 Apr 2000 04:31:40 GMT

In article <[EMAIL PROTECTED]>,
Juergen Heinzl <[EMAIL PROTECTED]> wrote:
>In article <8cj7uc$mm8$[EMAIL PROTECTED]>, Jon Becker wrote:
>>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.
>[...]
>
>Yes, I think that was quite clear and the pthreads stuff is just
>a special case.
>
>>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.
>[...]
>AFAIK .. yes.
>
>>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?
>[...]
>
>If I got that right, then see my previous reply. I remember a short
>discussion but with so much stuff going on ... I did not archive the
>related article. Same applies to "what is the current state of
>affairs" as I am still using kernel 2.2.14 and have not followed
>latest developments. I have tried to find the URL, but the keyword
>"stack" results in an endless string of articles, so I'd really
>recommend to ask on the linux.dev.kernel list for a final and
>authorative answer.
>
>Still given the currently used memory layout I guess the only
>solution is to put a non-writable page between the process' stack
>and mapping area.

If by this you mean actually creating a mapped read-only region below
the stack, then that's not strictly necessary.  It would also be
possible to just ensure whenever the stack grows and whenever a
mapping is created that there's a one-page hole below the stack.
Mostly equivalent, but the performance might be better.

What's really bothering me here isn't that the kernel doesn't do this
reasonable thing that it should.  It's that I'm not naive enough to
think that the smart people who work on the kernel haven't thought
about this before, so I assume that since the kernel doesn't do this,
there must be a good reason why not and I'm hoping someone can
enlighten me.

-Jon

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

From: Manu <[EMAIL PROTECTED]>
Subject: Re: Read keycodes how?
Date: Sat, 08 Apr 2000 09:03:20 GMT



Josef Moellers a �crit :
> 
> 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"?

Check showkey and xev ?!
I really don't know how you can do this. Some guys here wished to use
special keys of their win95 special keyboard. So you can get raw
keycodes
with a 'showkey -s' but I still don't know how to use them with X.

If you find something, please call me :)

-- 

  ______
 / MANU `-------------------------------------,
|                 email [EMAIL PROTECTED]       \
|  ,,  // \\      ICQ#  32562118               |
| (_,\/ \_/ \                                  |
|   \ \_/_\_/>    Gtk Explorer, HP48, Skate... |
|   /_/  /_/      http://coredump.free.fr      |
 ----------------------------------------------~



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

From: "gamesplayuk" <[EMAIL PROTECTED]>
Subject: GAMES/TOYS (REQ) FROM COMP + INVENT
Date: Sat, 8 Apr 2000 14:35:38 +0100

Companies of games and toys are you looking for new markets?
Inventor seeking help?
please visit our website ' its a must '
www.gamesplayuk.co.uk




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

From: Weiguang Shi <[EMAIL PROTECTED]>
Subject: type inconsistency in open(2)
Date: Sat, 8 Apr 2000 13:13:21 -0600

Hi, there: 

The definition of the open(2) in /usr/src/linux/fs/open.c is like this:

    asmlinkage int sys_open(const char * filename,int flags,int mode)

Here the type of "flags" is "int" which on an i386 machine is 4 bytes
long. However, the "file->f_flag" is an "unsigned short" and is 2 bytes
long. And later, also in the sys_open(), actually in do_open(), there is
an assignment:
 
    f->f_flags = flag = flags;    

Why should this be done?

Thanks.
Weiguang


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

From: "Mike" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.development,comp.os.linux.development.apps,linux.dev.c-programming,linux.redhat.development
Subject: Filesize of large files ( 64 bit ) in linux
Date: Sat, 08 Apr 2000 23:44:15 GMT

Hi All.

Im trying to determine the size of a partition/disk device in Linux,
and Im not haveing any luck.

If I open the device, and make a call to fstat64(), it comes back
with an incorrect byte count. No matter what combination of
fstat/fstat64(), etc. I try, it doesnt seem to work correctly.
Im useing the latest versions of software includeing kernel 2.3.99-pre3.

If anyone knows how to do this, could you post a small program
that opens a device ( /dev/hde for example ) and prints its size
in bytes ( the test drive i have is 40 gig, so large file support is
needed )

Thanks in advance.

Mike
[EMAIL PROTECTED]






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


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