New oppor­tu­ni­ties in the lin­ux­u­la­tor

Last week­end I com­mit­ted some dummy-syscalls to the lin­ux­u­la­tor in FreeB­SD-cur­rent. I also added some com­ments to syscalls.master which should give a hint which lin­ux ker­nel had them for the first time (if the lin­ux man-page I looked this up in is cor­rect). So if some­one wants to exper­i­ment with a high­er com­pat.linux.osrelease than 2.6.16 (as it is need­ed for a Cen­tOS based linux_base), he should now get some ker­nel mes­sages about unim­ple­ment­ed syscalls instead of a silent fail­ure.

There may be some low-hanging fruits in there, but I did not real­ly ver­i­fy this by check­ing what the dum­my syscalls are sup­posed to do in lin­ux and if we can eas­i­ly map this to exist­ing FreeB­SD fea­tures. In case some­one has a look, please send an email to

Send to Kin­dle

Addi­tion­al FEATURE macros on the way

It seems I have a bit of free time now to take care about some FreeB­SD relat­ed things.

As part of this I already com­mit­ted the UFS/FFS relat­ed FEATURE macros which where devel­oped by kibab@ dur­ing the Google Sum­mer of Code 2010. The net­work/ALTQ relat­ed FEATURE macros are in the hands of bz@, he already reviewed them and wants to com­mit them (with some changes) as part of his improve­ments of parts of the net­work relat­ed code.

The GEOM relat­ed FEATURE macros I just send some min­utes ago to geom@ for review. All the rest went out to hackers@ for review. The rest in this case is relat­ed to AUDIT, CAM, IPC, KTR, MAC, NFS, NTP, PMC, SYSV and a few oth­er things.

If every­thing is com­mit­ted, it should look a bit like this if queried from user­land (not all fea­tures are shown, those are just the ones which are enabled in the ker­nel in one of my machines):

kern.features.scbus: 1
kern.features.geom_vol: 1
kern.features.geom_part_bsd: 1
kern.features.geom_part_ebr_compat: 1
kern.features.geom_part_ebr: 1
kern.features.geom_part_mbr: 1
kern.features.kposix_priority_scheduling: 1
kern.features.kdtrace_hooks: 1
kern.features.ktrace: 1
kern.features.invariant_support: 1
kern.features.compat_freebsd7: 1
kern.features.compat_freebsd6: 1
kern.features.pps_sync: 1
kern.features.stack: 1
kern.features.sysv_msg: 1
kern.features.sysv_sem: 1
kern.features.sysv_shm: 1
kern.features.posix_shm: 1
kern.features.ffs_snapshot: 1
kern.features.softupdates: 1
kern.features.ufs_acl: 1

Send to Kin­dle

Some fix­es for ZFS on 7‑stable (more testers want­ed)

Due to the prob­lems with a 7-sta­ble machine, I had a look at some unmerged fix­es for ZFS (58 changes not merged).

I back­port­ed some of those changes from 8‑stable to 7‑stable, I have this run­ning on one 7‑stable machine. I would like to get some more feed­back for it (even an “it works for me” would be great). The main part of this change is that the FreeB­SD taskqueue is used now instead of the open­so­laris one (and some oth­er changes which may improve the ZFS expe­ri­ence).

It would also be nice if some­one could have a look at the FIRST_THREAD_IN_PROC part. Can there be more than one thread at this place (I do not think so) and I should use FOREACH_THREAD_IN_PROC_instead?

How to apply:

  • cd /usr/src/
  • fetch­SD/test/releng7_zfs_merge3.diff
  • fetch
  • fetch
  • mv taskq.h sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h
  • mv opensolaris_taskq.c sys/cddl/com­pat/opensolaris/kern/opensolaris_taskq.c
  • patch ‑p 0 –qui­et <releng7_zfs_merge3.diff
  • ignore the 2 .rej files
  • rm ‑f sys/cddl/compat/opensolaris/sys/taskq_impl.h*
  • rm ‑f sys/cddl/compat/opensolaris/sys/taskq.h*
  • rm ‑f sys/cddl/contrib/opensolaris/uts/common/os/taskq.c*
  • rebuild ker­nel

I do not list all of those 16 of 58 out­stand­ing patch­es which are cov­ered here, a detailed list can be found on the sta­ble and fs mail­inglists.

Send to Kin­dle

Round-up of recent FreeB­SD work

I had a look at some USB PRs and wrote a list of those with patch­es to Warn­er (as he is work­ing on USB stuff cur­rent­ly). I also cat­e­go­rized them (easy, not easy, maybe already fixed, …). The easy ones he han­dled already, for the rest I don’t know his cur­rent plans.

Regard­ing lin­ux­u­la­tor stuff I’m work­ing on a MFC patch (no TLS, no futex­es). As I don’t have a -sta­ble box I need some help test­ing it before I can com­mit it. I only com­pile test­ed this on ‑cur­rent with the new gcc 4.2. What I need is:

  • test­ing on i386, amd64 (if I for­got some­thing, it may pan­ic your sys­tem)
  • make uni­verse” test (you have to grep all the logs for “Error 1” and inves­ti­gate the error if there’s one)
  • LTP test run, see the wiki for more (best would be a diff of the logs in the result direc­to­ry of no-patch/patch runs)
  • nor­mal lin­ux appli­ca­tion use-tests

What the patch pro­vides is:

  • mmap fix­es
  • fix mem­leaks
  • add mprotect/iopl/lstat/ftruncate/statfs64/timer_*/mq_*
  • more errno val­ue map­ping
  • don’t lim­it num­ber of syscalls to 255
  • allow to exec libs
  • ioctl TIOCGPTN
  • han­dle more sock­et options
  • de-COMPAT_43-ify
  • add dum­my syscalls so that we know what is need­ed (reports from users)
  • style(9)
  • lin­procfs enhance­ments
Send to Kin­dle