LWN.net Logo

Patch summary: regulatory domains, network channels, and virtualization

Here's a quick look at a few patches have been posted recently.

802.11 regulatory domains

Standard wisdom says that putting policy decisions into the kernel is generally a bad idea. Policies implemented in kernel space limit the flexibility of the system, potentially keeping user-space from doing everything it could possibly accomplish. There are times, however, when that is exactly what one might want to do.

Wireless networking presents a number of challenges for the kernel. One of them is imposed entirely from the outside: anything which can transmit tends to be heavily regulated. So wireless networking adapters must not transmit on unauthorized frequencies or at power levels above those allowed by law. Needless to say, the applicable rules vary from one jurisdiction to the next, making it impossible to work with a single set of constraints, especially if one wants to use the hardware to its full, legal potential in any given country. The need to adhere to regulatory constraints is one of the favorite reasons given by wireless adapter vendors when asked why they cannot release programming information for their hardware.

Luis Rodriguez is trying to address regulatory issues with a patch set implementing regulatory domain information in the kernel (and in the Devicescape 802.11 stack in particular). At this point, the work is just infrastructure which tracks the constraints imposed by any given domain and the current domain under which the system is operating. Actually implementing compliance with the current domain has been left for a future exercise - there are some 802.11 stack issues which need to be resolved first.

If this patch set is eventually accepted, there will be a single framework by which all wireless adapters can be operated in a legal manner, wherever the computer might happen to be located. Beyond doing the right thing with regard to the spectrum, Luis hopes that this mechanism might be enough to satisfy the various regulatory agencies that Linux has its act together in this regard - and that vendors will no longer feel the need to keep their programming information secret. Luis, it seems, is an optimistic sort of person.

Network channels

Meanwhile, things have been quiet for a while on the network channels front. But that does not mean that nothing has been happening. As proof, consider that Evgeniy Polyakov has just surfaced with a new net channels patch which, he claims, can scale significantly better than the current networking implementation.

This version of network channels focuses more on the user-space interface side of the problem, leaving most of the kernel infrastructure work for another time. To that end, it adds a new system call, netchannel_control(), to hook up channel functionality to user-space code. netchannel_control() is another one of those multiplexer interfaces that Evgeniy seems to favor; it functions like an ioctl() call with three core operations:

  • NETCHANNEL_CREATE creates a new channel bound to given local and remote addresses. There is also a "type" specification which describes how the channel operates with user space.

  • NETCHANNEL_SEND will send a packet out on the network.

  • NETCHANNEL_RECV blocks until an incoming packet is received, then passes that packet to user space.

The kernel side of the implementation, for now, is simple and straightforward: a NETCHANNEL_SEND call will allocate an sk_buff structure and fill it with user data with copy_from_user(); the packet is then sent on its way via the network stack in the usual manner. The design envisions adding other, faster ways of moving data around - using Evgeniy's network allocator mechanism, for example - in the future.

The current patch adds a user-space network stack which uses the new netchannel mechanism. It claims to handle TCP and UDP currently, with a number of the expected features; there is a "socket-like interface" presented to applications. There has been no public reaction to this patch set so far, so it is hard to say whether it makes sense to the other network developers or not. Evgeniy appears to be a persistent sort of person, however, so expect to see this code again.

/dev/kvm

Finally, this large patch set posted by Avi Kivity may stir things up a bit in the virtualization area. These patches implement support for Intel's virtualization extensions (AMD support is said to be forthcoming), allowing Linux systems to easily run virtual machines without the need for a full hypervisor like Xen. It should be noted that the patch set includes a fair amount of Xen code, though.

With this patch set added, a Linux system implements a new device called /dev/kvm. Opening this device creates a new virtual machine which can then be manipulated with a set of ioctl() calls. One important operation creates virtual CPUs for this machine; currently only a single virtual CPU is supported. There is an operation which adds a memory region to the client machine. Memory is organized into "slots" modeled after the physical slots on a motherboard; they are useful for setting up structures like the memory hole at 640K still found on PC-type systems. Other operations allow for the creation of page table entries in the client, manipulating virtual machine registers, intercepting privileged operations, and actually running a program in the client. A set of debugging operations is provided as well.

There is a fair amount of interest in this patch set; it looks like it could be a (relatively!) simple way of adding hardware virtualization support to the kernel. One comment which has been posted remarks on the similarities between this functionality and the work which has been done to support the "synergistic processing units" (SPUs) on the Cell architecture. The SPU support, which has been in the kernel since 2.6.16, uses a special-purpose filesystem (rather than ioctl()) to control the clients. Any sort of merger between these two subsystems would thus likely involve the /dev/kvm interface being changed. So this patch set could change quite a bit as it heads toward eventual inclusion.


(Log in to post comments)

regulatory domains

Posted Oct 26, 2006 3:41 UTC (Thu) by dlang (✭ supporter ✭, #313) [Link]

one thing to note is that what is illegal for the general population to do is frequently very legal to do with a license.

for example a Ham Radio Operator is allowed to operate on frequancies, power levels, and antennas that the general population is not (and do other things like modfying the transmitter hardware). An interesting result of this is that Hams are takeing stock wireless cards and modifying them to versions that are only allowed to be used by people with (or under the supervision of someone with) the appropriate license

there will always be people who modify their equipment to do illegal things (look at the CB radio band for a perfect example), but if the restrictions are clearly spelled out and documented there can't be any claims of ignorance.

David Lang

regulatory domains

Posted Oct 26, 2006 18:00 UTC (Thu) by smitty_one_each (subscriber, #28989) [Link]

Taking the thought a step further, we have driver's licenses: why not wireless licenses? Go learn the basics of not blowing up the neighbor's cel phone with your 802.11x setup, and then have a firmware-less network experience.
We trust folks with cars and (in some places) guns; what's a bit of RF?

regulatory domains

Posted Oct 26, 2006 18:15 UTC (Thu) by dlang (✭ supporter ✭, #313) [Link]

actually, every transmitter (and almost all receivers) are regulated and licensed.

what you think of as wireless is actually licensed under some fairly restrictive terms (low power, antenna limits, no end-user tinkering, must accept all interferance from other devices, etc) in exchange for not requireing that each transmitter be licensed individually by ID, owner and location.

David Lang

regulatory domains

Posted Oct 27, 2006 18:40 UTC (Fri) by giraffedata (subscriber, #1954) [Link]

dlang is talking about a license given to a manufacturer to manufacture a transmitter, whereas smitty_one_each is talking about a license given to an operator to operate a transmitter.

As I understand it, in bands such as wireless telephone, the government's policy is normally to license the manufacture and then let people freely use whatever legally manufactured transmitters they can get their hands on. That makes lots of sense, but does shut out a certain class of use. In particular, it makes governments unwilling to license the manufacture of transmitters with easily modifiable control programs, which is what we Linux people would like.

So what if the government additionally gave licenses similar to ham radio licenses for use of the wireless telephone band? A user of the band could choose: use a licensed transmitter or be a licensed operator.

That does raise an issue of how to force users to choose one or the other, and not just go totally unlicensed. How does that work in the ham band? Maybe the risk of abuse just isn't as great in the ham band as in the telephone band?

In any case, this is just academic. There are not enough people who want to build their own custom telephone transmitters to make a whole licensing system for them practical.

regulatory domains

Posted Nov 2, 2006 13:03 UTC (Thu) by arcticwolf (guest, #8341) [Link]

Why does there have to be a technical solution to what is essentially a social problem? Cars don't prevent people without a valid driver's license from starting and driving them, and guns don't prevent people without a proper license from firing them.

Why do RF transmitters have to prevent people without a valid license from using them?

regulatory domains

Posted Nov 3, 2006 3:36 UTC (Fri) by giraffedata (subscriber, #1954) [Link]

Why do RF transmitters have to prevent people without a valid license from using them?

[To be precise, what the transmitters prevent is people from using them for certain kinds of transmissions; there's no user license involved]

It all comes down to practicality. It is far cheaper to regulate manufacturers of transmitters than users of them for the same effect. The money we save can buy stuff more valuable on the whole than the freedom for a few geeks to have more flexible transmitters.

I believe certain kinds of firearms in certain places are in fact illegal to manufacture for the same reason: it's easier than enforcing the law against shooting people.

Technology provides lots of solutions to social problems, of course. I don't see how there's anything wrong with that.

/dev/kvm

Posted Oct 31, 2006 20:02 UTC (Tue) by Baylink (subscriber, #755) [Link]

What an unfortunate choice of TLA...

"Biggest IT problem in the 21st century?"

"Only 17,576 TLAs..."

Copyright © 2006, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds