From mjacob at FreeBSD.org Sat Aug 1 00:57:35 2009 From: mjacob at FreeBSD.org (Matt Jacob) Date: Sat Aug 1 00:57:51 2009 Subject: svn commit: r196007 - in head/sys: dev/ispfw modules/ispfw modules/ispfw/isp_2400_multi modules/ispfw/isp_2500 modules/ispfw/isp_2500_multi Message-ID: <200908010057.n710vYjb085713@svn.freebsd.org> Author: mjacob Date: Sat Aug 1 00:57:34 2009 New Revision: 196007 URL: http://svn.freebsd.org/changeset/base/196007 Log: Add 8Gb card firmware. Update some 2Gb and 4Gb f/w sets. Split 4Gb and 8Gb into pieces that can be either multi_id capable or not. Reviewed by: scottl, ken Approved by: re Added: head/sys/dev/ispfw/asm_2500.h (contents, props changed) head/sys/modules/ispfw/isp_2400_multi/ head/sys/modules/ispfw/isp_2400_multi/Makefile (contents, props changed) head/sys/modules/ispfw/isp_2500/ head/sys/modules/ispfw/isp_2500/Makefile (contents, props changed) head/sys/modules/ispfw/isp_2500_multi/ head/sys/modules/ispfw/isp_2500_multi/Makefile (contents, props changed) Modified: head/sys/dev/ispfw/asm_2300.h head/sys/dev/ispfw/asm_2400.h head/sys/dev/ispfw/ispfw.c head/sys/modules/ispfw/Makefile Modified: head/sys/dev/ispfw/asm_2300.h ============================================================================== --- head/sys/dev/ispfw/asm_2300.h Fri Jul 31 20:32:55 2009 (r196006) +++ head/sys/dev/ispfw/asm_2300.h Sat Aug 1 00:57:34 2009 (r196007) @@ -29,21 +29,19 @@ * * * --- ISP2300 Initiator/Target Firmware --- * * with Fabric support (Public Loop), with expanded LUN * - * addressing and 2K port logins. * + * addressing and 2K port logins. * * * - ************************************************************************ - */ + ************************************************************************/ /* - * Firmware Version 3.03.19 (09:41 Nov 30, 2005) + * Firmware Version 3.03.26 (16:54 Aug 14, 2007) */ - -static const u_int16_t isp_2300_risc_code[] = { - 0x0470, 0x0000, 0x0000, 0xcd3b, 0x0000, 0x0003, 0x0003, 0x0013, +static const uint16_t isp_2300_risc_code[] = { + 0x0470, 0x0000, 0x0000, 0xd048, 0x0000, 0x0003, 0x0003, 0x001a, 0x0107, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, 0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972, 0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030, - 0x332e, 0x3033, 0x2e31, 0x3920, 0x2020, 0x2020, 0x2400, 0x20a9, + 0x332e, 0x3033, 0x2e32, 0x3620, 0x2020, 0x2020, 0x2400, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x0000, @@ -52,2670 +50,2711 @@ static const u_int16_t isp_2300_risc_cod 0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001, 0x0000, 0x20c1, 0x0004, 0x20c9, 0x1bff, 0x2059, 0x0000, 0x2b78, - 0x7883, 0x0004, 0x2089, 0x2b8d, 0x2051, 0x1800, 0x2a70, 0x20e1, - 0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e5f, 0x2029, + 0x7883, 0x0004, 0x2089, 0x2bf2, 0x2051, 0x1800, 0x2a70, 0x20e1, + 0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e53, 0x2029, 0x3500, 0x2031, 0xffff, 0x2039, 0x34c8, 0x2021, 0x0200, 0x20e9, 0x0001, 0x20a1, 0x0000, 0x20a9, 0x0800, 0x900e, 0x4104, 0x20e9, 0x0001, 0x20a1, 0x1000, 0x900e, 0x2001, 0x0cc0, 0x9084, 0x0fff, 0x20a8, 0x4104, 0x2001, 0x0000, 0x9086, 0x0000, 0x0120, 0x21a8, 0x4104, 0x8001, 0x1de0, 0x756a, 0x766e, 0x7766, 0x7472, 0x7476, - 0x00e6, 0x2071, 0x1a9d, 0x2472, 0x00ee, 0x20a1, 0x1cc8, 0x716c, + 0x00e6, 0x2071, 0x1aa0, 0x2472, 0x00ee, 0x20a1, 0x1cc8, 0x716c, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x000f, 0x2001, 0x0001, 0x9112, 0x900e, 0x21a8, 0x4104, 0x8211, 0x1de0, 0x716c, 0x3400, 0x8001, 0x9102, 0x0120, 0x0218, 0x20a8, 0x900e, 0x4104, 0x2009, 0x1800, 0x810d, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x001f, 0x2001, 0x0001, 0x9112, 0x20e9, 0x0001, 0x20a1, 0x0800, 0x900e, - 0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x0f25, 0x080c, - 0x5dbc, 0x080c, 0x9c9e, 0x080c, 0x10dc, 0x080c, 0x12c1, 0x080c, - 0x1a82, 0x080c, 0x0d65, 0x080c, 0x1061, 0x080c, 0x3267, 0x080c, - 0x747e, 0x080c, 0x66c3, 0x080c, 0x80b6, 0x080c, 0x2345, 0x080c, - 0x839c, 0x080c, 0x7ae7, 0x080c, 0x217a, 0x080c, 0x22ae, 0x080c, - 0x233a, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004, 0x091d, 0x7880, + 0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x0f19, 0x080c, + 0x5f04, 0x080c, 0x9eae, 0x080c, 0x10d0, 0x080c, 0x12b8, 0x080c, + 0x1a99, 0x080c, 0x0d58, 0x080c, 0x1055, 0x080c, 0x32cc, 0x080c, + 0x75f0, 0x080c, 0x6836, 0x080c, 0x8273, 0x080c, 0x235c, 0x080c, + 0x857b, 0x080c, 0x7c59, 0x080c, 0x2191, 0x080c, 0x22c5, 0x080c, + 0x2351, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004, 0x091d, 0x7880, 0x9086, 0x0002, 0x1190, 0x7883, 0x4000, 0x7837, 0x4000, 0x7833, 0x0010, 0x0e04, 0x0911, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, - 0x0089, 0x2004, 0xd084, 0x190c, 0x11a9, 0x2071, 0x1800, 0x7003, + 0x0089, 0x2004, 0xd084, 0x190c, 0x119d, 0x2071, 0x1800, 0x7003, 0x0000, 0x2071, 0x1800, 0x7000, 0x908e, 0x0003, 0x1168, 0x080c, - 0x4a50, 0x080c, 0x328e, 0x080c, 0x74ef, 0x080c, 0x6be9, 0x080c, - 0x80e2, 0x080c, 0x2ad7, 0x0c68, 0x000b, 0x0c88, 0x0940, 0x0941, - 0x0ae3, 0x093e, 0x0baa, 0x0d64, 0x0d64, 0x0d64, 0x080c, 0x0dd1, + 0x4b82, 0x080c, 0x32f3, 0x080c, 0x7661, 0x080c, 0x6d5c, 0x080c, + 0x829f, 0x080c, 0x2b09, 0x0c68, 0x000b, 0x0c88, 0x0940, 0x0941, + 0x0ade, 0x093e, 0x0b9e, 0x0d57, 0x0d57, 0x0d57, 0x080c, 0x0dc4, 0x0005, 0x0126, 0x00f6, 0x2091, 0x8000, 0x7000, 0x9086, 0x0001, - 0x1904, 0x0ab6, 0x080c, 0x5469, 0x1130, 0x0026, 0x2011, 0x0080, - 0x080c, 0x0eed, 0x002e, 0x080c, 0x7173, 0x0150, 0x080c, 0x7196, - 0x15a0, 0x2079, 0x0100, 0x7828, 0x9085, 0x1800, 0x782a, 0x0468, - 0x080c, 0x709f, 0x7000, 0x9086, 0x0001, 0x1904, 0x0ab6, 0x7094, - 0x9086, 0x0029, 0x1904, 0x0ab6, 0x080c, 0x809f, 0x080c, 0x8091, - 0x2001, 0x0161, 0x2003, 0x0001, 0x2079, 0x0100, 0x7827, 0xffff, - 0x7a28, 0x9295, 0x5e2f, 0x7a2a, 0x2011, 0x7003, 0x080c, 0x81a1, - 0x2011, 0x6ff6, 0x080c, 0x826d, 0x2011, 0x5c17, 0x080c, 0x81a1, - 0x2011, 0x8030, 0x901e, 0x7392, 0x04d0, 0x080c, 0x54c4, 0x2079, - 0x0100, 0x7844, 0x9005, 0x1904, 0x0ab6, 0x2011, 0x5c17, 0x080c, - 0x81a1, 0x2011, 0x7003, 0x080c, 0x81a1, 0x2011, 0x6ff6, 0x080c, - 0x826d, 0x2001, 0x0265, 0x2001, 0x0205, 0x2003, 0x0000, 0x7840, - 0x9084, 0xfffb, 0x7842, 0x2001, 0x1980, 0x2004, 0x9005, 0x1140, - 0x00c6, 0x2061, 0x0100, 0x080c, 0x5d64, 0x00ce, 0x0804, 0x0ab6, - 0x780f, 0x006b, 0x7a28, 0x080c, 0x717b, 0x0118, 0x9295, 0x5e2f, - 0x0010, 0x9295, 0x402f, 0x7a2a, 0x2011, 0x8010, 0x73d4, 0x2001, - 0x1981, 0x2003, 0x0001, 0x080c, 0x297c, 0x080c, 0x498b, 0x7244, - 0xc284, 0x7246, 0x2001, 0x180c, 0x200c, 0xc1ac, 0xc1cc, 0x2102, - 0x080c, 0x96d5, 0x2011, 0x0004, 0x080c, 0xb6b7, 0x080c, 0x64f6, - 0x080c, 0x7173, 0x1120, 0x080c, 0x29c0, 0x02e0, 0x0400, 0x080c, - 0x5d6b, 0x0140, 0x7093, 0x0001, 0x70cf, 0x0000, 0x080c, 0x5691, - 0x0804, 0x0ab6, 0x080c, 0x545a, 0xd094, 0x0188, 0x2011, 0x180c, - 0x2204, 0xc0cd, 0x2012, 0x080c, 0x545e, 0xd0d4, 0x1118, 0x080c, - 0x29c0, 0x1270, 0x2011, 0x180c, 0x2204, 0xc0bc, 0x00a8, 0x080c, - 0x545e, 0xd0d4, 0x1db8, 0x2011, 0x180c, 0x2204, 0xc0bd, 0x0060, - 0x2011, 0x180c, 0x2204, 0xc0bd, 0x2012, 0x080c, 0x65e2, 0x1128, - 0xd0a4, 0x0118, 0x2204, 0xc0fd, 0x2012, 0x080c, 0x65a8, 0x0120, - 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8, 0x707b, 0x0000, 0x080c, 0x7173, - 0x1130, 0x70ac, 0x9005, 0x1168, 0x080c, 0xb9d1, 0x0050, 0x080c, - 0xb9d1, 0x70d8, 0xd09c, 0x1128, 0x70ac, 0x9005, 0x0110, 0x080c, - 0x5d41, 0x70e3, 0x0000, 0x70df, 0x0000, 0x70a3, 0x0000, 0x080c, - 0x29c8, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c4, 0x2012, 0x72d8, - 0x080c, 0x7173, 0x1178, 0x9016, 0x0016, 0x080c, 0x2785, 0x2019, - 0x1947, 0x211a, 0x001e, 0x705b, 0xffff, 0x705f, 0x00ef, 0x707f, - 0x0000, 0x0020, 0x2019, 0x1947, 0x201b, 0x0000, 0x2079, 0x185b, - 0x7804, 0xd0ac, 0x0108, 0xc295, 0x72da, 0x080c, 0x7173, 0x0118, - 0x9296, 0x0004, 0x0548, 0x2011, 0x0001, 0x080c, 0xb6b7, 0x70a7, - 0x0000, 0x70ab, 0xffff, 0x7003, 0x0002, 0x2079, 0x0100, 0x7827, - 0x0003, 0x7828, 0x9085, 0x0003, 0x782a, 0x00fe, 0x080c, 0x2dfa, - 0x2011, 0x0005, 0x080c, 0x97e0, 0x080c, 0x8a56, 0x080c, 0x7173, - 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x2785, 0x61e2, - 0x001e, 0x00ce, 0x012e, 0x0420, 0x70a7, 0x0000, 0x70ab, 0xffff, - 0x7003, 0x0002, 0x00f6, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, - 0x9085, 0x0003, 0x782a, 0x00fe, 0x2011, 0x0005, 0x080c, 0x97e0, - 0x080c, 0x8a56, 0x080c, 0x7173, 0x0148, 0x00c6, 0x2061, 0x0100, - 0x0016, 0x080c, 0x2785, 0x61e2, 0x001e, 0x00ce, 0x00fe, 0x012e, - 0x0005, 0x00c6, 0x00b6, 0x080c, 0x7173, 0x1118, 0x20a9, 0x0800, - 0x0010, 0x20a9, 0x0782, 0x080c, 0x7173, 0x1110, 0x900e, 0x0010, - 0x2009, 0x007e, 0x86ff, 0x0138, 0x9180, 0x1000, 0x2004, 0x905d, - 0x0110, 0xb800, 0xd0bc, 0x090c, 0x30fd, 0x8108, 0x1f04, 0x0aca, - 0x707b, 0x0000, 0x707c, 0x9084, 0x00ff, 0x707e, 0x70af, 0x0000, - 0x00be, 0x00ce, 0x0005, 0x00b6, 0x0126, 0x2091, 0x8000, 0x7000, - 0x9086, 0x0002, 0x1904, 0x0ba7, 0x70a8, 0x9086, 0xffff, 0x0130, - 0x080c, 0x2dfa, 0x080c, 0x8a56, 0x0804, 0x0ba7, 0x70d8, 0xd0ac, - 0x1110, 0xd09c, 0x0558, 0xd084, 0x0548, 0x0006, 0x2001, 0x0103, - 0x2003, 0x002b, 0x000e, 0xd08c, 0x0508, 0x080c, 0x3160, 0x11d0, - 0x70dc, 0x9086, 0xffff, 0x01b0, 0x080c, 0x2f73, 0x080c, 0x8a56, - 0x70d8, 0xd094, 0x1904, 0x0ba7, 0x2011, 0x0001, 0x080c, 0xbc4c, - 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x2fad, 0x080c, 0x8a56, - 0x0804, 0x0ba7, 0x70e0, 0x9005, 0x1904, 0x0ba7, 0x70a4, 0x9005, - 0x1904, 0x0ba7, 0x70d8, 0xd0a4, 0x0118, 0xd0b4, 0x0904, 0x0ba7, - 0x080c, 0x65a8, 0x1904, 0x0ba7, 0x080c, 0x65fb, 0x1904, 0x0ba7, - 0x080c, 0x65e2, 0x01c0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e, - 0x0016, 0x080c, 0x62f0, 0x1118, 0xb800, 0xd0ec, 0x1138, 0x001e, - 0x8108, 0x1f04, 0x0b40, 0x00ce, 0x015e, 0x0028, 0x001e, 0x00ce, - 0x015e, 0x0804, 0x0ba7, 0x0006, 0x2001, 0x0103, 0x2003, 0x006b, - 0x000e, 0x2011, 0x198d, 0x080c, 0x0f95, 0x2011, 0x19a7, 0x080c, - 0x0f95, 0x7030, 0xc08c, 0x7032, 0x7003, 0x0003, 0x70ab, 0xffff, - 0x080c, 0x5469, 0x1130, 0x0026, 0x2011, 0x0040, 0x080c, 0x0eed, - 0x002e, 0x9006, 0x080c, 0x261a, 0x080c, 0x3160, 0x0118, 0x080c, - 0x4b28, 0x0050, 0x0036, 0x0046, 0x2019, 0xffff, 0x2021, 0x0006, - 0x080c, 0x4b42, 0x004e, 0x003e, 0x00f6, 0x2079, 0x0100, 0x080c, - 0x7196, 0x0150, 0x080c, 0x7173, 0x7828, 0x0118, 0x9084, 0xe1ff, - 0x0010, 0x9084, 0xffdf, 0x782a, 0x00fe, 0x2001, 0x19c2, 0x2004, - 0x9086, 0x0005, 0x1120, 0x2011, 0x0000, 0x080c, 0x97e0, 0x2011, - 0x0000, 0x080c, 0x97ea, 0x080c, 0x8a56, 0x080c, 0x8b2d, 0x012e, - 0x00be, 0x0005, 0x0016, 0x0046, 0x00f6, 0x0126, 0x2091, 0x8000, - 0x2079, 0x0100, 0x7904, 0x918c, 0xfffd, 0x7906, 0x2009, 0x00f7, - 0x080c, 0x5d2a, 0x7940, 0x918c, 0x0010, 0x7942, 0x7924, 0xd1b4, - 0x0110, 0x7827, 0x0040, 0xd19c, 0x0110, 0x7827, 0x0008, 0x0006, - 0x0036, 0x0156, 0x7954, 0xd1ac, 0x1904, 0x0c37, 0x2001, 0x1981, - 0x2004, 0x9005, 0x1518, 0x080c, 0x2a43, 0x1148, 0x2001, 0x0001, - 0x080c, 0x29ab, 0x2001, 0x0001, 0x080c, 0x298e, 0x00b8, 0x080c, - 0x2a4b, 0x1138, 0x9006, 0x080c, 0x29ab, 0x9006, 0x080c, 0x298e, - 0x0068, 0x080c, 0x2a53, 0x1d50, 0x2001, 0x1971, 0x2004, 0xd0fc, - 0x0108, 0x0020, 0x080c, 0x27b9, 0x0804, 0x0d16, 0x080c, 0x7184, - 0x0148, 0x080c, 0x7196, 0x1118, 0x080c, 0x7479, 0x0050, 0x080c, - 0x717b, 0x0dd0, 0x080c, 0x7474, 0x080c, 0x746a, 0x080c, 0x709f, - 0x0058, 0x080c, 0x7173, 0x0140, 0x2009, 0x00f8, 0x080c, 0x5d2a, - 0x7843, 0x0090, 0x7843, 0x0010, 0x20a9, 0x09c4, 0x7820, 0xd09c, - 0x1138, 0x080c, 0x7173, 0x0138, 0x7824, 0xd0ac, 0x1904, 0x0d1b, - 0x1f04, 0x0c16, 0x0070, 0x7824, 0x080c, 0x718d, 0x0118, 0xd0ac, - 0x1904, 0x0d1b, 0x9084, 0x1800, 0x0d98, 0x7003, 0x0001, 0x0804, - 0x0d1b, 0x2001, 0x0001, 0x080c, 0x261a, 0x0804, 0x0d2e, 0x2001, - 0x1981, 0x2004, 0x9005, 0x1518, 0x080c, 0x2a43, 0x1148, 0x2001, - 0x0001, 0x080c, 0x29ab, 0x2001, 0x0001, 0x080c, 0x298e, 0x00b8, - 0x080c, 0x2a4b, 0x1138, 0x9006, 0x080c, 0x29ab, 0x9006, 0x080c, - 0x298e, 0x0068, 0x080c, 0x2a53, 0x1d50, 0x2001, 0x1971, 0x2004, - 0xd0fc, 0x0108, 0x0020, 0x080c, 0x27b9, 0x0804, 0x0d16, 0x7850, - 0x9085, 0x0040, 0x7852, 0x7938, 0x7850, 0x9084, 0xfbcf, 0x7852, - 0x080c, 0x2a5b, 0x9085, 0x2000, 0x7852, 0x793a, 0x20a9, 0x0046, - 0x1d04, 0x0c70, 0x080c, 0x824d, 0x1f04, 0x0c70, 0x7850, 0x9085, - 0x0400, 0x9084, 0xdfbf, 0x7852, 0x793a, 0x080c, 0x7184, 0x0148, - 0x080c, 0x7196, 0x1118, 0x080c, 0x7479, 0x0050, 0x080c, 0x717b, - 0x0dd0, 0x080c, 0x7474, 0x080c, 0x746a, 0x080c, 0x709f, 0x0020, - 0x2009, 0x00f8, 0x080c, 0x5d2a, 0x20a9, 0x0028, 0xa001, 0x1f04, - 0x0c96, 0x7850, 0x9085, 0x1400, 0x7852, 0x080c, 0x7173, 0x0120, - 0x7843, 0x0090, 0x7843, 0x0010, 0x2021, 0xe678, 0x2019, 0xea60, - 0x0d0c, 0x824d, 0x7820, 0xd09c, 0x1580, 0x080c, 0x7173, 0x0904, - 0x0cfb, 0x7824, 0xd0ac, 0x1904, 0x0d1b, 0x080c, 0x7196, 0x1528, - 0x0046, 0x2021, 0x0320, 0x8421, 0x1df0, 0x004e, 0x7827, 0x1800, - 0x080c, 0x2a5b, 0x7824, 0x9084, 0x1800, 0x1160, 0x9484, 0x0fff, - 0x1138, 0x2001, 0x1810, 0x2004, 0xd0fc, 0x0110, 0x080c, 0x0d41, - 0x8421, 0x1158, 0x1d04, 0x0cd6, 0x080c, 0x824d, 0x080c, 0x7474, - 0x080c, 0x746a, 0x7003, 0x0001, 0x04f0, 0x8319, 0x1948, 0x1d04, - 0x0ce3, 0x080c, 0x824d, 0x2009, 0x1974, 0x2104, 0x9005, 0x0118, - 0x8001, 0x200a, 0x1178, 0x200b, 0x000a, 0x7827, 0x0048, 0x20a9, - 0x0002, 0x080c, 0x2a3c, 0x7924, 0x080c, 0x2a5b, 0xd19c, 0x0110, - 0x080c, 0x297c, 0x00d8, 0x080c, 0x7184, 0x1140, 0x94a2, 0x03e8, - 0x1128, 0x080c, 0x714b, 0x7003, 0x0001, 0x00a8, 0x7827, 0x1800, - 0x080c, 0x2a5b, 0x7824, 0x080c, 0x718d, 0x0110, 0xd0ac, 0x1158, - 0x9084, 0x1800, 0x0950, 0x7003, 0x0001, 0x0028, 0x2001, 0x0001, - 0x080c, 0x261a, 0x0078, 0x2009, 0x180c, 0x210c, 0xd19c, 0x1120, - 0x7904, 0x918d, 0x0002, 0x7906, 0x7827, 0x0048, 0x7828, 0x9085, - 0x0028, 0x782a, 0x7850, 0x9085, 0x0400, 0x7852, 0x2001, 0x1981, - 0x2003, 0x0000, 0x9006, 0x78f2, 0x015e, 0x003e, 0x000e, 0x080c, - 0x5469, 0x1110, 0x080c, 0x0e70, 0x012e, 0x00fe, 0x004e, 0x001e, - 0x0005, 0x0006, 0x0016, 0x0036, 0x0046, 0x00b6, 0x00c6, 0x00d6, - 0x00e6, 0x00f6, 0x0156, 0x0069, 0x0d0c, 0x824d, 0x015e, 0x00fe, - 0x00ee, 0x00de, 0x00ce, 0x00be, 0x004e, 0x003e, 0x001e, 0x000e, - 0x0005, 0x00e6, 0x2071, 0x189c, 0x7004, 0x9086, 0x0001, 0x1110, - 0x080c, 0x328e, 0x00ee, 0x0005, 0x0005, 0x2a70, 0x2061, 0x1985, - 0x2063, 0x0003, 0x6007, 0x0003, 0x600b, 0x0013, 0x600f, 0x0107, - 0x2001, 0x1956, 0x900e, 0x2102, 0x7192, 0x2001, 0x0100, 0x2004, - 0x9082, 0x0002, 0x0218, 0x705b, 0xffff, 0x0008, 0x715a, 0x7063, - 0xffff, 0x717a, 0x717e, 0x080c, 0xb9d1, 0x2061, 0x1946, 0x6003, - 0x0909, 0x6106, 0x600b, 0x8800, 0x600f, 0x0200, 0x6013, 0x00ff, - 0x6017, 0x000f, 0x611a, 0x601f, 0x07d0, 0x2061, 0x194e, 0x6003, - 0x8000, 0x6106, 0x610a, 0x600f, 0x0200, 0x6013, 0x00ff, 0x6116, - 0x601b, 0x0001, 0x611e, 0x2061, 0x1962, 0x6003, 0x514c, 0x6007, - 0x4f47, 0x600b, 0x4943, 0x600f, 0x2020, 0x2001, 0x182b, 0x2102, - 0x0005, 0x9016, 0x080c, 0x62f0, 0x1178, 0xb804, 0x90c4, 0x00ff, - 0x98c6, 0x0006, 0x0128, 0x90c4, 0xff00, 0x98c6, 0x0600, 0x1120, - 0x9186, 0x0080, 0x0108, 0x8210, 0x8108, 0x9186, 0x0800, 0x1d50, - 0x2208, 0x0005, 0x2091, 0x8000, 0x2079, 0x0000, 0x000e, 0x00f6, - 0x0010, 0x2091, 0x8000, 0x0e04, 0x0dd3, 0x0006, 0x0016, 0x2001, - 0x8002, 0x0006, 0x2079, 0x0000, 0x000e, 0x7882, 0x7836, 0x001e, - 0x798e, 0x000e, 0x788a, 0x000e, 0x7886, 0x3900, 0x789a, 0x00d6, - 0x2069, 0x0300, 0x6818, 0x78ae, 0x681c, 0x78b2, 0x2001, 0x19e2, - 0x2004, 0x78b6, 0x2001, 0x1a5e, 0x2004, 0x78ba, 0x6808, 0x78be, - 0x00de, 0x7833, 0x0012, 0x2091, 0x5000, 0x0156, 0x00d6, 0x0036, - 0x0026, 0x2079, 0x0300, 0x2069, 0x1a81, 0x7a08, 0x226a, 0x2069, - 0x1a82, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a, 0x782c, 0x2019, - 0x1a8f, 0x201a, 0x2019, 0x1a92, 0x9016, 0x7808, 0xd09c, 0x0168, - 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1a9b, 0x0108, 0x0ca8, - 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, 0x2019, 0x1a90, 0x782c, - 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069, 0x1a61, 0x901e, - 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68, 0x8318, 0x1f04, - 0x0e32, 0x002e, 0x003e, 0x00de, 0x015e, 0x2079, 0x1800, 0x7803, - 0x0005, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x0180, - 0x2001, 0x19f5, 0x2004, 0x9005, 0x0128, 0x2001, 0x008b, 0x2004, - 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002, 0x2003, 0x1001, - 0x080c, 0x5469, 0x1110, 0x080c, 0x0ea7, 0x0cd0, 0x0005, 0x918c, - 0x03ff, 0x2001, 0x0003, 0x2004, 0x9084, 0x0600, 0x1118, 0x918d, - 0x2800, 0x0010, 0x918d, 0x2000, 0x2001, 0x017f, 0x2102, 0x0005, - 0x00f6, 0x0006, 0x2079, 0x1826, 0x2f04, 0x8000, 0x207a, 0x080c, - 0x2a53, 0x1150, 0x0006, 0x2001, 0x1971, 0x2004, 0xd0fc, 0x000e, - 0x1118, 0x9082, 0x7530, 0x0010, 0x9082, 0x000f, 0x0258, 0x9006, - 0x207a, 0x2079, 0x1829, 0x2f04, 0x9084, 0x0001, 0x9086, 0x0001, - 0x207a, 0x0090, 0x2079, 0x1829, 0x2f7c, 0x8fff, 0x1138, 0x0026, - 0x2011, 0x0080, 0x080c, 0x0eed, 0x002e, 0x0030, 0x0026, 0x2011, - 0x0000, 0x080c, 0x0eed, 0x002e, 0x000e, 0x00fe, 0x0005, 0x0026, - 0x0126, 0x2011, 0x0080, 0x080c, 0x0eed, 0x20a9, 0x0fff, 0x080c, - 0x0f0e, 0x2011, 0x0040, 0x04c9, 0x20a9, 0x0fff, 0x080c, 0x0f0e, - 0x0c80, 0x7038, 0xd0b4, 0x1128, 0x0026, 0x2011, 0x0040, 0x0469, - 0x002e, 0x0005, 0x7038, 0xd0b4, 0x1128, 0x0026, 0x2011, 0x0080, - 0x0421, 0x002e, 0x0005, 0x0026, 0x70eb, 0x0000, 0x0459, 0x1148, - 0x080c, 0x2a53, 0x1118, 0x2011, 0x8484, 0x0058, 0x2011, 0x8282, - 0x0040, 0x080c, 0x2a53, 0x1118, 0x2011, 0xcdc5, 0x0010, 0x2011, - 0xcac2, 0x00e9, 0x002e, 0x0005, 0xd0b4, 0x0130, 0x0006, 0x3b00, - 0x9084, 0xff3f, 0x20d8, 0x000e, 0x0005, 0x0016, 0x3b08, 0x3a00, - 0x9104, 0x918d, 0x00c0, 0x21d8, 0x9084, 0xff3f, 0x9205, 0x20d0, - 0x001e, 0x0005, 0x2001, 0x1839, 0x2004, 0xd0dc, 0x0005, 0x9e86, - 0x1800, 0x190c, 0x0dd1, 0x70e4, 0xd0e4, 0x0108, 0xc2e5, 0x72e6, - 0xd0e4, 0x1118, 0x9294, 0x00c0, 0x0c01, 0x0005, 0x1d04, 0x0f0e, - 0x2091, 0x6000, 0x1f04, 0x0f0e, 0x0005, 0x890e, 0x810e, 0x810f, - 0x9194, 0x003f, 0x918c, 0xffc0, 0x0005, 0x0006, 0x2200, 0x914d, - 0x894f, 0x894d, 0x894d, 0x000e, 0x0005, 0x01d6, 0x0146, 0x0036, - 0x0096, 0x2061, 0x188b, 0x600b, 0x0000, 0x600f, 0x0000, 0x6003, - 0x0000, 0x6007, 0x0000, 0x2009, 0xffc0, 0x2105, 0x0006, 0x2001, - 0xaaaa, 0x200f, 0x2019, 0x5555, 0x9016, 0x2049, 0x0bff, 0xab02, - 0xa001, 0xa001, 0xa800, 0x9306, 0x1138, 0x2105, 0x9306, 0x0120, - 0x8210, 0x99c8, 0x0400, 0x0c98, 0x000e, 0x200f, 0x2001, 0x189b, - 0x928a, 0x000e, 0x1638, 0x928a, 0x0006, 0x2011, 0x0006, 0x1210, - 0x2011, 0x0000, 0x2202, 0x9006, 0x2008, 0x82ff, 0x01b0, 0x8200, - 0x600a, 0x600f, 0xffff, 0x6003, 0x0002, 0x6007, 0x0000, 0x0026, - 0x2019, 0x0010, 0x9280, 0x0001, 0x20e8, 0x21a0, 0x21a8, 0x4104, - 0x8319, 0x1de0, 0x8211, 0x1da0, 0x002e, 0x009e, 0x003e, 0x014e, - 0x01de, 0x0005, 0x2011, 0x000e, 0x08e8, 0x0016, 0x0026, 0x0096, - 0x3348, 0x080c, 0x0f15, 0x2100, 0x9300, 0x2098, 0x22e0, 0x009e, - 0x002e, 0x001e, 0x0036, 0x3518, 0x20a9, 0x0001, 0x4002, 0x8007, - 0x4004, 0x8319, 0x1dd8, 0x003e, 0x0005, 0x20e9, 0x0001, 0x71b4, - 0x81ff, 0x11c0, 0x9006, 0x2009, 0x0200, 0x20a9, 0x0002, 0x9298, - 0x0018, 0x23a0, 0x4001, 0x2009, 0x0700, 0x20a9, 0x0002, 0x9298, - 0x0008, 0x23a0, 0x4001, 0x7078, 0x8007, 0x717c, 0x810f, 0x20a9, - 0x0002, 0x4001, 0x9298, 0x000c, 0x23a0, 0x900e, 0x080c, 0x0db1, - 0x2001, 0x0000, 0x810f, 0x20a9, 0x0002, 0x4001, 0x0005, 0x89ff, - 0x0140, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x103f, 0x009e, - 0x0cb0, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x10b8, 0x090c, - 0x0dd1, 0x00ee, 0x0005, 0x0086, 0x00e6, 0x0006, 0x0026, 0x0036, - 0x0126, 0x2091, 0x8000, 0x00c9, 0x2071, 0x1800, 0x73bc, 0x702c, - 0x9016, 0x9045, 0x0158, 0x8210, 0x9906, 0x090c, 0x0dd1, 0x2300, - 0x9202, 0x0120, 0x1a0c, 0x0dd1, 0xa000, 0x0c98, 0x012e, 0x003e, - 0x002e, 0x000e, 0x00ee, 0x008e, 0x0005, 0x0086, 0x00e6, 0x0006, - 0x0126, 0x2091, 0x8000, 0x2071, 0x190e, 0x7010, 0x9005, 0x0140, - 0x7018, 0x9045, 0x0128, 0x9906, 0x090c, 0x0dd1, 0xa000, 0x0cc8, - 0x012e, 0x000e, 0x00ee, 0x008e, 0x0005, 0x00e6, 0x2071, 0x1800, - 0x0126, 0x2091, 0x8000, 0x70bc, 0x8001, 0x0270, 0x70be, 0x702c, - 0x2048, 0x9085, 0x0001, 0xa800, 0x702e, 0xa803, 0x0000, 0xa807, - 0x0000, 0x012e, 0x00ee, 0x0005, 0x904e, 0x0cd8, 0x00e6, 0x0126, - 0x2091, 0x8000, 0x2071, 0x1800, 0x70bc, 0x90ca, 0x0040, 0x0268, - 0x8001, 0x70be, 0x702c, 0x2048, 0xa800, 0x702e, 0xa803, 0x0000, - 0xa807, 0x0000, 0x012e, 0x00ee, 0x0005, 0x904e, 0x0cd8, 0x00e6, - 0x0126, 0x2091, 0x8000, 0x0016, 0x890e, 0x810e, 0x810f, 0x9184, - 0x003f, 0xa862, 0x9184, 0xffc0, 0xa85e, 0x001e, 0x0020, 0x00e6, - 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, - 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x8091, 0x012e, 0x00ee, - 0x0005, 0x2071, 0x1800, 0x9026, 0x2009, 0x0000, 0x2049, 0x0400, - 0x2900, 0x702e, 0x8940, 0x2800, 0xa802, 0xa95e, 0xa863, 0x0001, - 0x8420, 0x9886, 0x0440, 0x0120, 0x2848, 0x9188, 0x0040, 0x0c90, - 0x2071, 0x188b, 0x7000, 0x9005, 0x11a0, 0x2001, 0x04d4, 0xa802, - 0x2048, 0x2009, 0x3500, 0x8940, 0x2800, 0xa802, 0xa95e, 0xa863, - 0x0001, 0x8420, 0x9886, 0x0800, 0x0120, 0x2848, 0x9188, 0x0040, - 0x0c90, 0x2071, 0x188b, 0x7104, 0x7200, 0x82ff, 0x01d0, 0x7308, - 0x8318, 0x831f, 0x831b, 0x831b, 0x7312, 0x8319, 0x2001, 0x0800, - 0xa802, 0x2048, 0x8900, 0xa802, 0x2040, 0xa95e, 0xaa62, 0x8420, - 0x2300, 0x9906, 0x0130, 0x2848, 0x9188, 0x0040, 0x9291, 0x0000, - 0x0c88, 0xa803, 0x0000, 0x2071, 0x1800, 0x74ba, 0x74be, 0x0005, - 0x00e6, 0x0016, 0x9984, 0xfc00, 0x01e8, 0x908c, 0xf800, 0x1168, - 0x9982, 0x0400, 0x02b8, 0x9982, 0x0440, 0x0278, 0x9982, 0x04d4, - 0x0288, 0x9982, 0x0800, 0x1270, 0x0040, 0x9982, 0x0800, 0x0250, - 0x2071, 0x188b, 0x7010, 0x9902, 0x1228, 0x9085, 0x0001, 0x001e, - 0x00ee, 0x0005, 0x9006, 0x0cd8, 0x00e6, 0x2071, 0x19f4, 0x7007, - 0x0000, 0x9006, 0x701e, 0x7022, 0x7002, 0x2071, 0x0000, 0x7010, - 0x9085, 0x8044, 0x7012, 0x2071, 0x0080, 0x9006, 0x20a9, 0x0040, - 0x7022, 0x1f04, 0x10f0, 0x702b, 0x0020, 0x00ee, 0x0005, 0x0126, - 0x2091, 0x8000, 0x00e6, 0xa06f, 0x0000, 0x2071, 0x19f4, 0x701c, - 0x9088, 0x19fe, 0x280a, 0x8000, 0x9084, 0x003f, 0x701e, 0x7120, - 0x9106, 0x090c, 0x0dd1, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, - 0x0080, 0x00a9, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, - 0x8000, 0x00e6, 0x2071, 0x19f4, 0x7004, 0x9005, 0x1128, 0x00f6, - 0x2079, 0x0080, 0x0021, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x7004, - 0x9086, 0x0000, 0x1110, 0x7007, 0x0006, 0x7000, 0x0002, 0x1139, - 0x1137, 0x1137, 0x1137, 0x12b0, 0x12b0, 0x12b0, 0x12b0, 0x080c, - 0x0dd1, 0x701c, 0x7120, 0x9106, 0x1148, 0x792c, 0x9184, 0x0001, - 0x1120, 0xd1fc, 0x1110, 0x7007, 0x0000, 0x0005, 0x0096, 0x9180, - 0x19fe, 0x2004, 0x700a, 0x2048, 0x8108, 0x918c, 0x003f, 0x7122, - 0x782b, 0x0026, 0xa88c, 0x7802, 0xa890, 0x7806, 0xa894, 0x780a, - 0xa898, 0x780e, 0xa878, 0x700e, 0xa870, 0x7016, 0xa874, 0x701a, - 0xa868, 0x009e, 0xd084, 0x0120, 0x7007, 0x0001, 0x0029, 0x0005, - 0x7007, 0x0002, 0x00b1, 0x0005, 0x0016, 0x0026, 0x710c, 0x2011, - 0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x7212, - 0x8203, 0x7812, 0x782b, 0x0020, 0x782b, 0x0041, 0x002e, 0x001e, - 0x0005, 0x0016, 0x0026, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e0, - 0x7018, 0x2098, 0x20e9, 0x0000, 0x20a1, 0x0088, 0x782b, 0x0026, - 0x710c, 0x2011, 0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, - 0x700e, 0x22a8, 0x4006, 0x8203, 0x7812, 0x782b, 0x0020, 0x3300, - 0x701a, 0x782b, 0x0001, 0x015e, 0x014e, 0x013e, 0x002e, 0x001e, - 0x0005, 0x2009, 0x19f4, 0x2104, 0xc095, 0x200a, 0x080c, 0x1116, - 0x0005, 0x0016, 0x00e6, 0x2071, 0x19f4, 0x00f6, 0x2079, 0x0080, - 0x792c, 0xd1bc, 0x190c, 0x0dca, 0x782b, 0x0002, 0xd1fc, 0x0120, - 0x918c, 0x0700, 0x7004, 0x0023, 0x00fe, 0x00ee, 0x001e, 0x0005, - 0x1127, 0x11cf, 0x1203, 0x0dd1, 0x0dd1, 0x12bc, 0x0dd1, 0x918c, - 0x0700, 0x1550, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e8, 0x7018, - 0x20a0, 0x20e1, 0x0000, 0x2099, 0x0088, 0x782b, 0x0040, 0x7010, - 0x20a8, 0x4005, 0x3400, 0x701a, 0x015e, 0x014e, 0x013e, 0x700c, - 0x9005, 0x0578, 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x116c, - 0x0005, 0x7008, 0x0096, 0x2048, 0xa86f, 0x0100, 0x009e, 0x7007, - 0x0000, 0x080c, 0x1127, 0x0005, 0x7008, 0x0096, 0x2048, 0xa86f, - 0x0200, 0x009e, 0x0ca0, 0x918c, 0x0700, 0x1150, 0x700c, 0x9005, - 0x0180, 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x1181, 0x0005, - 0x7008, 0x0096, 0x2048, 0xa86f, 0x0200, 0x009e, 0x7007, 0x0000, - 0x0080, 0x0096, 0x7008, 0x2048, 0x7800, 0xa88e, 0x7804, 0xa892, - 0x7808, 0xa896, 0x780c, 0xa89a, 0xa86f, 0x0100, 0x009e, 0x7007, - 0x0000, 0x0096, 0x00d6, 0x7008, 0x2048, 0x2001, 0x18b7, 0x2004, - 0x9906, 0x1128, 0xa89c, 0x080f, 0x00de, 0x009e, 0x00a0, 0x00de, - 0x009e, 0x0096, 0x00d6, 0x7008, 0x2048, 0x0081, 0x0150, 0xa89c, - 0x0086, 0x2940, 0x080f, 0x008e, 0x00de, 0x009e, 0x080c, 0x1116, - 0x0005, 0x00de, 0x009e, 0x080c, 0x1116, 0x0005, 0xa8a8, 0xd08c, - 0x0005, 0x0096, 0xa0a0, 0x904d, 0x090c, 0x0dd1, 0xa06c, 0x908e, - 0x0100, 0x0130, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002, - 0x080c, 0x699e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x2848, 0x080c, - 0x103f, 0x009e, 0x0005, 0x00a6, 0xa0a0, 0x904d, 0x090c, 0x0dd1, - 0xa06c, 0x908e, 0x0100, 0x0128, 0xa87b, 0x0001, 0xa883, 0x0000, - 0x00c0, 0xa80c, 0x2050, 0xb004, 0x9005, 0x0198, 0xa80e, 0x2050, - 0x8006, 0x8006, 0x8007, 0x908c, 0x003f, 0x9084, 0xffc0, 0x9080, - 0x0002, 0xa076, 0xa172, 0xb000, 0xa07a, 0x2810, 0x080c, 0x10f7, - 0x00e8, 0xa97c, 0xa894, 0x0016, 0x0006, 0x080c, 0x699e, 0x000e, - 0x001e, 0xd1fc, 0x1138, 0xd1f4, 0x0128, 0x00c6, 0x2060, 0x080c, - 0x9d08, 0x00ce, 0x7008, 0x2048, 0xa89f, 0x0000, 0xa8a3, 0x0000, - 0x080c, 0x103f, 0x7007, 0x0000, 0x080c, 0x1116, 0x00ae, 0x0005, - 0x0126, 0x2091, 0x8000, 0x782b, 0x1001, 0x7007, 0x0005, 0x7000, - 0xc094, 0x7002, 0x012e, 0x0005, 0x7007, 0x0000, 0x080c, 0x1127, - 0x0005, 0x0126, 0x2091, 0x2200, 0x2079, 0x0300, 0x2071, 0x1a3e, - 0x7003, 0x0000, 0x78bf, 0x00f6, 0x781b, 0x4800, 0x00c1, 0x7803, - 0x0003, 0x780f, 0x0000, 0x20a9, 0x025f, 0x2061, 0xd06e, 0x2c0d, - 0x7912, 0xe104, 0x9ce0, 0x0002, 0x7916, 0x1f04, 0x12d7, 0x7807, - 0x0007, 0x7803, 0x0000, 0x7803, 0x0001, 0x012e, 0x0005, 0x00c6, - 0x7803, 0x0000, 0x7808, 0xd09c, 0x0110, 0x7820, 0x0cd8, 0x2001, - 0x1a3f, 0x2003, 0x0000, 0x78ab, 0x0004, 0x78ac, 0xd0ac, 0x1de8, - 0x78ab, 0x0002, 0x7807, 0x0007, 0x7827, 0x0030, 0x782b, 0x0400, - 0x7827, 0x0031, 0x782b, 0x1a61, 0x781f, 0xff00, 0x781b, 0xb700, - 0x2001, 0x0200, 0x2004, 0xd0dc, 0x0110, 0x781f, 0x0303, 0x2061, - 0x1a61, 0x602f, 0x1cc8, 0x2001, 0x1819, 0x2004, 0x9082, 0x1cc8, - 0x6032, 0x603b, 0x1f59, 0x2001, 0x3167, 0xd0fc, 0x190c, 0x0dd1, - 0x2001, 0x1810, 0x2004, 0xd0c4, 0x1128, 0x2001, 0x0003, 0x2004, - 0xd0d4, 0x1118, 0x783f, 0x3167, 0x0020, 0x9084, 0xc000, 0x783f, - 0xb167, 0x00ce, 0x0005, 0x0126, 0x2091, 0x2200, 0x7908, 0x9184, - 0x0070, 0x190c, 0x0dca, 0xd19c, 0x0158, 0x7820, 0x908c, 0xf000, - 0x15e8, 0x908a, 0x0024, 0x1a0c, 0x0dd1, 0x0023, 0x012e, 0x0005, - 0x012e, 0x0005, 0x136e, 0x136e, 0x1385, 0x138a, 0x138e, 0x1393, - 0x13bb, 0x13bf, 0x13cd, 0x13d1, 0x136e, 0x1454, 0x1458, 0x14c8, - 0x136e, 0x136e, 0x136e, 0x136e, 0x136e, 0x136e, 0x136e, 0x136e, - 0x136e, 0x136e, 0x136e, 0x136e, 0x136e, 0x1395, 0x136e, 0x136e, - 0x136e, 0x136e, 0x136e, 0x136e, 0x1372, 0x1370, 0x080c, 0x0dd1, - 0x080c, 0x0dca, 0x080c, 0x14cf, 0x2009, 0x1a56, 0x2104, 0x8000, - 0x200a, 0x080c, 0x7bb0, 0x080c, 0x1984, 0x0005, 0x2009, 0x0048, - 0x2060, 0x080c, 0x9d7a, 0x012e, 0x0005, 0x7004, 0xc085, 0xc0b5, - 0x7006, 0x0005, 0x7004, 0xc085, 0x7006, 0x0005, 0x080c, 0x14cf, - 0x080c, 0x1628, 0x0005, 0x080c, 0x0dd1, 0x080c, 0x14cf, 0x2060, + 0x1904, 0x0ab1, 0x080c, 0x0ecd, 0x080c, 0x72e5, 0x0150, 0x080c, + 0x7308, 0x15b0, 0x2079, 0x0100, 0x7828, 0x9085, 0x1800, 0x782a, + 0x0478, 0x080c, 0x7212, 0x7000, 0x9086, 0x0001, 0x1904, 0x0ab1, + 0x7094, 0x9086, 0x0029, 0x1904, 0x0ab1, 0x080c, 0x8253, 0x080c, + 0x8245, 0x2079, 0x0100, 0x782f, 0x0008, 0x2001, 0x0161, 0x2003, + 0x0001, 0x7827, 0xffff, 0x7a28, 0x9295, 0x5e2f, 0x7a2a, 0x2011, + 0x7176, 0x080c, 0x835e, 0x2011, 0x7169, 0x080c, 0x8474, 0x2011, + 0x5d5f, 0x080c, 0x835e, 0x2011, 0x8030, 0x901e, 0x7392, 0x04d0, + 0x080c, 0x5607, 0x2079, 0x0100, 0x7844, 0x9005, 0x1904, 0x0ab1, + 0x2011, 0x5d5f, 0x080c, 0x835e, 0x2011, 0x7176, 0x080c, 0x835e, + 0x2011, 0x7169, 0x080c, 0x8474, 0x2001, 0x0265, 0x2001, 0x0205, + 0x2003, 0x0000, 0x7840, 0x9084, 0xfffb, 0x7842, 0x2001, 0x1983, + 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100, 0x080c, 0x5eac, + 0x00ce, 0x0804, 0x0ab1, 0x780f, 0x006b, 0x7a28, 0x080c, 0x72ed, + 0x0118, 0x9295, 0x5e2f, 0x0010, 0x9295, 0x402f, 0x7a2a, 0x2011, + 0x8010, 0x73d4, 0x2001, 0x1984, 0x2003, 0x0001, 0x080c, 0x29ae, + 0x080c, 0x4abd, 0x7244, 0xc284, 0x7246, 0x2001, 0x180c, 0x200c, + 0xc1ac, 0xc1cc, 0x2102, 0x080c, 0x98cb, 0x2011, 0x0004, 0x080c, + 0xb965, 0x080c, 0x664c, 0x080c, 0x72e5, 0x1120, 0x080c, 0x29f2, + 0x02e0, 0x0400, 0x080c, 0x5eb3, 0x0140, 0x7093, 0x0001, 0x70cf, + 0x0000, 0x080c, 0x57d9, 0x0804, 0x0ab1, 0x080c, 0x55a7, 0xd094, + 0x0188, 0x2011, 0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c, 0x55ab, + 0xd0d4, 0x1118, 0x080c, 0x29f2, 0x1270, 0x2011, 0x180c, 0x2204, + 0xc0bc, 0x00a8, 0x080c, 0x55ab, 0xd0d4, 0x1db8, 0x2011, 0x180c, + 0x2204, 0xc0bd, 0x0060, 0x2011, 0x180c, 0x2204, 0xc0bd, 0x2012, + 0x080c, 0x673e, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd, 0x2012, + 0x080c, 0x6704, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8, 0x707b, + 0x0000, 0x080c, 0x72e5, 0x1130, 0x70ac, 0x9005, 0x1168, 0x080c, + 0xbc7a, 0x0050, 0x080c, 0xbc7a, 0x70d8, 0xd09c, 0x1128, 0x70ac, + 0x9005, 0x0110, 0x080c, 0x5e89, 0x70e3, 0x0000, 0x70df, 0x0000, + 0x70a3, 0x0000, 0x080c, 0x29fa, 0x0228, 0x2011, 0x0101, 0x2204, + 0xc0c4, 0x2012, 0x72d8, 0x080c, 0x72e5, 0x1178, 0x9016, 0x0016, + 0x080c, 0x27b7, 0x2019, 0x194a, 0x211a, 0x001e, 0x705b, 0xffff, + 0x705f, 0x00ef, 0x707f, 0x0000, 0x0020, 0x2019, 0x194a, 0x201b, + 0x0000, 0x2079, 0x185e, 0x7804, 0xd0ac, 0x0108, 0xc295, 0x72da, + 0x080c, 0x72e5, 0x0118, 0x9296, 0x0004, 0x0548, 0x2011, 0x0001, + 0x080c, 0xb965, 0x70a7, 0x0000, 0x70ab, 0xffff, 0x7003, 0x0002, + 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, 0x782a, + 0x00fe, 0x080c, 0x2e5f, 0x2011, 0x0005, 0x080c, 0x99d6, 0x080c, + 0x8c37, 0x080c, 0x72e5, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, + 0x080c, 0x27b7, 0x61e2, 0x001e, 0x00ce, 0x012e, 0x0420, 0x70a7, + 0x0000, 0x70ab, 0xffff, 0x7003, 0x0002, 0x00f6, 0x2079, 0x0100, + 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, 0x782a, 0x00fe, 0x2011, + 0x0005, 0x080c, 0x99d6, 0x080c, 0x8c37, 0x080c, 0x72e5, 0x0148, + 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x27b7, 0x61e2, 0x001e, + 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x00b6, 0x080c, 0x72e5, + 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c, 0x72e5, + 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x86ff, 0x0138, 0x9180, + 0x1000, 0x2004, 0x905d, 0x0110, 0xb800, 0xd0bc, 0x090c, 0x3162, + 0x8108, 0x1f04, 0x0ac5, 0x707b, 0x0000, 0x707c, 0x9084, 0x00ff, + 0x707e, 0x70af, 0x0000, 0x00be, 0x00ce, 0x0005, 0x00b6, 0x0126, + 0x2091, 0x8000, 0x7000, 0x9086, 0x0002, 0x1904, 0x0b9b, 0x70a8, + 0x9086, 0xffff, 0x0130, 0x080c, 0x2e5f, 0x080c, 0x8c37, 0x0804, + 0x0b9b, 0x70d8, 0xd0ac, 0x1110, 0xd09c, 0x0558, 0xd084, 0x0548, + 0x0006, 0x2001, 0x0103, 0x2003, 0x002b, 0x000e, 0xd08c, 0x0508, + 0x080c, 0x31c5, 0x11d0, 0x70dc, 0x9086, 0xffff, 0x01b0, 0x080c, + 0x2fd8, 0x080c, 0x8c37, 0x70d8, 0xd094, 0x1904, 0x0b9b, 0x2011, + 0x0001, 0x080c, 0xbef8, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, + 0x3012, 0x080c, 0x8c37, 0x0804, 0x0b9b, 0x70e0, 0x9005, 0x1904, + 0x0b9b, 0x70a4, 0x9005, 0x1904, 0x0b9b, 0x70d8, 0xd0a4, 0x0118, + 0xd0b4, 0x0904, 0x0b9b, 0x080c, 0x6704, 0x1904, 0x0b9b, 0x080c, + 0x6757, 0x1904, 0x0b9b, 0x080c, 0x673e, 0x01c0, 0x0156, 0x00c6, + 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6411, 0x1118, 0xb800, + 0xd0ec, 0x1138, 0x001e, 0x8108, 0x1f04, 0x0b3b, 0x00ce, 0x015e, + 0x0028, 0x001e, 0x00ce, 0x015e, 0x0804, 0x0b9b, 0x0006, 0x2001, + 0x0103, 0x2003, 0x006b, 0x000e, 0x2011, 0x1990, 0x080c, 0x0f89, + 0x2011, 0x19aa, 0x080c, 0x0f89, 0x7030, 0xc08c, 0x7032, 0x7003, + 0x0003, 0x70ab, 0xffff, 0x080c, 0x0ecd, 0x9006, 0x080c, 0x264c, + 0x080c, 0x31c5, 0x0118, 0x080c, 0x4c5a, 0x0050, 0x0036, 0x0046, + 0x2019, 0xffff, 0x2021, 0x0006, 0x080c, 0x4c74, 0x004e, 0x003e, + 0x00f6, 0x2079, 0x0100, 0x080c, 0x7308, 0x0150, 0x080c, 0x72e5, + 0x7828, 0x0118, 0x9084, 0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a, + 0x00fe, 0x2001, 0x19c5, 0x2004, 0x9086, 0x0005, 0x1120, 0x2011, + 0x0000, 0x080c, 0x99d6, 0x2011, 0x0000, 0x080c, 0x99e0, 0x080c, + 0x8c37, 0x080c, 0x8d06, 0x012e, 0x00be, 0x0005, 0x0016, 0x0046, + 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x7904, 0x918c, + 0xfffd, 0x7906, 0x2009, 0x00f7, 0x080c, 0x5e72, 0x7940, 0x918c, + 0x0010, 0x7942, 0x7924, 0xd1b4, 0x0110, 0x7827, 0x0040, 0xd19c, + 0x0110, 0x7827, 0x0008, 0x0006, 0x0036, 0x0156, 0x7954, 0xd1ac, + 0x1904, 0x0c2b, 0x2001, 0x1984, 0x2004, 0x9005, 0x1518, 0x080c, + 0x2a75, 0x1148, 0x2001, 0x0001, 0x080c, 0x29dd, 0x2001, 0x0001, + 0x080c, 0x29c0, 0x00b8, 0x080c, 0x2a7d, 0x1138, 0x9006, 0x080c, + 0x29dd, 0x9006, 0x080c, 0x29c0, 0x0068, 0x080c, 0x2a85, 0x1d50, + 0x2001, 0x1974, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x27eb, + 0x0804, 0x0d0a, 0x080c, 0x72f6, 0x0148, 0x080c, 0x7308, 0x1118, + 0x080c, 0x75eb, 0x0050, 0x080c, 0x72ed, 0x0dd0, 0x080c, 0x75e6, + 0x080c, 0x75dc, 0x080c, 0x7212, 0x0058, 0x080c, 0x72e5, 0x0140, + 0x2009, 0x00f8, 0x080c, 0x5e72, 0x7843, 0x0090, 0x7843, 0x0010, + 0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, 0x72e5, 0x0138, + 0x7824, 0xd0ac, 0x1904, 0x0d0f, 0x1f04, 0x0c0a, 0x0070, 0x7824, + 0x080c, 0x72ff, 0x0118, 0xd0ac, 0x1904, 0x0d0f, 0x9084, 0x1800, + 0x0d98, 0x7003, 0x0001, 0x0804, 0x0d0f, 0x2001, 0x0001, 0x080c, + 0x264c, 0x0804, 0x0d22, 0x2001, 0x1984, 0x2004, 0x9005, 0x1518, + 0x080c, 0x2a75, 0x1148, 0x2001, 0x0001, 0x080c, 0x29dd, 0x2001, + 0x0001, 0x080c, 0x29c0, 0x00b8, 0x080c, 0x2a7d, 0x1138, 0x9006, + 0x080c, 0x29dd, 0x9006, 0x080c, 0x29c0, 0x0068, 0x080c, 0x2a85, + 0x1d50, 0x2001, 0x1974, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, + 0x27eb, 0x0804, 0x0d0a, 0x7850, 0x9085, 0x0040, 0x7852, 0x7938, + 0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2a8d, 0x9085, 0x2000, + 0x7852, 0x793a, 0x20a9, 0x0046, 0x1d04, 0x0c64, 0x080c, 0x8454, + 0x1f04, 0x0c64, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x7852, + 0x793a, 0x080c, 0x72f6, 0x0148, 0x080c, 0x7308, 0x1118, 0x080c, + 0x75eb, 0x0050, 0x080c, 0x72ed, 0x0dd0, 0x080c, 0x75e6, 0x080c, + 0x75dc, 0x080c, 0x7212, 0x0020, 0x2009, 0x00f8, 0x080c, 0x5e72, + 0x20a9, 0x0028, 0xa001, 0x1f04, 0x0c8a, 0x7850, 0x9085, 0x1400, + 0x7852, 0x080c, 0x72e5, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, + 0x2021, 0xe678, 0x2019, 0xea60, 0x0d0c, 0x8454, 0x7820, 0xd09c, + 0x1580, 0x080c, 0x72e5, 0x0904, 0x0cef, 0x7824, 0xd0ac, 0x1904, + 0x0d0f, 0x080c, 0x7308, 0x1528, 0x0046, 0x2021, 0x0320, 0x8421, + 0x1df0, 0x004e, 0x7827, 0x1800, 0x080c, 0x2a8d, 0x7824, 0x9084, + 0x1800, 0x1160, 0x9484, 0x0fff, 0x1138, 0x2001, 0x1810, 0x2004, + 0xd0fc, 0x0110, 0x080c, 0x0d34, 0x8421, 0x1158, 0x1d04, 0x0cca, + 0x080c, 0x8454, 0x080c, 0x75e6, 0x080c, 0x75dc, 0x7003, 0x0001, + 0x04f0, 0x8319, 0x1948, 0x1d04, 0x0cd7, 0x080c, 0x8454, 0x2009, + 0x1977, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a, 0x1178, 0x200b, + 0x000a, 0x7827, 0x0048, 0x20a9, 0x0002, 0x080c, 0x2a6e, 0x7924, + 0x080c, 0x2a8d, 0xd19c, 0x0110, 0x080c, 0x29ae, 0x00d8, 0x080c, + 0x72f6, 0x1140, 0x94a2, 0x03e8, 0x1128, 0x080c, 0x72bd, 0x7003, + 0x0001, 0x00a8, 0x7827, 0x1800, 0x080c, 0x2a8d, 0x7824, 0x080c, + 0x72ff, 0x0110, 0xd0ac, 0x1158, 0x9084, 0x1800, 0x0950, 0x7003, + 0x0001, 0x0028, 0x2001, 0x0001, 0x080c, 0x264c, 0x0078, 0x2009, + 0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d, 0x0002, 0x7906, + 0x7827, 0x0048, 0x7828, 0x9085, 0x0028, 0x782a, 0x7850, 0x9085, + 0x0400, 0x7852, 0x2001, 0x1984, 0x2003, 0x0000, 0x9006, 0x78f2, + 0x015e, 0x003e, 0x000e, 0x080c, 0x55b6, 0x090c, 0x0e64, 0x012e, + 0x00fe, 0x004e, 0x001e, 0x0005, 0x0006, 0x0016, 0x0036, 0x0046, + 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0069, 0x0d0c, + 0x8454, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x004e, + 0x003e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x189f, 0x7004, + 0x9086, 0x0001, 0x1110, 0x080c, 0x32f3, 0x00ee, 0x0005, 0x0005, + 0x2a70, 0x2061, 0x1988, 0x2063, 0x0003, 0x6007, 0x0003, 0x600b, + 0x001a, 0x600f, 0x0107, 0x2001, 0x1959, 0x900e, 0x2102, 0x7192, + 0x2001, 0x0100, 0x2004, 0x9082, 0x0002, 0x0218, 0x705b, 0xffff, + 0x0008, 0x715a, 0x7063, 0xffff, 0x717a, 0x717e, 0x080c, 0xbc7a, + 0x2061, 0x1949, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800, 0x600f, + 0x0200, 0x6013, 0x00ff, 0x6017, 0x000f, 0x611a, 0x601f, 0x07d0, + 0x2061, 0x1951, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f, 0x0200, + 0x6013, 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061, 0x1965, + 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f, 0x2020, + 0x2001, 0x182b, 0x2102, 0x0005, 0x9016, 0x080c, 0x6411, 0x1178, + 0xb804, 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4, 0xff00, + 0x98c6, 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210, 0x8108, + 0x9186, 0x0800, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000, 0x2079, + 0x0000, 0x000e, 0x00f6, 0x0010, 0x2091, 0x8000, 0x0e04, 0x0dc6, + 0x0006, 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000, 0x000e, + 0x7882, 0x7836, 0x001e, 0x798e, 0x000e, 0x788a, 0x000e, 0x7886, + 0x3900, 0x789a, 0x00d6, 0x2069, 0x0300, 0x6818, 0x78ae, 0x681c, + 0x78b2, 0x2001, 0x19e5, 0x2004, 0x78b6, 0x2001, 0x1a61, 0x2004, + 0x78ba, 0x6808, 0x78be, 0x00de, 0x7833, 0x0012, 0x2091, 0x5000, + 0x0156, 0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1a84, + 0x7a08, 0x226a, 0x2069, 0x1a85, 0x7a18, 0x226a, 0x8d68, 0x7a1c, + 0x226a, 0x782c, 0x2019, 0x1a92, 0x201a, 0x2019, 0x1a95, 0x9016, + 0x7808, 0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, + 0x1a9e, 0x0108, 0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, + 0x2019, 0x1a93, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, + 0x2069, 0x1a64, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, + 0x8d68, 0x8318, 0x1f04, 0x0e25, 0x002e, 0x003e, 0x00de, 0x015e, + 0x2079, 0x1800, 0x7803, 0x0005, 0x2091, 0x4080, 0x2001, 0x0089, + 0x2004, 0xd084, 0x0188, 0x2001, 0x19f8, 0x2004, 0x9005, 0x0130, + 0x2001, 0x008b, 0x2004, 0x9084, 0x8004, 0x0dd0, 0x2001, 0x008a, + 0x2003, 0x0002, 0x2003, 0x1001, 0x080c, 0x55b6, 0x1110, 0x080c, + 0x0e9b, 0x0cd0, 0x0005, 0x918c, 0x03ff, 0x2001, 0x0003, 0x2004, + 0x9084, 0x0600, 0x1118, 0x918d, 0x2800, 0x0010, 0x918d, 0x2000, + 0x2001, 0x017f, 0x2102, 0x0005, 0x00f6, 0x0006, 0x2079, 0x1826, + 0x2f04, 0x8000, 0x207a, 0x080c, 0x2a85, 0x1150, 0x0006, 0x2001, + 0x1974, 0x2004, 0xd0fc, 0x000e, 0x1118, 0x9082, 0x7530, 0x0010, + 0x9082, 0x000f, 0x0258, 0x9006, 0x207a, 0x2079, 0x1829, 0x2f04, + 0x9084, 0x0001, 0x9086, 0x0001, 0x207a, 0x0090, 0x2079, 0x1829, + 0x2f7c, 0x8fff, 0x1138, 0x0026, 0x2011, 0x0080, 0x080c, 0x0ee1, + 0x002e, 0x0030, 0x0026, 0x2011, 0x0000, 0x080c, 0x0ee1, 0x002e, + 0x000e, 0x00fe, 0x0005, 0x0026, 0x0126, 0x2011, 0x0080, 0x080c, + 0x0ee1, 0x20a9, 0x0fff, 0x080c, 0x0f02, 0x2011, 0x0040, 0x04c9, + 0x20a9, 0x0fff, 0x080c, 0x0f02, 0x0c80, 0x2011, 0x0040, 0x0488, + 0x2011, 0x0080, 0x0470, 0x0005, 0x0026, 0x70eb, 0x0000, 0x04b1, + 0x1148, 0x080c, 0x2a85, 0x1118, 0x2011, 0x8484, 0x0058, 0x2011, + 0x8282, 0x0040, 0x080c, 0x2a85, 0x1118, 0x2011, 0xcdc5, 0x0010, + 0x2011, 0xcac2, 0x0441, 0x002e, 0x0005, 0x080c, 0x55b6, 0x1140, + 0x0026, 0x2001, 0x1800, 0x2004, 0x9084, 0x0007, 0x0013, 0x002e, + 0x0005, 0x0ecc, 0x0eb0, 0x0eb0, 0x0ead, 0x0e64, 0x0eb0, 0x0eb0, + 0x0e64, 0x0016, 0x3b08, 0x3a00, 0x9104, 0x918d, 0x00c0, 0x21d8, + 0x9084, 0xff3f, 0x9205, 0x20d0, 0x001e, 0x0005, 0x2001, 0x1839, + 0x2004, 0xd0dc, 0x0005, 0x9e86, 0x1800, 0x190c, 0x0dc4, 0x70e4, + 0xd0e4, 0x0108, 0xc2e5, 0x72e6, 0xd0e4, 0x1118, 0x9294, 0x00c0, + 0x0c01, 0x0005, 0x1d04, 0x0f02, 0x2091, 0x6000, 0x1f04, 0x0f02, + 0x0005, 0x890e, 0x810e, 0x810f, 0x9194, 0x003f, 0x918c, 0xffc0, + 0x0005, 0x0006, 0x2200, 0x914d, 0x894f, 0x894d, 0x894d, 0x000e, + 0x0005, 0x01d6, 0x0146, 0x0036, 0x0096, 0x2061, 0x188e, 0x600b, + 0x0000, 0x600f, 0x0000, 0x6003, 0x0000, 0x6007, 0x0000, 0x2009, + 0xffc0, 0x2105, 0x0006, 0x2001, 0xaaaa, 0x200f, 0x2019, 0x5555, + 0x9016, 0x2049, 0x0bff, 0xab02, 0xa001, 0xa001, 0xa800, 0x9306, + 0x1138, 0x2105, 0x9306, 0x0120, 0x8210, 0x99c8, 0x0400, 0x0c98, + 0x000e, 0x200f, 0x2001, 0x189e, 0x928a, 0x000e, 0x1638, 0x928a, + 0x0006, 0x2011, 0x0006, 0x1210, 0x2011, 0x0000, 0x2202, 0x9006, + 0x2008, 0x82ff, 0x01b0, 0x8200, 0x600a, 0x600f, 0xffff, 0x6003, + 0x0002, 0x6007, 0x0000, 0x0026, 0x2019, 0x0010, 0x9280, 0x0001, + 0x20e8, 0x21a0, 0x21a8, 0x4104, 0x8319, 0x1de0, 0x8211, 0x1da0, + 0x002e, 0x009e, 0x003e, 0x014e, 0x01de, 0x0005, 0x2011, 0x000e, + 0x08e8, 0x0016, 0x0026, 0x0096, 0x3348, 0x080c, 0x0f09, 0x2100, + 0x9300, 0x2098, 0x22e0, 0x009e, 0x002e, 0x001e, 0x0036, 0x3518, + 0x20a9, 0x0001, 0x4002, 0x8007, 0x4004, 0x8319, 0x1dd8, 0x003e, + 0x0005, 0x20e9, 0x0001, 0x71b4, 0x81ff, 0x11c0, 0x9006, 0x2009, + 0x0200, 0x20a9, 0x0002, 0x9298, 0x0018, 0x23a0, 0x4001, 0x2009, + 0x0700, 0x20a9, 0x0002, 0x9298, 0x0008, 0x23a0, 0x4001, 0x7078, + 0x8007, 0x717c, 0x810f, 0x20a9, 0x0002, 0x4001, 0x9298, 0x000c, + 0x23a0, 0x900e, 0x080c, 0x0da4, 0x2001, 0x0000, 0x810f, 0x20a9, + 0x0002, 0x4001, 0x0005, 0x89ff, 0x0140, 0xa804, 0xa807, 0x0000, + 0x0006, 0x080c, 0x1033, 0x009e, 0x0cb0, 0x0005, 0x00e6, 0x2071, + 0x1800, 0x080c, 0x10ac, 0x090c, 0x0dc4, 0x00ee, 0x0005, 0x0086, + 0x00e6, 0x0006, 0x0026, 0x0036, 0x0126, 0x2091, 0x8000, 0x00c9, + 0x2071, 0x1800, 0x73bc, 0x702c, 0x9016, 0x9045, 0x0158, 0x8210, + 0x9906, 0x090c, 0x0dc4, 0x2300, 0x9202, 0x0120, 0x1a0c, 0x0dc4, + 0xa000, 0x0c98, 0x012e, 0x003e, 0x002e, 0x000e, 0x00ee, 0x008e, + 0x0005, 0x0086, 0x00e6, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, + 0x1911, 0x7010, 0x9005, 0x0140, 0x7018, 0x9045, 0x0128, 0x9906, + 0x090c, 0x0dc4, 0xa000, 0x0cc8, 0x012e, 0x000e, 0x00ee, 0x008e, + 0x0005, 0x00e6, 0x2071, 0x1800, 0x0126, 0x2091, 0x8000, 0x70bc, + 0x8001, 0x0270, 0x70be, 0x702c, 0x2048, 0x9085, 0x0001, 0xa800, + 0x702e, 0xa803, 0x0000, 0xa807, 0x0000, 0x012e, 0x00ee, 0x0005, + 0x904e, 0x0cd8, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, + 0x70bc, 0x90ca, 0x0040, 0x0268, 0x8001, 0x70be, 0x702c, 0x2048, + 0xa800, 0x702e, 0xa803, 0x0000, 0xa807, 0x0000, 0x012e, 0x00ee, + 0x0005, 0x904e, 0x0cd8, 0x00e6, 0x0126, 0x2091, 0x8000, 0x0016, + 0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0xa862, 0x9184, 0xffc0, + 0xa85e, 0x001e, 0x0020, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, + 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, + 0x080c, 0x8245, 0x012e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9026, + 0x2009, 0x0000, 0x2049, 0x0400, 0x2900, 0x702e, 0x8940, 0x2800, + 0xa802, 0xa95e, 0xa863, 0x0001, 0x8420, 0x9886, 0x0440, 0x0120, + 0x2848, 0x9188, 0x0040, 0x0c90, 0x2071, 0x188e, 0x7000, 0x9005, + 0x11a0, 0x2001, 0x04d4, 0xa802, 0x2048, 0x2009, 0x3500, 0x8940, + 0x2800, 0xa802, 0xa95e, 0xa863, 0x0001, 0x8420, 0x9886, 0x0800, + 0x0120, 0x2848, 0x9188, 0x0040, 0x0c90, 0x2071, 0x188e, 0x7104, + 0x7200, 0x82ff, 0x01d0, 0x7308, 0x8318, 0x831f, 0x831b, 0x831b, + 0x7312, 0x8319, 0x2001, 0x0800, 0xa802, 0x2048, 0x8900, 0xa802, + 0x2040, 0xa95e, 0xaa62, 0x8420, 0x2300, 0x9906, 0x0130, 0x2848, + 0x9188, 0x0040, 0x9291, 0x0000, 0x0c88, 0xa803, 0x0000, 0x2071, + 0x1800, 0x74ba, 0x74be, 0x0005, 0x00e6, 0x0016, 0x9984, 0xfc00, + 0x01e8, 0x908c, 0xf800, 0x1168, 0x9982, 0x0400, 0x02b8, 0x9982, + 0x0440, 0x0278, 0x9982, 0x04d4, 0x0288, 0x9982, 0x0800, 0x1270, + 0x0040, 0x9982, 0x0800, 0x0250, 0x2071, 0x188e, 0x7010, 0x9902, + 0x1228, 0x9085, 0x0001, 0x001e, 0x00ee, 0x0005, 0x9006, 0x0cd8, + 0x00e6, 0x2071, 0x19f7, 0x7007, 0x0000, 0x9006, 0x701e, 0x7022, + 0x7002, 0x2071, 0x0000, 0x7010, 0x9085, 0x8044, 0x7012, 0x2071, + 0x0080, 0x9006, 0x20a9, 0x0040, 0x7022, 0x1f04, 0x10e4, 0x702b, + 0x0020, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6, 0xa073, + 0x0000, 0x2071, 0x19f7, 0x701c, 0x9088, 0x1a01, 0x280a, 0x8000, + 0x9084, 0x003f, 0x701e, 0x7120, 0x9106, 0x090c, 0x0dc4, 0x7004, + 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, 0x00a9, 0x00fe, 0x00ee, + 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6, 0x2071, 0x19f7, + 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, 0x0021, 0x00fe, + 0x00ee, 0x012e, 0x0005, 0x7004, 0x9086, 0x0000, 0x1110, 0x7007, + 0x0006, 0x7000, 0x0002, 0x112d, 0x112b, 0x112b, 0x112b, 0x12a7, + 0x12a7, 0x12a7, 0x12a7, 0x080c, 0x0dc4, 0x701c, 0x7120, 0x9106, + 0x1148, 0x792c, 0x9184, 0x0001, 0x1120, 0xd1fc, 0x1110, 0x7007, + 0x0000, 0x0005, 0x0096, 0x9180, 0x1a01, 0x2004, 0x700a, 0x2048, + 0x8108, 0x918c, 0x003f, 0x7122, 0x782b, 0x0026, 0xa890, 0x7802, + 0xa894, 0x7806, 0xa898, 0x780a, 0xa89c, 0x780e, 0xa87c, 0x700e, + 0xa874, 0x7016, 0xa878, 0x701a, 0xa86c, 0x009e, 0xd084, 0x0120, + 0x7007, 0x0001, 0x0029, 0x0005, 0x7007, 0x0002, 0x00b1, 0x0005, + 0x0016, 0x0026, 0x710c, 0x2011, 0x0040, 0x9182, 0x0040, 0x1210, + 0x2110, 0x9006, 0x700e, 0x7212, 0x8203, 0x7812, 0x782b, 0x0020, + 0x782b, 0x0041, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026, 0x0136, + 0x0146, 0x0156, 0x7014, 0x20e0, 0x7018, 0x2098, 0x20e9, 0x0000, + 0x20a1, 0x0088, 0x782b, 0x0026, 0x710c, 0x2011, 0x0040, 0x9182, + 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x22a8, 0x4006, 0x8203, + 0x7812, 0x782b, 0x0020, 0x3300, 0x701a, 0x782b, 0x0001, 0x015e, + 0x014e, 0x013e, 0x002e, 0x001e, 0x0005, 0x0016, 0x2009, 0x19f7, + 0x2104, 0xc095, 0x200a, 0x080c, 0x110a, 0x001e, 0x0005, 0x0016, + 0x00e6, 0x2071, 0x19f7, 0x00f6, 0x2079, 0x0080, 0x792c, 0xd1bc, + 0x190c, 0x0dbd, 0x782b, 0x0002, 0xd1fc, 0x0120, 0x918c, 0x0700, + 0x7004, 0x0023, 0x00fe, 0x00ee, 0x001e, 0x0005, 0x111b, 0x11c5, + 0x11f9, 0x0dc4, 0x0dc4, 0x12b3, 0x0dc4, 0x918c, 0x0700, 0x1550, + 0x0136, 0x0146, 0x0156, 0x7014, 0x20e8, 0x7018, 0x20a0, 0x20e1, + 0x0000, 0x2099, 0x0088, 0x782b, 0x0040, 0x7010, 0x20a8, 0x4005, + 0x3400, 0x701a, 0x015e, 0x014e, 0x013e, 0x700c, 0x9005, 0x0578, + 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x1160, 0x0005, 0x7008, + 0x0096, 0x2048, 0xa873, 0x0100, 0x009e, 0x7007, 0x0000, 0x080c, + 0x111b, 0x0005, 0x7008, 0x0096, 0x2048, 0xa873, 0x0200, 0x009e, + 0x0ca0, 0x918c, 0x0700, 0x1150, 0x700c, 0x9005, 0x0180, 0x7800, + 0x7802, 0x7804, 0x7806, 0x080c, 0x1175, 0x0005, 0x7008, 0x0096, + 0x2048, 0xa873, 0x0200, 0x009e, 0x7007, 0x0000, 0x0080, 0x0096, + 0x7008, 0x2048, 0x7800, 0xa892, 0x7804, 0xa896, 0x7808, 0xa89a, + 0x780c, 0xa89e, 0xa873, 0x0100, 0x009e, 0x7007, 0x0000, 0x0096, + 0x00d6, 0x7008, 0x2048, 0x2001, 0x18ba, 0x2004, 0x9906, 0x1128, + 0xa8a0, 0x080f, 0x00de, 0x009e, 0x00a0, 0x00de, 0x009e, 0x0096, + 0x00d6, 0x7008, 0x2048, 0x0081, 0x0150, 0xa8a0, 0x0086, 0x2940, + 0x080f, 0x008e, 0x00de, 0x009e, 0x080c, 0x110a, 0x0005, 0x00de, + 0x009e, 0x080c, 0x110a, 0x0005, 0xa8ac, 0xd08c, 0x0005, 0x0096, + 0xa0a4, 0x904d, 0x090c, 0x0dc4, 0xa070, 0x908e, 0x0100, 0x0130, + 0xa87f, 0x0030, 0xa887, 0x0000, 0xa89b, 0x4002, 0xa898, 0x908e, + 0x006b, 0x090c, 0x469d, 0x080c, 0x6b11, 0xa0a3, 0x0000, 0xa0a7, + 0x0000, 0x2848, 0x080c, 0x1033, 0x009e, 0x0005, 0x00a6, 0xa0a4, + 0x904d, 0x090c, 0x0dc4, 0xa070, 0x908e, 0x0100, 0x0128, 0xa87f, + 0x0001, 0xa887, 0x0000, 0x00c0, 0xa80c, 0x2050, 0xb004, 0x9005, + 0x0198, 0xa80e, 0x2050, 0x8006, 0x8006, 0x8007, 0x908c, 0x003f, + 0x9084, 0xffc0, 0x9080, 0x0002, 0xa07a, 0xa176, 0xb000, 0xa07e, + 0x2810, 0x080c, 0x10eb, 0x00c8, 0xa980, 0xa898, 0x0016, 0x0006, + 0x080c, 0x6b11, 0x000e, 0x001e, 0xd1a4, 0x0128, 0x00c6, 0x2060, + 0x080c, 0x9f18, 0x00ce, 0x7008, 0x2048, 0xa8a3, 0x0000, 0xa8a7, + 0x0000, 0x080c, 0x1033, 0x080c, 0x110a, 0x00ae, 0x0005, 0x0126, + 0x2091, 0x8000, 0x782b, 0x1001, 0x7007, 0x0005, 0x7000, 0xc094, + 0x7002, 0x012e, 0x0005, 0x7007, 0x0000, 0x080c, 0x111b, 0x0005, + 0x0126, 0x2091, 0x2200, 0x2079, 0x0300, 0x2071, 0x1a41, 0x7003, + 0x0000, 0x78bf, 0x00f6, 0x781b, 0x4800, 0x00c1, 0x7803, 0x0003, + 0x780f, 0x0000, 0x20a9, 0x0259, 0x2061, 0xd387, 0x2c0d, 0x7912, + 0xe104, 0x9ce0, 0x0002, 0x7916, 0x1f04, 0x12ce, 0x7807, 0x0007, + 0x7803, 0x0000, 0x7803, 0x0001, 0x012e, 0x0005, 0x00c6, 0x7803, + 0x0000, 0x7808, 0xd09c, 0x0110, 0x7820, 0x0cd8, 0x2001, 0x1a42, + 0x2003, 0x0000, 0x78ab, 0x0004, 0x78ac, 0xd0ac, 0x1de8, 0x78ab, + 0x0002, 0x7807, 0x0007, 0x7827, 0x0030, 0x782b, 0x0400, 0x7827, + 0x0031, 0x782b, 0x1a64, 0x781f, 0xff00, 0x781b, 0xb700, 0x2001, + 0x0200, 0x2004, 0xd0dc, 0x0110, 0x781f, 0x0303, 0x2061, 0x1a64, + 0x602f, 0x1cc8, 0x2001, 0x1819, 0x2004, 0x9082, 0x1cc8, 0x6032, + 0x603b, 0x1f70, 0x2001, 0x31cc, 0xd0fc, 0x190c, 0x0dc4, 0x2001, + 0x1810, 0x2004, 0xd0c4, 0x1128, 0x2001, 0x0003, 0x2004, 0xd0d4, + 0x1118, 0x783f, 0x31cc, 0x0020, 0x9084, 0xc000, 0x783f, 0xb1cc, + 0x00ce, 0x0005, 0x0126, 0x2091, 0x2200, 0x7908, 0x9184, 0x0030, + 0x190c, 0x0dbd, 0xd19c, 0x0158, 0x7820, 0x908c, 0xf000, 0x15f0, + 0x908a, 0x0024, 0x1a0c, 0x0dc4, 0x0023, 0x012e, 0x0005, 0x012e, + 0x0005, 0x1366, 0x1366, 0x137d, 0x1382, 0x1386, 0x138b, 0x13b3, + 0x13b7, 0x13c5, 0x13c9, 0x1366, 0x1452, 0x1456, 0x14c6, 0x1366, + 0x1366, 0x1366, 0x1366, 0x1366, 0x1366, 0x1366, 0x1366, 0x1366, + 0x1366, 0x1366, 0x1366, 0x1366, 0x138d, 0x1366, 0x1366, 0x1366, + 0x1366, 0x1366, 0x1366, 0x136a, 0x1368, 0x1366, 0x080c, 0x0dc4, + 0x080c, 0x0dbd, 0x080c, 0x14cd, 0x2009, 0x1a59, 0x2104, 0x8000, + 0x200a, 0x080c, 0x7d22, 0x080c, 0x199b, 0x0005, 0x2009, 0x0048, + 0x2060, 0x080c, 0x9f88, 0x012e, 0x0005, 0x7004, 0xc085, 0xc0b5, + 0x7006, 0x0005, 0x7004, 0xc085, 0x7006, 0x0005, 0x080c, 0x14cd, + 0x080c, 0x1636, 0x0005, 0x080c, 0x0dc4, 0x080c, 0x14cd, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, - 0x080c, 0x9d7a, 0x2001, 0x015d, 0x2003, 0x0000, 0x2009, 0x03e8, + 0x080c, 0x9f88, 0x2001, 0x015d, 0x2003, 0x0000, 0x2009, 0x03e8, 0x8109, 0x0160, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001, - 0x0218, 0x2004, 0xd0ec, 0x1110, 0x080c, 0x14d4, 0x2001, 0x0307, + 0x0218, 0x2004, 0xd0ec, 0x1110, 0x080c, 0x14d2, 0x2001, 0x0307, 0x2003, 0x8000, 0x0005, 0x7004, 0xc095, 0x7006, 0x0005, 0x080c, - 0x14cf, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, - 0x2009, 0x0048, 0x080c, 0x9d7a, 0x0005, 0x080c, 0x14cf, 0x080c, - 0x0dd1, 0x080c, 0x14cf, 0x080c, 0x143f, 0x7827, 0x0018, 0x79ac, + 0x14cd, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, + 0x2009, 0x0048, 0x080c, 0x9f88, 0x0005, 0x080c, 0x14cd, 0x080c, + 0x0dc4, 0x080c, 0x14cd, 0x080c, 0x143d, 0x7827, 0x0018, 0x79ac, 0xd1dc, 0x0540, 0x7827, 0x0015, 0x7828, 0x782b, 0x0000, 0x9065, 0x0138, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x0400, 0x7004, 0x9005, 0x1180, 0x78ab, 0x0004, 0x7827, 0x0018, 0x782b, - 0x0000, 0xd1bc, 0x090c, 0x0dd1, 0x2001, 0x020d, 0x2003, 0x0050, - 0x2003, 0x0020, 0x0448, 0x78ab, 0x0004, 0x7803, 0x0001, 0x080c, - 0x1458, 0x0005, 0x7828, 0x782b, 0x0000, 0x9065, 0x090c, 0x0dd1, - 0x6014, 0x2048, 0x78ab, 0x0004, 0x918c, 0x0700, 0x01a8, 0x080c, - 0x7bb0, 0x080c, 0x1984, 0x080c, 0xb6a7, 0x0158, 0xa9ac, 0xa936, - 0xa9b0, 0xa93a, 0xa83f, 0xffff, 0xa843, 0xffff, 0xa880, 0xc0bd, - 0xa882, 0x080c, 0xb31a, 0x0005, 0x2029, 0x00c8, 0x8529, 0x0128, - 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x7dbc, 0x080c, 0xd017, - 0xd5a4, 0x1118, 0x080c, 0x14d4, 0x0005, 0x080c, 0x7bb0, 0x080c, - 0x1984, 0x0005, 0x781f, 0x0300, 0x7803, 0x0001, 0x0005, 0x0016, - 0x0066, 0x0076, 0x00f6, 0x2079, 0x0300, 0x7908, 0x918c, 0x0007, - 0x9186, 0x0003, 0x0120, 0x2001, 0x0016, 0x080c, 0x1545, 0x00fe, - 0x007e, 0x006e, 0x001e, 0x0005, 0x7004, 0xc09d, 0x7006, 0x0005, - 0x7104, 0x9184, 0x0004, 0x190c, 0x0dd1, 0xd184, 0x11b1, 0xd19c, - 0x0180, 0xc19c, 0x7106, 0x0016, 0x080c, 0x160b, 0x001e, 0x0148, - 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x080c, 0x14d4, - 0x0005, 0x81ff, 0x190c, 0x0dd1, 0x0005, 0x2100, 0xc184, 0xc1b4, - 0x7106, 0xd0b4, 0x0016, 0x00e6, 0x1904, 0x14bd, 0x2071, 0x0200, - 0x080c, 0x15ff, 0x080c, 0x160b, 0x05a8, 0x6014, 0x9005, 0x05a8, - 0x0096, 0x2048, 0xa864, 0x009e, 0x9084, 0x00ff, 0x908e, 0x0029, - 0x0160, 0x908e, 0x0048, 0x1548, 0x601c, 0xd084, 0x11d8, 0x00f6, - 0x2c78, 0x080c, 0x1664, 0x00fe, 0x00a8, 0x00f6, 0x2c78, 0x080c, - 0x17a8, 0x00fe, 0x2009, 0x01f4, 0x8109, 0x0160, 0x2001, 0x0201, - 0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, - 0x0419, 0x0040, 0x2001, 0x020d, 0x2003, 0x0020, 0x080c, 0x12e7, - 0x7803, 0x0001, 0x00ee, 0x001e, 0x0005, 0x080c, 0x160b, 0x0dd0, - 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x0069, 0x0c90, - 0x0031, 0x2060, 0x2009, 0x0053, 0x080c, 0x9d7a, 0x0005, 0x7808, - 0xd09c, 0x0de8, 0x7820, 0x0005, 0x080c, 0x143f, 0x00d6, 0x2069, - 0x0200, 0x2009, 0x01f4, 0x8109, 0x0510, 0x6804, 0x9005, 0x0dd8, - 0x2001, 0x015d, 0x2003, 0x0000, 0x79bc, 0xd1a4, 0x1528, 0x79b8, - 0x918c, 0x0fff, 0x0180, 0x9182, 0x0841, 0x1268, 0x9188, 0x0007, - 0x918c, 0x0ff8, 0x810c, 0x810c, 0x810c, 0x080c, 0x1537, 0x6827, - 0x0001, 0x8109, 0x1dd0, 0x04d9, 0x6827, 0x0002, 0x04c1, 0x6804, - 0x9005, 0x1130, 0x682c, 0xd0e4, 0x1500, 0x6804, 0x9005, 0x0de8, - 0x79b8, 0xd1ec, 0x1130, 0x08c0, 0x080c, 0x7bb0, 0x080c, 0x1984, + 0x0000, 0xd1bc, 0x090c, 0x0dc4, 0x2001, 0x020d, 0x2003, 0x0050, + 0x2003, 0x0020, 0x0478, 0x78ab, 0x0004, 0x7803, 0x0001, 0x080c, + 0x1456, 0x0005, 0x7828, 0x782b, 0x0000, 0x9065, 0x090c, 0x0dc4, + 0x6014, 0x2048, 0x78ab, 0x0004, 0x918c, 0x0700, 0x01d8, 0x080c, + 0x7d22, 0x080c, 0x199b, 0x080c, 0xb955, 0x0158, 0xa9b0, 0xa936, + 0xa9b4, 0xa93a, 0xa83f, 0xffff, 0xa843, 0xffff, 0xa884, 0xc0bd, + 0xa886, 0xa984, 0x9184, 0x0020, 0x1120, 0xc1ad, 0xa986, 0x080c, + 0xb5c5, 0x0005, 0x2029, 0x00c8, 0x8529, 0x0128, 0x2001, 0x0201, + 0x2004, 0x9005, 0x0dc8, 0x7dbc, 0x080c, 0xd314, 0xd5a4, 0x1118, + 0x080c, 0x14d2, 0x0005, 0x080c, 0x7d22, 0x080c, 0x199b, 0x0005, + 0x781f, 0x0300, 0x7803, 0x0001, 0x0005, 0x0016, 0x0066, 0x0076, + 0x00f6, 0x2079, 0x0300, 0x7908, 0x918c, 0x0007, 0x9186, 0x0003, + 0x0120, 0x2001, 0x0016, 0x080c, 0x1553, 0x00fe, 0x007e, 0x006e, + 0x001e, 0x0005, 0x7004, 0xc09d, 0x7006, 0x0005, 0x7104, 0x9184, + 0x0004, 0x190c, 0x0dc4, 0xd184, 0x11b1, 0xd19c, 0x0180, 0xc19c, + 0x7106, 0x0016, 0x080c, 0x1619, 0x001e, 0x0148, 0x2001, 0x020d, + 0x2003, 0x0050, 0x2003, 0x0020, 0x080c, 0x14d2, 0x0005, 0x81ff, + 0x190c, 0x0dc4, 0x0005, 0x2100, 0xc184, 0xc1b4, 0x7106, 0xd0b4, + 0x0016, 0x00e6, 0x1904, 0x14bb, 0x2071, 0x0200, 0x080c, 0x160d, + 0x080c, 0x1619, 0x05a8, 0x6014, 0x9005, 0x05a8, 0x0096, 0x2048, + 0xa868, 0x009e, 0x9084, 0x00ff, 0x908e, 0x0029, 0x0160, 0x908e, + 0x0048, 0x1548, 0x601c, 0xd084, 0x11d8, 0x00f6, 0x2c78, 0x080c, + 0x1679, 0x00fe, 0x00a8, 0x00f6, 0x2c78, 0x080c, 0x17bd, 0x00fe, + 0x2009, 0x01f4, 0x8109, 0x0160, 0x2001, 0x0201, 0x2004, 0x9005, + 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, 0x0419, 0x0040, + 0x2001, 0x020d, 0x2003, 0x0020, 0x080c, 0x12de, 0x7803, 0x0001, + 0x00ee, 0x001e, 0x0005, 0x080c, 0x1619, 0x0dd0, 0x2001, 0x020d, + 0x2003, 0x0050, 0x2003, 0x0020, 0x0069, 0x0c90, 0x0031, 0x2060, + 0x2009, 0x0053, 0x080c, 0x9f88, 0x0005, 0x7808, 0xd09c, 0x0de8, + 0x7820, 0x0005, 0x080c, 0x143d, 0x00d6, 0x2069, 0x0200, 0x2009, + 0x01f4, 0x8109, 0x0520, 0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, + 0x2003, 0x0000, 0x79bc, 0xd1a4, 0x1578, 0x79b8, 0x918c, 0x0fff, + 0x0180, 0x9182, 0x0841, 0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, + 0x810c, 0x810c, 0x810c, 0x080c, 0x153f, 0x6827, 0x0001, 0x8109, + 0x1dd0, 0x080c, 0x153f, 0x6827, 0x0002, 0x080c, 0x153f, 0x6804, + 0x9005, 0x1170, 0x682c, 0xd0e4, 0x1540, 0x691c, 0x9184, 0x0014, + 0x0120, 0x6830, 0x9084, 0x9554, 0x15b9, 0x6804, 0x9005, 0x0da8, + 0x79b8, 0xd1ec, 0x1130, 0x0870, 0x080c, 0x7d22, 0x080c, 0x199b, 0x0090, 0x7827, 0x0015, 0x782b, 0x0000, 0x7827, 0x0018, 0x782b, 0x0000, 0x2001, 0x020d, 0x2003, 0x0020, 0x2001, 0x0307, 0x2003, 0x0300, 0x7803, 0x0001, 0x00de, 0x0005, 0x682c, 0x9084, 0x5400, 0x9086, 0x5400, 0x0d30, 0x7827, 0x0015, 0x782b, 0x0000, 0x7803, 0x0001, 0x6800, 0x9085, 0x1800, 0x6802, 0x00de, 0x0005, 0x6824, - 0x9084, 0x0003, 0x1de0, 0x0005, 0x2001, 0x0030, 0x2c08, 0x621c, - 0x0021, 0x7830, 0x9086, 0x0041, 0x0005, 0x00f6, 0x2079, 0x0300, - 0x0006, 0x7808, 0xd09c, 0x0140, 0x0016, 0x0026, 0x00c6, 0x080c, - 0x1333, 0x00ce, 0x002e, 0x001e, 0x000e, 0x0006, 0x7832, 0x7936, - 0x7a3a, 0x781b, 0x8080, 0x0059, 0x1118, 0x000e, 0x00fe, 0x0005, - 0x000e, 0x792c, 0x3900, 0x8000, 0x2004, 0x080c, 0x0dd1, 0x2009, - 0x180c, 0x2104, 0xc0f4, 0x200a, 0x2009, 0xff00, 0x8109, 0x0904, - 0x15c3, 0x7a18, 0x9284, 0x0030, 0x0904, 0x15be, 0x9284, 0x0048, - 0x9086, 0x0008, 0x1904, 0x15be, 0x2001, 0x0109, 0x2004, 0xd08c, - 0x01f0, 0x0006, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x0126, - 0x2091, 0x2800, 0x00f6, 0x0026, 0x0016, 0x2009, 0x1a59, 0x2104, - 0x8000, 0x0208, 0x200a, 0x080c, 0x84a8, 0x001e, 0x002e, 0x00fe, - 0x012e, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x000e, 0x2001, - 0x009b, 0x2004, 0xd0fc, 0x01d0, 0x0006, 0x0126, 0x01c6, 0x01d6, - 0x0136, 0x0146, 0x0156, 0x00f6, 0x0016, 0x2009, 0x1a5a, 0x2104, - 0x8000, 0x0208, 0x200a, 0x080c, 0x1d7d, 0x001e, 0x00fe, 0x015e, - 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e, 0x000e, 0x7818, 0xd0bc, - 0x1904, 0x156e, 0x0005, 0x2001, 0x180c, 0x2004, 0xd0f4, 0x1528, - 0x7a18, 0x9284, 0x0030, 0x0508, 0x9284, 0x0048, 0x9086, 0x0008, - 0x11e0, 0x2001, 0x19d0, 0x2004, 0x9005, 0x01b8, 0x2001, 0x1a41, - 0x2004, 0x9086, 0x0000, 0x0188, 0x2009, 0x1a58, 0x2104, 0x8000, - 0x0208, 0x200a, 0x080c, 0x94c6, 0x2009, 0x180c, 0x2104, 0xc0f5, - 0x200a, 0x2009, 0xff00, 0x0804, 0x156e, 0x9085, 0x0001, 0x0005, - 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x080c, 0x1567, 0x1108, - 0x0005, 0x792c, 0x3900, 0x8000, 0x2004, 0x080c, 0x0dd1, 0x7037, - 0x0001, 0x7150, 0x7037, 0x0002, 0x7050, 0x2060, 0xd1bc, 0x1110, - 0x7054, 0x2060, 0x0005, 0x0006, 0x0046, 0x00e6, 0x2071, 0x0200, - 0x7037, 0x0002, 0x7058, 0x9084, 0xff00, 0x8007, 0x9086, 0x00bc, - 0x1158, 0x2021, 0x1a57, 0x2404, 0x8000, 0x0208, 0x2022, 0x080c, - 0x7bb0, 0x080c, 0x1984, 0x9006, 0x00ee, 0x004e, 0x000e, 0x0005, - 0x0c11, 0x1108, 0x0005, 0x00e6, 0x0016, 0x2071, 0x0200, 0x0879, - 0x7358, 0x745c, 0x6014, 0x905d, 0x0520, 0x2b48, 0xab42, 0xac3e, - 0x2001, 0x187d, 0x2004, 0xd0b4, 0x1138, 0x601c, 0xd0e4, 0x1120, - 0xa83b, 0x7fff, 0xa837, 0xffff, 0x080c, 0x1f79, 0x1190, 0x080c, - 0x1805, 0x2a00, 0xa816, 0x0130, 0x2800, 0xa80e, 0x2c05, 0xa80a, - 0x2c00, 0xa812, 0x7037, 0x0020, 0x781f, 0x0300, 0x001e, 0x00ee, - 0x0005, 0x7037, 0x0050, 0x7037, 0x0020, 0x001e, 0x00ee, 0x080c, - 0x14d4, 0x0005, 0x080c, 0x0dd1, 0x2001, 0x180d, 0x2004, 0xd08c, - 0x190c, 0x66a5, 0x2ff0, 0x0126, 0x2091, 0x2200, 0x0016, 0x00c6, - 0x3e60, 0x6014, 0x2048, 0x2940, 0x903e, 0x2730, 0xa864, 0x2068, - 0xa81a, 0x9d84, 0x000f, 0x9088, 0x1f59, 0x2165, 0x0002, 0x1696, - 0x16e3, 0x1696, 0x1696, 0x1696, 0x16c5, 0x1696, 0x169a, 0x168f, - 0x16da, 0x1696, 0x1696, 0x1696, 0x17a0, 0x16ae, 0x16a4, 0xa964, - 0x918c, 0x00ff, 0x918e, 0x0048, 0x0904, 0x16da, 0x9085, 0x0001, - 0x0804, 0x1796, 0xa87c, 0xd0bc, 0x0dc8, 0xa890, 0xa842, 0xa88c, - 0xa83e, 0xa888, 0x0804, 0x16ea, 0xa87c, 0xd0bc, 0x0d78, 0xa890, - 0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x1739, 0xa87c, 0xd0bc, - 0x0d28, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa804, 0x9045, 0x090c, - 0x0dd1, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1f59, 0x2065, - 0xa888, 0xd19c, 0x1904, 0x1739, 0x0428, 0xa87c, 0xd0ac, 0x0970, - 0xa804, 0x9045, 0x090c, 0x0dd1, 0xa164, 0xa91a, 0x91ec, 0x000f, - 0x9d80, 0x1f59, 0x2065, 0x9006, 0xa842, 0xa83e, 0xd19c, 0x1904, - 0x1739, 0x0080, 0xa87c, 0xd0ac, 0x0904, 0x1696, 0x9006, 0xa842, - 0xa83e, 0x0804, 0x1739, 0xa87c, 0xd0ac, 0x0904, 0x1696, 0x9006, - 0xa842, 0xa83e, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0dd1, 0x9082, - 0x001b, 0x0002, 0x170d, 0x170d, 0x170f, 0x170d, 0x170d, 0x170d, - 0x1715, 0x170d, 0x170d, 0x170d, 0x171b, 0x170d, 0x170d, 0x170d, - 0x1721, 0x170d, 0x170d, 0x170d, 0x1727, 0x170d, 0x170d, 0x170d, - 0x172d, 0x170d, 0x170d, 0x170d, 0x1733, 0x080c, 0x0dd1, 0xa574, - 0xa478, 0xa37c, 0xa280, 0x0804, 0x177e, 0xa584, 0xa488, 0xa38c, - 0xa290, 0x0804, 0x177e, 0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804, - 0x177e, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804, 0x177e, 0xa5b4, - 0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x177e, 0xa5c4, 0xa4c8, 0xa3cc, - 0xa2d0, 0x0804, 0x177e, 0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804, - 0x177e, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd1, 0x9082, 0x001b, - 0x0002, 0x175c, 0x175a, 0x175a, 0x175a, 0x175a, 0x175a, 0x1763, - 0x175a, 0x175a, 0x175a, 0x175a, 0x175a, 0x176a, 0x175a, 0x175a, - 0x175a, 0x175a, 0x175a, 0x1771, 0x175a, 0x175a, 0x175a, 0x175a, - 0x175a, 0x1778, 0x080c, 0x0dd1, 0xa56c, 0xa470, 0xa774, 0xa678, - 0xa37c, 0xa280, 0x00d8, 0xa584, 0xa488, 0xa78c, 0xa690, 0xa394, - 0xa298, 0x00a0, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, - 0x0068, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8, 0x0030, - 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, 0xab2e, 0xaa32, - 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa988, 0x8c60, 0x2c1d, 0xa8ac, - 0xaab0, 0xa836, 0xaa3a, 0x8109, 0xa916, 0x1160, 0x3e60, 0x601c, - 0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x001e, - 0x012e, 0x0005, 0x2800, 0xa80e, 0xab0a, 0x2c00, 0xa812, 0x0c70, - 0x0804, 0x1696, 0x2001, 0x180d, 0x2004, 0xd08c, 0x190c, 0x66a5, - 0x2ff0, 0x0126, 0x2091, 0x2200, 0x0016, 0x00c6, 0x3e60, 0x6014, - 0x2048, 0x2940, 0xa80e, 0x2061, 0x1f54, 0xa813, 0x1f54, 0x2c05, - 0xa80a, 0xa964, 0xa91a, 0xa87c, 0xd0ac, 0x090c, 0x0dd1, 0x9006, - 0xa842, 0xa83e, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd1, 0xadcc, - 0xacd0, 0xafd4, 0xaed8, 0xabdc, 0xaae0, 0xab2e, 0xaa32, 0xad1e, - 0xac22, 0xaf26, 0xae2a, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0xa988, - 0xa864, 0x9084, 0x00ff, 0x9086, 0x0008, 0x1120, 0x8109, 0xa916, - 0x0128, 0x0080, 0x918a, 0x0002, 0xa916, 0x1160, 0x3e60, 0x601c, - 0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x001e, - 0x012e, 0x0005, 0xa804, 0x9045, 0x090c, 0x0dd1, 0xa80e, 0xa064, - 0xa81a, 0x9084, 0x000f, 0x9080, 0x1f59, 0x2015, 0x82ff, 0x090c, - 0x0dd1, 0xaa12, 0x2205, 0xa80a, 0x0c08, 0x903e, 0x2730, 0xa880, - 0xd0fc, 0x1190, 0x2d00, 0x0002, 0x18fa, 0x185c, 0x185c, 0x18fa, - 0x18fa, 0x18f4, 0x18fa, 0x185c, 0x18ab, 0x18ab, 0x18ab, 0x18fa, - 0x18fa, 0x18fa, 0x18f1, 0x18ab, 0xc0fc, 0xa882, 0xab2c, 0xaa30, - 0xad1c, 0xac20, 0xdd9c, 0x0904, 0x18fc, 0x2c05, 0x908a, 0x0034, - 0x1a0c, 0x0dd1, 0x9082, 0x001b, 0x0002, 0x1848, 0x1846, 0x1846, - 0x1846, 0x1846, 0x1846, 0x184c, 0x1846, 0x1846, 0x1846, 0x1846, - 0x1846, 0x1850, 0x1846, 0x1846, 0x1846, 0x1846, 0x1846, 0x1854, - 0x1846, 0x1846, 0x1846, 0x1846, 0x1846, 0x1858, 0x080c, 0x0dd1, - 0xa774, 0xa678, 0x0804, 0x18fc, 0xa78c, 0xa690, 0x0804, 0x18fc, - 0xa7a4, 0xa6a8, 0x0804, 0x18fc, 0xa7bc, 0xa6c0, 0x0804, 0x18fc, - 0xa7d4, 0xa6d8, 0x0804, 0x18fc, 0x2c05, 0x908a, 0x0036, 0x1a0c, - 0x0dd1, 0x9082, 0x001b, 0x0002, 0x187f, 0x187f, 0x1881, 0x187f, - 0x187f, 0x187f, 0x1887, 0x187f, 0x187f, 0x187f, 0x188d, 0x187f, - 0x187f, 0x187f, 0x1893, 0x187f, 0x187f, 0x187f, 0x1899, 0x187f, - 0x187f, 0x187f, 0x189f, 0x187f, 0x187f, 0x187f, 0x18a5, 0x080c, - 0x0dd1, 0xa574, 0xa478, 0xa37c, 0xa280, 0x0804, 0x18fc, 0xa584, - 0xa488, 0xa38c, 0xa290, 0x0804, 0x18fc, 0xa594, 0xa498, 0xa39c, - 0xa2a0, 0x0804, 0x18fc, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804, - 0x18fc, 0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x18fc, 0xa5c4, - 0xa4c8, 0xa3cc, 0xa2d0, 0x0804, 0x18fc, 0xa5d4, 0xa4d8, 0xa3dc, - 0xa2e0, 0x0804, 0x18fc, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd1, - 0x9082, 0x001b, 0x0002, 0x18ce, 0x18cc, 0x18cc, 0x18cc, 0x18cc, - 0x18cc, 0x18d5, 0x18cc, 0x18cc, 0x18cc, 0x18cc, 0x18cc, 0x18dc, - 0x18cc, 0x18cc, 0x18cc, 0x18cc, 0x18cc, 0x18e3, 0x18cc, 0x18cc, - 0x18cc, 0x18cc, 0x18cc, 0x18ea, 0x080c, 0x0dd1, 0xa56c, 0xa470, - 0xa774, 0xa678, 0xa37c, 0xa280, 0x0438, 0xa584, 0xa488, 0xa78c, - 0xa690, 0xa394, 0xa298, 0x0400, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, - 0xa3ac, 0xa2b0, 0x00c8, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, - 0xa2c8, 0x0090, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, - 0x0058, 0x9d86, 0x000e, 0x1130, 0x080c, 0x1f11, 0x1904, 0x1805, - 0x900e, 0x0050, 0x080c, 0x0dd1, 0xab2e, 0xaa32, 0xad1e, 0xac22, - 0xaf26, 0xae2a, 0x080c, 0x1f11, 0x0005, 0x6014, 0x2048, 0x6118, - 0x81ff, 0x0148, 0x810c, 0x810c, 0x810c, 0x81ff, 0x1118, 0xa887, - 0x0001, 0x0008, 0xa986, 0x601b, 0x0002, 0xa874, 0x9084, 0x00ff, - 0x9084, 0x0008, 0x0150, 0x00e9, 0x6000, 0x9086, 0x0004, 0x1120, - 0x2009, 0x0048, 0x080c, 0x9d7a, 0x0005, 0xa974, 0xd1dc, 0x1108, - 0x0005, 0xa934, 0xa88c, 0x9106, 0x1158, 0xa938, 0xa890, 0x9106, - 0x1138, 0x601c, 0xc084, 0x601e, 0x2009, 0x0048, 0x0804, 0x9d7a, - 0x0005, 0x0126, 0x00c6, 0x2091, 0x2200, 0x00ce, 0x7908, 0x918c, - 0x0007, 0x9186, 0x0000, 0x05b0, 0x9186, 0x0003, 0x0598, 0x6020, - 0x6023, 0x0000, 0x0006, 0x2031, 0x0008, 0x00c6, 0x781f, 0x0808, - 0x7808, 0xd09c, 0x0120, 0x080c, 0x1333, 0x8631, 0x1db8, 0x00ce, - 0x781f, 0x0800, 0x2031, 0x0168, 0x00c6, 0x7808, 0xd09c, 0x190c, - 0x1333, 0x00ce, 0x2001, 0x0038, 0x080c, 0x1a14, 0x7930, 0x9186, - 0x0040, 0x0160, 0x9186, 0x0042, 0x190c, 0x0dd1, 0x2001, 0x001e, - 0x8001, 0x1df0, 0x8631, 0x1d40, 0x080c, 0x1a23, 0x000e, 0x6022, - 0x012e, 0x0005, 0x080c, 0x1a10, 0x7827, 0x0015, 0x7828, 0x9c06, - 0x1db8, 0x782b, 0x0000, 0x0ca0, 0x00f6, 0x2079, 0x0300, 0x7803, - 0x0000, 0x78ab, 0x0004, 0x2001, 0xf000, 0x8001, 0x090c, 0x0dd1, - 0x7aac, 0xd2ac, 0x1dd0, 0x00fe, 0x080c, 0x7173, 0x1188, 0x2001, - 0x0138, 0x2003, 0x0000, 0x2001, 0x0160, 0x2003, 0x0000, 0x2011, - 0x012c, 0xa001, 0xa001, 0x8211, 0x1de0, 0x0059, 0x0804, 0x7221, - 0x0479, 0x0039, 0x2001, 0x0160, 0x2502, 0x2001, 0x0138, 0x2202, - 0x0005, 0x00e6, 0x2071, 0x0200, 0x080c, 0x2a67, 0x2009, 0x003c, - 0x080c, 0x229b, 0x2001, 0x015d, 0x2003, 0x0000, 0x7000, 0x9084, - 0x003c, 0x1de0, 0x080c, 0x8091, 0x70a0, 0x70a2, 0x7098, 0x709a, - 0x709c, 0x709e, 0x2001, 0x020d, 0x2003, 0x0020, 0x00f6, 0x2079, - 0x0300, 0x080c, 0x12e7, 0x7803, 0x0001, 0x00fe, 0x00ee, 0x0005, - 0x2001, 0x0138, 0x2014, 0x2003, 0x0000, 0x2001, 0x0160, 0x202c, - 0x2003, 0x0000, 0x080c, 0x7173, 0x1108, 0x0005, 0x2021, 0x0260, - 0x2001, 0x0141, 0x201c, 0xd3dc, 0x1168, 0x2001, 0x0109, 0x201c, - 0x939c, 0x0048, 0x1160, 0x2001, 0x0111, 0x201c, 0x83ff, 0x1110, - 0x8421, 0x1d70, 0x2001, 0x015d, 0x2003, 0x0000, 0x0005, 0x0046, - 0x2021, 0x0019, 0x2003, 0x0048, 0xa001, 0xa001, 0x201c, 0x939c, - 0x0048, 0x0120, 0x8421, 0x1db0, 0x004e, 0x0c60, 0x004e, 0x0c40, - 0x601c, 0xc084, 0x601e, 0x0005, 0x2c08, 0x621c, 0x080c, 0x1545, - 0x7930, 0x0005, 0x2c08, 0x621c, 0x080c, 0x15f0, 0x7930, 0x0005, - 0x8001, 0x1df0, 0x0005, 0x2031, 0x0064, 0x781c, 0x9084, 0x0007, - 0x0170, 0x2001, 0x0038, 0x0c41, 0x9186, 0x0040, 0x0904, 0x1a81, - 0x2001, 0x001e, 0x0c69, 0x8631, 0x1d80, 0x080c, 0x0dd1, 0x781f, - 0x0202, 0x2001, 0x015d, 0x2003, 0x0000, 0x2001, 0x0dac, 0x0c01, - 0x781c, 0xd084, 0x0110, 0x0861, 0x04e0, 0x2001, 0x0030, 0x0891, - 0x9186, 0x0040, 0x0568, 0x781c, 0xd084, 0x1da8, 0x781f, 0x0101, - 0x2001, 0x0014, 0x0869, 0x2001, 0x0037, 0x0821, 0x9186, 0x0040, - 0x0140, 0x2001, 0x0030, 0x080c, 0x1a1a, 0x9186, 0x0040, 0x190c, - 0x0dd1, 0x00d6, 0x2069, 0x0200, 0x692c, 0xd1f4, 0x1170, 0xd1c4, - 0x0160, 0xd19c, 0x0130, 0x6800, 0x9085, 0x1800, 0x6802, 0x00de, - 0x0080, 0x6908, 0x9184, 0x0007, 0x1db0, 0x00de, 0x781f, 0x0100, - 0x791c, 0x9184, 0x0007, 0x090c, 0x0dd1, 0xa001, 0xa001, 0x781f, - 0x0200, 0x0005, 0x0126, 0x2091, 0x2400, 0x2071, 0x1a41, 0x2079, - 0x0090, 0x012e, 0x0005, 0x9280, 0x0005, 0x2004, 0x2048, 0xa97c, - 0xd1dc, 0x1904, 0x1b16, 0xa964, 0x9184, 0x0007, 0x0002, 0x1a9f, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From mjacob at FreeBSD.org Sat Aug 1 01:04:26 2009 From: mjacob at FreeBSD.org (Matt Jacob) Date: Sat Aug 1 01:04:34 2009 Subject: svn commit: r196008 - in head/sys: cam dev/isp Message-ID: <200908010104.n7114Qxa085932@svn.freebsd.org> Author: mjacob Date: Sat Aug 1 01:04:26 2009 New Revision: 196008 URL: http://svn.freebsd.org/changeset/base/196008 Log: Add 8Gb support (isp_2500). Fix a fair number of configuration and firmware loading bugs. Target mode support has received some serious attention to make it more usable and stable. Some backward compatible additions to CAM have been made that make target mode async events easier to deal with have also been put into place. Further refinement and better support for NP-IV (N-port Virtualization) is now in place. Code for release prior to RELENG_7 has been stripped away for code clarity. Sponsored by: Copan Systems Reviewed by: scottl, ken, jung-uk kim Approved by: re Modified: head/sys/cam/cam_ccb.h head/sys/cam/cam_xpt.c head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/isp_ioctl.h head/sys/dev/isp/isp_library.c head/sys/dev/isp/isp_library.h head/sys/dev/isp/isp_pci.c head/sys/dev/isp/isp_sbus.c head/sys/dev/isp/isp_stds.h head/sys/dev/isp/isp_target.c head/sys/dev/isp/isp_target.h head/sys/dev/isp/ispmbox.h head/sys/dev/isp/ispreg.h head/sys/dev/isp/ispvar.h Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Sat Aug 1 00:57:34 2009 (r196007) +++ head/sys/cam/cam_ccb.h Sat Aug 1 01:04:26 2009 (r196008) @@ -173,6 +173,15 @@ typedef enum { XPT_ATA_IO = 0x18 | XPT_FC_DEV_QUEUED, /* Execute the requested ATA I/O operation */ + XPT_GET_SIM_KNOB = 0x18, + /* + * Get SIM specific knob values. + */ + + XPT_SET_SIM_KNOB = 0x19, + /* + * Set SIM specific knob values. + */ /* HBA engine commands 0x20->0x2F */ XPT_ENG_INQ = 0x20 | XPT_FC_XPT_ONLY, /* HBA engine feature inquiry */ @@ -189,8 +198,12 @@ typedef enum { XPT_CONT_TARGET_IO = 0x33 | XPT_FC_DEV_QUEUED, /* Continue Host Target I/O Connection */ XPT_IMMED_NOTIFY = 0x34 | XPT_FC_QUEUED | XPT_FC_USER_CCB, - /* Notify Host Target driver of event */ + /* Notify Host Target driver of event (obsolete) */ XPT_NOTIFY_ACK = 0x35, + /* Acknowledgement of event (obsolete) */ + XPT_IMMEDIATE_NOTIFY = 0x36 | XPT_FC_QUEUED | XPT_FC_USER_CCB, + /* Notify Host Target driver of event */ + XPT_NOTIFY_ACKNOWLEDGE = 0x37 | XPT_FC_QUEUED | XPT_FC_USER_CCB, /* Acknowledgement of event */ /* Vendor Unique codes: 0x80->0x8F */ @@ -531,12 +544,14 @@ typedef enum { struct ccb_pathinq_settings_spi { u_int8_t ppr_options; }; + struct ccb_pathinq_settings_fc { u_int64_t wwnn; /* world wide node name */ u_int64_t wwpn; /* world wide port name */ u_int32_t port; /* 24 bit port id, if known */ u_int32_t bitrate; /* Mbps */ }; + struct ccb_pathinq_settings_sas { u_int32_t bitrate; /* Mbps */ }; @@ -678,6 +693,7 @@ struct ccb_relsim { * Definitions for the asynchronous callback CCB fields. */ typedef enum { + AC_CONTRACT = 0x1000,/* A contractual callback */ AC_GETDEV_CHANGED = 0x800,/* Getdev info might have changed */ AC_INQ_CHANGED = 0x400,/* Inquiry info might have changed */ AC_TRANSFER_NEG = 0x200,/* New transfer settings in effect */ @@ -694,6 +710,26 @@ typedef enum { typedef void ac_callback_t (void *softc, u_int32_t code, struct cam_path *path, void *args); +/* + * Generic Asynchronous callbacks. + * + * Generic arguments passed bac which are then interpreted between a per-system + * contract number. + */ +#define AC_CONTRACT_DATA_MAX (128 - sizeof (u_int64_t)) +struct ac_contract { + u_int64_t contract_number; + u_int8_t contract_data[AC_CONTRACT_DATA_MAX]; +}; + +#define AC_CONTRACT_DEV_CHG 1 +struct ac_device_changed { + u_int64_t wwpn; + u_int32_t port; + target_id_t target; + u_int8_t arrived; +}; + /* Set Asynchronous Callback CCB */ struct ccb_setasync { struct ccb_hdr ccb_h; @@ -823,6 +859,50 @@ struct ccb_calc_geometry { }; /* + * Set or get SIM (and transport) specific knobs + */ + +#define KNOB_VALID_ADDRESS 0x1 +#define KNOB_VALID_ROLE 0x2 + + +#define KNOB_ROLE_NONE 0x0 +#define KNOB_ROLE_INITIATOR 0x1 +#define KNOB_ROLE_TARGET 0x2 +#define KNOB_ROLE_BOTH 0x3 + +struct ccb_sim_knob_settings_spi { + u_int valid; + u_int initiator_id; + u_int role; +}; + +struct ccb_sim_knob_settings_fc { + u_int valid; + u_int64_t wwnn; /* world wide node name */ + u_int64_t wwpn; /* world wide port name */ + u_int role; +}; + +struct ccb_sim_knob_settings_sas { + u_int valid; + u_int64_t wwnn; /* world wide node name */ + u_int role; +}; +#define KNOB_SETTINGS_SIZE 128 + +struct ccb_sim_knob { + struct ccb_hdr ccb_h; + union { + u_int valid; /* Which fields to honor */ + struct ccb_sim_knob_settings_spi spi; + struct ccb_sim_knob_settings_fc fc; + struct ccb_sim_knob_settings_sas sas; + char pad[KNOB_SETTINGS_SIZE]; + } xport_specific; +}; + +/* * Rescan the given bus, or bus/target/lun */ struct ccb_rescan { @@ -847,6 +927,7 @@ struct ccb_en_lun { u_int8_t enable; }; +/* old, barely used immediate notify, binary compatibility */ struct ccb_immed_notify { struct ccb_hdr ccb_h; struct scsi_sense_data sense_data; @@ -861,6 +942,22 @@ struct ccb_notify_ack { u_int8_t event; /* Event flags */ }; +struct ccb_immediate_notify { + struct ccb_hdr ccb_h; + u_int tag_id; /* Tag for immediate notify */ + u_int seq_id; /* Tag for target of notify */ + u_int initiator_id; /* Initiator Identifier */ + u_int arg; /* Function specific */ +}; + +struct ccb_notify_acknowledge { + struct ccb_hdr ccb_h; + u_int tag_id; /* Tag for immediate notify */ + u_int seq_id; /* Tar for target of notify */ + u_int initiator_id; /* Initiator Identifier */ + u_int arg; /* Function specific */ +}; + /* HBA engine structures. */ typedef enum { @@ -935,6 +1032,7 @@ union ccb { struct ccb_dev_match cdm; struct ccb_trans_settings cts; struct ccb_calc_geometry ccg; + struct ccb_sim_knob knob; struct ccb_abort cab; struct ccb_resetbus crb; struct ccb_resetdev crd; @@ -944,6 +1042,8 @@ union ccb { struct ccb_en_lun cel; struct ccb_immed_notify cin; struct ccb_notify_ack cna; + struct ccb_immediate_notify cin1; + struct ccb_notify_acknowledge cna2; struct ccb_eng_inq cei; struct ccb_eng_exec cee; struct ccb_rescan crcn; Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sat Aug 1 00:57:34 2009 (r196007) +++ head/sys/cam/cam_xpt.c Sat Aug 1 01:04:26 2009 (r196008) @@ -2565,6 +2565,10 @@ xpt_action_default(union ccb *start_ccb) case XPT_IMMED_NOTIFY: case XPT_NOTIFY_ACK: case XPT_RESET_BUS: + case XPT_IMMEDIATE_NOTIFY: + case XPT_NOTIFY_ACKNOWLEDGE: + case XPT_GET_SIM_KNOB: + case XPT_SET_SIM_KNOB: { struct cam_sim *sim; Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sat Aug 1 00:57:34 2009 (r196007) +++ head/sys/dev/isp/isp.c Sat Aug 1 01:04:26 2009 (r196008) @@ -1,17 +1,17 @@ /*- - * Copyright (c) 1997-2007 by Matthew Jacob + * Copyright (c) 1997-2009 by Matthew Jacob * 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 AUTHOR 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 @@ -23,6 +23,7 @@ * 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. + * */ /* @@ -64,51 +65,52 @@ __FBSDID("$FreeBSD$"); */ #define MBOX_DELAY_COUNT 1000000 / 100 -#define ISP_MARK_PORTDB(a, b) \ - isp_prt(isp, ISP_LOGSANCFG, "line %d: markportdb", __LINE__); \ - isp_mark_portdb(a, b) +#define ISP_MARK_PORTDB(a, b, c) \ + isp_prt(isp, ISP_LOGSANCFG, \ + "Chan %d ISP_MARK_PORTDB@LINE %d", b, __LINE__); \ + isp_mark_portdb(a, b, c) /* * Local static data */ -static const char fconf[] = - "PortDB[%d] changed:\n current =(0x%x@0x%06x 0x%08x%08x 0x%08x%08x)\n" - " database=(0x%x@0x%06x 0x%08x%08x 0x%08x%08x)"; -static const char notresp[] = - "Not RESPONSE in RESPONSE Queue (type 0x%x) @ idx %d (next %d) nlooked %d"; -static const char xact1[] = - "HBA attempted queued transaction with disconnect not set for %d.%d.%d"; -static const char xact2[] = - "HBA attempted queued transaction to target routine %d on target %d bus %d"; -static const char xact3[] = - "HBA attempted queued cmd for %d.%d.%d when queueing disabled"; -static const char pskip[] = - "SCSI phase skipped for target %d.%d.%d"; -static const char topology[] = - "HBA PortID 0x%06x N-Port Handle %d, Connection Topology '%s'"; -static const char ourwwn[] = - "HBA WWNN 0x%08x%08x HBA WWPN 0x%08x%08x"; -static const char finmsg[] = - "%d.%d.%d: FIN dl%d resid %d STS 0x%x SKEY %c XS_ERR=0x%x"; -static const char sc0[] = - "%s CHAN %d FTHRSH %d IID %d RESETD %d RETRYC %d RETRYD %d ASD 0x%x"; -static const char sc1[] = - "%s RAAN 0x%x DLAN 0x%x DDMAB 0x%x CDMAB 0x%x SELTIME %d MQD %d"; -static const char sc2[] = "%s CHAN %d TGT %d FLAGS 0x%x 0x%x/0x%x"; -static const char sc3[] = "Generated"; +static const char fconf[] = "Chan %d PortDB[%d] changed:\n current =(0x%x@0x%06x 0x%08x%08x 0x%08x%08x)\n database=(0x%x@0x%06x 0x%08x%08x 0x%08x%08x)"; +static const char notresp[] = "Not RESPONSE in RESPONSE Queue (type 0x%x) @ idx %d (next %d) nlooked %d"; +static const char xact1[] = "HBA attempted queued transaction with disconnect not set for %d.%d.%d"; +static const char xact2[] = "HBA attempted queued transaction to target routine %d on target %d bus %d"; +static const char xact3[] = "HBA attempted queued cmd for %d.%d.%d when queueing disabled"; +static const char pskip[] = "SCSI phase skipped for target %d.%d.%d"; +static const char topology[] = "Chan %d WWPN 0x%08x%08x PortID 0x%06x N-Port Handle %d, Connection '%s'"; +static const char finmsg[] = "%d.%d.%d: FIN dl%d resid %ld STS 0x%x SKEY %c XS_ERR=0x%x"; static const char sc4[] = "NVRAM"; -static const char bun[] = - "bad underrun for %d.%d (count %d, resid %d, status %s)"; +static const char bun[] = "bad underrun for %d.%d (count %d, resid %d, status %s)"; +static const char lipd[] = "Chan %d LIP destroyed %d active commands"; +static const char sacq[] = "unable to acquire scratch area"; + +static const uint8_t alpa_map[] = { + 0xef, 0xe8, 0xe4, 0xe2, 0xe1, 0xe0, 0xdc, 0xda, + 0xd9, 0xd6, 0xd5, 0xd4, 0xd3, 0xd2, 0xd1, 0xce, + 0xcd, 0xcc, 0xcb, 0xca, 0xc9, 0xc7, 0xc6, 0xc5, + 0xc3, 0xbc, 0xba, 0xb9, 0xb6, 0xb5, 0xb4, 0xb3, + 0xb2, 0xb1, 0xae, 0xad, 0xac, 0xab, 0xaa, 0xa9, + 0xa7, 0xa6, 0xa5, 0xa3, 0x9f, 0x9e, 0x9d, 0x9b, + 0x98, 0x97, 0x90, 0x8f, 0x88, 0x84, 0x82, 0x81, + 0x80, 0x7c, 0x7a, 0x79, 0x76, 0x75, 0x74, 0x73, + 0x72, 0x71, 0x6e, 0x6d, 0x6c, 0x6b, 0x6a, 0x69, + 0x67, 0x66, 0x65, 0x63, 0x5c, 0x5a, 0x59, 0x56, + 0x55, 0x54, 0x53, 0x52, 0x51, 0x4e, 0x4d, 0x4c, + 0x4b, 0x4a, 0x49, 0x47, 0x46, 0x45, 0x43, 0x3c, + 0x3a, 0x39, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, + 0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x29, 0x27, 0x26, + 0x25, 0x23, 0x1f, 0x1e, 0x1d, 0x1b, 0x18, 0x17, + 0x10, 0x0f, 0x08, 0x04, 0x02, 0x01, 0x00 +}; /* * Local function prototypes. */ static int isp_parse_async(ispsoftc_t *, uint16_t); -static int isp_handle_other_response(ispsoftc_t *, int, isphdr_t *, - uint32_t *); -static void -isp_parse_status(ispsoftc_t *, ispstatusreq_t *, XS_T *, long *); -static void +static int isp_handle_other_response(ispsoftc_t *, int, isphdr_t *, uint32_t *); +static void isp_parse_status(ispsoftc_t *, ispstatusreq_t *, XS_T *, long *); static void isp_parse_status_24xx(ispsoftc_t *, isp24xx_statusreq_t *, XS_T *, long *); static void isp_fastpost_complete(ispsoftc_t *, uint16_t); static int isp_mbox_continue(ispsoftc_t *); @@ -116,39 +118,37 @@ static void isp_scsi_init(ispsoftc_t *); static void isp_scsi_channel_init(ispsoftc_t *, int); static void isp_fibre_init(ispsoftc_t *); static void isp_fibre_init_2400(ispsoftc_t *); -static void isp_mark_portdb(ispsoftc_t *, int); -static int isp_plogx(ispsoftc_t *, uint16_t, uint32_t, int, int); +static void isp_mark_portdb(ispsoftc_t *, int, int); +static int isp_plogx(ispsoftc_t *, int, uint16_t, uint32_t, int, int); static int isp_port_login(ispsoftc_t *, uint16_t, uint32_t); static int isp_port_logout(ispsoftc_t *, uint16_t, uint32_t); -static int isp_getpdb(ispsoftc_t *, uint16_t, isp_pdb_t *, int); -static uint64_t isp_get_portname(ispsoftc_t *, int, int); -static int isp_fclink_test(ispsoftc_t *, int); -static const char *ispfc_fw_statename(int); -static int isp_pdb_sync(ispsoftc_t *); -static int isp_scan_loop(ispsoftc_t *); -static int isp_gid_ft_sns(ispsoftc_t *); -static int isp_gid_ft_ct_passthru(ispsoftc_t *); -static int isp_scan_fabric(ispsoftc_t *); -static int isp_login_device(ispsoftc_t *, uint32_t, isp_pdb_t *, uint16_t *); -static int isp_register_fc4_type(ispsoftc_t *); -static int isp_register_fc4_type_24xx(ispsoftc_t *); -static uint16_t isp_nxt_handle(ispsoftc_t *, uint16_t); -static void isp_fw_state(ispsoftc_t *); +static int isp_getpdb(ispsoftc_t *, int, uint16_t, isp_pdb_t *, int); +static void isp_dump_chip_portdb(ispsoftc_t *, int, int); +static uint64_t isp_get_wwn(ispsoftc_t *, int, int, int); +static int isp_fclink_test(ispsoftc_t *, int, int); +static int isp_pdb_sync(ispsoftc_t *, int); +static int isp_scan_loop(ispsoftc_t *, int); +static int isp_gid_ft_sns(ispsoftc_t *, int); +static int isp_gid_ft_ct_passthru(ispsoftc_t *, int); +static int isp_scan_fabric(ispsoftc_t *, int); +static int isp_login_device(ispsoftc_t *, int, uint32_t, isp_pdb_t *, uint16_t *); +static int isp_register_fc4_type(ispsoftc_t *, int); +static int isp_register_fc4_type_24xx(ispsoftc_t *, int); +static uint16_t isp_nxt_handle(ispsoftc_t *, int, uint16_t); +static void isp_fw_state(ispsoftc_t *, int); static void isp_mboxcmd_qnw(ispsoftc_t *, mbreg_t *, int); static void isp_mboxcmd(ispsoftc_t *, mbreg_t *); -static void isp_update(ispsoftc_t *); -static void isp_update_bus(ispsoftc_t *, int); -static void isp_setdfltparm(ispsoftc_t *, int); -static void isp_setdfltfcparm(ispsoftc_t *); -static int isp_read_nvram(ispsoftc_t *); -static int isp_read_nvram_2400(ispsoftc_t *); +static void isp_spi_update(ispsoftc_t *, int); +static void isp_setdfltsdparm(ispsoftc_t *); +static void isp_setdfltfcparm(ispsoftc_t *, int); +static int isp_read_nvram(ispsoftc_t *, int); +static int isp_read_nvram_2400(ispsoftc_t *, uint8_t *); static void isp_rdnvram_word(ispsoftc_t *, int, uint16_t *); static void isp_rd_2400_nvram(ispsoftc_t *, uint32_t, uint32_t *); static void isp_parse_nvram_1020(ispsoftc_t *, uint8_t *); static void isp_parse_nvram_1080(ispsoftc_t *, int, uint8_t *); static void isp_parse_nvram_12160(ispsoftc_t *, int, uint8_t *); -static void isp_fix_nvram_wwns(ispsoftc_t *); static void isp_parse_nvram_2100(ispsoftc_t *, uint8_t *); static void isp_parse_nvram_2400(ispsoftc_t *, uint8_t *); @@ -161,15 +161,20 @@ static void isp_parse_nvram_2400(ispsoft */ void -isp_reset(ispsoftc_t *isp) +isp_reset(ispsoftc_t *isp, int do_load_defaults) { mbreg_t mbs; uint32_t code_org, val; int loops, i, dodnld = 1; - static const char *btype = "????"; + const char *btype = "????"; static const char dcrc[] = "Downloaded RISC Code Checksum Failure"; isp->isp_state = ISP_NILSTATE; + if (isp->isp_dead) { + isp_shutdown(isp); + ISP_DISABLE_INTS(isp); + return; + } /* * Basic types (SCSI, FibreChannel and PCI or SBus) @@ -181,51 +186,6 @@ isp_reset(ispsoftc_t *isp) * for SCSI adapters and do other settings for the 2100. */ - /* - * Get the current running firmware revision out of the - * chip before we hit it over the head (if this is our - * first time through). Note that we store this as the - * 'ROM' firmware revision- which it may not be. In any - * case, we don't really use this yet, but we may in - * the future. - */ - if (isp->isp_touched == 0) { - /* - * First see whether or not we're sitting in the ISP PROM. - * If we've just been reset, we'll have the string "ISP " - * spread through outgoing mailbox registers 1-3. We do - * this for PCI cards because otherwise we really don't - * know what state the card is in and we could hang if - * we try this command otherwise. - * - * For SBus cards, we just do this because they almost - * certainly will be running firmware by now. - */ - if (ISP_READ(isp, OUTMAILBOX1) != 0x4953 || - ISP_READ(isp, OUTMAILBOX2) != 0x5020 || - ISP_READ(isp, OUTMAILBOX3) != 0x2020) { - /* - * Just in case it was paused... - */ - if (IS_24XX(isp)) { - ISP_WRITE(isp, BIU2400_HCCR, - HCCR_2400_CMD_RELEASE); - } else { - ISP_WRITE(isp, HCCR, HCCR_CMD_RELEASE); - } - MEMZERO(&mbs, sizeof (mbs)); - mbs.param[0] = MBOX_ABOUT_FIRMWARE; - mbs.logval = MBLOGNONE; - isp_mboxcmd(isp, &mbs); - if (mbs.param[0] == MBOX_COMMAND_COMPLETE) { - isp->isp_romfw_rev[0] = mbs.param[1]; - isp->isp_romfw_rev[1] = mbs.param[2]; - isp->isp_romfw_rev[2] = mbs.param[3]; - } - } - isp->isp_touched = 1; - } - ISP_DISABLE_INTS(isp); /* @@ -244,17 +204,16 @@ isp_reset(ispsoftc_t *isp) } /* - * Set up DMA for the request and result queues. + * Set up DMA for the request and response queues. * * We do this now so we can use the request queue - * for a dma + * for dma to load firmware from. */ if (ISP_MBOXDMASETUP(isp) != 0) { isp_prt(isp, ISP_LOGERR, "Cannot setup DMA"); return; } - /* * Set up default request/response queue in-pointer/out-pointer * register indices. @@ -264,8 +223,6 @@ isp_reset(ispsoftc_t *isp) isp->isp_rqstoutrp = BIU2400_REQOUTP; isp->isp_respinrp = BIU2400_RSPINP; isp->isp_respoutrp = BIU2400_RSPOUTP; - isp->isp_atioinrp = BIU2400_ATIO_RSPINP; - isp->isp_atiooutrp = BIU2400_ATIO_REQINP; } else if (IS_23XX(isp)) { isp->isp_rqstinrp = BIU_REQINP; isp->isp_rqstoutrp = BIU_REQOUTP; @@ -310,6 +267,9 @@ isp_reset(ispsoftc_t *isp) case ISP_HA_FC_2400: btype = "2422"; break; + case ISP_HA_FC_2500: + btype = "2532"; + break; default: break; } @@ -326,11 +286,13 @@ isp_reset(ispsoftc_t *isp) ISP_WRITE(isp, BIU2100_CSR, BIU2100_RISC_REGS); } } else if (IS_1240(isp)) { - sdparam *sdp = isp->isp_param; + sdparam *sdp; + btype = "1240"; isp->isp_clock = 60; + sdp = SDPARAM(isp, 0); sdp->isp_ultramode = 1; - sdp++; + sdp = SDPARAM(isp, 1); sdp->isp_ultramode = 1; /* * XXX: Should probably do some bus sensing. @@ -355,7 +317,7 @@ isp_reset(ispsoftc_t *isp) } else if (IS_ULTRA2(isp)) { static const char m[] = "bus %d is in %s Mode"; uint16_t l; - sdparam *sdp = isp->isp_param; + sdparam *sdp = SDPARAM(isp, 0); isp->isp_clock = 100; @@ -387,10 +349,10 @@ isp_reset(ispsoftc_t *isp) } if (IS_DUALBUS(isp)) { - sdp++; + sdp = SDPARAM(isp, 1); l = ISP_READ(isp, SXP_PINS_DIFF|SXP_BANK1_SELECT); l &= ISP1080_MODE_MASK; - switch(l) { + switch (l) { case ISP1080_LVD_MODE: sdp->isp_lvdmode = 1; isp_prt(isp, ISP_LOGCONFIG, m, 1, "LVD"); @@ -412,7 +374,7 @@ isp_reset(ispsoftc_t *isp) } } } else { - sdparam *sdp = isp->isp_param; + sdparam *sdp = SDPARAM(isp, 0); i = ISP_READ(isp, BIU_CONF0) & BIU_CONF0_HW_MASK; switch (i) { default: @@ -509,7 +471,7 @@ isp_reset(ispsoftc_t *isp) /* * Hit the chip over the head with hammer, - * and give the ISP a chance to recover. + * and give it a chance to recover. */ if (IS_SCSI(isp)) { @@ -517,15 +479,13 @@ isp_reset(ispsoftc_t *isp) /* * A slight delay... */ - USEC_DELAY(100); + ISP_DELAY(100); /* * Clear data && control DMA engines. */ - ISP_WRITE(isp, CDMA_CONTROL, - DMA_CNTRL_CLEAR_CHAN | DMA_CNTRL_RESET_INT); - ISP_WRITE(isp, DDMA_CONTROL, - DMA_CNTRL_CLEAR_CHAN | DMA_CNTRL_RESET_INT); + ISP_WRITE(isp, CDMA_CONTROL, DMA_CNTRL_CLEAR_CHAN | DMA_CNTRL_RESET_INT); + ISP_WRITE(isp, DDMA_CONTROL, DMA_CNTRL_CLEAR_CHAN | DMA_CNTRL_RESET_INT); } else if (IS_24XX(isp)) { @@ -534,12 +494,12 @@ isp_reset(ispsoftc_t *isp) */ ISP_WRITE(isp, BIU2400_CSR, BIU2400_DMA_STOP|(3 << 4)); for (val = loops = 0; loops < 30000; loops++) { - USEC_DELAY(10); + ISP_DELAY(10); val = ISP_READ(isp, BIU2400_CSR); if ((val & BIU2400_DMA_ACTIVE) == 0) { break; } - } + } if (val & BIU2400_DMA_ACTIVE) { ISP_RESET0(isp); isp_prt(isp, ISP_LOGERR, "DMA Failed to Stop on Reset"); @@ -548,11 +508,10 @@ isp_reset(ispsoftc_t *isp) /* * Hold it in SOFT_RESET and STOP state for 100us. */ - ISP_WRITE(isp, BIU2400_CSR, - BIU2400_SOFT_RESET|BIU2400_DMA_STOP|(3 << 4)); - USEC_DELAY(100); + ISP_WRITE(isp, BIU2400_CSR, BIU2400_SOFT_RESET|BIU2400_DMA_STOP|(3 << 4)); + ISP_DELAY(100); for (loops = 0; loops < 10000; loops++) { - USEC_DELAY(5); + ISP_DELAY(5); val = ISP_READ(isp, OUTMAILBOX0); } for (val = loops = 0; loops < 500000; loops ++) { @@ -571,17 +530,14 @@ isp_reset(ispsoftc_t *isp) /* * A slight delay... */ - USEC_DELAY(100); + ISP_DELAY(100); /* * Clear data && control DMA engines. */ - ISP_WRITE(isp, CDMA2100_CONTROL, - DMA_CNTRL2100_CLEAR_CHAN | DMA_CNTRL2100_RESET_INT); - ISP_WRITE(isp, TDMA2100_CONTROL, - DMA_CNTRL2100_CLEAR_CHAN | DMA_CNTRL2100_RESET_INT); - ISP_WRITE(isp, RDMA2100_CONTROL, - DMA_CNTRL2100_CLEAR_CHAN | DMA_CNTRL2100_RESET_INT); + ISP_WRITE(isp, CDMA2100_CONTROL, DMA_CNTRL2100_CLEAR_CHAN | DMA_CNTRL2100_RESET_INT); + ISP_WRITE(isp, TDMA2100_CONTROL, DMA_CNTRL2100_CLEAR_CHAN | DMA_CNTRL2100_RESET_INT); + ISP_WRITE(isp, RDMA2100_CONTROL, DMA_CNTRL2100_CLEAR_CHAN | DMA_CNTRL2100_RESET_INT); } /* @@ -601,7 +557,7 @@ isp_reset(ispsoftc_t *isp) if (!(ISP_READ(isp, BIU2100_CSR) & BIU2100_SOFT_RESET)) break; } - USEC_DELAY(100); + ISP_DELAY(100); if (--loops < 0) { ISP_DUMPREGS(isp, "chip reset timed out"); ISP_RESET0(isp); @@ -629,17 +585,16 @@ isp_reset(ispsoftc_t *isp) ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_CLEAR_RESET); } else { ISP_WRITE(isp, HCCR, HCCR_CMD_RESET); - USEC_DELAY(100); + ISP_DELAY(100); ISP_WRITE(isp, BIU_SEMA, 0); } - /* * Post-RISC Reset stuff. */ if (IS_24XX(isp)) { for (val = loops = 0; loops < 5000000; loops++) { - USEC_DELAY(5); + ISP_DELAY(5); val = ISP_READ(isp, OUTMAILBOX0); if (val == 0) { break; @@ -663,8 +618,8 @@ isp_reset(ispsoftc_t *isp) ISP_SETBITS(isp, CDMA_CONF, DMA_ENABLE_BURST); ISP_SETBITS(isp, DDMA_CONF, DMA_ENABLE_BURST); } - if (SDPARAM(isp)->isp_ptisp) { - if (SDPARAM(isp)->isp_ultramode) { + if (SDPARAM(isp, 0)->isp_ptisp) { + if (SDPARAM(isp, 0)->isp_ultramode) { while (ISP_READ(isp, RISC_MTR) != 0x1313) { ISP_WRITE(isp, RISC_MTR, 0x1313); ISP_WRITE(isp, HCCR, HCCR_CMD_STEP); @@ -692,7 +647,12 @@ isp_reset(ispsoftc_t *isp) ISP_WRITE(isp, isp->isp_rqstoutrp, 0); ISP_WRITE(isp, isp->isp_respinrp, 0); ISP_WRITE(isp, isp->isp_respoutrp, 0); - + if (IS_24XX(isp)) { + ISP_WRITE(isp, BIU2400_PRI_REQINP, 0); + ISP_WRITE(isp, BIU2400_PRI_REQOUTP, 0); + ISP_WRITE(isp, BIU2400_ATIO_RSPINP, 0); + ISP_WRITE(isp, BIU2400_ATIO_RSPOUTP, 0); + } /* * Do MD specific post initialization @@ -702,15 +662,15 @@ isp_reset(ispsoftc_t *isp) /* * Wait for everything to finish firing up. * - * Avoid doing this on the 2312 because you can generate a PCI + * Avoid doing this on early 2312s because you can generate a PCI * parity error (chip breakage). */ - if (IS_2312(isp)) { - USEC_DELAY(100); + if (IS_2312(isp) && isp->isp_revision < 2) { + ISP_DELAY(100); } else { loops = MBOX_DELAY_COUNT; while (ISP_READ(isp, OUTMAILBOX0) == MBOX_BUSY) { - USEC_DELAY(100); + ISP_DELAY(100); if (--loops < 0) { ISP_RESET0(isp); isp_prt(isp, ISP_LOGERR, @@ -727,19 +687,25 @@ isp_reset(ispsoftc_t *isp) */ /* - * Do some sanity checking. + * Do some sanity checking by running a NOP command. + * If it succeeds, the ROM firmware is now running. */ - MEMZERO(&mbs, sizeof (mbs)); + ISP_MEMZERO(&mbs, sizeof (mbs)); mbs.param[0] = MBOX_NO_OP; mbs.logval = MBLOGALL; isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { + isp_prt(isp, ISP_LOGERR, "NOP ommand failed (%x)", mbs.param[0]); ISP_RESET0(isp); return; } + /* + * Do some operational tests + */ + if (IS_SCSI(isp) || IS_24XX(isp)) { - MEMZERO(&mbs, sizeof (mbs)); + ISP_MEMZERO(&mbs, sizeof (mbs)); mbs.param[0] = MBOX_MAILBOX_REG_TEST; mbs.param[1] = 0xdead; mbs.param[2] = 0xbeef; @@ -758,10 +724,7 @@ isp_reset(ispsoftc_t *isp) mbs.param[3] != 0xffff || mbs.param[4] != 0x1111 || mbs.param[5] != 0xa5a5) { ISP_RESET0(isp); - isp_prt(isp, ISP_LOGERR, - "Register Test Failed (0x%x 0x%x 0x%x 0x%x 0x%x)", - mbs.param[1], mbs.param[2], mbs.param[3], - mbs.param[4], mbs.param[5]); + isp_prt(isp, ISP_LOGERR, "Register Test Failed (0x%x 0x%x 0x%x 0x%x 0x%x)", mbs.param[1], mbs.param[2], mbs.param[3], mbs.param[4], mbs.param[5]); return; } @@ -776,8 +739,7 @@ isp_reset(ispsoftc_t *isp) * whether we have f/w at all and whether a config flag * has disabled our download. */ - if ((isp->isp_mdvec->dv_ispfw == NULL) || - (isp->isp_confopts & ISP_CFG_NORELOAD)) { + if ((isp->isp_mdvec->dv_ispfw == NULL) || (isp->isp_confopts & ISP_CFG_NORELOAD)) { dodnld = 0; } @@ -793,13 +755,6 @@ isp_reset(ispsoftc_t *isp) const uint32_t *ptr = isp->isp_mdvec->dv_ispfw; /* - * NB: Whatever you do do, do *not* issue the VERIFY FIRMWARE - * NB: command to the 2400 while loading new firmware. This - * NB: causes the new f/w to start and immediately crash back - * NB: to the ROM. - */ - - /* * Keep loading until we run out of f/w. */ code_org = ptr[2]; /* 1st load address is our start addr */ @@ -807,9 +762,7 @@ isp_reset(ispsoftc_t *isp) for (;;) { uint32_t la, wi, wl; - isp_prt(isp, ISP_LOGDEBUG0, - "load 0x%x words of code at load address 0x%x", - ptr[3], ptr[2]); + isp_prt(isp, ISP_LOGDEBUG0, "load 0x%x words of code at load address 0x%x", ptr[3], ptr[2]); wi = 0; la = ptr[2]; @@ -828,23 +781,31 @@ isp_reset(ispsoftc_t *isp) ISP_IOXPUT_32(isp, ptr[wi++], &cp[i]); wl--; } - MEMORYBARRIER(isp, SYNC_REQUEST, - 0, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp))); - MEMZERO(&mbs, sizeof (mbs)); - mbs.param[0] = MBOX_LOAD_RISC_RAM; - mbs.param[1] = la; - mbs.param[2] = DMA_WD1(isp->isp_rquest_dma); - mbs.param[3] = DMA_WD0(isp->isp_rquest_dma); - mbs.param[4] = nw >> 16; - mbs.param[5] = nw; - mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); - mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); - mbs.param[8] = la >> 16; + MEMORYBARRIER(isp, SYNC_REQUEST, 0, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp))); + ISP_MEMZERO(&mbs, sizeof (mbs)); + if (la < 0x10000 && nw < 0x10000) { + mbs.param[0] = MBOX_LOAD_RISC_RAM_2100; + mbs.param[1] = la; + mbs.param[2] = DMA_WD1(isp->isp_rquest_dma); + mbs.param[3] = DMA_WD0(isp->isp_rquest_dma); + mbs.param[4] = nw; + mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); + mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); + } else { + mbs.param[0] = MBOX_LOAD_RISC_RAM; + mbs.param[1] = la; + mbs.param[2] = DMA_WD1(isp->isp_rquest_dma); + mbs.param[3] = DMA_WD0(isp->isp_rquest_dma); + mbs.param[4] = nw >> 16; + mbs.param[5] = nw; + mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); + mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); + mbs.param[8] = la >> 16; + } mbs.logval = MBLOGALL; isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_prt(isp, ISP_LOGERR, - "F/W Risc Ram Load Failed"); + isp_prt(isp, ISP_LOGERR, "F/W Risc Ram Load Failed"); ISP_RESET0(isp); return; } @@ -855,7 +816,7 @@ isp_reset(ispsoftc_t *isp) break; } ptr += ptr[3]; - } + } isp->isp_loaded_fw = 1; } else if (dodnld && IS_23XX(isp)) { const uint16_t *ptr = isp->isp_mdvec->dv_ispfw; @@ -868,17 +829,15 @@ isp_reset(ispsoftc_t *isp) for (;;) { uint32_t nxtaddr; - isp_prt(isp, ISP_LOGDEBUG0, - "load 0x%x words of code at load address 0x%x", - ptr[3], la); + isp_prt(isp, ISP_LOGDEBUG0, "load 0x%x words of code at load address 0x%x", ptr[3], la); wi = 0; wl = ptr[3]; while (wi < ptr[3]) { uint16_t *cp; - uint32_t nw; - + uint16_t nw; + nw = ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)) >> 1; if (nw > wl) { nw = wl; @@ -891,22 +850,30 @@ isp_reset(ispsoftc_t *isp) ISP_IOXPUT_16(isp, ptr[wi++], &cp[i]); wl--; } - MEMORYBARRIER(isp, SYNC_REQUEST, - 0, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp))); - MEMZERO(&mbs, sizeof (mbs)); - mbs.param[0] = MBOX_LOAD_RISC_RAM; - mbs.param[1] = la; - mbs.param[2] = DMA_WD1(isp->isp_rquest_dma); - mbs.param[3] = DMA_WD0(isp->isp_rquest_dma); - mbs.param[4] = nw; - mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); - mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); - mbs.param[8] = la >> 16; + MEMORYBARRIER(isp, SYNC_REQUEST, 0, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp))); + ISP_MEMZERO(&mbs, sizeof (mbs)); + if (la < 0x10000) { + mbs.param[0] = MBOX_LOAD_RISC_RAM_2100; + mbs.param[1] = la; + mbs.param[2] = DMA_WD1(isp->isp_rquest_dma); + mbs.param[3] = DMA_WD0(isp->isp_rquest_dma); + mbs.param[4] = nw; + mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); + mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); + } else { + mbs.param[0] = MBOX_LOAD_RISC_RAM; + mbs.param[1] = la; + mbs.param[2] = DMA_WD1(isp->isp_rquest_dma); + mbs.param[3] = DMA_WD0(isp->isp_rquest_dma); + mbs.param[4] = nw; + mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); + mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); + mbs.param[8] = la >> 16; + } mbs.logval = MBLOGALL; isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_prt(isp, ISP_LOGERR, - "F/W Risc Ram Load Failed"); + isp_prt(isp, ISP_LOGERR, "F/W Risc Ram Load Failed"); ISP_RESET0(isp); return; } @@ -914,19 +881,6 @@ isp_reset(ispsoftc_t *isp) } if (!IS_2322(isp)) { - /* - * Verify that it downloaded correctly. - */ - MEMZERO(&mbs, sizeof (mbs)); - mbs.param[0] = MBOX_VERIFY_CHECKSUM; - mbs.param[1] = code_org; - mbs.logval = MBLOGNONE; - isp_mboxcmd(isp, &mbs); - if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_prt(isp, ISP_LOGERR, dcrc); - ISP_RESET0(isp); - return; - } break; } @@ -951,41 +905,45 @@ isp_reset(ispsoftc_t *isp) union { const uint16_t *cp; uint16_t *np; - } u; - u.cp = isp->isp_mdvec->dv_ispfw; - isp->isp_mbxworkp = &u.np[1]; - isp->isp_mbxwrk0 = u.np[3] - 1; + } ucd; + ucd.cp = isp->isp_mdvec->dv_ispfw; + isp->isp_mbxworkp = &ucd.np[1]; + isp->isp_mbxwrk0 = ucd.np[3] - 1; isp->isp_mbxwrk1 = code_org + 1; - MEMZERO(&mbs, sizeof (mbs)); + ISP_MEMZERO(&mbs, sizeof (mbs)); mbs.param[0] = MBOX_WRITE_RAM_WORD; mbs.param[1] = code_org; - mbs.param[2] = u.np[0]; + mbs.param[2] = ucd.np[0]; mbs.logval = MBLOGNONE; isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_prt(isp, ISP_LOGERR, - "F/W download failed at word %d", - isp->isp_mbxwrk1 - code_org); + isp_prt(isp, ISP_LOGERR, "F/W download failed at word %d", isp->isp_mbxwrk1 - code_org); ISP_RESET0(isp); return; } - /* - * Verify that it downloaded correctly. - */ - MEMZERO(&mbs, sizeof (mbs)); + } else { + isp->isp_loaded_fw = 0; + isp_prt(isp, ISP_LOGDEBUG2, "skipping f/w download"); + } + + /* + * If we loaded firmware, verify its checksum + */ + if (isp->isp_loaded_fw) { + ISP_MEMZERO(&mbs, sizeof (mbs)); mbs.param[0] = MBOX_VERIFY_CHECKSUM; - mbs.param[1] = code_org; - mbs.logval = MBLOGNONE; + if (IS_24XX(isp)) { + mbs.param[1] = code_org >> 16; + mbs.param[2] = code_org; + } else { + mbs.param[1] = code_org; + } isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { isp_prt(isp, ISP_LOGERR, dcrc); ISP_RESET0(isp); return; } - isp->isp_loaded_fw = 1; - } else { - isp->isp_loaded_fw = 0; - isp_prt(isp, ISP_LOGDEBUG2, "skipping f/w download"); } /* @@ -996,9 +954,7 @@ isp_reset(ispsoftc_t *isp) */ - MEMZERO(&mbs, sizeof (mbs)); - mbs.timeout = 1000000; - mbs.param[0] = MBOX_EXEC_FIRMWARE; + MBSINIT(&mbs, MBOX_EXEC_FIRMWARE, MBLOGALL, 1000000); if (IS_24XX(isp)) { mbs.param[1] = code_org >> 16; mbs.param[2] = code_org; @@ -1007,6 +963,9 @@ isp_reset(ispsoftc_t *isp) } else { mbs.param[3] = 1; } + if (IS_25XX(isp)) { + mbs.ibits |= 0x10; + } } else if (IS_2322(isp)) { mbs.param[1] = code_org; if (isp->isp_loaded_fw) { @@ -1017,8 +976,6 @@ isp_reset(ispsoftc_t *isp) } else { mbs.param[1] = code_org; } - - mbs.logval = MBLOGALL; isp_mboxcmd(isp, &mbs); if (IS_2322(isp) || IS_24XX(isp)) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From jhb at FreeBSD.org Sat Aug 1 01:54:44 2009 From: jhb at FreeBSD.org (John Baldwin) Date: Sat Aug 1 01:54:50 2009 Subject: svn commit: r196009 - in stable/7/sys: compat/freebsd32 kern sys Message-ID: <200908010154.n711shIK087172@svn.freebsd.org> Author: jhb Date: Sat Aug 1 01:54:42 2009 New Revision: 196009 URL: http://svn.freebsd.org/changeset/base/196009 Log: Regen. Modified: stable/7/sys/compat/freebsd32/freebsd32_proto.h stable/7/sys/compat/freebsd32/freebsd32_syscall.h stable/7/sys/compat/freebsd32/freebsd32_syscalls.c stable/7/sys/compat/freebsd32/freebsd32_sysent.c stable/7/sys/kern/init_sysent.c stable/7/sys/kern/syscalls.c stable/7/sys/kern/systrace_args.c stable/7/sys/sys/syscall.h stable/7/sys/sys/syscall.mk stable/7/sys/sys/sysproto.h Modified: stable/7/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_proto.h Sat Aug 1 01:04:26 2009 (r196008) +++ stable/7/sys/compat/freebsd32/freebsd32_proto.h Sat Aug 1 01:54:42 2009 (r196009) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 195854 2009-07-24 19:35:06Z jhb + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 196006 2009-07-31 20:32:55Z jhb */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -170,16 +170,16 @@ struct freebsd32_futimes_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char tptr_l_[PADL_(struct timeval32 *)]; struct timeval32 * tptr; char tptr_r_[PADR_(struct timeval32 *)]; }; -struct freebsd32_semctl_args { +struct freebsd7_freebsd32_semctl_args { char semid_l_[PADL_(int)]; int semid; char semid_r_[PADR_(int)]; char semnum_l_[PADL_(int)]; int semnum; char semnum_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; char arg_l_[PADL_(union semun32 *)]; union semun32 * arg; char arg_r_[PADR_(union semun32 *)]; }; -struct freebsd32_msgctl_args { +struct freebsd7_freebsd32_msgctl_args { char msqid_l_[PADL_(int)]; int msqid; char msqid_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; - char buf_l_[PADL_(struct msqid_ds32 *)]; struct msqid_ds32 * buf; char buf_r_[PADR_(struct msqid_ds32 *)]; + char buf_l_[PADL_(struct msqid_ds32_old *)]; struct msqid_ds32_old * buf; char buf_r_[PADR_(struct msqid_ds32_old *)]; }; struct freebsd32_msgsnd_args { char msqid_l_[PADL_(int)]; int msqid; char msqid_r_[PADR_(int)]; @@ -194,10 +194,10 @@ struct freebsd32_msgrcv_args { char msgtyp_l_[PADL_(long)]; long msgtyp; char msgtyp_r_[PADR_(long)]; char msgflg_l_[PADL_(int)]; int msgflg; char msgflg_r_[PADR_(int)]; }; -struct freebsd32_shmctl_args { +struct freebsd7_freebsd32_shmctl_args { char shmid_l_[PADL_(int)]; int shmid; char shmid_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; - char buf_l_[PADL_(struct shmid_ds *)]; struct shmid_ds * buf; char buf_r_[PADR_(struct shmid_ds *)]; + char buf_l_[PADL_(struct shmid_ds32_old *)]; struct shmid_ds32_old * buf; char buf_r_[PADR_(struct shmid_ds32_old *)]; }; struct freebsd32_clock_gettime_args { char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)]; @@ -423,6 +423,22 @@ struct freebsd32_cpuset_setaffinity_args char cpusetsize_l_[PADL_(size_t)]; size_t cpusetsize; char cpusetsize_r_[PADR_(size_t)]; char mask_l_[PADL_(const cpuset_t *)]; const cpuset_t * mask; char mask_r_[PADR_(const cpuset_t *)]; }; +struct freebsd32_semctl_args { + char semid_l_[PADL_(int)]; int semid; char semid_r_[PADR_(int)]; + char semnum_l_[PADL_(int)]; int semnum; char semnum_r_[PADR_(int)]; + char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; + char arg_l_[PADL_(union semun32 *)]; union semun32 * arg; char arg_r_[PADR_(union semun32 *)]; +}; +struct freebsd32_msgctl_args { + char msqid_l_[PADL_(int)]; int msqid; char msqid_r_[PADR_(int)]; + char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; + char buf_l_[PADL_(struct msqid_ds32 *)]; struct msqid_ds32 * buf; char buf_r_[PADR_(struct msqid_ds32 *)]; +}; +struct freebsd32_shmctl_args { + char shmid_l_[PADL_(int)]; int shmid; char shmid_r_[PADR_(int)]; + char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; + char buf_l_[PADL_(struct shmid_ds32 *)]; struct shmid_ds32 * buf; char buf_r_[PADR_(struct shmid_ds32 *)]; +}; int freebsd32_wait4(struct thread *, struct freebsd32_wait4_args *); int freebsd32_recvmsg(struct thread *, struct freebsd32_recvmsg_args *); int freebsd32_sendmsg(struct thread *, struct freebsd32_sendmsg_args *); @@ -449,11 +465,11 @@ int freebsd32_lstat(struct thread *, str int freebsd32_getdirentries(struct thread *, struct freebsd32_getdirentries_args *); int freebsd32_sysctl(struct thread *, struct freebsd32_sysctl_args *); int freebsd32_futimes(struct thread *, struct freebsd32_futimes_args *); -int freebsd32_semctl(struct thread *, struct freebsd32_semctl_args *); -int freebsd32_msgctl(struct thread *, struct freebsd32_msgctl_args *); +int freebsd7_freebsd32_semctl(struct thread *, struct freebsd7_freebsd32_semctl_args *); +int freebsd7_freebsd32_msgctl(struct thread *, struct freebsd7_freebsd32_msgctl_args *); int freebsd32_msgsnd(struct thread *, struct freebsd32_msgsnd_args *); int freebsd32_msgrcv(struct thread *, struct freebsd32_msgrcv_args *); -int freebsd32_shmctl(struct thread *, struct freebsd32_shmctl_args *); +int freebsd7_freebsd32_shmctl(struct thread *, struct freebsd7_freebsd32_shmctl_args *); int freebsd32_clock_gettime(struct thread *, struct freebsd32_clock_gettime_args *); int freebsd32_clock_settime(struct thread *, struct freebsd32_clock_settime_args *); int freebsd32_clock_getres(struct thread *, struct freebsd32_clock_getres_args *); @@ -500,6 +516,9 @@ int freebsd32_cpuset_setid(struct thread int freebsd32_cpuset_getid(struct thread *, struct freebsd32_cpuset_getid_args *); int freebsd32_cpuset_getaffinity(struct thread *, struct freebsd32_cpuset_getaffinity_args *); int freebsd32_cpuset_setaffinity(struct thread *, struct freebsd32_cpuset_setaffinity_args *); +int freebsd32_semctl(struct thread *, struct freebsd32_semctl_args *); +int freebsd32_msgctl(struct thread *, struct freebsd32_msgctl_args *); +int freebsd32_shmctl(struct thread *, struct freebsd32_shmctl_args *); #ifdef COMPAT_43 @@ -689,11 +708,11 @@ int freebsd6_freebsd32_ftruncate(struct #define FREEBSD32_SYS_AUE_freebsd6_freebsd32_ftruncate AUE_FTRUNCATE #define FREEBSD32_SYS_AUE_freebsd32_sysctl AUE_SYSCTL #define FREEBSD32_SYS_AUE_freebsd32_futimes AUE_FUTIMES -#define FREEBSD32_SYS_AUE_freebsd32_semctl AUE_SEMCTL -#define FREEBSD32_SYS_AUE_freebsd32_msgctl AUE_MSGCTL +#define FREEBSD32_SYS_AUE_freebsd7_freebsd32_semctl AUE_SEMCTL +#define FREEBSD32_SYS_AUE_freebsd7_freebsd32_msgctl AUE_MSGCTL #define FREEBSD32_SYS_AUE_freebsd32_msgsnd AUE_MSGSND #define FREEBSD32_SYS_AUE_freebsd32_msgrcv AUE_MSGRCV -#define FREEBSD32_SYS_AUE_freebsd32_shmctl AUE_SHMCTL +#define FREEBSD32_SYS_AUE_freebsd7_freebsd32_shmctl AUE_SHMCTL #define FREEBSD32_SYS_AUE_freebsd32_clock_gettime AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_clock_settime AUE_CLOCK_SETTIME #define FREEBSD32_SYS_AUE_freebsd32_clock_getres AUE_NULL @@ -744,6 +763,9 @@ int freebsd6_freebsd32_ftruncate(struct #define FREEBSD32_SYS_AUE_freebsd32_cpuset_getid AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_cpuset_getaffinity AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_cpuset_setaffinity AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_semctl AUE_SEMCTL +#define FREEBSD32_SYS_AUE_freebsd32_msgctl AUE_MSGCTL +#define FREEBSD32_SYS_AUE_freebsd32_shmctl AUE_SHMCTL #undef PAD_ #undef PADL_ Modified: stable/7/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_syscall.h Sat Aug 1 01:04:26 2009 (r196008) +++ stable/7/sys/compat/freebsd32/freebsd32_syscall.h Sat Aug 1 01:54:42 2009 (r196009) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 195854 2009-07-24 19:35:06Z jhb + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 196006 2009-07-31 20:32:55Z jhb */ #define FREEBSD32_SYS_syscall 0 @@ -190,15 +190,15 @@ #define FREEBSD32_SYS_freebsd32_futimes 206 #define FREEBSD32_SYS_getpgid 207 #define FREEBSD32_SYS_poll 209 -#define FREEBSD32_SYS_freebsd32_semctl 220 +#define FREEBSD32_SYS_freebsd7_freebsd32_semctl 220 #define FREEBSD32_SYS_semget 221 #define FREEBSD32_SYS_semop 222 -#define FREEBSD32_SYS_freebsd32_msgctl 224 +#define FREEBSD32_SYS_freebsd7_freebsd32_msgctl 224 #define FREEBSD32_SYS_msgget 225 #define FREEBSD32_SYS_freebsd32_msgsnd 226 #define FREEBSD32_SYS_freebsd32_msgrcv 227 #define FREEBSD32_SYS_shmat 228 -#define FREEBSD32_SYS_freebsd32_shmctl 229 +#define FREEBSD32_SYS_freebsd7_freebsd32_shmctl 229 #define FREEBSD32_SYS_shmdt 230 #define FREEBSD32_SYS_shmget 231 #define FREEBSD32_SYS_freebsd32_clock_gettime 232 @@ -362,4 +362,7 @@ #define FREEBSD32_SYS_freebsd32_cpuset_getaffinity 487 #define FREEBSD32_SYS_freebsd32_cpuset_setaffinity 488 #define FREEBSD32_SYS_closefrom 509 -#define FREEBSD32_SYS_MAXSYSCALL 510 +#define FREEBSD32_SYS_freebsd32_semctl 510 +#define FREEBSD32_SYS_freebsd32_msgctl 511 +#define FREEBSD32_SYS_freebsd32_shmctl 512 +#define FREEBSD32_SYS_MAXSYSCALL 513 Modified: stable/7/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_syscalls.c Sat Aug 1 01:04:26 2009 (r196008) +++ stable/7/sys/compat/freebsd32/freebsd32_syscalls.c Sat Aug 1 01:54:42 2009 (r196009) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 195854 2009-07-24 19:35:06Z jhb + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 196006 2009-07-31 20:32:55Z jhb */ const char *freebsd32_syscallnames[] = { @@ -227,16 +227,16 @@ const char *freebsd32_syscallnames[] = { "lkmnosys", /* 217 = lkmnosys */ "lkmnosys", /* 218 = lkmnosys */ "lkmnosys", /* 219 = lkmnosys */ - "freebsd32_semctl", /* 220 = freebsd32_semctl */ + "freebsd7_freebsd32_semctl", /* 220 = freebsd7_freebsd32_semctl */ "semget", /* 221 = semget */ "semop", /* 222 = semop */ "#223", /* 223 = semconfig */ - "freebsd32_msgctl", /* 224 = freebsd32_msgctl */ + "freebsd7_freebsd32_msgctl", /* 224 = freebsd7_freebsd32_msgctl */ "msgget", /* 225 = msgget */ "freebsd32_msgsnd", /* 226 = freebsd32_msgsnd */ "freebsd32_msgrcv", /* 227 = freebsd32_msgrcv */ "shmat", /* 228 = shmat */ - "freebsd32_shmctl", /* 229 = freebsd32_shmctl */ + "freebsd7_freebsd32_shmctl", /* 229 = freebsd7_freebsd32_shmctl */ "shmdt", /* 230 = shmdt */ "shmget", /* 231 = shmget */ "freebsd32_clock_gettime", /* 232 = freebsd32_clock_gettime */ @@ -517,4 +517,7 @@ const char *freebsd32_syscallnames[] = { "#507", /* 507 = freebsd32_jail_set */ "#508", /* 508 = jail_remove */ "closefrom", /* 509 = closefrom */ + "freebsd32_semctl", /* 510 = freebsd32_semctl */ + "freebsd32_msgctl", /* 511 = freebsd32_msgctl */ + "freebsd32_shmctl", /* 512 = freebsd32_shmctl */ }; Modified: stable/7/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_sysent.c Sat Aug 1 01:04:26 2009 (r196008) +++ stable/7/sys/compat/freebsd32/freebsd32_sysent.c Sat Aug 1 01:54:42 2009 (r196009) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 195854 2009-07-24 19:35:06Z jhb + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 196006 2009-07-31 20:32:55Z jhb */ #include "opt_compat.h" @@ -258,16 +258,16 @@ struct sysent freebsd32_sysent[] = { { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 217 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 218 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 219 = lkmnosys */ - { AS(freebsd32_semctl_args), (sy_call_t *)freebsd32_semctl, AUE_SEMCTL, NULL, 0, 0 }, /* 220 = freebsd32_semctl */ + { AS(freebsd7_freebsd32_semctl_args), (sy_call_t *)freebsd7_freebsd32_semctl, AUE_SEMCTL, NULL, 0, 0 }, /* 220 = freebsd7_freebsd32_semctl */ { AS(semget_args), (sy_call_t *)semget, AUE_SEMGET, NULL, 0, 0 }, /* 221 = semget */ { AS(semop_args), (sy_call_t *)semop, AUE_SEMOP, NULL, 0, 0 }, /* 222 = semop */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 223 = semconfig */ - { AS(freebsd32_msgctl_args), (sy_call_t *)freebsd32_msgctl, AUE_MSGCTL, NULL, 0, 0 }, /* 224 = freebsd32_msgctl */ + { AS(freebsd7_freebsd32_msgctl_args), (sy_call_t *)freebsd7_freebsd32_msgctl, AUE_MSGCTL, NULL, 0, 0 }, /* 224 = freebsd7_freebsd32_msgctl */ { AS(msgget_args), (sy_call_t *)msgget, AUE_MSGGET, NULL, 0, 0 }, /* 225 = msgget */ { AS(freebsd32_msgsnd_args), (sy_call_t *)freebsd32_msgsnd, AUE_MSGSND, NULL, 0, 0 }, /* 226 = freebsd32_msgsnd */ { AS(freebsd32_msgrcv_args), (sy_call_t *)freebsd32_msgrcv, AUE_MSGRCV, NULL, 0, 0 }, /* 227 = freebsd32_msgrcv */ { AS(shmat_args), (sy_call_t *)shmat, AUE_SHMAT, NULL, 0, 0 }, /* 228 = shmat */ - { AS(freebsd32_shmctl_args), (sy_call_t *)freebsd32_shmctl, AUE_SHMCTL, NULL, 0, 0 }, /* 229 = freebsd32_shmctl */ + { AS(freebsd7_freebsd32_shmctl_args), (sy_call_t *)freebsd7_freebsd32_shmctl, AUE_SHMCTL, NULL, 0, 0 }, /* 229 = freebsd7_freebsd32_shmctl */ { AS(shmdt_args), (sy_call_t *)shmdt, AUE_SHMDT, NULL, 0, 0 }, /* 230 = shmdt */ { AS(shmget_args), (sy_call_t *)shmget, AUE_SHMGET, NULL, 0, 0 }, /* 231 = shmget */ { AS(freebsd32_clock_gettime_args), (sy_call_t *)freebsd32_clock_gettime, AUE_NULL, NULL, 0, 0 }, /* 232 = freebsd32_clock_gettime */ @@ -548,4 +548,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 507 = freebsd32_jail_set */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 508 = jail_remove */ { AS(closefrom_args), (sy_call_t *)closefrom, AUE_CLOSEFROM, NULL, 0, 0 }, /* 509 = closefrom */ + { AS(freebsd32_semctl_args), (sy_call_t *)freebsd32_semctl, AUE_SEMCTL, NULL, 0, 0 }, /* 510 = freebsd32_semctl */ + { AS(freebsd32_msgctl_args), (sy_call_t *)freebsd32_msgctl, AUE_MSGCTL, NULL, 0, 0 }, /* 511 = freebsd32_msgctl */ + { AS(freebsd32_shmctl_args), (sy_call_t *)freebsd32_shmctl, AUE_SHMCTL, NULL, 0, 0 }, /* 512 = freebsd32_shmctl */ }; Modified: stable/7/sys/kern/init_sysent.c ============================================================================== --- stable/7/sys/kern/init_sysent.c Sat Aug 1 01:04:26 2009 (r196008) +++ stable/7/sys/kern/init_sysent.c Sat Aug 1 01:54:42 2009 (r196009) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/kern/syscalls.master 195854 2009-07-24 19:35:06Z jhb + * created from FreeBSD: stable/7/sys/kern/syscalls.master 196006 2009-07-31 20:32:55Z jhb */ #include "opt_compat.h" @@ -248,16 +248,16 @@ struct sysent sysent[] = { { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 217 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 218 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 219 = lkmnosys */ - { AS(__semctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 220 = __semctl */ + { AS(freebsd7___semctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 220 = freebsd7___semctl */ { AS(semget_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 221 = semget */ { AS(semop_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 222 = semop */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 223 = semconfig */ - { AS(msgctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 224 = msgctl */ + { AS(freebsd7_msgctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 224 = freebsd7_msgctl */ { AS(msgget_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 225 = msgget */ { AS(msgsnd_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 226 = msgsnd */ { AS(msgrcv_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 227 = msgrcv */ { AS(shmat_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 228 = shmat */ - { AS(shmctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 229 = shmctl */ + { AS(freebsd7_shmctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 229 = freebsd7_shmctl */ { AS(shmdt_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 230 = shmdt */ { AS(shmget_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 231 = shmget */ { AS(clock_gettime_args), (sy_call_t *)clock_gettime, AUE_NULL, NULL, 0, 0 }, /* 232 = clock_gettime */ @@ -538,4 +538,7 @@ struct sysent sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 507 = jail_set */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 508 = jail_remove */ { AS(closefrom_args), (sy_call_t *)closefrom, AUE_CLOSEFROM, NULL, 0, 0 }, /* 509 = closefrom */ + { AS(__semctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 510 = __semctl */ + { AS(msgctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 511 = msgctl */ + { AS(shmctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 512 = shmctl */ }; Modified: stable/7/sys/kern/syscalls.c ============================================================================== --- stable/7/sys/kern/syscalls.c Sat Aug 1 01:04:26 2009 (r196008) +++ stable/7/sys/kern/syscalls.c Sat Aug 1 01:54:42 2009 (r196009) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/kern/syscalls.master 195854 2009-07-24 19:35:06Z jhb + * created from FreeBSD: stable/7/sys/kern/syscalls.master 196006 2009-07-31 20:32:55Z jhb */ const char *syscallnames[] = { @@ -227,16 +227,16 @@ const char *syscallnames[] = { "lkmnosys", /* 217 = lkmnosys */ "lkmnosys", /* 218 = lkmnosys */ "lkmnosys", /* 219 = lkmnosys */ - "__semctl", /* 220 = __semctl */ + "freebsd7___semctl", /* 220 = freebsd7___semctl */ "semget", /* 221 = semget */ "semop", /* 222 = semop */ "#223", /* 223 = semconfig */ - "msgctl", /* 224 = msgctl */ + "freebsd7_msgctl", /* 224 = freebsd7_msgctl */ "msgget", /* 225 = msgget */ "msgsnd", /* 226 = msgsnd */ "msgrcv", /* 227 = msgrcv */ "shmat", /* 228 = shmat */ - "shmctl", /* 229 = shmctl */ + "freebsd7_shmctl", /* 229 = freebsd7_shmctl */ "shmdt", /* 230 = shmdt */ "shmget", /* 231 = shmget */ "clock_gettime", /* 232 = clock_gettime */ @@ -517,4 +517,7 @@ const char *syscallnames[] = { "#507", /* 507 = jail_set */ "#508", /* 508 = jail_remove */ "closefrom", /* 509 = closefrom */ + "__semctl", /* 510 = __semctl */ + "msgctl", /* 511 = msgctl */ + "shmctl", /* 512 = shmctl */ }; Modified: stable/7/sys/kern/systrace_args.c ============================================================================== --- stable/7/sys/kern/systrace_args.c Sat Aug 1 01:04:26 2009 (r196008) +++ stable/7/sys/kern/systrace_args.c Sat Aug 1 01:54:42 2009 (r196009) @@ -1215,13 +1215,13 @@ systrace_args(int sysnum, void *params, *n_args = 0; break; } - /* __semctl */ + /* freebsd7___semctl */ case 220: { - struct __semctl_args *p = params; + struct freebsd7___semctl_args *p = params; iarg[0] = p->semid; /* int */ iarg[1] = p->semnum; /* int */ iarg[2] = p->cmd; /* int */ - uarg[3] = (intptr_t) p->arg; /* union semun * */ + uarg[3] = (intptr_t) p->arg; /* union semun_old * */ *n_args = 4; break; } @@ -1243,12 +1243,12 @@ systrace_args(int sysnum, void *params, *n_args = 3; break; } - /* msgctl */ + /* freebsd7_msgctl */ case 224: { - struct msgctl_args *p = params; + struct freebsd7_msgctl_args *p = params; iarg[0] = p->msqid; /* int */ iarg[1] = p->cmd; /* int */ - uarg[2] = (intptr_t) p->buf; /* struct msqid_ds * */ + uarg[2] = (intptr_t) p->buf; /* struct msqid_ds_old * */ *n_args = 3; break; } @@ -1290,12 +1290,12 @@ systrace_args(int sysnum, void *params, *n_args = 3; break; } - /* shmctl */ + /* freebsd7_shmctl */ case 229: { - struct shmctl_args *p = params; + struct freebsd7_shmctl_args *p = params; iarg[0] = p->shmid; /* int */ iarg[1] = p->cmd; /* int */ - uarg[2] = (intptr_t) p->buf; /* struct shmid_ds * */ + uarg[2] = (intptr_t) p->buf; /* struct shmid_ds_old * */ *n_args = 3; break; } @@ -2930,6 +2930,34 @@ systrace_args(int sysnum, void *params, *n_args = 1; break; } + /* __semctl */ + case 510: { + struct __semctl_args *p = params; + iarg[0] = p->semid; /* int */ + iarg[1] = p->semnum; /* int */ + iarg[2] = p->cmd; /* int */ + uarg[3] = (intptr_t) p->arg; /* union semun * */ + *n_args = 4; + break; + } + /* msgctl */ + case 511: { + struct msgctl_args *p = params; + iarg[0] = p->msqid; /* int */ + iarg[1] = p->cmd; /* int */ + uarg[2] = (intptr_t) p->buf; /* struct msqid_ds * */ + *n_args = 3; + break; + } + /* shmctl */ + case 512: { + struct shmctl_args *p = params; + iarg[0] = p->shmid; /* int */ + iarg[1] = p->cmd; /* int */ + uarg[2] = (intptr_t) p->buf; /* struct shmid_ds * */ + *n_args = 3; + break; + } default: *n_args = 0; break; @@ -4855,7 +4883,7 @@ systrace_setargdesc(int sysnum, int ndx, /* lkmnosys */ case 219: break; - /* __semctl */ + /* freebsd7___semctl */ case 220: switch(ndx) { case 0: @@ -4868,7 +4896,7 @@ systrace_setargdesc(int sysnum, int ndx, p = "int"; break; case 3: - p = "union semun *"; + p = "union semun_old *"; break; default: break; @@ -4906,7 +4934,7 @@ systrace_setargdesc(int sysnum, int ndx, break; }; break; - /* msgctl */ + /* freebsd7_msgctl */ case 224: switch(ndx) { case 0: @@ -4916,7 +4944,7 @@ systrace_setargdesc(int sysnum, int ndx, p = "int"; break; case 2: - p = "struct msqid_ds *"; + p = "struct msqid_ds_old *"; break; default: break; @@ -4992,7 +5020,7 @@ systrace_setargdesc(int sysnum, int ndx, break; }; break; - /* shmctl */ + /* freebsd7_shmctl */ case 229: switch(ndx) { case 0: @@ -5002,7 +5030,7 @@ systrace_setargdesc(int sysnum, int ndx, p = "int"; break; case 2: - p = "struct shmid_ds *"; + p = "struct shmid_ds_old *"; break; default: break; @@ -7739,6 +7767,57 @@ systrace_setargdesc(int sysnum, int ndx, break; }; break; + /* __semctl */ + case 510: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + case 3: + p = "union semun *"; + break; + default: + break; + }; + break; + /* msgctl */ + case 511: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "struct msqid_ds *"; + break; + default: + break; + }; + break; + /* shmctl */ + case 512: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "struct shmid_ds *"; + break; + default: + break; + }; + break; default: break; }; Modified: stable/7/sys/sys/syscall.h ============================================================================== --- stable/7/sys/sys/syscall.h Sat Aug 1 01:04:26 2009 (r196008) +++ stable/7/sys/sys/syscall.h Sat Aug 1 01:54:42 2009 (r196009) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/kern/syscalls.master 195854 2009-07-24 19:35:06Z jhb + * created from FreeBSD: stable/7/sys/kern/syscalls.master 196006 2009-07-31 20:32:55Z jhb */ #define SYS_syscall 0 @@ -196,15 +196,15 @@ #define SYS_futimes 206 #define SYS_getpgid 207 #define SYS_poll 209 -#define SYS___semctl 220 +#define SYS_freebsd7___semctl 220 #define SYS_semget 221 #define SYS_semop 222 -#define SYS_msgctl 224 +#define SYS_freebsd7_msgctl 224 #define SYS_msgget 225 #define SYS_msgsnd 226 #define SYS_msgrcv 227 #define SYS_shmat 228 -#define SYS_shmctl 229 +#define SYS_freebsd7_shmctl 229 #define SYS_shmdt 230 #define SYS_shmget 231 #define SYS_clock_gettime 232 @@ -408,4 +408,7 @@ #define SYS_cpuset_getaffinity 487 #define SYS_cpuset_setaffinity 488 #define SYS_closefrom 509 -#define SYS_MAXSYSCALL 510 +#define SYS___semctl 510 +#define SYS_msgctl 511 +#define SYS_shmctl 512 +#define SYS_MAXSYSCALL 513 Modified: stable/7/sys/sys/syscall.mk ============================================================================== --- stable/7/sys/sys/syscall.mk Sat Aug 1 01:04:26 2009 (r196008) +++ stable/7/sys/sys/syscall.mk Sat Aug 1 01:54:42 2009 (r196009) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: stable/7/sys/kern/syscalls.master 195854 2009-07-24 19:35:06Z jhb +# created from FreeBSD: stable/7/sys/kern/syscalls.master 196006 2009-07-31 20:32:55Z jhb MIASM = \ syscall.o \ exit.o \ @@ -148,15 +148,15 @@ MIASM = \ futimes.o \ getpgid.o \ poll.o \ - __semctl.o \ + freebsd7___semctl.o \ semget.o \ semop.o \ - msgctl.o \ + freebsd7_msgctl.o \ msgget.o \ msgsnd.o \ msgrcv.o \ shmat.o \ - shmctl.o \ + freebsd7_shmctl.o \ shmdt.o \ shmget.o \ clock_gettime.o \ @@ -356,4 +356,7 @@ MIASM = \ cpuset_getid.o \ cpuset_getaffinity.o \ cpuset_setaffinity.o \ - closefrom.o + closefrom.o \ + __semctl.o \ + msgctl.o \ + shmctl.o Modified: stable/7/sys/sys/sysproto.h ============================================================================== --- stable/7/sys/sys/sysproto.h Sat Aug 1 01:04:26 2009 (r196008) +++ stable/7/sys/sys/sysproto.h Sat Aug 1 01:54:42 2009 (r196009) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/kern/syscalls.master 195854 2009-07-24 19:35:06Z jhb + * created from FreeBSD: stable/7/sys/kern/syscalls.master 196006 2009-07-31 20:32:55Z jhb */ #ifndef _SYS_SYSPROTO_H_ @@ -660,11 +660,11 @@ struct poll_args { char nfds_l_[PADL_(u_int)]; u_int nfds; char nfds_r_[PADR_(u_int)]; char timeout_l_[PADL_(int)]; int timeout; char timeout_r_[PADR_(int)]; }; -struct __semctl_args { +struct freebsd7___semctl_args { char semid_l_[PADL_(int)]; int semid; char semid_r_[PADR_(int)]; char semnum_l_[PADL_(int)]; int semnum; char semnum_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; - char arg_l_[PADL_(union semun *)]; union semun * arg; char arg_r_[PADR_(union semun *)]; + char arg_l_[PADL_(union semun_old *)]; union semun_old * arg; char arg_r_[PADR_(union semun_old *)]; }; struct semget_args { char key_l_[PADL_(key_t)]; key_t key; char key_r_[PADR_(key_t)]; @@ -676,10 +676,10 @@ struct semop_args { char sops_l_[PADL_(struct sembuf *)]; struct sembuf * sops; char sops_r_[PADR_(struct sembuf *)]; char nsops_l_[PADL_(size_t)]; size_t nsops; char nsops_r_[PADR_(size_t)]; }; -struct msgctl_args { +struct freebsd7_msgctl_args { char msqid_l_[PADL_(int)]; int msqid; char msqid_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; - char buf_l_[PADL_(struct msqid_ds *)]; struct msqid_ds * buf; char buf_r_[PADR_(struct msqid_ds *)]; + char buf_l_[PADL_(struct msqid_ds_old *)]; struct msqid_ds_old * buf; char buf_r_[PADR_(struct msqid_ds_old *)]; }; struct msgget_args { char key_l_[PADL_(key_t)]; key_t key; char key_r_[PADR_(key_t)]; @@ -703,10 +703,10 @@ struct shmat_args { char shmaddr_l_[PADL_(const void *)]; const void * shmaddr; char shmaddr_r_[PADR_(const void *)]; char shmflg_l_[PADL_(int)]; int shmflg; char shmflg_r_[PADR_(int)]; }; -struct shmctl_args { +struct freebsd7_shmctl_args { char shmid_l_[PADL_(int)]; int shmid; char shmid_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; - char buf_l_[PADL_(struct shmid_ds *)]; struct shmid_ds * buf; char buf_r_[PADR_(struct shmid_ds *)]; + char buf_l_[PADL_(struct shmid_ds_old *)]; struct shmid_ds_old * buf; char buf_r_[PADR_(struct shmid_ds_old *)]; }; struct shmdt_args { char shmaddr_l_[PADL_(const void *)]; const void * shmaddr; char shmaddr_r_[PADR_(const void *)]; @@ -1557,6 +1557,22 @@ struct cpuset_setaffinity_args { struct closefrom_args { char lowfd_l_[PADL_(int)]; int lowfd; char lowfd_r_[PADR_(int)]; }; +struct __semctl_args { + char semid_l_[PADL_(int)]; int semid; char semid_r_[PADR_(int)]; + char semnum_l_[PADL_(int)]; int semnum; char semnum_r_[PADR_(int)]; + char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; + char arg_l_[PADL_(union semun *)]; union semun * arg; char arg_r_[PADR_(union semun *)]; +}; +struct msgctl_args { + char msqid_l_[PADL_(int)]; int msqid; char msqid_r_[PADR_(int)]; + char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; + char buf_l_[PADL_(struct msqid_ds *)]; struct msqid_ds * buf; char buf_r_[PADR_(struct msqid_ds *)]; +}; +struct shmctl_args { + char shmid_l_[PADL_(int)]; int shmid; char shmid_r_[PADR_(int)]; + char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; + char buf_l_[PADL_(struct shmid_ds *)]; struct shmid_ds * buf; char buf_r_[PADR_(struct shmid_ds *)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_exit(struct thread *, struct sys_exit_args *); int fork(struct thread *, struct fork_args *); @@ -1698,15 +1714,15 @@ int undelete(struct thread *, struct und int futimes(struct thread *, struct futimes_args *); int getpgid(struct thread *, struct getpgid_args *); int poll(struct thread *, struct poll_args *); -int __semctl(struct thread *, struct __semctl_args *); +int freebsd7___semctl(struct thread *, struct freebsd7___semctl_args *); int semget(struct thread *, struct semget_args *); int semop(struct thread *, struct semop_args *); -int msgctl(struct thread *, struct msgctl_args *); +int freebsd7_msgctl(struct thread *, struct freebsd7_msgctl_args *); int msgget(struct thread *, struct msgget_args *); int msgsnd(struct thread *, struct msgsnd_args *); int msgrcv(struct thread *, struct msgrcv_args *); int shmat(struct thread *, struct shmat_args *); -int shmctl(struct thread *, struct shmctl_args *); +int freebsd7_shmctl(struct thread *, struct freebsd7_shmctl_args *); int shmdt(struct thread *, struct shmdt_args *); int shmget(struct thread *, struct shmget_args *); int clock_gettime(struct thread *, struct clock_gettime_args *); @@ -1901,6 +1917,9 @@ int cpuset_getid(struct thread *, struct int cpuset_getaffinity(struct thread *, struct cpuset_getaffinity_args *); int cpuset_setaffinity(struct thread *, struct cpuset_setaffinity_args *); int closefrom(struct thread *, struct closefrom_args *); +int __semctl(struct thread *, struct __semctl_args *); +int msgctl(struct thread *, struct msgctl_args *); +int shmctl(struct thread *, struct shmctl_args *); #ifdef COMPAT_43 @@ -2307,15 +2326,15 @@ int freebsd4_sigreturn(struct thread *, #define SYS_AUE_futimes AUE_FUTIMES #define SYS_AUE_getpgid AUE_GETPGID #define SYS_AUE_poll AUE_POLL -#define SYS_AUE___semctl AUE_SEMCTL +#define SYS_AUE_freebsd7___semctl AUE_SEMCTL #define SYS_AUE_semget AUE_SEMGET #define SYS_AUE_semop AUE_SEMOP -#define SYS_AUE_msgctl AUE_MSGCTL +#define SYS_AUE_freebsd7_msgctl AUE_MSGCTL #define SYS_AUE_msgget AUE_MSGGET #define SYS_AUE_msgsnd AUE_MSGSND #define SYS_AUE_msgrcv AUE_MSGRCV #define SYS_AUE_shmat AUE_SHMAT -#define SYS_AUE_shmctl AUE_SHMCTL +#define SYS_AUE_freebsd7_shmctl AUE_SHMCTL #define SYS_AUE_shmdt AUE_SHMDT #define SYS_AUE_shmget AUE_SHMGET #define SYS_AUE_clock_gettime AUE_NULL @@ -2514,6 +2533,9 @@ int freebsd4_sigreturn(struct thread *, #define SYS_AUE_cpuset_getaffinity AUE_NULL #define SYS_AUE_cpuset_setaffinity AUE_NULL #define SYS_AUE_closefrom AUE_CLOSEFROM +#define SYS_AUE___semctl AUE_SEMCTL +#define SYS_AUE_msgctl AUE_MSGCTL +#define SYS_AUE_shmctl AUE_SHMCTL #undef PAD_ #undef PADL_ From amdmi3 at amdmi3.ru Sat Aug 1 02:53:50 2009 From: amdmi3 at amdmi3.ru (Dmitry Marakasov) Date: Sat Aug 1 02:53:56 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: References: <200907300014.n6U0EZ77086341@svn.freebsd.org> Message-ID: <20090801022914.GB93222@hades.panopticon> * Navdeep Parhar (nparhar@gmail.com) wrote: > This has slowed down core dumps very significantly. What used to take 10-15s on > my system now takes around 3 minutes. Same here. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru From scottl at samsco.org Sat Aug 1 02:58:50 2009 From: scottl at samsco.org (Scott Long) Date: Sat Aug 1 02:58:57 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <20090801022914.GB93222@hades.panopticon> References: <200907300014.n6U0EZ77086341@svn.freebsd.org> <20090801022914.GB93222@hades.panopticon> Message-ID: <4A73AF67.3010508@samsco.org> Dmitry Marakasov wrote: > * Navdeep Parhar (nparhar@gmail.com) wrote: > >> This has slowed down core dumps very significantly. What used to take 10-15s on >> my system now takes around 3 minutes. > > Same here. > Likely because prior to polling being implemented, each i/o was done blindly and completed immediately instead of waiting for actual confirmation from the hardware. Crashdumps have been slow for a number of years, thanks to a fundamental change in how they are done. Until now, USB was cheating and making them look fast. Scott From nparhar at gmail.com Sat Aug 1 04:55:46 2009 From: nparhar at gmail.com (Navdeep Parhar) Date: Sat Aug 1 04:56:17 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <200908010615.02972.hselasky@c2i.net> References: <200907300014.n6U0EZ77086341@svn.freebsd.org> <20090731212140.GK47463@elvis.mu.org> <200908010615.02972.hselasky@c2i.net> Message-ID: <20090801045540.GA8399@doormat.home> On Sat, Aug 01, 2009 at 06:15:01AM +0200, Hans Petter Selasky wrote: > On Friday 31 July 2009 23:21:40 Alfred Perlstein wrote: > > Hans, can you please look into this issue? > > > > * Navdeep Parhar [090731 00:45] wrote: > > > This has slowed down core dumps very significantly. What used to take > > > 10-15s on my system now takes around 3 minutes. A simple test is to > > > break into ddb and "call doadump" with or without this rev. I have a > > > serial console on this machine > > > and so I can use ddb whether the attached USB keyboard works or not. > > It's because there is a DELAY(1000) in the UKBD's polling routine so that key- > repeating will work, no magic. ok. So can something be done about it or are you suggesting that we learn to live with this? Regards, Navdeep From nparhar at gmail.com Sat Aug 1 05:00:58 2009 From: nparhar at gmail.com (Navdeep Parhar) Date: Sat Aug 1 05:01:09 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <4A73AF67.3010508@samsco.org> References: <200907300014.n6U0EZ77086341@svn.freebsd.org> <20090801022914.GB93222@hades.panopticon> <4A73AF67.3010508@samsco.org> Message-ID: <20090801050053.GB8399@doormat.home> On Fri, Jul 31, 2009 at 08:58:47PM -0600, Scott Long wrote: > Dmitry Marakasov wrote: > >* Navdeep Parhar (nparhar@gmail.com) wrote: > > > >>This has slowed down core dumps very significantly. What used to take 10-15s on > >>my system now takes around 3 minutes. > > > >Same here. > > > > Likely because prior to polling being implemented, each i/o was done > blindly and completed immediately instead of waiting for actual > confirmation from the hardware. Crashdumps have been slow for a > number of years, thanks to a fundamental change in how they are done. > Until now, USB was cheating and making them look fast. I'm afraid I did not understand your email. I was talking about crashdump time differences between yesterday and the day before, not "over a number of years." Are there any other issues involved here? Regards, Navdeep From scottl at samsco.org Sat Aug 1 05:12:01 2009 From: scottl at samsco.org (Scott Long) Date: Sat Aug 1 05:12:08 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <20090801050053.GB8399@doormat.home> References: <200907300014.n6U0EZ77086341@svn.freebsd.org> <20090801022914.GB93222@hades.panopticon> <4A73AF67.3010508@samsco.org> <20090801050053.GB8399@doormat.home> Message-ID: <4A73CE7E.9060609@samsco.org> Navdeep Parhar wrote: > On Fri, Jul 31, 2009 at 08:58:47PM -0600, Scott Long wrote: >> Dmitry Marakasov wrote: >>> * Navdeep Parhar (nparhar@gmail.com) wrote: >>> >>>> This has slowed down core dumps very significantly. What used to take 10-15s on >>>> my system now takes around 3 minutes. >>> Same here. >>> >> Likely because prior to polling being implemented, each i/o was done >> blindly and completed immediately instead of waiting for actual >> confirmation from the hardware. Crashdumps have been slow for a >> number of years, thanks to a fundamental change in how they are done. >> Until now, USB was cheating and making them look fast. > > I'm afraid I did not understand your email. I was talking about > crashdump time differences between yesterday and the day before, not > "over a number of years." Are there any other issues involved here? > Crashdumps work by the crashdump routine sending an i/o one-at-a-time to the disk driver, waiting for a completion response between each i/o. Polling in the disk driver is used to detect when the disk hardware has completed each i/o request. Since it is done completely serially and completely synchronously, it's very slow because it has to wait for the hardware to process each i/o, one at a time. Prior to yesterday, the usb2 stack did not implement polling. The umass disk driver completely ignored polling, and always immediately returned success. So instead of waiting for the hardware to complete each crashdump i/o request, it immediately returned success and allowed the crashdump routine to send a new i/o. It was short cutting the required process. Now that polling is in place, the shortcut is gone, and crashdumps on USB are back to being slow, just like on every other disk driver. The shortcut is fast, but it's also unsafe; it's bypassing the guarantee that every i/o is getting written without error and without overrunning the speed of the disk media. I mention "over a number of years" because the crashdump routine wasn't always designed to be so slow. But, that's how it is now, and there isn't much that can be done in the USB driver to fix it, short of going back to the unsafe shortcut. Scott From hselasky at c2i.net Sat Aug 1 05:16:04 2009 From: hselasky at c2i.net (Hans Petter Selasky) Date: Sat Aug 1 05:16:11 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <20090731212140.GK47463@elvis.mu.org> References: <200907300014.n6U0EZ77086341@svn.freebsd.org> <20090731212140.GK47463@elvis.mu.org> Message-ID: <200908010615.02972.hselasky@c2i.net> On Friday 31 July 2009 23:21:40 Alfred Perlstein wrote: > Hans, can you please look into this issue? > > * Navdeep Parhar [090731 00:45] wrote: > > On Wed, Jul 29, 2009 at 5:14 PM, Alfred Perlstein wrote: > > > Author: alfred > > > Date: Thu Jul 30 00:14:34 2009 > > > New Revision: 195960 > > > URL: http://svn.freebsd.org/changeset/base/195960 > > > > > > Log: > > > ?USB CORE: > > > ?- Add minimum polling support to drive UMASS > > > ? ?and UKBD in case of panic. > > > ?- Add extra check to ukbd probe to fix problem about > > > ? ?mouse devices attaching like keyboards. > > > ?- P4 ID: 166148 > > > > > > ?Submitted by: hps > > > ?Approved by: ?re > > > > This has slowed down core dumps very significantly. What used to take > > 10-15s on my system now takes around 3 minutes. A simple test is to > > break into ddb and "call doadump" with or without this rev. I have a > > serial console on this machine > > and so I can use ddb whether the attached USB keyboard works or not. > > > > Here is the usbconfig from the machine: > > ugen0.1: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) > > pwr=ON ugen1.1: at usbus1, cfg=0 md=HOST spd=FULL > > (12Mbps) pwr=ON ugen2.1: at usbus2, cfg=0 md=HOST > > spd=FULL (12Mbps) pwr=ON ugen3.1: at usbus3, cfg=0 > > md=HOST spd=FULL (12Mbps) pwr=ON ugen4.1: at > > usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON > > ugen1.2: at usbus1, cfg=0 md=HOST > > spd=FULL (12Mbps) pwr=SAVE > > ugen1.3: at usbus1, cfg=0 md=HOST > > spd=LOW (1.5Mbps) pwr=ON > > ugen1.4: at usbus1, cfg=0 md=HOST > > spd=LOW (1.5Mbps) pwr=ON It's because there is a DELAY(1000) in the UKBD's polling routine so that key- repeating will work, no magic. --HPS From nparhar at gmail.com Sat Aug 1 05:36:50 2009 From: nparhar at gmail.com (Navdeep Parhar) Date: Sat Aug 1 05:36:57 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <4A73CE7E.9060609@samsco.org> References: <200907300014.n6U0EZ77086341@svn.freebsd.org> <20090801022914.GB93222@hades.panopticon> <4A73AF67.3010508@samsco.org> <20090801050053.GB8399@doormat.home> <4A73CE7E.9060609@samsco.org> Message-ID: <20090801053644.GA9150@doormat.home> On Fri, Jul 31, 2009 at 11:11:26PM -0600, Scott Long wrote: > Navdeep Parhar wrote: > >On Fri, Jul 31, 2009 at 08:58:47PM -0600, Scott Long wrote: > >>Dmitry Marakasov wrote: > >>>* Navdeep Parhar (nparhar@gmail.com) wrote: > >>> > >>>>This has slowed down core dumps very significantly. What used to take 10-15s on > >>>>my system now takes around 3 minutes. > >>>Same here. > >>> > >>Likely because prior to polling being implemented, each i/o was done > >>blindly and completed immediately instead of waiting for actual > >>confirmation from the hardware. Crashdumps have been slow for a > >>number of years, thanks to a fundamental change in how they are done. > >>Until now, USB was cheating and making them look fast. > > > >I'm afraid I did not understand your email. I was talking about > >crashdump time differences between yesterday and the day before, not > >"over a number of years." Are there any other issues involved here? > > > > Crashdumps work by the crashdump routine sending an i/o one-at-a-time to > the disk driver, waiting for a completion response between each i/o. > Polling in the disk driver is used to detect when the disk hardware has > completed each i/o request. Since it is done completely serially and > completely synchronously, it's very slow because it has to wait for the > hardware to process each i/o, one at a time. > > Prior to yesterday, the usb2 stack did not implement polling. The umass > disk driver completely ignored polling, and always immediately returned > success. So instead of waiting for the hardware to complete each > crashdump i/o request, it immediately returned success and allowed the > crashdump routine to send a new i/o. It was short cutting the required > process. Now that polling is in place, the shortcut is gone, and > crashdumps on USB are back to being slow, just like on every other disk > driver. The shortcut is fast, but it's also unsafe; it's bypassing the > guarantee that every i/o is getting written without error and without > overrunning the speed of the disk media. > > I mention "over a number of years" because the crashdump routine wasn't > always designed to be so slow. But, that's how it is now, and there > isn't much that can be done in the USB driver to fix it, short of going > back to the unsafe shortcut. This is informative, but I think we're talking about totally different things. There is no USB storage involved - the machine has a SATA disk and that's where the core is being written to. The USB _keyboard_ polling seems to be slowing things down. Regards, Navdeep From julian at FreeBSD.org Sat Aug 1 07:09:52 2009 From: julian at FreeBSD.org (Julian Elischer) Date: Sat Aug 1 07:09:58 2009 Subject: svn commit: r196010 - in stable/7/sys: . contrib/pf kern netinet Message-ID: <200908010709.n7179p7Y094603@svn.freebsd.org> Author: julian Date: Sat Aug 1 07:09:50 2009 New Revision: 196010 URL: http://svn.freebsd.org/changeset/base/196010 Log: MFC #195922 Fix accept on sockets using multiple routing tables Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/uipc_socket.c stable/7/sys/netinet/tcp_input.c stable/7/sys/netinet/tcp_syncache.c Modified: stable/7/sys/kern/uipc_socket.c ============================================================================== --- stable/7/sys/kern/uipc_socket.c Sat Aug 1 01:54:42 2009 (r196009) +++ stable/7/sys/kern/uipc_socket.c Sat Aug 1 07:09:50 2009 (r196010) @@ -431,6 +431,7 @@ sonewconn(struct socket *head, int conns so->so_options = head->so_options &~ SO_ACCEPTCONN; so->so_linger = head->so_linger; so->so_state = head->so_state | SS_NOFDREF; + so->so_fibnum = head->so_fibnum; so->so_proto = head->so_proto; so->so_cred = crhold(head->so_cred); #ifdef MAC Modified: stable/7/sys/netinet/tcp_input.c ============================================================================== --- stable/7/sys/netinet/tcp_input.c Sat Aug 1 01:54:42 2009 (r196009) +++ stable/7/sys/netinet/tcp_input.c Sat Aug 1 07:09:50 2009 (r196010) @@ -577,6 +577,7 @@ findpcb: } inc.inc_fport = th->th_sport; inc.inc_lport = th->th_dport; + inc.inc_fibnum = so->so_fibnum; /* * Check for an existing connection attempt in syncache if Modified: stable/7/sys/netinet/tcp_syncache.c ============================================================================== --- stable/7/sys/netinet/tcp_syncache.c Sat Aug 1 01:54:42 2009 (r196009) +++ stable/7/sys/netinet/tcp_syncache.c Sat Aug 1 07:09:50 2009 (r196010) @@ -678,8 +678,7 @@ syncache_socket(struct syncache *sc, str #endif inp = sotoinpcb(so); - inp->inp_inc.inc_fibnum = sc->sc_inc.inc_fibnum; - so->so_fibnum = sc->sc_inc.inc_fibnum; + inp->inp_inc.inc_fibnum = so->so_fibnum; INP_WLOCK(inp); /* Insert new socket into PCB hash list. */ @@ -1173,8 +1172,6 @@ _syncache_add(struct in_conninfo *inc, s sc->sc_cred = cred; cred = NULL; sc->sc_ipopts = ipopts; - /* XXX-BZ this fib assignment is just useless. */ - sc->sc_inc.inc_fibnum = inp->inp_inc.inc_fibnum; bcopy(inc, &sc->sc_inc, sizeof(struct in_conninfo)); #ifdef INET6 if (!(inc->inc_flags & INC_ISIPV6)) @@ -1438,6 +1435,7 @@ syncache_respond(struct syncache *sc) } else optlen = 0; + M_SETFIB(m, sc->sc_inc.inc_fibnum); #ifdef INET6 if (sc->sc_inc.inc_flags & INC_ISIPV6) { th->th_sum = 0; From alfred at freebsd.org Sat Aug 1 09:53:19 2009 From: alfred at freebsd.org (Alfred Perlstein) Date: Sat Aug 1 09:53:31 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <20090801045540.GA8399@doormat.home> References: <200907300014.n6U0EZ77086341@svn.freebsd.org> <20090731212140.GK47463@elvis.mu.org> <200908010615.02972.hselasky@c2i.net> <20090801045540.GA8399@doormat.home> Message-ID: <20090801095318.GP47463@elvis.mu.org> * Navdeep Parhar [090731 21:55] wrote: > On Sat, Aug 01, 2009 at 06:15:01AM +0200, Hans Petter Selasky wrote: > > On Friday 31 July 2009 23:21:40 Alfred Perlstein wrote: > > > Hans, can you please look into this issue? > > > > > > * Navdeep Parhar [090731 00:45] wrote: > > > > This has slowed down core dumps very significantly. What used to take > > > > 10-15s on my system now takes around 3 minutes. A simple test is to > > > > break into ddb and "call doadump" with or without this rev. I have a > > > > serial console on this machine > > > > and so I can use ddb whether the attached USB keyboard works or not. > > > > It's because there is a DELAY(1000) in the UKBD's polling routine so that key- > > repeating will work, no magic. > > ok. So can something be done about it or are you suggesting that we learn to > live with this? Hans, I don't think this is OK. Can you look into a fix? -- - Alfred Perlstein .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250 .- FreeBSD committer From simon at FreeBSD.org Sat Aug 1 10:13:46 2009 From: simon at FreeBSD.org (Simon L. Nielsen) Date: Sat Aug 1 10:13:57 2009 Subject: svn commit: r196008 - in head/sys: cam dev/isp In-Reply-To: <200908010104.n7114Qxa085932@svn.freebsd.org> References: <200908010104.n7114Qxa085932@svn.freebsd.org> Message-ID: <20090801101343.GA1260@arthur.nitro.dk> On 2009.08.01 01:04:26 +0000, Matt Jacob wrote: > Author: mjacob > Date: Sat Aug 1 01:04:26 2009 > New Revision: 196008 > URL: http://svn.freebsd.org/changeset/base/196008 > > Log: > Add 8Gb support (isp_2500). Fix a fair number of configuration and > firmware loading bugs. Nice! Any chance you could update the isp(4) manual page with which adaptors are supported now, or if you prefer not to play with mdoc, just tell me which adaptors I sould add and I would be happy to update the manual page. -- Simon L. Nielsen From jhb at FreeBSD.org Sat Aug 1 11:40:48 2009 From: jhb at FreeBSD.org (John Baldwin) Date: Sat Aug 1 11:40:54 2009 Subject: svn commit: r196013 - stable/7/sys/kern Message-ID: <200908011140.n71Beklu079623@svn.freebsd.org> Author: jhb Date: Sat Aug 1 11:40:46 2009 New Revision: 196013 URL: http://svn.freebsd.org/changeset/base/196013 Log: Fix compile of oshmctl() with MAC. Pointy hat to: jhb Modified: stable/7/sys/kern/sysv_shm.c Modified: stable/7/sys/kern/sysv_shm.c ============================================================================== --- stable/7/sys/kern/sysv_shm.c Sat Aug 1 09:54:52 2009 (r196012) +++ stable/7/sys/kern/sysv_shm.c Sat Aug 1 11:40:46 2009 (r196013) @@ -911,7 +911,7 @@ oshmctl(struct thread *td, struct oshmct if (error) goto done2; #ifdef MAC - error = mac_sysvshm_check_shmctl(td->td_ucred, shmseg, uap->cmd); + error = mac_check_sysv_shmctl(td->td_ucred, shmseg, uap->cmd); if (error != 0) goto done2; #endif From rwatson at FreeBSD.org Sat Aug 1 19:26:29 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Sat Aug 1 19:26:43 2009 Subject: svn commit: r196019 - in head: . lib/libkvm sys/arm/arm sys/compat/linprocfs sys/compat/linux sys/compat/svr4 sys/conf sys/contrib/altq/altq sys/contrib/ipfilter/netinet sys/contrib/pf/net sys/cont... Message-ID: <200908011926.n71JQSML090262@svn.freebsd.org> Author: rwatson Date: Sat Aug 1 19:26:27 2009 New Revision: 196019 URL: http://svn.freebsd.org/changeset/base/196019 Log: Merge the remainder of kern_vimage.c and vimage.h into vnet.c and vnet.h, we now use jails (rather than vimages) as the abstraction for virtualization management, and what remained was specific to virtual network stacks. Minor cleanups are done in the process, and comments updated to reflect these changes. Reviewed by: bz Approved by: re (vimage blanket) Deleted: head/sys/kern/kern_vimage.c head/sys/sys/vimage.h Modified: head/ObsoleteFiles.inc head/lib/libkvm/kvm_vnet.c head/sys/arm/arm/minidump_machdep.c head/sys/compat/linprocfs/linprocfs.c head/sys/compat/linux/linux_ioctl.c head/sys/compat/linux/linux_socket.c head/sys/compat/svr4/svr4_sockio.c head/sys/conf/files head/sys/contrib/altq/altq/altq_subr.c head/sys/contrib/ipfilter/netinet/fil.c head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c head/sys/contrib/pf/net/pf.c head/sys/contrib/pf/net/pf_if.c head/sys/contrib/pf/net/pf_ioctl.c head/sys/contrib/pf/net/pf_subr.c head/sys/contrib/rdma/rdma_cma.c head/sys/ddb/db_sym.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c head/sys/fs/nfs/nfsport.h head/sys/kern/kern_jail.c head/sys/kern/kern_linker.c head/sys/kern/kern_poll.c head/sys/kern/kern_sysctl.c head/sys/kern/kern_uuid.c head/sys/kern/sys_socket.c head/sys/kern/uipc_domain.c head/sys/kern/uipc_socket.c head/sys/kern/uipc_syscalls.c head/sys/kern/uipc_usrreq.c head/sys/net/bpf.c head/sys/net/bridgestp.c head/sys/net/flowtable.c head/sys/net/if.c head/sys/net/if_bridge.c head/sys/net/if_clone.c head/sys/net/if_ef.c head/sys/net/if_enc.c head/sys/net/if_epair.c head/sys/net/if_ethersubr.c head/sys/net/if_faith.c head/sys/net/if_gif.c head/sys/net/if_gre.c head/sys/net/if_llatbl.c head/sys/net/if_loop.c head/sys/net/if_mib.c head/sys/net/if_spppsubr.c head/sys/net/if_stf.c head/sys/net/if_tun.c head/sys/net/if_vlan.c head/sys/net/netisr.c head/sys/net/raw_cb.c head/sys/net/raw_usrreq.c head/sys/net/route.c head/sys/net/rtsock.c head/sys/net/vnet.c head/sys/net/vnet.h head/sys/net80211/ieee80211_ddb.c head/sys/net80211/ieee80211_freebsd.c head/sys/netgraph/atm/ng_atm.c head/sys/netgraph/ng_base.c head/sys/netgraph/ng_bridge.c head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_ether.c head/sys/netgraph/ng_gif.c head/sys/netgraph/ng_iface.c head/sys/netgraph/ng_pipe.c head/sys/netgraph/ng_source.c head/sys/netinet/if_ether.c head/sys/netinet/igmp.c head/sys/netinet/in.c head/sys/netinet/in_gif.c head/sys/netinet/in_mcast.c head/sys/netinet/in_pcb.c head/sys/netinet/in_proto.c head/sys/netinet/in_rmx.c head/sys/netinet/ip_carp.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_ipsec.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_options.c head/sys/netinet/ip_output.c head/sys/netinet/ipfw/ip_fw2.c head/sys/netinet/ipfw/ip_fw_nat.c head/sys/netinet/ipfw/ip_fw_pfil.c head/sys/netinet/raw_ip.c head/sys/netinet/sctp_os_bsd.h head/sys/netinet/tcp_hostcache.c head/sys/netinet/tcp_input.c head/sys/netinet/tcp_offload.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_reass.c head/sys/netinet/tcp_sack.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_timer.c head/sys/netinet/tcp_timewait.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/dest6.c head/sys/netinet6/frag6.c head/sys/netinet6/icmp6.c head/sys/netinet6/in6.c head/sys/netinet6/in6_gif.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/in6_mcast.c head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_proto.c head/sys/netinet6/in6_rmx.c head/sys/netinet6/in6_src.c head/sys/netinet6/ip6_forward.c head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_ipsec.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/ip6_output.c head/sys/netinet6/mld6.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c head/sys/netinet6/nd6_rtr.c head/sys/netinet6/raw_ip6.c head/sys/netinet6/route6.c head/sys/netinet6/scope6.c head/sys/netinet6/udp6_usrreq.c head/sys/netipsec/ipsec.c head/sys/netipsec/ipsec_input.c head/sys/netipsec/ipsec_mbuf.c head/sys/netipsec/ipsec_output.c head/sys/netipsec/key.c head/sys/netipsec/keysock.c head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/netipsec/xform_ipcomp.c head/sys/netipsec/xform_ipip.c head/sys/netipsec/xform_tcp.c head/sys/nfsclient/bootp_subr.c head/sys/nfsclient/nfs_diskless.c head/sys/nfsclient/nfs_vnops.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Aug 1 15:40:22 2009 (r196018) +++ head/ObsoleteFiles.inc Sat Aug 1 19:26:27 2009 (r196019) @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20090801: vimage.h removed in favour of vnet.h +OLD_FILES+=usr/include/sys/vimage.h # 20090719: library version bump for 8.0 OLD_LIBS+=lib/libalias.so.6 OLD_LIBS+=lib/libavl.so.1 Modified: head/lib/libkvm/kvm_vnet.c ============================================================================== --- head/lib/libkvm/kvm_vnet.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/lib/libkvm/kvm_vnet.c Sat Aug 1 19:26:27 2009 (r196019) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: head/sys/arm/arm/minidump_machdep.c ============================================================================== --- head/sys/arm/arm/minidump_machdep.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/arm/arm/minidump_machdep.c Sat Aug 1 19:26:27 2009 (r196019) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/compat/linprocfs/linprocfs.c Sat Aug 1 19:26:27 2009 (r196019) @@ -73,7 +73,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/compat/linux/linux_ioctl.c Sat Aug 1 19:26:27 2009 (r196019) @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/compat/linux/linux_socket.c Sat Aug 1 19:26:27 2009 (r196019) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/compat/svr4/svr4_sockio.c ============================================================================== --- head/sys/compat/svr4/svr4_sockio.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/compat/svr4/svr4_sockio.c Sat Aug 1 19:26:27 2009 (r196019) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/conf/files Sat Aug 1 19:26:27 2009 (r196019) @@ -1992,7 +1992,6 @@ kern/kern_time.c standard kern/kern_timeout.c standard kern/kern_umtx.c standard kern/kern_uuid.c standard -kern/kern_vimage.c optional vimage kern/kern_xxx.c standard kern/link_elf.c standard kern/linker_if.m standard Modified: head/sys/contrib/altq/altq/altq_subr.c ============================================================================== --- head/sys/contrib/altq/altq/altq_subr.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/contrib/altq/altq/altq_subr.c Sat Aug 1 19:26:27 2009 (r196019) @@ -47,9 +47,6 @@ #include #include #include -#ifdef __FreeBSD__ -#include -#endif #include #include Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/contrib/ipfilter/netinet/fil.c Sat Aug 1 19:26:27 2009 (r196019) @@ -33,9 +33,6 @@ # if (__FreeBSD_version == 400019) # define CSUM_DELAY_DATA # endif -# if (__FreeBSD_version >= 800044) -# include -# endif # endif # include #else Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Aug 1 19:26:27 2009 (r196019) @@ -63,7 +63,6 @@ static const char rcsid[] = "@(#)$Id: ip # include #endif #if __FreeBSD_version >= 800044 -# include # include #else #define V_path_mtu_discovery path_mtu_discovery Modified: head/sys/contrib/pf/net/pf.c ============================================================================== --- head/sys/contrib/pf/net/pf.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/contrib/pf/net/pf.c Sat Aug 1 19:26:27 2009 (r196019) @@ -91,7 +91,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #else #include #endif Modified: head/sys/contrib/pf/net/pf_if.c ============================================================================== --- head/sys/contrib/pf/net/pf_if.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/contrib/pf/net/pf_if.c Sat Aug 1 19:26:27 2009 (r196019) @@ -54,9 +54,6 @@ __FBSDID("$FreeBSD$"); #include #endif #include -#ifdef __FreeBSD__ -#include -#endif #include #include Modified: head/sys/contrib/pf/net/pf_ioctl.c ============================================================================== --- head/sys/contrib/pf/net/pf_ioctl.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/contrib/pf/net/pf_ioctl.c Sat Aug 1 19:26:27 2009 (r196019) @@ -83,7 +83,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #else #include #include Modified: head/sys/contrib/pf/net/pf_subr.c ============================================================================== --- head/sys/contrib/pf/net/pf_subr.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/contrib/pf/net/pf_subr.c Sat Aug 1 19:26:27 2009 (r196019) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/contrib/rdma/rdma_cma.c ============================================================================== --- head/sys/contrib/rdma/rdma_cma.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/contrib/rdma/rdma_cma.c Sat Aug 1 19:26:27 2009 (r196019) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/ddb/db_sym.c ============================================================================== --- head/sys/ddb/db_sym.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/ddb/db_sym.c Sat Aug 1 19:26:27 2009 (r196019) @@ -32,9 +32,9 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include -#include #include Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Sat Aug 1 19:26:27 2009 (r196019) @@ -54,9 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include -#if __FreeBSD_version >= 800044 -#include -#else +#if __FreeBSD_version < 800044 #define V_ifnet ifnet #endif Modified: head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c ============================================================================== --- head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Sat Aug 1 19:26:27 2009 (r196019) @@ -48,9 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include -#if __FreeBSD_version >= 800044 -#include -#else +#if __FreeBSD_version < 800044 #define V_tcp_do_autosndbuf tcp_do_autosndbuf #define V_tcp_autosndbuf_max tcp_autosndbuf_max #define V_tcp_do_rfc1323 tcp_do_rfc1323 Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/fs/nfs/nfsport.h Sat Aug 1 19:26:27 2009 (r196019) @@ -78,7 +78,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/kern/kern_jail.c Sat Aug 1 19:26:27 2009 (r196019) @@ -58,9 +58,12 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include + #include +#include + #include + #ifdef DDB #include #ifdef INET6 Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/kern/kern_linker.c Sat Aug 1 19:26:27 2009 (r196019) @@ -51,7 +51,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include + +#include #include Modified: head/sys/kern/kern_poll.c ============================================================================== --- head/sys/kern/kern_poll.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/kern/kern_poll.c Sat Aug 1 19:26:27 2009 (r196019) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* for IFF_* flags */ #include /* for NETISR_POLL */ Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/kern/kern_sysctl.c Sat Aug 1 19:26:27 2009 (r196019) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #ifdef KTRACE #include #endif Modified: head/sys/kern/kern_uuid.c ============================================================================== --- head/sys/kern/kern_uuid.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/kern/kern_uuid.c Sat Aug 1 19:26:27 2009 (r196019) @@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/kern/sys_socket.c ============================================================================== --- head/sys/kern/sys_socket.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/kern/sys_socket.c Sat Aug 1 19:26:27 2009 (r196019) @@ -48,10 +48,10 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include +#include #include Modified: head/sys/kern/uipc_domain.c ============================================================================== --- head/sys/kern/uipc_domain.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/kern/uipc_domain.c Sat Aug 1 19:26:27 2009 (r196019) @@ -43,7 +43,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include + +#include + #include /* Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/kern/uipc_socket.c Sat Aug 1 19:26:27 2009 (r196019) @@ -129,7 +129,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include + +#include #include Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/kern/uipc_syscalls.c Sat Aug 1 19:26:27 2009 (r196019) @@ -64,12 +64,13 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifdef KTRACE #include #endif +#include + #include #include Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/kern/uipc_usrreq.c Sat Aug 1 19:26:27 2009 (r196019) @@ -88,7 +88,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include + +#include #ifdef DDB #include Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/bpf.c Sat Aug 1 19:26:27 2009 (r196019) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -73,6 +72,7 @@ __FBSDID("$FreeBSD$"); #endif #include #include +#include #include #include Modified: head/sys/net/bridgestp.c ============================================================================== --- head/sys/net/bridgestp.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/bridgestp.c Sat Aug 1 19:26:27 2009 (r196019) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/flowtable.c Sat Aug 1 19:26:27 2009 (r196019) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if.c Sat Aug 1 19:26:27 2009 (r196019) @@ -59,7 +59,6 @@ #include #include #include -#include #include #include Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_bridge.c Sat Aug 1 19:26:27 2009 (r196019) @@ -101,7 +101,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/net/if_clone.c ============================================================================== --- head/sys/net/if_clone.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_clone.c Sat Aug 1 19:26:27 2009 (r196019) @@ -39,7 +39,6 @@ #include #include #include -#include #include #include Modified: head/sys/net/if_ef.c ============================================================================== --- head/sys/net/if_ef.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_ef.c Sat Aug 1 19:26:27 2009 (r196019) @@ -39,7 +39,6 @@ #include #include #include -#include #include #include Modified: head/sys/net/if_enc.c ============================================================================== --- head/sys/net/if_enc.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_enc.c Sat Aug 1 19:26:27 2009 (r196019) @@ -38,7 +38,6 @@ #include #include #include -#include #include #include Modified: head/sys/net/if_epair.c ============================================================================== --- head/sys/net/if_epair.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_epair.c Sat Aug 1 19:26:27 2009 (r196019) @@ -38,7 +38,7 @@ /* * Things to re-think once we have more experience: * - ifp->if_reassign function once we can test with vimage. Depending on - * how if_vomve() is going to be improved. + * how if_vmove() is going to be improved. * - Real random etheraddrs that are checked to be uniquish; we would need * to re-do them in case we move the interface between network stacks * in a private if_reassign function. @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -70,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define EPAIRNAME "epair" Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_ethersubr.c Sat Aug 1 19:26:27 2009 (r196019) @@ -50,7 +50,6 @@ #include #include #include -#include #include #include Modified: head/sys/net/if_faith.c ============================================================================== --- head/sys/net/if_faith.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_faith.c Sat Aug 1 19:26:27 2009 (r196019) @@ -54,7 +54,6 @@ #include #include #include -#include #include #include @@ -62,6 +61,7 @@ #include #include #include +#include #ifdef INET #include Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_gif.c Sat Aug 1 19:26:27 2009 (r196019) @@ -49,7 +49,6 @@ #include #include #include -#include #include #include @@ -58,6 +57,7 @@ #include #include #include +#include #include #include Modified: head/sys/net/if_gre.c ============================================================================== --- head/sys/net/if_gre.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_gre.c Sat Aug 1 19:26:27 2009 (r196019) @@ -64,13 +64,13 @@ #include #include #include -#include #include #include #include #include #include +#include #ifdef INET #include Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_llatbl.c Sat Aug 1 19:26:27 2009 (r196019) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include @@ -51,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/net/if_loop.c ============================================================================== --- head/sys/net/if_loop.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_loop.c Sat Aug 1 19:26:27 2009 (r196019) @@ -49,7 +49,6 @@ #include #include #include -#include #include #include Modified: head/sys/net/if_mib.c ============================================================================== --- head/sys/net/if_mib.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_mib.c Sat Aug 1 19:26:27 2009 (r196019) @@ -34,7 +34,6 @@ #include #include #include -#include #include #include Modified: head/sys/net/if_spppsubr.c ============================================================================== --- head/sys/net/if_spppsubr.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_spppsubr.c Sat Aug 1 19:26:27 2009 (r196019) @@ -36,7 +36,6 @@ #include #include #include -#include #include @@ -44,6 +43,7 @@ #include #include #include +#include #include #include #include Modified: head/sys/net/if_stf.c ============================================================================== --- head/sys/net/if_stf.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_stf.c Sat Aug 1 19:26:27 2009 (r196019) @@ -92,7 +92,6 @@ #include #include -#include #include #include @@ -100,6 +99,7 @@ #include #include #include +#include #include #include Modified: head/sys/net/if_tun.c ============================================================================== --- head/sys/net/if_tun.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_tun.c Sat Aug 1 19:26:27 2009 (r196019) @@ -43,13 +43,13 @@ #include #include #include -#include #include #include #include #include #include +#include #ifdef INET #include #endif Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/if_vlan.c Sat Aug 1 19:26:27 2009 (r196019) @@ -55,7 +55,6 @@ #include #include #include -#include #include #include Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/netisr.c Sat Aug 1 19:26:27 2009 (r196019) @@ -78,7 +78,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #ifdef DDB #include @@ -87,6 +86,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /*- * Synchronize use and modification of the registered netisr data structures; Modified: head/sys/net/raw_cb.c ============================================================================== --- head/sys/net/raw_cb.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/raw_cb.c Sat Aug 1 19:26:27 2009 (r196019) @@ -42,7 +42,6 @@ #include #include #include -#include #include #include Modified: head/sys/net/raw_usrreq.c ============================================================================== --- head/sys/net/raw_usrreq.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/raw_usrreq.c Sat Aug 1 19:26:27 2009 (r196019) @@ -44,7 +44,6 @@ #include #include #include -#include #include #include Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/route.c Sat Aug 1 19:26:27 2009 (r196019) @@ -51,11 +51,11 @@ #include #include #include -#include #include #include #include +#include #ifdef RADIX_MPATH #include Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/rtsock.c Sat Aug 1 19:26:27 2009 (r196019) @@ -50,7 +50,6 @@ #include #include #include -#include #include #include Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/vnet.c Sat Aug 1 19:26:27 2009 (r196019) @@ -1,4 +1,12 @@ /*- + * Copyright (c) 2004-2009 University of Zagreb + * Copyright (c) 2006-2009 FreeBSD Foundation + * All rights reserved. + * + * This software was developed by the University of Zagreb and the + * FreeBSD Foundation under sponsorship by the Stichting NLnet and the + * FreeBSD Foundation. + * * Copyright (c) 2009 Jeffrey Roberson * Copyright (c) 2009 Robert N. M. Watson * All rights reserved. @@ -28,30 +36,67 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_ddb.h" + #include #include +#include #include #include #include #include #include #include +#include #include #include -#include +#ifdef DDB +#include +#endif + +#include +#include #include /*- * This file implements core functions for virtual network stacks: * + * - Core virtual network stack management functions. + * * - Virtual network stack memory allocator, which virtualized global * variables in the network stack * * - Virtualized SYSINIT's/SYSUNINIT's, which allow network stack subsystems * to register startup/shutdown events to be run for each virtual network * stack instance. - * + */ + +MALLOC_DEFINE(M_VNET, "vnet", "network stack control block"); + +/* + * The virtual network stack list has two read-write locks, one sleepable and + * the other not, so that the list can be stablized and walked in a variety + * of network stack contexts. Both must be acquired exclusively to modify + * the list. + */ +struct rwlock vnet_rwlock; +struct sx vnet_sxlock; + +#define VNET_LIST_WLOCK() do { \ + sx_xlock(&vnet_sxlock); \ + rw_wlock(&vnet_rwlock); \ +} while (0) + +#define VNET_LIST_WUNLOCK() do { \ + rw_wunlock(&vnet_rwlock); \ + sx_xunlock(&vnet_sxlock); \ +} while (0) + +struct vnet_list_head vnet_head; +struct vnet *vnet0; + +/* * The virtual network stack allocator provides storage for virtualized * global variables. These variables are defined/declared using the * VNET_DEFINE()/VNET_DECLARE() macros, which place them in the 'set_vnet' @@ -157,6 +202,114 @@ static TAILQ_HEAD(, vnet_data_free) vnet static struct sx vnet_data_free_lock; /* + * Allocate a virtual network stack. + */ +struct vnet * +vnet_alloc(void) +{ + struct vnet *vnet; + + vnet = malloc(sizeof(struct vnet), M_VNET, M_WAITOK | M_ZERO); + vnet->vnet_magic_n = VNET_MAGIC_N; + vnet_data_init(vnet); + + /* Initialize / attach vnet module instances. */ + CURVNET_SET_QUIET(vnet); + + sx_xlock(&vnet_sxlock); + vnet_sysinit(); + CURVNET_RESTORE(); + + rw_wlock(&vnet_rwlock); + LIST_INSERT_HEAD(&vnet_head, vnet, vnet_le); + VNET_LIST_WUNLOCK(); + + return (vnet); +} + +/* + * Destroy a virtual network stack. + */ +void +vnet_destroy(struct vnet *vnet) +{ + struct ifnet *ifp, *nifp; + + KASSERT(vnet->vnet_sockcnt == 0, + ("%s: vnet still has sockets", __func__)); + + VNET_LIST_WLOCK(); + LIST_REMOVE(vnet, vnet_le); + rw_wunlock(&vnet_rwlock); + + CURVNET_SET_QUIET(vnet); + + /* Return all inherited interfaces to their parent vnets. */ + TAILQ_FOREACH_SAFE(ifp, &V_ifnet, if_link, nifp) { + if (ifp->if_home_vnet != ifp->if_vnet) + if_vmove(ifp, ifp->if_home_vnet); + } + + vnet_sysuninit(); + sx_xunlock(&vnet_sxlock); + + CURVNET_RESTORE(); + + /* Hopefully, we are OK to free the vnet container itself. */ + vnet_data_destroy(vnet); + vnet->vnet_magic_n = 0xdeadbeef; + free(vnet, M_VNET); +} + +static void +vnet_foreach(void (*vnet_foreach_fn)(struct vnet *, void *), void *arg) +{ + struct vnet *vnet; + + VNET_LIST_RLOCK(); + LIST_FOREACH(vnet, &vnet_head, vnet_le) + vnet_foreach_fn(vnet, arg); + VNET_LIST_RUNLOCK(); +} + +/* + * Boot time initialization and allocation of virtual network stacks. + */ +static void +vnet_init_prelink(void *arg) +{ + + rw_init(&vnet_rwlock, "vnet_rwlock"); + sx_init(&vnet_sxlock, "vnet_sxlock"); + LIST_INIT(&vnet_head); +} +SYSINIT(vnet_init_prelink, SI_SUB_VNET_PRELINK, SI_ORDER_FIRST, + vnet_init_prelink, NULL); + +static void +vnet0_init(void *arg) +{ + + /* + * We MUST clear curvnet in vi_init_done() before going SMP, + * otherwise CURVNET_SET() macros would scream about unnecessary + * curvnet recursions. + */ + curvnet = prison0.pr_vnet = vnet0 = vnet_alloc(); +} +SYSINIT(vnet0_init, SI_SUB_VNET, SI_ORDER_FIRST, vnet0_init, NULL); + +static void +vnet_init_done(void *unused) +{ + + curvnet = NULL; +} + +SYSINIT(vnet_init_done, SI_SUB_VNET_DONE, SI_ORDER_FIRST, vnet_init_done, + NULL); + +/* * Allocate storage for virtualized global variables in a new virtual network * stack instance, and copy in initial values from our 'master' copy. */ @@ -490,3 +643,20 @@ vnet_sysuninit(void) vs->func(vs->arg); } } + +#ifdef DDB +DB_SHOW_COMMAND(vnets, db_show_vnets) +{ + VNET_ITERATOR_DECL(vnet_iter); + +#if SIZE_MAX == UINT32_MAX /* 32-bit arch */ + db_printf(" vnet ifs socks\n"); +#else /* 64-bit arch, most probaly... */ + db_printf(" vnet ifs socks\n"); +#endif + VNET_FOREACH(vnet_iter) { + db_printf("%p %3d %5d\n", vnet_iter, vnet_iter->vnet_ifcnt, + vnet_iter->vnet_sockcnt); + } +} +#endif Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Sat Aug 1 15:40:22 2009 (r196018) +++ head/sys/net/vnet.h Sat Aug 1 19:26:27 2009 (r196019) @@ -1,4 +1,12 @@ /*- + * Copyright (c) 2006-2009 University of Zagreb + * Copyright (c) 2006-2009 FreeBSD Foundation + * All rights reserved. + * + * This software was developed by the University of Zagreb and the + * FreeBSD Foundation under sponsorship by the Stichting NLnet and the + * FreeBSD Foundation. + * * Copyright (c) 2009 Jeffrey Roberson * Copyright (c) 2009 Robert N. M. Watson * All rights reserved. @@ -31,6 +39,9 @@ * This header file defines several sets of interfaces supporting virtualized * network stacks: * + * - Definition of 'struct vnet' and functions and macros to allocate/free/ + * manipulate it. + * * - A virtual network stack memory allocator, which provides support for * virtualized global variables via a special linker set, set_vnet. * @@ -47,17 +58,133 @@ #define _NET_VNET_H_ /* - * Virtual network stack memory allocator, which allows global variables to - * be automatically instantiated for each network stack instance. + * struct vnet describes a virtualized network stack, and is primarily a + * pointer to storage for virtualized global variables. Expose to userspace + * as required for libkvm. */ #if defined(_KERNEL) || defined(_WANT_VNET) +#include + +struct vnet { + LIST_ENTRY(vnet) vnet_le; /* all vnets list */ + u_int vnet_magic_n; + u_int vnet_ifcnt; + u_int vnet_sockcnt; + void *vnet_data_mem; + uintptr_t vnet_data_base; +}; +#define VNET_MAGIC_N 0x3e0d8f29 + +/* + * These two virtual network stack allocator definitions are also required + * for libkvm so that it can evaluate virtualized global variables. + */ #define VNET_SETNAME "set_vnet" #define VNET_SYMPREFIX "vnet_entry_" #endif #ifdef _KERNEL + #ifdef VIMAGE +#include +#include /* for struct thread */ +#include +#include + +/* + * Functions to allocate and destroy virtual network stacks. + */ +struct vnet *vnet_alloc(void); +void vnet_destroy(struct vnet *vnet); +/* + * The current virtual network stack -- we may wish to move this to struct + * pcpu in the future. + */ +#define curvnet curthread->td_vnet + +/* + * Various macros -- get and set the current network stack, but also + * assertions. + */ +#ifdef INVARIANTS +#define VNET_DEBUG +#endif +#ifdef VNET_DEBUG +#define VNET_ASSERT(condition) \ + if (!(condition)) { \ + printf("VNET_ASSERT @ %s:%d %s():\n", \ + __FILE__, __LINE__, __FUNCTION__); \ + panic(#condition); \ + } + +#define CURVNET_SET_QUIET(arg) \ + VNET_ASSERT((arg)->vnet_magic_n == VNET_MAGIC_N); \ + struct vnet *saved_vnet = curvnet; \ + const char *saved_vnet_lpush = curthread->td_vnet_lpush; \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From rwatson at FreeBSD.org Sat Aug 1 20:24:47 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Sat Aug 1 20:24:53 2009 Subject: svn commit: r196020 - head/sys/net Message-ID: <200908012024.n71KOkJK091649@svn.freebsd.org> Author: rwatson Date: Sat Aug 1 20:24:45 2009 New Revision: 196020 URL: http://svn.freebsd.org/changeset/base/196020 Log: Remove vnet_foreach() utility function, which previously allowed vnet.c to iterate virtual network stacks without being aware of the implementation details previously hidden in kern_vimage.c. Now they are in the same file, so remove this added complexity. Reviewed by: bz Approved by: re (vimage blanket) Modified: head/sys/net/vnet.c Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Sat Aug 1 19:26:27 2009 (r196019) +++ head/sys/net/vnet.c Sat Aug 1 20:24:45 2009 (r196020) @@ -261,17 +261,6 @@ vnet_destroy(struct vnet *vnet) free(vnet, M_VNET); } -static void -vnet_foreach(void (*vnet_foreach_fn)(struct vnet *, void *), void *arg) -{ - struct vnet *vnet; - - VNET_LIST_RLOCK(); - LIST_FOREACH(vnet, &vnet_head, vnet_le) - vnet_foreach_fn(vnet, arg); - VNET_LIST_RUNLOCK(); -} - /* * Boot time initialization and allocation of virtual network stacks. */ @@ -443,20 +432,6 @@ vnet_data_free(void *start_arg, int size sx_xunlock(&vnet_data_free_lock); } -struct vnet_data_copy_fn_arg { - void *start; - int size; -}; - -static void -vnet_data_copy_fn(struct vnet *vnet, void *arg) -{ - struct vnet_data_copy_fn_arg *varg = arg; - - memcpy((void *)((uintptr_t)vnet->vnet_data_base + - (uintptr_t)varg->start), varg->start, varg->size); -} - /* * When a new virtualized global variable has been allocated, propagate its * initial value to each already-allocated virtual network stack instance. @@ -464,11 +439,13 @@ vnet_data_copy_fn(struct vnet *vnet, voi void vnet_data_copy(void *start, int size) { - struct vnet_data_copy_fn_arg varg; + struct vnet *vnet; - varg.start = start; - varg.size = size; - vnet_foreach(vnet_data_copy_fn, &varg); + VNET_LIST_RLOCK(); + LIST_FOREACH(vnet, &vnet_head, vnet_le) + memcpy((void *)((uintptr_t)vnet->vnet_data_base + + (uintptr_t)start), start, size); + VNET_LIST_RUNLOCK(); } /* From rwatson at FreeBSD.org Sat Aug 1 21:54:16 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Sat Aug 1 21:54:23 2009 Subject: svn commit: r196024 - head/sys/net Message-ID: <200908012154.n71LsFBT093646@svn.freebsd.org> Author: rwatson Date: Sat Aug 1 21:54:15 2009 New Revision: 196024 URL: http://svn.freebsd.org/changeset/base/196024 Log: Make the vnet alloc/destroy paths a bit easier to followg by merging vnet_data_init/vnet_data_destroy into vnet_alloc/vnet_destroy. Reviewed by: bz, zec Approved by: re (vimage blanket) Modified: head/sys/net/vnet.c head/sys/net/vnet.h Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Sat Aug 1 21:46:55 2009 (r196023) +++ head/sys/net/vnet.c Sat Aug 1 21:54:15 2009 (r196024) @@ -211,7 +211,20 @@ vnet_alloc(void) vnet = malloc(sizeof(struct vnet), M_VNET, M_WAITOK | M_ZERO); vnet->vnet_magic_n = VNET_MAGIC_N; - vnet_data_init(vnet); + + /* + * Allocate storage for virtualized global variables and copy in + * initial values form our 'master' copy. + */ + vnet->vnet_data_mem = malloc(VNET_SIZE, M_VNET_DATA, M_WAITOK); + memcpy(vnet->vnet_data_mem, (void *)VNET_START, VNET_BYTES); + + /* + * All use of vnet-specific data will immediately subtract VNET_START + * from the base memory pointer, so pre-calculate that now to avoid + * it on each use. + */ + vnet->vnet_data_base = (uintptr_t)vnet->vnet_data_mem - VNET_START; /* Initialize / attach vnet module instances. */ CURVNET_SET_QUIET(vnet); @@ -255,8 +268,12 @@ vnet_destroy(struct vnet *vnet) CURVNET_RESTORE(); - /* Hopefully, we are OK to free the vnet container itself. */ - vnet_data_destroy(vnet); + /* + * Release storage for the virtual network stack instance. + */ + free(vnet->vnet_data_mem, M_VNET_DATA); + vnet->vnet_data_mem = NULL; + vnet->vnet_data_base = 0; vnet->vnet_magic_n = 0xdeadbeef; free(vnet, M_VNET); } @@ -299,37 +316,6 @@ SYSINIT(vnet_init_done, SI_SUB_VNET_DONE NULL); /* - * Allocate storage for virtualized global variables in a new virtual network - * stack instance, and copy in initial values from our 'master' copy. - */ -void -vnet_data_init(struct vnet *vnet) -{ - - vnet->vnet_data_mem = malloc(VNET_SIZE, M_VNET_DATA, M_WAITOK); - memcpy(vnet->vnet_data_mem, (void *)VNET_START, VNET_BYTES); - - /* - * All use of vnet-specific data will immediately subtract VNET_START - * from the base memory pointer, so pre-calculate that now to avoid - * it on each use. - */ - vnet->vnet_data_base = (uintptr_t)vnet->vnet_data_mem - VNET_START; -} - -/* - * Release storage for a virtual network stack instance. - */ -void -vnet_data_destroy(struct vnet *vnet) -{ - - free(vnet->vnet_data_mem, M_VNET_DATA); - vnet->vnet_data_mem = NULL; - vnet->vnet_data_base = 0; -} - -/* * Once on boot, initialize the modspace freelist to entirely cover modspace. */ static void Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Sat Aug 1 21:46:55 2009 (r196023) +++ head/sys/net/vnet.h Sat Aug 1 21:54:15 2009 (r196024) @@ -217,13 +217,6 @@ void vnet_data_copy(void *start, int si void vnet_data_free(void *start_arg, int size); /* - * Virtual network stack allocator interfaces for vnet setup/teardown. - */ -struct vnet; -void vnet_data_init(struct vnet *vnet); -void vnet_data_destroy(struct vnet *vnet); - -/* * Sysctl variants for vnet-virtualized global variables. Include * to expose these definitions. * From rwatson at FreeBSD.org Sat Aug 1 21:58:32 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Sat Aug 1 21:58:45 2009 Subject: svn commit: r196025 - head/sys/net Message-ID: <200908012158.n71LwW2C093777@svn.freebsd.org> Author: rwatson Date: Sat Aug 1 21:58:32 2009 New Revision: 196025 URL: http://svn.freebsd.org/changeset/base/196025 Log: Minor style tweaks. Approved by: re (vimage blanket) Modified: head/sys/net/vnet.c Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Sat Aug 1 21:54:15 2009 (r196024) +++ head/sys/net/vnet.c Sat Aug 1 21:58:32 2009 (r196025) @@ -62,9 +62,9 @@ __FBSDID("$FreeBSD$"); /*- * This file implements core functions for virtual network stacks: * - * - Core virtual network stack management functions. + * - Virtual network stack management functions. * - * - Virtual network stack memory allocator, which virtualized global + * - Virtual network stack memory allocator, which virtualizes global * variables in the network stack * * - Virtualized SYSINIT's/SYSUNINIT's, which allow network stack subsystems @@ -78,7 +78,7 @@ MALLOC_DEFINE(M_VNET, "vnet", "network s * The virtual network stack list has two read-write locks, one sleepable and * the other not, so that the list can be stablized and walked in a variety * of network stack contexts. Both must be acquired exclusively to modify - * the list. + * the list, but a read lock of either lock is sufficient to walk the list. */ struct rwlock vnet_rwlock; struct sx vnet_sxlock; @@ -181,9 +181,9 @@ MALLOC_DEFINE(M_VNET_DATA, "vnet_data", static VNET_DEFINE(char, modspace[VNET_MODMIN]); /* - * Global lists of subsystem constructor and destructors for vnets. - * They are registered via VNET_SYSINIT() and VNET_SYSUNINIT(). The - * lists are protected by the vnet_sxlock global lock. + * Global lists of subsystem constructor and destructors for vnets. They are + * registered via VNET_SYSINIT() and VNET_SYSUNINIT(). The lists are + * protected by the vnet_sxlock global lock. */ static TAILQ_HEAD(vnet_sysinit_head, vnet_sysinit) vnet_constructors = TAILQ_HEAD_INITIALIZER(vnet_constructors); @@ -387,15 +387,16 @@ vnet_data_free(void *start_arg, int size if (df->vnd_start > end) break; /* - * If we expand at the end of an entry we may have to - * merge it with the one following it as well. + * If we expand at the end of an entry we may have to merge + * it with the one following it as well. */ if (df->vnd_start + df->vnd_len == start) { df->vnd_len += size; dn = TAILQ_NEXT(df, vnd_link); if (df->vnd_start + df->vnd_len == dn->vnd_start) { df->vnd_len += dn->vnd_len; - TAILQ_REMOVE(&vnet_data_free_head, dn, vnd_link); + TAILQ_REMOVE(&vnet_data_free_head, dn, + vnd_link); free(dn, M_VNET_DATA_FREE); } sx_xunlock(&vnet_data_free_lock); @@ -573,10 +574,9 @@ vnet_deregister_sysuninit(void *arg) } /* - * Invoke all registered vnet constructors on the current vnet. Used - * during vnet construction. The caller is responsible for ensuring - * the new vnet is the current vnet and that the vnet_sxlock lock is - * locked. + * Invoke all registered vnet constructors on the current vnet. Used during + * vnet construction. The caller is responsible for ensuring the new vnet is + * the current vnet and that the vnet_sxlock lock is locked. */ void vnet_sysinit(void) @@ -590,10 +590,9 @@ vnet_sysinit(void) } /* - * Invoke all registered vnet destructors on the current vnet. Used - * during vnet destruction. The caller is responsible for ensuring - * the dying vnet is the current vnet and that the vnet_sxlock lock is - * locked. + * Invoke all registered vnet destructors on the current vnet. Used during + * vnet destruction. The caller is responsible for ensuring the dying vnet + * is the current vnet and that the vnet_sxlock lock is locked. */ void vnet_sysuninit(void) From rwatson at FreeBSD.org Sat Aug 1 22:15:10 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Sat Aug 1 22:15:42 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <200908010615.02972.hselasky@c2i.net> References: <200907300014.n6U0EZ77086341@svn.freebsd.org> <20090731212140.GK47463@elvis.mu.org> <200908010615.02972.hselasky@c2i.net> Message-ID: On Sat, 1 Aug 2009, Hans Petter Selasky wrote: >>> This has slowed down core dumps very significantly. What used to take >>> 10-15s on my system now takes around 3 minutes. A simple test is to break >>> into ddb and "call doadump" with or without this rev. I have a serial >>> console on this machine and so I can use ddb whether the attached USB >>> keyboard works or not. > > It's because there is a DELAY(1000) in the UKBD's polling routine so that > key- repeating will work, no magic. Given a choice between dumping 10x faster and having automatic key repeat in DDB, I'd lean towards the former. :-) Robert N M Watson Computer Laboratory University of Cambridge From rwatson at FreeBSD.org Sat Aug 1 22:22:45 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Sat Aug 1 22:22:52 2009 Subject: svn commit: r196026 - head/sys/net Message-ID: <200908012222.n71MMjNO094392@svn.freebsd.org> Author: rwatson Date: Sat Aug 1 22:22:45 2009 New Revision: 196026 URL: http://svn.freebsd.org/changeset/base/196026 Log: The colour was red as shall be the letters of this warning to people upon boot if the experimental VIMAGE feature was compiled into the kernel. Submitted by: bz Reviewed by: zec Approved by: re (vimage blanket) Modified: head/sys/net/vnet.c Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Sat Aug 1 21:58:32 2009 (r196025) +++ head/sys/net/vnet.c Sat Aug 1 22:22:45 2009 (r196026) @@ -296,6 +296,10 @@ static void vnet0_init(void *arg) { + /* Warn people before take off - in case we crash early. */ + printf("WARNING: VIMAGE (virtualized network stack) is a highly " + "experimental feature.\n"); + /* * We MUST clear curvnet in vi_init_done() before going SMP, * otherwise CURVNET_SET() macros would scream about unnecessary From rwatson at FreeBSD.org Sun Aug 2 00:19:37 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Sun Aug 2 00:20:00 2009 Subject: svn commit: r196027 - in vendor/openbsm/dist: . etc tools Message-ID: <200908020019.n720JaVH096738@svn.freebsd.org> Author: rwatson Date: Sun Aug 2 00:19:36 2009 New Revision: 196027 URL: http://svn.freebsd.org/changeset/base/196027 Log: Vendor import of OpenBSM 1.1p2, which incorporates the following changes since the last imported OpenBSM release: OpenBSM 1.1p2 - Fix audit_event definitions of AUE_OPENAT_RWT and AUE_OPENAT_RWTC. - Fix build on Linux. - Fix printing of class masks in the audump tool. Obtained from: TrustedBSD Project Modified: vendor/openbsm/dist/NEWS vendor/openbsm/dist/README vendor/openbsm/dist/VERSION vendor/openbsm/dist/configure vendor/openbsm/dist/configure.ac vendor/openbsm/dist/etc/audit_event vendor/openbsm/dist/tools/audump.c Modified: vendor/openbsm/dist/NEWS ============================================================================== --- vendor/openbsm/dist/NEWS Sat Aug 1 22:22:45 2009 (r196026) +++ vendor/openbsm/dist/NEWS Sun Aug 2 00:19:36 2009 (r196027) @@ -1,5 +1,11 @@ OpenBSM Version History +OpenBSM 1.1p2 + +- Fix audit_event definitions of AUE_OPENAT_RWT and AUE_OPENAT_RWTC. +- Fix build on Linux. +- Fix printing of class masks in the audump tool. + OpenBSM 1.1p1 - Fixes to AUT_SOCKUNIX token parsing. @@ -458,4 +464,4 @@ OpenBSM 1.0 alpha 1 to support reloading of kernel event table. - Allow comments in /etc/security configuration files. -$P4: //depot/projects/trustedbsd/openbsm/NEWS#42 $ +$P4: //depot/projects/trustedbsd/openbsm/NEWS#43 $ Modified: vendor/openbsm/dist/README ============================================================================== --- vendor/openbsm/dist/README Sat Aug 1 22:22:45 2009 (r196026) +++ vendor/openbsm/dist/README Sun Aug 2 00:19:36 2009 (r196027) @@ -1,4 +1,4 @@ -OpenBSM 1.1 +OpenBSM 1.1p2 Introduction @@ -64,4 +64,4 @@ Information on TrustedBSD may be found o http://www.TrustedBSD.org/ -$P4: //depot/projects/trustedbsd/openbsm/README#36 $ +$P4: //depot/projects/trustedbsd/openbsm/README#37 $ Modified: vendor/openbsm/dist/VERSION ============================================================================== --- vendor/openbsm/dist/VERSION Sat Aug 1 22:22:45 2009 (r196026) +++ vendor/openbsm/dist/VERSION Sun Aug 2 00:19:36 2009 (r196027) @@ -1 +1 @@ -OPENBSM_1_1p1 +OPENBSM_1_1p2 Modified: vendor/openbsm/dist/configure ============================================================================== --- vendor/openbsm/dist/configure Sat Aug 1 22:22:45 2009 (r196026) +++ vendor/openbsm/dist/configure Sun Aug 2 00:19:36 2009 (r196027) @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#52 . +# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#53 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.62 for OpenBSM 1.1p1. +# Generated by GNU Autoconf 2.62 for OpenBSM 1.1p2. # # Report bugs to . # @@ -751,8 +751,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='OpenBSM' PACKAGE_TARNAME='openbsm' -PACKAGE_VERSION='1.1p1' -PACKAGE_STRING='OpenBSM 1.1p1' +PACKAGE_VERSION='1.1p2' +PACKAGE_STRING='OpenBSM 1.1p2' PACKAGE_BUGREPORT='trustedbsd-audit@TrustesdBSD.org' ac_unique_file="bin/auditreduce/auditreduce.c" @@ -1492,7 +1492,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures OpenBSM 1.1p1 to adapt to many kinds of systems. +\`configure' configures OpenBSM 1.1p2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1562,7 +1562,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of OpenBSM 1.1p1:";; + short | recursive ) echo "Configuration of OpenBSM 1.1p2:";; esac cat <<\_ACEOF @@ -1671,7 +1671,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -OpenBSM configure 1.1p1 +OpenBSM configure 1.1p2 generated by GNU Autoconf 2.62 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1685,7 +1685,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by OpenBSM $as_me 1.1p1, which was +It was created by OpenBSM $as_me 1.1p2, which was generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ @@ -19662,7 +19662,7 @@ fi # Define the identity of the package. PACKAGE=OpenBSM - VERSION=1.1p1 + VERSION=1.1p2 cat >>confdefs.h <<_ACEOF @@ -24400,7 +24400,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by OpenBSM $as_me 1.1p1, which was +This file was extended by OpenBSM $as_me 1.1p2, which was generated by GNU Autoconf 2.62. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24453,7 +24453,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -OpenBSM config.status 1.1p1 +OpenBSM config.status 1.1p2 configured by $0, generated by GNU Autoconf 2.62, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Modified: vendor/openbsm/dist/configure.ac ============================================================================== --- vendor/openbsm/dist/configure.ac Sat Aug 1 22:22:45 2009 (r196026) +++ vendor/openbsm/dist/configure.ac Sun Aug 2 00:19:36 2009 (r196027) @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([OpenBSM], [1.1p1], [trustedbsd-audit@TrustesdBSD.org],[openbsm]) -AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#53 $]) +AC_INIT([OpenBSM], [1.1p2], [trustedbsd-audit@TrustesdBSD.org],[openbsm]) +AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#54 $]) AC_CONFIG_SRCDIR([bin/auditreduce/auditreduce.c]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_HEADER([config/config.h]) Modified: vendor/openbsm/dist/etc/audit_event ============================================================================== --- vendor/openbsm/dist/etc/audit_event Sat Aug 1 22:22:45 2009 (r196026) +++ vendor/openbsm/dist/etc/audit_event Sun Aug 2 00:19:36 2009 (r196027) @@ -1,5 +1,5 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_event#40 $ +# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_event#41 $ # # The mapping between event identifiers and values is also hard-coded in # audit_kevents.h and audit_uevents.h, so changes must occur in both places, @@ -271,7 +271,8 @@ 277:AUE_OPENAT_WTC:openat(2) - write,creat,trunc:fc,fd,fw,fa,fm 278:AUE_OPENAT_RW:openat(2) - read,write:fr,fw 279:AUE_OPENAT_RWC:openat(2) - read,write,create:fc,fw,fr,fa,fm -280:AUE_OPENAT_RWTC:openat(2) - read,write,creat,trunc:fc,fd,fw,fr,fa,fm +280:AUE_OPENAT_RWT:openat(2) - read,write,trunc:fd,fw,fr,fa,fm +281:AUE_OPENAT_RWTC:openat(2) - read,write,creat,trunc:fc,fd,fw,fr,fa,fm 282:AUE_RENAMEAT:renameat(2):fc,fd 283:AUE_FSTATAT:fstatat(2):fa 284:AUE_FCHOWNAT:fchownat(2):fm Modified: vendor/openbsm/dist/tools/audump.c ============================================================================== --- vendor/openbsm/dist/tools/audump.c Sat Aug 1 22:22:45 2009 (r196026) +++ vendor/openbsm/dist/tools/audump.c Sun Aug 2 00:19:36 2009 (r196027) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005-2006 Robert N. M. Watson + * Copyright (c) 2005-2009 Robert N. M. Watson * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/tools/audump.c#8 $ + * $P4: //depot/projects/trustedbsd/openbsm/tools/audump.c#9 $ */ #include @@ -165,16 +165,16 @@ printf_classmask(au_class_t classmask) first = 1; for (i = 0; i < 32; i++) { - if (classmask & (2 << i)) { + if (classmask & (1 << i)) { if (first) first = 0; else printf(","); - c = getauclassnum(2 << i); + c = getauclassnum(1 << i); if (c != NULL) printf("%s", c->ac_name); else - printf("0x%x", 2 << i); + printf("0x%x", 1 << i); } } } From rwatson at FreeBSD.org Sun Aug 2 00:20:41 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Sun Aug 2 00:20:52 2009 Subject: svn commit: r196028 - vendor/openbsm/1.1-P-2 Message-ID: <200908020020.n720KexG096820@svn.freebsd.org> Author: rwatson Date: Sun Aug 2 00:20:40 2009 New Revision: 196028 URL: http://svn.freebsd.org/changeset/base/196028 Log: Tag OpenBSM 1.1p2 vendor import. Added: vendor/openbsm/1.1-P-2/ - copied from r196027, vendor/openbsm/dist/ From rwatson at FreeBSD.org Sun Aug 2 10:27:55 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Sun Aug 2 10:28:07 2009 Subject: svn commit: r196031 - in head/contrib/openbsm: . config etc tools Message-ID: <200908021027.n72ARtPi012169@svn.freebsd.org> Author: rwatson Date: Sun Aug 2 10:27:54 2009 New Revision: 196031 URL: http://svn.freebsd.org/changeset/base/196031 Log: Import OpenBSM 1.1p2 from vendor branch to 8-CURRENT. This patch release addresses several minor issues: - Fix audit_event definitions of AUE_OPENAT_RWT and AUE_OPENAT_RWTC. - Fix build on Linux. - Fix printing of class masks in the audump tool. MFC after: 3 weeks Obtained from: TrustedBSD Project Approved by: re (kib) Modified: head/contrib/openbsm/ (props changed) head/contrib/openbsm/NEWS head/contrib/openbsm/README head/contrib/openbsm/VERSION head/contrib/openbsm/config/config.h head/contrib/openbsm/configure head/contrib/openbsm/configure.ac head/contrib/openbsm/etc/audit_event head/contrib/openbsm/tools/audump.c Modified: head/contrib/openbsm/NEWS ============================================================================== --- head/contrib/openbsm/NEWS Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/NEWS Sun Aug 2 10:27:54 2009 (r196031) @@ -1,5 +1,11 @@ OpenBSM Version History +OpenBSM 1.1p2 + +- Fix audit_event definitions of AUE_OPENAT_RWT and AUE_OPENAT_RWTC. +- Fix build on Linux. +- Fix printing of class masks in the audump tool. + OpenBSM 1.1p1 - Fixes to AUT_SOCKUNIX token parsing. @@ -458,4 +464,4 @@ OpenBSM 1.0 alpha 1 to support reloading of kernel event table. - Allow comments in /etc/security configuration files. -$P4: //depot/projects/trustedbsd/openbsm/NEWS#42 $ +$P4: //depot/projects/trustedbsd/openbsm/NEWS#43 $ Modified: head/contrib/openbsm/README ============================================================================== --- head/contrib/openbsm/README Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/README Sun Aug 2 10:27:54 2009 (r196031) @@ -1,4 +1,4 @@ -OpenBSM 1.1 +OpenBSM 1.1p2 Introduction @@ -64,4 +64,4 @@ Information on TrustedBSD may be found o http://www.TrustedBSD.org/ -$P4: //depot/projects/trustedbsd/openbsm/README#36 $ +$P4: //depot/projects/trustedbsd/openbsm/README#37 $ Modified: head/contrib/openbsm/VERSION ============================================================================== --- head/contrib/openbsm/VERSION Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/VERSION Sun Aug 2 10:27:54 2009 (r196031) @@ -1 +1 @@ -OPENBSM_1_1p1 +OPENBSM_1_1p2 Modified: head/contrib/openbsm/config/config.h ============================================================================== --- head/contrib/openbsm/config/config.h Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/config/config.h Sun Aug 2 10:27:54 2009 (r196031) @@ -164,13 +164,13 @@ #define PACKAGE_NAME "OpenBSM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "OpenBSM 1.1p1" +#define PACKAGE_STRING "OpenBSM 1.1p2" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "openbsm" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1p1" +#define PACKAGE_VERSION "1.1p2" /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void @@ -191,7 +191,7 @@ #define USE_NATIVE_INCLUDES /**/ /* Version number of package */ -#define VERSION "1.1p1" +#define VERSION "1.1p2" /* Use extended API on platforms that require it */ #define _GNU_SOURCE /**/ Modified: head/contrib/openbsm/configure ============================================================================== --- head/contrib/openbsm/configure Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/configure Sun Aug 2 10:27:54 2009 (r196031) @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#52 . +# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#53 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.62 for OpenBSM 1.1p1. +# Generated by GNU Autoconf 2.62 for OpenBSM 1.1p2. # # Report bugs to . # @@ -751,8 +751,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='OpenBSM' PACKAGE_TARNAME='openbsm' -PACKAGE_VERSION='1.1p1' -PACKAGE_STRING='OpenBSM 1.1p1' +PACKAGE_VERSION='1.1p2' +PACKAGE_STRING='OpenBSM 1.1p2' PACKAGE_BUGREPORT='trustedbsd-audit@TrustesdBSD.org' ac_unique_file="bin/auditreduce/auditreduce.c" @@ -1492,7 +1492,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures OpenBSM 1.1p1 to adapt to many kinds of systems. +\`configure' configures OpenBSM 1.1p2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1562,7 +1562,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of OpenBSM 1.1p1:";; + short | recursive ) echo "Configuration of OpenBSM 1.1p2:";; esac cat <<\_ACEOF @@ -1671,7 +1671,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -OpenBSM configure 1.1p1 +OpenBSM configure 1.1p2 generated by GNU Autoconf 2.62 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1685,7 +1685,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by OpenBSM $as_me 1.1p1, which was +It was created by OpenBSM $as_me 1.1p2, which was generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ @@ -19662,7 +19662,7 @@ fi # Define the identity of the package. PACKAGE=OpenBSM - VERSION=1.1p1 + VERSION=1.1p2 cat >>confdefs.h <<_ACEOF @@ -24400,7 +24400,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by OpenBSM $as_me 1.1p1, which was +This file was extended by OpenBSM $as_me 1.1p2, which was generated by GNU Autoconf 2.62. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24453,7 +24453,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -OpenBSM config.status 1.1p1 +OpenBSM config.status 1.1p2 configured by $0, generated by GNU Autoconf 2.62, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Modified: head/contrib/openbsm/configure.ac ============================================================================== --- head/contrib/openbsm/configure.ac Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/configure.ac Sun Aug 2 10:27:54 2009 (r196031) @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([OpenBSM], [1.1p1], [trustedbsd-audit@TrustesdBSD.org],[openbsm]) -AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#53 $]) +AC_INIT([OpenBSM], [1.1p2], [trustedbsd-audit@TrustesdBSD.org],[openbsm]) +AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#54 $]) AC_CONFIG_SRCDIR([bin/auditreduce/auditreduce.c]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_HEADER([config/config.h]) Modified: head/contrib/openbsm/etc/audit_event ============================================================================== --- head/contrib/openbsm/etc/audit_event Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/etc/audit_event Sun Aug 2 10:27:54 2009 (r196031) @@ -1,5 +1,5 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_event#40 $ +# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_event#41 $ # $FreeBSD$ # # The mapping between event identifiers and values is also hard-coded in @@ -272,7 +272,8 @@ 277:AUE_OPENAT_WTC:openat(2) - write,creat,trunc:fc,fd,fw,fa,fm 278:AUE_OPENAT_RW:openat(2) - read,write:fr,fw 279:AUE_OPENAT_RWC:openat(2) - read,write,create:fc,fw,fr,fa,fm -280:AUE_OPENAT_RWTC:openat(2) - read,write,creat,trunc:fc,fd,fw,fr,fa,fm +280:AUE_OPENAT_RWT:openat(2) - read,write,trunc:fd,fw,fr,fa,fm +281:AUE_OPENAT_RWTC:openat(2) - read,write,creat,trunc:fc,fd,fw,fr,fa,fm 282:AUE_RENAMEAT:renameat(2):fc,fd 283:AUE_FSTATAT:fstatat(2):fa 284:AUE_FCHOWNAT:fchownat(2):fm Modified: head/contrib/openbsm/tools/audump.c ============================================================================== --- head/contrib/openbsm/tools/audump.c Sun Aug 2 04:23:12 2009 (r196030) +++ head/contrib/openbsm/tools/audump.c Sun Aug 2 10:27:54 2009 (r196031) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005-2006 Robert N. M. Watson + * Copyright (c) 2005-2009 Robert N. M. Watson * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/tools/audump.c#8 $ + * $P4: //depot/projects/trustedbsd/openbsm/tools/audump.c#9 $ */ #include @@ -165,16 +165,16 @@ printf_classmask(au_class_t classmask) first = 1; for (i = 0; i < 32; i++) { - if (classmask & (2 << i)) { + if (classmask & (1 << i)) { if (first) first = 0; else printf(","); - c = getauclassnum(2 << i); + c = getauclassnum(1 << i); if (c != NULL) printf("%s", c->ac_name); else - printf("0x%x", 2 << i); + printf("0x%x", 1 << i); } } } From delphij at FreeBSD.org Sun Aug 2 10:48:27 2009 From: delphij at FreeBSD.org (Xin LI) Date: Sun Aug 2 10:48:33 2009 Subject: svn commit: r196032 - in stable/7/sys: . contrib/pf dev/mpt Message-ID: <200908021048.n72AmPJh012657@svn.freebsd.org> Author: delphij Date: Sun Aug 2 10:48:25 2009 New Revision: 196032 URL: http://svn.freebsd.org/changeset/base/196032 Log: MFC r195275: Use MPT_MAX_LUNS as maximium number of LUNs, not 7, for SAS and FC cases. This matches Linux driver behavior (except SPI case). Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/mpt/mpt_cam.c Modified: stable/7/sys/dev/mpt/mpt_cam.c ============================================================================== --- stable/7/sys/dev/mpt/mpt_cam.c Sun Aug 2 10:27:54 2009 (r196031) +++ stable/7/sys/dev/mpt/mpt_cam.c Sun Aug 2 10:48:25 2009 (r196032) @@ -3605,7 +3605,10 @@ mpt_action(struct cam_sim *sim, union cc if (mpt->is_spi && cpi->max_target > 15) { cpi->max_target = 15; } - cpi->max_lun = 7; + if (mpt->is_spi) + cpi->max_lun = 7; + else + cpi->max_lun = MPT_MAX_LUNS; cpi->initiator_id = mpt->mpt_ini_id; cpi->bus_id = cam_sim_bus(sim); From ed at FreeBSD.org Sun Aug 2 11:26:23 2009 From: ed at FreeBSD.org (Ed Schouten) Date: Sun Aug 2 11:26:30 2009 Subject: svn commit: r196033 - in head/sys: amd64/amd64 i386/i386 Message-ID: <200908021126.n72BQNfU013407@svn.freebsd.org> Author: ed Date: Sun Aug 2 11:26:23 2009 New Revision: 196033 URL: http://svn.freebsd.org/changeset/base/196033 Log: Make the MacBook3,1 boot again. Approved by: re (kib) Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Aug 2 10:48:25 2009 (r196032) +++ head/sys/amd64/amd64/machdep.c Sun Aug 2 11:26:23 2009 (r196033) @@ -214,6 +214,7 @@ cpu_startup(dummy) sysenv = getenv("smbios.system.product"); if (sysenv != NULL) { if (strncmp(sysenv, "MacBook1,1", 10) == 0 || + strncmp(sysenv, "MacBook3,1", 10) == 0 || strncmp(sysenv, "MacBookPro1,1", 13) == 0 || strncmp(sysenv, "MacBookPro1,2", 13) == 0 || strncmp(sysenv, "Macmini1,1", 10) == 0) { Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Sun Aug 2 10:48:25 2009 (r196032) +++ head/sys/i386/i386/machdep.c Sun Aug 2 11:26:23 2009 (r196033) @@ -258,6 +258,7 @@ cpu_startup(dummy) sysenv = getenv("smbios.system.product"); if (sysenv != NULL) { if (strncmp(sysenv, "MacBook1,1", 10) == 0 || + strncmp(sysenv, "MacBook3,1", 10) == 0 || strncmp(sysenv, "MacBookPro1,1", 13) == 0 || strncmp(sysenv, "MacBookPro1,2", 13) == 0 || strncmp(sysenv, "Macmini1,1", 10) == 0) { From ed at FreeBSD.org Sun Aug 2 14:25:27 2009 From: ed at FreeBSD.org (Ed Schouten) Date: Sun Aug 2 14:25:39 2009 Subject: svn commit: r196036 - head/sys/kern Message-ID: <200908021425.n72EPQ8T016871@svn.freebsd.org> Author: ed Date: Sun Aug 2 14:25:26 2009 New Revision: 196036 URL: http://svn.freebsd.org/changeset/base/196036 Log: Fix two bugs related to TTY input: - fix write() on pseudo-terminal masters to return the amount of bytes passed to the TTY, not the amount of bytes read from user. - fix ttydisc_rint_bypass() to set the high watermark when it cannot write all input, just like ttydisc_rint() itself. Approved by: re (kib) Modified: head/sys/kern/tty_pts.c head/sys/kern/tty_ttydisc.c Modified: head/sys/kern/tty_pts.c ============================================================================== --- head/sys/kern/tty_pts.c Sun Aug 2 13:37:00 2009 (r196035) +++ head/sys/kern/tty_pts.c Sun Aug 2 14:25:26 2009 (r196036) @@ -204,8 +204,10 @@ ptsdev_write(struct file *fp, struct uio error = uiomove(ib, iblen, uio); tty_lock(tp); - if (error != 0) + if (error != 0) { + iblen = 0; goto done; + } /* * When possible, avoid the slow path. rint_bypass() @@ -260,6 +262,12 @@ ptsdev_write(struct file *fp, struct uio done: ttydisc_rint_done(tp); tty_unlock(tp); + + /* + * Don't account for the part of the buffer that we couldn't + * pass to the TTY. + */ + uio->uio_resid += iblen; return (error); } Modified: head/sys/kern/tty_ttydisc.c ============================================================================== --- head/sys/kern/tty_ttydisc.c Sun Aug 2 13:37:00 2009 (r196035) +++ head/sys/kern/tty_ttydisc.c Sun Aug 2 14:25:26 2009 (r196036) @@ -1060,6 +1060,8 @@ ttydisc_rint_bypass(struct tty *tp, cons ret = ttyinq_write(&tp->t_inq, buf, len, 0); ttyinq_canonicalize(&tp->t_inq); + if (ret < len) + tty_hiwat_in_block(tp); return (ret); } From attilio at FreeBSD.org Sun Aug 2 14:28:42 2009 From: attilio at FreeBSD.org (Attilio Rao) Date: Sun Aug 2 14:28:55 2009 Subject: svn commit: r196037 - in head/sys: dev/aac dev/acpica dev/adb dev/amdtemp dev/amr dev/ata dev/atkbdc dev/bktr dev/drm dev/ips dev/mfi dev/mlx dev/mmc dev/pccbb dev/pst dev/rp dev/sound/pci/hda dev/... Message-ID: <200908021428.n72ESeGr016971@svn.freebsd.org> Author: attilio Date: Sun Aug 2 14:28:40 2009 New Revision: 196037 URL: http://svn.freebsd.org/changeset/base/196037 Log: Make the newbus subsystem Giant free by adding the new newbus sxlock. The newbus lock is responsible for protecting newbus internIal structures, device states and devclass flags. It is necessary to hold it when all such datas are accessed. For the other operations, softc locking should ensure enough protection to avoid races. Newbus lock is automatically held when virtual operations on the device and bus are invoked when loading the driver or when the suspend/resume take place. For other 'spourious' operations trying to access/modify the newbus topology, newbus lock needs to be automatically acquired and dropped. For the moment Giant is also acquired in some key point (modules subsystem) in order to avoid problems before the 8.0 release as module handlers could make assumptions about it. This Giant locking should go just after the release happens. Please keep in mind that the public interface can be expanded in order to provide more support, if there are really necessities at some point and also some bugs could arise as long as the patch needs a bit of further testing. Bump __FreeBSD_version in order to reflect the newbus lock introduction. Reviewed by: ed, hps, jhb, imp, mav, scottl No answer by: ariff, thompsa, yongari Tested by: pho, G. Trematerra , Brandon Gooch Sponsored by: Yahoo! Incorporated Approved by: re (ksmith) Modified: head/sys/dev/aac/aac.c head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpi_battery.c head/sys/dev/acpica/acpi_cpu.c head/sys/dev/acpica/acpi_dock.c head/sys/dev/acpica/acpi_thermal.c head/sys/dev/adb/adb_bus.c head/sys/dev/amdtemp/amdtemp.c head/sys/dev/amr/amr.c head/sys/dev/ata/ata-all.c head/sys/dev/atkbdc/psm.c head/sys/dev/bktr/bktr_os.c head/sys/dev/drm/drm_drv.c head/sys/dev/ips/ips_pci.c head/sys/dev/mfi/mfi.c head/sys/dev/mlx/mlx.c head/sys/dev/mmc/mmc.c head/sys/dev/pccbb/pccbb.c head/sys/dev/pst/pst-iop.c head/sys/dev/rp/rp.c head/sys/dev/sound/pci/hda/hdac.c head/sys/dev/twe/twe.c head/sys/dev/usb/controller/usb_controller.c head/sys/dev/usb/input/ukbd.c head/sys/dev/usb/net/usb_ethernet.c head/sys/dev/usb/usb_compat_linux.c head/sys/dev/usb/usb_dev.c head/sys/dev/usb/usb_handle_request.c head/sys/dev/usb/usb_hub.c head/sys/dev/usb/wlan/if_upgt.c head/sys/dev/xen/blkback/blkback.c head/sys/dev/xen/netback/netback.c head/sys/i386/acpica/acpi_machdep.c head/sys/i386/bios/smapi.c head/sys/i386/bios/smbios.c head/sys/i386/bios/vpd.c head/sys/kern/subr_bus.c head/sys/pc98/cbus/fdc.c head/sys/sys/bus.h head/sys/sys/param.h head/sys/xen/xenbus/xenbus_probe.c Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/aac/aac.c Sun Aug 2 14:28:40 2009 (r196037) @@ -3270,10 +3270,10 @@ aac_handle_aif(struct aac_softc *sc, str while (co != NULL) { if (co->co_found == 0) { mtx_unlock(&sc->aac_io_lock); - mtx_lock(&Giant); + newbus_xlock(); device_delete_child(sc->aac_dev, co->co_disk); - mtx_unlock(&Giant); + newbus_xunlock(); mtx_lock(&sc->aac_io_lock); co_next = TAILQ_NEXT(co, co_link); mtx_lock(&sc->aac_container_lock); @@ -3291,9 +3291,9 @@ aac_handle_aif(struct aac_softc *sc, str /* Attach the newly created containers */ if (added) { mtx_unlock(&sc->aac_io_lock); - mtx_lock(&Giant); + newbus_xlock(); bus_generic_attach(sc->aac_dev); - mtx_unlock(&Giant); + newbus_xunlock(); mtx_lock(&sc->aac_io_lock); } Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/acpica/acpi.c Sun Aug 2 14:28:40 2009 (r196037) @@ -675,8 +675,6 @@ acpi_suspend(device_t dev) device_t child, *devlist; int error, i, numdevs, pstate; - GIANT_REQUIRED; - /* First give child devices a chance to suspend. */ error = bus_generic_suspend(dev); if (error) @@ -719,8 +717,6 @@ acpi_resume(device_t dev) int i, numdevs, error; device_t child, *devlist; - GIANT_REQUIRED; - /* * Put all devices in D0 before resuming them. Call _S0D on each one * since some systems expect this. @@ -745,8 +741,6 @@ static int acpi_shutdown(device_t dev) { - GIANT_REQUIRED; - /* Allow children to shutdown first. */ bus_generic_shutdown(dev); @@ -2534,11 +2528,7 @@ acpi_EnterSleepState(struct acpi_softc * thread_unlock(curthread); #endif - /* - * Be sure to hold Giant across DEVICE_SUSPEND/RESUME since non-MPSAFE - * drivers need this. - */ - mtx_lock(&Giant); + newbus_xlock(); slp_state = ACPI_SS_NONE; @@ -2611,7 +2601,7 @@ backout: if (slp_state >= ACPI_SS_SLEPT) acpi_enable_fixed_events(sc); - mtx_unlock(&Giant); + newbus_xunlock(); #ifdef SMP thread_lock(curthread); Modified: head/sys/dev/acpica/acpi_battery.c ============================================================================== --- head/sys/dev/acpica/acpi_battery.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/acpica/acpi_battery.c Sun Aug 2 14:28:40 2009 (r196037) @@ -329,6 +329,7 @@ acpi_battery_find_dev(u_int logical_unit dev = NULL; found_unit = 0; + newbus_slock(); batt_dc = devclass_find("battery"); maxunit = devclass_get_maxunit(batt_dc); for (i = 0; i < maxunit; i++) { @@ -340,6 +341,7 @@ acpi_battery_find_dev(u_int logical_unit found_unit++; dev = NULL; } + newbus_sunlock(); return (dev); } @@ -369,13 +371,17 @@ acpi_battery_ioctl(u_long cmd, caddr_t a */ switch (cmd) { case ACPIIO_BATT_GET_UNITS: + newbus_slock(); *(int *)addr = acpi_battery_get_units(); + newbus_sunlock(); error = 0; break; case ACPIIO_BATT_GET_BATTINFO: if (dev != NULL || unit == ACPI_BATTERY_ALL_UNITS) { bzero(&ioctl_arg->battinfo, sizeof(ioctl_arg->battinfo)); + newbus_slock(); error = acpi_battery_get_battinfo(dev, &ioctl_arg->battinfo); + newbus_sunlock(); } break; case ACPIIO_BATT_GET_BIF: @@ -416,6 +422,11 @@ acpi_battery_sysctl(SYSCTL_HANDLER_ARGS) { int val, error; + /* + * Tolerate a race here because newbus lock can't be acquired before + * acpi_battery_get_battinfo() as it can create a LOR with the sysctl + * lock. + */ acpi_battery_get_battinfo(NULL, &acpi_battery_battinfo); val = *(u_int *)oidp->oid_arg1; error = sysctl_handle_int(oidp, &val, 0, req); @@ -427,6 +438,10 @@ acpi_battery_units_sysctl(SYSCTL_HANDLER { int count, error; + /* + * Tolerate a race here in order to avoid a LOR between sysctl lock + * and newbus lock. + */ count = acpi_battery_get_units(); error = sysctl_handle_int(oidp, &count, 0, req); return (error); Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/acpica/acpi_cpu.c Sun Aug 2 14:28:40 2009 (r196037) @@ -732,7 +732,9 @@ acpi_cpu_startup(void *arg) int i; /* Get set of CPU devices */ + newbus_slock(); devclass_get_devices(acpi_cpu_devclass, &cpu_devices, &cpu_ndevices); + newbus_sunlock(); /* * Setup any quirks that might necessary now that we have probed Modified: head/sys/dev/acpica/acpi_dock.c ============================================================================== --- head/sys/dev/acpica/acpi_dock.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/acpica/acpi_dock.c Sun Aug 2 14:28:40 2009 (r196037) @@ -188,12 +188,12 @@ acpi_dock_attach_later(void *context) dev = (device_t)context; + newbus_xlock(); if (!device_is_enabled(dev)) device_enable(dev); - mtx_lock(&Giant); device_probe_and_attach(dev); - mtx_unlock(&Giant); + newbus_xunlock(); } static ACPI_STATUS @@ -299,11 +299,11 @@ acpi_dock_eject_child(ACPI_HANDLE handle "ejecting device for %s\n", acpi_name(handle)); dev = acpi_get_device(handle); + newbus_xlock(); if (dev != NULL && device_is_attached(dev)) { - mtx_lock(&Giant); device_detach(dev); - mtx_unlock(&Giant); } + newbus_xunlock(); acpi_SetInteger(handle, "_EJ0", 0); out: Modified: head/sys/dev/acpica/acpi_thermal.c ============================================================================== --- head/sys/dev/acpica/acpi_thermal.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/acpica/acpi_thermal.c Sun Aug 2 14:28:40 2009 (r196037) @@ -936,6 +936,8 @@ acpi_tz_thread(void *arg) sc = NULL; for (;;) { + newbus_slock(); + /* If the number of devices has changed, re-evaluate. */ if (devclass_get_count(acpi_tz_devclass) != devcount) { if (devs != NULL) { @@ -948,6 +950,7 @@ acpi_tz_thread(void *arg) for (i = 0; i < devcount; i++) sc[i] = device_get_softc(devs[i]); } + newbus_sunlock(); /* Check for temperature events and act on them. */ for (i = 0; i < devcount; i++) { Modified: head/sys/dev/adb/adb_bus.c ============================================================================== --- head/sys/dev/adb/adb_bus.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/adb/adb_bus.c Sun Aug 2 14:28:40 2009 (r196037) @@ -113,6 +113,7 @@ adb_bus_enumerate(void *xdev) uint8_t i, next_free; uint16_t r3; + newbus_xlock(); sc->sc_dev = dev; sc->parent = device_get_parent(dev); @@ -187,6 +188,7 @@ adb_bus_enumerate(void *xdev) } bus_generic_attach(dev); + newbus_xunlock(); config_intrhook_disestablish(&sc->enum_hook); } Modified: head/sys/dev/amdtemp/amdtemp.c ============================================================================== --- head/sys/dev/amdtemp/amdtemp.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/amdtemp/amdtemp.c Sun Aug 2 14:28:40 2009 (r196037) @@ -269,6 +269,7 @@ amdtemp_intrhook(void *arg) /* * dev.cpu.N.temperature. */ + newbus_xlock(); nexus = device_find_child(root_bus, "nexus", 0); acpi = device_find_child(nexus, "acpi", 0); @@ -285,6 +286,7 @@ amdtemp_intrhook(void *arg) "Max of sensor 0 / 1"); } } + newbus_xunlock(); config_intrhook_disestablish(&sc->sc_ich); } Modified: head/sys/dev/amr/amr.c ============================================================================== --- head/sys/dev/amr/amr.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/amr/amr.c Sun Aug 2 14:28:40 2009 (r196037) @@ -90,6 +90,10 @@ __FBSDID("$FreeBSD$"); SYSCTL_NODE(_hw, OID_AUTO, amr, CTLFLAG_RD, 0, "AMR driver parameters"); +/* + * In order to get rid of Giant, amr_state should be protected by + * a proper softc lock for the cdev operations. + */ static d_open_t amr_open; static d_close_t amr_close; static d_ioctl_t amr_ioctl; @@ -312,9 +316,11 @@ amr_startup(void *arg) config_intrhook_disestablish(&sc->amr_ich); sc->amr_ich.ich_func = NULL; + newbus_xlock(); /* get up-to-date drive information */ if (amr_query_controller(sc)) { device_printf(sc->amr_dev, "can't scan controller for drives\n"); + newbus_xunlock(); return; } @@ -347,6 +353,7 @@ amr_startup(void *arg) /* interrupts will be enabled before we do anything more */ sc->amr_state |= AMR_STATE_INTEN; + newbus_xunlock(); /* * Start the timeout routine. @@ -434,7 +441,11 @@ static int amr_open(struct cdev *dev, int flags, int fmt, struct thread *td) { int unit = dev2unit(dev); - struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit); + struct amr_softc *sc; + + newbus_slock(); + sc = devclass_get_softc(devclass_find("amr"), unit); + newbus_sunlock(); debug_called(1); @@ -490,7 +501,11 @@ static int amr_close(struct cdev *dev, int flags, int fmt, struct thread *td) { int unit = dev2unit(dev); - struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit); + struct amr_softc *sc; + + newbus_slock(); + sc = devclass_get_softc(devclass_find("amr"), unit); + newbus_sunlock(); debug_called(1); @@ -507,6 +522,7 @@ amr_rescan_drives(struct cdev *dev) struct amr_softc *sc = (struct amr_softc *)dev->si_drv1; int i, error = 0; + newbus_xlock(); sc->amr_state |= AMR_STATE_REMAP_LD; while (sc->amr_busyslots) { device_printf(sc->amr_dev, "idle controller\n"); @@ -530,6 +546,7 @@ amr_rescan_drives(struct cdev *dev) sc->amr_drive[i].al_disk = 0; } } + newbus_xunlock(); shutdown_out: amr_startup(sc); @@ -805,7 +822,9 @@ amr_ioctl(struct cdev *dev, u_long cmd, struct amr_linux_ioctl ali; int adapter, error; + newbus_slock(); devclass = devclass_find("amr"); + newbus_sunlock(); if (devclass == NULL) return (ENOENT); Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/ata/ata-all.c Sun Aug 2 14:28:40 2009 (r196037) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); static d_ioctl_t ata_ioctl; static struct cdevsw ata_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, /* we need this as newbus isn't mpsafe */ .d_ioctl = ata_ioctl, .d_name = "ata", }; @@ -204,7 +203,9 @@ ata_conn_event(void *context, int dummy) { device_t dev = (device_t)context; + newbus_xlock(); ata_reinit(dev); + newbus_xunlock(); } int @@ -246,7 +247,6 @@ ata_reinit(device_t dev) /* reinit the children and delete any that fails */ if (!device_get_children(dev, &children, &nchildren)) { - mtx_lock(&Giant); /* newbus suckage it needs Giant */ for (i = 0; i < nchildren; i++) { /* did any children go missing ? */ if (children[i] && device_is_attached(children[i]) && @@ -269,7 +269,6 @@ ata_reinit(device_t dev) } } free(children, M_TEMP); - mtx_unlock(&Giant); /* newbus suckage dealt with, release Giant */ } /* if we still have a good request put it on the queue again */ @@ -395,6 +394,7 @@ ata_ioctl(struct cdev *dev, u_long cmd, int *value = (int *)data; int i, nchildren, error = ENOTTY; + newbus_xlock(); switch (cmd) { case IOCATAGMAXCHANNEL: /* In case we have channel 0..n this will return n+1. */ @@ -405,32 +405,40 @@ ata_ioctl(struct cdev *dev, u_long cmd, case IOCATAREINIT: if (*value >= devclass_get_maxunit(ata_devclass) || !(device = devclass_get_device(ata_devclass, *value)) || - !device_is_attached(device)) + !device_is_attached(device)) { + newbus_xunlock(); return ENXIO; + } error = ata_reinit(device); break; case IOCATAATTACH: if (*value >= devclass_get_maxunit(ata_devclass) || !(device = devclass_get_device(ata_devclass, *value)) || - !device_is_attached(device)) + !device_is_attached(device)) { + newbus_xunlock(); return ENXIO; + } error = DEVICE_ATTACH(device); break; case IOCATADETACH: if (*value >= devclass_get_maxunit(ata_devclass) || !(device = devclass_get_device(ata_devclass, *value)) || - !device_is_attached(device)) + !device_is_attached(device)) { + newbus_xunlock(); return ENXIO; + } error = DEVICE_DETACH(device); break; case IOCATADEVICES: if (devices->channel >= devclass_get_maxunit(ata_devclass) || !(device = devclass_get_device(ata_devclass, devices->channel)) || - !device_is_attached(device)) + !device_is_attached(device)) { + newbus_xunlock(); return ENXIO; + } bzero(devices->name[0], 32); bzero(&devices->params[0], sizeof(struct ata_params)); bzero(devices->name[1], 32); @@ -465,6 +473,7 @@ ata_ioctl(struct cdev *dev, u_long cmd, if (ata_raid_ioctl_func) error = ata_raid_ioctl_func(cmd, data); } + newbus_xunlock(); return error; } @@ -572,7 +581,7 @@ ata_boot_attach(void) struct ata_channel *ch; int ctlr; - mtx_lock(&Giant); /* newbus suckage it needs Giant */ + newbus_xlock(); /* kick of probe and attach on all channels */ for (ctlr = 0; ctlr < devclass_get_maxunit(ata_devclass); ctlr++) { @@ -587,8 +596,7 @@ ata_boot_attach(void) free(ata_delayed_attach, M_TEMP); ata_delayed_attach = NULL; } - - mtx_unlock(&Giant); /* newbus suckage dealt with, release Giant */ + newbus_xunlock(); } @@ -717,7 +725,6 @@ ata_identify(device_t dev) if (bootverbose) device_printf(dev, "Identifying devices: %08x\n", ch->devices); - mtx_lock(&Giant); /* Skip existing devices. */ if (!device_get_children(dev, &children, &nchildren)) { for (i = 0; i < nchildren; i++) { @@ -729,10 +736,8 @@ ata_identify(device_t dev) /* Create new devices. */ if (bootverbose) device_printf(dev, "New devices: %08x\n", n); - if (n == 0) { - mtx_unlock(&Giant); + if (n == 0) return (0); - } for (i = 0; i < ATA_PM; ++i) { if (n & (((ATA_ATA_MASTER | ATA_ATAPI_MASTER) << i))) { int unit = -1; @@ -775,7 +780,6 @@ ata_identify(device_t dev) } bus_generic_probe(dev); bus_generic_attach(dev); - mtx_unlock(&Giant); return 0; } Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/atkbdc/psm.c Sun Aug 2 14:28:40 2009 (r196037) @@ -1488,7 +1488,9 @@ psmopen(struct cdev *dev, int flag, int if (sc->state & PSM_OPEN) return (EBUSY); + newbus_xlock(); device_busy(devclass_get_device(psm_devclass, unit)); + newbus_xunlock(); /* Initialize state */ sc->mode.level = sc->dflt_mode.level; @@ -1643,7 +1645,9 @@ psmclose(struct cdev *dev, int flag, int /* close is almost always successful */ sc->state &= ~PSM_OPEN; kbdc_lock(sc->kbdc, FALSE); + newbus_xlock(); device_unbusy(devclass_get_device(psm_devclass, unit)); + newbus_xunlock(); return (0); } Modified: head/sys/dev/bktr/bktr_os.c ============================================================================== --- head/sys/dev/bktr/bktr_os.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/bktr/bktr_os.c Sun Aug 2 14:28:40 2009 (r196037) @@ -597,7 +597,9 @@ bktr_open( struct cdev *dev, int flags, return( ENXIO ); /* Record that the device is now busy */ + newbus_xlock(); device_busy(devclass_get_device(bktr_devclass, unit)); + newbus_xunlock(); if (bt848_card != -1) { @@ -668,8 +670,11 @@ bktr_open( struct cdev *dev, int flags, } /* If there was an error opening the device, undo the busy status */ - if (result != 0) + if (result != 0) { + newbus_xlock(); device_unbusy(devclass_get_device(bktr_devclass, unit)); + newbus_xunlock(); + } return( result ); } @@ -689,6 +694,7 @@ bktr_close( struct cdev *dev, int flags, /* Get the device data */ bktr = (struct bktr_softc*)devclass_get_softc(bktr_devclass, unit); if (bktr == NULL) { + /* the device is no longer valid/functioning */ return (ENXIO); } @@ -705,10 +711,11 @@ bktr_close( struct cdev *dev, int flags, break; default: return (ENXIO); - break; } + newbus_xlock(); device_unbusy(devclass_get_device(bktr_devclass, unit)); + newbus_xunlock(); return( result ); } Modified: head/sys/dev/drm/drm_drv.c ============================================================================== --- head/sys/dev/drm/drm_drv.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/drm/drm_drv.c Sun Aug 2 14:28:40 2009 (r196037) @@ -614,11 +614,13 @@ int drm_open(struct cdev *kdev, int flag if (!retcode) { atomic_inc(&dev->counts[_DRM_STAT_OPENS]); + newbus_xlock(); DRM_LOCK(); device_busy(dev->device); if (!dev->open_count++) retcode = drm_firstopen(dev); DRM_UNLOCK(); + newbus_xunlock(); } return retcode; @@ -632,6 +634,11 @@ void drm_close(void *data) DRM_DEBUG("open_count = %d\n", dev->open_count); + /* + * We require to lock newbus here for handling device_unbusy() and + * avoid a LOR with DRM_LOCK. + */ + newbus_xlock(); DRM_LOCK(); if (dev->driver->preclose != NULL) @@ -708,6 +715,7 @@ void drm_close(void *data) } DRM_UNLOCK(); + newbus_xunlock(); } /* drm_ioctl is called whenever a process performs an ioctl on /dev/drm. Modified: head/sys/dev/ips/ips_pci.c ============================================================================== --- head/sys/dev/ips/ips_pci.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/ips/ips_pci.c Sun Aug 2 14:28:40 2009 (r196037) @@ -173,10 +173,12 @@ ips_intrhook(void *arg) struct ips_softc *sc = (struct ips_softc *)arg; config_intrhook_disestablish(&sc->ips_ich); + newbus_xlock(); if (ips_adapter_init(sc)) ips_pci_free(sc); else sc->configured = 1; + newbus_xunlock(); } static int ips_pci_free(ips_softc_t *sc) Modified: head/sys/dev/mfi/mfi.c ============================================================================== --- head/sys/dev/mfi/mfi.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/mfi/mfi.c Sun Aug 2 14:28:40 2009 (r196037) @@ -1327,11 +1327,11 @@ mfi_add_ld_complete(struct mfi_command * mfi_release_command(cm); mtx_unlock(&sc->mfi_io_lock); - mtx_lock(&Giant); + newbus_xlock(); if ((child = device_add_child(sc->mfi_dev, "mfid", -1)) == NULL) { device_printf(sc->mfi_dev, "Failed to add logical disk\n"); free(ld_info, M_MFIBUF); - mtx_unlock(&Giant); + newbus_xunlock(); mtx_lock(&sc->mfi_io_lock); return; } @@ -1339,7 +1339,7 @@ mfi_add_ld_complete(struct mfi_command * device_set_ivars(child, ld_info); device_set_desc(child, "MFI Logical Disk"); bus_generic_attach(sc->mfi_dev); - mtx_unlock(&Giant); + newbus_xunlock(); mtx_lock(&sc->mfi_io_lock); } @@ -1805,9 +1805,9 @@ mfi_check_command_post(struct mfi_softc KASSERT(ld != NULL, ("volume dissappeared")); if (cm->cm_frame->header.cmd_status == MFI_STAT_OK) { mtx_unlock(&sc->mfi_io_lock); - mtx_lock(&Giant); + newbus_xlock(); device_delete_child(sc->mfi_dev, ld->ld_dev); - mtx_unlock(&Giant); + newbus_xunlock(); mtx_lock(&sc->mfi_io_lock); } else mfi_disk_enable(ld); @@ -1815,11 +1815,11 @@ mfi_check_command_post(struct mfi_softc case MFI_DCMD_CFG_CLEAR: if (cm->cm_frame->header.cmd_status == MFI_STAT_OK) { mtx_unlock(&sc->mfi_io_lock); - mtx_lock(&Giant); + newbus_xlock(); TAILQ_FOREACH_SAFE(ld, &sc->mfi_ld_tqh, ld_link, ldn) { device_delete_child(sc->mfi_dev, ld->ld_dev); } - mtx_unlock(&Giant); + newbus_xunlock(); mtx_lock(&sc->mfi_io_lock); } else { TAILQ_FOREACH(ld, &sc->mfi_ld_tqh, ld_link) @@ -1985,7 +1985,9 @@ mfi_ioctl(struct cdev *dev, u_long cmd, adapter = ioc->mfi_adapter_no; if (device_get_unit(sc->mfi_dev) == 0 && adapter != 0) { + newbus_slock(); devclass = devclass_find("mfi"); + newbus_sunlock(); sc = devclass_get_softc(devclass, adapter); } mtx_lock(&sc->mfi_io_lock); @@ -2173,7 +2175,9 @@ out: struct mfi_linux_ioc_packet l_ioc; int adapter; + newbus_slock(); devclass = devclass_find("mfi"); + newbus_sunlock(); if (devclass == NULL) return (ENOENT); @@ -2194,7 +2198,9 @@ out: struct mfi_linux_ioc_aen l_aen; int adapter; + newbus_slock(); devclass = devclass_find("mfi"); + newbus_sunlock(); if (devclass == NULL) return (ENOENT); Modified: head/sys/dev/mlx/mlx.c ============================================================================== --- head/sys/dev/mlx/mlx.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/mlx/mlx.c Sun Aug 2 14:28:40 2009 (r196037) @@ -772,7 +772,9 @@ mlx_ioctl(struct cdev *dev, u_long cmd, * Scan the controller to see whether new drives have appeared. */ case MLX_RESCAN_DRIVES: + newbus_xlock(); mlx_startup(sc); + newbus_xunlock(); return(0); /* Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/mmc/mmc.c Sun Aug 2 14:28:40 2009 (r196037) @@ -1496,7 +1496,9 @@ mmc_delayed_attach(void *xsc) { struct mmc_softc *sc = xsc; + newbus_xlock(); mmc_scan(sc); + newbus_xunlock(); config_intrhook_disestablish(&sc->config_intrhook); } Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/pccbb/pccbb.c Sun Aug 2 14:28:40 2009 (r196037) @@ -464,14 +464,7 @@ cbb_event_thread(void *arg) sc->flags |= CBB_KTHREAD_RUNNING; while ((sc->flags & CBB_KTHREAD_DONE) == 0) { mtx_unlock(&sc->mtx); - /* - * We take out Giant here because we need it deep, - * down in the bowels of the vm system for mapping the - * memory we need to read the CIS. In addition, since - * we are adding/deleting devices from the dev tree, - * and that code isn't MP safe, we have to hold Giant. - */ - mtx_lock(&Giant); + newbus_xlock(); status = cbb_get(sc, CBB_SOCKET_STATE); DPRINTF(("Status is 0x%x\n", status)); if (!CBB_CARD_PRESENT(status)) { @@ -497,7 +490,7 @@ cbb_event_thread(void *arg) not_a_card = 0; /* We know card type */ cbb_insert(sc); } - mtx_unlock(&Giant); + newbus_xunlock(); /* * First time through we need to tell mountroot that we're Modified: head/sys/dev/pst/pst-iop.c ============================================================================== --- head/sys/dev/pst/pst-iop.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/pst/pst-iop.c Sun Aug 2 14:28:40 2009 (r196037) @@ -152,7 +152,9 @@ iop_attach(void *arg) break; case I2O_CLASS_RANDOM_BLOCK_STORAGE: + newbus_xlock(); pst_add_raid(sc, &sc->lct[i]); + newbus_xunlock(); break; } } Modified: head/sys/dev/rp/rp.c ============================================================================== --- head/sys/dev/rp/rp.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/rp/rp.c Sun Aug 2 14:28:40 2009 (r196037) @@ -903,7 +903,9 @@ rpopen(struct tty *tp) rp_callout_handle = timeout(rp_do_poll, (void *)NULL, POLL_INTERVAL); + newbus_xlock(); device_busy(rp->rp_ctlp->dev); + newbus_xunlock(); return(0); } @@ -914,7 +916,9 @@ rpclose(struct tty *tp) rp = tty_softc(tp); rphardclose(tp); + newbus_xlock(); device_unbusy(rp->rp_ctlp->dev); + newbus_xunlock(); } static void Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/sound/pci/hda/hdac.c Sun Aug 2 14:28:40 2009 (r196037) @@ -7435,6 +7435,7 @@ hdac_attach2(void *arg) quirks_on, quirks_off); ); + newbus_xlock(); hdac_lock(sc); /* Remove ourselves from the config hooks */ @@ -7674,6 +7675,7 @@ hdac_attach2(void *arg) SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), OID_AUTO, "pindump", CTLTYPE_INT | CTLFLAG_RW, sc->dev, sizeof(sc->dev), sysctl_hdac_pindump, "I", "Dump pin states/data"); + newbus_xunlock(); } /**************************************************************************** Modified: head/sys/dev/twe/twe.c ============================================================================== --- head/sys/dev/twe/twe.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/twe/twe.c Sun Aug 2 14:28:40 2009 (r196037) @@ -294,8 +294,10 @@ twe_init(struct twe_softc *sc) /* * Scan for drives */ + newbus_xlock(); for (i = 0; i < TWE_MAX_UNITS; i++) twe_add_unit(sc, i); + newbus_xunlock(); /* * Initialise connection with controller. @@ -621,11 +623,15 @@ twe_ioctl(struct twe_softc *sc, int ioct break; case TWEIO_ADD_UNIT: + newbus_xlock(); error = twe_add_unit(sc, td->td_unit); + newbus_xunlock(); break; case TWEIO_DEL_UNIT: + newbus_xlock(); error = twe_del_unit(sc, td->td_unit); + newbus_xunlock(); break; /* XXX implement ATA PASSTHROUGH */ Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/usb/controller/usb_controller.c Sun Aug 2 14:28:40 2009 (r196037) @@ -143,9 +143,7 @@ usb_attach(device_t dev) } if (usb_post_init_called) { - mtx_lock(&Giant); usb_attach_sub(dev, bus); - mtx_unlock(&Giant); usb_needs_explore(bus, 1); } return (0); /* return success */ @@ -228,20 +226,13 @@ usb_bus_explore(struct usb_proc_msg *pm) } USB_BUS_UNLOCK(bus); - mtx_lock(&Giant); - /* * First update the USB power state! */ usb_bus_powerd(bus); - /* - * Explore the Root USB HUB. This call can sleep, - * exiting Giant, which is actually Giant. - */ - (udev->hub->explore) (udev); - - mtx_unlock(&Giant); + /* Explore the Root USB HUB. */ + (udev->hub->explore) (udev); USB_BUS_LOCK(bus); } if (bus->bus_roothold != NULL) { @@ -269,7 +260,7 @@ usb_bus_detach(struct usb_proc_msg *pm) device_set_softc(dev, NULL); USB_BUS_UNLOCK(bus); - mtx_lock(&Giant); + newbus_xlock(); /* detach children first */ bus_generic_detach(dev); @@ -281,7 +272,7 @@ usb_bus_detach(struct usb_proc_msg *pm) usb_free_device(udev, USB_UNCFG_FLAG_FREE_EP0); - mtx_unlock(&Giant); + newbus_xunlock(); USB_BUS_LOCK(bus); /* clear bdev variable last */ bus->bdev = NULL; @@ -350,7 +341,7 @@ usb_bus_attach(struct usb_proc_msg *pm) } USB_BUS_UNLOCK(bus); - mtx_lock(&Giant); /* XXX not required by USB */ + newbus_xlock(); /* default power_mask value */ bus->hw_power_state = @@ -383,7 +374,7 @@ usb_bus_attach(struct usb_proc_msg *pm) err = USB_ERR_NOMEM; } - mtx_unlock(&Giant); + newbus_xunlock(); USB_BUS_LOCK(bus); if (err) { @@ -472,7 +463,7 @@ usb_post_init(void *arg) int max; int n; - mtx_lock(&Giant); + newbus_xlock(); usb_devclass_ptr = devclass_find("usbus"); @@ -483,11 +474,8 @@ usb_post_init(void *arg) dev = devclass_get_device(dc, n); if (dev && device_is_attached(dev)) { bus = device_get_ivars(dev); - if (bus) { - mtx_lock(&Giant); + if (bus) usb_attach_sub(dev, bus); - mtx_unlock(&Giant); - } } } } else { @@ -499,7 +487,7 @@ usb_post_init(void *arg) usb_needs_explore_all(); - mtx_unlock(&Giant); + newbus_xunlock(); } SYSINIT(usb_post_init, SI_SUB_KICK_SCHEDULER, SI_ORDER_ANY, usb_post_init, NULL); Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/usb/input/ukbd.c Sun Aug 2 14:28:40 2009 (r196037) @@ -745,7 +745,7 @@ ukbd_attach(device_t dev) uint16_t n; uint16_t hid_len; - mtx_assert(&Giant, MA_OWNED); + mtx_lock(&Giant); kbd_init_struct(kbd, UKBD_DRIVER_NAME, KB_OTHER, unit, 0, 0, 0); @@ -854,9 +854,6 @@ ukbd_attach(device_t dev) if (bootverbose) { genkbd_diag(kbd, bootverbose); } - /* lock keyboard mutex */ - - mtx_lock(&Giant); /* start the keyboard */ @@ -879,7 +876,7 @@ ukbd_detach(device_t dev) struct ukbd_softc *sc = device_get_softc(dev); int error; - mtx_assert(&Giant, MA_OWNED); + mtx_lock(&Giant); DPRINTF("\n"); @@ -916,6 +913,8 @@ ukbd_detach(device_t dev) usb_callout_drain(&sc->sc_callout); + mtx_unlock(&Giant); + DPRINTF("%s: disconnected\n", device_get_nameunit(dev)); @@ -927,9 +926,9 @@ ukbd_resume(device_t dev) { struct ukbd_softc *sc = device_get_softc(dev); - mtx_assert(&Giant, MA_OWNED); - + mtx_lock(&Giant); ukbd_clear_state(&sc->sc_kbd); + mtx_unlock(&Giant); return (0); } Modified: head/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- head/sys/dev/usb/net/usb_ethernet.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/usb/net/usb_ethernet.c Sun Aug 2 14:28:40 2009 (r196037) @@ -221,10 +221,10 @@ ue_attach_post_task(struct usb_proc_msg if (ue->ue_methods->ue_mii_upd != NULL && ue->ue_methods->ue_mii_sts != NULL) { - mtx_lock(&Giant); /* device_xxx() depends on this */ + newbus_xlock(); error = mii_phy_probe(ue->ue_dev, &ue->ue_miibus, ue_ifmedia_upd, ue->ue_methods->ue_mii_sts); - mtx_unlock(&Giant); + newbus_xunlock(); if (error) { device_printf(ue->ue_dev, "MII without any PHY\n"); goto error; @@ -279,9 +279,12 @@ uether_ifdetach(struct usb_ether *ue) /* detach miibus */ if (ue->ue_miibus != NULL) { - mtx_lock(&Giant); /* device_xxx() depends on this */ + + /* + * It is up to the callers to provide the correct + * newbus locking. + */ device_delete_child(ue->ue_dev, ue->ue_miibus); - mtx_unlock(&Giant); } /* detach ethernet */ Modified: head/sys/dev/usb/usb_compat_linux.c ============================================================================== --- head/sys/dev/usb/usb_compat_linux.c Sun Aug 2 14:25:26 2009 (r196036) +++ head/sys/dev/usb/usb_compat_linux.c Sun Aug 2 14:28:40 2009 (r196037) @@ -215,14 +215,12 @@ usb_linux_probe(device_t dev) if (uaa->usb_mode != USB_MODE_HOST) { return (ENXIO); } - mtx_lock(&Giant); LIST_FOREACH(udrv, &usb_linux_driver_list, linux_driver_list) { if (usb_linux_lookup_id(udrv->id_table, uaa)) { err = 0; break; } } - mtx_unlock(&Giant); return (err); } @@ -239,9 +237,7 @@ usb_linux_get_usb_driver(struct usb_linu { struct usb_driver *udrv; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From julian at FreeBSD.org Sun Aug 2 16:59:03 2009 From: julian at FreeBSD.org (Julian Elischer) Date: Sun Aug 2 16:59:15 2009 Subject: svn commit: r196038 - head/sys/kern Message-ID: <200908021659.n72Gx23r019861@svn.freebsd.org> Author: julian Date: Sun Aug 2 16:59:02 2009 New Revision: 196038 URL: http://svn.freebsd.org/changeset/base/196038 Log: Stop uuidgen(2) from crashing in vimage kerenels. make curvnet valid when needed. Reviewed by: bz@ Approved by: re (kib) Modified: head/sys/kern/kern_uuid.c Modified: head/sys/kern/kern_uuid.c ============================================================================== --- head/sys/kern/kern_uuid.c Sun Aug 2 14:28:40 2009 (r196037) +++ head/sys/kern/kern_uuid.c Sun Aug 2 16:59:02 2009 (r196038) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -93,6 +94,7 @@ uuid_node(uint16_t *node) struct sockaddr_dl *sdl; int i; + CURVNET_SET(TD_TO_VNET(curthread)); IFNET_RLOCK(); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { /* Walk the address list */ @@ -105,6 +107,7 @@ uuid_node(uint16_t *node) bcopy(LLADDR(sdl), node, UUID_NODE_LEN); IF_ADDR_UNLOCK(ifp); IFNET_RUNLOCK(); + CURVNET_RESTORE(); return; } } @@ -115,6 +118,7 @@ uuid_node(uint16_t *node) for (i = 0; i < (UUID_NODE_LEN>>1); i++) node[i] = (uint16_t)arc4random(); *((uint8_t*)node) |= 0x01; + CURVNET_RESTORE(); } /* From alfred at freebsd.org Sun Aug 2 19:29:03 2009 From: alfred at freebsd.org (Alfred Perlstein) Date: Sun Aug 2 19:29:14 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: References: <200907300014.n6U0EZ77086341@svn.freebsd.org> <20090731212140.GK47463@elvis.mu.org> <200908010615.02972.hselasky@c2i.net> Message-ID: <20090802192902.GS47463@elvis.mu.org> * Robert Watson [090801 15:15] wrote: > > On Sat, 1 Aug 2009, Hans Petter Selasky wrote: > > >>>This has slowed down core dumps very significantly. What used to take > >>>10-15s on my system now takes around 3 minutes. A simple test is to > >>>break into ddb and "call doadump" with or without this rev. I have a > >>>serial console on this machine and so I can use ddb whether the attached > >>>USB keyboard works or not. > > > >It's because there is a DELAY(1000) in the UKBD's polling routine so that > >key- repeating will work, no magic. > > Given a choice between dumping 10x faster and having automatic key repeat > in DDB, I'd lean towards the former. :-) > Robert, and *@freebsd.org, Hans should be back in a day or so to address this. If critical I can probably back out the offending code, but I think it makes sense to wait a few days more for a more comprehensive fix. -- - Alfred Perlstein .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250 .- FreeBSD committer From rwatson at FreeBSD.org Sun Aug 2 19:43:33 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Sun Aug 2 19:43:47 2009 Subject: svn commit: r196039 - in head/sys: contrib/pf/net dev/cxgb/ulp/tom net netinet netinet6 Message-ID: <200908021943.n72JhWKX023102@svn.freebsd.org> Author: rwatson Date: Sun Aug 2 19:43:32 2009 New Revision: 196039 URL: http://svn.freebsd.org/changeset/base/196039 Log: Many network stack subsystems use a single global data structure to hold all pertinent statatistics for the subsystem. These structures are sometimes "borrowed" by kernel modules that require a place to store statistics for similar events. Add KPI accessor functions for statistics structures referenced by kernel modules so that they no longer encode certain specifics of how the data structures are named and stored. This change is intended to make it easier to move to per-CPU network stats following 8.0-RELEASE. The following modules are affected by this change: if_bridge if_cxgb if_gif ip_mroute ipdivert pf In practice, most of these statistics consumers should, in fact, maintain their own statistics data structures rather than borrowing structures from the base network stack. However, that change is too agressive for this point in the release cycle. Reviewed by: bz Approved by: re (kib) Modified: head/sys/contrib/pf/net/pf.c head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c head/sys/net/if_bridge.c head/sys/netinet/icmp6.h head/sys/netinet/icmp_var.h head/sys/netinet/in_gif.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_var.h head/sys/netinet/tcp_input.c head/sys/netinet/tcp_var.h head/sys/netinet/udp_usrreq.c head/sys/netinet/udp_var.h head/sys/netinet6/icmp6.c Modified: head/sys/contrib/pf/net/pf.c ============================================================================== --- head/sys/contrib/pf/net/pf.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/contrib/pf/net/pf.c Sun Aug 2 19:43:32 2009 (r196039) @@ -6141,7 +6141,7 @@ pf_route(struct mbuf **m, struct pf_rule if (r->rt == PF_FASTROUTE) { in_rtalloc(ro, 0); if (ro->ro_rt == 0) { - IPSTAT_INC(ips_noroute); + KMOD_IPSTAT_INC(ips_noroute); goto bad; } @@ -6272,16 +6272,16 @@ pf_route(struct mbuf **m, struct pf_rule if ((ifp->if_capabilities & IFCAP_CSUM_IPv4) && ifp->if_bridge == NULL) { m0->m_pkthdr.csum_flags |= M_IPV4_CSUM_OUT; - IPSTAT_INC(ips_outhwcsum); + KMOD_IPSTAT_INC(ips_outhwcsum); } else { ip->ip_sum = 0; ip->ip_sum = in_cksum(m0, ip->ip_hl << 2); } /* Update relevant hardware checksum stats for TCP/UDP */ if (m0->m_pkthdr.csum_flags & M_TCPV4_CSUM_OUT) - TCPSTAT_INC(tcpstat.tcps_outhwcsum); + KMOD_TCPSTAT_INC(tcps_outhwcsum); else if (m0->m_pkthdr.csum_flags & M_UDPV4_CSUM_OUT) - UDPSTAT_INC(udps_outhwcsum); + KMOD_UDPSTAT_INC(udps_outhwcsum); error = (*ifp->if_output)(ifp, m0, sintosa(dst), NULL); goto done; } @@ -6291,7 +6291,7 @@ pf_route(struct mbuf **m, struct pf_rule * Must be able to put at least 8 bytes per fragment. */ if (ip->ip_off & htons(IP_DF)) { - IPSTAT_INC(ips_cantfrag); + KMOD_IPSTAT_INC(ips_cantfrag); if (r->rt != PF_DUPTO) { #ifdef __FreeBSD__ /* icmp_error() expects host byte ordering */ @@ -6348,7 +6348,7 @@ pf_route(struct mbuf **m, struct pf_rule } if (error == 0) - IPSTAT_INC(ips_fragmented); + KMOD_IPSTAT_INC(ips_fragmented); done: if (r->rt != PF_DUPTO) @@ -6622,23 +6622,23 @@ pf_check_proto_cksum(struct mbuf *m, int switch (p) { case IPPROTO_TCP: { - TCPSTAT_INC(tcps_rcvbadsum); + KMOD_TCPSTAT_INC(tcps_rcvbadsum); break; } case IPPROTO_UDP: { - UDPSTAT_INC(udps_badsum); + KMOD_UDPSTAT_INC(udps_badsum); break; } case IPPROTO_ICMP: { - ICMPSTAT_INC(icps_checksum); + KMOD_ICMPSTAT_INC(icps_checksum); break; } #ifdef INET6 case IPPROTO_ICMPV6: { - ICMP6STAT_INC(icp6s_checksum); + KMOD_ICMP6STAT_INC(icp6s_checksum); break; } #endif /* INET6 */ @@ -6725,17 +6725,17 @@ pf_check_proto_cksum(struct mbuf *m, int m->m_pkthdr.csum_flags |= flag_bad; switch (p) { case IPPROTO_TCP: - TCPSTAT_INC(tcps_rcvbadsum); + KMOD_TCPSTAT_INC(tcps_rcvbadsum); break; case IPPROTO_UDP: - UDPSTAT_INC(udps_badsum); + KMOD_UDPSTAT_INC(udps_badsum); break; case IPPROTO_ICMP: - ICMPSTAT_INC(icps_checksum); + KMOD_ICMPSTAT_INC(icps_checksum); break; #ifdef INET6 case IPPROTO_ICMPV6: - ICMP6STAT_INC(icp6s_checksum); + KMOD_ICMP6STAT_INC(icp6s_checksum); break; #endif /* INET6 */ } Modified: head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c ============================================================================== --- head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Sun Aug 2 19:43:32 2009 (r196039) @@ -3821,7 +3821,7 @@ socket_act_establish(struct socket *so, #endif toep->tp_state = tp->t_state; - TCPSTAT_INC(tcps_connects); + KMOD_TCPSTAT_INC(tcps_connects); } Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/net/if_bridge.c Sun Aug 2 19:43:32 2009 (r196039) @@ -3244,12 +3244,12 @@ bridge_ip_checkbasic(struct mbuf **mp) if ((m = m_copyup(m, sizeof(struct ip), (max_linkhdr + 3) & ~3)) == NULL) { /* XXXJRT new stat, please */ - IPSTAT_INC(ips_toosmall); + KMOD_IPSTAT_INC(ips_toosmall); goto bad; } } else if (__predict_false(m->m_len < sizeof (struct ip))) { if ((m = m_pullup(m, sizeof (struct ip))) == NULL) { - IPSTAT_INC(ips_toosmall); + KMOD_IPSTAT_INC(ips_toosmall); goto bad; } } @@ -3257,17 +3257,17 @@ bridge_ip_checkbasic(struct mbuf **mp) if (ip == NULL) goto bad; if (ip->ip_v != IPVERSION) { - IPSTAT_INC(ips_badvers); + KMOD_IPSTAT_INC(ips_badvers); goto bad; } hlen = ip->ip_hl << 2; if (hlen < sizeof(struct ip)) { /* minimum header length */ - IPSTAT_INC(ips_badhlen); + KMOD_IPSTAT_INC(ips_badhlen); goto bad; } if (hlen > m->m_len) { if ((m = m_pullup(m, hlen)) == 0) { - IPSTAT_INC(ips_badhlen); + KMOD_IPSTAT_INC(ips_badhlen); goto bad; } ip = mtod(m, struct ip *); @@ -3284,7 +3284,7 @@ bridge_ip_checkbasic(struct mbuf **mp) } } if (sum) { - IPSTAT_INC(ips_badsum); + KMOD_IPSTAT_INC(ips_badsum); goto bad; } @@ -3295,7 +3295,7 @@ bridge_ip_checkbasic(struct mbuf **mp) * Check for additional length bogosity */ if (len < hlen) { - IPSTAT_INC(ips_badlen); + KMOD_IPSTAT_INC(ips_badlen); goto bad; } @@ -3305,7 +3305,7 @@ bridge_ip_checkbasic(struct mbuf **mp) * Drop packet if shorter than we expect. */ if (m->m_pkthdr.len < len) { - IPSTAT_INC(ips_tooshort); + KMOD_IPSTAT_INC(ips_tooshort); goto bad; } @@ -3418,7 +3418,7 @@ bridge_fragment(struct ifnet *ifp, struc } if (error == 0) - IPSTAT_INC(ips_fragmented); + KMOD_IPSTAT_INC(ips_fragmented); return (error); Modified: head/sys/netinet/icmp6.h ============================================================================== --- head/sys/netinet/icmp6.h Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/icmp6.h Sun Aug 2 19:43:32 2009 (r196039) @@ -600,8 +600,19 @@ struct icmp6stat { }; #ifdef _KERNEL +/* + * In-kernel consumers can use these accessor macros directly to update + * stats. + */ #define ICMP6STAT_ADD(name, val) V_icmp6stat.name += (val) #define ICMP6STAT_INC(name) ICMP6STAT_ADD(name, 1) + +/* + * Kernel module consumers must use this accessor macro. + */ +void kmod_icmp6stat_inc(int statnum); +#define KMOD_ICMP6STAT_INC(name) \ + kmod_icmp6stat_inc(offsetof(struct icmp6stat, name) / sizeof(u_quad_t)) #endif /* Modified: head/sys/netinet/icmp_var.h ============================================================================== --- head/sys/netinet/icmp_var.h Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/icmp_var.h Sun Aug 2 19:43:32 2009 (r196039) @@ -58,8 +58,19 @@ struct icmpstat { }; #ifdef _KERNEL +/* + * In-kernel consumers can use these accessor macros directly to update + * stats. + */ #define ICMPSTAT_ADD(name, val) V_icmpstat.name += (val) #define ICMPSTAT_INC(name) ICMPSTAT_ADD(name, 1) + +/* + * Kernel module consumers must use this accessor macro. + */ +void kmod_icmpstat_inc(int statnum); +#define KMOD_ICMPSTAT_INC(name) \ + kmod_icmpstat_inc(offsetof(struct icmpstat, name) / sizeof(u_long)) #endif /* Modified: head/sys/netinet/in_gif.c ============================================================================== --- head/sys/netinet/in_gif.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/in_gif.c Sun Aug 2 19:43:32 2009 (r196039) @@ -281,14 +281,14 @@ in_gif_input(struct mbuf *m, int off) sc = (struct gif_softc *)encap_getarg(m); if (sc == NULL) { m_freem(m); - IPSTAT_INC(ips_nogif); + KMOD_IPSTAT_INC(ips_nogif); return; } gifp = GIF2IFP(sc); if (gifp == NULL || (gifp->if_flags & IFF_UP) == 0) { m_freem(m); - IPSTAT_INC(ips_nogif); + KMOD_IPSTAT_INC(ips_nogif); return; } @@ -348,7 +348,7 @@ in_gif_input(struct mbuf *m, int off) break; default: - IPSTAT_INC(ips_nogif); + KMOD_IPSTAT_INC(ips_nogif); m_freem(m); return; } Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/ip_divert.c Sun Aug 2 19:43:32 2009 (r196039) @@ -186,7 +186,7 @@ void div_input(struct mbuf *m, int off) { - IPSTAT_INC(ips_noproto); + KMOD_IPSTAT_INC(ips_noproto); m_freem(m); } @@ -310,8 +310,8 @@ divert_packet(struct mbuf *m, int incomi INP_INFO_RUNLOCK(&V_divcbinfo); if (sa == NULL) { m_freem(m); - IPSTAT_INC(ips_noproto); - IPSTAT_DEC(ips_delivered); + KMOD_IPSTAT_INC(ips_noproto); + KMOD_IPSTAT_DEC(ips_delivered); } } @@ -396,7 +396,7 @@ div_output(struct socket *so, struct mbu ip->ip_off = ntohs(ip->ip_off); /* Send packet to output processing */ - IPSTAT_INC(ips_rawout); /* XXX */ + KMOD_IPSTAT_INC(ips_rawout); /* XXX */ #ifdef MAC mac_inpcb_create_mbuf(inp, m); @@ -567,7 +567,7 @@ div_send(struct socket *so, int flags, s /* Packet must have a header (but that's about it) */ if (m->m_len < sizeof (struct ip) && (m = m_pullup(m, sizeof (struct ip))) == 0) { - IPSTAT_INC(ips_toosmall); + KMOD_IPSTAT_INC(ips_toosmall); m_freem(m); return EINVAL; } Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/ip_icmp.c Sun Aug 2 19:43:32 2009 (r196039) @@ -172,6 +172,20 @@ icmp_init(void) } /* + * Kernel module interface for updating icmpstat. The argument is an index + * into icmpstat treated as an array of u_long. While this encodes the + * general layout of icmpstat into the caller, it doesn't encode its + * location, so that future changes to add, for example, per-CPU stats + * support won't cause binary compatibility problems for kernel modules. + */ +void +kmod_icmpstat_inc(int statnum) +{ + + (*((u_long *)&V_icmpstat + statnum))++; +} + +/* * Generate an error packet of type error * in response to bad packet ip. */ Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/ip_input.c Sun Aug 2 19:43:32 2009 (r196039) @@ -235,6 +235,27 @@ VNET_DEFINE(int, fw_one_pass) = 1; static void ip_freef(struct ipqhead *, struct ipq *); +/* + * Kernel module interface for updating ipstat. The argument is an index + * into ipstat treated as an array of u_long. While this encodes the general + * layout of ipstat into the caller, it doesn't encode its location, so that + * future changes to add, for example, per-CPU stats support won't cause + * binary compatibility problems for kernel modules. + */ +void +kmod_ipstat_inc(int statnum) +{ + + (*((u_long *)&V_ipstat + statnum))++; +} + +void +kmod_ipstat_dec(int statnum) +{ + + (*((u_long *)&V_ipstat + statnum))--; +} + static int sysctl_netinet_intr_queue_maxlen(SYSCTL_HANDLER_ARGS) { Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/ip_var.h Sun Aug 2 19:43:32 2009 (r196039) @@ -131,11 +131,25 @@ struct ipstat { #include +/* + * In-kernel consumers can use these accessor macros directly to update + * stats. + */ #define IPSTAT_ADD(name, val) V_ipstat.name += (val) #define IPSTAT_SUB(name, val) V_ipstat.name -= (val) #define IPSTAT_INC(name) IPSTAT_ADD(name, 1) #define IPSTAT_DEC(name) IPSTAT_SUB(name, 1) +/* + * Kernel module consumers must use this accessor macro. + */ +void kmod_ipstat_inc(int statnum); +#define KMOD_IPSTAT_INC(name) \ + kmod_ipstat_inc(offsetof(struct ipstat, name) / sizeof(u_long)) +void kmod_ipstat_dec(int statnum); +#define KMOD_IPSTAT_DEC(name) \ + kmod_ipstat_dec(offsetof(struct ipstat, name) / sizeof(u_long)) + /* flags passed to ip_output as last parameter */ #define IP_FORWARDING 0x1 /* most of ip header exists */ #define IP_RAWOUTPUT 0x2 /* raw ip header exists */ Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/tcp_input.c Sun Aug 2 19:43:32 2009 (r196039) @@ -217,6 +217,20 @@ static void tcp_newreno_partial_ack(str static void inline tcp_congestion_exp(struct tcpcb *); +/* + * Kernel module interface for updating tcpstat. The argument is an index + * into tcpstat treated as an array of u_long. While this encodes the + * general layout of tcpstat into the caller, it doesn't encode its location, + * so that future changes to add, for example, per-CPU stats support won't + * cause binary compatibility problems for kernel modules. + */ +void +kmod_tcpstat_inc(int statnum) +{ + + (*((u_long *)&V_tcpstat + statnum))++; +} + static void inline tcp_congestion_exp(struct tcpcb *tp) { Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/tcp_var.h Sun Aug 2 19:43:32 2009 (r196039) @@ -474,8 +474,19 @@ struct tcpstat { }; #ifdef _KERNEL +/* + * In-kernel consumers can use these accessor macros directly to update + * stats. + */ #define TCPSTAT_ADD(name, val) V_tcpstat.name += (val) #define TCPSTAT_INC(name) TCPSTAT_ADD(name, 1) + +/* + * Kernel module consumers must use this accessor macro. + */ +void kmod_tcpstat_inc(int statnum); +#define KMOD_TCPSTAT_INC(name) \ + kmod_tcpstat_inc(offsetof(struct tcpstat, name) / sizeof(u_long)) #endif /* Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/udp_usrreq.c Sun Aug 2 19:43:32 2009 (r196039) @@ -203,6 +203,20 @@ udp_init(void) EVENTHANDLER_PRI_ANY); } +/* + * Kernel module interface for updating udpstat. The argument is an index + * into udpstat treated as an array of u_long. While this encodes the + * general layout of udpstat into the caller, it doesn't encode its location, + * so that future changes to add, for example, per-CPU stats support won't + * cause binary compatibility problems for kernel modules. + */ +void +kmod_udpstat_inc(int statnum) +{ + + (*((u_long *)&V_udpstat + statnum))++; +} + int udp_newudpcb(struct inpcb *inp) { Modified: head/sys/netinet/udp_var.h ============================================================================== --- head/sys/netinet/udp_var.h Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet/udp_var.h Sun Aug 2 19:43:32 2009 (r196039) @@ -91,8 +91,19 @@ struct udpstat { }; #ifdef _KERNEL +/* + * In-kernel consumers can use these accessor macros directly to update + * stats. + */ #define UDPSTAT_ADD(name, val) V_udpstat.name += (val) #define UDPSTAT_INC(name) UDPSTAT_ADD(name, 1) + +/* + * Kernel module consumers must use this accessor macro. + */ +void kmod_udpstat_inc(int statnum); +#define KMOD_UDPSTAT_INC(name) \ + kmod_udpstat_inc(offsetof(struct udpstat, name) / sizeof(u_long)) #endif /* Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Sun Aug 2 16:59:02 2009 (r196038) +++ head/sys/netinet6/icmp6.c Sun Aug 2 19:43:32 2009 (r196039) @@ -152,6 +152,20 @@ icmp6_init(void) V_icmp6errpps_count = 0; } +/* + * Kernel module interface for updating icmp6stat. The argument is an index + * into icmp6stat treated as an array of u_quad_t. While this encodes the + * general layout of icmp6stat into the caller, it doesn't encode its + * location, so that future changes to add, for example, per-CPU stats + * support won't cause binary compatibility problems for kernel modules. + */ +void +kmod_icmp6stat_inc(int statnum) +{ + + (*((u_quad_t *)&V_icmp6stat + statnum))++; +} + static void icmp6_errcount(struct icmp6errstat *stat, int type, int code) { From rwatson at FreeBSD.org Sun Aug 2 19:58:17 2009 From: rwatson at FreeBSD.org (Robert N. M. Watson) Date: Sun Aug 2 19:58:53 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <20090802192902.GS47463@elvis.mu.org> References: <200907300014.n6U0EZ77086341@svn.freebsd.org> <20090731212140.GK47463@elvis.mu.org> <200908010615.02972.hselasky@c2i.net> <20090802192902.GS47463@elvis.mu.org> Message-ID: <134A728D-F2F4-4951-81D8-704CC2DB6F9F@FreeBSD.org> On 2 Aug 2009, at 20:29, Alfred Perlstein wrote: > * Robert Watson [090801 15:15] wrote: >> >> On Sat, 1 Aug 2009, Hans Petter Selasky wrote: >> >>>>> This has slowed down core dumps very significantly. What used >>>>> to take >>>>> 10-15s on my system now takes around 3 minutes. A simple test >>>>> is to >>>>> break into ddb and "call doadump" with or without this rev. I >>>>> have a >>>>> serial console on this machine and so I can use ddb whether the >>>>> attached >>>>> USB keyboard works or not. >>> >>> It's because there is a DELAY(1000) in the UKBD's polling routine >>> so that >>> key- repeating will work, no magic. >> >> Given a choice between dumping 10x faster and having automatic key >> repeat >> in DDB, I'd lean towards the former. :-) >> > > Robert, and *@freebsd.org, > > Hans should be back in a day or so to address this. If critical I can > probably back out the offending code, but I think it makes sense to > wait a few days more for a more comprehensive fix. That's my feeling too -- however, I think it would be useful to generate a small concept test patch that disables the key repeat behavior and see if it restores some/all performance. Scott's argument suggests only some, but perhaps we'd get quite a bit, which is what we're looking for. We wouldn't commit the patch but it would let us know we're on the right track. Robert From rwatson at FreeBSD.org Sun Aug 2 22:47:08 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Sun Aug 2 22:47:20 2009 Subject: svn commit: r196041 - head/sys/netinet Message-ID: <200908022247.n72Ml8n9026826@svn.freebsd.org> Author: rwatson Date: Sun Aug 2 22:47:08 2009 New Revision: 196041 URL: http://svn.freebsd.org/changeset/base/196041 Log: Add padding to struct inpcb, missed during our padding sweep earlier in the release cycle. Approved by: re (kensmith) Modified: head/sys/netinet/in_pcb.h Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Sun Aug 2 21:16:01 2009 (r196040) +++ head/sys/netinet/in_pcb.h Sun Aug 2 22:47:08 2009 (r196041) @@ -169,7 +169,8 @@ struct inpcb { u_char inp_ip_minttl; /* (i) minimum TTL or drop */ uint32_t inp_flowid; /* (x) flow id / queue id */ u_int inp_refcount; /* (i) refcount */ - void *inp_pspare[2]; /* (x) rtentry / general use */ + void *inp_pspare[4]; /* (x) rtentry / general use */ + u_int inp_ispare[4]; /* general use */ /* Local and foreign ports, local and foreign addr. */ struct in_conninfo inp_inc; /* (i/p) list for PCB's local port */ From hselasky at c2i.net Mon Aug 3 07:23:16 2009 From: hselasky at c2i.net (Hans Petter Selasky) Date: Mon Aug 3 07:23:23 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input (regression patch) Message-ID: <200908030923.12867.hselasky@c2i.net> Hi, Here is a patch to address the problem. Please test and report back. Works fine over here. http://perforce.freebsd.org/chv.cgi?CH=166957 MD5 (ukbd.c.diff) = 1e3c143942593b0ed4617d306a9d2ee2 cd /usr/src/sys/dev/usb/input/ cat ukbd.c.diff | patch --HPS -------------- next part -------------- A non-text attachment was scrubbed... Name: ukbd.c.diff Type: text/x-patch Size: 943 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20090803/faeb040b/ukbd.c.bin From imp at bsdimp.com Mon Aug 3 07:24:52 2009 From: imp at bsdimp.com (M. Warner Losh) Date: Mon Aug 3 07:24:58 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <200908030827.21108.hselasky@c2i.net> References: <20090802192902.GS47463@elvis.mu.org> <134A728D-F2F4-4951-81D8-704CC2DB6F9F@FreeBSD.org> <200908030827.21108.hselasky@c2i.net> Message-ID: <20090803.012206.1492586399.imp@bsdimp.com> In message: <200908030827.21108.hselasky@c2i.net> Hans Petter Selasky writes: : On Sunday 02 August 2009 21:58:14 Robert N. M. Watson wrote: : > On 2 Aug 2009, at 20:29, Alfred Perlstein wrote: : > > * Robert Watson [090801 15:15] wrote: : > >> On Sat, 1 Aug 2009, Hans Petter Selasky wrote: : > >>>>> This has slowed down core dumps very significantly. What used : > >>>>> to take : > >>>>> 10-15s on my system now takes around 3 minutes. A simple test : > >>>>> is to : > >>>>> break into ddb and "call doadump" with or without this rev. I : > >>>>> have a : > >>>>> serial console on this machine and so I can use ddb whether the : > >>>>> attached : > >>>>> USB keyboard works or not. : > >>> : > >>> It's because there is a DELAY(1000) in the UKBD's polling routine : > >>> so that : > >>> key- repeating will work, no magic. : > >> : > >> Given a choice between dumping 10x faster and having automatic key : > >> repeat : > >> in DDB, I'd lean towards the former. :-) : > > : > > Robert, and *@freebsd.org, : > > : > > Hans should be back in a day or so to address this. If critical I can : > > probably back out the offending code, but I think it makes sense to : > > wait a few days more for a more comprehensive fix. : > : > That's my feeling too -- however, I think it would be useful to : > generate a small concept test patch that disables the key repeat : > behavior and see if it restores some/all performance. Scott's argument : > suggests only some, but perhaps we'd get quite a bit, which is what : > we're looking for. We wouldn't commit the patch but it would let us : > know we're on the right track. : : Hi, : : I'm back. : : I see two solutions: : : 1) Disable the timekeeping if no keys are pressed. : : 2) Second option is to use getmicrotime. Actually what I need is just a : millisecond time reference so I know when to repeat the last key. : : Any opinions? DELAY() or getmicrotime() ? I'd note the state at each poll, and if > 1ms has passed since the down event, I'd repeat. I wouldn't use DELAY at all to see if you needed to repeat: I'd let the clocking of the polling drive you here (eg, you know that someone else will call it a lot, so leverage that to avoid the delay). Warner From hselasky at c2i.net Mon Aug 3 07:27:28 2009 From: hselasky at c2i.net (Hans Petter Selasky) Date: Mon Aug 3 07:27:34 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <134A728D-F2F4-4951-81D8-704CC2DB6F9F@FreeBSD.org> References: <200907300014.n6U0EZ77086341@svn.freebsd.org> <20090802192902.GS47463@elvis.mu.org> <134A728D-F2F4-4951-81D8-704CC2DB6F9F@FreeBSD.org> Message-ID: <200908030827.21108.hselasky@c2i.net> On Sunday 02 August 2009 21:58:14 Robert N. M. Watson wrote: > On 2 Aug 2009, at 20:29, Alfred Perlstein wrote: > > * Robert Watson [090801 15:15] wrote: > >> On Sat, 1 Aug 2009, Hans Petter Selasky wrote: > >>>>> This has slowed down core dumps very significantly. What used > >>>>> to take > >>>>> 10-15s on my system now takes around 3 minutes. A simple test > >>>>> is to > >>>>> break into ddb and "call doadump" with or without this rev. I > >>>>> have a > >>>>> serial console on this machine and so I can use ddb whether the > >>>>> attached > >>>>> USB keyboard works or not. > >>> > >>> It's because there is a DELAY(1000) in the UKBD's polling routine > >>> so that > >>> key- repeating will work, no magic. > >> > >> Given a choice between dumping 10x faster and having automatic key > >> repeat > >> in DDB, I'd lean towards the former. :-) > > > > Robert, and *@freebsd.org, > > > > Hans should be back in a day or so to address this. If critical I can > > probably back out the offending code, but I think it makes sense to > > wait a few days more for a more comprehensive fix. > > That's my feeling too -- however, I think it would be useful to > generate a small concept test patch that disables the key repeat > behavior and see if it restores some/all performance. Scott's argument > suggests only some, but perhaps we'd get quite a bit, which is what > we're looking for. We wouldn't commit the patch but it would let us > know we're on the right track. Hi, I'm back. I see two solutions: 1) Disable the timekeeping if no keys are pressed. 2) Second option is to use getmicrotime. Actually what I need is just a millisecond time reference so I know when to repeat the last key. Any opinions? DELAY() or getmicrotime() ? --HPS From kensmith at FreeBSD.org Mon Aug 3 08:12:04 2009 From: kensmith at FreeBSD.org (Ken Smith) Date: Mon Aug 3 08:12:10 2009 Subject: svn commit: r196044 - svnadmin/conf Message-ID: <200908030812.n738C4se040641@svn.freebsd.org> Author: kensmith Date: Mon Aug 3 08:12:03 2009 New Revision: 196044 URL: http://svn.freebsd.org/changeset/base/196044 Log: Add stable/8 to paths. Modified: svnadmin/conf/paths Modified: svnadmin/conf/paths ============================================================================== --- svnadmin/conf/paths Mon Aug 3 05:47:58 2009 (r196043) +++ svnadmin/conf/paths Mon Aug 3 08:12:03 2009 (r196044) @@ -15,6 +15,7 @@ ^stable/5/ ^stable/6/ ^stable/7/ +^stable/8/ # Feature branches. Not open until we're certain we're not reverting to cvs. ^user/ From kensmith at FreeBSD.org Mon Aug 3 08:13:07 2009 From: kensmith at FreeBSD.org (Ken Smith) Date: Mon Aug 3 08:13:14 2009 Subject: svn commit: r196045 - stable/8 Message-ID: <200908030813.n738D6x1040724@svn.freebsd.org> Author: kensmith Date: Mon Aug 3 08:13:06 2009 New Revision: 196045 URL: http://svn.freebsd.org/changeset/base/196045 Log: Copy head to stable/8 as part of 8.0 Release cycle. Approved by: re (Implicit) Added: stable/8/ (props changed) - copied from r196044, head/ From rwatson at FreeBSD.org Mon Aug 3 08:14:39 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Mon Aug 3 08:14:50 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input (regression patch) In-Reply-To: <200908030923.12867.hselasky@c2i.net> References: <200908030923.12867.hselasky@c2i.net> Message-ID: On Mon, 3 Aug 2009, Hans Petter Selasky wrote: > Here is a patch to address the problem. Please test and report back. Works > fine over here. > > http://perforce.freebsd.org/chv.cgi?CH=166957 > > MD5 (ukbd.c.diff) = 1e3c143942593b0ed4617d306a9d2ee2 > > cd /usr/src/sys/dev/usb/input/ > cat ukbd.c.diff | patch I'm a bit surprised the timed key repeat in this patch would work properly in DDB, as microtime(9) relies on interrupts firing for updated timestamps. The availability of interrupts for polled input consumers varies, but in general this is not true (for example) at the DDB command prompt. Does this code work correctly when time stands still? Robert N M Watson Computer Laboratory University of Cambridge From kensmith at FreeBSD.org Mon Aug 3 08:15:08 2009 From: kensmith at FreeBSD.org (Ken Smith) Date: Mon Aug 3 08:15:14 2009 Subject: svn commit: r196046 - svnadmin/conf Message-ID: <200908030815.n738F7xA040843@svn.freebsd.org> Author: kensmith Date: Mon Aug 3 08:15:06 2009 New Revision: 196046 URL: http://svn.freebsd.org/changeset/base/196046 Log: Turn on approval for stable/8. Approved by: re (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Mon Aug 3 08:13:06 2009 (r196045) +++ svnadmin/conf/approvers Mon Aug 3 08:15:06 2009 (r196046) @@ -17,8 +17,8 @@ # $FreeBSD$ # ^head/ re +^stable/8/ re #^stable/7/ re -#^stable/6/ re ^releng/7.[0-2]/ (security-officer|so) ^releng/6.[0-4]/ (security-officer|so) ^releng/5.[0-5]/ (security-officer|so) From ed at 80386.nl Mon Aug 3 08:28:40 2009 From: ed at 80386.nl (Ed Schouten) Date: Mon Aug 3 08:28:46 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input (regression patch) In-Reply-To: References: <200908030923.12867.hselasky@c2i.net> Message-ID: <20090803082838.GE1292@hoeg.nl> * Robert Watson wrote: > I'm a bit surprised the timed key repeat in this patch would work > properly in DDB, as microtime(9) relies on interrupts firing for > updated timestamps. The availability of interrupts for polled input > consumers varies, but in general this is not true (for example) at > the DDB command prompt. Does this code work correctly when time > stands still? Apart from that, who gives a *beep* about keyboard repeat while inside the debugger. I have to confess it would be irritating to press backspace multiple times, instead of holding the key pressed, but still, it's not worth it. -- Ed Schouten WWW: http://80386.nl/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20090803/4be7aa8e/attachment.pgp From ed at 80386.nl Mon Aug 3 08:29:35 2009 From: ed at 80386.nl (Ed Schouten) Date: Mon Aug 3 08:29:42 2009 Subject: svn commit: r196045 - stable/8 In-Reply-To: <200908030813.n738D6x1040724@svn.freebsd.org> References: <200908030813.n738D6x1040724@svn.freebsd.org> Message-ID: <20090803082934.GF1292@hoeg.nl> * Ken Smith wrote: > Copy head to stable/8 as part of 8.0 Release cycle. I, for one, welcome our RELENG_8 overlords! -- Ed Schouten WWW: http://80386.nl/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20090803/02697067/attachment.pgp From kensmith at FreeBSD.org Mon Aug 3 09:42:12 2009 From: kensmith at FreeBSD.org (Ken Smith) Date: Mon Aug 3 09:42:29 2009 Subject: svn commit: r196047 - stable/8 Message-ID: <200908030942.n739gBuI043385@svn.freebsd.org> Author: kensmith Date: Mon Aug 3 09:42:11 2009 New Revision: 196047 URL: http://svn.freebsd.org/changeset/base/196047 Log: Note when RELENG_8 branch was created. Approved by: re (implicit) Modified: stable/8/UPDATING Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Mon Aug 3 08:15:06 2009 (r196046) +++ stable/8/UPDATING Mon Aug 3 09:42:11 2009 (r196047) @@ -22,6 +22,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090803: + RELENG_8 branched. + 20090719: Bump the shared library version numbers for all libraries that do not use symbol versioning as part of the 8.0-RELEASE cycle. From brian at FreeBSD.org Mon Aug 3 09:43:07 2009 From: brian at FreeBSD.org (Brian Somers) Date: Mon Aug 3 09:43:18 2009 Subject: svn commit: r196048 - stable/7/usr.sbin/ppp Message-ID: <200908030943.n739h6cF043439@svn.freebsd.org> Author: brian Date: Mon Aug 3 09:43:06 2009 New Revision: 196048 URL: http://svn.freebsd.org/changeset/base/196048 Log: MFC: Add a missing phrase. Submitted by: Jason McIntyre jmc at kerhand dot co dot uk Obtained from: OpenBSD Modified: stable/7/usr.sbin/ppp/ (props changed) stable/7/usr.sbin/ppp/ppp.8.m4 Modified: stable/7/usr.sbin/ppp/ppp.8.m4 ============================================================================== --- stable/7/usr.sbin/ppp/ppp.8.m4 Mon Aug 3 09:42:11 2009 (r196047) +++ stable/7/usr.sbin/ppp/ppp.8.m4 Mon Aug 3 09:43:06 2009 (r196048) @@ -5471,7 +5471,7 @@ keywords. .It RAD_FRAMED_IPV6_PREFIX If this attribute is supplied, the value is substituted for IPV6PREFIX in a command. -You may pass it to such as DHCPv6 for delegating an +You may pass it to an upper layer protocol such as DHCPv6 for delegating an IPv6 prefix to a peer. .It RAD_FRAMED_IPV6_ROUTE The received string is expected to be in the format From hselasky at c2i.net Mon Aug 3 09:44:12 2009 From: hselasky at c2i.net (Hans Petter Selasky) Date: Mon Aug 3 09:44:24 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input (regression patch) In-Reply-To: <20090803082838.GE1292@hoeg.nl> References: <200908030923.12867.hselasky@c2i.net> <20090803082838.GE1292@hoeg.nl> Message-ID: <200908031129.06315.hselasky@c2i.net> On Monday 03 August 2009 10:28:38 Ed Schouten wrote: > * Robert Watson wrote: > > I'm a bit surprised the timed key repeat in this patch would work > > properly in DDB, as microtime(9) relies on interrupts firing for > > updated timestamps. The availability of interrupts for polled input > > consumers varies, but in general this is not true (for example) at > > the DDB command prompt. Does this code work correctly when time > > stands still? > > Apart from that, who gives a *beep* about keyboard repeat while inside > the debugger. I have to confess it would be irritating to press > backspace multiple times, instead of holding the key pressed, but still, > it's not worth it. I think getmicrotime relies on interrupts, while microtime doesn't. See "man microtime". --HPS From brian at FreeBSD.org Mon Aug 3 09:55:05 2009 From: brian at FreeBSD.org (Brian Somers) Date: Mon Aug 3 09:55:20 2009 Subject: svn commit: r196049 - in stable/7: tools/regression/usr.bin/jot usr.bin/jot Message-ID: <200908030955.n739t3k5043973@svn.freebsd.org> Author: brian Date: Mon Aug 3 09:55:03 2009 New Revision: 196049 URL: http://svn.freebsd.org/changeset/base/196049 Log: MFC: Fix some uninitialised variables. PR: 136383 Submitted by: Ulrich Spoerlein - uqs at spoerlein dot net Added: stable/7/tools/regression/usr.bin/jot/regress.dddd.out - copied unchanged from r195443, head/tools/regression/usr.bin/jot/regress.dddd.out Modified: stable/7/tools/regression/usr.bin/jot/ (props changed) stable/7/tools/regression/usr.bin/jot/regress.sh stable/7/usr.bin/jot/ (props changed) stable/7/usr.bin/jot/jot.c Copied: stable/7/tools/regression/usr.bin/jot/regress.dddd.out (from r195443, head/tools/regression/usr.bin/jot/regress.dddd.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/tools/regression/usr.bin/jot/regress.dddd.out Mon Aug 3 09:55:03 2009 (r196049, copy of r195443, head/tools/regression/usr.bin/jot/regress.dddd.out) @@ -0,0 +1,100 @@ +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 Modified: stable/7/tools/regression/usr.bin/jot/regress.sh ============================================================================== --- stable/7/tools/regression/usr.bin/jot/regress.sh Mon Aug 3 09:43:06 2009 (r196048) +++ stable/7/tools/regression/usr.bin/jot/regress.sh Mon Aug 3 09:55:03 2009 (r196049) @@ -1,6 +1,6 @@ # $FreeBSD$ -echo 1..56 +echo 1..57 REGRESSION_START($1) @@ -20,6 +20,7 @@ REGRESSION_TEST(`dhdd', `jot - 20 - -') REGRESSION_TEST(`ddhh', `jot - - 120 2') REGRESSION_TEST(`ddhd', `jot - - 120 -') REGRESSION_TEST(`dddh', `jot - - - 2') +REGRESSION_TEST(`dddd', `jot - - - -') REGRESSION_TEST(`hhhh2', `jot 30 20 160 2') REGRESSION_TEST(`hhhd2', `jot 30 20 160 -') REGRESSION_TEST(`hhdh2', `jot 30 20 - 2') Modified: stable/7/usr.bin/jot/jot.c ============================================================================== --- stable/7/usr.bin/jot/jot.c Mon Aug 3 09:43:06 2009 (r196048) +++ stable/7/usr.bin/jot/jot.c Mon Aug 3 09:55:03 2009 (r196049) @@ -101,13 +101,13 @@ main(int argc, char **argv) int ch; int mask = 0; int n = 0; - double begin; + double begin = BEGIN_DEF; double divisor; - double ender; - double s; + double ender = ENDER_DEF; + double s = STEP_DEF; double x, y; long i; - long reps; + long reps = REPS_DEF; while ((ch = getopt(argc, argv, "b:cnp:rs:w:")) != -1) switch (ch) { From rwatson at FreeBSD.org Mon Aug 3 09:57:21 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Mon Aug 3 09:57:34 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input (regression patch) In-Reply-To: <200908031129.06315.hselasky@c2i.net> References: <200908030923.12867.hselasky@c2i.net> <20090803082838.GE1292@hoeg.nl> <200908031129.06315.hselasky@c2i.net> Message-ID: On Mon, 3 Aug 2009, Hans Petter Selasky wrote: > On Monday 03 August 2009 10:28:38 Ed Schouten wrote: >> * Robert Watson wrote: >>> I'm a bit surprised the timed key repeat in this patch would work properly >>> in DDB, as microtime(9) relies on interrupts firing for updated >>> timestamps. The availability of interrupts for polled input consumers >>> varies, but in general this is not true (for example) at the DDB command >>> prompt. Does this code work correctly when time stands still? >> >> Apart from that, who gives a *beep* about keyboard repeat while inside the >> debugger. I have to confess it would be irritating to press backspace >> multiple times, instead of holding the key pressed, but still, it's not >> worth it. > > I think getmicrotime relies on interrupts, while microtime doesn't. > > See "man microtime". You're right, but that doesn't make things better :-). Some of the tc_get_timecount() calls are safe in the DDB environment, but several are not. In particular, tick_get_timecount_mp() and i8254_get_timecount() both acquire locks, the former the thread scheduler lock, and the latter a dedicated spinlock. This produces the opportunity for rather nasty deadlocks in DDB, especially tick_get_timecount_mp() on sparc64. This was the bug I was actually looking for in your patch, but then misread microtime() and concluded you had a different one. :-) I would much rather not have DDB rely on, for example, not contending thread_lock(), than have key repeat in DDB. Robert N M Watson Computer Laboratory University of Cambridge From brian at FreeBSD.org Mon Aug 3 09:58:47 2009 From: brian at FreeBSD.org (Brian Somers) Date: Mon Aug 3 09:58:58 2009 Subject: svn commit: r196050 - stable/7/bin/ps Message-ID: <200908030958.n739wkWH044108@svn.freebsd.org> Author: brian Date: Mon Aug 3 09:58:46 2009 New Revision: 196050 URL: http://svn.freebsd.org/changeset/base/196050 Log: MFC: Add the -d switch to the usage message. Modified: stable/7/bin/ps/ (props changed) stable/7/bin/ps/ps.c Modified: stable/7/bin/ps/ps.c ============================================================================== --- stable/7/bin/ps/ps.c Mon Aug 3 09:55:03 2009 (r196049) +++ stable/7/bin/ps/ps.c Mon Aug 3 09:58:46 2009 (r196050) @@ -1331,7 +1331,7 @@ check_procfs(void) static void usage(void) { -#define SINGLE_OPTS "[-aCce" OPT_LAZY_f "HhjlmrSTuvwXxZ]" +#define SINGLE_OPTS "[-aCcde" OPT_LAZY_f "HhjlmrSTuvwXxZ]" (void)fprintf(stderr, "%s\n%s\n%s\n%s\n", "usage: ps " SINGLE_OPTS " [-O fmt | -o fmt] [-G gid[,gid...]]", From des at des.no Mon Aug 3 13:31:28 2009 From: des at des.no (=?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?=) Date: Mon Aug 3 13:31:34 2009 Subject: svn commit: r196045 - stable/8 In-Reply-To: <200908030813.n738D6x1040724@svn.freebsd.org> (Ken Smith's message of "Mon, 3 Aug 2009 08:13:06 +0000 (UTC)") References: <200908030813.n738D6x1040724@svn.freebsd.org> Message-ID: <86hbwpvxaq.fsf@ds4.des.no> Ken Smith writes: > Author: kensmith > Date: Mon Aug 3 08:13:06 2009 > New Revision: 196045 > URL: http://svn.freebsd.org/changeset/base/196045 > > Log: > Copy head to stable/8 as part of 8.0 Release cycle. > > Approved by: re (Implicit) > > Added: > stable/8/ (props changed) > - copied from r196044, head/ This should have been tagged with X-SVN-Group: stable-8, but it wasn't, because a) someone forgot to add stable-8 to svnadmin/conf/mailer.conf and b) a stable-8 entry patterned on the existing stable-7 entry wouldn't have worked anyway, because the regexp requires a slash (i.e. stable/8/). Patch attached. DES -- Dag-Erling Sm?rgrav - des@des.no -------------- next part -------------- A non-text attachment was scrubbed... Name: fsvn-mailer-conf.diff Type: text/x-patch Size: 2524 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20090803/785facd4/fsvn-mailer-conf.bin From dimitry at andric.com Mon Aug 3 13:59:14 2009 From: dimitry at andric.com (Dimitry Andric) Date: Mon Aug 3 14:01:01 2009 Subject: svn commit: r196045 - stable/8 In-Reply-To: <86hbwpvxaq.fsf@ds4.des.no> References: <200908030813.n738D6x1040724@svn.freebsd.org> <86hbwpvxaq.fsf@ds4.des.no> Message-ID: <4A76ED32.80304@andric.com> On 2009-08-03 15:31, Dag-Erling Sm?rgrav wrote: > This should have been tagged with X-SVN-Group: stable-8, but it wasn't, > because a) someone forgot to add stable-8 to svnadmin/conf/mailer.conf > and b) a stable-8 entry patterned on the existing stable-7 entry > wouldn't have worked anyway, because the regexp requires a slash (i.e. > stable/8/). Patch attached. You might want to change: [stable-other] -for_paths = stable/[^67]/.* +for_paths = ^stable/[^67](/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-other@freebsd.org into: [stable-other] -for_paths = stable/[^67]/.* +for_paths = ^stable/[^678](/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-other@freebsd.org while you're at it. :) From des at des.no Mon Aug 3 14:05:11 2009 From: des at des.no (=?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?=) Date: Mon Aug 3 14:05:18 2009 Subject: svn commit: r196045 - stable/8 In-Reply-To: <4A76ED32.80304@andric.com> (Dimitry Andric's message of "Mon, 03 Aug 2009 15:59:14 +0200") References: <200908030813.n738D6x1040724@svn.freebsd.org> <86hbwpvxaq.fsf@ds4.des.no> <4A76ED32.80304@andric.com> Message-ID: <868wi1vvqi.fsf@ds4.des.no> Dimitry Andric writes: > You might want to change [...] Thanks, new patch attached. DES -- Dag-Erling Sm?rgrav - des@des.no -------------- next part -------------- A non-text attachment was scrubbed... Name: fsvn-mailer-conf.diff Type: text/x-patch Size: 2525 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20090803/6aaea8a8/fsvn-mailer-conf.bin From brde at optusnet.com.au Mon Aug 3 17:46:32 2009 From: brde at optusnet.com.au (Bruce Evans) Date: Mon Aug 3 17:46:45 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <20090803.012206.1492586399.imp@bsdimp.com> References: <20090802192902.GS47463@elvis.mu.org> <134A728D-F2F4-4951-81D8-704CC2DB6F9F@FreeBSD.org> <200908030827.21108.hselasky@c2i.net> <20090803.012206.1492586399.imp@bsdimp.com> Message-ID: <20090804032402.J21599@delplex.bde.org> On Mon, 3 Aug 2009, M. Warner Losh wrote: > In message: <200908030827.21108.hselasky@c2i.net> > : I see two solutions: > : > : 1) Disable the timekeeping if no keys are pressed. > : > : 2) Second option is to use getmicrotime. Actually what I need is just a > : millisecond time reference so I know when to repeat the last key. > : > : Any opinions? DELAY() or getmicrotime() ? DELAY(1) is somewhet usable. getmicrotime() is unusable because apart from the problems from it using microtime() (actually binuptime()), getmicrotime() has is only updated every 1/HZ seconds and depends on interrupts for the update. 1/HZ may usefully be as high as 1/10 seconds, and the update would never occur in ddb mode. microtime() is not a supported API in ddb or panic mode, but it works for short delays in most cases. Short means however long it takes for the hardware counter to wrap. See another reply for more details. binuptime() is better than microtime() for most purposes. Another problem with microtime() is that it is not guaranteed to be monotonic. The patch using microtime() has mounds of style bugs (mainly an empty line after almost every comment and statement). > I'd note the state at each poll, and if > 1ms has passed since the > down event, I'd repeat. I wouldn't use DELAY at all to see if you > needed to repeat: I'd let the clocking of the polling drive you here > (eg, you know that someone else will call it a lot, so leverage that > to avoid the delay). Determining whether 1 mS has elapsed is not supported in ddb or panic mode by any API, except microtime() usually works (see above). For polled console input (not necessarily in ddb or panic mode). It shouldn't be necessary for the low-level driver to spin internally, since cngetc() spins externally. ddb mode is the only mode that actually works almost right here: ddb disables all interrupts and stops all other CPUs, so interrupts and other CPUs can't eat the input. However, state changes to set up for polling, if any, should occur at a higher level (on entry to ddb for ddb mode), not on every call to cncheckc() or even on every call to cngetc(). The changes would be device-specific and wouldn't depend on disabling all interrupts and stopping all other CPUs. Then all modes would work (of fail) similarly to ddb mode. Bruce From brde at optusnet.com.au Mon Aug 3 18:20:18 2009 From: brde at optusnet.com.au (Bruce Evans) Date: Mon Aug 3 18:20:24 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input (regression patch) In-Reply-To: References: <200908030923.12867.hselasky@c2i.net> <20090803082838.GE1292@hoeg.nl> <200908031129.06315.hselasky@c2i.net> Message-ID: <20090804034625.I21599@delplex.bde.org> On Mon, 3 Aug 2009, Robert Watson wrote: > On Mon, 3 Aug 2009, Hans Petter Selasky wrote: >> I think getmicrotime relies on interrupts, while microtime doesn't. >> >> See "man microtime". > > You're right, but that doesn't make things better :-). Some of the > tc_get_timecount() calls are safe in the DDB environment, but several are > not. In particular, tick_get_timecount_mp() and i8254_get_timecount() both > acquire locks, the former the thread scheduler lock, and the latter a > dedicated spinlock. This produces the opportunity for rather nasty deadlocks > in DDB, especially tick_get_timecount_mp() on sparc64. Hmm, why does tick_get_timecount_mp() need to bind curthread? (I don't understand sparc64.) Any hardware clock potentially needs locking like that in i8254_get_timecount(), but most hardware is not so bad. DELAY() also wants to use the i8254 in some configurations. On amd64 and i386, it uses a hack to avoid the lock in ddb mode. Deadlock from not doing this rarely occurred, and deadlock on the thread lock would be more common. tc_get_timecount() calls could do something similar in some cases. E.g., tick_get_timecount_mp() can just skip the locking since entering ddb mode is stronger than sched binding, but i8254_get_timecount() cannot do this safely so easily since it needs to write to the hardware and the hardware has write-only state (the state would have to be shadowed in memory). Another problem with using microtime() is that the timecounter hardware might wrap after a short time. Again the i8254 timecounter is a problem. At HZ=1000, it wraps after 1mS. This can be handled by polling spinloops if necessary by calling microtime() enough to detect all wraps and adding up deltas of microtime()s to get the elapsed time. Apart from deadlock, just calling mutex locking code from within ddb is not supported (but it happens anywyay :-()). > This was the bug I was actually looking for in your patch, but then misread > microtime() and concluded you had a different one. :-) I would much rather > not have DDB rely on, for example, not contending thread_lock(), than have > key repeat in DDB. If cngetc() worked right then you would also not have key repeat for polled input outside of ddb :-), but polled input is probably used more in ddb than anywhere else (e.g., for booting), so you would probably miss it mainly in ddb. Bruce From hselasky at c2i.net Mon Aug 3 18:33:13 2009 From: hselasky at c2i.net (Hans Petter Selasky) Date: Mon Aug 3 18:33:25 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <20090804032402.J21599@delplex.bde.org> References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> Message-ID: <200908032033.08169.hselasky@c2i.net> On Monday 03 August 2009 19:46:16 Bruce Evans wrote: > On Mon, 3 Aug 2009, M. Warner Losh wrote: > > In message: <200908030827.21108.hselasky@c2i.net> > > > > : I see two solutions: > > : > > : 1) Disable the timekeeping if no keys are pressed. > > : > > : 2) Second option is to use getmicrotime. Actually what I need is just a > > : millisecond time reference so I know when to repeat the last key. > > : > > : Any opinions? DELAY() or getmicrotime() ? > > DELAY(1) is somewhet usable. I think DELAY(1) is not accurate enough. I suggest that the DELAY(1000) is only active while a key is actually pressed. See attached patch. Please test and report back. --HPS > > getmicrotime() is unusable because apart from the problems from it using > microtime() (actually binuptime()), getmicrotime() has is only updated > every 1/HZ seconds and depends on interrupts for the update. 1/HZ may > usefully be as high as 1/10 seconds, and the update would never occur > in ddb mode. > > microtime() is not a supported API in ddb or panic mode, but it works > for short delays in most cases. Short means however long it takes for > the hardware counter to wrap. See another reply for more details. > > binuptime() is better than microtime() for most purposes. Another > problem with microtime() is that it is not guaranteed to be monotonic. > > The patch using microtime() has mounds of style bugs (mainly an empty > line after almost every comment and statement). > > > I'd note the state at each poll, and if > 1ms has passed since the > > down event, I'd repeat. I wouldn't use DELAY at all to see if you > > needed to repeat: I'd let the clocking of the polling drive you here > > (eg, you know that someone else will call it a lot, so leverage that > > to avoid the delay). > > Determining whether 1 mS has elapsed is not supported in ddb or panic > mode by any API, except microtime() usually works (see above). > > For polled console input (not necessarily in ddb or panic mode). It > shouldn't be necessary for the low-level driver to spin internally, > since cngetc() spins externally. ddb mode is the only mode that > actually works almost right here: ddb disables all interrupts and stops > all other CPUs, so interrupts and other CPUs can't eat the input. > However, state changes to set up for polling, if any, should occur at > a higher level (on entry to ddb for ddb mode), not on every call to > cncheckc() or even on every call to cngetc(). The changes would be > device-specific and wouldn't depend on disabling all interrupts and > stopping all other CPUs. Then all modes would work (of fail) similarly > to ddb mode. > > Bruce -------------- next part -------------- A non-text attachment was scrubbed... Name: ukbd.c.diff Type: text/x-patch Size: 726 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20090803/39e957dc/ukbd.c.bin From delphij at FreeBSD.org Mon Aug 3 18:43:28 2009 From: delphij at FreeBSD.org (Xin LI) Date: Mon Aug 3 18:43:35 2009 Subject: svn commit: r196051 - stable/7/contrib/netcat Message-ID: <200908031843.n73IhQ3O093863@svn.freebsd.org> Author: delphij Date: Mon Aug 3 18:43:26 2009 New Revision: 196051 URL: http://svn.freebsd.org/changeset/base/196051 Log: MFC r193021: Add an EXIT STATUS section to the manual page. Currently, nc(1) does not follow sysexits(3), and returns 1 for all error cases. PR: docs/126451 Modified: stable/7/contrib/netcat/ (props changed) stable/7/contrib/netcat/nc.1 Modified: stable/7/contrib/netcat/nc.1 ============================================================================== --- stable/7/contrib/netcat/nc.1 Mon Aug 3 09:58:46 2009 (r196050) +++ stable/7/contrib/netcat/nc.1 Mon Aug 3 18:43:26 2009 (r196051) @@ -433,6 +433,8 @@ The same example again, this time enabli if the proxy requires it: .Pp .Dl $ nc -x10.2.3.4:8080 -Xconnect -Pruser host.example.com 42 +.Sh EXIT STATUS +.Ex -std .Sh SEE ALSO .Xr cat 1 , .Xr ssh 1 From delphij at FreeBSD.org Mon Aug 3 18:44:44 2009 From: delphij at FreeBSD.org (Xin LI) Date: Mon Aug 3 18:45:00 2009 Subject: svn commit: r196052 - stable/6/contrib/netcat Message-ID: <200908031844.n73IihDw093955@svn.freebsd.org> Author: delphij Date: Mon Aug 3 18:44:42 2009 New Revision: 196052 URL: http://svn.freebsd.org/changeset/base/196052 Log: MFC r193021: Add an EXIT STATUS section to the manual page. Currently, nc(1) does not follow sysexits(3), and returns 1 for all error cases. PR: docs/126451 Modified: stable/6/contrib/netcat/ (props changed) stable/6/contrib/netcat/nc.1 Modified: stable/6/contrib/netcat/nc.1 ============================================================================== --- stable/6/contrib/netcat/nc.1 Mon Aug 3 18:43:26 2009 (r196051) +++ stable/6/contrib/netcat/nc.1 Mon Aug 3 18:44:42 2009 (r196052) @@ -433,6 +433,8 @@ The same example again, this time enabli if the proxy requires it: .Pp .Dl $ nc -x10.2.3.4:8080 -Xconnect -Pruser host.example.com 42 +.Sh EXIT STATUS +.Ex -std .Sh SEE ALSO .Xr cat 1 , .Xr ssh 1 From rwatson at FreeBSD.org Mon Aug 3 18:46:26 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Mon Aug 3 18:46:32 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <200908032033.08169.hselasky@c2i.net> References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> Message-ID: On Mon, 3 Aug 2009, Hans Petter Selasky wrote: > On Monday 03 August 2009 19:46:16 Bruce Evans wrote: >> On Mon, 3 Aug 2009, M. Warner Losh wrote: >>> In message: <200908030827.21108.hselasky@c2i.net> >>> >>> : I see two solutions: >>> : >>> : 1) Disable the timekeeping if no keys are pressed. >>> : >>> : 2) Second option is to use getmicrotime. Actually what I need is just a >>> : millisecond time reference so I know when to repeat the last key. >>> : >>> : Any opinions? DELAY() or getmicrotime() ? >> >> DELAY(1) is somewhet usable. > > I think DELAY(1) is not accurate enough. > > I suggest that the DELAY(1000) is only active while a key is actually > pressed. > > See attached patch. Please test and report back. This seems a reasonable middle ground -- avoids use of sensitive time counters in DDB, avoids expensive poll operation most of the time, and allows key repeat to work, which is especially nice for backspace in DDB. :-) Robert From nwhitehorn at freebsd.org Mon Aug 3 18:50:07 2009 From: nwhitehorn at freebsd.org (Nathan Whitehorn) Date: Mon Aug 3 18:50:45 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <200908032033.08169.hselasky@c2i.net> References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> Message-ID: <4A77315A.3050606@freebsd.org> Hans Petter Selasky wrote: > On Monday 03 August 2009 19:46:16 Bruce Evans wrote: > >> On Mon, 3 Aug 2009, M. Warner Losh wrote: >> >>> In message: <200908030827.21108.hselasky@c2i.net> >>> >>> : I see two solutions: >>> : >>> : 1) Disable the timekeeping if no keys are pressed. >>> : >>> : 2) Second option is to use getmicrotime. Actually what I need is just a >>> : millisecond time reference so I know when to repeat the last key. >>> : >>> : Any opinions? DELAY() or getmicrotime() ? >>> >> DELAY(1) is somewhet usable. >> > > I think DELAY(1) is not accurate enough. > > I suggest that the DELAY(1000) is only active while a key is actually pressed. > > See attached patch. Please test and report back. > Having recently written a keyboard driver, it is silly that the keyboard driver itself has to handle key repeat at all -- this kind of thing should be in the general kdb driver, along with AT KBD scancode emulation. Of the four keyboard drivers currently in the tree, three (sunkbd, akbd, ukbd) have a huge amount of code copied and pasted between them in order to emulate an AT keyboard, which are becoming less and less common. -Nathan From sam at errno.com Mon Aug 3 19:02:25 2009 From: sam at errno.com (Sam Leffler) Date: Mon Aug 3 19:02:36 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> Message-ID: <4A773430.2050804@errno.com> Robert Watson wrote: > > On Mon, 3 Aug 2009, Hans Petter Selasky wrote: > >> On Monday 03 August 2009 19:46:16 Bruce Evans wrote: >>> On Mon, 3 Aug 2009, M. Warner Losh wrote: >>>> In message: <200908030827.21108.hselasky@c2i.net> >>>> >>>> : I see two solutions: >>>> : >>>> : 1) Disable the timekeeping if no keys are pressed. >>>> : >>>> : 2) Second option is to use getmicrotime. Actually what I need is >>>> just a >>>> : millisecond time reference so I know when to repeat the last key. >>>> : >>>> : Any opinions? DELAY() or getmicrotime() ? >>> >>> DELAY(1) is somewhet usable. >> >> I think DELAY(1) is not accurate enough. >> >> I suggest that the DELAY(1000) is only active while a key is actually >> pressed. >> >> See attached patch. Please test and report back. > > This seems a reasonable middle ground -- avoids use of sensitive time > counters in DDB, avoids expensive poll operation most of the time, and > allows key repeat to work, which is especially nice for backspace in > DDB. :-) I think we are losing sight of the goal here. We are in a release schedule and trying to find a minimal set of changes that resolves our immediate need. Keyboard repeat is not required and unless there is an obvious and immediate solution it should be considered AFTER the release. Remember we are already behind schedule for 8.0. Sam From dougb at FreeBSD.org Mon Aug 3 20:09:55 2009 From: dougb at FreeBSD.org (Doug Barton) Date: Mon Aug 3 20:10:13 2009 Subject: svn commit: r196053 - in stable/7: etc/defaults etc/namedb etc/rc.d share/man/man5 Message-ID: <200908032009.n73K9srk095654@svn.freebsd.org> Author: dougb Date: Mon Aug 3 20:09:54 2009 New Revision: 196053 URL: http://svn.freebsd.org/changeset/base/196053 Log: MFC r192210, a whitespace only change in rc.d/named, and MFC r192215: named_wait feature, auto-forward feature, add named-checkconf to startup Modified: stable/7/etc/defaults/rc.conf stable/7/etc/namedb/named.conf stable/7/etc/rc.d/named stable/7/share/man/man5/rc.conf.5 (contents, props changed) Modified: stable/7/etc/defaults/rc.conf ============================================================================== --- stable/7/etc/defaults/rc.conf Mon Aug 3 18:44:42 2009 (r196052) +++ stable/7/etc/defaults/rc.conf Mon Aug 3 20:09:54 2009 (r196053) @@ -241,6 +241,7 @@ inetd_flags="-wW -C 60" # Optional flag # named_enable="NO" # Run named, the DNS server (or NO). named_program="/usr/sbin/named" # Path to named, if you want a different one. +named_conf="/etc/namedb/named.conf" # Path to the configuration file #named_flags="-c /etc/namedb/named.conf" # Uncomment for named not in /usr/sbin named_pidfile="/var/run/named/pid" # Must set this in named.conf as well named_uid="bind" # User to run named as @@ -248,6 +249,10 @@ named_chrootdir="/var/named" # Chroot di named_chroot_autoupdate="YES" # Automatically install/update chrooted # components of named. See /etc/rc.d/named. named_symlink_enable="YES" # Symlink the chrooted pid file +named_wait="NO" # Wait for working name service before exiting +named_wait_host="localhost" # Hostname to check if named_wait is enabled +named_auto_forward="NO" # Set up forwarders from /etc/resolv.conf +named_auto_forward_only="NO" # Do "forward only" instead of "forward first" # # kerberos. Do not run the admin daemons on slave servers Modified: stable/7/etc/namedb/named.conf ============================================================================== --- stable/7/etc/namedb/named.conf Mon Aug 3 18:44:42 2009 (r196052) +++ stable/7/etc/namedb/named.conf Mon Aug 3 20:09:54 2009 (r196053) @@ -31,12 +31,6 @@ options { disable-empty-zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA"; disable-empty-zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA"; -// In addition to the "forwarders" clause, you can force your name -// server to never initiate queries of its own, but always ask its -// forwarders only, by enabling the following line: -// -// forward only; - // If you've got a DNS server around at your upstream provider, enter // its IP address here, and enable the line below. This will make you // benefit from its cache, thus reduce overall DNS traffic in the Internet. @@ -45,6 +39,20 @@ options { 127.0.0.1; }; */ + +// If the 'forwarders' clause is not empty the default is to 'forward first' +// which will fall back to sending a query from your local server if the name +// servers in 'forwarders' do not have the answer. Alternatively you can +// force your name server to never initiate queries of its own by enabling the +// following line: +// forward only; + +// If you wish to have forwarding configured automatically based on +// the entries in /etc/resolv.conf, uncomment the following line and +// set named_auto_forward=yes in /etc/rc.conf. You can also enable +// named_auto_forward_only (the effect of which is described above). +// include "/etc/namedb/auto_forward.conf"; + /* Modern versions of BIND use a random UDP port for each outgoing query by default in order to dramatically reduce the possibility Modified: stable/7/etc/rc.d/named ============================================================================== --- stable/7/etc/rc.d/named Mon Aug 3 18:44:42 2009 (r196052) +++ stable/7/etc/rc.d/named Mon Aug 3 20:09:54 2009 (r196053) @@ -16,7 +16,7 @@ command="/usr/sbin/named" extra_commands="reload" start_precmd="named_precmd" -start_postcmd="make_symlinks" +start_postcmd="named_poststart" reload_cmd="named_reload" stop_cmd="named_stop" stop_postcmd="named_poststop" @@ -79,7 +79,7 @@ chroot_autoupdate() fi fi - # Copy and/or update key files to the chroot /etc + # Copy and/or update key files to the chroot /etc # for file in localtime protocols services; do if [ -r /etc/$file ]; then @@ -97,6 +97,17 @@ make_symlinks() ln -fs "${named_chrootdir}${pidfile}" ${pidfile} } +named_poststart () { + make_symlinks + + if checkyesno named_wait; then + until ${command%/sbin/named}/bin/host $named_wait_host >/dev/null 2>&1; do + echo " Waiting for nameserver to resolve $named_wait_host" + sleep 1 + done + fi +} + named_reload() { ${command%/named}/rndc reload @@ -135,8 +146,19 @@ named_poststop() fi } +create_file () { + if [ -e "$1" ]; then + unlink $1 + fi + > $1 + chown root:wheel $1 + chmod 644 $1 +} + named_precmd() { + local line nsip firstns + # Is the user using a sandbox? # if [ -n "$named_chrootdir" ]; then @@ -161,6 +183,80 @@ named_precmd() else $confgen_command fi + + # Create a forwarder configuration based on /etc/resolv.conf + if checkyesno named_auto_forward; then + if [ ! -s /etc/resolv.conf ]; then + warn "named_auto_forward enabled, but no /etc/resolv.conf" + + # Empty the file in case it is included in named.conf + [ -s "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && + create_file ${named_chrootdir}/etc/namedb/auto_forward.conf + + ${command%/named}/named-checkconf $named_conf || + err 3 'named-checkconf for $named_conf failed' + return + fi + + create_file /var/run/naf-resolv.conf + create_file /var/run/auto_forward.conf + + echo ' forwarders {' > /var/run/auto_forward.conf + + while read line; do + case "$line" in + 'nameserver '*|'nameserver '*) + nsip=${line##nameserver[ ]} + + if [ -z "$firstns" ]; then + if [ ! "$nsip" = '127.0.0.1' ]; then + echo 'nameserver 127.0.0.1' + echo " ${nsip};" >> /var/run/auto_forward.conf + fi + + firstns=1 + else + [ "$nsip" = '127.0.0.1' ] && continue + echo " ${nsip};" >> /var/run/auto_forward.conf + fi + ;; + esac + + echo $line + done < /etc/resolv.conf > /var/run/naf-resolv.conf + + echo ' };' >> /var/run/auto_forward.conf + echo '' >> /var/run/auto_forward.conf + if checkyesno named_auto_forward_only; then + echo " forward only;" >> /var/run/auto_forward.conf + else + echo " forward first;" >> /var/run/auto_forward.conf + fi + + if cmp -s /etc/resolv.conf /var/run/naf-resolv.conf; then + unlink /var/run/naf-resolv.conf + else + [ -e /etc/resolv.conf ] && unlink /etc/resolv.conf + mv /var/run/naf-resolv.conf /etc/resolv.conf + fi + + if cmp -s ${named_chrootdir}/etc/namedb/auto_forward.conf \ + /var/run/auto_forward.conf; then + unlink /var/run/auto_forward.conf + else + [ -e "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && + unlink ${named_chrootdir}/etc/namedb/auto_forward.conf + mv /var/run/auto_forward.conf \ + ${named_chrootdir}/etc/namedb/auto_forward.conf + fi + else + # Empty the file in case it is included in named.conf + [ -s "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && + create_file ${named_chrootdir}/etc/namedb/auto_forward.conf + fi + + ${command%/named}/named-checkconf $named_conf || + err 3 'named-checkconf for $named_conf failed' } load_rc_config $name Modified: stable/7/share/man/man5/rc.conf.5 ============================================================================== --- stable/7/share/man/man5/rc.conf.5 Mon Aug 3 18:44:42 2009 (r196052) +++ stable/7/share/man/man5/rc.conf.5 Mon Aug 3 20:09:54 2009 (r196053) @@ -1594,6 +1594,12 @@ Path to .Xr named 8 (default .Pa /usr/sbin/named ) . +.It Va named_conf +.Pq Vt str +Path to +.Xr named 8 +configuration file, (default +.Pa /etc/namedb/named.conf ) . .It Va named_flags .Pq Vt str If @@ -1641,6 +1647,26 @@ daemon's PID file into the .Xr chroot 8 environment. +.It Va named_wait +.Pq Vt bool +Set to have +.Pa /etc/rc.d/named +loop until working name service is established. +.It Va named_wait_host +.Pq Vt str +Name of host to lookup for the named_wait option. +(Default localhost) +.It Va named_auto_forward +.Pq Vt bool +Set to enable automatic creation of a forwarder +configuration file derived from +.Pa /etc/resolv.conf . +.It Va named_auto_forward_only +.Pq Vt bool +Set to change the default forwarder configuration from +.Dq forward first +to +.Dq forward only . .It Va kerberos5_server_enable .Pq Vt bool Set to From dougb at FreeBSD.org Mon Aug 3 20:14:01 2009 From: dougb at FreeBSD.org (Doug Barton) Date: Mon Aug 3 20:14:18 2009 Subject: svn commit: r196054 - in stable/6: etc/defaults etc/namedb etc/rc.d share/man/man5 Message-ID: <200908032014.n73KE0Lg095862@svn.freebsd.org> Author: dougb Date: Mon Aug 3 20:14:00 2009 New Revision: 196054 URL: http://svn.freebsd.org/changeset/base/196054 Log: MFC r192210, a whitespace only change in rc.d/named, and MFC r192215: named_wait feature, auto-forward feature, add named-checkconf to startup Modified: stable/6/etc/defaults/rc.conf stable/6/etc/namedb/named.conf stable/6/etc/rc.d/named stable/6/share/man/man5/rc.conf.5 (contents, props changed) Modified: stable/6/etc/defaults/rc.conf ============================================================================== --- stable/6/etc/defaults/rc.conf Mon Aug 3 20:09:54 2009 (r196053) +++ stable/6/etc/defaults/rc.conf Mon Aug 3 20:14:00 2009 (r196054) @@ -221,6 +221,7 @@ inetd_flags="-wW -C 60" # Optional flag # named_enable="NO" # Run named, the DNS server (or NO). named_program="/usr/sbin/named" # Path to named, if you want a different one. +named_conf="/etc/namedb/named.conf" # Path to the configuration file #named_flags="-c /etc/namedb/named.conf" # Uncomment for named not in /usr/sbin named_pidfile="/var/run/named/pid" # Must set this in named.conf as well named_uid="bind" # User to run named as @@ -228,6 +229,10 @@ named_chrootdir="/var/named" # Chroot di named_chroot_autoupdate="YES" # Automatically install/update chrooted # components of named. See /etc/rc.d/named. named_symlink_enable="YES" # Symlink the chrooted pid file +named_wait="NO" # Wait for working name service before exiting +named_wait_host="localhost" # Hostname to check if named_wait is enabled +named_auto_forward="NO" # Set up forwarders from /etc/resolv.conf +named_auto_forward_only="NO" # Do "forward only" instead of "forward first" # # kerberos. Do not run the admin daemons on slave servers Modified: stable/6/etc/namedb/named.conf ============================================================================== --- stable/6/etc/namedb/named.conf Mon Aug 3 20:09:54 2009 (r196053) +++ stable/6/etc/namedb/named.conf Mon Aug 3 20:14:00 2009 (r196054) @@ -33,12 +33,6 @@ options { disable-empty-zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA"; */ -// In addition to the "forwarders" clause, you can force your name -// server to never initiate queries of its own, but always ask its -// forwarders only, by enabling the following line: -// -// forward only; - // If you've got a DNS server around at your upstream provider, enter // its IP address here, and enable the line below. This will make you // benefit from its cache, thus reduce overall DNS traffic in the Internet. @@ -47,6 +41,20 @@ options { 127.0.0.1; }; */ + +// If the 'forwarders' clause is not empty the default is to 'forward first' +// which will fall back to sending a query from your local server if the name +// servers in 'forwarders' do not have the answer. Alternatively you can +// force your name server to never initiate queries of its own by enabling the +// following line: +// forward only; + +// If you wish to have forwarding configured automatically based on +// the entries in /etc/resolv.conf, uncomment the following line and +// set named_auto_forward=yes in /etc/rc.conf. You can also enable +// named_auto_forward_only (the effect of which is described above). +// include "/etc/namedb/auto_forward.conf"; + /* Modern versions of BIND use a random UDP port for each outgoing query by default in order to dramatically reduce the possibility Modified: stable/6/etc/rc.d/named ============================================================================== --- stable/6/etc/rc.d/named Mon Aug 3 20:09:54 2009 (r196053) +++ stable/6/etc/rc.d/named Mon Aug 3 20:14:00 2009 (r196054) @@ -16,7 +16,7 @@ command="/usr/sbin/named" extra_commands="reload" start_precmd="named_precmd" -start_postcmd="make_symlinks" +start_postcmd="named_poststart" reload_cmd="named_reload" stop_cmd="named_stop" stop_postcmd="named_poststop" @@ -79,7 +79,7 @@ chroot_autoupdate() fi fi - # Copy and/or update key files to the chroot /etc + # Copy and/or update key files to the chroot /etc # for file in localtime protocols services; do if [ -r /etc/$file ]; then @@ -97,6 +97,17 @@ make_symlinks() ln -fs "${named_chrootdir}${pidfile}" ${pidfile} } +named_poststart () { + make_symlinks + + if checkyesno named_wait; then + until ${command%/sbin/named}/bin/host $named_wait_host >/dev/null 2>&1; do + echo " Waiting for nameserver to resolve $named_wait_host" + sleep 1 + done + fi +} + named_reload() { ${command%/named}/rndc reload @@ -135,8 +146,19 @@ named_poststop() fi } +create_file () { + if [ -e "$1" ]; then + unlink $1 + fi + > $1 + chown root:wheel $1 + chmod 644 $1 +} + named_precmd() { + local line nsip firstns + # Is the user using a sandbox? # if [ -n "$named_chrootdir" ]; then @@ -161,6 +183,80 @@ named_precmd() else $confgen_command fi + + # Create a forwarder configuration based on /etc/resolv.conf + if checkyesno named_auto_forward; then + if [ ! -s /etc/resolv.conf ]; then + warn "named_auto_forward enabled, but no /etc/resolv.conf" + + # Empty the file in case it is included in named.conf + [ -s "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && + create_file ${named_chrootdir}/etc/namedb/auto_forward.conf + + ${command%/named}/named-checkconf $named_conf || + err 3 'named-checkconf for $named_conf failed' + return + fi + + create_file /var/run/naf-resolv.conf + create_file /var/run/auto_forward.conf + + echo ' forwarders {' > /var/run/auto_forward.conf + + while read line; do + case "$line" in + 'nameserver '*|'nameserver '*) + nsip=${line##nameserver[ ]} + + if [ -z "$firstns" ]; then + if [ ! "$nsip" = '127.0.0.1' ]; then + echo 'nameserver 127.0.0.1' + echo " ${nsip};" >> /var/run/auto_forward.conf + fi + + firstns=1 + else + [ "$nsip" = '127.0.0.1' ] && continue + echo " ${nsip};" >> /var/run/auto_forward.conf + fi + ;; + esac + + echo $line + done < /etc/resolv.conf > /var/run/naf-resolv.conf + + echo ' };' >> /var/run/auto_forward.conf + echo '' >> /var/run/auto_forward.conf + if checkyesno named_auto_forward_only; then + echo " forward only;" >> /var/run/auto_forward.conf + else + echo " forward first;" >> /var/run/auto_forward.conf + fi + + if cmp -s /etc/resolv.conf /var/run/naf-resolv.conf; then + unlink /var/run/naf-resolv.conf + else + [ -e /etc/resolv.conf ] && unlink /etc/resolv.conf + mv /var/run/naf-resolv.conf /etc/resolv.conf + fi + + if cmp -s ${named_chrootdir}/etc/namedb/auto_forward.conf \ + /var/run/auto_forward.conf; then + unlink /var/run/auto_forward.conf + else + [ -e "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && + unlink ${named_chrootdir}/etc/namedb/auto_forward.conf + mv /var/run/auto_forward.conf \ + ${named_chrootdir}/etc/namedb/auto_forward.conf + fi + else + # Empty the file in case it is included in named.conf + [ -s "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && + create_file ${named_chrootdir}/etc/namedb/auto_forward.conf + fi + + ${command%/named}/named-checkconf $named_conf || + err 3 'named-checkconf for $named_conf failed' } load_rc_config $name Modified: stable/6/share/man/man5/rc.conf.5 ============================================================================== --- stable/6/share/man/man5/rc.conf.5 Mon Aug 3 20:09:54 2009 (r196053) +++ stable/6/share/man/man5/rc.conf.5 Mon Aug 3 20:14:00 2009 (r196054) @@ -1526,6 +1526,12 @@ Path to .Xr named 8 (default .Pa /usr/sbin/named ) . +.It Va named_conf +.Pq Vt str +Path to +.Xr named 8 +configuration file, (default +.Pa /etc/namedb/named.conf ) . .It Va named_flags .Pq Vt str If @@ -1571,6 +1577,26 @@ daemon's PID file into the .Xr chroot 8 environment. +.It Va named_wait +.Pq Vt bool +Set to have +.Pa /etc/rc.d/named +loop until working name service is established. +.It Va named_wait_host +.Pq Vt str +Name of host to lookup for the named_wait option. +(Default localhost) +.It Va named_auto_forward +.Pq Vt bool +Set to enable automatic creation of a forwarder +configuration file derived from +.Pa /etc/resolv.conf . +.It Va named_auto_forward_only +.Pq Vt bool +Set to change the default forwarder configuration from +.Dq forward first +to +.Dq forward only . .It Va kerberos5_server_enable .Pq Vt bool Set to From dougb at FreeBSD.org Mon Aug 3 20:20:16 2009 From: dougb at FreeBSD.org (Doug Barton) Date: Mon Aug 3 20:20:22 2009 Subject: svn commit: r196055 - in stable/7/etc: . rc.d Message-ID: <200908032020.n73KKF0q096083@svn.freebsd.org> Author: dougb Date: Mon Aug 3 20:20:15 2009 New Revision: 196055 URL: http://svn.freebsd.org/changeset/base/196055 Log: MFC r193119, quotation marks around the value of name= (i.e., diff reduction to HEAD) Modified: stable/7/etc/ (props changed) stable/7/etc/rc.d/archdep stable/7/etc/rc.d/moused stable/7/etc/rc.d/nscd stable/7/etc/rc.d/ntpd stable/7/etc/termcap.small (props changed) Modified: stable/7/etc/rc.d/archdep ============================================================================== --- stable/7/etc/rc.d/archdep Mon Aug 3 20:14:00 2009 (r196054) +++ stable/7/etc/rc.d/archdep Mon Aug 3 20:20:15 2009 (r196055) @@ -9,7 +9,7 @@ . /etc/rc.subr -name=archdep +name="archdep" start_cmd="archdep_start" stop_cmd=":" Modified: stable/7/etc/rc.d/moused ============================================================================== --- stable/7/etc/rc.d/moused Mon Aug 3 20:14:00 2009 (r196054) +++ stable/7/etc/rc.d/moused Mon Aug 3 20:20:15 2009 (r196055) @@ -9,7 +9,7 @@ . /etc/rc.subr -name=moused +name="moused" rcvar=`set_rcvar` command="/usr/sbin/${name}" start_cmd="moused_start" Modified: stable/7/etc/rc.d/nscd ============================================================================== --- stable/7/etc/rc.d/nscd Mon Aug 3 20:14:00 2009 (r196054) +++ stable/7/etc/rc.d/nscd Mon Aug 3 20:20:15 2009 (r196055) @@ -18,7 +18,7 @@ . /etc/rc.subr -name=nscd +name="nscd" rcvar=`set_rcvar` command=/usr/sbin/nscd Modified: stable/7/etc/rc.d/ntpd ============================================================================== --- stable/7/etc/rc.d/ntpd Mon Aug 3 20:14:00 2009 (r196054) +++ stable/7/etc/rc.d/ntpd Mon Aug 3 20:20:15 2009 (r196055) @@ -10,7 +10,7 @@ . /etc/rc.subr -name=ntpd +name="ntpd" rcvar=`set_rcvar` command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" From dougb at FreeBSD.org Mon Aug 3 20:22:04 2009 From: dougb at FreeBSD.org (Doug Barton) Date: Mon Aug 3 20:22:11 2009 Subject: svn commit: r196056 - in stable/6/etc: . rc.d Message-ID: <200908032022.n73KM2eh096193@svn.freebsd.org> Author: dougb Date: Mon Aug 3 20:22:02 2009 New Revision: 196056 URL: http://svn.freebsd.org/changeset/base/196056 Log: MFC r193119, quotation marks around the value of name= (i.e., diff reduction to HEAD) Modified: stable/6/etc/ (props changed) stable/6/etc/rc.d/archdep stable/6/etc/rc.d/moused stable/6/etc/rc.d/ntpd Modified: stable/6/etc/rc.d/archdep ============================================================================== --- stable/6/etc/rc.d/archdep Mon Aug 3 20:20:15 2009 (r196055) +++ stable/6/etc/rc.d/archdep Mon Aug 3 20:22:02 2009 (r196056) @@ -9,7 +9,7 @@ . /etc/rc.subr -name=archdep +name="archdep" start_cmd="archdep_start" stop_cmd=":" Modified: stable/6/etc/rc.d/moused ============================================================================== --- stable/6/etc/rc.d/moused Mon Aug 3 20:20:15 2009 (r196055) +++ stable/6/etc/rc.d/moused Mon Aug 3 20:22:02 2009 (r196056) @@ -9,7 +9,7 @@ . /etc/rc.subr -name=moused +name="moused" rcvar=`set_rcvar` command="/usr/sbin/${name}" start_cmd="moused_start" Modified: stable/6/etc/rc.d/ntpd ============================================================================== --- stable/6/etc/rc.d/ntpd Mon Aug 3 20:20:15 2009 (r196055) +++ stable/6/etc/rc.d/ntpd Mon Aug 3 20:22:02 2009 (r196056) @@ -10,7 +10,7 @@ . /etc/rc.subr -name=ntpd +name="ntpd" rcvar=`set_rcvar` command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" From dougb at FreeBSD.org Mon Aug 3 20:24:33 2009 From: dougb at FreeBSD.org (Doug Barton) Date: Mon Aug 3 20:24:44 2009 Subject: svn commit: r196057 - in stable/7/etc: . rc.d Message-ID: <200908032024.n73KOWhN096290@svn.freebsd.org> Author: dougb Date: Mon Aug 3 20:24:31 2009 New Revision: 196057 URL: http://svn.freebsd.org/changeset/base/196057 Log: MFC r193197, substitute ypset for ypbind in REQUIRE lines. Modified: stable/7/etc/ (props changed) stable/7/etc/rc.d/amd stable/7/etc/rc.d/keyserv stable/7/etc/rc.d/nisdomain stable/7/etc/rc.d/quota stable/7/etc/rc.d/yppasswdd stable/7/etc/termcap.small (props changed) Modified: stable/7/etc/rc.d/amd ============================================================================== --- stable/7/etc/rc.d/amd Mon Aug 3 20:22:02 2009 (r196056) +++ stable/7/etc/rc.d/amd Mon Aug 3 20:24:31 2009 (r196057) @@ -4,7 +4,7 @@ # # PROVIDE: amd -# REQUIRE: rpcbind ypbind nfsclient cleanvar ldconfig +# REQUIRE: rpcbind ypset nfsclient cleanvar ldconfig # BEFORE: DAEMON # KEYWORD: nojail shutdown Modified: stable/7/etc/rc.d/keyserv ============================================================================== --- stable/7/etc/rc.d/keyserv Mon Aug 3 20:22:02 2009 (r196056) +++ stable/7/etc/rc.d/keyserv Mon Aug 3 20:24:31 2009 (r196057) @@ -6,7 +6,7 @@ # Start keyserv if we are running Secure RPC # PROVIDE: keyserv -# REQUIRE: ypbind +# REQUIRE: ypset # BEFORE: DAEMON # KEYWORD: shutdown Modified: stable/7/etc/rc.d/nisdomain ============================================================================== --- stable/7/etc/rc.d/nisdomain Mon Aug 3 20:22:02 2009 (r196056) +++ stable/7/etc/rc.d/nisdomain Mon Aug 3 20:24:31 2009 (r196057) @@ -28,7 +28,7 @@ # PROVIDE: nisdomain # REQUIRE: SERVERS rpcbind -# BEFORE: ypbind ypserv ypxfrd +# BEFORE: ypset ypbind ypserv ypxfrd . /etc/rc.subr Modified: stable/7/etc/rc.d/quota ============================================================================== --- stable/7/etc/rc.d/quota Mon Aug 3 20:22:02 2009 (r196056) +++ stable/7/etc/rc.d/quota Mon Aug 3 20:24:31 2009 (r196057) @@ -6,7 +6,7 @@ # Enable/Check the quotas (must be after ypbind if using NIS) # PROVIDE: quota -# REQUIRE: mountcritremote +# REQUIRE: mountcritremote ypset # BEFORE: DAEMON # KEYWORD: nojail Modified: stable/7/etc/rc.d/yppasswdd ============================================================================== --- stable/7/etc/rc.d/yppasswdd Mon Aug 3 20:22:02 2009 (r196056) +++ stable/7/etc/rc.d/yppasswdd Mon Aug 3 20:24:31 2009 (r196057) @@ -4,7 +4,7 @@ # # PROVIDE: yppasswdd -# REQUIRE: ypserv ypbind +# REQUIRE: ypserv ypset # BEFORE: LOGIN # KEYWORD: shutdown From dougb at FreeBSD.org Mon Aug 3 20:26:56 2009 From: dougb at FreeBSD.org (Doug Barton) Date: Mon Aug 3 20:27:03 2009 Subject: svn commit: r196058 - in stable/6/etc: . bluetooth defaults etc.alpha etc.amd64 etc.arm etc.i386 etc.ia64 etc.powerpc etc.sparc64 isdn mail mtree namedb pam.d periodic ppp rc.d root sendmail Message-ID: <200908032026.n73KQtrw096398@svn.freebsd.org> Author: dougb Date: Mon Aug 3 20:26:55 2009 New Revision: 196058 URL: http://svn.freebsd.org/changeset/base/196058 Log: MFC r193197, substitute ypset for ypbind in REQUIRE lines. Modified: stable/6/etc/ (props changed) stable/6/etc/Makefile (props changed) stable/6/etc/amd.map (props changed) stable/6/etc/apmd.conf (props changed) stable/6/etc/auth.conf (props changed) stable/6/etc/bluetooth/ (props changed) stable/6/etc/crontab (props changed) stable/6/etc/csh.cshrc (props changed) stable/6/etc/csh.login (props changed) stable/6/etc/csh.logout (props changed) stable/6/etc/defaults/ (props changed) stable/6/etc/devd.conf (props changed) stable/6/etc/devfs.conf (props changed) stable/6/etc/dhclient.conf (props changed) stable/6/etc/disktab (props changed) stable/6/etc/etc.alpha/ (props changed) stable/6/etc/etc.amd64/ (props changed) stable/6/etc/etc.arm/ (props changed) stable/6/etc/etc.i386/ (props changed) stable/6/etc/etc.ia64/ (props changed) stable/6/etc/etc.powerpc/ (props changed) stable/6/etc/etc.sparc64/ (props changed) stable/6/etc/fbtab (props changed) stable/6/etc/freebsd-update.conf (props changed) stable/6/etc/ftpusers (props changed) stable/6/etc/gettytab (props changed) stable/6/etc/group (props changed) stable/6/etc/hosts (props changed) stable/6/etc/hosts.allow (props changed) stable/6/etc/hosts.equiv (props changed) stable/6/etc/hosts.lpd (props changed) stable/6/etc/inetd.conf (props changed) stable/6/etc/isdn/ (props changed) stable/6/etc/login.access (props changed) stable/6/etc/login.conf (props changed) stable/6/etc/mac.conf (props changed) stable/6/etc/mail/ (props changed) stable/6/etc/man.alias (props changed) stable/6/etc/master.passwd (props changed) stable/6/etc/minfree (props changed) stable/6/etc/motd (props changed) stable/6/etc/mtree/ (props changed) stable/6/etc/namedb/ (props changed) stable/6/etc/netconfig (props changed) stable/6/etc/netstart (props changed) stable/6/etc/network.subr (props changed) stable/6/etc/networks (props changed) stable/6/etc/newsyslog.conf (props changed) stable/6/etc/nls.alias (props changed) stable/6/etc/nsmb.conf (props changed) stable/6/etc/opieaccess (props changed) stable/6/etc/pam.d/ (props changed) stable/6/etc/pccard_ether (props changed) stable/6/etc/periodic/ (props changed) stable/6/etc/pf.conf (props changed) stable/6/etc/pf.os (props changed) stable/6/etc/phones (props changed) stable/6/etc/portsnap.conf (props changed) stable/6/etc/ppp/ (props changed) stable/6/etc/printcap (props changed) stable/6/etc/profile (props changed) stable/6/etc/protocols (props changed) stable/6/etc/rc (props changed) stable/6/etc/rc.bsdextended (props changed) stable/6/etc/rc.d/ (props changed) stable/6/etc/rc.d/amd stable/6/etc/rc.d/keyserv stable/6/etc/rc.d/nisdomain stable/6/etc/rc.d/quota stable/6/etc/rc.d/yppasswdd stable/6/etc/rc.firewall (props changed) stable/6/etc/rc.firewall6 (props changed) stable/6/etc/rc.initdiskless (props changed) stable/6/etc/rc.resume (props changed) stable/6/etc/rc.sendmail (props changed) stable/6/etc/rc.shutdown (props changed) stable/6/etc/rc.subr (props changed) stable/6/etc/rc.suspend (props changed) stable/6/etc/remote (props changed) stable/6/etc/root/ (props changed) stable/6/etc/rpc (props changed) stable/6/etc/sendmail/ (props changed) stable/6/etc/services (props changed) stable/6/etc/shells (props changed) stable/6/etc/snmpd.config (props changed) stable/6/etc/sysctl.conf (props changed) stable/6/etc/syslog.conf (props changed) stable/6/etc/termcap.small (props changed) stable/6/etc/usbd.conf (props changed) Modified: stable/6/etc/rc.d/amd ============================================================================== --- stable/6/etc/rc.d/amd Mon Aug 3 20:24:31 2009 (r196057) +++ stable/6/etc/rc.d/amd Mon Aug 3 20:26:55 2009 (r196058) @@ -4,7 +4,7 @@ # # PROVIDE: amd -# REQUIRE: rpcbind ypbind nfsclient cleanvar ldconfig +# REQUIRE: rpcbind ypset nfsclient cleanvar ldconfig # BEFORE: DAEMON # KEYWORD: nojail Modified: stable/6/etc/rc.d/keyserv ============================================================================== --- stable/6/etc/rc.d/keyserv Mon Aug 3 20:24:31 2009 (r196057) +++ stable/6/etc/rc.d/keyserv Mon Aug 3 20:26:55 2009 (r196058) @@ -6,7 +6,7 @@ # Start keyserv if we are running Secure RPC # PROVIDE: keyserv -# REQUIRE: ypbind +# REQUIRE: ypset # BEFORE: DAEMON . /etc/rc.subr Modified: stable/6/etc/rc.d/nisdomain ============================================================================== --- stable/6/etc/rc.d/nisdomain Mon Aug 3 20:24:31 2009 (r196057) +++ stable/6/etc/rc.d/nisdomain Mon Aug 3 20:26:55 2009 (r196058) @@ -28,7 +28,7 @@ # PROVIDE: nisdomain # REQUIRE: SERVERS rpcbind -# BEFORE: ypbind ypserv ypxfrd +# BEFORE: ypset ypbind ypserv ypxfrd . /etc/rc.subr Modified: stable/6/etc/rc.d/quota ============================================================================== --- stable/6/etc/rc.d/quota Mon Aug 3 20:24:31 2009 (r196057) +++ stable/6/etc/rc.d/quota Mon Aug 3 20:26:55 2009 (r196058) @@ -6,7 +6,7 @@ # Enable/Check the quotas (must be after ypbind if using NIS) # PROVIDE: quota -# REQUIRE: mountcritremote +# REQUIRE: mountcritremote ypset # BEFORE: DAEMON # KEYWORD: nojail Modified: stable/6/etc/rc.d/yppasswdd ============================================================================== --- stable/6/etc/rc.d/yppasswdd Mon Aug 3 20:24:31 2009 (r196057) +++ stable/6/etc/rc.d/yppasswdd Mon Aug 3 20:26:55 2009 (r196058) @@ -4,7 +4,7 @@ # # PROVIDE: yppasswdd -# REQUIRE: ypserv ypbind +# REQUIRE: ypserv ypset # BEFORE: LOGIN . /etc/rc.subr From pgollucci at p6m7g8.com Mon Aug 3 21:52:11 2009 From: pgollucci at p6m7g8.com (Philip M. Gollucci) Date: Mon Aug 3 21:52:23 2009 Subject: svn commit: r196047 - stable/8 In-Reply-To: <200908030942.n739gBuI043385@svn.freebsd.org> References: <200908030942.n739gBuI043385@svn.freebsd.org> Message-ID: <4A7759AC.10102@p6m7g8.com> X-SVN-Group: stable-other neeeds updating to X-SVN-Group: stable-8 now. Thx! -- ------------------------------------------------------------------------ 1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70 3F8C 75B8 8FFB DB9B 8C1C Philip M. Gollucci (pgollucci@p6m7g8.com) c: 703.336.9354 Consultant - P6M7G8 Inc. http://p6m7g8.net Senior Sys Admin - RideCharge, Inc. http://ridecharge.com ASF Member - Apache Software Foundation http://apache.org FreeBSD Committer - FreeBSD Foundation http://freebsd.org Work like you don't need the money, love like you'll never get hurt, and dance like nobody's watching. From np at FreeBSD.org Tue Aug 4 03:14:07 2009 From: np at FreeBSD.org (Navdeep Parhar) Date: Tue Aug 4 03:14:13 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <200908032033.08169.hselasky@c2i.net> References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> Message-ID: <20090804031407.GA8974@hub.freebsd.org> On Mon, Aug 03, 2009 at 08:33:04PM +0200, Hans Petter Selasky wrote: > On Monday 03 August 2009 19:46:16 Bruce Evans wrote: > > On Mon, 3 Aug 2009, M. Warner Losh wrote: > > > In message: <200908030827.21108.hselasky@c2i.net> > > > > > > : I see two solutions: > > > : > > > : 1) Disable the timekeeping if no keys are pressed. > > > : > > > : 2) Second option is to use getmicrotime. Actually what I need is just a > > > : millisecond time reference so I know when to repeat the last key. > > > : > > > : Any opinions? DELAY() or getmicrotime() ? > > > > DELAY(1) is somewhet usable. > > I think DELAY(1) is not accurate enough. > > I suggest that the DELAY(1000) is only active while a key is actually pressed. > > See attached patch. Please test and report back. This patch fixes my problem. The machine is remote and I'm unable to test whether the USB keyboard and keystroke repetition works, but core dumps to a SATA disk are now as fast as they were before r195960. Thanks. Regards, Navdeep From bms at incunabulum.net Tue Aug 4 07:57:41 2009 From: bms at incunabulum.net (Bruce Simpson) Date: Tue Aug 4 07:57:47 2009 Subject: svn commit: r196039 - in head/sys: contrib/pf/net dev/cxgb/ulp/tom net netinet netinet6 In-Reply-To: <200908021943.n72JhWKX023102@svn.freebsd.org> References: <200908021943.n72JhWKX023102@svn.freebsd.org> Message-ID: <4A77E9F1.6040407@incunabulum.net> Hey Robert, I didn't see any changes which directly touched ip_mroute in this rev. Can you clarify how this touches ip_mroute? It wasn't obvious from the diff. thanks, BMS Robert Watson wrote: > Log: > Many network stack subsystems use a single global data structure to hold > all pertinent statatistics for the subsystem. These structures are > sometimes "borrowed" by kernel modules that require a place to store > statistics for similar events. > ... > The following modules are affected by this change: > > if_bridge > if_cxgb > if_gif > ip_mroute > From rwatson at FreeBSD.org Tue Aug 4 08:26:51 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Tue Aug 4 08:27:00 2009 Subject: svn commit: r196039 - in head/sys: contrib/pf/net dev/cxgb/ulp/tom net netinet netinet6 In-Reply-To: <4A77E9F1.6040407@incunabulum.net> References: <200908021943.n72JhWKX023102@svn.freebsd.org> <4A77E9F1.6040407@incunabulum.net> Message-ID: On Tue, 4 Aug 2009, Bruce Simpson wrote: > I didn't see any changes which directly touched ip_mroute in this rev. Can > you clarify how this touches ip_mroute? It wasn't obvious from the diff. You're right, it was included in error. ip_mroute is on the list of modules that uses a stats structure with an accessor macro, but that structure make it onto the list of structures requiring accessor functions because it's accessed only from within ip_mroute (actually, two such functions/macros). I must have made a transcription error when writing up the commit message. My notes on accessor macros and files that consume them below. Robert Defined Used ------- ---- ICMPSTAT_ADD icmp_var.h icmp_var.h ICMPSTAT_INC icmp_var.h ip_icmp.c, *pf.c IGMPSTAT_ADD igmp_var.h igmp_var.h IGMPSTAT_INC igmp_var.h igmp.c MRTSTAT_ADD ip_mroute.h ip_mroute.h MRTSTAT_INC ip_mroute.h *ip_mroute.c IPSTAT_ADD ip_var.h ip_var.h, ip_output.c, IPSTAT_SUB ip_var.h ip_var.h IPSTAT_INC ip_var.h raw_ip.c, *ip_divert.c, ip_output.c, ip_input.c, ip_ipsec.c, *in_gif.c, igmp.c, ip_options.c, ip_fastfwd.c, udp_usrreq.c, *if_bridge.c, *pf.c, ip_var.h IPSTAT_DEC ip_var.h raw_ip.c, *ip_divert.c, ip_var.h PIMSTAT_ADD pim_var.h *ip_mroute.c, pim_var.h PIMSTAT_INC pim_var.h *ip_mroute.c UDPSTAT_ADD udp_var.h udp_var.h UDPSTAT_INC udp_var.h udp_usrreq.c, udp6_usrreq.c, *pf.c TCPSTAT_ADD tcp_var.h tcp_input.c, tcp_reass.c, tcp_output.c, tcp_var.h TCPSTAT_INC tcp_var.h tcp_input.c, tcp_subr.c, tcp_reass.c, tcp_timer.c, tcp_sack.c, tcp_output.c, tcp_hostcache.c, tcp_syncache.c, tcp_usrreq.c, tcp_timewait.c, *cxgb_cpl_io.c, *pf.c IP6STAT_ADD ip6_var.h ip6_var.h IP6STAT_SUB ip6_var.h ip6_var.h IP6STAT_INC ip6_var.h raw_ip6.c, icmp6.c, udp6_usrreq.c, mld6.c, ip6_input.c IP6STAT_DEC ip6_var.h icmp6.c CARPSTATS_ADD ip_carp.h ip_carp.h CARPSTATS_INC ip_carp.h ip_carp.c ICMP6STAT_ADD icmp6.h icmp6.h ICMP6STAT_INC icmp6.h raw_ip6.c icmp6.c nd6.c nd6_nbr.c mld6.c nd6_rtr.c *pf.c * Files that are built into kernel modules. Things that use things they shouldn't: pf.c: ICMPSTAT_INC, IPSTAT_INC, UDPSTAT_INC, TCPSTAT_INC ip_divert.c: IPSTAT_INC, IPSTAT_DEC in_gif.c: IPSTAT_INC if_bridge.c: IPSTAT_INC cxgb_cpl_io.c: TCPSTAT_INC From brde at optusnet.com.au Tue Aug 4 08:55:27 2009 From: brde at optusnet.com.au (Bruce Evans) Date: Tue Aug 4 08:55:34 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <200908032033.08169.hselasky@c2i.net> References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> Message-ID: <20090804183824.J928@besplex.bde.org> On Mon, 3 Aug 2009, Hans Petter Selasky wrote: > On Monday 03 August 2009 19:46:16 Bruce Evans wrote: >> On Mon, 3 Aug 2009, M. Warner Losh wrote: >>> In message: <200908030827.21108.hselasky@c2i.net> >>> >>> : I see two solutions: >>> : >>> : 1) Disable the timekeeping if no keys are pressed. >>> : >>> : 2) Second option is to use getmicrotime. Actually what I need is just a >>> : millisecond time reference so I know when to repeat the last key. >>> : >>> : Any opinions? DELAY() or getmicrotime() ? >> >> DELAY(1) is somewhet usable. > > I think DELAY(1) is not accurate enough. Indeed. But DELAY(10) is probably accurate enough, and certainly efficient enough (though ugly) since the atkbd device has used DELAY(7) and DELAY(20) for a long time without anyone noticing this slowing down disk i/o. It would take about 100 active console input drivers doing DELAY(10)'s to accumulate a delay of 1 mS. > I suggest that the DELAY(1000) is only active while a key is actually pressed. > > See attached patch. Please test and report back. Better. Bruce From bms at incunabulum.net Tue Aug 4 09:34:41 2009 From: bms at incunabulum.net (Bruce Simpson) Date: Tue Aug 4 09:34:52 2009 Subject: svn commit: r196039 - in head/sys: contrib/pf/net dev/cxgb/ulp/tom net netinet netinet6 In-Reply-To: References: <200908021943.n72JhWKX023102@svn.freebsd.org> <4A77E9F1.6040407@incunabulum.net> Message-ID: <4A7800AB.8030907@incunabulum.net> Robert Watson wrote: > > You're right, it was included in error. ip_mroute is on the list of > modules that uses a stats structure with an accessor macro, but that > structure make it onto the list of structures requiring accessor > functions because it's accessed only from within ip_mroute (actually, > two such functions/macros). I must have made a transcription error > when writing up the commit message. My notes on accessor macros and > files that consume them below. No worries, I was just going 'Hurm hah hurm wtf'. :-) From jhb at freebsd.org Tue Aug 4 21:01:59 2009 From: jhb at freebsd.org (John Baldwin) Date: Tue Aug 4 21:02:08 2009 Subject: svn commit: r196045 - stable/8 In-Reply-To: <868wi1vvqi.fsf@ds4.des.no> References: <200908030813.n738D6x1040724@svn.freebsd.org> <4A76ED32.80304@andric.com> <868wi1vvqi.fsf@ds4.des.no> Message-ID: <200908040809.06229.jhb@freebsd.org> On Monday 03 August 2009 10:05:09 am Dag-Erling Sm?rgrav wrote: > Dimitry Andric writes: > > You might want to change [...] > > Thanks, new patch attached. I vote for you to commit it. -- John Baldwin From des at des.no Tue Aug 4 22:12:02 2009 From: des at des.no (=?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?=) Date: Tue Aug 4 22:12:09 2009 Subject: svn commit: r196045 - stable/8 In-Reply-To: <200908040809.06229.jhb@freebsd.org> (John Baldwin's message of "Tue, 4 Aug 2009 08:09:05 -0400") References: <200908030813.n738D6x1040724@svn.freebsd.org> <4A76ED32.80304@andric.com> <868wi1vvqi.fsf@ds4.des.no> <200908040809.06229.jhb@freebsd.org> Message-ID: <86skg744b3.fsf@ds4.des.no> John Baldwin writes: > Dag-Erling Sm?rgrav writes: > > Thanks, new patch attached. > I vote for you to commit it. I'd rather not do that without Peter's go-ahead... I asked him yesterday, but he hasn't answered yet. DES -- Dag-Erling Sm?rgrav - des@des.no From maxim at FreeBSD.org Thu Aug 6 08:55:55 2009 From: maxim at FreeBSD.org (Maxim Konovalov) Date: Thu Aug 6 08:56:06 2009 Subject: svn commit: r196079 - stable/7/sbin/ipfw Message-ID: <200908060855.n768tsHw048928@svn.freebsd.org> Author: maxim Date: Thu Aug 6 08:55:54 2009 New Revision: 196079 URL: http://svn.freebsd.org/changeset/base/196079 Log: MFC r195036: kill grammar nits. Modified: stable/7/sbin/ipfw/ (props changed) stable/7/sbin/ipfw/ipfw.8 Modified: stable/7/sbin/ipfw/ipfw.8 ============================================================================== --- stable/7/sbin/ipfw/ipfw.8 Wed Aug 5 23:05:11 2009 (r196078) +++ stable/7/sbin/ipfw/ipfw.8 Thu Aug 6 08:55:54 2009 (r196079) @@ -311,7 +311,7 @@ file systems are mounted (yet) by the ti is being run (e.g.\& when they are mounted over NFS). Once .Fl p -has been specified, any additional arguments as passed on to the preprocessor +has been specified, any additional arguments are passed on to the preprocessor for interpretation. This allows for flexible configuration files (like conditionalizing them on the local hostname) and the use of macros to centralize @@ -1903,7 +1903,7 @@ with .Dq "options HZ=1000" to reduce the granularity to 1ms or less). -Default value is 0, meaning no delay. +The default value is 0, meaning no delay. .El .Pp The following parameters can be configured for a queue: From tom at tomjudge.com Thu Aug 6 16:24:04 2009 From: tom at tomjudge.com (Tom Judge) Date: Thu Aug 6 16:24:15 2009 Subject: svn commit: r189117 - head/sys/dev/bce In-Reply-To: <20090721145559.d2cf3f0b.stas@FreeBSD.org> References: <200902271925.n1RJP699080658@svn.freebsd.org> <20090721145559.d2cf3f0b.stas@FreeBSD.org> Message-ID: <4A7AFFC4.5050607@tomjudge.com> Hi, Stanislav Sedov wrote: > On Fri, 27 Feb 2009 19:25:06 +0000 (UTC) > David Christensen mentioned: > > >> Author: davidch >> Date: Fri Feb 27 19:25:06 2009 >> New Revision: 189117 >> URL: http://svn.freebsd.org/changeset/base/189117 >> >> Log: >> - Update copyright to 2009. >> - Only enable split header operation when ZERO_COPY_SOCKETS is enabled in >> the kernel. >> >> > > Hi, David! > > It appears that this change leads to excessive memory fragmentation due to > large number of 9k contiguous buffers allocations performed. I noticed > that under the relatively high load this can quickly lead to inability to send > any packets via bce(4) even on machines with high amount of memory (16 Gb). > I've been running with this change backed out for a long time and I don't > see any problems with this driver with last changes applied. > > I can confirm that we are also seeing this problem on a number of Dell PE2950 systems running the bce driver from 7.2, the bug is more visible/producible on systems that are using Jumbo Frames (in our case 8Kb). The symptoms of this are an increase in the requests for jumbo clusters denied counter at 9k, and then random network stalls which sometimes recover on there own and others require a reboot. We have backed this change and so far it seems to have fixed the issue. Regards Tom Judge From nparhar at gmail.com Thu Aug 6 19:47:20 2009 From: nparhar at gmail.com (Navdeep Parhar) Date: Thu Aug 6 19:47:26 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <20090804031407.GA8974@hub.freebsd.org> References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> <20090804031407.GA8974@hub.freebsd.org> Message-ID: >> >> See attached patch. Please test and report back. > > This patch fixes my problem. ?The machine is remote and I'm unable > to test whether the USB keyboard and keystroke repetition works, but > core dumps to a SATA disk are now as fast as they were before > r195960. ?Thanks. I finally got a chance to try a USB keyboard with ddb, and things did not go too well overall. While inside ddb, keystrokes were recognized properly and repetition worked too. But after exiting ddb, the keyboard wouldn't work - there wasn't any visible response to keystrokes. Also, I kept seeing the login prompt continually scroll up, as if someone was pressing repeatedly. It certainly wasn't me :-) Are you assuming that a user will not resume normal operation after entering the debugger? A panic/reboot isn't the only exit route from ddb..... Simple sequence of steps to reproduce problem: ctrl-alt-esc on the USB keyboard db> c Regards, Navdeep From hselasky at c2i.net Fri Aug 7 06:30:50 2009 From: hselasky at c2i.net (Hans Petter Selasky) Date: Fri Aug 7 06:31:22 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: References: <20090802192902.GS47463@elvis.mu.org> <20090804031407.GA8974@hub.freebsd.org> Message-ID: <200908070830.47894.hselasky@c2i.net> On Thursday 06 August 2009 21:47:16 Navdeep Parhar wrote: > >> See attached patch. Please test and report back. > > > > This patch fixes my problem. The machine is remote and I'm unable > > to test whether the USB keyboard and keystroke repetition works, but > > core dumps to a SATA disk are now as fast as they were before > > r195960. Thanks. > > I finally got a chance to try a USB keyboard with ddb, and things did > not go too well overall. While inside ddb, keystrokes were recognized > properly and repetition worked too. But after exiting ddb, the > keyboard wouldn't work - there wasn't any visible response to > keystrokes. Also, I kept seeing the login prompt continually scroll > up, as if someone was pressing repeatedly. It certainly > wasn't me :-) > > Are you assuming that a user will not resume normal operation after > entering the debugger? A panic/reboot isn't the only exit route from > ddb..... > > Simple sequence of steps to reproduce problem: > ctrl-alt-esc on the USB keyboard > db> c This is like expected. Once paniced, USB operation is blocked on the USB controller which the keyboard belongs to, because USB does not receive any polling-complete call, so that it can clean up the state in the USB controller! This mainly has to do with avoid calling wakeup() during polling. To avoid wakeup() calls, USB sets some bits, which must be cleared when polling is complete, which is currently not done, because USB doesn't know when polling is complete ... --HPS From imp at bsdimp.com Fri Aug 7 06:57:30 2009 From: imp at bsdimp.com (M. Warner Losh) Date: Fri Aug 7 06:57:36 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <200908070830.47894.hselasky@c2i.net> References: <20090804031407.GA8974@hub.freebsd.org> <200908070830.47894.hselasky@c2i.net> Message-ID: <20090807.005400.-1749708164.imp@bsdimp.com> In message: <200908070830.47894.hselasky@c2i.net> Hans Petter Selasky writes: : On Thursday 06 August 2009 21:47:16 Navdeep Parhar wrote: : > >> See attached patch. Please test and report back. : > > : > > This patch fixes my problem. The machine is remote and I'm unable : > > to test whether the USB keyboard and keystroke repetition works, but : > > core dumps to a SATA disk are now as fast as they were before : > > r195960. Thanks. : > : > I finally got a chance to try a USB keyboard with ddb, and things did : > not go too well overall. While inside ddb, keystrokes were recognized : > properly and repetition worked too. But after exiting ddb, the : > keyboard wouldn't work - there wasn't any visible response to : > keystrokes. Also, I kept seeing the login prompt continually scroll : > up, as if someone was pressing repeatedly. It certainly : > wasn't me :-) : > : > Are you assuming that a user will not resume normal operation after : > entering the debugger? A panic/reboot isn't the only exit route from : > ddb..... : > : > Simple sequence of steps to reproduce problem: : > ctrl-alt-esc on the USB keyboard : > db> c : : This is like expected. : : Once paniced, USB operation is blocked on the USB controller which the : keyboard belongs to, because USB does not receive any polling-complete call, : so that it can clean up the state in the USB controller! This mainly has to do : with avoid calling wakeup() during polling. : : To avoid wakeup() calls, USB sets some bits, which must be cleared when : polling is complete, which is currently not done, because USB doesn't know : when polling is complete ... Polling isn't supposed to work like this... The rest of the system effects a poll without these side effects. Warner From nparhar at gmail.com Fri Aug 7 06:57:50 2009 From: nparhar at gmail.com (Navdeep Parhar) Date: Fri Aug 7 06:57:57 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <200908070830.47894.hselasky@c2i.net> References: <20090802192902.GS47463@elvis.mu.org> <20090804031407.GA8974@hub.freebsd.org> <200908070830.47894.hselasky@c2i.net> Message-ID: <20090807065744.GA23942@doormat.home> On Fri, Aug 07, 2009 at 08:30:45AM +0200, Hans Petter Selasky wrote: > On Thursday 06 August 2009 21:47:16 Navdeep Parhar wrote: > > >> See attached patch. Please test and report back. > > > > > > This patch fixes my problem. The machine is remote and I'm unable > > > to test whether the USB keyboard and keystroke repetition works, but > > > core dumps to a SATA disk are now as fast as they were before > > > r195960. Thanks. > > > > I finally got a chance to try a USB keyboard with ddb, and things did > > not go too well overall. While inside ddb, keystrokes were recognized > > properly and repetition worked too. But after exiting ddb, the > > keyboard wouldn't work - there wasn't any visible response to > > keystrokes. Also, I kept seeing the login prompt continually scroll > > up, as if someone was pressing repeatedly. It certainly > > wasn't me :-) > > > > Are you assuming that a user will not resume normal operation after > > entering the debugger? A panic/reboot isn't the only exit route from > > ddb..... > > > > Simple sequence of steps to reproduce problem: > > ctrl-alt-esc on the USB keyboard > > db> c > > This is like expected. > > Once paniced, USB operation is blocked on the USB controller which the > keyboard belongs to Note that I did not enter ddb on a panic. I entered it voluntarily to take a look at some things. After that I was hoping to continue with business as usual. > board belongs to, because USB does not receive any polling-complete > call, so that it can clean up the state in the USB controller! This > mainly has to do with avoid calling wakeup() during polling. > > To avoid wakeup() calls, USB sets some bits, which must be cleared when > polling is complete, which is currently not done, because USB doesn't know > when polling is complete ... ok. And my question, just like with the previous problem, is: Can something be done about it or are we expected to learn to live with this? All of this is much much better than having *no* USB keyboard with ddb, but there definitely are some kinks to be ironed out. Regards, Navdeep From hselasky at c2i.net Fri Aug 7 08:21:10 2009 From: hselasky at c2i.net (Hans Petter Selasky) Date: Fri Aug 7 08:21:16 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <20090807065744.GA23942@doormat.home> References: <20090802192902.GS47463@elvis.mu.org> <200908070830.47894.hselasky@c2i.net> <20090807065744.GA23942@doormat.home> Message-ID: <200908071021.09234.hselasky@c2i.net> On Friday 07 August 2009 08:57:44 Navdeep Parhar wrote: > ok. And my question, just like with the previous problem, is: Can > something be done about it or are we expected to learn to live with > this I will make a fix for this. --HPS From hselasky at c2i.net Fri Aug 7 09:24:50 2009 From: hselasky at c2i.net (Hans Petter Selasky) Date: Fri Aug 7 09:25:02 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <20090807.005400.-1749708164.imp@bsdimp.com> References: <20090804031407.GA8974@hub.freebsd.org> <200908070830.47894.hselasky@c2i.net> <20090807.005400.-1749708164.imp@bsdimp.com> Message-ID: <200908071124.47955.hselasky@c2i.net> On Friday 07 August 2009 08:54:00 M. Warner Losh wrote: > In message: <200908070830.47894.hselasky@c2i.net> > > Hans Petter Selasky writes: > : On Thursday 06 August 2009 21:47:16 Navdeep Parhar wrote: > : > >> See attached patch. Please test and report back. > : > > > : > > This patch fixes my problem. The machine is remote and I'm unable > : > > to test whether the USB keyboard and keystroke repetition works, but > : > > core dumps to a SATA disk are now as fast as they were before > : > > r195960. Thanks. > : > > : > I finally got a chance to try a USB keyboard with ddb, and things did > : > not go too well overall. While inside ddb, keystrokes were recognized > : > properly and repetition worked too. But after exiting ddb, the > : > keyboard wouldn't work - there wasn't any visible response to > : > keystrokes. Also, I kept seeing the login prompt continually scroll > : > up, as if someone was pressing repeatedly. It certainly > : > wasn't me :-) > : > > : > Are you assuming that a user will not resume normal operation after > : > entering the debugger? A panic/reboot isn't the only exit route from > : > ddb..... > : > > : > Simple sequence of steps to reproduce problem: > : > ctrl-alt-esc on the USB keyboard > : > db> c > : > : This is like expected. > : > : Once paniced, USB operation is blocked on the USB controller which the > : keyboard belongs to, because USB does not receive any polling-complete > : call, so that it can clean up the state in the USB controller! This > : mainly has to do with avoid calling wakeup() during polling. > : > : To avoid wakeup() calls, USB sets some bits, which must be cleared when > : polling is complete, which is currently not done, because USB doesn't > : know when polling is complete ... > > Polling isn't supposed to work like this... The rest of the system > effects a poll without these side effects. Please try the following patch and report back. There is some Giant fuzz which you can ignore. I will see if I can followup a patch against -current later today. http://perforce.freebsd.org/chv.cgi?CH=167084 --HPS From brde at optusnet.com.au Fri Aug 7 09:56:22 2009 From: brde at optusnet.com.au (Bruce Evans) Date: Fri Aug 7 09:56:34 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <20090807.005400.-1749708164.imp@bsdimp.com> References: <20090804031407.GA8974@hub.freebsd.org> <200908070830.47894.hselasky@c2i.net> <20090807.005400.-1749708164.imp@bsdimp.com> Message-ID: <20090807181536.P848@besplex.bde.org> On Fri, 7 Aug 2009, M. Warner Losh wrote: > In message: <200908070830.47894.hselasky@c2i.net> > Hans Petter Selasky writes: > : On Thursday 06 August 2009 21:47:16 Navdeep Parhar wrote: > : > ... > : > Simple sequence of steps to reproduce problem: > : > ctrl-alt-esc on the USB keyboard > : > db> c > : > : This is like expected. > : > : Once paniced, USB operation is blocked on the USB controller which the > : keyboard belongs to, because USB does not receive any polling-complete call, > : so that it can clean up the state in the USB controller! This mainly has to do > : with avoid calling wakeup() during polling. > : > : To avoid wakeup() calls, USB sets some bits, which must be cleared when > : polling is complete, which is currently not done, because USB doesn't know > : when polling is complete ... > > Polling isn't supposed to work like this... The rest of the system > effects a poll without these side effects. Yes, polling is complete when the call to the console driver i/o function returns, although this is broken as designed. It requires a full (enough) reentrant (enough) context switch and on every call to a console driver i/o function, with a full (enough) hardware initialization on entry and a switch back to the old context on return. But this is hard to implement for recalcitrant and/or complicated hardware, and it cannot work for the cn_checkc() i/o function (which is now usually misspelled cn_getc()), since switching the context back on return gives up control so other functions (typically interrupt handlers) may eat the console input. Only the sio console driver does it AFAIK. A non-broken design would involve calling a console driver open, close or ioctl function switch to and from console mode at suitable points. For ddb, the suitable points are on entry and exit from interactive mode, at most once each for every entry into ddb (not on every entry point since that would thrash the i/o subsystem unnecessarily for things like stepping to the next return instruction; unnecessary (and necessary) thrashing is most obvious if you have a correctly implemented video console driver which must switch the whole physical screen context unless console output uses a physically separate screen (not supported in FreeBSD). For other uses, the suitable points are unclear. Obviously, single printfs should be atomic, so the output part of the console should be switched to and from at most once per printf, and printf could do this easily, but that is not enough for printing long messages or even for short messages that are built up with multiple printfs. However, nothing better seems practical, since it would be a large burden for all code that wants to use a set of printfs to have to wrap the set with console driver open/close calls. Therefore, the open/close calls belong in printf right next to my uncommitted serialization for printfs. Serialization is closely related to reserving the console output device -- it would be a similarly too-large burden for all code that wants to use printf to have to wrap the printfs with serialization calls. Full context switches for console output (of a single physical screen) are only best for ddb, since for ordinary printfs you want to see the output, so putting it in an inactive virtual console is not so good, and putting it on a separate virtual console and switching to that is also not so good (the difference for ddb is mainly that it is natural to switch the console on entry to interactive mode so as to actually work on it). So non-ddb printf output should go to a virtual console (or just a buffer) even if the console driver doesn't support virtual consoles. printf already has some support for this (buffering so as to do the output later to ptys). The cn_dbctl() console entry point was designed to fix part of this problem, but it was only used by syscons and this use was removed after removing the (needed :-() calls to it. The problem is larger than I noticed when I designed it -- I thought that there was only a problem for ddb mode, and that ddb mode was handled better by requiring the console driver to be reentrant (reentrancy is best it it is possible and works -- the idea is to work in all states, and having open/close functions to switch the state gives even more states). However, problems for non-ddb mode became obvious when the multiple consoles support code was added -- it made the cn_getc() interface useless and the cn_checkc() interface primary, since all active consoles must be polled for input together, and problems for ddb mode would be obvious if syscons correctly context-switched the screen. cn_dbctl() should have been named cn_ioctl() for general ioctls, and it could be abused for open/close with less abuse than having separate open/close entry points, since the needed open/close functions are more like ioctls than userland open/close (since you already have descriptors and want to modify the state of the device). syscons's use of cn_dbctl was simply: - cn_dbctl passes TRUE on entry and FALSE on exit; these can be counted so as to implement full reentrancy, but syscons counts them only so as to avoid state changes except on entries that are not reentries. (Reentries are not supported by ddb so they shouldn't actually occur.) - on entry (not reentry), syscons just stops the screen timer, hides the mouse, unlocks vty switching, switches to vty0, forces an update of the physical screen - on entry (including reentry), syscons increments its private variable `debugger'. - `debugger' is used mainly to avoid abusing ddb's private variable db_active. Various operations that are invalid in ddb mode (not nearly all, and mainly ones involving the screen timer and calling wakeup()) are avoided when `debugger' is set. Now, db_active is replaced by kdb_active and it is abused a lot in other subsystems but not nearly enough here. syscons still uses `debugger', but `debugger' is never initialized (except statically to 0). Bruce From des at des.no Mon Aug 3 20:37:11 2009 From: des at des.no (=?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?=) Date: Fri Aug 7 16:55:10 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <4A773430.2050804@errno.com> (Sam Leffler's message of "Mon, 03 Aug 2009 12:02:08 -0700") References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> <4A773430.2050804@errno.com> Message-ID: <8663d463d7.fsf@ds4.des.no> Sam Leffler writes: > I think we are losing sight of the goal here. We are in a release > schedule and trying to find a minimal set of changes that resolves our > immediate need. Keyboard repeat is not required and unless there is > an obvious and immediate solution it should be considered AFTER the > release. Remember we are already behind schedule for 8.0. Hear, hear. DES -- Dag-Erling Sm?rgrav - des@des.no From imp at bsdimp.com Mon Aug 3 20:48:23 2009 From: imp at bsdimp.com (M. Warner Losh) Date: Fri Aug 7 16:55:20 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <8663d463d7.fsf@ds4.des.no> References: <4A773430.2050804@errno.com> <8663d463d7.fsf@ds4.des.no> Message-ID: <20090803.144515.-924279425.imp@bsdimp.com> In message: <8663d463d7.fsf@ds4.des.no> Dag-Erling_Sm?rgrav writes: : Sam Leffler writes: : > I think we are losing sight of the goal here. We are in a release : > schedule and trying to find a minimal set of changes that resolves our : > immediate need. Keyboard repeat is not required and unless there is : > an obvious and immediate solution it should be considered AFTER the : > release. Remember we are already behind schedule for 8.0. : : Hear, hear. Does the patch that Hans posted fit the bill? To my eye I think it does, but I've not tested to see if it works... Warner From des at des.no Mon Aug 3 20:49:19 2009 From: des at des.no (=?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?=) Date: Fri Aug 7 16:55:28 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <20090803.144515.-924279425.imp@bsdimp.com> (M. Warner Losh's message of "Mon, 03 Aug 2009 14:45:15 -0600 (MDT)") References: <4A773430.2050804@errno.com> <8663d463d7.fsf@ds4.des.no> <20090803.144515.-924279425.imp@bsdimp.com> Message-ID: <86skg84o8i.fsf@ds4.des.no> "M. Warner Losh" writes: > Does the patch that Hans posted fit the bill? To my eye I think it > does, but I've not tested to see if it works... My point (and Sam's, I think) is simply: drop keyboard repeat support. DES -- Dag-Erling Sm?rgrav - des@des.no From imp at bsdimp.com Mon Aug 3 21:09:26 2009 From: imp at bsdimp.com (M. Warner Losh) Date: Fri Aug 7 16:55:41 2009 Subject: svn commit: r195960 - in head/sys/dev/usb: . controller input In-Reply-To: <86skg84o8i.fsf@ds4.des.no> References: <8663d463d7.fsf@ds4.des.no> <20090803.144515.-924279425.imp@bsdimp.com> <86skg84o8i.fsf@ds4.des.no> Message-ID: <20090803.150637.-861030402.imp@bsdimp.com> In message: <86skg84o8i.fsf@ds4.des.no> Dag-Erling_Sm?rgrav writes: : "M. Warner Losh" writes: : > Does the patch that Hans posted fit the bill? To my eye I think it : > does, but I've not tested to see if it works... : : My point (and Sam's, I think) is simply: drop keyboard repeat support. And my point is that we have a patch that will work now. We should go with it. If it turns out not to work, 86 repeat support. Warner From kib at FreeBSD.org Sun Aug 9 11:47:41 2009 From: kib at FreeBSD.org (Konstantin Belousov) Date: Sun Aug 9 11:47:52 2009 Subject: svn commit: r196087 - in stable/7/sys: . contrib/pf kern Message-ID: <200908091147.n79BleJ7067102@svn.freebsd.org> Author: kib Date: Sun Aug 9 11:47:39 2009 New Revision: 196087 URL: http://svn.freebsd.org/changeset/base/196087 Log: MFC r195773: When buffer write is failed, it is wrong for brelse() to invalidate portion of the page that was written. Among other problems, this page might be picked up by pagedaemon, with failed assertion in vm_pageout_flush() about validity of the page. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/vfs_bio.c Modified: stable/7/sys/kern/vfs_bio.c ============================================================================== --- stable/7/sys/kern/vfs_bio.c Fri Aug 7 15:41:16 2009 (r196086) +++ stable/7/sys/kern/vfs_bio.c Sun Aug 9 11:47:39 2009 (r196087) @@ -1347,7 +1347,8 @@ brelse(struct buf *bp) m = bp->b_pages[i]; } if ((bp->b_flags & B_NOCACHE) || - (bp->b_ioflags & BIO_ERROR)) { + (bp->b_ioflags & BIO_ERROR && + bp->b_iocmd == BIO_READ)) { int poffset = foff & PAGE_MASK; int presid = resid > (PAGE_SIZE - poffset) ? (PAGE_SIZE - poffset) : resid; From brian at FreeBSD.org Sun Aug 9 18:39:25 2009 From: brian at FreeBSD.org (Brian Somers) Date: Sun Aug 9 18:39:31 2009 Subject: svn commit: r196088 - stable/7/usr.sbin/ppp Message-ID: <200908091839.n79IdONq075058@svn.freebsd.org> Author: brian Date: Sun Aug 9 18:39:23 2009 New Revision: 196088 URL: http://svn.freebsd.org/changeset/base/196088 Log: MFC: Don't get stuck in an infinite loop comparing (short++ <= maxshort) PR: 136893 Submitted by: Aragon Gouveia - aragon at phat dot za dot net (mostly) Modified: stable/7/usr.sbin/ppp/ (props changed) stable/7/usr.sbin/ppp/nat_cmd.c Modified: stable/7/usr.sbin/ppp/nat_cmd.c ============================================================================== --- stable/7/usr.sbin/ppp/nat_cmd.c Sun Aug 9 11:47:39 2009 (r196087) +++ stable/7/usr.sbin/ppp/nat_cmd.c Sun Aug 9 18:39:23 2009 (r196088) @@ -173,7 +173,7 @@ nat_RedirectPort(struct cmdargs const *a return -1; } - while (laliasport <= haliasport) { + do { link = PacketAliasRedirectPort(localaddr, htons(llocalport), remoteaddr, htons(lremoteport), aliasaddr, htons(laliasport), @@ -185,10 +185,9 @@ nat_RedirectPort(struct cmdargs const *a return 1; } llocalport++; - laliasport++; if (hremoteport) lremoteport++; - } + } while (laliasport++ < haliasport); return 0; } From ken at FreeBSD.org Tue Aug 11 16:48:30 2009 From: ken at FreeBSD.org (Kenneth D. Merry) Date: Tue Aug 11 16:48:35 2009 Subject: svn commit: r196096 - svnadmin/conf Message-ID: <200908111648.n7BGmTEc036056@svn.freebsd.org> Author: ken Date: Tue Aug 11 16:48:28 2009 New Revision: 196096 URL: http://svn.freebsd.org/changeset/base/196096 Log: Add Will Andrews (will) back to the src committers list. He will be working on storage and network-related changes. I will be his mentor. Approved by: core Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Tue Aug 11 08:19:15 2009 (r196095) +++ svnadmin/conf/access Tue Aug 11 16:48:28 2009 (r196096) @@ -223,6 +223,7 @@ versus weongyo wes wes@opensail.org wilko freebsd-commits@freebie.xs4all.nl +will wkoszek wollman wpaul From ken at FreeBSD.org Tue Aug 11 16:53:11 2009 From: ken at FreeBSD.org (Kenneth D. Merry) Date: Tue Aug 11 16:53:23 2009 Subject: svn commit: r196097 - svnadmin/conf Message-ID: <200908111653.n7BGrBLa036266@svn.freebsd.org> Author: ken Date: Tue Aug 11 16:53:08 2009 New Revision: 196097 URL: http://svn.freebsd.org/changeset/base/196097 Log: Mention that I'm mentoring Will Andrews (will). Approved by: core Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Tue Aug 11 16:48:28 2009 (r196096) +++ svnadmin/conf/mentors Tue Aug 11 16:53:08 2009 (r196097) @@ -27,5 +27,6 @@ sbruno scottl snb dwmalone sson gnn versus dds +will ken zec julian Co-mentor: silby zml dfr From peter at FreeBSD.org Tue Aug 11 21:18:42 2009 From: peter at FreeBSD.org (Peter Wemm) Date: Tue Aug 11 21:18:53 2009 Subject: svn commit: r196099 - svnadmin/tools Message-ID: <200908112118.n7BLIfqV042023@svn.freebsd.org> Author: peter Date: Tue Aug 11 21:18:41 2009 New Revision: 196099 URL: http://svn.freebsd.org/changeset/base/196099 Log: Checkpoint the hacks that have accumulated over time. Usually this is because of ill-advised things like changing properties (eg: keywords) and deleting the file in the same commit. The deprecated API that the exporter uses can't represent that. Modified: svnadmin/tools/export.py Modified: svnadmin/tools/export.py ============================================================================== --- svnadmin/tools/export.py Tue Aug 11 20:39:10 2009 (r196098) +++ svnadmin/tools/export.py Tue Aug 11 21:18:41 2009 (r196099) @@ -313,7 +313,16 @@ def exportrev(pool, fs_ptr, rev, cvspath failed = do_cvs(workpath, '', "cvs -Rq co %s src" % uptag) assert not failed # at this point, the top directory and /src should exist - #print p, path, k + print p, path, k + # hacks + #if p == 'head/contrib/file/FREEBSD-upgrade' and k == 'A': + # continue + #if p == 'head/contrib/file/magic2mime' and k == 'A': + # continue + #if p == 'head/lib/libc/stdio/asprintf.c' and k == 'D': + # continue + if p == 'head/tools/build/options/WITH_BIND_LIBS' and k == 'A' and rev == 193280: + continue makedirs(workpath, _dirname(path), 'src') # Now the directory for the files must exist, and branch tag will be sticky assert os.path.isdir(os.path.join(workpath, _dirname(path))) @@ -352,6 +361,7 @@ def export(pool, repos_path, cvspath): curr_rev = fs.youngest_rev(fs_ptr) last_rev = int(fs.revision_prop(fs_ptr, 0, 'fbsd:lastexp')) if last_rev < curr_rev: + time.sleep(5) print '%d %s' % (last_rev, curr_rev) rev = '%d' % (last_rev + 1) print '==========> export rev ' + rev From peter at FreeBSD.org Tue Aug 11 21:21:20 2009 From: peter at FreeBSD.org (Peter Wemm) Date: Tue Aug 11 21:21:28 2009 Subject: svn commit: r196100 - svnadmin/tools Message-ID: <200908112121.n7BLLK34042139@svn.freebsd.org> Author: peter Date: Tue Aug 11 21:21:20 2009 New Revision: 196100 URL: http://svn.freebsd.org/changeset/base/196100 Log: Clone export.py before splitting into two parts. Added: svnadmin/tools/export1.py - copied unchanged from r196099, svnadmin/tools/export.py svnadmin/tools/export2.py - copied unchanged from r196099, svnadmin/tools/export.py Copied: svnadmin/tools/export1.py (from r196099, svnadmin/tools/export.py) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ svnadmin/tools/export1.py Tue Aug 11 21:21:20 2009 (r196100, copy of r196099, svnadmin/tools/export.py) @@ -0,0 +1,381 @@ +#!/usr/local/bin/python + +# $FreeBSD$ + +import string +import sys +import time +import os +import popen2 +import tempfile +from svn import core, fs, delta, repos + +do_keywords = False + +# SVN's API structure is to do callbacks to a class to get notifications +class ChangeReceiver(delta.Editor): + def __init__(self, fs_root, base_root, rev, fs_ptr, pool, do_kw): + self.fs_root = fs_root + self.base_root = base_root + self.fs_ptr = fs_ptr + self.rev = int(rev) + self.pool = pool + self.do_kw = do_kw + self.changes = [] + + def delete_entry(self, path, revision, parent_baton, pool): + self.changes.append(['D', path]) + + def add_file(self, path, parent_baton, + copyfrom_path, copyfrom_revision, file_pool): + self.changes.append(['A', path]) + return [ '_', ' ', None ] + + def open_file(self, path, parent_baton, base_revision, file_pool): + return [ '_', ' ', path ] + + def apply_textdelta(self, file_baton, base_checksum): + text_mod, prop_mod, path = file_baton + file_baton[0] = 'U' + # no handler + return None + + def change_file_prop(self, file_baton, name, value, pool): + text_mod, prop_mod, path = file_baton + if self.do_kw and name == core.SVN_PROP_KEYWORDS: + file_baton[1] = 'U' + + def close_file(self, file_baton, text_checksum): + text_mod, prop_mod, path = file_baton + # test the path. it will be None if we added this file. + if path: + status = text_mod + prop_mod + # was there some kind of change? + if status != '_ ': + self.changes.append(['U', path]) + +# Last path component +def _basename(path): + idx = path.rfind('/') + if idx == -1: + return path + return path[idx+1:] + +# Directory component +def _dirname(path): + idx = path.rfind('/') + if idx == -1: + return '' + return path[:idx] + +# Keep track of best common prefix per directory group to keep commit time down +class pathcollector(): + def __init__(self): + self.paths = {} + + # Not really a set.. calculates common prefix instead. + def __setitem__(self, prefix, dir): + # If we haven't seen a dir, start here + if not self.paths.has_key(prefix): + self.paths[prefix] = dir + return + # If it is the same dir, we're finished + if self.paths[prefix] == dir: + return + # See if we've found a common parent + parent = dir + while _dirname(parent) != parent: + parent = _dirname(parent) + # See if common prefix works + if self.paths[prefix] == parent: + return + # Raise common prefix + if self.paths[prefix].startswith(parent): + self.paths[prefix] = parent + return + print "WTF?" + assert false + + def __iter__(self): + return self.paths.iteritems() + +# Issue a cvs command, aborting if a problem happens +def do_cvs(cvspath, dir, cmd): + ioerror = False + print("cvs path %s, dir %s, cmd %s" % (cvspath, dir, cmd)) + cwd = os.getcwd() + os.chdir(os.path.join(cvspath, dir)) + pipe = popen2.Popen3(cmd) + os.chdir(cwd) + output = '' + try: + output = pipe.fromchild.readlines() + pipe.fromchild.close() + pipe.tochild.close() + except IOError: + ioerror = True + rv = pipe.wait() + failed = (rv != 0) or ioerror + print 'Cvs output: ', output + return failed + +# Dump a file from svn into cvs. This has to apply the delta to the previous rev. +def dump_file(fs_ptr, fs_root, rev, svnpath, cvspath, author, date, pool, workpath): + if do_keywords: + kw = fs.node_prop(fs_root, svnpath, core.SVN_PROP_KEYWORDS) + if not kw: + kw = '' + str = '$' + 'FreeBSD: %s %s %s %s $' % (cvspath, rev, date, author) + #str = '$' + 'FreeBSDId: %s %s %s %s $' % (cvspath, rev, date, author) + + subpool = core.svn_pool_create(pool) + stream = core.Stream(fs.file_contents(fs_root, svnpath, subpool)) + str_list = [] + while 1: + data = stream.read(core.SVN_STREAM_CHUNK_SIZE) + str_list.append(data) + if len(data) < core.SVN_STREAM_CHUNK_SIZE: + break + string = ''.join(str_list) + # Expand keywords + if do_keywords: + if kw == r'FreeBSD=%H': + old = '$' + 'FreeBSD$' + string = string.replace(old, str) + cvsfile = os.path.join(workpath, cvspath) +# sys.stdout.write('File contents:\n=========\n') +# sys.stdout.write(string) +# sys.stdout.write('=========\n') + executable = fs.node_prop(fs_root, svnpath, core.SVN_PROP_EXECUTABLE) + if executable: + mode = 0777 + else: + mode = 0666 + outfile = os.open(cvsfile, os.O_CREAT | os.O_TRUNC | os.O_WRONLY, mode) + if not outfile: + sys.exit('cannot open %s for write' % cvsfile) + n = os.write(outfile, string) + if n != len(string): + sys.exit('short write. %d instead of %d' % (n, len(string))) + os.close(outfile) + core.svn_pool_destroy(subpool) + +# List of paths we export to cvs, and what branch tag (or None for HEAD) +# Hard coded for now. This will be automatically implied based on path transforms. +maptable = [ + # -current head + ( 'head/', None ), + # -stable branches + ( 'stable/2.0.5/', 'RELENG_2_0_5' ), + ( 'stable/2.1/', 'RELENG_2_1_0' ), + ( 'stable/2.2/', 'RELENG_2_2' ), + ( 'stable/3/', 'RELENG_3' ), + ( 'stable/4/', 'RELENG_4' ), + ( 'stable/5/', 'RELENG_5' ), + ( 'stable/6/', 'RELENG_6' ), + ( 'stable/7/', 'RELENG_7' ), + # errata / security / releng branches + ( 'releng/ALPHA_2_0/','ALPHA_2_0' ), + ( 'releng/BETA_2_0/', 'BETA_2_0' ), + ( 'releng/4.3/', 'RELENG_4_3' ), + ( 'releng/4.4/', 'RELENG_4_4' ), + ( 'releng/4.5/', 'RELENG_4_5' ), + ( 'releng/4.6/', 'RELENG_4_6' ), + ( 'releng/4.7/', 'RELENG_4_7' ), + ( 'releng/4.8/', 'RELENG_4_8' ), + ( 'releng/4.9/', 'RELENG_4_9' ), + ( 'releng/4.10/', 'RELENG_4_10' ), + ( 'releng/4.11/', 'RELENG_4_11' ), + ( 'releng/4.12/', 'RELENG_4_12' ), + ( 'releng/5.0/', 'RELENG_5_0' ), + ( 'releng/5.1/', 'RELENG_5_1' ), + ( 'releng/5.2/', 'RELENG_5_2' ), + ( 'releng/5.3/', 'RELENG_5_3' ), + ( 'releng/5.4/', 'RELENG_5_4' ), + ( 'releng/5.5/', 'RELENG_5_5' ), + ( 'releng/5.6/', 'RELENG_5_6' ), + ( 'releng/6.0/', 'RELENG_6_0' ), + ( 'releng/6.1/', 'RELENG_6_1' ), + ( 'releng/6.2/', 'RELENG_6_2' ), + ( 'releng/6.3/', 'RELENG_6_3' ), + ( 'releng/6.4/', 'RELENG_6_4' ), + ( 'releng/7.0/', 'RELENG_7_0' ), + ( 'releng/7.1/', 'RELENG_7_1' ), + ( 'releng/7.2/', 'RELENG_7_2' ), +] + +def map2cvs(svnpath): + for prefix, branch in maptable: + plen = len(prefix) + if svnpath.startswith(prefix): + return 'src/' + svnpath[plen:], branch + return None, None + +# List of special remap cases. +roottable = [ + ( 'svnadmin/conf/access', 'CVSROOT/access', 'CVSROOT' ), + ( 'svnadmin/conf/mentors', 'CVSROOT/mentors', 'CVSROOT' ), +] + +def maproot(p): + for svnpath, path, dir in roottable: + if p == svnpath: + return path, dir + return None, None + +# Add intermediate directories to the cvs checkout area as needed. +# XXX should use 'cvs update -d -l' if the dir exists in cvsroot +def makedirs(cvspath, path, base): + #print 'Makedirs:', cvspath, path + if not path.startswith(base): + sys.exit('Illegal path %s' % path) + if path == base: + return + makedirs(cvspath, _dirname(path), base) + fullpath = os.path.join(cvspath, path) + if os.path.isfile(fullpath): + sys.exit('Dest dir is a file' % path) + if not os.path.isdir(fullpath): + try: + #print "Making directory " + fullpath + os.makedirs(fullpath) + failed = do_cvs(cvspath, _dirname(path), "cvs -q add %s" % _basename(path)) + assert not failed + except OSError: + sys.exit('Cannot mkdir %s' % path) + #print 'Dirpath complete: ' + path + +# Export a single change to cvs. +def exportrev(pool, fs_ptr, rev, cvspath): + def authz_cb(root, path, pool): + return True + + subpool = core.svn_pool_create(pool) + # Connect up to the revision + fs_root = fs.revision_root(fs_ptr, rev, subpool) + base_root = fs.revision_root(fs_ptr, rev - 1, subpool) + editor = ChangeReceiver(fs_root, base_root, rev, fs_ptr, subpool, do_keywords) + e_ptr, e_baton = delta.make_editor(editor, subpool) + repos.dir_delta(base_root, '', '', fs_root, '', e_ptr, e_baton, authz_cb, 0, 1, 0, 0, subpool) + + # Author + author = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_AUTHOR) + if not author: + author = 'NoAuthor' + if author == 'davidg': + author = 'dg' + os.environ['CVS_AUTHOR'] = author + print 'Author: ' + author + + # Date + date = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_DATE) + if date: + aprtime = core.svn_time_from_cstring(date) + secs = aprtime / 1000000 # aprtime is microseconds; make seconds + tm = time.gmtime(secs) + date = time.strftime('%Y-%m-%d %H:%M:%SZ', tm) + os.environ['CVS_TIMESTAMP'] = "%d" % secs + else: + date = 'NoDate' + if os.environ.has_key('CVS_TIMESTAMP'): + del os.environ['CVS_TIMESTAMP'] + + # Build log message to export + cvslog = 'SVN rev %d on %s by %s\n' % (rev, date, author) + svnlog = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_LOG) + if svnlog: + cvslog += '\n' + svnlog + + pc = pathcollector() + + for k, p in editor.changes: + #print 'Path ', p + # Hack, hack + (path, dir) = maproot(p) + if path: + workpath = cvspath + dump_file(fs_ptr, fs_root, rev, p, path, author, date, subpool, workpath) + pc[workpath] = dir + continue + (path, tag) = map2cvs(p) + if not path: + continue + if tag: + workpath = os.path.join(cvspath, tag) + uptag = '-r ' + tag + else: + workpath = cvspath + uptag = '-A' + #print workpath + if not os.path.isdir(workpath): + os.makedirs(workpath) + if not os.path.isdir(os.path.join(workpath, 'src')): + failed = do_cvs(workpath, '', "cvs -Rq co %s src" % uptag) + assert not failed + # at this point, the top directory and /src should exist + print p, path, k + # hacks + #if p == 'head/contrib/file/FREEBSD-upgrade' and k == 'A': + # continue + #if p == 'head/contrib/file/magic2mime' and k == 'A': + # continue + #if p == 'head/lib/libc/stdio/asprintf.c' and k == 'D': + # continue + if p == 'head/tools/build/options/WITH_BIND_LIBS' and k == 'A' and rev == 193280: + continue + makedirs(workpath, _dirname(path), 'src') + # Now the directory for the files must exist, and branch tag will be sticky + assert os.path.isdir(os.path.join(workpath, _dirname(path))) + assert k == 'A' or k == 'U' or k == 'D' + + if k == 'A' or k == 'U': + print 'add/update file ' + path + '.' + destpath = os.path.join(workpath, path) + existed = os.path.isfile(destpath) + dump_file(fs_ptr, fs_root, rev, p, path, author, date, subpool, workpath) + if not existed: + print 'cvs add file ' + path + '.' + failed = do_cvs(workpath, _dirname(path), "cvs -q add %s" % _basename(path)) + assert not failed + elif k == 'D': + print 'cvs rm -f file ' + path + '.' + failed = do_cvs(workpath, _dirname(path), "cvs -q rm -f %s" % _basename(path)) + assert not failed + pc[workpath] = _dirname(path) + + # aggregate the commit + for root, dir in pc: + fd, logfile = tempfile.mkstemp() + os.write(fd, cvslog) + os.close(fd) + failed = do_cvs(root, dir, "cvs -q commit -F %s" % logfile) + assert not failed + os.remove(logfile) + core.svn_pool_destroy(subpool) + +# Loop for the export range +def export(pool, repos_path, cvspath): + repos_path = core.svn_path_canonicalize(repos_path) + fs_ptr = repos.fs(repos.open(repos_path, pool)) + while True: + curr_rev = fs.youngest_rev(fs_ptr) + last_rev = int(fs.revision_prop(fs_ptr, 0, 'fbsd:lastexp')) + if last_rev < curr_rev: + time.sleep(5) + print '%d %s' % (last_rev, curr_rev) + rev = '%d' % (last_rev + 1) + print '==========> export rev ' + rev + exportrev(pool, fs_ptr, last_rev + 1, cvspath) + fs.change_rev_prop(fs_ptr, 0, 'fbsd:lastexp', rev) + continue + print "." + time.sleep(15) + + +if __name__ == '__main__': + print "Version: $FreeBSD$" + os.environ['CVSROOT'] = '/r/ncvs' + core.run_app(export, '/r/svnmirror/base', '/r/svn2cvs/cvs') + # test rig + #os.environ['CVSROOT'] = '/home/peter/exp/cvs' + #core.run_app(export, '/home/peter/exp/svn', '/home/peter/exp/co') Copied: svnadmin/tools/export2.py (from r196099, svnadmin/tools/export.py) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ svnadmin/tools/export2.py Tue Aug 11 21:21:20 2009 (r196100, copy of r196099, svnadmin/tools/export.py) @@ -0,0 +1,381 @@ +#!/usr/local/bin/python + +# $FreeBSD$ + +import string +import sys +import time +import os +import popen2 +import tempfile +from svn import core, fs, delta, repos + +do_keywords = False + +# SVN's API structure is to do callbacks to a class to get notifications +class ChangeReceiver(delta.Editor): + def __init__(self, fs_root, base_root, rev, fs_ptr, pool, do_kw): + self.fs_root = fs_root + self.base_root = base_root + self.fs_ptr = fs_ptr + self.rev = int(rev) + self.pool = pool + self.do_kw = do_kw + self.changes = [] + + def delete_entry(self, path, revision, parent_baton, pool): + self.changes.append(['D', path]) + + def add_file(self, path, parent_baton, + copyfrom_path, copyfrom_revision, file_pool): + self.changes.append(['A', path]) + return [ '_', ' ', None ] + + def open_file(self, path, parent_baton, base_revision, file_pool): + return [ '_', ' ', path ] + + def apply_textdelta(self, file_baton, base_checksum): + text_mod, prop_mod, path = file_baton + file_baton[0] = 'U' + # no handler + return None + + def change_file_prop(self, file_baton, name, value, pool): + text_mod, prop_mod, path = file_baton + if self.do_kw and name == core.SVN_PROP_KEYWORDS: + file_baton[1] = 'U' + + def close_file(self, file_baton, text_checksum): + text_mod, prop_mod, path = file_baton + # test the path. it will be None if we added this file. + if path: + status = text_mod + prop_mod + # was there some kind of change? + if status != '_ ': + self.changes.append(['U', path]) + +# Last path component +def _basename(path): + idx = path.rfind('/') + if idx == -1: + return path + return path[idx+1:] + +# Directory component +def _dirname(path): + idx = path.rfind('/') + if idx == -1: + return '' + return path[:idx] + +# Keep track of best common prefix per directory group to keep commit time down +class pathcollector(): + def __init__(self): + self.paths = {} + + # Not really a set.. calculates common prefix instead. + def __setitem__(self, prefix, dir): + # If we haven't seen a dir, start here + if not self.paths.has_key(prefix): + self.paths[prefix] = dir + return + # If it is the same dir, we're finished + if self.paths[prefix] == dir: + return + # See if we've found a common parent + parent = dir + while _dirname(parent) != parent: + parent = _dirname(parent) + # See if common prefix works + if self.paths[prefix] == parent: + return + # Raise common prefix + if self.paths[prefix].startswith(parent): + self.paths[prefix] = parent + return + print "WTF?" + assert false + + def __iter__(self): + return self.paths.iteritems() + +# Issue a cvs command, aborting if a problem happens +def do_cvs(cvspath, dir, cmd): + ioerror = False + print("cvs path %s, dir %s, cmd %s" % (cvspath, dir, cmd)) + cwd = os.getcwd() + os.chdir(os.path.join(cvspath, dir)) + pipe = popen2.Popen3(cmd) + os.chdir(cwd) + output = '' + try: + output = pipe.fromchild.readlines() + pipe.fromchild.close() + pipe.tochild.close() + except IOError: + ioerror = True + rv = pipe.wait() + failed = (rv != 0) or ioerror + print 'Cvs output: ', output + return failed + +# Dump a file from svn into cvs. This has to apply the delta to the previous rev. +def dump_file(fs_ptr, fs_root, rev, svnpath, cvspath, author, date, pool, workpath): + if do_keywords: + kw = fs.node_prop(fs_root, svnpath, core.SVN_PROP_KEYWORDS) + if not kw: + kw = '' + str = '$' + 'FreeBSD: %s %s %s %s $' % (cvspath, rev, date, author) + #str = '$' + 'FreeBSDId: %s %s %s %s $' % (cvspath, rev, date, author) + + subpool = core.svn_pool_create(pool) + stream = core.Stream(fs.file_contents(fs_root, svnpath, subpool)) + str_list = [] + while 1: + data = stream.read(core.SVN_STREAM_CHUNK_SIZE) + str_list.append(data) + if len(data) < core.SVN_STREAM_CHUNK_SIZE: + break + string = ''.join(str_list) + # Expand keywords + if do_keywords: + if kw == r'FreeBSD=%H': + old = '$' + 'FreeBSD$' + string = string.replace(old, str) + cvsfile = os.path.join(workpath, cvspath) +# sys.stdout.write('File contents:\n=========\n') +# sys.stdout.write(string) +# sys.stdout.write('=========\n') + executable = fs.node_prop(fs_root, svnpath, core.SVN_PROP_EXECUTABLE) + if executable: + mode = 0777 + else: + mode = 0666 + outfile = os.open(cvsfile, os.O_CREAT | os.O_TRUNC | os.O_WRONLY, mode) + if not outfile: + sys.exit('cannot open %s for write' % cvsfile) + n = os.write(outfile, string) + if n != len(string): + sys.exit('short write. %d instead of %d' % (n, len(string))) + os.close(outfile) + core.svn_pool_destroy(subpool) + +# List of paths we export to cvs, and what branch tag (or None for HEAD) +# Hard coded for now. This will be automatically implied based on path transforms. +maptable = [ + # -current head + ( 'head/', None ), + # -stable branches + ( 'stable/2.0.5/', 'RELENG_2_0_5' ), + ( 'stable/2.1/', 'RELENG_2_1_0' ), + ( 'stable/2.2/', 'RELENG_2_2' ), + ( 'stable/3/', 'RELENG_3' ), + ( 'stable/4/', 'RELENG_4' ), + ( 'stable/5/', 'RELENG_5' ), + ( 'stable/6/', 'RELENG_6' ), + ( 'stable/7/', 'RELENG_7' ), + # errata / security / releng branches + ( 'releng/ALPHA_2_0/','ALPHA_2_0' ), + ( 'releng/BETA_2_0/', 'BETA_2_0' ), + ( 'releng/4.3/', 'RELENG_4_3' ), + ( 'releng/4.4/', 'RELENG_4_4' ), + ( 'releng/4.5/', 'RELENG_4_5' ), + ( 'releng/4.6/', 'RELENG_4_6' ), + ( 'releng/4.7/', 'RELENG_4_7' ), + ( 'releng/4.8/', 'RELENG_4_8' ), + ( 'releng/4.9/', 'RELENG_4_9' ), + ( 'releng/4.10/', 'RELENG_4_10' ), + ( 'releng/4.11/', 'RELENG_4_11' ), + ( 'releng/4.12/', 'RELENG_4_12' ), + ( 'releng/5.0/', 'RELENG_5_0' ), + ( 'releng/5.1/', 'RELENG_5_1' ), + ( 'releng/5.2/', 'RELENG_5_2' ), + ( 'releng/5.3/', 'RELENG_5_3' ), + ( 'releng/5.4/', 'RELENG_5_4' ), + ( 'releng/5.5/', 'RELENG_5_5' ), + ( 'releng/5.6/', 'RELENG_5_6' ), + ( 'releng/6.0/', 'RELENG_6_0' ), + ( 'releng/6.1/', 'RELENG_6_1' ), + ( 'releng/6.2/', 'RELENG_6_2' ), + ( 'releng/6.3/', 'RELENG_6_3' ), + ( 'releng/6.4/', 'RELENG_6_4' ), + ( 'releng/7.0/', 'RELENG_7_0' ), + ( 'releng/7.1/', 'RELENG_7_1' ), + ( 'releng/7.2/', 'RELENG_7_2' ), +] + +def map2cvs(svnpath): + for prefix, branch in maptable: + plen = len(prefix) + if svnpath.startswith(prefix): + return 'src/' + svnpath[plen:], branch + return None, None + +# List of special remap cases. +roottable = [ + ( 'svnadmin/conf/access', 'CVSROOT/access', 'CVSROOT' ), + ( 'svnadmin/conf/mentors', 'CVSROOT/mentors', 'CVSROOT' ), +] + +def maproot(p): + for svnpath, path, dir in roottable: + if p == svnpath: + return path, dir + return None, None + +# Add intermediate directories to the cvs checkout area as needed. +# XXX should use 'cvs update -d -l' if the dir exists in cvsroot +def makedirs(cvspath, path, base): + #print 'Makedirs:', cvspath, path + if not path.startswith(base): + sys.exit('Illegal path %s' % path) + if path == base: + return + makedirs(cvspath, _dirname(path), base) + fullpath = os.path.join(cvspath, path) + if os.path.isfile(fullpath): + sys.exit('Dest dir is a file' % path) + if not os.path.isdir(fullpath): + try: + #print "Making directory " + fullpath + os.makedirs(fullpath) + failed = do_cvs(cvspath, _dirname(path), "cvs -q add %s" % _basename(path)) + assert not failed + except OSError: + sys.exit('Cannot mkdir %s' % path) + #print 'Dirpath complete: ' + path + +# Export a single change to cvs. +def exportrev(pool, fs_ptr, rev, cvspath): + def authz_cb(root, path, pool): + return True + + subpool = core.svn_pool_create(pool) + # Connect up to the revision + fs_root = fs.revision_root(fs_ptr, rev, subpool) + base_root = fs.revision_root(fs_ptr, rev - 1, subpool) + editor = ChangeReceiver(fs_root, base_root, rev, fs_ptr, subpool, do_keywords) + e_ptr, e_baton = delta.make_editor(editor, subpool) + repos.dir_delta(base_root, '', '', fs_root, '', e_ptr, e_baton, authz_cb, 0, 1, 0, 0, subpool) + + # Author + author = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_AUTHOR) + if not author: + author = 'NoAuthor' + if author == 'davidg': + author = 'dg' + os.environ['CVS_AUTHOR'] = author + print 'Author: ' + author + + # Date + date = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_DATE) + if date: + aprtime = core.svn_time_from_cstring(date) + secs = aprtime / 1000000 # aprtime is microseconds; make seconds + tm = time.gmtime(secs) + date = time.strftime('%Y-%m-%d %H:%M:%SZ', tm) + os.environ['CVS_TIMESTAMP'] = "%d" % secs + else: + date = 'NoDate' + if os.environ.has_key('CVS_TIMESTAMP'): + del os.environ['CVS_TIMESTAMP'] + + # Build log message to export + cvslog = 'SVN rev %d on %s by %s\n' % (rev, date, author) + svnlog = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_LOG) + if svnlog: + cvslog += '\n' + svnlog + + pc = pathcollector() + + for k, p in editor.changes: + #print 'Path ', p + # Hack, hack + (path, dir) = maproot(p) + if path: + workpath = cvspath + dump_file(fs_ptr, fs_root, rev, p, path, author, date, subpool, workpath) + pc[workpath] = dir + continue + (path, tag) = map2cvs(p) + if not path: + continue + if tag: + workpath = os.path.join(cvspath, tag) + uptag = '-r ' + tag + else: + workpath = cvspath + uptag = '-A' + #print workpath + if not os.path.isdir(workpath): + os.makedirs(workpath) + if not os.path.isdir(os.path.join(workpath, 'src')): + failed = do_cvs(workpath, '', "cvs -Rq co %s src" % uptag) + assert not failed + # at this point, the top directory and /src should exist + print p, path, k + # hacks + #if p == 'head/contrib/file/FREEBSD-upgrade' and k == 'A': + # continue + #if p == 'head/contrib/file/magic2mime' and k == 'A': + # continue + #if p == 'head/lib/libc/stdio/asprintf.c' and k == 'D': + # continue + if p == 'head/tools/build/options/WITH_BIND_LIBS' and k == 'A' and rev == 193280: + continue + makedirs(workpath, _dirname(path), 'src') + # Now the directory for the files must exist, and branch tag will be sticky + assert os.path.isdir(os.path.join(workpath, _dirname(path))) + assert k == 'A' or k == 'U' or k == 'D' + + if k == 'A' or k == 'U': + print 'add/update file ' + path + '.' + destpath = os.path.join(workpath, path) + existed = os.path.isfile(destpath) + dump_file(fs_ptr, fs_root, rev, p, path, author, date, subpool, workpath) + if not existed: + print 'cvs add file ' + path + '.' + failed = do_cvs(workpath, _dirname(path), "cvs -q add %s" % _basename(path)) + assert not failed + elif k == 'D': + print 'cvs rm -f file ' + path + '.' + failed = do_cvs(workpath, _dirname(path), "cvs -q rm -f %s" % _basename(path)) + assert not failed + pc[workpath] = _dirname(path) + + # aggregate the commit + for root, dir in pc: + fd, logfile = tempfile.mkstemp() + os.write(fd, cvslog) + os.close(fd) + failed = do_cvs(root, dir, "cvs -q commit -F %s" % logfile) + assert not failed + os.remove(logfile) + core.svn_pool_destroy(subpool) + +# Loop for the export range +def export(pool, repos_path, cvspath): + repos_path = core.svn_path_canonicalize(repos_path) + fs_ptr = repos.fs(repos.open(repos_path, pool)) + while True: + curr_rev = fs.youngest_rev(fs_ptr) + last_rev = int(fs.revision_prop(fs_ptr, 0, 'fbsd:lastexp')) + if last_rev < curr_rev: + time.sleep(5) + print '%d %s' % (last_rev, curr_rev) + rev = '%d' % (last_rev + 1) + print '==========> export rev ' + rev + exportrev(pool, fs_ptr, last_rev + 1, cvspath) + fs.change_rev_prop(fs_ptr, 0, 'fbsd:lastexp', rev) + continue + print "." + time.sleep(15) + + +if __name__ == '__main__': + print "Version: $FreeBSD$" + os.environ['CVSROOT'] = '/r/ncvs' + core.run_app(export, '/r/svnmirror/base', '/r/svn2cvs/cvs') + # test rig + #os.environ['CVSROOT'] = '/home/peter/exp/cvs' + #core.run_app(export, '/home/peter/exp/svn', '/home/peter/exp/co') From peter at FreeBSD.org Tue Aug 11 21:23:32 2009 From: peter at FreeBSD.org (Peter Wemm) Date: Tue Aug 11 21:23:44 2009 Subject: svn commit: r196101 - svnadmin/tools Message-ID: <200908112123.n7BLNVhj042230@svn.freebsd.org> Author: peter Date: Tue Aug 11 21:23:31 2009 New Revision: 196101 URL: http://svn.freebsd.org/changeset/base/196101 Log: WIP: split exporter into two halves, persistent driver that tracks the repository, and a backend that exports a single rev. Modified: svnadmin/tools/export1.py svnadmin/tools/export2.py Modified: svnadmin/tools/export1.py ============================================================================== --- svnadmin/tools/export1.py Tue Aug 11 21:21:20 2009 (r196100) +++ svnadmin/tools/export1.py Tue Aug 11 21:23:31 2009 (r196101) @@ -10,103 +10,10 @@ import popen2 import tempfile from svn import core, fs, delta, repos -do_keywords = False - -# SVN's API structure is to do callbacks to a class to get notifications -class ChangeReceiver(delta.Editor): - def __init__(self, fs_root, base_root, rev, fs_ptr, pool, do_kw): - self.fs_root = fs_root - self.base_root = base_root - self.fs_ptr = fs_ptr - self.rev = int(rev) - self.pool = pool - self.do_kw = do_kw - self.changes = [] - - def delete_entry(self, path, revision, parent_baton, pool): - self.changes.append(['D', path]) - - def add_file(self, path, parent_baton, - copyfrom_path, copyfrom_revision, file_pool): - self.changes.append(['A', path]) - return [ '_', ' ', None ] - - def open_file(self, path, parent_baton, base_revision, file_pool): - return [ '_', ' ', path ] - - def apply_textdelta(self, file_baton, base_checksum): - text_mod, prop_mod, path = file_baton - file_baton[0] = 'U' - # no handler - return None - - def change_file_prop(self, file_baton, name, value, pool): - text_mod, prop_mod, path = file_baton - if self.do_kw and name == core.SVN_PROP_KEYWORDS: - file_baton[1] = 'U' - - def close_file(self, file_baton, text_checksum): - text_mod, prop_mod, path = file_baton - # test the path. it will be None if we added this file. - if path: - status = text_mod + prop_mod - # was there some kind of change? - if status != '_ ': - self.changes.append(['U', path]) - -# Last path component -def _basename(path): - idx = path.rfind('/') - if idx == -1: - return path - return path[idx+1:] - -# Directory component -def _dirname(path): - idx = path.rfind('/') - if idx == -1: - return '' - return path[:idx] - -# Keep track of best common prefix per directory group to keep commit time down -class pathcollector(): - def __init__(self): - self.paths = {} - - # Not really a set.. calculates common prefix instead. - def __setitem__(self, prefix, dir): - # If we haven't seen a dir, start here - if not self.paths.has_key(prefix): - self.paths[prefix] = dir - return - # If it is the same dir, we're finished - if self.paths[prefix] == dir: - return - # See if we've found a common parent - parent = dir - while _dirname(parent) != parent: - parent = _dirname(parent) - # See if common prefix works - if self.paths[prefix] == parent: - return - # Raise common prefix - if self.paths[prefix].startswith(parent): - self.paths[prefix] = parent - return - print "WTF?" - assert false - - def __iter__(self): - return self.paths.iteritems() - -# Issue a cvs command, aborting if a problem happens -def do_cvs(cvspath, dir, cmd): +# Issue an export command, aborting if a problem happens +def do_export(cmd): ioerror = False - print("cvs path %s, dir %s, cmd %s" % (cvspath, dir, cmd)) - cwd = os.getcwd() - os.chdir(os.path.join(cvspath, dir)) pipe = popen2.Popen3(cmd) - os.chdir(cwd) output = '' try: output = pipe.fromchild.readlines() @@ -116,256 +23,24 @@ def do_cvs(cvspath, dir, cmd): ioerror = True rv = pipe.wait() failed = (rv != 0) or ioerror - print 'Cvs output: ', output + print 'export2 output: ', output return failed # Dump a file from svn into cvs. This has to apply the delta to the previous rev. -def dump_file(fs_ptr, fs_root, rev, svnpath, cvspath, author, date, pool, workpath): - if do_keywords: - kw = fs.node_prop(fs_root, svnpath, core.SVN_PROP_KEYWORDS) - if not kw: - kw = '' - str = '$' + 'FreeBSD: %s %s %s %s $' % (cvspath, rev, date, author) - #str = '$' + 'FreeBSDId: %s %s %s %s $' % (cvspath, rev, date, author) - - subpool = core.svn_pool_create(pool) - stream = core.Stream(fs.file_contents(fs_root, svnpath, subpool)) - str_list = [] - while 1: - data = stream.read(core.SVN_STREAM_CHUNK_SIZE) - str_list.append(data) - if len(data) < core.SVN_STREAM_CHUNK_SIZE: - break - string = ''.join(str_list) - # Expand keywords - if do_keywords: - if kw == r'FreeBSD=%H': - old = '$' + 'FreeBSD$' - string = string.replace(old, str) - cvsfile = os.path.join(workpath, cvspath) -# sys.stdout.write('File contents:\n=========\n') -# sys.stdout.write(string) -# sys.stdout.write('=========\n') - executable = fs.node_prop(fs_root, svnpath, core.SVN_PROP_EXECUTABLE) - if executable: - mode = 0777 - else: - mode = 0666 - outfile = os.open(cvsfile, os.O_CREAT | os.O_TRUNC | os.O_WRONLY, mode) - if not outfile: - sys.exit('cannot open %s for write' % cvsfile) - n = os.write(outfile, string) - if n != len(string): - sys.exit('short write. %d instead of %d' % (n, len(string))) - os.close(outfile) - core.svn_pool_destroy(subpool) - -# List of paths we export to cvs, and what branch tag (or None for HEAD) -# Hard coded for now. This will be automatically implied based on path transforms. -maptable = [ - # -current head - ( 'head/', None ), - # -stable branches - ( 'stable/2.0.5/', 'RELENG_2_0_5' ), - ( 'stable/2.1/', 'RELENG_2_1_0' ), - ( 'stable/2.2/', 'RELENG_2_2' ), - ( 'stable/3/', 'RELENG_3' ), - ( 'stable/4/', 'RELENG_4' ), - ( 'stable/5/', 'RELENG_5' ), - ( 'stable/6/', 'RELENG_6' ), - ( 'stable/7/', 'RELENG_7' ), - # errata / security / releng branches - ( 'releng/ALPHA_2_0/','ALPHA_2_0' ), - ( 'releng/BETA_2_0/', 'BETA_2_0' ), - ( 'releng/4.3/', 'RELENG_4_3' ), - ( 'releng/4.4/', 'RELENG_4_4' ), - ( 'releng/4.5/', 'RELENG_4_5' ), - ( 'releng/4.6/', 'RELENG_4_6' ), - ( 'releng/4.7/', 'RELENG_4_7' ), - ( 'releng/4.8/', 'RELENG_4_8' ), - ( 'releng/4.9/', 'RELENG_4_9' ), - ( 'releng/4.10/', 'RELENG_4_10' ), - ( 'releng/4.11/', 'RELENG_4_11' ), - ( 'releng/4.12/', 'RELENG_4_12' ), - ( 'releng/5.0/', 'RELENG_5_0' ), - ( 'releng/5.1/', 'RELENG_5_1' ), - ( 'releng/5.2/', 'RELENG_5_2' ), - ( 'releng/5.3/', 'RELENG_5_3' ), - ( 'releng/5.4/', 'RELENG_5_4' ), - ( 'releng/5.5/', 'RELENG_5_5' ), - ( 'releng/5.6/', 'RELENG_5_6' ), - ( 'releng/6.0/', 'RELENG_6_0' ), - ( 'releng/6.1/', 'RELENG_6_1' ), - ( 'releng/6.2/', 'RELENG_6_2' ), - ( 'releng/6.3/', 'RELENG_6_3' ), - ( 'releng/6.4/', 'RELENG_6_4' ), - ( 'releng/7.0/', 'RELENG_7_0' ), - ( 'releng/7.1/', 'RELENG_7_1' ), - ( 'releng/7.2/', 'RELENG_7_2' ), -] - -def map2cvs(svnpath): - for prefix, branch in maptable: - plen = len(prefix) - if svnpath.startswith(prefix): - return 'src/' + svnpath[plen:], branch - return None, None - -# List of special remap cases. -roottable = [ - ( 'svnadmin/conf/access', 'CVSROOT/access', 'CVSROOT' ), - ( 'svnadmin/conf/mentors', 'CVSROOT/mentors', 'CVSROOT' ), -] - -def maproot(p): - for svnpath, path, dir in roottable: - if p == svnpath: - return path, dir - return None, None - -# Add intermediate directories to the cvs checkout area as needed. -# XXX should use 'cvs update -d -l' if the dir exists in cvsroot -def makedirs(cvspath, path, base): - #print 'Makedirs:', cvspath, path - if not path.startswith(base): - sys.exit('Illegal path %s' % path) - if path == base: - return - makedirs(cvspath, _dirname(path), base) - fullpath = os.path.join(cvspath, path) - if os.path.isfile(fullpath): - sys.exit('Dest dir is a file' % path) - if not os.path.isdir(fullpath): - try: - #print "Making directory " + fullpath - os.makedirs(fullpath) - failed = do_cvs(cvspath, _dirname(path), "cvs -q add %s" % _basename(path)) - assert not failed - except OSError: - sys.exit('Cannot mkdir %s' % path) - #print 'Dirpath complete: ' + path - -# Export a single change to cvs. -def exportrev(pool, fs_ptr, rev, cvspath): - def authz_cb(root, path, pool): - return True - - subpool = core.svn_pool_create(pool) - # Connect up to the revision - fs_root = fs.revision_root(fs_ptr, rev, subpool) - base_root = fs.revision_root(fs_ptr, rev - 1, subpool) - editor = ChangeReceiver(fs_root, base_root, rev, fs_ptr, subpool, do_keywords) - e_ptr, e_baton = delta.make_editor(editor, subpool) - repos.dir_delta(base_root, '', '', fs_root, '', e_ptr, e_baton, authz_cb, 0, 1, 0, 0, subpool) - - # Author - author = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_AUTHOR) - if not author: - author = 'NoAuthor' - if author == 'davidg': - author = 'dg' - os.environ['CVS_AUTHOR'] = author - print 'Author: ' + author - - # Date - date = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_DATE) - if date: - aprtime = core.svn_time_from_cstring(date) - secs = aprtime / 1000000 # aprtime is microseconds; make seconds - tm = time.gmtime(secs) - date = time.strftime('%Y-%m-%d %H:%M:%SZ', tm) - os.environ['CVS_TIMESTAMP'] = "%d" % secs - else: - date = 'NoDate' - if os.environ.has_key('CVS_TIMESTAMP'): - del os.environ['CVS_TIMESTAMP'] - - # Build log message to export - cvslog = 'SVN rev %d on %s by %s\n' % (rev, date, author) - svnlog = fs.revision_prop(fs_ptr, rev, core.SVN_PROP_REVISION_LOG) - if svnlog: - cvslog += '\n' + svnlog - - pc = pathcollector() - - for k, p in editor.changes: - #print 'Path ', p - # Hack, hack - (path, dir) = maproot(p) - if path: - workpath = cvspath - dump_file(fs_ptr, fs_root, rev, p, path, author, date, subpool, workpath) - pc[workpath] = dir - continue - (path, tag) = map2cvs(p) - if not path: - continue - if tag: - workpath = os.path.join(cvspath, tag) - uptag = '-r ' + tag - else: - workpath = cvspath - uptag = '-A' - #print workpath - if not os.path.isdir(workpath): - os.makedirs(workpath) - if not os.path.isdir(os.path.join(workpath, 'src')): - failed = do_cvs(workpath, '', "cvs -Rq co %s src" % uptag) - assert not failed - # at this point, the top directory and /src should exist - print p, path, k - # hacks - #if p == 'head/contrib/file/FREEBSD-upgrade' and k == 'A': - # continue - #if p == 'head/contrib/file/magic2mime' and k == 'A': - # continue - #if p == 'head/lib/libc/stdio/asprintf.c' and k == 'D': - # continue - if p == 'head/tools/build/options/WITH_BIND_LIBS' and k == 'A' and rev == 193280: - continue - makedirs(workpath, _dirname(path), 'src') - # Now the directory for the files must exist, and branch tag will be sticky - assert os.path.isdir(os.path.join(workpath, _dirname(path))) - assert k == 'A' or k == 'U' or k == 'D' - - if k == 'A' or k == 'U': - print 'add/update file ' + path + '.' - destpath = os.path.join(workpath, path) - existed = os.path.isfile(destpath) - dump_file(fs_ptr, fs_root, rev, p, path, author, date, subpool, workpath) - if not existed: - print 'cvs add file ' + path + '.' - failed = do_cvs(workpath, _dirname(path), "cvs -q add %s" % _basename(path)) - assert not failed - elif k == 'D': - print 'cvs rm -f file ' + path + '.' - failed = do_cvs(workpath, _dirname(path), "cvs -q rm -f %s" % _basename(path)) - assert not failed - pc[workpath] = _dirname(path) - - # aggregate the commit - for root, dir in pc: - fd, logfile = tempfile.mkstemp() - os.write(fd, cvslog) - os.close(fd) - failed = do_cvs(root, dir, "cvs -q commit -F %s" % logfile) - assert not failed - os.remove(logfile) - core.svn_pool_destroy(subpool) - # Loop for the export range -def export(pool, repos_path, cvspath): +def export(pool, repos_path, cvspath, cvsroot): repos_path = core.svn_path_canonicalize(repos_path) fs_ptr = repos.fs(repos.open(repos_path, pool)) while True: curr_rev = fs.youngest_rev(fs_ptr) last_rev = int(fs.revision_prop(fs_ptr, 0, 'fbsd:lastexp')) if last_rev < curr_rev: - time.sleep(5) print '%d %s' % (last_rev, curr_rev) rev = '%d' % (last_rev + 1) print '==========> export rev ' + rev - exportrev(pool, fs_ptr, last_rev + 1, cvspath) + cmd = './export2.py %s %s %d %s' % (repos_path, cvspath, last_rev + 1, cvsroot) + failed = do_export(cmd) + assert not failed fs.change_rev_prop(fs_ptr, 0, 'fbsd:lastexp', rev) continue print "." @@ -374,8 +49,4 @@ def export(pool, repos_path, cvspath): if __name__ == '__main__': print "Version: $FreeBSD$" - os.environ['CVSROOT'] = '/r/ncvs' - core.run_app(export, '/r/svnmirror/base', '/r/svn2cvs/cvs') - # test rig - #os.environ['CVSROOT'] = '/home/peter/exp/cvs' - #core.run_app(export, '/home/peter/exp/svn', '/home/peter/exp/co') + core.run_app(export, '/r/svnmirror/base', '/r/svn2cvs/cvs', '/r/ncvs') Modified: svnadmin/tools/export2.py ============================================================================== --- svnadmin/tools/export2.py Tue Aug 11 21:21:20 2009 (r196100) +++ svnadmin/tools/export2.py Tue Aug 11 21:23:31 2009 (r196101) @@ -354,28 +354,14 @@ def exportrev(pool, fs_ptr, rev, cvspath core.svn_pool_destroy(subpool) # Loop for the export range -def export(pool, repos_path, cvspath): +def export(pool, repos_path, cvspath, rev): repos_path = core.svn_path_canonicalize(repos_path) fs_ptr = repos.fs(repos.open(repos_path, pool)) - while True: - curr_rev = fs.youngest_rev(fs_ptr) - last_rev = int(fs.revision_prop(fs_ptr, 0, 'fbsd:lastexp')) - if last_rev < curr_rev: - time.sleep(5) - print '%d %s' % (last_rev, curr_rev) - rev = '%d' % (last_rev + 1) - print '==========> export rev ' + rev - exportrev(pool, fs_ptr, last_rev + 1, cvspath) - fs.change_rev_prop(fs_ptr, 0, 'fbsd:lastexp', rev) - continue - print "." - time.sleep(15) - + print '==========> export rev ' + rev + exportrev(pool, fs_ptr, rev, cvspath) if __name__ == '__main__': print "Version: $FreeBSD$" - os.environ['CVSROOT'] = '/r/ncvs' - core.run_app(export, '/r/svnmirror/base', '/r/svn2cvs/cvs') - # test rig - #os.environ['CVSROOT'] = '/home/peter/exp/cvs' - #core.run_app(export, '/home/peter/exp/svn', '/home/peter/exp/co') + assert len(sys.argv) == 5 + os.environ['CVSROOT'] = sys.argv[4] + core.run_app(export, sys.argv[1], sys.argv[2], int(sys.argv[3])) From peter at FreeBSD.org Tue Aug 11 21:28:27 2009 From: peter at FreeBSD.org (Peter Wemm) Date: Tue Aug 11 21:28:38 2009 Subject: svn commit: r196102 - svnadmin/tools Message-ID: <200908112128.n7BLSQLG042358@svn.freebsd.org> Author: peter Date: Tue Aug 11 21:28:26 2009 New Revision: 196102 URL: http://svn.freebsd.org/changeset/base/196102 Log: Add a usage string. Modified: svnadmin/tools/export2.py Modified: svnadmin/tools/export2.py ============================================================================== --- svnadmin/tools/export2.py Tue Aug 11 21:23:31 2009 (r196101) +++ svnadmin/tools/export2.py Tue Aug 11 21:28:26 2009 (r196102) @@ -360,6 +360,10 @@ def export(pool, repos_path, cvspath, re print '==========> export rev ' + rev exportrev(pool, fs_ptr, rev, cvspath) +# +# Invoke: export2.py /r/svnmirror/base /r/svn2cvs/cvs 12345 /r/ncvs +# svn repo cvs checkout rev cvsroot +# if __name__ == '__main__': print "Version: $FreeBSD$" assert len(sys.argv) == 5 From peter at FreeBSD.org Tue Aug 11 21:41:22 2009 From: peter at FreeBSD.org (Peter Wemm) Date: Tue Aug 11 21:41:33 2009 Subject: svn commit: r196104 - svnadmin/tools Message-ID: <200908112141.n7BLfLFe042714@svn.freebsd.org> Author: peter Date: Tue Aug 11 21:41:21 2009 New Revision: 196104 URL: http://svn.freebsd.org/changeset/base/196104 Log: Add 8.x placeholders Modified: svnadmin/tools/export2.py Modified: svnadmin/tools/export2.py ============================================================================== --- svnadmin/tools/export2.py Tue Aug 11 21:37:21 2009 (r196103) +++ svnadmin/tools/export2.py Tue Aug 11 21:41:21 2009 (r196104) @@ -174,6 +174,7 @@ maptable = [ ( 'stable/5/', 'RELENG_5' ), ( 'stable/6/', 'RELENG_6' ), ( 'stable/7/', 'RELENG_7' ), + ( 'stable/8/', 'RELENG_8' ), # errata / security / releng branches ( 'releng/ALPHA_2_0/','ALPHA_2_0' ), ( 'releng/BETA_2_0/', 'BETA_2_0' ), @@ -202,6 +203,8 @@ maptable = [ ( 'releng/7.0/', 'RELENG_7_0' ), ( 'releng/7.1/', 'RELENG_7_1' ), ( 'releng/7.2/', 'RELENG_7_2' ), + ( 'releng/8.0/', 'RELENG_8_0' ), + ( 'releng/8.1/', 'RELENG_8_1' ), ] def map2cvs(svnpath): From peter at FreeBSD.org Tue Aug 11 22:09:43 2009 From: peter at FreeBSD.org (Peter Wemm) Date: Tue Aug 11 22:09:50 2009 Subject: svn commit: r196106 - svnadmin/tools Message-ID: <200908112209.n7BM9hLx043349@svn.freebsd.org> Author: peter Date: Tue Aug 11 22:09:43 2009 New Revision: 196106 URL: http://svn.freebsd.org/changeset/base/196106 Log: Remove a broken printf. There's no need to print the rev that we passed on the command line. That's for the driver to log, not here. Modified: svnadmin/tools/export2.py Modified: svnadmin/tools/export2.py ============================================================================== --- svnadmin/tools/export2.py Tue Aug 11 22:08:46 2009 (r196105) +++ svnadmin/tools/export2.py Tue Aug 11 22:09:43 2009 (r196106) @@ -360,7 +360,6 @@ def exportrev(pool, fs_ptr, rev, cvspath def export(pool, repos_path, cvspath, rev): repos_path = core.svn_path_canonicalize(repos_path) fs_ptr = repos.fs(repos.open(repos_path, pool)) - print '==========> export rev ' + rev exportrev(pool, fs_ptr, rev, cvspath) # From simon at FreeBSD.org Tue Aug 11 23:04:17 2009 From: simon at FreeBSD.org (Simon L. Nielsen) Date: Tue Aug 11 23:04:28 2009 Subject: svn commit: r196108 - svnadmin/tools Message-ID: <200908112304.n7BN4GVi044567@svn.freebsd.org> Author: simon Date: Tue Aug 11 23:04:16 2009 New Revision: 196108 URL: http://svn.freebsd.org/changeset/base/196108 Log: Add stable/8, releng/8.0, and releng/8.1. Modified: svnadmin/tools/export.py Modified: svnadmin/tools/export.py ============================================================================== --- svnadmin/tools/export.py Tue Aug 11 22:26:10 2009 (r196107) +++ svnadmin/tools/export.py Tue Aug 11 23:04:16 2009 (r196108) @@ -174,6 +174,7 @@ maptable = [ ( 'stable/5/', 'RELENG_5' ), ( 'stable/6/', 'RELENG_6' ), ( 'stable/7/', 'RELENG_7' ), + ( 'stable/8/', 'RELENG_8' ), # errata / security / releng branches ( 'releng/ALPHA_2_0/','ALPHA_2_0' ), ( 'releng/BETA_2_0/', 'BETA_2_0' ), @@ -202,6 +203,8 @@ maptable = [ ( 'releng/7.0/', 'RELENG_7_0' ), ( 'releng/7.1/', 'RELENG_7_1' ), ( 'releng/7.2/', 'RELENG_7_2' ), + ( 'releng/8.0/', 'RELENG_8_0' ), + ( 'releng/8.1/', 'RELENG_8_1' ), ] def map2cvs(svnpath): From simon at FreeBSD.org Tue Aug 11 23:05:47 2009 From: simon at FreeBSD.org (Simon L. Nielsen) Date: Tue Aug 11 23:05:59 2009 Subject: svn commit: r196109 - svnadmin/tools Message-ID: <200908112305.n7BN5l9R044638@svn.freebsd.org> Author: simon Date: Tue Aug 11 23:05:47 2009 New Revision: 196109 URL: http://svn.freebsd.org/changeset/base/196109 Log: Add releng/7.3 while updating branches anyway. Modified: svnadmin/tools/export.py svnadmin/tools/export2.py Modified: svnadmin/tools/export.py ============================================================================== --- svnadmin/tools/export.py Tue Aug 11 23:04:16 2009 (r196108) +++ svnadmin/tools/export.py Tue Aug 11 23:05:47 2009 (r196109) @@ -203,6 +203,7 @@ maptable = [ ( 'releng/7.0/', 'RELENG_7_0' ), ( 'releng/7.1/', 'RELENG_7_1' ), ( 'releng/7.2/', 'RELENG_7_2' ), + ( 'releng/7.3/', 'RELENG_7_3' ), ( 'releng/8.0/', 'RELENG_8_0' ), ( 'releng/8.1/', 'RELENG_8_1' ), ] Modified: svnadmin/tools/export2.py ============================================================================== --- svnadmin/tools/export2.py Tue Aug 11 23:04:16 2009 (r196108) +++ svnadmin/tools/export2.py Tue Aug 11 23:05:47 2009 (r196109) @@ -203,6 +203,7 @@ maptable = [ ( 'releng/7.0/', 'RELENG_7_0' ), ( 'releng/7.1/', 'RELENG_7_1' ), ( 'releng/7.2/', 'RELENG_7_2' ), + ( 'releng/7.3/', 'RELENG_7_3' ), ( 'releng/8.0/', 'RELENG_8_0' ), ( 'releng/8.1/', 'RELENG_8_1' ), ] From kensmith at FreeBSD.org Wed Aug 12 07:08:16 2009 From: kensmith at FreeBSD.org (Ken Smith) Date: Wed Aug 12 07:08:32 2009 Subject: svn commit: r196110 - stable/8 Message-ID: <200908120708.n7C78FDj054461@svn.freebsd.org> Author: kensmith Date: Wed Aug 12 07:08:14 2009 New Revision: 196110 URL: http://svn.freebsd.org/changeset/base/196110 Log: Adjust 'make update' to use RELENG_8 branch tag for cvs. Approved by: re (implicit) Modified: stable/8/Makefile.inc1 Modified: stable/8/Makefile.inc1 ============================================================================== --- stable/8/Makefile.inc1 Tue Aug 11 23:05:47 2009 (r196109) +++ stable/8/Makefile.inc1 Wed Aug 12 07:08:14 2009 (r196110) @@ -93,7 +93,7 @@ CLEANDIR= cleandir .endif CVS?= cvs -CVSFLAGS?= -A -P -d -I! +CVSFLAGS?= -r RELENG_8 -P -d -I! SVN?= svn SVNFLAGS?= -r HEAD SUP?= /usr/bin/csup From kensmith at FreeBSD.org Wed Aug 12 07:22:13 2009 From: kensmith at FreeBSD.org (Ken Smith) Date: Wed Aug 12 07:22:19 2009 Subject: svn commit: r196111 - stable/8/release Message-ID: <200908120722.n7C7MCIV054768@svn.freebsd.org> Author: kensmith Date: Wed Aug 12 07:22:12 2009 New Revision: 196111 URL: http://svn.freebsd.org/changeset/base/196111 Log: Adjust for RELENG_8. Approved by: re (implicit) Modified: stable/8/release/Makefile Modified: stable/8/release/Makefile ============================================================================== --- stable/8/release/Makefile Wed Aug 12 07:08:14 2009 (r196110) +++ stable/8/release/Makefile Wed Aug 12 07:22:12 2009 (r196111) @@ -18,7 +18,7 @@ # Set these, release builder! # # Fixed version: -#BUILDNAME=8.0-CURRENT +#BUILDNAME=8.0-STABLE # # Automatic SNAP versioning: DATE != date +%Y%m%d @@ -27,7 +27,7 @@ BUILDNAME?=${BASE}-${DATE}-SNAP # #CHROOTDIR=/junk/release # If this is a -stable snapshot, then set -#RELEASETAG=RELENG_7 +#RELEASETAG=RELENG_8 # # To test a release with a source tree containing patches and # other work. This tree will get copied instead of getting the From kensmith at FreeBSD.org Wed Aug 12 07:25:58 2009 From: kensmith at FreeBSD.org (Ken Smith) Date: Wed Aug 12 07:26:04 2009 Subject: svn commit: r196112 - stable/8/share/examples/cvsup Message-ID: <200908120725.n7C7Pu18054875@svn.freebsd.org> Author: kensmith Date: Wed Aug 12 07:25:56 2009 New Revision: 196112 URL: http://svn.freebsd.org/changeset/base/196112 Log: Update for RELENG_8. Approved by: re (implicit) Modified: stable/8/share/examples/cvsup/standard-supfile Modified: stable/8/share/examples/cvsup/standard-supfile ============================================================================== --- stable/8/share/examples/cvsup/standard-supfile Wed Aug 12 07:22:12 2009 (r196111) +++ stable/8/share/examples/cvsup/standard-supfile Wed Aug 12 07:25:56 2009 (r196112) @@ -49,7 +49,7 @@ *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr -*default release=cvs tag=. +*default release=cvs tag=RELENG_8 *default delete use-rel-suffix # If you seem to be limited by CPU rather than network or disk bandwidth, try From kensmith at FreeBSD.org Wed Aug 12 07:37:20 2009 From: kensmith at FreeBSD.org (Ken Smith) Date: Wed Aug 12 07:37:25 2009 Subject: svn commit: r196115 - stable/8/usr.sbin/pkg_install/add Message-ID: <200908120737.n7C7bJWf055248@svn.freebsd.org> Author: kensmith Date: Wed Aug 12 07:37:18 2009 New Revision: 196115 URL: http://svn.freebsd.org/changeset/base/196115 Log: Prepare for 8.0 package set, adjust for 8-stable, acknowledge 9-current is coming. Approved by: re (implicit) Modified: stable/8/usr.sbin/pkg_install/add/main.c Modified: stable/8/usr.sbin/pkg_install/add/main.c ============================================================================== --- stable/8/usr.sbin/pkg_install/add/main.c Wed Aug 12 07:36:33 2009 (r196114) +++ stable/8/usr.sbin/pkg_install/add/main.c Wed Aug 12 07:37:18 2009 (r196115) @@ -82,13 +82,15 @@ struct { { 700000, 700099, "/packages-7.0-release" }, { 701000, 701099, "/packages-7.1-release" }, { 702000, 702099, "/packages-7.2-release" }, + { 800000, 800499, "/packages-8.0-release" }, { 300000, 399000, "/packages-3-stable" }, { 400000, 499000, "/packages-4-stable" }, { 502100, 502128, "/packages-5-current" }, { 503100, 599000, "/packages-5-stable" }, { 600100, 699000, "/packages-6-stable" }, { 700100, 799000, "/packages-7-stable" }, - { 800000, 899000, "/packages-8-current" }, + { 800500, 899000, "/packages-8-stable" }, + { 900000, 999000, "/packages-9-current" }, { 0, 9999999, "/packages-current" }, { 0, 0, NULL } }; From bz at FreeBSD.org Wed Aug 12 10:26:04 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Wed Aug 12 10:26:11 2009 Subject: svn commit: r196118 - in head/sys: net sys Message-ID: <200908121026.n7CAQ4Me058692@svn.freebsd.org> Author: bz Date: Wed Aug 12 10:26:03 2009 New Revision: 196118 URL: http://svn.freebsd.org/changeset/base/196118 Log: Put minimum alignment on the dpcpu and vnet section so that ld when adding the __start_ symbol knows the expected section alignment and can place the __start_ symbol correctly. These sections will not support symbols with super-cache line alignment requirements. For full details, see posting to freebsd-current, 2009-08-10, Message-ID: <20090810133111.C93661@maildrop.int.zabbadoz.net>. Debugging and testing patches by: Kamigishi Rei (spambox haruhiism.net), np, lstewart, jhb, kib, rwatson Tested by: Kamigishi Rei, lstewart Reviewed by: kib Approved by: re Modified: head/sys/net/vnet.h head/sys/sys/pcpu.h Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Wed Aug 12 08:07:24 2009 (r196117) +++ head/sys/net/vnet.h Wed Aug 12 10:26:03 2009 (r196118) @@ -185,12 +185,14 @@ extern struct sx vnet_sxlock; * Virtual network stack memory allocator, which allows global variables to * be automatically instantiated for each network stack instance. */ +__asm__( #if defined(__arm__) -__asm__(".section " VNET_SETNAME ", \"aw\", %progbits"); + ".section " VNET_SETNAME ", \"aw\", %progbits\n" #else -__asm__(".section " VNET_SETNAME ", \"aw\", @progbits"); + ".section " VNET_SETNAME ", \"aw\", @progbits\n" #endif -__asm__(".previous"); + "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" + "\t.previous"); #define VNET_NAME(n) vnet_entry_##n #define VNET_DECLARE(t, n) extern t VNET_NAME(n) Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Wed Aug 12 08:07:24 2009 (r196117) +++ head/sys/sys/pcpu.h Wed Aug 12 10:26:03 2009 (r196118) @@ -56,12 +56,14 @@ struct thread; extern uintptr_t *__start_set_pcpu; extern uintptr_t *__stop_set_pcpu; +__asm__( #if defined(__arm__) -__asm__(".section set_pcpu, \"aw\", %progbits"); + ".section set_pcpu, \"aw\", %progbits\n" #else -__asm__(".section set_pcpu, \"aw\", @progbits"); + ".section set_pcpu, \"aw\", @progbits\n" #endif -__asm__(".previous"); + "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" + "\t.previous"); /* * Array of dynamic pcpu base offsets. Indexed by id. From bz at FreeBSD.org Wed Aug 12 10:32:21 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Wed Aug 12 10:32:28 2009 Subject: svn commit: r196119 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908121032.n7CAWKEM058850@svn.freebsd.org> Author: bz Date: Wed Aug 12 10:32:20 2009 New Revision: 196119 URL: http://svn.freebsd.org/changeset/base/196119 Log: MFC r196118: Put minimum alignment on the dpcpu and vnet section so that ld when adding the __start_ symbol knows the expected section alignment and can place the __start_ symbol correctly. These sections will not support symbols with super-cache line alignment requirements. For full details, see posting to freebsd-current, 2009-08-10, Message-ID: <20090810133111.C93661@maildrop.int.zabbadoz.net>. Debugging and testing patches by: Kamigishi Rei (spambox haruhiism.net), np, lstewart, jhb, kib, rwatson Tested by: Kamigishi Rei, lstewart Reviewed by: kib Approved by: re Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/vnet.h stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/sys/pcpu.h stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/net/vnet.h ============================================================================== --- stable/8/sys/net/vnet.h Wed Aug 12 10:26:03 2009 (r196118) +++ stable/8/sys/net/vnet.h Wed Aug 12 10:32:20 2009 (r196119) @@ -185,12 +185,14 @@ extern struct sx vnet_sxlock; * Virtual network stack memory allocator, which allows global variables to * be automatically instantiated for each network stack instance. */ +__asm__( #if defined(__arm__) -__asm__(".section " VNET_SETNAME ", \"aw\", %progbits"); + ".section " VNET_SETNAME ", \"aw\", %progbits\n" #else -__asm__(".section " VNET_SETNAME ", \"aw\", @progbits"); + ".section " VNET_SETNAME ", \"aw\", @progbits\n" #endif -__asm__(".previous"); + "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" + "\t.previous"); #define VNET_NAME(n) vnet_entry_##n #define VNET_DECLARE(t, n) extern t VNET_NAME(n) Modified: stable/8/sys/sys/pcpu.h ============================================================================== --- stable/8/sys/sys/pcpu.h Wed Aug 12 10:26:03 2009 (r196118) +++ stable/8/sys/sys/pcpu.h Wed Aug 12 10:32:20 2009 (r196119) @@ -56,12 +56,14 @@ struct thread; extern uintptr_t *__start_set_pcpu; extern uintptr_t *__stop_set_pcpu; +__asm__( #if defined(__arm__) -__asm__(".section set_pcpu, \"aw\", %progbits"); + ".section set_pcpu, \"aw\", %progbits\n" #else -__asm__(".section set_pcpu, \"aw\", @progbits"); + ".section set_pcpu, \"aw\", @progbits\n" #endif -__asm__(".previous"); + "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" + "\t.previous"); /* * Array of dynamic pcpu base offsets. Indexed by id. From rwatson at FreeBSD.org Wed Aug 12 10:41:38 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Wed Aug 12 10:41:43 2009 Subject: svn commit: r196120 - head/usr.bin/procstat Message-ID: <200908121041.n7CAfbrB059084@svn.freebsd.org> Author: rwatson Date: Wed Aug 12 10:41:37 2009 New Revision: 196120 URL: http://svn.freebsd.org/changeset/base/196120 Log: Update procstat(1) for the fact that devfs paths are no longer unsupported. Approved by: re (kib) Modified: head/usr.bin/procstat/procstat.1 Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Wed Aug 12 10:32:20 2009 (r196119) +++ head/usr.bin/procstat/procstat.1 Wed Aug 12 10:41:37 2009 (r196120) @@ -351,10 +351,8 @@ may be mechanically parsed. .Pp The display of open file or memory mapping pathnames is implemented using the kernel's name cache. -It therefore does not work for file systems -that do not use the name cache, such as -.Xr devfs 4 , -or if the name is not present in the cache due to removal. +If a file system does not use the name cache, or the path to a file is not in +the cache, a path will not be displayed. .Pp .Nm currently supports extracting data only from a live kernel, and not from From rwatson at FreeBSD.org Wed Aug 12 10:44:14 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Wed Aug 12 10:44:21 2009 Subject: svn commit: r196121 - head/sys/netatalk Message-ID: <200908121044.n7CAiDxP059175@svn.freebsd.org> Author: rwatson Date: Wed Aug 12 10:44:13 2009 New Revision: 196121 URL: http://svn.freebsd.org/changeset/base/196121 Log: Reverse misordered unlock and lock in at_control for netatalk phase I addresses. Submitted by: Russell Cattelan Approved by: re (kib) Modified: head/sys/netatalk/at_control.c Modified: head/sys/netatalk/at_control.c ============================================================================== --- head/sys/netatalk/at_control.c Wed Aug 12 10:41:37 2009 (r196120) +++ head/sys/netatalk/at_control.c Wed Aug 12 10:44:13 2009 (r196121) @@ -276,7 +276,7 @@ at_control(struct socket *so, u_long cmd * If the request is specifying phase 1, then * only look at a phase one address */ - AT_IFADDR_RUNLOCK(); + AT_IFADDR_RLOCK(); for (oaa = aa; aa; aa = TAILQ_NEXT(aa, aa_link)) { if (aa->aa_ifp == ifp && (aa->aa_flags & AFA_PHASE2) == 0) @@ -286,7 +286,7 @@ at_control(struct socket *so, u_long cmd ifa_free(&oaa->aa_ifa); if (aa != NULL && oaa != aa) ifa_ref(&aa->aa_ifa); - AT_IFADDR_RLOCK(); + AT_IFADDR_RUNLOCK(); } else { struct at_ifaddr *oaa; From rwatson at FreeBSD.org Wed Aug 12 10:45:46 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Wed Aug 12 10:45:54 2009 Subject: svn commit: r196122 - head/sys/security/audit Message-ID: <200908121045.n7CAjjQi059245@svn.freebsd.org> Author: rwatson Date: Wed Aug 12 10:45:45 2009 New Revision: 196122 URL: http://svn.freebsd.org/changeset/base/196122 Log: Correctly audit real gids following changes to the audit record argument interface. Approved by: re (kib) Modified: head/sys/security/audit/audit.h Modified: head/sys/security/audit/audit.h ============================================================================== --- head/sys/security/audit/audit.h Wed Aug 12 10:44:13 2009 (r196121) +++ head/sys/security/audit/audit.h Wed Aug 12 10:45:45 2009 (r196122) @@ -232,7 +232,7 @@ void audit_thread_free(struct thread *t #define AUDIT_ARG_RGID(rgid) do { \ if (AUDITING_TD(curthread)) \ - audit_arg_gid((rgid)); \ + audit_arg_rgid((rgid)); \ } while (0) #define AUDIT_ARG_RUID(ruid) do { \ From rwatson at FreeBSD.org Wed Aug 12 10:46:49 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Wed Aug 12 10:47:01 2009 Subject: svn commit: r196123 - head/lib/libc/posix1e Message-ID: <200908121046.n7CAkmAw059298@svn.freebsd.org> Author: rwatson Date: Wed Aug 12 10:46:48 2009 New Revision: 196123 URL: http://svn.freebsd.org/changeset/base/196123 Log: Update posix1e-related man pages, especially as relates to MAC, to more accurately reflect the last ten years of work. Approved by: re (kib) Modified: head/lib/libc/posix1e/Makefile.inc head/lib/libc/posix1e/mac.3 head/lib/libc/posix1e/mac_free.3 head/lib/libc/posix1e/mac_get.3 head/lib/libc/posix1e/mac_set.3 head/lib/libc/posix1e/mac_text.3 head/lib/libc/posix1e/posix1e.3 Modified: head/lib/libc/posix1e/Makefile.inc ============================================================================== --- head/lib/libc/posix1e/Makefile.inc Wed Aug 12 10:45:45 2009 (r196122) +++ head/lib/libc/posix1e/Makefile.inc Wed Aug 12 10:46:48 2009 (r196123) @@ -106,14 +106,16 @@ MLINKS+=acl_create_entry.3 acl_create_en mac_get.3 mac_get_fd.3 \ mac_get.3 mac_get_file.3 \ mac_get.3 mac_get_link.3 \ + mac_get.3 mac_get_peer.3 \ mac_get.3 mac_get_pid.3 \ mac_get.3 mac_get_proc.3 \ mac_prepare.3 mac_prepare_file_label.3 \ mac_prepare.3 mac_prepare_ifnet_label.3 \ mac_prepare.3 mac_prepare_process_label.3 \ - mac_set.3 mac_set_link.3 \ + mac_prepare.3 mac_prepare_type.3 \ mac_set.3 mac_set_fd.3 \ mac_set.3 mac_set_file.3 \ + mac_set.3 mac_set_link.3 \ mac_set.3 mac_set_proc.3 \ mac_text.3 mac_from_text.3 \ mac_text.3 mac_to_text.3 Modified: head/lib/libc/posix1e/mac.3 ============================================================================== --- head/lib/libc/posix1e/mac.3 Wed Aug 12 10:45:45 2009 (r196122) +++ head/lib/libc/posix1e/mac.3 Wed Aug 12 10:46:48 2009 (r196123) @@ -1,4 +1,5 @@ .\" Copyright (c) 2001, 2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2009 Robert N. M. Watson .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris @@ -30,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 19, 2003 +.Dd August 7, 2009 .Dt MAC 3 .Os .Sh NAME @@ -44,81 +45,82 @@ In the kernel configuration file: .Cd "options MAC" .Sh DESCRIPTION -.Fx -permits administrators to define Mandatory Access Control labels -defining levels for the privacy and integrity of data, -overriding discretionary policies -for those objects. -Not all objects currently provide support for MAC labels, -and MAC support must be explicitly enabled by the administrator. -The library calls include routines to retrieve, duplicate, -and set MAC labels associated with files and processes. -.Pp -POSIX.1e describes a set of MAC manipulation routines -to manage the contents of MAC labels, -as well as their relationships with -files and processes; -almost all of these support routines -are implemented in -.Fx . +Mandatory Access Control labels describe confidentiality, integrity, and +other security attributes of operating system objects, overriding +discretionary access control. +Not all system objects support MAC labeling, and MAC policies must be +explicitly enabled by the administrator. +This API, based on POSIX.1e, includes routines to retrieve, manipulate, set, +and convert to and from text the MAC labels on files and processes. +.Pp +MAC labels consist of a set of (name, value) tuples, representing security +attributes from MAC policies. +For example, this label contains security labels defined by two policies, +.Xr mac_biba 4 +and +.Xr mac_mls 4 : +.Bd -literal -offset indent +biba/low,mls/low +.Ed +.Pp +Further syntax and semantics of MAC labels may be found in +.Xr maclabel 7 . +.Pp +Applications operate on labels stored in +.Vt mac_t , +but can convert between this internal format and a text format for the +purposes of presentation to uses or external storage. +When querying a label on an object, a +.Vt mac_t +must first be prepared using the interfaces described in +.Xr mac_prepare 3 , +allowing the application to declare which policies it wishes to interogate. +The application writer can also rely on default label names declared in +.Xr mac.conf 5 . +.Pp +When finished with a +.Vt mac_t , +the application must call +.Xr mac_free 3 +to release its storage. .Pp -Available functions, sorted by behavior, include: +The following functions are defined: .Bl -tag -width indent -.It Fn mac_get_fd -This function is described in +.It Fn mac_is_present +This function, described in +.Xr mac_is_present 3 , +allows applications to test whether MAC is configured, as well as whether +specific policies are configured. +.It Fn mac_get_fd , Fn mac_get_file , Fn mac_get_link , Fn mac_get_peer +These functions, described in .Xr mac_get 3 , -and may be used to retrieve the -MAC label associated with -a specific file descriptor. -.It Fn mac_get_file -This function is described in +retrieve the MAC labels associated with file descriptors, files, and socket +peers. +.It Fn mac_get_pid , Fn mac_get_proc +These functions, described in .Xr mac_get 3 , -and may be used to retrieve the -MAC label associated with -a named file. -.It Fn mac_get_proc -This function is described in -.Xr mac_get 3 , -and may be used to retrieve the -MAC label associated with -the calling process. -.It Fn mac_set_fd -This function is described in -.Xr mac_set 3 , -and may be used to set the -MAC label associated with -a specific file descriptor. -.It Fn mac_set_file -This function is described in +retrieve the MAC labels associated with processes. +.It Fn mac_set_fd , Fn mac_set_file , Fn mac_set_link +These functions, described in .Xr mac_set 3 , -and may be used to set the -MAC label associated with -a named file. +set the MAC labels associated with file descriptors and files. .It Fn mac_set_proc -This function is described in +This function, described in .Xr mac_set 3 , -and may be used to set the -MAC label associated with -the calling process. +sets the MAC label associated with the current process. .It Fn mac_free -This function is described in +This function, desribed in .Xr mac_free 3 , -and may be used to free -userland working MAC label storage. +frees working MAC label storage. .It Fn mac_from_text -This function is described in +This function, described in .Xr mac_text 3 , -and may be used to convert -a text-form MAC label -into a working +converts a text-form MAC label into working MAC label storage, .Vt mac_t . -.It Fn mac_prepare -.It Fn mac_prepare_file_label -.It Fn mac_prepare_ifnet_label -.It Fn mac_prepare_process_label -These functions are described in +.It Fn mac_prepare , Fn mac_prepare_file_label , Fn mac_prepare_ifnet_label , Fn mac_prepare_process_label , Fn mac_prepare_type +These functions, described in .Xr mac_prepare 3 , -and may be used to preallocate storage for MAC label retrieval. +allocate working storage for MAC label operations. .Xr mac_prepare 3 prepares a label based on caller-specified label names; the other calls rely on the default configuration specified in @@ -130,15 +132,6 @@ and may be used to convert a .Vt mac_t into a text-form MAC label. .El -The behavior of some of these calls is influenced by the configuration -settings found in -.Xr mac.conf 5 , -the MAC library run-time configuration file. -.Sh IMPLEMENTATION NOTES -.Fx Ns 's -support for POSIX.1e interfaces and features -is -.Ud . .Sh FILES .Bl -tag -width ".Pa /etc/mac.conf" -compact .It Pa /etc/mac.conf @@ -150,24 +143,20 @@ system objects, but without policy-speci .Sh SEE ALSO .Xr mac_free 3 , .Xr mac_get 3 , +.Xr mac_is_present 3 , .Xr mac_prepare 3 , .Xr mac_set 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac.conf 5 , .Xr mac 9 .Sh STANDARDS -These APIs are loosely based on the APIs described in POSIX.1e. -POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft -continues on the cross-platform POSIX.1e implementation mailing list. -To join this list, see the -.Fx -POSIX.1e implementation page -for more information. -However, the resemblance of these APIs to the POSIX APIs is only loose, -as the POSIX APIs were unable to express many notions required for -flexible and extensible access control. +These APIs are loosely based on the APIs described in POSIX.1e, as described +in IEEE POSIX.1e draft 17. +However, the resemblence of these APIS to the POSIX APIs is loose, as the +PSOXI APIS were unable to express some notinos required for flexible and +extensible access control. .Sh HISTORY Support for Mandatory Access Control was introduced in .Fx 5.0 Modified: head/lib/libc/posix1e/mac_free.3 ============================================================================== --- head/lib/libc/posix1e/mac_free.3 Wed Aug 12 10:45:45 2009 (r196122) +++ head/lib/libc/posix1e/mac_free.3 Wed Aug 12 10:46:48 2009 (r196123) @@ -64,6 +64,7 @@ function. .Xr mac_prepare 3 , .Xr mac_set 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac 9 .Sh STANDARDS @@ -91,8 +92,8 @@ is a complex structure in the .Tn TrustedBSD implementation, .Fn mac_free -is specific to that type, and must not be used to free the character -strings returned from +is specific to +.Vt mac_3 , +and must not be used to free the character strings returned from .Fn mac_to_text . -Doing so may result in undefined behavior, -including application failure. +Doing so may result in undefined behavior. Modified: head/lib/libc/posix1e/mac_get.3 ============================================================================== --- head/lib/libc/posix1e/mac_get.3 Wed Aug 12 10:45:45 2009 (r196122) +++ head/lib/libc/posix1e/mac_get.3 Wed Aug 12 10:46:48 2009 (r196123) @@ -133,6 +133,7 @@ is not a directory. .Xr mac_prepare 3 , .Xr mac_set 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac 9 .Sh STANDARDS Modified: head/lib/libc/posix1e/mac_set.3 ============================================================================== --- head/lib/libc/posix1e/mac_set.3 Wed Aug 12 10:45:45 2009 (r196122) +++ head/lib/libc/posix1e/mac_set.3 Wed Aug 12 10:46:48 2009 (r196123) @@ -138,6 +138,7 @@ is not a directory. .Xr mac_is_present 3 , .Xr mac_prepare 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac 9 .Sh HISTORY Modified: head/lib/libc/posix1e/mac_text.3 ============================================================================== --- head/lib/libc/posix1e/mac_text.3 Wed Aug 12 10:45:45 2009 (r196122) +++ head/lib/libc/posix1e/mac_text.3 Wed Aug 12 10:46:48 2009 (r196123) @@ -98,6 +98,7 @@ to allocate internal storage. .Xr mac_is_present 3 , .Xr mac_prepare 3 , .Xr mac_set 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr maclabel 7 .Sh STANDARDS Modified: head/lib/libc/posix1e/posix1e.3 ============================================================================== --- head/lib/libc/posix1e/posix1e.3 Wed Aug 12 10:45:45 2009 (r196122) +++ head/lib/libc/posix1e/posix1e.3 Wed Aug 12 10:46:48 2009 (r196123) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2000 Robert N. M. Watson +.\" Copyright (c) 2000, 2009 Robert N. M. Watson .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 20, 2009 +.Dd August 7, 2009 .Dt POSIX1E 3 .Os .Sh NAME @@ -36,99 +36,77 @@ .Sh SYNOPSIS .In sys/types.h .In sys/acl.h -.\" .In sys/capability.h .In sys/mac.h .Sh DESCRIPTION -The IEEE POSIX.1e specification never left draft form, but the interfaces -it describes are now widely used despite inherent limitations. -Currently, only a few of the interfaces and features are implemented in -.Fx , -although efforts are underway to complete the integration at this time. +POSIX.1e describes five security extensions to the POSIX.1 API: Access +Control Lists (ACLs), Auditing, Capabilities, Mandatory Access Control, and +Information Flow Labels. +While IEEE POSIX.1e D17 specification has not been standardized, several of +its interfaces are widely used. .Pp -POSIX.1e describes five security extensions to the base POSIX.1 API: -Access Control Lists (ACLs), Auditing, Capabilities, Mandatory Access -Control, and Information Flow Labels. .Fx -supports POSIX.1e ACL interfaces, as well as POSIX.1e-like MAC -interfaces. -The TrustedBSD Project has produced but not integrated an implementation -of POSIX.1e Capabilities. -.Pp -POSIX.1e defines both syntax and semantics for these features, but fairly -substantial changes are required to implement these features in the -operating system. -.Pp -As shipped, -.Fx 4.0 -provides API and VFS support for ACLs, but not an implementation on any -native file system. -.Fx 5.0 -includes support for ACLs as part of UFS1 and UFS2, as well as necessary -VFS support for additional file systems to export ACLs as appropriate. -Available API calls relating to ACLs are described in detail in -.Xr acl 3 . -.Pp -As shipped, -.Fx 5.0 -includes support for Mandatory Access Control as well as POSIX.1e-like -APIs for label management. -More information on API calls relating to MAC is available in -.Xr mac 3 . +implements POSIX.1e interface for access control lists, described in +.Xr acl 3 , +and supports ACLs on the +.Xr ffs 7 +file system; ACLs must be administratively enabled using +.Xr tunefs 8 . .Pp -Additional patches supporting POSIX.1e features are provided by the -TrustedBSD project: +.Fx +implements a POSIX.1e-like mandatory access control interface, described in +.Xr mac 3 , +although with a number of extensions and important semantic differences. .Pp -http://www.TrustedBSD.org/ -.Sh IMPLEMENTATION NOTES -.Fx Ns 's -support for POSIX.1e interfaces and features is still under -development at this time, and many of these features are considered new -or experimental. +.Fx +does not implement the POSIX.1e audit, privilege (capability), or information +flow label APIs. +However, +.Fx +does implement the +.Xr libbsm +audit API. .Sh ENVIRONMENT -POSIX.1e assigns security labels to all objects, extending the security +POSIX.1e assigns security attributes to all objects, extending the security functionality described in POSIX.1. -These additional labels provide -fine-grained discretionary access control, fine-grained capabilities, -and labels necessary for mandatory access control. -POSIX.2c describes -a set of userland utilities for manipulating these labels. +These additional attributes store fine-grained discretionary access control +information and mandatory access control labels; for files, they are stored +in extended attributes, described in +.Xr extattr 3 . .Pp -Many of these services are supported by extended attributes, documented -in -.Xr extattr 2 +POSIX.2c describes +a set of userland utilities for manipulating these attributes, including +.Xr getfacl 1 +and +.Xr setfacl 1 +for access control lists, and +.Xr getfmac 8 and -.Xr extattr 9 . -While these APIs are not documented in POSIX.1e, they are similar in -structure. +.Xr setfmac 8 +for mandatory access control labels. .Sh SEE ALSO +.Xr getfacl 1 , +.Xr setfacl 1 , .Xr extattr 2 , .Xr acl 3 , +.Xr extattr 3 , .Xr libbsm 3 , .Xr mac 3 , +.Xr ffs 7 , +.Xr getfmac 8 , +.Xr setfmac 8 , +.Xr tunefs 8 , .Xr acl 9 , .Xr extattr 9 , .Xr mac 9 .Sh STANDARDS POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft continues -on the cross-platform POSIX.1e implementation -mailing list. -To join this list, see the -.Fx -POSIX.1e implementation -page for more information. .Sh HISTORY POSIX.1e support was introduced in .Fx 4.0 ; -most of the features are available as of +most features were available as of .Fx 5.0 . -Development continues. .Sh AUTHORS .An Robert N M Watson .An Chris D. Faulhaber .An Thomas Moestl .An Ilmar S Habibulin -.Sh BUGS -Many of these features are considered new or experimental in -.Fx 5.0 -and should be deployed with appropriate caution. From simon at FreeBSD.org Wed Aug 12 10:47:23 2009 From: simon at FreeBSD.org (Simon L. Nielsen) Date: Wed Aug 12 10:47:30 2009 Subject: svn commit: r196045 - stable/8 In-Reply-To: <868wi1vvqi.fsf@ds4.des.no> References: <200908030813.n738D6x1040724@svn.freebsd.org> <86hbwpvxaq.fsf@ds4.des.no> <4A76ED32.80304@andric.com> <868wi1vvqi.fsf@ds4.des.no> Message-ID: <20090812104721.GB91526@zaphod.nitro.dk> [correct mailer issues for svn] On 2009.08.03 16:05:09 +0200, Dag-Erling Sm?rgrav wrote: > Dimitry Andric writes: > > You might want to change [...] > > Thanks, new patch attached. Just FYI, I plan to look at this tonight CET (but won't be able to before) so it should be fixed soonish. -- Simon L. Nielsen From cperciva at FreeBSD.org Wed Aug 12 11:55:27 2009 From: cperciva at FreeBSD.org (Colin Percival) Date: Wed Aug 12 11:55:42 2009 Subject: svn commit: r196128 - head/usr.sbin/ntp/scripts Message-ID: <200908121155.n7CBtQUD063217@svn.freebsd.org> Author: cperciva Date: Wed Aug 12 11:55:26 2009 New Revision: 196128 URL: http://svn.freebsd.org/changeset/base/196128 Log: Apply the ntp-related part of r195626 to the correct part of the tree -- the mkver which is used in builds is the one in usr.sbin/ntp/scripts, not the one in contrib/ntp/scripts. Pointy hat to: cperciva Approved by: re (rwatson) Modified: head/usr.sbin/ntp/scripts/mkver Modified: head/usr.sbin/ntp/scripts/mkver ============================================================================== --- head/usr.sbin/ntp/scripts/mkver Wed Aug 12 11:43:45 2009 (r196127) +++ head/usr.sbin/ntp/scripts/mkver Wed Aug 12 11:55:26 2009 (r196128) @@ -23,8 +23,6 @@ case "" in *) ConfStr="${ConfStr}-r" ;; esac -ConfStr="$ConfStr `LC_ALL=C date`" - if [ ! -f .version ]; then echo 0 > .version fi From bz at FreeBSD.org Wed Aug 12 12:00:23 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Wed Aug 12 12:00:33 2009 Subject: svn commit: r196129 - head/sys/net Message-ID: <200908121200.n7CC0LJr063407@svn.freebsd.org> Author: bz Date: Wed Aug 12 12:00:21 2009 New Revision: 196129 URL: http://svn.freebsd.org/changeset/base/196129 Log: Update DDB show vnet command to print all used and available information. Reviewed by: rwatson, zec Approved by: re Modified: head/sys/net/vnet.c Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Wed Aug 12 11:55:26 2009 (r196128) +++ head/sys/net/vnet.c Wed Aug 12 12:00:21 2009 (r196129) @@ -615,14 +615,20 @@ DB_SHOW_COMMAND(vnets, db_show_vnets) { VNET_ITERATOR_DECL(vnet_iter); -#if SIZE_MAX == UINT32_MAX /* 32-bit arch */ - db_printf(" vnet ifs socks\n"); -#else /* 64-bit arch, most probaly... */ - db_printf(" vnet ifs socks\n"); -#endif VNET_FOREACH(vnet_iter) { - db_printf("%p %3d %5d\n", vnet_iter, vnet_iter->vnet_ifcnt, - vnet_iter->vnet_sockcnt); + db_printf("vnet = %p\n", vnet_iter); + db_printf(" vnet_magic_n = 0x%x (%s, orig 0x%x)\n", + vnet_iter->vnet_magic_n, + (vnet_iter->vnet_magic_n == VNET_MAGIC_N) ? + "ok" : "mismatch", VNET_MAGIC_N); + db_printf(" vnet_ifcnt = %u\n", vnet_iter->vnet_ifcnt); + db_printf(" vnet_sockcnt = %u\n", vnet_iter->vnet_sockcnt); + db_printf(" vnet_data_mem = %p\n", vnet_iter->vnet_data_mem); + db_printf(" vnet_data_base = 0x%jx\n", + (uintmax_t)vnet_iter->vnet_data_base); + db_printf("\n"); + if (db_pager_quit) + break; } } #endif From cperciva at FreeBSD.org Wed Aug 12 12:00:24 2009 From: cperciva at FreeBSD.org (Colin Percival) Date: Wed Aug 12 12:00:54 2009 Subject: svn commit: r196130 - in stable/8/usr.sbin/ntp: . scripts Message-ID: <200908121200.n7CC0NaM063442@svn.freebsd.org> Author: cperciva Date: Wed Aug 12 12:00:22 2009 New Revision: 196130 URL: http://svn.freebsd.org/changeset/base/196130 Log: Merge r196128 to stable/8. Approved by: re (rwatson) Modified: stable/8/usr.sbin/ntp/ (props changed) stable/8/usr.sbin/ntp/scripts/mkver Modified: stable/8/usr.sbin/ntp/scripts/mkver ============================================================================== --- stable/8/usr.sbin/ntp/scripts/mkver Wed Aug 12 12:00:21 2009 (r196129) +++ stable/8/usr.sbin/ntp/scripts/mkver Wed Aug 12 12:00:22 2009 (r196130) @@ -23,8 +23,6 @@ case "" in *) ConfStr="${ConfStr}-r" ;; esac -ConfStr="$ConfStr `LC_ALL=C date`" - if [ ! -f .version ]; then echo 0 > .version fi From bz at FreeBSD.org Wed Aug 12 12:05:15 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Wed Aug 12 12:05:23 2009 Subject: svn commit: r196131 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908121205.n7CC57E8063579@svn.freebsd.org> Author: bz Date: Wed Aug 12 12:05:07 2009 New Revision: 196131 URL: http://svn.freebsd.org/changeset/base/196131 Log: MFC r196129: Update DDB show vnet command to print all used and available information. Reviewed by: rwatson, zec Approved by: re Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/vnet.c stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/net/vnet.c ============================================================================== --- stable/8/sys/net/vnet.c Wed Aug 12 12:00:22 2009 (r196130) +++ stable/8/sys/net/vnet.c Wed Aug 12 12:05:07 2009 (r196131) @@ -615,14 +615,20 @@ DB_SHOW_COMMAND(vnets, db_show_vnets) { VNET_ITERATOR_DECL(vnet_iter); -#if SIZE_MAX == UINT32_MAX /* 32-bit arch */ - db_printf(" vnet ifs socks\n"); -#else /* 64-bit arch, most probaly... */ - db_printf(" vnet ifs socks\n"); -#endif VNET_FOREACH(vnet_iter) { - db_printf("%p %3d %5d\n", vnet_iter, vnet_iter->vnet_ifcnt, - vnet_iter->vnet_sockcnt); + db_printf("vnet = %p\n", vnet_iter); + db_printf(" vnet_magic_n = 0x%x (%s, orig 0x%x)\n", + vnet_iter->vnet_magic_n, + (vnet_iter->vnet_magic_n == VNET_MAGIC_N) ? + "ok" : "mismatch", VNET_MAGIC_N); + db_printf(" vnet_ifcnt = %u\n", vnet_iter->vnet_ifcnt); + db_printf(" vnet_sockcnt = %u\n", vnet_iter->vnet_sockcnt); + db_printf(" vnet_data_mem = %p\n", vnet_iter->vnet_data_mem); + db_printf(" vnet_data_base = 0x%jx\n", + (uintmax_t)vnet_iter->vnet_data_base); + db_printf("\n"); + if (db_pager_quit) + break; } } #endif From bz at FreeBSD.org Wed Aug 12 12:06:40 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Wed Aug 12 12:06:48 2009 Subject: svn commit: r196132 - head/sys/kern Message-ID: <200908121206.n7CC6Gpn063639@svn.freebsd.org> Author: bz Date: Wed Aug 12 12:06:16 2009 New Revision: 196132 URL: http://svn.freebsd.org/changeset/base/196132 Log: Add ddb show dpcpu_off command to ease dpcpu memory debugging. While show pcpu prints pc_dynamic this also prints the original memory address as well as the maths. Once dpcpu goes NUMA this is considered to help debugging as well. Reviewed by: rwatson Approved by: re Modified: head/sys/kern/subr_pcpu.c Modified: head/sys/kern/subr_pcpu.c ============================================================================== --- head/sys/kern/subr_pcpu.c Wed Aug 12 12:05:07 2009 (r196131) +++ head/sys/kern/subr_pcpu.c Wed Aug 12 12:06:16 2009 (r196132) @@ -313,6 +313,18 @@ sysctl_dpcpu_int(SYSCTL_HANDLER_ARGS) } #ifdef DDB +DB_SHOW_COMMAND(dpcpu_off, db_show_dpcpu_off) +{ + int id; + + for (id = 0; id <= mp_maxid; id++) { + if (CPU_ABSENT(id)) + continue; + db_printf("dpcpu_off[%2d] = 0x%jx (+ DPCPU_START = %p)\n", + id, (uintmax_t)dpcpu_off[id], + (void *)(uintptr_t)(dpcpu_off[id] + DPCPU_START)); + } +} static void show_pcpu(struct pcpu *pc) From simon at FreeBSD.org Wed Aug 12 12:10:11 2009 From: simon at FreeBSD.org (Simon L. Nielsen) Date: Wed Aug 12 12:10:23 2009 Subject: svn commit: r196133 - in head/crypto/openssl: apps test Message-ID: <200908121210.n7CCA0Op063785@svn.freebsd.org> Author: simon Date: Wed Aug 12 12:10:00 2009 New Revision: 196133 URL: http://svn.freebsd.org/changeset/base/196133 Log: Remove symlinks in OpenSSL's testing framework. These are not required for normal build, and doesn't export well to CVS. If they are needed later a script will be added to recreate the symlinks when needed at build time. Approved by: re (rwatson) Deleted: head/crypto/openssl/apps/md4.c head/crypto/openssl/test/bftest.c head/crypto/openssl/test/bntest.c head/crypto/openssl/test/casttest.c head/crypto/openssl/test/destest.c head/crypto/openssl/test/dhtest.c head/crypto/openssl/test/dsatest.c head/crypto/openssl/test/ecdhtest.c head/crypto/openssl/test/ecdsatest.c head/crypto/openssl/test/ectest.c head/crypto/openssl/test/enginetest.c head/crypto/openssl/test/evp_test.c head/crypto/openssl/test/exptest.c head/crypto/openssl/test/fips_aesavs.c head/crypto/openssl/test/fips_desmovs.c head/crypto/openssl/test/fips_dsatest.c head/crypto/openssl/test/fips_dssvs.c head/crypto/openssl/test/fips_hmactest.c head/crypto/openssl/test/fips_randtest.c head/crypto/openssl/test/fips_rngvs.c head/crypto/openssl/test/fips_rsagtest.c head/crypto/openssl/test/fips_rsastest.c head/crypto/openssl/test/fips_rsavtest.c head/crypto/openssl/test/fips_shatest.c head/crypto/openssl/test/fips_test_suite.c head/crypto/openssl/test/hmactest.c head/crypto/openssl/test/ideatest.c head/crypto/openssl/test/jpaketest.c head/crypto/openssl/test/md2test.c head/crypto/openssl/test/md4test.c head/crypto/openssl/test/md5test.c head/crypto/openssl/test/mdc2test.c head/crypto/openssl/test/randtest.c head/crypto/openssl/test/rc2test.c head/crypto/openssl/test/rc4test.c head/crypto/openssl/test/rc5test.c head/crypto/openssl/test/rmdtest.c head/crypto/openssl/test/rsa_test.c head/crypto/openssl/test/sha1test.c head/crypto/openssl/test/sha256t.c head/crypto/openssl/test/sha512t.c head/crypto/openssl/test/shatest.c head/crypto/openssl/test/ssltest.c From bz at FreeBSD.org Wed Aug 12 12:10:32 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Wed Aug 12 12:10:50 2009 Subject: svn commit: r196134 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908121210.n7CCAT1J063834@svn.freebsd.org> Author: bz Date: Wed Aug 12 12:10:28 2009 New Revision: 196134 URL: http://svn.freebsd.org/changeset/base/196134 Log: MFC r196132: Add ddb show dpcpu_off command to ease dpcpu memory debugging. While show pcpu prints pc_dynamic this also prints the original memory address as well as the maths. Once dpcpu goes NUMA this is considered to help debugging as well. Reviewed by: rwatson Approved by: re Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/subr_pcpu.c stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/kern/subr_pcpu.c ============================================================================== --- stable/8/sys/kern/subr_pcpu.c Wed Aug 12 12:10:00 2009 (r196133) +++ stable/8/sys/kern/subr_pcpu.c Wed Aug 12 12:10:28 2009 (r196134) @@ -313,6 +313,18 @@ sysctl_dpcpu_int(SYSCTL_HANDLER_ARGS) } #ifdef DDB +DB_SHOW_COMMAND(dpcpu_off, db_show_dpcpu_off) +{ + int id; + + for (id = 0; id <= mp_maxid; id++) { + if (CPU_ABSENT(id)) + continue; + db_printf("dpcpu_off[%2d] = 0x%jx (+ DPCPU_START = %p)\n", + id, (uintmax_t)dpcpu_off[id], + (void *)(uintptr_t)(dpcpu_off[id] + DPCPU_START)); + } +} static void show_pcpu(struct pcpu *pc) From bz at FreeBSD.org Wed Aug 12 12:12:26 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Wed Aug 12 12:12:37 2009 Subject: svn commit: r196135 - head/sys/kern Message-ID: <200908121212.n7CCCN85063924@svn.freebsd.org> Author: bz Date: Wed Aug 12 12:12:23 2009 New Revision: 196135 URL: http://svn.freebsd.org/changeset/base/196135 Log: Make the kernel compile without IP networking by moving a variable under a proper #ifdef. Approved by: re (rwatson) Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Wed Aug 12 12:10:28 2009 (r196134) +++ head/sys/kern/kern_jail.c Wed Aug 12 12:12:23 2009 (r196135) @@ -472,10 +472,11 @@ kern_jail_set(struct thread *td, struct #endif struct vfsopt *opt; struct vfsoptlist *opts; - struct prison *pr, *deadpr, *mypr, *ppr, *tpr, *tppr; + struct prison *pr, *deadpr, *mypr, *ppr, *tpr; struct vnode *root; char *domain, *errmsg, *host, *name, *p, *path, *uuid; #if defined(INET) || defined(INET6) + struct prison *tppr; void *op; #endif unsigned long hid; From bz at FreeBSD.org Wed Aug 12 12:14:31 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Wed Aug 12 12:14:38 2009 Subject: svn commit: r196136 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908121214.n7CCEUSe064006@svn.freebsd.org> Author: bz Date: Wed Aug 12 12:14:30 2009 New Revision: 196136 URL: http://svn.freebsd.org/changeset/base/196136 Log: MFC r196135: Make the kernel compile without IP networking by moving a variable under a proper #ifdef. Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/kern_jail.c stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/kern/kern_jail.c ============================================================================== --- stable/8/sys/kern/kern_jail.c Wed Aug 12 12:12:23 2009 (r196135) +++ stable/8/sys/kern/kern_jail.c Wed Aug 12 12:14:30 2009 (r196136) @@ -472,10 +472,11 @@ kern_jail_set(struct thread *td, struct #endif struct vfsopt *opt; struct vfsoptlist *opts; - struct prison *pr, *deadpr, *mypr, *ppr, *tpr, *tppr; + struct prison *pr, *deadpr, *mypr, *ppr, *tpr; struct vnode *root; char *domain, *errmsg, *host, *name, *p, *path, *uuid; #if defined(INET) || defined(INET6) + struct prison *tppr; void *op; #endif unsigned long hid; From bz at FreeBSD.org Wed Aug 12 12:20:09 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Wed Aug 12 12:20:16 2009 Subject: svn commit: r196119 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... In-Reply-To: <200908121032.n7CAWKEM058850@svn.freebsd.org> References: <200908121032.n7CAWKEM058850@svn.freebsd.org> Message-ID: <20090812121814.M93661@maildrop.int.zabbadoz.net> On Wed, 12 Aug 2009, Bjoern A. Zeeb wrote: > Author: bz > Date: Wed Aug 12 10:32:20 2009 > New Revision: 196119 > URL: http://svn.freebsd.org/changeset/base/196119 > > Log: > MFC r196118: > Put minimum alignment on the dpcpu and vnet section so that ld > when adding the __start_ symbol knows the expected section alignment > and can place the __start_ symbol correctly. > > These sections will not support symbols with super-cache line alignment > requirements. > > For full details, see posting to freebsd-current, 2009-08-10, > Message-ID: <20090810133111.C93661@maildrop.int.zabbadoz.net>. > > Debugging and testing patches by: > Kamigishi Rei (spambox haruhiism.net), > np, lstewart, jhb, kib, rwatson > Tested by: Kamigishi Rei, lstewart > Reviewed by: kib > > Approved by: re ... Just as a follow-up here as well: [ The following samples, etc are generally "thinking" arch=amd64: ] There are two different kinds of places where we find dynamic per-cpu (dpcpu) data: (1) the so called 'master copy', that is a linker set, which holds the BSS initialized compile-time defaults. (2) a copy for each PU copied to allocated memory. The problem seen has been that single members of the set had been un-aligned at run-time. Dumping the linker set (master copy), things look like this for example: ffffffff8168f8e9 g *ABS* 0000000000000000 __start_set_pcpu ffffffff8168f900 l d set_pcpu 0000000000000000 ffffffff8168f900 g O set_pcpu 0000000000000068 pcpu_entry_sched_switch_stats ffffffff8168f980 l O set_pcpu 0000000000000800 pcpu_entry_modspace ffffffff81690180 g O set_pcpu 0000000000000038 pcpu_entry_epair_dpcpu ffffffff81690200 g O set_pcpu 0000000000000500 pcpu_entry_nws ffffffff81690700 g *ABS* 0000000000000000 __stop_set_pcpu The members of the linker set (master copy) are all well aligned within the set: for example pcpu_entry_nws: 0xffffffff81690200 % 128 = 0 Looking at elfdump for the kernel this is also what we would expect: entry: 32 sh_name: set_pcpu sh_type: SHT_PROGBITS sh_flags: SHF_WRITE|SHF_ALLOC sh_addr: 0xffffffff8168f900 sh_offset: 21559552 sh_size: 3584 sh_link: 0 sh_info: 0 sh_addralign: 128 <<<< sh_entsize: 0 The problem is with __start_set_pcpu, the symbol ld adds to mark the beginning of the section. The address of __start_set_pcpu is not well-aligned, not even pointer-aligned: 0xffffffff8168f8e9 % 8 = 1. When now copying the 'master copy' to a dpcpu area the aligned symbols become un-aligned. Example: dpcpu area starts at 0xffff0000 |--------+------------------------------------------ Copyin the master copy from the objdump above starting at __start_set_pcpu will put __start_set_pcpu at 0xffff0000 but the first symbol pcpu_entry_sched_switch_stats at 0xffff0017 0xffff0000 |--------+------------------------------------------ |~~~~~~~~|------------------------------------------======== 0xffff0017 Two problems become obvious: (1) the symbols are now un-aligned in the per-cpu area. (2) due to the offset we did not copy the entire dpcpu area, so some symbols at the end might not have been properly initialized. While (2) may lead to run-time problems it usually is not a problem with memory corrution as the dpcpu area is usually allocated in pages. So unless the dpcpu symbols end page aligned there should be no corruption. (1) in contrast may lead to other effects like a lock spanning multiple cache lines thus no longer permitting atomic reads and being open to races. The results are panics with truncated pointers trying to access invalid memory regions, etc. On architectures like arm, this will immediatly fault as arm does not allow un-aligned reads. So one solution to the problem would be to make sure we allocate enough memory to also account for the offset to proper alignment and then copying the 'master copy' to a possibly unaligned address as well making the symbols properly aligned again: dpcpu area starts at 0xffff0000 |--------+---------+------------------------------------... |*** unused *******|~~~~~~~~|---------------------------... 0xffff0069 | 0xffff0080 In this sample __start_set_pcpu would be at 0xffff0069 and pcpu_entry_sched_switch_stats at 0xffff0080 and thus properly aligned again. With this things will work. Looking further at the problem you may have already noticed that the section for the 'master copy' starts at 0xffffffff8168f900 and that the __start_set_pcpu is outside of that section at 0xffffffff8168f8e9. Looking at a section dump from `readelf -S kernel` you would notice that the __start_set_pcpu directly follows the end of the previous section. The reasons for this are twofold: (1) ld places the __start_ symbol at '.' (the location counter), which at that point is at the end of the old section as the new (set_pcpu) is not yet added with __start_set_pcpu = ALIGN(0). (2) because we manually define the section, so that it is writeable, ld at the point of writing the __start_ symbol does not yet have any possible section alignment information. That is the reason for the ALIGN(0) in (1). An expected behaviour would be for ld to put the *ABS* at the address where the section begins, once known or fixup the address. This could arguably be a bug in ld we should fix post-8.0. One possible workaround would be to force the __start_ symbol and the section to be equally aligned and thus on the same address using linker scripts. The drawbacks are that we need to touch the fragile linker scripts for each of the sections we add and for all architectures individually. As the enforcement of alignment would be at a different place to the actual set creation, putting the alignment in might be easily forgotten. The advantage would be that we can always be sure that __start_ would be on the same address where the section starts. Another solution is to put minimum alignment on the objects inside the section in a way that it is only in a single place in the source code. The section directive in the respective header file, that will be included by each implementation file, is the ideal place for this. While cache line alignment seems to be the widest alignment restriction currently in use, one drawback, like with above ldscript solution, is that a symbol could possibly enforce a wider alignment restriction onto the section making the __start_ symbol and the section beginning to diverge again. Example: 0xffffffff8168f700 __start_set_pcpu 0xffffffff8168f800 set_pcpu 0xffffffff8168f800 pcpu_entry_sched_switch_stats .. if we would put an alignment of 1024 on pcpu_entry_sched_switch_stats. This is unlikely to happen. With the minimum alignment, ld, at the time of placing the __start_ symbol, already knows about the section alignment and will place it correctly on the section beginning doing: __start_set_pcpu = ALIGN(CACHE_LINE_SHIFT) at ".". Summary: The minimum alignment seems to be the least-intrusive solution and is believed to work for the moment. In addition documenting that the dpcpu and similar sections will not support super-cache line alignment. The long term solution would be to fix ld to DTRT. > > Modified: stable/8/sys/net/vnet.h > ============================================================================== > --- stable/8/sys/net/vnet.h Wed Aug 12 10:26:03 2009 (r196118) > +++ stable/8/sys/net/vnet.h Wed Aug 12 10:32:20 2009 (r196119) > @@ -185,12 +185,14 @@ extern struct sx vnet_sxlock; > * Virtual network stack memory allocator, which allows global variables to > * be automatically instantiated for each network stack instance. > */ > +__asm__( > #if defined(__arm__) > -__asm__(".section " VNET_SETNAME ", \"aw\", %progbits"); > + ".section " VNET_SETNAME ", \"aw\", %progbits\n" > #else > -__asm__(".section " VNET_SETNAME ", \"aw\", @progbits"); > + ".section " VNET_SETNAME ", \"aw\", @progbits\n" > #endif > -__asm__(".previous"); > + "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" > + "\t.previous"); > > #define VNET_NAME(n) vnet_entry_##n > #define VNET_DECLARE(t, n) extern t VNET_NAME(n) > > Modified: stable/8/sys/sys/pcpu.h > ============================================================================== > --- stable/8/sys/sys/pcpu.h Wed Aug 12 10:26:03 2009 (r196118) > +++ stable/8/sys/sys/pcpu.h Wed Aug 12 10:32:20 2009 (r196119) > @@ -56,12 +56,14 @@ struct thread; > extern uintptr_t *__start_set_pcpu; > extern uintptr_t *__stop_set_pcpu; > > +__asm__( > #if defined(__arm__) > -__asm__(".section set_pcpu, \"aw\", %progbits"); > + ".section set_pcpu, \"aw\", %progbits\n" > #else > -__asm__(".section set_pcpu, \"aw\", @progbits"); > + ".section set_pcpu, \"aw\", @progbits\n" > #endif > -__asm__(".previous"); > + "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" > + "\t.previous"); > > /* > * Array of dynamic pcpu base offsets. Indexed by id. > -- Bjoern A. Zeeb The greatest risk is not taking one. From bz at FreeBSD.org Wed Aug 12 12:29:18 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Wed Aug 12 12:29:24 2009 Subject: svn commit: r196137 - head/usr.sbin/jls Message-ID: <200908121229.n7CCT7Bw064394@svn.freebsd.org> Author: bz Date: Wed Aug 12 12:29:07 2009 New Revision: 196137 URL: http://svn.freebsd.org/changeset/base/196137 Log: Do not truncate IPv6 addresses when printing them in the jls -av 7.x multi-IP jail backward compat output. Reported by: ed Tested by: ed Reviewed by: rwatson Approved by: re Modified: head/usr.sbin/jls/jls.c Modified: head/usr.sbin/jls/jls.c ============================================================================== --- head/usr.sbin/jls/jls.c Wed Aug 12 12:14:30 2009 (r196136) +++ head/usr.sbin/jls/jls.c Wed Aug 12 12:29:07 2009 (r196137) @@ -359,7 +359,7 @@ print_jail(int pflags, int jflags) ipbuf, sizeof(ipbuf)) == NULL) err(1, "inet_ntop"); else - printf("%6s %-15.15s\n", "", ipbuf); + printf("%6s %s\n", "", ipbuf); } } else if (pflags & PRINT_DEFAULT) printf("%6d %-15.15s %-29.29s %.74s\n", From bz at FreeBSD.org Wed Aug 12 12:31:31 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Wed Aug 12 12:31:42 2009 Subject: svn commit: r196138 - stable/8/usr.sbin/jls Message-ID: <200908121231.n7CCVTZc064499@svn.freebsd.org> Author: bz Date: Wed Aug 12 12:31:29 2009 New Revision: 196138 URL: http://svn.freebsd.org/changeset/base/196138 Log: MFC r196137: Do not truncate IPv6 addresses when printing them in the jls -av 7.x multi-IP jail backward compat output. Reported by: ed Tested by: ed Reviewed by: rwatson Approved by: re Modified: stable/8/usr.sbin/jls/ (props changed) stable/8/usr.sbin/jls/jls.c Modified: stable/8/usr.sbin/jls/jls.c ============================================================================== --- stable/8/usr.sbin/jls/jls.c Wed Aug 12 12:29:07 2009 (r196137) +++ stable/8/usr.sbin/jls/jls.c Wed Aug 12 12:31:29 2009 (r196138) @@ -359,7 +359,7 @@ print_jail(int pflags, int jflags) ipbuf, sizeof(ipbuf)) == NULL) err(1, "inet_ntop"); else - printf("%6s %-15.15s\n", "", ipbuf); + printf("%6s %s\n", "", ipbuf); } } else if (pflags & PRINT_DEFAULT) printf("%6d %-15.15s %-29.29s %.74s\n", From rnoland at FreeBSD.org Wed Aug 12 12:50:16 2009 From: rnoland at FreeBSD.org (Robert Noland) Date: Wed Aug 12 12:50:27 2009 Subject: svn commit: r196141 - head/sys/dev/drm Message-ID: <200908121250.n7CCoFNJ064979@svn.freebsd.org> Author: rnoland Date: Wed Aug 12 12:50:15 2009 New Revision: 196141 URL: http://svn.freebsd.org/changeset/base/196141 Log: Add some additional radeon pci ids to drm. Approved by: re (kib) MFC after: 0 days Modified: head/sys/dev/drm/drm_pciids.h Modified: head/sys/dev/drm/drm_pciids.h ============================================================================== --- head/sys/dev/drm/drm_pciids.h Wed Aug 12 12:49:52 2009 (r196140) +++ head/sys/dev/drm/drm_pciids.h Wed Aug 12 12:50:15 2009 (r196141) @@ -259,9 +259,12 @@ {0x1002, 0x940F, CHIP_R600|RADEON_NEW_MEMMAP, "ATI FireGL V7600"}, \ {0x1002, 0x94A0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4830"}, \ {0x1002, 0x94A1, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850"}, \ + {0x1002, 0x94A3, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M7740"}, \ {0x1002, 0x94B1, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI RV740"}, \ {0x1002, 0x94B3, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4770"}, \ + {0x1002, 0x94B4, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4700 Series"}, \ {0x1002, 0x94B5, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4770"}, \ + {0x1002, 0x94B9, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M5750"}, \ {0x1002, 0x94C0, CHIP_RV610|RADEON_NEW_MEMMAP, "RV610"}, \ {0x1002, 0x94C1, CHIP_RV610|RADEON_NEW_MEMMAP, "Radeon HD 2400 XT"}, \ {0x1002, 0x94C3, CHIP_RV610|RADEON_NEW_MEMMAP, "Radeon HD 2400 Pro"}, \ @@ -350,6 +353,7 @@ {0x1002, 0x9487, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ {0x1002, 0x948F, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ {0x1002, 0x9490, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4670"}, \ + {0x1002, 0x9495, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4600 Series"}, \ {0x1002, 0x9498, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4650"}, \ {0x1002, 0x9480, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4650"}, \ {0x1002, 0x9488, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4670"}, \ @@ -366,6 +370,7 @@ {0x1002, 0x9552, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4300 Series"}, \ {0x1002, 0x9553, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ {0x1002, 0x9555, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ + {0x1002, 0x9557, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro RG220"}, \ {0, 0, 0, NULL} #define r128_PCI_IDS \ From rnoland at FreeBSD.org Wed Aug 12 12:57:03 2009 From: rnoland at FreeBSD.org (Robert Noland) Date: Wed Aug 12 12:57:09 2009 Subject: svn commit: r196142 - head/sys/dev/drm Message-ID: <200908121257.n7CCv37U065146@svn.freebsd.org> Author: rnoland Date: Wed Aug 12 12:57:02 2009 New Revision: 196142 URL: http://svn.freebsd.org/changeset/base/196142 Log: Add support for radeon RS880 IGP chips to drm. Approved by: re (kib) MFC after: 0 days Modified: head/sys/dev/drm/drm_pciids.h head/sys/dev/drm/r600_cp.c head/sys/dev/drm/radeon_drv.h Modified: head/sys/dev/drm/drm_pciids.h ============================================================================== --- head/sys/dev/drm/drm_pciids.h Wed Aug 12 12:50:15 2009 (r196141) +++ head/sys/dev/drm/drm_pciids.h Wed Aug 12 12:57:02 2009 (r196142) @@ -330,6 +330,11 @@ {0x1002, 0x9614, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3300 Graphics"}, \ {0x1002, 0x9615, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3200 Graphics"}, \ {0x1002, 0x9616, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3000 Graphics"}, \ + {0x1002, 0x9710, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4200"}, \ + {0x1002, 0x9711, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 4100"}, \ + {0x1002, 0x9712, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon HD 4200"}, \ + {0x1002, 0x9713, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon 4100"}, \ + {0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI RS880"}, \ {0x1002, 0x9440, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ {0x1002, 0x9441, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4870 X2"}, \ {0x1002, 0x9442, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ Modified: head/sys/dev/drm/r600_cp.c ============================================================================== --- head/sys/dev/drm/r600_cp.c Wed Aug 12 12:50:15 2009 (r196141) +++ head/sys/dev/drm/r600_cp.c Wed Aug 12 12:57:02 2009 (r196142) @@ -318,7 +318,8 @@ static void r600_cp_load_microcode(drm_r pfp = RV670_pfp_microcode; break; case CHIP_RS780: - DRM_INFO("Loading RS780 Microcode\n"); + case CHIP_RS880: + DRM_INFO("Loading RS780/RS880 Microcode\n"); cp = RS780_cp_microcode; pfp = RS780_pfp_microcode; break; @@ -722,6 +723,7 @@ static void r600_gfx_init(struct drm_dev break; case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: dev_priv->r600_max_pipes = 1; dev_priv->r600_max_tile_pipes = 1; @@ -856,7 +858,8 @@ static void r600_gfx_init(struct drm_dev ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV630) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) RADEON_WRITE(R600_DB_DEBUG, R600_PREZ_MUST_WAIT_FOR_POSTZ_DONE); else RADEON_WRITE(R600_DB_DEBUG, 0); @@ -874,7 +877,8 @@ static void r600_gfx_init(struct drm_dev sq_ms_fifo_sizes = RADEON_READ(R600_SQ_MS_FIFO_SIZES); if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) { sq_ms_fifo_sizes = (R600_CACHE_FIFO_SIZE(0xa) | R600_FETCH_FIFO_HIWATER(0xa) | R600_DONE_FIFO_HIWATER(0xe0) | @@ -917,7 +921,8 @@ static void r600_gfx_init(struct drm_dev R600_NUM_ES_STACK_ENTRIES(0)); } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) { /* no vertex cache */ sq_config &= ~R600_VC_ENABLE; @@ -974,7 +979,8 @@ static void r600_gfx_init(struct drm_dev if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_TC_ONLY)); else RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_VC_AND_TC)); @@ -1017,6 +1023,7 @@ static void r600_gfx_init(struct drm_dev break; case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: gs_prim_buffer_depth = 32; break; @@ -1062,6 +1069,7 @@ static void r600_gfx_init(struct drm_dev switch (dev_priv->flags & RADEON_FAMILY_MASK) { case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: tc_cntl = R600_TC_L2_SIZE(8); break; Modified: head/sys/dev/drm/radeon_drv.h ============================================================================== --- head/sys/dev/drm/radeon_drv.h Wed Aug 12 12:50:15 2009 (r196141) +++ head/sys/dev/drm/radeon_drv.h Wed Aug 12 12:57:02 2009 (r196142) @@ -145,6 +145,7 @@ enum radeon_family { CHIP_RV635, CHIP_RV670, CHIP_RS780, + CHIP_RS880, CHIP_RV770, CHIP_RV740, CHIP_RV730, From rnoland at FreeBSD.org Wed Aug 12 13:09:25 2009 From: rnoland at FreeBSD.org (Robert Noland) Date: Wed Aug 12 13:09:38 2009 Subject: svn commit: r196143 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/drm dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev... Message-ID: <200908121309.n7CD9O1P065467@svn.freebsd.org> Author: rnoland Date: Wed Aug 12 13:09:24 2009 New Revision: 196143 URL: http://svn.freebsd.org/changeset/base/196143 Log: Merge r196141 Add some additional radeon pci ids to drm. Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/drm/drm_pciids.h stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/dev/drm/drm_pciids.h ============================================================================== --- stable/8/sys/dev/drm/drm_pciids.h Wed Aug 12 12:57:02 2009 (r196142) +++ stable/8/sys/dev/drm/drm_pciids.h Wed Aug 12 13:09:24 2009 (r196143) @@ -259,9 +259,12 @@ {0x1002, 0x940F, CHIP_R600|RADEON_NEW_MEMMAP, "ATI FireGL V7600"}, \ {0x1002, 0x94A0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4830"}, \ {0x1002, 0x94A1, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850"}, \ + {0x1002, 0x94A3, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M7740"}, \ {0x1002, 0x94B1, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI RV740"}, \ {0x1002, 0x94B3, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4770"}, \ + {0x1002, 0x94B4, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4700 Series"}, \ {0x1002, 0x94B5, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4770"}, \ + {0x1002, 0x94B9, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M5750"}, \ {0x1002, 0x94C0, CHIP_RV610|RADEON_NEW_MEMMAP, "RV610"}, \ {0x1002, 0x94C1, CHIP_RV610|RADEON_NEW_MEMMAP, "Radeon HD 2400 XT"}, \ {0x1002, 0x94C3, CHIP_RV610|RADEON_NEW_MEMMAP, "Radeon HD 2400 Pro"}, \ @@ -350,6 +353,7 @@ {0x1002, 0x9487, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ {0x1002, 0x948F, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ {0x1002, 0x9490, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4670"}, \ + {0x1002, 0x9495, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4600 Series"}, \ {0x1002, 0x9498, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4650"}, \ {0x1002, 0x9480, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4650"}, \ {0x1002, 0x9488, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4670"}, \ @@ -366,6 +370,7 @@ {0x1002, 0x9552, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4300 Series"}, \ {0x1002, 0x9553, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ {0x1002, 0x9555, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ + {0x1002, 0x9557, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro RG220"}, \ {0, 0, 0, NULL} #define r128_PCI_IDS \ From rnoland at FreeBSD.org Wed Aug 12 13:12:11 2009 From: rnoland at FreeBSD.org (Robert Noland) Date: Wed Aug 12 13:12:17 2009 Subject: svn commit: r196144 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/drm dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev... Message-ID: <200908121312.n7CDC9pC065611@svn.freebsd.org> Author: rnoland Date: Wed Aug 12 13:12:09 2009 New Revision: 196144 URL: http://svn.freebsd.org/changeset/base/196144 Log: Merge r196142 Add support for radeon RS880 IGP chips to drm. Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/drm/drm_pciids.h stable/8/sys/dev/drm/r600_cp.c stable/8/sys/dev/drm/radeon_drv.h stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/dev/drm/drm_pciids.h ============================================================================== --- stable/8/sys/dev/drm/drm_pciids.h Wed Aug 12 13:09:24 2009 (r196143) +++ stable/8/sys/dev/drm/drm_pciids.h Wed Aug 12 13:12:09 2009 (r196144) @@ -330,6 +330,11 @@ {0x1002, 0x9614, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3300 Graphics"}, \ {0x1002, 0x9615, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3200 Graphics"}, \ {0x1002, 0x9616, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3000 Graphics"}, \ + {0x1002, 0x9710, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4200"}, \ + {0x1002, 0x9711, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 4100"}, \ + {0x1002, 0x9712, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon HD 4200"}, \ + {0x1002, 0x9713, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon 4100"}, \ + {0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI RS880"}, \ {0x1002, 0x9440, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ {0x1002, 0x9441, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4870 X2"}, \ {0x1002, 0x9442, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ Modified: stable/8/sys/dev/drm/r600_cp.c ============================================================================== --- stable/8/sys/dev/drm/r600_cp.c Wed Aug 12 13:09:24 2009 (r196143) +++ stable/8/sys/dev/drm/r600_cp.c Wed Aug 12 13:12:09 2009 (r196144) @@ -318,7 +318,8 @@ static void r600_cp_load_microcode(drm_r pfp = RV670_pfp_microcode; break; case CHIP_RS780: - DRM_INFO("Loading RS780 Microcode\n"); + case CHIP_RS880: + DRM_INFO("Loading RS780/RS880 Microcode\n"); cp = RS780_cp_microcode; pfp = RS780_pfp_microcode; break; @@ -722,6 +723,7 @@ static void r600_gfx_init(struct drm_dev break; case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: dev_priv->r600_max_pipes = 1; dev_priv->r600_max_tile_pipes = 1; @@ -856,7 +858,8 @@ static void r600_gfx_init(struct drm_dev ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV630) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) RADEON_WRITE(R600_DB_DEBUG, R600_PREZ_MUST_WAIT_FOR_POSTZ_DONE); else RADEON_WRITE(R600_DB_DEBUG, 0); @@ -874,7 +877,8 @@ static void r600_gfx_init(struct drm_dev sq_ms_fifo_sizes = RADEON_READ(R600_SQ_MS_FIFO_SIZES); if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) { sq_ms_fifo_sizes = (R600_CACHE_FIFO_SIZE(0xa) | R600_FETCH_FIFO_HIWATER(0xa) | R600_DONE_FIFO_HIWATER(0xe0) | @@ -917,7 +921,8 @@ static void r600_gfx_init(struct drm_dev R600_NUM_ES_STACK_ENTRIES(0)); } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) { /* no vertex cache */ sq_config &= ~R600_VC_ENABLE; @@ -974,7 +979,8 @@ static void r600_gfx_init(struct drm_dev if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_TC_ONLY)); else RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_VC_AND_TC)); @@ -1017,6 +1023,7 @@ static void r600_gfx_init(struct drm_dev break; case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: gs_prim_buffer_depth = 32; break; @@ -1062,6 +1069,7 @@ static void r600_gfx_init(struct drm_dev switch (dev_priv->flags & RADEON_FAMILY_MASK) { case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: tc_cntl = R600_TC_L2_SIZE(8); break; Modified: stable/8/sys/dev/drm/radeon_drv.h ============================================================================== --- stable/8/sys/dev/drm/radeon_drv.h Wed Aug 12 13:09:24 2009 (r196143) +++ stable/8/sys/dev/drm/radeon_drv.h Wed Aug 12 13:12:09 2009 (r196144) @@ -145,6 +145,7 @@ enum radeon_family { CHIP_RV635, CHIP_RV670, CHIP_RS780, + CHIP_RS880, CHIP_RV770, CHIP_RV740, CHIP_RV730, From rnoland at FreeBSD.org Wed Aug 12 13:19:15 2009 From: rnoland at FreeBSD.org (Robert Noland) Date: Wed Aug 12 13:19:32 2009 Subject: svn commit: r196145 - in stable/7/sys: . contrib/pf dev/drm Message-ID: <200908121319.n7CDJEIU065817@svn.freebsd.org> Author: rnoland Date: Wed Aug 12 13:19:14 2009 New Revision: 196145 URL: http://svn.freebsd.org/changeset/base/196145 Log: Merge r196141 Add some additional radeon pci ids to drm. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/drm_pciids.h Modified: stable/7/sys/dev/drm/drm_pciids.h ============================================================================== --- stable/7/sys/dev/drm/drm_pciids.h Wed Aug 12 13:12:09 2009 (r196144) +++ stable/7/sys/dev/drm/drm_pciids.h Wed Aug 12 13:19:14 2009 (r196145) @@ -259,9 +259,12 @@ {0x1002, 0x940F, CHIP_R600|RADEON_NEW_MEMMAP, "ATI FireGL V7600"}, \ {0x1002, 0x94A0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4830"}, \ {0x1002, 0x94A1, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850"}, \ + {0x1002, 0x94A3, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M7740"}, \ {0x1002, 0x94B1, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI RV740"}, \ {0x1002, 0x94B3, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4770"}, \ + {0x1002, 0x94B4, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4700 Series"}, \ {0x1002, 0x94B5, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4770"}, \ + {0x1002, 0x94B9, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M5750"}, \ {0x1002, 0x94C0, CHIP_RV610|RADEON_NEW_MEMMAP, "RV610"}, \ {0x1002, 0x94C1, CHIP_RV610|RADEON_NEW_MEMMAP, "Radeon HD 2400 XT"}, \ {0x1002, 0x94C3, CHIP_RV610|RADEON_NEW_MEMMAP, "Radeon HD 2400 Pro"}, \ @@ -350,6 +353,7 @@ {0x1002, 0x9487, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ {0x1002, 0x948F, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ {0x1002, 0x9490, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4670"}, \ + {0x1002, 0x9495, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4600 Series"}, \ {0x1002, 0x9498, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4650"}, \ {0x1002, 0x9480, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4650"}, \ {0x1002, 0x9488, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4670"}, \ @@ -366,6 +370,7 @@ {0x1002, 0x9552, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4300 Series"}, \ {0x1002, 0x9553, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ {0x1002, 0x9555, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ + {0x1002, 0x9557, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro RG220"}, \ {0, 0, 0, NULL} #define r128_PCI_IDS \ From rnoland at FreeBSD.org Wed Aug 12 13:20:43 2009 From: rnoland at FreeBSD.org (Robert Noland) Date: Wed Aug 12 13:20:49 2009 Subject: svn commit: r196146 - in stable/7/sys: . contrib/pf dev/drm Message-ID: <200908121320.n7CDKgW6065903@svn.freebsd.org> Author: rnoland Date: Wed Aug 12 13:20:42 2009 New Revision: 196146 URL: http://svn.freebsd.org/changeset/base/196146 Log: Merge r196142 Add support for radeon RS880 IGP chips to drm. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/drm_pciids.h stable/7/sys/dev/drm/r600_cp.c stable/7/sys/dev/drm/radeon_drv.h Modified: stable/7/sys/dev/drm/drm_pciids.h ============================================================================== --- stable/7/sys/dev/drm/drm_pciids.h Wed Aug 12 13:19:14 2009 (r196145) +++ stable/7/sys/dev/drm/drm_pciids.h Wed Aug 12 13:20:42 2009 (r196146) @@ -330,6 +330,11 @@ {0x1002, 0x9614, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3300 Graphics"}, \ {0x1002, 0x9615, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3200 Graphics"}, \ {0x1002, 0x9616, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3000 Graphics"}, \ + {0x1002, 0x9710, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4200"}, \ + {0x1002, 0x9711, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 4100"}, \ + {0x1002, 0x9712, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon HD 4200"}, \ + {0x1002, 0x9713, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon 4100"}, \ + {0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI RS880"}, \ {0x1002, 0x9440, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ {0x1002, 0x9441, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4870 X2"}, \ {0x1002, 0x9442, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ Modified: stable/7/sys/dev/drm/r600_cp.c ============================================================================== --- stable/7/sys/dev/drm/r600_cp.c Wed Aug 12 13:19:14 2009 (r196145) +++ stable/7/sys/dev/drm/r600_cp.c Wed Aug 12 13:20:42 2009 (r196146) @@ -318,7 +318,8 @@ static void r600_cp_load_microcode(drm_r pfp = RV670_pfp_microcode; break; case CHIP_RS780: - DRM_INFO("Loading RS780 Microcode\n"); + case CHIP_RS880: + DRM_INFO("Loading RS780/RS880 Microcode\n"); cp = RS780_cp_microcode; pfp = RS780_pfp_microcode; break; @@ -722,6 +723,7 @@ static void r600_gfx_init(struct drm_dev break; case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: dev_priv->r600_max_pipes = 1; dev_priv->r600_max_tile_pipes = 1; @@ -856,7 +858,8 @@ static void r600_gfx_init(struct drm_dev ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV630) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) RADEON_WRITE(R600_DB_DEBUG, R600_PREZ_MUST_WAIT_FOR_POSTZ_DONE); else RADEON_WRITE(R600_DB_DEBUG, 0); @@ -874,7 +877,8 @@ static void r600_gfx_init(struct drm_dev sq_ms_fifo_sizes = RADEON_READ(R600_SQ_MS_FIFO_SIZES); if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) { sq_ms_fifo_sizes = (R600_CACHE_FIFO_SIZE(0xa) | R600_FETCH_FIFO_HIWATER(0xa) | R600_DONE_FIFO_HIWATER(0xe0) | @@ -917,7 +921,8 @@ static void r600_gfx_init(struct drm_dev R600_NUM_ES_STACK_ENTRIES(0)); } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) { /* no vertex cache */ sq_config &= ~R600_VC_ENABLE; @@ -974,7 +979,8 @@ static void r600_gfx_init(struct drm_dev if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_TC_ONLY)); else RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_VC_AND_TC)); @@ -1017,6 +1023,7 @@ static void r600_gfx_init(struct drm_dev break; case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: gs_prim_buffer_depth = 32; break; @@ -1062,6 +1069,7 @@ static void r600_gfx_init(struct drm_dev switch (dev_priv->flags & RADEON_FAMILY_MASK) { case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: tc_cntl = R600_TC_L2_SIZE(8); break; Modified: stable/7/sys/dev/drm/radeon_drv.h ============================================================================== --- stable/7/sys/dev/drm/radeon_drv.h Wed Aug 12 13:19:14 2009 (r196145) +++ stable/7/sys/dev/drm/radeon_drv.h Wed Aug 12 13:20:42 2009 (r196146) @@ -145,6 +145,7 @@ enum radeon_family { CHIP_RV635, CHIP_RV670, CHIP_RS780, + CHIP_RS880, CHIP_RV770, CHIP_RV740, CHIP_RV730, From jhb at FreeBSD.org Wed Aug 12 14:37:58 2009 From: jhb at FreeBSD.org (John Baldwin) Date: Wed Aug 12 14:38:05 2009 Subject: svn commit: r196147 - head/usr.sbin/sysinstall Message-ID: <200908121437.n7CEbwMK067711@svn.freebsd.org> Author: jhb Date: Wed Aug 12 14:37:57 2009 New Revision: 196147 URL: http://svn.freebsd.org/changeset/base/196147 Log: Fix references to the kernel distributions to use the correct names (uppercase). PR: docs/137415 Submitted by: Yuri Gorchakov Approved by: re (rwatson, kib) MFC after: 3 days Modified: head/usr.sbin/sysinstall/install.c head/usr.sbin/sysinstall/sysinstall.8 Modified: head/usr.sbin/sysinstall/install.c ============================================================================== --- head/usr.sbin/sysinstall/install.c Wed Aug 12 13:20:42 2009 (r196146) +++ head/usr.sbin/sysinstall/install.c Wed Aug 12 14:37:57 2009 (r196147) @@ -939,7 +939,7 @@ installFixupKernel(dialogMenuItem *self, if (RunningAsInit) { /* * Install something as /boot/kernel. Prefer SMP - * over generic--this should handle the case where + * over GENERIC--this should handle the case where * both SMP and GENERIC are installed (otherwise we * select the one kernel that was installed). * Modified: head/usr.sbin/sysinstall/sysinstall.8 ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.8 Wed Aug 12 13:20:42 2009 (r196146) +++ head/usr.sbin/sysinstall/sysinstall.8 Wed Aug 12 14:37:57 2009 (r196147) @@ -411,9 +411,9 @@ Possible distribution values are: .Bl -tag -width indentxx .It Li base The base binary distribution. -.It Li generic +.It Li GENERIC The GENERIC kernel. -.It Li smp +.It Li SMP A kernel suitable for multiple processor systems. .It Li doc Miscellaneous documentation From jhb at FreeBSD.org Wed Aug 12 14:40:22 2009 From: jhb at FreeBSD.org (John Baldwin) Date: Wed Aug 12 14:40:34 2009 Subject: svn commit: r196148 - stable/8/usr.sbin/sysinstall Message-ID: <200908121440.n7CEeLN4067826@svn.freebsd.org> Author: jhb Date: Wed Aug 12 14:40:21 2009 New Revision: 196148 URL: http://svn.freebsd.org/changeset/base/196148 Log: MFC 196147: Fix references to the kernel distributions to use the correct names (uppercase). Approved by: re (rwatson, kib) Modified: stable/8/usr.sbin/sysinstall/ (props changed) stable/8/usr.sbin/sysinstall/install.c stable/8/usr.sbin/sysinstall/sysinstall.8 Modified: stable/8/usr.sbin/sysinstall/install.c ============================================================================== --- stable/8/usr.sbin/sysinstall/install.c Wed Aug 12 14:37:57 2009 (r196147) +++ stable/8/usr.sbin/sysinstall/install.c Wed Aug 12 14:40:21 2009 (r196148) @@ -939,7 +939,7 @@ installFixupKernel(dialogMenuItem *self, if (RunningAsInit) { /* * Install something as /boot/kernel. Prefer SMP - * over generic--this should handle the case where + * over GENERIC--this should handle the case where * both SMP and GENERIC are installed (otherwise we * select the one kernel that was installed). * Modified: stable/8/usr.sbin/sysinstall/sysinstall.8 ============================================================================== --- stable/8/usr.sbin/sysinstall/sysinstall.8 Wed Aug 12 14:37:57 2009 (r196147) +++ stable/8/usr.sbin/sysinstall/sysinstall.8 Wed Aug 12 14:40:21 2009 (r196148) @@ -411,9 +411,9 @@ Possible distribution values are: .Bl -tag -width indentxx .It Li base The base binary distribution. -.It Li generic +.It Li GENERIC The GENERIC kernel. -.It Li smp +.It Li SMP A kernel suitable for multiple processor systems. .It Li doc Miscellaneous documentation From rmacklem at FreeBSD.org Wed Aug 12 16:27:52 2009 From: rmacklem at FreeBSD.org (Rick Macklem) Date: Wed Aug 12 16:27:58 2009 Subject: svn commit: r196149 - head/sys/xdr Message-ID: <200908121627.n7CGRpam070192@svn.freebsd.org> Author: rmacklem Date: Wed Aug 12 16:27:51 2009 New Revision: 196149 URL: http://svn.freebsd.org/changeset/base/196149 Log: Add a check for a NULL mbuf ptr at the beginning of xdrmbuf_inline() so that it returns failure instead of crashing when "m->m_len" is executed and m == NULL. The mbuf ptr can be NULL when a call to xdrmbuf_getbytes() gets the bytes it needs, but they are at the end of a short RPC reply. When this happens, xdrmbuf_getbytes() returns success, but advances the mbuf ptr (xdrs->x_private) to m_next, which is NULL. If this is followed by a call to xdrmbuf_getlong(), it calls xdrmbuf_inline(), which would cause a crash by accessing "m->m_len". Tested by: pho, serenity at exscape dot org Approved by: re (rwatson), kib (mentor) Modified: head/sys/xdr/xdr_mbuf.c Modified: head/sys/xdr/xdr_mbuf.c ============================================================================== --- head/sys/xdr/xdr_mbuf.c Wed Aug 12 14:40:21 2009 (r196148) +++ head/sys/xdr/xdr_mbuf.c Wed Aug 12 16:27:51 2009 (r196149) @@ -282,6 +282,8 @@ xdrmbuf_inline(XDR *xdrs, u_int len) size_t available; char *p; + if (!m) + return (0); if (xdrs->x_op == XDR_ENCODE) { available = M_TRAILINGSPACE(m) + (m->m_len - xdrs->x_handy); } else { From jkim at FreeBSD.org Wed Aug 12 17:28:54 2009 From: jkim at FreeBSD.org (Jung-uk Kim) Date: Wed Aug 12 17:29:06 2009 Subject: svn commit: r196150 - head/sys/net Message-ID: <200908121728.n7CHSrxF071523@svn.freebsd.org> Author: jkim Date: Wed Aug 12 17:28:53 2009 New Revision: 196150 URL: http://svn.freebsd.org/changeset/base/196150 Log: Always embed pointer to BPF JIT function in BPF descriptor to avoid inconsistency when opt_bpf.h is not included. Reviewed by: rwatson Approved by: re (rwatson) Modified: head/sys/net/bpf.c head/sys/net/bpf_buffer.c head/sys/net/bpf_zerocopy.c head/sys/net/bpfdesc.h Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Wed Aug 12 16:27:51 2009 (r196149) +++ head/sys/net/bpf.c Wed Aug 12 17:28:53 2009 (r196150) @@ -1585,6 +1585,9 @@ void bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen) { struct bpf_d *d; +#ifdef BPF_JITTER + bpf_jit_filter *bf; +#endif u_int slen; int gottime; struct timeval tv; @@ -1601,8 +1604,9 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, * the interface pointers on the mbuf to figure it out. */ #ifdef BPF_JITTER - if (bpf_jitter_enable != 0 && d->bd_bfilter != NULL) - slen = (*(d->bd_bfilter->func))(pkt, pktlen, pktlen); + bf = bpf_jitter_enable != 0 ? d->bd_bfilter : NULL; + if (bf != NULL) + slen = (*(bf->func))(pkt, pktlen, pktlen); else #endif slen = bpf_filter(d->bd_rfilter, pkt, pktlen, pktlen); @@ -1634,6 +1638,9 @@ void bpf_mtap(struct bpf_if *bp, struct mbuf *m) { struct bpf_d *d; +#ifdef BPF_JITTER + bpf_jit_filter *bf; +#endif u_int pktlen, slen; int gottime; struct timeval tv; @@ -1655,11 +1662,10 @@ bpf_mtap(struct bpf_if *bp, struct mbuf BPFD_LOCK(d); ++d->bd_rcount; #ifdef BPF_JITTER + bf = bpf_jitter_enable != 0 ? d->bd_bfilter : NULL; /* XXX We cannot handle multiple mbufs. */ - if (bpf_jitter_enable != 0 && d->bd_bfilter != NULL && - m->m_next == NULL) - slen = (*(d->bd_bfilter->func))(mtod(m, u_char *), - pktlen, pktlen); + if (bf != NULL && m->m_next == NULL) + slen = (*(bf->func))(mtod(m, u_char *), pktlen, pktlen); else #endif slen = bpf_filter(d->bd_rfilter, (u_char *)m, pktlen, 0); Modified: head/sys/net/bpf_buffer.c ============================================================================== --- head/sys/net/bpf_buffer.c Wed Aug 12 16:27:51 2009 (r196149) +++ head/sys/net/bpf_buffer.c Wed Aug 12 17:28:53 2009 (r196150) @@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* Modified: head/sys/net/bpf_zerocopy.c ============================================================================== --- head/sys/net/bpf_zerocopy.c Wed Aug 12 16:27:51 2009 (r196149) +++ head/sys/net/bpf_zerocopy.c Wed Aug 12 17:28:53 2009 (r196150) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/net/bpfdesc.h ============================================================================== --- head/sys/net/bpfdesc.h Wed Aug 12 16:27:51 2009 (r196149) +++ head/sys/net/bpfdesc.h Wed Aug 12 17:28:53 2009 (r196150) @@ -72,9 +72,7 @@ struct bpf_d { u_long bd_rtout; /* Read timeout in 'ticks' */ struct bpf_insn *bd_rfilter; /* read filter code */ struct bpf_insn *bd_wfilter; /* write filter code */ -#ifdef BPF_JITTER - bpf_jit_filter *bd_bfilter; /* binary filter code */ -#endif + void *bd_bfilter; /* binary filter code */ u_int64_t bd_rcount; /* number of packets received */ u_int64_t bd_dcount; /* number of packets dropped */ From jkim at FreeBSD.org Wed Aug 12 17:45:56 2009 From: jkim at FreeBSD.org (Jung-uk Kim) Date: Wed Aug 12 17:46:14 2009 Subject: svn commit: r196151 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908121745.n7CHjtFw071946@svn.freebsd.org> Author: jkim Date: Wed Aug 12 17:45:55 2009 New Revision: 196151 URL: http://svn.freebsd.org/changeset/base/196151 Log: MFC: r196150 Always embed pointer to BPF JIT function in BPF descriptor to avoid inconsistency when opt_bpf.h is not included. Reviewed by: rwatson Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/bpf.c stable/8/sys/net/bpf_buffer.c stable/8/sys/net/bpf_zerocopy.c stable/8/sys/net/bpfdesc.h stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/net/bpf.c ============================================================================== --- stable/8/sys/net/bpf.c Wed Aug 12 17:28:53 2009 (r196150) +++ stable/8/sys/net/bpf.c Wed Aug 12 17:45:55 2009 (r196151) @@ -1585,6 +1585,9 @@ void bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen) { struct bpf_d *d; +#ifdef BPF_JITTER + bpf_jit_filter *bf; +#endif u_int slen; int gottime; struct timeval tv; @@ -1601,8 +1604,9 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, * the interface pointers on the mbuf to figure it out. */ #ifdef BPF_JITTER - if (bpf_jitter_enable != 0 && d->bd_bfilter != NULL) - slen = (*(d->bd_bfilter->func))(pkt, pktlen, pktlen); + bf = bpf_jitter_enable != 0 ? d->bd_bfilter : NULL; + if (bf != NULL) + slen = (*(bf->func))(pkt, pktlen, pktlen); else #endif slen = bpf_filter(d->bd_rfilter, pkt, pktlen, pktlen); @@ -1634,6 +1638,9 @@ void bpf_mtap(struct bpf_if *bp, struct mbuf *m) { struct bpf_d *d; +#ifdef BPF_JITTER + bpf_jit_filter *bf; +#endif u_int pktlen, slen; int gottime; struct timeval tv; @@ -1655,11 +1662,10 @@ bpf_mtap(struct bpf_if *bp, struct mbuf BPFD_LOCK(d); ++d->bd_rcount; #ifdef BPF_JITTER + bf = bpf_jitter_enable != 0 ? d->bd_bfilter : NULL; /* XXX We cannot handle multiple mbufs. */ - if (bpf_jitter_enable != 0 && d->bd_bfilter != NULL && - m->m_next == NULL) - slen = (*(d->bd_bfilter->func))(mtod(m, u_char *), - pktlen, pktlen); + if (bf != NULL && m->m_next == NULL) + slen = (*(bf->func))(mtod(m, u_char *), pktlen, pktlen); else #endif slen = bpf_filter(d->bd_rfilter, (u_char *)m, pktlen, 0); Modified: stable/8/sys/net/bpf_buffer.c ============================================================================== --- stable/8/sys/net/bpf_buffer.c Wed Aug 12 17:28:53 2009 (r196150) +++ stable/8/sys/net/bpf_buffer.c Wed Aug 12 17:45:55 2009 (r196151) @@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* Modified: stable/8/sys/net/bpf_zerocopy.c ============================================================================== --- stable/8/sys/net/bpf_zerocopy.c Wed Aug 12 17:28:53 2009 (r196150) +++ stable/8/sys/net/bpf_zerocopy.c Wed Aug 12 17:45:55 2009 (r196151) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: stable/8/sys/net/bpfdesc.h ============================================================================== --- stable/8/sys/net/bpfdesc.h Wed Aug 12 17:28:53 2009 (r196150) +++ stable/8/sys/net/bpfdesc.h Wed Aug 12 17:45:55 2009 (r196151) @@ -72,9 +72,7 @@ struct bpf_d { u_long bd_rtout; /* Read timeout in 'ticks' */ struct bpf_insn *bd_rfilter; /* read filter code */ struct bpf_insn *bd_wfilter; /* write filter code */ -#ifdef BPF_JITTER - bpf_jit_filter *bd_bfilter; /* binary filter code */ -#endif + void *bd_bfilter; /* binary filter code */ u_int64_t bd_rcount; /* number of packets received */ u_int64_t bd_dcount; /* number of packets dropped */ From qingli at FreeBSD.org Wed Aug 12 19:15:28 2009 From: qingli at FreeBSD.org (Qing Li) Date: Wed Aug 12 19:15:34 2009 Subject: svn commit: r196152 - head/sys/netinet6 Message-ID: <200908121915.n7CJFRRu073946@svn.freebsd.org> Author: qingli Date: Wed Aug 12 19:15:26 2009 New Revision: 196152 URL: http://svn.freebsd.org/changeset/base/196152 Log: A piece of code was added to install a host route when an IPv6 interface address is configured with a /128 prefix. This is no longer necessary due to r192011. In fact that code conflicts with r192011. This patch removes the host route installation when detecting the /128 prefix, and instead let the code added by r192011 to install the loopback route for that IPv6 interface address. Reviewed by: bz Approved by: re Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Wed Aug 12 17:45:55 2009 (r196151) +++ head/sys/netinet6/in6.c Wed Aug 12 19:15:26 2009 (r196152) @@ -1750,21 +1750,12 @@ in6_ifinit(struct ifnet *ifp, struct in6 * interface that share the same destination. */ plen = in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL); /* XXX */ - if (!(ia->ia_flags & IFA_ROUTE) && plen == 128) { - struct sockaddr *dstaddr; + if (!(ia->ia_flags & IFA_ROUTE) && plen == 128 && + ia->ia_dstaddr.sin6_family == AF_INET6) { int rtflags = RTF_UP | RTF_HOST; - /* - * use the interface address if configuring an - * interface address with a /128 prefix len - */ - if (ia->ia_dstaddr.sin6_family == AF_INET6) - dstaddr = (struct sockaddr *)&ia->ia_dstaddr; - else - dstaddr = (struct sockaddr *)&ia->ia_addr; - error = rtrequest(RTM_ADD, - (struct sockaddr *)dstaddr, + (struct sockaddr *)&ia->ia_dstaddr, (struct sockaddr *)&ia->ia_addr, (struct sockaddr *)&ia->ia_prefixmask, ia->ia_flags | rtflags, NULL); From stas at FreeBSD.org Wed Aug 12 19:48:27 2009 From: stas at FreeBSD.org (Stanislav Sedov) Date: Wed Aug 12 19:48:32 2009 Subject: svn commit: r189117 - head/sys/dev/bce In-Reply-To: <4A7AFFC4.5050607@tomjudge.com> References: <200902271925.n1RJP699080658@svn.freebsd.org> <20090721145559.d2cf3f0b.stas@FreeBSD.org> <4A7AFFC4.5050607@tomjudge.com> Message-ID: <20090812234935.84e5ac74.stas@FreeBSD.org> On Thu, 06 Aug 2009 11:07:32 -0500 Tom Judge mentioned: > > I can confirm that we are also seeing this problem on a number of Dell > PE2950 systems running the bce driver from 7.2, the bug is more > visible/producible on systems that are using Jumbo Frames (in our case 8Kb). > > The symptoms of this are an increase in the requests for jumbo clusters > denied counter at 9k, and then random network stalls which sometimes > recover on there own and others require a reboot. > > We have backed this change and so far it seems to have fixed the issue. > David, are you OK with reverting this patch? I submitted the patch to re@ for review, and I can commit it if you don't mind doing so. :-) -- Stanislav Sedov ST4096-RIPE -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 801 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20090812/60a4fb62/attachment.pgp From rmacklem at FreeBSD.org Wed Aug 12 20:30:28 2009 From: rmacklem at FreeBSD.org (Rick Macklem) Date: Wed Aug 12 20:30:40 2009 Subject: svn commit: r196153 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908122030.n7CKUR1o075657@svn.freebsd.org> Author: rmacklem Date: Wed Aug 12 20:30:27 2009 New Revision: 196153 URL: http://svn.freebsd.org/changeset/base/196153 Log: MFC r196149: Add a check for a NULL mbuf ptr at the beginning of xdrmbuf_inline() so that it returns failure instead of crashing when "m->m_len" is executed and m == NULL. The mbuf ptr can be NULL when a call to xdrmbuf_getbytes() gets the bytes it needs, but they are at the end of a short RPC reply. When this happens, xdrmbuf_getbytes() returns success, but advances the mbuf ptr (xdrs->x_private) to m_next, which is NULL. If this is followed by a call to xdrmbuf_getlong(), it calls xdrmbuf_inline(), which would cause a crash by accessing "m->m_len". Approved by: re (rwatson), kib (mentor) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xdr/xdr_mbuf.c stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/xdr/xdr_mbuf.c ============================================================================== --- stable/8/sys/xdr/xdr_mbuf.c Wed Aug 12 19:15:26 2009 (r196152) +++ stable/8/sys/xdr/xdr_mbuf.c Wed Aug 12 20:30:27 2009 (r196153) @@ -282,6 +282,8 @@ xdrmbuf_inline(XDR *xdrs, u_int len) size_t available; char *p; + if (!m) + return (0); if (xdrs->x_op == XDR_ENCODE) { available = M_TRAILINGSPACE(m) + (m->m_len - xdrs->x_handy); } else { From qingli at FreeBSD.org Wed Aug 12 20:48:53 2009 From: qingli at FreeBSD.org (Qing Li) Date: Wed Aug 12 20:49:10 2009 Subject: svn commit: r196154 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908122048.n7CKmpm3076160@svn.freebsd.org> Author: qingli Date: Wed Aug 12 20:48:50 2009 New Revision: 196154 URL: http://svn.freebsd.org/changeset/base/196154 Log: MFC r196152 A piece of code was added to install a host route when an IPv6 interface address is configured with a /128 prefix. This is no longer necessary due to r192011. In fact that code conflicts with r192011. This patch removes the host route installation when detecting the /128 prefix, and instead let the code added by r192011 to install the loopback route for that IPv6 interface address. Approved by: re Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netinet6/in6.c stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/netinet6/in6.c ============================================================================== --- stable/8/sys/netinet6/in6.c Wed Aug 12 20:30:27 2009 (r196153) +++ stable/8/sys/netinet6/in6.c Wed Aug 12 20:48:50 2009 (r196154) @@ -1750,21 +1750,12 @@ in6_ifinit(struct ifnet *ifp, struct in6 * interface that share the same destination. */ plen = in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL); /* XXX */ - if (!(ia->ia_flags & IFA_ROUTE) && plen == 128) { - struct sockaddr *dstaddr; + if (!(ia->ia_flags & IFA_ROUTE) && plen == 128 && + ia->ia_dstaddr.sin6_family == AF_INET6) { int rtflags = RTF_UP | RTF_HOST; - /* - * use the interface address if configuring an - * interface address with a /128 prefix len - */ - if (ia->ia_dstaddr.sin6_family == AF_INET6) - dstaddr = (struct sockaddr *)&ia->ia_dstaddr; - else - dstaddr = (struct sockaddr *)&ia->ia_addr; - error = rtrequest(RTM_ADD, - (struct sockaddr *)dstaddr, + (struct sockaddr *)&ia->ia_dstaddr, (struct sockaddr *)&ia->ia_addr, (struct sockaddr *)&ia->ia_prefixmask, ia->ia_flags | rtflags, NULL); From sam at FreeBSD.org Wed Aug 12 21:03:21 2009 From: sam at FreeBSD.org (Sam Leffler) Date: Wed Aug 12 21:03:34 2009 Subject: svn commit: r196155 - head/share/man/man9 Message-ID: <200908122103.n7CL3Hpw076548@svn.freebsd.org> Author: sam Date: Wed Aug 12 21:03:16 2009 New Revision: 196155 URL: http://svn.freebsd.org/changeset/base/196155 Log: First (early) draft of net80211 documentation. Note this is focused on driver writers (as opposed to folks adding to net80211). Reviewed by: wkoszek Approved by: re (rwatson) Added: head/share/man/man9/ieee80211_amrr.9 (contents, props changed) head/share/man/man9/ieee80211_beacon.9 (contents, props changed) head/share/man/man9/ieee80211_bmiss.9 (contents, props changed) head/share/man/man9/ieee80211_ddb.9 (contents, props changed) head/share/man/man9/ieee80211_regdomain.9 (contents, props changed) head/share/man/man9/ieee80211_scan.9 (contents, props changed) head/share/man/man9/ieee80211_vap.9 (contents, props changed) Deleted: head/share/man/man9/ieee80211_ioctl.9 Modified: head/share/man/man9/Makefile head/share/man/man9/ieee80211.9 head/share/man/man9/ieee80211_crypto.9 head/share/man/man9/ieee80211_input.9 head/share/man/man9/ieee80211_node.9 head/share/man/man9/ieee80211_output.9 head/share/man/man9/ieee80211_proto.9 head/share/man/man9/ieee80211_radiotap.9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Wed Aug 12 20:48:50 2009 (r196154) +++ head/share/man/man9/Makefile Wed Aug 12 21:03:16 2009 (r196155) @@ -121,13 +121,19 @@ MAN= accept_filter.9 \ hashinit.9 \ hexdump.9 \ ieee80211.9 \ + ieee80211_amrr.9 \ + ieee80211_beacon.9 \ + ieee80211_bmiss.9 \ ieee80211_crypto.9 \ + ieee80211_ddb.9 \ ieee80211_input.9 \ - ieee80211_ioctl.9 \ ieee80211_node.9 \ ieee80211_output.9 \ ieee80211_proto.9 \ ieee80211_radiotap.9 \ + ieee80211_regdomain.9 \ + ieee80211_scan.9 \ + ieee80211_vap.9 \ ifnet.9 \ inittodr.9 \ insmntque.9 \ @@ -627,52 +633,62 @@ MLINKS+=hash.9 hash32.9 \ MLINKS+=hashinit.9 hashdestroy.9 \ hashinit.9 hashinit_flags.9 \ hashinit.9 phashinit.9 -MLINKS+=ieee80211.9 ieee80211_attach.9 \ - ieee80211.9 ieee80211_chan2ieee.9 \ - ieee80211.9 ieee80211_chan2mode.9 \ - ieee80211.9 ieee80211_ieee2mhz.9 \ - ieee80211.9 ieee80211_ifattach.9 \ - ieee80211.9 ieee80211_ifdetach.9 \ - ieee80211.9 ieee80211_media2rate.9 \ - ieee80211.9 ieee80211_media_change.9 \ - ieee80211.9 ieee80211_media_init.9 \ - ieee80211.9 ieee80211_media_status.9 \ - ieee80211.9 ieee80211_mhz2ieee.9 \ - ieee80211.9 ieee80211_rate2media.9 \ - ieee80211.9 ieee80211_setmode.9 \ - ieee80211.9 ieee80211_watchdog.9 -MLINKS+=ieee80211_crypto.9 ieee80211_crypto_attach.9 \ - ieee80211_crypto.9 ieee80211_crypto_detach.9 \ - ieee80211_crypto.9 ieee80211_wep_crypt.9 -MLINKS+=ieee80211_input.9 ieee80211_decap.9 \ - ieee80211_input.9 ieee80211_recv_mgmt.9 -MLINKS+=ieee80211_ioctl.9 ieee80211_cfgget.9 \ - ieee80211_ioctl.9 ieee80211_cfgset.9 -MLINKS+=ieee80211_node.9 ieee80211_alloc_node.9 \ - ieee80211_node.9 ieee80211_begin_scan.9 \ - ieee80211_node.9 ieee80211_create_ibss.9 \ - ieee80211_node.9 ieee80211_dup_bss.9 \ - ieee80211_node.9 ieee80211_end_scan.9 \ - ieee80211_node.9 ieee80211_find_node.9 \ - ieee80211_node.9 ieee80211_free_allnodes.9 \ +MLINKS+=ieee80211.9 ieee80211_ifattach.9 \ + ieee80211.9 ieee80211_ifdetach.9 +MLINKS+=ieee80211_amrr.9 ieee80211_amrr_init.9 \ + ieee80211_amrr.9 ieee80211_amrr_cleanup.9 \ + ieee80211_amrr.9 ieee80211_amrr_setinterval.9 \ + ieee80211_amrr.9 ieee80211_amrr_node_init.9 \ + ieee80211_amrr.9 ieee80211_amrr_tx_complete.9 \ + ieee80211_amrr.9 ieee80211_amrr_tx_update.9 +MLINKS+=ieee80211_beacon.9 ieee80211_beacon_alloc.9 \ + ieee80211_beacon.9 ieee80211_beacon_update.9 \ + ieee80211_beacon.9 ieee80211_beacon_notify.9 +MLINKS+=ieee80211_bmiss.9 ieee80211_beacon_miss.9 +MLINKS+=ieee80211_crypto.9 ieee80211_key_update_begin.9 \ + ieee80211_crypto.9 ieee80211_key_update_end.9 \ + ieee80211_crypto.9 ieee80211_crypto_newkey.9 \ + ieee80211_crypto.9 ieee80211_crypto_setkey.9 \ + ieee80211_crypto.9 ieee80211_crypto_delglobalkeys.9 \ + ieee80211_crypto.9 ieee80211_crypto_reload_keys.9 \ + ieee80211_crypto.9 ieee80211_crypto_decap.9 \ + ieee80211_crypto.9 ieee80211_crypto_encap.9 \ + ieee80211_crypto.9 ieee80211_crypto_demic.9 \ + ieee80211_crypto.9 ieee80211_crypto_enmic.9 \ + ieee80211_crypto.9 ieee80211_notify_michael_failure.9 \ + ieee80211_crypto.9 ieee80211_notify_replay_failure.9 \ + ieee80211_crypto.9 ieee80211_crypto_register.9 \ + ieee80211_crypto.9 ieee80211_crypto_unregister.9 \ + ieee80211_crypto.9 ieee80211_crypto_available.9 +MLINKS+=ieee80211_input.9 ieee80211_input_all.9 +MLINKS+=ieee80211_node.9 ieee80211_find_rxnode.9 \ + ieee80211_node.9 ieee80211_find_rxnode_withkey.9 \ + ieee80211_node.9 ieee80211_ref_node.9 \ + ieee80211_node.9 ieee80211_unref_node.9 \ ieee80211_node.9 ieee80211_free_node.9 \ ieee80211_node.9 ieee80211_iterate_nodes.9 \ - ieee80211_node.9 ieee80211_lookup_node.9 \ - ieee80211_node.9 ieee80211_next_scan.9 \ - ieee80211_node.9 ieee80211_node_attach.9 \ - ieee80211_node.9 ieee80211_node_detach.9 \ - ieee80211_node.9 ieee80211_node_lateattach.9 \ - ieee80211_node.9 ieee80211_timeout_nodes.9 -MLINKS+=ieee80211_output.9 ieee80211_add_rates.9 \ - ieee80211_output.9 ieee80211_add_xrates.9 \ - ieee80211_output.9 ieee80211_encap.9 \ - ieee80211_output.9 ieee80211_send_mgmt.9 -MLINKS+=ieee80211_proto.9 ieee80211_dump_pkt.9 \ - ieee80211_proto.9 ieee80211_fix_rate.9 \ - ieee80211_proto.9 ieee80211_print_essid.9 \ - ieee80211_proto.9 ieee80211_proto_attach.9 \ - ieee80211_proto.9 ieee80211_proto_detach.9 -MLINKS+=ieee80211_radiotap.9 radiotap.9 + ieee80211_node.9 ieee80211_dump_node.9 \ + ieee80211_node.9 ieee80211_dump_nodes.9 +MLINKS+=ieee80211_output.9 M_WME_GETAC.9 \ + ieee80211_output.9 M_SEQNO_GET.9 \ + ieee80211_output.9 ieee80211_process_callback.9 +MLINKS+=ieee80211_proto.9 ieee80211_new_state.9 \ + ieee80211_proto.9 ieee80211_start_all.9 \ + ieee80211_proto.9 ieee80211_stop_all.9 \ + ieee80211_proto.9 ieee80211_suspend_all.9 \ + ieee80211_proto.9 ieee80211_resume_all.9 \ + ieee80211_proto.9 ieee80211_waitfor_parent.9 +MLINKS+=ieee80211_radiotap.9 radiotap.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_attach.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_active_vap.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_active.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_tx.9 +MLINKS+=ieee80211_regdomain.9 ieee80211_init_channels.9 \ + ieee80211_regdomain.9 ieee80211_sort_channels.9 \ + ieee80211_regdomain.9 ieee80211_alloc_countryie.9 +MLINKS+=ieee80211_vap.9 ieee80211_vap_setup.9 \ + ieee80211_vap.9 ieee80211_vap_attach.9 \ + ieee80211_vap.9 ieee80211_vap_detach.9 MLINKS+=ifnet.9 ifaddr.9 \ ifnet.9 if_data.9 \ ifnet.9 ifqueue.9 Modified: head/share/man/man9/ieee80211.9 ============================================================================== --- head/share/man/man9/ieee80211.9 Wed Aug 12 20:48:50 2009 (r196154) +++ head/share/man/man9/ieee80211.9 Wed Aug 12 21:03:16 2009 (r196155) @@ -1,6 +1,5 @@ .\" -.\" Copyright (c) 2004 Bruce M. Simpson -.\" Copyright (c) 2004 Darron Broad +.\" Copyright (c) 2009 Sam Leffler, Errno Consulting .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,236 +24,538 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.\" $Id: ieee80211.9,v 1.5 2004/03/04 12:33:27 bruce Exp $ .\" -.Dd March 2, 2004 -.Dt IEEE80211 9 +.Dd August 4, 2009 +.Dt NET80211 9 .Os .Sh NAME -.Nm ieee80211_ifattach , ieee80211_ifdetach , -.Nm ieee80211_mhz2ieee , ieee80211_chan2ieee , ieee80211_ieee2mhz , -.Nm ieee80211_media_init , ieee80211_media_change , ieee80211_media_status , -.Nm ieee80211_watchdog , -.Nm ieee80211_setmode , ieee80211_chan2mode , -.Nm ieee80211_rate2media , ieee80211_media2rate -.Nd core 802.11 network stack functions +.Nm net80211 +.Nd 802.11 network layer .Sh SYNOPSIS .In net80211/ieee80211_var.h -.In net80211/ieee80211_proto.h .Ft void -.Fn ieee80211_ifattach "struct ifnet *ifp" +.Fn ieee80211_ifattach "struct ieee80211com *ic" "const uint8_t macaddr[IEEE80211_ADDR_LEN]" .Ft void -.Fn ieee80211_ifdetach "struct ifnet *ifp" -.Ft u_int -.Fn ieee80211_mhz2ieee "u_int freq" "u_int flags" -.Ft u_int -.Fn ieee80211_chan2ieee "struct ieee80211com *ic" "struct ieee80211_channel *c" -.Ft u_int -.Fn ieee80211_ieee2mhz "u_int chan" "u_int flags" -.Ft void -.Fo ieee80211_media_init -.Fa "struct ifnet *ifp" "ifm_change_cb_t media_change" -.Fa "ifm_stat_cb_t media_stat" -.Fc -.Fa int -.Fn ieee80211_media_change "struct ifnet *ifp" -.Fa void -.Fn ieee80211_media_status "struct ifnet *ifp" "struct ifmediareq *imr" -.Ft void -.Fn ieee80211_watchdog "struct ifnet *ifp" -.Ft int -.Fn ieee80211_setmode "struct ieee80211com *ic" "enum ieee80211_phymode mode" -.Ft enum ieee80211_phymode -.Fo ieee80211_chan2mode -.Fa "struct ieee80211com *ic" "struct ieee80211_channel *chan" -.Fc -.Ft int -.Fo ieee80211_rate2media -.Fa "struct ieee80211com *ic" "int rate" "enum ieee80211_phymode mode" -.Fc -.Ft int -.Fn ieee80211_media2rate "int mword" +.Fn ieee80211_ifdetach "struct ieee80211com *ic" .Sh DESCRIPTION -The -.Nm ieee80211 -collection of functions are used to manage wireless network interfaces in the -system which use the system's software 802.11 network stack. -Most of these functions require that attachment to the stack is performed -before calling. -Several utility functions are also provided; these are safe to call from -any driver without prior initialization. +IEEE 802.11 device drivers are written to use the infrastructure provided +by the +.Nm +software layer. +This software provides a support framework for drivers that includes +ifnet cloning, state management, and a user management API by which +applications interact with 802.11 devices. +Most drivers depend on the +.Nm +layer for protocol services but devices that off-load functionality +may bypass the layer to connect directly to the device +(e.g. the +.Xr ndis 4 +emulation support does this). +.Pp +A +.Nm +device driver implements a virtual radio API that is exported to +users through network interfaces (aka vaps) that are cloned from the +underlying device. +These interfaces have an operating mode +(station, adhoc, hostap, wds, monitor, etc.) +that is fixed for the lifetime of the interface. +Devices that can support multiple concurrent interfaces allow +multiple vaps to be cloned. +This enables construction of interesting applications such as +an AP vap and one or more WDS vaps +or multiple AP vaps, each with a different security model. +The +.Nm +layer virtualizes most 802.11 state +and coordinates vap state changes including scheduling multiple vaps. +State that is not virtualized includes the current channel and +WME/WMM parameters. +Protocol processing is typically handled entirely in the +.Nm +layer with drivers responsible purely for moving data between the host +and device. +Similarly, +.Nm +handles most +.Xr ioctl 2 +requests without entering the driver; +instead drivers are notified of state changes that +require their involvement. +.Pp +The virtual radio interface defined by the +.Nm +layer means that drivers must be structured to follow specific rules. +Drivers that support only a single interface at any time must still +follow these rules. +.Sh DATA STRUCTURES +The virtual radio architecture splits state between a single per-device +.Vt ieee80211com +structure and one or more +.Vt ieee80211vap +structures. +Drivers are expected to setup various shared state in these structures +at device attach and during vap creation but otherwise should treat them +as read-only. +The +.Vt ieee80211com +structure is allocated by the +.Nm +layer as adjunct data to a device's +.Vt ifnet ; +it is accessed through the +.Vt if_l2com +structure member. +The +.Vt ieee80211vap +structure is allocated by the driver in the +.Dq vap create +method +and should be extended with any driver-private state. +This technique of giving the driver control to allocate data structures +is used for other +.Nm +data structures and should be exploited to maintain driver-private state +together with public +.Nm +state. +.Pp +The other main data structures are the station, or node, table +that tracks peers in the local BSS, and the channel table that defines +the current set of available radio channels. +Both tables are bound to the +.Vt ieee80211com +structure and shared by all vaps. +Long-lasting references to a node are counted to guard against +premature reclamation. +In particular every packet sent/received holds a node reference +(either explicitly for transmit or implicitly on receive). .Pp -.\" -The -.Fn ieee80211_ifattach -function attaches the network interface -.Fa ifp -to the 802.11 network stack layer. -This function must be called before using any of the -.Nm ieee80211 -functions which need to store driver state across invocations; The -.Vt struct ifnet -instance pointed to by -.Fa ifp -MUST be an instance of -.Vt struct ieee80211com , -with various fields initialized to tell -.Nm ieee80211 -about its capabilities. -This function performs Ethernet and BPF attachment (by calling -.Fn ether_ifattach +.Vt ieee80211com and -.Fn bpfattach2 ) -on behalf of the caller. -It also implements the -.Vt ifmedia -interface. +.Vt ieee80211vap +structures also hold a collection of method pointers that drivers +fill-in and/or override to take control of certain operations. +These methods are the primary way drivers are bound to the +.Nm +layer and are described below. +.Sh DRIVER ATTACH/DETACH +Drivers attach to the +.Nm +layer with the +.Fn ieee80211_ifattach +function. +The driver is expected to allocate and setup any device-private +data structures before passing control. +The +.Vt ieee80211com +structure must be pre-initialized with state required to setup the +.Nm +layer: +.Bl -tag -width ic_channels +.It Dv ic_ifp +Backpointer to the physical device's ifnet. +.It Dv ic_caps +Device/driver capabilities; see below for a complete description. +.It Dv ic_channels +Table of channels the device is capable of operating on. +This is initially provided by the driver but may be changed +through calls that change the regulatory state. +.It Dv ic_nchan +Number of entries in +.Dv ic_channels . +.El .Pp -.\" -The +On return from +.Fn ieee80211_ifattach +the driver is expected to override default callback functions in the +.Vt ieee80211com +structure to register it's private routines. +Methods marked with a +.Dq * +must be provided by the driver. +.Bl -tag -width ic_channels +.It Dv ic_vap_create* +Create a vap instance of the specified type (operating mode). +Any fixed BSSID and/or MAC address is provided. +Drivers that support multi-bssid operation may honor the requested BSSID +or assign their own. +.It Dv ic_vap_delete* +Destroy a vap instance created with +.Dv ic_vap_create . +.It Dv ic_getradiocaps +Return the list of calibrated channels for the radio. +The default method returns the current list of channels +(space permitting). +.It Dv ic_setregdomain +Process a request to change regulatory state. +The routine may reject a request or constrain changes (e.g. reduce +transmit power caps). +The default method accepts all proposed changes. +.It Dv ic_send_mgmt +Send an 802.11 management frame. +The default method fabricates the frame using +.Nm +state and passes it to the driver through the +.Dv ic_raw_xmit +method. +.It Dv ic_raw_xmit +Transmit a raw 802.11 frame. +The default method drops the frame and generates a message on the console. +.It Dv ic_updateslot +Update hardware state after an 802.11 IFS slot time change, +There is no default method; the pointer may be NULL in which case +it will not be used. +.It Dv ic_update_mcast +Update hardware for a change in the multicast packet filter, +The default method prints a console message. +.It Dv ic_update_promisc +Update hardware for a change in the promiscuous mode setting. +The default method prints a console message. +.It Dv ic_newassoc +Update driver/device state for association to a new AP (in station mode) +or when a new station associates (e.g. in AP mode). +There is no default method; the pointer may be NULL in which case +it will not be used. +.It Dv ic_node_alloc +Allocate and initialize a +.Vt ieee80211_node +structure. +This method cannot sleep. +The default method allocates zero'd memory using +.Xr malloc 9. +Drivers should override this method to allocate extended storage +for their own needs. +Memory allocated by the driver must be tagged with +.Dv M_80211_NODE +to balance the memory allocation statistics. +.It Dv ic_node_free +Reclaim storage of a node allocated by +.Dv ic_node_alloc . +Drivers are expected to +.Em interpose +their own method to cleanup private state but must call through +this method to allow +.Nm +to reclaim it's private state. +.It Dv ic_node_cleanup +Cleanup state in a +.Vt ieee80211_node +created by +.Dv ic_node_alloc . +This operation is distinguished from +.Dv ic_node_free +in that it may be called long before the node is actually reclaimed +to cleanup adjunct state. +This can happen, for example, when a node must not be reclaimed +due to references held by packets in the transmit queue. +Drivers typically interpose +.Dv ic_node_cleanup +instead of +.Dv ic_node_free . +.It Dv ic_node_age +Age, and potentially reclaim, resources associated with a node. +The default method ages frames on the power-save queue (in AP mode) +and pending frames in the receive reorder queues (for stations using A-MPDU). +.It Dv ic_node_drain +Reclaim all optional resources associated with a node. +This call is used to free up resources when they are in short supply, +.It Dv ic_node_getrssi +Return the Receive Signal Strength Indication (RSSI) in .5 dBm units for +the specified node. +This interface returns a subset of the information +returned by +.Dv ic_node_getsignal , +The default method calculates a filtered average over the last ten +samples passed in to +.Xr ieee80211_input 9 +or +.Xr ieee80211_input_all 9 . +.It Dv ic_node_getsignal +Return the RSSI and noise floor (in .5 dBm units) for a station. +The default method calculates RSSI as described above; +the noise floor returned is the last value supplied to +.Xr ieee80211_input 9 +or +.Xr ieee80211_input_all 9 . +.It Dv ic_node_getmimoinfo +Return MIMO radio state for a station in support of the +.Dv IEEE80211_IOC_STA_INFO +ioctl request. +The default method returns nothing. +.It Dv ic_scan_start* +Prepare driver/hardware state for scanning. +This callback is done in a sleepable context. +.It Dv ic_scan_end* +Restore driver/hardware state after scanning completes. +This callback is done in a sleepable context. +.It Dv ic_set_channel* +Set the current radio channel using +.Vt ic_curchan . +This callback is done in a sleepable context. +.It Dv ic_scan_curchan +Start scanning on a channel. +This method is called immediately after each channel change +and must initiate the work to scan a channel and schedule a timer +to advance to the next channel in the scan list. +This callback is done in a sleepable context. +The default method handles active scan work (e.g. sending ProbRequest +frames), and schedules a call to +.Xr ieee80211_scan_next 9 +according to the maximum dwell time for the channel. +Drivers that off-load scan work to firmware typically use this method +to trigger per-channel scan activity. +.It Dv ic_scan_mindwell +Handle reaching the minimum dwell time on a channel when scanning. +This event is triggered when one or more stations have been found on +a channel and the minimum dwell time has been reached. +This callback is done in a sleepable context. +The default method signals the scan machinery to advance +to the next channel as soon as possible. +Drivers can use this method to preempt further work (e.g. if scanning +is handled by firmware) or ignore the request to force maximum dwell time +on a channel. +.It Dv ic_recv_action +Process a received Action frame. +The default method points to +.Xr ieee80211_recv_action 9 +which provides a mechanism for setting up handlers for each Action frame class. +.It Dv ic_send_action +Transmit an Action frame. +The default method points to +.Xr ieee80211_send_action 9 +which provides a mechanism for setting up handlers for each Action frame class. +.It Dv ic_ampdu_enable +Check if transmit A-MPDU should be enabled for the specified station and AC. +The default method checks a per-AC traffic rate against a per-vap +threshold to decide if A-MPDU should be enabled. +This method also rate-limits ADDBA requests so that requests are not +made too frequently when a receiver has limited resources. +.It Dv ic_addba_request +Request A-MPDU transmit aggregation. +The default method sets up local state and issues an +ADDBA Request Action frame. +Drivers may interpose this method if they need to setup private state +for handling transmit A-MPDU. +.It Dv ic_addb_response +Process a received ADDBA Response Action frame and setup resources as +needed for doing transmit A-MPDU, +.It Dv ic_addb_stop +Shutdown an A-MPDU transmit stream for the specified station and AC. +The default method reclaims local state after sending a DelBA Action frame. +.It Dv ic_bar_response +Process a response to a transmitted BAR control frame. +.It Dv ic_ampdu_rx_start +Prepare to receive A-MPDU data from the specified station for the TID. +.It Dv ic_ampdu_rx_stop +Terminate receipt of A-MPDU data from the specified station for the TID. +.El +.Pp +Once the +.Nm +layer is attached to a driver there are two more steps typically done +to complete the work: +.Bl -enum +.It +Setup +.Dq radiotap support +for capturing raw 802.11 packets that pass through the device. +This is done with a call to +.Xr ieee80211_radiotap_attach 9 . +.It +Do any final device setup like enabling interrupts. +.El +.Pp +State is torn down and reclaimed with a call to +.Fn ieee80211_ifdetach . +Note this call may result in multiple callbacks into the driver +so it should be done before any critical driver state is reclaimed. +On return from .Fn ieee80211_ifdetach -function frees any -.Nm ieee80211 -structures associated with the driver, and performs Ethernet and BPF -detachment on behalf of the caller. -.Pp -.\" -The -.Fn ieee80211_mhz2ieee -utility function converts the frequency -.Fa freq -(specified in MHz) to an IEEE 802.11 channel number. -The -.Fa flags -argument is a hint which specifies whether the frequency is in -the 2GHz ISM band -.Pq Vt IEEE80211_CHAN_2GHZ -or the 5GHz band -.Pq Vt IEEE80211_CHAN_5GHZ ; -appropriate clipping of the result is then performed. -.Pp -.\" -The -.Fn ieee80211_chan2ieee -function converts the channel specified in -.Fa *c -to an IEEE channel number for the driver -.Fa ic . -If the conversion would be invalid, an error message is printed to the -system console. -This function REQUIRES that the driver is hooked up to the -.Nm ieee80211 -subsystem. -.Pp -.\" -The -.Fn ieee80211_ieee2mhz -utility function converts the IEEE channel number -.Ft chan -to a frequency (in MHz). -The -.Fa flags -argument is a hint which specifies whether the frequency is in -the 2GHz ISM band -.Pq Vt IEEE80211_CHAN_2GHZ -or the 5GHz band -.Pq Vt IEEE80211_CHAN_5GHZ ; -appropriate clipping of the result is then performed. -.Pp -.\" -The -.Fn ieee80211_media_init -function initializes media data structures used by the -.Vt ifmedia -interface, for the driver -.Fa ifp . -It must be called by the driver after calling -.Fn ieee80211_attach -and before calling most -.Nm ieee80211 -functions. -The -.Fa media_change -and -.Fa media_stat -arguments specify helper functions which will be invoked by the -.Vt ifmedia -framework when the user changes or queries media options, -using a command such as -.Xr ifconfig 8 . -.Pp -.\" -The -.Fn ieee80211_media_status +all associated vaps and ifnet structures are reclaimed or inaccessible +to user applications so it is safe to teardown driver state without +worry about being re-entered. +The driver is responsible for calling +.Xr if_free 9 +on the ifnet it allocated for the physical device. +.Sh DRIVER CAPABILITIES +Driver/device capabilities are specified using several sets of flags +in the +.Vt ieee80211com +structure. +General capabilities are specified by +.Vt ic_caps . +Hardware cryptographic capabilities are specified by +.Vt ic_cryptocaps . +802.11n capabilities, if any, are specified by +.Vt ic_htcaps . +The +.Nm +layer propagates a subset of these capabilities to each vap through +the equivalent fields: +.Vt iv_caps , +.Vt iv_cryptocaps , and -.Fn ieee80211_media_change -functions are device-independent handlers for -.Vt ifmedia -commands and are not intended to be called directly. -.Pp -.\" -The -.Fn ieee80211_watchdog -function is intended to be called from a driver's -.Va if_watchdog -routine. -It is used to perform periodic cleanup of state within the software 802.11 -stack, as well as timing out scans. -.Pp -.\" -The -.Fn ieee80211_setmode -function is called from within the 802.11 stack to change the mode -of the driver's PHY; it is not intended to be called directly. -.Pp -.\" -The -.Fn ieee80211_chan2mode -function returns the PHY mode required for use with the channel -.Fa chan -on the device -.Fa ic . -This is typically used when selecting a rate set, to be advertised in -beacons, for example. -.Pp -.\" -The -.Fn ieee80211_rate2media -function converts the bit rate -.Fa rate -(measured in units of 0.5Mbps) to an -.Vt ifmedia -sub-type, for the device -.Fa ic -running in PHY mode -.Fa mode . -The -.Fn ieee80211_media2rate -performs the reverse of this conversion, returning the bit rate (in 0.5Mbps -units) corresponding to an -.Vt ifmedia -sub-type. -.\" +.Vt iv_htcaps . +The following general capabilities are defined: +.Bl -tag -width IEEE80211_C_8023ENCAP +.It Dv IEEE80211_C_STA +Device is capable of operating in station (aka Infrastructure) mode. +.It Dv IEEE80211_C_8023ENCAP +Device requires 802.3-encapsulated frames be passed for transmit. +By default +.Nm +will encapsulate all outbound frames as 802.11 frames (without a PLCP header). +.It Dv IEEE80211_C_FF +Device supports Atheros Fast-Frames. +.It Dv IEEE80211_C_TURBOP +Device supports Atheros Dynamic Turbo mode. +.It Dv IEEE80211_C_IBSS +Device is capable of operating in adhoc/IBSS mode. +.It Dv IEEE80211_C_PMGT +Device supports dynamic power-management (aka power save) in station mode. +.It Dv IEEE80211_C_HOSTAP +Device is capable of operating as an Access Point in Infrastructure mode. +.It Dv IEEE80211_C_AHDEMO +Device is capable of operating in Adhoc Demo mode. +In this mode the device is used purely to send/receive raw 802.11 frames. +.It Dv IEEE80211_C_SWRETRY +Device supports software retry of transmitted frames. +.It Dv IEEE80211_C_TXPMGT +Device support dynamic transmit power changes on transmitted frames; +also known as Transmit Power Control (TPC). +.It Dv IEEE80211_C_SHSLOT +Device supports short slot time operation (for 802.11g). +.It Dv IEEE80211_C_SHPREAMBLE +Device supports short preamble operation (for 802.11g). +.It Dv IEEE80211_C_MONITOR +Device is capable of operating in monitor mode. +.It Dv IEEE80211_C_DFS +Device supports radar detection and/or DFS. +DFS protocol support can be handled by +.Nm +but the device must be capable of detecting radar events. +.It Dv IEEE80211_C_MBSS +Device is capable of operating in MeshBSS (MBSS) mode +(as defined by 802.11s Draft 3.0). +.It Dv IEEE80211_C_WPA1 +Device supports WPA1 operation. +.It Dv IEEE80211_C_WPA2 +Device supports WPA2/802.11i operation. +.It Dv IEEE80211_C_BURST +Device supports frame bursting. +.It Dv IEEE80211_C_WME +Device supports WME/WMM operation +(at the moment this is mostly support for sending and receiving +QoS frames with EDCF). +.It Dv IEEE80211_C_WDS +Device supports transmit/receive of 4-address frames. +.It Dv IEEE80211_C_BGSCAN +Device supports background scanning. +.It Dv IEEE80211_C_TXFRAG +Device supports transmit of fragmented 802.11 frames. +.It Dv IEEE80211_C_TDMA +Device is capable of operating in TDMA mode. +.El +.Pp +The follow general crypto capabilities are defined. +In general +.Nm +will fall-back to software support when a device is not capable +of hardware acceleration of a cipher. +This can be done on a per-key basis. +.Nm +can also handle software +.Dv Michael +calculation combined with hardware +.Dv AES +acceleration. +.Bl -tag -width IEEE80211_C_8023ENCAP +.It Dv IEEE80211_CRYPTO_WEP +Device supports hardware WEP cipher. +.It Dv IEEE80211_CRYPTO_TKIP +Device supports hardware TKIP cipher. +.It Dv IEEE80211_CRYPTO_AES_OCB +Device supports hardware AES-OCB cipher. +.It Dv IEEE80211_CRYPTO_AES_CCM +Device supports hardware AES-CCM cipher. +.It Dv IEEE80211_CRYPTO_TKIPMIC +Device supports hardware Michael for use with TKIP. +.It Dv IEEE80211_CRYPTO_CKIP +Devices supports hardware CKIP cipher. +.El +.Pp +The follow general 802.11n capabilities are defined. +The first capabilities are defined exactly as they appear in the +802.11n specification. +Capabilities beginning with IEEE80211_HTC_AMPDU are used soley by the +.Nm +layer. +.Bl -tag -width IEEE80211_C_8023ENCAP +.It Dv IEEE80211_HTCAP_CHWIDTH40 +Device supports 20/40 channel width operation. +.It Dv IEEE80211_HTCAP_SMPS_DYNAMIC +Device supports dynamic SM power save operation. +.It Dv IEEE80211_HTCAP_SMPS_ENA +Device supports static SM power save operation. +.It Dv IEEE80211_HTCAP_GREENFIELD +Device supports Greenfield preamble. +.It Dv IEEE80211_HTCAP_SHORTGI20 +Device supports Short Guard Interval on 20MHz channels. +.It Dv IEEE80211_HTCAP_SHORTGI40 +Device supports Short Guard Interval on 40MHz channels. +.It Dv IEEE80211_HTCAP_TXSTBC +Device supports Space Time Block Convolution (STBC) for transmit. +.It Dv IEEE80211_HTCAP_RXSTBC_1STREAM +Device supports 1 spatial stream for STBC receive. +.It Dv IEEE80211_HTCAP_RXSTBC_2STREAM +Device supports 1-2 spatial streams for STBC receive. +.It Dv IEEE80211_HTCAP_RXSTBC_3STREAM +Device supports 1-3 spatial streams for STBC receive. +.It Dv IEEE80211_HTCAP_MAXAMSDU_7935 +Device supports A-MSDU frames up to 7935 octets. +.It Dv IEEE80211_HTCAP_MAXAMSDU_3839 +Device supports A-MSDU frames up to 3839 octets. +.It Dv IEEE80211_HTCAP_DSSSCCK40 +Device supports use of DSSS/CCK on 40MHz channels. +.It Dv IEEE80211_HTCAP_PSMP +Device supports PSMP. +.It Dv IEEE80211_HTCAP_40INTOLERANT +Device is intolerant of 40MHz wide channel use. +.It Dv IEEE80211_HTCAP_LSIGTXOPPROT +Device supports L-SIG TXOP protection. +.It Dv IEEE80211_HTC_AMPDU +Device supports A-MPDU aggregation. +Note that any 802.11n compliant device must support A-MPDU receive +so this implicitly means support for +.Em transmit +of A-MPDU frames. +.It Dv IEEE80211_HTC_AMSDU +Device supports A-MSDU aggregation. +Note that any 802.11n compliant device must support A-MSDU receive +so this implicitly means support for +.Em transmit +of A-MSDU frames. +.It Dv IEEE80211_HTC_HT +Device supports High Throughput (HT) operation. +This capability must be set to enable 802.11n functionality +in +.Nm . +.It Dv IEEE80211_HTC_SMPS +Device supports MIMO Power Save operation. +.It Dv IEEE80211_HTC_RIFS +Device supports Reduced Inter Frame Spacing (RIFS). +.El .Sh SEE ALSO -.Xr ieee80211_crypto 9 , +.Xr ioctl 2 , +.Xr ndis 4 , .Xr ieee80211_input 9 , -.Xr ieee80211_ioctl 9 , -.Xr ieee80211_node 9 , -.Xr ieee80211_output 9 , -.Xr ieee80211_proto 9 , -.Xr ieee80211_radiotap 9 , -.Xr ifnet 9 -.Sh HISTORY -The -.Nm ieee80211 -series of functions first appeared in -.Nx 1.5 , -and were later ported to -.Fx 4.6 . -.Sh AUTHORS -.An -nosplit -This manual page was written by -.An Bruce M. Simpson Aq bms@FreeBSD.org -and -.An Darron Broad Aq darron@kewl.org . +.Xr ieee80211_input_all 9 , +.Xr ieee80211_scan_next 9 , +.Xr ieee80211_recv_action 9 , +.Xr ieee80211_send_action 9 , +.Xr ieee80211_radiotap_attach 9 , +.Xr ifnet 9 , +.Xr malloc 9 . Added: head/share/man/man9/ieee80211_amrr.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/ieee80211_amrr.9 Wed Aug 12 21:03:16 2009 (r196155) @@ -0,0 +1,194 @@ +.\" +.\" Copyright (c) 2009 Sam Leffler, Errno Consulting +.\" 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 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 AUTHOR 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. +.\" +.\" $FreeBSD$ +.\" +.Dd August 4, 2009 +.Dt IEEE8021_AMRR 9 +.Os +.Sh NAME +.Nm ieee80211_amrr +.Nd 802.11 network driver transmit rate control support +.Sh SYNOPSIS +.In net80211/ieee80211_amrr.h +.Ft void +.Fo ieee80211_amrr_init +.Fa "struct ieee80211_amrr *" +.Fa "struct ieee80211vap *" +.Fa "int amin" +.Fa "int amax" +.Fa "int interval" +.Fc +.\" +.Ft void +.Fn ieee80211_amrr_cleanup "struct ieee80211_amrr *" +.\" +.Ft void +.Fn ieee80211_amrr_setinterval "struct ieee80211_amrr *" "int interval" +.\" +.Ft void +.Fo ieee80211_amrr_node_init +.Fa "struct ieee80211_amrr *" +.Fa "struct ieee80211_amrr_node *" +.Fa "struct ieee80211_node *" +.Fc +.\" +.Ft int +.Fo ieee80211_amrr_choose +.Fa "struct ieee80211_node *" +.Fa "struct ieee80211_amrr_node *" +.Fc +.\" +.Ft void +.Fo ieee80211_amrr_tx_complete +.Fa "struct ieee80211_amrr_node *" +.Fa "int ok" +.Fa "int retries" +.Fc +.\" +.Ft void +.Fo ieee80211_amrr_tx_update +.Fa "struct ieee80211_amrr_node *" +.Fa "int txnct" +.Fa "int success" +.Fa "int retrycnt" +.Fc +.Sh DESCRIPTION +.Nm +is an implementation of the AMRR transmit rate control algorithm +for drivers that use the +.Nm net80211 +software layer. +A rate control algorithm is responsible for choosing the transmit +rate for each frame. +To maximize throughput algorithms try to use the highest rate that +is appropriate for the operating conditions. +The rate will vary as conditions change; the distance between two stations +may change, transient noise may be present that affects signal quality, +etc. +.Nm +uses very simple information from a driver to do it's job: +whether a frame was successfully delivered and how many transmit +attempts were made. +While this enables its use with virtually any wireless device it +limits it's effectiveness--do not expect it to function well in +difficult environments and/or respond quickly to changing conditions. +.Pp +.Nm +requires per-vap state and per-node state for each station it is to +select rates for. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From simon at FreeBSD.org Wed Aug 12 21:05:59 2009 From: simon at FreeBSD.org (Simon L. Nielsen) Date: Wed Aug 12 21:06:11 2009 Subject: svn commit: r196156 - svnadmin/conf Message-ID: <200908122105.n7CL5xAA076659@svn.freebsd.org> Author: simon Date: Wed Aug 12 21:05:58 2009 New Revision: 196156 URL: http://svn.freebsd.org/changeset/base/196156 Log: - Improve matching of paths to reduce risk of matching the wrong branch. - Add stable/8 support. Submitted by: des, Dimitry Andric Modified: svnadmin/conf/mailer.conf Modified: svnadmin/conf/mailer.conf ============================================================================== --- svnadmin/conf/mailer.conf Wed Aug 12 21:03:16 2009 (r196155) +++ svnadmin/conf/mailer.conf Wed Aug 12 21:05:58 2009 (r196156) @@ -335,54 +335,58 @@ truncate_subject = 200 # [svnadmin] -for_paths = svnadmin/.* +for_paths = ^svnadmin(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-svnadmin@freebsd.org [head] -for_paths = head/.* +for_paths = ^head(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-head@freebsd.org +[stable-8] +for_paths = ^stable/8(/[^/]+)*$ +to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-8@freebsd.org + [stable-7] -for_paths = stable/7/.* +for_paths = ^stable/7(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-7@freebsd.org [stable-6] -for_paths = stable/6/.* +for_paths = ^stable/6(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-6@freebsd.org [stable-other] -for_paths = stable/[^67]/.* +for_paths = ^stable/[^678](/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-stable@freebsd.org svn-src-stable-other@freebsd.org [projects] -for_paths = projects/.* +for_paths = ^projects(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-projects@freebsd.org [user] -for_paths = user/.* +for_paths = ^user(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-user@freebsd.org [release] -for_paths = release/.* +for_paths = ^release(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-release@freebsd.org [releng] -for_paths = releng.* +for_paths = ^releng(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-releng@freebsd.org [vendor] -for_paths = vendor.* +for_paths = ^vendor(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org [vendor-cddl] -for_paths = vendor-cddl/.* +for_paths = ^vendor-cddl(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org [vendor-crypto] -for_paths = vendor-crypto/.* +for_paths = ^vendor-crypto(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org [vendor-sys] -for_paths = vendor-sys/.* +for_paths = ^vendor-sys(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org From sam at FreeBSD.org Wed Aug 12 21:06:38 2009 From: sam at FreeBSD.org (Sam Leffler) Date: Wed Aug 12 21:06:46 2009 Subject: svn commit: r196157 - stable/8/share/man/man9 Message-ID: <200908122106.n7CL6b0b076713@svn.freebsd.org> Author: sam Date: Wed Aug 12 21:06:37 2009 New Revision: 196157 URL: http://svn.freebsd.org/changeset/base/196157 Log: MFC 196155: First (early) draft of net80211 documentation. Note this is focused on driver writers (as opposed to folks adding to net80211). Reviewed by: wkoszek Approved by: re (rwatson) Added: stable/8/share/man/man9/ieee80211_amrr.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_amrr.9 stable/8/share/man/man9/ieee80211_beacon.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_beacon.9 stable/8/share/man/man9/ieee80211_bmiss.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_bmiss.9 stable/8/share/man/man9/ieee80211_ddb.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_ddb.9 stable/8/share/man/man9/ieee80211_regdomain.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_regdomain.9 stable/8/share/man/man9/ieee80211_scan.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_scan.9 stable/8/share/man/man9/ieee80211_vap.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_vap.9 Deleted: stable/8/share/man/man9/ieee80211_ioctl.9 Modified: stable/8/share/man/man9/ (props changed) stable/8/share/man/man9/Makefile stable/8/share/man/man9/ieee80211.9 stable/8/share/man/man9/ieee80211_crypto.9 stable/8/share/man/man9/ieee80211_input.9 stable/8/share/man/man9/ieee80211_node.9 stable/8/share/man/man9/ieee80211_output.9 stable/8/share/man/man9/ieee80211_proto.9 stable/8/share/man/man9/ieee80211_radiotap.9 Modified: stable/8/share/man/man9/Makefile ============================================================================== --- stable/8/share/man/man9/Makefile Wed Aug 12 21:05:58 2009 (r196156) +++ stable/8/share/man/man9/Makefile Wed Aug 12 21:06:37 2009 (r196157) @@ -121,13 +121,19 @@ MAN= accept_filter.9 \ hashinit.9 \ hexdump.9 \ ieee80211.9 \ + ieee80211_amrr.9 \ + ieee80211_beacon.9 \ + ieee80211_bmiss.9 \ ieee80211_crypto.9 \ + ieee80211_ddb.9 \ ieee80211_input.9 \ - ieee80211_ioctl.9 \ ieee80211_node.9 \ ieee80211_output.9 \ ieee80211_proto.9 \ ieee80211_radiotap.9 \ + ieee80211_regdomain.9 \ + ieee80211_scan.9 \ + ieee80211_vap.9 \ ifnet.9 \ inittodr.9 \ insmntque.9 \ @@ -627,52 +633,62 @@ MLINKS+=hash.9 hash32.9 \ MLINKS+=hashinit.9 hashdestroy.9 \ hashinit.9 hashinit_flags.9 \ hashinit.9 phashinit.9 -MLINKS+=ieee80211.9 ieee80211_attach.9 \ - ieee80211.9 ieee80211_chan2ieee.9 \ - ieee80211.9 ieee80211_chan2mode.9 \ - ieee80211.9 ieee80211_ieee2mhz.9 \ - ieee80211.9 ieee80211_ifattach.9 \ - ieee80211.9 ieee80211_ifdetach.9 \ - ieee80211.9 ieee80211_media2rate.9 \ - ieee80211.9 ieee80211_media_change.9 \ - ieee80211.9 ieee80211_media_init.9 \ - ieee80211.9 ieee80211_media_status.9 \ - ieee80211.9 ieee80211_mhz2ieee.9 \ - ieee80211.9 ieee80211_rate2media.9 \ - ieee80211.9 ieee80211_setmode.9 \ - ieee80211.9 ieee80211_watchdog.9 -MLINKS+=ieee80211_crypto.9 ieee80211_crypto_attach.9 \ - ieee80211_crypto.9 ieee80211_crypto_detach.9 \ - ieee80211_crypto.9 ieee80211_wep_crypt.9 -MLINKS+=ieee80211_input.9 ieee80211_decap.9 \ - ieee80211_input.9 ieee80211_recv_mgmt.9 -MLINKS+=ieee80211_ioctl.9 ieee80211_cfgget.9 \ - ieee80211_ioctl.9 ieee80211_cfgset.9 -MLINKS+=ieee80211_node.9 ieee80211_alloc_node.9 \ - ieee80211_node.9 ieee80211_begin_scan.9 \ - ieee80211_node.9 ieee80211_create_ibss.9 \ - ieee80211_node.9 ieee80211_dup_bss.9 \ - ieee80211_node.9 ieee80211_end_scan.9 \ - ieee80211_node.9 ieee80211_find_node.9 \ - ieee80211_node.9 ieee80211_free_allnodes.9 \ +MLINKS+=ieee80211.9 ieee80211_ifattach.9 \ + ieee80211.9 ieee80211_ifdetach.9 +MLINKS+=ieee80211_amrr.9 ieee80211_amrr_init.9 \ + ieee80211_amrr.9 ieee80211_amrr_cleanup.9 \ + ieee80211_amrr.9 ieee80211_amrr_setinterval.9 \ + ieee80211_amrr.9 ieee80211_amrr_node_init.9 \ + ieee80211_amrr.9 ieee80211_amrr_tx_complete.9 \ + ieee80211_amrr.9 ieee80211_amrr_tx_update.9 +MLINKS+=ieee80211_beacon.9 ieee80211_beacon_alloc.9 \ + ieee80211_beacon.9 ieee80211_beacon_update.9 \ + ieee80211_beacon.9 ieee80211_beacon_notify.9 +MLINKS+=ieee80211_bmiss.9 ieee80211_beacon_miss.9 +MLINKS+=ieee80211_crypto.9 ieee80211_key_update_begin.9 \ + ieee80211_crypto.9 ieee80211_key_update_end.9 \ + ieee80211_crypto.9 ieee80211_crypto_newkey.9 \ + ieee80211_crypto.9 ieee80211_crypto_setkey.9 \ + ieee80211_crypto.9 ieee80211_crypto_delglobalkeys.9 \ + ieee80211_crypto.9 ieee80211_crypto_reload_keys.9 \ + ieee80211_crypto.9 ieee80211_crypto_decap.9 \ + ieee80211_crypto.9 ieee80211_crypto_encap.9 \ + ieee80211_crypto.9 ieee80211_crypto_demic.9 \ + ieee80211_crypto.9 ieee80211_crypto_enmic.9 \ + ieee80211_crypto.9 ieee80211_notify_michael_failure.9 \ + ieee80211_crypto.9 ieee80211_notify_replay_failure.9 \ + ieee80211_crypto.9 ieee80211_crypto_register.9 \ + ieee80211_crypto.9 ieee80211_crypto_unregister.9 \ + ieee80211_crypto.9 ieee80211_crypto_available.9 +MLINKS+=ieee80211_input.9 ieee80211_input_all.9 +MLINKS+=ieee80211_node.9 ieee80211_find_rxnode.9 \ + ieee80211_node.9 ieee80211_find_rxnode_withkey.9 \ + ieee80211_node.9 ieee80211_ref_node.9 \ + ieee80211_node.9 ieee80211_unref_node.9 \ ieee80211_node.9 ieee80211_free_node.9 \ ieee80211_node.9 ieee80211_iterate_nodes.9 \ - ieee80211_node.9 ieee80211_lookup_node.9 \ - ieee80211_node.9 ieee80211_next_scan.9 \ - ieee80211_node.9 ieee80211_node_attach.9 \ - ieee80211_node.9 ieee80211_node_detach.9 \ - ieee80211_node.9 ieee80211_node_lateattach.9 \ - ieee80211_node.9 ieee80211_timeout_nodes.9 -MLINKS+=ieee80211_output.9 ieee80211_add_rates.9 \ - ieee80211_output.9 ieee80211_add_xrates.9 \ - ieee80211_output.9 ieee80211_encap.9 \ - ieee80211_output.9 ieee80211_send_mgmt.9 -MLINKS+=ieee80211_proto.9 ieee80211_dump_pkt.9 \ - ieee80211_proto.9 ieee80211_fix_rate.9 \ - ieee80211_proto.9 ieee80211_print_essid.9 \ - ieee80211_proto.9 ieee80211_proto_attach.9 \ - ieee80211_proto.9 ieee80211_proto_detach.9 -MLINKS+=ieee80211_radiotap.9 radiotap.9 + ieee80211_node.9 ieee80211_dump_node.9 \ + ieee80211_node.9 ieee80211_dump_nodes.9 +MLINKS+=ieee80211_output.9 M_WME_GETAC.9 \ + ieee80211_output.9 M_SEQNO_GET.9 \ + ieee80211_output.9 ieee80211_process_callback.9 +MLINKS+=ieee80211_proto.9 ieee80211_new_state.9 \ + ieee80211_proto.9 ieee80211_start_all.9 \ + ieee80211_proto.9 ieee80211_stop_all.9 \ + ieee80211_proto.9 ieee80211_suspend_all.9 \ + ieee80211_proto.9 ieee80211_resume_all.9 \ + ieee80211_proto.9 ieee80211_waitfor_parent.9 +MLINKS+=ieee80211_radiotap.9 radiotap.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_attach.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_active_vap.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_active.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_tx.9 +MLINKS+=ieee80211_regdomain.9 ieee80211_init_channels.9 \ + ieee80211_regdomain.9 ieee80211_sort_channels.9 \ + ieee80211_regdomain.9 ieee80211_alloc_countryie.9 +MLINKS+=ieee80211_vap.9 ieee80211_vap_setup.9 \ + ieee80211_vap.9 ieee80211_vap_attach.9 \ + ieee80211_vap.9 ieee80211_vap_detach.9 MLINKS+=ifnet.9 ifaddr.9 \ ifnet.9 if_data.9 \ ifnet.9 ifqueue.9 Modified: stable/8/share/man/man9/ieee80211.9 ============================================================================== --- stable/8/share/man/man9/ieee80211.9 Wed Aug 12 21:05:58 2009 (r196156) +++ stable/8/share/man/man9/ieee80211.9 Wed Aug 12 21:06:37 2009 (r196157) @@ -1,6 +1,5 @@ .\" -.\" Copyright (c) 2004 Bruce M. Simpson -.\" Copyright (c) 2004 Darron Broad +.\" Copyright (c) 2009 Sam Leffler, Errno Consulting .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,236 +24,538 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.\" $Id: ieee80211.9,v 1.5 2004/03/04 12:33:27 bruce Exp $ .\" -.Dd March 2, 2004 -.Dt IEEE80211 9 +.Dd August 4, 2009 +.Dt NET80211 9 .Os .Sh NAME -.Nm ieee80211_ifattach , ieee80211_ifdetach , -.Nm ieee80211_mhz2ieee , ieee80211_chan2ieee , ieee80211_ieee2mhz , -.Nm ieee80211_media_init , ieee80211_media_change , ieee80211_media_status , -.Nm ieee80211_watchdog , -.Nm ieee80211_setmode , ieee80211_chan2mode , -.Nm ieee80211_rate2media , ieee80211_media2rate -.Nd core 802.11 network stack functions +.Nm net80211 +.Nd 802.11 network layer .Sh SYNOPSIS .In net80211/ieee80211_var.h -.In net80211/ieee80211_proto.h .Ft void -.Fn ieee80211_ifattach "struct ifnet *ifp" +.Fn ieee80211_ifattach "struct ieee80211com *ic" "const uint8_t macaddr[IEEE80211_ADDR_LEN]" .Ft void -.Fn ieee80211_ifdetach "struct ifnet *ifp" -.Ft u_int -.Fn ieee80211_mhz2ieee "u_int freq" "u_int flags" -.Ft u_int -.Fn ieee80211_chan2ieee "struct ieee80211com *ic" "struct ieee80211_channel *c" -.Ft u_int -.Fn ieee80211_ieee2mhz "u_int chan" "u_int flags" -.Ft void -.Fo ieee80211_media_init -.Fa "struct ifnet *ifp" "ifm_change_cb_t media_change" -.Fa "ifm_stat_cb_t media_stat" -.Fc -.Fa int -.Fn ieee80211_media_change "struct ifnet *ifp" -.Fa void -.Fn ieee80211_media_status "struct ifnet *ifp" "struct ifmediareq *imr" -.Ft void -.Fn ieee80211_watchdog "struct ifnet *ifp" -.Ft int -.Fn ieee80211_setmode "struct ieee80211com *ic" "enum ieee80211_phymode mode" -.Ft enum ieee80211_phymode -.Fo ieee80211_chan2mode -.Fa "struct ieee80211com *ic" "struct ieee80211_channel *chan" -.Fc -.Ft int -.Fo ieee80211_rate2media -.Fa "struct ieee80211com *ic" "int rate" "enum ieee80211_phymode mode" -.Fc -.Ft int -.Fn ieee80211_media2rate "int mword" +.Fn ieee80211_ifdetach "struct ieee80211com *ic" .Sh DESCRIPTION -The -.Nm ieee80211 -collection of functions are used to manage wireless network interfaces in the -system which use the system's software 802.11 network stack. -Most of these functions require that attachment to the stack is performed -before calling. -Several utility functions are also provided; these are safe to call from -any driver without prior initialization. +IEEE 802.11 device drivers are written to use the infrastructure provided +by the +.Nm +software layer. +This software provides a support framework for drivers that includes +ifnet cloning, state management, and a user management API by which +applications interact with 802.11 devices. +Most drivers depend on the +.Nm +layer for protocol services but devices that off-load functionality +may bypass the layer to connect directly to the device +(e.g. the +.Xr ndis 4 +emulation support does this). +.Pp +A +.Nm +device driver implements a virtual radio API that is exported to +users through network interfaces (aka vaps) that are cloned from the +underlying device. +These interfaces have an operating mode +(station, adhoc, hostap, wds, monitor, etc.) +that is fixed for the lifetime of the interface. +Devices that can support multiple concurrent interfaces allow +multiple vaps to be cloned. +This enables construction of interesting applications such as +an AP vap and one or more WDS vaps +or multiple AP vaps, each with a different security model. +The +.Nm +layer virtualizes most 802.11 state +and coordinates vap state changes including scheduling multiple vaps. +State that is not virtualized includes the current channel and +WME/WMM parameters. +Protocol processing is typically handled entirely in the +.Nm +layer with drivers responsible purely for moving data between the host +and device. +Similarly, +.Nm +handles most +.Xr ioctl 2 +requests without entering the driver; +instead drivers are notified of state changes that +require their involvement. +.Pp +The virtual radio interface defined by the +.Nm +layer means that drivers must be structured to follow specific rules. +Drivers that support only a single interface at any time must still +follow these rules. +.Sh DATA STRUCTURES +The virtual radio architecture splits state between a single per-device +.Vt ieee80211com +structure and one or more +.Vt ieee80211vap +structures. +Drivers are expected to setup various shared state in these structures +at device attach and during vap creation but otherwise should treat them +as read-only. +The +.Vt ieee80211com +structure is allocated by the +.Nm +layer as adjunct data to a device's +.Vt ifnet ; +it is accessed through the +.Vt if_l2com +structure member. +The +.Vt ieee80211vap +structure is allocated by the driver in the +.Dq vap create +method +and should be extended with any driver-private state. +This technique of giving the driver control to allocate data structures +is used for other +.Nm +data structures and should be exploited to maintain driver-private state +together with public +.Nm +state. +.Pp +The other main data structures are the station, or node, table +that tracks peers in the local BSS, and the channel table that defines +the current set of available radio channels. +Both tables are bound to the +.Vt ieee80211com +structure and shared by all vaps. +Long-lasting references to a node are counted to guard against +premature reclamation. +In particular every packet sent/received holds a node reference +(either explicitly for transmit or implicitly on receive). .Pp -.\" -The -.Fn ieee80211_ifattach -function attaches the network interface -.Fa ifp -to the 802.11 network stack layer. -This function must be called before using any of the -.Nm ieee80211 -functions which need to store driver state across invocations; The -.Vt struct ifnet -instance pointed to by -.Fa ifp -MUST be an instance of -.Vt struct ieee80211com , -with various fields initialized to tell -.Nm ieee80211 -about its capabilities. -This function performs Ethernet and BPF attachment (by calling -.Fn ether_ifattach +.Vt ieee80211com and -.Fn bpfattach2 ) -on behalf of the caller. -It also implements the -.Vt ifmedia -interface. +.Vt ieee80211vap +structures also hold a collection of method pointers that drivers +fill-in and/or override to take control of certain operations. +These methods are the primary way drivers are bound to the +.Nm +layer and are described below. +.Sh DRIVER ATTACH/DETACH +Drivers attach to the +.Nm +layer with the +.Fn ieee80211_ifattach +function. +The driver is expected to allocate and setup any device-private +data structures before passing control. +The +.Vt ieee80211com +structure must be pre-initialized with state required to setup the +.Nm +layer: +.Bl -tag -width ic_channels +.It Dv ic_ifp +Backpointer to the physical device's ifnet. +.It Dv ic_caps +Device/driver capabilities; see below for a complete description. +.It Dv ic_channels +Table of channels the device is capable of operating on. +This is initially provided by the driver but may be changed +through calls that change the regulatory state. +.It Dv ic_nchan +Number of entries in +.Dv ic_channels . +.El .Pp -.\" -The +On return from +.Fn ieee80211_ifattach +the driver is expected to override default callback functions in the +.Vt ieee80211com +structure to register it's private routines. +Methods marked with a +.Dq * +must be provided by the driver. +.Bl -tag -width ic_channels +.It Dv ic_vap_create* +Create a vap instance of the specified type (operating mode). +Any fixed BSSID and/or MAC address is provided. +Drivers that support multi-bssid operation may honor the requested BSSID +or assign their own. +.It Dv ic_vap_delete* +Destroy a vap instance created with +.Dv ic_vap_create . +.It Dv ic_getradiocaps +Return the list of calibrated channels for the radio. +The default method returns the current list of channels +(space permitting). +.It Dv ic_setregdomain +Process a request to change regulatory state. +The routine may reject a request or constrain changes (e.g. reduce +transmit power caps). +The default method accepts all proposed changes. +.It Dv ic_send_mgmt +Send an 802.11 management frame. +The default method fabricates the frame using +.Nm +state and passes it to the driver through the +.Dv ic_raw_xmit +method. +.It Dv ic_raw_xmit +Transmit a raw 802.11 frame. +The default method drops the frame and generates a message on the console. +.It Dv ic_updateslot +Update hardware state after an 802.11 IFS slot time change, +There is no default method; the pointer may be NULL in which case +it will not be used. +.It Dv ic_update_mcast +Update hardware for a change in the multicast packet filter, +The default method prints a console message. +.It Dv ic_update_promisc +Update hardware for a change in the promiscuous mode setting. +The default method prints a console message. +.It Dv ic_newassoc +Update driver/device state for association to a new AP (in station mode) +or when a new station associates (e.g. in AP mode). +There is no default method; the pointer may be NULL in which case +it will not be used. +.It Dv ic_node_alloc +Allocate and initialize a +.Vt ieee80211_node +structure. +This method cannot sleep. +The default method allocates zero'd memory using +.Xr malloc 9. +Drivers should override this method to allocate extended storage +for their own needs. +Memory allocated by the driver must be tagged with +.Dv M_80211_NODE +to balance the memory allocation statistics. +.It Dv ic_node_free +Reclaim storage of a node allocated by +.Dv ic_node_alloc . +Drivers are expected to +.Em interpose +their own method to cleanup private state but must call through +this method to allow +.Nm +to reclaim it's private state. +.It Dv ic_node_cleanup +Cleanup state in a +.Vt ieee80211_node +created by +.Dv ic_node_alloc . +This operation is distinguished from +.Dv ic_node_free +in that it may be called long before the node is actually reclaimed +to cleanup adjunct state. +This can happen, for example, when a node must not be reclaimed +due to references held by packets in the transmit queue. +Drivers typically interpose +.Dv ic_node_cleanup +instead of +.Dv ic_node_free . +.It Dv ic_node_age +Age, and potentially reclaim, resources associated with a node. +The default method ages frames on the power-save queue (in AP mode) +and pending frames in the receive reorder queues (for stations using A-MPDU). +.It Dv ic_node_drain +Reclaim all optional resources associated with a node. +This call is used to free up resources when they are in short supply, +.It Dv ic_node_getrssi +Return the Receive Signal Strength Indication (RSSI) in .5 dBm units for +the specified node. +This interface returns a subset of the information +returned by +.Dv ic_node_getsignal , +The default method calculates a filtered average over the last ten +samples passed in to +.Xr ieee80211_input 9 +or +.Xr ieee80211_input_all 9 . +.It Dv ic_node_getsignal +Return the RSSI and noise floor (in .5 dBm units) for a station. +The default method calculates RSSI as described above; +the noise floor returned is the last value supplied to +.Xr ieee80211_input 9 +or +.Xr ieee80211_input_all 9 . +.It Dv ic_node_getmimoinfo +Return MIMO radio state for a station in support of the +.Dv IEEE80211_IOC_STA_INFO +ioctl request. +The default method returns nothing. +.It Dv ic_scan_start* +Prepare driver/hardware state for scanning. +This callback is done in a sleepable context. +.It Dv ic_scan_end* +Restore driver/hardware state after scanning completes. +This callback is done in a sleepable context. +.It Dv ic_set_channel* +Set the current radio channel using +.Vt ic_curchan . +This callback is done in a sleepable context. +.It Dv ic_scan_curchan +Start scanning on a channel. +This method is called immediately after each channel change +and must initiate the work to scan a channel and schedule a timer +to advance to the next channel in the scan list. +This callback is done in a sleepable context. +The default method handles active scan work (e.g. sending ProbRequest +frames), and schedules a call to +.Xr ieee80211_scan_next 9 +according to the maximum dwell time for the channel. +Drivers that off-load scan work to firmware typically use this method +to trigger per-channel scan activity. +.It Dv ic_scan_mindwell +Handle reaching the minimum dwell time on a channel when scanning. +This event is triggered when one or more stations have been found on +a channel and the minimum dwell time has been reached. +This callback is done in a sleepable context. +The default method signals the scan machinery to advance +to the next channel as soon as possible. +Drivers can use this method to preempt further work (e.g. if scanning +is handled by firmware) or ignore the request to force maximum dwell time +on a channel. +.It Dv ic_recv_action +Process a received Action frame. +The default method points to +.Xr ieee80211_recv_action 9 +which provides a mechanism for setting up handlers for each Action frame class. +.It Dv ic_send_action +Transmit an Action frame. +The default method points to +.Xr ieee80211_send_action 9 +which provides a mechanism for setting up handlers for each Action frame class. +.It Dv ic_ampdu_enable +Check if transmit A-MPDU should be enabled for the specified station and AC. +The default method checks a per-AC traffic rate against a per-vap +threshold to decide if A-MPDU should be enabled. +This method also rate-limits ADDBA requests so that requests are not +made too frequently when a receiver has limited resources. +.It Dv ic_addba_request +Request A-MPDU transmit aggregation. +The default method sets up local state and issues an +ADDBA Request Action frame. +Drivers may interpose this method if they need to setup private state +for handling transmit A-MPDU. +.It Dv ic_addb_response +Process a received ADDBA Response Action frame and setup resources as +needed for doing transmit A-MPDU, +.It Dv ic_addb_stop +Shutdown an A-MPDU transmit stream for the specified station and AC. +The default method reclaims local state after sending a DelBA Action frame. +.It Dv ic_bar_response +Process a response to a transmitted BAR control frame. +.It Dv ic_ampdu_rx_start +Prepare to receive A-MPDU data from the specified station for the TID. +.It Dv ic_ampdu_rx_stop +Terminate receipt of A-MPDU data from the specified station for the TID. +.El +.Pp +Once the +.Nm +layer is attached to a driver there are two more steps typically done +to complete the work: +.Bl -enum +.It +Setup +.Dq radiotap support +for capturing raw 802.11 packets that pass through the device. +This is done with a call to +.Xr ieee80211_radiotap_attach 9 . +.It +Do any final device setup like enabling interrupts. +.El +.Pp +State is torn down and reclaimed with a call to +.Fn ieee80211_ifdetach . +Note this call may result in multiple callbacks into the driver +so it should be done before any critical driver state is reclaimed. +On return from .Fn ieee80211_ifdetach -function frees any -.Nm ieee80211 -structures associated with the driver, and performs Ethernet and BPF -detachment on behalf of the caller. -.Pp -.\" -The -.Fn ieee80211_mhz2ieee -utility function converts the frequency -.Fa freq -(specified in MHz) to an IEEE 802.11 channel number. -The -.Fa flags -argument is a hint which specifies whether the frequency is in -the 2GHz ISM band -.Pq Vt IEEE80211_CHAN_2GHZ -or the 5GHz band -.Pq Vt IEEE80211_CHAN_5GHZ ; -appropriate clipping of the result is then performed. -.Pp -.\" -The -.Fn ieee80211_chan2ieee -function converts the channel specified in -.Fa *c -to an IEEE channel number for the driver -.Fa ic . -If the conversion would be invalid, an error message is printed to the -system console. -This function REQUIRES that the driver is hooked up to the -.Nm ieee80211 -subsystem. -.Pp -.\" -The -.Fn ieee80211_ieee2mhz -utility function converts the IEEE channel number -.Ft chan -to a frequency (in MHz). -The -.Fa flags -argument is a hint which specifies whether the frequency is in -the 2GHz ISM band -.Pq Vt IEEE80211_CHAN_2GHZ -or the 5GHz band -.Pq Vt IEEE80211_CHAN_5GHZ ; -appropriate clipping of the result is then performed. -.Pp -.\" -The -.Fn ieee80211_media_init -function initializes media data structures used by the -.Vt ifmedia -interface, for the driver -.Fa ifp . -It must be called by the driver after calling -.Fn ieee80211_attach -and before calling most -.Nm ieee80211 -functions. -The -.Fa media_change -and -.Fa media_stat -arguments specify helper functions which will be invoked by the -.Vt ifmedia -framework when the user changes or queries media options, -using a command such as -.Xr ifconfig 8 . -.Pp -.\" -The -.Fn ieee80211_media_status +all associated vaps and ifnet structures are reclaimed or inaccessible +to user applications so it is safe to teardown driver state without +worry about being re-entered. +The driver is responsible for calling +.Xr if_free 9 +on the ifnet it allocated for the physical device. +.Sh DRIVER CAPABILITIES +Driver/device capabilities are specified using several sets of flags +in the +.Vt ieee80211com +structure. +General capabilities are specified by +.Vt ic_caps . +Hardware cryptographic capabilities are specified by +.Vt ic_cryptocaps . +802.11n capabilities, if any, are specified by +.Vt ic_htcaps . +The +.Nm +layer propagates a subset of these capabilities to each vap through +the equivalent fields: +.Vt iv_caps , +.Vt iv_cryptocaps , and -.Fn ieee80211_media_change -functions are device-independent handlers for -.Vt ifmedia -commands and are not intended to be called directly. -.Pp -.\" -The -.Fn ieee80211_watchdog -function is intended to be called from a driver's -.Va if_watchdog -routine. -It is used to perform periodic cleanup of state within the software 802.11 -stack, as well as timing out scans. -.Pp -.\" -The -.Fn ieee80211_setmode -function is called from within the 802.11 stack to change the mode -of the driver's PHY; it is not intended to be called directly. -.Pp -.\" -The -.Fn ieee80211_chan2mode -function returns the PHY mode required for use with the channel -.Fa chan -on the device -.Fa ic . -This is typically used when selecting a rate set, to be advertised in -beacons, for example. -.Pp -.\" -The -.Fn ieee80211_rate2media -function converts the bit rate -.Fa rate -(measured in units of 0.5Mbps) to an -.Vt ifmedia -sub-type, for the device -.Fa ic -running in PHY mode -.Fa mode . -The -.Fn ieee80211_media2rate -performs the reverse of this conversion, returning the bit rate (in 0.5Mbps -units) corresponding to an -.Vt ifmedia -sub-type. -.\" +.Vt iv_htcaps . +The following general capabilities are defined: +.Bl -tag -width IEEE80211_C_8023ENCAP +.It Dv IEEE80211_C_STA +Device is capable of operating in station (aka Infrastructure) mode. +.It Dv IEEE80211_C_8023ENCAP +Device requires 802.3-encapsulated frames be passed for transmit. +By default +.Nm +will encapsulate all outbound frames as 802.11 frames (without a PLCP header). +.It Dv IEEE80211_C_FF +Device supports Atheros Fast-Frames. +.It Dv IEEE80211_C_TURBOP +Device supports Atheros Dynamic Turbo mode. +.It Dv IEEE80211_C_IBSS +Device is capable of operating in adhoc/IBSS mode. +.It Dv IEEE80211_C_PMGT +Device supports dynamic power-management (aka power save) in station mode. +.It Dv IEEE80211_C_HOSTAP +Device is capable of operating as an Access Point in Infrastructure mode. +.It Dv IEEE80211_C_AHDEMO +Device is capable of operating in Adhoc Demo mode. +In this mode the device is used purely to send/receive raw 802.11 frames. +.It Dv IEEE80211_C_SWRETRY +Device supports software retry of transmitted frames. +.It Dv IEEE80211_C_TXPMGT +Device support dynamic transmit power changes on transmitted frames; +also known as Transmit Power Control (TPC). +.It Dv IEEE80211_C_SHSLOT +Device supports short slot time operation (for 802.11g). +.It Dv IEEE80211_C_SHPREAMBLE +Device supports short preamble operation (for 802.11g). +.It Dv IEEE80211_C_MONITOR +Device is capable of operating in monitor mode. +.It Dv IEEE80211_C_DFS +Device supports radar detection and/or DFS. +DFS protocol support can be handled by +.Nm +but the device must be capable of detecting radar events. +.It Dv IEEE80211_C_MBSS +Device is capable of operating in MeshBSS (MBSS) mode +(as defined by 802.11s Draft 3.0). +.It Dv IEEE80211_C_WPA1 +Device supports WPA1 operation. +.It Dv IEEE80211_C_WPA2 +Device supports WPA2/802.11i operation. +.It Dv IEEE80211_C_BURST +Device supports frame bursting. +.It Dv IEEE80211_C_WME +Device supports WME/WMM operation +(at the moment this is mostly support for sending and receiving +QoS frames with EDCF). +.It Dv IEEE80211_C_WDS +Device supports transmit/receive of 4-address frames. +.It Dv IEEE80211_C_BGSCAN +Device supports background scanning. +.It Dv IEEE80211_C_TXFRAG +Device supports transmit of fragmented 802.11 frames. +.It Dv IEEE80211_C_TDMA +Device is capable of operating in TDMA mode. +.El +.Pp +The follow general crypto capabilities are defined. +In general +.Nm +will fall-back to software support when a device is not capable +of hardware acceleration of a cipher. +This can be done on a per-key basis. +.Nm +can also handle software +.Dv Michael +calculation combined with hardware +.Dv AES +acceleration. +.Bl -tag -width IEEE80211_C_8023ENCAP +.It Dv IEEE80211_CRYPTO_WEP +Device supports hardware WEP cipher. +.It Dv IEEE80211_CRYPTO_TKIP +Device supports hardware TKIP cipher. +.It Dv IEEE80211_CRYPTO_AES_OCB +Device supports hardware AES-OCB cipher. +.It Dv IEEE80211_CRYPTO_AES_CCM +Device supports hardware AES-CCM cipher. +.It Dv IEEE80211_CRYPTO_TKIPMIC +Device supports hardware Michael for use with TKIP. +.It Dv IEEE80211_CRYPTO_CKIP +Devices supports hardware CKIP cipher. +.El +.Pp +The follow general 802.11n capabilities are defined. +The first capabilities are defined exactly as they appear in the +802.11n specification. +Capabilities beginning with IEEE80211_HTC_AMPDU are used soley by the +.Nm +layer. +.Bl -tag -width IEEE80211_C_8023ENCAP +.It Dv IEEE80211_HTCAP_CHWIDTH40 +Device supports 20/40 channel width operation. +.It Dv IEEE80211_HTCAP_SMPS_DYNAMIC +Device supports dynamic SM power save operation. +.It Dv IEEE80211_HTCAP_SMPS_ENA +Device supports static SM power save operation. +.It Dv IEEE80211_HTCAP_GREENFIELD +Device supports Greenfield preamble. +.It Dv IEEE80211_HTCAP_SHORTGI20 +Device supports Short Guard Interval on 20MHz channels. +.It Dv IEEE80211_HTCAP_SHORTGI40 +Device supports Short Guard Interval on 40MHz channels. +.It Dv IEEE80211_HTCAP_TXSTBC +Device supports Space Time Block Convolution (STBC) for transmit. +.It Dv IEEE80211_HTCAP_RXSTBC_1STREAM +Device supports 1 spatial stream for STBC receive. +.It Dv IEEE80211_HTCAP_RXSTBC_2STREAM +Device supports 1-2 spatial streams for STBC receive. +.It Dv IEEE80211_HTCAP_RXSTBC_3STREAM +Device supports 1-3 spatial streams for STBC receive. +.It Dv IEEE80211_HTCAP_MAXAMSDU_7935 +Device supports A-MSDU frames up to 7935 octets. +.It Dv IEEE80211_HTCAP_MAXAMSDU_3839 +Device supports A-MSDU frames up to 3839 octets. +.It Dv IEEE80211_HTCAP_DSSSCCK40 +Device supports use of DSSS/CCK on 40MHz channels. +.It Dv IEEE80211_HTCAP_PSMP +Device supports PSMP. +.It Dv IEEE80211_HTCAP_40INTOLERANT +Device is intolerant of 40MHz wide channel use. +.It Dv IEEE80211_HTCAP_LSIGTXOPPROT +Device supports L-SIG TXOP protection. +.It Dv IEEE80211_HTC_AMPDU +Device supports A-MPDU aggregation. +Note that any 802.11n compliant device must support A-MPDU receive +so this implicitly means support for +.Em transmit +of A-MPDU frames. +.It Dv IEEE80211_HTC_AMSDU +Device supports A-MSDU aggregation. +Note that any 802.11n compliant device must support A-MSDU receive +so this implicitly means support for +.Em transmit +of A-MSDU frames. +.It Dv IEEE80211_HTC_HT +Device supports High Throughput (HT) operation. +This capability must be set to enable 802.11n functionality +in +.Nm . +.It Dv IEEE80211_HTC_SMPS +Device supports MIMO Power Save operation. +.It Dv IEEE80211_HTC_RIFS +Device supports Reduced Inter Frame Spacing (RIFS). +.El .Sh SEE ALSO -.Xr ieee80211_crypto 9 , +.Xr ioctl 2 , +.Xr ndis 4 , .Xr ieee80211_input 9 , -.Xr ieee80211_ioctl 9 , -.Xr ieee80211_node 9 , -.Xr ieee80211_output 9 , -.Xr ieee80211_proto 9 , -.Xr ieee80211_radiotap 9 , -.Xr ifnet 9 -.Sh HISTORY -The -.Nm ieee80211 -series of functions first appeared in -.Nx 1.5 , -and were later ported to -.Fx 4.6 . -.Sh AUTHORS -.An -nosplit -This manual page was written by -.An Bruce M. Simpson Aq bms@FreeBSD.org -and -.An Darron Broad Aq darron@kewl.org . +.Xr ieee80211_input_all 9 , +.Xr ieee80211_scan_next 9 , +.Xr ieee80211_recv_action 9 , +.Xr ieee80211_send_action 9 , +.Xr ieee80211_radiotap_attach 9 , +.Xr ifnet 9 , +.Xr malloc 9 . Copied: stable/8/share/man/man9/ieee80211_amrr.9 (from r196155, head/share/man/man9/ieee80211_amrr.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man9/ieee80211_amrr.9 Wed Aug 12 21:06:37 2009 (r196157, copy of r196155, head/share/man/man9/ieee80211_amrr.9) @@ -0,0 +1,194 @@ +.\" +.\" Copyright (c) 2009 Sam Leffler, Errno Consulting +.\" 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 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 AUTHOR 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. +.\" +.\" $FreeBSD$ +.\" +.Dd August 4, 2009 +.Dt IEEE8021_AMRR 9 +.Os +.Sh NAME +.Nm ieee80211_amrr +.Nd 802.11 network driver transmit rate control support +.Sh SYNOPSIS +.In net80211/ieee80211_amrr.h +.Ft void +.Fo ieee80211_amrr_init +.Fa "struct ieee80211_amrr *" +.Fa "struct ieee80211vap *" +.Fa "int amin" +.Fa "int amax" +.Fa "int interval" +.Fc +.\" +.Ft void +.Fn ieee80211_amrr_cleanup "struct ieee80211_amrr *" +.\" +.Ft void +.Fn ieee80211_amrr_setinterval "struct ieee80211_amrr *" "int interval" +.\" +.Ft void +.Fo ieee80211_amrr_node_init +.Fa "struct ieee80211_amrr *" +.Fa "struct ieee80211_amrr_node *" +.Fa "struct ieee80211_node *" +.Fc +.\" +.Ft int +.Fo ieee80211_amrr_choose +.Fa "struct ieee80211_node *" +.Fa "struct ieee80211_amrr_node *" +.Fc +.\" +.Ft void +.Fo ieee80211_amrr_tx_complete +.Fa "struct ieee80211_amrr_node *" +.Fa "int ok" +.Fa "int retries" +.Fc +.\" +.Ft void +.Fo ieee80211_amrr_tx_update +.Fa "struct ieee80211_amrr_node *" +.Fa "int txnct" +.Fa "int success" +.Fa "int retrycnt" +.Fc +.Sh DESCRIPTION +.Nm +is an implementation of the AMRR transmit rate control algorithm +for drivers that use the +.Nm net80211 +software layer. +A rate control algorithm is responsible for choosing the transmit +rate for each frame. +To maximize throughput algorithms try to use the highest rate that +is appropriate for the operating conditions. +The rate will vary as conditions change; the distance between two stations +may change, transient noise may be present that affects signal quality, +etc. +.Nm +uses very simple information from a driver to do it's job: +whether a frame was successfully delivered and how many transmit +attempts were made. +While this enables its use with virtually any wireless device it +limits it's effectiveness--do not expect it to function well in +difficult environments and/or respond quickly to changing conditions. +.Pp +.Nm +requires per-vap state and per-node state for each station it is to +select rates for. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From simon at FreeBSD.org Wed Aug 12 21:06:47 2009 From: simon at FreeBSD.org (Simon L. Nielsen) Date: Wed Aug 12 21:07:08 2009 Subject: svn commit: r196158 - svnadmin/conf Message-ID: <200908122106.n7CL6iT2076755@svn.freebsd.org> Author: simon Date: Wed Aug 12 21:06:43 2009 New Revision: 196158 URL: http://svn.freebsd.org/changeset/base/196158 Log: Remove empty line... really 'forced' commit to test updated mailer config. Modified: svnadmin/conf/mailer.conf Modified: svnadmin/conf/mailer.conf ============================================================================== --- svnadmin/conf/mailer.conf Wed Aug 12 21:06:37 2009 (r196157) +++ svnadmin/conf/mailer.conf Wed Aug 12 21:06:43 2009 (r196158) @@ -389,4 +389,3 @@ to_addr = src-committers@freebsd.org svn [vendor-sys] for_paths = ^vendor-sys(/[^/]+)*$ to_addr = src-committers@freebsd.org svn-src-all@freebsd.org svn-src-vendor@freebsd.org - From sam at FreeBSD.org Wed Aug 12 21:19:21 2009 From: sam at FreeBSD.org (Sam Leffler) Date: Wed Aug 12 21:19:30 2009 Subject: svn commit: r196159 - head/sys/net80211 Message-ID: <200908122119.n7CLJJlk077111@svn.freebsd.org> Author: sam Date: Wed Aug 12 21:19:19 2009 New Revision: 196159 URL: http://svn.freebsd.org/changeset/base/196159 Log: Drain link state event changes posted during vap destroy. This is a band-aid for the general problem that if_link_state_change can be called between if_detach and if_free leaving a task queued that has been free'd. Spotted by: thompsa Reviewed by: rwatson Approved by: re (rwatson) Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Wed Aug 12 21:06:43 2009 (r196158) +++ head/sys/net80211/ieee80211.c Wed Aug 12 21:19:19 2009 (r196159) @@ -573,11 +573,13 @@ ieee80211_vap_detach(struct ieee80211vap /* * Flush any deferred vap tasks. - * NB: must be before ether_ifdetach() and removal from ic_vaps list */ ieee80211_draintask(ic, &vap->iv_nstate_task); ieee80211_draintask(ic, &vap->iv_swbmiss_task); + /* XXX band-aid until ifnet handles this for us */ + taskqueue_drain(taskqueue_swi, &ifp->if_linktask); + IEEE80211_LOCK(ic); KASSERT(vap->iv_state == IEEE80211_S_INIT , ("vap still running")); TAILQ_REMOVE(&ic->ic_vaps, vap, iv_next); From simon at FreeBSD.org Wed Aug 12 21:23:42 2009 From: simon at FreeBSD.org (Simon L. Nielsen) Date: Wed Aug 12 21:23:54 2009 Subject: svn commit: r196160 - in stable/8/crypto/openssl: . apps test Message-ID: <200908122123.n7CLNf5J077259@svn.freebsd.org> Author: simon Date: Wed Aug 12 21:23:41 2009 New Revision: 196160 URL: http://svn.freebsd.org/changeset/base/196160 Log: MFC 196133: Remove symlinks in OpenSSL's testing framework. These are not required for normal build, and doesn't export well to CVS. If they are needed later a script will be added to recreate the symlinks when needed at build time. Approved by: re (rwatson) Deleted: stable/8/crypto/openssl/apps/md4.c stable/8/crypto/openssl/test/bftest.c stable/8/crypto/openssl/test/bntest.c stable/8/crypto/openssl/test/casttest.c stable/8/crypto/openssl/test/destest.c stable/8/crypto/openssl/test/dhtest.c stable/8/crypto/openssl/test/dsatest.c stable/8/crypto/openssl/test/ecdhtest.c stable/8/crypto/openssl/test/ecdsatest.c stable/8/crypto/openssl/test/ectest.c stable/8/crypto/openssl/test/enginetest.c stable/8/crypto/openssl/test/evp_test.c stable/8/crypto/openssl/test/exptest.c stable/8/crypto/openssl/test/fips_aesavs.c stable/8/crypto/openssl/test/fips_desmovs.c stable/8/crypto/openssl/test/fips_dsatest.c stable/8/crypto/openssl/test/fips_dssvs.c stable/8/crypto/openssl/test/fips_hmactest.c stable/8/crypto/openssl/test/fips_randtest.c stable/8/crypto/openssl/test/fips_rngvs.c stable/8/crypto/openssl/test/fips_rsagtest.c stable/8/crypto/openssl/test/fips_rsastest.c stable/8/crypto/openssl/test/fips_rsavtest.c stable/8/crypto/openssl/test/fips_shatest.c stable/8/crypto/openssl/test/fips_test_suite.c stable/8/crypto/openssl/test/hmactest.c stable/8/crypto/openssl/test/ideatest.c stable/8/crypto/openssl/test/jpaketest.c stable/8/crypto/openssl/test/md2test.c stable/8/crypto/openssl/test/md4test.c stable/8/crypto/openssl/test/md5test.c stable/8/crypto/openssl/test/mdc2test.c stable/8/crypto/openssl/test/randtest.c stable/8/crypto/openssl/test/rc2test.c stable/8/crypto/openssl/test/rc4test.c stable/8/crypto/openssl/test/rc5test.c stable/8/crypto/openssl/test/rmdtest.c stable/8/crypto/openssl/test/rsa_test.c stable/8/crypto/openssl/test/sha1test.c stable/8/crypto/openssl/test/sha256t.c stable/8/crypto/openssl/test/sha512t.c stable/8/crypto/openssl/test/shatest.c stable/8/crypto/openssl/test/ssltest.c Modified: stable/8/crypto/openssl/ (props changed) From sam at FreeBSD.org Wed Aug 12 21:34:58 2009 From: sam at FreeBSD.org (Sam Leffler) Date: Wed Aug 12 21:35:05 2009 Subject: svn commit: r196161 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908122134.n7CLYvPX077611@svn.freebsd.org> Author: sam Date: Wed Aug 12 21:34:57 2009 New Revision: 196161 URL: http://svn.freebsd.org/changeset/base/196161 Log: MFC r196159: Drain link state event changes posted during vap destroy. This is a band-aid for the general problem that if_link_state_change can be called between if_detach and if_free leaving a task queued that has been free'd. Reviewed by: rwatson Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net80211/ieee80211.c stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/net80211/ieee80211.c ============================================================================== --- stable/8/sys/net80211/ieee80211.c Wed Aug 12 21:23:41 2009 (r196160) +++ stable/8/sys/net80211/ieee80211.c Wed Aug 12 21:34:57 2009 (r196161) @@ -573,11 +573,13 @@ ieee80211_vap_detach(struct ieee80211vap /* * Flush any deferred vap tasks. - * NB: must be before ether_ifdetach() and removal from ic_vaps list */ ieee80211_draintask(ic, &vap->iv_nstate_task); ieee80211_draintask(ic, &vap->iv_swbmiss_task); + /* XXX band-aid until ifnet handles this for us */ + taskqueue_drain(taskqueue_swi, &ifp->if_linktask); + IEEE80211_LOCK(ic); KASSERT(vap->iv_state == IEEE80211_S_INIT , ("vap still running")); TAILQ_REMOVE(&ic->ic_vaps, vap, iv_next); From delphij at delphij.net Wed Aug 12 21:45:50 2009 From: delphij at delphij.net (Xin LI) Date: Wed Aug 12 21:46:02 2009 Subject: svn commit: r189117 - head/sys/dev/bce In-Reply-To: <20090812234935.84e5ac74.stas@FreeBSD.org> References: <200902271925.n1RJP699080658@svn.freebsd.org> <20090721145559.d2cf3f0b.stas@FreeBSD.org> <4A7AFFC4.5050607@tomjudge.com> <20090812234935.84e5ac74.stas@FreeBSD.org> Message-ID: <4A8337BD.3010700@delphij.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Stanislav, Stanislav Sedov wrote: > On Thu, 06 Aug 2009 11:07:32 -0500 > Tom Judge mentioned: > >> I can confirm that we are also seeing this problem on a number of Dell >> PE2950 systems running the bce driver from 7.2, the bug is more >> visible/producible on systems that are using Jumbo Frames (in our case 8Kb). >> >> The symptoms of this are an increase in the requests for jumbo clusters >> denied counter at 9k, and then random network stalls which sometimes >> recover on there own and others require a reboot. >> >> We have backed this change and so far it seems to have fixed the issue. >> > > David, > > are you OK with reverting this patch? I submitted the patch to re@ for > review, and I can commit it if you don't mind doing so. :-) I think there was some motivation supporting the SPLIT_HEADER disable in the past (IIRC it was for reliability or data corruption), but I think I have lost the mail archive (at least I couldn't find it at this moment :-/ I'm not very sure if that was fixed by my busdma_sync fix, though, can anyone confirm that? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkqDN70ACgkQi+vbBBjt66CfiwCeIpYBDxMXZPhW6gLhdXdBYgj4 uIIAoIRnUkEs0n1xTRJb0JzryxR6poD+ =Iuis -----END PGP SIGNATURE----- From rwatson at FreeBSD.org Wed Aug 12 21:55:47 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Wed Aug 12 21:56:00 2009 Subject: svn commit: r196159 - head/sys/net80211 In-Reply-To: <200908122119.n7CLJJlk077111@svn.freebsd.org> References: <200908122119.n7CLJJlk077111@svn.freebsd.org> Message-ID: On Wed, 12 Aug 2009, Sam Leffler wrote: > Drain link state event changes posted during vap destroy. This is a > band-aid for the general problem that if_link_state_change can be > called between if_detach and if_free leaving a task queued that has > been free'd. FYI to others -- we believe the proper fix should be in the ifnet framework, but this change was the lowest-risk way to resolve the problem for 8.0. Following the release we'll investigate having the ifnet framework provide this protection automatically for drivers. Robert N M Watson Computer Laboratory University of Cambridge > Spotted by: thompsa > Reviewed by: rwatson > Approved by: re (rwatson) > > Modified: > head/sys/net80211/ieee80211.c > > Modified: head/sys/net80211/ieee80211.c > ============================================================================== > --- head/sys/net80211/ieee80211.c Wed Aug 12 21:06:43 2009 (r196158) > +++ head/sys/net80211/ieee80211.c Wed Aug 12 21:19:19 2009 (r196159) > @@ -573,11 +573,13 @@ ieee80211_vap_detach(struct ieee80211vap > > /* > * Flush any deferred vap tasks. > - * NB: must be before ether_ifdetach() and removal from ic_vaps list > */ > ieee80211_draintask(ic, &vap->iv_nstate_task); > ieee80211_draintask(ic, &vap->iv_swbmiss_task); > > + /* XXX band-aid until ifnet handles this for us */ > + taskqueue_drain(taskqueue_swi, &ifp->if_linktask); > + > IEEE80211_LOCK(ic); > KASSERT(vap->iv_state == IEEE80211_S_INIT , ("vap still running")); > TAILQ_REMOVE(&ic->ic_vaps, vap, iv_next); > From pyunyh at gmail.com Wed Aug 12 22:58:32 2009 From: pyunyh at gmail.com (Pyun YongHyeon) Date: Wed Aug 12 22:58:45 2009 Subject: svn commit: r189117 - head/sys/dev/bce In-Reply-To: <4A8337BD.3010700@delphij.net> References: <200902271925.n1RJP699080658@svn.freebsd.org> <20090721145559.d2cf3f0b.stas@FreeBSD.org> <4A7AFFC4.5050607@tomjudge.com> <20090812234935.84e5ac74.stas@FreeBSD.org> <4A8337BD.3010700@delphij.net> Message-ID: <20090812225726.GI55129@michelle.cdnetworks.com> On Wed, Aug 12, 2009 at 02:44:29PM -0700, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, Stanislav, > > Stanislav Sedov wrote: > > On Thu, 06 Aug 2009 11:07:32 -0500 > > Tom Judge mentioned: > > > >> I can confirm that we are also seeing this problem on a number of Dell > >> PE2950 systems running the bce driver from 7.2, the bug is more > >> visible/producible on systems that are using Jumbo Frames (in our case 8Kb). > >> > >> The symptoms of this are an increase in the requests for jumbo clusters > >> denied counter at 9k, and then random network stalls which sometimes > >> recover on there own and others require a reboot. > >> > >> We have backed this change and so far it seems to have fixed the issue. > >> > > > > David, > > > > are you OK with reverting this patch? I submitted the patch to re@ for > > review, and I can commit it if you don't mind doing so. :-) > > I think there was some motivation supporting the SPLIT_HEADER disable in > the past (IIRC it was for reliability or data corruption), but I think I > have lost the mail archive (at least I couldn't find it at this moment > :-/ I'm not very sure if that was fixed by my busdma_sync fix, though, > can anyone confirm that? > Since I don't have bce(4) hardwares I can't confirm it. I think the busdma_sync fix would be prerequisite condition to fix data corruption problem but I think it would not necessarily fix previous data corruption issue. From mjacob at FreeBSD.org Thu Aug 13 01:17:27 2009 From: mjacob at FreeBSD.org (Matt Jacob) Date: Thu Aug 13 01:17:39 2009 Subject: svn commit: r196162 - head/sys/dev/isp Message-ID: <200908130117.n7D1HR7E082170@svn.freebsd.org> Author: mjacob Date: Thu Aug 13 01:17:26 2009 New Revision: 196162 URL: http://svn.freebsd.org/changeset/base/196162 Log: Have at least *some* default WWN to fall back on, otherwise Sun branded FC cards won't configure. Reviewed by: Ken, Scott Approved by: re Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Wed Aug 12 21:34:57 2009 (r196161) +++ head/sys/dev/isp/isp_freebsd.c Thu Aug 13 01:17:26 2009 (r196162) @@ -5280,6 +5280,10 @@ isp_default_wwn(ispsoftc_t * isp, int ch return (seed); } seed = iswwnn ? FCPARAM(isp, chan)->isp_wwnn_nvram : FCPARAM(isp, chan)->isp_wwpn_nvram; + if (seed) { + return (seed); + } + return (0x400000007F000009ull); } else { seed = iswwnn ? fc->def_wwnn : fc->def_wwpn; } From mjacob at FreeBSD.org Thu Aug 13 01:45:27 2009 From: mjacob at FreeBSD.org (Matt Jacob) Date: Thu Aug 13 01:45:38 2009 Subject: svn commit: r196163 - stable/8/sys/dev/isp Message-ID: <200908130145.n7D1jQd7082799@svn.freebsd.org> Author: mjacob Date: Thu Aug 13 01:45:26 2009 New Revision: 196163 URL: http://svn.freebsd.org/changeset/base/196163 Log: MFC 196162: Have at least a fallback WWN so cards on sun branded FC cards can configure. Approved by: re Modified: stable/8/sys/dev/isp/isp_freebsd.c Modified: stable/8/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/8/sys/dev/isp/isp_freebsd.c Thu Aug 13 01:17:26 2009 (r196162) +++ stable/8/sys/dev/isp/isp_freebsd.c Thu Aug 13 01:45:26 2009 (r196163) @@ -5280,6 +5280,10 @@ isp_default_wwn(ispsoftc_t * isp, int ch return (seed); } seed = iswwnn ? FCPARAM(isp, chan)->isp_wwnn_nvram : FCPARAM(isp, chan)->isp_wwpn_nvram; + if (seed) { + return (seed); + } + return (0x400000007F000009ull); } else { seed = iswwnn ? fc->def_wwnn : fc->def_wwpn; } From des at FreeBSD.org Thu Aug 13 06:07:40 2009 From: des at FreeBSD.org (Dag-Erling Smorgrav) Date: Thu Aug 13 06:07:46 2009 Subject: svn commit: r196164 - in head: contrib/bzip2 contrib/netcat contrib/openpam crypto/openssh Message-ID: <200908130607.n7D67dfm089197@svn.freebsd.org> Author: des Date: Thu Aug 13 06:07:38 2009 New Revision: 196164 URL: http://svn.freebsd.org/changeset/base/196164 Log: Update and remove CVS-specific items Approved by: re (kib) Modified: head/contrib/bzip2/FREEBSD-vendor head/contrib/netcat/FREEBSD-vendor head/contrib/openpam/FREEBSD-vendor head/crypto/openssh/FREEBSD-vendor Modified: head/contrib/bzip2/FREEBSD-vendor ============================================================================== --- head/contrib/bzip2/FREEBSD-vendor Thu Aug 13 01:45:26 2009 (r196163) +++ head/contrib/bzip2/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) @@ -2,6 +2,4 @@ Project: bzip2 ProjectURL: http://www.bzip.org/ Version: 1.0.5 -VendorTag: BZIP2 -VersionTag: v1_0_5 License: BSD Modified: head/contrib/netcat/FREEBSD-vendor ============================================================================== --- head/contrib/netcat/FREEBSD-vendor Thu Aug 13 01:45:26 2009 (r196163) +++ head/contrib/netcat/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) @@ -2,6 +2,4 @@ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL: http://www.openbsd.org/ Version: 4.4 -VendorTag: OPENBSD -VersionTag: OPENBSD_4_4 License: BSD Modified: head/contrib/openpam/FREEBSD-vendor ============================================================================== --- head/contrib/openpam/FREEBSD-vendor Thu Aug 13 01:45:26 2009 (r196163) +++ head/contrib/openpam/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) @@ -2,7 +2,5 @@ Project: OpenPAM ProjectURL: http://www.openpam.org/ Version: Hydrangea (20071221) -VendorTag: OPENPAM -VersionTag: OPENPAM_HYDRANGEA License: BSD Maintainer: des Modified: head/crypto/openssh/FREEBSD-vendor ============================================================================== --- head/crypto/openssh/FREEBSD-vendor Thu Aug 13 01:45:26 2009 (r196163) +++ head/crypto/openssh/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) @@ -1,8 +1,6 @@ # $FreeBSD$ Project: Portable OpenSSH ProjectURL: http://www.openssh.com/portable.html -Version: 5.1p1 -VendorTag: OPENSSH -VersionTag: OpenSSH_5_1p1 +Version: 5.2p1 License: BSD Maintainer: des From des at FreeBSD.org Thu Aug 13 06:13:46 2009 From: des at FreeBSD.org (Dag-Erling Smorgrav) Date: Thu Aug 13 06:14:03 2009 Subject: svn commit: r196165 - in stable/8: contrib/bzip2 contrib/netcat contrib/openpam crypto/openssh Message-ID: <200908130613.n7D6Dje1089486@svn.freebsd.org> Author: des Date: Thu Aug 13 06:13:45 2009 New Revision: 196165 URL: http://svn.freebsd.org/changeset/base/196165 Log: merge r196164: update & remove CVS-specific items. Approved by: re (kib) Modified: stable/8/contrib/bzip2/ (props changed) stable/8/contrib/bzip2/FREEBSD-vendor stable/8/contrib/netcat/ (props changed) stable/8/contrib/netcat/FREEBSD-vendor stable/8/contrib/openpam/ (props changed) stable/8/contrib/openpam/FREEBSD-vendor stable/8/crypto/openssh/ (props changed) stable/8/crypto/openssh/FREEBSD-vendor Modified: stable/8/contrib/bzip2/FREEBSD-vendor ============================================================================== --- stable/8/contrib/bzip2/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) +++ stable/8/contrib/bzip2/FREEBSD-vendor Thu Aug 13 06:13:45 2009 (r196165) @@ -2,6 +2,4 @@ Project: bzip2 ProjectURL: http://www.bzip.org/ Version: 1.0.5 -VendorTag: BZIP2 -VersionTag: v1_0_5 License: BSD Modified: stable/8/contrib/netcat/FREEBSD-vendor ============================================================================== --- stable/8/contrib/netcat/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) +++ stable/8/contrib/netcat/FREEBSD-vendor Thu Aug 13 06:13:45 2009 (r196165) @@ -2,6 +2,4 @@ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL: http://www.openbsd.org/ Version: 4.4 -VendorTag: OPENBSD -VersionTag: OPENBSD_4_4 License: BSD Modified: stable/8/contrib/openpam/FREEBSD-vendor ============================================================================== --- stable/8/contrib/openpam/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) +++ stable/8/contrib/openpam/FREEBSD-vendor Thu Aug 13 06:13:45 2009 (r196165) @@ -2,7 +2,5 @@ Project: OpenPAM ProjectURL: http://www.openpam.org/ Version: Hydrangea (20071221) -VendorTag: OPENPAM -VersionTag: OPENPAM_HYDRANGEA License: BSD Maintainer: des Modified: stable/8/crypto/openssh/FREEBSD-vendor ============================================================================== --- stable/8/crypto/openssh/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) +++ stable/8/crypto/openssh/FREEBSD-vendor Thu Aug 13 06:13:45 2009 (r196165) @@ -1,8 +1,6 @@ # $FreeBSD$ Project: Portable OpenSSH ProjectURL: http://www.openssh.com/portable.html -Version: 5.1p1 -VendorTag: OPENSSH -VersionTag: OpenSSH_5_1p1 +Version: 5.2p1 License: BSD Maintainer: des From n_hibma at FreeBSD.org Thu Aug 13 07:19:44 2009 From: n_hibma at FreeBSD.org (Nick Hibma) Date: Thu Aug 13 07:19:51 2009 Subject: svn commit: r196166 - stable/7/sys/dev/usb Message-ID: <200908130719.n7D7JhBA090783@svn.freebsd.org> Author: n_hibma Date: Thu Aug 13 07:19:43 2009 New Revision: 196166 URL: http://svn.freebsd.org/changeset/base/196166 Log: Reset the debugging flag to 0. Modified: stable/7/sys/dev/usb/u3g.c Modified: stable/7/sys/dev/usb/u3g.c ============================================================================== --- stable/7/sys/dev/usb/u3g.c Thu Aug 13 06:13:45 2009 (r196165) +++ stable/7/sys/dev/usb/u3g.c Thu Aug 13 07:19:43 2009 (r196166) @@ -52,7 +52,7 @@ #endif #include "usbdevs.h" -static int u3gdebug = 1; +static int u3gdebug = 0; SYSCTL_NODE(_hw_usb, OID_AUTO, u3g, CTLFLAG_RW, 0, "USB u3g"); SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, CTLFLAG_RW, &u3gdebug, 0, "u3g debug level"); From n_hibma at FreeBSD.org Thu Aug 13 07:21:25 2009 From: n_hibma at FreeBSD.org (Nick Hibma) Date: Thu Aug 13 07:21:36 2009 Subject: svn commit: r196167 - stable/7/sys/dev/usb Message-ID: <200908130721.n7D7LOWd090861@svn.freebsd.org> Author: n_hibma Date: Thu Aug 13 07:21:24 2009 New Revision: 196167 URL: http://svn.freebsd.org/changeset/base/196167 Log: Restart the controller if it has halted. Restarting it makes the USB tree functional again (without reconnecting the devices, mind you). On my laptop there is probably a short somewhere on the motherboard and once in a while the host controller halts. Modified: stable/7/sys/dev/usb/uhci.c Modified: stable/7/sys/dev/usb/uhci.c ============================================================================== --- stable/7/sys/dev/usb/uhci.c Thu Aug 13 07:19:43 2009 (r196166) +++ stable/7/sys/dev/usb/uhci.c Thu Aug 13 07:21:24 2009 (r196167) @@ -1205,20 +1205,55 @@ uhci_intr1(uhci_softc_t *sc) device_get_nameunit(sc->sc_bus.bdev)); } if (status & UHCI_STS_HCH) { - /* no acknowledge needed */ if (!sc->sc_dying) { + ack |= UHCI_STS_HCH; printf("%s: host controller halted\n", - device_get_nameunit(sc->sc_bus.bdev)); -#ifdef USB_DEBUG - uhci_dump_all(sc); -#endif + device_get_nameunit(sc->sc_bus.bdev)); } - sc->sc_dying = 1; } if (!ack) return (0); /* nothing to acknowledge */ - UWRITE2(sc, UHCI_STS, ack); /* acknowledge the ints */ + + UWRITE2(sc, UHCI_STS, ack & ~UHCI_STS_HCH); /* acknowledge the ints */ + + if (ack & UHCI_STS_HCH) { + /* Restart the controller, by Manuel Bouyer */ + sc->sc_saved_frnum = UREAD2(sc, UHCI_FRNUM); + sc->sc_saved_sof = UREAD1(sc, UHCI_SOF); + + sc->sc_bus.use_polling++; + uhci_run(sc, 0); /* stop the controller */ + UWRITE2(sc, UHCI_INTR, 0); /* disable intrs */ + + uhci_globalreset(sc); + uhci_reset(sc); + + /* restore saved state */ + UWRITE4(sc, UHCI_FLBASEADDR, DMAADDR(&sc->sc_dma, 0)); + UWRITE2(sc, UHCI_FRNUM, sc->sc_saved_frnum); + UWRITE1(sc, UHCI_SOF, sc->sc_saved_sof); + + UWRITE2(sc, UHCI_INTR, UHCI_INTR_TOCRCIE | UHCI_INTR_RIE | + UHCI_INTR_IOCE | UHCI_INTR_SPIE); /* re-enable intrs */ + UHCICMD(sc, UHCI_CMD_MAXP); + + uhci_run(sc, 1); /* and start traffic again */ + sc->sc_bus.use_polling--; + + if (UREAD2(sc, UHCI_STS) & UHCI_STS_HCH) { + printf("%s: host controller couldn't be restarted\n", + device_get_nameunit(sc->sc_bus.bdev)); +#ifdef USB_DEBUG + uhci_dump_all(sc); +#endif + sc->sc_dying = 1; + return (0); + } + + printf("%s: host controller restarted\n", + device_get_nameunit(sc->sc_bus.bdev)); + } sc->sc_bus.no_intrs++; usb_schedsoftintr(&sc->sc_bus); From n_hibma at FreeBSD.org Thu Aug 13 08:18:30 2009 From: n_hibma at FreeBSD.org (Nick Hibma) Date: Thu Aug 13 08:18:47 2009 Subject: svn commit: r196168 - in stable/7/sys/modules: . ohci uhci Message-ID: <200908130818.n7D8ITDx093434@svn.freebsd.org> Author: n_hibma Date: Thu Aug 13 08:18:29 2009 New Revision: 196168 URL: http://svn.freebsd.org/changeset/base/196168 Log: Add these two modules to enable loading of 'the other' host controller if only one was compiled into the kernel. This happens on a laptop with an Intel chipset (UHCI) to which an Option 3G Cardbus card is added (which contains a NEC USB host controller (OHCI)). Added: stable/7/sys/modules/ohci/ stable/7/sys/modules/ohci/Makefile (contents, props changed) stable/7/sys/modules/uhci/ stable/7/sys/modules/uhci/Makefile (contents, props changed) Modified: stable/7/sys/modules/Makefile Modified: stable/7/sys/modules/Makefile ============================================================================== --- stable/7/sys/modules/Makefile Thu Aug 13 07:21:24 2009 (r196167) +++ stable/7/sys/modules/Makefile Thu Aug 13 08:18:29 2009 (r196168) @@ -206,6 +206,7 @@ SUBDIR= ${_3dfx} \ ${_nve} \ ${_nvram} \ ${_nwfs} \ + ohci \ ${_oltr} \ ${_opensolaris} \ ${_padlock} \ @@ -293,6 +294,7 @@ SUBDIR= ${_3dfx} \ ufoma \ uftdi \ ugen \ + uhci \ uhid \ ukbd \ ulpt \ Added: stable/7/sys/modules/ohci/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/modules/ohci/Makefile Thu Aug 13 08:18:29 2009 (r196168) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +S= ${.CURDIR}/../.. + +.PATH: $S/dev/usb $S/pci + +KMOD= ohci +SRCS= bus_if.h device_if.h usb_if.h usb_if.c opt_usb.h +SRCS+= ohci_pci.c ohci.c ohcireg.h ohcivar.h +SRCS+= opt_bus.h pci_if.h + +.include Added: stable/7/sys/modules/uhci/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/modules/uhci/Makefile Thu Aug 13 08:18:29 2009 (r196168) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +S= ${.CURDIR}/../.. + +.PATH: $S/dev/usb $S/pci + +KMOD= uhci +SRCS= bus_if.h device_if.h usb_if.h usb_if.c opt_usb.h +SRCS+= uhci_pci.c uhci.c uhcireg.h uhcivar.h +SRCS+= opt_bus.h pci_if.h + +.include From n_hibma at FreeBSD.org Thu Aug 13 08:20:13 2009 From: n_hibma at FreeBSD.org (Nick Hibma) Date: Thu Aug 13 08:20:19 2009 Subject: svn commit: r196169 - stable/7/sys/pci Message-ID: <200908130820.n7D8KCgt093511@svn.freebsd.org> Author: n_hibma Date: Thu Aug 13 08:20:12 2009 New Revision: 196169 URL: http://svn.freebsd.org/changeset/base/196169 Log: Hide aperture size and stolen memory behind bootverbose. Modified: stable/7/sys/pci/agp_i810.c Modified: stable/7/sys/pci/agp_i810.c ============================================================================== --- stable/7/sys/pci/agp_i810.c Thu Aug 13 08:18:29 2009 (r196168) +++ stable/7/sys/pci/agp_i810.c Thu Aug 13 08:20:12 2009 (r196169) @@ -474,12 +474,13 @@ agp_i810_attach(device_t dev) agp_generic_detach(dev); return EINVAL; } - if (sc->stolen > 0) { - device_printf(dev, "detected %dk stolen memory\n", - sc->stolen * 4); + + if (bootverbose) { + device_print_prettyname(dev); + if (sc->stolen > 0) + printf("detected %dk stolen memory, ", sc->stolen * 4); + printf("aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); } - device_printf(dev, "aperture size is %dM\n", - sc->initial_aperture / 1024 / 1024); /* GATT address is already in there, make sure it's enabled */ pgtblctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL); @@ -664,9 +665,13 @@ agp_i810_attach(device_t dev) gtt_size += 4; sc->stolen = (stolen - gtt_size) * 1024 / 4096; - if (sc->stolen > 0) - device_printf(dev, "detected %dk stolen memory\n", sc->stolen * 4); - device_printf(dev, "aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); + + if (bootverbose) { + device_print_prettyname(dev); + if (sc->stolen > 0) + printf("detected %dk stolen memory, ", sc->stolen * 4); + printf("aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); + } /* GATT address is already in there, make sure it's enabled */ pgtblctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL); From n_hibma at FreeBSD.org Thu Aug 13 08:24:59 2009 From: n_hibma at FreeBSD.org (Nick Hibma) Date: Thu Aug 13 08:25:17 2009 Subject: svn commit: r196170 - stable/7/sys/dev/firewire Message-ID: <200908130824.n7D8OwO9093632@svn.freebsd.org> Author: n_hibma Date: Thu Aug 13 08:24:58 2009 New Revision: 196170 URL: http://svn.freebsd.org/changeset/base/196170 Log: Compact some output. Move some behind bootverbose. Modified: stable/7/sys/dev/firewire/fwohci.c Modified: stable/7/sys/dev/firewire/fwohci.c ============================================================================== --- stable/7/sys/dev/firewire/fwohci.c Thu Aug 13 08:20:12 2009 (r196169) +++ stable/7/sys/dev/firewire/fwohci.c Thu Aug 13 08:24:58 2009 (r196170) @@ -616,10 +616,9 @@ fwohci_init(struct fwohci_softc *sc, dev /* OHCI version */ reg = OREAD(sc, OHCI_VERSION); mver = (reg >> 16) & 0xff; - device_printf(dev, "OHCI version %x.%x (ROM=%d)\n", - mver, reg & 0xff, (reg>>24) & 1); if (mver < 1 || mver > 9) { - device_printf(dev, "invalid OHCI version\n"); + device_printf(dev, "invalid OHCI version %d (reg=0x%08x)\n", + mver, reg); return (ENXIO); } @@ -632,10 +631,15 @@ fwohci_init(struct fwohci_softc *sc, dev for (i = 0; i < 0x20; i++) if ((reg & (1 << i)) == 0) break; + if (i == 0) { + device_printf(dev, "0 isoc. channels"); + return ENXIO; + } sc->fc.nisodma = i; - device_printf(dev, "No. of Isochronous channels is %d.\n", i); - if (i == 0) - return (ENXIO); + + device_printf(dev, "OHCI version %x.%x (ROM=%d), %d isoc. channels\n", + mver, reg & 0xff, (reg>>24) & 1, + sc->fc.nisodma); sc->fc.arq = &sc->arrq.xferq; sc->fc.ars = &sc->arrs.xferq; @@ -1848,7 +1852,8 @@ fwohci_intr_core(struct fwohci_softc *sc /* Disable bus reset interrupt until sid recv. */ OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_PHY_BUS_R); - device_printf(fc->dev, "BUS reset\n"); + if (bootverbose) + device_printf(fc->dev, "BUS reset\n"); OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC); @@ -2464,7 +2469,8 @@ fwohci_ibr(struct firewire_comm *fc) struct fwohci_softc *sc; uint32_t fun; - device_printf(fc->dev, "Initiate bus reset\n"); + if (bootverbose) + device_printf(fc->dev, "Initiate bus reset\n"); sc = (struct fwohci_softc *)fc; /* From n_hibma at FreeBSD.org Thu Aug 13 08:31:16 2009 From: n_hibma at FreeBSD.org (Nick Hibma) Date: Thu Aug 13 08:31:23 2009 Subject: svn commit: r196171 - stable/7/sys/netsmb Message-ID: <200908130831.n7D8VF7U093805@svn.freebsd.org> Author: n_hibma Date: Thu Aug 13 08:31:15 2009 New Revision: 196171 URL: http://svn.freebsd.org/changeset/base/196171 Log: Silence this module. Modified: stable/7/sys/netsmb/smb_dev.c Modified: stable/7/sys/netsmb/smb_dev.c ============================================================================== --- stable/7/sys/netsmb/smb_dev.c Thu Aug 13 08:24:58 2009 (r196170) +++ stable/7/sys/netsmb/smb_dev.c Thu Aug 13 08:31:15 2009 (r196171) @@ -341,7 +341,6 @@ nsmb_dev_load(module_t mod, int cmd, voi break; } nsmb_dev_tag = EVENTHANDLER_REGISTER(dev_clone, nsmb_dev_clone, 0, 1000); - printf("netsmb_dev: loaded\n"); break; case MOD_UNLOAD: smb_iod_done(); @@ -351,7 +350,6 @@ nsmb_dev_load(module_t mod, int cmd, voi EVENTHANDLER_DEREGISTER(dev_clone, nsmb_dev_tag); drain_dev_clone_events(); destroy_dev_drain(&nsmb_cdevsw); - printf("netsmb_dev: unloaded\n"); break; default: error = EINVAL; From kostikbel at gmail.com Thu Aug 13 08:32:42 2009 From: kostikbel at gmail.com (Kostik Belousov) Date: Thu Aug 13 08:32:49 2009 Subject: svn commit: r196170 - stable/7/sys/dev/firewire In-Reply-To: <200908130824.n7D8OwO9093632@svn.freebsd.org> References: <200908130824.n7D8OwO9093632@svn.freebsd.org> Message-ID: <20090813083236.GR1884@deviant.kiev.zoral.com.ua> On Thu, Aug 13, 2009 at 08:24:58AM +0000, Nick Hibma wrote: > Author: n_hibma > Date: Thu Aug 13 08:24:58 2009 > New Revision: 196170 > URL: http://svn.freebsd.org/changeset/base/196170 > > Log: > Compact some output. Move some behind bootverbose. > > Modified: > stable/7/sys/dev/firewire/fwohci.c > Please revert this commit and your previous r196169. Patches shall go into HEAD first and then merged back to stable branch after settle period. [I consider USB changes as relevant only to stable/7, due to new USB stack in HEAD ?]. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20090813/f8e5b8b9/attachment.pgp From rwatson at FreeBSD.org Thu Aug 13 08:36:11 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Thu Aug 13 08:36:18 2009 Subject: svn commit: r196171 - stable/7/sys/netsmb In-Reply-To: <200908130831.n7D8VF7U093805@svn.freebsd.org> References: <200908130831.n7D8VF7U093805@svn.freebsd.org> Message-ID: On Thu, 13 Aug 2009, Nick Hibma wrote: > Silence this module. I can't help but notice you're committing changes to a stable branch without first making them in head. For the USB stack, where there's a different implementation between head and stable/7, that's fine. For code that's shared, it's really not fine. Please stop. Robert N M Watson Computer Laboratory University of Cambridge > > Modified: > stable/7/sys/netsmb/smb_dev.c > > Modified: stable/7/sys/netsmb/smb_dev.c > ============================================================================== > --- stable/7/sys/netsmb/smb_dev.c Thu Aug 13 08:24:58 2009 (r196170) > +++ stable/7/sys/netsmb/smb_dev.c Thu Aug 13 08:31:15 2009 (r196171) > @@ -341,7 +341,6 @@ nsmb_dev_load(module_t mod, int cmd, voi > break; > } > nsmb_dev_tag = EVENTHANDLER_REGISTER(dev_clone, nsmb_dev_clone, 0, 1000); > - printf("netsmb_dev: loaded\n"); > break; > case MOD_UNLOAD: > smb_iod_done(); > @@ -351,7 +350,6 @@ nsmb_dev_load(module_t mod, int cmd, voi > EVENTHANDLER_DEREGISTER(dev_clone, nsmb_dev_tag); > drain_dev_clone_events(); > destroy_dev_drain(&nsmb_cdevsw); > - printf("netsmb_dev: unloaded\n"); > break; > default: > error = EINVAL; > From bz at FreeBSD.org Thu Aug 13 09:11:48 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Thu Aug 13 09:11:55 2009 Subject: svn commit: r196172 - head/tools/regression/priv Message-ID: <200908130911.n7D9BmsI094785@svn.freebsd.org> Author: bz Date: Thu Aug 13 09:11:47 2009 New Revision: 196172 URL: http://svn.freebsd.org/changeset/base/196172 Log: Start respecting WITHOUT_INET6. Make regression/priv compile again after the multi-IP jail changes. Note that we are still using the legacy jail(2) rather than the jail_set(2)/jail(3) syscall. Add an IPv4, and an IPv6 loopback address in case we compile with INET6 enabled. Make the priv_vfs_extattr_system compile on amd64 as well using the proper length modifier to printf(3) for ssize_t. Reviewed by: rwatson Approved by: re (kib) Modified: head/tools/regression/priv/Makefile head/tools/regression/priv/main.c head/tools/regression/priv/priv_netinet_ipsec.c head/tools/regression/priv/priv_vfs_extattr_system.c Modified: head/tools/regression/priv/Makefile ============================================================================== --- head/tools/regression/priv/Makefile Thu Aug 13 08:31:15 2009 (r196171) +++ head/tools/regression/priv/Makefile Thu Aug 13 09:11:47 2009 (r196172) @@ -2,6 +2,8 @@ # $FreeBSD$ # +.include + PROG= priv SRCS= main.c \ priv_acct.c \ @@ -49,4 +51,8 @@ WARNS= 3 DPADD+= ${LIBIPSEC} LDADD+= -lipsec +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+= -DINET6 +.endif + .include Modified: head/tools/regression/priv/main.c ============================================================================== --- head/tools/regression/priv/main.c Thu Aug 13 08:31:15 2009 (r196171) +++ head/tools/regression/priv/main.c Thu Aug 13 09:11:47 2009 (r196172) @@ -142,20 +142,24 @@ static struct test tests[] = { priv_netinet_ipsec_policy4_bypass, priv_netinet_ipsec_policy_bypass_cleanup }, +#ifdef INET6 { "priv_netinet_ipsec_policy6_bypass", priv_netinet_ipsec_policy6_bypass_setup, priv_netinet_ipsec_policy6_bypass, priv_netinet_ipsec_policy_bypass_cleanup }, +#endif { "priv_netinet_ipsec_policy4_entrust", priv_netinet_ipsec_policy4_entrust_setup, priv_netinet_ipsec_policy4_entrust, priv_netinet_ipsec_policy_entrust_cleanup }, +#ifdef INET6 { "priv_netinet_ipsec_policy6_entrust", priv_netinet_ipsec_policy6_entrust_setup, priv_netinet_ipsec_policy6_entrust, priv_netinet_ipsec_policy_entrust_cleanup }, +#endif { "priv_netinet_raw", priv_netinet_raw_setup, priv_netinet_raw, priv_netinet_raw_cleanup }, @@ -420,12 +424,23 @@ static void enter_jail(const char *test) { struct jail j; + struct in_addr ia4; +#ifdef INET6 + struct in6_addr ia6 = IN6ADDR_LOOPBACK_INIT; +#endif bzero(&j, sizeof(j)); - j.version = 0; + j.version = JAIL_API_VERSION; j.path = "/"; j.hostname = "test"; - j.ip_number = htonl(INADDR_LOOPBACK); + j.jailname = "regressions/priv"; + ia4.s_addr = htonl(INADDR_LOOPBACK); + j.ip4s = 1; + j.ip4 = &ia4; +#ifdef INET6 + j.ip6s = 1; + j.ip6 = &ia6; +#endif if (jail(&j) < 0) err(-1, "test %s: jail", test); } Modified: head/tools/regression/priv/priv_netinet_ipsec.c ============================================================================== --- head/tools/regression/priv/priv_netinet_ipsec.c Thu Aug 13 08:31:15 2009 (r196171) +++ head/tools/regression/priv/priv_netinet_ipsec.c Thu Aug 13 09:11:47 2009 (r196172) @@ -69,6 +69,7 @@ priv_netinet_ipsec_policy_bypass_setup_a return (-1); } break; +#ifdef INET6 case AF_INET6: sd = socket(AF_INET6, SOCK_DGRAM, 0); if (sd < 0) { @@ -76,6 +77,7 @@ priv_netinet_ipsec_policy_bypass_setup_a return (-1); } break; +#endif default: warnx("%s: unexpected address family", __func__); return (-1); @@ -92,6 +94,7 @@ priv_netinet_ipsec_policy4_bypass_setup( AF_INET)); } +#ifdef INET6 int priv_netinet_ipsec_policy6_bypass_setup(int asroot, int injail, struct test *test) @@ -100,7 +103,7 @@ priv_netinet_ipsec_policy6_bypass_setup( return (priv_netinet_ipsec_policy_bypass_setup_af(asroot, injail, test, AF_INET6)); } - +#endif static int @@ -121,6 +124,7 @@ priv_netinet_ipsec_policy_entrust_setup_ return (-1); } break; +#ifdef INET6 case AF_INET6: sd = socket(AF_INET6, SOCK_DGRAM, 0); if (sd < 0) { @@ -128,6 +132,7 @@ priv_netinet_ipsec_policy_entrust_setup_ return (-1); } break; +#endif default: warnx("%s: unexpected address family", __func__); return (-1); @@ -144,6 +149,7 @@ priv_netinet_ipsec_policy4_entrust_setup AF_INET)); } +#ifdef INET6 int priv_netinet_ipsec_policy6_entrust_setup(int asroot, int injail, struct test *test) @@ -152,7 +158,7 @@ priv_netinet_ipsec_policy6_entrust_setup return (priv_netinet_ipsec_policy_entrust_setup_af(asroot, injail, test, AF_INET6)); } - +#endif void priv_netinet_ipsec_pfkey(int asroot, int injail, struct test *test) @@ -196,10 +202,12 @@ priv_netinet_ipsec_policy_bypass_af(int level = IPPROTO_IP; optname = IP_IPSEC_POLICY; break; +#ifdef INET6 case AF_INET6: level = IPPROTO_IPV6; optname = IPV6_IPSEC_POLICY; break; +#endif default: warnx("%s: unexpected address family", __func__); return; @@ -227,13 +235,14 @@ priv_netinet_ipsec_policy4_bypass(int as priv_netinet_ipsec_policy_bypass_af(asroot, injail, test, AF_INET); } +#ifdef INET6 void priv_netinet_ipsec_policy6_bypass(int asroot, int injail, struct test *test) { priv_netinet_ipsec_policy_bypass_af(asroot, injail, test, AF_INET6); } - +#endif static void priv_netinet_ipsec_policy_entrust_af(int asroot, int injail, struct test *test, @@ -246,10 +255,12 @@ priv_netinet_ipsec_policy_entrust_af(int level = IPPROTO_IP; optname = IP_IPSEC_POLICY; break; +#ifdef INET6 case AF_INET6: level = IPPROTO_IPV6; optname = IPV6_IPSEC_POLICY; break; +#endif default: warnx("%s: unexpected address family", __func__); return; @@ -277,13 +288,14 @@ priv_netinet_ipsec_policy4_entrust(int a priv_netinet_ipsec_policy_entrust_af(asroot, injail, test, AF_INET); } +#ifdef INET6 void priv_netinet_ipsec_policy6_entrust(int asroot, int injail, struct test *test) { priv_netinet_ipsec_policy_entrust_af(asroot, injail, test, AF_INET6); } - +#endif void priv_netinet_ipsec_policy_bypass_cleanup(int asroot, int injail, Modified: head/tools/regression/priv/priv_vfs_extattr_system.c ============================================================================== --- head/tools/regression/priv/priv_vfs_extattr_system.c Thu Aug 13 08:31:15 2009 (r196171) +++ head/tools/regression/priv/priv_vfs_extattr_system.c Thu Aug 13 09:11:47 2009 (r196172) @@ -80,7 +80,7 @@ priv_vfs_extattr_system(int asroot, int else if (ret == EA_SIZE) error = 0; else - err(-1, "priv_vfs_extattr_system: set returned %d", ret); + err(-1, "priv_vfs_extattr_system: set returned %zd", ret); if (asroot && injail) expect("priv_vfs_extattr_system(asroot, injail)", error, -1, EPERM); From bz at FreeBSD.org Thu Aug 13 09:17:08 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Thu Aug 13 09:17:21 2009 Subject: svn commit: r196173 - stable/8/tools/regression/priv Message-ID: <200908130917.n7D9H85Q094956@svn.freebsd.org> Author: bz Date: Thu Aug 13 09:17:07 2009 New Revision: 196173 URL: http://svn.freebsd.org/changeset/base/196173 Log: MFC r196172: Start respecting WITHOUT_INET6. Make regression/priv compile again after the multi-IP jail changes. Note that we are still using the legacy jail(2) rather than the jail_set(2)/jail(3) syscall. Add an IPv4, and an IPv6 loopback address in case we compile with INET6 enabled. Make the priv_vfs_extattr_system compile on amd64 as well using the proper length modifier to printf(3) for ssize_t. Reviewed by: rwatson Approved by: re (kib) Modified: stable/8/tools/regression/priv/ (props changed) stable/8/tools/regression/priv/Makefile stable/8/tools/regression/priv/main.c stable/8/tools/regression/priv/priv_netinet_ipsec.c stable/8/tools/regression/priv/priv_vfs_extattr_system.c Modified: stable/8/tools/regression/priv/Makefile ============================================================================== --- stable/8/tools/regression/priv/Makefile Thu Aug 13 09:11:47 2009 (r196172) +++ stable/8/tools/regression/priv/Makefile Thu Aug 13 09:17:07 2009 (r196173) @@ -2,6 +2,8 @@ # $FreeBSD$ # +.include + PROG= priv SRCS= main.c \ priv_acct.c \ @@ -49,4 +51,8 @@ WARNS= 3 DPADD+= ${LIBIPSEC} LDADD+= -lipsec +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+= -DINET6 +.endif + .include Modified: stable/8/tools/regression/priv/main.c ============================================================================== --- stable/8/tools/regression/priv/main.c Thu Aug 13 09:11:47 2009 (r196172) +++ stable/8/tools/regression/priv/main.c Thu Aug 13 09:17:07 2009 (r196173) @@ -142,20 +142,24 @@ static struct test tests[] = { priv_netinet_ipsec_policy4_bypass, priv_netinet_ipsec_policy_bypass_cleanup }, +#ifdef INET6 { "priv_netinet_ipsec_policy6_bypass", priv_netinet_ipsec_policy6_bypass_setup, priv_netinet_ipsec_policy6_bypass, priv_netinet_ipsec_policy_bypass_cleanup }, +#endif { "priv_netinet_ipsec_policy4_entrust", priv_netinet_ipsec_policy4_entrust_setup, priv_netinet_ipsec_policy4_entrust, priv_netinet_ipsec_policy_entrust_cleanup }, +#ifdef INET6 { "priv_netinet_ipsec_policy6_entrust", priv_netinet_ipsec_policy6_entrust_setup, priv_netinet_ipsec_policy6_entrust, priv_netinet_ipsec_policy_entrust_cleanup }, +#endif { "priv_netinet_raw", priv_netinet_raw_setup, priv_netinet_raw, priv_netinet_raw_cleanup }, @@ -420,12 +424,23 @@ static void enter_jail(const char *test) { struct jail j; + struct in_addr ia4; +#ifdef INET6 + struct in6_addr ia6 = IN6ADDR_LOOPBACK_INIT; +#endif bzero(&j, sizeof(j)); - j.version = 0; + j.version = JAIL_API_VERSION; j.path = "/"; j.hostname = "test"; - j.ip_number = htonl(INADDR_LOOPBACK); + j.jailname = "regressions/priv"; + ia4.s_addr = htonl(INADDR_LOOPBACK); + j.ip4s = 1; + j.ip4 = &ia4; +#ifdef INET6 + j.ip6s = 1; + j.ip6 = &ia6; +#endif if (jail(&j) < 0) err(-1, "test %s: jail", test); } Modified: stable/8/tools/regression/priv/priv_netinet_ipsec.c ============================================================================== --- stable/8/tools/regression/priv/priv_netinet_ipsec.c Thu Aug 13 09:11:47 2009 (r196172) +++ stable/8/tools/regression/priv/priv_netinet_ipsec.c Thu Aug 13 09:17:07 2009 (r196173) @@ -69,6 +69,7 @@ priv_netinet_ipsec_policy_bypass_setup_a return (-1); } break; +#ifdef INET6 case AF_INET6: sd = socket(AF_INET6, SOCK_DGRAM, 0); if (sd < 0) { @@ -76,6 +77,7 @@ priv_netinet_ipsec_policy_bypass_setup_a return (-1); } break; +#endif default: warnx("%s: unexpected address family", __func__); return (-1); @@ -92,6 +94,7 @@ priv_netinet_ipsec_policy4_bypass_setup( AF_INET)); } +#ifdef INET6 int priv_netinet_ipsec_policy6_bypass_setup(int asroot, int injail, struct test *test) @@ -100,7 +103,7 @@ priv_netinet_ipsec_policy6_bypass_setup( return (priv_netinet_ipsec_policy_bypass_setup_af(asroot, injail, test, AF_INET6)); } - +#endif static int @@ -121,6 +124,7 @@ priv_netinet_ipsec_policy_entrust_setup_ return (-1); } break; +#ifdef INET6 case AF_INET6: sd = socket(AF_INET6, SOCK_DGRAM, 0); if (sd < 0) { @@ -128,6 +132,7 @@ priv_netinet_ipsec_policy_entrust_setup_ return (-1); } break; +#endif default: warnx("%s: unexpected address family", __func__); return (-1); @@ -144,6 +149,7 @@ priv_netinet_ipsec_policy4_entrust_setup AF_INET)); } +#ifdef INET6 int priv_netinet_ipsec_policy6_entrust_setup(int asroot, int injail, struct test *test) @@ -152,7 +158,7 @@ priv_netinet_ipsec_policy6_entrust_setup return (priv_netinet_ipsec_policy_entrust_setup_af(asroot, injail, test, AF_INET6)); } - +#endif void priv_netinet_ipsec_pfkey(int asroot, int injail, struct test *test) @@ -196,10 +202,12 @@ priv_netinet_ipsec_policy_bypass_af(int level = IPPROTO_IP; optname = IP_IPSEC_POLICY; break; +#ifdef INET6 case AF_INET6: level = IPPROTO_IPV6; optname = IPV6_IPSEC_POLICY; break; +#endif default: warnx("%s: unexpected address family", __func__); return; @@ -227,13 +235,14 @@ priv_netinet_ipsec_policy4_bypass(int as priv_netinet_ipsec_policy_bypass_af(asroot, injail, test, AF_INET); } +#ifdef INET6 void priv_netinet_ipsec_policy6_bypass(int asroot, int injail, struct test *test) { priv_netinet_ipsec_policy_bypass_af(asroot, injail, test, AF_INET6); } - +#endif static void priv_netinet_ipsec_policy_entrust_af(int asroot, int injail, struct test *test, @@ -246,10 +255,12 @@ priv_netinet_ipsec_policy_entrust_af(int level = IPPROTO_IP; optname = IP_IPSEC_POLICY; break; +#ifdef INET6 case AF_INET6: level = IPPROTO_IPV6; optname = IPV6_IPSEC_POLICY; break; +#endif default: warnx("%s: unexpected address family", __func__); return; @@ -277,13 +288,14 @@ priv_netinet_ipsec_policy4_entrust(int a priv_netinet_ipsec_policy_entrust_af(asroot, injail, test, AF_INET); } +#ifdef INET6 void priv_netinet_ipsec_policy6_entrust(int asroot, int injail, struct test *test) { priv_netinet_ipsec_policy_entrust_af(asroot, injail, test, AF_INET6); } - +#endif void priv_netinet_ipsec_policy_bypass_cleanup(int asroot, int injail, Modified: stable/8/tools/regression/priv/priv_vfs_extattr_system.c ============================================================================== --- stable/8/tools/regression/priv/priv_vfs_extattr_system.c Thu Aug 13 09:11:47 2009 (r196172) +++ stable/8/tools/regression/priv/priv_vfs_extattr_system.c Thu Aug 13 09:17:07 2009 (r196173) @@ -80,7 +80,7 @@ priv_vfs_extattr_system(int asroot, int else if (ret == EA_SIZE) error = 0; else - err(-1, "priv_vfs_extattr_system: set returned %d", ret); + err(-1, "priv_vfs_extattr_system: set returned %zd", ret); if (asroot && injail) expect("priv_vfs_extattr_system(asroot, injail)", error, -1, EPERM); From bz at FreeBSD.org Thu Aug 13 09:29:54 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Thu Aug 13 09:30:06 2009 Subject: svn commit: r196174 - head/sys/net Message-ID: <200908130929.n7D9TrGh095296@svn.freebsd.org> Author: bz Date: Thu Aug 13 09:29:52 2009 New Revision: 196174 URL: http://svn.freebsd.org/changeset/base/196174 Log: Put multiple instructions into a block when iterating; unbreaks NET_RT_DUMP, which otherwise only returned information of AF_MAX. This was broken in r193232 (save your time - my bug, my fix). PR: kern/137700 Reported by: Larry Baird (lab gta.com) Tested by: Larry Baird (lab gta.com) Reviewed by: zec, lstewart, qing Approved by: re (kib) Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Thu Aug 13 09:17:07 2009 (r196173) +++ head/sys/net/rtsock.c Thu Aug 13 09:29:52 2009 (r196174) @@ -1473,7 +1473,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) /* * take care of routing entries */ - for (error = 0; error == 0 && i <= lim; i++) + for (error = 0; error == 0 && i <= lim; i++) { rnh = rt_tables_get_rnh(req->td->td_proc->p_fibnum, i); if (rnh != NULL) { RADIX_NODE_HEAD_LOCK(rnh); @@ -1482,6 +1482,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) RADIX_NODE_HEAD_UNLOCK(rnh); } else if (af != 0) error = EAFNOSUPPORT; + } break; case NET_RT_IFLIST: From bz at FreeBSD.org Thu Aug 13 09:32:17 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Thu Aug 13 09:32:24 2009 Subject: svn commit: r196175 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908130932.n7D9WGbX095402@svn.freebsd.org> Author: bz Date: Thu Aug 13 09:32:15 2009 New Revision: 196175 URL: http://svn.freebsd.org/changeset/base/196175 Log: MFC r196174: Put multiple instructions into a block when iterating; unbreaks NET_RT_DUMP, which otherwise only returned information of AF_MAX. This was broken in r193232 (save your time - my bug, my fix). Reported by: Larry Baird (lab gta.com) Tested by: Larry Baird (lab gta.com) Reviewed by: zec, lstewart, qing PR: kern/137700 Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/rtsock.c stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/net/rtsock.c ============================================================================== --- stable/8/sys/net/rtsock.c Thu Aug 13 09:29:52 2009 (r196174) +++ stable/8/sys/net/rtsock.c Thu Aug 13 09:32:15 2009 (r196175) @@ -1473,7 +1473,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) /* * take care of routing entries */ - for (error = 0; error == 0 && i <= lim; i++) + for (error = 0; error == 0 && i <= lim; i++) { rnh = rt_tables_get_rnh(req->td->td_proc->p_fibnum, i); if (rnh != NULL) { RADIX_NODE_HEAD_LOCK(rnh); @@ -1482,6 +1482,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) RADIX_NODE_HEAD_UNLOCK(rnh); } else if (af != 0) error = EAFNOSUPPORT; + } break; case NET_RT_IFLIST: From sean.bruno at dsl-only.net Thu Aug 13 10:18:17 2009 From: sean.bruno at dsl-only.net (Sean Bruno) Date: Thu Aug 13 10:18:56 2009 Subject: svn commit: r196170 - stable/7/sys/dev/firewire In-Reply-To: <200908130824.n7D8OwO9093632@svn.freebsd.org> References: <200908130824.n7D8OwO9093632@svn.freebsd.org> Message-ID: <1250157094.8589.11.camel@Lappy> Nick: I like your ideas in this code, but this change removes debugging output from the default output. I'm afraid that it's there for a reason, i.e. please revert this changeset and let's chat about it in IRC or via email to come up with something that makes sense. :) Sean On Thu, 2009-08-13 at 08:24 +0000, Nick Hibma wrote: > Author: n_hibma > Date: Thu Aug 13 08:24:58 2009 > New Revision: 196170 > URL: http://svn.freebsd.org/changeset/base/196170 > > Log: > Compact some output. Move some behind bootverbose. > > Modified: > stable/7/sys/dev/firewire/fwohci.c > > Modified: stable/7/sys/dev/firewire/fwohci.c > ============================================================================== > --- stable/7/sys/dev/firewire/fwohci.c Thu Aug 13 08:20:12 2009 (r196169) > +++ stable/7/sys/dev/firewire/fwohci.c Thu Aug 13 08:24:58 2009 (r196170) > @@ -616,10 +616,9 @@ fwohci_init(struct fwohci_softc *sc, dev > /* OHCI version */ > reg = OREAD(sc, OHCI_VERSION); > mver = (reg >> 16) & 0xff; > - device_printf(dev, "OHCI version %x.%x (ROM=%d)\n", > - mver, reg & 0xff, (reg>>24) & 1); > if (mver < 1 || mver > 9) { > - device_printf(dev, "invalid OHCI version\n"); > + device_printf(dev, "invalid OHCI version %d (reg=0x%08x)\n", > + mver, reg); > return (ENXIO); > } > > @@ -632,10 +631,15 @@ fwohci_init(struct fwohci_softc *sc, dev > for (i = 0; i < 0x20; i++) > if ((reg & (1 << i)) == 0) > break; > + if (i == 0) { > + device_printf(dev, "0 isoc. channels"); > + return ENXIO; > + } > sc->fc.nisodma = i; > - device_printf(dev, "No. of Isochronous channels is %d.\n", i); > - if (i == 0) > - return (ENXIO); > + > + device_printf(dev, "OHCI version %x.%x (ROM=%d), %d isoc. channels\n", > + mver, reg & 0xff, (reg>>24) & 1, > + sc->fc.nisodma); > > sc->fc.arq = &sc->arrq.xferq; > sc->fc.ars = &sc->arrs.xferq; > @@ -1848,7 +1852,8 @@ fwohci_intr_core(struct fwohci_softc *sc > /* Disable bus reset interrupt until sid recv. */ > OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_PHY_BUS_R); > > - device_printf(fc->dev, "BUS reset\n"); > + if (bootverbose) > + device_printf(fc->dev, "BUS reset\n"); > OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); > OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC); > > @@ -2464,7 +2469,8 @@ fwohci_ibr(struct firewire_comm *fc) > struct fwohci_softc *sc; > uint32_t fun; > > - device_printf(fc->dev, "Initiate bus reset\n"); > + if (bootverbose) > + device_printf(fc->dev, "Initiate bus reset\n"); > sc = (struct fwohci_softc *)fc; > > /* From bz at FreeBSD.org Thu Aug 13 10:26:35 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Thu Aug 13 10:26:41 2009 Subject: svn commit: r196176 - in head/sys: kern net sys Message-ID: <200908131026.n7DAQYN1097674@svn.freebsd.org> Author: bz Date: Thu Aug 13 10:26:34 2009 New Revision: 196176 URL: http://svn.freebsd.org/changeset/base/196176 Log: Make it possible to change the vnet sysctl variables on jails with their own virtual network stack. Jails only inheriting a network stack cannot change anything that cannot be changed from within a prison. Reviewed by: rwatson, zec Approved by: re (kib) Modified: head/sys/kern/kern_jail.c head/sys/kern/kern_sysctl.c head/sys/net/vnet.h head/sys/sys/jail.h head/sys/sys/sysctl.h Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Thu Aug 13 09:32:15 2009 (r196175) +++ head/sys/kern/kern_jail.c Thu Aug 13 10:26:34 2009 (r196176) @@ -88,7 +88,11 @@ struct prison prison0 = { .pr_childmax = JAIL_MAX, .pr_hostuuid = DEFAULT_HOSTUUID, .pr_children = LIST_HEAD_INITIALIZER(&prison0.pr_children), +#ifdef VIMAGE + .pr_flags = PR_HOST|PR_VNET, +#else .pr_flags = PR_HOST, +#endif .pr_allow = PR_ALLOW_ALL, }; MTX_SYSINIT(prison0, &prison0.pr_mtx, "jail mutex", MTX_DEF); @@ -3308,6 +3312,25 @@ getcredhostid(struct ucred *cred, unsign mtx_unlock(&cred->cr_prison->pr_mtx); } +#ifdef VIMAGE +/* + * Determine whether the prison represented by cred owns + * its vnet rather than having it inherited. + * + * Returns 1 in case the prison owns the vnet, 0 otherwise. + */ +int +prison_owns_vnet(struct ucred *cred) +{ + + /* + * vnets cannot be added/removed after jail creation, + * so no need to lock here. + */ + return (cred->cr_prison->pr_flags & PR_VNET ? 1 : 0); +} +#endif + /* * Determine whether the subject represented by cred can "see" * status of a mount point. Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Thu Aug 13 09:32:15 2009 (r196175) +++ head/sys/kern/kern_sysctl.c Thu Aug 13 10:26:34 2009 (r196176) @@ -1381,10 +1381,18 @@ sysctl_root(SYSCTL_HANDLER_ARGS) /* Is this sysctl writable by only privileged users? */ if (req->newptr && !(oid->oid_kind & CTLFLAG_ANYBODY)) { + int priv; + if (oid->oid_kind & CTLFLAG_PRISON) - error = priv_check(req->td, PRIV_SYSCTL_WRITEJAIL); + priv = PRIV_SYSCTL_WRITEJAIL; +#ifdef VIMAGE + else if ((oid->oid_kind & CTLFLAG_VNET) && + prison_owns_vnet(req->td->td_ucred)) + priv = PRIV_SYSCTL_WRITEJAIL; +#endif else - error = priv_check(req->td, PRIV_SYSCTL_WRITE); + priv = PRIV_SYSCTL_WRITE; + error = priv_check(req->td, priv); if (error) return (error); } Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Thu Aug 13 09:32:15 2009 (r196175) +++ head/sys/net/vnet.h Thu Aug 13 10:26:34 2009 (r196176) @@ -232,21 +232,25 @@ int vnet_sysctl_handle_string(SYSCTL_HAN int vnet_sysctl_handle_uint(SYSCTL_HANDLER_ARGS); #define SYSCTL_VNET_INT(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|CTLFLAG_MPSAFE|(access), \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_INT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \ ptr, val, vnet_sysctl_handle_int, "I", descr) #define SYSCTL_VNET_PROC(parent, nbr, name, access, ptr, arg, handler, \ fmt, descr) \ - SYSCTL_OID(parent, nbr, name, access, ptr, arg, handler, fmt, \ - descr) + SYSCTL_OID(parent, nbr, name, CTLFLAG_VNET|(access), ptr, arg, \ + handler, fmt, descr) #define SYSCTL_VNET_STRING(parent, nbr, name, access, arg, len, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING|(access), arg, \ - len, vnet_sysctl_handle_string, "A", descr) + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_STRING|CTLFLAG_VNET|(access), \ + arg, len, vnet_sysctl_handle_string, "A", descr) #define SYSCTL_VNET_STRUCT(parent, nbr, name, access, ptr, type, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|(access), ptr, \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_OPAQUE|CTLFLAG_VNET|(access), ptr, \ sizeof(struct type), vnet_sysctl_handle_opaque, "S," #type, \ descr) #define SYSCTL_VNET_UINT(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_UINT|CTLFLAG_MPSAFE|(access), \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_UINT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \ ptr, val, vnet_sysctl_handle_uint, "IU", descr) #define VNET_SYSCTL_ARG(req, arg1) do { \ if (arg1 != NULL) \ Modified: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Thu Aug 13 09:32:15 2009 (r196175) +++ head/sys/sys/jail.h Thu Aug 13 10:26:34 2009 (r196176) @@ -341,6 +341,7 @@ void getcredhostuuid(struct ucred *, cha void getcredhostid(struct ucred *, unsigned long *); int prison_allow(struct ucred *, unsigned); int prison_check(struct ucred *cred1, struct ucred *cred2); +int prison_owns_vnet(struct ucred *); int prison_canseemount(struct ucred *cred, struct mount *mp); void prison_enforce_statfs(struct ucred *cred, struct mount *mp, struct statfs *sp); Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Thu Aug 13 09:32:15 2009 (r196175) +++ head/sys/sys/sysctl.h Thu Aug 13 10:26:34 2009 (r196176) @@ -85,6 +85,7 @@ struct ctlname { #define CTLMASK_SECURE 0x00F00000 /* Secure level */ #define CTLFLAG_TUN 0x00080000 /* Tunable variable */ #define CTLFLAG_MPSAFE 0x00040000 /* Handler is MP safe */ +#define CTLFLAG_VNET 0x00020000 /* Prisons with vnet can fiddle */ #define CTLFLAG_RDTUN (CTLFLAG_RD|CTLFLAG_TUN) /* From n_hibma at FreeBSD.org Thu Aug 13 10:27:24 2009 From: n_hibma at FreeBSD.org (Nick Hibma) Date: Thu Aug 13 10:27:31 2009 Subject: svn commit: r196177 - stable/7/sys/dev/firewire Message-ID: <200908131027.n7DARNFs097748@svn.freebsd.org> Author: n_hibma Date: Thu Aug 13 10:27:22 2009 New Revision: 196177 URL: http://svn.freebsd.org/changeset/base/196177 Log: Revert he previous commit as requested by Sean Bruno. Modified: stable/7/sys/dev/firewire/fwohci.c Modified: stable/7/sys/dev/firewire/fwohci.c ============================================================================== --- stable/7/sys/dev/firewire/fwohci.c Thu Aug 13 10:26:34 2009 (r196176) +++ stable/7/sys/dev/firewire/fwohci.c Thu Aug 13 10:27:22 2009 (r196177) @@ -616,9 +616,10 @@ fwohci_init(struct fwohci_softc *sc, dev /* OHCI version */ reg = OREAD(sc, OHCI_VERSION); mver = (reg >> 16) & 0xff; + device_printf(dev, "OHCI version %x.%x (ROM=%d)\n", + mver, reg & 0xff, (reg>>24) & 1); if (mver < 1 || mver > 9) { - device_printf(dev, "invalid OHCI version %d (reg=0x%08x)\n", - mver, reg); + device_printf(dev, "invalid OHCI version\n"); return (ENXIO); } @@ -631,15 +632,10 @@ fwohci_init(struct fwohci_softc *sc, dev for (i = 0; i < 0x20; i++) if ((reg & (1 << i)) == 0) break; - if (i == 0) { - device_printf(dev, "0 isoc. channels"); - return ENXIO; - } sc->fc.nisodma = i; - - device_printf(dev, "OHCI version %x.%x (ROM=%d), %d isoc. channels\n", - mver, reg & 0xff, (reg>>24) & 1, - sc->fc.nisodma); + device_printf(dev, "No. of Isochronous channels is %d.\n", i); + if (i == 0) + return (ENXIO); sc->fc.arq = &sc->arrq.xferq; sc->fc.ars = &sc->arrs.xferq; @@ -1852,8 +1848,7 @@ fwohci_intr_core(struct fwohci_softc *sc /* Disable bus reset interrupt until sid recv. */ OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_PHY_BUS_R); - if (bootverbose) - device_printf(fc->dev, "BUS reset\n"); + device_printf(fc->dev, "BUS reset\n"); OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC); @@ -2469,8 +2464,7 @@ fwohci_ibr(struct firewire_comm *fc) struct fwohci_softc *sc; uint32_t fun; - if (bootverbose) - device_printf(fc->dev, "Initiate bus reset\n"); + device_printf(fc->dev, "Initiate bus reset\n"); sc = (struct fwohci_softc *)fc; /* From bz at FreeBSD.org Thu Aug 13 10:31:04 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Thu Aug 13 10:31:10 2009 Subject: svn commit: r196178 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908131031.n7DAV3WZ097854@svn.freebsd.org> Author: bz Date: Thu Aug 13 10:31:02 2009 New Revision: 196178 URL: http://svn.freebsd.org/changeset/base/196178 Log: MFC r196176: Make it possible to change the vnet sysctl variables on jails with their own virtual network stack. Jails only inheriting a network stack cannot change anything that cannot be changed from within a prison. Reviewed by: rwatson, zec Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/kern_jail.c stable/8/sys/kern/kern_sysctl.c stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/vnet.h stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/sys/jail.h stable/8/sys/sys/sysctl.h stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/kern/kern_jail.c ============================================================================== --- stable/8/sys/kern/kern_jail.c Thu Aug 13 10:27:22 2009 (r196177) +++ stable/8/sys/kern/kern_jail.c Thu Aug 13 10:31:02 2009 (r196178) @@ -88,7 +88,11 @@ struct prison prison0 = { .pr_childmax = JAIL_MAX, .pr_hostuuid = DEFAULT_HOSTUUID, .pr_children = LIST_HEAD_INITIALIZER(&prison0.pr_children), +#ifdef VIMAGE + .pr_flags = PR_HOST|PR_VNET, +#else .pr_flags = PR_HOST, +#endif .pr_allow = PR_ALLOW_ALL, }; MTX_SYSINIT(prison0, &prison0.pr_mtx, "jail mutex", MTX_DEF); @@ -3308,6 +3312,25 @@ getcredhostid(struct ucred *cred, unsign mtx_unlock(&cred->cr_prison->pr_mtx); } +#ifdef VIMAGE +/* + * Determine whether the prison represented by cred owns + * its vnet rather than having it inherited. + * + * Returns 1 in case the prison owns the vnet, 0 otherwise. + */ +int +prison_owns_vnet(struct ucred *cred) +{ + + /* + * vnets cannot be added/removed after jail creation, + * so no need to lock here. + */ + return (cred->cr_prison->pr_flags & PR_VNET ? 1 : 0); +} +#endif + /* * Determine whether the subject represented by cred can "see" * status of a mount point. Modified: stable/8/sys/kern/kern_sysctl.c ============================================================================== --- stable/8/sys/kern/kern_sysctl.c Thu Aug 13 10:27:22 2009 (r196177) +++ stable/8/sys/kern/kern_sysctl.c Thu Aug 13 10:31:02 2009 (r196178) @@ -1381,10 +1381,18 @@ sysctl_root(SYSCTL_HANDLER_ARGS) /* Is this sysctl writable by only privileged users? */ if (req->newptr && !(oid->oid_kind & CTLFLAG_ANYBODY)) { + int priv; + if (oid->oid_kind & CTLFLAG_PRISON) - error = priv_check(req->td, PRIV_SYSCTL_WRITEJAIL); + priv = PRIV_SYSCTL_WRITEJAIL; +#ifdef VIMAGE + else if ((oid->oid_kind & CTLFLAG_VNET) && + prison_owns_vnet(req->td->td_ucred)) + priv = PRIV_SYSCTL_WRITEJAIL; +#endif else - error = priv_check(req->td, PRIV_SYSCTL_WRITE); + priv = PRIV_SYSCTL_WRITE; + error = priv_check(req->td, priv); if (error) return (error); } Modified: stable/8/sys/net/vnet.h ============================================================================== --- stable/8/sys/net/vnet.h Thu Aug 13 10:27:22 2009 (r196177) +++ stable/8/sys/net/vnet.h Thu Aug 13 10:31:02 2009 (r196178) @@ -232,21 +232,25 @@ int vnet_sysctl_handle_string(SYSCTL_HAN int vnet_sysctl_handle_uint(SYSCTL_HANDLER_ARGS); #define SYSCTL_VNET_INT(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|CTLFLAG_MPSAFE|(access), \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_INT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \ ptr, val, vnet_sysctl_handle_int, "I", descr) #define SYSCTL_VNET_PROC(parent, nbr, name, access, ptr, arg, handler, \ fmt, descr) \ - SYSCTL_OID(parent, nbr, name, access, ptr, arg, handler, fmt, \ - descr) + SYSCTL_OID(parent, nbr, name, CTLFLAG_VNET|(access), ptr, arg, \ + handler, fmt, descr) #define SYSCTL_VNET_STRING(parent, nbr, name, access, arg, len, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING|(access), arg, \ - len, vnet_sysctl_handle_string, "A", descr) + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_STRING|CTLFLAG_VNET|(access), \ + arg, len, vnet_sysctl_handle_string, "A", descr) #define SYSCTL_VNET_STRUCT(parent, nbr, name, access, ptr, type, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|(access), ptr, \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_OPAQUE|CTLFLAG_VNET|(access), ptr, \ sizeof(struct type), vnet_sysctl_handle_opaque, "S," #type, \ descr) #define SYSCTL_VNET_UINT(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_UINT|CTLFLAG_MPSAFE|(access), \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_UINT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \ ptr, val, vnet_sysctl_handle_uint, "IU", descr) #define VNET_SYSCTL_ARG(req, arg1) do { \ if (arg1 != NULL) \ Modified: stable/8/sys/sys/jail.h ============================================================================== --- stable/8/sys/sys/jail.h Thu Aug 13 10:27:22 2009 (r196177) +++ stable/8/sys/sys/jail.h Thu Aug 13 10:31:02 2009 (r196178) @@ -341,6 +341,7 @@ void getcredhostuuid(struct ucred *, cha void getcredhostid(struct ucred *, unsigned long *); int prison_allow(struct ucred *, unsigned); int prison_check(struct ucred *cred1, struct ucred *cred2); +int prison_owns_vnet(struct ucred *); int prison_canseemount(struct ucred *cred, struct mount *mp); void prison_enforce_statfs(struct ucred *cred, struct mount *mp, struct statfs *sp); Modified: stable/8/sys/sys/sysctl.h ============================================================================== --- stable/8/sys/sys/sysctl.h Thu Aug 13 10:27:22 2009 (r196177) +++ stable/8/sys/sys/sysctl.h Thu Aug 13 10:31:02 2009 (r196178) @@ -85,6 +85,7 @@ struct ctlname { #define CTLMASK_SECURE 0x00F00000 /* Secure level */ #define CTLFLAG_TUN 0x00080000 /* Tunable variable */ #define CTLFLAG_MPSAFE 0x00040000 /* Handler is MP safe */ +#define CTLFLAG_VNET 0x00020000 /* Prisons with vnet can fiddle */ #define CTLFLAG_RDTUN (CTLFLAG_RD|CTLFLAG_TUN) /* From rnoland at FreeBSD.org Thu Aug 13 10:42:14 2009 From: rnoland at FreeBSD.org (Robert Noland) Date: Thu Aug 13 10:42:32 2009 Subject: svn commit: r196169 - stable/7/sys/pci In-Reply-To: <200908130820.n7D8KCgt093511@svn.freebsd.org> References: <200908130820.n7D8KCgt093511@svn.freebsd.org> Message-ID: <1250160126.1823.11.camel@balrog.2hip.net> On Thu, 2009-08-13 at 08:20 +0000, Nick Hibma wrote: > Author: n_hibma > Date: Thu Aug 13 08:20:12 2009 > New Revision: 196169 > URL: http://svn.freebsd.org/changeset/base/196169 > > Log: > Hide aperture size and stolen memory behind bootverbose. Why? This information can be useful and doesn't need to be buried in the verbose boot log. robert. > Modified: > stable/7/sys/pci/agp_i810.c > > Modified: stable/7/sys/pci/agp_i810.c > ============================================================================== > --- stable/7/sys/pci/agp_i810.c Thu Aug 13 08:18:29 2009 (r196168) > +++ stable/7/sys/pci/agp_i810.c Thu Aug 13 08:20:12 2009 (r196169) > @@ -474,12 +474,13 @@ agp_i810_attach(device_t dev) > agp_generic_detach(dev); > return EINVAL; > } > - if (sc->stolen > 0) { > - device_printf(dev, "detected %dk stolen memory\n", > - sc->stolen * 4); > + > + if (bootverbose) { > + device_print_prettyname(dev); > + if (sc->stolen > 0) > + printf("detected %dk stolen memory, ", sc->stolen * 4); > + printf("aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); > } > - device_printf(dev, "aperture size is %dM\n", > - sc->initial_aperture / 1024 / 1024); > > /* GATT address is already in there, make sure it's enabled */ > pgtblctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL); > @@ -664,9 +665,13 @@ agp_i810_attach(device_t dev) > gtt_size += 4; > > sc->stolen = (stolen - gtt_size) * 1024 / 4096; > - if (sc->stolen > 0) > - device_printf(dev, "detected %dk stolen memory\n", sc->stolen * 4); > - device_printf(dev, "aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); > + > + if (bootverbose) { > + device_print_prettyname(dev); > + if (sc->stolen > 0) > + printf("detected %dk stolen memory, ", sc->stolen * 4); > + printf("aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); > + } > > /* GATT address is already in there, make sure it's enabled */ > pgtblctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL); -- Robert Noland FreeBSD From trasz at FreeBSD.org Thu Aug 13 12:28:32 2009 From: trasz at FreeBSD.org (Edward Tomasz Napierala) Date: Thu Aug 13 12:28:38 2009 Subject: svn commit: r196179 - head/sys/cddl/compat/opensolaris/kern Message-ID: <200908131228.n7DCSU1o000650@svn.freebsd.org> Author: trasz Date: Thu Aug 13 12:28:30 2009 New Revision: 196179 URL: http://svn.freebsd.org/changeset/base/196179 Log: Remove CDDL warning. Approved by: re (kib), core Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris.c Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris.c Thu Aug 13 10:31:02 2009 (r196178) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris.c Thu Aug 13 12:28:30 2009 (r196179) @@ -49,10 +49,6 @@ opensolaris_load(void *dummy) { int i; - printf("This module (opensolaris) contains code covered by the\n"); - printf("Common Development and Distribution License (CDDL)\n"); - printf("see http://opensolaris.org/os/licensing/opensolaris_license/\n"); - /* * "Enable" all CPUs even though they may not exist just so * that the asserts work. On FreeBSD, if a CPU exists, it is From trasz at FreeBSD.org Thu Aug 13 13:56:06 2009 From: trasz at FreeBSD.org (Edward Tomasz Napierala) Date: Thu Aug 13 13:56:24 2009 Subject: svn commit: r196181 - in stable/8/sys: . amd64/include/xen cddl/compat/opensolaris/kern cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/control... Message-ID: <200908131356.n7DDu5T0002638@svn.freebsd.org> Author: trasz Date: Thu Aug 13 13:56:05 2009 New Revision: 196181 URL: http://svn.freebsd.org/changeset/base/196181 Log: InstaMFC 196179: Remove CDDL warning. Approved by: re (kib), core Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c ============================================================================== --- stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c Thu Aug 13 13:17:50 2009 (r196180) +++ stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c Thu Aug 13 13:56:05 2009 (r196181) @@ -49,10 +49,6 @@ opensolaris_load(void *dummy) { int i; - printf("This module (opensolaris) contains code covered by the\n"); - printf("Common Development and Distribution License (CDDL)\n"); - printf("see http://opensolaris.org/os/licensing/opensolaris_license/\n"); - /* * "Enable" all CPUs even though they may not exist just so * that the asserts work. On FreeBSD, if a CPU exists, it is From rwatson at FreeBSD.org Thu Aug 13 14:38:10 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Thu Aug 13 14:38:22 2009 Subject: svn commit: r196182 - stable/8/usr.bin/procstat Message-ID: <200908131438.n7DEcAK2003654@svn.freebsd.org> Author: rwatson Date: Thu Aug 13 14:38:09 2009 New Revision: 196182 URL: http://svn.freebsd.org/changeset/base/196182 Log: Merge r196120 from head to stable/8: Update procstat(1) for the fact that devfs paths are no longer unsupported. Approved by: re (kib) Modified: stable/8/usr.bin/procstat/ (props changed) stable/8/usr.bin/procstat/procstat.1 Modified: stable/8/usr.bin/procstat/procstat.1 ============================================================================== --- stable/8/usr.bin/procstat/procstat.1 Thu Aug 13 13:56:05 2009 (r196181) +++ stable/8/usr.bin/procstat/procstat.1 Thu Aug 13 14:38:09 2009 (r196182) @@ -351,10 +351,8 @@ may be mechanically parsed. .Pp The display of open file or memory mapping pathnames is implemented using the kernel's name cache. -It therefore does not work for file systems -that do not use the name cache, such as -.Xr devfs 4 , -or if the name is not present in the cache due to removal. +If a file system does not use the name cache, or the path to a file is not in +the cache, a path will not be displayed. .Pp .Nm currently supports extracting data only from a live kernel, and not from From rwatson at FreeBSD.org Thu Aug 13 14:50:41 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Thu Aug 13 14:50:58 2009 Subject: svn commit: r196184 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908131450.n7DEodDD004044@svn.freebsd.org> Author: rwatson Date: Thu Aug 13 14:50:39 2009 New Revision: 196184 URL: http://svn.freebsd.org/changeset/base/196184 Log: Merge r196121 from head to stable/8: Reverse misordered unlock and lock in at_control for netatalk phase I addresses. Submitted by: Russell Cattelan Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netatalk/at_control.c stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/netatalk/at_control.c ============================================================================== --- stable/8/sys/netatalk/at_control.c Thu Aug 13 14:46:32 2009 (r196183) +++ stable/8/sys/netatalk/at_control.c Thu Aug 13 14:50:39 2009 (r196184) @@ -276,7 +276,7 @@ at_control(struct socket *so, u_long cmd * If the request is specifying phase 1, then * only look at a phase one address */ - AT_IFADDR_RUNLOCK(); + AT_IFADDR_RLOCK(); for (oaa = aa; aa; aa = TAILQ_NEXT(aa, aa_link)) { if (aa->aa_ifp == ifp && (aa->aa_flags & AFA_PHASE2) == 0) @@ -286,7 +286,7 @@ at_control(struct socket *so, u_long cmd ifa_free(&oaa->aa_ifa); if (aa != NULL && oaa != aa) ifa_ref(&aa->aa_ifa); - AT_IFADDR_RLOCK(); + AT_IFADDR_RUNLOCK(); } else { struct at_ifaddr *oaa; From bz at FreeBSD.org Thu Aug 13 14:59:05 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Thu Aug 13 14:59:11 2009 Subject: svn commit: r196185 - head/lib/libkvm Message-ID: <200908131459.n7DEx4hf004279@svn.freebsd.org> Author: bz Date: Thu Aug 13 14:59:04 2009 New Revision: 196185 URL: http://svn.freebsd.org/changeset/base/196185 Log: Rather than replicating the maths from the kernel, use the value the kernel calculated directly as we already read it with struct vnet. This will make kvm_vnet.c more resilent in case of possible kernel changes. Reviewed by: rwatson Approved by: re (kib) Modified: head/lib/libkvm/kvm_vnet.c Modified: head/lib/libkvm/kvm_vnet.c ============================================================================== --- head/lib/libkvm/kvm_vnet.c Thu Aug 13 14:50:39 2009 (r196184) +++ head/lib/libkvm/kvm_vnet.c Thu Aug 13 14:59:04 2009 (r196185) @@ -195,7 +195,7 @@ _kvm_vnet_selectpid(kvm_t *kd, pid_t pid kd->vnet_start = nl[NLIST_START_VNET].n_value; kd->vnet_stop = nl[NLIST_STOP_VNET].n_value; kd->vnet_current = (uintptr_t)prison.pr_vnet; - kd->vnet_base = (uintptr_t)vnet.vnet_data_mem - kd->vnet_start; + kd->vnet_base = vnet.vnet_data_base; return (0); } From jhb at FreeBSD.org Thu Aug 13 15:00:20 2009 From: jhb at FreeBSD.org (John Baldwin) Date: Thu Aug 13 15:00:38 2009 Subject: svn commit: r196186 - in stable/7/usr.bin/locate: . locate Message-ID: <200908131500.n7DF0Iaf004398@svn.freebsd.org> Author: jhb Date: Thu Aug 13 15:00:18 2009 New Revision: 196186 URL: http://svn.freebsd.org/changeset/base/196186 Log: MFC: Move the check to ensure the locate database has the minimum required size when using mmap() before invoking mmap(). Modified: stable/7/usr.bin/locate/ (props changed) stable/7/usr.bin/locate/locate/fastfind.c stable/7/usr.bin/locate/locate/locate.c Modified: stable/7/usr.bin/locate/locate/fastfind.c ============================================================================== --- stable/7/usr.bin/locate/locate/fastfind.c Thu Aug 13 14:59:04 2009 (r196185) +++ stable/7/usr.bin/locate/locate/fastfind.c Thu Aug 13 15:00:18 2009 (r196186) @@ -154,9 +154,6 @@ fastfind /* init bigram table */ #ifdef FF_MMAP - if (len < (2*NBG)) - errx(1, "database too small: %s", database); - for (c = 0, p = bigram1, s = bigram2; c < NBG; c++, len-= 2) { p[c] = check_bigram_char(*paddr++); s[c] = check_bigram_char(*paddr++); Modified: stable/7/usr.bin/locate/locate/locate.c ============================================================================== --- stable/7/usr.bin/locate/locate/locate.c Thu Aug 13 14:59:04 2009 (r196185) +++ stable/7/usr.bin/locate/locate/locate.c Thu Aug 13 15:00:18 2009 (r196186) @@ -291,6 +291,8 @@ search_mmap(db, s) fstat(fd, &sb) == -1) err(1, "`%s'", db); len = sb.st_size; + if (len < (2*NBG)) + errx(1, "database too small: %s", db); if ((p = mmap((caddr_t)0, (size_t)len, PROT_READ, MAP_SHARED, From rwatson at FreeBSD.org Thu Aug 13 15:01:51 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Thu Aug 13 15:02:10 2009 Subject: svn commit: r196187 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908131501.n7DF1o0b004478@svn.freebsd.org> Author: rwatson Date: Thu Aug 13 15:01:50 2009 New Revision: 196187 URL: http://svn.freebsd.org/changeset/base/196187 Log: Merge r196122 from head to stable/8: Correctly audit real gids following changes to the audit record argument interface. Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/security/audit/audit.h stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/security/audit/audit.h ============================================================================== --- stable/8/sys/security/audit/audit.h Thu Aug 13 15:00:18 2009 (r196186) +++ stable/8/sys/security/audit/audit.h Thu Aug 13 15:01:50 2009 (r196187) @@ -232,7 +232,7 @@ void audit_thread_free(struct thread *t #define AUDIT_ARG_RGID(rgid) do { \ if (AUDITING_TD(curthread)) \ - audit_arg_gid((rgid)); \ + audit_arg_rgid((rgid)); \ } while (0) #define AUDIT_ARG_RUID(ruid) do { \ From bz at FreeBSD.org Thu Aug 13 15:02:04 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Thu Aug 13 15:02:29 2009 Subject: svn commit: r196188 - stable/8/lib/libkvm Message-ID: <200908131502.n7DF23FU004519@svn.freebsd.org> Author: bz Date: Thu Aug 13 15:02:02 2009 New Revision: 196188 URL: http://svn.freebsd.org/changeset/base/196188 Log: MFC r196185: Rather than replicating the maths from the kernel, use the value the kernel calculated directly as we already read it with struct vnet. This will make kvm_vnet.c more resilent in case of possible kernel changes. Reviewed by: rwatson Approved by: re (kib) Modified: stable/8/lib/libkvm/ (props changed) stable/8/lib/libkvm/kvm_vnet.c Modified: stable/8/lib/libkvm/kvm_vnet.c ============================================================================== --- stable/8/lib/libkvm/kvm_vnet.c Thu Aug 13 15:01:50 2009 (r196187) +++ stable/8/lib/libkvm/kvm_vnet.c Thu Aug 13 15:02:02 2009 (r196188) @@ -195,7 +195,7 @@ _kvm_vnet_selectpid(kvm_t *kd, pid_t pid kd->vnet_start = nl[NLIST_START_VNET].n_value; kd->vnet_stop = nl[NLIST_STOP_VNET].n_value; kd->vnet_current = (uintptr_t)prison.pr_vnet; - kd->vnet_base = (uintptr_t)vnet.vnet_data_mem - kd->vnet_start; + kd->vnet_base = vnet.vnet_data_base; return (0); } From jhb at FreeBSD.org Thu Aug 13 15:06:09 2009 From: jhb at FreeBSD.org (John Baldwin) Date: Thu Aug 13 15:06:15 2009 Subject: svn commit: r196189 - in stable/7/usr.sbin/acpi: . acpidump Message-ID: <200908131506.n7DF68qt004671@svn.freebsd.org> Author: jhb Date: Thu Aug 13 15:06:08 2009 New Revision: 196189 URL: http://svn.freebsd.org/changeset/base/196189 Log: MFC: Parse the System Resource Affinity Table ('SRAT') used to describe affinity relationships between CPUs and memory. Modified: stable/7/usr.sbin/acpi/ (props changed) stable/7/usr.sbin/acpi/acpidump/acpi.c stable/7/usr.sbin/acpi/acpidump/acpidump.h Modified: stable/7/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- stable/7/usr.sbin/acpi/acpidump/acpi.c Thu Aug 13 15:02:02 2009 (r196188) +++ stable/7/usr.sbin/acpi/acpidump/acpi.c Thu Aug 13 15:06:08 2009 (r196189) @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -57,6 +58,11 @@ static void acpi_print_intr(u_int32_t in static void acpi_print_apic(struct MADT_APIC *mp); static void acpi_handle_apic(struct ACPIsdt *sdp); static void acpi_handle_hpet(struct ACPIsdt *sdp); +static void acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain, + uint32_t flags); +static void acpi_print_srat_memory(struct SRAT_memory *mp); +static void acpi_print_srat(struct SRATentry *srat); +static void acpi_handle_srat(struct ACPIsdt *sdp); static void acpi_print_sdt(struct ACPIsdt *sdp); static void acpi_print_fadt(struct ACPIsdt *sdp); static void acpi_print_facs(struct FACSbody *facs); @@ -256,7 +262,10 @@ static void acpi_print_apic(struct MADT_APIC *mp) { - printf("\tType=%s\n", apic_types[mp->type]); + if (mp->type < sizeof(apic_types) / sizeof(apic_types[0])) + printf("\tType=%s\n", apic_types[mp->type]); + else + printf("\tType=%d (unknown)\n", mp->type); switch (mp->type) { case ACPI_MADT_APIC_TYPE_LOCAL_APIC: acpi_print_local_apic(mp->body.local_apic.cpu_id, @@ -305,9 +314,6 @@ acpi_print_apic(struct MADT_APIC *mp) acpi_print_intr(mp->body.int_src.intr, mp->body.int_src.mps_flags); break; - default: - printf("\tUnknown type %d\n", (u_int)mp->type); - break; } } @@ -391,10 +397,92 @@ acpi_handle_mcfg(struct ACPIsdt *sdp) sizeof(*mcfg->s); for (i = 0; i < e; i++, mcfg++) { printf("\n"); - printf("\tBase Address= 0x%016jx\n", mcfg->s[i].baseaddr); - printf("\tSegment Group= 0x%04x\n", mcfg->s[i].seg_grp); - printf("\tStart Bus= %d\n", mcfg->s[i].start); - printf("\tEnd Bus= %d\n", mcfg->s[i].end); + printf("\tBase Address=0x%016jx\n", mcfg->s[i].baseaddr); + printf("\tSegment Group=0x%04x\n", mcfg->s[i].seg_grp); + printf("\tStart Bus=%d\n", mcfg->s[i].start); + printf("\tEnd Bus=%d\n", mcfg->s[i].end); + } + printf(END_COMMENT); +} + +static void +acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain, + uint32_t flags) +{ + + printf("\tFlags={"); + if (flags & ACPI_SRAT_CPU_ENABLED) + printf("ENABLED"); + else + printf("DISABLED"); + printf("}\n"); + printf("\tAPIC ID=%d\n", apic_id); + printf("\tProximity Domain=%d\n", proximity_domain); +} + +static void +acpi_print_srat_memory(struct SRAT_memory *mp) +{ + + printf("\tFlags={"); + if (mp->flags & ACPI_SRAT_MEM_ENABLED) + printf("ENABLED"); + else + printf("DISABLED"); + if (mp->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) + printf(",HOT_PLUGGABLE"); + if (mp->flags & ACPI_SRAT_MEM_NON_VOLATILE) + printf(",NON_VOLATILE"); + printf("}\n"); + printf("\tBase Address=0x%016jx\n", (uintmax_t)mp->base_address); + printf("\tLength=0x%016jx\n", (uintmax_t)mp->length); + printf("\tProximity Domain=%d\n", mp->proximity_domain); +} + +const char *srat_types[] = { "CPU", "Memory", "X2APIC" }; + +static void +acpi_print_srat(struct SRATentry *srat) +{ + + if (srat->type < sizeof(srat_types) / sizeof(srat_types[0])) + printf("\tType=%s\n", srat_types[srat->type]); + else + printf("\tType=%d (unknown)\n", srat->type); + switch (srat->type) { + case ACPI_SRAT_TYPE_CPU_AFFINITY: + acpi_print_srat_cpu(srat->body.cpu.apic_id, + srat->body.cpu.proximity_domain_hi[2] << 24 | + srat->body.cpu.proximity_domain_hi[1] << 16 | + srat->body.cpu.proximity_domain_hi[0] << 0 | + srat->body.cpu.proximity_domain_lo, srat->body.cpu.flags); + break; + case ACPI_SRAT_TYPE_MEMORY_AFFINITY: + acpi_print_srat_memory(&srat->body.mem); + break; + case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY: + acpi_print_srat_cpu(srat->body.x2apic.apic_id, + srat->body.x2apic.proximity_domain, + srat->body.x2apic.flags); + break; + } +} + +static void +acpi_handle_srat(struct ACPIsdt *sdp) +{ + struct SRATbody *sratp; + struct SRATentry *entry; + + printf(BEGIN_COMMENT); + acpi_print_sdt(sdp); + sratp = (struct SRATbody *)sdp->body; + printf("\tTable Revision=%d\n", sratp->table_revision); + entry = sratp->body; + while (((uintptr_t)entry) - ((uintptr_t)sdp) < sdp->len) { + printf("\n"); + acpi_print_srat(entry); + entry = (struct SRATentry *)((char *)entry + entry->len); } printf(END_COMMENT); } @@ -708,6 +796,8 @@ acpi_handle_rsdt(struct ACPIsdt *rsdp) acpi_handle_ecdt(sdp); else if (!memcmp(sdp->signature, "MCFG", 4)) acpi_handle_mcfg(sdp); + else if (!memcmp(sdp->signature, "SRAT", 4)) + acpi_handle_srat(sdp); else { printf(BEGIN_COMMENT); acpi_print_sdt(sdp); Modified: stable/7/usr.sbin/acpi/acpidump/acpidump.h ============================================================================== --- stable/7/usr.sbin/acpi/acpidump/acpidump.h Thu Aug 13 15:02:02 2009 (r196188) +++ stable/7/usr.sbin/acpi/acpidump/acpidump.h Thu Aug 13 15:06:08 2009 (r196189) @@ -304,6 +304,56 @@ struct MCFGbody { } s[1] __packed; } __packed; +/* System Resource Affinity Table */ +struct SRAT_cpu { + uint8_t proximity_domain_lo; + uint8_t apic_id; + uint32_t flags; +#define ACPI_SRAT_CPU_ENABLED 0x00000001 + uint8_t sapic_eid; + uint8_t proximity_domain_hi[3]; + uint32_t reserved; +} __packed; + +struct SRAT_memory { + uint32_t proximity_domain; + uint16_t reserved; + uint64_t base_address; + uint64_t length; + uint32_t reserved1; + uint32_t flags; +#define ACPI_SRAT_MEM_ENABLED 0x00000001 +#define ACPI_SRAT_MEM_HOT_PLUGGABLE 0x00000002 +#define ACPI_SRAT_MEM_NON_VOLATILE 0x00000002 + uint64_t reserved2; +} __packed; + +struct SRAT_x2apic { + uint16_t reserved; + uint32_t proximity_domain; + uint32_t apic_id; + uint32_t flags; +} __packed; + +struct SRATentry { + uint8_t type; +#define ACPI_SRAT_TYPE_CPU_AFFINITY 0 +#define ACPI_SRAT_TYPE_MEMORY_AFFINITY 1 +#define ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY 2 + uint8_t len; + union { + struct SRAT_cpu cpu; + struct SRAT_memory mem; + struct SRAT_x2apic x2apic; + } body; +} __packed; + +struct SRATbody { + uint32_t table_revision; + uint64_t reserved; + struct SRATentry body[0]; +} __packed; + /* * Addresses to scan on ia32 for the RSD PTR. According to section 5.2.2 * of the ACPI spec, we only consider two regions for the base address: From rwatson at FreeBSD.org Thu Aug 13 15:08:07 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Thu Aug 13 15:08:25 2009 Subject: svn commit: r196190 - in stable/8/lib/libc: . posix1e stdio stdtime string Message-ID: <200908131508.n7DF859n004743@svn.freebsd.org> Author: rwatson Date: Thu Aug 13 15:08:05 2009 New Revision: 196190 URL: http://svn.freebsd.org/changeset/base/196190 Log: Merge r196123 from head to stable/8: Update posix1e-related man pages, especially as relates to MAC, to more accurately reflect the last ten years of work. Approved by: re (kib) Modified: stable/8/lib/libc/ (props changed) stable/8/lib/libc/posix1e/Makefile.inc stable/8/lib/libc/posix1e/mac.3 stable/8/lib/libc/posix1e/mac_free.3 stable/8/lib/libc/posix1e/mac_get.3 stable/8/lib/libc/posix1e/mac_set.3 stable/8/lib/libc/posix1e/mac_text.3 stable/8/lib/libc/posix1e/posix1e.3 stable/8/lib/libc/stdio/asprintf.c (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/string/ffsll.c (props changed) stable/8/lib/libc/string/flsll.c (props changed) stable/8/lib/libc/string/wcpcpy.c (props changed) stable/8/lib/libc/string/wcpncpy.c (props changed) Modified: stable/8/lib/libc/posix1e/Makefile.inc ============================================================================== --- stable/8/lib/libc/posix1e/Makefile.inc Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/Makefile.inc Thu Aug 13 15:08:05 2009 (r196190) @@ -106,14 +106,16 @@ MLINKS+=acl_create_entry.3 acl_create_en mac_get.3 mac_get_fd.3 \ mac_get.3 mac_get_file.3 \ mac_get.3 mac_get_link.3 \ + mac_get.3 mac_get_peer.3 \ mac_get.3 mac_get_pid.3 \ mac_get.3 mac_get_proc.3 \ mac_prepare.3 mac_prepare_file_label.3 \ mac_prepare.3 mac_prepare_ifnet_label.3 \ mac_prepare.3 mac_prepare_process_label.3 \ - mac_set.3 mac_set_link.3 \ + mac_prepare.3 mac_prepare_type.3 \ mac_set.3 mac_set_fd.3 \ mac_set.3 mac_set_file.3 \ + mac_set.3 mac_set_link.3 \ mac_set.3 mac_set_proc.3 \ mac_text.3 mac_from_text.3 \ mac_text.3 mac_to_text.3 Modified: stable/8/lib/libc/posix1e/mac.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/mac.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -1,4 +1,5 @@ .\" Copyright (c) 2001, 2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2009 Robert N. M. Watson .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris @@ -30,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 19, 2003 +.Dd August 7, 2009 .Dt MAC 3 .Os .Sh NAME @@ -44,81 +45,82 @@ In the kernel configuration file: .Cd "options MAC" .Sh DESCRIPTION -.Fx -permits administrators to define Mandatory Access Control labels -defining levels for the privacy and integrity of data, -overriding discretionary policies -for those objects. -Not all objects currently provide support for MAC labels, -and MAC support must be explicitly enabled by the administrator. -The library calls include routines to retrieve, duplicate, -and set MAC labels associated with files and processes. -.Pp -POSIX.1e describes a set of MAC manipulation routines -to manage the contents of MAC labels, -as well as their relationships with -files and processes; -almost all of these support routines -are implemented in -.Fx . +Mandatory Access Control labels describe confidentiality, integrity, and +other security attributes of operating system objects, overriding +discretionary access control. +Not all system objects support MAC labeling, and MAC policies must be +explicitly enabled by the administrator. +This API, based on POSIX.1e, includes routines to retrieve, manipulate, set, +and convert to and from text the MAC labels on files and processes. +.Pp +MAC labels consist of a set of (name, value) tuples, representing security +attributes from MAC policies. +For example, this label contains security labels defined by two policies, +.Xr mac_biba 4 +and +.Xr mac_mls 4 : +.Bd -literal -offset indent +biba/low,mls/low +.Ed +.Pp +Further syntax and semantics of MAC labels may be found in +.Xr maclabel 7 . +.Pp +Applications operate on labels stored in +.Vt mac_t , +but can convert between this internal format and a text format for the +purposes of presentation to uses or external storage. +When querying a label on an object, a +.Vt mac_t +must first be prepared using the interfaces described in +.Xr mac_prepare 3 , +allowing the application to declare which policies it wishes to interogate. +The application writer can also rely on default label names declared in +.Xr mac.conf 5 . +.Pp +When finished with a +.Vt mac_t , +the application must call +.Xr mac_free 3 +to release its storage. .Pp -Available functions, sorted by behavior, include: +The following functions are defined: .Bl -tag -width indent -.It Fn mac_get_fd -This function is described in +.It Fn mac_is_present +This function, described in +.Xr mac_is_present 3 , +allows applications to test whether MAC is configured, as well as whether +specific policies are configured. +.It Fn mac_get_fd , Fn mac_get_file , Fn mac_get_link , Fn mac_get_peer +These functions, described in .Xr mac_get 3 , -and may be used to retrieve the -MAC label associated with -a specific file descriptor. -.It Fn mac_get_file -This function is described in +retrieve the MAC labels associated with file descriptors, files, and socket +peers. +.It Fn mac_get_pid , Fn mac_get_proc +These functions, described in .Xr mac_get 3 , -and may be used to retrieve the -MAC label associated with -a named file. -.It Fn mac_get_proc -This function is described in -.Xr mac_get 3 , -and may be used to retrieve the -MAC label associated with -the calling process. -.It Fn mac_set_fd -This function is described in -.Xr mac_set 3 , -and may be used to set the -MAC label associated with -a specific file descriptor. -.It Fn mac_set_file -This function is described in +retrieve the MAC labels associated with processes. +.It Fn mac_set_fd , Fn mac_set_file , Fn mac_set_link +These functions, described in .Xr mac_set 3 , -and may be used to set the -MAC label associated with -a named file. +set the MAC labels associated with file descriptors and files. .It Fn mac_set_proc -This function is described in +This function, described in .Xr mac_set 3 , -and may be used to set the -MAC label associated with -the calling process. +sets the MAC label associated with the current process. .It Fn mac_free -This function is described in +This function, desribed in .Xr mac_free 3 , -and may be used to free -userland working MAC label storage. +frees working MAC label storage. .It Fn mac_from_text -This function is described in +This function, described in .Xr mac_text 3 , -and may be used to convert -a text-form MAC label -into a working +converts a text-form MAC label into working MAC label storage, .Vt mac_t . -.It Fn mac_prepare -.It Fn mac_prepare_file_label -.It Fn mac_prepare_ifnet_label -.It Fn mac_prepare_process_label -These functions are described in +.It Fn mac_prepare , Fn mac_prepare_file_label , Fn mac_prepare_ifnet_label , Fn mac_prepare_process_label , Fn mac_prepare_type +These functions, described in .Xr mac_prepare 3 , -and may be used to preallocate storage for MAC label retrieval. +allocate working storage for MAC label operations. .Xr mac_prepare 3 prepares a label based on caller-specified label names; the other calls rely on the default configuration specified in @@ -130,15 +132,6 @@ and may be used to convert a .Vt mac_t into a text-form MAC label. .El -The behavior of some of these calls is influenced by the configuration -settings found in -.Xr mac.conf 5 , -the MAC library run-time configuration file. -.Sh IMPLEMENTATION NOTES -.Fx Ns 's -support for POSIX.1e interfaces and features -is -.Ud . .Sh FILES .Bl -tag -width ".Pa /etc/mac.conf" -compact .It Pa /etc/mac.conf @@ -150,24 +143,20 @@ system objects, but without policy-speci .Sh SEE ALSO .Xr mac_free 3 , .Xr mac_get 3 , +.Xr mac_is_present 3 , .Xr mac_prepare 3 , .Xr mac_set 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac.conf 5 , .Xr mac 9 .Sh STANDARDS -These APIs are loosely based on the APIs described in POSIX.1e. -POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft -continues on the cross-platform POSIX.1e implementation mailing list. -To join this list, see the -.Fx -POSIX.1e implementation page -for more information. -However, the resemblance of these APIs to the POSIX APIs is only loose, -as the POSIX APIs were unable to express many notions required for -flexible and extensible access control. +These APIs are loosely based on the APIs described in POSIX.1e, as described +in IEEE POSIX.1e draft 17. +However, the resemblence of these APIS to the POSIX APIs is loose, as the +PSOXI APIS were unable to express some notinos required for flexible and +extensible access control. .Sh HISTORY Support for Mandatory Access Control was introduced in .Fx 5.0 Modified: stable/8/lib/libc/posix1e/mac_free.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac_free.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/mac_free.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -64,6 +64,7 @@ function. .Xr mac_prepare 3 , .Xr mac_set 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac 9 .Sh STANDARDS @@ -91,8 +92,8 @@ is a complex structure in the .Tn TrustedBSD implementation, .Fn mac_free -is specific to that type, and must not be used to free the character -strings returned from +is specific to +.Vt mac_3 , +and must not be used to free the character strings returned from .Fn mac_to_text . -Doing so may result in undefined behavior, -including application failure. +Doing so may result in undefined behavior. Modified: stable/8/lib/libc/posix1e/mac_get.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac_get.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/mac_get.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -133,6 +133,7 @@ is not a directory. .Xr mac_prepare 3 , .Xr mac_set 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac 9 .Sh STANDARDS Modified: stable/8/lib/libc/posix1e/mac_set.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac_set.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/mac_set.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -138,6 +138,7 @@ is not a directory. .Xr mac_is_present 3 , .Xr mac_prepare 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac 9 .Sh HISTORY Modified: stable/8/lib/libc/posix1e/mac_text.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac_text.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/mac_text.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -98,6 +98,7 @@ to allocate internal storage. .Xr mac_is_present 3 , .Xr mac_prepare 3 , .Xr mac_set 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr maclabel 7 .Sh STANDARDS Modified: stable/8/lib/libc/posix1e/posix1e.3 ============================================================================== --- stable/8/lib/libc/posix1e/posix1e.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/posix1e.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2000 Robert N. M. Watson +.\" Copyright (c) 2000, 2009 Robert N. M. Watson .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 20, 2009 +.Dd August 7, 2009 .Dt POSIX1E 3 .Os .Sh NAME @@ -36,99 +36,77 @@ .Sh SYNOPSIS .In sys/types.h .In sys/acl.h -.\" .In sys/capability.h .In sys/mac.h .Sh DESCRIPTION -The IEEE POSIX.1e specification never left draft form, but the interfaces -it describes are now widely used despite inherent limitations. -Currently, only a few of the interfaces and features are implemented in -.Fx , -although efforts are underway to complete the integration at this time. +POSIX.1e describes five security extensions to the POSIX.1 API: Access +Control Lists (ACLs), Auditing, Capabilities, Mandatory Access Control, and +Information Flow Labels. +While IEEE POSIX.1e D17 specification has not been standardized, several of +its interfaces are widely used. .Pp -POSIX.1e describes five security extensions to the base POSIX.1 API: -Access Control Lists (ACLs), Auditing, Capabilities, Mandatory Access -Control, and Information Flow Labels. .Fx -supports POSIX.1e ACL interfaces, as well as POSIX.1e-like MAC -interfaces. -The TrustedBSD Project has produced but not integrated an implementation -of POSIX.1e Capabilities. -.Pp -POSIX.1e defines both syntax and semantics for these features, but fairly -substantial changes are required to implement these features in the -operating system. -.Pp -As shipped, -.Fx 4.0 -provides API and VFS support for ACLs, but not an implementation on any -native file system. -.Fx 5.0 -includes support for ACLs as part of UFS1 and UFS2, as well as necessary -VFS support for additional file systems to export ACLs as appropriate. -Available API calls relating to ACLs are described in detail in -.Xr acl 3 . -.Pp -As shipped, -.Fx 5.0 -includes support for Mandatory Access Control as well as POSIX.1e-like -APIs for label management. -More information on API calls relating to MAC is available in -.Xr mac 3 . +implements POSIX.1e interface for access control lists, described in +.Xr acl 3 , +and supports ACLs on the +.Xr ffs 7 +file system; ACLs must be administratively enabled using +.Xr tunefs 8 . .Pp -Additional patches supporting POSIX.1e features are provided by the -TrustedBSD project: +.Fx +implements a POSIX.1e-like mandatory access control interface, described in +.Xr mac 3 , +although with a number of extensions and important semantic differences. .Pp -http://www.TrustedBSD.org/ -.Sh IMPLEMENTATION NOTES -.Fx Ns 's -support for POSIX.1e interfaces and features is still under -development at this time, and many of these features are considered new -or experimental. +.Fx +does not implement the POSIX.1e audit, privilege (capability), or information +flow label APIs. +However, +.Fx +does implement the +.Xr libbsm +audit API. .Sh ENVIRONMENT -POSIX.1e assigns security labels to all objects, extending the security +POSIX.1e assigns security attributes to all objects, extending the security functionality described in POSIX.1. -These additional labels provide -fine-grained discretionary access control, fine-grained capabilities, -and labels necessary for mandatory access control. -POSIX.2c describes -a set of userland utilities for manipulating these labels. +These additional attributes store fine-grained discretionary access control +information and mandatory access control labels; for files, they are stored +in extended attributes, described in +.Xr extattr 3 . .Pp -Many of these services are supported by extended attributes, documented -in -.Xr extattr 2 +POSIX.2c describes +a set of userland utilities for manipulating these attributes, including +.Xr getfacl 1 +and +.Xr setfacl 1 +for access control lists, and +.Xr getfmac 8 and -.Xr extattr 9 . -While these APIs are not documented in POSIX.1e, they are similar in -structure. +.Xr setfmac 8 +for mandatory access control labels. .Sh SEE ALSO +.Xr getfacl 1 , +.Xr setfacl 1 , .Xr extattr 2 , .Xr acl 3 , +.Xr extattr 3 , .Xr libbsm 3 , .Xr mac 3 , +.Xr ffs 7 , +.Xr getfmac 8 , +.Xr setfmac 8 , +.Xr tunefs 8 , .Xr acl 9 , .Xr extattr 9 , .Xr mac 9 .Sh STANDARDS POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft continues -on the cross-platform POSIX.1e implementation -mailing list. -To join this list, see the -.Fx -POSIX.1e implementation -page for more information. .Sh HISTORY POSIX.1e support was introduced in .Fx 4.0 ; -most of the features are available as of +most features were available as of .Fx 5.0 . -Development continues. .Sh AUTHORS .An Robert N M Watson .An Chris D. Faulhaber .An Thomas Moestl .An Ilmar S Habibulin -.Sh BUGS -Many of these features are considered new or experimental in -.Fx 5.0 -and should be deployed with appropriate caution. From bz at FreeBSD.org Thu Aug 13 15:16:31 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Thu Aug 13 15:16:38 2009 Subject: svn commit: r196192 - in stable/7/sys: . contrib/pf netinet netinet6 Message-ID: <200908131516.n7DFGUSC005047@svn.freebsd.org> Author: bz Date: Thu Aug 13 15:16:30 2009 New Revision: 196192 URL: http://svn.freebsd.org/changeset/base/196192 Log: MFC: r192649 Implement UDP control block support. Add udpcb support with own fields and flags for UDP instead of further sticking things into in_pcb and flags fields. Attach the udpcb to the inp_ppcb in the kernel. Note: the udp tunneling parts are not (yet) existing in 7 and thus were not merged. Reviewed by: rwatson Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/netinet/udp_usrreq.c stable/7/sys/netinet/udp_var.h stable/7/sys/netinet6/udp6_usrreq.c Modified: stable/7/sys/netinet/udp_usrreq.c ============================================================================== --- stable/7/sys/netinet/udp_usrreq.c Thu Aug 13 15:14:02 2009 (r196191) +++ stable/7/sys/netinet/udp_usrreq.c Thu Aug 13 15:16:30 2009 (r196192) @@ -138,6 +138,7 @@ SYSCTL_INT(_net_inet_udp, OID_AUTO, sore struct inpcbhead udb; /* from udp_var.h */ struct inpcbinfo udbinfo; +static uma_zone_t udpcb_zone; #ifndef UDBHASHSIZE #define UDBHASHSIZE 128 @@ -156,6 +157,7 @@ udp_zone_change(void *tag) { uma_zone_set_max(udbinfo.ipi_zone, maxsockets); + uma_zone_set_max(udpcb_zone, maxsockets); } static int @@ -179,9 +181,14 @@ udp_init(void) &udbinfo.ipi_hashmask); udbinfo.ipi_porthashbase = hashinit(UDBHASHSIZE, M_PCB, &udbinfo.ipi_porthashmask); - udbinfo.ipi_zone = uma_zcreate("udpcb", sizeof(struct inpcb), NULL, - NULL, udp_inpcb_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + udbinfo.ipi_zone = uma_zcreate("udp_inpcb", sizeof(struct inpcb), + NULL, NULL, udp_inpcb_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); uma_zone_set_max(udbinfo.ipi_zone, maxsockets); + + udpcb_zone = uma_zcreate("udpcb", sizeof(struct udpcb), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + uma_zone_set_max(udpcb_zone, maxsockets); + EVENTHANDLER_REGISTER(maxsockets_change, udp_zone_change, NULL, EVENTHANDLER_PRI_ANY); TUNABLE_INT_FETCH("net.inet.udp.soreceive_dgram_enabled", @@ -194,6 +201,25 @@ udp_init(void) } } +int +udp_newudpcb(struct inpcb *inp) +{ + struct udpcb *up; + + up = uma_zalloc(udpcb_zone, M_NOWAIT | M_ZERO); + if (up == NULL) + return (ENOBUFS); + inp->inp_ppcb = up; + return (0); +} + +void +udp_discardcb(struct udpcb *up) +{ + + uma_zfree(udpcb_zone, up); +} + /* * Subroutine of udp_input(), which appends the provided mbuf chain to the * passed pcb/socket. The caller must provide a sockaddr_in via udp_in that @@ -1129,10 +1155,19 @@ udp_attach(struct socket *so, int proto, } inp = (struct inpcb *)so->so_pcb; - INP_INFO_WUNLOCK(&udbinfo); inp->inp_vflag |= INP_IPV4; inp->inp_ip_ttl = ip_defttl; + + error = udp_newudpcb(inp); + if (error) { + in_pcbdetach(inp); + in_pcbfree(inp); + INP_INFO_WUNLOCK(&udbinfo); + return (error); + } + INP_WUNLOCK(inp); + INP_INFO_WUNLOCK(&udbinfo); return (0); } @@ -1205,6 +1240,7 @@ static void udp_detach(struct socket *so) { struct inpcb *inp; + struct udpcb *up; inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_detach: inp == NULL")); @@ -1212,9 +1248,13 @@ udp_detach(struct socket *so) ("udp_detach: not disconnected")); INP_INFO_WLOCK(&udbinfo); INP_WLOCK(inp); + up = intoudpcb(inp); + KASSERT(up != NULL, ("%s: up == NULL", __func__)); + inp->inp_ppcb = NULL; in_pcbdetach(inp); in_pcbfree(inp); INP_INFO_WUNLOCK(&udbinfo); + udp_discardcb(up); } static int Modified: stable/7/sys/netinet/udp_var.h ============================================================================== --- stable/7/sys/netinet/udp_var.h Thu Aug 13 15:14:02 2009 (r196191) +++ stable/7/sys/netinet/udp_var.h Thu Aug 13 15:16:30 2009 (r196192) @@ -51,6 +51,17 @@ struct udpiphdr { #define ui_ulen ui_u.uh_ulen #define ui_sum ui_u.uh_sum +/* + * UDP control block; one per udp. + */ +struct udpcb { + void *u_pspare; + u_int u_flags; /* Generic UDP flags. */ +}; + +#define intoudpcb(ip) ((struct udpcb *)(ip)->inp_ppcb) +#define sotoudpcb(so) (intoudpcb(sotoinpcb(so))) + struct udpstat { /* input statistics: */ u_long udps_ipackets; /* total input packets */ @@ -102,6 +113,9 @@ extern struct udpstat udpstat; extern int udp_blackhole; extern int udp_log_in_vain; +int udp_newudpcb(struct inpcb *); +void udp_discardcb(struct udpcb *); + void udp_ctlinput(int, struct sockaddr *, void *); void udp_init(void); void udp_input(struct mbuf *, int); Modified: stable/7/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/7/sys/netinet6/udp6_usrreq.c Thu Aug 13 15:14:02 2009 (r196191) +++ stable/7/sys/netinet6/udp6_usrreq.c Thu Aug 13 15:16:30 2009 (r196192) @@ -739,7 +739,6 @@ udp6_attach(struct socket *so, int proto return (error); } inp = (struct inpcb *)so->so_pcb; - INP_INFO_WUNLOCK(&udbinfo); inp->inp_vflag |= INP_IPV6; if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) inp->inp_vflag |= INP_IPV4; @@ -752,7 +751,16 @@ udp6_attach(struct socket *so, int proto * which may match an IPv4-mapped IPv6 address. */ inp->inp_ip_ttl = ip_defttl; + + error = udp_newudpcb(inp); + if (error) { + in_pcbdetach(inp); + in_pcbfree(inp); + INP_INFO_WUNLOCK(&udbinfo); + return (error); + } INP_WUNLOCK(inp); + INP_INFO_WUNLOCK(&udbinfo); return (0); } @@ -883,15 +891,19 @@ static void udp6_detach(struct socket *so) { struct inpcb *inp; + struct udpcb *up; inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp6_detach: inp == NULL")); INP_INFO_WLOCK(&udbinfo); INP_WLOCK(inp); + up = intoudpcb(inp); + KASSERT(up != NULL, ("%s: up == NULL", __func__)); in_pcbdetach(inp); in_pcbfree(inp); INP_INFO_WUNLOCK(&udbinfo); + udp_discardcb(up); } static int From bz at FreeBSD.org Thu Aug 13 15:30:08 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Thu Aug 13 15:30:15 2009 Subject: svn commit: r196192 - in stable/7/sys: . contrib/pf netinet netinet6 In-Reply-To: <200908131516.n7DFGUSC005047@svn.freebsd.org> References: <200908131516.n7DFGUSC005047@svn.freebsd.org> Message-ID: <20090813151939.H93661@maildrop.int.zabbadoz.net> On Thu, 13 Aug 2009, Bjoern A. Zeeb wrote: > Author: bz > Date: Thu Aug 13 15:16:30 2009 > New Revision: 196192 > URL: http://svn.freebsd.org/changeset/base/196192 > > Log: > MFC: r192649 > > Implement UDP control block support. > > Add udpcb support with own fields and flags for UDP instead > of further sticking things into in_pcb and flags fields. > Attach the udpcb to the inp_ppcb in the kernel. > > Note: the udp tunneling parts are not (yet) existing in 7 > and thus were not merged. > > Reviewed by: rwatson I forgot: Submitted by: jhb (original 7.x version before detour via HEAD) Not that there are consumers out there using an UDPCB in 7-STABLE already and thus can reduce their patchset now, this gives us the possibility to generate a IPSEC NAT-T patch that will be compatible with what is in FreeBSD 8 and HEAD (9) reducing problems on maintainance for ports and and tools (I'll post that patch in a bit on net@). We can also MFC the generic in-kernel UDP tunneling support now, even if the SCTP changes might not be MFCable, externel kernel modules can still make use of this then. > Modified: > stable/7/sys/ (props changed) > stable/7/sys/contrib/pf/ (props changed) > stable/7/sys/netinet/udp_usrreq.c > stable/7/sys/netinet/udp_var.h > stable/7/sys/netinet6/udp6_usrreq.c -- Bjoern A. Zeeb What was I talking about and who are you again? From raj at FreeBSD.org Thu Aug 13 15:56:10 2009 From: raj at FreeBSD.org (Rafal Jaworowski) Date: Thu Aug 13 15:56:17 2009 Subject: svn commit: r196193 - head/sys/arm/arm Message-ID: <200908131556.n7DFu9dE005965@svn.freebsd.org> Author: raj Date: Thu Aug 13 15:56:09 2009 New Revision: 196193 URL: http://svn.freebsd.org/changeset/base/196193 Log: Use correct wbinv operation in pmap_l2cache_wbinv_range(). Submitted by: Michal Hajduk Reviewed by: stas Approved by: re (kib) Obtained from: Semihalf Modified: head/sys/arm/arm/pmap.c Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Thu Aug 13 15:16:30 2009 (r196192) +++ head/sys/arm/arm/pmap.c Thu Aug 13 15:56:09 2009 (r196193) @@ -1212,7 +1212,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_wbinv_range(va, rest); len -= rest; va += rest; From raj at FreeBSD.org Thu Aug 13 16:01:20 2009 From: raj at FreeBSD.org (Rafal Jaworowski) Date: Thu Aug 13 16:01:27 2009 Subject: svn commit: r196194 - in stable/8/sys: . amd64/include/xen arm/arm cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev... Message-ID: <200908131601.n7DG1Jtc006132@svn.freebsd.org> Author: raj Date: Thu Aug 13 16:01:19 2009 New Revision: 196194 URL: http://svn.freebsd.org/changeset/base/196194 Log: MFC r196193: Use correct wbinv operation in pmap_l2cache_wbinv_range(). Submitted by: Michal Hajduk Reviewed by: stas Approved by: re (kib) Obtained from: Semihalf Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/arm/arm/pmap.c stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/arm/arm/pmap.c ============================================================================== --- stable/8/sys/arm/arm/pmap.c Thu Aug 13 15:56:09 2009 (r196193) +++ stable/8/sys/arm/arm/pmap.c Thu Aug 13 16:01:19 2009 (r196194) @@ -1212,7 +1212,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_wbinv_range(va, rest); len -= rest; va += rest; From attilio at FreeBSD.org Thu Aug 13 17:09:47 2009 From: attilio at FreeBSD.org (Attilio Rao) Date: Thu Aug 13 17:10:00 2009 Subject: svn commit: r196196 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/conf sys/i386/conf sys/i386/i386 sys/i386/include sys/i386/xen sys/ia64/ia64 sys/ia64/include sys/kern sys/mips... Message-ID: <200908131709.n7DH9jpC007642@svn.freebsd.org> Author: attilio Date: Thu Aug 13 17:09:45 2009 New Revision: 196196 URL: http://svn.freebsd.org/changeset/base/196196 Log: * Completely Remove the option STOP_NMI from the kernel. This option has proven to have a good effect when entering KDB by using a NMI, but it completely violates all the good rules about interrupts disabled while holding a spinlock in other occasions. This can be the cause of deadlocks on events where a normal IPI_STOP is expected. * Adds an new IPI called IPI_STOP_HARD on all the supported architectures. This IPI is responsible for sending a stop message among CPUs using a privileged channel when disponible. In other cases it just does match a normal IPI_STOP. Right now the IPI_STOP_HARD functionality uses a NMI on ia32 and amd64 architectures, while on the other has a normal IPI_STOP effect. It is responsibility of maintainers to eventually implement an hard stop when necessary and possible. * Use the new IPI facility in order to implement a new userend SMP kernel function called stop_cpus_hard(). That is specular to stop_cpu() but it does use the privileged channel for the stopping facility. * Let KDB use the newly introduced function stop_cpus_hard() and leave stop_cpus() for all the other cases * Disable interrupts on CPU0 when starting the process of APs suspension. * Style cleanup and comments adding This patch should fix the reboot/shutdown deadlocks many users are constantly reporting on mailing lists. Please don't forget to update your config file with the STOP_NMI option removal Reviewed by: jhb Tested by: pho, bz, rink Approved by: re (kib) Modified: head/UPDATING head/sys/amd64/amd64/local_apic.c head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/amd64/trap.c head/sys/amd64/conf/GENERIC head/sys/amd64/conf/NOTES head/sys/amd64/conf/XENHVM head/sys/amd64/include/apicvar.h head/sys/amd64/include/smp.h head/sys/conf/options.amd64 head/sys/conf/options.i386 head/sys/conf/options.pc98 head/sys/i386/conf/GENERIC head/sys/i386/conf/NOTES head/sys/i386/i386/local_apic.c head/sys/i386/i386/mp_machdep.c head/sys/i386/i386/trap.c head/sys/i386/include/apicvar.h head/sys/i386/include/smp.h head/sys/i386/xen/mp_machdep.c head/sys/ia64/ia64/interrupt.c head/sys/ia64/include/smp.h head/sys/kern/kern_shutdown.c head/sys/kern/subr_kdb.c head/sys/kern/subr_smp.c head/sys/mips/include/smp.h head/sys/mips/mips/mp_machdep.c head/sys/pc98/conf/NOTES head/sys/powerpc/include/smp.h head/sys/powerpc/powerpc/mp_machdep.c head/sys/sparc64/include/smp.h head/sys/sun4v/include/smp.h head/sys/sys/smp.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Aug 13 16:08:35 2009 (r196195) +++ head/UPDATING Thu Aug 13 17:09:45 2009 (r196196) @@ -22,6 +22,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090813: + Remove the option STOP_NMI. The default action is now to use NMI + only for KDB via the newly introduced function stop_cpus_hard() + and maintain stop_cpus() to just use a normal IPI_STOP on ia32 + and amd64. + 20090719: Bump the shared library version numbers for all libraries that do not use symbol versioning as part of the 8.0-RELEASE cycle. Modified: head/sys/amd64/amd64/local_apic.c ============================================================================== --- head/sys/amd64/amd64/local_apic.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/amd64/local_apic.c Thu Aug 13 17:09:45 2009 (r196196) @@ -1238,8 +1238,17 @@ lapic_ipi_vectored(u_int vector, int des KASSERT((vector & ~APIC_VECTOR_MASK) == 0, ("%s: invalid vector %d", __func__, vector)); - icrlo = vector | APIC_DELMODE_FIXED | APIC_DESTMODE_PHY | - APIC_LEVEL_DEASSERT | APIC_TRIGMOD_EDGE; + icrlo = APIC_DESTMODE_PHY | APIC_TRIGMOD_EDGE; + + /* + * IPI_STOP_HARD is just a "fake" vector used to send a NMI. + * Use special rules regard NMI if passed, otherwise specify + * the vector. + */ + if (vector == IPI_STOP_HARD) + icrlo |= APIC_DELMODE_NMI | APIC_LEVEL_ASSERT; + else + icrlo |= vector | APIC_DELMODE_FIXED | APIC_LEVEL_DEASSERT; destfield = 0; switch (dest) { case APIC_IPI_DEST_SELF: Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/amd64/mp_machdep.c Thu Aug 13 17:09:45 2009 (r196196) @@ -114,31 +114,12 @@ volatile int smp_tlb_wait; extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32); -#ifdef STOP_NMI -static volatile cpumask_t ipi_nmi_pending; - -static void ipi_nmi_selected(cpumask_t cpus); -#endif - /* * Local data and functions. */ -#ifdef STOP_NMI -/* - * Provide an alternate method of stopping other CPUs. If another CPU has - * disabled interrupts the conventional STOP IPI will be blocked. This - * NMI-based stop should get through in that case. - */ -static int stop_cpus_with_nmi = 1; -SYSCTL_INT(_debug, OID_AUTO, stop_cpus_with_nmi, CTLTYPE_INT | CTLFLAG_RW, - &stop_cpus_with_nmi, 0, ""); -TUNABLE_INT("debug.stop_cpus_with_nmi", &stop_cpus_with_nmi); -#else -#define stop_cpus_with_nmi 0 -#endif - static u_int logical_cpus; +static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -1158,12 +1139,14 @@ ipi_selected(cpumask_t cpus, u_int ipi) ipi = IPI_BITMAP_VECTOR; } -#ifdef STOP_NMI - if (ipi == IPI_STOP && stop_cpus_with_nmi) { - ipi_nmi_selected(cpus); - return; - } -#endif + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, cpus); + CTR3(KTR_SMP, "%s: cpus: %x ipi: %x", __func__, cpus, ipi); while ((cpu = ffs(cpus)) != 0) { cpu--; @@ -1194,64 +1177,43 @@ void ipi_all_but_self(u_int ipi) { - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { + if (IPI_IS_BITMAPED(ipi)) { ipi_selected(PCPU_GET(other_cpus), ipi); return; } - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); -} -#ifdef STOP_NMI -/* - * send NMI IPI to selected CPUs - */ - -#define BEFORE_SPIN 1000000 - -static void -ipi_nmi_selected(cpumask_t cpus) -{ - int cpu; - register_t icrlo; - - icrlo = APIC_DELMODE_NMI | APIC_DESTMODE_PHY | APIC_LEVEL_ASSERT - | APIC_TRIGMOD_EDGE; - - CTR2(KTR_SMP, "%s: cpus: %x nmi", __func__, cpus); - - atomic_set_int(&ipi_nmi_pending, cpus); - - while ((cpu = ffs(cpus)) != 0) { - cpu--; - cpus &= ~(1 << cpu); - - KASSERT(cpu_apic_ids[cpu] != -1, - ("IPI NMI to non-existent CPU %d", cpu)); - - /* Wait for an earlier IPI to finish. */ - if (!lapic_ipi_wait(BEFORE_SPIN)) - panic("ipi_nmi_selected: previous IPI has not cleared"); + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, PCPU_GET(other_cpus)); - lapic_ipi_raw(icrlo, cpu_apic_ids[cpu]); - } + CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); + lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } int -ipi_nmi_handler(void) +ipi_nmi_handler() { - int cpumask = PCPU_GET(cpumask); + cpumask_t cpumask; - if (!(ipi_nmi_pending & cpumask)) - return 1; + /* + * As long as there is not a simple way to know about a NMI's + * source, if the bitmask for the current CPU is present in + * the global pending bitword an IPI_STOP_HARD has been issued + * and should be handled. + */ + cpumask = PCPU_GET(cpumask); + if ((ipi_nmi_pending & cpumask) == 0) + return (1); atomic_clear_int(&ipi_nmi_pending, cpumask); cpustop_handler(); - return 0; + return (0); } -#endif /* STOP_NMI */ - /* * Handle an IPI_STOP by saving our current context and spinning until we * are resumed. Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/amd64/trap.c Thu Aug 13 17:09:45 2009 (r196196) @@ -239,13 +239,11 @@ trap(struct trapframe *frame) type = frame->tf_trapno; #ifdef SMP -#ifdef STOP_NMI /* Handler for NMI IPIs used for stopping CPUs. */ if (type == T_NMI) { if (ipi_nmi_handler() == 0) goto out; } -#endif /* STOP_NMI */ #endif /* SMP */ #ifdef KDB Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/conf/GENERIC Thu Aug 13 17:09:45 2009 (r196196) @@ -69,7 +69,6 @@ options P1003_1B_SEMAPHORES # POSIX-sty options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/conf/NOTES Thu Aug 13 17:09:45 2009 (r196196) @@ -30,11 +30,6 @@ device mptable # Optional MPSPEC mpta # options MP_WATCHDOG -# -# Debugging options. -# -options STOP_NMI # Stop CPUS using NMI instead of IPI - ##################################################################### Modified: head/sys/amd64/conf/XENHVM ============================================================================== --- head/sys/amd64/conf/XENHVM Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/conf/XENHVM Thu Aug 13 17:09:45 2009 (r196196) @@ -68,7 +68,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing #options KDTRACE_FRAME # Ensure frames are compiled in Modified: head/sys/amd64/include/apicvar.h ============================================================================== --- head/sys/amd64/include/apicvar.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/include/apicvar.h Thu Aug 13 17:09:45 2009 (r196196) @@ -102,11 +102,6 @@ * smp_ipi_mtx and waits for the completion of the IPI (Only one IPI user * at a time) The second group uses a single interrupt and a bitmap to avoid * redundant IPI interrupts. - * - * Right now IPI_STOP used by kdb shares the interrupt priority class with - * the two IPI groups mentioned above. As such IPI_STOP may cause a deadlock. - * Eventually IPI_STOP should use NMI IPIs - this would eliminate this and - * other deadlocks caused by IPI_STOP. */ /* Interrupts for local APIC LVT entries other than the timer. */ @@ -134,6 +129,7 @@ #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ #define IPI_SUSPEND (APIC_IPI_INTS + 8) /* Suspend CPU until restarted. */ +#define IPI_STOP_HARD (APIC_IPI_INTS + 9) /* Stop CPU with a NMI. */ /* * The spurious interrupt can share the priority class with the IPIs since Modified: head/sys/amd64/include/smp.h ============================================================================== --- head/sys/amd64/include/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/amd64/include/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -52,6 +52,7 @@ void cpu_add(u_int apic_id, char boot_cp void cpustop_handler(void); void cpususpend_handler(void); void init_secondary(void); +int ipi_nmi_handler(void); void ipi_selected(cpumask_t cpus, u_int ipi); void ipi_all_but_self(u_int ipi); void ipi_bitmap_handler(struct trapframe frame); @@ -66,10 +67,6 @@ void smp_masked_invlpg_range(cpumask_t m void smp_invltlb(void); void smp_masked_invltlb(cpumask_t mask); -#ifdef STOP_NMI -int ipi_nmi_handler(void); -#endif - #endif /* !LOCORE */ #endif /* SMP */ Modified: head/sys/conf/options.amd64 ============================================================================== --- head/sys/conf/options.amd64 Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/conf/options.amd64 Thu Aug 13 17:09:45 2009 (r196196) @@ -52,7 +52,6 @@ PSM_DEBUG opt_psm.h DEV_ATPIC opt_atpic.h # Debugging -STOP_NMI opt_cpu.h KDTRACE_FRAME opt_kdtrace.h # BPF just-in-time compiler Modified: head/sys/conf/options.i386 ============================================================================== --- head/sys/conf/options.i386 Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/conf/options.i386 Thu Aug 13 17:09:45 2009 (r196196) @@ -110,7 +110,6 @@ ASR_COMPAT opt_asr.h # Debugging NPX_DEBUG opt_npx.h -STOP_NMI opt_cpu.h # BPF just-in-time compiler BPF_JITTER opt_bpf.h Modified: head/sys/conf/options.pc98 ============================================================================== --- head/sys/conf/options.pc98 Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/conf/options.pc98 Thu Aug 13 17:09:45 2009 (r196196) @@ -95,7 +95,6 @@ DEV_NPX opt_npx.h # Debugging NPX_DEBUG opt_npx.h -STOP_NMI opt_cpu.h AGP_DEBUG opt_agp.h # BPF just-in-time compiler Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/conf/GENERIC Thu Aug 13 17:09:45 2009 (r196196) @@ -70,7 +70,6 @@ options P1003_1B_SEMAPHORES # POSIX-sty options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/conf/NOTES Thu Aug 13 17:09:45 2009 (r196196) @@ -49,7 +49,6 @@ options MP_WATCHDOG # Debugging options. # -options STOP_NMI # Stop CPUS using NMI instead of IPI options COUNT_XINVLTLB_HITS # Counters for TLB events options COUNT_IPIS # Per-CPU IPI interrupt counters Modified: head/sys/i386/i386/local_apic.c ============================================================================== --- head/sys/i386/i386/local_apic.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/i386/local_apic.c Thu Aug 13 17:09:45 2009 (r196196) @@ -1248,8 +1248,17 @@ lapic_ipi_vectored(u_int vector, int des KASSERT((vector & ~APIC_VECTOR_MASK) == 0, ("%s: invalid vector %d", __func__, vector)); - icrlo = vector | APIC_DELMODE_FIXED | APIC_DESTMODE_PHY | - APIC_LEVEL_DEASSERT | APIC_TRIGMOD_EDGE; + icrlo = APIC_DESTMODE_PHY | APIC_TRIGMOD_EDGE; + + /* + * IPI_STOP_HARD is just a "fake" vector used to send a NMI. + * Use special rules regard NMI if passed, otherwise specify + * the vector. + */ + if (vector == IPI_STOP_HARD) + icrlo |= APIC_DELMODE_NMI | APIC_LEVEL_ASSERT; + else + icrlo |= vector | APIC_DELMODE_FIXED | APIC_LEVEL_DEASSERT; destfield = 0; switch (dest) { case APIC_IPI_DEST_SELF: Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/i386/mp_machdep.c Thu Aug 13 17:09:45 2009 (r196196) @@ -155,12 +155,6 @@ vm_offset_t smp_tlb_addr1; vm_offset_t smp_tlb_addr2; volatile int smp_tlb_wait; -#ifdef STOP_NMI -static volatile cpumask_t ipi_nmi_pending; - -static void ipi_nmi_selected(cpumask_t cpus); -#endif - #ifdef COUNT_IPIS /* Interrupt counts. */ static u_long *ipi_preempt_counts[MAXCPU]; @@ -177,21 +171,8 @@ u_long *ipi_lazypmap_counts[MAXCPU]; * Local data and functions. */ -#ifdef STOP_NMI -/* - * Provide an alternate method of stopping other CPUs. If another CPU has - * disabled interrupts the conventional STOP IPI will be blocked. This - * NMI-based stop should get through in that case. - */ -static int stop_cpus_with_nmi = 1; -SYSCTL_INT(_debug, OID_AUTO, stop_cpus_with_nmi, CTLTYPE_INT | CTLFLAG_RW, - &stop_cpus_with_nmi, 0, ""); -TUNABLE_INT("debug.stop_cpus_with_nmi", &stop_cpus_with_nmi); -#else -#define stop_cpus_with_nmi 0 -#endif - static u_int logical_cpus; +static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -1318,12 +1299,14 @@ ipi_selected(cpumask_t cpus, u_int ipi) ipi = IPI_BITMAP_VECTOR; } -#ifdef STOP_NMI - if (ipi == IPI_STOP && stop_cpus_with_nmi) { - ipi_nmi_selected(cpus); - return; - } -#endif + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, cpus); + CTR3(KTR_SMP, "%s: cpus: %x ipi: %x", __func__, cpus, ipi); while ((cpu = ffs(cpus)) != 0) { cpu--; @@ -1354,64 +1337,42 @@ void ipi_all_but_self(u_int ipi) { - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { + if (IPI_IS_BITMAPED(ipi)) { ipi_selected(PCPU_GET(other_cpus), ipi); return; } + + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, PCPU_GET(other_cpus)); CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } -#ifdef STOP_NMI -/* - * send NMI IPI to selected CPUs - */ - -#define BEFORE_SPIN 1000000 - -void -ipi_nmi_selected(cpumask_t cpus) -{ - int cpu; - register_t icrlo; - - icrlo = APIC_DELMODE_NMI | APIC_DESTMODE_PHY | APIC_LEVEL_ASSERT - | APIC_TRIGMOD_EDGE; - - CTR2(KTR_SMP, "%s: cpus: %x nmi", __func__, cpus); - - atomic_set_int(&ipi_nmi_pending, cpus); - - while ((cpu = ffs(cpus)) != 0) { - cpu--; - cpus &= ~(1 << cpu); - - KASSERT(cpu_apic_ids[cpu] != -1, - ("IPI NMI to non-existent CPU %d", cpu)); - - /* Wait for an earlier IPI to finish. */ - if (!lapic_ipi_wait(BEFORE_SPIN)) - panic("ipi_nmi_selected: previous IPI has not cleared"); - - lapic_ipi_raw(icrlo, cpu_apic_ids[cpu]); - } -} - int -ipi_nmi_handler(void) +ipi_nmi_handler() { - int cpumask = PCPU_GET(cpumask); + cpumask_t cpumask; - if (!(ipi_nmi_pending & cpumask)) - return 1; + /* + * As long as there is not a simple way to know about a NMI's + * source, if the bitmask for the current CPU is present in + * the global pending bitword an IPI_STOP_HARD has been issued + * and should be handled. + */ + cpumask = PCPU_GET(cpumask); + if ((ipi_nmi_pending & cpumask) == 0) + return (1); atomic_clear_int(&ipi_nmi_pending, cpumask); cpustop_handler(); - return 0; + return (0); } -#endif /* STOP_NMI */ - /* * Handle an IPI_STOP by saving our current context and spinning until we * are resumed. Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/i386/trap.c Thu Aug 13 17:09:45 2009 (r196196) @@ -211,13 +211,11 @@ trap(struct trapframe *frame) type = frame->tf_trapno; #ifdef SMP -#ifdef STOP_NMI /* Handler for NMI IPIs used for stopping CPUs. */ if (type == T_NMI) { if (ipi_nmi_handler() == 0) goto out; } -#endif /* STOP_NMI */ #endif /* SMP */ #ifdef KDB Modified: head/sys/i386/include/apicvar.h ============================================================================== --- head/sys/i386/include/apicvar.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/include/apicvar.h Thu Aug 13 17:09:45 2009 (r196196) @@ -100,11 +100,6 @@ * smp_ipi_mtx and waits for the completion of the IPI (Only one IPI user * at a time) The second group uses a single interrupt and a bitmap to avoid * redundant IPI interrupts. - * - * Right now IPI_STOP used by kdb shares the interrupt priority class with - * the two IPI groups mentioned above. As such IPI_STOP may cause a deadlock. - * Eventually IPI_STOP should use NMI IPIs - this would eliminate this and - * other deadlocks caused by IPI_STOP. */ /* Interrupts for local APIC LVT entries other than the timer. */ @@ -134,6 +129,7 @@ #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ +#define IPI_STOP_HARD (APIC_IPI_INTS + 8) /* Stop CPU with a NMI. */ #else /* XEN */ /* These are the normal i386 APIC definitions */ @@ -161,6 +157,7 @@ #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ +#define IPI_STOP_HARD (APIC_IPI_INTS + 8) /* Stop CPU with a NMI. */ #endif /* XEN */ /* Modified: head/sys/i386/include/smp.h ============================================================================== --- head/sys/i386/include/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/include/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -60,7 +60,8 @@ inthand_t void cpu_add(u_int apic_id, char boot_cpu); void cpustop_handler(void); void init_secondary(void); -void ipi_selected(u_int cpus, u_int ipi); +int ipi_nmi_handler(void); +void ipi_selected(cpumask_t cpus, u_int ipi); void ipi_all_but_self(u_int ipi); #ifndef XEN void ipi_bitmap_handler(struct trapframe frame); @@ -76,9 +77,6 @@ void smp_masked_invlpg_range(cpumask_t m void smp_invltlb(void); void smp_masked_invltlb(cpumask_t mask); -#ifdef STOP_NMI -int ipi_nmi_handler(void); -#endif #ifdef XEN void ipi_to_irq_init(void); Modified: head/sys/i386/xen/mp_machdep.c ============================================================================== --- head/sys/i386/xen/mp_machdep.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/i386/xen/mp_machdep.c Thu Aug 13 17:09:45 2009 (r196196) @@ -90,8 +90,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define stop_cpus_with_nmi 0 - int mp_naps; /* # of Applications processors */ int boot_cpu_id = -1; /* designated BSP */ Modified: head/sys/ia64/ia64/interrupt.c ============================================================================== --- head/sys/ia64/ia64/interrupt.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/ia64/ia64/interrupt.c Thu Aug 13 17:09:45 2009 (r196196) @@ -145,6 +145,8 @@ interrupt(struct trapframe *tf) /* * Handle ExtINT interrupts by generating an INTA cycle to * read the vector. + * IPI_STOP_HARD is mapped to IPI_STOP so it is not necessary + * to add it to this switch-like construct. */ if (vector == 0) { inta = ib->ib_inta; Modified: head/sys/ia64/include/smp.h ============================================================================== --- head/sys/ia64/include/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/ia64/include/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -21,6 +21,7 @@ #define IPI_AST 4 #define IPI_RENDEZVOUS 5 #define IPI_STOP 6 +#define IPI_STOP_HARD 6 #define IPI_PREEMPT 7 #define IPI_COUNT 8 Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/kern/kern_shutdown.c Thu Aug 13 17:09:45 2009 (r196196) @@ -412,9 +412,6 @@ boot(int howto) */ EVENTHANDLER_INVOKE(shutdown_post_sync, howto); - /* XXX This doesn't disable interrupts any more. Reconsider? */ - splhigh(); - if ((howto & (RB_HALT|RB_DUMP)) == RB_DUMP && !cold && !dumping) doadump(); @@ -488,6 +485,13 @@ static void shutdown_reset(void *junk, int howto) { + /* + * Disable interrupts on CPU0 in order to avoid fast handlers + * to preempt the stopping process and to deadlock against other + * CPUs. + */ + spinlock_enter(); + printf("Rebooting...\n"); DELAY(1000000); /* wait 1 sec for printf's to complete and be read */ /* cpu_boot(howto); */ /* doesn't do anything at the moment */ Modified: head/sys/kern/subr_kdb.c ============================================================================== --- head/sys/kern/subr_kdb.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/kern/subr_kdb.c Thu Aug 13 17:09:45 2009 (r196196) @@ -88,7 +88,8 @@ SYSCTL_PROC(_debug_kdb, OID_AUTO, trap_c * Flag indicating whether or not to IPI the other CPUs to stop them on * entering the debugger. Sometimes, this will result in a deadlock as * stop_cpus() waits for the other cpus to stop, so we allow it to be - * disabled. + * disabled. In order to maximize the chances of success, use a hard + * stop for that. */ #ifdef SMP static int kdb_stop_cpus = 1; @@ -226,7 +227,7 @@ kdb_panic(const char *msg) { #ifdef SMP - stop_cpus(PCPU_GET(other_cpus)); + stop_cpus_hard(PCPU_GET(other_cpus)); #endif printf("KDB: panic\n"); panic(msg); @@ -518,7 +519,7 @@ kdb_trap(int type, int code, struct trap #ifdef SMP if ((did_stop_cpus = kdb_stop_cpus) != 0) - stop_cpus(PCPU_GET(other_cpus)); + stop_cpus_hard(PCPU_GET(other_cpus)); #endif kdb_active++; Modified: head/sys/kern/subr_smp.c ============================================================================== --- head/sys/kern/subr_smp.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/kern/subr_smp.c Thu Aug 13 17:09:45 2009 (r196196) @@ -233,18 +233,21 @@ forward_roundrobin(void) * XXX FIXME: this is not MP-safe, needs a lock to prevent multiple CPUs * from executing at same time. */ -int -stop_cpus(cpumask_t map) +static int +generic_stop_cpus(cpumask_t map, u_int type) { int i; + KASSERT(type == IPI_STOP || type == IPI_STOP_HARD, + ("%s: invalid stop type", __func__)); + if (!smp_started) return 0; - CTR1(KTR_SMP, "stop_cpus(%x)", map); + CTR2(KTR_SMP, "stop_cpus(%x) with %u type", map, type); /* send the stop IPI to all CPUs in map */ - ipi_selected(map, IPI_STOP); + ipi_selected(map, type); i = 0; while ((stopped_cpus & map) != map) { @@ -262,6 +265,20 @@ stop_cpus(cpumask_t map) return 1; } +int +stop_cpus(cpumask_t map) +{ + + return (generic_stop_cpus(map, IPI_STOP)); +} + +int +stop_cpus_hard(cpumask_t map) +{ + + return (generic_stop_cpus(map, IPI_STOP_HARD)); +} + #if defined(__amd64__) /* * When called the executing CPU will send an IPI to all other CPUs Modified: head/sys/mips/include/smp.h ============================================================================== --- head/sys/mips/include/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/mips/include/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -24,6 +24,7 @@ #define IPI_RENDEZVOUS 0x0002 #define IPI_AST 0x0004 #define IPI_STOP 0x0008 +#define IPI_STOP_HARD 0x0008 #ifndef LOCORE Modified: head/sys/mips/mips/mp_machdep.c ============================================================================== --- head/sys/mips/mips/mp_machdep.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/mips/mips/mp_machdep.c Thu Aug 13 17:09:45 2009 (r196196) @@ -129,7 +129,12 @@ smp_handle_ipi(struct trapframe *frame) break; case IPI_STOP: - CTR0(KTR_SMP, "IPI_STOP"); + + /* + * IPI_STOP_HARD is mapped to IPI_STOP so it is not + * necessary to add it in the switch. + */ + CTR0(KTR_SMP, "IPI_STOP or IPI_STOP_HARD"); atomic_set_int(&stopped_cpus, cpumask); while ((started_cpus & cpumask) == 0) Modified: head/sys/pc98/conf/NOTES ============================================================================== --- head/sys/pc98/conf/NOTES Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/pc98/conf/NOTES Thu Aug 13 17:09:45 2009 (r196196) @@ -29,10 +29,6 @@ device apic # I/O apic # options MP_WATCHDOG -# Debugging options. -# -options STOP_NMI # Stop CPUS using NMI instead of IPI - ##################################################################### Modified: head/sys/powerpc/include/smp.h ============================================================================== --- head/sys/powerpc/include/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/powerpc/include/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -35,6 +35,7 @@ #define IPI_PREEMPT 1 #define IPI_RENDEZVOUS 2 #define IPI_STOP 3 +#define IPI_STOP_HARD 3 #ifndef LOCORE Modified: head/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/mp_machdep.c Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/powerpc/powerpc/mp_machdep.c Thu Aug 13 17:09:45 2009 (r196196) @@ -281,7 +281,13 @@ powerpc_ipi_handler(void *arg) smp_rendezvous_action(); break; case IPI_STOP: - CTR1(KTR_SMP, "%s: IPI_STOP (stop)", __func__); + + /* + * IPI_STOP_HARD is mapped to IPI_STOP so it is not + * necessary to add such case in the switch. + */ + CTR1(KTR_SMP, "%s: IPI_STOP or IPI_STOP_HARD (stop)", + __func__); self = PCPU_GET(cpumask); savectx(PCPU_GET(curpcb)); atomic_set_int(&stopped_cpus, self); Modified: head/sys/sparc64/include/smp.h ============================================================================== --- head/sys/sparc64/include/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/sparc64/include/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -56,6 +56,7 @@ #define IPI_RENDEZVOUS PIL_RENDEZVOUS #define IPI_PREEMPT PIL_PREEMPT #define IPI_STOP PIL_STOP +#define IPI_STOP_HARD PIL_STOP #define IPI_RETRIES 5000 Modified: head/sys/sun4v/include/smp.h ============================================================================== --- head/sys/sun4v/include/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/sun4v/include/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -44,6 +44,7 @@ #define IPI_AST PIL_AST #define IPI_RENDEZVOUS PIL_RENDEZVOUS #define IPI_STOP PIL_STOP +#define IPI_STOP_HARD PIL_STOP #define IPI_PREEMPT PIL_PREEMPT Modified: head/sys/sys/smp.h ============================================================================== --- head/sys/sys/smp.h Thu Aug 13 16:08:35 2009 (r196195) +++ head/sys/sys/smp.h Thu Aug 13 17:09:45 2009 (r196196) @@ -123,6 +123,7 @@ void forward_signal(struct thread *); void forward_roundrobin(void); int restart_cpus(cpumask_t); int stop_cpus(cpumask_t); +int stop_cpus_hard(cpumask_t); #if defined(__amd64__) int suspend_cpus(cpumask_t); #endif From jhb at FreeBSD.org Thu Aug 13 17:51:27 2009 From: jhb at FreeBSD.org (John Baldwin) Date: Thu Aug 13 17:51:35 2009 Subject: svn commit: r196197 - in stable/7/sys: . contrib/pf fs/unionfs kern Message-ID: <200908131751.n7DHpQpU008608@svn.freebsd.org> Author: jhb Date: Thu Aug 13 17:51:26 2009 New Revision: 196197 URL: http://svn.freebsd.org/changeset/base/196197 Log: MFC: Fix some LORs between vnode locks and filedescriptor table locks. - Don't grab the filedesc lock just to read fd_cmask. - Drop vnode locks earlier when mounting the root filesystem and before sanitizing stdin/out/err file descriptors during execve(). Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/fs/unionfs/union_subr.c stable/7/sys/kern/kern_exec.c stable/7/sys/kern/vfs_mount.c stable/7/sys/kern/vfs_syscalls.c Modified: stable/7/sys/fs/unionfs/union_subr.c ============================================================================== --- stable/7/sys/fs/unionfs/union_subr.c Thu Aug 13 17:09:45 2009 (r196196) +++ stable/7/sys/fs/unionfs/union_subr.c Thu Aug 13 17:51:26 2009 (r196197) @@ -488,9 +488,7 @@ unionfs_create_uppervattr_core(struct un } break; default: /* UNIONFS_TRADITIONAL */ - FILEDESC_SLOCK(td->td_proc->p_fd); uva->va_mode = 0777 & ~td->td_proc->p_fd->fd_cmask; - FILEDESC_SUNLOCK(td->td_proc->p_fd); uva->va_uid = ump->um_uid; uva->va_gid = ump->um_gid; break; Modified: stable/7/sys/kern/kern_exec.c ============================================================================== --- stable/7/sys/kern/kern_exec.c Thu Aug 13 17:09:45 2009 (r196196) +++ stable/7/sys/kern/kern_exec.c Thu Aug 13 17:51:26 2009 (r196197) @@ -615,8 +615,8 @@ interpret: * allocate memory, so temporarily drop the process lock. */ PROC_UNLOCK(p); - setugidsafety(td); VOP_UNLOCK(imgp->vp, 0, td); + setugidsafety(td); error = fdcheckstd(td); vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY, td); if (error != 0) Modified: stable/7/sys/kern/vfs_mount.c ============================================================================== --- stable/7/sys/kern/vfs_mount.c Thu Aug 13 17:09:45 2009 (r196196) +++ stable/7/sys/kern/vfs_mount.c Thu Aug 13 17:51:26 2009 (r196197) @@ -1083,9 +1083,10 @@ vfs_domount( vfs_event_signal(NULL, VQ_MOUNT, 0); if (VFS_ROOT(mp, LK_EXCLUSIVE, &newdp, td)) panic("mount: lost mount"); - mountcheckdirs(vp, newdp); - vput(newdp); + VOP_UNLOCK(newdp, 0, td); VOP_UNLOCK(vp, 0, td); + mountcheckdirs(vp, newdp); + vrele(newdp); if ((mp->mnt_flag & MNT_RDONLY) == 0) error = vfs_allocate_syncvnode(mp); vfs_unbusy(mp, td); @@ -1468,8 +1469,10 @@ set_rootvnode(struct thread *td) if (VFS_ROOT(TAILQ_FIRST(&mountlist), LK_EXCLUSIVE, &rootvnode, td)) panic("Cannot find root vnode"); + VOP_UNLOCK(rootvnode, 0, td); + p = td->td_proc; - FILEDESC_SLOCK(p->p_fd); + FILEDESC_XLOCK(p->p_fd); if (p->p_fd->fd_cdir != NULL) vrele(p->p_fd->fd_cdir); @@ -1481,9 +1484,7 @@ set_rootvnode(struct thread *td) p->p_fd->fd_rdir = rootvnode; VREF(rootvnode); - FILEDESC_SUNLOCK(p->p_fd); - - VOP_UNLOCK(rootvnode, 0, td); + FILEDESC_XUNLOCK(p->p_fd); } /* Modified: stable/7/sys/kern/vfs_syscalls.c ============================================================================== --- stable/7/sys/kern/vfs_syscalls.c Thu Aug 13 17:09:45 2009 (r196196) +++ stable/7/sys/kern/vfs_syscalls.c Thu Aug 13 17:51:26 2009 (r196197) @@ -1238,10 +1238,8 @@ restart: return (EEXIST); } else { VATTR_NULL(&vattr); - FILEDESC_SLOCK(td->td_proc->p_fd); vattr.va_mode = (mode & ALLPERMS) & ~td->td_proc->p_fd->fd_cmask; - FILEDESC_SUNLOCK(td->td_proc->p_fd); vattr.va_rdev = dev; whiteout = 0; @@ -1351,9 +1349,7 @@ restart: } VATTR_NULL(&vattr); vattr.va_type = VFIFO; - FILEDESC_SLOCK(td->td_proc->p_fd); vattr.va_mode = (mode & ALLPERMS) & ~td->td_proc->p_fd->fd_cmask; - FILEDESC_SUNLOCK(td->td_proc->p_fd); #ifdef MAC error = mac_check_vnode_create(td->td_ucred, nd.ni_dvp, &nd.ni_cnd, &vattr); @@ -1564,9 +1560,7 @@ restart: goto restart; } VATTR_NULL(&vattr); - FILEDESC_SLOCK(td->td_proc->p_fd); vattr.va_mode = ACCESSPERMS &~ td->td_proc->p_fd->fd_cmask; - FILEDESC_SUNLOCK(td->td_proc->p_fd); #ifdef MAC vattr.va_type = VLNK; error = mac_check_vnode_create(td->td_ucred, nd.ni_dvp, &nd.ni_cnd, @@ -3502,9 +3496,7 @@ restart: } VATTR_NULL(&vattr); vattr.va_type = VDIR; - FILEDESC_SLOCK(td->td_proc->p_fd); vattr.va_mode = (mode & ACCESSPERMS) &~ td->td_proc->p_fd->fd_cmask; - FILEDESC_SUNLOCK(td->td_proc->p_fd); #ifdef MAC error = mac_check_vnode_create(td->td_ucred, nd.ni_dvp, &nd.ni_cnd, &vattr); From attilio at FreeBSD.org Thu Aug 13 17:54:13 2009 From: attilio at FreeBSD.org (Attilio Rao) Date: Thu Aug 13 17:54:32 2009 Subject: svn commit: r196198 - in stable/8: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/conf sys/i386/conf sys/i386/i386 sys/i386/include sys/i386/xen sys/ia64/ia64 sys/ia64/include sys/kern sys/... Message-ID: <200908131754.n7DHsCvJ008700@svn.freebsd.org> Author: attilio Date: Thu Aug 13 17:54:11 2009 New Revision: 196198 URL: http://svn.freebsd.org/changeset/base/196198 Log: MFC r196196: * Completely remove the option STOP_NMI from the kernel. This option has proven to have a good effect when entering KDB by using a NMI, but it completely violates all the good rules about interrupts disabled while holding a spinlock in other occasions. This can be the cause of deadlocks on events where a normal IPI_STOP is expected. * Add an new IPI called IPI_STOP_HARD on all the supported architectures. This IPI is responsible for sending a stop message among CPUs using a privileged channel when disponible. In other cases it just does match a normal IPI_STOP. Right now the IPI_STOP_HARD functionality uses a NMI on ia32 and amd64 architectures, while on the other has a normal IPI_STOP effect. It is responsibility of maintainers to eventually implement an hard stop when necessary and possible. * Use the new IPI facility in order to implement a new userend SMP kernel function called stop_cpus_hard(). That is specular to stop_cpu() but it does use the privileged channel for the stopping facility. * Let KDB use the newly introduced function stop_cpus_hard() and leave stop_cpus() for all the other cases * Disable interrupts on CPU0 when starting the process of APs suspension. * Style cleanup and comments adding This patch should fix the reboot/shutdown deadlocks many users are constantly reporting on mailing lists. Please don't forget to update your config file with the STOP_NMI option removal Reviewed by: jhb Tested by: pho, bz, rink Approved by: re (kib) Modified: stable/8/UPDATING (contents, props changed) stable/8/sys/amd64/amd64/local_apic.c stable/8/sys/amd64/amd64/mp_machdep.c stable/8/sys/amd64/amd64/trap.c stable/8/sys/amd64/conf/GENERIC stable/8/sys/amd64/conf/NOTES stable/8/sys/amd64/conf/XENHVM stable/8/sys/amd64/include/apicvar.h stable/8/sys/amd64/include/smp.h stable/8/sys/conf/options.amd64 stable/8/sys/conf/options.i386 stable/8/sys/conf/options.pc98 stable/8/sys/i386/conf/GENERIC stable/8/sys/i386/conf/NOTES stable/8/sys/i386/i386/local_apic.c stable/8/sys/i386/i386/mp_machdep.c stable/8/sys/i386/i386/trap.c stable/8/sys/i386/include/apicvar.h stable/8/sys/i386/include/smp.h stable/8/sys/i386/xen/mp_machdep.c stable/8/sys/ia64/ia64/interrupt.c stable/8/sys/ia64/include/smp.h stable/8/sys/kern/kern_shutdown.c stable/8/sys/kern/subr_kdb.c stable/8/sys/kern/subr_smp.c stable/8/sys/mips/include/smp.h stable/8/sys/mips/mips/mp_machdep.c stable/8/sys/pc98/conf/NOTES stable/8/sys/powerpc/include/smp.h stable/8/sys/powerpc/powerpc/mp_machdep.c stable/8/sys/sparc64/include/smp.h stable/8/sys/sun4v/include/smp.h stable/8/sys/sys/smp.h Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/UPDATING Thu Aug 13 17:54:11 2009 (r196198) @@ -22,6 +22,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090813: + Remove the option STOP_NMI. The default action is now to use NMI + only for KDB via the newly introduced function stop_cpus_hard() + and maintain stop_cpus() to just use a normal IPI_STOP on ia32 + and amd64. + 20090803: RELENG_8 branched. Modified: stable/8/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/8/sys/amd64/amd64/local_apic.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/amd64/local_apic.c Thu Aug 13 17:54:11 2009 (r196198) @@ -1238,8 +1238,17 @@ lapic_ipi_vectored(u_int vector, int des KASSERT((vector & ~APIC_VECTOR_MASK) == 0, ("%s: invalid vector %d", __func__, vector)); - icrlo = vector | APIC_DELMODE_FIXED | APIC_DESTMODE_PHY | - APIC_LEVEL_DEASSERT | APIC_TRIGMOD_EDGE; + icrlo = APIC_DESTMODE_PHY | APIC_TRIGMOD_EDGE; + + /* + * IPI_STOP_HARD is just a "fake" vector used to send a NMI. + * Use special rules regard NMI if passed, otherwise specify + * the vector. + */ + if (vector == IPI_STOP_HARD) + icrlo |= APIC_DELMODE_NMI | APIC_LEVEL_ASSERT; + else + icrlo |= vector | APIC_DELMODE_FIXED | APIC_LEVEL_DEASSERT; destfield = 0; switch (dest) { case APIC_IPI_DEST_SELF: Modified: stable/8/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/mp_machdep.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/amd64/mp_machdep.c Thu Aug 13 17:54:11 2009 (r196198) @@ -114,31 +114,12 @@ volatile int smp_tlb_wait; extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32); -#ifdef STOP_NMI -static volatile cpumask_t ipi_nmi_pending; - -static void ipi_nmi_selected(cpumask_t cpus); -#endif - /* * Local data and functions. */ -#ifdef STOP_NMI -/* - * Provide an alternate method of stopping other CPUs. If another CPU has - * disabled interrupts the conventional STOP IPI will be blocked. This - * NMI-based stop should get through in that case. - */ -static int stop_cpus_with_nmi = 1; -SYSCTL_INT(_debug, OID_AUTO, stop_cpus_with_nmi, CTLTYPE_INT | CTLFLAG_RW, - &stop_cpus_with_nmi, 0, ""); -TUNABLE_INT("debug.stop_cpus_with_nmi", &stop_cpus_with_nmi); -#else -#define stop_cpus_with_nmi 0 -#endif - static u_int logical_cpus; +static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -1158,12 +1139,14 @@ ipi_selected(cpumask_t cpus, u_int ipi) ipi = IPI_BITMAP_VECTOR; } -#ifdef STOP_NMI - if (ipi == IPI_STOP && stop_cpus_with_nmi) { - ipi_nmi_selected(cpus); - return; - } -#endif + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, cpus); + CTR3(KTR_SMP, "%s: cpus: %x ipi: %x", __func__, cpus, ipi); while ((cpu = ffs(cpus)) != 0) { cpu--; @@ -1194,64 +1177,43 @@ void ipi_all_but_self(u_int ipi) { - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { + if (IPI_IS_BITMAPED(ipi)) { ipi_selected(PCPU_GET(other_cpus), ipi); return; } - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); -} -#ifdef STOP_NMI -/* - * send NMI IPI to selected CPUs - */ - -#define BEFORE_SPIN 1000000 - -static void -ipi_nmi_selected(cpumask_t cpus) -{ - int cpu; - register_t icrlo; - - icrlo = APIC_DELMODE_NMI | APIC_DESTMODE_PHY | APIC_LEVEL_ASSERT - | APIC_TRIGMOD_EDGE; - - CTR2(KTR_SMP, "%s: cpus: %x nmi", __func__, cpus); - - atomic_set_int(&ipi_nmi_pending, cpus); - - while ((cpu = ffs(cpus)) != 0) { - cpu--; - cpus &= ~(1 << cpu); - - KASSERT(cpu_apic_ids[cpu] != -1, - ("IPI NMI to non-existent CPU %d", cpu)); - - /* Wait for an earlier IPI to finish. */ - if (!lapic_ipi_wait(BEFORE_SPIN)) - panic("ipi_nmi_selected: previous IPI has not cleared"); + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, PCPU_GET(other_cpus)); - lapic_ipi_raw(icrlo, cpu_apic_ids[cpu]); - } + CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); + lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } int -ipi_nmi_handler(void) +ipi_nmi_handler() { - int cpumask = PCPU_GET(cpumask); + cpumask_t cpumask; - if (!(ipi_nmi_pending & cpumask)) - return 1; + /* + * As long as there is not a simple way to know about a NMI's + * source, if the bitmask for the current CPU is present in + * the global pending bitword an IPI_STOP_HARD has been issued + * and should be handled. + */ + cpumask = PCPU_GET(cpumask); + if ((ipi_nmi_pending & cpumask) == 0) + return (1); atomic_clear_int(&ipi_nmi_pending, cpumask); cpustop_handler(); - return 0; + return (0); } -#endif /* STOP_NMI */ - /* * Handle an IPI_STOP by saving our current context and spinning until we * are resumed. Modified: stable/8/sys/amd64/amd64/trap.c ============================================================================== --- stable/8/sys/amd64/amd64/trap.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/amd64/trap.c Thu Aug 13 17:54:11 2009 (r196198) @@ -239,13 +239,11 @@ trap(struct trapframe *frame) type = frame->tf_trapno; #ifdef SMP -#ifdef STOP_NMI /* Handler for NMI IPIs used for stopping CPUs. */ if (type == T_NMI) { if (ipi_nmi_handler() == 0) goto out; } -#endif /* STOP_NMI */ #endif /* SMP */ #ifdef KDB Modified: stable/8/sys/amd64/conf/GENERIC ============================================================================== --- stable/8/sys/amd64/conf/GENERIC Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/conf/GENERIC Thu Aug 13 17:54:11 2009 (r196198) @@ -69,7 +69,6 @@ options P1003_1B_SEMAPHORES # POSIX-sty options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework Modified: stable/8/sys/amd64/conf/NOTES ============================================================================== --- stable/8/sys/amd64/conf/NOTES Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/conf/NOTES Thu Aug 13 17:54:11 2009 (r196198) @@ -30,11 +30,6 @@ device mptable # Optional MPSPEC mpta # options MP_WATCHDOG -# -# Debugging options. -# -options STOP_NMI # Stop CPUS using NMI instead of IPI - ##################################################################### Modified: stable/8/sys/amd64/conf/XENHVM ============================================================================== --- stable/8/sys/amd64/conf/XENHVM Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/conf/XENHVM Thu Aug 13 17:54:11 2009 (r196198) @@ -68,7 +68,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing #options KDTRACE_FRAME # Ensure frames are compiled in Modified: stable/8/sys/amd64/include/apicvar.h ============================================================================== --- stable/8/sys/amd64/include/apicvar.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/include/apicvar.h Thu Aug 13 17:54:11 2009 (r196198) @@ -102,11 +102,6 @@ * smp_ipi_mtx and waits for the completion of the IPI (Only one IPI user * at a time) The second group uses a single interrupt and a bitmap to avoid * redundant IPI interrupts. - * - * Right now IPI_STOP used by kdb shares the interrupt priority class with - * the two IPI groups mentioned above. As such IPI_STOP may cause a deadlock. - * Eventually IPI_STOP should use NMI IPIs - this would eliminate this and - * other deadlocks caused by IPI_STOP. */ /* Interrupts for local APIC LVT entries other than the timer. */ @@ -134,6 +129,7 @@ #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ #define IPI_SUSPEND (APIC_IPI_INTS + 8) /* Suspend CPU until restarted. */ +#define IPI_STOP_HARD (APIC_IPI_INTS + 9) /* Stop CPU with a NMI. */ /* * The spurious interrupt can share the priority class with the IPIs since Modified: stable/8/sys/amd64/include/smp.h ============================================================================== --- stable/8/sys/amd64/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -52,6 +52,7 @@ void cpu_add(u_int apic_id, char boot_cp void cpustop_handler(void); void cpususpend_handler(void); void init_secondary(void); +int ipi_nmi_handler(void); void ipi_selected(cpumask_t cpus, u_int ipi); void ipi_all_but_self(u_int ipi); void ipi_bitmap_handler(struct trapframe frame); @@ -66,10 +67,6 @@ void smp_masked_invlpg_range(cpumask_t m void smp_invltlb(void); void smp_masked_invltlb(cpumask_t mask); -#ifdef STOP_NMI -int ipi_nmi_handler(void); -#endif - #endif /* !LOCORE */ #endif /* SMP */ Modified: stable/8/sys/conf/options.amd64 ============================================================================== --- stable/8/sys/conf/options.amd64 Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/conf/options.amd64 Thu Aug 13 17:54:11 2009 (r196198) @@ -52,7 +52,6 @@ PSM_DEBUG opt_psm.h DEV_ATPIC opt_atpic.h # Debugging -STOP_NMI opt_cpu.h KDTRACE_FRAME opt_kdtrace.h # BPF just-in-time compiler Modified: stable/8/sys/conf/options.i386 ============================================================================== --- stable/8/sys/conf/options.i386 Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/conf/options.i386 Thu Aug 13 17:54:11 2009 (r196198) @@ -110,7 +110,6 @@ ASR_COMPAT opt_asr.h # Debugging NPX_DEBUG opt_npx.h -STOP_NMI opt_cpu.h # BPF just-in-time compiler BPF_JITTER opt_bpf.h Modified: stable/8/sys/conf/options.pc98 ============================================================================== --- stable/8/sys/conf/options.pc98 Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/conf/options.pc98 Thu Aug 13 17:54:11 2009 (r196198) @@ -95,7 +95,6 @@ DEV_NPX opt_npx.h # Debugging NPX_DEBUG opt_npx.h -STOP_NMI opt_cpu.h AGP_DEBUG opt_agp.h # BPF just-in-time compiler Modified: stable/8/sys/i386/conf/GENERIC ============================================================================== --- stable/8/sys/i386/conf/GENERIC Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/conf/GENERIC Thu Aug 13 17:54:11 2009 (r196198) @@ -70,7 +70,6 @@ options P1003_1B_SEMAPHORES # POSIX-sty options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework Modified: stable/8/sys/i386/conf/NOTES ============================================================================== --- stable/8/sys/i386/conf/NOTES Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/conf/NOTES Thu Aug 13 17:54:11 2009 (r196198) @@ -49,7 +49,6 @@ options MP_WATCHDOG # Debugging options. # -options STOP_NMI # Stop CPUS using NMI instead of IPI options COUNT_XINVLTLB_HITS # Counters for TLB events options COUNT_IPIS # Per-CPU IPI interrupt counters Modified: stable/8/sys/i386/i386/local_apic.c ============================================================================== --- stable/8/sys/i386/i386/local_apic.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/i386/local_apic.c Thu Aug 13 17:54:11 2009 (r196198) @@ -1248,8 +1248,17 @@ lapic_ipi_vectored(u_int vector, int des KASSERT((vector & ~APIC_VECTOR_MASK) == 0, ("%s: invalid vector %d", __func__, vector)); - icrlo = vector | APIC_DELMODE_FIXED | APIC_DESTMODE_PHY | - APIC_LEVEL_DEASSERT | APIC_TRIGMOD_EDGE; + icrlo = APIC_DESTMODE_PHY | APIC_TRIGMOD_EDGE; + + /* + * IPI_STOP_HARD is just a "fake" vector used to send a NMI. + * Use special rules regard NMI if passed, otherwise specify + * the vector. + */ + if (vector == IPI_STOP_HARD) + icrlo |= APIC_DELMODE_NMI | APIC_LEVEL_ASSERT; + else + icrlo |= vector | APIC_DELMODE_FIXED | APIC_LEVEL_DEASSERT; destfield = 0; switch (dest) { case APIC_IPI_DEST_SELF: Modified: stable/8/sys/i386/i386/mp_machdep.c ============================================================================== --- stable/8/sys/i386/i386/mp_machdep.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/i386/mp_machdep.c Thu Aug 13 17:54:11 2009 (r196198) @@ -155,12 +155,6 @@ vm_offset_t smp_tlb_addr1; vm_offset_t smp_tlb_addr2; volatile int smp_tlb_wait; -#ifdef STOP_NMI -static volatile cpumask_t ipi_nmi_pending; - -static void ipi_nmi_selected(cpumask_t cpus); -#endif - #ifdef COUNT_IPIS /* Interrupt counts. */ static u_long *ipi_preempt_counts[MAXCPU]; @@ -177,21 +171,8 @@ u_long *ipi_lazypmap_counts[MAXCPU]; * Local data and functions. */ -#ifdef STOP_NMI -/* - * Provide an alternate method of stopping other CPUs. If another CPU has - * disabled interrupts the conventional STOP IPI will be blocked. This - * NMI-based stop should get through in that case. - */ -static int stop_cpus_with_nmi = 1; -SYSCTL_INT(_debug, OID_AUTO, stop_cpus_with_nmi, CTLTYPE_INT | CTLFLAG_RW, - &stop_cpus_with_nmi, 0, ""); -TUNABLE_INT("debug.stop_cpus_with_nmi", &stop_cpus_with_nmi); -#else -#define stop_cpus_with_nmi 0 -#endif - static u_int logical_cpus; +static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -1318,12 +1299,14 @@ ipi_selected(cpumask_t cpus, u_int ipi) ipi = IPI_BITMAP_VECTOR; } -#ifdef STOP_NMI - if (ipi == IPI_STOP && stop_cpus_with_nmi) { - ipi_nmi_selected(cpus); - return; - } -#endif + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, cpus); + CTR3(KTR_SMP, "%s: cpus: %x ipi: %x", __func__, cpus, ipi); while ((cpu = ffs(cpus)) != 0) { cpu--; @@ -1354,64 +1337,42 @@ void ipi_all_but_self(u_int ipi) { - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { + if (IPI_IS_BITMAPED(ipi)) { ipi_selected(PCPU_GET(other_cpus), ipi); return; } + + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, PCPU_GET(other_cpus)); CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } -#ifdef STOP_NMI -/* - * send NMI IPI to selected CPUs - */ - -#define BEFORE_SPIN 1000000 - -void -ipi_nmi_selected(cpumask_t cpus) -{ - int cpu; - register_t icrlo; - - icrlo = APIC_DELMODE_NMI | APIC_DESTMODE_PHY | APIC_LEVEL_ASSERT - | APIC_TRIGMOD_EDGE; - - CTR2(KTR_SMP, "%s: cpus: %x nmi", __func__, cpus); - - atomic_set_int(&ipi_nmi_pending, cpus); - - while ((cpu = ffs(cpus)) != 0) { - cpu--; - cpus &= ~(1 << cpu); - - KASSERT(cpu_apic_ids[cpu] != -1, - ("IPI NMI to non-existent CPU %d", cpu)); - - /* Wait for an earlier IPI to finish. */ - if (!lapic_ipi_wait(BEFORE_SPIN)) - panic("ipi_nmi_selected: previous IPI has not cleared"); - - lapic_ipi_raw(icrlo, cpu_apic_ids[cpu]); - } -} - int -ipi_nmi_handler(void) +ipi_nmi_handler() { - int cpumask = PCPU_GET(cpumask); + cpumask_t cpumask; - if (!(ipi_nmi_pending & cpumask)) - return 1; + /* + * As long as there is not a simple way to know about a NMI's + * source, if the bitmask for the current CPU is present in + * the global pending bitword an IPI_STOP_HARD has been issued + * and should be handled. + */ + cpumask = PCPU_GET(cpumask); + if ((ipi_nmi_pending & cpumask) == 0) + return (1); atomic_clear_int(&ipi_nmi_pending, cpumask); cpustop_handler(); - return 0; + return (0); } -#endif /* STOP_NMI */ - /* * Handle an IPI_STOP by saving our current context and spinning until we * are resumed. Modified: stable/8/sys/i386/i386/trap.c ============================================================================== --- stable/8/sys/i386/i386/trap.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/i386/trap.c Thu Aug 13 17:54:11 2009 (r196198) @@ -211,13 +211,11 @@ trap(struct trapframe *frame) type = frame->tf_trapno; #ifdef SMP -#ifdef STOP_NMI /* Handler for NMI IPIs used for stopping CPUs. */ if (type == T_NMI) { if (ipi_nmi_handler() == 0) goto out; } -#endif /* STOP_NMI */ #endif /* SMP */ #ifdef KDB Modified: stable/8/sys/i386/include/apicvar.h ============================================================================== --- stable/8/sys/i386/include/apicvar.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/include/apicvar.h Thu Aug 13 17:54:11 2009 (r196198) @@ -100,11 +100,6 @@ * smp_ipi_mtx and waits for the completion of the IPI (Only one IPI user * at a time) The second group uses a single interrupt and a bitmap to avoid * redundant IPI interrupts. - * - * Right now IPI_STOP used by kdb shares the interrupt priority class with - * the two IPI groups mentioned above. As such IPI_STOP may cause a deadlock. - * Eventually IPI_STOP should use NMI IPIs - this would eliminate this and - * other deadlocks caused by IPI_STOP. */ /* Interrupts for local APIC LVT entries other than the timer. */ @@ -134,6 +129,7 @@ #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ +#define IPI_STOP_HARD (APIC_IPI_INTS + 8) /* Stop CPU with a NMI. */ #else /* XEN */ /* These are the normal i386 APIC definitions */ @@ -161,6 +157,7 @@ #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ +#define IPI_STOP_HARD (APIC_IPI_INTS + 8) /* Stop CPU with a NMI. */ #endif /* XEN */ /* Modified: stable/8/sys/i386/include/smp.h ============================================================================== --- stable/8/sys/i386/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -60,7 +60,8 @@ inthand_t void cpu_add(u_int apic_id, char boot_cpu); void cpustop_handler(void); void init_secondary(void); -void ipi_selected(u_int cpus, u_int ipi); +int ipi_nmi_handler(void); +void ipi_selected(cpumask_t cpus, u_int ipi); void ipi_all_but_self(u_int ipi); #ifndef XEN void ipi_bitmap_handler(struct trapframe frame); @@ -76,9 +77,6 @@ void smp_masked_invlpg_range(cpumask_t m void smp_invltlb(void); void smp_masked_invltlb(cpumask_t mask); -#ifdef STOP_NMI -int ipi_nmi_handler(void); -#endif #ifdef XEN void ipi_to_irq_init(void); Modified: stable/8/sys/i386/xen/mp_machdep.c ============================================================================== --- stable/8/sys/i386/xen/mp_machdep.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/xen/mp_machdep.c Thu Aug 13 17:54:11 2009 (r196198) @@ -90,8 +90,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define stop_cpus_with_nmi 0 - int mp_naps; /* # of Applications processors */ int boot_cpu_id = -1; /* designated BSP */ Modified: stable/8/sys/ia64/ia64/interrupt.c ============================================================================== --- stable/8/sys/ia64/ia64/interrupt.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/ia64/ia64/interrupt.c Thu Aug 13 17:54:11 2009 (r196198) @@ -145,6 +145,8 @@ interrupt(struct trapframe *tf) /* * Handle ExtINT interrupts by generating an INTA cycle to * read the vector. + * IPI_STOP_HARD is mapped to IPI_STOP so it is not necessary + * to add it to this switch-like construct. */ if (vector == 0) { inta = ib->ib_inta; Modified: stable/8/sys/ia64/include/smp.h ============================================================================== --- stable/8/sys/ia64/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/ia64/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -21,6 +21,7 @@ #define IPI_AST 4 #define IPI_RENDEZVOUS 5 #define IPI_STOP 6 +#define IPI_STOP_HARD 6 #define IPI_PREEMPT 7 #define IPI_COUNT 8 Modified: stable/8/sys/kern/kern_shutdown.c ============================================================================== --- stable/8/sys/kern/kern_shutdown.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/kern/kern_shutdown.c Thu Aug 13 17:54:11 2009 (r196198) @@ -412,9 +412,6 @@ boot(int howto) */ EVENTHANDLER_INVOKE(shutdown_post_sync, howto); - /* XXX This doesn't disable interrupts any more. Reconsider? */ - splhigh(); - if ((howto & (RB_HALT|RB_DUMP)) == RB_DUMP && !cold && !dumping) doadump(); @@ -488,6 +485,13 @@ static void shutdown_reset(void *junk, int howto) { + /* + * Disable interrupts on CPU0 in order to avoid fast handlers + * to preempt the stopping process and to deadlock against other + * CPUs. + */ + spinlock_enter(); + printf("Rebooting...\n"); DELAY(1000000); /* wait 1 sec for printf's to complete and be read */ /* cpu_boot(howto); */ /* doesn't do anything at the moment */ Modified: stable/8/sys/kern/subr_kdb.c ============================================================================== --- stable/8/sys/kern/subr_kdb.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/kern/subr_kdb.c Thu Aug 13 17:54:11 2009 (r196198) @@ -88,7 +88,8 @@ SYSCTL_PROC(_debug_kdb, OID_AUTO, trap_c * Flag indicating whether or not to IPI the other CPUs to stop them on * entering the debugger. Sometimes, this will result in a deadlock as * stop_cpus() waits for the other cpus to stop, so we allow it to be - * disabled. + * disabled. In order to maximize the chances of success, use a hard + * stop for that. */ #ifdef SMP static int kdb_stop_cpus = 1; @@ -226,7 +227,7 @@ kdb_panic(const char *msg) { #ifdef SMP - stop_cpus(PCPU_GET(other_cpus)); + stop_cpus_hard(PCPU_GET(other_cpus)); #endif printf("KDB: panic\n"); panic(msg); @@ -518,7 +519,7 @@ kdb_trap(int type, int code, struct trap #ifdef SMP if ((did_stop_cpus = kdb_stop_cpus) != 0) - stop_cpus(PCPU_GET(other_cpus)); + stop_cpus_hard(PCPU_GET(other_cpus)); #endif kdb_active++; Modified: stable/8/sys/kern/subr_smp.c ============================================================================== --- stable/8/sys/kern/subr_smp.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/kern/subr_smp.c Thu Aug 13 17:54:11 2009 (r196198) @@ -233,18 +233,21 @@ forward_roundrobin(void) * XXX FIXME: this is not MP-safe, needs a lock to prevent multiple CPUs * from executing at same time. */ -int -stop_cpus(cpumask_t map) +static int +generic_stop_cpus(cpumask_t map, u_int type) { int i; + KASSERT(type == IPI_STOP || type == IPI_STOP_HARD, + ("%s: invalid stop type", __func__)); + if (!smp_started) return 0; - CTR1(KTR_SMP, "stop_cpus(%x)", map); + CTR2(KTR_SMP, "stop_cpus(%x) with %u type", map, type); /* send the stop IPI to all CPUs in map */ - ipi_selected(map, IPI_STOP); + ipi_selected(map, type); i = 0; while ((stopped_cpus & map) != map) { @@ -262,6 +265,20 @@ stop_cpus(cpumask_t map) return 1; } +int +stop_cpus(cpumask_t map) +{ + + return (generic_stop_cpus(map, IPI_STOP)); +} + +int +stop_cpus_hard(cpumask_t map) +{ + + return (generic_stop_cpus(map, IPI_STOP_HARD)); +} + #if defined(__amd64__) /* * When called the executing CPU will send an IPI to all other CPUs Modified: stable/8/sys/mips/include/smp.h ============================================================================== --- stable/8/sys/mips/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/mips/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -24,6 +24,7 @@ #define IPI_RENDEZVOUS 0x0002 #define IPI_AST 0x0004 #define IPI_STOP 0x0008 +#define IPI_STOP_HARD 0x0008 #ifndef LOCORE Modified: stable/8/sys/mips/mips/mp_machdep.c ============================================================================== --- stable/8/sys/mips/mips/mp_machdep.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/mips/mips/mp_machdep.c Thu Aug 13 17:54:11 2009 (r196198) @@ -129,7 +129,12 @@ smp_handle_ipi(struct trapframe *frame) break; case IPI_STOP: - CTR0(KTR_SMP, "IPI_STOP"); + + /* + * IPI_STOP_HARD is mapped to IPI_STOP so it is not + * necessary to add it in the switch. + */ + CTR0(KTR_SMP, "IPI_STOP or IPI_STOP_HARD"); atomic_set_int(&stopped_cpus, cpumask); while ((started_cpus & cpumask) == 0) Modified: stable/8/sys/pc98/conf/NOTES ============================================================================== --- stable/8/sys/pc98/conf/NOTES Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/pc98/conf/NOTES Thu Aug 13 17:54:11 2009 (r196198) @@ -29,10 +29,6 @@ device apic # I/O apic # options MP_WATCHDOG -# Debugging options. -# -options STOP_NMI # Stop CPUS using NMI instead of IPI - ##################################################################### Modified: stable/8/sys/powerpc/include/smp.h ============================================================================== --- stable/8/sys/powerpc/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/powerpc/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -35,6 +35,7 @@ #define IPI_PREEMPT 1 #define IPI_RENDEZVOUS 2 #define IPI_STOP 3 +#define IPI_STOP_HARD 3 #ifndef LOCORE Modified: stable/8/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- stable/8/sys/powerpc/powerpc/mp_machdep.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/powerpc/powerpc/mp_machdep.c Thu Aug 13 17:54:11 2009 (r196198) @@ -281,7 +281,13 @@ powerpc_ipi_handler(void *arg) smp_rendezvous_action(); break; case IPI_STOP: - CTR1(KTR_SMP, "%s: IPI_STOP (stop)", __func__); + + /* + * IPI_STOP_HARD is mapped to IPI_STOP so it is not + * necessary to add such case in the switch. + */ + CTR1(KTR_SMP, "%s: IPI_STOP or IPI_STOP_HARD (stop)", + __func__); self = PCPU_GET(cpumask); savectx(PCPU_GET(curpcb)); atomic_set_int(&stopped_cpus, self); Modified: stable/8/sys/sparc64/include/smp.h ============================================================================== --- stable/8/sys/sparc64/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/sparc64/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -56,6 +56,7 @@ #define IPI_RENDEZVOUS PIL_RENDEZVOUS #define IPI_PREEMPT PIL_PREEMPT #define IPI_STOP PIL_STOP +#define IPI_STOP_HARD PIL_STOP #define IPI_RETRIES 5000 Modified: stable/8/sys/sun4v/include/smp.h ============================================================================== --- stable/8/sys/sun4v/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/sun4v/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -44,6 +44,7 @@ #define IPI_AST PIL_AST #define IPI_RENDEZVOUS PIL_RENDEZVOUS #define IPI_STOP PIL_STOP +#define IPI_STOP_HARD PIL_STOP #define IPI_PREEMPT PIL_PREEMPT Modified: stable/8/sys/sys/smp.h ============================================================================== --- stable/8/sys/sys/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/sys/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -123,6 +123,7 @@ void forward_signal(struct thread *); void forward_roundrobin(void); int restart_cpus(cpumask_t); int stop_cpus(cpumask_t); +int stop_cpus_hard(cpumask_t); #if defined(__amd64__) int suspend_cpus(cpumask_t); #endif From dougb at FreeBSD.org Thu Aug 13 22:49:15 2009 From: dougb at FreeBSD.org (Doug Barton) Date: Thu Aug 13 22:49:21 2009 Subject: svn commit: r196169 - stable/7/sys/pci In-Reply-To: <1250160126.1823.11.camel@balrog.2hip.net> References: <200908130820.n7D8KCgt093511@svn.freebsd.org> <1250160126.1823.11.camel@balrog.2hip.net> Message-ID: <4A849222.3090004@FreeBSD.org> Robert Noland wrote: > On Thu, 2009-08-13 at 08:20 +0000, Nick Hibma wrote: >> Author: n_hibma >> Date: Thu Aug 13 08:20:12 2009 >> New Revision: 196169 >> URL: http://svn.freebsd.org/changeset/base/196169 >> >> Log: >> Hide aperture size and stolen memory behind bootverbose. > > Why? This information can be useful and doesn't need to be buried in > the verbose boot log. Useful to developers maybe, but not to the average user. Personally I'd like to see most of what we print at boot time hidden behind bootverbose, but that's just me. Doug -- This .signature sanitized for your protection From rnoland at FreeBSD.org Thu Aug 13 23:09:32 2009 From: rnoland at FreeBSD.org (Robert Noland) Date: Thu Aug 13 23:09:49 2009 Subject: svn commit: r196169 - stable/7/sys/pci In-Reply-To: <4A849222.3090004@FreeBSD.org> References: <200908130820.n7D8KCgt093511@svn.freebsd.org> <1250160126.1823.11.camel@balrog.2hip.net> <4A849222.3090004@FreeBSD.org> Message-ID: <1250204964.33905.7.camel@balrog.2hip.net> On Thu, 2009-08-13 at 15:22 -0700, Doug Barton wrote: > Robert Noland wrote: > > On Thu, 2009-08-13 at 08:20 +0000, Nick Hibma wrote: > >> Author: n_hibma > >> Date: Thu Aug 13 08:20:12 2009 > >> New Revision: 196169 > >> URL: http://svn.freebsd.org/changeset/base/196169 > >> > >> Log: > >> Hide aperture size and stolen memory behind bootverbose. > > > > Why? This information can be useful and doesn't need to be buried in > > the verbose boot log. > > Useful to developers maybe, but not to the average user. While it certainly isn't critical information for the user to see, it is informative and not excessively chatty. At any rate this change should not have been made directly to 7. If people want to discuss this for HEAD, I will argue there... robert. > Personally I'd like to see most of what we print at boot time hidden > behind bootverbose, but that's just me. > > > Doug > -- Robert Noland FreeBSD From scottl at FreeBSD.org Thu Aug 13 23:18:46 2009 From: scottl at FreeBSD.org (Scott Long) Date: Thu Aug 13 23:18:59 2009 Subject: svn commit: r196200 - in head: etc/mtree include sys/dev/mfi usr.sbin usr.sbin/mfiutil Message-ID: <200908132318.n7DNIjvO015601@svn.freebsd.org> Author: scottl Date: Thu Aug 13 23:18:45 2009 New Revision: 196200 URL: http://svn.freebsd.org/changeset/base/196200 Log: ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell PERC5/6 controllers. Controller, array, and drive status can be checked, basic attributes can be changed, and arrays and spares can be created and deleted. Controller firmware can also be flashed. This does not replace MegaCLI, found in ports, as that is officially sanctioned and supported by LSI and includes vastly more functionality. However, mfiutil is open source and guaranteed to provide basic functionality, which can be especially useful if you have a problem and can't get MegaCLI to work. Approved by: re Obtained from: Yahoo! Inc. Added: head/usr.sbin/mfiutil/ head/usr.sbin/mfiutil/Makefile (contents, props changed) head/usr.sbin/mfiutil/README (contents, props changed) head/usr.sbin/mfiutil/mfi_cmd.c (contents, props changed) head/usr.sbin/mfiutil/mfi_config.c (contents, props changed) head/usr.sbin/mfiutil/mfi_drive.c (contents, props changed) head/usr.sbin/mfiutil/mfi_evt.c (contents, props changed) head/usr.sbin/mfiutil/mfi_flash.c (contents, props changed) head/usr.sbin/mfiutil/mfi_patrol.c (contents, props changed) head/usr.sbin/mfiutil/mfi_show.c (contents, props changed) head/usr.sbin/mfiutil/mfi_volume.c (contents, props changed) head/usr.sbin/mfiutil/mfiutil.1 (contents, props changed) head/usr.sbin/mfiutil/mfiutil.c (contents, props changed) head/usr.sbin/mfiutil/mfiutil.h (contents, props changed) Modified: head/etc/mtree/BSD.include.dist head/include/Makefile head/sys/dev/mfi/mfi_ioctl.h head/sys/dev/mfi/mfireg.h head/usr.sbin/Makefile Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Thu Aug 13 19:47:13 2009 (r196199) +++ head/etc/mtree/BSD.include.dist Thu Aug 13 23:18:45 2009 (r196200) @@ -104,6 +104,8 @@ .. lmc .. + mfi + .. mpt mpilib .. Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Thu Aug 13 19:47:13 2009 (r196199) +++ head/include/Makefile Thu Aug 13 23:18:45 2009 (r196200) @@ -40,7 +40,7 @@ LDIRS= bsm cam geom net net80211 netatal LSUBDIRS= cam/ata cam/scsi \ dev/acpica dev/an dev/bktr dev/firewire dev/hwpmc \ - dev/ic dev/iicbus ${_dev_ieee488} dev/lmc dev/ofw \ + dev/ic dev/iicbus ${_dev_ieee488} dev/lmc dev/mfi dev/ofw \ dev/pbio ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \ fs/devfs fs/fdescfs fs/fifofs fs/msdosfs fs/nfs fs/ntfs fs/nullfs \ Modified: head/sys/dev/mfi/mfi_ioctl.h ============================================================================== --- head/sys/dev/mfi/mfi_ioctl.h Thu Aug 13 19:47:13 2009 (r196199) +++ head/sys/dev/mfi/mfi_ioctl.h Thu Aug 13 23:18:45 2009 (r196200) @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #if defined(__amd64__) /* Assume amd64 wants 32 bit Linux */ struct iovec32 { u_int32_t iov_base; Modified: head/sys/dev/mfi/mfireg.h ============================================================================== --- head/sys/dev/mfi/mfireg.h Thu Aug 13 19:47:13 2009 (r196199) +++ head/sys/dev/mfi/mfireg.h Thu Aug 13 23:18:45 2009 (r196200) @@ -89,7 +89,7 @@ __FBSDID("$FreeBSD$"); #define MFI_ODCR0 0xa0 /* outbound doorbell clear register0 */ #define MFI_OSP0 0xb0 /* outbound scratch pad0 */ #define MFI_1078_EIM 0x80000004 /* 1078 enable intrrupt mask */ -#define MFI_RMI 0x2 /* reply message interrupt */ +#define MFI_RMI 0x2 /* reply message interrupt */ #define MFI_1078_RM 0x80000000 /* reply 1078 message interrupt */ #define MFI_ODC 0x4 /* outbound doorbell change interrupt */ @@ -151,15 +151,41 @@ typedef enum { MFI_DCMD_CTRL_EVENT_GETINFO = 0x01040100, MFI_DCMD_CTRL_EVENT_GET = 0x01040300, MFI_DCMD_CTRL_EVENT_WAIT = 0x01040500, + MFI_DCMD_PR_GET_STATUS = 0x01070100, + MFI_DCMD_PR_GET_PROPERTIES = 0x01070200, + MFI_DCMD_PR_SET_PROPERTIES = 0x01070300, + MFI_DCMD_PR_START = 0x01070400, + MFI_DCMD_PR_STOP = 0x01070500, + MFI_DCMD_TIME_SECS_GET = 0x01080201, + MFI_DCMD_FLASH_FW_OPEN = 0x010f0100, + MFI_DCMD_FLASH_FW_DOWNLOAD = 0x010f0200, + MFI_DCMD_FLASH_FW_FLASH = 0x010f0300, + MFI_DCMD_FLASH_FW_CLOSE = 0x010f0400, + MFI_DCMD_PD_GET_LIST = 0x02010000, + MFI_DCMD_PD_GET_INFO = 0x02020000, + MFI_DCMD_PD_STATE_SET = 0x02030100, + MFI_DCMD_PD_REBUILD_START = 0x02040100, + MFI_DCMD_PD_REBUILD_ABORT = 0x02040200, + MFI_DCMD_PD_CLEAR_START = 0x02050100, + MFI_DCMD_PD_CLEAR_ABORT = 0x02050200, + MFI_DCMD_PD_GET_PROGRESS = 0x02060000, + MFI_DCMD_PD_LOCATE_START = 0x02070100, + MFI_DCMD_PD_LOCATE_STOP = 0x02070200, MFI_DCMD_LD_GET_LIST = 0x03010000, MFI_DCMD_LD_GET_INFO = 0x03020000, MFI_DCMD_LD_GET_PROP = 0x03030000, MFI_DCMD_LD_SET_PROP = 0x03040000, + MFI_DCMD_LD_INIT_START = 0x03060100, MFI_DCMD_LD_DELETE = 0x03090000, MFI_DCMD_CFG_READ = 0x04010000, MFI_DCMD_CFG_ADD = 0x04020000, MFI_DCMD_CFG_CLEAR = 0x04030000, + MFI_DCMD_CFG_MAKE_SPARE = 0x04040000, + MFI_DCMD_CFG_REMOVE_SPARE = 0x04050000, MFI_DCMD_CFG_FOREIGN_IMPORT = 0x04060400, + MFI_DCMD_BBU_GET_STATUS = 0x05010000, + MFI_DCMD_BBU_GET_CAPACITY_INFO =0x05020000, + MFI_DCMD_BBU_GET_DESIGN_INFO = 0x05030000, MFI_DCMD_CLUSTER = 0x08000000, MFI_DCMD_CLUSTER_RESET_ALL = 0x08010100, MFI_DCMD_CLUSTER_RESET_LD = 0x08010200 @@ -245,6 +271,9 @@ typedef enum { MFI_STAT_RESERVATION_IN_PROGRESS, MFI_STAT_I2C_ERRORS_DETECTED, MFI_STAT_PCI_ERRORS_DETECTED, + MFI_STAT_DIAG_FAILED, + MFI_STAT_BOOT_MSG_PENDING, + MFI_STAT_FOREIGN_CONFIG_INCOMPLETE, MFI_STAT_INVALID_STATUS = 0xFF } mfi_status_t; @@ -303,6 +332,17 @@ typedef enum { MR_LD_CACHE_ALLOW_WRITE_CACHE = 0x20, MR_LD_CACHE_ALLOW_READ_CACHE = 0x40 } mfi_ld_cache; +#define MR_LD_CACHE_MASK 0x7f + +#define MR_LD_CACHE_POLICY_READ_AHEAD_NONE 0 +#define MR_LD_CACHE_POLICY_READ_AHEAD_ALWAYS MR_LD_CACHE_READ_AHEAD +#define MR_LD_CACHE_POLICY_READ_AHEAD_ADAPTIVE \ + (MR_LD_CACHE_READ_AHEAD | MR_LD_CACHE_READ_ADAPTIVE) +#define MR_LD_CACHE_POLICY_WRITE_THROUGH 0 +#define MR_LD_CACHE_POLICY_WRITE_BACK MR_LD_CACHE_WRITE_BACK +#define MR_LD_CACHE_POLICY_IO_CACHED \ + (MR_LD_CACHE_ALLOW_WRITE_CACHE | MR_LD_CACHE_ALLOW_READ_CACHE) +#define MR_LD_CACHE_POLICY_IO_DIRECT 0 typedef enum { MR_PD_CACHE_UNCHANGED = 0, @@ -320,6 +360,7 @@ typedef enum { #define MFI_DEFAULT_ID -1 #define MFI_MAX_LUN 8 #define MFI_MAX_LD 64 +#define MFI_MAX_PD 256 #define MFI_FRAME_SIZE 64 #define MFI_MBOX_SIZE 12 @@ -866,12 +907,10 @@ union mfi_pd_ddf_type { } __packed; struct mfi_pd_progress { - struct { - uint32_t rbld : 1; - uint32_t patrol : 1; - uint32_t clear : 1; - uint32_t reserved: 29; - } active; + uint32_t active; +#define MFI_PD_PROGRESS_REBUILD (1<<0) +#define MFI_PD_PROGRESS_PATROL (1<<1) +#define MFI_PD_PROGRESS_CLEAR (1<<2) struct mfi_progress rbld; struct mfi_progress patrol; struct mfi_progress clear; @@ -890,8 +929,8 @@ struct mfi_pd_info { uint32_t other_err_count; uint32_t pred_fail_count; uint32_t last_pred_fail_event_seq_num; - uint16_t fw_state; - uint8_t disable_for_removal; + uint16_t fw_state; /* MFI_PD_STATE_* */ + uint8_t disabled_for_removal; uint8_t link_speed; union mfi_pd_ddf_type state; struct { @@ -918,7 +957,7 @@ struct mfi_pd_address { uint16_t encl_device_id; uint8_t encl_index; uint8_t slot_number; - uint8_t scsi_dev_type; + uint8_t scsi_dev_type; /* 0 = disk */ uint8_t connect_port_bitmap; uint64_t sas_addr[2]; } __packed; @@ -926,12 +965,19 @@ struct mfi_pd_address { struct mfi_pd_list { uint32_t size; uint32_t count; - uint8_t data; - /* - struct mfi_pd_address addr[]; - */ + struct mfi_pd_address addr[0]; } __packed; +enum mfi_pd_state { + MFI_PD_STATE_UNCONFIGURED_GOOD = 0x00, + MFI_PD_STATE_UNCONFIGURED_BAD = 0x01, + MFI_PD_STATE_HOT_SPARE = 0x02, + MFI_PD_STATE_OFFLINE = 0x10, + MFI_PD_STATE_FAILED = 0x11, + MFI_PD_STATE_REBUILD = 0x14, + MFI_PD_STATE_ONLINE = 0x18 +}; + union mfi_ld_ref { struct { uint8_t target_id; @@ -986,6 +1032,9 @@ struct mfi_ld_params { uint8_t span_depth; uint8_t state; uint8_t init_state; +#define MFI_LD_PARAMS_INIT_NO 0 +#define MFI_LD_PARAMS_INIT_QUICK 1 +#define MFI_LD_PARAMS_INIT_FULL 2 uint8_t is_consistent; uint8_t reserved[23]; } __packed; @@ -995,7 +1044,7 @@ struct mfi_ld_progress { #define MFI_LD_PROGRESS_CC (1<<0) #define MFI_LD_PROGRESS_BGI (1<<1) #define MFI_LD_PROGRESS_FGI (1<<2) -#define MFI_LD_PORGRESS_RECON (1<<3) +#define MFI_LD_PROGRESS_RECON (1<<3) struct mfi_progress cc; struct mfi_progress bgi; struct mfi_progress fgi; @@ -1028,26 +1077,18 @@ struct mfi_ld_info { uint8_t reserved2[16]; } __packed; -union mfi_spare_type { - struct { - uint8_t is_dedicate :1; - uint8_t is_revertable :1; - uint8_t is_encl_affinity :1; - uint8_t reserved :5; - } v; - uint8_t type; -} __packed; - #define MAX_ARRAYS 16 struct mfi_spare { union mfi_pd_ref ref; - union mfi_spare_type spare_type; + uint8_t spare_type; +#define MFI_SPARE_DEDICATED (1 << 0) +#define MFI_SPARE_REVERTIBLE (1 << 1) +#define MFI_SPARE_ENCL_AFFINITY (1 << 2) uint8_t reserved[2]; uint8_t array_count; - uint16_t array_refd[MAX_ARRAYS]; + uint16_t array_ref[MAX_ARRAYS]; } __packed; -#define MAX_ROW_SIZE 32 struct mfi_array { uint64_t size; uint8_t num_drives; @@ -1055,13 +1096,13 @@ struct mfi_array { uint16_t array_ref; uint8_t pad[20]; struct { - union mfi_pd_ref ref; - uint16_t fw_state; + union mfi_pd_ref ref; /* 0xffff == missing drive */ + uint16_t fw_state; /* MFI_PD_STATE_* */ struct { uint8_t pd; uint8_t slot; } encl; - } pd[MAX_ROW_SIZE]; + } pd[0]; } __packed; struct mfi_config_data { @@ -1073,13 +1114,117 @@ struct mfi_config_data { uint16_t spares_count; uint16_t spares_size; uint8_t reserved[16]; - uint8_t data; - /* - struct mfi_array array[]; - struct mfi_ld_config ld[]; - struct mfi_spare spare[]; - */ -} __packed; + struct mfi_array array[0]; + struct mfi_ld_config ld[0]; + struct mfi_spare spare[0]; +} __packed; + +struct mfi_bbu_capacity_info { + uint16_t relative_charge; + uint16_t absolute_charge; + uint16_t remaining_capacity; + uint16_t full_charge_capacity; + uint16_t run_time_to_empty; + uint16_t average_time_to_empty; + uint16_t average_time_to_full; + uint16_t cycle_count; + uint16_t max_error; + uint16_t remaining_capacity_alarm; + uint16_t remaining_time_alarm; + uint8_t reserved[26]; +} __packed; + +struct mfi_bbu_design_info { + uint32_t mfg_date; + uint16_t design_capacity; + uint16_t design_voltage; + uint16_t spec_info; + uint16_t serial_number; + uint16_t pack_stat_config; + uint8_t mfg_name[12]; + uint8_t device_name[8]; + uint8_t device_chemistry[8]; + uint8_t mfg_data[8]; + uint8_t reserved[17]; +} __packed; + +struct mfi_ibbu_state { + uint16_t gas_guage_status; + uint16_t relative_charge; + uint16_t charger_system_state; + uint16_t charger_system_ctrl; + uint16_t charging_current; + uint16_t absolute_charge; + uint16_t max_error; + uint8_t reserved[18]; +} __packed; + +struct mfi_bbu_state { + uint16_t gas_guage_status; + uint16_t relative_charge; + uint16_t charger_status; + uint16_t remaining_capacity; + uint16_t full_charge_capacity; + uint8_t is_SOH_good; + uint8_t reserved[21]; +} __packed; + +union mfi_bbu_status_detail { + struct mfi_ibbu_state ibbu; + struct mfi_bbu_state bbu; +}; + +struct mfi_bbu_status { + uint8_t battery_type; +#define MFI_BBU_TYPE_NONE 0 +#define MFI_BBU_TYPE_IBBU 1 +#define MFI_BBU_TYPE_BBU 2 + uint8_t reserved; + uint16_t voltage; + int16_t current; + uint16_t temperature; + uint32_t fw_status; +#define MFI_BBU_STATE_PACK_MISSING (1 << 0) +#define MFI_BBU_STATE_VOLTAGE_LOW (1 << 1) +#define MFI_BBU_STATE_TEMPERATURE_HIGH (1 << 2) +#define MFI_BBU_STATE_CHARGE_ACTIVE (1 << 0) +#define MFI_BBU_STATE_DISCHARGE_ACTIVE (1 << 0) + uint8_t pad[20]; + union mfi_bbu_status_detail detail; +} __packed; + +enum mfi_pr_state { + MFI_PR_STATE_STOPPED = 0, + MFI_PR_STATE_READY = 1, + MFI_PR_STATE_ACTIVE = 2, + MFI_PR_STATE_ABORTED = 0xff +}; + +struct mfi_pr_status { + uint32_t num_iteration; + uint8_t state; + uint8_t num_pd_done; + uint8_t reserved[10]; +}; + +enum mfi_pr_opmode { + MFI_PR_OPMODE_AUTO = 0, + MFI_PR_OPMODE_MANUAL = 1, + MFI_PR_OPMODE_DISABLED = 2 +}; + +struct mfi_pr_properties { + uint8_t op_mode; + uint8_t max_pd; + uint8_t reserved; + uint8_t exclude_ld_count; + uint16_t excluded_ld[MFI_MAX_LD]; + uint8_t cur_pd_map[MFI_MAX_PD / 8]; + uint8_t last_pd_map[MFI_MAX_PD / 8]; + uint32_t next_exec; + uint32_t exec_freq; + uint32_t clear_freq; +}; #define MFI_SCSI_MAX_TARGETS 128 #define MFI_SCSI_MAX_LUNS 8 Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Thu Aug 13 19:47:13 2009 (r196199) +++ head/usr.sbin/Makefile Thu Aug 13 23:18:45 2009 (r196200) @@ -94,6 +94,7 @@ SUBDIR= ${_ac} \ manctl \ memcontrol \ mergemaster \ + mfiutil \ mixer \ ${_mld6query} \ mlxcontrol \ Added: head/usr.sbin/mfiutil/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/mfiutil/Makefile Thu Aug 13 23:18:45 2009 (r196200) @@ -0,0 +1,17 @@ +# $FreeBSD$ +PROG= mfiutil + +SRCS= mfiutil.c mfi_cmd.c mfi_config.c mfi_drive.c mfi_evt.c mfi_flash.c \ + mfi_patrol.c mfi_show.c mfi_volume.c + +CFLAGS+= -fno-builtin-strftime +WARNS?=3 + +LDADD= -lutil + +# Here be dragons +.ifdef DEBUG +CFLAGS+= -DDEBUG +.endif + +.include Added: head/usr.sbin/mfiutil/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/mfiutil/README Thu Aug 13 23:18:45 2009 (r196200) @@ -0,0 +1,104 @@ +# $FreeBSD$ + +This package includes a mfiutil command for administering mfi(4) controllers +on FreeBSD. + +Version 1.0.13 + * Cleaned up warnings in preparation for integration with FreeBSD + +Version 1.0.12 + * Add 'drive clear' command to wipe drives with all 0x00 characters + +Version 1.0.11 + * Display serial number for drives + * Display location info for drives with 'show config' + +Version 1.0.10 + * Display min and max stripe size supported by adapters. + * Added support for examining the controller event log. + +Version 1.0.9 + * Display stripe size for volumes. + * Added support for setting the stripe size for new volumes. + * Fix a regression in 1.0.8 that broke creation of RAID-5 and RAID-50 + arrays. + +Version 1.0.8 + * Added support for RAID-60 arrays. + * Added 'flash' command to support firmware flashing. + +Version 1.0.7 + * Renamed 'clear config' to 'clear, 'create volume' to 'create', + 'delete volume' to 'delete', 'create spare' to 'add', and + 'delete spare' to 'remove'. The old names still work. + * Added support for RAID-6 arrays. + +Version 1.0.6 + * Added 'show patrol', 'patrol', 'start patrol', and 'stop patrol' + commands to manage patrol reads. + +Version 1.0.5 + * Added 'create volume' and 'delete volume' commands to manage volumes. + * Added 'clear config' command to clear entire configuration. + * Added more detailed error reporting based on firmware status codes. + * Renamed 'progress' command to 'drive progress'. + * Added 'volume progress' command to display progress of volume-level + activites such as background inits. + * Fixed 'create spare' to properly add global spares. + +Version 1.0.4 + * Added 'create spare' and 'delete spare' commands to manage hot spares. + * Added 'good' command to mark unconfigured bad drives as good. + * Display more information about hot spares in 'show config' + * Allow physical drives to be specified via Exx:Syy similar to megacli + * Display onboard memory size in 'show adapter' + +Version 1.0.3 + * Added 'cache' command to manage cache settings for volumes. + * Added 'name' command to name volumes. + * Added manpage. + +Version 1.0.2 + * Added 'show adapter' and 'show battery' commands. + * Added RAID level of volumes to 'show config' and 'show volumes'. + * Added drive model info to 'show config' and 'show drives'. + * Added package firmware version to 'show firmware'. + * Added read and write cache status to 'show volumes'. + * Map volume IDs to mfidX device names on newer kernels. + +Version 1.0.1 + * Added 'show firmware' command + +Version 1.0.0 + * Initial release + +usage: mfiutil [-u unit] ... + +Commands include: + version + show adapter - display controller information + show battery - display battery information + show config - display RAID configuration + show drives - list physical drives + show firmware - list firmware images + show volumes - list logical volumes + show patrol - display patrol read status + fail - fail a physical drive + good - mark a bad physical drive as good + rebuild - mark failed drive ready for rebuild + drive progress - display status of active operations + start rebuild + abort rebuild + locate - toggle drive LED + cache [command [setting]] + name + volume progress - display status of active operations + clear - clear volume configuration + create [-v] [,[,...]] [[,[,...]] + delete + add [volume] - add a hot spare + remove - remove a hot spare + patrol [interval [start]] + start patrol - start a patrol read + stop patrol - stop a patrol read + flash Added: head/usr.sbin/mfiutil/mfi_cmd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/mfiutil/mfi_cmd.c Thu Aug 13 23:18:45 2009 (r196200) @@ -0,0 +1,351 @@ +/*- + * Copyright (c) 2008, 2009 Yahoo!, Inc. + * 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. + * 3. The names of the authors may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "mfiutil.h" +#include + +static const char *mfi_status_codes[] = { + "Command completed succesfully", + "Invalid command", + "Invalid DMCD opcode", + "Invalid parameter", + "Invalid Sequence Number", + "Abort isn't possible for the requested command", + "Application 'host' code not found", + "Application in use", + "Application not initialized", + "Array index invalid", + "Array row not empty", + "Configuration resource conflict", + "Device not found", + "Drive too small", + "Flash memory allocation failed", + "Flash download already in progress", + "Flash operation failed", + "Bad flash image", + "Incomplete flash image", + "Flash not open", + "Flash not started", + "Flush failed", + "Specified application doesn't have host-resident code", + "Volume consistency check in progress", + "Volume initialization in progress", + "Volume LBA out of range", + "Maximum number of volumes are already configured", + "Volume is not OPTIMAL", + "Volume rebuild in progress", + "Volume reconstruction in progress", + "Volume RAID level is wrong for requested operation", + "Too many spares assigned", + "Scratch memory not available", + "Error writing MFC data to SEEPROM", + "Required hardware is missing", + "Item not found", + "Volume drives are not within an enclosure", + "Drive clear in progress", + "Drive type mismatch (SATA vs SAS)", + "Patrol read disabled", + "Invalid row index", + "SAS Config - Invalid action", + "SAS Config - Invalid data", + "SAS Config - Invalid page", + "SAS Config - Invalid type", + "SCSI command completed with error", + "SCSI I/O request failed", + "SCSI RESERVATION_CONFLICT", + "One or more flush operations during shutdown failed", + "Firmware time is not set", + "Wrong firmware or drive state", + "Volume is offline", + "Peer controller rejected request", + "Unable to inform peer of communication changes", + "Volume reservation already in progress", + "I2C errors were detected", + "PCI errors occurred during XOR/DMA operation", + "Diagnostics failed", + "Unable to process command as boot messages are pending", + "Foreign configuration is incomplete" +}; + +const char * +mfi_status(u_int status_code) +{ + static char buffer[16]; + + if (status_code == MFI_STAT_INVALID_STATUS) + return ("Invalid status"); + if (status_code < sizeof(mfi_status_codes) / sizeof(char *)) + return (mfi_status_codes[status_code]); + snprintf(buffer, sizeof(buffer), "Status: 0x%02x", status_code); + return (buffer); +} + +const char * +mfi_raid_level(uint8_t primary_level, uint8_t secondary_level) +{ + static char buf[16]; + + switch (primary_level) { + case DDF_RAID0: + return ("RAID-0"); + case DDF_RAID1: + if (secondary_level != 0) + return ("RAID-10"); + else + return ("RAID-1"); + case DDF_RAID1E: + return ("RAID-1E"); + case DDF_RAID3: + return ("RAID-3"); + case DDF_RAID5: + if (secondary_level != 0) + return ("RAID-50"); + else + return ("RAID-5"); + case DDF_RAID5E: + return ("RAID-5E"); + case DDF_RAID5EE: + return ("RAID-5EE"); + case DDF_RAID6: + if (secondary_level != 0) + return ("RAID-60"); + else + return ("RAID-6"); + case DDF_JBOD: + return ("JBOD"); + case DDF_CONCAT: + return ("CONCAT"); + default: + sprintf(buf, "LVL 0x%02x", primary_level); + return (buf); + } +} + +static int +mfi_query_disk(int fd, uint8_t target_id, struct mfi_query_disk *info) +{ + + bzero(info, sizeof(*info)); + info->array_id = target_id; + if (ioctl(fd, MFIIO_QUERY_DISK, info) < 0) + return (-1); + if (!info->present) { + errno = ENXIO; + return (-1); + } + return (0); +} + +const char * +mfi_volume_name(int fd, uint8_t target_id) +{ + static struct mfi_query_disk info; + static char buf[4]; + + if (mfi_query_disk(fd, target_id, &info) < 0) { + snprintf(buf, sizeof(buf), "%d", target_id); + return (buf); + } + return (info.devname); +} + +int +mfi_volume_busy(int fd, uint8_t target_id) +{ + struct mfi_query_disk info; + + /* Assume it isn't mounted if we can't get information. */ + if (mfi_query_disk(fd, target_id, &info) < 0) + return (0); + return (info.open != 0); +} + +/* + * Check if the running kernel supports changing the RAID + * configuration of the mfi controller. + */ +int +mfi_reconfig_supported(void) +{ + char mibname[64]; + size_t len; + int dummy; + + len = sizeof(dummy); + snprintf(mibname, sizeof(mibname), "dev.mfi.%d.delete_busy_volumes", + mfi_unit); + return (sysctlbyname(mibname, &dummy, &len, NULL, 0) == 0); +} + +int +mfi_lookup_volume(int fd, const char *name, uint8_t *target_id) +{ + struct mfi_query_disk info; + struct mfi_ld_list list; + char *cp; + long val; + u_int i; + + /* If it's a valid number, treat it as a raw target ID. */ + val = strtol(name, &cp, 0); + if (*cp == '\0') { + *target_id = val; + return (0); + } + + if (mfi_dcmd_command(fd, MFI_DCMD_LD_GET_LIST, &list, sizeof(list), + NULL, 0, NULL) < 0) + return (-1); + + for (i = 0; i < list.ld_count; i++) { + if (mfi_query_disk(fd, list.ld_list[i].ld.v.target_id, + &info) < 0) + continue; + if (strcmp(name, info.devname) == 0) { + *target_id = list.ld_list[i].ld.v.target_id; + return (0); + } + } + errno = EINVAL; + return (-1); +} + +int +mfi_dcmd_command(int fd, uint32_t opcode, void *buf, size_t bufsize, + uint8_t *mbox, size_t mboxlen, uint8_t *statusp) +{ + struct mfi_ioc_passthru ioc; + struct mfi_dcmd_frame *dcmd; + int r; + + if ((mbox != NULL && (mboxlen == 0 || mboxlen > MFI_MBOX_SIZE)) || + (mbox == NULL && mboxlen != 0)) { + errno = EINVAL; + return (-1); + } + + bzero(&ioc, sizeof(ioc)); + dcmd = &ioc.ioc_frame; + if (mbox) + bcopy(mbox, dcmd->mbox, mboxlen); + dcmd->header.cmd = MFI_CMD_DCMD; + dcmd->header.timeout = 0; + dcmd->header.flags = 0; + dcmd->header.data_len = bufsize; + dcmd->opcode = opcode; + + ioc.buf = buf; + ioc.buf_size = bufsize; + r = ioctl(fd, MFIIO_PASSTHRU, &ioc); + if (r < 0) + return (r); + + if (statusp != NULL) + *statusp = dcmd->header.cmd_status; + else if (dcmd->header.cmd_status != MFI_STAT_OK) { + warnx("Command failed: %s", + mfi_status(dcmd->header.cmd_status)); + errno = EIO; + return (-1); + } + return (0); +} + +int +mfi_ctrl_get_info(int fd, struct mfi_ctrl_info *info, uint8_t *statusp) +{ + + return (mfi_dcmd_command(fd, MFI_DCMD_CTRL_GETINFO, info, + sizeof(struct mfi_ctrl_info), NULL, 0, statusp)); +} + +int +mfi_open(int unit) +{ + char path[MAXPATHLEN]; + + snprintf(path, sizeof(path), "/dev/mfi%d", unit); + return (open(path, O_RDWR)); +} + +void +mfi_display_progress(const char *label, struct mfi_progress *prog) +{ + uint seconds; + + printf("%s: %.2f%% complete, after %ds", label, + (float)prog->progress * 100 / 0xffff, prog->elapsed_seconds); + if (prog->elapsed_seconds > 10) { + printf(" finished in "); + seconds = (0x10000 * (uint32_t)prog->elapsed_seconds) / + prog->progress - prog->elapsed_seconds; + if (seconds > 3600) + printf("%u:", seconds / 3600); + if (seconds > 60) { + seconds %= 3600; + printf("%02u:%02u", seconds / 60, seconds % 60); + } else + printf("%us", seconds); + } + printf("\n"); +} + +int +mfi_table_handler(struct mfiutil_command **start, struct mfiutil_command **end, + int ac, char **av) +{ + struct mfiutil_command **cmd; + + if (ac < 2) { + warnx("The %s command requires a sub-command.", av[0]); + return (EINVAL); + } + for (cmd = start; cmd < end; cmd++) { + if (strcmp((*cmd)->name, av[1]) == 0) + return ((*cmd)->handler(ac - 1, av + 1)); + } + + warnx("%s is not a valid sub-command of %s.", av[1], av[0]); + return (ENOENT); +} Added: head/usr.sbin/mfiutil/mfi_config.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/mfiutil/mfi_config.c Thu Aug 13 23:18:45 2009 (r196200) @@ -0,0 +1,1164 @@ +/*- + * Copyright (c) 2008, 2009 Yahoo!, Inc. + * 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. + * 3. The names of the authors may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. + * + * $FreeBSD$ + */ + +#include +#ifdef DEBUG +#include +#endif +#include +#include +#include +#ifdef DEBUG +#include +#endif +#include +#include +#include +#include +#include "mfiutil.h" + +#ifdef DEBUG +static void dump_config(int fd, struct mfi_config_data *config); +#endif + +static int add_spare(int ac, char **av); +static int remove_spare(int ac, char **av); + +#define powerof2(x) ((((x)-1)&(x))==0) + +static long +dehumanize(const char *value) +{ + char *vtp; + long iv; + + if (value == NULL) + return (0); + iv = strtoq(value, &vtp, 0); + if (vtp == value || (vtp[0] != '\0' && vtp[1] != '\0')) { + return (0); + } + switch (vtp[0]) { + case 't': case 'T': + iv *= 1024; + case 'g': case 'G': + iv *= 1024; + case 'm': case 'M': + iv *= 1024; + case 'k': case 'K': + iv *= 1024; + case '\0': + break; + default: + return (0); + } + return (iv); +} +int +mfi_config_read(int fd, struct mfi_config_data **configp) +{ + struct mfi_config_data *config; + uint32_t config_size; + + /* + * Keep fetching the config in a loop until we have a large enough + * buffer to hold the entire configuration. + */ + config = NULL; + config_size = 1024; +fetch: + config = reallocf(config, config_size); + if (config == NULL) + return (-1); + if (mfi_dcmd_command(fd, MFI_DCMD_CFG_READ, config, + config_size, NULL, 0, NULL) < 0) + return (-1); + + if (config->size > config_size) { + config_size = config->size; + goto fetch; + } + + *configp = config; + return (0); +} + +static struct mfi_array * +mfi_config_lookup_array(struct mfi_config_data *config, uint16_t array_ref) +{ + struct mfi_array *ar; + char *p; + int i; + + p = (char *)config->array; + for (i = 0; i < config->array_count; i++) { + ar = (struct mfi_array *)p; + if (ar->array_ref == array_ref) + return (ar); + p += config->array_size; + } + + return (NULL); +} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From remko at elvandar.org Fri Aug 14 06:00:05 2009 From: remko at elvandar.org (Remko Lodder) Date: Fri Aug 14 06:00:17 2009 Subject: svn commit: r196200 - in head: etc/mtree include sys/dev/mfi usr.sbin usr.sbin/mfiutil In-Reply-To: <200908132318.n7DNIjvO015601@svn.freebsd.org> References: <200908132318.n7DNIjvO015601@svn.freebsd.org> Message-ID: On Fri, August 14, 2009 1:18 am, Scott Long wrote: > Author: scottl > Date: Thu Aug 13 23:18:45 2009 > New Revision: 196200 > URL: http://svn.freebsd.org/changeset/base/196200 > > Log: > ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell > PERC5/6 > controllers. Controller, array, and drive status can be checked, basic > attributes can be changed, and arrays and spares can be created and > deleted. > Controller firmware can also be flashed. > > This does not replace MegaCLI, found in ports, as that is officially > sanctioned > and supported by LSI and includes vastly more functionality. However, > mfiutil > is open source and guaranteed to provide basic functionality, which can > be > especially useful if you have a problem and can't get MegaCLI to work. > > Approved by: re > Obtained from: Yahoo! Inc. > Great work! Thanks! Also thanks to Yahoo! Inc.! Cheers, Remko -- /"\ Best regards, | remko@FreeBSD.org \ / Remko Lodder | remko@EFnet X http://www.evilcoder.org/ | / \ ASCII Ribbon Campaign | Against HTML Mail and News From danger at rulez.sk Fri Aug 14 09:53:21 2009 From: danger at rulez.sk (=?UTF-8?B?RGFuaWVsIEdlcsW+bw==?=) Date: Fri Aug 14 09:53:28 2009 Subject: svn commit: r196200 - in head: etc/mtree include sys/dev/mfi usr.sbin usr.sbin/mfiutil In-Reply-To: <200908132318.n7DNIjvO015601@svn.freebsd.org> References: <200908132318.n7DNIjvO015601@svn.freebsd.org> Message-ID: <4A852FDF.5060709@rulez.sk> Scott Long wrote: > Author: scottl > Date: Thu Aug 13 23:18:45 2009 > New Revision: 196200 > URL: http://svn.freebsd.org/changeset/base/196200 > > Log: > ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell PERC5/6 > controllers. Controller, array, and drive status can be checked, basic > attributes can be changed, and arrays and spares can be created and deleted. > Controller firmware can also be flashed. > > This does not replace MegaCLI, found in ports, as that is officially sanctioned > and supported by LSI and includes vastly more functionality. However, mfiutil > is open source and guaranteed to provide basic functionality, which can be > especially useful if you have a problem and can't get MegaCLI to work. Is this MFC-able to stable/7 and stable/8? From julian at FreeBSD.org Fri Aug 14 10:09:46 2009 From: julian at FreeBSD.org (Julian Elischer) Date: Fri Aug 14 10:09:58 2009 Subject: svn commit: r196201 - head/sys/netinet/ipfw Message-ID: <200908141009.n7EA9k1m028514@svn.freebsd.org> Author: julian Date: Fri Aug 14 10:09:45 2009 New Revision: 196201 URL: http://svn.freebsd.org/changeset/base/196201 Log: Fix ipfw crash on uid or gid check. Receiving any ip packet for which there is no existing socket will crash if ipfw has a uid or gid test rule, as the uid/gid of the non existent owner of said non existent socket is tested. Brooks introduced this error as part of his >16 gids patch. It appears to be a cut-n-paste error from similar code a few lines before. The old code used the 'pcb' variable here, but in the new code that switched the 'inp' variable, which is often NULL and what is tested in the code further up. The rest of the multi-gid patch for ipfw seems solid (and cleaner than previous code). Reviewed by: brooks Approved by: re (rwatson) Modified: head/sys/netinet/ipfw/ip_fw2.c Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Thu Aug 13 23:18:45 2009 (r196200) +++ head/sys/netinet/ipfw/ip_fw2.c Fri Aug 14 10:09:45 2009 (r196201) @@ -2057,7 +2057,7 @@ check_uidgid(ipfw_insn_u32 *insn, int pr dst_ip, htons(dst_port), wildcard, NULL); if (pcb != NULL) { - *uc = crhold(inp->inp_cred); + *uc = crhold(pcb->inp_cred); *ugid_lookupp = 1; } INP_INFO_RUNLOCK(pi); From bzeeb-lists at lists.zabbadoz.net Fri Aug 14 10:20:34 2009 From: bzeeb-lists at lists.zabbadoz.net (Bjoern A. Zeeb) Date: Fri Aug 14 10:20:45 2009 Subject: svn commit: r196200 - in head: etc/mtree include sys/dev/mfi usr.sbin usr.sbin/mfiutil In-Reply-To: <200908132318.n7DNIjvO015601@svn.freebsd.org> References: <200908132318.n7DNIjvO015601@svn.freebsd.org> Message-ID: <20090814095726.A93661@maildrop.int.zabbadoz.net> On Thu, 13 Aug 2009, Scott Long wrote: > Author: scottl > Date: Thu Aug 13 23:18:45 2009 > New Revision: 196200 > URL: http://svn.freebsd.org/changeset/base/196200 > > Log: > ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell PERC5/6 > controllers. Controller, array, and drive status can be checked, basic > attributes can be changed, and arrays and spares can be created and deleted. > Controller firmware can also be flashed. > > This does not replace MegaCLI, found in ports, as that is officially sanctioned > and supported by LSI and includes vastly more functionality. However, mfiutil > is open source and guaranteed to provide basic functionality, which can be > especially useful if you have a problem and can't get MegaCLI to work. > > Approved by: re > Obtained from: Yahoo! Inc. as you noticed already it breaks here on 32bit platforms: /src/usr.sbin/mfiutil/mfi_drive.c: In function 'mfi_lookup_drive': /src/usr.sbin/mfiutil/mfi_drive.c:120: warning: comparison between signed and unsigned struct mfi_pd_list { uint32_t size; uint32_t count; struct mfi_pd_address addr[0]; } __packed; long val; struct mfi_pd_list *list 120 for (val = 0; val < list->count; val++) { long vs uint32_t. -- Bjoern A. Zeeb What was I talking about and who are you again? From julian at FreeBSD.org Fri Aug 14 10:25:15 2009 From: julian at FreeBSD.org (Julian Elischer) Date: Fri Aug 14 10:25:27 2009 Subject: svn commit: r196202 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908141025.n7EAPE4m028937@svn.freebsd.org> Author: julian Date: Fri Aug 14 10:25:14 2009 New Revision: 196202 URL: http://svn.freebsd.org/changeset/base/196202 Log: MFC of r196201 URL: http://svn.freebsd.org/changeset/base/196201 Fix ipfw crash on uid or gid check. Receiving any ip packet for which there is no existing socket will crash if ipfw has a uid or gid test rule, as the uid/gid of the non existent owner of said non existent socket is tested. Brooks introduced this error as part of his >16 gids patch. It appears to be a cut-n-paste error from similar code a few lines before. The old code used the 'pcb' variable here, but in the new code that switched the 'inp' variable, which is often NULL and what is tested in the code further up. The rest of the multi-gid patch for ipfw seems solid (and cleaner than previous code). p.s. What's up with all the properties changing? It is a fresh checkout. Reviewed by: brooks Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (contents, props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw2.c Fri Aug 14 10:09:45 2009 (r196201) +++ stable/8/sys/netinet/ipfw/ip_fw2.c Fri Aug 14 10:25:14 2009 (r196202) @@ -2057,7 +2057,7 @@ check_uidgid(ipfw_insn_u32 *insn, int pr dst_ip, htons(dst_port), wildcard, NULL); if (pcb != NULL) { - *uc = crhold(inp->inp_cred); + *uc = crhold(pcb->inp_cred); *ugid_lookupp = 1; } INP_INFO_RUNLOCK(pi); From kib at FreeBSD.org Fri Aug 14 10:57:29 2009 From: kib at FreeBSD.org (Konstantin Belousov) Date: Fri Aug 14 10:57:35 2009 Subject: svn commit: r196203 - head/sys/kern Message-ID: <200908141057.n7EAvS1P029582@svn.freebsd.org> Author: kib Date: Fri Aug 14 10:57:28 2009 New Revision: 196203 URL: http://svn.freebsd.org/changeset/base/196203 Log: Correctly handle unlock for !MAKEENTRY case, after successfull attempt of lock upgrade cache shall be unlocked from write. Reported by: Lucius Windschuh Reviewed by: kan Approved by: re (rwatson) Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Fri Aug 14 10:25:14 2009 (r196202) +++ head/sys/kern/vfs_cache.c Fri Aug 14 10:57:28 2009 (r196203) @@ -416,7 +416,8 @@ retry_wlocked: if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT) cache_zap(dvp->v_cache_dd); dvp->v_cache_dd = NULL; - goto unlock; + CACHE_WUNLOCK(); + return (0); } if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT) *vpp = dvp->v_cache_dd->nc_vp; From kib at FreeBSD.org Fri Aug 14 10:57:57 2009 From: kib at FreeBSD.org (Konstantin Belousov) Date: Fri Aug 14 10:58:08 2009 Subject: svn commit: r196204 - head/sys/sys Message-ID: <200908141057.n7EAvveO029626@svn.freebsd.org> Author: kib Date: Fri Aug 14 10:57:57 2009 New Revision: 196204 URL: http://svn.freebsd.org/changeset/base/196204 Log: Add the address of the lock to the KTR_LOCK trace. Tested by: pho Approved by: re (rwatson) Modified: head/sys/sys/lock.h Modified: head/sys/sys/lock.h ============================================================================== --- head/sys/sys/lock.h Fri Aug 14 10:57:28 2009 (r196203) +++ head/sys/sys/lock.h Fri Aug 14 10:57:57 2009 (r196204) @@ -155,16 +155,16 @@ struct lock_class { #define LOCK_LOG_LOCK(opname, lo, flags, recurse, file, line) do { \ if (LOCK_LOG_TEST((lo), (flags))) \ - CTR5(KTR_LOCK, opname " (%s) %s r = %d at %s:%d", \ + CTR6(KTR_LOCK, opname " (%s) %s %p r = %d at %s:%d", \ LOCK_CLASS(lo)->lc_name, (lo)->lo_name, \ - (u_int)(recurse), (file), (line)); \ + (lo), (u_int)(recurse), (file), (line)); \ } while (0) #define LOCK_LOG_TRY(opname, lo, flags, result, file, line) do { \ if (LOCK_LOG_TEST((lo), (flags))) \ - CTR5(KTR_LOCK, "TRY_" opname " (%s) %s result=%d at %s:%d",\ + CTR6(KTR_LOCK, "TRY_" opname " (%s) %s %p result=%d at %s:%d",\ LOCK_CLASS(lo)->lc_name, (lo)->lo_name, \ - (u_int)(result), (file), (line)); \ + (lo), (u_int)(result), (file), (line)); \ } while (0) #define LOCK_LOG_INIT(lo, flags) do { \ From kib at FreeBSD.org Fri Aug 14 10:59:18 2009 From: kib at FreeBSD.org (Konstantin Belousov) Date: Fri Aug 14 10:59:24 2009 Subject: svn commit: r196205 - head/sys/nfsclient Message-ID: <200908141059.n7EAxHUF032021@svn.freebsd.org> Author: kib Date: Fri Aug 14 10:59:17 2009 New Revision: 196205 URL: http://svn.freebsd.org/changeset/base/196205 Log: In nfs_upgrade_vnlock(), assert that the vnode is locked. It is for all pathes, as far as I see and testing seems to confirm it. Comparision of old_lock with LK_SHARED make sense only if vnode is locked by current thread. When downgrading, pass LK_RETRY to the vn_lock(), since otherwise vn_lock() unlocks the doomed vnode, causing extra unlock. Reported and tested by: pho Approved by: re (rwatson) MFC after: 3 weeks Modified: head/sys/nfsclient/nfs_subs.c Modified: head/sys/nfsclient/nfs_subs.c ============================================================================== --- head/sys/nfsclient/nfs_subs.c Fri Aug 14 10:57:57 2009 (r196204) +++ head/sys/nfsclient/nfs_subs.c Fri Aug 14 10:59:17 2009 (r196205) @@ -409,28 +409,25 @@ int nfs_upgrade_vnlock(struct vnode *vp) { int old_lock; - - if ((old_lock = VOP_ISLOCKED(vp)) != LK_EXCLUSIVE) { - if (old_lock == LK_SHARED) { - /* Upgrade to exclusive lock, this might block */ - vn_lock(vp, LK_UPGRADE | LK_RETRY); - } else { - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - } + + ASSERT_VOP_LOCKED(vp, "nfs_upgrade_vnlock"); + old_lock = VOP_ISLOCKED(vp); + if (old_lock != LK_EXCLUSIVE) { + KASSERT(old_lock == LK_SHARED, + ("nfs_upgrade_vnlock: wrong old_lock %d", old_lock)); + /* Upgrade to exclusive lock, this might block */ + vn_lock(vp, LK_UPGRADE | LK_RETRY); } - return old_lock; + return (old_lock); } void nfs_downgrade_vnlock(struct vnode *vp, int old_lock) { if (old_lock != LK_EXCLUSIVE) { - if (old_lock == LK_SHARED) { - /* Downgrade from exclusive lock, this might block */ - vn_lock(vp, LK_DOWNGRADE); - } else { - VOP_UNLOCK(vp, 0); - } + KASSERT(old_lock == LK_SHARED, ("wrong old_lock %d", old_lock)); + /* Downgrade from exclusive lock. */ + vn_lock(vp, LK_DOWNGRADE | LK_RETRY); } } From kib at FreeBSD.org Fri Aug 14 11:00:38 2009 From: kib at FreeBSD.org (Konstantin Belousov) Date: Fri Aug 14 11:00:50 2009 Subject: svn commit: r196206 - head/sys/ufs/ffs Message-ID: <200908141100.n7EB0cnM032109@svn.freebsd.org> Author: kib Date: Fri Aug 14 11:00:38 2009 New Revision: 196206 URL: http://svn.freebsd.org/changeset/base/196206 Log: When a UFS node is truncated to the zero length, e.g. by explicit truncate(2) call, or by being removed or truncated on open, either new softupdate freeblks structure is allocated to track the freed blocks of the node, or truncation is done syncronously when too many SU dependencies are accumulated. The decision does not take into account the allocated freeblks dependencies, allowing workloads that do huge amount of truncations to exhaust the kernel memory. Take the number of allocated freeblks into consideration for softdep_slowdown(). Reported by: pluknet gmail com Diagnosed and tested by: pho Approved by: re (rwatson) MFC after: 1 month Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Fri Aug 14 10:59:17 2009 (r196205) +++ head/sys/ufs/ffs/ffs_softdep.c Fri Aug 14 11:00:38 2009 (r196206) @@ -663,6 +663,8 @@ static int req_clear_inodedeps; /* synce static int req_clear_remove; /* syncer process flush some freeblks */ #define FLUSH_REMOVE 2 #define FLUSH_REMOVE_WAIT 3 +static long num_freeblkdep; /* number of freeblks workitems allocated */ + /* * runtime statistics */ @@ -2223,6 +2225,9 @@ softdep_setup_freeblocks(ip, length, fla freeblks->fb_uid = ip->i_uid; freeblks->fb_previousinum = ip->i_number; freeblks->fb_devvp = ip->i_devvp; + ACQUIRE_LOCK(&lk); + num_freeblkdep++; + FREE_LOCK(&lk); extblocks = 0; if (fs->fs_magic == FS_UFS2_MAGIC) extblocks = btodb(fragroundup(fs, ip->i_din2->di_extsize)); @@ -2815,6 +2820,7 @@ handle_workitem_freeblocks(freeblks, fla ACQUIRE_LOCK(&lk); WORKITEM_FREE(freeblks, D_FREEBLKS); + num_freeblkdep--; FREE_LOCK(&lk); } @@ -5768,7 +5774,8 @@ softdep_slowdown(vp) max_softdeps_hard = max_softdeps * 11 / 10; if (num_dirrem < max_softdeps_hard / 2 && num_inodedep < max_softdeps_hard && - VFSTOUFS(vp->v_mount)->um_numindirdeps < maxindirdeps) { + VFSTOUFS(vp->v_mount)->um_numindirdeps < maxindirdeps && + num_freeblkdep < max_softdeps_hard) { FREE_LOCK(&lk); return (0); } From kib at FreeBSD.org Fri Aug 14 11:06:58 2009 From: kib at FreeBSD.org (Konstantin Belousov) Date: Fri Aug 14 11:07:20 2009 Subject: svn commit: r196207 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908141106.n7EB6wCv032264@svn.freebsd.org> Author: kib Date: Fri Aug 14 11:06:58 2009 New Revision: 196207 URL: http://svn.freebsd.org/changeset/base/196207 Log: MFC r196203: Correctly handle unlock for !MAKEENTRY case. Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/vfs_cache.c stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/kern/vfs_cache.c ============================================================================== --- stable/8/sys/kern/vfs_cache.c Fri Aug 14 11:00:38 2009 (r196206) +++ stable/8/sys/kern/vfs_cache.c Fri Aug 14 11:06:58 2009 (r196207) @@ -416,7 +416,8 @@ retry_wlocked: if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT) cache_zap(dvp->v_cache_dd); dvp->v_cache_dd = NULL; - goto unlock; + CACHE_WUNLOCK(); + return (0); } if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT) *vpp = dvp->v_cache_dd->nc_vp; From kib at FreeBSD.org Fri Aug 14 11:13:06 2009 From: kib at FreeBSD.org (Konstantin Belousov) Date: Fri Aug 14 11:13:23 2009 Subject: svn commit: r196208 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908141113.n7EBD61g032434@svn.freebsd.org> Author: kib Date: Fri Aug 14 11:13:06 2009 New Revision: 196208 URL: http://svn.freebsd.org/changeset/base/196208 Log: MFC r196204: Add the address of the lock to the KTR_LOCK trace. Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/sys/lock.h stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/sys/lock.h ============================================================================== --- stable/8/sys/sys/lock.h Fri Aug 14 11:06:58 2009 (r196207) +++ stable/8/sys/sys/lock.h Fri Aug 14 11:13:06 2009 (r196208) @@ -155,16 +155,16 @@ struct lock_class { #define LOCK_LOG_LOCK(opname, lo, flags, recurse, file, line) do { \ if (LOCK_LOG_TEST((lo), (flags))) \ - CTR5(KTR_LOCK, opname " (%s) %s r = %d at %s:%d", \ + CTR6(KTR_LOCK, opname " (%s) %s %p r = %d at %s:%d", \ LOCK_CLASS(lo)->lc_name, (lo)->lo_name, \ - (u_int)(recurse), (file), (line)); \ + (lo), (u_int)(recurse), (file), (line)); \ } while (0) #define LOCK_LOG_TRY(opname, lo, flags, result, file, line) do { \ if (LOCK_LOG_TEST((lo), (flags))) \ - CTR5(KTR_LOCK, "TRY_" opname " (%s) %s result=%d at %s:%d",\ + CTR6(KTR_LOCK, "TRY_" opname " (%s) %s %p result=%d at %s:%d",\ LOCK_CLASS(lo)->lc_name, (lo)->lo_name, \ - (u_int)(result), (file), (line)); \ + (lo), (u_int)(result), (file), (line)); \ } while (0) #define LOCK_LOG_INIT(lo, flags) do { \ From kib at FreeBSD.org Fri Aug 14 11:17:35 2009 From: kib at FreeBSD.org (Konstantin Belousov) Date: Fri Aug 14 11:17:52 2009 Subject: svn commit: r196209 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... Message-ID: <200908141117.n7EBHYqu032558@svn.freebsd.org> Author: kib Date: Fri Aug 14 11:17:34 2009 New Revision: 196209 URL: http://svn.freebsd.org/changeset/base/196209 Log: MFC r196205: In nfs_upgrade_vnlock(), assert that the vnode is locked. When downgrading, pass LK_RETRY to the vn_lock(), since otherwise vn_lock() unlocks the doomed vnode, causing extra unlock. Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stabl