From owner-svn-src-all@FreeBSD.ORG Tue Jan 7 19:46:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 780099AB; Tue, 7 Jan 2014 19:46:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 631F5173C; Tue, 7 Jan 2014 19:46:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s07JkIO9063617; Tue, 7 Jan 2014 19:46:18 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s07JkI6S063616; Tue, 7 Jan 2014 19:46:18 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201401071946.s07JkI6S063616@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 7 Jan 2014 19:46:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260402 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jan 2014 19:46:18 -0000 Author: pjd Date: Tue Jan 7 19:46:17 2014 New Revision: 260402 URL: http://svnweb.freebsd.org/changeset/base/260402 Log: MFC r260290: Bring back the old size of the kinfo_file structure to preserve ABI. Keep only one uint64_t spare for further cap_rights_t expension. Add a comment clarifying that if the size of this structure changes, a new sysctl MIB has to be allocate for it and the old structure has to be returned by the old sysctl MIB. Requested by: re Modified: stable/10/sys/sys/user.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/user.h ============================================================================== --- stable/10/sys/sys/user.h Tue Jan 7 19:33:17 2014 (r260401) +++ stable/10/sys/sys/user.h Tue Jan 7 19:46:17 2014 (r260402) @@ -320,7 +320,13 @@ struct kinfo_ofile { }; #if defined(__amd64__) || defined(__i386__) -#define KINFO_FILE_SIZE 1424 +/* + * This size should never be changed. If you really need to, you must provide + * backward ABI compatibility by allocating a new sysctl MIB that will return + * the new structure. The current structure has to be returned by the current + * sysctl MIB. See how it is done for the kinfo_ofile structure. + */ +#define KINFO_FILE_SIZE 1392 #endif struct kinfo_file { @@ -391,8 +397,7 @@ struct kinfo_file { uint16_t kf_pad1; /* Round to 32 bit alignment. */ int _kf_ispare0; /* Space for more stuff. */ cap_rights_t kf_cap_rights; /* Capability rights. */ - uint64_t _kf_cap_spare[3]; /* Space for future cap_rights_t. */ - int _kf_ispare[4]; /* Space for more stuff. */ + uint64_t _kf_cap_spare; /* Space for future cap_rights_t. */ /* Truncated before copyout in sysctl */ char kf_path[PATH_MAX]; /* Path to file, if any. */ };