Linux-Development-Sys Digest #391, Volume #8      Fri, 5 Jan 01 06:13:09 EST

Contents:
  Doing Trans-Proxy for UDP services - how to use MSG_PROXY? (Charles Reindorf)
  Re: mounting floppy (Nyra McGavin)
  Re: QUES: Uninterruptible BOGO MIPS udelay access from application (Kaz Kylheku)
  Re: IPChains incompatible with Kernel 2.4.0-test12
  Re: device driver programming (Red Hat 7.0) (dm)
  rpcgen does not compile (Michael P Davison)
  Re: Error compiling gcc 2.95.2 (Juergen Heinzl)
  Re: mounting floppy ([EMAIL PROTECTED])
  Re: Forcing a Core Dump (Stefan Braun)
  Re: device driver programming (Red Hat 7.0) (Hiroshi Motoyama)
  Re: device driver programming (Red Hat 7.0) (Hiroshi Motoyama)
  MODULE_PARM (Hiroshi Motoyama)
  Re: removing mouse causes Linux to crash/hang. kernel 2.4 ("sccsb")
  Svgalib error with quake2 and 2.4.0test12 (Clifford Kite)
  Re: getpwuid() (mike harris)
  how to change linux kernel to copy the ramdisk from anywhere?! ("paul")
  how to change linux kernel to copy the ramdisk from anywhere?! ("paul")
  Re: MODULE_PARM (ratz)
  Kernel 2.4 ("David Findlay")
  Re: Linux with < 2 MB RAM, is it possible (Thomas Steffen)
  ioperm() ([EMAIL PROTECTED])
  Re: removing mouse causes Linux to crash/hang. kernel 2.4 (Matthew Palmer)
  two mice on a linux box ("David Baldwin")

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

From: Charles Reindorf <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Doing Trans-Proxy for UDP services - how to use MSG_PROXY?
Date: Thu, 04 Jan 2001 17:29:15 +0000


Hello,

I am attempting to write a daemon that does transparent proxying for
SNMP over UDP.

Obviously, I need to set up ipchains or its modern equivalent to
redirect UDP packets to my proxy's port. Obviously, I then need to
ensure that I can get at the real destination address of the packets I
receive and that I can set (spoof) the source addresses of the packets
that I send.

Obviously also this is different when writing a UDP-based transparent
proxy (connectoinles, kernel cannot have a clue), versus TCP-based (as
for example in transproxy, where everything can be done more-or-less
under the hood by the kernel - just about).

I am currently researching how to get around this and have discovered
code in the kernel (net/ipv4/udp.c) which recognises the flag MSG_PROXY
and does some awful hack with the second half of the from or to sockaddr
structure.

The manual page for "send" has some comment about "must document this
sometime" on my relatively recent distro (Suse 7.0).

Whilst I think I have half of a clue as to how to do it, based on what I
saw, it would be nice to track down some notes / documentation /
previous code that also uses this feature. I wonder if anyone can help.

Scanning about for the term MSG_PROXY seems to yeild little, and I don't
inhabit any notable mailing lists on this subject. Am I out of luck?


Thanks,


Charles Reindorf.

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

From: Nyra McGavin <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup
Subject: Re: mounting floppy
Date: Fri, 05 Jan 2001 08:10:14 +1300

Hi Hung,
 /etc/fstab entry for /dev/fd0 usually has the filesystem option
 set to ext2.
 Change the option to auto which will cause the mount command
 to work with both ext2 and msdos or create another /dev/fd0
 entry with the filesystem option msdos.
 See man fstab for details.
 
Cheers,
Keith  



"Hung P. Tran" wrote:
> 
> I have a standard installation (using typical installation)
> of Redhat Linux 6.1. I am having problem mounting floppy
> drive. I tried:
> 
> mount -t msdos /dev/fd0 /mnt/floppy <RETURN>
> 
> and get the error: the kernel does NOT recognize /dev/fd0 as
> a block device (may be 'insmod driver' ?)
> 
> Any idea ? It seems like the regular Redhat installation does
> NOT include the floppy driver.
> 
> Please advice.
> 
> Thank you in advance,
> 
> hung

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: QUES: Uninterruptible BOGO MIPS udelay access from application
Reply-To: [EMAIL PROTECTED]
Date: Thu, 04 Jan 2001 19:37:52 GMT

On Thu, 4 Jan 2001 16:06:22 GMT, Tom J <[EMAIL PROTECTED]> wrote:
>Hello.  I have read most of the mini howto on bogo mips.
>I take it that this is a strictly kernel thing, so I could use udelay(us)
>in a driver.  By the way, is it uninterruptible?

No. If you want it to be unterruptible, use __cli() and __sti() around
it to disable interrupts on the local processor.

But consider the race condition in doing so. What if an interrupt goes
off just before you call __cli()? Effectively, it becomes part of your
delay time. It's therefore naive and useless to write a delay function
which disables interrupts. You want to invoke the fine-grained delay in
some synchronization context which is already interrupt-disabled.  E.g. 

    disable interrupts
    (A) do something with hardware
    invoke delay
    (B) do something else with hardware
    enable interrupts

This ensures a reasonably predictable delay between events (A) and (B)
because interrupts are disabled across the events as well as the delay.

>Is there access for applications to udelay  uninterruptibly so tthat nothing
>else can happen (as long is power is on)  during the timer loop?

No.

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

From: [EMAIL PROTECTED] ()
Subject: Re: IPChains incompatible with Kernel 2.4.0-test12
Date: Thu, 04 Jan 2001 19:59:01 -0000

In article <931sbl$t6o$[EMAIL PROTECTED]>,
Markus Spiritus Familiaris <[EMAIL PROTECTED]> wrote:

>I just installed the new hackerkernel 2.4.0-test12 on my linux box
>i achieved to compile and everything, machine boots up.
>
>but there's a problem:
>kernel gives out the following:
>"IPCHains FAILED: Incompatible with this kernel: Protocol not available"
>I have turned on the options required for NAT/IPCHAINS in the kernel
>compilation questions, but it still doesnt work;
>i dont know why.
>hm.
>i have SuSE 6.3 installed on my box. With the standard kernel supplied with
>this package (i think its 2.2.13 or so) masquerading works.

Did you read the Changes file?  Here's what it says about ipchains:

Networking
==========

General changes
===============

The IP firewalling and NAT code has been replaced again.  The new
netfilter software (including ipfwadm and ipchains backwards-
compatible modules) is currently distributed separately.

If you have advanced network configuration needs, you should probably
consider using the network tools from ip-route2.

--
http://www.spinics.net/linux

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

From: dm <[EMAIL PROTECTED]>
Subject: Re: device driver programming (Red Hat 7.0)
Date: Thu, 04 Jan 2001 21:55:06 +0000

aminudin wrote:

> Hello guys ;
> I'm still learning how to develop device driver for Linux.
> I use Red Hat 7.0 .
>
> My module program can't work properly .
>
> I compiled and tried to load the module into the kernel but it gave "
> Kernel version mismatched " error .
>
> The kernel version is 2.2.16  but the module program was compiled for
> the 2.4 .
> If we check the  <linux/version.h> file  ,   kernel_version =
> 2.4.0-0.26 .

Hi,


I had the same problem with RedHat 7.0.

The file version.h defines the kernel as 2.4.0. I changed this to
2.2.16-22 on my machine and the modules compile ok!



Dm


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

From: Michael P Davison <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: rpcgen does not compile
Date: Thu, 04 Jan 2001 20:53:57 GMT

I am trying to compile util-linux-2.10m with cryptograhy patch 
util-linux-2.10m.int.patch so I can mount encrypted directories, etc. 
The patch applies fine, but I run into problems when I run ./configure
and get this message:  "Your rpcgen output does not compile".

As far as I can tell rpcgen does function.  I someone posted a message
somewhere when they had this problem, saying that they only had the
problem with Debian, which is also what I am using.  I don't believe
that installing another flavour of linux is a good way to solve this
problem.

Suggestions, anyone?

Thanks, Mike

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

From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: Error compiling gcc 2.95.2
Date: 4 Jan 2001 21:47:05 GMT

In article <_vv46.42462$[EMAIL PROTECTED]>, Fruitbat wrote:
>Has anyone successfully applied the glibc 2.2 patch to gcc 2.95.2? I have
>tried but it continually fails.
[-]
If you can you might get gcc-2.95.2.1 which does not require it or wait for
2.95.3 which is in the queue.

Some minor question too, mind I didn't re-build gcc-2.95.2.1, you did use
the "official" gcc-2.95.2 sources and not the ones supplied by your
distribution ?

Cheers,
Juergen

-- 
\ Real name     : J�rgen Heinzl         \       no flames      /
 \ EMail Private : [EMAIL PROTECTED] \ send money instead /

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

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.setup
Subject: Re: mounting floppy
Date: Thu, 04 Jan 2001 23:02:04 GMT

In article <[EMAIL PROTECTED]>,
  "Hung P. Tran" <[EMAIL PROTECTED]> wrote:
> I have a standard installation (using typical installation)
> of Redhat Linux 6.1. I am having problem mounting floppy
> drive. I tried:
>
> mount -t msdos /dev/fd0 /mnt/floppy <RETURN>
>
> and get the error: the kernel does NOT recognize /dev/fd0 as
> a block device (may be 'insmod driver' ?)
>
> Any idea ? It seems like the regular Redhat installation does
> NOT include the floppy driver.

Redhat 6.1 does include the floppy driver (on my system).
Maybe the drive has failed, have you tested it with a
boot floppy?

>
> Please advice.

Check the file /var/log/dmesg for logs of the floppy drive init
at boot time, that should give you some clue what is broken.
Look right after the logs of hard drive init(s)
My dmesg logs look like this:

<snip>
hda: Seagate Technology ST31276A
hdb: WDC AC2420F
hdc: ATAPI 20X CD-ROM drive, 128kB Cache
Uniform CDROM driver Revision: 2.56
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
<snip>

Hope this helps
Bluster


Sent via Deja.com
http://www.deja.com/

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

Date: Thu, 04 Jan 2001 12:08:00 +0100
From: Stefan Braun <[EMAIL PROTECTED]>
Subject: Re: Forcing a Core Dump

Marc Schneider wrote:
> 
> I have a bug which is difficult to debug. I am getting intermitted
> Segmentation Fault in my program. If I run the program in a debugger, it
> doesn't segfault. I would like to force my program to dump core for all
> segfaults. Is there an easy way to do this?
> 
> BTW, I'm running RH6.1 if that make a difference.
> 
> Marc

To enable core files in bash: call 'ulimit -c unlimited' in the shell or
    put it into .bashrc.

Stefan

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

From: Hiroshi Motoyama <[EMAIL PROTECTED]>
Subject: Re: device driver programming (Red Hat 7.0)
Date: Fri, 05 Jan 2001 10:14:34 +0800
Reply-To: [EMAIL PROTECTED]

>

Hi ,

I wonder why they  use version 2.4 file instead of 2.2 .... hmmmm.Any idea
?



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

From: Hiroshi Motoyama <[EMAIL PROTECTED]>
Subject: Re: device driver programming (Red Hat 7.0)
Date: Fri, 05 Jan 2001 10:23:37 +0800
Reply-To: [EMAIL PROTECTED]


Hiroshi Motoyama wrote:

> >
>
> Hi ,
>
> I wonder why they  use version 2.4 file instead of 2.2 .... hmmmm.Any idea
> ?

May be Red Hat miss something .


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

From: Hiroshi Motoyama <[EMAIL PROTECTED]>
Subject: MODULE_PARM
Date: Fri, 05 Jan 2001 11:28:53 +0800
Reply-To: [EMAIL PROTECTED]

Hi ,

Do we have to use MODULE_PARM (......) in device driver for 2.2 kernel ?

What are the reasons ?

Thank you


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

From: "sccsb" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup
Subject: Re: removing mouse causes Linux to crash/hang. kernel 2.4
Date: Fri, 5 Jan 2001 12:13:57 -0800

Please help on the 2.4 kernel, since you have obvious experience with the
new kernel.
I've tried to compile the prerelease 2.4 kernel ... everything is fine but
when the LILO boots up. it says that its uncompressing and booting kernel
but hangs there. I had followed the readme very carefully but it proved to
be not effective
regards
cheah

"Robert Redelmeier" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Kasper Dupont wrote:
> > found that the keyboard driver used under
> > DOS detects the keyboard being pluged in
> > makes a beep and updates the keyboards
> > state.
> >
> > But if this should not be possible why is
> > it that DOS supports it?
>
> Just because something isn't recommended doesn't
> mean that MS-DOS won't do it :)
>
> Actually, I doubt DOS has anything to do with it,
> the beep is more probably in your machine's BIOS.
>
> The kbd controller probably generates some spurious
> int 9's when [dis]connected.  Your mobo has BIOS code
> to detect and reinitialize the kbd. It may even have
> "self-healing" fuses.  But Linux  replaces all
> of BIOS and doesn't have this re-init code.
>
> -- Robert



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

From: Clifford Kite <[EMAIL PROTECTED]>
Subject: Svgalib error with quake2 and 2.4.0test12
Date: Thu, 4 Jan 2001 22:02:30 -0600

I've installed 2.4.0test12 on a Slackware 7.1 system.  I've been
running quake2 with 2.2.18 on this system successfully, but with the
new series kernel it barfs with the mmap error message:

setting mode 3: 640 480
svgalib: mmap error in paged screen memory.

(Here preceded by the last of the normal messages which are the same
as those seen when quake2 is executed under 2.2.18)

The graphics card is an ATI XPERT 98 B APG with 8KB of memory.
The CPU is an AMD K6 500mHz, *not* overclocked, on a FIC PA-2013
motherboard with 128MB ECC memory, and about twice as much swap.

The same system is booted with both kernels, and there's been no
other problem running X, or anything else, under the new kernel for
the few days that I've used it.  Quake2 is executed in one of two
virtual terminal logins and no other user started program is running.
X is not running.

One thing that seems strange to me is that "free" shows no shared
memory (0) under the 2.4.0test12 kernel, everytime I've checked.
There is shared memory use from the start with 2.2.18, quake2 or
no quake2.

I'd very much appreciate any insight into what's happening as well
as any suggestions as to how to fix whatever is wrong.  If you need
more information, just ask.

-- Clifford Kite <[EMAIL PROTECTED]>                  Not a guru. (tm)

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

From: mike harris <[EMAIL PROTECTED]>
Subject: Re: getpwuid()
Date: Fri, 05 Jan 2001 04:56:02 GMT

i know it cant read the usename.
but, the passwd file has one entry:  "root::0:0:root:/:/bin/bash"
i have wtmp and utmp files.
i have hosts, host.conf, ld.so.conf,  nsswitch.conf,  pwdb.conf, AND i've properly
configured pam.

no password has been set for root...
is this a possible problem?

i know getpwuid() is getting passed an 0
as it should be for the superuser....

anybody? please?



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

From: "paul" <[EMAIL PROTECTED]>
Subject: how to change linux kernel to copy the ramdisk from anywhere?!
Date: Fri, 5 Jan 2001 12:11:51 +0800

I am trying Arm-Linux in Intel SA1110 (Assabet) develop-board!
Usually, I make new an image and then transfer boot+root to Assabet!!
Howeverm,the root(Ramdisk) is not changed
                  and too large for tranferring!!
So I want to fix the Ramdisk in Flash , and
I have written the Ramdisk file to Flash (Physical address 0x10000)

Because I cannot make a new angel boot loader,
I can only change linux kernel to copy the ramdisk to
its working virtual memory space (default 0xc0800000) from flash(0x10000).
Who know how to do it?!




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

From: "paul" <[EMAIL PROTECTED]>
Subject: how to change linux kernel to copy the ramdisk from anywhere?!
Date: Fri, 5 Jan 2001 12:12:13 +0800

I am trying Arm-Linux in Intel SA1110 (Assabet) develop-board!
Usually, I make new an image and then transfer boot+root to Assabet!!
Howeverm,the root(Ramdisk) is not changed
                  and too large for tranferring!!
So I want to fix the Ramdisk in Flash , and
I have written the Ramdisk file to Flash (Physical address 0x10000)

Because I cannot make a new angel boot loader,
I can only change linux kernel to copy the ramdisk to
its working virtual memory space (default 0xc0800000) from flash(0x10000).
Who know how to do it?!






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

From: ratz <[EMAIL PROTECTED]>
Subject: Re: MODULE_PARM
Date: Fri, 05 Jan 2001 09:43:54 +0100

Hiroshi Motoyama wrote:
> 
> Hi ,
> 
> Do we have to use MODULE_PARM (......) in device driver for 2.2 kernel ?

No, you don't have to use it but you can.

> What are the reasons ?

If you want to submit some parameters to insmod. Example:
insmod my_module.o i_like_kernel24=1

Then you would need to have a line

MODULE_PARM(i_like_kernel24, "i"); 

in your code.

> Thank you

HTH,
Roberto Nibali, ratz

-- 
mailto: `echo [EMAIL PROTECTED] | sed 's/[NOSPAM]//g'`

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

Reply-To: "David Findlay" <[EMAIL PROTECTED]>
From: "David Findlay" <[EMAIL PROTECTED]>
Subject: Kernel 2.4
Date: Fri, 5 Jan 2001 19:53:27 +1000

I just loaded Kernel 2.4. I thought I'd share these observations:

- loaded very nicely
- system seems faster on boot and multitasking
- grub doesn't like it - it produces CRC errors, so you need to use LILO
- NVdriver can't be insmod'ed.

Has anyone got NVdriver to go, with any patching? Anyone interested in
reverse engineering a open source Nvidia 3D driver?

David



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

From: Thomas Steffen <[EMAIL PROTECTED]>
Subject: Re: Linux with < 2 MB RAM, is it possible
Date: 05 Jan 2001 11:07:58 +0100

[EMAIL PROTECTED] (Daniel Aarno) writes:

> Is it possible to run linux on a 386 with less then 2 MB RAM?

You can run linux on a system with 2 MB RAM, even if 384 kB of these
are lost, as usual. You probably have to go back to version 1.0 or
1.2 and libc4, and you do need swap before you can do anything.
Basically, all known installation routines don't work :-)

Even less than that probably wont work. You may try to squeeze a few
bytes here and there, but less than about 1.5MB of usable memory
should be the limit.

There is however a project that aims to make linux run on embedded
systems, with down to 64kB of RAM. Linux86 or so should be the name.

> If it is, may I have some hints on what to chage or where to look
> for the changes

Try Slackware 1.x as a starting point for a 2MB-system, but you do
need at least 4 MB for the installation. 

                Thomas

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

From: [EMAIL PROTECTED]
Subject: ioperm()
Date: Fri, 05 Jan 2001 10:04:03 GMT

Hi,

I'm trying to develop a little program to manage the serial port and a
digital I/O module but I get a SIGSEGV error message. The I/O module is
located at the addresses 200H-203H, and the code of the program is:

        #include <sys/io.h>

        main(){
                int i = ioperm(0x200,4,1);
                outb(0x202,0x36);
        }

Could anybody tell me what is happening? Thanks in advance.

        Jose Luis Ayala


Sent via Deja.com
http://www.deja.com/

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

From: [EMAIL PROTECTED] (Matthew Palmer)
Crossposted-To: comp.os.linux.setup
Subject: Re: removing mouse causes Linux to crash/hang. kernel 2.4
Reply-To: [EMAIL PROTECTED]
Date: 5 Jan 2001 16:20:51 +1100

sccsb is of the opinion:
>Please help on the 2.4 kernel, since you have obvious experience with the
>new kernel.
>I've tried to compile the prerelease 2.4 kernel ... everything is fine but
>when the LILO boots up. it says that its uncompressing and booting kernel
>but hangs there. I had followed the readme very carefully but it proved to
>be not effective

It could be one of a number of things.  The problem with -test (and
development) kernels is that they may not be stable.  By running test
kernels, you implicitly agree that they may break, and that if they do,
you'll generally either help to fix the problem, or ignore it and hope
someone else fixes it.

I would suggest going back to a 2.2 kernel, maybe testing each new -test
kernel to see if it fixes your problem.


-- 
=======================================================================
#include <disclaimer.h>
Matthew Palmer
[EMAIL PROTECTED]

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

From: "David Baldwin" <[EMAIL PROTECTED]>
Subject: two mice on a linux box
Date: Fri, 5 Jan 2001 10:31:51 -0000

Hi there, has anyone ever tried running two mice on a linux box at once?
I'm not worried about pointers on the screen, just as long as I can pick up
the input from the second device in my program.
(I've been trying to do this on mac but without any success so far)

I'm a complete newbie to linux apart from a bit of telnet, but willing to
learn if it means I can get this done!

if anyone's got any advice/files or urls that'd be fantastic!
thanks
dave



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


** 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 by posting to the
comp.os.linux.development.system newsgroup.

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