flak rss random

documentation is thoroughly hard

Documentation is good, so therefore more documentation must be better, right? A few examples where things may have gotten out of control.

more...

Posted 18 May 2017 20:24 by tedu Updated: 19 May 2017 02:48
Tagged: openbsd software

meaningful short names

Why don’t unix commands have any vowels in the name? cp and mv are obviously devoweled standins for copy and move. But they’re less intuitive for new users. The user wants to copy a file. Why shouldn’t the name of the command be exactly the operation the user wants to perform?

What exactly does the user want to do? Instead of copying files, maybe I want to link two files. What does that mean? In unix, we have hard links and symbolic links. If I replace the “original” file, do I want the link to refer to the original file or the replacement? Or maybe what I mean by link two files is to combine two object files into an executable. Do we call that loading instead? ln is the name of a command, but link is the name of a concept. And sometimes the concept evolves over time. The linker is called ld because it used to be the loader. (I think.)

grep is a remarkably useful tool, but with a most unintuitive name. Why not call it find like Windows does? I want to find some text, I run find. So obvious. But some users may want to find files in the filesystem, not strings in a file. What command do they run? Probably locate.

There may be a great deal of historical accident in the names of commands (what if the inventors of awk had different initials?), but that doesn’t mean we can’t recognize the value of unique and precise identifiers.

Posted 03 Mar 2017 02:31 by tedu Updated: 14 Jun 2017 22:55
Tagged: rants software

RC40 card cipher

The Solitaire cipher is perhaps the best known encryption algorithm implemented with a deck of cards. Ignoring security, it has a few drawbacks. It’s pretty complicated. I can never quite remember the rules. Sure, with practice it’s possible to memorize, but ideally we want something easy to teach. It’s also pretty slow. Even with practice, the shuffling and cutting manipulations take time.

more...

Posted 10 Feb 2017 14:27 by tedu Updated: 10 Feb 2017 14:27
Tagged: gadget security

to errno or to error

Unlike other languages which have one preferred means of signalling an error, C is a multi error paradigm language. Error handling styles in C can be organized into one of several distinct styles, such as popular or correct. Some examples of each.

more...

Posted 24 Jan 2017 20:52 by tedu Updated: 24 Jan 2017 20:52
Tagged: c programming

openbsd changes of note 3

Things happened. In November.

more...

Posted 14 Dec 2016 15:50 by tedu Updated: 14 Dec 2016 15:50
Tagged: openbsd

who even calls link_ntoa?

So there’s a buffer overflow in link_ntoa. What does this mean? CERT says an attacker may be able to execute arbitrary code, but who can be an attacker? Where is link_ntoa used?

What does link_ntoa even do? I’ve never heard of this function before.

     The link_ntoa() function takes a link-level address and returns an ASCII
     string representing some of the information present, including the link
     level address itself, and the interface name or number, if present.  This
     facility is experimental and is still subject to change.

Networking something or other I guess.

First place to look is in libc itself, where the function lives. The implementation lives in net/linkaddr.c but it’s the declaration that’s of particular interest.

./hidden/net/if_dl.h:PROTO_DEPRECATED(link_ntoa);

The PROTO_DEPRECATED macro marks a function as exported from the library, but not for use internally. We can also verify with grep that nothing in libc calls link_ntoa, but with the symbol marking we can be confident we haven’t missed any thing.

Moving on to base, we find a few occurrences.

sbin/route/route.c:             printf("%s: link %s; ", which, link_ntoa(&su->sdl));
sbin/route/show.c:              return (link_ntoa(sdl));
usr.bin/netstat/show.c:         return (link_ntoa(sdl));

This is used to print route information obtained from the kernel. So if you haven’t patched yet, before you run route show again, make sure you trust the kernel.

Posted 07 Dec 2016 03:00 by tedu Updated: 07 Dec 2016 03:00
Tagged: openbsd software

Transmetropolitan

I’ve had a paper copy of Transmetropolitan Volume 1 sitting around the house for about a year, but finally sat down and read it last week. Immediately ordered the full set of ten volumes. (This was an easier decision when the Kindle version was only $6.) I was startled by how it’s a marvelous commentary on current culture and events. At first glance, I saw the copyright date for the collected volume, which is 2009, but the original issues were published starting in 1997. Twenty years later it’s still fresh.

Each volume collects six issues and represent a single story arc, although the volumes also fit together pretty tightly. Most issues are fairly typical narratives (but in a very atypical world), but there’s usually about one more experimental issue per volume. It takes about half of the first volume to establish the world and get up to speed, but after that it’s full steam ahead.

I’d summarize the themes and aspects I really like, but that’s actually pretty hard. Better to just recommend you read it for yourself. Not much of a review. Some panels I liked, which seem relevant.

On callous indifference.

panel

On advertising and tracking culture.

panel

On elected officials.

panel

On tech centric lifestyles.

panel

Haven’t finished the entire series yet, but it’s been great so far.

Posted 01 Dec 2016 23:57 by tedu Updated: 01 Dec 2016 23:57
Tagged: bookreview

openbsd changes of note 2

Things happened, stuff changed.

X550 support among other ix changes and cleanup.

Ongoing switch work. Better OpenFlow compat. You know it’s serious when tcpdump gets an update.

Loongson 3A support.

Turn ipstat into a set of percpu counters. Per CPU counters allow simple statistics to be collected in a lockless manner, collating them as necessary. The basic mechanism was introduced a little earlier in October.

Hydrogen bomb fixes.

Dedicated build user builds for xenocara.

Some iwm diffs, since committed. reducing rx latency. ack rates. reduce retry limit.

PCI info ioctl for DRM.

Assorted changes to pool memory management. More mbuf pool changes to come.

Something else of potential interest: pine64 bootloader.

Posted 23 Nov 2016 02:37 by tedu Updated: 23 Nov 2016 02:37
Tagged: openbsd software

action of no action required

From AT&T

From: "AT&T" <att@e.att-mail.com>
To: ted.unangst@gmail.com
Date: Fri, 18 Nov 2016 17:07:07 -0500
Subject: Ted, Action required.

We're writing to confirm that this is your current email address.
If this email address is still current, you don't need to do a thing.

Translation: action required -> no action required. Jerks.

Posted 18 Nov 2016 19:29 by tedu Updated: 18 Nov 2016 19:29
Tagged: mailfail

openbsd changes of note

Stuff happened, things changed.

more...

Posted 16 Nov 2016 21:28 by tedu Updated: 16 Nov 2016 21:28
Tagged: openbsd software