public inbox for linux-hams@vger.kernel.org
 help / color / mirror / Atom feed
* instant oops with AF_ROSE
@ 2011-07-06 10:57 David Miller
  2011-07-06 11:42 ` Chuck Hast
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2011-07-06 10:57 UTC (permalink / raw)
  To: netdev; +Cc: ralf, linux-hams


The support for ipv4 over rose devices has been broken for as long as
the code has existed (I went back to 2.0.x just to make sure).  Try
this:

modprobe rose
ip link set rose0 up
ip addr add 11.0.0.3/8 dev rose0
ping -b 11.255.255.255

That should crash your box pretty well.

The immediate reason is that rose_rebuild_header() calls
rose_route_frame() with second arg NULL.

The first thing rose_route_frame() does is take that second arg and
dereference it in order to find the appropriate rose neighbour to use.

Again, it has "worked" this way since day one.  Ie. it never worked.

Since this has never worked, I think the thing to do is to simply
remove all of the rose device code.  It's only used to provide support
for ipv4 over ROSE and it simply never worked.

If someone wants to resurrect this, that's fine, but they'll have
to implement proper header_ops and a real transmit function instead
of the hacky thing it does now where it does the transmit in the
header building routines :-/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: instant oops with AF_ROSE
  2011-07-06 10:57 David Miller
@ 2011-07-06 11:42 ` Chuck Hast
  0 siblings, 0 replies; 4+ messages in thread
From: Chuck Hast @ 2011-07-06 11:42 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, ralf, linux-hams

On Wed, Jul 6, 2011 at 06:57, David Miller <davem@davemloft.net> wrote:
>
> The support for ipv4 over rose devices has been broken for as long as
> the code has existed (I went back to 2.0.x just to make sure).  Try
> this:
>
> modprobe rose
> ip link set rose0 up
> ip addr add 11.0.0.3/8 dev rose0
> ping -b 11.255.255.255
>
> That should crash your box pretty well.
>
----- Text cut for bandwidth reduction-----------

It has been a while, and we were (still are I just am not active)  using FPAC
we have run a lot of IP through it, and never seemed to have a issue, but
perhaps this is not quite in that area.

I  am sure Bernard will see this and pitch in with more info. I am
just trying to
figure out if we are taking two different pieces here.

Here in FL I have ran both NetRom and IP over ROSE through FPAC boxes
with no issues that I can remember. FPAC is a wrapper around the rose piece.
We probably have people still doing IP inside ROSE through FPAC boxes around
the state, not sure who or where, but it would not be a surprise to me because
some use SMTP between their BBS devices.


Bernard, any comments?
-- 

Chuck Hast  -- KP4DJT --
To paraphrase my flight instructor;
"the only dumb question is the one you DID NOT ask resulting in my going
out and having to identify your bits and pieces in the midst of torn
and twisted metal."
---
Home web site:
www.wchast.com

ZoneMinder Demo and test site
www.wchast.com/zm
Login = guest
pwd   = guest
--
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: instant oops with AF_ROSE
@ 2011-07-09 15:05 Bernard F6BVP
  2011-07-20  9:32 ` Ralf Baechle
  0 siblings, 1 reply; 4+ messages in thread
From: Bernard F6BVP @ 2011-07-09 15:05 UTC (permalink / raw)
  To: wchast, davem; +Cc: linux-hams

Hi,

What we do with ROSE nodes is to create a network allowing AX25 frames 
routing based on destination address. However, basically, ROSE frames
are still AX.25 standard frames that can be sent over packet radio.
In order to relay rose frames through Internet, applications like 
ax25ipd encapsulates rose inside of IP or UDP frames.

I agree that rose module is still unfriendly and will crash linux kernel 
on some occasions.
For example, after creating rose socket and populating rose routing 
table, removing rose module is not possible.

There is either a kernel crash or a looping message

kernel:unregister_netdevice: waiting for rose0 to become free. Usage 
count = 6

where count can be any number without any relation to actual usage
and remaining the same, preventing Linux to shutdown.

I noticed that there are no refcount entries in rose node or rose neigh
structures. This may be related ?


Bernard, f6bvp



Chuck Hast wrote :

It has been a while, and we were (still are I just am not active)  using 
FPAC
we have run a lot of IP through it, and never seemed to have a issue, but
perhaps this is not quite in that area.

I  am sure Bernard will see this and pitch in with more info. I am
just trying to
figure out if we are taking two different pieces here.

Here in FL I have ran both NetRom and IP over ROSE through FPAC boxes
with no issues that I can remember. FPAC is a wrapper around the rose piece.
We probably have people still doing IP inside ROSE through FPAC boxes around
the state, not sure who or where, but it would not be a surprise to me 
because
some use SMTP between their BBS devices.


Bernard, any comments?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: instant oops with AF_ROSE
  2011-07-09 15:05 instant oops with AF_ROSE Bernard F6BVP
@ 2011-07-20  9:32 ` Ralf Baechle
  0 siblings, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2011-07-20  9:32 UTC (permalink / raw)
  To: Bernard F6BVP; +Cc: wchast, davem, linux-hams

On Sat, Jul 09, 2011 at 05:05:09PM +0200, Bernard F6BVP wrote:

> What we do with ROSE nodes is to create a network allowing AX25
> frames routing based on destination address. However, basically,
> ROSE frames
> are still AX.25 standard frames that can be sent over packet radio.
> In order to relay rose frames through Internet, applications like
> ax25ipd encapsulates rose inside of IP or UDP frames.
> 
> I agree that rose module is still unfriendly and will crash linux
> kernel on some occasions.
> For example, after creating rose socket and populating rose routing
> table, removing rose module is not possible.
> 
> There is either a kernel crash or a looping message
> 
> kernel:unregister_netdevice: waiting for rose0 to become free. Usage
> count = 6
> 
> where count can be any number without any relation to actual usage
> and remaining the same, preventing Linux to shutdown.
> 
> I noticed that there are no refcount entries in rose node or rose neigh
> structures. This may be related ?

As part of fixing the problem reported by David I've found 4 race conditions
so far.  I've posted the patches to linux-hams for testing but on a 2nd
thought I think the race accessing rose_neigh->use is unlikely to be the
cause for what Bernard is observing.

  Ralf

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-20  9:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-09 15:05 instant oops with AF_ROSE Bernard F6BVP
2011-07-20  9:32 ` Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2011-07-06 10:57 David Miller
2011-07-06 11:42 ` Chuck Hast

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox