2008
Sub-archives
Einem geschenkten Gaul schaut man nicht ins Maul
Dieses Sprichwort werde ich heute mal großzügig missachten und über das leider relativ nutzlose Geschenk berichten.
Es begab sich, das Pollin Electronic an diesem Wochenend mal wieder die halbjährige Hausmesse stattfinden lies. Als extra Schmankerl sollte es ein "gratis" Mobiltelefon für jeden Besucher geben. Dieses entpuppte sich als ein LG KP100, einem nach dem ersten Eindruck brauchbaren Gerät ohne Kamera und sonstigem Schnickschnack, von Vodafon in Verbindung mit einer CallYa-Karte, welche auch sofort auf den Besucher registriert wurde.
Nach dem Auspacken und etwas mit Strom versorgen sollte es ausprobiert werden. Also die erstbeste - natürlich nicht von Vodafon - SIM-Karte ausgesucht und reingesteckt. Mehr als ein "mit dir mag ich nicht reden" und der Wahl zwischen Notruf und Unlock wollte es sich mit dieser Karte allerdings nicht entlocken lassen; der leidige SIM-Lock hatte also zugeschlagen.
Damit ist der Plan dieses Gerät als Zweittelefon für Umgebungen in denen Kameras unerwünscht sind oder falls gerade mal ausversehen der Akku leer ist zunichte gemacht und ich frage mich was ich mit dem Telefon und der zwangsweise auf mich registrierten Karte anstellen soll, für mich haben diese so keinen Wert und sind ein Fall für den Entsorger.
Laut der Aufschrift hat die Karte ein Guthaben von 10EUR und sollte für 19,95EUR verkauft werden. Da das Telefon gelockt ist muss ich davon ausgehen das es mehr Wert ist als dieser Preis, da die Subventionen ja immer als Grund herhalten mussten.
Aktueller Zustand: Telefon ist gelockt; ich bin sauer. Jemand der sauer ist wird nicht unbedingt gerne Kunde, wenn nicht unbedingt nötig und da das ganze verschenkt wurde gibt es ja nicht gerade den "Zwang" in Form eines Preisschildes das jetzt zu verwenden. Hypothetischer Zustand: Telefon ist nicht gelockt, ich bin nicht sauer. Jemand für den der eine Teil des Geschenks, das Telefon selber, nützlich ist, überlegt sich eher ob der andere Teil, die CallYa-Karte, auch nützlich sein könnte.
Vodafon kostet diese Aktion für jeden nicht gewonnenen Kunden den Einfauspreis für das Telefon und die vielleicht noch mit dem Kartenguthaben erzeugten Kosten. Nur durch das erlangen von Neukunden kann daraus Profit geschlagen werden.
Ich habe den Sinn dieses SIM-Locks nie verstanden. Was soll hier vor wem beschützt werden? Das was sind wohl die Subventionen die in die Telefone fliessen. Beschützt werden müssen diese wohl vor dem Kunden, da dieser sich ein neues Telefon kaufen muss wenn er woanders hingehen will anstatt es einfach mitzunehmen.
Ubuntu, Ubuntu
I was forced to try Ubuntu Hardy in the new university pool. The setup includes one Linux server dedicated for the pool, one Windows AD for Kerberos authentication, one Windows fileserver with user data and 20 clients. The clients are new HP machines with a Radeon Xpress 200 card.
First problem was nasty, the X server turned the display black and then crashed, leaving an unusable console behind. Even a blacklist of the radeon module does not work. Somehow the Xorg radeon driver loads the module on its own, ignoring the modprobe blacklist. Only a hard blacklist using install radoen /bin/false in the modprobe config was able to prevent this. Lets hope that the endeavors to remove much priviledges from the X server goes good.
For the homes two setups was tested:
- Homes on the Windows server via cifs, mounted via pam_mount using NTLM password.
- Homes on the Linux server via nfs version 3.
The first one just produced an error that some Gnome component was unable to lock ~/.ICEauthority. This could be worked around in the Xsession. Otherwise it was usable to slow, which may be a problem with the Windows server.
The later, plus a reinstallation with fglrx, produced first unresponsive OpenOffice.org windows and then a complete unusable Gnome desktop. I would not completely vote against a problem with fglrx or even a broken installation, but the amount of problems exceeded the threshold.
Now we will try Lenny and see if this also happens there. Especially home via nfs is not that uncommon that we can let it broken in a release.
Xen update
I found a machine which is not so ancient and did some tests with Xen on it.
Kernels
First was some tests with different Linux kernels and hypervisors (3.2 and 3.3). I have to say the overall compatibility got better. As unpriviledged domain (DomU) only one of the kernels failed, the one from Etch (2.6.18-6-xen-686) on the x86_64 hypervisor because of missing setup code.
For the operation as priviledged domain (Dom0) it looks not so good. The 2.6.18 from Xen 3.1 works mostly, the Lenny-targeted 2.6.26 is a little bit picky about the hardware and seems to work better in the 64bit variant, the 2.6.18 from 3.3 is old but rock-stable.
Stub domain
Xen 3.3 adds the possibility to move a the qemu which provides the emulated hardware for full virtualized domains in its own (paravirtualized) domain. The documentation is not really complete and the whole thing rather fragile. Error messages from the emulation domain are swallowed and depending on the config it also likes to crash.
It wants a new service, a filesystem backend, which is implemented in a root process in the dom0, even if it is not needed for operation. This service is not configurable, exports anything in /exports and allows writing, the code have similar quality then qemu.
Smallest UTF32 to UTF8 converter
I found some weird opcodes in the s390 instruction set some time ago. I finally want to use it as I have access to such a machine. The result is rather slim:
.globl cu41
.type cu41, @function
cu41:
.L2:
cu41 %r2,%r4
ipm %r1
srl %r1,28
chi %r1,3
je .L2
ltr %r1,%r1
je .L3
lcr %r1,%r1
lgfr %r3,%r1
.L3:
lgr %r2,%r3
br %r14
The cu41 opcode translates UTF32 to UTF8. Each "parameter" is a register pair [1], which describes address and length of the buffer. This opcode will return after a not specified number of translated characters. The rest is boiler plate code for condition code checking. The loop makes sure that anything is converted within the function unless another error occured.
| [1] | An even pair. gcc is not yet able to allocate such pairs on its own, so it is hardcoded. |
PV-GRUB and partitions
Xen 3.3 added a tool called PV-GRUB. It is a GRUB (legacy aka 0.97) built against MiniOS and bootable as a PV kernel. It works fine on a Xen 3.2.1.
It is easy to use, I just set this in my config:
kernel = "/usr/local/lib/xen/boot/pv-grub-x86_64.gz" extra = "(hd0)/boot/grub/menu.lst"
However it decided to not load my config as defined in the config and simply show me that:
GNU GRUB version 0.97 (524288K lower / 0K upper memory)
[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grubdom>
The reason is quite easy:
grubdom> root (hd0) Filesystem type unknown, using whole disk
Some debugging later, the reason is known and fixed.
grubdom> root (hd0) Filesystem type is ext2fs, using whole disk grubdom> kernel /boot/vmlinuz-2.6.27-rc5-amd64 grubdom> initrd /boot/initrd.img-2.6.27-rc5-amd64 grubdom> boot block error -1 for op 2 close blk: backend at /local/domain/0/backend/vbd/23/51712 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 2.6.27-rc5-amd64 [...] [ 0.000000] Command line: [ 0.000000] KERNEL supported cpus: [ 0.000000] Intel GenuineIntel [ 0.000000] AMD AuthenticAMD [ 0.000000] Centaur CentaurHauls [ 0.000000] ACPI in unprivileged domain disabled [...] [ 0.022093] Booting paravirtualized kernel on Xen [ 0.022101] Xen version: 3.2-1
Xen dropped support for non-PAE x86_32
For those who did not yet got it: Xen upstream decided to drop non-PAE x86_32 support from Xen.
Linux-VServer-replacement without patches?
As Linux-VServer is currently asleep, I thought about what may be possible only with the functionality the upstream Linux kernel provides and a helper module.
Process isolation
Isolation is the important feature VServer provides. Linux supports isolation of processes also in form of user, PID and IPC namespaces. User namespaces allows the same UID to be different. PID namespaces restricts the view of the available processes and allows the process only to address PIDs within it's own namespace.
Migration
VServer allows processes to enter a guest after it have been created, this is not possible without help.
fakeinit
Each PID namespace needs a child reaper (with PID 1).
Network isolation
VServer currently uses a layer 3 isolation model which assigns access to a specific list of IP addresses to a guest. It can be replaced by network namespaces and the accepted veth driver which provides a ethernet device.
Filesystem isolation
VServer uses FS namespaces in a way which allows processes in the FS namespace to access the host filesystem. This needs the chroot barier to make breakouts impossible.
I'm not sure if
mount --rbind $newroot / chdir /
will also properly prevent this.
How to clean filesystem namespaces
Dear lazyweb, use the following code to clean out a filesystem namespace on linux:
mount ("root", "root", NULL, MS_BIND, NULL);
pivot_root ("root", "root/tmp");
chdir ("/");
umount2 ("/tmp", 2);
mount ("none", "/proc", "proc", 0, NULL);
Broken DVDs
Today I got another broken DVD. It is the special edition of The Shawshank Redemption. It is rather new and libdvdread just chokes on it. At least the old one does, while the version in sid is able to read them, thanks to a small patch.
The DVD exploits a feature of the standard. The filesystem on it (UDF) provides a size for the info files (VTS_XX_0.IFO) and the corresponding backup file (VTS_XX_0.BUP). This sizes are void, only the offsets within the files matters. The sizes are just too small and libdvdread checked that while reading them.
Thanks to the patch, libdvdread now updates its internal knowledge while parsing the file. With the fix it is possible to play the DVD, at least with mplayer. But I want to play it on my machine without optical drive. I used dvdbackup to read other DVDs but it simply failed this time.
This DVD also have broken backup files. They have different sizes, sometimes they even look empty, and contents than the real ones. With the corrent amount of force (just ignoring them) and some magic (#467075) dvdbackup copies something to disk which is playable with mplayer (libdvdread) and totem (libdvdnav).
Okay, nothing is complete. This DVD contains another title set which seems to be never referenced. It have a completely bogus info file and a 1GB menu VOB.
As I have a copy now, I'm away, watching a really great movie.
Wie man TLS (nicht) verwenden sollte
Heute flatterte hier eine Mail rein mit folgendem Inhalt.
[D]er zugang [...] ist aus Sicherheitsgründen nur noch verschlüsselt über ssl [...] möglich.
Ich bin natürlich betroffen also kurz openssl anwerfen um etwas zu sehen bekommen was mir überhaupt nicht gefällt.
depth=0 /.../CN=informatik.uni-tuebingen.de verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 /.../CN=informatik.uni-tuebingen.de verify error:num=21:unable to verify the first certificate verify return:1
Er kann also zwei Sachen nicht prüfen,
- das Zertifikat und
- den Hostnamen.
Das nächste was openssl auspuckt macht alles klar.
Certificate chain 0 s:/.../CN=informatik.uni-tuebingen.de i:/.../CN=informatik.uni-tuebingen.de
Subject und Issuer sind identisch, also ist das Zertifikat wohl Selbstsigniert.
Man sieht einmal mehr das immer noch zuviele nicht verstanden haben, wann TLS/SSL überhaupt Sicherheit bringt. In dieser Form bringt es nur eines, nachträglich kann niemand nachschauen was an Daten geflossen ist, mehr aber auch nicht.
Liebe Admins, wenn ihr schon Sicherheitsgründe anbringt um TLS durchzudrücken, dann macht es bitte richtig. Das Zertifikat muss auf irgendeinen Weg nachprüfbar sein und der Hostname sollte stimmen.
