Sat, 28 Jan 2012

3:01 PM - Quick and Dirty GEOM print program

While debugging a GEOM related problem with a program, I ended up needing a way to print out data from what libgeom gets from the kernel.  Below is a quick and dirty dump program for just such a situation.  Compile it with 

gcc -std=c99 -lgeom prog.c -o prog 

 

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

#include <libgeom.h>

#include <stdint.h>

 

void read_geom_mesh(struct gmesh *mesh);

 

void

read_geom_mesh(struct gmesh *mesh)

{

        struct gclass *classp;

        struct ggeom *gp;

struct gprovider *provider;

 

        /*

         * Build the device table. First add all disks (and CDs).

         */

 

        LIST_FOREACH(classp, &mesh->lg_class, lg_class) {

puts(classp->lg_name);

 

LIST_FOREACH(gp, &classp->lg_geom, lg_geom) {

printf("%ud %s ", gp->lg_id, gp->lg_name);

LIST_FOREACH(provider, &gp->lg_provider, lg_provider) {

printf("provider: %u %s %s ", provider->lg_id, provider->lg_name, provider->lg_mode);

}

}

        }

}

 

 

int main(int argc, char *argv[]) {

int error;

        struct gmesh mesh;

error = geom_gettree(&mesh);

 

if (error == 0)

               read_geom_mesh(&mesh);

 

return 0;

tags: debug geom

()

Wed, 11 Jan 2012

7:45 PM - Installer work

  Work is processing on the MidnightBSD installer for 0.4-CURRENT.  As soon as it's working, I'll post a new snap.  It's been awhile.

()

Wed, 4 Jan 2012

9:29 AM - State of the BSD: January 2012

2011 was a good year for the MidnightBSD project. We released MidnightBSD 0.3 in January, and began work on 0.4.  The mport(1) tool was written to allow users to manipulate ports using the new package management system. Work finally began on replacing sysinstall(8), the MidnightBSD installer with a new replacement.

MidnightBSD gained the ability to boot from GPT partitions.  We've created our own partition types: midnightbsd, midnightbsd-ufs, midnightbsd-vinum, midnightbsd-zfs, etc. for GPT.

Several critical flaws with CAM were addressed from the 0.3 release.

MidnightBSD can now read ELF notes and understands both FreeBSD and MidnightBSD notes. Legacy FreeBSD 7.0 and lower binaries will continue to run, but also MidnightBSD binaries can be distinguished by the kernel.  Eventually, we'll create a compatibility option as things diverge further. An effort to update binutils has started.  The freebsd vector hack will be removed, and we'll go standard like DragonFly. This was a kludge to get Linux binaries working, but elf notes should solve that problem for us.  This means we may see the end of brandelf for Linux executables. 

GIANT lock has been removed from many sysctls.  A few locking problems are still getting sorted out, but the kernel is running fine on most systems.

MidnightBSD gained a new search tool, msearch(1), that uses a sqlite3 database with a full text index of text files on the system.  The indexer is off by default due to the space requirements.  It supports some globbing for queries.

For a complete list of improvements, read UPDATING in CURRENT (0.4).

MidnightBSD now has pages on Google + and a twitter account.  Expect a new release this year.

()

Sun, 27 Nov 2011

12:08 AM - alc/bge/mii

 alc(4) is now working properly.  cable detection, dhcp, etc. are working. bge(4) has support for several new chips. mii(4) supports new PHYs

()

12:00 AM - make universe

 make universe target runs again with the new build infrastructure. perl's still being difficult.

()

11:59 AM - wake(8)

 MidnightBSD gains the wake(8) utility.  You can use it to wake up machines supporting WoL on the network. 

()

Thu, 17 Nov 2011

8:27 PM - BIND security

 If you're running BIND on MidnightBSD 0.3 or lower, I strongly recommend switching to the mports version. There are a few security issues with the base system bind.

I've patched it tonight in 0.4-CURRENT, but it's not fun to backport.  

Also, our resolver has been patched to allow underscores in names.

tags: bind named security

()

Fri, 4 Nov 2011

2:03 PM - CVE-2011-3336

 I just patched  CVE-2011-3336

This could be used as a denial of service attack against FTP servers or anything else that uses regular expressions from libc.  A "bad" regex can consume massive amounts of memory.

The fix has been committed to CURRENT.  I want to test this further before applying it to 0.3, but if you have a public facing system, you may wish to grab the following file and rebuild libc:

http://www.midnightbsd.org/cgi-bin/cvsweb.cgi/src/lib/libc/regex/regcomp.c?rev=1.3;content-type=text%2Fplain

The patch does pass the regression tests, but I'm not certain the memory limit calculation is correct. Our implementation is a bit different than NetBSD's as it supports wide characters.

()

Sat, 22 Oct 2011

11:42 AM - MidnightBSD gains GPT boot, CPU Affinity, and more

Over the last few weeks, I've been working on several new projects.  I ported the FreeBSD 7.1 ULE scheduler to MidnightBSD along with CPU affinity and the cpuset(1) utility.  The default scheduler has been changed to ULE on i386 and AMD64.  

MidnightBSD now supports booting off of GPT partition schemes and gpt(8) was updated to allow one to partition the disk.  sysinstall does not support this, however.  

Marcus von Appen's BSD licensed cflow implentation has been imported into MidnightBSD.  cflow allows one to build call graphs from C and Assembler files and is part of the POSIX.1 standard.

less v436 and awk 20110810 have been imported into 0.4-CURRENT.  They are the latest versions available. I've also updated the tzdata to v2011l from October 10, 2011.  The timezone data is now hosted at ICANN.  

et(4) has been imported.  It is an Agere Gigabit Ethernet and Fast Ethernet driver written for DragonFly.  I have not included this in the GENERIC kernel, but one can use the kernel module.  As I don't have hardware to test with, feedback is very helpful.

A security issue with unix domain sockets was fixed and the linuxolator updated to handle the changes.  

fetch(1) was updated from FreeBSD 9 sources.  It includes several changes, but the most important one is that passive mode FTP is now the default.  If you wish to use active mode FTP, you must set an environment variable now.  

gcache(8) was introduced to speed up RAID 3 volumes.  

alc(4) includes several fixes which improve performance.  I've also added some workarounds for users with CyberPower UPS devices connected to their systems over USB.  

My next big project is attempting to get a live cd based installer working.  This will also need to work with the new mport tools.  Boot crunch barfs on liblzma (xz) which makes building a crunched sysinstall impossible.  libmport uses lzma archives to store mport packages now.  This is the biggest issue holding up the next release. 

()

Tue, 4 Oct 2011

10:09 PM - MidnightBSD 0.3-RELEASE-p4

MidnightBSD 0.3-RELEASE-p4 includes a patch for a regression introduced in p3 with the linuxolator.  The unix socket fix changed the size of a kernel structure and it no longer matched the linux computer part.  This broke compatibility with Linux applications.  

Users are advised an ugrade to this release. 

()

Sat, 24 Sep 2011

12:18 AM - (no subject)

mports

 PHP 5.3.8 and phpMyAdmin 3.4.5 are now available in mports.  A new magus run will be scheduled for this weekend to test the recent mports changes. 

Refinement continues on the mport command line tool.  Current work focuses on integrating libmport with the installer so that we can do the next release.

()

Sat, 17 Sep 2011

11:49 PM - mports

 I've been working on getting ports in shape for the next release.  Python 2.6.7 is now in ports along with HelixPlayer (Linux) 11, Gstreamer 0.10.35, and emacs 23.3a.

 

()

Wed, 14 Sep 2011

10:21 PM - Updates for early september

I've found myself sidetracked lately with server upgrades, a new laptop I'm trying to get working with MidnightBSD, and other fun things.

Several new happenings in MidnightBSD:

xz 5.0.3 in CURRENT

improvements to mport, msearch and batt(1).

In mports, apache 2.2.21 and xz 5.0.3.    

The last magus run is looking a lot better.  Here's the results from i386 0.4-CURRENT:

229 0.4 i386 active 2011-09-04 17:00:43


()

Sat, 10 Sep 2011

10:54 AM - mport gains new command

The mport command now supports a new "download" command.  This allows a user to download a package independant of installation.  It's saved to the normal package storage path inside of /var. 

This is useful when you know you're going to lose network connectivity and want to fetch several packages for installation later.  

tags: mport midnightbsd

()

Mon, 5 Sep 2011

7:31 PM - mports weekend

This past weekend, I've focused on updating ports.  www/linux-firefox-devel (3.6.21), most multimedia ports, and gnustep related ports have been updated. 

I've also currently running package builds for i386 and amd64. 

()

Fri, 2 Sep 2011

10:52 PM - New packages for 0.4 current on i386

I just blessed the magus run for i386.  That means there are a new set of packages on the FTP server for i386.  I also put out a new ports index for this release tied to the mport tools sqlite3 database.

I've got a dedicated i386 system for package builds again.  It takes a few days to do a run, but it's better than nothing.  It's a Pentium D 805 w/ 2GB RAM. 

()

Thu, 1 Sep 2011

1:02 PM - Apache 2.2.20

MidnightBSD mports now includes the latest Apache release.  This fixes a DOS attack using range headers.  Users are encouraged to upgrade. 

tags: apache httpd mports

()

Wed, 31 Aug 2011

8:00 PM - Opera 11.51

I've just updated the opera port to 11.51.  This version includes some security fixes.  

()

Tue, 30 Aug 2011

11:03 PM - Web browsing on MidnightBSD

MidnightBSD has been lagging some other systems with respect to web browsers.  Tonight, I updated Opera, Flash 10 (linux emulation), Firefox 6 and Thunderbird 6 (linux) ports and the nspluginwrapper port.  It's now possible to play flash video on several browsers in current (again) and access youtube.

You must be running 0.4-CURRENT to use some of these.  

()

Mon, 29 Aug 2011

10:56 PM - Perl 5.14.1

mport perl updated

Perl 5.14.1 is now available in mports.  While I've considered updating base, 5.14.2 is scheduled for release next month.  If 0.4 is not ready by the time the release occurs, I'll update it in base, otherwise it will be included in 0.5.

Base Perl issues 

Users having difficulty upgrading from MidnightBSD 0.3 to 0.4 with failures in perl should try freshly checking out perl and building it outside of the full buildworld cycle (cd /usr/src/usr.bin/perl && make && make install) first. 

()