From owner-p4-projects@FreeBSD.ORG Sat Feb 11 00:22:00 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4787D16A423; Sat, 11 Feb 2006 00:22:00 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E6ED916A420 for ; Sat, 11 Feb 2006 00:21:59 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92D0243D46 for ; Sat, 11 Feb 2006 00:21:59 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k1B0LxVs059201 for ; Sat, 11 Feb 2006 00:21:59 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k1B0LxPu059198 for perforce@freebsd.org; Sat, 11 Feb 2006 00:21:59 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 11 Feb 2006 00:21:59 GMT Message-Id: <200602110021.k1B0LxPu059198@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 91529 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2006 00:22:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=91529 Change 91529 by rwatson@rwatson_zoo on 2006/02/11 00:21:20 Temporarily remove ABI versioning code from module registration; keep API version number. Requested by: sbahra Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#452 edit .. //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#241 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#452 (text+ko) ==== @@ -96,21 +96,10 @@ #ifdef MAC -/*- - * The TrustedBSD MAC Framework declares two version numbers in support of - * policy modules: - * - * - A linker version number, which declares the version of the MAC policy - * ABI. - * - * - A feature version number, relative to the linker version, which declares - * what if any optional features for the linker version are present. This - * supports the incremental addition of features in a FreeBSD RELENG - * branch. - * - * Modules will be unable to load if they do not match the current linker - * version due to ABI compatibility concerns. They may also test for support - * for specific API features that they depend on. +/* + * Declare that the kernel provides MAC support, version 1. This permits + * modules to refuse to be loaded if the necessary support isn't present, + * even if it's pre-boot. */ MODULE_VERSION(kernel_mac_support, 3); @@ -392,14 +381,6 @@ error = EBUSY; break; } - if (mac_version < mpc->mpc_depend_version) { - printf("mac_policy_modevent: %s policy requires " - "MAC version %d\n", mpc->mpc_name, - mpc->mpc_depend_version); - error = ENOTSUP; - break; - } - error = mac_policy_register(mpc); break; case MOD_UNLOAD: ==== //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#241 (text+ko) ==== @@ -624,7 +624,6 @@ int mpc_loadtime_flags; /* flags */ int *mpc_field_off; /* security field */ int mpc_runtime_flags; /* flags */ - int mpc_depend_version; /* required MAC */ LIST_ENTRY(mac_policy_conf) mpc_list; /* global list */ }; @@ -636,10 +635,6 @@ /* Flags for the mpc_runtime_flags field. */ #define MPC_RUNTIME_FLAG_REGISTERED 0x00000001 -/* This must be defined after MAC_POLICY_SET. */ -#define MAC_DEPEND_VERSION(mpname, version) \ - mpname##_mac_policy_conf.mpc_depend_version = version; - #define MAC_POLICY_SET(mpops, mpname, mpfullname, mpflags, privdata_wanted) \ static struct mac_policy_conf mpname##_mac_policy_conf = { \ #mpname, \ @@ -648,7 +643,6 @@ mpflags, \ privdata_wanted, \ 0, \ - 0, \ }; \ static moduledata_t mpname##_mod = { \ #mpname, \