Linux-Development-Sys Digest #191, Volume #8      Wed, 4 Oct 00 16:13:13 EDT

Contents:
  Re: SAN/FibreChannel installations ("sunnox")
  PPPoE Server;  Linux ; PPPd; Radius; PPPoE Server (Sean Watkins)
  Re: how to "send a signal" from kernel to user process? (Rick Ellis)
  Re: how to "send a signal" from kernel to user process? (Rick Ellis)
  Sony Memory Stick (Reinald Kirchner)
  Re: How SMP works in Linux (jwk)
  Re: How SMP works in Linux (Johan Kullstam)
  Best way to validate/process this lang-like data list? (M Sweger)

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

From: "sunnox" <[EMAIL PROTECTED]>
Subject: Re: SAN/FibreChannel installations
Date: Wed, 04 Oct 2000 17:57:09 +0200
Reply-To: [EMAIL PROTECTED]

Hi,

I have installed a SAN under linux. So it's very easy to do.

For the fiber channel card choose a QLogic (they are working very well 
under Linux the 2200X Serie) That's for the server

Then for your SAN you can use different kind of JBOD (just a bunch of
 disk), so just contact JBOD maker near your location (i think VA Linux is 
doing this now)

Then you must configure your kernel for working with it
Just enable in the Networking Option/ FibreChannel
Enable SCSI/SCSI QLOGIC

Then you reboot your system and all should be good (you must see a new
 device call /dev/sdXX)
So you need to create a filesystem on it (fdisk, then mkfs.ext2f /dev/sdXX)

And after you can mount it

That's all

I hope i help you in someway



In article <[EMAIL PROTECTED]>, "Dr. Armin Wittmann"
<[EMAIL PROTECTED]> wrote:


> 
> Hi
> 
> I am about to evaluate a new server installation for our high
> performance and high availability environment. Appropirate would be a
> SAN installation for our storage server and the attached server farm
> (many Linux server) used as webserver, e-mail server etc.
> 
> It is very hard to get information about support for Linux systems.
> Specifically driver support for FibreChannel adapters is needed.
> 
> If anybody can share with me some information, experience or forward
> some links on this topic I would appreciate very much.
> 
> Thanks
> 
> Armin

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

From: Sean Watkins <[EMAIL PROTECTED]>
Crossposted-To: comp.protocols.ppp,comp.dcom.xdsl,comp.os.linux.networking
Subject: PPPoE Server;  Linux ; PPPd; Radius; PPPoE Server
Date: Wed, 04 Oct 2000 17:04:01 GMT

Hi

I've written a PPPoE Server for Linux.

I have the server running fine with no session logging. Windows can
happily talk to to my PPPoEServer no problem.

I am now attempting to get the pppd processess using pam to write radius
account start/stop records.

In /etc/pam.d/ppp I have:

[root@pppoe ppp-2.3.10]# cat /etc/pam.d/ppp
#%PAM-1.0
auth       required     pam_nologin.so
auth       required     pam_pwdb.so shadow nullok
account    required     pam_pwdb.so
session    required     /lib/security/pam_radius.so debug
session    required     pam_pwdb.so

[root@pppoe ppp-2.3.10]#


I changed the default port # in services to be my radius account port,
and setup my /etc/raddb/server file.

PPPD successfully brings the connection up. PAM then goes to write a
session record. At this point, pppd crashes. I'm having alot of problems
determining why.

Can someone assist? Does anyone know any tricks to get PPPD & PAM &
radius accounting to all work together? Things seem to crash inside
libpwd:radius_acct_send:

(I've added some functions to radius_Acct_send to see what is going on..
I have no idea how to load a dlopend file inside gdb? help? I have a
sleep function earlier to enable me to attach to pppd)

/usr/src/redhat/BUILD/pwdb-0.60/libpwdb/radius/radius.c

    D(("Packet Built"));

    /*
     * The NAS and RADIUS accounting server share a secret.  The Request

     * Authenticator field in Accounting-Request packets contains a one-

     * way MD5 hash calculated over a stream of octets consisting of the

     * Code + Identifier + Length + 16 zero octets + request attributes
+
     * shared secret (where + indicates concatenation).  The 16 octet
MD5
     * hash value is stored in the Authenticator field of the
     * Accounting-Request packet.
     */


    memset(auth->vector, 0, AUTH_VECTOR_LEN);
    D(("1"));
    auth->length = htons (total_length);
    secretlen = strlen (server.secret);
    strcpy(send_buffer+total_length, server.secret);
    D(("2"));
    D(("auth = %s, length = %d", auth, total_length+secretlen));

    sleep(10);
    md5_calc(md5buf, (char *)auth, total_length+secretlen);
    D(("3"));
    memcpy(auth->vector, md5buf, AUTH_VECTOR_LEN);
    D(("4"));
    memset(send_buffer+total_length, 0, secretlen);
    D(("5"));

    D(("Secret Set"));



tail -f /tmp/pwdb-debug.log
[pwdb/pwdb_start.c:_pwdb_drop_entry(76)] called.
[pwdb/pwdb_start.c:_pwdb_drop_entry(76)] called.
[pwdb/pwdb_start.c:_pwdb_drop_entry(76)] called.
[pwdb/pwdb_start.c:_pwdb_drop_entry(76)] called.
[pwdb/pwdb_start.c:_pwdb_drop_entry(76)] called.
[pwdb/pwdb_start.c:_pwdb_drop_entry(76)] called.
[pwdb/pwdb_start.c:_pwdb_drop_entry(76)] called.
[pwdb/pwdb_start.c:pwdb_end(726)] called. (count=1)
[pwdb/pwdb_module.c:_pwdb_delete_policy(306)] called.
[radius/helpfunc.c:get_server_entries(121)] called
[radius/radius.c:radius_acct_send(556)] radius_acct_send x.x.x.x 1 0
[radius/radius.c:radius_acct_send(574)] Got IP of reomte server
[radius/radius.c:radius_acct_send(581)] Got Socket
[radius/radius.c:radius_acct_send(589)] Got local port
[radius/radius.c:radius_acct_send(638)] Build Username
[radius/radius.c:radius_acct_send(648)] Got Local Port
[radius/radius.c:radius_acct_send(672)] Packet Built
[radius/radius.c:radius_acct_send(686)] 1
[radius/radius.c:radius_acct_send(690)] 2
[radius/radius.c:radius_acct_send(691)] auth = �, length = 74





[root@pppoe pppd]# gdb pppd 17827
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...

/usr/src/redhat/BUILD/ppp-2.3.10/pppd/17827: No such file or directory.
Attaching to program: /usr/src/redhat/BUILD/ppp-2.3.10/pppd/pppd, Pid
17827
Reading symbols from /lib/libpam.so.0...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /lib/libutil.so.1...done.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
Reading symbols from /lib/security/pam_nologin.so...done.
Reading symbols from /lib/security/pam_pwdb.so...done.
Reading symbols from /lib/libpwdb.so.0...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /lib/security/pam_radius.so...done.
Reading symbols from /lib/security/pam_deny.so...done.
0x400e47f1 in __libc_nanosleep () from /lib/libc.so.6
(gdb) bt
#0  0x400e47f1 in __libc_nanosleep () from /lib/libc.so.6
#1  0x400e477d in __sleep (seconds=10) at
../sysdeps/unix/sysv/linux/sleep.c:78
#2  0x4016e0ef in radius_acct_send () from /lib/libpwdb.so.0
#3  0x401c89a4 in pam_sm_open_session (pamh=0x8075d18, flags=32768,
argc=1,
    argv=0x8075f00) at pam_radius.c:101
#4  0x400191d8 in _pam_dispatch_aux (pamh=0x8075d18, flags=32768,
h=0x8077270,
    resumed=PAM_FALSE) at pam_dispatch.c:78
#5  0x400195dc in _pam_dispatch (pamh=0x8075d18, flags=32768, choice=4)
    at pam_dispatch.c:269
#6  0x4001b5f4 in pam_open_session (pamh=0x8075d18, flags=32768)
    at pam_session.c:32
#7  0x8058907 in plogin (user=0xbffff790 "sean", passwd=0xbffff890
"abc123",
    msg=0xbffff9c8) at auth.c:1050
#8  0x8058642 in check_passwd (unit=0,
    auser=0x80707a9 "sean\006abc123\"�\237�", userlen=4,
    apasswd=0x80707ae "abc123\"�\237�", passwdlen=6, msg=0xbffff9c8)
    at auth.c:899
#9  0x80548d1 in upap_rauthreq (u=0x8071220,
    inp=0x80707a8 "\004sean\006abc123\"�\237�", id=1, len=12) at
upap.c:397
#10 0x8054807 in upap_input (unit=0, inpacket=0x80707a4 "\001\001",
l=16)
    at upap.c:323
#11 0x804e13d in get_input () at main.c:1120
#12 0x804d942 in main (argc=26, argv=0xbffffc24) at main.c:808
(gdb)
(gdb) l radius_acct_send
No line number known for radius_acct_send.
(gdb)
(gdb) n
Single stepping until exit from function __libc_nanosleep,
which has no line number information.

Program received signal SIGTERM, Terminated.
0x400e47f1 in __libc_nanosleep () from /lib/libc.so.6
(gdb) bt
#0  0x400e47f1 in __libc_nanosleep () from /lib/libc.so.6
#1  0x400e477d in __sleep (seconds=10) at
../sysdeps/unix/sysv/linux/sleep.c:78
#2  0x4016e0ef in radius_acct_send () from /lib/libpwdb.so.0
#3  0x401c89a4 in pam_sm_open_session (pamh=0x8075d18, flags=32768,
argc=1,
    argv=0x8075f00) at pam_radius.c:101
#4  0x400191d8 in _pam_dispatch_aux (pamh=0x8075d18, flags=32768,
h=0x8077270,
    resumed=PAM_FALSE) at pam_dispatch.c:78
#5  0x400195dc in _pam_dispatch (pamh=0x8075d18, flags=32768, choice=4)
    at pam_dispatch.c:269
#6  0x4001b5f4 in pam_open_session (pamh=0x8075d18, flags=32768)
    at pam_session.c:32
#7  0x8058907 in plogin (user=0xbffff790 "sean", passwd=0xbffff890
"abc123",
    msg=0xbffff9c8) at auth.c:1050
#8  0x8058642 in check_passwd (unit=0,
    auser=0x80707a9 "sean\006abc123\"�\237�", userlen=4,
    apasswd=0x80707ae "abc123\"�\237�", passwdlen=6, msg=0xbffff9c8)
    at auth.c:899
#9  0x80548d1 in upap_rauthreq (u=0x8071220,
    inp=0x80707a8 "\004sean\006abc123\"�\237�", id=1, len=12) at
upap.c:397
#10 0x8054807 in upap_input (unit=0, inpacket=0x80707a4 "\001\001",
l=16)
    at upap.c:323
#11 0x804e13d in get_input () at main.c:1120
#12 0x804d942 in main (argc=26, argv=0xbffffc24) at main.c:808
(gdb)




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

From: [EMAIL PROTECTED] (Rick Ellis)
Subject: Re: how to "send a signal" from kernel to user process?
Date: 4 Oct 2000 17:44:30 GMT

In article <8rekt7$l61$[EMAIL PROTECTED]>,
Z <[EMAIL PROTECTED]> wrote:

>> I wrote a network driver as a kernel module.  The driver needs to wake up
>> the user process whenever it receives a packet.  To do this, I have been
>> using /proc file system.  I have helper processes that polls on a /proc file
>> and sends signal to the user process.
>> 
>> I am wondering if there a way to "send signals" (SIGUSR1 nad SIGUSR2) to the
>> user process directly from the kernel module if I have the pid of the user
>> process?   The term "sending signal" might not make sense since I am
>> suspecting that it might be as simple as scheduling the user process with
>> some parameters.  I don't quite understand.
>> 
>> I have been looking at the source for few days and I am really confused.
>> Please help!

>The usual way to do what you want is to implement the select
>interface of your driver. The user process will call select(2)
>or poll(2) to wait for the signal you intend to send.
>Which is no IPC signal itself but simply the return form
>select/poll. 
>
>If you need your program to stay running while waiting for
>the driver you should call select with timout or put your
>select call into an extra thread.

What's wrong with having the driver send the process a signal like
he wants to do?  

--
http://www.fnet.net/~ellis/photo/linux.html

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

From: [EMAIL PROTECTED] (Rick Ellis)
Subject: Re: how to "send a signal" from kernel to user process?
Date: 4 Oct 2000 17:45:28 GMT

In article <8rdv7p$rke$[EMAIL PROTECTED]>,
Duke Lee <[EMAIL PROTECTED]> wrote:

>I am wondering if there a way to "send signals" (SIGUSR1 nad SIGUSR2) to the
>user process directly from the kernel module if I have the pid of the user
>process?

Certainly.  Do a grep through the driver sources for SIGIO and you'll
see how.

--
http://www.fnet.net/~ellis/photo/linux.html

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

Date: Wed, 04 Oct 2000 20:03:31 +0200
From: Reinald Kirchner <[EMAIL PROTECTED]>
Subject: Sony Memory Stick

Hi all,
I'm using a Sony Z600 Notebook and a Sony DSC505V Digicam. The camera
uses the socalled "Memory-Stick" as 
Flashcard, a convenient little chip. The Notebook has a Slot for reading
that chip. Of course there are only WinX-drivers supplied. So what I'd
like to know is:

Is anybody hacking a driver for that device?

If yes, I'd like to help/support a development like that, if not I would
appreciate any advice where to start
with, the only information available seems to be the PCI-Identification
and I/O Adresses, 
that the WinX System-Info supplies


Reinald
-- 
[EMAIL PROTECTED]
fon     +49 (0)241 503023
fax     +49 (0)241 503024
www     http://www.qbcl.de (not up yet...)

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

From: [EMAIL PROTECTED] (jwk)
Subject: Re: How SMP works in Linux
Date: 4 Oct 2000 19:07:20 GMT
Reply-To: [EMAIL PROTECTED]

On Wed, 4 Oct 2000 22:19:30 +0900, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>Isn't there any FAQ?
>
>my question is:
>Q1: What happens when one of two cpu dies in SMP kernel ?

I think the system crashes.

>
>Q2: When one CPU is processing kernel code, can the other CPU process
>application code ?

I'd guess so.

>
>Q3: TUX, a web server which runs in kernel mode, can be accelarated by
>multi-CPU ?
>
Yes, in tests in the German C't magazine it showed nearly linear
improvement from 1 to 4 cpu's.

Greetings,
Jurriaan

-- 
BOFH excuse #208:

Your mail is being routed through Germany ... and they're censoring us.
GNU/Linux 2.2.18pre14 SMP 9 users load av: 2.62 2.18 1.53

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

Subject: Re: How SMP works in Linux
From: Johan Kullstam <[EMAIL PROTECTED]>
Date: 04 Oct 2000 15:15:07 -0400

"???" <[EMAIL PROTECTED]> writes:

> Isn't there any FAQ?
> 
> my question is:
> Q1: What happens when one of two cpu dies in SMP kernel ?

i would expect the machine to fall on its face.  however, not having
any CPUs die on me yet, i really have no idea.  do you anticipate
having your CPUs fail often?

> Q2: When one CPU is processing kernel code, can the other CPU process
> application code ?

yes, of course.

> Q3: TUX, a web server which runs in kernel mode, can be accelarated by
> multi-CPU ?

i don't know.  what are you doing?  why do you think you need this?

-- 
J o h a n  K u l l s t a m
[[EMAIL PROTECTED]]
sysengr

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

From: [EMAIL PROTECTED] (M Sweger)
Subject: Best way to validate/process this lang-like data list?
Date: 4 Oct 2000 20:04:21 GMT
Reply-To: [EMAIL PROTECTED]



Hi,
   I'm trying to write a program that can read a data table that is used as a 
template to validate an incoming data sequence agains't this structure and
generate error messages. The data table describing the structure only contains
two language-like patterns: a statement sequence, and a nested loop. The data
pattern read in, is compared agains't this structure and error messages are
generated stating the current data value is out-of-order or unknown when there
is a mismatch. This would imply some sort of state machine which would be built
on the fly when the template is read in so that incoming data can sequence 
through it. Another possibility is to read  in the template and treat it as
a regular expression and generate alot of REXP rules and use a generalized
REXP algorithm (any REXP algorithms that I should consider here?). An
additional possibility would be, some sort of tree structure (any
suggestions or combos of tree sturcture types) with a recursion to handle
the loops - this is still vague in concept yet but similar to Abstract
syntax trees in compilers.

Note: there will be no instruction set generation or optimization since it
isn't computing anything, although code could be generated and compiled for the
template read-in to speed up the interpretation/validation of the incoming data
pattern. Moreover, I don't want to use Lex/Yacc since it can't handle dynamic
Lex rules and grammar unless a generalized algorithm can be written that is
applicable to the two basic language-like patterns such that it runs the
state machine like algorithm to buld a virtual state machine in memory
for validation purposes of the incoming data.

The other thing to consider is that the patterns in the template can be
mandatory or optional on a per pattern entry basis. The only restriction being
that if there is an end-loop data pattern, the loop start pattern must be
present. The same goes for any pattern within the loop, that the loop start
pattern must be present; otherwise all data patterns that make up the loop -
including the loop end pattern - can be optional. If the start loop pattern
is not present [optional] then all other patterns that make up the loop must
not be present [optional/mandatory], whereby the mandatory is only 
applicable if the loop is present in the incoming data pattern.


One use of this algorithm is to validate the structure of a data file that 
resembles a language-like structure so that once validated the data can be
extracted and processed. An example would be a DBMS that dumps multiple
tables in a certain order with single/multiple records into a merged file. Then
once it gets to another DBMS, this algorithm validates and extracts the merged
data and loads it into the appropriate DBMS table for that data pattern. Thus
one can think of the data pattern as being the table name or some alias
-assuming the two DBMS' tables aren't the same. Thus, each application
controlling their respective DBMS would know about the alias data pattern and
know which table to put it in based on the alis to table name mapping.


Here is an example of what the data pattern template structure might look like
graphically and by which the incoming merged data file containing these data
patterns would have to be validated agains't. The possible
solutions to easily do it,  is what I'm not sure about.

Any suggestions are appreciated.

Notes:  The D# is only for purposes here to give line #'s and won't be
        validated. The letters A0,A-F are the data patterns. The numbers
        after the brackets illustrates the loop structure and nesting
        along with the number of times maximum this loop can be repeated.
        The mandatory/optional requirement isn't shown for each data
        pattern, but controls whether the data pattern in the sequence
        needs to be validated or not to determine if the validation
        algorithm needs to generate an error message or just skip over it.


D0      A0

D1      A ------------------------------,
D2      B  --------------,              |
D3      C  --,           |              | 
D3      C    |    3      |  20          |
D3      C  --' ----------,              |
D2      B                               |
D3      C                               |
D3      C                               | 
D3      C                               |
                                        |
        .                               |
        .                               |         99
        .                               |
D4      D  -----,                       |
D4      D       |     10                |
D4      D       |                       |
D4      D -----'                        |
        .                               |
        .                               |
        .                               |
                                        |
D5      E ------------------------------'

D6      F
 


 


--
        Mike,
        [EMAIL PROTECTED]


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