Wouter Verhelst: Whoo
I'm actually doing other things
right now, but this was just too much fun to ignore:
I've
been promoted!.
Woot.
Off to do other things, now.
I'm actually doing other things
right now, but this was just too much fun to ignore:
I've
been promoted!.
Woot.
Off to do other things, now.
The 3D-printing technology has gained quite a big momentum in recent times. Its use is spreading widely even among hobbyists and many sources report daily several (sometimes weird) examples of its usage. The thing I like most, as a Free Software activist, is that several 3D-printing-related free and open source software are already available and quite good, and some printers are even released as free hardware.
Unfortunately, Debian is quite lagged behind with regard to the availability of such software in our archive, especially compared to other distributions who already ship much of it. Hopefully this situation will change drastically thanks to the brand new Debian 3D-Printing team, whose purpose is to make Debian a rocking platform to do some serious 3D-printing.
The team is bootstrapping right now, and we are looking for volunteers who are willing to help us. Packagers are greatly welcomed, but also triagers, users and passionate people with some experience in the field are extremely valuable.
People willing to join the team can take a look at our (in-progress) wiki page and apply on the team page on Alioth. As with any good packaging team, a mailing list is available to share ideas, feel free to subscribe it, and feel free to join #debian-3dprinting on OFTC if you want to hang out with other team members.
Yesterday was the first day of my new routine, except I haven't really
established the new routine yet. I think that's going to take a few weeks. It
was, however, the first day of Zoe's new routine, she started Kindergarten.
"Kindergarten" is a bit of an ambiguous term, even within Australia, it
seems. Back when I went to school, there was "pre-school", which was, as
best I can determine, what "Kindergarten" is now, except a year later. It
was optional, half a week, and the year preceding the start of primary
("elementary") school. I think every other state was already doing an extra
year of school (which I think they called "Kindergarten", "Kinder", or
something starting with "K") so Queensland blew up "pre-school", created
"Prep" and now that's the first year of primary school. Zoe will start
"Prep" next year.
Then the Queensland education boffins realised that kids were missing out on
the stuff that "pre-school" used to offer, so they reintroduced it in the
form of "Kindergarten"
(by Queensland standards). It's supposed to be play-based, and isn't really
"long day care". Zoe does Monday, Tuesday and every other Wednesday, from
8:30am until 2:20pm.
I'd only heard about C&K from a
friend after moving back to Brisbane, so we were very fortunate to secure a
place without having camped out on a waiting list from birth. We got very
lucky, and ended up getting multiple offers, but we're pretty thrilled with
the one that Zoe got into. It's a relatively new facility, right next to a
state school and some bushland. They take the kids on excursions into the
bushland, and up to the state school where there's some chickens. The
Kindergarten facility itself is really lovely.
Anyway, yesterday was Zoe's first day. I biked there yesterday morning
(without Zoe) and it took me about 11 minutes. It took me more like 15
minutes to pick her up with the bike trailer. It's uphill on the way there,
but not too much of a slog.
It's been really great that Zoe's BFF from day care, Megan, also scored a
place in the same Kindergarten, as I think this will help the transition for
both girls greatly.
I was able to stay for an extended period of time to help settle Zoe in, and
I was able to leave without her being particularly distressed.
I then biked home, running a few errands along the way. I then got stuck
into a woodworking project (I'm trying to make a
little wooden clothesline for Zoe).
It turns out trying to cut a halved joint with a
hand saw and chisel is a lot of work. I've managed to aggravate an old
rotator cuff injury and the two pieces are a tad too tight, so I'm thinking
I'll redo it and cut the joint out with an electric router instead. I
probably spent at least a couple of hours faffing around with that.
So I banged away with a hammer and chisel for a bit, got a haircut, had a
late lunch and next thing I knew it was 2pm and time to head back on the
bike to pick up Zoe.
She was still asleep on her stretcher when I arrived to pick her up, which
wasn't that surprising, since she tends to sleep later and longer at day
care. I got a good opportunity to chat with her teacher about her first day
and then gently woke her up with a kiss, and we headed home.
I introduced Zoe to one of our new neighbours, and after a snack, we drove
into Fortitude Valley where I had to pick up some mail from my post office
box. When we got back home, I started on dinner while Zoe watched a little
bit of TV. I spontaneously invited my cousin over to join us for dinner, and
we walked down to the Hawthorne Garage for a babyccino after dinner.
It was a good day.
I realised that I'm going to have to be super regimented with my time on the
days Zoe is in Kindergarten, because 2pm is going to roll around very
quickly. "Scarcity brings clarity", as Sergey says...
Today was the first weekday of me taking care of Zoe. We got things started
more or less on the same routine that we used to do when she had day care, so
we were dressed and ready to roll by about 8am.
We baked a batch of mini cornbread
muffins, and had them ready by the time my 9:30am chiropractic appointment
rolled around, so we took a few with us for morning tea for my chiropractor and his
receptionist.
I've taken Zoe with me on a few occasions, and speak of her often to my
chiropractor. He's a dad himself, and the first few times I brought her in, he
juggled for her, so she thinks he's pretty cool.
Last night, Zoe had expressed a desire to go to Southbank today. It was initially
looking like it'd be too rainy, but by the time I was done with the
chiropractor, it looked safe enough to venture out, so we went back home, and I
prepared a picnic lunch for us, and we caught a bus over to Southbank.
We had a bit of a splash around in the water and then ate lunch. Zoe had a
great time alternating between feeding and chasing seagulls, crows, and an
ibis. My girlfriend, who works in South Brisbane, walked over and joined us
briefly and then we all walked back towards the bus and parted ways.
Southbank mid-week is pretty nice. Not too busy.
It was a slow walk home from the bus, but the reward of a My Little Pony
biscuit was enough to get her racing ahead of me from the corner. After a
biscuit and some quiet time, she fell asleep and I've had a couple of hours to
read and write blog posts, as well as plan future activities.
I'm hoping that we'll have enough time to go birthday present shopping for a
4th birthday party (for twins from Zoe's old day care) that we're going to on
Saturday morning after swim class, before Sarah arrives to pick her up, but I'm
dubious we'll get time. Zoe's still asleep as I write. There's always tomorrow.
We might be best off just baking the second batch of cornbread muffins.
It is unfortunate that I've been exposed to several companies that all need the same kind of problems solving, again and again:
Remote. Automated. System management.Throw in monitoring of metrics, security fixes, and reporting and there's probably a valuable service there. It probably can't happen though, for three main reasons:
There will be a new option in gcc 4.9 named -fstack-protector-strong , which offers an improved version of -fstack-protector without going all the way to -fstack-protector-all . The stack protector feature itself adds a known canary to the stack during function preamble, and checks it when the function returns. If it changed, there was a stack overflow, and the program aborts. This is fine, but figuring out when to include it is the reason behind the various options.
Since traditionally stack overflows happen with string-based manipulations, the default (-fstack-protector), only includes the canary code when a function defines an 8 (--param=ssp-buffer-size=N, N=8 by default) or more byte local character array. This means just a few functions get the checking, but they re probably the most likely to need it, so it s an okay balance. Various distributions ended up lowering their default --param=ssp-buffer-size option down to 4, since there were still cases of functions that should have been protected but the conservative gcc upstream default of 8 wasn t covering them.
However, even with the increased function coverage, there are rare cases when a stack overflow happens on other kinds of stack variables. To handle this more paranoid concern, -fstack-protector-all was defined to add the canary to all functions. This results in substantial use of stack space for saving the canary on deep stack users, and measurable (though surprisingly still relatively low) performance hit due to all the saving/checking. For a long time, Chrome OS used this, since we re paranoid. :)
In the interest of gaining back some of the lost performance and not hitting our Chrome OS build images with such a giant stack-protector hammer, Han Shen from the Chrome OS compiler team created the new option -fstack-protector-strong, which enables the canary in many more conditions:
-fstack-protector-all for about 10 months now.
As a quick demonstration of the options, you can see this example program under various conditions. It tries to show off an example of shoving serialized data into a non-character variable, like might happen in some network address manipulations or streaming data parsing. Since I m using memcpy here for clarity, the builds will need to turn off FORTIFY_SOURCE, which would also notice the overflow.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct no_chars
unsigned int len;
unsigned int data;
;
int main(int argc, char * argv[])
struct no_chars info = ;
if (argc < 3)
fprintf(stderr, "Usage: %s LENGTH DATA...\n", argv[0]);
return 1;
info.len = atoi(argv[1]);
memcpy(&info.data, argv[2], info.len);
return 0;
Built with everything disabled, this faults trying to return to an invalid VMA:
$ gcc -Wall -O2 -U_FORTIFY_SOURCE -fno-stack-protector /tmp/boom.c -o /tmp/boom $ /tmp/boom 64 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Segmentation fault (core dumped)Built with FORTIFY_SOURCE enabled, we see the expected catch of the overflow in
memcpy:
$ gcc -Wall -O2 -D_FORTIFY_SOURCE=2 -fno-stack-protector /tmp/boom.c -o /tmp/boom $ /tmp/boom 64 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA *** buffer overflow detected ***: /tmp/boom terminated ...So, we ll leave FORTIFY_SOURCE disabled for our comparisons. With pre-4.9 gcc, we can see that
-fstack-protector does not get triggered to protect this function:
$ gcc -Wall -O2 -U_FORTIFY_SOURCE -fstack-protector /tmp/boom.c -o /tmp/boom $ /tmp/boom 64 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Segmentation fault (core dumped)However, using
-fstack-protector-all does trigger the protection, as expected:
$ gcc -Wall -O2 -U_FORTIFY_SOURCE -fstack-protector-all /tmp/boom.c -o /tmp/boom $ /tmp/boom 64 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA *** stack smashing detected ***: /tmp/boom terminated Aborted (core dumped)And finally, using the gcc snapshot of 4.9, here is
-fstack-protector-strong doing its job:
$ /usr/lib/gcc-snapshot/bin/gcc -Wall -O2 -U_FORTIFY_SOURCE -fstack-protector-strong /tmp/boom.c -o /tmp/boom $ /tmp/boom 64 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA *** stack smashing detected ***: /tmp/boom terminated Aborted (core dumped)For Linux 3.14, I ve added support for
-fstack-protector-strong via the new CONFIG_CC_STACKPROTECTOR_STRONG option. The old CONFIG_CC_STACKPROTECTOR will be available as CONFIG_CC_STACKPROTECTOR_REGULAR. When comparing the results on builds via size and objdump -d analysis, here s what I found with gcc 4.9:
A normal x86_64 defconfig build, without stack protector had a kernel text size of 11430641 bytes with 36110 function bodies. Adding CONFIG_CC_STACKPROTECTOR_REGULAR increased the kernel text size to 11468490 (a +0.33% change), with 1015 of 36110 functions stack-protected (2.81%). Using CONFIG_CC_STACKPROTECTOR_STRONG increased the kernel text size to 11692790 (+2.24%), with 7401 of 36110 functions stack-protected (20.5%). And 20% is a far-cry from 100% if support for -fstack-protector-all was added back to the kernel.
The next bit of work will be figuring out the best way to detect the version of gcc in use when doing Debian package builds, and using -fstack-protector-strong instead of -fstack-protector. For Ubuntu, it s much simpler because it ll just be the compiler default.
2014, Kees Cook. This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
For some strange reason, I ve been receiving a lot of GPG-signed mail from Debian Developers and Maintainers lately. In response to each of these mails, I need to send a GPG-encrypted reply. The rate at which I m able to send replies has been significantly hampered by the poor state in which many DD/DM s maintain their GPG keys. Here are a few common mistakes, so you can consider correcting them.
Ensure you have a UID for the email address(es) you use
When I send an encrypted mail, I need to be sure that the recipient is legit. This means any decent mail client should refuse to send an encrypted message to foo@bar.com unless that email address is known somehow to GPG. In many cases, someone with a valid key for foo@bar.com would send their signed mail from foobar@gmail.com without that being a valid UID. In some cases, foo@bar.com isn t even a valid email address anymore (i.e. the bar.com mail server says no such mailbox).
You should have a UID for each address you use.
Signatures are per-UID
You may well have a valid UID for foo@debian.org, foo@bar.com, and foobar@gmail.com but the PGP trust model doesn t automatically trust every UID as much as its peers. Each individual UID needs to be trusted (i.e. signed/uploaded) by others. What if you added billg@microsoft.com as a UID should that automatically be trusted? Clearly not. Just because you have foo@debian.org doesn t mean it s trusted for encryption without some signatures.
Make sure you actually have an encrypting subkey
GPG sucks, and as a result, it reports Skipping unusable pubkey when the issue is a lack of valid encrypting subkeys. If you have revoked all encrypting subkeys, or allowed them to expire, then I cannot send you encrypted mail.
Exact naming matters
Bob Bobbertson <foo@bar.com> and B b B bb rts n <foo@bar.com> are different people. Check your mail client s From: setting, to ensure it matches your UID. If not, fix one of them.
Check your webmail plugin isn t shit
Some people use third party plugins to integrate GPG into their webmail client (e.g. Hotmail or GMail). Make sure this actually works.
Don t use Enigmail
Enigmail is a popular plugin to integrate GPG into Mozilla Thunderbird. It doesn t work, in most cases. Almost every single BADSIG in my inbox is due to Enigmail. Thunderbird will insert spurious line wraps and escape characters into your mail after signing, resulting in invalid signatures.
It s mostly okay if you never quote mail, and restrict messages to about 70 characters.
I know plenty of Debian Developers don t care about GPG other than for package signing but please, for the sanity of the rest of us, take an occasional moment to care a little.
I should note that the worst offenders for keys which don t just work were Developers with 1024D keys the best behaved were Maintainers of all stripes.
The uses of this particular rack I ll cover in future entries this is about how I made the rack itself, with help from friends (Steve McIntyre & Andy Simpkins). A common theme is making allowances for using dev kit boards ready-to-rack ARM servers are not here yet. My aim was to have 4, possibly 6 ARM dev kit boards running services from home, so there was no need for a standard 42U rack, a 9U rack is enough. Hence:








Select front camera, grant permissions
The permissions have to be granted each time a call is made. This is to protect the privacy of the user.
Call viewed from mobile device
Call viewed from browser on laptop
Friday was my last day
at Solarflare
Communications, which I joined in 2006 (originally as Level 5
Networks).
When I started, Level 5 Networks (L5N) had a 2-port gigabit Ethernet
controller called EF1 and a user-level network stack called
EtherFabric which ran on Linux. It had nearly completed the Falcon
project to develop a 10-gigabit controller (also supporing a 2-port
gigabit mode) and was porting EtherFabric to Windows. Later that
year, however, L5N merged with Solarflare Communications (SF), which
was developing a 10GBASE-T PHY (for 10-gigabit Ethernet over
twisted-pair cables). The investors and management saw the
opportunity to create an integrated 10GBASE-T LAN-on-motherboard
chip that would be attractive to OEMs and so had the potential for
mass sales. EtherFabric was put on the back-burner, but regular net
drivers for Linux, Windows and other operating systems became more
important.
In a change from my previous jobs, my initial role at L5N was to
maintain and extend the in-house test automation software, Runbench,
written in Python. I worked with Dickon Reed who had written most
of Runbench up to then. One of my first major tasks was to extend
it to cover DUTs running Windows. Aside from changing Runbench
itself, I wrote a simple SSH server to be installed on DUTs, using
the
Twisted.Python framework.
(Cygwin's port of OpenSSH wasn't suitable for running a lot of
native Windows commands.) I rewrote the test-installation script
for the Windows driver itself, converting it to Python (with a C
extension to get around
the WOW64
nonsense). As Windows does not allow loading a driver just once
(like insmod in Linux), except by using the kernel
debugger, I added a time check in the driver so the
test-installation script can make it fail early when reloaded after
a reboot, so that a crasher bug in the probe path would usually be
recoverable.
In 2007 I persuaded management in Cambridge to loan several older
servers to DebConf. I
took them there and back by car, and they were used to convert video
for live streams
and recordings.
(This was repeated in 2009.)
I was also asked to work on other small development tasks, including
some cleanup on the Linux net driver (sfc). In mid-2007, when SF
decided it was time to get sfc upstream (in-tree), I joined Steve
Hodgson and Robert Stonehouse in working on that.
Out-of-tree (separately distributed) drivers for Linux normally need
a large number of preprocessor conditions for compatibility with
Linux's kernel
module API across a range of supported versions. They may also
implement some features with a driver-specific interface that should
be replaced with a standard interface (possibly including the work
to define that standard). They may not comply with the kernel
coding style or unwritten conventions for kernel code. All of these
problems were present and had to be dealt with. As part of this
work, I extended unifdef
so that it could be used to remove all of the backward-compatibility
and not-for-upstream code without introducing extra blank lines. I
could then export the out-of-tree driver from CVS(!) into a kernel
source tree automatically and turn it into a patch or patch series
that would stand a chance of being acceptable upstream.
Our
first
few
attempts
got
little
response,
but eventually we newbies got the message that the driver was simply
too
big for a single submission and that putting patches on a web
site because they're too big for the list was not a solution. In
the next week, I removed about half of the code (on a git branch),
resulting in a relatively lean driver that could be sent to the
netdev list. And finally the 9th (I think) submission
was accepted.
Following this, I continued to work on sfc but was also brought into
the Siena project. Siena (SFL9021) was the LAN-on-motherboard chip
that had been planned following the merger. It combined a dual-port
controller based on Falcon with a 10GBASE-T PHY and a management
controller (MC) to support Lights-Out Management (LOM). (Since
10GBASE-T has not taken off, it is now mostly sold as the SFC9020
variant in which the PHY is disabled.) I worked on some of the test
framework and test cases for validating the controller design in
software simulation and FPGA. In the course of this I learned to
read and (somewhat) understand the chip design written in Verilog,
but only made a single trivial fix to it.
In August 2009, the first Siena ASICs came back from the fab. There
were a few ASIC-specific bugs but all of them were quickly worked
around in firmware, so it would soon be ready for production. But
there was much work still to be done on the driver and firmware.
The firmware had until then been running in a smaller block of RAM
with no peripherals to manage, while sfc had earlier been modified
just enough to configure a sim or FPGA for running a userland test
application. sfc now had many special cases scattered around it,
and would tell the MC firmware to peek and poke registers that were
no longer directly accessible from the host.
The software and firmware developers had agreed that, in order to
support LOM, the MC would be responsible for managing the ports and
all peripherals and drivers would send higher-level requests to the
MC. As a bonus, this removed the need for the driver to know the
details of each new board, so that it would not be necessary to
backport sfc into distribution kernels very often. Over the next
few months, the firmware team did an excellent job of defining and
implementing those operations, including writing the driver-side
functions to invoke them. Meanwhile, Steve and I concentrated on
refactoring sfc so most of the Falcon/Siena differences could be
abstracted through a few structures with function pointers.
The refactoring and new code for Siena were completed and submitted
upstream in several large patch series in October and November. In
fact, there were so many patches that Solarflare appeared in LWN's
table of who wrote Linux
2.6.33 (as did I, thanks also to another patch series adding
firmware metadata to many drivers). Sadly we had missed Linux
2.6.32 which was a longterm stable branch and used in many
distributions, but I was able to get this version backported into
all the major distributions over the next year.
(To be continued.)
Data science has been called "the sexiest job" so often, this has recently led to an integer overflow.
As a demo of the power of SIP and DruCall, you can make free calls to mobiles running Lumicall. It will also dial any number registered in ENUM.
Lumicall, the open alternative to Viber, FOSDEM 2014
I'll be giving a talk about the Lumicall project at FOSDEM 2014. The talk is at 13:00 on Sunday, 2 February in the Embedded and Mobile devroom. As space is usually limited in the devrooms and FOSDEM is a completely free event without any advance registration, please arrive early (maybe even 1 or 2 talks before mine) to get a seat.
Next.