Russell Coker: What is Valid SE Linux Policy?
Guido Trentalancia started an interesting discussion on the SE Linux policy development list about how to manage the evolution of the policy [1].
The Problem
The SE Linux policy is the set of rules that determine what access is granted. It assigns types to files and domains to processes and has a set of rules that specify all the permitted interactions between processes and files (among many other things). The policy evolves over time to match the requirements of programs (applications and daemons). As a program evolves the things that it does will change and the SE Linux policy will tend to evolve to permit the set of all operations that were requested by all versions because people only complain when things stop working not when excessive privilege is granted. So we need to periodically remove old allow rules from the policy.
One difficulty in this regard is the fact that multiple versions of programs are often available for use at the same time. Debian in particular has a good history of providing separate packages for the old and new versions of programs such as Apache to meet the needs of users who want the tried and tested version and of users who want the newer version with better performance, more features, better documentation, or something else good. There is also a demand to have the same policy work with multiple versions of a distribution without excessive effort. Finally all the distributions that have SE Linux support have different people deciding when the new version of a daemon is ready for inclusion and therefore there is a need to support multiple versions for multiple distributions. So support for older versions of daemons can t be removed easily.
One of the things I do to make these things a little easier to manage is to put ifdef( distro_debian', before any Debian specific bits of policy. When policy is conditional and only used in Debian I can freely remove it at any future time if Debian works well without it. Also it doesn t matter if such Debian specific policy allows access that is not needed or desired in other distributions, the only down-side to this is that sometimes other distributions need to repeat work that I did, they determine what access is needed for their configuration and discover that it was already enabled for Debian.
What is Valid Policy?
We went to only have Valid Policy (as described by Christopher J. PeBenito), so the challenge is determining what is Valid Policy.
It seems to me that there are three type of access granted by valid policy (it is debatable whether type #3 is valid):
- Access that is needed for an application to perform it s minimal designed task.
- Access that is needed for the application to perform all the optional configurations, EG an ftpd running from inetd or as a daemon, and daemons like http server being granted access to ssl keys or not.
- Access that is needed to perform all the operations the application requests, but which the application doesn t require or shouldn t require if it worked correctly.
- In most cases this can be determined without too much effort. For example a web server needs to listen on port 80 and read files and directories that relate to data. When writing policy I can write a lot of the allow rules without even testing the application because I know from the design what it will do. A large part of the other access is obvious in a I can t believe I didn t realise it would need this sense.
- The main question here is whether we have booleans (settings which can be tuned at run-time by the sysadmin which determine how the policy works) to specify which optional tasks or whether we allow all access for optional configurations by default. The secondary question is when certain unusual corner cases should be not supported at all such that the people who do such unusual corner cases need to use audit2allow to generate local policy to allow their operations.
- Sometimes we have to allow things that we really don t like. Even when we write policy to allow a daemon to do unusual things (such as using /root instead of /var/lib) it s still a lot better than running without SE Linux. Also SE Linux policy to allow such obviously broken things stands out and is a constant reminder that the daemon needs fixing, this is better than allowing symptoms of broken design to be forgotten.
A few days ago I did an
Linux 2.6.38 and 2.6.39
As you've probably seen, the testing suite finally got a new
upstream kernel version (Linux 2.6.38) and is currently synchronised
with unstable. I'm just about to upload a new version of linux-2.6
based on upstream stable update 2.6.38.4.
Linux 2.6.39 is well on its way to release, so 2.6.39-rc4 should
soon be in experimental. The Debian source package will add support
for the new armhf (ARM with hardware floating-point) architecture.
Splitting linux-2.6
The linux-base package, introduced to handle transitions and other
support functions for 'image' packages, is now built from a separate
source package. It won't be changed very often, so you will no
longer need to upgrade linux-base every time you upgrade an 'image'
package. (This doesn't apply within 'squeeze', but I may have a
way to work around that.)
The firmware-linux-free package, containing a few firmware and
configuration blobs from Linux that are DFSG-compliant, is also now
built from a separate source package. These blobs have not changed
for a very long time, so again you will no longer be recommended to
upgrade this package every time you upgrade an 'image' package.
Secondly, this allows us to remove the entire 'firmware' directory
from the upstream source rather than carefully removing and patching
to leave just the DFSG-compliant bits.
Wireless regulations
The '2.4 GHz' and '5 GHz' ISM bands used for wifi are not defined
identically around the world. The exact frequency ranges and
maximum permitted power levels vary between countries. Radio
equipment manufacturers have a legal responsibility to ensure their
equipment operates within these regulations. Since it is expensive
to implement such regulations in hardware (including many different
variants for different regions), these restrictions are usually
implemented in the driver using a country code retrieved from the
hardware's EEPROM or flash. So this is now our responsibility.
We need to be able to look up regulations by country codes, and we
also need to support the case where a device sold in one country is
used in another country with tighter regulations. For some time,
the wifi configuration library (cfg80211) included regulatory
information for a small number of countries and regions. However,
the default since Linux 2.6.34 has been to build-in only the 'world'
domain (intersection of all the restrictions) and to request
information from user-space. In Debian, we didn't have anything to
provide this information, so for example channels 12-13 became
unavailable for users in Europe.
The regulatory information should be provided by the Central
Regulatory Domain Agent (CRDA) from a current database. These are
now packaged as
Meike Reichle is a Debian developer since 2008 but has been involved for longer than that, in particular in Debian Women. She s a great speaker and shared her experience in a

For marathon freaks, Boston marathon is a mythical one. Probably more
than New York marathon, because this is the world's oldest annual
marathon. Also because is is quite difficult to register for it (this
year, the 20,000 seats reserved for qualifiers were distributed
in....8 hours).
In order to qualify, runners must have a previous mark that depends on
their age and gender. For instance, in my age category (50-54), the
required mark for men is 3h30, something I never achieved yet. This is
what's required for the 2013 race. For 2012, it will be still 3h35,
but a rolling process will be held to give best runners priority.
So, in short, it will probably stay among my dream marathons
forever..:-)
The 2011 race happened yesterday and was a great event. Kenyan runners
Geoffrey Mutai and Moses Mosop even broke Haile Gebresselassie's world
record, set in Berlin, back in 2008. The ran in 2h03'02" while
Gebresselassie's mark is 2h03'59". However, this record will not
become official because Boston's race is one-way (thus with a
possibility of consistent tailwind) and has a too big altitude
difference between start and finish. However, many consider that hills
on the race compensate this quite strongly, so this year's time is a
really great time.
And, really, from all reports I read and all images I saw, the level
of support you get from the crowd is incredible there, with world
famous moments like Wellesley College "scream tunnel", or Kenmore
Square where, traditionnaly, the Red Sox have a game prior to marathon
and the crowd then goes from Fenway Park to Kenmore Square to cheer
the runners for their final mile (I have no idea how they can manage
the unpredictable length of a base-ball game).
And I can't even mention the final mile on Commonwealth Av., then
Bolston St. Everybody who ran this once says this is something you
have to do once in your life.
So, well, I'm still crossing fingers..:-)...Maybe, one day a miracle
happens, I can qualify *and* I get a seat and I fly to Boston...
So we're just over 2 weeks away from our next set of local
elections in the UK (May 5th), and alongside those elections we're
also being asked about switching to a new voting system for future
elections. For a long time we've used the simple First Past The Post
(FPTP) system here, but now we have the possbility of moving to
Alternative Vote (AV) instead.
First Past The Post
FPTP is simple to understand - the person who receives more votes
than any single other person wins. But that simplicity is the only
good thing, and there are many problems with it. It's unfair: in an
election with 10 candidate, it's possible for a winner to have just
11% of the vote, even in the case where the other 89% of voters would
consider them to be the worst option. It's also very susceptible to
tactical voting, leading to nasty tactics in parties' election
literature like claiming "party foo cannot win here, so don't waste
your vote on them - vote for us instead!". See
this
(This is part of a series of posts on 
That bread is zwieback, then there is cherry moos, bohne berrogi, verenike, and of course, sausage.
Here are Jacob and Oliver enjoying their food:



I m online again. (In case you didn t notice, duh ) Seems as if we
(the Telco/ISP guy and me) just needed to look at it hard enough for
it to go away first he could dial in, using my account data, which
I probably should change now, then herc with