From owner-freebsd-arch Tue Sep 19 0:58: 6 2000 Delivered-To: freebsd-arch@freebsd.org Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by hub.freebsd.org (Postfix) with ESMTP id 90FB837B42C for ; Tue, 19 Sep 2000 00:58:03 -0700 (PDT) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by anchor-post-32.mail.demon.net with esmtp (Exim 2.12 #1) id 13bIHq-0008Hz-0W; Tue, 19 Sep 2000 08:57:55 +0100 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id JAA41734; Tue, 19 Sep 2000 09:00:26 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Tue, 19 Sep 2000 08:57:57 +0100 (BST) From: Doug Rabson To: Warner Losh Cc: arch@freebsd.org Subject: Re: binary compat guidelines In-Reply-To: <200009190544.XAA36298@harmony.village.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 18 Sep 2000, Warner Losh wrote: > > I'm wondering if we (the FreeBSD project) has guidelines for kernel > binary compatibility over time. What things are allowed? What things > are bogus? > > I've been following the rules. I've been focused on the card driver > <-> bus driver interface, so these are slanted. > o use kobj > o don't add args to functions called with kobj > o use only basic types in args. If pointers are used, they > aren't dereferenced by the driver directly. > o use ivars. icky but useful. > o OK to make calls to external functions, not all calls must > be brokered through kobj. These are convenience functions. > o no sizeof(struct foo) > o no offsetof > And some silly things I've done or cleaned up in the past: > o Don't have module symbol interdependencies > > Any others? Anything stupid I'm doing? This looks like a good set of rules for avoiding certain kinds of ABI change. For added longevity, you need to isolate yourself from the various kernel data structures which tend to change frequently. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 20 8348 3944 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message