From owner-svn-src-user@FreeBSD.ORG Sun Nov 9 00:00:56 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5FD2106567D; Sun, 9 Nov 2008 00:00:56 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 958C58FC20; Sun, 9 Nov 2008 00:00:56 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA900usu025246; Sun, 9 Nov 2008 00:00:56 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA900uOw025245; Sun, 9 Nov 2008 00:00:56 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200811090000.mA900uOw025245@svn.freebsd.org> From: Kip Macy Date: Sun, 9 Nov 2008 00:00:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184773 - user/kmacy/HEAD_fast_multi_xmit/sys/net X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 00:00:56 -0000 Author: kmacy Date: Sun Nov 9 00:00:56 2008 New Revision: 184773 URL: http://svn.freebsd.org/changeset/base/184773 Log: rt and hash fields can't safely be held in registers across critical sections Modified: user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c Modified: user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c ============================================================================== --- user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c Sat Nov 8 23:26:24 2008 (r184772) +++ user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c Sun Nov 9 00:00:56 2008 (r184773) @@ -220,12 +220,12 @@ union ipv6_flow { }; struct flentry { - uint32_t f_fhash; /* hash flowing forward */ + volatile uint32_t f_fhash;/* hash flowing forward */ uint16_t f_flags; /* flow flags */ uint8_t f_pad; uint8_t f_proto; /* protocol */ time_t f_uptime; /* last time this flow was accessed */ - struct rtentry *f_rt; /* rtentry for flow */ + volatile struct rtentry *f_rt; /* rtentry for flow */ u_char f_desten[ETHER_ADDR_LEN]; }; @@ -464,7 +464,6 @@ flow_stale(struct flowtable *ft, struct time_t idle_time; if ((fle->f_fhash == 0) - || (fle->f_rt == NULL) || ((fle->f_rt->rt_flags & RTF_UP) == 0) || (fle->f_uptime <= fle->f_rt->rt_llinfo_uptime) || ((fle->f_rt->rt_flags & RTF_GATEWAY) && @@ -512,7 +511,8 @@ flowtable_insert(struct flowtable *ft, u uint8_t proto, struct rtentry *rt, u_char *desten, uint16_t flags) { struct flentry *fle; - struct rtentry *rt0 = NULL; + volatile struct rtentry *rt0 = NULL; + struct rtentry *rt1; int stale; bitstr_t *mask; @@ -530,8 +530,9 @@ retry: FL_ENTRY_UNLOCK(ft, hash); if (!stale) return (ENOSPC); - if (rt0) - RTFREE(rt0); + + rt1 = __DEVOLATILE(struct rtentry *, rt0); + RTFREE(rt1); /* * We might end up on a different cpu */ @@ -614,7 +615,8 @@ flowtable_lookup(struct flowtable *ft, s struct route ro; int cache = 1, error = 0; u_char desten[ETHER_ADDR_LEN]; - + volatile struct rtentry *rt; + flags = ft ? ft->ft_flags : 0; ro.ro_rt = NULL; @@ -639,16 +641,17 @@ flowtable_lookup(struct flowtable *ft, s } FL_ENTRY_LOCK(ft, hash); fle = FL_ENTRY(ft, hash); + rt = fle->f_rt; if (fle->f_fhash == hash && flowtable_key_equal(fle, key, flags) && (proto == fle->f_proto) - && (fle->f_rt->rt_flags & RTF_UP) - && (fle->f_uptime > fle->f_rt->rt_llinfo_uptime) + && (rt->rt_flags & RTF_UP) + && (fle->f_uptime > rt->rt_llinfo_uptime) && gw_valid(fle)) { fle->f_uptime = time_uptime; fle->f_flags |= flags; - fle->f_rt->rt_rmx.rmx_pksent++; - ro.ro_rt = fle->f_rt; + rt->rt_rmx.rmx_pksent++; + ro.ro_rt = __DEVOLATILE(struct rtentry *, rt); route_to_rtentry_info(&ro, fle->f_desten, ri); FL_ENTRY_UNLOCK(ft, hash); return (0); @@ -695,7 +698,7 @@ uncached: #endif route_to_rtentry_info(&ro, error ? NULL : desten, ri); - + ro.ro_rt->rt_rmx.rmx_pksent++; if (error == 0 && cache) { error = flowtable_insert(ft, hash, key, proto, ro.ro_rt, desten, flags); From owner-svn-src-user@FreeBSD.ORG Sun Nov 9 00:22:37 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03EEE1065676; Sun, 9 Nov 2008 00:22:37 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E823B8FC16; Sun, 9 Nov 2008 00:22:36 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA90MaDD025697; Sun, 9 Nov 2008 00:22:36 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA90MajW025696; Sun, 9 Nov 2008 00:22:36 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200811090022.mA90MajW025696@svn.freebsd.org> From: Kip Macy Date: Sun, 9 Nov 2008 00:22:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184774 - user/kmacy/HEAD_fast_multi_xmit/sys/net X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 00:22:37 -0000 Author: kmacy Date: Sun Nov 9 00:22:36 2008 New Revision: 184774 URL: http://svn.freebsd.org/changeset/base/184774 Log: try generic store barrier Modified: user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c Modified: user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c ============================================================================== --- user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c Sun Nov 9 00:00:56 2008 (r184773) +++ user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c Sun Nov 9 00:22:36 2008 (r184774) @@ -38,7 +38,7 @@ #if defined (__GNUC__) #if #cpu(i386) || defined __i386 || defined i386 || defined __i386__ || #cpu(x86_64) || defined __x86_64__ - #define mb() __asm__ __volatile__ ("sfence;": : :"memory") + #define mb() __asm__ __volatile__ ("mfence;": : :"memory") #elif #cpu(sparc64) || defined sparc64 || defined __sparcv9 #define mb() __asm__ __volatile__ ("membar #MemIssue": : :"memory") #elif #cpu(sparc) || defined sparc || defined __sparc__ From owner-svn-src-user@FreeBSD.ORG Sun Nov 9 00:38:11 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE087106567A; Sun, 9 Nov 2008 00:38:11 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDECB8FC13; Sun, 9 Nov 2008 00:38:11 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA90cBDs025989; Sun, 9 Nov 2008 00:38:11 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA90cBKx025988; Sun, 9 Nov 2008 00:38:11 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200811090038.mA90cBKx025988@svn.freebsd.org> From: Kip Macy Date: Sun, 9 Nov 2008 00:38:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184775 - user/kmacy/HEAD_fast_multi_xmit/sys/net X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 00:38:11 -0000 Author: kmacy Date: Sun Nov 9 00:38:11 2008 New Revision: 184775 URL: http://svn.freebsd.org/changeset/base/184775 Log: Only f_rt needs to be volatile Modified: user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c Modified: user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c ============================================================================== --- user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c Sun Nov 9 00:22:36 2008 (r184774) +++ user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c Sun Nov 9 00:38:11 2008 (r184775) @@ -596,11 +596,11 @@ flowtable_key_equal(struct flentry *fle, } static __inline int -gw_valid(struct flentry *fle) +gw_valid(struct rtentry *rt) { - return ((fle->f_rt->rt_flags & RTF_GATEWAY) == 0 || - ((fle->f_rt->rt_flags & RTF_GATEWAY) && - (fle->f_rt->rt_gwroute->rt_flags & RTF_UP))); + return ((rt->rt_flags & RTF_GATEWAY) == 0 || + ((rt->rt_flags & RTF_GATEWAY) && + (rt->rt_gwroute->rt_flags & RTF_UP))); } @@ -615,7 +615,7 @@ flowtable_lookup(struct flowtable *ft, s struct route ro; int cache = 1, error = 0; u_char desten[ETHER_ADDR_LEN]; - volatile struct rtentry *rt; + struct rtentry *rt; flags = ft ? ft->ft_flags : 0; ro.ro_rt = NULL; @@ -641,17 +641,17 @@ flowtable_lookup(struct flowtable *ft, s } FL_ENTRY_LOCK(ft, hash); fle = FL_ENTRY(ft, hash); - rt = fle->f_rt; + rt = __DEVOLATILE(struct rtentry *, fle->f_rt); if (fle->f_fhash == hash && flowtable_key_equal(fle, key, flags) && (proto == fle->f_proto) && (rt->rt_flags & RTF_UP) && (fle->f_uptime > rt->rt_llinfo_uptime) - && gw_valid(fle)) { + && gw_valid(rt)) { fle->f_uptime = time_uptime; fle->f_flags |= flags; rt->rt_rmx.rmx_pksent++; - ro.ro_rt = __DEVOLATILE(struct rtentry *, rt); + ro.ro_rt = rt; route_to_rtentry_info(&ro, fle->f_desten, ri); FL_ENTRY_UNLOCK(ft, hash); return (0); From owner-svn-src-user@FreeBSD.ORG Sun Nov 9 00:49:36 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5E491065676; Sun, 9 Nov 2008 00:49:36 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B62458FC1F; Sun, 9 Nov 2008 00:49:36 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA90nafn026213; Sun, 9 Nov 2008 00:49:36 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA90naJr026212; Sun, 9 Nov 2008 00:49:36 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200811090049.mA90naJr026212@svn.freebsd.org> From: Kip Macy Date: Sun, 9 Nov 2008 00:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184776 - user/kmacy/HEAD_fast_multi_xmit/sys/net X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 00:49:36 -0000 Author: kmacy Date: Sun Nov 9 00:49:36 2008 New Revision: 184776 URL: http://svn.freebsd.org/changeset/base/184776 Log: validate rtentry before doing any other checks Modified: user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c Modified: user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c ============================================================================== --- user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c Sun Nov 9 00:38:11 2008 (r184775) +++ user/kmacy/HEAD_fast_multi_xmit/sys/net/flowtable.c Sun Nov 9 00:49:36 2008 (r184776) @@ -599,8 +599,9 @@ static __inline int gw_valid(struct rtentry *rt) { return ((rt->rt_flags & RTF_GATEWAY) == 0 || - ((rt->rt_flags & RTF_GATEWAY) && - (rt->rt_gwroute->rt_flags & RTF_UP))); + ((rt->rt_flags & RTF_GATEWAY) + && (rt->rt_gwroute != NULL) + && (rt->rt_gwroute->rt_flags & RTF_UP))); } @@ -642,7 +643,8 @@ flowtable_lookup(struct flowtable *ft, s FL_ENTRY_LOCK(ft, hash); fle = FL_ENTRY(ft, hash); rt = __DEVOLATILE(struct rtentry *, fle->f_rt); - if (fle->f_fhash == hash + if ((rt != NULL) + && fle->f_fhash == hash && flowtable_key_equal(fle, key, flags) && (proto == fle->f_proto) && (rt->rt_flags & RTF_UP) From owner-svn-src-user@FreeBSD.ORG Sun Nov 9 14:01:30 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 771DA1065670; Sun, 9 Nov 2008 14:01:30 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A7C88FC0A; Sun, 9 Nov 2008 14:01:30 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9E1UGu042775; Sun, 9 Nov 2008 14:01:30 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9E1UfU042774; Sun, 9 Nov 2008 14:01:30 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200811091401.mA9E1UfU042774@svn.freebsd.org> From: Rong-En Fan Date: Sun, 9 Nov 2008 14:01:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184791 - user/rafan X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 14:01:30 -0000 Author: rafan Date: Sun Nov 9 14:01:30 2008 New Revision: 184791 URL: http://svn.freebsd.org/changeset/base/184791 Log: - Create my user dir for holding FreeBSD related works Added: user/rafan/ From owner-svn-src-user@FreeBSD.ORG Sun Nov 9 14:02:37 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FEF8106568D; Sun, 9 Nov 2008 14:02:37 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32EC58FC14; Sun, 9 Nov 2008 14:02:37 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9E2bl0042834; Sun, 9 Nov 2008 14:02:37 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9E2bw9042833; Sun, 9 Nov 2008 14:02:37 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200811091402.mA9E2bw9042833@svn.freebsd.org> From: Rong-En Fan Date: Sun, 9 Nov 2008 14:02:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184792 - user/rafan/ncurses X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 14:02:37 -0000 Author: rafan Date: Sun Nov 9 14:02:36 2008 New Revision: 184792 URL: http://svn.freebsd.org/changeset/base/184792 Log: - directory for contrib/ncurses staging Added: user/rafan/ncurses/ From owner-svn-src-user@FreeBSD.ORG Sun Nov 9 14:05:16 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEF7B106568F; Sun, 9 Nov 2008 14:05:16 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1C418FC14; Sun, 9 Nov 2008 14:05:16 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9E5G4k042936; Sun, 9 Nov 2008 14:05:16 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9E5GYH042935; Sun, 9 Nov 2008 14:05:16 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200811091405.mA9E5GYH042935@svn.freebsd.org> From: Rong-En Fan Date: Sun, 9 Nov 2008 14:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184793 - in user/rafan/ncurses: contrib lib X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 14:05:16 -0000 Author: rafan Date: Sun Nov 9 14:05:16 2008 New Revision: 184793 URL: http://svn.freebsd.org/changeset/base/184793 Log: - Create directories needed by ncurses Added: user/rafan/ncurses/contrib/ user/rafan/ncurses/lib/ From owner-svn-src-user@FreeBSD.ORG Sun Nov 9 14:05:31 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7243106567C; Sun, 9 Nov 2008 14:05:31 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 79D5F8FC18; Sun, 9 Nov 2008 14:05:31 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9E5Vas042978; Sun, 9 Nov 2008 14:05:31 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9E5VGE042977; Sun, 9 Nov 2008 14:05:31 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200811091405.mA9E5VGE042977@svn.freebsd.org> From: Rong-En Fan Date: Sun, 9 Nov 2008 14:05:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184794 - user/rafan/ncurses/contrib/ncurses X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 14:05:31 -0000 Author: rafan Date: Sun Nov 9 14:05:31 2008 New Revision: 184794 URL: http://svn.freebsd.org/changeset/base/184794 Log: - Copy from current HEAD Added: user/rafan/ncurses/contrib/ncurses/ (props changed) - copied from r184793, head/contrib/ncurses/ From owner-svn-src-user@FreeBSD.ORG Sun Nov 9 14:05:55 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4BA41065670; Sun, 9 Nov 2008 14:05:55 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7D158FC12; Sun, 9 Nov 2008 14:05:55 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9E5txp043023; Sun, 9 Nov 2008 14:05:55 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9E5tej043022; Sun, 9 Nov 2008 14:05:55 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200811091405.mA9E5tej043022@svn.freebsd.org> From: Rong-En Fan Date: Sun, 9 Nov 2008 14:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184795 - user/rafan/ncurses/lib/ncurses X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 14:05:55 -0000 Author: rafan Date: Sun Nov 9 14:05:55 2008 New Revision: 184795 URL: http://svn.freebsd.org/changeset/base/184795 Log: - Copy from current HEAD Added: user/rafan/ncurses/lib/ncurses/ - copied from r184794, head/lib/ncurses/ From owner-svn-src-user@FreeBSD.ORG Sun Nov 9 14:06:17 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0F791065785; Sun, 9 Nov 2008 14:06:17 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D4718FC13; Sun, 9 Nov 2008 14:06:17 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9E6H8C043071; Sun, 9 Nov 2008 14:06:17 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9E6HDb043070; Sun, 9 Nov 2008 14:06:17 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200811091406.mA9E6HDb043070@svn.freebsd.org> From: Rong-En Fan Date: Sun, 9 Nov 2008 14:06:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184796 - user/rafan/ncurses/lib X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 14:06:17 -0000 Author: rafan Date: Sun Nov 9 14:06:17 2008 New Revision: 184796 URL: http://svn.freebsd.org/changeset/base/184796 Log: - Copy from current HEAD Added: user/rafan/ncurses/lib/Makefile.inc - copied unchanged from r184795, head/lib/Makefile.inc Copied: user/rafan/ncurses/lib/Makefile.inc (from r184795, head/lib/Makefile.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/rafan/ncurses/lib/Makefile.inc Sun Nov 9 14:06:17 2008 (r184796, copy of r184795, head/lib/Makefile.inc) @@ -0,0 +1,3 @@ +# $FreeBSD$ +# Default version for system libs (override in /Makefile if necessary) +SHLIB_MAJOR?= 4 From owner-svn-src-user@FreeBSD.ORG Sun Nov 9 14:32:59 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB1D31065688; Sun, 9 Nov 2008 14:32:58 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D21AB8FC18; Sun, 9 Nov 2008 14:32:58 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9EWwKO043770; Sun, 9 Nov 2008 14:32:58 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9EWwQQ043765; Sun, 9 Nov 2008 14:32:58 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200811091432.mA9EWwQQ043765@svn.freebsd.org> From: Rong-En Fan Date: Sun, 9 Nov 2008 14:32:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184800 - in user/rafan/ncurses: contrib/ncurses contrib/ncurses/doc/html contrib/ncurses/form contrib/ncurses/include contrib/ncurses/man contrib/ncurses/menu contrib/ncurses/misc cont... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 14:32:59 -0000 Author: rafan Date: Sun Nov 9 14:32:58 2008 New Revision: 184800 URL: http://svn.freebsd.org/changeset/base/184800 Log: - Update ncurses to 5.7-20081102 (5.7 release) Added: user/rafan/ncurses/contrib/ncurses/man/curs_memleaks.3x - copied unchanged from r184799, vendor/ncurses/dist/man/curs_memleaks.3x user/rafan/ncurses/contrib/ncurses/misc/ncurses.supp - copied unchanged from r184799, vendor/ncurses/dist/misc/ncurses.supp Modified: user/rafan/ncurses/contrib/ncurses/ (props changed) user/rafan/ncurses/contrib/ncurses/ANNOUNCE user/rafan/ncurses/contrib/ncurses/INSTALL user/rafan/ncurses/contrib/ncurses/MANIFEST user/rafan/ncurses/contrib/ncurses/NEWS user/rafan/ncurses/contrib/ncurses/TO-DO user/rafan/ncurses/contrib/ncurses/aclocal.m4 user/rafan/ncurses/contrib/ncurses/announce.html.in user/rafan/ncurses/contrib/ncurses/config.guess user/rafan/ncurses/contrib/ncurses/config.sub user/rafan/ncurses/contrib/ncurses/configure user/rafan/ncurses/contrib/ncurses/configure.in user/rafan/ncurses/contrib/ncurses/dist.mk user/rafan/ncurses/contrib/ncurses/doc/html/announce.html user/rafan/ncurses/contrib/ncurses/form/form.priv.h user/rafan/ncurses/contrib/ncurses/form/frm_def.c user/rafan/ncurses/contrib/ncurses/form/frm_driver.c user/rafan/ncurses/contrib/ncurses/form/frm_req_name.c user/rafan/ncurses/contrib/ncurses/include/MKterm.h.awk.in user/rafan/ncurses/contrib/ncurses/include/capdefaults.c user/rafan/ncurses/contrib/ncurses/include/curses.h.in user/rafan/ncurses/contrib/ncurses/include/curses.tail user/rafan/ncurses/contrib/ncurses/include/nc_alloc.h user/rafan/ncurses/contrib/ncurses/include/nc_panel.h user/rafan/ncurses/contrib/ncurses/include/ncurses_defs user/rafan/ncurses/contrib/ncurses/include/term_entry.h user/rafan/ncurses/contrib/ncurses/man/curs_getcchar.3x user/rafan/ncurses/contrib/ncurses/man/curs_terminfo.3x user/rafan/ncurses/contrib/ncurses/man/curs_util.3x user/rafan/ncurses/contrib/ncurses/man/form.3x user/rafan/ncurses/contrib/ncurses/man/form_driver.3x user/rafan/ncurses/contrib/ncurses/man/form_field_buffer.3x user/rafan/ncurses/contrib/ncurses/man/man_db.renames user/rafan/ncurses/contrib/ncurses/man/menu_attributes.3x user/rafan/ncurses/contrib/ncurses/man/menu_driver.3x user/rafan/ncurses/contrib/ncurses/man/menu_pattern.3x user/rafan/ncurses/contrib/ncurses/man/ncurses.3x user/rafan/ncurses/contrib/ncurses/menu/m_driver.c user/rafan/ncurses/contrib/ncurses/menu/m_req_name.c user/rafan/ncurses/contrib/ncurses/misc/ncu-indent user/rafan/ncurses/contrib/ncurses/misc/terminfo.src user/rafan/ncurses/contrib/ncurses/ncurses/Makefile.in user/rafan/ncurses/contrib/ncurses/ncurses/base/MKkeyname.awk user/rafan/ncurses/contrib/ncurses/ncurses/base/MKlib_gen.sh user/rafan/ncurses/contrib/ncurses/ncurses/base/MKunctrl.awk user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_addch.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_delwin.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_freeall.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_getch.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_getstr.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_initscr.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_mouse.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_newterm.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_newwin.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_overlay.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_restart.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_screen.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_set_term.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_slk.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_slkrefr.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_ungetch.c user/rafan/ncurses/contrib/ncurses/ncurses/base/lib_window.c user/rafan/ncurses/contrib/ncurses/ncurses/base/resizeterm.c user/rafan/ncurses/contrib/ncurses/ncurses/base/tries.c user/rafan/ncurses/contrib/ncurses/ncurses/base/use_window.c user/rafan/ncurses/contrib/ncurses/ncurses/base/wresize.c user/rafan/ncurses/contrib/ncurses/ncurses/curses.priv.h user/rafan/ncurses/contrib/ncurses/ncurses/fifo_defs.h user/rafan/ncurses/contrib/ncurses/ncurses/llib-lncurses user/rafan/ncurses/contrib/ncurses/ncurses/llib-lncursest user/rafan/ncurses/contrib/ncurses/ncurses/llib-lncursesw user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/MKcodes.awk user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/MKnames.awk user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/alloc_entry.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/alloc_ttype.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/captoinfo.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/comp_expand.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/comp_hash.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/comp_parse.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/comp_scan.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/entries.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/home_terminfo.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/init_keytry.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/lib_acs.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/lib_baudrate.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/lib_cur_term.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/lib_data.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/lib_options.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/lib_setup.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/lib_termcap.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/lib_tgoto.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/lib_tparm.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/lib_tputs.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/lib_ttyflags.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/make_keys.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/name_match.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/parse_entry.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/read_entry.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/use_screen.c user/rafan/ncurses/contrib/ncurses/ncurses/tinfo/write_entry.c user/rafan/ncurses/contrib/ncurses/ncurses/trace/lib_trace.c user/rafan/ncurses/contrib/ncurses/ncurses/trace/lib_traceatr.c user/rafan/ncurses/contrib/ncurses/ncurses/trace/lib_tracebits.c user/rafan/ncurses/contrib/ncurses/ncurses/trace/lib_tracechr.c user/rafan/ncurses/contrib/ncurses/ncurses/trace/lib_tracedmp.c user/rafan/ncurses/contrib/ncurses/ncurses/trace/lib_tracemse.c user/rafan/ncurses/contrib/ncurses/ncurses/trace/trace_buf.c user/rafan/ncurses/contrib/ncurses/ncurses/trace/trace_tries.c user/rafan/ncurses/contrib/ncurses/ncurses/trace/varargs.c user/rafan/ncurses/contrib/ncurses/ncurses/trace/visbuf.c user/rafan/ncurses/contrib/ncurses/ncurses/tty/hardscroll.c user/rafan/ncurses/contrib/ncurses/ncurses/tty/lib_mvcur.c user/rafan/ncurses/contrib/ncurses/ncurses/tty/lib_twait.c user/rafan/ncurses/contrib/ncurses/ncurses/tty/tty_update.c user/rafan/ncurses/contrib/ncurses/ncurses/widechar/charable.c user/rafan/ncurses/contrib/ncurses/ncurses/widechar/lib_get_wch.c user/rafan/ncurses/contrib/ncurses/ncurses/widechar/lib_get_wstr.c user/rafan/ncurses/contrib/ncurses/ncurses/widechar/lib_key_name.c user/rafan/ncurses/contrib/ncurses/ncurses/widechar/lib_unget_wch.c user/rafan/ncurses/contrib/ncurses/panel/p_new.c user/rafan/ncurses/contrib/ncurses/panel/panel.priv.h user/rafan/ncurses/contrib/ncurses/progs/MKtermsort.sh user/rafan/ncurses/contrib/ncurses/progs/Makefile.in user/rafan/ncurses/contrib/ncurses/progs/dump_entry.c user/rafan/ncurses/contrib/ncurses/progs/dump_entry.h user/rafan/ncurses/contrib/ncurses/progs/infocmp.c user/rafan/ncurses/contrib/ncurses/progs/progs.priv.h user/rafan/ncurses/contrib/ncurses/progs/tic.c user/rafan/ncurses/contrib/ncurses/progs/toe.c user/rafan/ncurses/contrib/ncurses/progs/tput.c user/rafan/ncurses/contrib/ncurses/progs/tset.c user/rafan/ncurses/lib/ncurses/ncurses/Makefile user/rafan/ncurses/lib/ncurses/ncurses/ncurses_cfg.h Modified: user/rafan/ncurses/contrib/ncurses/ANNOUNCE ============================================================================== --- user/rafan/ncurses/contrib/ncurses/ANNOUNCE Sun Nov 9 14:10:19 2008 (r184799) +++ user/rafan/ncurses/contrib/ncurses/ANNOUNCE Sun Nov 9 14:32:58 2008 (r184800) @@ -1,4 +1,4 @@ - Announcing ncurses 5.6 + Announcing ncurses 5.7 The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, and more. It uses terminfo format, @@ -27,205 +27,217 @@ Release Notes This release is designed to be upward compatible from ncurses 5.0 - through 5.5; very few applications will require recompilation, + through 5.6; very few applications will require recompilation, depending on the platform. These are the highlights from the - change-log since ncurses 5.5 release. + change-log since ncurses 5.6 release. Interface changes: * generate linkable stubs for some macros: - getbegx, getbegy, getcurx, getcury, getmaxx, getmaxy, getparx, - getpary, getpary, - and (for libncursesw) - wgetbkgrnd + getattrs New features and improvements: * library - + support hashed databases for the terminal descriptions. This - uses the Berkeley database, has been tested for several - versions on different platforms. - + add use_legacy_coding() function to support lynx's - font-switching feature. - + add extension nofilter(), to cancel a prior filter() call. - + add/install a package config script, e.g., ncurses5-config or - ncursesw5-config, according to configuration options. - + provide ifdef for NCURSES_NOMACROS which suppresses most - macro definitions from curses.h, i.e., where a macro is - defined to override a function to improve performance. - + make ifdef's consistent in curses.h for the extended colors - so the header file can be used for the normal curses library. - The header file installed for extended colors is a variation - of the wide-character configuration. - + improve tgetstr() by making the return value point into the - user's buffer, if provided. - + add ifdef's allowing ncurses to be built with tparm() using - either varargs (the existing status), or using a - fixed-parameter list (to match X/Open). - + widen the test for xterm kmous a little to allow for other - strings than "\E[M", e.g., for xterm-sco functionality in - xterm. - + modify wgetnstr() to return KEY_RESIZE if a sigwinch occurs. - + move prototypes for wide-character trace functions from - curses.tail to curses.wide to avoid accidental reference to - those if _XOPEN_SOURCE_EXTENDED is defined without ensuring - that is included. - + change the way shared libraries (other than libtool) are - installed. Rather than copying the build-tree's libraries, - link the shared objects into the install directory. This - makes the --with-rpath option work except with $(DESTDIR). - + several improvements for rendering in hpterm. These are only - available if the library is configured using - --enable-xmc-glitch. - + Add NCURSES_NO_HARD_TABS and NCURSES_NO_MAGIC_COOKIE - environment variables to allow runtime suppression of the - related hard-tabs and xmc-glitch features. + + new flavor of the ncurses library provides rudimentary + support for POSIX threads. Several functions are reentrant, + but most require either a window-level or screen-level mutex. + (This is API-compatible, but not ABI-compatible with the + normal library). + + add NCURSES_OPAQUE symbol to curses.h, will use to make + structs opaque in selected configurations. + + add NCURSES_EXT_FUNCS and NCURSES_EXT_COLORS symbols to + curses.h to make it simpler to tell if the extended functions + and/or colors are declared. + + add wresize() to C++ binding + + eliminate fixed-buffer vsprintf() calls in C++ binding. + + add several functions to C++ binding which wrap C functions + that pass a WINDOW* parameter. + + adapt mouse-handling code from menu library in form-library + + improve tracing for form library, showing created forms, + fields, etc. + + make $NCURSES_NO_PADDING feature work for termcap interface . + + add check to trace-file open, if the given name is a + directory, add ".log" to the name and try again. + + several new manpages: curs_legacy.3x, curs_memleaks.3x, + curs_opaque.3x and curs_threads.3x * programs: - + add new test programs: chgat.c, demo_altkeys.c, echochar.c, - foldkeys.c, movewindow.c, redraw.c, (noting that existing - test programs also were modified to test additional - features). - + modify tack to test extended capability function-key strings. - + modify toe to access termcap data, e.g., via cgetent() - functions, or as a text file if those are not available. - + improve infocmp/tic -f option formatting. - + add toe -a option, to show all databases. This uses new - private interfaces in the ncurses library for iterating - through the list of databases. - + modify MKfallback.sh to use tic -x when constructing fallback - tables to allow extended capabilities to be retrieved from a - fallback entry. + + modified three test-programs to demonstrate the threading + support in this version: ditto, rain, worm. + + several new test-programs: demo_panels, dots_mvcur, + inch_wide, inchs, key_name, key_names, savescreen, + savescreen.sh test_arrays, test_get_wstr, test_getstr, + test_instr, test_inwstr and test_opaque. + + add adacurses-config to the Ada95 install. + + modify tic -f option to format spaces as \s to prevent them + from being lost when that is read back in unformatted + strings. + + The tack program is now distributed separately from ncurses. * terminal database - + add terminfo entries for xfce terminal (xfce) and multi gnome - terminal (mgt) - + add nsterm-16color entry - + updated mlterm terminfo entry - + add kon, kon2 and jfbterm terminfo entry - + remove invis capability from klone+sgr, mainly used by linux - entry, since it does not really do this - + add ka2, kb1, kb3, kc2 to vt220-keypad as an extension - + add shifted up/down arrow codes to xterm-new as kind/kri - strings - + add hpterm-color terminfo entry - + add 256color variants of terminfo entries for programs which - are reported to implement this feature - + correct order of use-clauses in rxvt-basic entry which made - codes for f1-f4 vt100-style rather than vt220-style. + + added entries: + o Eterm-256color, Eterm-88color and rxvt-88color + o aterm + o konsole-256color + o mrxvt + o screen.mlterm + o screen.rxvt + o teraterm4.59 is now the primary primary teraterm entry, + renamed original to teraterm2.3 + o 9term terminal + o Newbury Data entries + + updated/improved entries: + o gnome to version 2.22.3 + o h19, z100 + o konsole to version 1.6.6 + o mlterm, mlterm+pcfkeys + o xterm, and building-blocks for function-keys to [3]xterm + patch #230. Major bug fixes: - * correct a typo in configure --with-bool option for the case where - --without-cxx is used. - * move assignment from environment variable ESCDELAY from initscr() - down to newterm() so the environment variable affects timeouts for - terminals opened with newterm() as well. - * modify werase to clear multicolumn characters that extend into a - derived window. - * modify wchgat() to mark updated cells as changed so a refresh will - repaint those cells. - * correct logic in wadd_wch() and wecho_wch(), which did not guard - against passing the multi-column attribute into a call on - waddch(), e.g., using data returned by win_wch() - * fix redrawing of windows other than stdscr using wredrawln() by - touching the corresponding rows in curscr. - * reduce memory leaks in repeated calls to tgetent() by remembering - the last TERMINAL* value allocated to hold the corresponding data - and freeing that if the tgetent() result buffer is the same as the - previous call. - * modify read_termtype() so the term_names data is always allocated - as part of the str_table, a better fix for a memory leak. - * fix wins_nwstr(), which did not handle single-column non-8bit - codes. - * modify wbkgrnd() to avoid clearing the A_CHARTEXT attribute bits - since those record the state of multicolumn characters. - * improve SIGWINCH handling by postponing its effect during - newterm(), etc., when allocating screens. - * remove 970913 feature for copying subwindows as they are moved in - mvwin(). - * add checks in waddchnstr() and wadd_wchnstr() to stop copying when - a null character is found. - * add some checks to ensure current position is within scrolling - region before scrolling on a new line. - * add a workaround to ACS mapping to allow applications such as - test/blue.c to use the "PC ROM" characters by masking them with - A_ALTCHARSET. This worked up til 5.5, but was lost in the revision - of legacy coding. + * add logic to tic for cancelling strings in user-defined + capabilities (this is needed for current konsole terminfo entry). + * modify mk-1st.awk so the generated makefile rules for linking or + installing shared libraries do not first remove the library, in + case it is in use, e.g., libncurses.so by /bin/sh. + * correct check for notimeout() in wgetch(). + * fix a sign-extension bug in infocmp's repair_acsc() function. + * change winnstr() to stop at the end of the line. + * make Ada95 demo_panels() example work. + * fix for adding a non-spacing character at the beginning of a line. + * fill in extended-color pair to make colors work for + wide-characters using extended-colors. + * improve refresh of window on top of multi-column characters, + taking into account split characters on left/right window + boundaries. + * modify win_wchnstr() to ensure that only a base cell is returned + for each multi-column character. + * improve waddch() and winsch() handling of EILSEQ from mbrtowc() by + using unctrl() to display illegal bytes rather than trying to + append further bytes to make up a valid sequence. + * restore curs_set() state after endwin()/refresh() + * modify keyname() to use "^X" form only if meta() has been called, + or if keyname() is called without initializing curses, e.g., via + initscr() or newterm(). + * modify unctrl() to check codes in 128-255 range versus isprint(). + If they are not printable, and locale was set, use a "M-" or "~" + sequence. + * improve resizeterm() by moving ripped-off lines, and repainting + the soft-keys. + * modify form library to accept control characters such as newline + in set_field_buffer(), which is compatible with Solaris. + * use NCURSES_MOUSE_MASK() in definition of BUTTON_RELEASE(), etc., + to make those work properly with the --enable-ext-mouse + configuration + * correct some functions in Ada95 binding which were using return + value from C where none was returned. + * reviewed/fixed issues reported by Coverity and Klocwork tools. Portability: * configure script: + new options: - --with-hashed-db - Use Berkeley hashed database for storing terminfo - data rather than storing each compiled entry in a - separate binary file within a directory tree. + --disable-big-strings + control whether static string tables are generated + as single large strings (to improve startup + performance), or as array of individual strings. + + --disable-relink + control whether shared libraries are relinked + (during install) when rpath is enabled. + + --disable-tic-depends + make explicit whether tic library depends on + ncurses/ncursesw library. + + --enable-mixed-case + override the configure script's check if the + filesystem supports mixed-case filenames. This + allows one to control how the terminal database + maps to the filesystem. For filesystems that do not + support mixed-case, the library uses generate + 2-character (hexadecimal) codes for the lower-level + of the filesystem terminfo database + + --enable-reentrant + builds a different flavor of the ncurses library + (ncursest) which improves reentrant use of the + library by reducing global and static variables + (see the "--with-pthread" option for the threaded + support). + + --enable-weak-symbols + use weak-symbols for linking to the POSIX thread + library, and use the same soname for the ncurses + shared library as the normal library (caveat: the + ABI is for the threaded library, which makes global + data accessed via functions). + + --with-pthread + build with the POSIX thread library (tested with + AIX, Linux, FreeBSD, OpenBSD, HPUX, IRIX64, + Solaris, Tru64). + + --with-ticlib + build/install the tic-support functions in a + separate library - --without-dlsym - Do not use dlsym() to load GPM dynamically. + + improved options: - --with-valgrind - Simplify building for testing with valgrind. + --enable-ext-colors + requires the wide-character configuration. - --enable-wgetch-events - Compile with experimental wgetch-events code. + --with-chtype + ignore option value "unsigned" is always added to + the type in curses.h; do the same for + --with-mmask-t. - --enable-signed-char - Store booleans in "signed char" rather than "char". + --with-dmalloc + build-fix for redefinition of strndup. - + improved options: + --with-hashed-db + accepts a parameter which is the install-prefix of + a given Berkeley Database. - --disable-largefile - make the option work both ways. + --with-hashed-db + the $LIBS environment variable overrides the search + for the db library. - --with-gpm - The option now accepts a parameter, i.e., the name - of the dynamic GPM library to load via dlopen() - - --disable-symlinks - The option now allows one to disable symlink() in - tic even when link() does not work. + --without-hashed-db + assumed when "--disable-database" is used. * other configure/build issues: - + remove special case for Darwin in CF_XOPEN_SOURCE configure - macro. - + add configure check to ensure that SIGWINCH is defined on - platforms such as OS X which exclude that when _XOPEN_SOURCE, - etc., are defined - + use ld's -search_paths_first option on Darwin to work around - odd search rules on that platform. - + improve ifdef's for _POSIX_VDISABLE in tset to work with Mac - OS X. - + modify configure script to ensure that if the C compiler is - used rather than the loader in making shared libraries, the - $(CFLAGS) variable is also used. - + use ${CC} rather than ${LD} in shared library rules for - IRIX64, Solaris to help ensure that initialization sections - are provided for extra linkage requirements, e.g., of C++ - applications. - + improve some shared-library configure scripting for Linux, - FreeBSD and NetBSD to make --with-shlib-version work. - + split up dependency of names.c and codes.c in - ncurses/Makefile to work with parallel make. - + modify MKlib_gen.sh to change preprocessor-expanded _Bool - back to bool. - + modify progs/Makefile.in to make tput init work properly with - cygwin, i.e., do not pass a .exe in the reference string used - in check_aliases. + + build-fixes for LynxOS + + modify shared-library rules to allow FreeBSD 3.x to use + rpath. + + build-fix for FreeBSD "contemporary" TTY interface. + + build-fixes for AIX with libtool. + + build-fixes for Darwin and libtool. + + modify BeOS-specific ifdef's to build on Haiku. + + corrected gcc options for building shared libraries on + Solaris and IRIX64. + + change shared-library configuration for OpenBSD, make rpath + work. + + build-fixes for using libutf8, e.g., on OpenBSD 3.7 + + add "-e" option in ncurses/Makefile.in when generating + source-files to force earlier exit if the build environment + fails unexpectedly. + + add support for shared libraries for QNX. + + change delimiter in MKlib_gen.sh from '%' to '@', to avoid + substitution by IBM xlc to '#' as part of its extensions to + digraphs. * library: - + ignore wide-acs line-drawing characters that wcwidth() claims - are not one-column. This is a workaround for Solaris' broken - locale support. - + reduce name-pollution in term.h by removing #define's for - HAVE_xxx symbols. - + fix #ifdef in c++/internal.h for QNX 6.1 + + rewrite wrapper for wcrtomb(), making it work on Solaris. + This is used in the form library to determine the length of + the buffer needed by field_buffer. + + add/use configure script macro CF_SIG_ATOMIC_T, use the + corresponding type for data manipulated by signal handlers. + + set locale in misc/ncurses-config.in since it uses a range + + disable GPM mouse support when $TERM does not happen to + contain "linux", since Gpm_Open() no longer limits its + assertion to terminals that it might handle, e.g., within + "screen" in xterm. + + reset mouse file-descriptor when unloading GPM library. * test programs: - + modify test/configure script to allow building test programs - with PDCurses/X11. - + modified test programs to allow some to work with NetBSD - curses. Several do not because NetBSD curses implements a - subset of X/Open curses, and also lacks much of SVr4 - additions. But it is enough for comparison. - + improved test/configure to build test/ncurses on HPUX 11 - using the vendor curses. - + change configure script to produce test/Makefile from data - file. + + update test programs to build/work with various UNIX curses + for comparisons. Features of Ncurses @@ -271,6 +283,8 @@ the use of function keys, e.g., disabling the ncurses KEY_MOUSE, or by defining more than one control sequence to map to a given key code. + * Support for 256-color terminals, such as modern xterm, when + configured using the --enable-ext-colors option. * Support for 16-color terminals, such as aixterm and modern xterm. * Better cursor-movement optimization. The package now features a cursor-local-movement computation more efficient than either BSD's @@ -342,49 +356,45 @@ cdk Curses Development Kit - [3]http://invisible-island.net/cdk/ - [4]http://www.vexus.ca/products/CDK/ + [4]http://invisible-island.net/cdk/ + [5]http://www.vexus.ca/products/CDK/ ded directory-editor - [5]http://invisible-island.net/ded/ + [6]http://invisible-island.net/ded/ dialog the underlying application used in Slackware's setup, and the basis for similar applications on GNU/Linux. - [6]http://invisible-island.net/dialog/ + [7]http://invisible-island.net/dialog/ lynx the character-screen WWW browser - [7]http://lynx.isc.org/release/ + [8]http://lynx.isc.org/release/ Midnight Commander file manager - [8]http://www.ibiblio.org/mc/ + [9]http://www.ibiblio.org/mc/ mutt mail utility - [9]http://www.mutt.org/ + [10]http://www.mutt.org/ ncftp file-transfer utility - [10]http://www.ncftp.com/ + [11]http://www.ncftp.com/ nvi New vi versions 1.50 are able to use ncurses versions 1.9.7 and later. - [11]http://www.bostic.com/vi/ + [12]http://www.bostic.com/vi/ pinfo Lynx-like info browser. - [12]http://dione.ids.pl/~pborys/software/pinfo/ + [13]https://alioth.debian.org/projects/pinfo/ tin - newsreader, supporting color, MIME [13]http://www.tin.org/ - - vh-1.6 - Volks-Hypertext browser for the Jargon File - [14]http://www.debian.org/Packages/unstable/text/vh.html + newsreader, supporting color, MIME [14]http://www.tin.org/ as well as some that use ncurses for the terminfo support alone: @@ -402,7 +412,7 @@ Who's Who and What's What Zeyd Ben-Halim started it from a previous package pcurses, written by - Pavel Curtis. Eric S. Raymond continued development. Juergen Pfeifer + Pavel Curtis. Eric S. Raymond continued development. Jürgen Pfeifer wrote most of the form and menu libraries. Ongoing work is being done by [17]Thomas Dickey. Thomas Dickey acts as the maintainer for the Free Software Foundation, which holds the copyright on ncurses. @@ -442,18 +452,18 @@ References 1. ftp://ftp.gnu.org/gnu/ncurses/ 2. ftp://invisible-island.net/ncurses/ - 3. http://invisible-island.net/cdk/ - 4. http://www.vexus.ca/products/CDK/ - 5. http://invisible-island.net/ded/ - 6. http://invisible-island.net/dialog/ - 7. http://lynx.isc.org/release/ - 8. http://www.ibiblio.org/mc/ - 9. http://www.mutt.org/ - 10. http://www.ncftp.com/ - 11. http://www.bostic.com/vi/ - 12. http://dione.ids.pl/~pborys/software/pinfo/ - 13. http://www.tin.org/ - 14. http://www.debian.org/Packages/unstable/text/vh.html + 3. http://invisible-island.net/xterm/xterm.log.html#xterm_230 + 4. http://invisible-island.net/cdk/ + 5. http://www.vexus.ca/products/CDK/ + 6. http://invisible-island.net/ded/ + 7. http://invisible-island.net/dialog/ + 8. http://lynx.isc.org/release/ + 9. http://www.ibiblio.org/mc/ + 10. http://www.mutt.org/ + 11. http://www.ncftp.com/ + 12. http://www.bostic.com/vi/ + 13. https://alioth.debian.org/projects/pinfo/ + 14. http://www.tin.org/ 15. http://alioth.debian.org/projects/minicom/ 16. http://invisible-island.net/vile/ 17. mailto:dickey@invisible-island.net Modified: user/rafan/ncurses/contrib/ncurses/INSTALL ============================================================================== --- user/rafan/ncurses/contrib/ncurses/INSTALL Sun Nov 9 14:10:19 2008 (r184799) +++ user/rafan/ncurses/contrib/ncurses/INSTALL Sun Nov 9 14:32:58 2008 (r184800) @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: INSTALL,v 1.124 2008/03/29 18:07:32 tom Exp $ +-- $Id: INSTALL,v 1.135 2008/11/02 21:13:51 tom Exp $ --------------------------------------------------------------------- How to install Ncurses/Terminfo on your system --------------------------------------------------------------------- @@ -393,6 +393,18 @@ SUMMARY OF CONFIGURE OPTIONS: Compile without scroll-hints code. This option is ignored when hashmap scrolling is configured, which is the default. + --disable-tic-depends + When building shared libraries, normally the tic library is linked to + depend upon the ncurses library (and in turn, on the term-library if + the --with-termlib option was given). The tic- and term-libraries + ABI does not depend on the --enable-widec option. Some packagers have + used this to reduce the number of library files which are packaged + by using only one copy of those libraries. To make this work properly, + the tic library must be built without an explicit dependency on the + ncurses (or ncursesw) library. Use this configure option to do that. + For example + configure --with-ticlib --with-shared --disable-tic-depends + --disable-tparm-varargs Portable programs should call tparm() using the fixed-length parameter list documented in X/Open. ncurses provides varargs support for this @@ -572,6 +584,13 @@ SUMMARY OF CONFIGURE OPTIONS: --enable-warnings Turn on GCC compiler warnings. There should be only a few. + --enable-weak-symbols + If the --with-pthread option is set, check if the compiler supports + weak-symbols. If it does, then name the thread-capable library without + the "t" (libncurses rather than libncursest), and provide for + dynamically loading the pthreads entrypoints at runtime. This allows + one to reduce the number of library files for ncurses. + --enable-wgetch-events Compile with experimental wgetch-events code. See ncurses/README.IZ @@ -598,6 +617,9 @@ SUMMARY OF CONFIGURE OPTIONS: Normally this is the same as the release version; some ports have special requirements for compatibility. + This option does not affect linking with libtool, which uses the + release major/minor numbers. + --with-ada-compiler=CMD Specify the Ada95 compiler command (default "gnatmake") @@ -625,20 +647,32 @@ SUMMARY OF CONFIGURE OPTIONS: to do this if the target compiler has unusual flags which confuse the host compiler. + You can also set the environment variable $BUILD_CFLAGS rather than + use this option. + --with-build-cppflags=XXX If cross-compiling, specify the host C preprocessor-flags. You might need to do this if the target compiler has unusual flags which confuse the host compiler. + You can also set the environment variable $BUILD_CPPFLAGS rather than + use this option. + --with-build-ldflags=XXX If cross-compiling, specify the host linker-flags. You might need to do this if the target linker has unusual flags which confuse the host compiler. + You can also set the environment variable $BUILD_LDFLAGS rather than + use this option. + --with-build-libs=XXX If cross-compiling, the host libraries. You might need to do this if the target environment requires unusual libraries. + You can also set the environment variable $BUILD_LIBS rather than + use this option. + --with-caps=XXX Specify an alternate terminfo capabilities file, which makes the configure script look for "include/Caps.XXX". A few systems, e.g., @@ -795,6 +829,14 @@ SUMMARY OF CONFIGURE OPTIONS: may be unsigned. Use this option if you need to preserve compatibility with 64-bit executables. + --with-normal + Generate normal (i.e., static) libraries (default). + + Note: on Linux, the configure script will attempt to use the GPM + library via the dlsym() function call. Use --without-dlsym to disable + this feature, or --without-gpm, depending on whether you wish to use + GPM. + --with-ospeed=TYPE Override type of ospeed variable, which is part of the termcap compatibility interface. In termcap, this is a 'short', which works @@ -808,14 +850,6 @@ SUMMARY OF CONFIGURE OPTIONS: those using termcap, do not use the higher speeds. Your application (or system, in general) may or may not. - --with-normal - Generate normal (i.e., static) libraries (default). - - Note: on Linux, the configure script will attempt to use the GPM - library via the dlsym() function call. Use --without-dlsym to disable - this feature, or --without-gpm, depending on whether you wish to use - GPM. - --with-profile Generate profile-libraries These are named by adding "_p" to the root, e.g., libncurses_p.a @@ -898,6 +932,12 @@ SUMMARY OF CONFIGURE OPTIONS: library. As in termlib, there is no ABI difference between the "wide" libticw.so and libtic.so + NOTE: Overriding the name of the tic library may be useful if you are + also using the --with-termlib option to rename libtinfo. If you are + not doing that, renaming the tic library can result in conflicting + library dependencies for tic and other programs built with the tic + library. + --with-trace Configure the trace() function as part of the all models of the ncurses library. Normally it is part of the debug (libncurses_g) library only. @@ -961,6 +1001,94 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCU you may encounter when building a system with different versions of ncurses: + 5.7 (November 2, 2008) + Interface changes: + + + generate linkable stubs for some macros: + getattrs + + + Add new library configuration for tic-library (the non-curses portion + of the ncurses library used for the tic program as well as some + others such as tack. There is no API change, but makefiles would be + changed to use the tic-library built separately. + + tack, distributed separately from ncurses, uses some of the internal + _nc_XXX functions, which are declared in the tic.h header file. + + The reason for providing this separate library is that none of the + functions in it are suitable for threaded applications. + + + Add new library configuration (ncursest, ncurseswt) which provides + rudimentary support for POSIX threads. This introduces opaque + access functions to the WINDOW structure and adds a parameter to + several internal functions. + + + move most internal variables (except tic-library) into data blocks + _nc_globals and _nc_prescreen to simplify analysis. Those were + globally accessible, but since they were not part of the documented + API, there is no ABI change. + + + changed static tables of strings to be indices into long strings, to + improve startup performance. This changes parameter lists for some + of the internal functions. + + Added extensions: + + + add NCURSES_OPAQUE definition in curses.h to control whether internal + details of the WINDOW structure are visible to an application. This + is always defined when the threaded library is built, and is optional + otherwise. New functions for this: is_cleared, is_idcok, is_idlok, + is_immedok, is_keypad, is_leaveok, is_nodelay, is_notimeout, + is_scrollok, is_syncok, wgetparent and wgetscrreg. + + + the threaded library (ncursest) also disallows direct updating of + global curses-level variables, providing functions (via macros) for + obtaining their value. A few of those variables can be modified by + the application, using new functions: set_escdelay, set_tabsize + + + added functions use_window() and use_screen() which wrap a mutex + (if threading is configured) around a call to a user-supplied + function. + + Added internal functions: + _nc_get_alias_table + _nc_get_screensize + _nc_keyname + _nc_screen_of + _nc_set_no_padding + _nc_tracechar + _nc_tracemouse + _nc_unctrl + _nc_ungetch + + These are used for leak-testing, and are stubs for + ABI compatibility when ncurses is not configured for that + using the --disable-leaks configure script option: + + _nc_free_and_exit + _nc_leaks_tinfo + + Removed internal functions: + none + + Modified internal functions: + _nc_fifo_dump + _nc_find_entry + _nc_handle_sigwinch + _nc_init_keytry + _nc_keypad + _nc_locale_breaks_acs + _nc_timed_wait + _nc_update_screensize + + Use new typedef TRIES to replace "struct tries": + + _nc_add_to_try + _nc_expand_try + _nc_remove_key + _nc_remove_string + _nc_trace_tries + 5.6 (December 17, 2006) Interface changes: Modified: user/rafan/ncurses/contrib/ncurses/MANIFEST ============================================================================== --- user/rafan/ncurses/contrib/ncurses/MANIFEST Sun Nov 9 14:10:19 2008 (r184799) +++ user/rafan/ncurses/contrib/ncurses/MANIFEST Sun Nov 9 14:32:58 2008 (r184800) @@ -349,8 +349,10 @@ ./doc/html/man/curs_instr.3x.html ./doc/html/man/curs_inwstr.3x.html ./doc/html/man/curs_kernel.3x.html +./doc/html/man/curs_legacy.3x.html ./doc/html/man/curs_mouse.3x.html ./doc/html/man/curs_move.3x.html +./doc/html/man/curs_opaque.3x.html ./doc/html/man/curs_outopts.3x.html ./doc/html/man/curs_overlay.3x.html ./doc/html/man/curs_pad.3x.html @@ -364,6 +366,7 @@ ./doc/html/man/curs_termattrs.3x.html ./doc/html/man/curs_termcap.3x.html ./doc/html/man/curs_terminfo.3x.html +./doc/html/man/curs_threads.3x.html ./doc/html/man/curs_touch.3x.html ./doc/html/man/curs_trace.3x.html ./doc/html/man/curs_util.3x.html @@ -555,6 +558,7 @@ ./man/curs_inwstr.3x ./man/curs_kernel.3x ./man/curs_legacy.3x +./man/curs_memleaks.3x ./man/curs_mouse.3x ./man/curs_move.3x ./man/curs_opaque.3x @@ -700,6 +704,7 @@ ./misc/ncurses-config.in ./misc/ncurses.def ./misc/ncurses.ref +./misc/ncurses.supp ./misc/panel.def ./misc/panel.ref ./misc/run_tic.in Modified: user/rafan/ncurses/contrib/ncurses/NEWS ============================================================================== --- user/rafan/ncurses/contrib/ncurses/NEWS Sun Nov 9 14:10:19 2008 (r184799) +++ user/rafan/ncurses/contrib/ncurses/NEWS Sun Nov 9 14:32:58 2008 (r184800) @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1233 2008/05/03 23:14:39 tom Exp $ +-- $Id: NEWS,v 1.1320 2008/11/02 00:56:22 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,238 @@ See the AUTHORS file for the correspondi Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20081102 5.7 release for upload to ftp.gnu.org + +20081025 + + add a manpage to discuss memory leaks. + + add support for shared libraries for QNX (other than libtool, which + does not work well on that platform). + + build-fix for QNX C++ binding. + +20081018 + + build-fixes for OS/2 EMX. + + modify form library to accept control characters such as newline + in set_field_buffer(), which is compatible with Solaris (report by + Nit Khair). + + modify configure script to assume --without-hashed-db when + --disable-database is used. + + add "-e" option in ncurses/Makefile.in when generating source-files + to force earlier exit if the build environment fails unexpectedly + (prompted by patch by Adrian Bunk). + + change configure script to use CF_UTF8_LIB, improved variant of + CF_LIBUTF8. + +20081012 + + add teraterm4.59 terminfo entry, use that as primary teraterm entry, rename + original to teraterm2.3 -TD + + update "gnome" terminfo to 2.22.3 -TD + + update "konsole" terminfo to 1.6.6, needs today's fix for tic -TD + + add "aterm" terminfo -TD + + add "linux2.6.26" terminfo -TD + + add logic to tic for cancelling strings in user-defined capabilities, + overlooked til now. + +20081011 + + update html documentation. + + add -m and -s options to test/keynames.c and test/key_names.c to test + the meta() function with keyname() or key_name(), respectively. + + correct return value of key_name() on error; it is null. + + document some unresolved issues for rpath and pthreads in TO-DO. + + fix a missing prototype for ioctl() on OpenBSD in tset.c + + add configure option --disable-tic-depends to make explicit whether + tic library depends on ncurses/ncursesw library, amends change from + 20080823 (prompted by Debian #501421). + +20081004 + + some build-fixes for configure --disable-ext-funcs (incomplete, but + works for C/C++ parts). + + improve configure-check for awks unable to handle large strings, e.g. + AIX 5.1 whose awk silently gives up on large printf's. + +20080927 + + fix build for --with-dmalloc by workaround for redefinition of + strndup between string.h and dmalloc.h + + fix build for --disable-sigwinch + + add environment variable NCURSES_GPM_TERMS to allow override to use + GPM on terminals other than "linux", etc. + + disable GPM mouse support when $TERM does not happen to contain + "linux", since Gpm_Open() no longer limits its assertion to terminals + that it might handle, e.g., within "screen" in xterm. + + reset mouse file-descriptor when unloading GPM library (report by + Miroslav Lichvar). + + fix build for --disable-leaks --enable-widec --with-termlib + > patch by Juergen Pfeifer: + + use improved initialization for soft-label keys in Ada95 sample code. + + discard internal symbol _nc_slk_format (unused since 20080112). + + move call of slk_paint_info() from _nc_slk_initialize() to + slk_intern_refresh(), improving initialization. + +20080925 + + fix bug in mouse code for GPM from 20080920 changes (reported in + Debian #500103, also Miroslav Lichvar). + +20080920 + + fix shared-library rules for cygwin with tic- and tinfo-libraries. + + fix a memory leak when failure to connect to GPM. + + correct check for notimeout() in wgetch() (report on linux.redhat + newsgroup by FurtiveBertie). + + add an example warning-suppression file for valgrind, + misc/ncurses.supp (based on example from Reuben Thomas) + +20080913 + + change shared-library configuration for OpenBSD, make rpath work. + + build-fixes for using libutf8, e.g., on OpenBSD 3.7 + +20080907 + + corrected fix for --enable-weak-symbols (report by Frederic L W + Meunier). + +20080906 + + corrected gcc options for building shared libraries on IRIX64. + + add configure check for awk programs unable to handle big-strings, + use that to improve the default for --enable-big-strings option. + + makefile-fixes for --enable-weak-symbols (report by Frederic L W + Meunier). + + update test/configure script. + + adapt ifdef's from library to make test/view.c build when mbrtowc() + is unavailable, e.g., with HPUX 10.20. + + add configure check for wcsrtombs, mbsrtowcs, which are used in + test/ncurses.c, and use wcstombs, mbstowcs instead if available, + fixing build of ncursew for HPUX 11.00 + +20080830 + + fixes to make Ada95 demo_panels() example work. + + modify Ada95 'rain' test program to accept keyboard commands like the + C-version. + + modify BeOS-specific ifdef's to build on Haiku (patch by Scott + Mccreary). + + add configure-check to see if the std namespace is legal for cerr + and endl, to fix a build issue with Tru64. + + consistently use NCURSES_BOOL in lib_gen.c + + filter #line's from lib_gen.c + + change delimiter in MKlib_gen.sh from '%' to '@', to avoid + substitution by IBM xlc to '#' as part of its extensions to digraphs. + + update config.guess, config.sub from + http://savannah.gnu.org/projects/config + (caveat - its maintainer removed support for older Linux systems). + +20080823 + + modify configure check for pthread library to work with OSF/1 5.1, + which uses #define's to associate its header and library. + + use pthread_mutexattr_init() for initializing pthread_mutexattr_t, + makes threaded code work on HPUX 11.23 + + fix a bug in demo_menus in freeing menus (cf: 20080804). + + modify configure script for the case where tic library is used (and + possibly renamed) to remove its dependency upon ncurses/ncursew + library (patch by Dr Werner Fink). + + correct manpage for menu_fore() which gave wrong default for + the attribute used to display a selected entry (report by Mike Gran). + + add Eterm-256color, Eterm-88color and rxvt-88color (prompted by + Debian #495815) -TD + +20080816 + + add configure option --enable-weak-symbols to turn on new feature. + + add configure-check for availability of weak symbols. + + modify linkage with pthread library to use weak symbols so that + applications not linked to that library will not use the mutexes, + etc. This relies on gcc, and may be platform-specific (patch by Dr + Werner Fink). + + add note to INSTALL to document limitation of renaming of tic library + using the --with-ticlib configure option (report by Dr Werner Fink). + + document (in manpage) why tputs does not detect I/O errors (prompted + by comments by Samuel Thibault). + + fix remaining warnings from Klocwork report. + +20080804 + + modify _nc_panelhook() data to account for a permanent memory leak. + + fix memory leaks in test/demo_menus + + fix most warnings from Klocwork tool (report by Larry Zhou). + + modify configure script CF_XOPEN_SOURCE macro to add case for + "dragonfly" from xterm #236 changes. + + modify configure script --with-hashed-db to let $LIBS override the + search for the db library (prompted by report by Samson Pierre). + +20080726 + + build-fixes for gcc 4.3.1 (changes to gnat "warnings", and C inlining + thresholds). + +20080713 + + build-fix (reports by Christian Ebert, Funda Wang). + +20080712 + + compiler-warning fixes for Solaris. + +20080705 + + use NCURSES_MOUSE_MASK() in definition of BUTTON_RELEASE(), etc., to + make those work properly with the "--enable-ext-mouse" configuration + (cf: 20050205). + + improve documentation of build-cc options in INSTALL. + + work-around a bug in gcc 4.2.4 on AIX, which does not pass the + -static/-dynamic flags properly to linker, causing test/bs to + not link. + +20080628 + + correct some ifdef's needed for the broken-linker configuration. + + make debugging library's $BAUDRATE feature work for termcap + interface. + + make $NCURSES_NO_PADDING feature work for termcap interface (prompted + by comment on FreeBSD mailing list). + + add screen.mlterm terminfo entry -TD + + improve mlterm and mlterm+pcfkeys terminfo entries -TD + +20080621 + + regenerated html documentation. + + expand manpage description of parameters for form_driver() and + menu_driver() (prompted by discussion with Adam Spragg). + + add null-pointer checks for cur_term in baudrate() and + def_shell_mode(), def_prog_mode() + + fix some memory leaks in delscreen() and wide acs. + +20080614 + + modify test/ditto.c to illustrate multi-threaded use_screen(). + + change CC_SHARED_OPTS from -KPIC to -xcode=pic32 for Solaris. + + add "-shared" option to MK_SHARED_LIB for gcc on Solaris (report + by Poor Yorick). + +20080607 + + finish changes to wgetch(), making it switch as needed to the + window's actual screen when calling wrefresh() and wgetnstr(). That + allows wgetch() to get used concurrently in different threads with + some minor restrictions, e.g., the application should not delete a + window which is being used in a wgetch(). + + simplify mutex's, combining the window- and screen-mutex's. + +20080531 + + modify wgetch() to use the screen which corresponds to its window + parameter rather than relying on SP; some dependent functions still + use SP internally. + + factor out most use of SP in lib_mouse.c, using parameter. + + add internal _nc_keyname(), replacing keyname() to associate with a + particular SCREEN rather than the global SP. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Sun Nov 9 20:36:14 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65537106564A; Sun, 9 Nov 2008 20:36:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5631A8FC24; Sun, 9 Nov 2008 20:36:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9KaEYJ050148; Sun, 9 Nov 2008 20:36:14 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9KaDCg050136; Sun, 9 Nov 2008 20:36:13 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200811092036.mA9KaDCg050136@svn.freebsd.org> From: Warner Losh Date: Sun, 9 Nov 2008 20:36:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184803 - in user/imp/newcard/sys: . arm/arm arm/include arm/mv cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensola... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 20:36:14 -0000 Author: imp Date: Sun Nov 9 20:36:13 2008 New Revision: 184803 URL: http://svn.freebsd.org/changeset/base/184803 Log: Merge. Added: user/imp/newcard/sys/arm/arm/minidump_machdep.c - copied unchanged from r184779, head/sys/arm/arm/minidump_machdep.c user/imp/newcard/sys/arm/include/minidump.h - copied unchanged from r184779, head/sys/arm/include/minidump.h user/imp/newcard/sys/dev/mn/ - copied from r184779, head/sys/dev/mn/ user/imp/newcard/sys/dev/usb2/ - copied from r184779, head/sys/dev/usb2/ user/imp/newcard/sys/kgssapi/ - copied from r184779, head/sys/kgssapi/ user/imp/newcard/sys/modules/amr/amr_cam/ - copied from r184779, head/sys/modules/amr/amr_cam/ user/imp/newcard/sys/modules/kgssapi/ - copied from r184779, head/sys/modules/kgssapi/ user/imp/newcard/sys/modules/kgssapi_krb5/ - copied from r184779, head/sys/modules/kgssapi_krb5/ user/imp/newcard/sys/modules/usb2/ - copied from r184779, head/sys/modules/usb2/ user/imp/newcard/sys/nfsclient/nfs_krpc.c - copied unchanged from r184779, head/sys/nfsclient/nfs_krpc.c user/imp/newcard/sys/nfsserver/nfs_fha.c - copied unchanged from r184779, head/sys/nfsserver/nfs_fha.c user/imp/newcard/sys/nfsserver/nfs_fha.h - copied unchanged from r184779, head/sys/nfsserver/nfs_fha.h user/imp/newcard/sys/nfsserver/nfs_srvkrpc.c - copied unchanged from r184779, head/sys/nfsserver/nfs_srvkrpc.c user/imp/newcard/sys/rpc/replay.c - copied unchanged from r184779, head/sys/rpc/replay.c user/imp/newcard/sys/rpc/replay.h - copied unchanged from r184779, head/sys/rpc/replay.h user/imp/newcard/sys/rpc/rpcsec_gss/ - copied from r184779, head/sys/rpc/rpcsec_gss/ user/imp/newcard/sys/rpc/rpcsec_gss.h - copied unchanged from r184779, head/sys/rpc/rpcsec_gss.h Deleted: user/imp/newcard/sys/pci/if_mn.c Modified: user/imp/newcard/sys/ (props changed) user/imp/newcard/sys/arm/arm/dump_machdep.c user/imp/newcard/sys/arm/arm/pmap.c user/imp/newcard/sys/arm/include/md_var.h user/imp/newcard/sys/arm/include/pmap.h user/imp/newcard/sys/arm/mv/mv_machdep.c user/imp/newcard/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c user/imp/newcard/sys/cddl/compat/opensolaris/sys/types.h user/imp/newcard/sys/cddl/compat/opensolaris/sys/uio.h user/imp/newcard/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c user/imp/newcard/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c user/imp/newcard/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c user/imp/newcard/sys/cddl/dev/dtrace/dtrace_ioctl.c user/imp/newcard/sys/cddl/dev/dtrace/dtrace_load.c user/imp/newcard/sys/cddl/dev/dtrace/dtrace_unload.c user/imp/newcard/sys/cddl/dev/systrace/systrace.c user/imp/newcard/sys/compat/freebsd32/freebsd32_proto.h user/imp/newcard/sys/compat/freebsd32/freebsd32_syscall.h user/imp/newcard/sys/compat/freebsd32/freebsd32_syscalls.c user/imp/newcard/sys/compat/freebsd32/freebsd32_sysent.c user/imp/newcard/sys/compat/freebsd32/syscalls.master user/imp/newcard/sys/compat/linprocfs/linprocfs.c user/imp/newcard/sys/conf/NOTES user/imp/newcard/sys/conf/files user/imp/newcard/sys/conf/files.arm user/imp/newcard/sys/conf/kmod.mk user/imp/newcard/sys/conf/options user/imp/newcard/sys/dev/acpi_support/acpi_asus.c user/imp/newcard/sys/dev/acpica/Osd/OsdSchedule.c user/imp/newcard/sys/dev/acpica/acpi.c user/imp/newcard/sys/dev/adb/adb_mouse.c user/imp/newcard/sys/dev/age/if_age.c user/imp/newcard/sys/dev/amr/amr.c user/imp/newcard/sys/dev/amr/amr_cam.c user/imp/newcard/sys/dev/amr/amrvar.h user/imp/newcard/sys/dev/an/if_an.c user/imp/newcard/sys/dev/cardbus/cardbus_cis.c user/imp/newcard/sys/dev/cardbus/cardbusreg.h user/imp/newcard/sys/dev/cxgb/cxgb_main.c user/imp/newcard/sys/dev/cxgb/cxgb_osdep.h user/imp/newcard/sys/dev/e1000/if_em.c user/imp/newcard/sys/dev/e1000/if_igb.c user/imp/newcard/sys/dev/en/midway.c user/imp/newcard/sys/dev/hwpmc/hwpmc_mod.c user/imp/newcard/sys/dev/pci/pcireg.h user/imp/newcard/sys/dev/snp/snp.c user/imp/newcard/sys/dev/sound/pcm/channel.c user/imp/newcard/sys/dev/sound/pcm/channel.h user/imp/newcard/sys/dev/sound/pcm/mixer.c user/imp/newcard/sys/dev/sound/pcm/mixer.h user/imp/newcard/sys/dev/syscons/sysmouse.c user/imp/newcard/sys/dev/usb/u3g.c user/imp/newcard/sys/dev/usb/usb_subr.c user/imp/newcard/sys/dev/usb/usbdevs user/imp/newcard/sys/fs/coda/cnode.h user/imp/newcard/sys/fs/coda/coda_subr.c user/imp/newcard/sys/fs/coda/coda_venus.c user/imp/newcard/sys/fs/ntfs/ntfs_vnops.c user/imp/newcard/sys/fs/procfs/procfs.c user/imp/newcard/sys/fs/procfs/procfs_map.c user/imp/newcard/sys/fs/smbfs/smbfs_vfsops.c user/imp/newcard/sys/fs/unionfs/union_vfsops.c user/imp/newcard/sys/geom/journal/g_journal.c user/imp/newcard/sys/geom/part/g_part_apm.c user/imp/newcard/sys/geom/part/g_part_gpt.c user/imp/newcard/sys/gnu/fs/ext2fs/ext2_vfsops.c user/imp/newcard/sys/i386/conf/XEN user/imp/newcard/sys/i386/i386/bios.c user/imp/newcard/sys/isa/isa_common.c user/imp/newcard/sys/isa/isa_common.h user/imp/newcard/sys/isa/isavar.h user/imp/newcard/sys/isa/pnp.c user/imp/newcard/sys/kern/init_sysent.c user/imp/newcard/sys/kern/kern_cons.c (props changed) user/imp/newcard/sys/kern/kern_descrip.c user/imp/newcard/sys/kern/kern_exec.c user/imp/newcard/sys/kern/kern_mbuf.c user/imp/newcard/sys/kern/kern_proc.c user/imp/newcard/sys/kern/kern_sig.c user/imp/newcard/sys/kern/kern_thr.c user/imp/newcard/sys/kern/kern_thread.c user/imp/newcard/sys/kern/sched_ule.c user/imp/newcard/sys/kern/subr_sleepqueue.c user/imp/newcard/sys/kern/subr_smp.c user/imp/newcard/sys/kern/sys_process.c user/imp/newcard/sys/kern/syscalls.c user/imp/newcard/sys/kern/syscalls.master user/imp/newcard/sys/kern/systrace_args.c user/imp/newcard/sys/kern/tty.c user/imp/newcard/sys/kern/tty_pts.c user/imp/newcard/sys/kern/vfs_export.c user/imp/newcard/sys/kern/vfs_lookup.c user/imp/newcard/sys/kern/vfs_mount.c user/imp/newcard/sys/kern/vfs_subr.c user/imp/newcard/sys/kern/vfs_syscalls.c user/imp/newcard/sys/kern/vfs_vnops.c user/imp/newcard/sys/mips/idt/if_kr.c user/imp/newcard/sys/modules/Makefile user/imp/newcard/sys/modules/amr/Makefile user/imp/newcard/sys/modules/krpc/Makefile user/imp/newcard/sys/modules/nfsclient/Makefile user/imp/newcard/sys/modules/nfsserver/Makefile user/imp/newcard/sys/modules/rl/Makefile user/imp/newcard/sys/modules/snp/Makefile user/imp/newcard/sys/modules/zfs/Makefile user/imp/newcard/sys/net/if.c user/imp/newcard/sys/net/if_arcsubr.c user/imp/newcard/sys/net/if_fddisubr.c user/imp/newcard/sys/net/if_fwsubr.c user/imp/newcard/sys/net/if_gif.c user/imp/newcard/sys/net/if_iso88025subr.c user/imp/newcard/sys/net/if_spppsubr.c user/imp/newcard/sys/net/if_tun.c user/imp/newcard/sys/net/radix_mpath.c user/imp/newcard/sys/netgraph/ng_tty.c user/imp/newcard/sys/netgraph/ng_tty.h user/imp/newcard/sys/netinet/tcp_input.c user/imp/newcard/sys/netinet/tcp_subr.c user/imp/newcard/sys/netinet/tcp_var.h user/imp/newcard/sys/netsmb/smb_conn.c user/imp/newcard/sys/netsmb/smb_conn.h user/imp/newcard/sys/netsmb/smb_dev.c user/imp/newcard/sys/nfsclient/nfs.h user/imp/newcard/sys/nfsclient/nfs_nfsiod.c user/imp/newcard/sys/nfsclient/nfs_socket.c user/imp/newcard/sys/nfsclient/nfs_subs.c user/imp/newcard/sys/nfsclient/nfs_vfsops.c user/imp/newcard/sys/nfsclient/nfsmount.h user/imp/newcard/sys/nfsserver/nfs.h user/imp/newcard/sys/nfsserver/nfs_serv.c user/imp/newcard/sys/nfsserver/nfs_srvcache.c user/imp/newcard/sys/nfsserver/nfs_srvsock.c user/imp/newcard/sys/nfsserver/nfs_srvsubs.c user/imp/newcard/sys/nfsserver/nfs_syscalls.c user/imp/newcard/sys/nfsserver/nfsm_subs.h user/imp/newcard/sys/nfsserver/nfsrvcache.h user/imp/newcard/sys/nlm/nlm.h user/imp/newcard/sys/nlm/nlm_advlock.c user/imp/newcard/sys/nlm/nlm_prot_impl.c user/imp/newcard/sys/nlm/nlm_prot_svc.c user/imp/newcard/sys/pci/if_rl.c user/imp/newcard/sys/pci/if_rlreg.h user/imp/newcard/sys/rpc/auth.h user/imp/newcard/sys/rpc/auth_none.c user/imp/newcard/sys/rpc/auth_unix.c user/imp/newcard/sys/rpc/clnt.h user/imp/newcard/sys/rpc/clnt_dg.c user/imp/newcard/sys/rpc/clnt_rc.c user/imp/newcard/sys/rpc/clnt_vc.c user/imp/newcard/sys/rpc/rpc_com.h user/imp/newcard/sys/rpc/rpc_generic.c user/imp/newcard/sys/rpc/rpc_msg.h user/imp/newcard/sys/rpc/rpc_prot.c user/imp/newcard/sys/rpc/svc.c user/imp/newcard/sys/rpc/svc.h user/imp/newcard/sys/rpc/svc_auth.c user/imp/newcard/sys/rpc/svc_auth.h user/imp/newcard/sys/rpc/svc_auth_unix.c user/imp/newcard/sys/rpc/svc_dg.c user/imp/newcard/sys/rpc/svc_generic.c user/imp/newcard/sys/rpc/svc_vc.c user/imp/newcard/sys/rpc/xdr.h user/imp/newcard/sys/security/audit/audit_arg.c user/imp/newcard/sys/security/audit/audit_bsm_klib.c user/imp/newcard/sys/security/audit/audit_pipe.c user/imp/newcard/sys/sys/cfictl.h user/imp/newcard/sys/sys/mount.h user/imp/newcard/sys/sys/param.h user/imp/newcard/sys/sys/proc.h user/imp/newcard/sys/sys/syscall.h user/imp/newcard/sys/sys/syscall.mk user/imp/newcard/sys/sys/sysent.h user/imp/newcard/sys/sys/sysproto.h user/imp/newcard/sys/sys/ttydefaults.h user/imp/newcard/sys/tools/vnode_if.awk user/imp/newcard/sys/ufs/ffs/ffs_softdep.c user/imp/newcard/sys/ufs/ufs/ufs_acl.c user/imp/newcard/sys/ufs/ufs/ufs_dirhash.c user/imp/newcard/sys/ufs/ufs/ufs_vfsops.c user/imp/newcard/sys/vm/uma.h user/imp/newcard/sys/vm/vm_page.c user/imp/newcard/sys/xdr/xdr_mbuf.c Modified: user/imp/newcard/sys/arm/arm/dump_machdep.c ============================================================================== --- user/imp/newcard/sys/arm/arm/dump_machdep.c Sun Nov 9 17:37:54 2008 (r184802) +++ user/imp/newcard/sys/arm/arm/dump_machdep.c Sun Nov 9 20:36:13 2008 (r184803) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -44,6 +45,11 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct kerneldumpheader) == 512); +int do_minidump = 1; +TUNABLE_INT("debug.minidump", &do_minidump); +SYSCTL_INT(_debug, OID_AUTO, minidump, CTLFLAG_RW, &do_minidump, 0, + "Enable mini crash dumps"); + /* * Don't touch the first SIZEOF_METADATA bytes on the dump device. This * is to protect us from metadata and to protect metadata from us. @@ -155,11 +161,10 @@ cb_dumpdata(struct md_pa *mdp, int seqnr vm_offset_t va; uint32_t pgs; size_t counter, sz, chunk; - int c, error, twiddle; + int c, error; error = 0; /* catch case in which chunk size is 0 */ - counter = 0; /* Update twiddle every 16MB */ - twiddle = 0; + counter = 0; va = 0; pgs = mdp->md_size / PAGE_SIZE; pa = mdp->md_start; @@ -264,7 +269,12 @@ dumpsys(struct dumperinfo *di) off_t hdrgap; size_t hdrsz; int error; - + + if (do_minidump) { + minidumpsys(di); + return; + } + bzero(&ehdr, sizeof(ehdr)); ehdr.e_ident[EI_MAG0] = ELFMAG0; ehdr.e_ident[EI_MAG1] = ELFMAG1; Copied: user/imp/newcard/sys/arm/arm/minidump_machdep.c (from r184779, head/sys/arm/arm/minidump_machdep.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/imp/newcard/sys/arm/arm/minidump_machdep.c Sun Nov 9 20:36:13 2008 (r184803, copy of r184779, head/sys/arm/arm/minidump_machdep.c) @@ -0,0 +1,483 @@ +/*- + * Copyright (c) 2008 Semihalf, Grzegorz Bernacki + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * from: FreeBSD: src/sys/i386/i386/minidump_machdep.c,v 1.6 2008/08/17 23:27:27 + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +CTASSERT(sizeof(struct kerneldumpheader) == 512); + +/* + * Don't touch the first SIZEOF_METADATA bytes on the dump device. This + * is to protect us from metadata and to protect metadata from us. + */ +#define SIZEOF_METADATA (64*1024) + +uint32_t *vm_page_dump; +int vm_page_dump_size; + +static struct kerneldumpheader kdh; +static off_t dumplo; + +/* Handle chunked writes. */ +static size_t fragsz, offset; +static void *dump_va; +static uint64_t counter, progress; + +CTASSERT(sizeof(*vm_page_dump) == 4); + +static int +is_dumpable(vm_paddr_t pa) +{ + int i; + + for (i = 0; dump_avail[i] != 0 || dump_avail[i + 1] != 0; i += 2) { + if (pa >= dump_avail[i] && pa < dump_avail[i + 1]) + return (1); + } + return (0); +} + +#define PG2MB(pgs) (((pgs) + (1 << 8) - 1) >> 8) + +static int +blk_flush(struct dumperinfo *di) +{ + int error; + + if (fragsz == 0) + return (0); + + error = dump_write(di, (char*)dump_va + offset, 0, dumplo, fragsz - offset); + dumplo += (fragsz - offset); + fragsz = 0; + offset = 0; + return (error); +} + +static int +blk_write(struct dumperinfo *di, char *ptr, vm_paddr_t pa, size_t sz) +{ + size_t len; + int error, i, c; + u_int maxdumpsz; + + maxdumpsz = di->maxiosize; + + if (maxdumpsz == 0) /* seatbelt */ + maxdumpsz = PAGE_SIZE; + + error = 0; + + if (ptr != NULL && pa != 0) { + printf("cant have both va and pa!\n"); + return (EINVAL); + } + + if (ptr != NULL) { + /* If we're doing a virtual dump, flush any pre-existing pa pages */ + error = blk_flush(di); + if (error) + return (error); + } + + while (sz) { + if (fragsz == 0) { + offset = pa & PAGE_MASK; + fragsz += offset; + } + len = maxdumpsz - fragsz; + if (len > sz) + len = sz; + counter += len; + progress -= len; + + if (counter >> 22) { + printf(" %lld", PG2MB(progress >> PAGE_SHIFT)); + counter &= (1<<22) - 1; + } + + if (ptr) { + error = dump_write(di, ptr, 0, dumplo, len); + if (error) + return (error); + dumplo += len; + ptr += len; + sz -= len; + } else { + for (i = 0; i < len; i += PAGE_SIZE) + dump_va = pmap_kenter_temp(pa + i, + (i + fragsz) >> PAGE_SHIFT); + fragsz += len; + pa += len; + sz -= len; + if (fragsz == maxdumpsz) { + error = blk_flush(di); + if (error) + return (error); + } + } + + /* Check for user abort. */ + c = cncheckc(); + if (c == 0x03) + return (ECANCELED); + if (c != -1) + printf(" (CTRL-C to abort) "); + } + + return (0); +} + +static int +blk_write_cont(struct dumperinfo *di, vm_paddr_t pa, size_t sz) +{ + int error; + + error = blk_write(di, 0, pa, sz); + if (error) + return (error); + + error = blk_flush(di); + if (error) + return (error); + + return (0); +} + +/* A fake page table page, to avoid having to handle both 4K and 2M pages */ +static pt_entry_t fakept[NPTEPG]; + +void +minidumpsys(struct dumperinfo *di) +{ + struct minidumphdr mdhdr; + uint64_t dumpsize; + uint32_t ptesize; + uint32_t bits; + uint32_t pa, prev_pa = 0, count = 0; + vm_offset_t va; + pd_entry_t *pdp; + pt_entry_t *pt, *ptp; + int i, k, bit, error; + char *addr; + + /* Flush cache */ + cpu_idcache_wbinv_all(); + cpu_l2cache_wbinv_all(); + + counter = 0; + /* Walk page table pages, set bits in vm_page_dump */ + ptesize = 0; + for (va = KERNBASE; va < kernel_vm_end; va += NBPDR) { + /* + * We always write a page, even if it is zero. Each + * page written corresponds to 2MB of space + */ + ptesize += L2_TABLE_SIZE_REAL; + pmap_get_pde_pte(pmap_kernel(), va, &pdp, &ptp); + if (pmap_pde_v(pdp) && pmap_pde_section(pdp)) { + /* This is a section mapping 1M page. */ + pa = (*pdp & L1_S_ADDR_MASK) | (va & ~L1_S_ADDR_MASK); + for (k = 0; k < (L1_S_SIZE / PAGE_SIZE); k++) { + if (is_dumpable(pa)) + dump_add_page(pa); + pa += PAGE_SIZE; + } + continue; + } + if (pmap_pde_v(pdp) && pmap_pde_page(pdp)) { + /* Set bit for each valid page in this 1MB block */ + addr = pmap_kenter_temp(*pdp & L1_C_ADDR_MASK, 0); + pt = (pt_entry_t*)(addr + + (((uint32_t)*pdp & L1_C_ADDR_MASK) & PAGE_MASK)); + for (k = 0; k < 256; k++) { + if ((pt[k] & L2_TYPE_MASK) == L2_TYPE_L) { + pa = (pt[k] & L2_L_FRAME) | + (va & L2_L_OFFSET); + for (i = 0; i < 16; i++) { + if (is_dumpable(pa)) + dump_add_page(pa); + k++; + pa += PAGE_SIZE; + } + } else if ((pt[k] & L2_TYPE_MASK) == L2_TYPE_S) { + pa = (pt[k] & L2_S_FRAME) | + (va & L2_S_OFFSET); + if (is_dumpable(pa)) + dump_add_page(pa); + } + } + } else { + /* Nothing, we're going to dump a null page */ + } + } + + /* Calculate dump size. */ + dumpsize = ptesize; + dumpsize += round_page(msgbufp->msg_size); + dumpsize += round_page(vm_page_dump_size); + + for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { + bits = vm_page_dump[i]; + while (bits) { + bit = ffs(bits) - 1; + pa = (((uint64_t)i * sizeof(*vm_page_dump) * NBBY) + + bit) * PAGE_SIZE; + /* Clear out undumpable pages now if needed */ + if (is_dumpable(pa)) + dumpsize += PAGE_SIZE; + else + dump_drop_page(pa); + bits &= ~(1ul << bit); + } + } + + dumpsize += PAGE_SIZE; + + /* Determine dump offset on device. */ + if (di->mediasize < SIZEOF_METADATA + dumpsize + sizeof(kdh) * 2) { + error = ENOSPC; + goto fail; + } + + dumplo = di->mediaoffset + di->mediasize - dumpsize; + dumplo -= sizeof(kdh) * 2; + progress = dumpsize; + + /* Initialize mdhdr */ + bzero(&mdhdr, sizeof(mdhdr)); + strcpy(mdhdr.magic, MINIDUMP_MAGIC); + mdhdr.version = MINIDUMP_VERSION; + mdhdr.msgbufsize = msgbufp->msg_size; + mdhdr.bitmapsize = vm_page_dump_size; + mdhdr.ptesize = ptesize; + mdhdr.kernbase = KERNBASE; + + mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_ARM_VERSION, dumpsize, + di->blocksize); + + printf("Physical memory: %u MB\n", ptoa((uintmax_t)physmem) / 1048576); + printf("Dumping %llu MB:", (long long)dumpsize >> 20); + + /* Dump leader */ + error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); + if (error) + goto fail; + dumplo += sizeof(kdh); + + /* Dump my header */ + bzero(&fakept, sizeof(fakept)); + bcopy(&mdhdr, &fakept, sizeof(mdhdr)); + error = blk_write(di, (char *)&fakept, 0, PAGE_SIZE); + if (error) + goto fail; + + /* Dump msgbuf up front */ + error = blk_write(di, (char *)msgbufp->msg_ptr, 0, round_page(msgbufp->msg_size)); + if (error) + goto fail; + + /* Dump bitmap */ + error = blk_write(di, (char *)vm_page_dump, 0, + round_page(vm_page_dump_size)); + if (error) + goto fail; + + /* Dump kernel page table pages */ + for (va = KERNBASE; va < kernel_vm_end; va += NBPDR) { + /* We always write a page, even if it is zero */ + pmap_get_pde_pte(pmap_kernel(), va, &pdp, &ptp); + + if (pmap_pde_v(pdp) && pmap_pde_section(pdp)) { + if (count) { + error = blk_write_cont(di, prev_pa, + count * L2_TABLE_SIZE_REAL); + if (error) + goto fail; + count = 0; + prev_pa = 0; + } + /* This is a single 2M block. Generate a fake PTP */ + pa = (*pdp & L1_S_ADDR_MASK) | (va & ~L1_S_ADDR_MASK); + for (k = 0; k < (L1_S_SIZE / PAGE_SIZE); k++) { + fakept[k] = L2_S_PROTO | (pa + (k * PAGE_SIZE)) | + L2_S_PROT(PTE_KERNEL, + VM_PROT_READ | VM_PROT_WRITE); + } + error = blk_write(di, (char *)&fakept, 0, + L2_TABLE_SIZE_REAL); + if (error) + goto fail; + /* Flush, in case we reuse fakept in the same block */ + error = blk_flush(di); + if (error) + goto fail; + continue; + } + if (pmap_pde_v(pdp) && pmap_pde_page(pdp)) { + pa = *pdp & L1_C_ADDR_MASK; + if (!count) { + prev_pa = pa; + count++; + } + else { + if (pa == (prev_pa + count * L2_TABLE_SIZE_REAL)) + count++; + else { + error = blk_write_cont(di, prev_pa, + count * L2_TABLE_SIZE_REAL); + if (error) + goto fail; + count = 1; + prev_pa = pa; + } + } + } else { + if (count) { + error = blk_write_cont(di, prev_pa, + count * L2_TABLE_SIZE_REAL); + if (error) + goto fail; + count = 0; + prev_pa = 0; + } + bzero(fakept, sizeof(fakept)); + error = blk_write(di, (char *)&fakept, 0, + L2_TABLE_SIZE_REAL); + if (error) + goto fail; + /* Flush, in case we reuse fakept in the same block */ + error = blk_flush(di); + if (error) + goto fail; + } + } + + if (count) { + error = blk_write_cont(di, prev_pa, count * L2_TABLE_SIZE_REAL); + if (error) + goto fail; + count = 0; + prev_pa = 0; + } + + /* Dump memory chunks */ + for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { + bits = vm_page_dump[i]; + while (bits) { + bit = ffs(bits) - 1; + pa = (((uint64_t)i * sizeof(*vm_page_dump) * NBBY) + + bit) * PAGE_SIZE; + if (!count) { + prev_pa = pa; + count++; + } else { + if (pa == (prev_pa + count * PAGE_SIZE)) + count++; + else { + error = blk_write_cont(di, prev_pa, + count * PAGE_SIZE); + if (error) + goto fail; + count = 1; + prev_pa = pa; + } + } + bits &= ~(1ul << bit); + } + } + if (count) { + error = blk_write_cont(di, prev_pa, count * PAGE_SIZE); + if (error) + goto fail; + count = 0; + prev_pa = 0; + } + + /* Dump trailer */ + error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); + if (error) + goto fail; + dumplo += sizeof(kdh); + + /* Signal completion, signoff and exit stage left. */ + dump_write(di, NULL, 0, 0, 0); + printf("\nDump complete\n"); + return; + +fail: + if (error < 0) + error = -error; + + if (error == ECANCELED) + printf("\nDump aborted\n"); + else if (error == ENOSPC) + printf("\nDump failed. Partition too small.\n"); + else + printf("\n** DUMP FAILED (ERROR %d) **\n", error); +} + +void +dump_add_page(vm_paddr_t pa) +{ + int idx, bit; + + pa >>= PAGE_SHIFT; + idx = pa >> 5; /* 2^5 = 32 */ + bit = pa & 31; + atomic_set_int(&vm_page_dump[idx], 1ul << bit); +} + +void +dump_drop_page(vm_paddr_t pa) +{ + int idx, bit; + + pa >>= PAGE_SHIFT; + idx = pa >> 5; /* 2^5 = 32 */ + bit = pa & 31; + atomic_clear_int(&vm_page_dump[idx], 1ul << bit); +} Modified: user/imp/newcard/sys/arm/arm/pmap.c ============================================================================== --- user/imp/newcard/sys/arm/arm/pmap.c Sun Nov 9 17:37:54 2008 (r184802) +++ user/imp/newcard/sys/arm/arm/pmap.c Sun Nov 9 20:36:13 2008 (r184803) @@ -270,6 +270,11 @@ union pmap_cache_state *pmap_cache_state struct msgbuf *msgbufp = 0; +/* + * Crashdump maps. + */ +static caddr_t crashdumpmap; + extern void bcopy_page(vm_offset_t, vm_offset_t); extern void bzero_page(vm_offset_t); @@ -1209,7 +1214,7 @@ pmap_l2cache_wbinv_range(pmap_t pm, vm_o CTR4(KTR_PMAP, "pmap_l2cache_wbinv_range: pmap %p is_kernel %d " "va 0x%08x len 0x%x ", pm, pm == pmap_kernel(), va, rest); if (pmap_get_pde_pte(pm, va, &pde, &ptep) && l2pte_valid(*ptep)) - cpu_l2cache_wb_range(va, rest); + cpu_l2cache_wb_range(va, rest); len -= rest; va += rest; @@ -1241,7 +1246,7 @@ pmap_l2cache_wb_range(pmap_t pm, vm_offs CTR4(KTR_PMAP, "pmap_l2cache_wb_range: pmap %p is_kernel %d " "va 0x%08x len 0x%x ", pm, pm == pmap_kernel(), va, rest); if (pmap_get_pde_pte(pm, va, &pde, &ptep) && l2pte_valid(*ptep)) - cpu_l2cache_wb_range(va, rest); + cpu_l2cache_wb_range(va, rest); len -= rest; va += rest; @@ -1276,6 +1281,7 @@ static PMAP_INLINE void pmap_dcache_wb_range(pmap_t pm, vm_offset_t va, vm_size_t len, boolean_t do_inv, boolean_t rd_only) { + CTR4(KTR_PMAP, "pmap_dcache_wb_range: pmap %p is_kernel %d va 0x%08x " "len 0x%x ", pm, pm == pmap_kernel(), va, len); CTR2(KTR_PMAP, " do_inv %d rd_only %d", do_inv, rd_only); @@ -1290,8 +1296,7 @@ pmap_dcache_wb_range(pmap_t pm, vm_offse cpu_dcache_wbinv_range(va, len); pmap_l2cache_wbinv_range(pm, va, len); } - } else - if (!rd_only) { + } else if (!rd_only) { cpu_dcache_wb_range(va, len); pmap_l2cache_wb_range(pm, va, len); } @@ -2455,6 +2460,8 @@ pmap_bootstrap(vm_offset_t firstaddr, vm pmap_alloc_specials(&virtual_avail, 1, (vm_offset_t*)&_tmppt, NULL); + pmap_alloc_specials(&virtual_avail, + MAXDUMPPGS, (vm_offset_t *)&crashdumpmap, NULL); SLIST_INIT(&l1_list); TAILQ_INIT(&l1_lru_list); mtx_init(&l1_lru_lock, "l1 list lock", NULL, MTX_DEF); @@ -2793,6 +2800,20 @@ pmap_kenter_section(vm_offset_t va, vm_o } /* + * Make a temporary mapping for a physical address. This is only intended + * to be used for panic dumps. + */ +void * +pmap_kenter_temp(vm_paddr_t pa, int i) +{ + vm_offset_t va; + + va = (vm_offset_t)crashdumpmap + (i * PAGE_SIZE); + pmap_kenter(va, pa); + return ((void *)crashdumpmap); +} + +/* * add a wired page to the kva * note that in order for the mapping to take effect -- you * should do a invltlb after doing the pmap_kenter... @@ -3958,7 +3979,7 @@ pmap_zero_page_generic(vm_paddr_t phys, * Hook in the page, zero it, invalidate the TLB as needed. * * Note the temporary zero-page mapping must be a non-cached page in - * ordert to work without corruption when write-allocate is enabled. + * order to work without corruption when write-allocate is enabled. */ *cdst_pte = L2_S_PROTO | phys | L2_S_PROT(PTE_KERNEL, VM_PROT_WRITE); cpu_tlb_flushD_SE(cdstp); Modified: user/imp/newcard/sys/arm/include/md_var.h ============================================================================== --- user/imp/newcard/sys/arm/include/md_var.h Sun Nov 9 17:37:54 2008 (r184802) +++ user/imp/newcard/sys/arm/include/md_var.h Sun Nov 9 20:36:13 2008 (r184803) @@ -35,6 +35,8 @@ extern char sigcode[]; extern int szsigcode; +extern uint32_t *vm_page_dump; +extern int vm_page_dump_size; extern int (*_arm_memcpy)(void *, void *, int, int); extern int (*_arm_bzero)(void *, int, int); @@ -46,7 +48,11 @@ extern int _min_bzero_size; #define SRC_IS_USER 0x2 #define IS_PHYSICAL 0x4 +struct dumperinfo; extern int busdma_swi_pending; void busdma_swi(void); +void dump_add_page(vm_paddr_t); +void dump_drop_page(vm_paddr_t); +void minidumpsys(struct dumperinfo *); #endif /* !_MACHINE_MD_VAR_H_ */ Copied: user/imp/newcard/sys/arm/include/minidump.h (from r184779, head/sys/arm/include/minidump.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/imp/newcard/sys/arm/include/minidump.h Sun Nov 9 20:36:13 2008 (r184803, copy of r184779, head/sys/arm/include/minidump.h) @@ -0,0 +1,45 @@ +/*- + * Copyright (c) 2006 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * From: FreeBSD: src/sys/i386/include/minidump.h,v 1.1 2006/04/21 04:28:43 + * $FreeBSD$ + */ + +#ifndef _MACHINE_MINIDUMP_H_ +#define _MACHINE_MINIDUMP_H_ 1 + +#define MINIDUMP_MAGIC "minidump FreeBSD/arm" +#define MINIDUMP_VERSION 1 + +struct minidumphdr { + char magic[24]; + uint32_t version; + uint32_t msgbufsize; + uint32_t bitmapsize; + uint32_t ptesize; + uint32_t kernbase; +}; + +#endif /* _MACHINE_MINIDUMP_H_ */ Modified: user/imp/newcard/sys/arm/include/pmap.h ============================================================================== --- user/imp/newcard/sys/arm/include/pmap.h Sun Nov 9 17:37:54 2008 (r184802) +++ user/imp/newcard/sys/arm/include/pmap.h Sun Nov 9 20:36:13 2008 (r184803) @@ -206,6 +206,7 @@ extern vm_offset_t virtual_end; void pmap_bootstrap(vm_offset_t, vm_offset_t, struct pv_addr *); void pmap_kenter(vm_offset_t va, vm_paddr_t pa); void pmap_kenter_nocache(vm_offset_t va, vm_paddr_t pa); +void *pmap_kenter_temp(vm_paddr_t pa, int i); void pmap_kenter_user(vm_offset_t va, vm_paddr_t pa); void pmap_kremove(vm_offset_t); void *pmap_mapdev(vm_offset_t, vm_size_t); Modified: user/imp/newcard/sys/arm/mv/mv_machdep.c ============================================================================== --- user/imp/newcard/sys/arm/mv/mv_machdep.c Sun Nov 9 17:37:54 2008 (r184802) +++ user/imp/newcard/sys/arm/mv/mv_machdep.c Sun Nov 9 20:36:13 2008 (r184803) @@ -93,9 +93,6 @@ __FBSDID("$FreeBSD$"); #define debugf(fmt, args...) #endif -#define KERNEL_PT_SYS 0 /* Page table for mapping proc0 zero page */ -#define KERNEL_PT_KERN 1 - /* * This is the number of L2 page tables required for covering max * (hypothetical) memsize of 4GB and all kernel mappings (vectors, msgbuf, @@ -366,7 +363,7 @@ initarm(void *mdp, void *unused __unused struct bi_mem_region *mr; void *kmdp; u_int l1pagetable; - int i = 0; + int i = 0, j = 0; kmdp = NULL; lastaddr = 0; @@ -465,13 +462,14 @@ initarm(void *mdp, void *unused __unused if (!(i % (PAGE_SIZE / L2_TABLE_SIZE_REAL))) { valloc_pages(kernel_pt_table[i], L2_TABLE_SIZE / PAGE_SIZE); + j = i; } else { - kernel_pt_table[i].pv_va = freemempos - - (i % (PAGE_SIZE / L2_TABLE_SIZE_REAL)) * - L2_TABLE_SIZE_REAL; + kernel_pt_table[i].pv_va = kernel_pt_table[j].pv_va + + L2_TABLE_SIZE_REAL * (i - j); kernel_pt_table[i].pv_pa = kernel_pt_table[i].pv_va - KERNVIRTADDR + KERNPHYSADDR; + } } /* @@ -506,7 +504,7 @@ initarm(void *mdp, void *unused __unused l2_start = lastaddr & ~(L1_S_OFFSET); for (i = 0 ; i < l2size - 1; i++) pmap_link_l2pt(l1pagetable, l2_start + i * L1_S_SIZE, - &kernel_pt_table[KERNEL_PT_KERN + i]); + &kernel_pt_table[i]); pmap_curmaxkvaddr = l2_start + (l2size - 1) * L1_S_SIZE; @@ -532,7 +530,7 @@ initarm(void *mdp, void *unused __unused /* Link and map the vector page */ pmap_link_l2pt(l1pagetable, ARM_VECTORS_HIGH, - &kernel_pt_table[KERNEL_PT_SYS]); + &kernel_pt_table[l2size - 1]); pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); @@ -603,8 +601,8 @@ initarm(void *mdp, void *unused __unused arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); - dump_avail[0] = KERNPHYSADDR; - dump_avail[1] = KERNPHYSADDR + memsize; + dump_avail[0] = 0; + dump_avail[1] = memsize; dump_avail[2] = 0; dump_avail[3] = 0; Modified: user/imp/newcard/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c ============================================================================== --- user/imp/newcard/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Sun Nov 9 17:37:54 2008 (r184802) +++ user/imp/newcard/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Sun Nov 9 20:36:13 2008 (r184803) @@ -93,6 +93,10 @@ void zfs_kmem_free(void *buf, size_t size __unused) { #ifdef KMEM_DEBUG + if (buf == NULL) { + printf("%s: attempt to free NULL\n",__func__); + return; + } struct kmem_item *i; buf = (u_char *)buf - sizeof(struct kmem_item); @@ -236,7 +240,8 @@ calloc(size_t n, size_t s) } #ifdef KMEM_DEBUG -static void +void kmem_show(void *); +void kmem_show(void *dummy __unused) { struct kmem_item *i; @@ -248,12 +253,10 @@ kmem_show(void *dummy __unused) printf("KMEM_DEBUG: Leaked elements:\n\n"); LIST_FOREACH(i, &kmem_items, next) { printf("address=%p\n", i); - stack_print(&i->stack); - printf("\n"); } } mtx_unlock(&kmem_items_mtx); } -SYSUNINIT(sol_kmem, SI_SUB_DRIVERS, SI_ORDER_FIRST, kmem_show, NULL); +SYSUNINIT(sol_kmem, SI_SUB_CPU, SI_ORDER_FIRST, kmem_show, NULL); #endif /* KMEM_DEBUG */ Modified: user/imp/newcard/sys/cddl/compat/opensolaris/sys/types.h ============================================================================== --- user/imp/newcard/sys/cddl/compat/opensolaris/sys/types.h Sun Nov 9 17:37:54 2008 (r184802) +++ user/imp/newcard/sys/cddl/compat/opensolaris/sys/types.h Sun Nov 9 20:36:13 2008 (r184803) @@ -64,12 +64,13 @@ typedef void pathname_t; typedef int64_t rlim64_t; #else - +#ifdef NEED_SOLARIS_BOOLEAN #if defined(__XOPEN_OR_POSIX) typedef enum { _B_FALSE, _B_TRUE } boolean_t; #else typedef enum { B_FALSE, B_TRUE } boolean_t; #endif /* defined(__XOPEN_OR_POSIX) */ +#endif typedef longlong_t offset_t; typedef u_longlong_t u_offset_t; Modified: user/imp/newcard/sys/cddl/compat/opensolaris/sys/uio.h ============================================================================== --- user/imp/newcard/sys/cddl/compat/opensolaris/sys/uio.h Sun Nov 9 17:37:54 2008 (r184802) +++ user/imp/newcard/sys/cddl/compat/opensolaris/sys/uio.h Sun Nov 9 20:36:13 2008 (r184803) @@ -51,6 +51,7 @@ typedef struct iovec iovec_t; #define uio_loffset uio_offset +#ifdef BUILDING_ZFS static __inline int zfs_uiomove(void *cp, size_t n, enum uio_rw dir, uio_t *uio) { @@ -59,5 +60,6 @@ zfs_uiomove(void *cp, size_t n, enum uio return (uiomove(cp, (int)n, uio)); } #define uiomove(cp, n, dir, uio) zfs_uiomove((cp), (n), (dir), (uio)) +#endif #endif /* !_OPENSOLARIS_SYS_UIO_H_ */ Modified: user/imp/newcard/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- user/imp/newcard/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Nov 9 17:37:54 2008 (r184802) +++ user/imp/newcard/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Nov 9 20:36:13 2008 (r184803) @@ -3007,6 +3007,9 @@ dtrace_dif_variable(dtrace_mstate_t *mst case DIF_VAR_EXECARGS: { struct pargs *p_args = curthread->td_proc->p_args; + if (p_args == NULL) + return(0); + return (dtrace_dif_varstrz( (uintptr_t) p_args->ar_args, p_args->ar_length, state, mstate)); } @@ -10598,7 +10601,6 @@ dtrace_buffer_alloc(dtrace_buffer_t *buf /* * If there is already a buffer allocated for this CPU, it * is only possible that this is a DR event. In this case, - * the buffer size must match our specified size. */ if (buf->dtb_tomax != NULL) { ASSERT(buf->dtb_size == size); @@ -12815,11 +12817,7 @@ dtrace_state_create(struct cdev *dev) state = ddi_get_soft_state(dtrace_softstate, minor); #else if (dev != NULL) { - /* - * Disable this until we have the ability to set user - * credentials for DTrace. - * cr = dev->si_cred; - */ + cr = dev->si_cred; m = dev2unit(dev); } @@ -15241,6 +15239,15 @@ dtrace_attach(dev_info_t *devi, ddi_atta } #endif +#if !defined(sun) +#if __FreeBSD_version >= 800039 +static void +dtrace_dtr(void *data __unused) +{ +} +#endif +#endif + /*ARGSUSED*/ static int #if defined(sun) @@ -15266,6 +15273,7 @@ dtrace_open(struct cdev *dev, int oflags #else cred_t *cred_p = NULL; +#if __FreeBSD_version < 800039 /* * The first minor device is the one that is cloned so there is * nothing more to do here. @@ -15281,6 +15289,7 @@ dtrace_open(struct cdev *dev, int oflags */ if (dev->si_drv1 != NULL) return (EBUSY); +#endif cred_p = dev->si_cred; #endif @@ -15292,9 +15301,11 @@ dtrace_open(struct cdev *dev, int oflags dtrace_cred2priv(cred_p, &priv, &uid, &zoneid); if (priv == DTRACE_PRIV_NONE) { #if !defined(sun) +#if __FreeBSD_version < 800039 /* Destroy the cloned device. */ destroy_dev(dev); #endif +#endif return (EACCES); } @@ -15326,7 +15337,11 @@ dtrace_open(struct cdev *dev, int oflags state = dtrace_state_create(devp, cred_p); #else state = dtrace_state_create(dev); +#if __FreeBSD_version < 800039 dev->si_drv1 = state; +#else + devfs_set_cdevpriv(state, dtrace_dtr); +#endif #endif mutex_exit(&cpu_lock); @@ -15340,9 +15355,11 @@ dtrace_open(struct cdev *dev, int oflags #endif mutex_exit(&dtrace_lock); #if !defined(sun) +#if __FreeBSD_version < 800039 /* Destroy the cloned device. */ destroy_dev(dev); #endif +#endif return (EAGAIN); } @@ -15368,11 +15385,16 @@ dtrace_close(struct cdev *dev, int flags state = ddi_get_soft_state(dtrace_softstate, minor); #else +#if __FreeBSD_version < 800039 dtrace_state_t *state = dev->si_drv1; /* Check if this is not a cloned device. */ if (dev2unit(dev) == 0) return (0); +#else + dtrace_state_t *state; + devfs_get_cdevpriv((void **) &state); +#endif #endif @@ -15392,7 +15414,11 @@ dtrace_close(struct cdev *dev, int flags #if !defined(sun) kmem_free(state, 0); +#if __FreeBSD_version < 800039 dev->si_drv1 = NULL; +#else + devfs_clear_cdevpriv(); +#endif #endif } @@ -15407,8 +15433,10 @@ dtrace_close(struct cdev *dev, int flags mutex_exit(&dtrace_lock); mutex_exit(&cpu_lock); +#if __FreeBSD_version < 800039 /* Schedule this cloned device to be destroyed. */ destroy_dev_sched(dev); +#endif return (0); } @@ -16442,16 +16470,20 @@ _fini(void) static d_ioctl_t dtrace_ioctl; static void dtrace_load(void *); static int dtrace_unload(void); +#if __FreeBSD_version < 800039 static void dtrace_clone(void *, struct ucred *, char *, int , struct cdev **); static struct clonedevs *dtrace_clones; /* Ptr to the array of cloned devices. */ static eventhandler_tag eh_tag; /* Event handler tag. */ +#else +static struct cdev *dtrace_dev; +#endif void dtrace_invop_init(void); void dtrace_invop_uninit(void); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Mon Nov 10 10:04:25 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 213AA1065672; Mon, 10 Nov 2008 10:04:25 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6BEF8FC23; Mon, 10 Nov 2008 10:04:24 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAAA4OMu064735; Mon, 10 Nov 2008 10:04:24 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAAA4OBM064734; Mon, 10 Nov 2008 10:04:24 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200811101004.mAAA4OBM064734@svn.freebsd.org> From: Doug Rabson Date: Mon, 10 Nov 2008 10:04:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184810 - user/dfr/gssapi/6 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 10:04:25 -0000 Author: dfr Date: Mon Nov 10 10:04:24 2008 New Revision: 184810 URL: http://svn.freebsd.org/changeset/base/184810 Log: Branch RELENG_6 to work on merging RPCSEC_GSS support. Added: user/dfr/gssapi/6/ - copied from r184809, stable/6/ From owner-svn-src-user@FreeBSD.ORG Mon Nov 10 10:41:58 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5E85106567B; Mon, 10 Nov 2008 10:41:58 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE1668FC26; Mon, 10 Nov 2008 10:41:58 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAAAfwtN067706; Mon, 10 Nov 2008 10:41:58 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAAAfwAX067699; Mon, 10 Nov 2008 10:41:58 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200811101041.mAAAfwAX067699@svn.freebsd.org> From: Doug Rabson Date: Mon, 10 Nov 2008 10:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184811 - in user/dfr/gssapi/7: kerberos5/lib/libgssapi lib/libgssapi usr.sbin/gssd X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 10:41:59 -0000 Author: dfr Date: Mon Nov 10 10:41:58 2008 New Revision: 184811 URL: http://svn.freebsd.org/changeset/base/184811 Log: Merge support for gss_pname_to_uid() from current. Added: user/dfr/gssapi/7/kerberos5/lib/libgssapi/pname_to_uid.c - copied, changed from r184809, head/kerberos5/lib/libgssapi_krb5/pname_to_uid.c user/dfr/gssapi/7/lib/libgssapi/gss_pname_to_uid.c - copied, changed from r184809, head/lib/libgssapi/gss_pname_to_uid.c Modified: user/dfr/gssapi/7/kerberos5/lib/libgssapi/Makefile user/dfr/gssapi/7/lib/libgssapi/Makefile user/dfr/gssapi/7/lib/libgssapi/gss_mech_switch.c user/dfr/gssapi/7/lib/libgssapi/mech_switch.h user/dfr/gssapi/7/usr.sbin/gssd/gssd.c Modified: user/dfr/gssapi/7/kerberos5/lib/libgssapi/Makefile ============================================================================== --- user/dfr/gssapi/7/kerberos5/lib/libgssapi/Makefile Mon Nov 10 10:04:24 2008 (r184810) +++ user/dfr/gssapi/7/kerberos5/lib/libgssapi/Makefile Mon Nov 10 10:41:58 2008 (r184811) @@ -39,6 +39,7 @@ SRCS= 8003.c \ inquire_cred_by_mech.c \ inquire_mechs_for_name.c \ inquire_names_for_mech.c \ + pname_to_uid.c \ process_context_token.c \ release_buffer.c \ release_cred.c \ Copied and modified: user/dfr/gssapi/7/kerberos5/lib/libgssapi/pname_to_uid.c (from r184809, head/kerberos5/lib/libgssapi_krb5/pname_to_uid.c) ============================================================================== --- head/kerberos5/lib/libgssapi_krb5/pname_to_uid.c Mon Nov 10 06:35:30 2008 (r184809, copy source) +++ user/dfr/gssapi/7/kerberos5/lib/libgssapi/pname_to_uid.c Mon Nov 10 10:41:58 2008 (r184811) @@ -28,21 +28,21 @@ #include -#include "krb5/gsskrb5_locl.h" +#include "gssapi_locl.h" OM_uint32 _gsskrb5_pname_to_uid(OM_uint32 *minor_status, const gss_name_t pname, const gss_OID mech, uid_t *uidp) { - krb5_context context; krb5_const_principal name = (krb5_const_principal) pname; krb5_error_code kret; char lname[MAXLOGNAME + 1], buf[128]; struct passwd pwd, *pw; - GSSAPI_KRB5_INIT (&context); + GSSAPI_KRB5_INIT (); - kret = krb5_aname_to_localname(context, name, sizeof(lname), lname); + kret = krb5_aname_to_localname(gssapi_krb5_context, name, + sizeof(lname), lname); if (kret) { *minor_status = kret; return (GSS_S_FAILURE); Modified: user/dfr/gssapi/7/lib/libgssapi/Makefile ============================================================================== --- user/dfr/gssapi/7/lib/libgssapi/Makefile Mon Nov 10 10:04:24 2008 (r184810) +++ user/dfr/gssapi/7/lib/libgssapi/Makefile Mon Nov 10 10:41:58 2008 (r184811) @@ -46,6 +46,7 @@ SRCS+= gss_add_oid_set_member.c SRCS+= gss_test_oid_set_member.c SRCS+= gss_release_oid_set.c SRCS+= gss_release_buffer.c +SRCS+= gss_pname_to_uid.c MAN= MAN+= gssapi.3 Modified: user/dfr/gssapi/7/lib/libgssapi/gss_mech_switch.c ============================================================================== --- user/dfr/gssapi/7/lib/libgssapi/gss_mech_switch.c Mon Nov 10 10:04:24 2008 (r184810) +++ user/dfr/gssapi/7/lib/libgssapi/gss_mech_switch.c Mon Nov 10 10:41:58 2008 (r184811) @@ -273,6 +273,7 @@ _gss_load_mech(void) gm_krb5_register_acceptor_identity); OPTSYM(krb5_copy_ccache); OPTSYM(krb5_compat_des3_mic); + OPTSYM(pname_to_uid); SLIST_INSERT_HEAD(&_gss_mechs, m, gm_link); count++; Copied and modified: user/dfr/gssapi/7/lib/libgssapi/gss_pname_to_uid.c (from r184809, head/lib/libgssapi/gss_pname_to_uid.c) ============================================================================== --- head/lib/libgssapi/gss_pname_to_uid.c Mon Nov 10 06:35:30 2008 (r184809, copy source) +++ user/dfr/gssapi/7/lib/libgssapi/gss_pname_to_uid.c Mon Nov 10 10:41:58 2008 (r184811) @@ -54,16 +54,12 @@ gss_pname_to_uid(OM_uint32 *minor_status if (m->gm_pname_to_uid == NULL) return (GSS_S_UNAVAILABLE); - major_status = _gss_find_mn(minor_status, name, mech, &mn); - if (major_status != GSS_S_COMPLETE) { - _gss_mg_error(m, major_status, *minor_status); - return (major_status); - } + mn = _gss_find_mn(name, mech); + if (!mn) + return (GSS_S_BAD_NAME); major_status = (*m->gm_pname_to_uid)(minor_status, mn->gmn_name, mech, uidp); - if (major_status != GSS_S_COMPLETE) - _gss_mg_error(m, major_status, *minor_status); return (major_status); } Modified: user/dfr/gssapi/7/lib/libgssapi/mech_switch.h ============================================================================== --- user/dfr/gssapi/7/lib/libgssapi/mech_switch.h Mon Nov 10 10:04:24 2008 (r184810) +++ user/dfr/gssapi/7/lib/libgssapi/mech_switch.h Mon Nov 10 10:41:58 2008 (r184811) @@ -26,6 +26,7 @@ * $FreeBSD$ */ +#include #include typedef OM_uint32 _gss_acquire_cred_t @@ -282,6 +283,13 @@ typedef OM_uint32 _gss_krb5_compat_des3_ int /* flag */ ); +typedef OM_uint32 _gss_pname_to_uid + (OM_uint32 *, /* minor status */ + gss_name_t pname, /* principal name */ + gss_OID mech, /* mechanism to query */ + uid_t *uidp /* pointer to UID for result */ + ); + struct _gss_mech_switch { SLIST_ENTRY(_gss_mech_switch) gm_link; gss_OID_desc gm_mech_oid; @@ -318,6 +326,7 @@ struct _gss_mech_switch { _gsskrb5_register_acceptor_identity *gm_krb5_register_acceptor_identity; _gss_krb5_copy_ccache *gm_krb5_copy_ccache; _gss_krb5_compat_des3_mic *gm_krb5_compat_des3_mic; + _gss_pname_to_uid *gm_pname_to_uid; }; SLIST_HEAD(_gss_mech_switch_list, _gss_mech_switch); extern struct _gss_mech_switch_list _gss_mechs; Modified: user/dfr/gssapi/7/usr.sbin/gssd/gssd.c ============================================================================== --- user/dfr/gssapi/7/usr.sbin/gssd/gssd.c Mon Nov 10 10:04:24 2008 (r184810) +++ user/dfr/gssapi/7/usr.sbin/gssd/gssd.c Mon Nov 10 10:41:58 2008 (r184811) @@ -450,7 +450,6 @@ gssd_release_name_1_svc(release_name_arg bool_t gssd_pname_to_uid_1_svc(pname_to_uid_args *argp, pname_to_uid_res *result, struct svc_req *rqstp) { -#if 0 gss_name_t name = gssd_find_resource(argp->pname); uid_t uid; char buf[128]; @@ -487,11 +486,6 @@ gssd_pname_to_uid_1_svc(pname_to_uid_arg } return (TRUE); -#else - memset(result, 0, sizeof(*result)); - result->major_status = GSS_S_FAILURE; - return (TRUE); -#endif } bool_t From owner-svn-src-user@FreeBSD.ORG Mon Nov 10 13:23:16 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DA7B1065695; Mon, 10 Nov 2008 13:23:16 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5139D8FC0C; Mon, 10 Nov 2008 13:23:16 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAADNGlx070943; Mon, 10 Nov 2008 13:23:16 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAADNF7U070928; Mon, 10 Nov 2008 13:23:15 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200811101323.mAADNF7U070928@svn.freebsd.org> From: Doug Rabson Date: Mon, 10 Nov 2008 13:23:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184812 - in user/dfr/gssapi/6: sys sys/conf sys/kern sys/modules/nfslockd sys/nfsclient sys/nlm sys/rpc sys/sys tools/regression/file/flock usr.sbin/rpc.lockd usr.sbin/rpc.statd X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 13:23:16 -0000 Author: dfr Date: Mon Nov 10 13:23:15 2008 New Revision: 184812 URL: http://svn.freebsd.org/changeset/base/184812 Log: MFC: Kernel mode NFS lockd client. Added: user/dfr/gssapi/6/sys/nlm/nlm_advlock.c - copied, changed from r180025, head/sys/nlm/nlm_advlock.c Modified: user/dfr/gssapi/6/sys/ (props changed) user/dfr/gssapi/6/sys/conf/files user/dfr/gssapi/6/sys/kern/kern_lockf.c user/dfr/gssapi/6/sys/modules/nfslockd/Makefile user/dfr/gssapi/6/sys/nfsclient/nfs.h user/dfr/gssapi/6/sys/nfsclient/nfs_lock.c user/dfr/gssapi/6/sys/nfsclient/nfs_node.c user/dfr/gssapi/6/sys/nfsclient/nfs_vfsops.c user/dfr/gssapi/6/sys/nfsclient/nfs_vnops.c user/dfr/gssapi/6/sys/nfsclient/nfsmount.h user/dfr/gssapi/6/sys/nfsclient/nfsnode.h user/dfr/gssapi/6/sys/nlm/nlm.h user/dfr/gssapi/6/sys/nlm/nlm_prot.h user/dfr/gssapi/6/sys/nlm/nlm_prot_clnt.c user/dfr/gssapi/6/sys/nlm/nlm_prot_impl.c user/dfr/gssapi/6/sys/nlm/nlm_prot_server.c user/dfr/gssapi/6/sys/rpc/auth_unix.c user/dfr/gssapi/6/sys/rpc/authunix_prot.c user/dfr/gssapi/6/sys/rpc/clnt.h user/dfr/gssapi/6/sys/rpc/clnt_dg.c user/dfr/gssapi/6/sys/rpc/clnt_rc.c user/dfr/gssapi/6/sys/rpc/clnt_vc.c user/dfr/gssapi/6/sys/rpc/pmap_prot.h user/dfr/gssapi/6/sys/rpc/rpcb_clnt.c user/dfr/gssapi/6/sys/rpc/rpcb_prot.c user/dfr/gssapi/6/sys/rpc/svc_vc.c user/dfr/gssapi/6/sys/sys/fcntl.h user/dfr/gssapi/6/sys/sys/lockf.h user/dfr/gssapi/6/sys/sys/param.h user/dfr/gssapi/6/tools/regression/file/flock/ (props changed) user/dfr/gssapi/6/tools/regression/file/flock/flock.c user/dfr/gssapi/6/usr.sbin/rpc.lockd/ (props changed) user/dfr/gssapi/6/usr.sbin/rpc.lockd/lockd.c user/dfr/gssapi/6/usr.sbin/rpc.statd/ (props changed) user/dfr/gssapi/6/usr.sbin/rpc.statd/file.c Modified: user/dfr/gssapi/6/sys/conf/files ============================================================================== --- user/dfr/gssapi/6/sys/conf/files Mon Nov 10 10:41:58 2008 (r184811) +++ user/dfr/gssapi/6/sys/conf/files Mon Nov 10 13:23:15 2008 (r184812) @@ -1897,6 +1897,7 @@ nfsserver/nfs_srvsock.c optional nfsser nfsserver/nfs_srvcache.c optional nfsserver nfsserver/nfs_srvsubs.c optional nfsserver nfsserver/nfs_syscalls.c optional nfsserver +nlm/nlm_advlock.c optional nfslockd nlm/nlm_prot_clnt.c optional nfslockd nlm/nlm_prot_impl.c optional nfslockd nlm/nlm_prot_server.c optional nfslockd Modified: user/dfr/gssapi/6/sys/kern/kern_lockf.c ============================================================================== --- user/dfr/gssapi/6/sys/kern/kern_lockf.c Mon Nov 10 10:41:58 2008 (r184811) +++ user/dfr/gssapi/6/sys/kern/kern_lockf.c Mon Nov 10 13:23:15 2008 (r184812) @@ -1270,7 +1270,8 @@ lf_setlock(struct lockf *state, struct l priority = PLOCK; if (lock->lf_type == F_WRLCK) priority += 4; - priority |= PCATCH; + if (!(lock->lf_flags & F_NOINTR)) + priority |= PCATCH; /* * Scan lock list for this file looking for locks that would block us. */ @@ -1722,27 +1723,26 @@ lf_split(struct lockf *state, struct loc lf_insert_lock(state, splitlock); } -struct clearlock { - STAILQ_ENTRY(clearlock) link; +struct lockdesc { + STAILQ_ENTRY(lockdesc) link; struct vnode *vp; struct flock fl; }; -STAILQ_HEAD(clearlocklist, clearlock); +STAILQ_HEAD(lockdesclist, lockdesc); -void -lf_clearremotesys(int sysid) +int +lf_iteratelocks_sysid(int sysid, lf_iterator *fn, void *arg) { struct lockf *ls; struct lockf_entry *lf; - struct clearlock *cl; - struct clearlocklist locks; - - KASSERT(sysid != 0, ("Can't clear local locks with F_UNLCKSYS")); + struct lockdesc *ldesc; + struct lockdesclist locks; + int error; /* * In order to keep the locking simple, we iterate over the * active lock lists to build a list of locks that need - * releasing. We then call VOP_ADVLOCK for each one in turn. + * releasing. We then call the iterator for each one in turn. * * We take an extra reference to the vnode for the duration to * make sure it doesn't go away before we are finished. @@ -1755,32 +1755,114 @@ lf_clearremotesys(int sysid) if (lf->lf_owner->lo_sysid != sysid) continue; - cl = malloc(sizeof(struct clearlock), M_LOCKF, + ldesc = malloc(sizeof(struct lockdesc), M_LOCKF, M_WAITOK); - cl->vp = lf->lf_vnode; - vref(cl->vp); - cl->fl.l_start = lf->lf_start; + ldesc->vp = lf->lf_vnode; + vref(ldesc->vp); + ldesc->fl.l_start = lf->lf_start; if (lf->lf_end == OFF_MAX) - cl->fl.l_len = 0; + ldesc->fl.l_len = 0; else - cl->fl.l_len = + ldesc->fl.l_len = lf->lf_end - lf->lf_start + 1; - cl->fl.l_whence = SEEK_SET; - cl->fl.l_type = F_UNLCK; - cl->fl.l_pid = lf->lf_owner->lo_pid; - cl->fl.l_sysid = sysid; - STAILQ_INSERT_TAIL(&locks, cl, link); + ldesc->fl.l_whence = SEEK_SET; + ldesc->fl.l_type = F_UNLCK; + ldesc->fl.l_pid = lf->lf_owner->lo_pid; + ldesc->fl.l_sysid = sysid; + STAILQ_INSERT_TAIL(&locks, ldesc, link); } sx_xunlock(&ls->ls_lock); } sx_xunlock(&lf_lock_states_lock); - while ((cl = STAILQ_FIRST(&locks)) != NULL) { + /* + * Call the iterator function for each lock in turn. If the + * iterator returns an error code, just free the rest of the + * lockdesc structures. + */ + error = 0; + while ((ldesc = STAILQ_FIRST(&locks)) != NULL) { STAILQ_REMOVE_HEAD(&locks, link); - VOP_ADVLOCK(cl->vp, 0, F_UNLCK, &cl->fl, F_REMOTE); - vrele(cl->vp); - free(cl, M_LOCKF); + if (!error) + error = fn(ldesc->vp, &ldesc->fl, arg); + vrele(ldesc->vp); + free(ldesc, M_LOCKF); } + + return (error); +} + +int +lf_iteratelocks_vnode(struct vnode *vp, struct lockf *ls, lf_iterator *fn, void *arg) +{ + struct lockf_entry *lf; + struct lockdesc *ldesc; + struct lockdesclist locks; + int error; + + /* + * In order to keep the locking simple, we iterate over the + * active lock lists to build a list of locks that need + * releasing. We then call the iterator for each one in turn. + * + * We take an extra reference to the vnode for the duration to + * make sure it doesn't go away before we are finished. + */ + STAILQ_INIT(&locks); + if (!ls) + return (0); + + sx_xlock(&ls->ls_lock); + LIST_FOREACH(lf, &ls->ls_active, lf_link) { + ldesc = malloc(sizeof(struct lockdesc), M_LOCKF, + M_WAITOK); + ldesc->vp = lf->lf_vnode; + vref(ldesc->vp); + ldesc->fl.l_start = lf->lf_start; + if (lf->lf_end == OFF_MAX) + ldesc->fl.l_len = 0; + else + ldesc->fl.l_len = + lf->lf_end - lf->lf_start + 1; + ldesc->fl.l_whence = SEEK_SET; + ldesc->fl.l_type = F_UNLCK; + ldesc->fl.l_pid = lf->lf_owner->lo_pid; + ldesc->fl.l_sysid = lf->lf_owner->lo_sysid; + STAILQ_INSERT_TAIL(&locks, ldesc, link); + } + sx_xunlock(&ls->ls_lock); + + /* + * Call the iterator function for each lock in turn. If the + * iterator returns an error code, just free the rest of the + * lockdesc structures. + */ + error = 0; + while ((ldesc = STAILQ_FIRST(&locks)) != NULL) { + STAILQ_REMOVE_HEAD(&locks, link); + if (!error) + error = fn(ldesc->vp, &ldesc->fl, arg); + vrele(ldesc->vp); + free(ldesc, M_LOCKF); + } + + return (error); +} + +static int +lf_clearremotesys_iterator(struct vnode *vp, struct flock *fl, void *arg) +{ + + VOP_ADVLOCK(vp, 0, F_UNLCK, fl, F_REMOTE); + return (0); +} + +void +lf_clearremotesys(int sysid) +{ + + KASSERT(sysid != 0, ("Can't clear local locks with F_UNLCKSYS")); + lf_iteratelocks_sysid(sysid, lf_clearremotesys_iterator, NULL); } int Modified: user/dfr/gssapi/6/sys/modules/nfslockd/Makefile ============================================================================== --- user/dfr/gssapi/6/sys/modules/nfslockd/Makefile Mon Nov 10 10:41:58 2008 (r184811) +++ user/dfr/gssapi/6/sys/modules/nfslockd/Makefile Mon Nov 10 13:23:15 2008 (r184812) @@ -3,6 +3,7 @@ .PATH: ${.CURDIR}/../../nlm ${.CURDIR}/../../rpc KMOD= nfslockd SRCS= vnode_if.h \ + nlm_advlock.c \ nlm_prot_clnt.c \ nlm_prot_impl.c \ nlm_prot_server.c \ Modified: user/dfr/gssapi/6/sys/nfsclient/nfs.h ============================================================================== --- user/dfr/gssapi/6/sys/nfsclient/nfs.h Mon Nov 10 10:41:58 2008 (r184811) +++ user/dfr/gssapi/6/sys/nfsclient/nfs.h Mon Nov 10 13:23:15 2008 (r184812) @@ -92,6 +92,7 @@ #define NFSSTA_SNDLOCK 0x01000000 /* Send socket lock */ #define NFSSTA_WANTSND 0x02000000 /* Want above */ #define NFSSTA_TIMEO 0x10000000 /* Experiencing a timeout */ +#define NFSSTA_LOCKTIMEO 0x20000000 /* Experiencing a lockd timeout */ /* Modified: user/dfr/gssapi/6/sys/nfsclient/nfs_lock.c ============================================================================== --- user/dfr/gssapi/6/sys/nfsclient/nfs_lock.c Mon Nov 10 10:41:58 2008 (r184811) +++ user/dfr/gssapi/6/sys/nfsclient/nfs_lock.c Mon Nov 10 13:23:15 2008 (r184812) @@ -221,6 +221,9 @@ MODULE_VERSION(nfslock, 1); /* * nfs_advlock -- * NFS advisory byte-level locks. + * + * The vnode shall be (shared) locked on the entry, it is + * unconditionally unlocked after. */ int nfs_dolock(struct vop_advlock_args *ap) @@ -238,6 +241,15 @@ nfs_dolock(struct vop_advlock_args *ap) vp = ap->a_vp; fl = ap->a_fl; + ASSERT_VOP_LOCKED(vp, "nfs_dolock"); + + bcopy(VFSTONFS(vp->v_mount)->nm_nam, &msg.lm_addr, + min(sizeof msg.lm_addr, VFSTONFS(vp->v_mount)->nm_nam->sa_len)); + msg.lm_fh_len = NFS_ISV3(vp) ? VTONFS(vp)->n_fhsize : NFSX_V2FH; + bcopy(VTONFS(vp)->n_fhp, msg.lm_fh, msg.lm_fh_len); + msg.lm_nfsv3 = NFS_ISV3(vp); + VOP_UNLOCK(vp, 0, td); + /* * the NLM protocol doesn't allow the server to return an error * on ranges, so we do it. @@ -258,6 +270,8 @@ nfs_dolock(struct vop_advlock_args *ap) */ msg.lm_version = LOCKD_MSG_VERSION; msg.lm_msg_ident.pid = p->p_pid; + + mtx_lock(&Giant); /* * if there is no nfsowner table yet, allocate one. */ @@ -273,21 +287,16 @@ nfs_dolock(struct vop_advlock_args *ap) msg.lm_fl = *fl; msg.lm_wait = ap->a_flags & F_WAIT; msg.lm_getlk = ap->a_op == F_GETLK; - bcopy(VFSTONFS(vp->v_mount)->nm_nam, &msg.lm_addr, - min(sizeof msg.lm_addr, VFSTONFS(vp->v_mount)->nm_nam->sa_len)); - msg.lm_fh_len = NFS_ISV3(vp) ? VTONFS(vp)->n_fhsize : NFSX_V2FH; - bcopy(VTONFS(vp)->n_fhp, msg.lm_fh, msg.lm_fh_len); - msg.lm_nfsv3 = NFS_ISV3(vp); cru2x(td->td_ucred, &msg.lm_cred); for (;;) { error = nfslock_send(&msg); if (error) - return (error); + goto out; /* Unlocks succeed immediately. */ if (fl->l_type == F_UNLCK) - return (error); + goto out; /* * retry after 20 seconds if we haven't gotten a responce yet. @@ -328,7 +337,8 @@ nfs_dolock(struct vop_advlock_args *ap) error = p->p_nlminfo->retcode; break; } - + out: + mtx_unlock(&Giant); return (error); } Modified: user/dfr/gssapi/6/sys/nfsclient/nfs_node.c ============================================================================== --- user/dfr/gssapi/6/sys/nfsclient/nfs_node.c Mon Nov 10 10:41:58 2008 (r184811) +++ user/dfr/gssapi/6/sys/nfsclient/nfs_node.c Mon Nov 10 13:23:15 2008 (r184812) @@ -227,6 +227,13 @@ nfs_reclaim(struct vop_reclaim_args *ap) vprint("nfs_reclaim: pushing active", vp); /* + * If the NLM is running, give it a chance to abort pending + * locks. + */ + if (nfs_reclaim_p) + nfs_reclaim_p(ap); + + /* * Destroy the vm object and flush associated pages. */ vnode_destroy_vobject(vp); Modified: user/dfr/gssapi/6/sys/nfsclient/nfs_vfsops.c ============================================================================== --- user/dfr/gssapi/6/sys/nfsclient/nfs_vfsops.c Mon Nov 10 10:41:58 2008 (r184811) +++ user/dfr/gssapi/6/sys/nfsclient/nfs_vfsops.c Mon Nov 10 13:23:15 2008 (r184812) @@ -480,6 +480,7 @@ nfs_mountroot(struct mount *mp, struct t (l >> 24) & 0xff, (l >> 16) & 0xff, (l >> 8) & 0xff, (l >> 0) & 0xff, nd->root_hostnam); printf("NFS ROOT: %s\n", buf); + nd->root_args.hostname = buf; if ((error = nfs_mountdiskless(buf, MNT_RDONLY, &nd->root_saddr, &nd->root_args, td, &vp, mp)) != 0) { return (error); @@ -529,6 +530,7 @@ nfs_decode_args(struct mount *mp, struct int s; int adjsock; int maxio; + char *p; s = splnet(); @@ -689,6 +691,11 @@ nfs_decode_args(struct mount *mp, struct PSOCK, "nfscon", 0); } } + + strlcpy(nmp->nm_hostname, argp->hostname, sizeof(nmp->nm_hostname)); + p = index(nmp->nm_hostname, ':'); + if (p) + *p = '\0'; } static const char *nfs_opts[] = { "from", "nfs_args", NULL }; Modified: user/dfr/gssapi/6/sys/nfsclient/nfs_vnops.c ============================================================================== --- user/dfr/gssapi/6/sys/nfsclient/nfs_vnops.c Mon Nov 10 10:41:58 2008 (r184811) +++ user/dfr/gssapi/6/sys/nfsclient/nfs_vnops.c Mon Nov 10 13:23:15 2008 (r184812) @@ -197,6 +197,8 @@ static int nfs_renameit(struct vnode *sd struct proc *nfs_iodwant[NFS_MAXASYNCDAEMON]; struct nfsmount *nfs_iodmount[NFS_MAXASYNCDAEMON]; int nfs_numasync = 0; +vop_advlock_t *nfs_advlock_p = nfs_dolock; +vop_reclaim_t *nfs_reclaim_p = NULL; #define DIRHDSIZ (sizeof (struct dirent) - (MAXNAMLEN + 1)) SYSCTL_DECL(_vfs_nfs); @@ -2900,13 +2902,25 @@ done: static int nfs_advlock(struct vop_advlock_args *ap) { + struct vnode *vp = ap->a_vp; + u_quad_t size; + int error; - if ((VFSTONFS(ap->a_vp->v_mount)->nm_flag & NFSMNT_NOLOCKD) != 0) { - struct nfsnode *np = VTONFS(ap->a_vp); - - return (lf_advlock(ap, &(np->n_lockf), np->n_size)); + error = vn_lock(vp, LK_SHARED, curthread); + if (error) + return (error); + if ((VFSTONFS(vp->v_mount)->nm_flag & NFSMNT_NOLOCKD) != 0) { + size = VTONFS(vp)->n_size; + VOP_UNLOCK(vp, 0, curthread); + error = lf_advlock(ap, &(VTONFS(vp)->n_lockf), size); + } else { + if (nfs_advlock_p) + error = nfs_advlock_p(ap); + else + error = ENOLCK; } - return (nfs_dolock(ap)); + + return (error); } /* Modified: user/dfr/gssapi/6/sys/nfsclient/nfsmount.h ============================================================================== --- user/dfr/gssapi/6/sys/nfsclient/nfsmount.h Mon Nov 10 10:41:58 2008 (r184811) +++ user/dfr/gssapi/6/sys/nfsclient/nfsmount.h Mon Nov 10 13:23:15 2008 (r184812) @@ -89,6 +89,7 @@ struct nfsmount { int nm_tprintf_initial_delay; /* initial delay */ int nm_tprintf_delay; /* interval for messages */ struct nfs_tcp_mountstate nm_nfstcpstate; + char nm_hostname[MNAMELEN]; /* server's name */ /* NFSv4 */ uint64_t nm_clientid; Modified: user/dfr/gssapi/6/sys/nfsclient/nfsnode.h ============================================================================== --- user/dfr/gssapi/6/sys/nfsclient/nfsnode.h Mon Nov 10 10:41:58 2008 (r184811) +++ user/dfr/gssapi/6/sys/nfsclient/nfsnode.h Mon Nov 10 13:23:15 2008 (r184812) @@ -202,6 +202,9 @@ extern struct vop_vector nfs4_vnodeops; extern struct buf_ops buf_ops_nfs; extern struct buf_ops buf_ops_nfs4; +extern vop_advlock_t *nfs_advlock_p; +extern vop_reclaim_t *nfs_reclaim_p; + /* * Prototypes for NFS vnode operations */ Modified: user/dfr/gssapi/6/sys/nlm/nlm.h ============================================================================== --- user/dfr/gssapi/6/sys/nlm/nlm.h Mon Nov 10 10:41:58 2008 (r184811) +++ user/dfr/gssapi/6/sys/nlm/nlm.h Mon Nov 10 13:23:15 2008 (r184812) @@ -36,7 +36,17 @@ MALLOC_DECLARE(M_NLM); #endif +/* + * This value is added to host system IDs when recording NFS client + * locks in the local lock manager. + */ +#define NLM_SYSID_CLIENT 0x1000000 + struct nlm_host; +struct vnode; + +extern struct timeval nlm_zero_tv; +extern int nlm_nsm_state; /* * Copy a struct netobj. @@ -47,61 +57,140 @@ extern void nlm_copy_netobj(struct netob /* * Search for an existing NLM host that matches the given name * (typically the caller_name element of an nlm4_lock). If none is - * found, create a new host. If 'rqstp' is non-NULL, record the remote + * found, create a new host. If 'addr' is non-NULL, record the remote * address of the host so that we can call it back for async - * responses. + * responses. If 'vers' is greater than zero then record the NLM + * program version to use to communicate with this client. The host + * reference count is incremented - the caller must call + * nlm_host_release when it has finished using it. */ extern struct nlm_host *nlm_find_host_by_name(const char *name, - struct svc_req *rqstp); + const struct sockaddr *addr, rpcvers_t vers); /* * Search for an existing NLM host that matches the given remote * address. If none is found, create a new host with the requested * address and remember 'vers' as the NLM protocol version to use for - * that host. + * that host. The host reference count is incremented - the caller + * must call nlm_host_release when it has finished using it. */ extern struct nlm_host *nlm_find_host_by_addr(const struct sockaddr *addr, int vers); /* + * Register this NLM host with the local NSM so that we can be + * notified if it reboots. + */ +extern void nlm_host_monitor(struct nlm_host *host, int state); + +/* + * Decrement the host reference count, freeing resources if the + * reference count reaches zero. + */ +extern void nlm_host_release(struct nlm_host *host); + +/* * Return an RPC client handle that can be used to talk to the NLM * running on the given host. */ extern CLIENT *nlm_host_get_rpc(struct nlm_host *host); /* + * Return the system ID for a host. + */ +extern int nlm_host_get_sysid(struct nlm_host *host); + +/* + * Return the remote NSM state value for a host. + */ +extern int nlm_host_get_state(struct nlm_host *host); + +/* + * When sending a blocking lock request, we need to track the request + * in our waiting lock list. We add an entry to the waiting list + * before we send the lock RPC so that we can cope with a granted + * message arriving at any time. Call this function before sending the + * lock rpc. If the lock succeeds, call nlm_deregister_wait_lock with + * the handle this function returns, otherwise nlm_wait_lock. Both + * will remove the entry from the waiting list. + */ +extern void *nlm_register_wait_lock(struct nlm4_lock *lock, struct vnode *vp); + +/* + * Deregister a blocking lock request. Call this if the lock succeeded + * without blocking. + */ +extern void nlm_deregister_wait_lock(void *handle); + +/* + * Wait for a granted callback for a blocked lock request, waiting at + * most timo ticks. If no granted message is received within the + * timeout, return EWOULDBLOCK. If a signal interrupted the wait, + * return EINTR - the caller must arrange to send a cancellation to + * the server. In both cases, the request is removed from the waiting + * list. + */ +extern int nlm_wait_lock(void *handle, int timo); + +/* + * Cancel any pending waits for this vnode - called on forcible unmounts. + */ +extern void nlm_cancel_wait(struct vnode *vp); + +/* * Called when a host restarts. */ extern void nlm_sm_notify(nlm_sm_status *argp); /* - * Implementation for lock testing RPCs. Returns the NLM host that - * matches the RPC arguments. + * Implementation for lock testing RPCs. If the request was handled + * successfully and rpcp is non-NULL, *rpcp is set to an RPC client + * handle which can be used to send an async rpc reply. Returns zero + * if the request was handled, or a suitable unix error code + * otherwise. + */ +extern int nlm_do_test(nlm4_testargs *argp, nlm4_testres *result, + struct svc_req *rqstp, CLIENT **rpcp); + +/* + * Implementation for lock setting RPCs. If the request was handled + * successfully and rpcp is non-NULL, *rpcp is set to an RPC client + * handle which can be used to send an async rpc reply. Returns zero + * if the request was handled, or a suitable unix error code + * otherwise. */ -extern struct nlm_host *nlm_do_test(nlm4_testargs *argp, - nlm4_testres *result, struct svc_req *rqstp); +extern int nlm_do_lock(nlm4_lockargs *argp, nlm4_res *result, + struct svc_req *rqstp, bool_t monitor, CLIENT **rpcp); /* - * Implementation for lock setting RPCs. Returns the NLM host that - * matches the RPC arguments. If monitor is TRUE, set up an NSM - * monitor for this host. + * Implementation for cancelling a pending lock request. If the + * request was handled successfully and rpcp is non-NULL, *rpcp is set + * to an RPC client handle which can be used to send an async rpc + * reply. Returns zero if the request was handled, or a suitable unix + * error code otherwise. */ -extern struct nlm_host *nlm_do_lock(nlm4_lockargs *argp, - nlm4_res *result, struct svc_req *rqstp, bool_t monitor); +extern int nlm_do_cancel(nlm4_cancargs *argp, nlm4_res *result, + struct svc_req *rqstp, CLIENT **rpcp); /* - * Implementation for cancelling a pending lock request. Returns the - * NLM host that matches the RPC arguments. + * Implementation for unlocking RPCs. If the request was handled + * successfully and rpcp is non-NULL, *rpcp is set to an RPC client + * handle which can be used to send an async rpc reply. Returns zero + * if the request was handled, or a suitable unix error code + * otherwise. */ -extern struct nlm_host *nlm_do_cancel(nlm4_cancargs *argp, - nlm4_res *result, struct svc_req *rqstp); +extern int nlm_do_unlock(nlm4_unlockargs *argp, nlm4_res *result, + struct svc_req *rqstp, CLIENT **rpcp); /* - * Implementation for unlocking RPCs. Returns the NLM host that - * matches the RPC arguments. + * Implementation for granted RPCs. If the request was handled + * successfully and rpcp is non-NULL, *rpcp is set to an RPC client + * handle which can be used to send an async rpc reply. Returns zero + * if the request was handled, or a suitable unix error code + * otherwise. */ -extern struct nlm_host *nlm_do_unlock(nlm4_unlockargs *argp, - nlm4_res *result, struct svc_req *rqstp); +extern int nlm_do_granted(nlm4_testargs *argp, nlm4_res *result, + struct svc_req *rqstp, CLIENT **rpcp); /* * Free all locks associated with the hostname argp->name. @@ -109,10 +198,17 @@ extern struct nlm_host *nlm_do_unlock(nl extern void nlm_do_free_all(nlm4_notify *argp); /* - * Find an RPC transport that can be used to communicate with the - * userland part of lockd. + * Recover client lock state after a server reboot. + */ +extern void nlm_client_recovery(struct nlm_host *); + +/* + * Interface from NFS client code to the NLM. */ -extern CLIENT *nlm_user_lockd(void); +struct vop_advlock_args; +struct vop_reclaim_args; +extern int nlm_advlock(struct vop_advlock_args *ap); +extern int nlm_reclaim(struct vop_reclaim_args *ap); #endif Copied and modified: user/dfr/gssapi/6/sys/nlm/nlm_advlock.c (from r180025, head/sys/nlm/nlm_advlock.c) ============================================================================== --- head/sys/nlm/nlm_advlock.c Thu Jun 26 10:21:54 2008 (r180025, copy source) +++ user/dfr/gssapi/6/sys/nlm/nlm_advlock.c Mon Nov 10 13:23:15 2008 (r184812) @@ -131,14 +131,14 @@ nlm_down(struct nlm_feedback_arg *nf, st if (nmp == NULL) return; - mtx_lock(&nmp->nm_mtx); + mtx_lock(&Giant); if (!(nmp->nm_state & NFSSTA_LOCKTIMEO)) { nmp->nm_state |= NFSSTA_LOCKTIMEO; - mtx_unlock(&nmp->nm_mtx); + mtx_unlock(&Giant); vfs_event_signal(&nmp->nm_mountp->mnt_stat.f_fsid, VQ_NOTRESPLOCK, 0); } else { - mtx_unlock(&nmp->nm_mtx); + mtx_unlock(&Giant); } nf->nf_printed = TRUE; @@ -156,14 +156,14 @@ nlm_up(struct nlm_feedback_arg *nf, stru nlm_msg(td, nmp->nm_mountp->mnt_stat.f_mntfromname, msg, 0); - mtx_lock(&nmp->nm_mtx); + mtx_lock(&Giant); if (nmp->nm_state & NFSSTA_LOCKTIMEO) { nmp->nm_state &= ~NFSSTA_LOCKTIMEO; - mtx_unlock(&nmp->nm_mtx); + mtx_unlock(&Giant); vfs_event_signal(&nmp->nm_mountp->mnt_stat.f_fsid, VQ_NOTRESPLOCK, 1); } else { - mtx_unlock(&nmp->nm_mtx); + mtx_unlock(&Giant); } } @@ -246,7 +246,7 @@ nlm_advlock_internal(struct vnode *vp, v retries = INT_MAX; if (unlock_vp) - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp, 0, td); /* * We need to switch to mount-point creds so that we can send @@ -475,7 +475,8 @@ nlm_reclaim(struct vop_reclaim_args *ap) { nlm_cancel_wait(ap->a_vp); - lf_iteratelocks_vnode(ap->a_vp, nlm_reclaim_free_lock, NULL); + lf_iteratelocks_vnode(ap->a_vp, VTONFS(ap->a_vp)->n_lockf, + nlm_reclaim_free_lock, NULL); return (0); } @@ -501,7 +502,7 @@ nlm_client_recover_lock(struct vnode *vp if (nr->nr_state != state) return (ERESTART); - error = vn_lock(vp, LK_SHARED); + error = vn_lock(vp, LK_SHARED, td); if (error) return (error); @@ -713,7 +714,7 @@ nlm_record_lock(struct vnode *vp, int op newfl.l_pid = svid; newfl.l_sysid = NLM_SYSID_CLIENT | sysid; - error = lf_advlockasync(&a, &vp->v_lockf, size); + error = lf_advlockasync(&a, &VTONFS(vp)->n_lockf, size); KASSERT(error == 0, ("Failed to register NFS lock locally - error=%d", error)); } @@ -843,6 +844,7 @@ nlm_setlock(struct nlm_host *host, struc CLNT_RELEASE(client); if (stat != RPC_SUCCESS) { + static int never; /* * We need to cope * with temporary @@ -854,7 +856,8 @@ nlm_setlock(struct nlm_host *host, struc * until the server * wakes up again. */ - pause("nlmcancel", 10*hz); + tsleep(&never, 0, + "nlmcancel", 10*hz); } } while (stat != RPC_SUCCESS); Modified: user/dfr/gssapi/6/sys/nlm/nlm_prot.h ============================================================================== --- user/dfr/gssapi/6/sys/nlm/nlm_prot.h Mon Nov 10 10:41:58 2008 (r184811) +++ user/dfr/gssapi/6/sys/nlm/nlm_prot.h Mon Nov 10 13:23:15 2008 (r184812) @@ -280,129 +280,129 @@ typedef struct nlm4_notify nlm4_notify; #define NLM_SM ((unsigned long)(0)) #define NLM_SM_NOTIFY ((unsigned long)(1)) -extern enum clnt_stat nlm_sm_notify_0(struct nlm_sm_status *, void *, CLIENT *); +extern enum clnt_stat nlm_sm_notify_0(struct nlm_sm_status *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_sm_notify_0_svc(struct nlm_sm_status *, void *, struct svc_req *); #define NLM_VERS ((unsigned long)(1)) #define NLM_TEST ((unsigned long)(1)) -extern enum clnt_stat nlm_test_1(struct nlm_testargs *, nlm_testres *, CLIENT *); +extern enum clnt_stat nlm_test_1(struct nlm_testargs *, nlm_testres *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_test_1_svc(struct nlm_testargs *, nlm_testres *, struct svc_req *); #define NLM_LOCK ((unsigned long)(2)) -extern enum clnt_stat nlm_lock_1(struct nlm_lockargs *, nlm_res *, CLIENT *); +extern enum clnt_stat nlm_lock_1(struct nlm_lockargs *, nlm_res *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_lock_1_svc(struct nlm_lockargs *, nlm_res *, struct svc_req *); #define NLM_CANCEL ((unsigned long)(3)) -extern enum clnt_stat nlm_cancel_1(struct nlm_cancargs *, nlm_res *, CLIENT *); +extern enum clnt_stat nlm_cancel_1(struct nlm_cancargs *, nlm_res *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_cancel_1_svc(struct nlm_cancargs *, nlm_res *, struct svc_req *); #define NLM_UNLOCK ((unsigned long)(4)) -extern enum clnt_stat nlm_unlock_1(struct nlm_unlockargs *, nlm_res *, CLIENT *); +extern enum clnt_stat nlm_unlock_1(struct nlm_unlockargs *, nlm_res *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_unlock_1_svc(struct nlm_unlockargs *, nlm_res *, struct svc_req *); #define NLM_GRANTED ((unsigned long)(5)) -extern enum clnt_stat nlm_granted_1(struct nlm_testargs *, nlm_res *, CLIENT *); +extern enum clnt_stat nlm_granted_1(struct nlm_testargs *, nlm_res *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_granted_1_svc(struct nlm_testargs *, nlm_res *, struct svc_req *); #define NLM_TEST_MSG ((unsigned long)(6)) -extern enum clnt_stat nlm_test_msg_1(struct nlm_testargs *, void *, CLIENT *); +extern enum clnt_stat nlm_test_msg_1(struct nlm_testargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_test_msg_1_svc(struct nlm_testargs *, void *, struct svc_req *); #define NLM_LOCK_MSG ((unsigned long)(7)) -extern enum clnt_stat nlm_lock_msg_1(struct nlm_lockargs *, void *, CLIENT *); +extern enum clnt_stat nlm_lock_msg_1(struct nlm_lockargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_lock_msg_1_svc(struct nlm_lockargs *, void *, struct svc_req *); #define NLM_CANCEL_MSG ((unsigned long)(8)) -extern enum clnt_stat nlm_cancel_msg_1(struct nlm_cancargs *, void *, CLIENT *); +extern enum clnt_stat nlm_cancel_msg_1(struct nlm_cancargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_cancel_msg_1_svc(struct nlm_cancargs *, void *, struct svc_req *); #define NLM_UNLOCK_MSG ((unsigned long)(9)) -extern enum clnt_stat nlm_unlock_msg_1(struct nlm_unlockargs *, void *, CLIENT *); +extern enum clnt_stat nlm_unlock_msg_1(struct nlm_unlockargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_unlock_msg_1_svc(struct nlm_unlockargs *, void *, struct svc_req *); #define NLM_GRANTED_MSG ((unsigned long)(10)) -extern enum clnt_stat nlm_granted_msg_1(struct nlm_testargs *, void *, CLIENT *); +extern enum clnt_stat nlm_granted_msg_1(struct nlm_testargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_granted_msg_1_svc(struct nlm_testargs *, void *, struct svc_req *); #define NLM_TEST_RES ((unsigned long)(11)) -extern enum clnt_stat nlm_test_res_1(nlm_testres *, void *, CLIENT *); +extern enum clnt_stat nlm_test_res_1(nlm_testres *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_test_res_1_svc(nlm_testres *, void *, struct svc_req *); #define NLM_LOCK_RES ((unsigned long)(12)) -extern enum clnt_stat nlm_lock_res_1(nlm_res *, void *, CLIENT *); +extern enum clnt_stat nlm_lock_res_1(nlm_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_lock_res_1_svc(nlm_res *, void *, struct svc_req *); #define NLM_CANCEL_RES ((unsigned long)(13)) -extern enum clnt_stat nlm_cancel_res_1(nlm_res *, void *, CLIENT *); +extern enum clnt_stat nlm_cancel_res_1(nlm_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_cancel_res_1_svc(nlm_res *, void *, struct svc_req *); #define NLM_UNLOCK_RES ((unsigned long)(14)) -extern enum clnt_stat nlm_unlock_res_1(nlm_res *, void *, CLIENT *); +extern enum clnt_stat nlm_unlock_res_1(nlm_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_unlock_res_1_svc(nlm_res *, void *, struct svc_req *); #define NLM_GRANTED_RES ((unsigned long)(15)) -extern enum clnt_stat nlm_granted_res_1(nlm_res *, void *, CLIENT *); +extern enum clnt_stat nlm_granted_res_1(nlm_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_granted_res_1_svc(nlm_res *, void *, struct svc_req *); extern int nlm_prog_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #define NLM_VERSX ((unsigned long)(3)) #define NLM_SHARE ((unsigned long)(20)) -extern enum clnt_stat nlm_share_3(nlm_shareargs *, nlm_shareres *, CLIENT *); +extern enum clnt_stat nlm_share_3(nlm_shareargs *, nlm_shareres *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_share_3_svc(nlm_shareargs *, nlm_shareres *, struct svc_req *); #define NLM_UNSHARE ((unsigned long)(21)) -extern enum clnt_stat nlm_unshare_3(nlm_shareargs *, nlm_shareres *, CLIENT *); +extern enum clnt_stat nlm_unshare_3(nlm_shareargs *, nlm_shareres *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_unshare_3_svc(nlm_shareargs *, nlm_shareres *, struct svc_req *); #define NLM_NM_LOCK ((unsigned long)(22)) -extern enum clnt_stat nlm_nm_lock_3(nlm_lockargs *, nlm_res *, CLIENT *); +extern enum clnt_stat nlm_nm_lock_3(nlm_lockargs *, nlm_res *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_nm_lock_3_svc(nlm_lockargs *, nlm_res *, struct svc_req *); #define NLM_FREE_ALL ((unsigned long)(23)) -extern enum clnt_stat nlm_free_all_3(nlm_notify *, void *, CLIENT *); +extern enum clnt_stat nlm_free_all_3(nlm_notify *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm_free_all_3_svc(nlm_notify *, void *, struct svc_req *); extern int nlm_prog_3_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #define NLM_VERS4 ((unsigned long)(4)) #define NLM4_TEST ((unsigned long)(1)) -extern enum clnt_stat nlm4_test_4(nlm4_testargs *, nlm4_testres *, CLIENT *); +extern enum clnt_stat nlm4_test_4(nlm4_testargs *, nlm4_testres *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_test_4_svc(nlm4_testargs *, nlm4_testres *, struct svc_req *); #define NLM4_LOCK ((unsigned long)(2)) -extern enum clnt_stat nlm4_lock_4(nlm4_lockargs *, nlm4_res *, CLIENT *); +extern enum clnt_stat nlm4_lock_4(nlm4_lockargs *, nlm4_res *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_lock_4_svc(nlm4_lockargs *, nlm4_res *, struct svc_req *); #define NLM4_CANCEL ((unsigned long)(3)) -extern enum clnt_stat nlm4_cancel_4(nlm4_cancargs *, nlm4_res *, CLIENT *); +extern enum clnt_stat nlm4_cancel_4(nlm4_cancargs *, nlm4_res *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_cancel_4_svc(nlm4_cancargs *, nlm4_res *, struct svc_req *); #define NLM4_UNLOCK ((unsigned long)(4)) -extern enum clnt_stat nlm4_unlock_4(nlm4_unlockargs *, nlm4_res *, CLIENT *); +extern enum clnt_stat nlm4_unlock_4(nlm4_unlockargs *, nlm4_res *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_unlock_4_svc(nlm4_unlockargs *, nlm4_res *, struct svc_req *); #define NLM4_GRANTED ((unsigned long)(5)) -extern enum clnt_stat nlm4_granted_4(nlm4_testargs *, nlm4_res *, CLIENT *); +extern enum clnt_stat nlm4_granted_4(nlm4_testargs *, nlm4_res *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_granted_4_svc(nlm4_testargs *, nlm4_res *, struct svc_req *); #define NLM4_TEST_MSG ((unsigned long)(6)) -extern enum clnt_stat nlm4_test_msg_4(nlm4_testargs *, void *, CLIENT *); +extern enum clnt_stat nlm4_test_msg_4(nlm4_testargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_test_msg_4_svc(nlm4_testargs *, void *, struct svc_req *); #define NLM4_LOCK_MSG ((unsigned long)(7)) -extern enum clnt_stat nlm4_lock_msg_4(nlm4_lockargs *, void *, CLIENT *); +extern enum clnt_stat nlm4_lock_msg_4(nlm4_lockargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_lock_msg_4_svc(nlm4_lockargs *, void *, struct svc_req *); #define NLM4_CANCEL_MSG ((unsigned long)(8)) -extern enum clnt_stat nlm4_cancel_msg_4(nlm4_cancargs *, void *, CLIENT *); +extern enum clnt_stat nlm4_cancel_msg_4(nlm4_cancargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_cancel_msg_4_svc(nlm4_cancargs *, void *, struct svc_req *); #define NLM4_UNLOCK_MSG ((unsigned long)(9)) -extern enum clnt_stat nlm4_unlock_msg_4(nlm4_unlockargs *, void *, CLIENT *); +extern enum clnt_stat nlm4_unlock_msg_4(nlm4_unlockargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_unlock_msg_4_svc(nlm4_unlockargs *, void *, struct svc_req *); #define NLM4_GRANTED_MSG ((unsigned long)(10)) -extern enum clnt_stat nlm4_granted_msg_4(nlm4_testargs *, void *, CLIENT *); +extern enum clnt_stat nlm4_granted_msg_4(nlm4_testargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_granted_msg_4_svc(nlm4_testargs *, void *, struct svc_req *); #define NLM4_TEST_RES ((unsigned long)(11)) -extern enum clnt_stat nlm4_test_res_4(nlm4_testres *, void *, CLIENT *); +extern enum clnt_stat nlm4_test_res_4(nlm4_testres *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_test_res_4_svc(nlm4_testres *, void *, struct svc_req *); #define NLM4_LOCK_RES ((unsigned long)(12)) -extern enum clnt_stat nlm4_lock_res_4(nlm4_res *, void *, CLIENT *); +extern enum clnt_stat nlm4_lock_res_4(nlm4_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_lock_res_4_svc(nlm4_res *, void *, struct svc_req *); #define NLM4_CANCEL_RES ((unsigned long)(13)) -extern enum clnt_stat nlm4_cancel_res_4(nlm4_res *, void *, CLIENT *); +extern enum clnt_stat nlm4_cancel_res_4(nlm4_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_cancel_res_4_svc(nlm4_res *, void *, struct svc_req *); #define NLM4_UNLOCK_RES ((unsigned long)(14)) -extern enum clnt_stat nlm4_unlock_res_4(nlm4_res *, void *, CLIENT *); +extern enum clnt_stat nlm4_unlock_res_4(nlm4_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_unlock_res_4_svc(nlm4_res *, void *, struct svc_req *); #define NLM4_GRANTED_RES ((unsigned long)(15)) -extern enum clnt_stat nlm4_granted_res_4(nlm4_res *, void *, CLIENT *); +extern enum clnt_stat nlm4_granted_res_4(nlm4_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_granted_res_4_svc(nlm4_res *, void *, struct svc_req *); #define NLM4_SHARE ((unsigned long)(20)) -extern enum clnt_stat nlm4_share_4(nlm4_shareargs *, nlm4_shareres *, CLIENT *); +extern enum clnt_stat nlm4_share_4(nlm4_shareargs *, nlm4_shareres *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_share_4_svc(nlm4_shareargs *, nlm4_shareres *, struct svc_req *); #define NLM4_UNSHARE ((unsigned long)(21)) -extern enum clnt_stat nlm4_unshare_4(nlm4_shareargs *, nlm4_shareres *, CLIENT *); +extern enum clnt_stat nlm4_unshare_4(nlm4_shareargs *, nlm4_shareres *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_unshare_4_svc(nlm4_shareargs *, nlm4_shareres *, struct svc_req *); #define NLM4_NM_LOCK ((unsigned long)(22)) -extern enum clnt_stat nlm4_nm_lock_4(nlm4_lockargs *, nlm4_res *, CLIENT *); +extern enum clnt_stat nlm4_nm_lock_4(nlm4_lockargs *, nlm4_res *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_nm_lock_4_svc(nlm4_lockargs *, nlm4_res *, struct svc_req *); #define NLM4_FREE_ALL ((unsigned long)(23)) -extern enum clnt_stat nlm4_free_all_4(nlm4_notify *, void *, CLIENT *); +extern enum clnt_stat nlm4_free_all_4(nlm4_notify *, void *, CLIENT *, struct rpc_callextra *, struct timeval); extern bool_t nlm4_free_all_4_svc(nlm4_notify *, void *, struct svc_req *); extern int nlm_prog_4_freeresult(SVCXPRT *, xdrproc_t, caddr_t); Modified: user/dfr/gssapi/6/sys/nlm/nlm_prot_clnt.c ============================================================================== --- user/dfr/gssapi/6/sys/nlm/nlm_prot_clnt.c Mon Nov 10 10:41:58 2008 (r184811) +++ user/dfr/gssapi/6/sys/nlm/nlm_prot_clnt.c Mon Nov 10 13:23:15 2008 (r184812) @@ -17,356 +17,353 @@ __RCSID("$NetBSD: nlm_prot.x,v 1.6 2000/ #endif /* not lint */ __FBSDID("$FreeBSD$"); -/* Default timeout can be changed using clnt_control() */ -static struct timeval TIMEOUT = { 25, 0 }; - enum clnt_stat -nlm_sm_notify_0(struct nlm_sm_status *argp, void *clnt_res, CLIENT *clnt) +nlm_sm_notify_0(struct nlm_sm_status *argp, void *clnt_res, CLIENT *clnt, struct rpc_callextra *ext, struct timeval timo) { - return (clnt_call(clnt, NLM_SM_NOTIFY, + return (CLNT_CALL_EXT(clnt, ext, NLM_SM_NOTIFY, (xdrproc_t) xdr_nlm_sm_status, (caddr_t) argp, (xdrproc_t) xdr_void, (caddr_t) clnt_res, - TIMEOUT)); + timo)); } enum clnt_stat -nlm_test_1(struct nlm_testargs *argp, nlm_testres *clnt_res, CLIENT *clnt) +nlm_test_1(struct nlm_testargs *argp, nlm_testres *clnt_res, CLIENT *clnt, struct rpc_callextra *ext, struct timeval timo) { - return (clnt_call(clnt, NLM_TEST, + return (CLNT_CALL_EXT(clnt, ext, NLM_TEST, (xdrproc_t) xdr_nlm_testargs, (caddr_t) argp, (xdrproc_t) xdr_nlm_testres, (caddr_t) clnt_res, - TIMEOUT)); + timo)); } enum clnt_stat -nlm_lock_1(struct nlm_lockargs *argp, nlm_res *clnt_res, CLIENT *clnt) +nlm_lock_1(struct nlm_lockargs *argp, nlm_res *clnt_res, CLIENT *clnt, struct rpc_callextra *ext, struct timeval timo) { - return (clnt_call(clnt, NLM_LOCK, + return (CLNT_CALL_EXT(clnt, ext, NLM_LOCK, (xdrproc_t) xdr_nlm_lockargs, (caddr_t) argp, (xdrproc_t) xdr_nlm_res, (caddr_t) clnt_res, - TIMEOUT)); + timo)); } enum clnt_stat -nlm_cancel_1(struct nlm_cancargs *argp, nlm_res *clnt_res, CLIENT *clnt) +nlm_cancel_1(struct nlm_cancargs *argp, nlm_res *clnt_res, CLIENT *clnt, struct rpc_callextra *ext, struct timeval timo) { - return (clnt_call(clnt, NLM_CANCEL, + return (CLNT_CALL_EXT(clnt, ext, NLM_CANCEL, (xdrproc_t) xdr_nlm_cancargs, (caddr_t) argp, (xdrproc_t) xdr_nlm_res, (caddr_t) clnt_res, - TIMEOUT)); + timo)); } enum clnt_stat -nlm_unlock_1(struct nlm_unlockargs *argp, nlm_res *clnt_res, CLIENT *clnt) +nlm_unlock_1(struct nlm_unlockargs *argp, nlm_res *clnt_res, CLIENT *clnt, struct rpc_callextra *ext, struct timeval timo) { - return (clnt_call(clnt, NLM_UNLOCK, + return (CLNT_CALL_EXT(clnt, ext, NLM_UNLOCK, (xdrproc_t) xdr_nlm_unlockargs, (caddr_t) argp, (xdrproc_t) xdr_nlm_res, (caddr_t) clnt_res, - TIMEOUT)); + timo)); } enum clnt_stat -nlm_granted_1(struct nlm_testargs *argp, nlm_res *clnt_res, CLIENT *clnt) +nlm_granted_1(struct nlm_testargs *argp, nlm_res *clnt_res, CLIENT *clnt, struct rpc_callextra *ext, struct timeval timo) { - return (clnt_call(clnt, NLM_GRANTED, + return (CLNT_CALL_EXT(clnt, ext, NLM_GRANTED, (xdrproc_t) xdr_nlm_testargs, (caddr_t) argp, (xdrproc_t) xdr_nlm_res, (caddr_t) clnt_res, - TIMEOUT)); + timo)); } enum clnt_stat -nlm_test_msg_1(struct nlm_testargs *argp, void *clnt_res, CLIENT *clnt) +nlm_test_msg_1(struct nlm_testargs *argp, void *clnt_res, CLIENT *clnt, struct rpc_callextra *ext, struct timeval timo) { - return (clnt_call(clnt, NLM_TEST_MSG, + return (CLNT_CALL_EXT(clnt, ext, NLM_TEST_MSG, (xdrproc_t) xdr_nlm_testargs, (caddr_t) argp, (xdrproc_t) xdr_void, (caddr_t) clnt_res, - TIMEOUT)); + timo)); } enum clnt_stat -nlm_lock_msg_1(struct nlm_lockargs *argp, void *clnt_res, CLIENT *clnt) +nlm_lock_msg_1(struct nlm_lockargs *argp, void *clnt_res, CLIENT *clnt, struct rpc_callextra *ext, struct timeval timo) { - return (clnt_call(clnt, NLM_LOCK_MSG, + return (CLNT_CALL_EXT(clnt, ext, NLM_LOCK_MSG, (xdrproc_t) xdr_nlm_lockargs, (caddr_t) argp, (xdrproc_t) xdr_void, (caddr_t) clnt_res, - TIMEOUT)); + timo)); } enum clnt_stat -nlm_cancel_msg_1(struct nlm_cancargs *argp, void *clnt_res, CLIENT *clnt) +nlm_cancel_msg_1(struct nlm_cancargs *argp, void *clnt_res, CLIENT *clnt, struct rpc_callextra *ext, struct timeval timo) { - return (clnt_call(clnt, NLM_CANCEL_MSG, + return (CLNT_CALL_EXT(clnt, ext, NLM_CANCEL_MSG, (xdrproc_t) xdr_nlm_cancargs, (caddr_t) argp, (xdrproc_t) xdr_void, (caddr_t) clnt_res, - TIMEOUT)); + timo)); } enum clnt_stat -nlm_unlock_msg_1(struct nlm_unlockargs *argp, void *clnt_res, CLIENT *clnt) +nlm_unlock_msg_1(struct nlm_unlockargs *argp, void *clnt_res, CLIENT *clnt, struct rpc_callextra *ext, struct timeval timo) { - return (clnt_call(clnt, NLM_UNLOCK_MSG, + return (CLNT_CALL_EXT(clnt, ext, NLM_UNLOCK_MSG, (xdrproc_t) xdr_nlm_unlockargs, (caddr_t) argp, (xdrproc_t) xdr_void, (caddr_t) clnt_res, - TIMEOUT)); + timo)); } enum clnt_stat -nlm_granted_msg_1(struct nlm_testargs *argp, void *clnt_res, CLIENT *clnt) +nlm_granted_msg_1(struct nlm_testargs *argp, void *clnt_res, CLIENT *clnt, struct rpc_callextra *ext, struct timeval timo) { - return (clnt_call(clnt, NLM_GRANTED_MSG, + return (CLNT_CALL_EXT(clnt, ext, NLM_GRANTED_MSG, (xdrproc_t) xdr_nlm_testargs, (caddr_t) argp, (xdrproc_t) xdr_void, (caddr_t) clnt_res, - TIMEOUT)); + timo)); } enum clnt_stat -nlm_test_res_1(nlm_testres *argp, void *clnt_res, CLIENT *clnt) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Mon Nov 10 16:23:25 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5713F1065673; Mon, 10 Nov 2008 16:23:25 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40A788FC24; Mon, 10 Nov 2008 16:23:25 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAAGNPff074168; Mon, 10 Nov 2008 16:23:25 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAAGNORx074154; Mon, 10 Nov 2008 16:23:24 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200811101623.mAAGNORx074154@svn.freebsd.org> From: Doug Rabson Date: Mon, 10 Nov 2008 16:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184813 - in user/dfr/gssapi/6/sys: . compat/freebsd32 conf fs/unionfs kern kgssapi modules/kgssapi modules/kgssapi_krb5 modules/krpc modules/nfsclient modules/nfsserver nfsclient nfsse... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 16:23:25 -0000 Author: dfr Date: Mon Nov 10 16:23:24 2008 New Revision: 184813 URL: http://svn.freebsd.org/changeset/base/184813 Log: MFC: 183005,184588,184692,184693,184716,184719,184744 Added: user/dfr/gssapi/6/sys/kgssapi/ - copied from r184588, head/sys/kgssapi/ user/dfr/gssapi/6/sys/modules/kgssapi/ - copied from r184588, head/sys/modules/kgssapi/ user/dfr/gssapi/6/sys/modules/kgssapi_krb5/ - copied from r184588, head/sys/modules/kgssapi_krb5/ user/dfr/gssapi/6/sys/nfsclient/nfs_krpc.c - copied unchanged from r184588, head/sys/nfsclient/nfs_krpc.c user/dfr/gssapi/6/sys/nfsserver/nfs_fha.c - copied, changed from r184588, head/sys/nfsserver/nfs_fha.c user/dfr/gssapi/6/sys/nfsserver/nfs_fha.h - copied unchanged from r184588, head/sys/nfsserver/nfs_fha.h user/dfr/gssapi/6/sys/nfsserver/nfs_srvkrpc.c - copied unchanged from r184588, head/sys/nfsserver/nfs_srvkrpc.c user/dfr/gssapi/6/sys/rpc/replay.c - copied unchanged from r184588, head/sys/rpc/replay.c user/dfr/gssapi/6/sys/rpc/replay.h - copied unchanged from r184588, head/sys/rpc/replay.h user/dfr/gssapi/6/sys/rpc/rpcsec_gss/ - copied from r184588, head/sys/rpc/rpcsec_gss/ user/dfr/gssapi/6/sys/rpc/rpcsec_gss.h - copied unchanged from r184588, head/sys/rpc/rpcsec_gss.h Modified: user/dfr/gssapi/6/sys/ (props changed) user/dfr/gssapi/6/sys/compat/freebsd32/syscalls.master user/dfr/gssapi/6/sys/conf/files user/dfr/gssapi/6/sys/conf/options user/dfr/gssapi/6/sys/fs/unionfs/union_vfsops.c user/dfr/gssapi/6/sys/kern/syscalls.master user/dfr/gssapi/6/sys/kern/vfs_export.c user/dfr/gssapi/6/sys/kern/vfs_mount.c user/dfr/gssapi/6/sys/modules/krpc/Makefile user/dfr/gssapi/6/sys/modules/nfsclient/Makefile user/dfr/gssapi/6/sys/modules/nfsserver/Makefile user/dfr/gssapi/6/sys/nfsclient/nfs.h user/dfr/gssapi/6/sys/nfsclient/nfs_socket.c user/dfr/gssapi/6/sys/nfsclient/nfs_subs.c user/dfr/gssapi/6/sys/nfsclient/nfs_vfsops.c user/dfr/gssapi/6/sys/nfsclient/nfsmount.h user/dfr/gssapi/6/sys/nfsserver/nfs.h user/dfr/gssapi/6/sys/nfsserver/nfs_serv.c user/dfr/gssapi/6/sys/nfsserver/nfs_srvcache.c user/dfr/gssapi/6/sys/nfsserver/nfs_srvsock.c user/dfr/gssapi/6/sys/nfsserver/nfs_srvsubs.c user/dfr/gssapi/6/sys/nfsserver/nfs_syscalls.c user/dfr/gssapi/6/sys/nfsserver/nfsm_subs.h user/dfr/gssapi/6/sys/nfsserver/nfsrvcache.h user/dfr/gssapi/6/sys/nlm/nlm.h user/dfr/gssapi/6/sys/nlm/nlm_advlock.c user/dfr/gssapi/6/sys/nlm/nlm_prot_impl.c user/dfr/gssapi/6/sys/nlm/nlm_prot_svc.c user/dfr/gssapi/6/sys/rpc/auth.h user/dfr/gssapi/6/sys/rpc/auth_none.c user/dfr/gssapi/6/sys/rpc/auth_unix.c user/dfr/gssapi/6/sys/rpc/clnt.h user/dfr/gssapi/6/sys/rpc/clnt_dg.c user/dfr/gssapi/6/sys/rpc/clnt_rc.c user/dfr/gssapi/6/sys/rpc/clnt_vc.c user/dfr/gssapi/6/sys/rpc/rpc_com.h user/dfr/gssapi/6/sys/rpc/rpc_generic.c user/dfr/gssapi/6/sys/rpc/rpc_msg.h user/dfr/gssapi/6/sys/rpc/rpc_prot.c user/dfr/gssapi/6/sys/rpc/svc.c user/dfr/gssapi/6/sys/rpc/svc.h user/dfr/gssapi/6/sys/rpc/svc_auth.c user/dfr/gssapi/6/sys/rpc/svc_auth.h user/dfr/gssapi/6/sys/rpc/svc_auth_unix.c user/dfr/gssapi/6/sys/rpc/svc_dg.c user/dfr/gssapi/6/sys/rpc/svc_generic.c user/dfr/gssapi/6/sys/rpc/svc_vc.c user/dfr/gssapi/6/sys/rpc/xdr.h user/dfr/gssapi/6/sys/sys/mount.h user/dfr/gssapi/6/sys/xdr/xdr_mbuf.c Modified: user/dfr/gssapi/6/sys/compat/freebsd32/syscalls.master ============================================================================== --- user/dfr/gssapi/6/sys/compat/freebsd32/syscalls.master Mon Nov 10 13:23:15 2008 (r184812) +++ user/dfr/gssapi/6/sys/compat/freebsd32/syscalls.master Mon Nov 10 16:23:24 2008 (r184813) @@ -764,3 +764,54 @@ 455 AUE_NULL MSTD { int freebsd32_thr_new( \ struct thr_param32 *param, \ int param_size); } +456 AUE_NULL UNIMPL sigqueue +457 AUE_NULL UNIMPL kmq_open +458 AUE_NULL UNIMPL kmq_setattr +459 AUE_NULL UNIMPL kmq_timedreceive +460 AUE_NULL UNIMPL kmq_timedsend +461 AUE_NULL UNIMPL kmq_notify +462 AUE_NULL UNIMPL kmq_unlink +463 AUE_NULL UNIMPL abort2 +464 AUE_NULL UNIMPL thr_set_name +465 AUE_NULL UNIMPL aio_fsync +466 AUE_NULL UNIMPL rtprio_thread +467 AUE_NULL UNIMPL nosys +468 AUE_NULL UNIMPL nosys +469 AUE_NULL UNIMPL __getpath_fromfd +470 AUE_NULL UNIMPL __getpath_fromaddr +471 AUE_NULL UNIMPL sctp_peeloff +472 AUE_NULL UNIMPL sctp_generic_sendmsg +473 AUE_NULL UNIMPL sctp_generic_sendmsg_iov +474 AUE_NULL UNIMPL sctp_generic_recvmsg +475 AUE_NULL UNIMPL freebsd32_pread +476 AUE_NULL UNIMPL freebsd32_pwrite +477 AUE_NULL UNIMPL freebsd32_mmap +478 AUE_NULL UNIMPL freebsd32_lseek +479 AUE_NULL UNIMPL freebsd32_truncate +480 AUE_NULL UNIMPL freebsd32_ftruncate +481 AUE_NULL UNIMPL thr_kill2 +482 AUE_NULL UNIMPL shm_open +483 AUE_NULL UNIMPL shm_unlink +484 AUE_NULL UNIMPL cpuset +485 AUE_NULL UNIMPL freebsd32_cpuset_setid +486 AUE_NULL UNIMPL freebsd32_cpuset_getid +487 AUE_NULL UNIMPL freebsd32_cpuset_getaffinity +488 AUE_NULL UNIMPL freebsd32_cpuset_setaffinity +489 AUE_NULL UNIMPL faccessat +490 AUE_NULL UNIMPL fchmodat +491 AUE_NULL UNIMPL fchownat +492 AUE_NULL UNIMPL freebsd32_fexecve +493 AUE_NULL UNIMPL freebsd32_fstatat +494 AUE_NULL UNIMPL freebsd32_futimesat +495 AUE_NULL UNIMPL linkat +496 AUE_NULL UNIMPL mkdirat +497 AUE_NULL UNIMPL mkfifoat +498 AUE_NULL UNIMPL mknodat +499 AUE_NULL UNIMPL openat +500 AUE_NULL UNIMPL readlinkat +501 AUE_NULL UNIMPL renameat +502 AUE_NULL UNIMPL symlinkat +503 AUE_NULL UNIMPL unlinkat +504 AUE_NULL UNIMPL posix_openpt +; 505 is initialised by the kgssapi code, if present. +505 AUE_NULL UNIMPL gssd_syscall Modified: user/dfr/gssapi/6/sys/conf/files ============================================================================== --- user/dfr/gssapi/6/sys/conf/files Mon Nov 10 13:23:15 2008 (r184812) +++ user/dfr/gssapi/6/sys/conf/files Mon Nov 10 16:23:24 2008 (r184813) @@ -305,7 +305,7 @@ crypto/des/des_ecb.c optional netsmb crypto/des/des_setkey.c optional crypto crypto/des/des_setkey.c optional ipsec ipsec_esp crypto/des/des_setkey.c optional netsmb -crypto/rc4/rc4.c optional netgraph_mppc_encryption +crypto/rc4/rc4.c optional netgraph_mppc_encryption | kgssapi crypto/rijndael/rijndael-alg-fst.c optional crypto crypto/rijndael/rijndael-alg-fst.c optional geom_bde crypto/rijndael/rijndael-alg-fst.c optional ipsec @@ -1446,6 +1446,56 @@ kern/vfs_subr.c standard kern/vfs_syscalls.c standard kern/vfs_vnops.c standard # +# Kernel GSS-API +# +gssd.h optional kgssapi \ + dependency "$S/kgssapi/gssd.x" \ + compile-with "rpcgen -hM $S/kgssapi/gssd.x | grep -v pthread.h > gssd.h" \ + no-obj no-implicit-rule before-depend local \ + clean "gssd.h" +gssd_xdr.c optional kgssapi \ + dependency "$S/kgssapi/gssd.x gssd.h" \ + compile-with "rpcgen -c $S/kgssapi/gssd.x -o gssd_xdr.c" \ + no-implicit-rule before-depend local \ + clean "gssd_xdr.c" +gssd_clnt.c optional kgssapi \ + dependency "$S/kgssapi/gssd.x gssd.h" \ + compile-with "rpcgen -lM $S/kgssapi/gssd.x | grep -v string.h > gssd_clnt.c" \ + no-implicit-rule before-depend local \ + clean "gssd_clnt.c" +kgssapi/gss_accept_sec_context.c optional kgssapi +kgssapi/gss_add_oid_set_member.c optional kgssapi +kgssapi/gss_acquire_cred.c optional kgssapi +kgssapi/gss_canonicalize_name.c optional kgssapi +kgssapi/gss_create_empty_oid_set.c optional kgssapi +kgssapi/gss_delete_sec_context.c optional kgssapi +kgssapi/gss_display_status.c optional kgssapi +kgssapi/gss_export_name.c optional kgssapi +kgssapi/gss_get_mic.c optional kgssapi +kgssapi/gss_init_sec_context.c optional kgssapi +kgssapi/gss_impl.c optional kgssapi +kgssapi/gss_import_name.c optional kgssapi +kgssapi/gss_names.c optional kgssapi +kgssapi/gss_pname_to_uid.c optional kgssapi +kgssapi/gss_release_buffer.c optional kgssapi +kgssapi/gss_release_cred.c optional kgssapi +kgssapi/gss_release_name.c optional kgssapi +kgssapi/gss_release_oid_set.c optional kgssapi +kgssapi/gss_set_cred_option.c optional kgssapi +kgssapi/gss_test_oid_set_member.c optional kgssapi +kgssapi/gss_unwrap.c optional kgssapi +kgssapi/gss_verify_mic.c optional kgssapi +kgssapi/gss_wrap.c optional kgssapi +kgssapi/gss_wrap_size_limit.c optional kgssapi +kgssapi/gssd_prot.c optional kgssapi +kgssapi/krb5/krb5_mech.c optional kgssapi +kgssapi/krb5/kcrypto.c optional kgssapi +kgssapi/krb5/kcrypto_aes.c optional kgssapi +kgssapi/krb5/kcrypto_arcfour.c optional kgssapi +kgssapi/krb5/kcrypto_des.c optional kgssapi +kgssapi/krb5/kcrypto_des3.c optional kgssapi +kgssapi/kgss_if.m optional kgssapi +kgssapi/gsstest.c optional kgssapi_debug # These files in libkern/ are those needed by all architectures. Some # of the files in libkern/ are only needed on some architectures, e.g., # libkern/divdi3.c is needed by i386 but not alpha. Also, some of these @@ -1886,18 +1936,21 @@ nfsclient/krpc_subr.c optional bootp nf nfsclient/nfs_bio.c optional nfsclient nfsclient/nfs_diskless.c optional nfsclient nfs_root nfsclient/nfs_node.c optional nfsclient -nfsclient/nfs_socket.c optional nfsclient +nfsclient/nfs_socket.c optional nfsclient nfs_legacyrpc +nfsclient/nfs_krpc.c optional nfsclient nfsclient/nfs_subs.c optional nfsclient nfsclient/nfs_nfsiod.c optional nfsclient nfsclient/nfs_vfsops.c optional nfsclient nfsclient/nfs_vnops.c optional nfsclient nfsclient/nfs_lock.c optional nfsclient +nfsserver/nfs_fha.c optional nfsserver nfsserver/nfs_serv.c optional nfsserver -nfsserver/nfs_srvsock.c optional nfsserver -nfsserver/nfs_srvcache.c optional nfsserver +nfsserver/nfs_srvkrpc.c optional nfsserver +nfsserver/nfs_srvsock.c optional nfsserver nfs_legacyrpc +nfsserver/nfs_srvcache.c optional nfsserver nfs_legacyrpc nfsserver/nfs_srvsubs.c optional nfsserver -nfsserver/nfs_syscalls.c optional nfsserver -nlm/nlm_advlock.c optional nfslockd +nfsserver/nfs_syscalls.c optional nfsserver nfs_legacyrpc +nlm/nlm_advlock.c optional nfslockd nfsclient nlm/nlm_prot_clnt.c optional nfslockd nlm/nlm_prot_impl.c optional nfslockd nlm/nlm_prot_server.c optional nfslockd @@ -1943,27 +1996,33 @@ pci/xrpu.c optional xrpu pci posix4/ksched.c optional _kposix_priority_scheduling posix4/p1003_1b.c standard posix4/posix4_mib.c standard -rpc/auth_none.c optional nfslockd -rpc/auth_unix.c optional nfslockd -rpc/authunix_prot.c optional nfslockd -rpc/clnt_dg.c optional nfslockd -rpc/clnt_rc.c optional nfslockd -rpc/clnt_vc.c optional nfslockd -rpc/getnetconfig.c optional nfslockd -rpc/inet_ntop.c optional nfslockd -rpc/inet_pton.c optional nfslockd -rpc/rpc_callmsg.c optional nfslockd -rpc/rpc_generic.c optional nfslockd -rpc/rpc_prot.c optional nfslockd -rpc/rpcb_clnt.c optional nfslockd -rpc/rpcb_prot.c optional nfslockd +rpc/auth_none.c optional krpc | nfslockd | nfsclient | nfsserver +rpc/auth_unix.c optional krpc | nfslockd | nfsclient +rpc/authunix_prot.c optional krpc | nfslockd | nfsclient | nfsserver +rpc/clnt_dg.c optional krpc | nfslockd | nfsclient +rpc/clnt_rc.c optional krpc | nfslockd | nfsclient +rpc/clnt_vc.c optional krpc | nfslockd | nfsclient | nfsserver +rpc/getnetconfig.c optional krpc | nfslockd | nfsclient | nfsserver +rpc/inet_ntop.c optional krpc | nfslockd | nfsclient | nfsserver +rpc/inet_pton.c optional krpc | nfslockd | nfsclient | nfsserver +rpc/replay.c optional krpc | nfslockd | nfsserver +rpc/rpc_callmsg.c optional krpc | nfslockd | nfsclient | nfsserver +rpc/rpc_generic.c optional krpc | nfslockd | nfsclient | nfsserver +rpc/rpc_prot.c optional krpc | nfslockd | nfsclient | nfsserver +rpc/rpcb_clnt.c optional krpc | nfslockd | nfsclient | nfsserver +rpc/rpcb_prot.c optional krpc | nfslockd | nfsclient | nfsserver rpc/rpcclnt.c optional nfsclient -rpc/svc.c optional nfslockd -rpc/svc_auth.c optional nfslockd -rpc/svc_auth_unix.c optional nfslockd -rpc/svc_dg.c optional nfslockd -rpc/svc_generic.c optional nfslockd -rpc/svc_vc.c optional nfslockd +rpc/svc.c optional krpc | nfslockd | nfsserver +rpc/svc_auth.c optional krpc | nfslockd | nfsserver +rpc/svc_auth_unix.c optional krpc | nfslockd | nfsserver +rpc/svc_dg.c optional krpc | nfslockd | nfsserver +rpc/svc_generic.c optional krpc | nfslockd | nfsserver +rpc/svc_vc.c optional krpc | nfslockd | nfsserver +rpc/rpcsec_gss/rpcsec_gss.c optional krpc kgssapi | nfslockd kgssapi +rpc/rpcsec_gss/rpcsec_gss_conf.c optional krpc kgssapi | nfslockd kgssapi +rpc/rpcsec_gss/rpcsec_gss_misc.c optional krpc kgssapi | nfslockd kgssapi +rpc/rpcsec_gss/rpcsec_gss_prot.c optional krpc kgssapi | nfslockd kgssapi +rpc/rpcsec_gss/svc_rpcsec_gss.c optional krpc kgssapi | nfslockd kgssapi security/audit/audit.c optional audit security/audit/audit_arg.c optional audit security/audit/audit_bsm.c optional audit @@ -2039,9 +2098,160 @@ vm/vm_pager.c standard vm/vm_unix.c standard vm/vm_zeroidle.c standard vm/vnode_pager.c standard -xdr/xdr.c optional nfslockd -xdr/xdr_array.c optional nfslockd -xdr/xdr_mbuf.c optional nfslockd -xdr/xdr_mem.c optional nfslockd -xdr/xdr_reference.c optional nfslockd -xdr/xdr_sizeof.c optional nfslockd \ No newline at end of file +xdr/xdr.c optional krpc | nfslockd | nfsclient | nfsserver +xdr/xdr_array.c optional krpc | nfslockd | nfsclient | nfsserver +xdr/xdr_mbuf.c optional krpc | nfslockd | nfsclient | nfsserver +xdr/xdr_mem.c optional krpc | nfslockd | nfsclient | nfsserver +xdr/xdr_reference.c optional krpc | nfslockd | nfsclient | nfsserver +xdr/xdr_sizeof.c optional krpc | nfslockd | nfsclient | nfsserver +# +gnu/fs/xfs/xfs_alloc.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" \ + warning "kernel contains GPL contaminated xfs filesystem" +gnu/fs/xfs/xfs_alloc_btree.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_bit.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_bmap.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_bmap_btree.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_btree.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_buf_item.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_da_btree.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_dir.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_dir2.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_dir2_block.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_dir2_data.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_dir2_leaf.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_dir2_node.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_dir2_sf.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_dir2_trace.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_dir_leaf.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_error.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_extfree_item.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_fsops.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_ialloc.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_ialloc_btree.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_inode.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_inode_item.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_iocore.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_itable.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_dfrag.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_log.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_log_recover.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_mount.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_rename.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_trans.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_trans_ail.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_trans_buf.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_trans_extfree.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_trans_inode.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_trans_item.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_utils.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_vfsops.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_vnodeops.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_rw.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_attr_leaf.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_attr.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_dmops.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_qmops.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_iget.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/xfs_freebsd_iget.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/xfs_mountops.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/xfs_vnops.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/xfs_frw.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/xfs_buf.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/xfs_globals.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/xfs_dmistubs.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/xfs_super.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/xfs_stats.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/xfs_vfs.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/xfs_vnode.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/xfs_sysctl.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/xfs_fs_subr.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/xfs_ioctl.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/support/debug.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/support/ktrace.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/support/mrlock.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/support/uuid.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/FreeBSD/support/kmem.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_iomap.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" +gnu/fs/xfs/xfs_behavior.c optional xfs \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + +xen/gnttab.c optional xen +xen/features.c optional xen +xen/evtchn/evtchn.c optional xen +xen/evtchn/evtchn_dev.c optional xen +xen/xenbus/xenbus_client.c optional xen +xen/xenbus/xenbus_comms.c optional xen +xen/xenbus/xenbus_dev.c optional xen +xen/xenbus/xenbus_probe.c optional xen +xen/xenbus/xenbus_probe_backend.c optional xen +xen/xenbus/xenbus_xs.c optional xen +dev/xen/console/console.c optional xen +dev/xen/console/xencons_ring.c optional xen +dev/xen/blkfront/blkfront.c optional xen +dev/xen/netfront/netfront.c optional xen Modified: user/dfr/gssapi/6/sys/conf/options ============================================================================== --- user/dfr/gssapi/6/sys/conf/options Mon Nov 10 13:23:15 2008 (r184812) +++ user/dfr/gssapi/6/sys/conf/options Mon Nov 10 16:23:24 2008 (r184813) @@ -200,6 +200,10 @@ PSEUDOFS_TRACE opt_pseudofs.h # Broken - ffs_snapshot() dependency from ufs_lookup() :-( FFS opt_ffs_broken_fixme.h +# In-kernel GSS-API +KGSSAPI opt_kgssapi.h +KGSSAPI_DEBUG opt_kgssapi.h + # These static filesystems have one slightly bogus static dependency in # sys/i386/i386/autoconf.c. If any of these filesystems are # statically compiled into the kernel, code for mounting them as root @@ -207,6 +211,11 @@ FFS opt_ffs_broken_fixme.h NFSCLIENT opt_nfs.h NFSSERVER opt_nfs.h +# Use this option to compile both NFS client and server using the +# legacy RPC implementation instead of the newer KRPC system (which +# supports modern features such as RPCSEC_GSS +NFS_LEGACYRPC opt_nfs.h + # filesystems and libiconv bridge CD9660_ICONV opt_dontuse.h MSDOSFS_ICONV opt_dontuse.h Modified: user/dfr/gssapi/6/sys/fs/unionfs/union_vfsops.c ============================================================================== --- user/dfr/gssapi/6/sys/fs/unionfs/union_vfsops.c Mon Nov 10 13:23:15 2008 (r184812) +++ user/dfr/gssapi/6/sys/fs/unionfs/union_vfsops.c Mon Nov 10 16:23:24 2008 (r184813) @@ -521,7 +521,7 @@ unionfs_fhtovp(struct mount *mp, struct static int unionfs_checkexp(struct mount *mp, struct sockaddr *nam, int *extflagsp, - struct ucred **credanonp) + struct ucred **credanonp, int *numsecflavors, int **secflavors) { return (EOPNOTSUPP); } Modified: user/dfr/gssapi/6/sys/kern/syscalls.master ============================================================================== --- user/dfr/gssapi/6/sys/kern/syscalls.master Mon Nov 10 13:23:15 2008 (r184812) +++ user/dfr/gssapi/6/sys/kern/syscalls.master Mon Nov 10 16:23:24 2008 (r184813) @@ -807,5 +807,56 @@ 455 AUE_NULL MSTD { int thr_new(struct thr_param *param, \ int param_size); } +456 AUE_NULL UNIMPL sigqueue +457 AUE_NULL UNIMPL kmq_open +458 AUE_NULL UNIMPL kmq_setattr +459 AUE_NULL UNIMPL kmq_timedreceive +460 AUE_NULL UNIMPL kmq_timedsend +461 AUE_NULL UNIMPL kmq_notify +462 AUE_NULL UNIMPL kmq_unlink +463 AUE_NULL UNIMPL abort2 +464 AUE_NULL UNIMPL thr_set_name +465 AUE_NULL UNIMPL aio_fsync +466 AUE_NULL UNIMPL rtprio_thread +467 AUE_NULL UNIMPL nosys +468 AUE_NULL UNIMPL nosys +469 AUE_NULL UNIMPL __getpath_fromfd +470 AUE_NULL UNIMPL __getpath_fromaddr +471 AUE_NULL UNIMPL sctp_peeloff +472 AUE_NULL UNIMPL sctp_generic_sendmsg +473 AUE_NULL UNIMPL sctp_generic_sendmsg_iov +474 AUE_NULL UNIMPL sctp_generic_recvmsg +475 AUE_NULL UNIMPL pread +476 AUE_NULL UNIMPL pwrite +477 AUE_NULL UNIMPL mmap +478 AUE_NULL UNIMPL lseek +479 AUE_NULL UNIMPL truncate +480 AUE_NULL UNIMPL ftruncate +481 AUE_NULL UNIMPL thr_kill2 +482 AUE_NULL UNIMPL shm_open +483 AUE_NULL UNIMPL shm_unlink +484 AUE_NULL UNIMPL cpuset +485 AUE_NULL UNIMPL cpuset_setid +486 AUE_NULL UNIMPL cpuset_getid +487 AUE_NULL UNIMPL cpuset_getaffinity +488 AUE_NULL UNIMPL cpuset_setaffinity +489 AUE_NULL UNIMPL faccessat +490 AUE_NULL UNIMPL fchmodat +491 AUE_NULL UNIMPL fchownat +492 AUE_NULL UNIMPL fexecve +493 AUE_NULL UNIMPL fstatat +494 AUE_NULL UNIMPL futimesat +495 AUE_NULL UNIMPL linkat +496 AUE_NULL UNIMPL mkdirat +497 AUE_NULL UNIMPL mkfifoat +498 AUE_NULL UNIMPL mknodat +499 AUE_NULL UNIMPL openat +500 AUE_NULL UNIMPL readlinkat +501 AUE_NULL UNIMPL renameat +502 AUE_NULL UNIMPL symlinkat +503 AUE_NULL UNIMPL unlinkat +504 AUE_NULL UNIMPL posix_openpt +; 505 is initialised by the kgssapi code, if present. +505 AUE_NULL NOSTD { int gssd_syscall(char *path); } ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master Modified: user/dfr/gssapi/6/sys/kern/vfs_export.c ============================================================================== --- user/dfr/gssapi/6/sys/kern/vfs_export.c Mon Nov 10 13:23:15 2008 (r184812) +++ user/dfr/gssapi/6/sys/kern/vfs_export.c Mon Nov 10 16:23:24 2008 (r184813) @@ -68,6 +68,8 @@ struct netcred { struct radix_node netc_rnodes[2]; int netc_exflags; struct ucred netc_anon; + int netc_numsecflavors; + int netc_secflavors[MAXSECFLAVORS]; }; /* @@ -116,6 +118,9 @@ vfs_hang_addrlist(mp, nep, argp) np->netc_anon.cr_ngroups = argp->ex_anon.cr_ngroups; bcopy(argp->ex_anon.cr_groups, np->netc_anon.cr_groups, sizeof(np->netc_anon.cr_groups)); + np->netc_numsecflavors = argp->ex_numsecflavors; + bcopy(argp->ex_secflavors, np->netc_secflavors, + sizeof(np->netc_secflavors)); refcount_init(&np->netc_anon.cr_ref, 1); MNT_ILOCK(mp); mp->mnt_flag |= MNT_DEFEXPORTED; @@ -177,6 +182,9 @@ vfs_hang_addrlist(mp, nep, argp) np->netc_anon.cr_ngroups = argp->ex_anon.cr_ngroups; bcopy(argp->ex_anon.cr_groups, np->netc_anon.cr_groups, sizeof(np->netc_anon.cr_groups)); + np->netc_numsecflavors = argp->ex_numsecflavors; + bcopy(argp->ex_secflavors, np->netc_secflavors, + sizeof(np->netc_secflavors)); refcount_init(&np->netc_anon.cr_ref, 1); return (0); out: @@ -232,6 +240,10 @@ vfs_export(mp, argp) struct netexport *nep; int error; + if (argp->ex_numsecflavors < 0 + || argp->ex_numsecflavors >= MAXSECFLAVORS) + return (EINVAL); + nep = mp->mnt_export; if (argp->ex_flags & MNT_DELEXPORT) { if (nep == NULL) @@ -404,11 +416,8 @@ vfs_export_lookup(struct mount *mp, stru */ int -vfs_stdcheckexp(mp, nam, extflagsp, credanonp) - struct mount *mp; - struct sockaddr *nam; - int *extflagsp; - struct ucred **credanonp; +vfs_stdcheckexp(struct mount *mp, struct sockaddr *nam, int *extflagsp, + struct ucred **credanonp, int *numsecflavors, int **secflavors) { struct netcred *np; @@ -417,6 +426,10 @@ vfs_stdcheckexp(mp, nam, extflagsp, cred return (EACCES); *extflagsp = np->netc_exflags; *credanonp = &np->netc_anon; + if (numsecflavors) + *numsecflavors = np->netc_numsecflavors; + if (secflavors) + *secflavors = np->netc_secflavors; return (0); } Modified: user/dfr/gssapi/6/sys/kern/vfs_mount.c ============================================================================== --- user/dfr/gssapi/6/sys/kern/vfs_mount.c Mon Nov 10 13:23:15 2008 (r184812) +++ user/dfr/gssapi/6/sys/kern/vfs_mount.c Mon Nov 10 16:23:24 2008 (r184813) @@ -801,6 +801,7 @@ vfs_domount( struct vnode *vp; struct mount *mp; struct vfsconf *vfsp; + struct oexport_args oexport; struct export_args export; int error, flag = 0; struct vattr va; @@ -977,6 +978,19 @@ vfs_domount( if (vfs_copyopt(mp->mnt_optnew, "export", &export, sizeof(export)) == 0) error = vfs_export(mp, &export); + else if (vfs_copyopt(mp->mnt_optnew, "export", &oexport, + sizeof(oexport)) == 0) { + export.ex_flags = oexport.ex_flags; + export.ex_root = oexport.ex_root; + export.ex_anon = oexport.ex_anon; + export.ex_addr = oexport.ex_addr; + export.ex_addrlen = oexport.ex_addrlen; + export.ex_mask = oexport.ex_mask; + export.ex_masklen = oexport.ex_masklen; + export.ex_indexfile = oexport.ex_indexfile; + export.ex_numsecflavors = 0; + error = vfs_export(mp, &export); + } } if (!error) { Modified: user/dfr/gssapi/6/sys/modules/krpc/Makefile ============================================================================== --- user/dfr/gssapi/6/sys/modules/krpc/Makefile Mon Nov 10 13:23:15 2008 (r184812) +++ user/dfr/gssapi/6/sys/modules/krpc/Makefile Mon Nov 10 16:23:24 2008 (r184813) @@ -16,6 +16,7 @@ SRCS= auth_none.c \ rpc_prot.c \ rpcb_clnt.c \ rpcb_prot.c \ + replay.c \ svc.c \ svc_auth.c \ svc_auth_unix.c \ Modified: user/dfr/gssapi/6/sys/modules/nfsclient/Makefile ============================================================================== --- user/dfr/gssapi/6/sys/modules/nfsclient/Makefile Mon Nov 10 13:23:15 2008 (r184812) +++ user/dfr/gssapi/6/sys/modules/nfsclient/Makefile Mon Nov 10 16:23:24 2008 (r184813) @@ -6,11 +6,11 @@ KMOD= nfsclient SRCS= vnode_if.h \ nfs_bio.c nfs_lock.c nfs_node.c nfs_socket.c nfs_subs.c nfs_nfsiod.c \ - nfs_vfsops.c nfs_vnops.c nfs_common.c \ + nfs_vfsops.c nfs_vnops.c nfs_common.c nfs_krpc.c \ opt_inet.h opt_nfs.h opt_bootp.h opt_nfsroot.h SRCS+= nfs4_dev.c nfs4_idmap.c nfs4_socket.c nfs4_subs.c \ nfs4_vfs_subs.c nfs4_vfsops.c nfs4_vn_subs.c nfs4_vnops.c -SRCS+= opt_inet6.h +SRCS+= opt_inet6.h opt_kgssapi.h # USE THE RPCCLNT: CFLAGS+= -DRPCCLNT_DEBUG Modified: user/dfr/gssapi/6/sys/modules/nfsserver/Makefile ============================================================================== --- user/dfr/gssapi/6/sys/modules/nfsserver/Makefile Mon Nov 10 13:23:15 2008 (r184812) +++ user/dfr/gssapi/6/sys/modules/nfsserver/Makefile Mon Nov 10 16:23:24 2008 (r184813) @@ -3,8 +3,8 @@ .PATH: ${.CURDIR}/../../nfsserver ${.CURDIR}/../../nfs KMOD= nfsserver SRCS= vnode_if.h \ - nfs_serv.c nfs_srvsock.c nfs_srvcache.c nfs_srvsubs.c nfs_syscalls.c \ - nfs_common.c \ + nfs_fha.c nfs_serv.c nfs_srvkrpc.c nfs_srvsock.c nfs_srvcache.c \ + nfs_srvsubs.c nfs_syscalls.c nfs_common.c \ opt_mac.h \ opt_nfs.h SRCS+= opt_inet6.h Modified: user/dfr/gssapi/6/sys/nfsclient/nfs.h ============================================================================== --- user/dfr/gssapi/6/sys/nfsclient/nfs.h Mon Nov 10 13:23:15 2008 (r184812) +++ user/dfr/gssapi/6/sys/nfsclient/nfs.h Mon Nov 10 16:23:24 2008 (r184813) @@ -131,7 +131,9 @@ MALLOC_DECLARE(M_NFSDIRECTIO); extern struct uma_zone *nfsmount_zone; +#ifdef NFS_LEGACYRPC extern struct callout nfs_callout; +#endif extern struct nfsstats nfsstats; extern int nfs_numasync; @@ -160,6 +162,8 @@ struct nameidata; (e) != ERESTART && (e) != EWOULDBLOCK && \ ((s) & PR_CONNREQUIRED) == 0) +#ifdef NFS_LEGACYRPC + /* * Nfs outstanding request list element */ @@ -197,6 +201,22 @@ extern TAILQ_HEAD(nfs_reqq, nfsreq) nfs_ #define R_MUSTRESEND 0x40 /* Must resend request */ #define R_GETONEREP 0x80 /* Probe for one reply only */ +#else + +/* + * This is only needed to keep things working while we support + * compiling for both RPC implementations. + */ +struct nfsreq; +struct nfsmount; + +#endif + +struct buf; +struct socket; +struct uio; +struct vattr; + /* * Pointers to ops that differ from v3 to v4 */ @@ -285,12 +305,18 @@ vfs_init_t nfs_init; vfs_uninit_t nfs_uninit; int nfs_mountroot(struct mount *mp, struct thread *td); +#ifdef NFS_LEGACYRPC #ifndef NFS4_USE_RPCCLNT int nfs_send(struct socket *, struct sockaddr *, struct mbuf *, struct nfsreq *); int nfs_sndlock(struct nfsreq *); void nfs_sndunlock(struct nfsreq *); +void nfs_up(struct nfsreq *, struct nfsmount *, struct thread *, + const char *, int); +void nfs_down(struct nfsreq *, struct nfsmount *, struct thread *, + const char *, int, int); #endif /* ! NFS4_USE_RPCCLNT */ +#endif int nfs_vinvalbuf(struct vnode *, int, struct thread *, int); int nfs_readrpc(struct vnode *, struct uio *, struct ucred *); @@ -302,11 +328,7 @@ int nfs_readdirrpc(struct vnode *, struc int nfs_nfsiodnew(void); int nfs_asyncio(struct nfsmount *, struct buf *, struct ucred *, struct thread *); int nfs_doio(struct vnode *, struct buf *, struct ucred *, struct thread *); -void nfs_doio_directwrite (struct buf *); -void nfs_up(struct nfsreq *, struct nfsmount *, struct thread *, - const char *, int); -void nfs_down(struct nfsreq *, struct nfsmount *, struct thread *, - const char *, int, int); +void nfs_doio_directwrite (struct buf *); int nfs_readlinkrpc(struct vnode *, struct uio *, struct ucred *); int nfs_sigintr(struct nfsmount *, struct nfsreq *, struct thread *); int nfs_readdirplusrpc(struct vnode *, struct uio *, struct ucred *); Copied: user/dfr/gssapi/6/sys/nfsclient/nfs_krpc.c (from r184588, head/sys/nfsclient/nfs_krpc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/dfr/gssapi/6/sys/nfsclient/nfs_krpc.c Mon Nov 10 16:23:24 2008 (r184813, copy of r184588, head/sys/nfsclient/nfs_krpc.c) @@ -0,0 +1,769 @@ +/*- + * Copyright (c) 1989, 1991, 1993, 1995 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Rick Macklem at The University of Guelph. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95 + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Socket operations for use by nfs + */ + +#include "opt_inet6.h" +#include "opt_kgssapi.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifndef NFS_LEGACYRPC + +static int nfs_realign_test; +static int nfs_realign_count; +static int nfs_bufpackets = 4; +static int nfs_reconnects; +static int nfs3_jukebox_delay = 10; +static int nfs_skip_wcc_data_onerr = 1; +static int fake_wchan; + +SYSCTL_DECL(_vfs_nfs); + +SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_test, CTLFLAG_RW, &nfs_realign_test, 0, + "Number of realign tests done"); +SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_count, CTLFLAG_RW, &nfs_realign_count, 0, + "Number of mbuf realignments done"); +SYSCTL_INT(_vfs_nfs, OID_AUTO, bufpackets, CTLFLAG_RW, &nfs_bufpackets, 0, + "Buffer reservation size 2 < x < 64"); +SYSCTL_INT(_vfs_nfs, OID_AUTO, reconnects, CTLFLAG_RD, &nfs_reconnects, 0, + "Number of times the nfs client has had to reconnect"); +SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs3_jukebox_delay, CTLFLAG_RW, &nfs3_jukebox_delay, 0, + "Number of seconds to delay a retry after receiving EJUKEBOX"); +SYSCTL_INT(_vfs_nfs, OID_AUTO, skip_wcc_data_onerr, CTLFLAG_RW, &nfs_skip_wcc_data_onerr, 0, + "Disable weak cache consistency checking when server returns an error"); + +static void nfs_down(struct nfsmount *, struct thread *, const char *, + int, int); +static void nfs_up(struct nfsmount *, struct thread *, const char *, + int, int); +static int nfs_msg(struct thread *, const char *, const char *, int); + +extern int nfsv2_procid[]; + +struct nfs_cached_auth { + int ca_refs; /* refcount, including 1 from the cache */ + uid_t ca_uid; /* uid that corresponds to this auth */ + AUTH *ca_auth; /* RPC auth handle */ +}; + +/* + * RTT estimator + */ + +static enum nfs_rto_timer_t nfs_proct[NFS_NPROCS] = { + NFS_DEFAULT_TIMER, /* NULL */ + NFS_GETATTR_TIMER, /* GETATTR */ + NFS_DEFAULT_TIMER, /* SETATTR */ + NFS_LOOKUP_TIMER, /* LOOKUP */ + NFS_GETATTR_TIMER, /* ACCESS */ + NFS_READ_TIMER, /* READLINK */ + NFS_READ_TIMER, /* READ */ + NFS_WRITE_TIMER, /* WRITE */ + NFS_DEFAULT_TIMER, /* CREATE */ + NFS_DEFAULT_TIMER, /* MKDIR */ + NFS_DEFAULT_TIMER, /* SYMLINK */ + NFS_DEFAULT_TIMER, /* MKNOD */ + NFS_DEFAULT_TIMER, /* REMOVE */ + NFS_DEFAULT_TIMER, /* RMDIR */ + NFS_DEFAULT_TIMER, /* RENAME */ + NFS_DEFAULT_TIMER, /* LINK */ + NFS_READ_TIMER, /* READDIR */ + NFS_READ_TIMER, /* READDIRPLUS */ + NFS_DEFAULT_TIMER, /* FSSTAT */ + NFS_DEFAULT_TIMER, /* FSINFO */ + NFS_DEFAULT_TIMER, /* PATHCONF */ + NFS_DEFAULT_TIMER, /* COMMIT */ + NFS_DEFAULT_TIMER, /* NOOP */ +}; + +/* + * Choose the correct RTT timer for this NFS procedure. + */ +static inline enum nfs_rto_timer_t +nfs_rto_timer(u_int32_t procnum) +{ + return nfs_proct[procnum]; +} + +/* + * Initialize the RTT estimator state for a new mount point. + */ +static void +nfs_init_rtt(struct nfsmount *nmp) +{ + int i; + + for (i = 0; i < NFS_MAX_TIMER; i++) { + nmp->nm_timers[i].rt_srtt = hz; + nmp->nm_timers[i].rt_deviate = 0; + nmp->nm_timers[i].rt_rtxcur = hz; + } +} + +/* + * Initialize sockets and congestion for a new NFS connection. + * We do not free the sockaddr if error. + */ +int +nfs_connect(struct nfsmount *nmp, struct nfsreq *rep) +{ + int rcvreserve, sndreserve; + int pktscale; + struct sockaddr *saddr; + struct ucred *origcred; + struct thread *td = curthread; + CLIENT *client; + struct netconfig *nconf; + rpcvers_t vers; + int one = 1, retries; + + /* + * We need to establish the socket using the credentials of + * the mountpoint. Some parts of this process (such as + * sobind() and soconnect()) will use the curent thread's + * credential instead of the socket credential. To work + * around this, temporarily change the current thread's + * credential to that of the mountpoint. + * + * XXX: It would be better to explicitly pass the correct + * credential to sobind() and soconnect(). + */ + origcred = td->td_ucred; + td->td_ucred = nmp->nm_mountp->mnt_cred; + saddr = nmp->nm_nam; + + vers = NFS_VER2; + if (nmp->nm_flag & NFSMNT_NFSV3) + vers = NFS_VER3; + else if (nmp->nm_flag & NFSMNT_NFSV4) + vers = NFS_VER4; + if (saddr->sa_family == AF_INET) + if (nmp->nm_sotype == SOCK_DGRAM) + nconf = getnetconfigent("udp"); + else + nconf = getnetconfigent("tcp"); + else + if (nmp->nm_sotype == SOCK_DGRAM) + nconf = getnetconfigent("udp6"); + else + nconf = getnetconfigent("tcp6"); + + /* + * Get buffer reservation size from sysctl, but impose reasonable + * limits. + */ + pktscale = nfs_bufpackets; + if (pktscale < 2) + pktscale = 2; + if (pktscale > 64) + pktscale = 64; + mtx_lock(&nmp->nm_mtx); + if (nmp->nm_sotype == SOCK_DGRAM) { + sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR) * pktscale; + rcvreserve = (max(nmp->nm_rsize, nmp->nm_readdirsize) + + NFS_MAXPKTHDR) * pktscale; + } else if (nmp->nm_sotype == SOCK_SEQPACKET) { + sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR) * pktscale; + rcvreserve = (max(nmp->nm_rsize, nmp->nm_readdirsize) + + NFS_MAXPKTHDR) * pktscale; + } else { + if (nmp->nm_sotype != SOCK_STREAM) + panic("nfscon sotype"); + sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR + + sizeof (u_int32_t)) * pktscale; + rcvreserve = (nmp->nm_rsize + NFS_MAXPKTHDR + + sizeof (u_int32_t)) * pktscale; + } + mtx_unlock(&nmp->nm_mtx); + + client = clnt_reconnect_create(nconf, saddr, NFS_PROG, vers, + sndreserve, rcvreserve); + CLNT_CONTROL(client, CLSET_WAITCHAN, "nfsreq"); + if (nmp->nm_flag & NFSMNT_INT) + CLNT_CONTROL(client, CLSET_INTERRUPTIBLE, &one); + if (nmp->nm_flag & NFSMNT_RESVPORT) + CLNT_CONTROL(client, CLSET_PRIVPORT, &one); + if (nmp->nm_flag & NFSMNT_SOFT) + retries = nmp->nm_retry; + else + retries = INT_MAX; + CLNT_CONTROL(client, CLSET_RETRIES, &retries); + + mtx_lock(&nmp->nm_mtx); + if (nmp->nm_client) { + /* + * Someone else already connected. + */ + CLNT_RELEASE(client); + } else { + nmp->nm_client = client; + } + + /* + * Protocols that do not require connections may be optionally left + * unconnected for servers that reply from a port other than NFS_PORT. + */ + if (!(nmp->nm_flag & NFSMNT_NOCONN)) { + mtx_unlock(&nmp->nm_mtx); + CLNT_CONTROL(client, CLSET_CONNECT, &one); + } else { + mtx_unlock(&nmp->nm_mtx); + } + + /* Restore current thread's credentials. */ + td->td_ucred = origcred; + + mtx_lock(&nmp->nm_mtx); + /* Initialize other non-zero congestion variables */ + nfs_init_rtt(nmp); + mtx_unlock(&nmp->nm_mtx); + return (0); +} + +/* + * NFS disconnect. Clean up and unlink. + */ +void +nfs_disconnect(struct nfsmount *nmp) +{ + CLIENT *client; + + mtx_lock(&nmp->nm_mtx); + if (nmp->nm_client) { + client = nmp->nm_client; + nmp->nm_client = NULL; + mtx_unlock(&nmp->nm_mtx); +#ifdef KGSSAPI + rpc_gss_secpurge(client); +#endif + CLNT_CLOSE(client); + CLNT_RELEASE(client); + } else { + mtx_unlock(&nmp->nm_mtx); + } +} + +void +nfs_safedisconnect(struct nfsmount *nmp) +{ + + nfs_disconnect(nmp); +} + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Mon Nov 10 16:37:03 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 883481065686; Mon, 10 Nov 2008 16:37:03 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7292A8FC1E; Mon, 10 Nov 2008 16:37:03 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAAGb3GR074715; Mon, 10 Nov 2008 16:37:03 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAAGb39Q074711; Mon, 10 Nov 2008 16:37:03 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200811101637.mAAGb39Q074711@svn.freebsd.org> From: Doug Rabson Date: Mon, 10 Nov 2008 16:37:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184814 - in user/dfr/gssapi/6/usr.sbin: . adduser cdcontrol config cron freebsd-update gssd mountd newsyslog nfsd ntp ntp/doc pkg_install portsnap pw rpc.lockd rpc.statd sysinstall sys... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 16:37:03 -0000 Author: dfr Date: Mon Nov 10 16:37:03 2008 New Revision: 184814 URL: http://svn.freebsd.org/changeset/base/184814 Log: MFC: 184588 Added: user/dfr/gssapi/6/usr.sbin/gssd/ - copied from r184588, head/usr.sbin/gssd/ Modified: user/dfr/gssapi/6/usr.sbin/ (props changed) user/dfr/gssapi/6/usr.sbin/Makefile user/dfr/gssapi/6/usr.sbin/adduser/ (props changed) user/dfr/gssapi/6/usr.sbin/cdcontrol/ (props changed) user/dfr/gssapi/6/usr.sbin/config/ (props changed) user/dfr/gssapi/6/usr.sbin/cron/ (props changed) user/dfr/gssapi/6/usr.sbin/freebsd-update/ (props changed) user/dfr/gssapi/6/usr.sbin/mountd/ (props changed) user/dfr/gssapi/6/usr.sbin/mountd/exports.5 user/dfr/gssapi/6/usr.sbin/mountd/mountd.c user/dfr/gssapi/6/usr.sbin/newsyslog/newsyslog.conf.5 (props changed) user/dfr/gssapi/6/usr.sbin/nfsd/nfsd.c user/dfr/gssapi/6/usr.sbin/ntp/ (props changed) user/dfr/gssapi/6/usr.sbin/ntp/doc/ (props changed) user/dfr/gssapi/6/usr.sbin/pkg_install/ (props changed) user/dfr/gssapi/6/usr.sbin/portsnap/ (props changed) user/dfr/gssapi/6/usr.sbin/pw/ (props changed) user/dfr/gssapi/6/usr.sbin/rpc.lockd/ (props changed) user/dfr/gssapi/6/usr.sbin/rpc.statd/ (props changed) user/dfr/gssapi/6/usr.sbin/sysinstall/ (props changed) user/dfr/gssapi/6/usr.sbin/syslogd/ (props changed) user/dfr/gssapi/6/usr.sbin/tzsetup/ (props changed) Modified: user/dfr/gssapi/6/usr.sbin/Makefile ============================================================================== --- user/dfr/gssapi/6/usr.sbin/Makefile Mon Nov 10 16:23:24 2008 (r184813) +++ user/dfr/gssapi/6/usr.sbin/Makefile Mon Nov 10 16:37:03 2008 (r184814) @@ -62,6 +62,7 @@ SUBDIR= ac \ getpmac \ gstat \ ${_i4b} \ + ${_gssd} \ ifmcstat \ inetd \ iostat \ @@ -235,6 +236,10 @@ _bluetooth= bluetooth _keyserv= keyserv .endif +.if ${MK_GSSAPI} != no +_gssd= gssd +.endif + .if !defined(NO_INET6) _mld6query= mld6query _rip6query= rip6query Modified: user/dfr/gssapi/6/usr.sbin/mountd/exports.5 ============================================================================== --- user/dfr/gssapi/6/usr.sbin/mountd/exports.5 Mon Nov 10 16:23:24 2008 (r184813) +++ user/dfr/gssapi/6/usr.sbin/mountd/exports.5 Mon Nov 10 16:37:03 2008 (r184814) @@ -149,6 +149,17 @@ option is given, all users (including root) will be mapped to that credential in place of their own. .Pp +.Sm off +.Fl sec Li = Sy flavor1:flavor2... +.Sm on +specifies a colon separated list of acceptable security flavors to be +used for remote access. +Supported security flavors are sys, krb5, krb5i and krb5p. +If multiple flavors are listed, they should be ordered with the most +preferred flavor first. +If this option is not present, +the default security flavor list of just sys is used. +.Pp The .Fl ro option specifies that the file system should be exported read-only @@ -305,6 +316,8 @@ the default remote mount-point file /u2 -maproot=root friends /u2 -alldirs -network cis-net -mask cis-mask /cdrom -alldirs,quiet,ro -network 192.168.33.0 -mask 255.255.255.0 +/private -sec=krb5i +/secret -sec=krb5p .Ed .Pp Given that @@ -411,6 +424,15 @@ While there is no CD-ROM medium mounted it would export the (normally empty) directory .Pa /cdrom of the root file system instead. +.Pp +The file system rooted at +.Pa /private +will be exported using Kerberos 5 authentication and will require +integrity protected messages for all accesses. +The file system rooted at +.Pa /secret +will also be exported using Kerberos 5 authentication and all messages +used to access it will be encrypted. .Sh SEE ALSO .Xr netgroup 5 , .Xr mountd 8 , Modified: user/dfr/gssapi/6/usr.sbin/mountd/mountd.c ============================================================================== --- user/dfr/gssapi/6/usr.sbin/mountd/mountd.c Mon Nov 10 16:23:24 2008 (r184813) +++ user/dfr/gssapi/6/usr.sbin/mountd/mountd.c Mon Nov 10 16:37:03 2008 (r184814) @@ -113,6 +113,8 @@ struct exportlist { fsid_t ex_fs; char *ex_fsdir; char *ex_indexfile; + int ex_numsecflavors; + int ex_secflavors[MAXSECFLAVORS]; }; /* ex_flag bits */ #define EX_LINKED 0x1 @@ -150,6 +152,8 @@ struct fhreturn { int fhr_flag; int fhr_vers; nfsfh_t fhr_fh; + int fhr_numsecflavors; + int *fhr_secflavors; }; /* Global defs */ @@ -239,6 +243,7 @@ struct pidfh *pfh = NULL; #define OP_HAVEMASK 0x80 /* A mask was specified or inferred. */ #define OP_QUIET 0x100 #define OP_MASKLEN 0x200 +#define OP_SEC 0x400 #ifdef DEBUG int debug = 1; @@ -817,6 +822,8 @@ mntsrv(rqstp, transp) sigprocmask(SIG_UNBLOCK, &sighup_mask, NULL); return; } + fhr.fhr_numsecflavors = ep->ex_numsecflavors; + fhr.fhr_secflavors = ep->ex_secflavors; if (!svc_sendreply(transp, (xdrproc_t)xdr_fhs, (caddr_t)&fhr)) syslog(LOG_ERR, "can't send reply"); @@ -934,6 +941,7 @@ xdr_fhs(xdrsp, cp) { struct fhreturn *fhrp = (struct fhreturn *)cp; u_long ok = 0, len, auth; + int i; if (!xdr_long(xdrsp, &ok)) return (0); @@ -946,11 +954,20 @@ xdr_fhs(xdrsp, cp) return (0); if (!xdr_opaque(xdrsp, (caddr_t)&fhrp->fhr_fh, len)) return (0); - auth = RPCAUTH_UNIX; - len = 1; - if (!xdr_long(xdrsp, &len)) - return (0); - return (xdr_long(xdrsp, &auth)); + if (fhrp->fhr_numsecflavors) { + if (!xdr_int(xdrsp, &fhrp->fhr_numsecflavors)) + return (0); + for (i = 0; i < fhrp->fhr_numsecflavors; i++) + if (!xdr_int(xdrsp, &fhrp->fhr_secflavors[i])) + return (0); + return (1); + } else { + auth = AUTH_SYS; + len = 1; + if (!xdr_long(xdrsp, &len)) + return (0); + return (xdr_long(xdrsp, &auth)); + } }; return (0); } @@ -1744,6 +1761,57 @@ free_dir(dp) } /* + * Parse a colon separated list of security flavors + */ +int +parsesec(seclist, ep) + char *seclist; + struct exportlist *ep; +{ + char *cp, savedc; + int flavor; + + ep->ex_numsecflavors = 0; + for (;;) { + cp = strchr(seclist, ':'); + if (cp) { + savedc = *cp; + *cp = '\0'; + } + + if (!strcmp(seclist, "sys")) + flavor = AUTH_SYS; + else if (!strcmp(seclist, "krb5")) + flavor = RPCSEC_GSS_KRB5; + else if (!strcmp(seclist, "krb5i")) + flavor = RPCSEC_GSS_KRB5I; + else if (!strcmp(seclist, "krb5p")) + flavor = RPCSEC_GSS_KRB5P; + else { + if (cp) + *cp = savedc; + syslog(LOG_ERR, "bad sec flavor: %s", seclist); + return (1); + } + if (ep->ex_numsecflavors == MAXSECFLAVORS) { + if (cp) + *cp = savedc; + syslog(LOG_ERR, "too many sec flavors: %s", seclist); + return (1); + } + ep->ex_secflavors[ep->ex_numsecflavors] = flavor; + ep->ex_numsecflavors++; + if (cp) { + *cp = savedc; + seclist = cp + 1; + } else { + break; + } + } + return (0); +} + +/* * Parse the option string and update fields. * Option arguments may either be -