Linux-Development-Sys Digest #934, Volume #7      Mon, 5 Jun 00 12:13:19 EDT

Contents:
  Re: [Report] Kernel problem : ext2 fs directory remained locked ? (Thomas Stroesslin)
  Re: mmap on /dev/kmem: sample code? (Emmanuel Dreyfus)
  Re: kernel_thread and userland programs (Mathias Waack)
  GPIO on bt848a ("Tomasz Lacki")
  /proc file (=?iso-8859-1?Q?C=E9sar?= Espinosa)
  Re: Where is code for loading executables (Nix)
  Monitoring CPU Temperature ("David Findlay")
  Re: Monitoring CPU Temperature (=?iso-8859-1?Q?Rasmus_B=F8g_Hansen?=)
  Re: Where is code for loading executables (dan)
  Re: Stupid but annoying problem (Bernd Strieder)
  Re: Monitoring CPU Temperature ("Dmitriy A. Fedorov")
  Re: Task swapping and screen output (Bernd Strieder)
  Load library from library fails? ([EMAIL PROTECTED])
  Re: Why compiling "-static" creates HUGE binary??? (Paul D. Smith)
  O_LARGEFILE support (Michael Kerrisk)
  US-MA: Concord - Embedded Engineers Needed (Crossbeam Systems)
  Re: Why compiling "-static" creates HUGE binary??? (Wolfram Gloger)
  farjmp and farcall ("Benjamin S. Vera-Tudela")
  polling the keyboard (Jeffrey Ric)
  2.4.0-test1, scsi, and YAMAHA (Georges HANSEL)
  Re: Task swapping and screen output (Jeremy Young)

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

From: [EMAIL PROTECTED] (Thomas Stroesslin)
Subject: Re: [Report] Kernel problem : ext2 fs directory remained locked ?
Reply-To: [EMAIL PROTECTED]
Date: 5 Jun 2000 10:13:14 GMT+2

>Jun  1 05:18:08 kernel: Unable to handle kernel paging request at
>virtual address c80200e0

it seems like you ran out of memory, then out of swap space. 
maybe your program has a memory leak?

-- 
T. Stroesslin
DI-MANTRA (INF 130)
EPFL

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

From: [EMAIL PROTECTED] (Emmanuel Dreyfus)
Subject: Re: mmap on /dev/kmem: sample code?
Date: Mon, 5 Jun 2000 10:54:33 +0200

Nix <$}xinix{[email protected]> wrote:

> > I'm looking for some sample code that mmap an area of /dev/kmem in a
> > user process, in order to understand what's wrong with my code. 
> 
> If you want to do this, it is usually a mistake; you should export the
> information from the kernel in another way (a device or /proc
> node). This is *very* much less fragile, easier to maintain, and more
> secure.

I'm working on a multiplateform project, and our BSD port is already
doing a mmap on /dev/kmem. This is why it would be more confortable to
mmap on /dev/kmem: the code would be exactly the same, both in userland
and inside the kernel.

Could you explain me how this way of doing it is fragile, hard to
maintain and unsecure?

-- 
Emmanuel Dreyfus
[EMAIL PROTECTED]

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

From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: kernel_thread and userland programs
Date: 05 Jun 2000 10:25:25 +0200

Hi, 

eric <[EMAIL PROTECTED]> writes:
> process.  ive tried using the technique in kernel/kmod.c to no
> avail. have a look:

Ok, lets do it like they do it in kmod.c:

> #include <linux/module.h> #include <linux/fs.h>
> 
> void start_exec(void *none) {
>     set_fs(KERNEL_DS)

        // build the environment and argv
        char *argv[] = { "/usr/bin/daemon", NULL };
         static char * envp[] = { NULL };

>    // should i use do_execve here or a function ptr to
> sys_call_table[__NR_execve]
>    // and then call execve ? or what? plz help!

        if(execve("/usr/bin/daemon",argv,envp)<0) {
          // some error handling
        }

>    // i simply want to execve /usr/bin/daemon and want the
> kernel_thread to terminate when the program
>    // userland daemon terminates.  

This is the behauvior, no work for us. 

> I have not seen this documented anywhere.  thnx in advance.

You've found kmod.c and looked inside. But you're not able to 
read this code? Or what was your question?

Mathias

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

From: "Tomasz Lacki" <[EMAIL PROTECTED]>
Subject: GPIO on bt848a
Date: Mon, 5 Jun 2000 11:12:57 +0200

Hi
Does anybody know how to access gpio on bt848a? I know that there is v4l
(bttv driver), but I think it does not allow to access GPIO directly.
Any suggestions?



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

From: =?iso-8859-1?Q?C=E9sar?= Espinosa <[EMAIL PROTECTED]>
Subject: /proc file
Date: Mon, 05 Jun 2000 10:33:21 +0200

    Hi all,

    I want to create a /proc file in which I write some data from a
driver. I've tried several pieces of code, but I always have a lot of
errors when I include /linux/fs.h.
    Can anybody send me another example of creating a proc file?

    Thanks,

                C�sar Espinosa


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

From: Nix <$}xinix{[email protected]>
Subject: Re: Where is code for loading executables
Date: 05 Jun 2000 07:59:02 +0100

[EMAIL PROTECTED] writes:

>       I need to find where in the kernel source is the code for loading an
> executable file (ELf format) and running it.

Why is it so hard to find fs/binfmt_elf.c?

-- 
`It's as if Hal Clement expanded fragments of a novel
 by H.P. Lovecraft.' --- Jake Kesinger on the novel _Darwinia_.

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

Reply-To: "David Findlay" <[EMAIL PROTECTED]>
From: "David Findlay" <[EMAIL PROTECTED]>
Subject: Monitoring CPU Temperature
Date: Mon, 5 Jun 2000 21:32:10 +1000

Is there a way in Linux to access stuff like the CPU temperature, board
temperature, fan RPM, etc?

David Findlay



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

From: =?iso-8859-1?Q?Rasmus_B=F8g_Hansen?= <[EMAIL PROTECTED]>
Subject: Re: Monitoring CPU Temperature
Date: Mon, 5 Jun 2000 13:37:12 +0200

On Mon, 5 Jun 2000, David Findlay wrote:

> Is there a way in Linux to access stuff like the CPU temperature, board
> temperature, fan RPM, etc?

There are device files in /dev (look in
/usr/src/linux/Documentation/devices.txt), but I'm not sure of how to use
them. I looked a litlle at it myself, but became aware, that my hardware
does not support this sort of things. 

Rasmus B�g Hansen


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

From: dan <[EMAIL PROTECTED]>
Subject: Re: Where is code for loading executables
Date: Mon, 05 Jun 2000 11:55:22 +1000

new to linux. thanks.

Nix wrote:

> [EMAIL PROTECTED] writes:
>
> >       I need to find where in the kernel source is the code for loading an
> > executable file (ELf format) and running it.
>
> Why is it so hard to find fs/binfmt_elf.c?
>
> --
> `It's as if Hal Clement expanded fragments of a novel
>  by H.P. Lovecraft.' --- Jake Kesinger on the novel _Darwinia_.


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

From: Bernd Strieder <[EMAIL PROTECTED]>
Subject: Re: Stupid but annoying problem
Date: Mon, 05 Jun 2000 14:50:59 +0200

"Robichaud, Jean-Philippe [BAN:6S33:EXCH]" wrote:
> 
> Hi
> 
> This is not a developpement problem directly but I gives me a hard
> developping on my linux box.  My linux box is in a lab somewhere else in
> the building and I work on it by doing telnet.  Each time I wish to
> telnet the linux box, it takes about 50-70 second before I have the
> login prompt.  Does anybody know what is wrong ?  If I telnet another
> machine, i just work great...
> 
>         Thanks you for helping me because as I do developpement in the kernel,
> I often have to reboot and to relogin.  This will help me not taking a
> walk to the lab ~10 times a day !!!

If you want to know, what happens, you have to trace the network traffic
caused by your telnet accesses, e.g. with tcpdump. The reason is
probably DNS, misconfigured to timeout, but I have seen similar problems
causes by IDENT requests. If the server you want to access has entries
in /etc/hosts.allow /etc/hosts.deny or ~/.rhosts with usernames of the
machine you want to access from, then the server verifys the access
through IDENTD accesses, which might timeout as well.

Another solution is to not use telnet, rlogin and friends together with
.rhosts or hosts.(deny,allow). There is "ssh" and its different
implementations available for different platforms. It is more pleasant,
has more features, not to mention its security efforts. "ssh" gives you
port forwarding, automatic X forwarding as well. Maybe this makes
developping even more easy.

Bernd.

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

From: "Dmitriy A. Fedorov" <[EMAIL PROTECTED]>
Subject: Re: Monitoring CPU Temperature
Date: Mon, 05 Jun 2000 12:55:27 +0000

David Findlay wrote:
> 
> Is there a way in Linux to access stuff like the CPU temperature, board
> temperature, fan RPM, etc?

http://www.netroedge.com/~lm78/

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

From: Bernd Strieder <[EMAIL PROTECTED]>
Subject: Re: Task swapping and screen output
Date: Mon, 05 Jun 2000 14:59:54 +0200

Jeremy Young wrote:
> I have a project to build a system which runs multiple telnet sessions
> simultaneously. It must be possible to remotely switch between these
> sessions so as only one session is ever viewed at any one time (Using
> some form of a socket interface).
> 

I think "screen" is an app doing essentially what you want, but it
tackles it at a lower level, terminals. So it has not your problem with
the data printed before, since they belong to the terminal. A little
drawback is, that you have to access screen at shell level, it is not a
library to use in your own app. Perhaps it is sufficient.

> man screen

SCREEN(1)                                               SCREEN(1)


NAME
       screen - screen manager with VT100/ANSI terminal emulation



SYNOPSIS
       screen [ -options ] [ cmd [ args ] ]
       screen -r [[pid.]tty[.host]]
       screen -r sessionowner/[[pid.]tty[.host]]



DESCRIPTION
       Screen is a full-screen window manager that multiplexes  a
       physical  terminal  between  several  processes (typically
       interactive shells).  Each virtual terminal  provides  the
       functions  of  a DEC VT100 terminal and, in addition, sev�
       eral control functions from the ISO 6492  (ECMA  48,  ANSI
       X3.64) and ISO 2022 standards (e.g. insert/delete line and
       support for multiple character sets).  There is a  scroll�
       back  history buffer for each virtual terminal and a copy-
       and-paste  mechanism  that  allows  moving  text   regions
       between windows.
[...]

Bernd Strieder

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

From: [EMAIL PROTECTED]
Subject: Load library from library fails?
Date: Mon, 05 Jun 2000 13:29:43 GMT

I'm currently working on a low-level gaming toolkit. Part of
my project involves dynamically linking OpenGL at runtime,
using dlopen() and dlsym(). No big deal, load GL.so and GLU.so
and bind a known list of symbol.

My toolkit can be built as either a static or shared library.
When I build it as a static library, everything works great.
But when I build as a shared library, all calls into GLU.so
end disasterously, with a segfault and a core dump. A backtrace
shows that GLU dies as soon as it tries to call a function
from GL.so. As a bad ASCII illustration, this works:

[MyApp] calls gluPerspective()
  |
[GLU.so::gluPerspective] calls glFrustum()
  |
[GL.so::glFrustum]


This does NOT work:

[MyApp] calls MyLib::SizeWindow()
  |
[MyLib::SizeWindow] calls gluPerspective()
  |
[GLU.so::gluPerspective] calls glFrustum()
  |
[GL.so::glFrustum]


I am loading all libraries (GL, GLU, and my toolkit library)
using dlopen(lib, RTLD_GLOBAL | RTLD_NOW). Obviously there
is a linker problem, and GLU is ending up with invalid or
uninitialized pointers to the GL functions.

What could be different about dynamically loading libraries
from the application and dynamically loading libraries from
a shared library? Shouldn't they all end up in the same
address space? Am I just misinformed? Confused? Daft?

Any help would be greatly appreciated.

Jason
379


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

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

From: [EMAIL PROTECTED] (Paul D. Smith)
Crossposted-To: alt.os.linux,linux.dev.c-programming,linux.dev.gcc
Subject: Re: Why compiling "-static" creates HUGE binary???
Date: 05 Jun 2000 10:28:56 -0400
Reply-To: [EMAIL PROTECTED]

%% Graham Stoney <[EMAIL PROTECTED]> writes:

  gs> I doubt it will be fixed though, because malloc/free/malloc_stats
  gs> and friends all reside in a single .c file so that their internal
  gs> state variables can easily be made static and avoid polluting the
  gs> global namespace.

Not too hard.  You just need to write a function that returns all that
data in a "malloc stats" data structure or something.  That function
goes in malloc.c (it doesn't call any printing functions so that's OK),
and then you write a different .c file containing malloc_stats() that
invokes that function to get the data, and prints it out.  If you don't
call malloc_stats, you won't get the dependency on printf, etc.

Having that data available programmatically would probably be a Good
Thing anyway; it could well be useful for other purposes besides just
printing statistics.

-- 
===============================================================================
 Paul D. Smith <[EMAIL PROTECTED]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
===============================================================================
   These are my opinions---Nortel Networks takes no responsibility for them.

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

From: [EMAIL PROTECTED] (Michael Kerrisk)
Subject: O_LARGEFILE support
Date: Mon, 05 Jun 2000 14:57:23 GMT

Under the open(2) man page it states that the O_LARGEFILE flag does
the following:

"On  32-bit  systems  that  support the Large Files System, allow
files whose sizes cannot  be  represented  in 31 bits to be opened.
The Linux kernel does not yet have the  support  for  this  (as  of
2.1.130), but the flag definition is there and the userspace LFS
interfaces are present in the  glibc 2.1 test releases."

Are there any currently existing file systems that support large files
(Ext2 is limited to 2GB)?  Does this situation change with 2.3/2.4?
Does Ext2 allow large files in 2.4?

Thanks

Michael



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

From: Crossbeam Systems <[EMAIL PROTECTED]>
Subject: US-MA: Concord - Embedded Engineers Needed
Date: Mon, 05 Jun 2000 07:54:19 -0700

Crossbeam Systems designs, manufactures, and markets open,
carrier-class service systems that improves the financial
performance of existing public networks. It does this by
enabling the mass market provisioning of advanced,
personalized services at high margin. Crossbeam's first
products will enable the deployment of services to Internet
access subscribers in both enterprise and consumer markets.
Crossbeam's products co-exist seamlessly with traditional
access, transport and provisioning systems. They compliment
and enhance existing network infrastructure investments.
The foundation for the business model for Crossbeam is
Open, Carrier-class platforms for advanced service
deployment. Crossbeam has accomplished significant amounts
in understanding how mass market opportunities arise as
applications migrate into the Network and become services.

You will be developing in C/C++. You should have in-depth
experience with UNIX or Linux systems programming.
Previous experience with large WAN data communication
networks systems as well as understanding of
telecommunication networks. Experience in developing
software for high speed embedded systems. Good
understanding of architectures and hardware along with
understanding of high level protocols. Proficient in C or
C++. First hand knowledge and understanding of software
development methodologies.  Strong communication and
interpersonal skills.

There are no junior or entry level positions available
currently.

For more information, please contact:

Carrie Lussier
Crossbeam Systems
978-287-4116 x7519
978-287-4210
[EMAIL PROTECTED]




* 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: Wolfram Gloger <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux
Subject: Re: Why compiling "-static" creates HUGE binary???
Date: 05 Jun 2000 17:20:50 +0200

[EMAIL PROTECTED] (Paul D. Smith) writes:

> Not too hard.  You just need to write a function that returns all that
> data in a "malloc stats" data structure or something.  That function
> goes in malloc.c (it doesn't call any printing functions so that's OK),
> and then you write a different .c file containing malloc_stats() that
> invokes that function to get the data, and prints it out.  If you don't
> call malloc_stats, you won't get the dependency on printf, etc.

That would indeed be possible, and partially it is in fact already
realized like that.  However, printf is also called from the debugging
hooks in malloc.c, which are also closely entangled with static
variables in that file.

Anyway, I'm reconsidering a split of the file in the next version.

> Having that data available programmatically would probably be a Good
> Thing anyway; it could well be useful for other purposes besides just
> printing statistics.

You already have that data available, it's called mallinfo().

Regards,
Wolfram,

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

From: "Benjamin S. Vera-Tudela" <[EMAIL PROTECTED]>
Subject: farjmp and farcall
Date: Mon, 05 Jun 2000 10:31:06 -0500

Hi ... can anybody help me create an assembly macro for gnu gcc to do a
farjump and a farcall?

Something like:

#define farjmp(seg, offset) __asm__ __volatile__("jmpl %0, %1", seg,
offset);

(this one actually doesn't work, that's why I need help)

I want to be able to compile something like:

int main()
{
    short seg = 10;
    int (*offset) () = main;
    farjmp(seg, offset);
    return 0;
}

Thanks.

Benjamin S. Vera-Tudela
IBM - Austin, TX


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

Date: Mon, 05 Jun 2000 10:55:09 -0500
From: Jeffrey Ric <[EMAIL PROTECTED]>
Subject: polling the keyboard

I am developping a program that needs to be able to react when the user
presses a key.   I was wandering if there is a library call that I could
use to get the next character if something has been pressed or a null in
other cases.  (Program is written in C++).  Any help will be
appreciated.

Jeffrey


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

From: [EMAIL PROTECTED] (Georges HANSEL)
Subject: 2.4.0-test1, scsi, and YAMAHA
Date: 5 Jun 2000 16:01:57 GMT

 I have a Tekram 390 (T) card. The driver tmscsim is OK when compiled
with the kernel 2.0.36 but does not recognize my CDROM YAMAHA and my
scsi disk when compiled with the 2.4.0.-test1 kernel.

Georges Hansel

   I

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

From: Jeremy Young <[EMAIL PROTECTED]>
Subject: Re: Task swapping and screen output
Date: Mon, 5 Jun 2000 17:07:12 +0100

SCREEN does seem to do essentially what I want...however I do have the 
problem that the fact that there are several "sessions" running needs to 
be TOTALLY invisible to the user - he/she should only have access to one 
session, the others are just "listeners".

When the user disconnects a remote host PC will signal to screen (or 
whatever) to say the user has disconnected, then when a new user wants 
to use a different session this same PC will signal to screen that a 
user wants to run session 7 (or whatever!) and the user will be totally 
unaware that everything else is going on in the background....

I could spend time hacking screen but is there any library out there 
that may help with this task in a more, um, easily manipulated package?

Jeremy

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
kl.de says...
> Jeremy Young wrote:
> > I have a project to build a system which runs multiple telnet sessions
> > simultaneously. It must be possible to remotely switch between these
> > sessions so as only one session is ever viewed at any one time (Using
> > some form of a socket interface).
> > 
> 
> I think "screen" is an app doing essentially what you want, but it
> tackles it at a lower level, terminals. So it has not your problem with
> the data printed before, since they belong to the terminal. A little
> drawback is, that you have to access screen at shell level, it is not a
> library to use in your own app. Perhaps it is sufficient.
> 
> > man screen
> 
> SCREEN(1)                                               SCREEN(1)
> 
> 
> NAME
>        screen - screen manager with VT100/ANSI terminal emulation
> 
> 
> 
> SYNOPSIS
>        screen [ -options ] [ cmd [ args ] ]
>        screen -r [[pid.]tty[.host]]
>        screen -r sessionowner/[[pid.]tty[.host]]
> 
> 
> 
> DESCRIPTION
>        Screen is a full-screen window manager that multiplexes  a
>        physical  terminal  between  several  processes (typically
>        interactive shells).  Each virtual terminal  provides  the
>        functions  of  a DEC VT100 terminal and, in addition, sev�
>        eral control functions from the ISO 6492  (ECMA  48,  ANSI
>        X3.64) and ISO 2022 standards (e.g. insert/delete line and
>        support for multiple character sets).  There is a  scroll�
>        back  history buffer for each virtual terminal and a copy-
>        and-paste  mechanism  that  allows  moving  text   regions
>        between windows.
> [...]
> 
> Bernd Strieder
> 

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


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