Linux-Development-Sys Digest #282, Volume #6     Fri, 15 Jan 99 03:15:05 EST

Contents:
  Re: Shared memory between PCI device and application. (Ralph Metzler)
  Re: Open Configuration Storage - was Registry for Linux (Leslie Mikesell)
  Re: Registry for Linux - Bad idea (Leslie Mikesell)
  SIGSEGV exception handler problem ([EMAIL PROTECTED])
  Re: 2.2.0pre7 problem with can't find map file (Frank Hale)
  Re: SIGSEGV exception handler problem (Paul Flinders)
  Re: Registry - Already easily doable, in part. (Todd Knarr)
  Re: Registry for Linux - Bad idea (George MacDonald)
  Re: Memory allocated by libc fns ([EMAIL PROTECTED])
  Re: modules and unresolved symbols. ([EMAIL PROTECTED])
  Re: Obtaining MAC address from remote computer ("Sander Pilon")
  Re: Registry - Already easily doable, in part. (Leslie Mikesell)
  Re: Obtaining MAC address from remote computer (Paul Flinders)

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

From: Ralph Metzler <[EMAIL PROTECTED]>
Subject: Re: Shared memory between PCI device and application.
Date: 14 Jan 1999 15:53:31 +0100

[EMAIL PROTECTED] (Greg Johnson) writes:

> 
> Hi,
> 
> I am writting a device driver for a PCI card that my company is
> developing. I need to create, on demand, an area of locked down memory
> that is accessable by both an application program and the PCI device.
> The area need not be contiguous in physical memory, so using
> get_free_page several time would suffice. The PCI device can handle
> non-contiguous physical memory regions so this is not a problem
> either. The problem is, how the hell do I do this in Linux. I have
> been using the orielly book 'Linux Device Drivers' by Alessandro
> Rubini, he explains many scenarios for memory mapping, by my
> requirements don't seem to fit any explained in the book.
> 
> If anyone knows how to accomplish this, or knows of some other good
> resource for this kind of stuff please let me known.
> 

Look at the sources of bttv at:

http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html

In bttv/driver/bttv.c you will find routines like:

rvmalloc - vmallocs and reserves memory

and other helper functions to handle this and also mapping it into user memory.
E.g. to get the bus address (!= physical address on some machines, but the
same on i386+) of vmalloced memory you have to use kvirt_to_bus() ...

Hope this helps.

Ralph


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

From: [EMAIL PROTECTED] (Leslie Mikesell)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.setup
Subject: Re: Open Configuration Storage - was Registry for Linux
Date: 14 Jan 1999 22:35:57 -0600

In article <77ma2f$usm$[EMAIL PROTECTED]>,
Christopher Browne <[EMAIL PROTECTED]> wrote:
>
>>Using /proc a lot myself, I rather like this idea. If I understand
>>correctly a loopback file system would allow the implementation
>>to be a program vs in the kernel.
>
>I think so.  I have yet to make use of loopback for anything useful. 
>
>What The World Probably Needs is some common "loopback scheme" where the
>same "front end" code can be connected using a common interface to Linux
>and some of the BSDs.  

I'd like to see a generic 'overlay' filesystem where you start with
a read-only filesystem (probably CDROM or NFS mounted) but make it
appear read-write by transparently making local copies of any
modified files.  This would be useful alone to give you the ability
to share nearly-complete machine images by overlaying the few files
that make each host unique.  It might also mesh well with a bit
of additional magic to update the overlaid files to provide the
configuration facilities you are discussing.

  Les Mikesell
    [EMAIL PROTECTED] 

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

From: [EMAIL PROTECTED] (Leslie Mikesell)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.setup
Subject: Re: Registry for Linux - Bad idea
Date: 14 Jan 1999 23:10:54 -0600

In article <[EMAIL PROTECTED]>,
George MacDonald  <[EMAIL PROTECTED]> wrote:

>I find some end users who spend a considerable amount of time 
>customizing their software. Although these are fewer in number
>to those I see who are just trying to accomplish some task.

If you can generalize at all about this, you might say that
end users only spend time customizing their software if it
isn't 'good enough' by default.

>> From the admin perspective I would prefer that
>> machines just pick up their defaults automatically unless someone
>> who knows what they are doing specifically sets them up for
>> local overrides.  
>
>So if the OS has an ethernet card, and detects it's on a lan it could
>broadcast for "opStore" servers, then ask one or more of these for the
>settings for this "kind" of machine.

Broadcasting is a really evil thing to do and won't work if there
are routers between you and the server.  Better to issue an
http or tftp request to some well known name in your domain and
define some identifying token that should be in the response.

>I could see different users
>or machine types getting different settings. I suppose some profile
>information could be sent to the "opStore" server to help
>it define what information to return. 

The scheme will probably need some kind of identification and/or
authentication for some of the settings.

>> I think this suits the typical office/network
>> end user as well, and the developer who knows enough to be
>> dangerous can undo it to keep everyone happy.  However, I had
>> been thinking in terms of a new automatic servics for this.
>> Perhaps it really maps into what an NT domain controller does
>
>Could you briefly explain it, I don't know NT.

I'm not runnig a domain controller myself, but basically when you
'log in' to an NT domain your client machine sends you login name
and password to the controller, then executes a start-up script
from there that is supplied by the administrator - this can
link up drives, printers, etc.  Samba is supposed to emulate
most of the functionality of a domain controller now.  I don't
know where the client side stands in terms of being able to pick
up a file from the controller. 

>Well it would be nice to make that an option, however many
>users will not even have samba on their systems. I think
>what we are talking about could do what you describe,
>but it would not be "hard coded" that way. In some ways
>what you describe is like diskful clients that mount 
>$HOME from a network server, i.e. the NFS senario. And
>then perhaps mount local space into the remotely mounted
>$HOME. Hmm, yet another senario. Anyhow these are some
>of the existing techinques that solve part of the
>problem. NDS looks like the system that addresses more
>of the "network" problem than any others I have seen so far.

The problem is common enough that a lot of solutions have been
tried.  The net effect is that the adminstator has to do
everything a dozen different ways or limit the kinds of OS's
that he supports.  Or a company needs different administrators
for each networking protocol.  I'd hate to see Linux add yet
another to the mess without solving anything new.  There has
to be some way to 'discover' resources that uses one of the
existing protocols.

>Thier solution is a bit more network centric, I was thinking more
>of a model in which the network connections may/may not
>be there and may come and go(i.e. portables roaming).

Does the coda filesystem do anything that might be useful here?

  Les Mikesell
    [EMAIL PROTECTED]

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

From: [EMAIL PROTECTED]
Subject: SIGSEGV exception handler problem
Date: Thu, 14 Jan 1999 14:16:29 GMT

   ------------------------------
   Lotfi ALLAL
   algiers, algeria
   ------------------------------

   Hello everyone !

   Well, I have written a C program for linux/i386 to handle a SIGSEGV

   exception. In the program, I have :

   - allocated an int ( "a" variable )

   - set the "sig_handler" function as the SIGSEGV exception handler

   - set the "p" int pointer to the 0x1000 address

   and I would like (when the exception is generated) to set p to a,

   and then, to re-execute the instruction which caused the exception.

   But when I launch the program, I got:

   # Segmentation fault (core dumped)

   and I have compiled the program with gcc in the following way:

   # gcc signal.c -o signal

   The question is: what is wrong with my program ?

   I thank you in advance for your help.

   Best Regards.

=== program source code (begin) ========================================
#include <stdio.h>
#include <signal.h>
#include <asm/sigcontext.h>

int *a,*p;

int sig_handler ( int signum, struct sigcontext_struct info )
{
  p=a;
  return;
}

int main()
{
   a=(int*)malloc(sizeof(int)) ;
   signal(SIGSEGV,(void (*)(int)) sig_handler);
   p=(int*)0x1000;
   *p=1;
   printf("everything is ok now !\n");
   return 0;
}


=== program source code (end) =========================================


============= Posted via Deja News, The Discussion Network ============
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

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

From: Frank Hale <[EMAIL PROTECTED]>
Subject: Re: 2.2.0pre7 problem with can't find map file
Date: 15 Jan 1999 05:35:11 GMT

Frank Hale wrote:
> 
> I have 2.2.0pre7 loaded on my RedHat 5.2 box and everything is good. I
> upgraded my modutils package to modutils-2.1.121.
> 

Ooh and by the way I downloaded the src rpm and rebuilt it so to get rid
of the stupid __bzero errors. But it seems to do nothing any more
special than the stock 2.1.85 modutils that comes with RH 5.2.

-- 
From:      Frank Hale
Email:     [EMAIL PROTECTED]
ICQ:       7205161
Homepage:  http://members.xoom.com/frankhale/
Jade:      http://jade.netpedia.net/

Windows VirusScan 1.0 - "Windows found: Remove it? (Y/N)"

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

From: Paul Flinders <[EMAIL PROTECTED]>
Subject: Re: SIGSEGV exception handler problem
Date: 14 Jan 1999 15:11:53 +0000


[EMAIL PROTECTED] writes:

>    ------------------------------
>    Lotfi ALLAL
>    algiers, algeria
>    ------------------------------
> 
>    Hello everyone !
> 
>    Well, I have written a C program for linux/i386 to handle a SIGSEGV
> 
>    exception. In the program, I have :
> 
>    - allocated an int ( "a" variable )
>    - set the "sig_handler" function as the SIGSEGV exception handler
>    - set the "p" int pointer to the 0x1000 address
> 
>    and I would like (when the exception is generated) to set p to a,
>    and then, to re-execute the instruction which caused the exception.
>    But when I launch the program, I got:
> 
>    # Segmentation fault (core dumped)
> 
>    and I have compiled the program with gcc in the following way:
> 
>    # gcc signal.c -o signal
> 
>    The question is: what is wrong with my program ?

The _instruction_ which caused the segfault is re-executed, not the
statement

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

From: Todd Knarr <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Registry - Already easily doable, in part.
Date: 15 Jan 1999 05:46:00 GMT

In comp.os.linux.development.system Frank Sweetser <rasmusin> wrote:
> however, i'm hesitant to say that a special case check should be put in to
> force local machines config to override global configs.  if all values are
> assigned a flexible value (ie, an int) for priority, then it should simply
> be a matter of the admin never defining a network wide property to have a
> max value.  IOW, is it worth the extra code to hold root's hand? 

Actually I'd say there should be no need for a special-case check. The
system should be designed with the basic principle that the local system
decides where it'll get it's configuration and in what order, and that
one of the decisions it could make is "ask X and abide by it's decision
within defined limits". That makes it possible to set machines up to allow
centrally-dictated configuration ( defer everything to the central server )
without giving up the ability to munge things locally as needed.

For corporate systems where you want the users to not be able to mess with
the configuration, just apply the standard Unix solution: make the config
setup owned by root, make it writeable only by root, and don't give the
users the root password.

-- 
Contrary to popular belief, Unix is user friendly. It just happens to be
very selective about who its friends are. 
                                -- Kyle Hearn 

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

From: George MacDonald <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.setup
Subject: Re: Registry for Linux - Bad idea
Date: Fri, 15 Jan 1999 05:48:57 GMT

[EMAIL PROTECTED] wrote:
> 
> George MacDonald writes:
> > Anyhow john expressed a desire that we not do the system related
> > aspects. It was not clear why, and I would like to know what his concerns
> > are. There is always something outside my view/perspective that is
> > important, and I would like to hear it.
> 
> I have no objection at all to seeing the system related aspects done.  I
> just think they should be kept distinct from the application aspects.  Use
> seperate clients, servers, and databases for system and application stuff.
> It's fine if the system and application tools heve identical UI's.
> 
> My concern is that you not fall into the trap of treating the system as
> just another bunch of applications.  This could be very bad for stability
> and security.

Ahh, ok I see. Yes you are absolutely right, and I couldn't agree more.
The system level config would be handled by a systemStore which would
be considered a seperate and distinct entity. A "store manager" process
that would run as root would handle the interface to the store and provide
the services required. On linux this could use linuxconf to do the
work, if installed.

>From the applications perspective a "systemStore" would be useful as
it could simplify the interface to "system information". This would
typically be a read only kind of interface, in some rare cases I
could see apps requesting an update to system config info. This
could be handled nicely by using ACL's on the "config object attributes".

I too am very wary of introducing a "new dependency" in any of the 
low level system code/daemons. Doing so create's many potential 
incompatability/security/reliability problems. It would be
a "last resort" mechanism, i.e if there is no other way. If it
ever comes to that then such modifications must be made with
the minimum of intrusion and most definately be a compile time
option. 

In any event, I would only want to tackle the system related
info after the techniques and code have proved themselfs for
applications.

Thanks for responding!


-- 
We stand on the shoulders of those giants who coded before.
Build a good layer, stand strong, and prepare for the next wave.
Guide those who come after you, give them your shoulder, lend them your code.
Code well and live!   - [EMAIL PROTECTED] (7th Coding Battalion)

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

From: [EMAIL PROTECTED]
Subject: Re: Memory allocated by libc fns
Date: Thu, 14 Jan 1999 14:23:58 GMT

[EMAIL PROTECTED] wrote:
>    When using libc wrappers for syscalls like readdir ( struct dirent
>    *readdir(struct DIR *) , this library call allocates some memory for the
>    struct dirent it returns . My question is , who frees this memory and how ?
>    I tried to free it using libc function free(void *) but it segfaults.

You're not supposed to free that memory.  readdir(3) holds it and reuses it.
>From the man page:

    The data returned by readdir() is  overwritten  by  subsequent calls
    to readdir() for the same directory stream.

--
Skip Montanaro
Mojam: http://www.mojam.com/
Musi-Cal: http://concerts.calendar.com/

============= Posted via Deja News, The Discussion Network ============
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

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

From: [EMAIL PROTECTED]
Subject: Re: modules and unresolved symbols.
Date: Fri, 15 Jan 1999 04:56:19 GMT

I believe that genksyms is part of the kernel modutils. The source for which
can be downloaded from sunsite I'm sure...but it's not genksym but actually
modutils. In fact kernel.org have the correct versions of the source code for
each kernel in the directory of the kernel source itself.

Personally, I'm having massive amounts of trouble with modules at the moment
and in particular, modutils-2.1.121 the latest version. At first I thought it
may have been kernel-2.2.0pre but then went back 2.0 and still problems after
recompiling all the kernel source again. Grrrr.

Can anyone help with this probleme!

In article <[EMAIL PROTECTED]>,
  Edward Lee <[EMAIL PROTECTED]> wrote:
> I am having the same problem.  We need a newer version of genksym in
> modules!
> Can someone tell me where to get it?  I checked the followings:
>
> sunsite.edu, tsx-11.org, kernel.org
>
> without any luck.
>
> James A Simmons wrote:
>
> > What causes unresolved symbols in modules. Thank you.
> >
> > James Simmons
> > Linux System Admin
> > EdgeNet Inc.
> > [EMAIL PROTECTED]
> > http://www.edgeglobal.com/~jsimmons
>
>

============= Posted via Deja News, The Discussion Network ============
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

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

From: "Sander Pilon" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking
Subject: Re: Obtaining MAC address from remote computer
Date: Thu, 14 Jan 1999 17:25:47 +0100

I dont WANT the ethernet card MAC address.
I want a *COMPLETELY* transparant forwarder/NAT-device.

Meaning I want to send out packets with other machines MAC addresses.

Regards,

Sander

Dave Hearn wrote in message <77ks28$9ji$[EMAIL PROTECTED]>...
>Err - your ethernet card will insert the mac stuff for you
>
>
>Sander Pilon wrote in message <77kljl$aom$[EMAIL PROTECTED]>...
>
>>
>>Maybe I should've mentioned I want to do this in C on a per-packet basis.
>>
>>A packet arrived on eth0, I'm going to forward it to eth1 and I have to
>>insert a new MAC
>>address.
>>
>>Regards,
>>
>>Sander
>>
>>
>
>



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

From: [EMAIL PROTECTED] (Leslie Mikesell)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Registry - Already easily doable, in part.
Date: 14 Jan 1999 23:39:31 -0600

In article <[EMAIL PROTECTED]>,
Frank Sweetser  <[EMAIL PROTECTED]> wrote:

>> And often at a company they _will_ be forced from the top, and inevitably
>> there will be situations where this will be inappropriate ( maybe because
>> the company admins simply didn't ever think that this situation would come
>> up ). If your configuration system doesn't allow the local machine to
>> ignore mandatory top-down policies, you'll end up with a situation where
>> the $1k/hour consultant can't print the report the CEO _must_ have for
>> the board meeting in 15 minutes, and about 15 minutes after that your
>> configuration system will no longer be in use no matter how good it is
>> otherwise. This would be a Bad Thing.
>
>hmm... i see your point.  the "administrator" section does indeed equally
>span both the global network, and the local machine.

Keep in mind, though, that unless those printers are using one of
the chatty protocols like appletalk it isn't real likely that an
outsider is going to be able to find it, much less connect to it
without the administrator's help, so allowing the local override
still doesn't get the job printed.

>however, i'm hesitant to say that a special case check should be put in to
>force local machines config to override global configs.  if all values are
>assigned a flexible value (ie, an int) for priority, then it should simply
>be a matter of the admin never defining a network wide property to have a
>max value.  IOW, is it worth the extra code to hold root's hand? 

What we need is a polite way for an unknown client to discover the
available network resources (that the administrator wants to make
available to unknown clients...).  Appletalk and IPX just broadcast
names around all the time.  So does Windows neworking, but the
TCP flavor with a WINS server is at least moderately civilized about
it.
  Les Mikesell
    [EMAIL PROTECTED]

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

From: Paul Flinders <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking
Subject: Re: Obtaining MAC address from remote computer
Date: 14 Jan 1999 16:44:04 +0000

"Sander Pilon" <[EMAIL PROTECTED]> writes:

> I dont WANT the ethernet card MAC address.
> I want a *COMPLETELY* transparant forwarder/NAT-device.
> 
> Meaning I want to send out packets with other machines MAC addresses.

But if you're forwarding packets you _already_ know the source MAC
address because it's in the packet you recieved.

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


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