From owner-p4-projects@FreeBSD.ORG Sun Jan 31 10:17:21 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BC684106568B; Sun, 31 Jan 2010 10:17:21 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7920D1065676 for ; Sun, 31 Jan 2010 10:17:21 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 673FF8FC12 for ; Sun, 31 Jan 2010 10:17:21 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VAHL4n032733 for ; Sun, 31 Jan 2010 10:17:21 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VAHL0A032731 for perforce@freebsd.org; Sun, 31 Jan 2010 10:17:21 GMT (envelope-from raj@freebsd.org) Date: Sun, 31 Jan 2010 10:17:21 GMT Message-Id: <201001311017.o0VAHL0A032731@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 173998 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 10:17:22 -0000 http://p4web.freebsd.org/chv.cgi?CH=173998 Change 173998 by raj@raj_fdt on 2010/01/31 10:17:04 Provide a fallback method of finding the MPP node if no entry in /aliases. Affected files ... .. //depot/projects/fdt/sys/arm/mv/mv_machdep.c#5 edit Differences ... ==== //depot/projects/fdt/sys/arm/mv/mv_machdep.c#5 (text+ko) ==== @@ -693,8 +693,15 @@ /* * Find the node the long way. - * TODO */ + if ((node = OF_finddevice("/")) == 0) + return (ENXIO); + + if ((node = fdt_find_compatible(node, "simple-bus")) == 0) + return (ENXIO); + + if ((node = fdt_find_compatible(node, "mrvl,mpp")) == 0) + return (ENXIO); moveon: /* From owner-p4-projects@FreeBSD.ORG Sun Jan 31 10:21:26 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EACFA1065676; Sun, 31 Jan 2010 10:21:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AECE2106566C for ; Sun, 31 Jan 2010 10:21:25 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9CDD18FC18 for ; Sun, 31 Jan 2010 10:21:25 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VALPjv033051 for ; Sun, 31 Jan 2010 10:21:25 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VALPE4033049 for perforce@freebsd.org; Sun, 31 Jan 2010 10:21:25 GMT (envelope-from raj@freebsd.org) Date: Sun, 31 Jan 2010 10:21:25 GMT Message-Id: <201001311021.o0VALPE4033049@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 173999 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 10:21:26 -0000 http://p4web.freebsd.org/chv.cgi?CH=173999 Change 173999 by raj@raj_fdt on 2010/01/31 10:20:48 Introduce a helper fdt_find_compatible() routine. This is used early when ofw I/F is not available yet; note this is traversal through the whole device tree (slow). Affected files ... .. //depot/projects/fdt/sys/dev/fdt/fdt_common.c#8 edit .. //depot/projects/fdt/sys/dev/fdt/fdt_common.h#4 edit Differences ... ==== //depot/projects/fdt/sys/dev/fdt/fdt_common.c#8 (text+ko) ==== @@ -97,6 +97,20 @@ return (rv); } +phandle_t +fdt_find_compatible(phandle_t start, const char *compat) +{ + phandle_t child; + + /* + * Traverse all children of 'start' node, and find first with + * matching 'compatible' property. + */ + for (child = OF_child(start); child != 0; child = OF_peer(child)) + if (fdt_is_compatible(child, compat)) + return (child); + return (0); +} int fdt_is_enabled(phandle_t node) ==== //depot/projects/fdt/sys/dev/fdt/fdt_common.h#4 (text+ko) ==== @@ -53,5 +53,6 @@ int fdt_data_to_res(pcell_t *, int, int, u_long *, u_long *); int fdt_is_compatible(phandle_t, const char *); int fdt_is_enabled(phandle_t); +phandle_t fdt_find_compatible(phandle_t start, const char *compat); #endif /* FDT_COMMON_H */ From owner-p4-projects@FreeBSD.ORG Sun Jan 31 10:26:31 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2CC1210656C5; Sun, 31 Jan 2010 10:26:31 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E52C710656C3 for ; Sun, 31 Jan 2010 10:26:30 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D1C648FC14 for ; Sun, 31 Jan 2010 10:26:30 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VAQUeE033414 for ; Sun, 31 Jan 2010 10:26:30 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VAQUA1033412 for perforce@freebsd.org; Sun, 31 Jan 2010 10:26:30 GMT (envelope-from raj@freebsd.org) Date: Sun, 31 Jan 2010 10:26:30 GMT Message-Id: <201001311026.o0VAQUA1033412@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174000 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 10:26:31 -0000 http://p4web.freebsd.org/chv.cgi?CH=174000 Change 174000 by raj@raj_fdt on 2010/01/31 10:26:23 Marvell SOC: integrate decode windows configuration layer with FDT-oriented approach. - Read out all necessary addressing data from the blob instead of using #define'd values. - Overall improve validating sub-routines to return error codes in a more natural way. Affected files ... .. //depot/projects/fdt/sys/arm/mv/common.c#2 edit .. //depot/projects/fdt/sys/arm/mv/kirkwood/kirkwood.c#2 edit .. //depot/projects/fdt/sys/arm/mv/mvvar.h#3 edit Differences ... ==== //depot/projects/fdt/sys/arm/mv/common.c#2 (text+ko) ==== @@ -37,12 +37,29 @@ #include #include +#include + #include #include #include #include +#include "../../contrib/dtc/libfdt/libfdt_env.h" +#include "../../../sys/dev/fdt/fdt_common.h" + +#define MAX_CPU_WIN 5 + +#define DEBUG +#undef DEBUG + +#ifdef DEBUG +#define debugf(fmt, args...) do { printf("%s(): ", __func__); \ + printf(fmt,##args); } while (0) +#else +#define debugf(fmt, args...) +#endif + static int win_eth_can_remap(int i); static int decode_win_cpu_valid(void); @@ -54,15 +71,42 @@ static void decode_win_cpu_setup(void); static void decode_win_usb_setup(void); -static void decode_win_eth_setup(uint32_t base); -static void decode_win_pcie_setup(uint32_t base); +static void decode_win_eth_setup(uint32_t); +static void decode_win_pcie_setup(uint32_t); static void decode_win_sata_setup(void); static void decode_win_cesa_setup(void); static void decode_win_cesa_dump(void); static void decode_win_usb_dump(void); +static int fdt_get_ranges(const char *, void *, int, int *, int *); +static int fdt_get_regsize(phandle_t, u_long *, u_long *); + +static int win_cpu_from_dt(void); +static int win_soc_from_dt(void); + static uint32_t used_cpu_wins; +static int cpu_wins_no = 0; + +static struct decode_win cpu_win_tbl[MAX_CPU_WIN]; + +u_long cesa_base = 0; +u_long usb0_base = 0; +u_long eth0_base = 0; + +static const struct decode_win *cpu_wins = cpu_win_tbl; + +struct soc_node_spec { + const char *compat; + u_long *base; +}; + +static struct soc_node_spec soc_nodes[] = { + { "mrvl,cesa", &cesa_base }, + { "mrvl,ge", ð0_base }, + { "mrvl,usb-ehci", &usb0_base }, + { NULL, NULL }, +}; static __inline int pm_is_disabled(uint32_t mask) @@ -285,7 +329,7 @@ soc_decode_win(void) { uint32_t dev, rev; - int mask; + int mask, err; mask = 0; TUNABLE_INT_FETCH("hw.pm-disable-mask", &mask); @@ -293,14 +337,21 @@ if (mask != 0) pm_disable_device(mask); + /* Retrieve data about physical addresses from device tree. */ + if ((err = win_cpu_from_dt()) != 0) + return (err); + + if ((err = win_soc_from_dt()) != 0) + return (err); + /* Retrieve our ID: some windows facilities vary between SoC models */ soc_id(&dev, &rev); - if (decode_win_cpu_valid() != 1 || decode_win_usb_valid() != 1 || - decode_win_eth_valid() != 1 || decode_win_idma_valid() != 1 || - decode_win_pcie_valid() != 1 || decode_win_sata_valid() != 1 || - decode_win_cesa_valid() != 1) - return(-1); + if (!decode_win_cpu_valid() || !decode_win_usb_valid() || + !decode_win_eth_valid() || !decode_win_idma_valid() || + !decode_win_pcie_valid() || !decode_win_sata_valid() || + !decode_win_cesa_valid()) + return (EINVAL); decode_win_cpu_setup(); decode_win_usb_setup(); @@ -332,6 +383,19 @@ return (0); } +/* + * XXX Redefine macros. This is needed to avoid destroying compatibility with + * macros to be removed in the future (but currently used elsewhere). This + * will not be neccessary when fdtbus will be functioning. + */ +#undef MV_USB0_BASE +#undef MV_CESA_BASE +#undef MV_ETH0_BASE + +#define MV_USB0_BASE (MV_BASE + usb0_base) +#define MV_CESA_BASE (MV_BASE + cesa_base) +#define MV_ETH0_BASE (MV_BASE + eth0_base) + /************************************************************************** * Decode windows registers accessors **************************************************************************/ @@ -509,7 +573,7 @@ if (cpu_wins_no > MV_WIN_CPU_MAX) { printf("CPU windows: too many entries: %d\n", cpu_wins_no); - return (-1); + return (0); } rv = 1; @@ -562,7 +626,7 @@ int win; if (used_cpu_wins >= MV_WIN_CPU_MAX) - return (-1); + return (0); win = used_cpu_wins++; @@ -1070,7 +1134,7 @@ if (idma_wins_no > MV_WIN_IDMA_MAX) { printf("IDMA windows: too many entries: %d\n", idma_wins_no); - return (-1); + return (0); } for (i = 0, c = 0; i < MV_WIN_DDR_MAX; i++) if (ddr_is_active(i)) @@ -1079,7 +1143,7 @@ if (idma_wins_no > (MV_WIN_IDMA_MAX - c)) { printf("IDMA windows: too many entries: %d, available: %d\n", idma_wins_no, MV_WIN_IDMA_MAX - c); - return (-1); + return (0); } wintab = idma_wins; @@ -1353,7 +1417,7 @@ if (xor_wins_no > MV_WIN_XOR_MAX) { printf("XOR windows: too many entries: %d\n", xor_wins_no); - return (-1); + return (0); } for (i = 0, c = 0; i < MV_WIN_DDR_MAX; i++) if (ddr_is_active(i)) @@ -1362,7 +1426,7 @@ if (xor_wins_no > (MV_WIN_XOR_MAX - c)) { printf("XOR windows: too many entries: %d, available: %d\n", xor_wins_no, MV_WIN_IDMA_MAX - c); - return (-1); + return (0); } wintab = xor_wins; @@ -1585,3 +1649,165 @@ return (decode_win_can_cover_ddr(MV_WIN_SATA_MAX)); } + +/************************************************************************** + * FDT parsing routines. + **************************************************************************/ + +static int +fdt_get_ranges(const char *nodename, void *buf, int size, int *tuples, + int *tuplesize) +{ + phandle_t node; + pcell_t addr_cells, par_addr_cells, size_cells; + int len, tuple_size, tuples_count; + + node = OF_finddevice(nodename); + if (node <= 0) + return (EINVAL); + + if ((fdt_addrsize_cells(node, &addr_cells, &size_cells)) != 0) + return (ENXIO); + + par_addr_cells = fdt_parent_addr_cells(node); + if (par_addr_cells > 2) + return (ERANGE); + + tuple_size = sizeof(pcell_t) * (addr_cells + par_addr_cells + + size_cells); + + /* Note the OF_getprop_alloc() cannot be used at this early stage. */ + len = OF_getprop(node, "ranges", buf, size); + + /* + * XXX this does not handle the empty 'ranges;' case, which is + * legitimate and should be allowed. + */ + tuples_count = len / tuple_size; + if (tuples_count <= 0) + return (ERANGE); + + if (fdt_ranges_verify(buf, tuples_count, par_addr_cells, + addr_cells, size_cells) != 0) + return (ERANGE); + + *tuples = tuples_count; + *tuplesize = tuple_size; + return (0); +} + +static int +fdt_get_regsize(phandle_t node, u_long *base, u_long *size) +{ + pcell_t reg[4]; + int addr_cells, len, size_cells; + + if (fdt_addrsize_cells(OF_parent(node), &addr_cells, &size_cells)) + return (ENXIO); + + if ((sizeof(pcell_t) * (addr_cells + size_cells)) > sizeof(reg)) + return (ENOMEM); + + len = OF_getprop(node, "reg", ®, sizeof(reg)); + if (len <= 0) + return (EINVAL); + + *base = fdt_data_get(®[0], addr_cells); + *size = fdt_data_get(®[addr_cells], size_cells); + return (0); +} + +static int +win_soc_from_dt(void) +{ + phandle_t node, child; + struct soc_node_spec *soc_node; + u_long size; + int err, i; + + node = OF_finddevice("/"); + if (node == 0) + panic("win_soc_from_dt: no root node"); + + node = fdt_find_compatible(node, "simple-bus"); + if (node == 0) + return (ENXIO); + + /* + * Traverse through all children of simple-bus node, and retrieve + * decode windows data for devices (if applicable). + */ + for (child = OF_child(node); child != 0; child = OF_peer(child)) + for (i = 0; soc_nodes[i].compat != NULL; i++) { + + soc_node = &soc_nodes[i]; + + if (!fdt_is_compatible(child, soc_node->compat)) + continue; + if (soc_node->base == NULL) + continue; + + err = fdt_get_regsize(child, soc_node->base, &size); + if (err != 0) + return (err); + } + + return (0); +} + +static int +win_cpu_from_dt(void) +{ + pcell_t ranges[48]; + u_long sram_base, sram_size; + phandle_t node; + int i, entry_size, err, t, tuple_size, tuples; + + /* Retrieve 'ranges' property of '/localbus' node. */ + if ((err = fdt_get_ranges("/localbus", ranges, sizeof(ranges), + &tuples, &tuple_size)) != 0) + return (err); + + /* + * Fill CPU decode windows table. + */ + bzero((void *)&cpu_win_tbl, sizeof(cpu_win_tbl)); + + entry_size = tuple_size / sizeof(pcell_t); + cpu_wins_no = tuples; + + for (i = 0, t = 0; t < tuples; i += entry_size, t++) { + cpu_win_tbl[t].target = 1; + cpu_win_tbl[t].attr = fdt32_to_cpu(ranges[i + 1]); + cpu_win_tbl[t].base = fdt32_to_cpu(ranges[i + 2]); + cpu_win_tbl[t].size = fdt32_to_cpu(ranges[i + 3]); + cpu_win_tbl[t].remap = -1; + debugf("target = 0x%0x attr = 0x%0x base = 0x%0x " + "size = 0x%0x remap = %d\n", cpu_win_tbl[t].target, + cpu_win_tbl[t].attr, cpu_win_tbl[t].base, + cpu_win_tbl[t].size, cpu_win_tbl[t].remap); + } + + /* + * Retrieve CESA SRAM data. + */ + if ((node = OF_finddevice("/sram")) == 0) + /* SRAM block is not always present. */ + return (0); + + sram_base = sram_size = 0; + if (fdt_get_regsize(node, &sram_base, &sram_size) != 0) + return (EINVAL); + + /* + * XXX Need to handle different CESA SRAM target ID accross SOCs. + */ + cpu_win_tbl[++t].target = 4; + cpu_win_tbl[t].attr = 0; + cpu_win_tbl[t].base = sram_base; + cpu_win_tbl[t].size = sram_size; + cpu_win_tbl[t].remap = -1; + debugf("/sram: base = 0x%0lx size = 0x%0lx\n", sram_base, sram_size); + + return (0); +} ==== //depot/projects/fdt/sys/arm/mv/kirkwood/kirkwood.c#2 (text+ko) ==== @@ -141,26 +141,6 @@ { -1, 0 } }; -const struct decode_win cpu_win_tbl[] = { - /* Device bus BOOT */ - { 1, 0x0f, MV_DEV_BOOT_PHYS_BASE, MV_DEV_BOOT_SIZE, -1 }, - - /* Device bus CS0 */ - { 1, 0x1e, MV_DEV_CS0_PHYS_BASE, MV_DEV_CS0_SIZE, -1 }, - - /* Device bus CS1 */ - { 1, 0x1d, MV_DEV_CS1_PHYS_BASE, MV_DEV_CS1_SIZE, -1 }, - - /* Device bus CS2 */ - { 1, 0x1b, MV_DEV_CS2_PHYS_BASE, MV_DEV_CS2_SIZE, -1 }, - - /* CESA */ - { 3, 0x00, MV_CESA_SRAM_PHYS_BASE, MV_CESA_SRAM_SIZE, -1 }, - -}; -const struct decode_win *cpu_wins = cpu_win_tbl; -int cpu_wins_no = sizeof(cpu_win_tbl) / sizeof(struct decode_win); - const struct decode_win xor_win_tbl[] = { /* PCIE MEM */ { 4, 0xE8, MV_PCIE_MEM_PHYS_BASE, MV_PCIE_MEM_SIZE, -1 }, ==== //depot/projects/fdt/sys/arm/mv/mvvar.h#3 (text+ko) ==== @@ -113,10 +113,8 @@ extern const struct gpio_config mv_gpio_config[]; extern bus_space_tag_t obio_tag; extern struct obio_device obio_devices[]; -extern const struct decode_win *cpu_wins; extern const struct decode_win *idma_wins; extern const struct decode_win *xor_wins; -extern int cpu_wins_no; extern int idma_wins_no; extern int xor_wins_no; From owner-p4-projects@FreeBSD.ORG Sun Jan 31 10:30:35 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 762341065676; Sun, 31 Jan 2010 10:30:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 224C51065670 for ; Sun, 31 Jan 2010 10:30:35 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 104228FC08 for ; Sun, 31 Jan 2010 10:30:35 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VAUYZ5033806 for ; Sun, 31 Jan 2010 10:30:34 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VAUYDV033804 for perforce@freebsd.org; Sun, 31 Jan 2010 10:30:34 GMT (envelope-from raj@freebsd.org) Date: Sun, 31 Jan 2010 10:30:34 GMT Message-Id: <201001311030.o0VAUYDV033804@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174001 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 10:30:35 -0000 http://p4web.freebsd.org/chv.cgi?CH=174001 Change 174001 by raj@raj_fdt on 2010/01/31 10:29:49 Adjust DB-88F6281 DTS. - Make CPU decode windows data aligned with reality. - Simplify 'interrupts' specifier to include just IRQ number. Level/sense attributes are hard coded in the PIC and cannot be adjusted by the user, so there's no sense for it in the DTS. Affected files ... .. //depot/projects/fdt/sys/boot/fdt/dts/db88f6281.dts#2 edit Differences ... ==== //depot/projects/fdt/sys/boot/fdt/dts/db88f6281.dts#2 (text+ko) ==== @@ -1,7 +1,7 @@ /* * Marvell Kirkwood DB-88F6281 Device Tree Source. * - * Copyright (c) 2009 The FreeBSD Foundation + * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * * This software was developed by Semihalf under sponsorship from @@ -72,10 +72,10 @@ compatible = "mrvl,lbc"; /* This reflects CPU decode windows setup. */ - ranges = <0x0 0x0f 0xbef00000 0x00100000 - 0x1 0x1e 0xbee00000 0x00100000 - 0x2 0x1d 0xbc000000 0x02000000 - 0x3 0x1b 0xbed00000 0x00100000>; + ranges = <0x0 0x0f 0xf9300000 0x00100000 + 0x1 0x1e 0xfa000000 0x00100000 + 0x2 0x1d 0xfa100000 0x02000000 + 0x3 0x1b 0xfc100000 0x00000400>; nor@0,0 { #address-cells = <1>; @@ -149,11 +149,11 @@ }; GPIO: gpio@10100 { - #gpio-cells = <2>; + #gpio-cells = <3>; compatible = "mrvl,gpio"; reg = <0x10100 0x20>; gpio-controller; - interrupts = <6 2 7 2 8 2 9 2>; + interrupts = <6 7 8 9>; interrupt-parent = <&PIC>; }; @@ -167,7 +167,7 @@ #size-cells = <0>; compatible = "mrvl,twsi"; reg = <0x11000 0x20>; - interrupts = <43 2>; + interrupts = <43>; interrupt-parent = <&PIC>; }; @@ -180,7 +180,7 @@ reg = <0x72000 0x2000>; ranges = <0x0 0x72000 0x2000>; local-mac-address = [ 00 00 00 00 00 00 ]; - interrupts = <11 2 12 2 13 2 14 2>; + interrupts = <12 13 14 11 46>; interrupt-parent = <&PIC>; }; @@ -189,7 +189,7 @@ compatible = "ns16550"; reg = <0x12000 0x20>; clock-frequency = <0>; - interrupts = <33 2>; + interrupts = <33>; interrupt-parent = <&PIC>; }; @@ -198,14 +198,14 @@ compatible = "ns16550"; reg = <0x12100 0x20>; clock-frequency = <0>; - interrupts = <34 2>; + interrupts = <34>; interrupt-parent = <&PIC>; }; timer@20300 { compatible = "mrvl,timer"; reg = <0x20300 0x30>; - interrupts = <1 2>; + interrupts = <1>; interrupt-parent = <&PIC>; mrvl,has-wdt; }; @@ -213,14 +213,14 @@ crypto@30000 { compatible = "mrvl,cesa"; reg = <0x30000 0x10000>; - interrupts = <22 2>; + interrupts = <22>; interrupt-parent = <&PIC>; }; PIC: pic@20200 { interrupt-controller; #address-cells = <0>; - #interrupt-cells = <2>; + #interrupt-cells = <1>; reg = <0x20200 0x3c>; compatible = "mrvl,pic"; }; @@ -228,20 +228,27 @@ usb@50000 { compatible = "mrvl,usb-ehci", "usb-ehci"; reg = <0x50000 0x1000>; - interrupts = <19 2>; + interrupts = <48 19>; interrupt-parent = <&PIC>; }; xor@60000 { compatible = "mrvl,xor"; reg = <0x60000 0x1000>; - interrupts = <5 2 6 2 7 2 8 2>; + interrupts = <5 6 7 8>; + interrupt-parent = <&PIC>; + }; + + sata@80000 { + compatible = "mrvl,sata"; + reg = <0x80000 0x6000>; + interrupts = <21>; interrupt-parent = <&PIC>; }; }; - sram@f1100000 { + sram@fd000000 { compatible = "mrvl,cesa-sram"; - reg = <0x0 0x00100000>; + reg = <0xfd000000 0x00100000>; }; }; From owner-p4-projects@FreeBSD.ORG Sun Jan 31 10:32:37 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A0DEE106568B; Sun, 31 Jan 2010 10:32:37 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 657F3106566C for ; Sun, 31 Jan 2010 10:32:37 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 39D628FC0A for ; Sun, 31 Jan 2010 10:32:37 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VAWbg8033958 for ; Sun, 31 Jan 2010 10:32:37 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VAWbeK033956 for perforce@freebsd.org; Sun, 31 Jan 2010 10:32:37 GMT (envelope-from raj@freebsd.org) Date: Sun, 31 Jan 2010 10:32:37 GMT Message-Id: <201001311032.o0VAWbeK033956@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174002 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 10:32:37 -0000 http://p4web.freebsd.org/chv.cgi?CH=174002 Change 174002 by raj@raj_fdt on 2010/01/31 10:32:29 Fix handling interrupts in FDT/simplebus environment. We are now fully set to run ARM drivers using IRQ resources. Affected files ... .. //depot/projects/fdt/sys/dev/fdt/fdt_arm.c#2 edit .. //depot/projects/fdt/sys/dev/fdt/fdtbus.c#4 edit .. //depot/projects/fdt/sys/dev/fdt/simplebus.c#5 edit Differences ... ==== //depot/projects/fdt/sys/dev/fdt/fdt_arm.c#2 (text+ko) ==== @@ -56,32 +56,8 @@ return (ENXIO); *interrupt = fdt32_to_cpu(intr[0]); - - switch (fdt32_to_cpu(intr[1])) { - case 0: - /* L to H edge */ - *trig = INTR_TRIGGER_EDGE; - *pol = INTR_POLARITY_HIGH; - break; - case 1: - /* Active L level */ - *trig = INTR_TRIGGER_LEVEL; - *pol = INTR_POLARITY_LOW; - break; - case 2: - /* Active H level */ - *trig = INTR_TRIGGER_LEVEL; - *pol = INTR_POLARITY_HIGH; - break; - case 3: - /* H to L edge */ - *trig = INTR_TRIGGER_EDGE; - *pol = INTR_POLARITY_LOW; - break; - default: - *trig = INTR_TRIGGER_CONFORM; - *pol = INTR_POLARITY_CONFORM; - } + *trig = INTR_TRIGGER_CONFORM; + *pol = INTR_POLARITY_CONFORM; return (0); } ==== //depot/projects/fdt/sys/dev/fdt/fdtbus.c#4 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 The FreeBSD Foundation + * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * * This software was developed by Semihalf under sponsorship from @@ -435,7 +435,10 @@ err = powerpc_setup_intr(device_get_nameunit(child), rman_get_start(res), filter, ihand, arg, flags, cookiep); #elif defined(__arm__) - /* TODO */ + arm_setup_irqhandler(device_get_nameunit(child), + filter, ihand, arg, rman_get_start(res), flags, cookiep); + arm_unmask_irq(rman_get_start(res)); + err = 0; #endif return (err); ==== //depot/projects/fdt/sys/dev/fdt/simplebus.c#5 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 The FreeBSD Foundation + * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * * This software was developed by Semihalf under sponsorship from @@ -368,7 +368,7 @@ struct simplebus_devinfo *di; enum intr_trigger trig; enum intr_polarity pol; - int irq, rid, err; + int irq, rid; if (res == NULL) panic("simplebus_setup_intr: NULL irq resource!"); @@ -392,14 +392,12 @@ debugf("intr config: irq = %d, trig = %d, pol = %d\n", irq, trig, pol); #if defined(__powerpc__) + int err; + err = powerpc_config_intr(irq, trig, pol); -#elif defined(__arm__) - arm_setup_irqhandler(device_get_nameunit(child), filter, ihand, arg, - irq, flags, cookiep); - return (0); -#endif if (err) return (err); +#endif return (bus_generic_setup_intr(bus, child, res, flags, filter, ihand, arg, cookiep)); From owner-p4-projects@FreeBSD.ORG Sun Jan 31 10:36:41 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C36551065694; Sun, 31 Jan 2010 10:36:41 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C7A31065692 for ; Sun, 31 Jan 2010 10:36:41 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6A91C8FC14 for ; Sun, 31 Jan 2010 10:36:41 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VAafPO034320 for ; Sun, 31 Jan 2010 10:36:41 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VAaf16034318 for perforce@freebsd.org; Sun, 31 Jan 2010 10:36:41 GMT (envelope-from raj@freebsd.org) Date: Sun, 31 Jan 2010 10:36:41 GMT Message-Id: <201001311036.o0VAaf16034318@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174003 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 10:36:42 -0000 http://p4web.freebsd.org/chv.cgi?CH=174003 Change 174003 by raj@raj_fdt on 2010/01/31 10:36:20 Remove stale obio entries (items already converted to FDT). Affected files ... .. //depot/projects/fdt/sys/arm/mv/kirkwood/kirkwood.c#3 edit Differences ... ==== //depot/projects/fdt/sys/arm/mv/kirkwood/kirkwood.c#3 (text+ko) ==== @@ -53,11 +53,6 @@ { -1 }, CPU_PM_CTRL_NONE }, - { "rtc", MV_RTC_BASE, MV_RTC_SIZE, - { -1 }, - { -1 }, - CPU_PM_CTRL_NONE - }, { "gpio", MV_GPIO_BASE, MV_GPIO_SIZE, { MV_INT_GPIO7_0, MV_INT_GPIO15_8, MV_INT_GPIO23_16, MV_INT_GPIO31_24, @@ -95,10 +90,6 @@ { -1 }, CPU_PM_CTRL_GE0 }, - { "twsi", MV_TWSI0_BASE, MV_TWSI_SIZE, - { -1 }, { -1 }, - CPU_PM_CTRL_NONE - }, { "sata", MV_SATAHC_BASE, MV_SATAHC_SIZE, { MV_INT_SATA, -1 }, { -1 }, From owner-p4-projects@FreeBSD.ORG Sun Jan 31 10:38:44 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E1B231065679; Sun, 31 Jan 2010 10:38:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6531106566B for ; Sun, 31 Jan 2010 10:38:43 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 941BD8FC13 for ; Sun, 31 Jan 2010 10:38:43 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VAchWB034458 for ; Sun, 31 Jan 2010 10:38:43 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VAchNr034456 for perforce@freebsd.org; Sun, 31 Jan 2010 10:38:43 GMT (envelope-from raj@freebsd.org) Date: Sun, 31 Jan 2010 10:38:43 GMT Message-Id: <201001311038.o0VAchNr034456@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174004 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 10:38:44 -0000 http://p4web.freebsd.org/chv.cgi?CH=174004 Change 174004 by raj@raj_fdt on 2010/01/31 10:38:23 Convert mge(4) to FDT/simplebus convention. This is the very first ARM driver using IRQ resources within FTD/simplebus environment. Affected files ... .. //depot/projects/fdt/sys/arm/mv/kirkwood/kirkwood.c#4 edit .. //depot/projects/fdt/sys/dev/mge/if_mge.c#4 edit Differences ... ==== //depot/projects/fdt/sys/arm/mv/kirkwood/kirkwood.c#4 (text+ko) ==== @@ -84,12 +84,6 @@ { -1 }, CPU_PM_CTRL_USB0 }, - { "mge", MV_ETH0_BASE, MV_ETH_SIZE, - { MV_INT_GBERX, MV_INT_GBETX, MV_INT_GBEMISC, - MV_INT_GBESUM, MV_INT_GBEERR, -1 }, - { -1 }, - CPU_PM_CTRL_GE0 - }, { "sata", MV_SATAHC_BASE, MV_SATAHC_SIZE, { MV_INT_SATA, -1 }, { -1 }, ==== //depot/projects/fdt/sys/dev/mge/if_mge.c#4 (text+ko) ==== @@ -68,6 +68,8 @@ #include #include +#include +#include #ifndef MII_ADDR_BASE #define MII_ADDR_BASE 8 @@ -164,7 +166,7 @@ static devclass_t mge_devclass; -DRIVER_MODULE(mge, mbus, mge_driver, mge_devclass, 0, 0); +DRIVER_MODULE(mge, simplebus, mge_driver, mge_devclass, 0, 0); DRIVER_MODULE(miibus, mge, miibus_driver, miibus_devclass, 0, 0); MODULE_DEPEND(mge, ether, 1, 1, 1); MODULE_DEPEND(mge, miibus, 1, 1, 1); @@ -1320,6 +1322,9 @@ mge_probe(device_t dev) { + if (!ofw_bus_is_compatible(dev, "mrvl,ge")) + return (ENXIO); + device_set_desc(dev, "Marvell Gigabit Ethernet controller"); return (BUS_PROBE_DEFAULT); } From owner-p4-projects@FreeBSD.ORG Sun Jan 31 10:41:47 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1AE3B1065670; Sun, 31 Jan 2010 10:41:47 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D364C106566B for ; Sun, 31 Jan 2010 10:41:46 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C16CB8FC0A for ; Sun, 31 Jan 2010 10:41:46 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VAfk6p034744 for ; Sun, 31 Jan 2010 10:41:46 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VAfktM034742 for perforce@freebsd.org; Sun, 31 Jan 2010 10:41:46 GMT (envelope-from raj@freebsd.org) Date: Sun, 31 Jan 2010 10:41:46 GMT Message-Id: <201001311041.o0VAfktM034742@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174005 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 10:41:47 -0000 http://p4web.freebsd.org/chv.cgi?CH=174005 Change 174005 by raj@raj_fdt on 2010/01/31 10:40:47 Convert Marvell EHCI attachment to FDT/simplebus convention. Affected files ... .. //depot/projects/fdt/sys/arm/mv/files.mv#2 edit .. //depot/projects/fdt/sys/arm/mv/kirkwood/kirkwood.c#5 edit .. //depot/projects/fdt/sys/dev/usb/controller/ehci_mbus.c#3 delete .. //depot/projects/fdt/sys/dev/usb/controller/ehci_mv.c#1 add Differences ... ==== //depot/projects/fdt/sys/arm/mv/files.mv#2 (text+ko) ==== @@ -33,4 +33,4 @@ dev/uart/uart_bus_mbus.c optional uart dev/uart/uart_cpu_mv.c optional uart dev/uart/uart_dev_ns8250.c optional uart -dev/usb/controller/ehci_mbus.c optional ehci +dev/usb/controller/ehci_mv.c optional ehci ==== //depot/projects/fdt/sys/arm/mv/kirkwood/kirkwood.c#5 (text+ko) ==== @@ -79,11 +79,6 @@ { -1 }, CPU_PM_CTRL_XOR0 | CPU_PM_CTRL_XOR1 }, - { "ehci", MV_USB0_BASE, MV_USB_SIZE, - { MV_INT_USB_BERR, MV_INT_USB_CI, -1 }, - { -1 }, - CPU_PM_CTRL_USB0 - }, { "sata", MV_SATAHC_BASE, MV_SATAHC_SIZE, { MV_INT_SATA, -1 }, { -1 }, From owner-p4-projects@FreeBSD.ORG Sun Jan 31 10:42:48 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 416BE1065670; Sun, 31 Jan 2010 10:42:48 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 061D01065679 for ; Sun, 31 Jan 2010 10:42:48 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E83178FC14 for ; Sun, 31 Jan 2010 10:42:47 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VAglbr034806 for ; Sun, 31 Jan 2010 10:42:47 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VAglXp034804 for perforce@freebsd.org; Sun, 31 Jan 2010 10:42:47 GMT (envelope-from raj@freebsd.org) Date: Sun, 31 Jan 2010 10:42:47 GMT Message-Id: <201001311042.o0VAglXp034804@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174006 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 10:42:48 -0000 http://p4web.freebsd.org/chv.cgi?CH=174006 Change 174006 by raj@raj_fdt on 2010/01/31 10:42:25 Convert Marvell SATA to FDT/simplebus convention. Affected files ... .. //depot/projects/fdt/sys/arm/mv/kirkwood/kirkwood.c#6 edit .. //depot/projects/fdt/sys/arm/mv/mv_sata.c#4 edit Differences ... ==== //depot/projects/fdt/sys/arm/mv/kirkwood/kirkwood.c#6 (text+ko) ==== @@ -79,11 +79,6 @@ { -1 }, CPU_PM_CTRL_XOR0 | CPU_PM_CTRL_XOR1 }, - { "sata", MV_SATAHC_BASE, MV_SATAHC_SIZE, - { MV_INT_SATA, -1 }, - { -1 }, - CPU_PM_CTRL_SATA0 | CPU_PM_CTRL_SATA1 - }, { NULL, 0, 0, { 0 }, { 0 }, 0 } }; ==== //depot/projects/fdt/sys/arm/mv/mv_sata.c#4 (text+ko) ==== @@ -48,6 +48,8 @@ #include #include +#include +#include #include "ata_if.h" @@ -173,7 +175,7 @@ devclass_t sata_devclass; -DRIVER_MODULE(sata, mbus, sata_driver, sata_devclass, 0, 0); +DRIVER_MODULE(sata, simplebus, sata_driver, sata_devclass, 0, 0); MODULE_VERSION(sata, 1); MODULE_DEPEND(sata, ata, 1, 1, 1); @@ -183,13 +185,12 @@ struct sata_softc *sc; uint32_t d, r; + if (!ofw_bus_is_compatible(dev, "mrvl,sata")) + return (ENXIO); + soc_id(&d, &r); sc = device_get_softc(dev); - /* No SATA controller on the 88F5281 SoC */ - if (d == MV_DEV_88F5281) - return (ENXIO); - switch(d) { case MV_DEV_88F5182: sc->sc_version = 1; From owner-p4-projects@FreeBSD.ORG Sun Jan 31 10:44:50 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6ADE91065679; Sun, 31 Jan 2010 10:44:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F8851065676 for ; Sun, 31 Jan 2010 10:44:50 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1DC5D8FC08 for ; Sun, 31 Jan 2010 10:44:50 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VAiodv034937 for ; Sun, 31 Jan 2010 10:44:50 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VAinIj034935 for perforce@freebsd.org; Sun, 31 Jan 2010 10:44:49 GMT (envelope-from raj@freebsd.org) Date: Sun, 31 Jan 2010 10:44:49 GMT Message-Id: <201001311044.o0VAinIj034935@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174007 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 10:44:50 -0000 http://p4web.freebsd.org/chv.cgi?CH=174007 Change 174007 by raj@raj_fdt on 2010/01/31 10:44:15 Make PowerPC uart(4) a little bit more portable. This attachment will soon be used on ARM platforms as well. It likely needs to be placed in a separate file by then. Affected files ... .. //depot/projects/fdt/sys/dev/uart/uart_cpu_powerpc.c#4 edit Differences ... ==== //depot/projects/fdt/sys/dev/uart/uart_cpu_powerpc.c#4 (text) ==== @@ -52,9 +52,9 @@ #include #include -#ifdef MPC85XX -bus_space_tag_t uart_bus_space_io = &bs_be_tag; -bus_space_tag_t uart_bus_space_mem = &bs_be_tag; +#ifdef FDT +bus_space_tag_t uart_bus_space_io = fdtbus_bs_tag; +bus_space_tag_t uart_bus_space_mem = fdtbus_bs_tag; #else bus_space_tag_t uart_bus_space_io = &bs_le_tag; bus_space_tag_t uart_bus_space_mem = &bs_le_tag; From owner-p4-projects@FreeBSD.ORG Sun Jan 31 10:47:54 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D7B6D106568D; Sun, 31 Jan 2010 10:47:53 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83AFF106566C for ; Sun, 31 Jan 2010 10:47:53 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3B2E88FC16 for ; Sun, 31 Jan 2010 10:47:53 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VAlrN3035175 for ; Sun, 31 Jan 2010 10:47:53 GMT (envelope-from rene@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VAlr9D035173 for perforce@freebsd.org; Sun, 31 Jan 2010 10:47:53 GMT (envelope-from rene@FreeBSD.org) Date: Sun, 31 Jan 2010 10:47:53 GMT Message-Id: <201001311047.o0VAlr9D035173@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rene@FreeBSD.org using -f From: Rene Ladan To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174008 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 10:47:54 -0000 http://p4web.freebsd.org/chv.cgi?CH=174008 Change 174008 by rene@rene_self on 2010/01/31 10:47:14 IFC Affected files ... .. //depot/projects/docproj_nl/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#48 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/articles/pr-guidelines/article.sgml#2 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/network-servers/chapter.sgml#14 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/captions/2006/mckusick-kernelinternals/mckusick-kernelinternals-1.sbv#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/captions/2008/asiabsdcon/olander-pcbsd.sbv#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/captions/2008/nycbsdcon/dixon-bsdvsgpl.sbv#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/captions/2009/asiabsdcon/rao-kernellocking-1.sbv#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/captions/2009/dcbsdcon/davis-isolatingcluster.sbv#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/captions/2009/dcbsdcon/dixon-bsdisstilldying.sbv#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/captions/2009/dcbsdcon/mckusick-historyofbsd.sbv#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/captions/README#1 branch Differences ... ==== //depot/projects/docproj_nl/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#48 (text+ko) ==== @@ -1,4 +1,4 @@ - + @@ -2555,7 +2555,7 @@ client-side program, dhclient, comes integrated within FreeBSD, and the server-side portion is available from the net/isc-dhcp3-server port. The + role="package">net/isc-dhcp31-server port. The &man.dhclient.8;, &man.dhcp-options.5;, and &man.dhclient.conf.5; manual pages, in addition to the references below, are useful resources. @@ -2665,7 +2665,7 @@ The DHCP server, dhcpd, is included as part of the net/isc-dhcp3-server port in the ports + role="package">net/isc-dhcp31-server port in the ports collection. This port contains the ISC DHCP server and documentation. @@ -2729,7 +2729,7 @@ The server is not provided as part of FreeBSD, and so you will need to install the - net/isc-dhcp3-server + net/isc-dhcp31-server port to provide this service. See for more information on using the Ports Collection. @@ -2768,7 +2768,7 @@ The next thing that you will need to do is edit the sample dhcpd.conf which was installed by the - net/isc-dhcp3-server port. + net/isc-dhcp31-server port. By default, this will be /usr/local/etc/dhcpd.conf.sample, and you should copy this to @@ -2882,7 +2882,7 @@ Then, you can proceed to start the server by issuing the following command: - &prompt.root; /usr/local/etc/rc.d/isc-dhcpd.sh start + &prompt.root; /usr/local/etc/rc.d/isc-dhcpd start Should you need to make changes to the configuration of your server in the future, it is important to note that sending a @@ -2932,7 +2932,7 @@ environments where one DHCP server forwards a request from a client to another DHCP server on a separate network. If you require this functionality, then install the net/isc-dhcp3-relay port. The + role="package">net/isc-dhcp31-relay port. The &man.dhcrelay.8; manual page provided with the port contains more detail. From owner-p4-projects@FreeBSD.ORG Sun Jan 31 11:07:13 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3F33E1065676; Sun, 31 Jan 2010 11:07:13 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF99E106566C for ; Sun, 31 Jan 2010 11:07:12 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C46878FC17 for ; Sun, 31 Jan 2010 11:07:12 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VB7CJb037639 for ; Sun, 31 Jan 2010 11:07:12 GMT (envelope-from rene@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VB7CcA037637 for perforce@freebsd.org; Sun, 31 Jan 2010 11:07:12 GMT (envelope-from rene@FreeBSD.org) Date: Sun, 31 Jan 2010 11:07:12 GMT Message-Id: <201001311107.o0VB7CcA037637@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rene@FreeBSD.org using -f From: Rene Ladan To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174010 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 11:07:13 -0000 http://p4web.freebsd.org/chv.cgi?CH=174010 Change 174010 by rene@rene_self on 2010/01/31 11:06:24 MFen handbook/network-servers 1.118 -> 1.119 Affected files ... .. //depot/projects/docproj_nl/nl_NL.ISO8859-1/books/handbook/network-servers/chapter.sgml#23 edit Differences ... ==== //depot/projects/docproj_nl/nl_NL.ISO8859-1/books/handbook/network-servers/chapter.sgml#23 (text+ko) ==== @@ -2,10 +2,9 @@ The FreeBSD Dutch Documentation Project $FreeBSD: doc/nl_NL.ISO8859-1/books/handbook/network-servers/chapter.sgml,v 1.21 2009/06/01 16:21:43 rene Exp $ - $FreeBSDnl: doc/nl_NL.ISO8859-1/books/handbook/network-servers/chapter.sgml,v 1.48 2006/01/05 21:13:23 siebrand Exp $ %SOURCE% en_US.ISO8859-1/books/handbook/network-servers/chapter.sgml - %SRCID% 1.118 + %SRCID% 1.119 --> @@ -2761,7 +2760,7 @@ ISC DHCP-systeem beschreven. Het programma voor de cliënt, dhclient, zit standaard in &os; en de server is beschikbaar via de port net/isc-dhcp3-server. Naast de + role="package">net/isc-dhcp31-server. Naast de onderstaande informatie, zijn de hulppagina's van &man.dhclient.8;, &man.dhcp-options.5; en &man.dhclient.conf.5; bruikbare bronnen. @@ -2884,7 +2883,7 @@ De DHCP-server, dhcpd, zit bij de - port net/isc-dhcp3-server + port net/isc-dhcp31-server in de Portscollectie. Deze port bevat de ISC DHCP-server en documentatie. @@ -2959,7 +2958,7 @@ De server wordt niet geleverd als deel van &os; en om deze dienst aan te bieden dient de port net/isc-dhcp3-server + role="package">net/isc-dhcp31-server geïnstalleerd te worden. In staat meer informatie over de Portscollectie. @@ -3000,7 +2999,7 @@ Hierna dient het standaardbestand dhcpd.conf dat door de port net/isc-dhcp3-server is + role="package">net/isc-dhcp31-server is geïnstalleerd gewijzigd te worden. Standaard is dit /usr/local/etc/dhcpd.conf.sample en dit bestand dient gekopieerd te worden naar @@ -3121,7 +3120,7 @@ Daarna kunt u doorgaan met het starten van de server door het volgende commando te geven: - &prompt.root; /usr/local/etc/rc.d/isc-dhcpd.sh start + &prompt.root; /usr/local/etc/rc.d/isc-dhcpd start Als er later wijzigingen in de instellingen gemaakt moeten worden, dan is het belangrijk te onthouden dat het sturen van @@ -3186,7 +3185,7 @@ DHCP-server op een ander netwerk doorstuurt. Als deze functionaliteit nodig is, kan die beschikbaar komen door de port net/isc-dhcp3-relay te + role="package">net/isc-dhcp31-relay te installeren. De hulppagina voor &man.dhcrelay.8; die bij de port zit bevat meer details. From owner-p4-projects@FreeBSD.ORG Sun Jan 31 11:12:18 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 89A7C10656A3; Sun, 31 Jan 2010 11:12:18 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DFC81065697 for ; Sun, 31 Jan 2010 11:12:18 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 053AC8FC13 for ; Sun, 31 Jan 2010 11:12:18 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VBCHDM038053 for ; Sun, 31 Jan 2010 11:12:17 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VBCH7L038051 for perforce@freebsd.org; Sun, 31 Jan 2010 11:12:17 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 31 Jan 2010 11:12:17 GMT Message-Id: <201001311112.o0VBCH7L038051@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174011 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 11:12:18 -0000 http://p4web.freebsd.org/chv.cgi?CH=174011 Change 174011 by rwatson@rwatson_vimage_client on 2010/01/31 11:11:23 Add INVARIANTS to CAPABILITIES configuration -- in 9.x, this has no effect, but we use the same config file in 8.x where INVARIANTS is not the default. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/amd64/conf/CAPABILITIES#4 edit .. //depot/projects/trustedbsd/capabilities/src/sys/i386/conf/CAPABILITIES#5 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/amd64/conf/CAPABILITIES#4 (text+ko) ==== @@ -4,6 +4,7 @@ options CAPABILITIES options PROCDESC options KDTRACE_HOOKS +options INVARIANTS options WITNESS options KDB options DDB ==== //depot/projects/trustedbsd/capabilities/src/sys/i386/conf/CAPABILITIES#5 (text+ko) ==== @@ -4,6 +4,7 @@ options CAPABILITIES options PROCDESC options KDTRACE_HOOKS +options INVARIANTS options WITNESS options KDB options DDB From owner-p4-projects@FreeBSD.ORG Sun Jan 31 12:07:24 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 848AE10656A5; Sun, 31 Jan 2010 12:07:24 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13C3E106568F for ; Sun, 31 Jan 2010 12:07:24 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 003508FC08 for ; Sun, 31 Jan 2010 12:07:24 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VC7NXB043280 for ; Sun, 31 Jan 2010 12:07:23 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VC7N4Y043278 for perforce@freebsd.org; Sun, 31 Jan 2010 12:07:23 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 31 Jan 2010 12:07:23 GMT Message-Id: <201001311207.o0VC7N4Y043278@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174014 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 12:07:24 -0000 http://p4web.freebsd.org/chv.cgi?CH=174014 Change 174014 by rwatson@rwatson_vimage_client on 2010/01/31 12:06:25 INVARIANT_SUPPORT also required on 8.x when compiling this kernel configuration. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/amd64/conf/CAPABILITIES#5 edit .. //depot/projects/trustedbsd/capabilities/src/sys/i386/conf/CAPABILITIES#6 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/amd64/conf/CAPABILITIES#5 (text+ko) ==== @@ -4,6 +4,7 @@ options CAPABILITIES options PROCDESC options KDTRACE_HOOKS +options INVARIANT_SUPPORT options INVARIANTS options WITNESS options KDB ==== //depot/projects/trustedbsd/capabilities/src/sys/i386/conf/CAPABILITIES#6 (text+ko) ==== @@ -4,6 +4,7 @@ options CAPABILITIES options PROCDESC options KDTRACE_HOOKS +options INVARIANT_SUPPORT options INVARIANTS options WITNESS options KDB From owner-p4-projects@FreeBSD.ORG Sun Jan 31 13:00:17 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ABBD6106568B; Sun, 31 Jan 2010 13:00:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 702571065670 for ; Sun, 31 Jan 2010 13:00:17 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5C41E8FC16 for ; Sun, 31 Jan 2010 13:00:17 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VD0H2W057539 for ; Sun, 31 Jan 2010 13:00:17 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VD0Hr1057537 for perforce@freebsd.org; Sun, 31 Jan 2010 13:00:17 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 31 Jan 2010 13:00:17 GMT Message-Id: <201001311300.o0VD0Hr1057537@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174017 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 13:00:17 -0000 http://p4web.freebsd.org/chv.cgi?CH=174017 Change 174017 by rwatson@rwatson_vimage_client on 2010/01/31 12:59:26 Disable fdesc_setattr, not fdesc_getattr. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/fs/fdescfs/fdesc_vnops.c#9 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/fs/fdescfs/fdesc_vnops.c#9 (text+ko) ==== @@ -392,7 +392,6 @@ } */ *ap; { -#if 0 struct vnode *vp = ap->a_vp; struct vattr *vap = ap->a_vap; @@ -432,9 +431,6 @@ vp->v_type = vap->va_type; return (0); -#else - return (EOPNOTSUPP); -#endif } static int @@ -445,6 +441,7 @@ struct ucred *a_cred; } */ *ap; { +#if 0 struct vattr *vap = ap->a_vap; struct vnode *vp; struct mount *mp; @@ -488,6 +485,9 @@ } fdrop(fp, td); return (error); +#else + return (EOPNOTSUPP); +#endif } #define UIO_MX 16 From owner-p4-projects@FreeBSD.ORG Sun Jan 31 15:17:36 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1B50E1065679; Sun, 31 Jan 2010 15:17:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBF321065672 for ; Sun, 31 Jan 2010 15:17:35 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9E1348FC16 for ; Sun, 31 Jan 2010 15:17:35 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VFHZEL071794 for ; Sun, 31 Jan 2010 15:17:35 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VFHZT7071792 for perforce@freebsd.org; Sun, 31 Jan 2010 15:17:35 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 31 Jan 2010 15:17:35 GMT Message-Id: <201001311517.o0VFHZT7071792@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174024 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 15:17:36 -0000 http://p4web.freebsd.org/chv.cgi?CH=174024 Change 174024 by rwatson@rwatson_vimage_client on 2010/01/31 15:16:42 Add a rough draft man page for the libcapsicum fdlist API. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/Makefile#2 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.3#2 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.3#1 add Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/Makefile#2 (text+ko) ==== @@ -21,9 +21,17 @@ WARNS?= 6 MAN= libcapsicum.3 +MAN+= libcapsicum_fdlist.3 MAN+= libcapsicum_host.3 MAN+= libcapsicum_sandbox.3 MLINKS= libcapsicum.3 lc_limitfd.3 \ + libcapsicum_fdlist.3 lc_fdlist_new.3 \ + libcapsicum_fdlist.3 lc_fdlist_global.3 \ + libcapsicum_fdlist.3 lc_fdlist_dup.3 \ + libcapsicum_fdlist.3 lc_fdlist_free.3 \ + libcapsicum_fdlist.3 lc_fdlist_add.3 \ + libcapsicum_fdlist.3 lc_fdlist_addcap.3 \ + libcapsicum_fdlist.3 lc_fdlist_lookup.3 \ libcapsicum_host.3 lch_autosandbox_isenabled.3 \ libcapsicum_host.3 lch_start.3 \ libcapsicum_host.3 lch_startfd.3 \ ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.3#2 (text+ko) ==== @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Robert N. M. Watson +.\" Copyright (c) 2009-2010 Robert N. M. Watson .\" All rights reserved. .\" .\" WARNING: THIS IS EXPERIMENTAL SECURITY SOFTWARE THAT MUST NOT BE RELIED @@ -82,6 +82,13 @@ .Xr libcapsicum_sandbox 3 . Sandboxed processes themselves may launch software components in further sandboxes, so a single program may use both host and sandbox APIs. +.Pp +In addition, the +.Nm +file descriptor list API, described in +.Xr libcapsicum_fdlist 3 , +may be used to manage the delegation of file descriptors/capabilities to +sandboxes using a namespace. .Sh CAPABILITY API .Fn lc_limitfd is a wrapper around @@ -99,6 +106,7 @@ .Xr cap_new 2 , .Xr close 2 , .Xr dup2 2 , +.Xr libcapsicum_fdlist 3 , .Xr libcapsicum_host 3 , .Xr libcapsicum_sandbox 3 , .Xr unix 4 @@ -111,6 +119,9 @@ PRODUCTION SYSTEMS. IT WILL BREAK YOUR SOFTWARE IN NEW AND UNEXPECTED WAYS. .Sh AUTHORS These functions and the capability facility were created by +.An -nosplit .An "Robert N. M. Watson" +and +.An "Jonathan Anderson" at the University of Cambridge Computer Laboratory with support from a grant from Google, Inc. From owner-p4-projects@FreeBSD.ORG Sun Jan 31 15:39:59 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1AAAB1065676; Sun, 31 Jan 2010 15:39:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D39361065670 for ; Sun, 31 Jan 2010 15:39:58 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BF2138FC08 for ; Sun, 31 Jan 2010 15:39:58 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VFdwKb073493 for ; Sun, 31 Jan 2010 15:39:58 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VFdwdg073491 for perforce@freebsd.org; Sun, 31 Jan 2010 15:39:58 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 31 Jan 2010 15:39:58 GMT Message-Id: <201001311539.o0VFdwdg073491@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174029 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 15:39:59 -0000 http://p4web.freebsd.org/chv.cgi?CH=174029 Change 174029 by rwatson@rwatson_vimage_client on 2010/01/31 15:39:13 Fix markup nits, type nits, and argument names. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.3#2 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.3#2 (text+ko) ==== @@ -44,16 +44,16 @@ .In sys/types.h .In sys/capability.h .In libcapsicum.h -.Ft int +.Ft struct lc_fdlist * .Fn lc_fdlist_new "void" -.Ft int +.Ft struct lc_fdlist * .Fn lc_fdlist_global "void" -.Ft int +.Ft struct lc_fdlist * .Fn lc_fdlist_dup "struct lc_fdlist *orig" .Ft int .Fn lc_fdlist_free "struct lc_fdlist *l" .Ft int -.Fn lc_fdlist_add "struct lc_fdlist **l", "const char *subsystem", "const char *classname", "const char *name", "int fd" +.Fn lc_fdlist_add "struct lc_fdlist **l" "const char *subsystem" "const char *classname" "const char *name" "int fd" .Ft int .Fn lc_fdlist_addcap "struct lc_fdlist **l" "const char *subsystem" "const char *classname" "const char *name" "int fd" "cap_rights_t rights" .Ft int @@ -113,7 +113,7 @@ .It Fa subsystem Application or library name, globally unique in order to prevent collisions between software components in the same host/sandbox pair. -.It Fa class +.It Fa classname An application-specific or library-specific name, intended to reflect a specific software component within that application or library. .It Fa name @@ -128,7 +128,7 @@ .Fa fd , with the three-part name .Fa subsystem , -.Fa class , +.Fa classname , and .Fa name to the file descriptor list @@ -142,7 +142,7 @@ .Fn lc_fdlist_lookup looks up a file descriptor using the three-part name .Fa subsystem , -.Fa class , +.Fa classname , and .Fa name from the file descriptor list From owner-p4-projects@FreeBSD.ORG Sun Jan 31 15:43:02 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 484C61065679; Sun, 31 Jan 2010 15:43:02 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C8761065672 for ; Sun, 31 Jan 2010 15:43:02 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EC9968FC13 for ; Sun, 31 Jan 2010 15:43:01 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VFh1AQ073815 for ; Sun, 31 Jan 2010 15:43:01 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VFh1I8073813 for perforce@freebsd.org; Sun, 31 Jan 2010 15:43:01 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 31 Jan 2010 15:43:01 GMT Message-Id: <201001311543.o0VFh1I8073813@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174030 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 15:43:02 -0000 http://p4web.freebsd.org/chv.cgi?CH=174030 Change 174030 by rwatson@rwatson_vimage_client on 2010/01/31 15:42:36 Fix further nits, document return values for fdlist functions. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.3#3 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.3#3 (text+ko) ==== @@ -50,7 +50,7 @@ .Fn lc_fdlist_global "void" .Ft struct lc_fdlist * .Fn lc_fdlist_dup "struct lc_fdlist *orig" -.Ft int +.Ft void .Fn lc_fdlist_free "struct lc_fdlist *l" .Ft int .Fn lc_fdlist_add "struct lc_fdlist **l" "const char *subsystem" "const char *classname" "const char *name" "int fd" @@ -147,6 +147,20 @@ .Fa name from the file descriptor list .Fa l . +.Sh RETURN VALUES +The +.Fn lc_fdlist_new , +.Fn lc_flist_global , +and +.Fn lc_fdlist_dup +functions return a pointer to the desired file descriptor list if successful; +otherwise the value +.Dv NULL +is returned and the global variable +.Va errno +is set to indicate the error. +.Pp +.Rv -std lc_fdlist_add lc_fdlist_addcap lc_fdlist_lookup .Sh SEE ALSO .Xr cap_new 2 , .Xr close 2 , From owner-p4-projects@FreeBSD.ORG Sun Jan 31 19:28:01 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3CC871065672; Sun, 31 Jan 2010 19:28:01 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2610106566C for ; Sun, 31 Jan 2010 19:28:00 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DE17F8FC13 for ; Sun, 31 Jan 2010 19:28:00 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0VJS0gQ005320 for ; Sun, 31 Jan 2010 19:28:00 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0VJRlkm005303 for perforce@freebsd.org; Sun, 31 Jan 2010 19:27:47 GMT (envelope-from trasz@freebsd.org) Date: Sun, 31 Jan 2010 19:27:47 GMT Message-Id: <201001311927.o0VJRlkm005303@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to trasz@freebsd.org using -f From: Edward Tomasz Napierala To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174036 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 19:28:01 -0000 http://p4web.freebsd.org/chv.cgi?CH=174036 Change 174036 by trasz@trasz_victim on 2010/01/31 19:27:06 IFC. Affected files ... .. //depot/projects/soc2009/trasz_limits/COPYRIGHT#2 integrate .. //depot/projects/soc2009/trasz_limits/MAINTAINERS#5 integrate .. //depot/projects/soc2009/trasz_limits/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/Makefile.inc1#7 integrate .. //depot/projects/soc2009/trasz_limits/ObsoleteFiles.inc#15 integrate .. //depot/projects/soc2009/trasz_limits/UPDATING#19 integrate .. //depot/projects/soc2009/trasz_limits/bin/cp/cp.1#2 integrate .. //depot/projects/soc2009/trasz_limits/bin/cp/cp.c#2 integrate .. //depot/projects/soc2009/trasz_limits/bin/cp/utils.c#4 integrate .. //depot/projects/soc2009/trasz_limits/bin/csh/config.h#2 integrate .. //depot/projects/soc2009/trasz_limits/bin/csh/config_p.h#2 integrate .. //depot/projects/soc2009/trasz_limits/bin/date/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/bin/date/date.1#2 integrate .. //depot/projects/soc2009/trasz_limits/bin/date/date.c#3 integrate .. //depot/projects/soc2009/trasz_limits/bin/kenv/kenv.c#2 integrate .. //depot/projects/soc2009/trasz_limits/bin/ls/ls.c#3 integrate .. //depot/projects/soc2009/trasz_limits/bin/ls/ls.h#2 integrate .. //depot/projects/soc2009/trasz_limits/bin/ls/print.c#3 integrate .. //depot/projects/soc2009/trasz_limits/bin/pax/ftree.c#2 integrate .. //depot/projects/soc2009/trasz_limits/bin/pax/gen_subs.c#2 integrate .. //depot/projects/soc2009/trasz_limits/bin/pkill/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/bin/pkill/pkill.c#3 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/arith.y#3 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/cd.c#4 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/error.c#4 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/eval.c#8 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/eval.h#4 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/exec.c#7 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/exec.h#4 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/expand.c#5 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/histedit.c#6 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/input.c#6 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/jobs.c#4 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/main.c#6 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/miscbltin.c#4 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/mkbuiltins#2 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/mkinit.c#3 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/mksyntax.c#3 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/mystring.c#2 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/options.c#3 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/options.h#3 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/output.h#4 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/parser.c#7 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/parser.h#3 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/sh.1#8 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/var.c#6 integrate .. //depot/projects/soc2009/trasz_limits/bin/sh/var.h#3 integrate .. //depot/projects/soc2009/trasz_limits/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/CHANGES#6 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/FAQ#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/FAQ.xml#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/bin/dnssec/dnssec-signzone.8#4 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/bin/dnssec/dnssec-signzone.html#4 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/bin/named/query.c#4 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/doc/arm/Bv9ARM.pdf#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/doc/arm/man.dnssec-signzone.html#4 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/doc/arm/man.named-checkconf.html#4 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/doc/arm/man.named-checkzone.html#4 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/doc/arm/man.named.html#4 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/doc/arm/man.nsupdate.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/doc/arm/man.rndc-confgen.html#4 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/doc/arm/man.rndc.conf.html#4 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/doc/arm/man.rndc.html#4 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/dns/include/dns/db.h#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/dns/include/dns/ncache.h#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/dns/include/dns/types.h#4 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/dns/rbtdb.c#4 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/dns/resolver.c#5 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/dns/validator.c#4 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_buffer.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_config.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_context.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_gabn.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_gethostent.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_getipnode.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_gnba.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_hstrerror.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_inetntop.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_noop.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_packet.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/lib/lwres/man/lwres_resutil.html#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/bind9/version#6 integrate .. //depot/projects/soc2009/trasz_limits/contrib/gcc/config/mips/freebsd.h#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/groff/font/devutf8/R.proto#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/groff/tmac/an-old.tmac#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/groff/tmac/doc-common#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/groff/tmac/doc-old.tmac#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/groff/tmac/doc-syms#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/groff/tmac/doc.tmac#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/groff/tmac/groff_mdoc.man#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/libpcap/inet.c#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/netcat/nc.1#4 integrate .. //depot/projects/soc2009/trasz_limits/contrib/netcat/netcat.c#3 integrate .. //depot/projects/soc2009/trasz_limits/contrib/one-true-awk/FIXES#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/one-true-awk/b.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/one-true-awk/lib.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/one-true-awk/mac.code#2 delete .. //depot/projects/soc2009/trasz_limits/contrib/one-true-awk/main.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/one-true-awk/makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/one-true-awk/maketab.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/one-true-awk/proctab.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/one-true-awk/proto.h#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/one-true-awk/run.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/opie/libopie/getutmpentry.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/opie/libopie/insecure.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/opie/libopie/login.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/CACerts#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/FREEBSD-upgrade#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/LICENSE#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/PGPKEYS#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/README#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/RELEASE_NOTES#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/cf/README#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/cf/cf/submit.cf#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/cf/feature/ldap_routing.m4#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/cf/m4/cfhead.m4#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/cf/m4/proto.m4#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/cf/m4/version.m4#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/contrib/qtool.pl#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/contrib/smcontrol.pl#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/doc/op/op.me#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/include/libmilter/mfapi.h#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/include/libmilter/mfdef.h#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/include/sm/conf.h#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/include/sm/ldap.h#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/include/sm/sem.h#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libmilter/Makefile.m4#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libmilter/comm.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libmilter/docs/api.html#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libmilter/docs/overview.html#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libmilter/docs/smfi_addheader.html#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libmilter/docs/smfi_chgheader.html#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libmilter/docs/smfi_insheader.html#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libmilter/engine.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libmilter/example.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libmilter/handler.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libmilter/libmilter.h#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libmilter/listener.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libmilter/main.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libmilter/worker.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libsm/debug.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libsm/ldap.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libsm/mbdb.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libsm/sem.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libsm/t-sem.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libsmdb/smdb1.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libsmdb/smdb2.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/libsmutil/safefile.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/praliases/praliases.8#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/praliases/praliases.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/Makefile.m4#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/README#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/TRACEFLAGS#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/collect.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/conf.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/conf.h#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/daemon.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/deliver.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/envelope.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/headers.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/main.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/map.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/milter.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/queue.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/ratectrl.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/readcf.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/savemail.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/sendmail.8#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/sendmail.h#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/sfsasl.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/srvrsmtp.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/tls.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/usersmtp.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/util.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/src/version.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/sendmail/vacation/vacation.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/smbfs/smbutil/view.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/tcp_wrappers/hosts_access.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/telnet/telnetd/sys_term.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/telnet/telnetd/telnetd.c#2 integrate .. //depot/projects/soc2009/trasz_limits/crypto/heimdal/kcm/connect.c#2 integrate .. //depot/projects/soc2009/trasz_limits/crypto/openssh/config.h#5 integrate .. //depot/projects/soc2009/trasz_limits/crypto/openssh/defines.h#4 integrate .. //depot/projects/soc2009/trasz_limits/crypto/openssh/loginrec.c#3 integrate .. //depot/projects/soc2009/trasz_limits/crypto/openssh/sshd.c#5 integrate .. //depot/projects/soc2009/trasz_limits/etc/defaults/devfs.rules#2 integrate .. //depot/projects/soc2009/trasz_limits/etc/defaults/rc.conf#11 integrate .. //depot/projects/soc2009/trasz_limits/etc/devd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/etc/devd/uath.conf#1 branch .. //depot/projects/soc2009/trasz_limits/etc/etc.amd64/ttys#4 integrate .. //depot/projects/soc2009/trasz_limits/etc/etc.arm/ttys#4 integrate .. //depot/projects/soc2009/trasz_limits/etc/etc.i386/ttys#4 integrate .. //depot/projects/soc2009/trasz_limits/etc/etc.ia64/ttys#4 integrate .. //depot/projects/soc2009/trasz_limits/etc/etc.mips/ttys#4 integrate .. //depot/projects/soc2009/trasz_limits/etc/etc.pc98/ttys#2 integrate .. //depot/projects/soc2009/trasz_limits/etc/etc.powerpc/ttys#4 integrate .. //depot/projects/soc2009/trasz_limits/etc/etc.sparc64/ttys#4 integrate .. //depot/projects/soc2009/trasz_limits/etc/mtree/BSD.include.dist#6 integrate .. //depot/projects/soc2009/trasz_limits/etc/mtree/BSD.usr.dist#6 integrate .. //depot/projects/soc2009/trasz_limits/etc/namedb/named.conf#4 integrate .. //depot/projects/soc2009/trasz_limits/etc/network.subr#8 integrate .. //depot/projects/soc2009/trasz_limits/etc/newsyslog.conf#2 integrate .. //depot/projects/soc2009/trasz_limits/etc/periodic/monthly/200.accounting#2 integrate .. //depot/projects/soc2009/trasz_limits/etc/rc.d/cleanvar#2 integrate .. //depot/projects/soc2009/trasz_limits/etc/rc.d/devfs#2 integrate .. //depot/projects/soc2009/trasz_limits/etc/rc.d/named#4 integrate .. //depot/projects/soc2009/trasz_limits/etc/rc.d/nsswitch#2 integrate .. //depot/projects/soc2009/trasz_limits/etc/rc.d/ntpdate#2 integrate .. //depot/projects/soc2009/trasz_limits/etc/rc.d/var#2 integrate .. //depot/projects/soc2009/trasz_limits/etc/rc.firewall#3 integrate .. //depot/projects/soc2009/trasz_limits/etc/rc.subr#8 integrate .. //depot/projects/soc2009/trasz_limits/etc/sendmail/freebsd.mc#2 integrate .. //depot/projects/soc2009/trasz_limits/etc/sendmail/freebsd.submit.mc#2 integrate .. //depot/projects/soc2009/trasz_limits/etc/services#3 integrate .. //depot/projects/soc2009/trasz_limits/etc/termcap.small#4 integrate .. //depot/projects/soc2009/trasz_limits/games/fortune/datfiles/fortunes#6 integrate .. //depot/projects/soc2009/trasz_limits/games/fortune/datfiles/fortunes-o.real#5 integrate .. //depot/projects/soc2009/trasz_limits/games/fortune/datfiles/freebsd-tips#2 integrate .. //depot/projects/soc2009/trasz_limits/games/fortune/strfile/strfile.c#2 integrate .. //depot/projects/soc2009/trasz_limits/games/fortune/unstr/unstr.c#2 integrate .. //depot/projects/soc2009/trasz_limits/games/number/number.c#3 integrate .. //depot/projects/soc2009/trasz_limits/games/pom/pom.6#2 integrate .. //depot/projects/soc2009/trasz_limits/games/pom/pom.c#2 integrate .. //depot/projects/soc2009/trasz_limits/gnu/lib/libgcc/Makefile#5 integrate .. //depot/projects/soc2009/trasz_limits/gnu/lib/libstdc++/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/gnu/lib/libsupc++/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/gnu/usr.bin/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/gnu/usr.bin/binutils/Makefile.inc0#2 integrate .. //depot/projects/soc2009/trasz_limits/gnu/usr.bin/binutils/ld/Makefile.mips#2 integrate .. //depot/projects/soc2009/trasz_limits/gnu/usr.bin/cc/Makefile.tgt#2 integrate .. //depot/projects/soc2009/trasz_limits/gnu/usr.bin/groff/tmac/mdoc.local#5 integrate .. //depot/projects/soc2009/trasz_limits/include/Makefile#7 integrate .. //depot/projects/soc2009/trasz_limits/include/dirent.h#2 integrate .. //depot/projects/soc2009/trasz_limits/include/paths.h#2 integrate .. //depot/projects/soc2009/trasz_limits/include/semaphore.h#1 branch .. //depot/projects/soc2009/trasz_limits/include/strings.h#2 integrate .. //depot/projects/soc2009/trasz_limits/include/unistd.h#5 integrate .. //depot/projects/soc2009/trasz_limits/include/utmp.h#2 integrate .. //depot/projects/soc2009/trasz_limits/include/utmpx.h#1 branch .. //depot/projects/soc2009/trasz_limits/kerberos5/usr.bin/kdestroy/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/kerberos5/usr.bin/kpasswd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/Makefile#5 integrate .. //depot/projects/soc2009/trasz_limits/lib/Makefile.inc#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/bind/dns/code.h#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/bind/dns/dns/enumclass.h#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/bind/dns/dns/enumtype.h#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/bind/dns/dns/rdatastruct.h#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/csu/Makefile.inc#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/csu/arm/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/csu/i386-elf/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/csu/mips/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/Makefile#4 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_check_magic.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_crc32.h#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_endian.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_entry.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_entry.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_entry_link_resolver.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_entry_private.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_entry_stat.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_entry_xattr.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_hash.h#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_platform.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_private.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read.c#4 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_disk_entry_from_file.c#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_disk_private.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_disk_set_standard_lookup.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_open_fd.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_open_file.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_open_filename.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_private.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_support_compression_all.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_support_compression_bzip2.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_support_compression_compress.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_support_compression_gzip.c#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_support_compression_program.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_support_compression_uu.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_support_compression_xz.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_support_format_ar.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_support_format_cpio.c#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_support_format_iso9660.c#4 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_support_format_mtree.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_support_format_raw.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_support_format_tar.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_read_support_format_zip.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_string.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_string.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_util.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_util.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_virtual.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_disk.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_disk_private.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_disk_set_standard_lookup.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_open_fd.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_private.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_set_compression_bzip2.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_set_compression_compress.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_set_compression_gzip.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_set_compression_none.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_set_compression_program.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_set_compression_xz.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_set_format.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_set_format_ar.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_set_format_by_name.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_set_format_cpio.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_set_format_cpio_newc.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_set_format_mtree.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_set_format_pax.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/archive_write_set_format_zip.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/config_freebsd.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/filter_fork.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/libarchive-formats.5#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/tar.5#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/main.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_acl_pax.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_compat_bzip2.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_compat_cpio.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_compat_cpio_1.cpio.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_compat_lzma.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_compat_lzma_1.tlz.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_compat_lzma_2.tlz.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_compat_lzma_3.tlz.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_compat_solaris_tar_acl.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_entry.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_entry_strmode.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_extattr_freebsd.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_fuzz.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_fuzz_1.iso.Z.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_fuzz_1.iso.uu#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_open_fd.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_open_file.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_pax_filename_encoding.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_compress_program.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_data_large.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_disk.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_disk_entry_from_file.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_extract.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_ar.ar.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_ar.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_cpio_bin_bz2.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_cpio_bin_lzma.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_iso.iso.Z.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_iso_gz.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_iso_gz.iso.gz.uu#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_iso_joliet.iso.Z.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_iso_multi_extent.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_isojoliet_bz2.c#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_isojoliet_bz2.iso.bz2.uu#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_isojoliet_long.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_isojoliet_rr.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_isojolietrr_bz2.iso.bz2.uu#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_isorr_bz2.c#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_isorr_bz2.iso.bz2.uu#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_isorr_ce.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_isorr_new_bz2.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_isorr_rr_moved.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_isozisofs_bz2.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_mtree.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_mtree.mtree.uu#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_pax_bz2.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_tar.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_tbz.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_format_tlz.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_large.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_read_uu.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_tar_large.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_compress_program.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_disk.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_disk_failures.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_disk_hardlink.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_disk_perms.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_disk_secure.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_disk_sparse.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_disk_symlink.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_disk_times.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_format_cpio_empty.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_format_cpio_newc.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_format_cpio_odc.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_format_tar_ustar.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_format_zip.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_format_zip_empty.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libarchive/test/test_write_format_zip_no_compression.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libauditd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libautofs/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libbegemot/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libbsm/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libbz2/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/Makefile#4 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/Makefile.inc#6 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/Symbol.map#6 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/_pthread_stubs.c#4 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/devname.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/getttyent.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/getttyent.c#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/getutxent.3#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/getutxent.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/opendir.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/pututxline.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/scandir.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/scandir.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/sem.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/sem_init.3#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/sem_new.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/sem_open.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/time.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/time.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/ttyname.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/ttyslot.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/uname.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/utxdb.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/utxdb.h#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libc/include/libc_private.h#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/mips/Symbol.map#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/mips/gen/fpgetmask.c#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libc/mips/gen/fpgetround.c#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libc/mips/gen/fpgetsticky.c#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libc/mips/gen/fpsetmask.c#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libc/mips/gen/fpsetround.c#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libc/mips/gen/fpsetsticky.c#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libc/mips/gen/hardfloat/fpgetmask.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libc/mips/gen/hardfloat/fpgetround.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libc/mips/gen/hardfloat/fpgetsticky.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libc/mips/gen/hardfloat/fpsetmask.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libc/mips/gen/hardfloat/fpsetround.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libc/mips/gen/hardfloat/fpsetsticky.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libc/mips/sys/brk.S#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_bindx.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_connectx.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_getaddrlen.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_getassocid.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_getpaddrs.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_opt_info.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_recvmsg.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_send.3#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_sendmsg.3#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/nls/gl_ES.ISO8859-1.msg#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/nls/msgcat.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/posix1e/Makefile.inc#6 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/rpc/getnetpath.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/rpc/svc_auth_des.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/stdio/fread.c#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/stdio/fwrite.c#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/stdio/getc.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/stdlib/malloc.c#5 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/stdtime/localtime.c#7 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/string/strsignal.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/sys/clock_gettime.2#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/sys/cpuset.2#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/sys/cpuset_getaffinity.2#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/sys/kqueue.2#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/sys/mount.2#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/sys/sctp_generic_recvmsg.2#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/sys/sctp_generic_sendmsg.2#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/sys/sctp_peeloff.2#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/sys/sendfile.2#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/sys/shm_open.2#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/sys/wait.2#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libcalendar/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libcam/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libcompat/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libcrypt/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libdevinfo/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libdevstat/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libdwarf/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libedit/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libefi/Makefile#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libefi/efi_getvar.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libefi/efi_nextvarname.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libefi/efi_setvar.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libefi/libefi.3#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libefi/libefi.c#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libefi/libefi.h#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libefi/libefi_int.h#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libelf/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libelf/elf.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libexpat/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libexpat/libbsdxml.3#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libfetch/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libfetch/fetch.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libfetch/http.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libftpio/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgeom/geom_getxml.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgeom/geom_util.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgeom/geom_xml2tree.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgeom/libgeom.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgeom/libgeom.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgpib/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_accept_sec_context.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_acquire_cred.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_add_cred.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_add_oid_set_member.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_canonicalize_name.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_compare_name.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_context_time.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_create_empty_oid_set.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_delete_sec_context.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_display_name.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_display_status.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_duplicate_name.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_export_name.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_export_sec_context.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_get_mic.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_import_name.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_import_sec_context.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_indicate_mechs.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_init_sec_context.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_inquire_context.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_inquire_cred.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_inquire_cred_by_mech.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_inquire_mechs_for_name.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_inquire_names_for_mech.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_mech_switch.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_process_context_token.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_release_buffer.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_release_cred.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_release_name.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_release_oid_set.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_test_oid_set_member.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_unwrap.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_verify_mic.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_wrap.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gss_wrap_size_limit.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/gssapi.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgssapi/mech.5#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libipsec/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libipx/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libjail/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libkiconv/Makefile#4 integrate .. //depot/projects/soc2009/trasz_limits/lib/libkvm/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libmagic/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libmd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libmilter/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libmp/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libncp/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libnetgraph/debug.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libngatm/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libopie/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libopie/config.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libpam/modules/Makefile.inc#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libpam/modules/pam_exec/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libpam/modules/pam_krb5/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libpam/modules/pam_lastlog/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libpam/modules/pam_lastlog/pam_lastlog.8#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libpam/modules/pam_lastlog/pam_lastlog.c#4 integrate .. //depot/projects/soc2009/trasz_limits/lib/libpam/modules/pam_radius/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libpam/modules/pam_ssh/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libpcap/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libpmc/Makefile#4 integrate .. //depot/projects/soc2009/trasz_limits/lib/libpmc/libpmc.c#5 integrate .. //depot/projects/soc2009/trasz_limits/lib/libproc/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libradius/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_get_error.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_get_mech_info.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_get_mechanisms.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_get_principal_name.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_get_versions.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_getcred.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_is_installed.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_max_data_length.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_mech_to_oid.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_oid_to_mech.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_qop_to_num.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_seccreate.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_set_callback.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_set_defaults.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_set_svc_name.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpcsec_gss.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/rpcsec_gss_conf.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librpcsec_gss/svc_rpcsec_gss.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/librt/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libsbuf/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libsm/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libsmdb/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libsmutil/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libstand/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libstand/bzipfs.c#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libstand/dosfs.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libtacplus/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libtacplus/taclib.c#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libthr/arch/mips/include/pthread_md.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libthr/pthread.map#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libthr/thread/Makefile.inc#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libthr/thread/thr_init.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libthr/thread/thr_private.h#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libthr/thread/thr_sem.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libthread_db/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libufs/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libugidfw/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libugidfw/ugidfw.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libulog/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libulog/Symbol.map#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libulog/ulog.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libulog/ulog_getutxent.3#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libulog/ulog_getutxent.c#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libulog/ulog_internal.h#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libulog/ulog_login.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libulog/ulog_login.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libulog/ulog_login_pseudo.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libulog/ulog_pututxline.c#3 delete .. //depot/projects/soc2009/trasz_limits/lib/libulog/ulog_setutxfile.3#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libulog/ulog_util.c#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libulog/utempter.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libulog/utempter_add_record.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libusb/Makefile#4 integrate .. //depot/projects/soc2009/trasz_limits/lib/libusb/libusb20.3#4 integrate .. //depot/projects/soc2009/trasz_limits/lib/libusb/libusb20.c#6 integrate .. //depot/projects/soc2009/trasz_limits/lib/libusb/libusb20.h#6 integrate .. //depot/projects/soc2009/trasz_limits/lib/libusb/libusb20_int.h#5 integrate .. //depot/projects/soc2009/trasz_limits/lib/libusb/libusb20_ugen20.c#6 integrate .. //depot/projects/soc2009/trasz_limits/lib/libutil/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libutil/libutil.h#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libutil/login.3#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libutil/login.c#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libutil/login_tty.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libutil/logout.3#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libutil/logout.c#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libutil/logwtmp.3#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libutil/logwtmp.c#2 delete .. //depot/projects/soc2009/trasz_limits/lib/libvgl/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libwrap/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/liby/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libypclnt/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libz/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/ncurses/Makefile.inc#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/Makefile.inc#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/atrun/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/bootpd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/bootpd/Makefile.inc#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/bootpd/tools/Makefile.inc#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/comsat/comsat.8#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/comsat/comsat.c#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/fingerd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/ftpd/ftpd.8#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/ftpd/ftpd.c#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/ftpd/logwtmp.c#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/getty/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/getty/ttys.5#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/mail.local/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/mknetid/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/pppoed/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rbootd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/revnetgroup/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rlogind/rlogind.c#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rpc.rquotad/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rpc.rstatd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rpc.rusersd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rpc.rusersd/rusers_proc.c#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rpc.rusersd/rusersd.c#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rpc.rwalld/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rpc.sprayd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rshd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rtld-aout/shlib.c#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rtld-aout/support.c#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/Makefile#4 integrate .. //depot/projects/soc2009/trasz_limits/libexec/smrsh/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/talkd/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/libexec/talkd/process.c#3 integrate .. //depot/projects/soc2009/trasz_limits/libexec/tcpd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/tftp-proxy/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/tftpd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/ulog-helper/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/libexec/ypxfr/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/release/Makefile#7 integrate .. //depot/projects/soc2009/trasz_limits/release/amd64/boot_crunch.conf#3 integrate .. //depot/projects/soc2009/trasz_limits/release/doc/en_US.ISO8859-1/hardware/article.sgml#5 integrate .. //depot/projects/soc2009/trasz_limits/release/doc/share/misc/dev.archlist.txt#3 integrate .. //depot/projects/soc2009/trasz_limits/release/i386/boot_crunch.conf#3 integrate .. //depot/projects/soc2009/trasz_limits/release/i386/fixit_crunch.conf#3 integrate .. //depot/projects/soc2009/trasz_limits/release/pc98/boot_crunch.conf#3 integrate .. //depot/projects/soc2009/trasz_limits/release/pc98/fixit-small_crunch.conf#3 integrate .. //depot/projects/soc2009/trasz_limits/release/pc98/fixit_crunch.conf#3 integrate .. //depot/projects/soc2009/trasz_limits/release/picobsd/bridge/PICOBSD#3 integrate .. //depot/projects/soc2009/trasz_limits/release/picobsd/bridge/crunch.conf#4 integrate .. //depot/projects/soc2009/trasz_limits/release/picobsd/build/mfs.mtree#2 integrate .. //depot/projects/soc2009/trasz_limits/release/picobsd/build/picobsd#4 integrate .. //depot/projects/soc2009/trasz_limits/release/picobsd/floppy.tree/etc/master.passwd#2 integrate .. //depot/projects/soc2009/trasz_limits/release/picobsd/floppy.tree/sbin/dhclient-script#1 branch .. //depot/projects/soc2009/trasz_limits/release/picobsd/qemu/PICOBSD#1 branch .. //depot/projects/soc2009/trasz_limits/release/picobsd/qemu/PICOBSD.hints#1 branch .. //depot/projects/soc2009/trasz_limits/release/picobsd/qemu/config#1 branch .. //depot/projects/soc2009/trasz_limits/release/picobsd/qemu/crunch.conf#1 branch .. //depot/projects/soc2009/trasz_limits/release/picobsd/qemu/floppy.tree.exclude#1 branch .. //depot/projects/soc2009/trasz_limits/release/powerpc/boot_crunch.conf#3 integrate .. //depot/projects/soc2009/trasz_limits/release/sparc64/boot_crunch.conf#3 integrate .. //depot/projects/soc2009/trasz_limits/release/sun4v/boot_crunch.conf#3 integrate .. //depot/projects/soc2009/trasz_limits/rescue/rescue/Makefile#5 integrate .. //depot/projects/soc2009/trasz_limits/sbin/adjkerntz/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/camcontrol/camcontrol.8#5 integrate .. //depot/projects/soc2009/trasz_limits/sbin/camcontrol/camcontrol.c#6 integrate .. //depot/projects/soc2009/trasz_limits/sbin/comcontrol/comcontrol.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/dumpfs/dumpfs.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sbin/fsck_ffs/fsutil.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/fsck_ffs/gjournal.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/fsck_ffs/main.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/fsck_ffs/pass1.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/fsck_ffs/pass2.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/geom/class/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/geom/class/cache/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/geom/class/cache/gcache.8#1 branch .. //depot/projects/soc2009/trasz_limits/sbin/geom/class/mountver/Makefile#1 branch .. //depot/projects/soc2009/trasz_limits/sbin/geom/class/mountver/geom_mountver.c#1 branch .. //depot/projects/soc2009/trasz_limits/sbin/geom/class/mountver/gmountver.8#1 branch .. //depot/projects/soc2009/trasz_limits/sbin/geom/class/raid3/geom_raid3.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/geom/class/raid3/graid3.8#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/geom/class/stripe/geom_stripe.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/geom/core/geom.8#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/geom/core/geom.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sbin/ggate/ggated/ggated.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/growfs/growfs.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/ifconfig/Makefile#5 integrate .. //depot/projects/soc2009/trasz_limits/sbin/ifconfig/af_inet.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/ifconfig/ifconfig.8#7 integrate .. //depot/projects/soc2009/trasz_limits/sbin/ifconfig/ifconfig.c#5 integrate .. //depot/projects/soc2009/trasz_limits/sbin/ifconfig/ifieee80211.c#8 integrate .. //depot/projects/soc2009/trasz_limits/sbin/init/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/init/init.8#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/init/init.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sbin/kldconfig/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/kldload/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/kldstat/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/ldconfig/ldconfig.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/mdconfig/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/mdconfig/mdconfig.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/mknod/mknod.8#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/mknod/mknod.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/mount/vfslist.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/mount_msdosfs/mount_msdosfs.8#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/mount_msdosfs/mount_msdosfs.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/mount_nfs/mount_nfs.8#5 integrate .. //depot/projects/soc2009/trasz_limits/sbin/mount_nullfs/mount_nullfs.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/natd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/natd/natd.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/newfs/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/newfs/mkfs.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/rcorder/ealloc.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/rcorder/hash.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/rcorder/rcorder.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/reboot/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/reboot/reboot.8#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/reboot/reboot.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/restore/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/restore/dirs.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/restore/extern.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/restore/interactive.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/restore/tape.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/routed/if.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/setkey/setkey.8#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/shutdown/shutdown.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/swapon/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/tunefs/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/sbin/umount/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/umount/umount.c#3 integrate .. //depot/projects/soc2009/trasz_limits/secure/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/secure/Makefile.inc#2 integrate .. //depot/projects/soc2009/trasz_limits/share/doc/usd/05.dc/Makefile#1 branch .. //depot/projects/soc2009/trasz_limits/share/doc/usd/06.bc/Makefile#1 branch .. //depot/projects/soc2009/trasz_limits/share/doc/usd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/share/examples/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/share/examples/kld/cdev/test/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/share/examples/kld/cdev/test/testcdev.c#2 integrate .. //depot/projects/soc2009/trasz_limits/share/examples/kld/firmware/fwconsumer/fw_consumer.c#2 integrate .. //depot/projects/soc2009/trasz_limits/share/examples/kld/syscall/test/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/share/examples/kld/syscall/test/call.c#2 integrate .. //depot/projects/soc2009/trasz_limits/share/examples/pppd/auth-down.sample#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/pppd/auth-up.sample#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/pppd/chap-secrets.sample#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/pppd/chat.sh.sample#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/pppd/ip-down.sample#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/pppd/ip-up.sample#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/pppd/options.sample#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/pppd/pap-secrets.sample#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/pppd/ppp.deny.sample#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/pppd/ppp.shells.sample#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/slattach/unit-command.sh#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/sliplogin/slip.hosts#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/sliplogin/slip.login#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/sliplogin/slip.logout#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/sliplogin/slip.slparms#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/startslip/sldown.sh#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/startslip/slip.sh#2 delete .. //depot/projects/soc2009/trasz_limits/share/examples/startslip/slup.sh#2 delete .. //depot/projects/soc2009/trasz_limits/share/man/man3/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man3/pthread.3#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man3/pthread_affinity_np.3#1 branch .. //depot/projects/soc2009/trasz_limits/share/man/man3/pthread_attr.3#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man3/pthread_attr_affinity_np.3#1 branch .. //depot/projects/soc2009/trasz_limits/share/man/man3/pthread_join.3#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man3/sysexits.3#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/Makefile#14 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/acpi.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/acpi_asus.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/ahci.4#4 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/ath.4#5 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/aue.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/axe.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/bridge.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/carp.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/cdce.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/cpufreq.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/dc.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/epair.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/faith.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/gif.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/gpib.4#1 branch .. //depot/projects/soc2009/trasz_limits/share/man/man4/hme.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/ifmib.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/ipwfw.4#1 branch .. //depot/projects/soc2009/trasz_limits/share/man/man4/iwifw.4#1 branch .. //depot/projects/soc2009/trasz_limits/share/man/man4/lge.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/mac.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/man4.i386/vpd.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/man4.sparc64/ebus.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/mfi.4#5 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/mpt.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/ndis.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/netintro.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/nge.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/nvram.4#1 branch .. //depot/projects/soc2009/trasz_limits/share/man/man4/pcii.4#1 branch .. //depot/projects/soc2009/trasz_limits/share/man/man4/pcm.4#7 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/pcn.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/psm.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/pts.4#4 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/ral.4#4 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/re.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/rl.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/rue.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/rum.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/run.4#1 branch .. //depot/projects/soc2009/trasz_limits/share/man/man4/sf.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/siba.4#1 branch .. //depot/projects/soc2009/trasz_limits/share/man/man4/sis.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/sk.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/smbus.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/snd_hda.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/snd_uaudio.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/ste.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/sysmouse.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/targ.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/termios.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/tnt4882.4#1 branch .. //depot/projects/soc2009/trasz_limits/share/man/man4/tty.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/u3g.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/uart.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/ucom.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/udav.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/uhso.4#1 branch .. //depot/projects/soc2009/trasz_limits/share/man/man4/ural.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/urio.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/urtw.4#6 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/vge.4#4 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/vr.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/wi.4#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/wlan.4#4 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man5/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man5/devfs.rules.5#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man5/rc.conf.5#8 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man5/src.conf.5#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man5/tmpfs.5#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man5/utmp.5#2 delete .. //depot/projects/soc2009/trasz_limits/share/man/man7/hier.7#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man7/release.7#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man7/security.7#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man8/rc.subr.8#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man9/Makefile#13 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man9/VFS.9#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man9/VFS_CHECKEXP.9#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man9/VFS_FHTOVP.9#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man9/ifnet.9#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man9/kthread.9#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man9/locking.9#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man9/mac.9#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man9/namei.9#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man9/pci.9#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man9/sleepqueue.9#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man9/sysctl.9#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man9/vm_page_bits.9#2 integrate .. //depot/projects/soc2009/trasz_limits/share/misc/bsd-family-tree#5 integrate .. //depot/projects/soc2009/trasz_limits/share/misc/committers-doc.dot#2 integrate .. //depot/projects/soc2009/trasz_limits/share/misc/committers-ports.dot#6 integrate .. //depot/projects/soc2009/trasz_limits/share/misc/committers-src.dot#7 integrate .. //depot/projects/soc2009/trasz_limits/share/mk/bsd.dep.mk#2 integrate .. //depot/projects/soc2009/trasz_limits/share/mk/bsd.lib.mk#3 integrate .. //depot/projects/soc2009/trasz_limits/share/mk/bsd.libnames.mk#4 integrate .. //depot/projects/soc2009/trasz_limits/share/mk/bsd.own.mk#3 integrate .. //depot/projects/soc2009/trasz_limits/share/mk/bsd.sys.mk#3 integrate .. //depot/projects/soc2009/trasz_limits/share/mk/sys.mk#2 integrate .. //depot/projects/soc2009/trasz_limits/share/security/lomac-policy.contexts#2 integrate .. //depot/projects/soc2009/trasz_limits/share/termcap/termcap.src#4 integrate .. //depot/projects/soc2009/trasz_limits/share/zoneinfo/asia#10 integrate .. //depot/projects/soc2009/trasz_limits/share/zoneinfo/northamerica#3 integrate .. //depot/projects/soc2009/trasz_limits/share/zoneinfo/zone.tab#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/io.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/local_apic.c#7 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/machdep.c#11 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/mem.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/mp_machdep.c#6 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/msi.c#6 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/pmap.c#11 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/sys_machdep.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/trap.c#8 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/conf/DEFAULTS#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/conf/GENERIC#10 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/conf/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/conf/NOTES#10 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/conf/XENHVM#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/ia32/ia32_reg.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/ia32/ia32_syscall.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/include/apicvar.h#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/include/cpufunc.h#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/include/iodev.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/isa/clock.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/arm/arm/busdma_machdep.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/arm/arm/cpufunc.c#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/arm/arm/cpufunc_asm_fa526.S#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/arm/db_trace.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/arm/arm/elf_trampoline.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/arm/arm/mem.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/arm/conf/CNS11XXNAS#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/conf/CRB#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/arm/conf/DEFAULTS#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/arm/conf/EP80219#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/arm/conf/GUMSTIX#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/arm/conf/IQ31244#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/arm/conf/SIMICS#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/arm/conf/SKYEYE#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/arm/econa/cfi_bus_econa.c#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/econa/econa.c#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/econa/econa_machdep.c#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/econa/econa_reg.h#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/econa/econa_var.h#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/econa/ehci_ebus.c#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/econa/files.econa#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/econa/if_ece.c#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/econa/if_ecereg.h#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/econa/if_ecevar.h#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/econa/ohci_ec.c#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/econa/std.econa#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/econa/timer.c#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/econa/uart_bus_ec.c#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/econa/uart_cpu_ec.c#1 branch .. //depot/projects/soc2009/trasz_limits/sys/arm/include/cpuconf.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/arm/include/cpufunc.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/boot/common/bootstrap.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/boot/common/dev_net.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/boot/common/module.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/boot/efi/include/efilib.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/boot/efi/libefi/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/boot/efi/libefi/efifs.c#2 delete .. //depot/projects/soc2009/trasz_limits/sys/boot/efi/libefi/efipart.c#1 branch .. //depot/projects/soc2009/trasz_limits/sys/boot/forth/loader.conf#6 integrate .. //depot/projects/soc2009/trasz_limits/sys/boot/ia64/efi/conf.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/boot/ia64/efi/main.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/boot/ia64/efi/version#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/boot/ofw/libofw/ofw_disk.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/Makefile.inc#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot0.5/selector.s#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot2/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot2/asm.S#2 delete .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot2/asm.h#2 delete .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot2/bios.S#3 delete .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot2/boot.c#3 delete .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot2/boot.h#3 delete .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot2/boot1.S#1 branch .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot2/boot2.S#2 delete .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot2/boot2.c#1 branch .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot2/dinode.h#2 delete .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot2/disk.c#3 delete .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot2/fs.h#2 delete .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot2/inode.h#2 delete .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot2/io.c#3 delete .. //depot/projects/soc2009/trasz_limits/sys/boot/pc98/boot2/probe_keyboard.c#2 delete >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Feb 1 11:13:51 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9B5A3106568D; Mon, 1 Feb 2010 11:13:51 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 476B21065694 for ; Mon, 1 Feb 2010 11:13:51 +0000 (UTC) (envelope-from jona@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1B76B8FC15 for ; Mon, 1 Feb 2010 11:13:51 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o11BDoTg034603 for ; Mon, 1 Feb 2010 11:13:50 GMT (envelope-from jona@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o11BDoII034601 for perforce@freebsd.org; Mon, 1 Feb 2010 11:13:50 GMT (envelope-from jona@FreeBSD.org) Date: Mon, 1 Feb 2010 11:13:50 GMT Message-Id: <201002011113.o11BDoII034601@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jona@FreeBSD.org using -f From: Jonathan Anderson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174074 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 11:13:51 -0000 http://p4web.freebsd.org/chv.cgi?CH=174074 Change 174074 by jona@jona-belle-freebsd8 on 2010/02/01 11:13:15 Added ld_fdlist_append(), plus one sanity check and the ability to ignore names in lc_fdlist_lookup() Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#6 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#6 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#5 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#6 $ */ #include @@ -296,6 +296,43 @@ int +lc_fdlist_append(struct lc_fdlist **to, struct lc_fdlist *from) { + + if ((to == NULL) || (*to == NULL) || (from == NULL)) { + errno = EINVAL; + return (-1); + } + + LOCK(*to); + LOCK(from); + + int pos = 0; + for (unsigned int i = 0; i < from->count; i++) { + char *subsystem; + char *classname; + char *name; + int fd; + + if (lc_fdlist_getentry(from, &subsystem, &classname, &name, &fd, + &pos) < 0) + return (-1); + + if (lc_fdlist_add(to, subsystem, classname, name, fd) < 0) { + free(subsystem); + return (-1); + } + + free(subsystem); + } + + UNLOCK(from); + UNLOCK(*to); + + return 0; +} + + +int lc_fdlist_addcap(struct lc_fdlist **fdlist, const char *subsystem, const char *id, const char *name, int fd, cap_rights_t rights) { @@ -311,7 +348,7 @@ const char *subsystem, const char *id, char **name, int *fdp, int *pos) { - if (l == NULL) { + if ((l == NULL) || (fdp == NULL)) { errno = EINVAL; return (-1); } @@ -337,8 +374,11 @@ !strncmp(id, names + entry->classoff, entry->classlen + 1))) { /* found a matching entry! */ - *name = malloc(entry->namelen + 1); - strncpy(*name, names + entry->nameoff, entry->namelen + 1); + if (name) { + *name = malloc(entry->namelen + 1); + strncpy(*name, names + entry->nameoff, + entry->namelen + 1); + } *fdp = entry->fd; From owner-p4-projects@FreeBSD.ORG Mon Feb 1 11:18:56 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9DA351065670; Mon, 1 Feb 2010 11:18:56 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 623BE106566B for ; Mon, 1 Feb 2010 11:18:56 +0000 (UTC) (envelope-from jona@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4F8B38FC1E for ; Mon, 1 Feb 2010 11:18:56 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o11BIuXx034945 for ; Mon, 1 Feb 2010 11:18:56 GMT (envelope-from jona@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o11BIuOK034943 for perforce@freebsd.org; Mon, 1 Feb 2010 11:18:56 GMT (envelope-from jona@FreeBSD.org) Date: Mon, 1 Feb 2010 11:18:56 GMT Message-Id: <201002011118.o11BIuOK034943@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jona@FreeBSD.org using -f From: Jonathan Anderson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174075 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 11:18:56 -0000 http://p4web.freebsd.org/chv.cgi?CH=174075 Change 174075 by jona@jona-belle-freebsd8 on 2010/02/01 11:18:35 Add lc_fdlist_append() to libcapsicum.h Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#6 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#6 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#5 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#6 $ */ #ifndef _LIBCAPABILITY_H_ @@ -81,6 +81,12 @@ const char *name, int fd); /* + * Append the contents of one list to another. + */ +int lc_fdlist_append(struct lc_fdlist **to, struct lc_fdlist *from); + + +/* * Like lc_fdlist_add(), but allows capability rights to be specified. The file * descriptor will be wrapped in a capability with the given rights (so if the * descriptor *is* a capability, its rights will be constrained according to this From owner-p4-projects@FreeBSD.ORG Mon Feb 1 11:19:58 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0B5471065694; Mon, 1 Feb 2010 11:19:57 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8889E106568F for ; Mon, 1 Feb 2010 11:19:57 +0000 (UTC) (envelope-from jona@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 75B628FC20 for ; Mon, 1 Feb 2010 11:19:57 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o11BJvdR035014 for ; Mon, 1 Feb 2010 11:19:57 GMT (envelope-from jona@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o11BJv3G035012 for perforce@freebsd.org; Mon, 1 Feb 2010 11:19:57 GMT (envelope-from jona@FreeBSD.org) Date: Mon, 1 Feb 2010 11:19:57 GMT Message-Id: <201002011119.o11BJv3G035012@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jona@FreeBSD.org using -f From: Jonathan Anderson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174076 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 11:19:58 -0000 http://p4web.freebsd.org/chv.cgi?CH=174076 Change 174076 by jona@jona-belle-freebsd8 on 2010/02/01 11:19:25 Added the weak symbol ld_libdirs() Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libc/gen/Makefile.inc#16 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libc/gen/Symbol.map#18 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#7 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libc/gen/Makefile.inc#16 (text+ko) ==== @@ -20,7 +20,7 @@ getpeereid.c getprogname.c getpwent.c getttyent.c \ getusershell.c getvfsbyname.c glob.c \ initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \ - ld_libcache.c ld_sandbox.c \ + ld_libcache.c ld_libdirs.c ld_sandbox.c \ lockf.c lrand48.c mrand48.c nftw.c nice.c \ nlist.c nrand48.c opendir.c \ pause.c pmadvise.c popen.c posix_spawn.c \ ==== //depot/projects/trustedbsd/capabilities/src/lib/libc/gen/Symbol.map#18 (text) ==== @@ -373,6 +373,7 @@ ld_libcache_add; ld_libcache_lookup; ld_insandbox; + ld_libdirs; }; FBSDprivate_1.0 { ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#7 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#6 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#7 $ */ #ifndef _LIBCAPABILITY_H_ @@ -224,6 +224,9 @@ int ld_libcache_lookup(const char *libname, int *fdp); int ld_insandbox(void); +/* If this call is successful, the caller is responsible for freeing 'fds'. */ +int ld_libdirs(int **fds); + /* * Applications may declare an alternative entry point to the default ELF * entry point for their binary, which will be used in preference to 'main' From owner-p4-projects@FreeBSD.ORG Mon Feb 1 14:04:44 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CEB141065692; Mon, 1 Feb 2010 14:04:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A631106568B for ; Mon, 1 Feb 2010 14:04:43 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 643678FC1A for ; Mon, 1 Feb 2010 14:04:43 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o11E4hXW063861 for ; Mon, 1 Feb 2010 14:04:43 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o11E4hFY063859 for perforce@freebsd.org; Mon, 1 Feb 2010 14:04:43 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 1 Feb 2010 14:04:43 GMT Message-Id: <201002011404.o11E4hFY063859@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174086 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 14:04:44 -0000 http://p4web.freebsd.org/chv.cgi?CH=174086 Change 174086 by rwatson@rwatson_vimage_client on 2010/02/01 14:03:47 Avoid passing lc_fdlist by reference to utility functions by adopting a static lc_fdlist pointer over the life time of the list, with the storage pointer being rewritten instead. The result is more locking friendly. Also correct some locking bugs. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#8 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.3#4 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#7 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#8 edit .. //depot/projects/trustedbsd/capabilities/src/tools/cap/fdlist/fdlist.c#8 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#8 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Robert N. M. Watson + * Copyright (c) 2009-2010 Robert N. M. Watson * All rights reserved. * * WARNING: THIS IS EXPERIMENTAL SECURITY SOFTWARE THAT MUST NOT BE RELIED @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#7 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#8 $ */ #ifndef _LIBCAPABILITY_H_ @@ -54,36 +54,33 @@ }; -/* A list of file descriptors, which can be passed around in shared memory */ +/* A list of file descriptors, which can be passed around in shared memory. */ struct lc_fdlist; struct lc_fdlist* lc_fdlist_new(void); struct lc_fdlist* lc_fdlist_global(void); -struct lc_fdlist* lc_fdlist_dup(struct lc_fdlist *orig); -void lc_fdlist_free(struct lc_fdlist *l); +struct lc_fdlist* lc_fdlist_dup(struct lc_fdlist *lfp_orig); +void lc_fdlist_free(struct lc_fdlist *lfp); - -/* Size of an FD list in bytes, including all associated string data */ -int lc_fdlist_size(struct lc_fdlist *l); +/* Size of an FD list in bytes, including all associated string data. */ +u_int lc_fdlist_size(struct lc_fdlist *lfp); - /* * Add a file descriptor to the list. * - * l the list to add to + * lfp the list to add to * subsystem a software component name, e.g. "org.freebsd.rtld-elf" * classname a class name, e.g. "libdir" or "library" * name an instance name, e.g. "system library dir" or "libc.so.6" * fd the file descriptor */ -int lc_fdlist_add(struct lc_fdlist **l, - const char *subsystem, const char *classname, - const char *name, int fd); +int lc_fdlist_add(struct lc_fdlist *lfp, const char *subsystem, + const char *classname, const char *name, int fd); /* * Append the contents of one list to another. */ -int lc_fdlist_append(struct lc_fdlist **to, struct lc_fdlist *from); +int lc_fdlist_append(struct lc_fdlist *to, struct lc_fdlist *from); /* @@ -92,7 +89,7 @@ * descriptor *is* a capability, its rights will be constrained according to this * rights mask) */ -int lc_fdlist_addcap(struct lc_fdlist **l, +int lc_fdlist_addcap(struct lc_fdlist *l, const char *subsystem, const char *classname, const char *name, int fd, cap_rights_t rights); @@ -104,17 +101,15 @@ * internally to skip entries which have already been seen. If 'pos' is 0 or NULL, * the first matching entry will be returned. */ -int lc_fdlist_lookup(struct lc_fdlist *l, - const char *subsystem, const char *classname, - char **name, int *fdp, int *pos); +int lc_fdlist_lookup(struct lc_fdlist *lfp, const char *subsystem, + const char *classname, char **name, int *fdp, int *pos); /* * Look up a file descriptor without a name. Repeated calls to this function will * iterate through all descriptors in the list. */ -int lc_fdlist_getentry(struct lc_fdlist *l, - char **subsystem, char **classname, - char **name, int *fdp, int *pos); +int lc_fdlist_getentry(struct lc_fdlist *lfp, char **subsystem, + char **classname, char **name, int *fdp, int *pos); /* * Reorder FD list (WARNING: this could be dangerous!). @@ -123,7 +118,7 @@ * a continuous array, starting at the FD given by 'start'. Any file descriptors * above 'start' which are not in the FD list are closed. */ -int lc_fdlist_reorder(struct lc_fdlist *l); +int lc_fdlist_reorder(struct lc_fdlist *lfp); /* * Capability interfaces. ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.3#4 (text+ko) ==== @@ -49,15 +49,15 @@ .Ft struct lc_fdlist * .Fn lc_fdlist_global "void" .Ft struct lc_fdlist * -.Fn lc_fdlist_dup "struct lc_fdlist *orig" +.Fn lc_fdlist_dup "struct lc_fdlist *lfp" .Ft void -.Fn lc_fdlist_free "struct lc_fdlist *l" +.Fn lc_fdlist_free "struct lc_fdlist *lfp" .Ft int -.Fn lc_fdlist_add "struct lc_fdlist **l" "const char *subsystem" "const char *classname" "const char *name" "int fd" +.Fn lc_fdlist_add "struct lc_fdlist *lfp" "const char *subsystem" "const char *classname" "const char *name" "int fd" .Ft int -.Fn lc_fdlist_addcap "struct lc_fdlist **l" "const char *subsystem" "const char *classname" "const char *name" "int fd" "cap_rights_t rights" +.Fn lc_fdlist_addcap "struct lc_fdlist *lfp" "const char *subsystem" "const char *classname" "const char *name" "int fd" "cap_rights_t rights" .Ft int -.Fn lc_fdlist_lookup "struct lc_fdlist *l" "const char *subsystem" "const char **name" "int *fdp" "int *pos" +.Fn lc_fdlist_lookup "struct lc_fdlist *lfp" "const char *subsystem" "const char **name" "int *fdp" "int *pos" .Sh DESCRIPTION These .Nm @@ -132,7 +132,7 @@ and .Fa name to the file descriptor list -.Fa l . +.Fa lfp . .Fn lc_fdlist_add is identical except that it further registers a capability mask to apply to the descriptor during sandbox creation, avoiding the need for separate calls @@ -146,7 +146,7 @@ and .Fa name from the file descriptor list -.Fa l . +.Fa lfp . .Sh RETURN VALUES The .Fn lc_fdlist_new , ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#7 (text+ko) ==== @@ -1,5 +1,6 @@ /*- * Copyright (c) 2009 Jonathan Anderson + * Copyright (c) 2010 Robert N. M. Watson * All rights reserved. * * WARNING: THIS IS EXPERIMENTAL SECURITY SOFTWARE THAT MUST NOT BE RELIED @@ -30,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#6 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#7 $ */ #include @@ -53,7 +54,7 @@ unsigned int syslen; /* length of above */ unsigned int classoff; /* offset of variable ID e.g. "libs" */ - unsigned int classlen; /* length of above */ + unsigned int classnamelen; /* length of above */ unsigned int nameoff; /* offset of entry name (e.g. "libc.so.7") */ unsigned int namelen; /* length of above */ @@ -62,7 +63,7 @@ }; -struct lc_fdlist { +struct lc_fdlist_storage { unsigned int count; /* number of entries */ unsigned int capacity; /* entries that we can hold */ @@ -70,58 +71,78 @@ unsigned int namelen; /* bytes of name data */ unsigned int namecapacity; /* bytes of name data we can hold */ - pthread_mutex_t lock; /* for thread safety */ - struct lc_fdlist_entry entries[]; /* entries in the descriptor list */ /* followed by bytes of name data */ }; +struct lc_fdlist { + pthread_mutex_t lf_lock; /* for thread safety */ + struct lc_fdlist_storage *lf_storage; +}; +#define LOCK(lfp) pthread_mutex_lock(&((lfp)->lf_lock)); +#define UNLOCK(lfp) pthread_mutex_unlock(&((lfp)->lf_lock)); - -#define LOCK(l) pthread_mutex_lock(&((l)->lock)); -#define UNLOCK(l) pthread_mutex_unlock(&((l)->lock)); - /* Where an FD list's name byte array starts */ -char* lc_fdlist_names(struct lc_fdlist *l); +static char *lc_fdlist_storage_names(struct lc_fdlist_storage *lfsp); +static u_int lc_fdlist_storage_size(struct lc_fdlist_storage *lfsp); +static struct lc_fdlist global_fdlist = { + .lf_lock = PTHREAD_MUTEX_INITIALIZER, +}; -struct lc_fdlist *global_fdlist = NULL; +struct lc_fdlist * +lc_fdlist_global(void) +{ + char *env; + /* + * global_fdlist.lf_storage is set to a non-NULL value after the + * first call, and will never change; global_fdlist is only valid + * once it has non-NULL storage. + */ + LOCK(&global_fdlist); + if (global_fdlist.lf_storage != NULL) { + UNLOCK(&global_fdlist); + return (&global_fdlist); + } -struct lc_fdlist* -lc_fdlist_global(void) { + env = getenv(LIBCAPABILITY_SANDBOX_FDLIST); + if ((env != NULL) && (strnlen(env, 8) < 7)) { + struct lc_fdlist_storage *lfsp; + struct stat sb; + int fd = -1; - if (global_fdlist == NULL) { + /* XXX: Should use strtol(3). */ + for (int i = 0; (i < 7) && env[i]; i++) { + if ((env[i] < '0') || (env[i] > '9')) + goto fail; + } + if (sscanf(env, "%d", &fd) != 1) + goto fail; + if (fd < 0) + goto fail; + if (fstat(fd, &sb) < 0) + goto fail; + lfsp = mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, + MAP_NOSYNC | MAP_SHARED, fd, 0); + if (lfsp == NULL) + goto fail; - char *env = getenv(LIBCAPABILITY_SANDBOX_FDLIST); - - if ((env != NULL) && (strnlen(env, 8) < 7)) { - - for (int i = 0; (i < 7) && env[i]; i++) - if ((env[i] < '0') || (env[i] > '9')) - return NULL; - - int fd = -1; - if (sscanf(env, "%d", &fd) != 1) - return NULL; - - if (fd < 0) - return NULL; - - struct stat stats; - if (fstat(fd, &stats) < 0) - return NULL; - - global_fdlist = mmap(NULL, stats.st_size, - PROT_READ | PROT_WRITE, - MAP_NOSYNC | MAP_SHARED, fd, 0); - } + /* + * XXX: Should perform additional validation of shared memory + * to make sure sizes/etc are internally consistent. + */ + global_fdlist.lf_storage = lfsp; } + return (&global_fdlist); - return global_fdlist; +fail: + /* XXX: We don't always set errno before returning. */ + UNLOCK(&global_fdlist); + return (NULL); } @@ -129,192 +150,195 @@ #define INITIAL_NAMEBYTES (64 * INITIAL_ENTRIES) -struct lc_fdlist* -lc_fdlist_new(void) { +struct lc_fdlist * +lc_fdlist_new(void) +{ + struct lc_fdlist_storage *lfsp; + struct lc_fdlist *lfp; + u_int bytes; - int bytes = sizeof(struct lc_fdlist) - + INITIAL_ENTRIES * sizeof(struct lc_fdlist_entry) - + INITIAL_NAMEBYTES; - - struct lc_fdlist *fdlist = malloc(bytes); - if (fdlist == NULL) return (NULL); - - fdlist->count = 0; - fdlist->capacity = INITIAL_ENTRIES; - fdlist->namelen = 0; - fdlist->namecapacity = INITIAL_NAMEBYTES; - - if (pthread_mutex_init(&fdlist->lock, NULL)) { - free(fdlist); - return NULL; + lfp = malloc(sizeof(*lfp)); + bytes = sizeof(*lfsp) + + INITIAL_ENTRIES * sizeof(struct lc_fdlist_entry) + + INITIAL_NAMEBYTES; + lfsp = lfp->lf_storage = malloc(bytes); + if (lfsp == NULL) { + free(lfp); + return (NULL); + } + lfsp->count = 0; + lfsp->capacity = INITIAL_ENTRIES; + lfsp->namelen = 0; + lfsp->namecapacity = INITIAL_NAMEBYTES; + if (pthread_mutex_init(&lfp->lf_lock, NULL) != 0) { + free(lfp->lf_storage); + free(lfp); + return (NULL); } - - return fdlist; + return (lfp); } +struct lc_fdlist * +lc_fdlist_dup(struct lc_fdlist *lfp_orig) +{ + struct lc_fdlist *lfp_new; + u_int size; -struct lc_fdlist* -lc_fdlist_dup(struct lc_fdlist *orig) { - - LOCK(orig); - - int size = lc_fdlist_size(orig); - struct lc_fdlist *copy = NULL; - - if (size > 0) { - copy = malloc(size); - if (copy != NULL) memcpy(copy, orig, size); + lfp_new = malloc(sizeof(*lfp_new)); + if (lfp_new == NULL) + return (NULL); + if (pthread_mutex_init(&lfp_new->lf_lock, NULL) != 0) { + free(lfp_new); + return (NULL); + } + LOCK(lfp_orig); + size = lc_fdlist_storage_size(lfp_orig->lf_storage); + lfp_new->lf_storage = malloc(size); + if (lfp_new->lf_storage == NULL) { + UNLOCK(lfp_orig); + pthread_mutex_destroy(&lfp_new->lf_lock); + free(lfp_new); + return (NULL); } - - UNLOCK(orig); - - return copy; + memcpy(lfp_new->lf_storage, lfp_orig->lf_storage, size); + UNLOCK(lfp_orig); + return (lfp_new); } - void -lc_fdlist_free(struct lc_fdlist *l) { +lc_fdlist_free(struct lc_fdlist *lfp) +{ - LOCK(l); - - pthread_mutex_destroy(&l->lock); - free(l); + free(lfp->lf_storage); + pthread_mutex_destroy(&lfp->lf_lock); + free(lfp); } - - int -lc_fdlist_add(struct lc_fdlist **fdlist, - const char *subsystem, const char *id, - const char *name, int fd) { +lc_fdlist_add(struct lc_fdlist *lfp, const char *subsystem, + const char *classname, const char *name, int fd) +{ + struct lc_fdlist_storage *lfsp; - struct lc_fdlist *l = *fdlist; + LOCK(lfp); + lfsp = lfp->lf_storage; - if (l == NULL) { + /* Do we need more entry space? */ + if (lfsp->count == lfsp->capacity) { + u_int namebytes_per_entry, newnamebytes, newsize; + struct lc_fdlist_storage *lfsp_copy; + char *tmp = NULL; - errno = EINVAL; - return -1; - } - - LOCK(l); - - /* do we need more entry space? */ - if (l->count == l->capacity) { - - /* move name data out of the way */ - char *tmp = NULL; - if (l->namelen > 0) { - tmp = malloc(l->namelen); + /* Copy name data out of the way. */ + if (lfsp->namelen > 0) { + tmp = malloc(lfsp->namelen); if (tmp == NULL) { - UNLOCK(l); + UNLOCK(lfp); return (-1); } - - memcpy(tmp, lc_fdlist_names(l), l->namelen); + memcpy(tmp, lc_fdlist_storage_names(lfsp), + lfsp->namelen); } - /* double the number of available entries */ - int namebytes_per_entry = l->namecapacity / l->capacity; - int newnamebytes = l->capacity * namebytes_per_entry; - - int newsize = lc_fdlist_size(l) + newnamebytes - + l->capacity * sizeof(struct lc_fdlist_entry); - - struct lc_fdlist *copy = realloc(l, newsize); - if (copy == NULL) { + /* Double the number of available entries. */ + namebytes_per_entry = lfsp->namecapacity / lfsp->capacity; + newnamebytes = lfsp->capacity * namebytes_per_entry; + newsize = lc_fdlist_storage_size(lfsp) + newnamebytes + + lfsp->capacity * sizeof(struct lc_fdlist_entry); + lfsp_copy = realloc(lfsp, newsize); + if (lfsp_copy == NULL) { free(tmp); - UNLOCK(l); + UNLOCK(lfp); return (-1); } - copy->capacity *= 2; - copy->namecapacity += newnamebytes; + lfsp_copy->capacity *= 2; + lfsp_copy->namecapacity += newnamebytes; - /* copy name bytes back */ - if (copy->namelen > 0) - memcpy(lc_fdlist_names(copy), tmp, copy->namelen); + /* Copy name bytes back. */ + if (lfsp_copy->namelen > 0) + memcpy(lc_fdlist_storage_names(lfsp_copy), tmp, + lfsp_copy->namelen); + free(lfsp); + lfsp = lfp->lf_storage = lfsp_copy; free(tmp); - - *fdlist = copy; - l = *fdlist; } + /* Do we need more name space? */ + u_int subsyslen = strlen(subsystem); + u_int classnamelen = strlen(classname); + u_int namelen = strlen(name); - /* do we need more name space? */ - int subsyslen = strlen(subsystem); - int classlen = strlen(id); - int namelen = strlen(name); + if ((lfsp->namelen + subsyslen + classnamelen + namelen) >= + lfsp->namecapacity) { - if ((l->namelen + subsyslen + classlen + namelen) >= l->namecapacity) { + /* Double the name capacity. */ + struct lc_fdlist_storage *lfsp_enlarged; - /* double the name capacity */ - struct lc_fdlist* enlarged - = realloc(l, lc_fdlist_size(l) + l->namecapacity); - - if (enlarged == NULL) { - UNLOCK(l); + lfsp_enlarged = realloc(lfsp, lc_fdlist_storage_size(lfsp) + + lfsp->namecapacity); + if (lfsp_enlarged == NULL) { + UNLOCK(lfp); return (-1); } - enlarged->namecapacity *= 2; - *fdlist = enlarged; - l = *fdlist; + lfsp_enlarged->namecapacity *= 2; + lfsp = lfp->lf_storage = lfsp_enlarged; } - - /* create the new entry */ - struct lc_fdlist_entry *entry = l->entries + l->count; + /* Create the new entry. */ + struct lc_fdlist_entry *entry = lfsp->entries + lfsp->count; entry->fd = fd; - char *names = lc_fdlist_names(l); - char *head = names + l->namelen; + char *names = lc_fdlist_storage_names(lfsp); + char *head = names + lfsp->namelen; strncpy(head, subsystem, subsyslen + 1); entry->sysoff = (head - names); entry->syslen = subsyslen; head += subsyslen + 1; - strncpy(head, id, classlen + 1); + strncpy(head, classname, classnamelen + 1); entry->classoff = (head - names); - entry->classlen = classlen; - head += classlen + 1; + entry->classnamelen = classnamelen; + head += classnamelen + 1; strncpy(head, name, namelen + 1); entry->nameoff = (head - names); entry->namelen = namelen + 1; head += namelen + 1; - l->count++; - l->namelen = (head - names); + lfsp->count++; + lfsp->namelen = (head - names); - UNLOCK(l); - - return 0; + UNLOCK(lfp); + return (0); } - int -lc_fdlist_append(struct lc_fdlist **to, struct lc_fdlist *from) { +lc_fdlist_append(struct lc_fdlist *to, struct lc_fdlist *from) +{ + int pos = 0; - if ((to == NULL) || (*to == NULL) || (from == NULL)) { - errno = EINVAL; - return (-1); + /* Use address to order lc_fdlist locks. */ + if ((uintptr_t)to < (uintptr_t)from) { + LOCK(to); + LOCK(from); + } else { + LOCK(from); + LOCK(to); } - LOCK(*to); - LOCK(from); - - int pos = 0; - for (unsigned int i = 0; i < from->count; i++) { + for (unsigned int i = 0; i < from->lf_storage->count; i++) { char *subsystem; char *classname; char *name; int fd; - if (lc_fdlist_getentry(from, &subsystem, &classname, &name, &fd, - &pos) < 0) + if (lc_fdlist_getentry(from, &subsystem, &classname, &name, + &fd, &pos) < 0) return (-1); if (lc_fdlist_add(to, subsystem, classname, name, fd) < 0) { @@ -326,52 +350,53 @@ } UNLOCK(from); - UNLOCK(*to); - - return 0; + UNLOCK(to); + return (0); } - int -lc_fdlist_addcap(struct lc_fdlist **fdlist, - const char *subsystem, const char *id, - const char *name, int fd, cap_rights_t rights) { +lc_fdlist_addcap(struct lc_fdlist *fdlist, const char *subsystem, + const char *classname, const char *name, int fd, cap_rights_t rights) +{ + int capfd; - int cap = cap_new(fd, rights); - - return lc_fdlist_add(fdlist, subsystem, id, name, cap); + /* + * XXXRW: This API isn't particularly caller-friendly, in that it + * allocates a descriptor that the caller is responsible for freeing, + * but doesn't tell the caller what fd that is. Not yet clear what + * the preferred API is. + */ + capfd = cap_new(fd, rights); + if (capfd < 0) + return (-1); + return (lc_fdlist_add(fdlist, subsystem, classname, name, capfd)); } - int -lc_fdlist_lookup(struct lc_fdlist *l, - const char *subsystem, const char *id, char **name, int *fdp, - int *pos) { +lc_fdlist_lookup(struct lc_fdlist *lfp, const char *subsystem, + const char *classname, char **name, int *fdp, int *pos) +{ + struct lc_fdlist_storage *lfsp; - if ((l == NULL) || (fdp == NULL)) { - errno = EINVAL; - return (-1); - } - - LOCK(l); - - if ((pos != NULL) && (*pos >= (int) l->count)) { - UNLOCK(l); + LOCK(lfp); + lfsp = lfp->lf_storage; + if ((pos != NULL) && (*pos >= (int)lfsp->count)) { + UNLOCK(lfp); errno = EINVAL; return (-1); } int successful = 0; - const char *names = lc_fdlist_names(l); + const char *names = lc_fdlist_storage_names(lfsp); - for (unsigned int i = (pos ? *pos : 0); i < l->count; i++) { - - struct lc_fdlist_entry *entry = l->entries + i; + for (unsigned int i = (pos ? *pos : 0); i < lfsp->count; i++) { + struct lc_fdlist_entry *entry = lfsp->entries + i; if ((!subsystem || - !strncmp(subsystem, names + entry->sysoff, entry->syslen + 1)) - && (!id || - !strncmp(id, names + entry->classoff, entry->classlen + 1))) { + !strncmp(subsystem, names + entry->sysoff, + entry->syslen + 1)) + && (!classname || !strncmp(classname, names + + entry->classoff, entry->classnamelen + 1))) { /* found a matching entry! */ if (name) { @@ -389,41 +414,39 @@ } } - UNLOCK(l); + UNLOCK(lfp); - if (successful) return 0; - else { - errno = ENOENT; - return (-1); - } + if (successful) + return (0); + errno = ENOENT; + return (-1); } - int -lc_fdlist_getentry(struct lc_fdlist *l, - char **subsystem, char **classname, - char **name, int *fdp, int *pos) { +lc_fdlist_getentry(struct lc_fdlist *lfp, char **subsystem, char **classname, + char **name, int *fdp, int *pos) +{ + struct lc_fdlist_storage *lfsp; - LOCK(l); - - if ((pos == NULL) || (*pos < 0) || (*pos >= (int) l->count) + LOCK(lfp); + lfsp = lfp->lf_storage; + if ((pos == NULL) || (*pos < 0) || (*pos >= (int) lfsp->count) || (subsystem == NULL) || (classname == NULL) || (name == NULL) || (fdp == NULL)) { - errno = EINVAL; return (-1); } - struct lc_fdlist_entry *entry = l->entries + *pos; - char *names = lc_fdlist_names(l); - int size = entry->syslen + entry->classlen + entry->namelen; + struct lc_fdlist_entry *entry = lfsp->entries + *pos; + char *names = lc_fdlist_storage_names(lfsp); + int size = entry->syslen + entry->classnamelen + entry->namelen; char *head = malloc(size); strncpy(head, names + entry->sysoff, entry->syslen + 1); *subsystem = head; head += size; - strncpy(head, names + entry->classoff, entry->classlen + 1); + strncpy(head, names + entry->classoff, entry->classnamelen + 1); *classname = head; head += size; @@ -433,22 +456,26 @@ *fdp = entry->fd; - UNLOCK(l); + UNLOCK(lfp); (*pos)++; return 0; } - int -lc_fdlist_reorder(struct lc_fdlist *l) { +lc_fdlist_reorder(struct lc_fdlist *lfp) +{ + struct lc_fdlist_storage *lfsp; - LOCK(l); + LOCK(lfp); + lfsp = lfp->lf_storage; /* Do we really need to do this? */ - if (l->count == 0) + if (lfsp->count == 0) { + UNLOCK(lfp); return (0); + } /* * Identify the highest source file descriptor we care about so that @@ -456,74 +483,68 @@ * we care about. */ int highestfd = -1; - for (unsigned int i = 0; i < l->count; i++) { - if (l->entries[i].fd > highestfd) - highestfd = l->entries[i].fd; + for (unsigned int i = 0; i < lfsp->count; i++) { + if (lfsp->entries[i].fd > highestfd) + highestfd = lfsp->entries[i].fd; } highestfd++; /* Don't tread on the highest */ /* * First, move all our descriptors up the range. */ - for (unsigned int i = 0; i < l->count; i++) { - if (dup2(l->entries[i].fd, highestfd + i) < 0) + for (unsigned int i = 0; i < lfsp->count; i++) { + if (dup2(lfsp->entries[i].fd, highestfd + i) < 0) { + UNLOCK(lfp); return (-1); + } } /* * Now put them back. */ - for (unsigned int i = 0; i < l->count; i++) { - if (dup2(highestfd + i, i) < 0) + for (unsigned int i = 0; i < lfsp->count; i++) { + if (dup2(highestfd + i, i) < 0) { + UNLOCK(lfp); return (-1); + } - l->entries[i].fd = i; + lfsp->entries[i].fd = i; } /* * Close the descriptors that we moved, as well as any others that * were left open by the caller. */ - closefrom(l->count); + closefrom(lfsp->count); + UNLOCK(lfp); - return 0; + return (0); } +static u_int +lc_fdlist_storage_size(struct lc_fdlist_storage *lfsp) +{ -int -lc_fdlist_size(struct lc_fdlist* l) { + return (sizeof(*lfsp) + + lfsp->capacity * sizeof(struct lc_fdlist_entry) + + lfsp->namecapacity); +} - LOCK(l); +u_int +lc_fdlist_size(struct lc_fdlist *lfp) +{ + u_int size; - if (l == NULL) { - errno = EINVAL; - return (-1); - } - - int size = sizeof(struct lc_fdlist) - + l->capacity * sizeof(struct lc_fdlist_entry) - + l->namecapacity; - - UNLOCK(l); - - return size; + LOCK(lfp); + size = lc_fdlist_storage_size(lfp->lf_storage); + UNLOCK(lfp); + return (size); } +static char * +lc_fdlist_storage_names(struct lc_fdlist_storage *lfsp) +{ -char* -lc_fdlist_names(struct lc_fdlist *l) { - - LOCK(l); - - if (l == NULL) { - errno = EINVAL; - return NULL; - } - - char *names = ((char*) l) + lc_fdlist_size(l) - l->namecapacity; - - UNLOCK(l); - - return names; + return (((char *) lfsp) + lc_fdlist_storage_size(lfsp) - + lfsp->namecapacity); } - ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#8 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#7 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#8 $ */ #include @@ -181,25 +181,25 @@ if (munmap(shm, fdlistsize)) return; - if (lc_fdlist_addcap(&fds, "org.freebsd.libcapsicum", "/dev/null", "", + if (lc_fdlist_addcap(fds, "org.freebsd.libcapsicum", "/dev/null", "", fd_devnull, LIBCAPABILITY_CAPMASK_DEVNULL) < 0) return; - if (lc_fdlist_addcap(&fds, "org.freebsd.libcapsicum", "sandbox", "", + if (lc_fdlist_addcap(fds, "org.freebsd.libcapsicum", "sandbox", "", fd_sandbox, LIBCAPABILITY_CAPMASK_SANDBOX) < 0) return; - if (lc_fdlist_addcap(&fds, "org.freebsd.libcapsicum", "socket", "", + if (lc_fdlist_addcap(fds, "org.freebsd.libcapsicum", "socket", "", fd_sock, LIBCAPABILITY_CAPMASK_SOCK) < 0) return; - if (lc_fdlist_addcap(&fds, "org.freebsd.rtld-elf-cap", "ldso", "", + if (lc_fdlist_addcap(fds, "org.freebsd.rtld-elf-cap", "ldso", "", fd_ldso, LIBCAPABILITY_CAPMASK_LDSO) < 0) return; - if (lc_fdlist_addcap(&fds, "org.freebsd.rtld-elf-cap", "lib", "libc", + if (lc_fdlist_addcap(fds, "org.freebsd.rtld-elf-cap", "lib", "libc", fd_libc, LIBCAPABILITY_CAPMASK_LIB) < 0) return; - if (lc_fdlist_addcap(&fds, "org.freebsd.rtld-elf-cap", "lib", "libcapsicum", + if (lc_fdlist_addcap(fds, "org.freebsd.rtld-elf-cap", "lib", "libcapsicum", fd_libcapsicum, LIBCAPABILITY_CAPMASK_LIB) < 0) return; - if (lc_fdlist_addcap(&fds, "org.freebsd.rtld-elf-cap", "lib", "libsbuf", + if (lc_fdlist_addcap(fds, "org.freebsd.rtld-elf-cap", "lib", "libsbuf", fd_libsbuf, LIBCAPABILITY_CAPMASK_LIB) < 0) return; /* ==== //depot/projects/trustedbsd/capabilities/src/tools/cap/fdlist/fdlist.c#8 (text+ko) ==== @@ -47,7 +47,7 @@ -void print_fdlist(struct lc_fdlist* fds); +static void print_fdlist(struct lc_fdlist *lfp); /* @@ -65,41 +65,41 @@ /* create an FD list and add some junk to it */ - struct lc_fdlist *fds = lc_fdlist_new(); - if (fds == NULL) err(-1, "Error in lc_fdlist_new()"); + struct lc_fdlist *lfp = lc_fdlist_new(); + if (lfp == NULL) err(-1, "Error in lc_fdlist_new()"); - lc_fdlist_addcap(&fds, "org.freebsd.Capsicum.fdlist", "stdin", "", + lc_fdlist_addcap(lfp, "org.freebsd.Capsicum.fdlist", "stdin", "", 0, CAP_READ); - lc_fdlist_addcap(&fds, "org.freebsd.Capsicum.fdlist", "stdout", "", + lc_fdlist_addcap(lfp, "org.freebsd.Capsicum.fdlist", "stdout", "", 1, CAP_WRITE | CAP_SEEK); - lc_fdlist_addcap(&fds, "org.freebsd.Capsicum.fdlist", "stderr", "", + lc_fdlist_addcap(lfp, "org.freebsd.Capsicum.fdlist", "stderr", "", 2, CAP_WRITE | CAP_SEEK); - lc_fdlist_add(&fds, "org.freebsd.Capsicum.fdlist", "testfile", + lc_fdlist_add(lfp, "org.freebsd.Capsicum.fdlist", "testfile", "/etc/passwd", open("/etc/passwd", O_RDONLY)); - lc_fdlist_addcap(&fds, "org.freebsd.Capsicum.fdlist", "testfile", + lc_fdlist_addcap(lfp, "org.freebsd.Capsicum.fdlist", "testfile", "/etc/group", open("/etc/group", O_RDONLY), CAP_READ); - lc_fdlist_add(&fds, "org.freebsd.Capsicum.fdlist", "fdlist", + lc_fdlist_add(lfp, "org.freebsd.Capsicum.fdlist", "fdlist", >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Feb 1 14:09:49 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 15DAC10656A5; Mon, 1 Feb 2010 14:09:49 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B60961065679 for ; Mon, 1 Feb 2010 14:09:48 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A0B2E8FC0A for ; Mon, 1 Feb 2010 14:09:48 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o11E9mkm064374 for ; Mon, 1 Feb 2010 14:09:48 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o11E9mWN064372 for perforce@freebsd.org; Mon, 1 Feb 2010 14:09:48 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 1 Feb 2010 14:09:48 GMT Message-Id: <201002011409.o11E9mWN064372@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174087 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 14:09:49 -0000 http://p4web.freebsd.org/chv.cgi?CH=174087 Change 174087 by rwatson@rwatson_vimage_client on 2010/02/01 14:08:49 Layout fixes, comment that we'll make the _size a private function. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#9 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#9 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#8 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#9 $ */ #ifndef _LIBCAPABILITY_H_ @@ -53,16 +53,20 @@ int lcl_fd; }; - -/* A list of file descriptors, which can be passed around in shared memory. */ +/* + * A list of file descriptors, which can be passed around in shared memory. + */ struct lc_fdlist; +struct lc_fdlist *lc_fdlist_new(void); +struct lc_fdlist *lc_fdlist_global(void); +struct lc_fdlist *lc_fdlist_dup(struct lc_fdlist *lfp_orig); +void lc_fdlist_free(struct lc_fdlist *lfp); -struct lc_fdlist* lc_fdlist_new(void); -struct lc_fdlist* lc_fdlist_global(void); -struct lc_fdlist* lc_fdlist_dup(struct lc_fdlist *lfp_orig); -void lc_fdlist_free(struct lc_fdlist *lfp); - -/* Size of an FD list in bytes, including all associated string data. */ +/* + * Size of an FD list in bytes, including all associated string data. + * + * XXX: This will probably become library-private soon. + */ u_int lc_fdlist_size(struct lc_fdlist *lfp); /* @@ -84,29 +88,29 @@ /* - * Like lc_fdlist_add(), but allows capability rights to be specified. The file - * descriptor will be wrapped in a capability with the given rights (so if the - * descriptor *is* a capability, its rights will be constrained according to this - * rights mask) + * Like lc_fdlist_add(), but allows capability rights to be specified. The + * file descriptor will be wrapped in a capability with the given rights (so + * if the descriptor *is* a capability, its rights will be constrained + * according to this rights mask.) */ -int lc_fdlist_addcap(struct lc_fdlist *l, - const char *subsystem, const char *classname, - const char *name, int fd, cap_rights_t rights); +int lc_fdlist_addcap(struct lc_fdlist *l, const char *subsystem, + const char *classname, const char *name, int fd, + cap_rights_t rights); /* * Look up a file descriptor. * * Multiple entries with the same classname are allowed, so iterating through - * all instances of a class is done by supplying an integer 'pos' which is used - * internally to skip entries which have already been seen. If 'pos' is 0 or NULL, - * the first matching entry will be returned. + * all instances of a class is done by supplying an integer 'pos' which is + * used internally to skip entries which have already been seen. If 'pos' is + * 0 or NULL, the first matching entry will be returned. */ int lc_fdlist_lookup(struct lc_fdlist *lfp, const char *subsystem, const char *classname, char **name, int *fdp, int *pos); /* - * Look up a file descriptor without a name. Repeated calls to this function will - * iterate through all descriptors in the list. + * Look up a file descriptor without a name. Repeated calls to this function + * will iterate through all descriptors in the list. */ int lc_fdlist_getentry(struct lc_fdlist *lfp, char **subsystem, char **classname, char **name, int *fdp, int *pos); @@ -114,9 +118,9 @@ /* * Reorder FD list (WARNING: this could be dangerous!). * - * This call takes all of the file descriptors in the FD list, and moves them into - * a continuous array, starting at the FD given by 'start'. Any file descriptors - * above 'start' which are not in the FD list are closed. + * This call takes all of the file descriptors in the FD list, and moves them + * into a continuous array, starting at the FD given by 'start'. Any file + * descriptors above 'start' which are not in the FD list are closed. */ int lc_fdlist_reorder(struct lc_fdlist *lfp); From owner-p4-projects@FreeBSD.ORG Mon Feb 1 14:17:57 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6006D1065786; Mon, 1 Feb 2010 14:17:57 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23D691065783 for ; Mon, 1 Feb 2010 14:17:57 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0EBC18FC24 for ; Mon, 1 Feb 2010 14:17:57 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o11EHu9X065316 for ; Mon, 1 Feb 2010 14:17:56 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o11EHuUh065314 for perforce@freebsd.org; Mon, 1 Feb 2010 14:17:56 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 1 Feb 2010 14:17:56 GMT Message-Id: <201002011417.o11EHuUh065314@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174089 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 14:17:57 -0000 http://p4web.freebsd.org/chv.cgi?CH=174089 Change 174089 by rwatson@rwatson_vimage_client on 2010/02/01 14:17:02 Clean up style in a few places. Properly handle lock unwinding in append. Comment on lock recursion. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#8 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#8 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#7 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#8 $ */ #include @@ -47,31 +47,22 @@ #include "libcapsicum_sandbox_api.h" - struct lc_fdlist_entry { - - unsigned int sysoff; /* offset of e.g. "org.freebsd.rtld-elf-cap" */ - unsigned int syslen; /* length of above */ - - unsigned int classoff; /* offset of variable ID e.g. "libs" */ - unsigned int classnamelen; /* length of above */ - - unsigned int nameoff; /* offset of entry name (e.g. "libc.so.7") */ - unsigned int namelen; /* length of above */ - + u_int sysoff; /* offset of e.g. "org.freebsd.rtld-elf-cap" */ + u_int syslen; /* length of above */ + u_int classoff; /* offset of variable ID e.g. "libs" */ + u_int classnamelen; /* length of above */ + u_int nameoff; /* offset of entry name (e.g. "libc.so.7") */ + u_int namelen; /* length of above */ int fd; /* the file descriptor */ }; - struct lc_fdlist_storage { - - unsigned int count; /* number of entries */ - unsigned int capacity; /* entries that we can hold */ - - unsigned int namelen; /* bytes of name data */ - unsigned int namecapacity; /* bytes of name data we can hold */ - - struct lc_fdlist_entry entries[]; /* entries in the descriptor list */ + u_int count; /* number of entries */ + u_int capacity; /* entries that we can hold */ + u_int namelen; /* bytes of name data */ + u_int namecapacity; /* bytes of name data we can hold */ + struct lc_fdlist_entry entries[]; /* entries in the descriptor list */ /* followed by bytes of name data */ }; @@ -88,7 +79,6 @@ static char *lc_fdlist_storage_names(struct lc_fdlist_storage *lfsp); static u_int lc_fdlist_storage_size(struct lc_fdlist_storage *lfsp); - static struct lc_fdlist global_fdlist = { .lf_lock = PTHREAD_MUTEX_INITIALIZER, }; @@ -145,11 +135,9 @@ return (NULL); } - #define INITIAL_ENTRIES 16 #define INITIAL_NAMEBYTES (64 * INITIAL_ENTRIES) - struct lc_fdlist * lc_fdlist_new(void) { @@ -296,19 +284,19 @@ char *head = names + lfsp->namelen; strncpy(head, subsystem, subsyslen + 1); - entry->sysoff = (head - names); - entry->syslen = subsyslen; - head += subsyslen + 1; + entry->sysoff = (head - names); + entry->syslen = subsyslen; + head += subsyslen + 1; strncpy(head, classname, classnamelen + 1); entry->classoff = (head - names); - entry->classnamelen = classnamelen; - head += classnamelen + 1; + entry->classnamelen = classnamelen; + head += classnamelen + 1; strncpy(head, name, namelen + 1); - entry->nameoff = (head - names); - entry->namelen = namelen + 1; - head += namelen + 1; + entry->nameoff = (head - names); + entry->namelen = namelen + 1; + head += namelen + 1; lfsp->count++; lfsp->namelen = (head - names); @@ -331,27 +319,34 @@ LOCK(to); } - for (unsigned int i = 0; i < from->lf_storage->count; i++) { + for (u_int i = 0; i < from->lf_storage->count; i++) { char *subsystem; char *classname; char *name; int fd; + /* + * XXXRW: This recurses the from lock. + */ if (lc_fdlist_getentry(from, &subsystem, &classname, &name, &fd, &pos) < 0) - return (-1); + goto fail; + /* + * XXXRW: This recurses the to lock. + */ if (lc_fdlist_add(to, subsystem, classname, name, fd) < 0) { free(subsystem); - return (-1); + goto fail; } - free(subsystem); } + return (0); +fail: UNLOCK(from); UNLOCK(to); - return (0); + return (-1); } int @@ -389,7 +384,7 @@ int successful = 0; const char *names = lc_fdlist_storage_names(lfsp); - for (unsigned int i = (pos ? *pos : 0); i < lfsp->count; i++) { + for (u_int i = (pos ? *pos : 0); i < lfsp->count; i++) { struct lc_fdlist_entry *entry = lfsp->entries + i; if ((!subsystem || @@ -406,16 +401,12 @@ } *fdp = entry->fd; - if (pos) *pos = i + 1; successful = 1; - break; } } - UNLOCK(lfp); - if (successful) return (0); errno = ENOENT; @@ -455,12 +446,10 @@ head += size; *fdp = entry->fd; - UNLOCK(lfp); (*pos)++; - - return 0; + return (0); } int @@ -483,7 +472,7 @@ * we care about. */ int highestfd = -1; - for (unsigned int i = 0; i < lfsp->count; i++) { + for (u_int i = 0; i < lfsp->count; i++) { if (lfsp->entries[i].fd > highestfd) highestfd = lfsp->entries[i].fd; } @@ -492,7 +481,7 @@ /* * First, move all our descriptors up the range. */ - for (unsigned int i = 0; i < lfsp->count; i++) { + for (u_int i = 0; i < lfsp->count; i++) { if (dup2(lfsp->entries[i].fd, highestfd + i) < 0) { UNLOCK(lfp); return (-1); @@ -502,7 +491,7 @@ /* * Now put them back. */ - for (unsigned int i = 0; i < lfsp->count; i++) { + for (u_int i = 0; i < lfsp->count; i++) { if (dup2(highestfd + i, i) < 0) { UNLOCK(lfp); return (-1); @@ -517,7 +506,6 @@ */ closefrom(lfsp->count); UNLOCK(lfp); - return (0); } From owner-p4-projects@FreeBSD.ORG Mon Feb 1 14:27:06 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A7D8E1065679; Mon, 1 Feb 2010 14:27:06 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C641106566B for ; Mon, 1 Feb 2010 14:27:06 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 57DBB8FC16 for ; Mon, 1 Feb 2010 14:27:06 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o11ER6Ux066253 for ; Mon, 1 Feb 2010 14:27:06 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o11ER6ej066251 for perforce@freebsd.org; Mon, 1 Feb 2010 14:27:06 GMT (envelope-from mav@freebsd.org) Date: Mon, 1 Feb 2010 14:27:06 GMT Message-Id: <201002011427.o11ER6ej066251@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174090 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 14:27:06 -0000 http://p4web.freebsd.org/chv.cgi?CH=174090 Change 174090 by mav@mav_mavtest on 2010/02/01 14:26:24 Report ATAPI packet size to ATA/SATA SIMs. Affected files ... .. //depot/projects/scottl-camlock/src/sbin/camcontrol/camcontrol.c#36 edit .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#75 edit .. //depot/projects/scottl-camlock/src/sys/cam/cam_ccb.h#39 edit .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#100 edit .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.h#35 edit .. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.c#50 edit .. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.h#29 edit .. //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#38 edit .. //depot/projects/scottl-camlock/src/sys/dev/siis/siis.h#15 edit Differences ... ==== //depot/projects/scottl-camlock/src/sbin/camcontrol/camcontrol.c#36 (text+ko) ==== @@ -1010,8 +1010,10 @@ printf(" ("); if (ata->valid & CTS_ATA_VALID_MODE) printf("%s, ", ata_mode2string(ata->mode)); + if ((ata->valid & CTS_ATA_VALID_ATAPI) && ata->atapi != 0) + printf("ATAPI %dbytes, ", ata->atapi); if (ata->valid & CTS_ATA_VALID_BYTECOUNT) - printf("PIO size %dbytes", ata->bytecount); + printf("PIO %dbytes", ata->bytecount); printf(")"); } else if (ccb->cts.transport == XPORT_SATA) { struct ccb_trans_settings_sata *sata = @@ -1022,8 +1024,10 @@ printf("SATA %d.x, ", sata->revision); if (sata->valid & CTS_SATA_VALID_MODE) printf("%s, ", ata_mode2string(sata->mode)); + if ((sata->valid & CTS_SATA_VALID_ATAPI) && sata->atapi != 0) + printf("ATAPI %dbytes, ", sata->atapi); if (sata->valid & CTS_SATA_VALID_BYTECOUNT) - printf("PIO size %dbytes", sata->bytecount); + printf("PIO %dbytes", sata->bytecount); printf(")"); } ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#75 (text+ko) ==== @@ -1334,7 +1334,20 @@ cts.protocol = path->device->protocol; cts.protocol_version = path->device->protocol_version; cts.proto_specific.valid = 0; - cts.xport_specific.valid = 0; + if (ident_buf) { + if (path->device->transport == XPORT_ATA) { + cts.xport_specific.ata.atapi = + ((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_16) ? 16 : + ((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_12) ? 12 : 0; + cts.xport_specific.ata.valid = CTS_ATA_VALID_ATAPI; + } else { + cts.xport_specific.sata.atapi = + ((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_16) ? 16 : + ((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_12) ? 12 : 0; + cts.xport_specific.sata.valid = CTS_SATA_VALID_ATAPI; + } + } else + cts.xport_specific.valid = 0; xpt_action((union ccb *)&cts); } ==== //depot/projects/scottl-camlock/src/sys/cam/cam_ccb.h#39 (text+ko) ==== @@ -823,8 +823,10 @@ u_int valid; /* Which fields to honor */ #define CTS_ATA_VALID_MODE 0x01 #define CTS_ATA_VALID_BYTECOUNT 0x02 +#define CTS_ATA_VALID_ATAPI 0x20 int mode; /* Mode */ u_int bytecount; /* Length of PIO transaction */ + u_int atapi; /* Length of ATAPI CDB */ }; struct ccb_trans_settings_sata { @@ -834,11 +836,13 @@ #define CTS_SATA_VALID_REVISION 0x04 #define CTS_SATA_VALID_PM 0x08 #define CTS_SATA_VALID_TAGS 0x10 +#define CTS_SATA_VALID_ATAPI 0x20 int mode; /* Legacy PATA mode */ u_int bytecount; /* Length of PIO transaction */ int revision; /* SATA revision */ u_int pm_present; /* PM is present (XPT->SIM) */ u_int tags; /* Number of allowed tags */ + u_int atapi; /* Length of ATAPI CDB */ }; /* Get/Set transfer rate/width/disconnection/tag queueing settings */ ==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#100 (text+ko) ==== @@ -2360,6 +2360,8 @@ d->tags = min(ch->numslots, cts->xport_specific.sata.tags); if (cts->xport_specific.sata.valid & CTS_SATA_VALID_PM) ch->pm_present = cts->xport_specific.sata.pm_present; + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_ATAPI) + d->atapi = cts->xport_specific.sata.atapi; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; @@ -2403,6 +2405,8 @@ cts->xport_specific.sata.valid |= CTS_SATA_VALID_PM; cts->xport_specific.sata.tags = d->tags; cts->xport_specific.sata.valid |= CTS_SATA_VALID_TAGS; + cts->xport_specific.sata.atapi = d->atapi; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; ==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.h#35 (text+ko) ==== @@ -370,6 +370,7 @@ int revision; int mode; u_int bytecount; + u_int atapi; u_int tags; }; ==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.c#50 (text+ko) ==== @@ -1348,6 +1348,8 @@ ccb->csio.cdb_io.cdb_ptr : ccb->csio.cdb_io.cdb_bytes, request->u.atapi.ccb, ccb->csio.cdb_len); request->flags |= ATA_R_ATAPI; + if (ch->curr[ccb->ccb_h.target_id].atapi == 16) + request->flags |= ATA_R_ATAPI16; if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE && ch->curr[ccb->ccb_h.target_id].mode >= ATA_DMA) request->flags |= ATA_R_DMA; @@ -1358,7 +1360,6 @@ } request->transfersize = min(request->bytecount, ch->curr[ccb->ccb_h.target_id].bytecount); -// request->callback = ad_done; request->retries = 0; request->timeout = (ccb->ccb_h.timeout + 999) / 1000; callout_init_mtx(&request->callout, &ch->state_mtx, CALLOUT_RETURNUNLOCKED); @@ -1491,7 +1492,7 @@ if (ch->flags & ATA_SATA) { if (cts->xport_specific.sata.valid & CTS_SATA_VALID_REVISION) d->revision = cts->xport_specific.sata.revision; - if (cts->xport_specific.ata.valid & CTS_SATA_VALID_MODE) { + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_MODE) { if (cts->type == CTS_TYPE_CURRENT_SETTINGS) { d->mode = ATA_SETMODE(ch->dev, ccb->ccb_h.target_id, @@ -1499,8 +1500,10 @@ } else d->mode = cts->xport_specific.sata.mode; } - if (cts->xport_specific.ata.valid & CTS_SATA_VALID_BYTECOUNT) + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_BYTECOUNT) d->bytecount = min(8192, cts->xport_specific.sata.bytecount); + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_ATAPI) + d->atapi = cts->xport_specific.sata.atapi; } else { if (cts->xport_specific.ata.valid & CTS_ATA_VALID_MODE) { if (cts->type == CTS_TYPE_CURRENT_SETTINGS) { @@ -1512,6 +1515,8 @@ } if (cts->xport_specific.ata.valid & CTS_ATA_VALID_BYTECOUNT) d->bytecount = cts->xport_specific.ata.bytecount; + if (cts->xport_specific.ata.valid & CTS_ATA_VALID_ATAPI) + d->atapi = cts->xport_specific.ata.atapi; } ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); @@ -1541,6 +1546,8 @@ } else cts->xport_specific.sata.revision = d->revision; cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; + cts->xport_specific.sata.atapi = d->atapi; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; } else { cts->transport = XPORT_ATA; cts->transport_version = XPORT_VERSION_UNSPECIFIED; @@ -1548,6 +1555,8 @@ cts->xport_specific.ata.valid |= CTS_ATA_VALID_MODE; cts->xport_specific.ata.bytecount = d->bytecount; cts->xport_specific.ata.valid |= CTS_ATA_VALID_BYTECOUNT; + cts->xport_specific.ata.atapi = d->atapi; + cts->xport_specific.ata.valid |= CTS_ATA_VALID_ATAPI; } ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); ==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.h#29 (text+ko) ==== @@ -539,6 +539,7 @@ u_int revision; int mode; u_int bytecount; + u_int atapi; }; #endif ==== //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#38 (text+ko) ==== @@ -741,17 +741,15 @@ u_int32_t status = ATA_INL(ch->r_mem, SIIS_P_SSTS); union ccb *ccb; - if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) && - ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) && - ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) { - if (bootverbose) + if (bootverbose) { + if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) && + ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) && + ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) { device_printf(dev, "CONNECT requested\n"); - siis_reset(dev); - } else { - if (bootverbose) + } else device_printf(dev, "DISCONNECT requested\n"); - ch->devices = 0; } + siis_reset(dev); if ((ccb = xpt_alloc_ccb_nowait()) == NULL) return; if (xpt_create_path(&ccb->ccb_h.path, NULL, @@ -1661,6 +1659,8 @@ else ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PME); } + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_TAGS) + d->atapi = cts->xport_specific.sata.atapi; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; @@ -1704,6 +1704,8 @@ cts->xport_specific.sata.valid |= CTS_SATA_VALID_PM; cts->xport_specific.sata.tags = d->tags; cts->xport_specific.sata.valid |= CTS_SATA_VALID_TAGS; + cts->xport_specific.sata.atapi = d->atapi; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; ==== //depot/projects/scottl-camlock/src/sys/dev/siis/siis.h#15 (text+ko) ==== @@ -356,6 +356,7 @@ int revision; int mode; u_int bytecount; + u_int atapi; u_int tags; }; From owner-p4-projects@FreeBSD.ORG Mon Feb 1 14:41:21 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 095ED10656C7; Mon, 1 Feb 2010 14:41:21 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0E2210656C4 for ; Mon, 1 Feb 2010 14:41:20 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ABDC18FC19 for ; Mon, 1 Feb 2010 14:41:20 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o11EfKHc067686 for ; Mon, 1 Feb 2010 14:41:20 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o11EfKB5067684 for perforce@freebsd.org; Mon, 1 Feb 2010 14:41:20 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 1 Feb 2010 14:41:20 GMT Message-Id: <201002011441.o11EfKB5067684@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174091 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 14:41:21 -0000 http://p4web.freebsd.org/chv.cgi?CH=174091 Change 174091 by rwatson@rwatson_vimage_client on 2010/02/01 14:40:47 White space tweak. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_internal.h#4 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_internal.h#4 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_internal.h#3 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_internal.h#4 $ */ #ifndef _LIBCAPABILITY_INTERNAL_H_ @@ -46,8 +46,6 @@ pid_t lcs_pid; }; - - /* * Communications flags for recv/send calls (lc_flags). */ From owner-p4-projects@FreeBSD.ORG Mon Feb 1 15:03:44 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 05CD01065693; Mon, 1 Feb 2010 15:03:44 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B56E2106568D for ; Mon, 1 Feb 2010 15:03:43 +0000 (UTC) (envelope-from jona@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A1ABD8FC14 for ; Mon, 1 Feb 2010 15:03:43 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o11F3hoa070930 for ; Mon, 1 Feb 2010 15:03:43 GMT (envelope-from jona@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o11F3hdF070928 for perforce@freebsd.org; Mon, 1 Feb 2010 15:03:43 GMT (envelope-from jona@FreeBSD.org) Date: Mon, 1 Feb 2010 15:03:43 GMT Message-Id: <201002011503.o11F3hdF070928@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jona@FreeBSD.org using -f From: Jonathan Anderson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174092 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 15:03:44 -0000 http://p4web.freebsd.org/chv.cgi?CH=174092 Change 174092 by jona@jona-belle-freebsd8 on 2010/02/01 15:03:13 ld_libdirs(int**) => ld_libdirs(int*,int*) Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libc/gen/ld_libdirs.c#1 add .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#10 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#9 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#10 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#9 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#10 $ */ #ifndef _LIBCAPABILITY_H_ @@ -222,9 +222,11 @@ */ int ld_libcache_lookup(const char *libname, int *fdp); int ld_insandbox(void); - -/* If this call is successful, the caller is responsible for freeing 'fds'. */ -int ld_libdirs(int **fds); +/* + * If this call fails because the buffer 'fds' is too small, 'fdlen' will contain + * the size of the array which is actually required. + */ +int ld_libdirs(int *fds, int *fdlen); /* * Applications may declare an alternative entry point to the default ELF ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#9 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#8 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#9 $ */ #include From owner-p4-projects@FreeBSD.ORG Mon Feb 1 15:45:26 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 095C11065676; Mon, 1 Feb 2010 15:45:26 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFEBE1065670 for ; Mon, 1 Feb 2010 15:45:25 +0000 (UTC) (envelope-from jona@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ABFC78FC13 for ; Mon, 1 Feb 2010 15:45:25 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o11FjPr8075014 for ; Mon, 1 Feb 2010 15:45:25 GMT (envelope-from jona@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o11FjPiR075012 for perforce@freebsd.org; Mon, 1 Feb 2010 15:45:25 GMT (envelope-from jona@FreeBSD.org) Date: Mon, 1 Feb 2010 15:45:25 GMT Message-Id: <201002011545.o11FjPiR075012@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jona@FreeBSD.org using -f From: Jonathan Anderson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174095 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 15:45:26 -0000 http://p4web.freebsd.org/chv.cgi?CH=174095 Change 174095 by jona@jona-belle-freebsd8 on 2010/02/01 15:45:08 Implementation of ld_libdirs() Affected files ... .. //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/Symbol.map#4 edit .. //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#32 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/Symbol.map#4 (text+ko) ==== @@ -18,6 +18,10 @@ __tls_get_addr; }; +FBSD_1.2 { + ld_libdirs; +}; + FBSDprivate_1.0 { _rtld_thread_init; _rtld_allocate_tls; ==== //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#32 (text+ko) ==== @@ -78,6 +78,8 @@ #endif #endif +#define INITIAL_FDLEN 16 + /* Types. */ typedef void (*func_ptr_type)(); typedef void * (*path_enum_proc) (const char *path, size_t len, void *arg); @@ -167,6 +169,8 @@ static int object_match_name(const Obj_Entry *, const char *); static void ld_utrace_log(int, void *, void *, size_t, int, const char *); +int ld_libdirs(int *, int *); + void r_debug_state(struct r_debug *, struct link_map *); /* @@ -183,6 +187,8 @@ used to affect the libraries loaded */ static char *ld_bind_now; /* Environment variable for immediate binding */ static char *ld_debug; /* Environment variable for debugging */ +static int *ld_library_dirs = NULL; /* File descriptors of lib path (end: -1) */ +static int ld_library_dirlen; /* Capacity of ld_library_dirs */ #ifndef IN_RTLD_CAP static char *ld_library_path; /* Environment variable for search path */ static char *ld_preload; /* Environment variable for libraries to @@ -249,6 +255,8 @@ (func_ptr_type) &ld_libcache_lookup, (func_ptr_type) &ld_insandbox, #endif + (func_ptr_type) &ld_libdirs, + NULL }; @@ -2020,6 +2028,7 @@ return (NULL); } +#endif struct try_library_args { const char *name; @@ -2055,6 +2064,7 @@ return (NULL); } +#ifndef IN_RTLD_CAP static char * search_library_path(const char *name, const char *path) { @@ -2077,6 +2087,124 @@ } #endif +/* + * Add a file descriptor to ld_library_dirs. + */ +static void +add_libdir_fd(int fd) { + + if (ld_library_dirs == NULL) { + /* Initialize the FD list. */ + + ld_library_dirlen = INITIAL_FDLEN; + ld_library_dirs = xmalloc(ld_library_dirlen * sizeof(int)); + memset(ld_library_dirs, 0xff, ld_library_dirlen * sizeof(int)); + } + + /* Find the next available FD slot. */ + int i; + for (i = 0; (i < ld_library_dirlen) && (ld_library_dirs[i] != -1); i++) ; + + if (i == ld_library_dirlen) { + /* We need more space. */ + int old_size = ld_library_dirlen + sizeof(int); + + ld_library_dirlen *= 2; + ld_library_dirs = realloc(ld_library_dirs, 2 * old_size); + memset(ld_library_dirs + old_size, 0xff, old_size); + + if (ld_library_dirs == NULL) + err(-1, "realloc() failed"); + } + + ld_library_dirs[i] = fd; +} + +/* + * Add file descriptors for a path list (e.g. '/lib:/usr/lib') to ld_library_dirs. + */ +static void +add_libdir_paths(const char *path) { + + char *pathcopy, *dirname, *tokcontext; + int pathlen = strnlen(path, PATH_MAX); + + pathcopy = malloc(pathlen + 1); + strncpy(pathcopy, path, pathlen + 1); + + for (dirname = strtok_r(pathcopy, ":", &tokcontext); dirname; + dirname = strtok_r(NULL, ":", &tokcontext)) { + + int fd; + + struct try_library_args arg; + arg.name = ""; + arg.namelen = 0; + arg.buffer = xmalloc(PATH_MAX); + arg.buflen = PATH_MAX; + + if (try_library_path(dirname, strnlen(dirname, PATH_MAX), &arg)) + fd = open(dirname, O_RDONLY); + + else { + /* 'dirname' is not a directory path; perhaps it's a descriptor? */ + fd = (int) strtol(dirname, NULL, 0); + if ((fd == 0) && (errno == 0)) + continue; + } + + if (fd >= 0) + add_libdir_fd(fd); + } + + free(pathcopy); +} + +/* + * Return an array of file descriptors for the library search paths. + */ +int +ld_libdirs(int *fds, int *fdcount) { + + if (fdcount == NULL) + return (-1); + + else if (fds == NULL) { + *fdcount = -1; + return (-1); + } + + if (ld_library_dirs == NULL) { +#ifdef IN_RTLD_CAP + + char *envvar = getenv(LD_ "LIBRARY_DIRS"); + if (envvar == NULL) + err(-1, "No %s set in capability mode", LD_ "LIBRARY_DIRS"); + + add_libdir_paths(envvar); + +#else /* !IN_RTLD_CAP */ + + /* Look for directories a la find_library (TODO: refactor!). */ + add_libdir_paths(ld_library_path); + add_libdir_paths(gethints()); + add_libdir_paths(STANDARD_LIBRARY_PATH); +#endif + } + + int i = 0; + for (i = 0; (i < ld_library_dirlen) && (ld_library_dirs[i] != -1); i++) ; + + if (*fdcount < i) { + *fdcount = i; + return (-1); + } + + *fdcount = i; + memcpy(fds, ld_library_dirs, i * sizeof(int)); + return 0; +} + int dlclose(void *handle) { From owner-p4-projects@FreeBSD.ORG Mon Feb 1 15:57:38 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 543F0106568D; Mon, 1 Feb 2010 15:57:38 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18FA5106566B for ; Mon, 1 Feb 2010 15:57:38 +0000 (UTC) (envelope-from jona@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0556F8FC14 for ; Mon, 1 Feb 2010 15:57:38 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o11FvbO7076129 for ; Mon, 1 Feb 2010 15:57:37 GMT (envelope-from jona@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o11Fvba1076127 for perforce@freebsd.org; Mon, 1 Feb 2010 15:57:37 GMT (envelope-from jona@FreeBSD.org) Date: Mon, 1 Feb 2010 15:57:37 GMT Message-Id: <201002011557.o11Fvba1076127@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jona@FreeBSD.org using -f From: Jonathan Anderson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174096 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 15:57:38 -0000 http://p4web.freebsd.org/chv.cgi?CH=174096 Change 174096 by jona@jona-belle-freebsd8 on 2010/02/01 15:57:23 Ensure that the argument to add_libdir_paths() is not NULL Affected files ... .. //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#33 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#33 (text+ko) ==== @@ -2126,6 +2126,9 @@ static void add_libdir_paths(const char *path) { + if (path == NULL) + return; + char *pathcopy, *dirname, *tokcontext; int pathlen = strnlen(path, PATH_MAX); From owner-p4-projects@FreeBSD.ORG Mon Feb 1 16:18:59 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C4C5C1065672; Mon, 1 Feb 2010 16:18:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89406106566B for ; Mon, 1 Feb 2010 16:18:59 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7655E8FC12 for ; Mon, 1 Feb 2010 16:18:59 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o11GIxfw079153 for ; Mon, 1 Feb 2010 16:18:59 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o11GIx7N079151 for perforce@freebsd.org; Mon, 1 Feb 2010 16:18:59 GMT (envelope-from mav@freebsd.org) Date: Mon, 1 Feb 2010 16:18:59 GMT Message-Id: <201002011618.o11GIx7N079151@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174097 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 16:19:00 -0000 http://p4web.freebsd.org/chv.cgi?CH=174097 Change 174097 by mav@mav_mavtest on 2010/02/01 16:18:30 Deny commands longer then device-reported ATAPI packet size. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#76 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#76 (text+ko) ==== @@ -1379,6 +1379,27 @@ (*(sim->sim_action))(sim, start_ccb); break; } + case XPT_SCSI_IO: + { + struct cam_ed *device; + u_int maxlen = 0; + + device = start_ccb->ccb_h.path->device; + if (device->protocol == PROTO_SCSI && + (device->flags & CAM_DEV_IDENTIFY_DATA_VALID)) { + uint16_t p = + device->ident_data.config & ATA_PROTO_MASK; + + maxlen = (p == ATA_PROTO_ATAPI_16) ? 16 : + (p == ATA_PROTO_ATAPI_12) ? 12 : 0; + } + if (start_ccb->csio.cdb_len > maxlen) { + start_ccb->ccb_h.status = CAM_REQ_INVALID; + xpt_done(start_ccb); + break; + } + /* FALLTHROUGH */ + } default: xpt_action_default(start_ccb); break; From owner-p4-projects@FreeBSD.ORG Mon Feb 1 16:30:11 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 63A501065697; Mon, 1 Feb 2010 16:30:11 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27D77106568D for ; Mon, 1 Feb 2010 16:30:11 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 136E98FC1D for ; Mon, 1 Feb 2010 16:30:11 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o11GUAYO080287 for ; Mon, 1 Feb 2010 16:30:10 GMT (envelope-from rene@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o11GUA4f080285 for perforce@freebsd.org; Mon, 1 Feb 2010 16:30:10 GMT (envelope-from rene@FreeBSD.org) Date: Mon, 1 Feb 2010 16:30:10 GMT Message-Id: <201002011630.o11GUA4f080285@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rene@FreeBSD.org using -f From: Rene Ladan To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174099 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 16:30:11 -0000 http://p4web.freebsd.org/chv.cgi?CH=174099 Change 174099 by rene@rene_self on 2010/02/01 16:29:22 IFC Affected files ... .. //depot/projects/docproj_nl/en_US.ISO8859-1/articles/committers-guide/article.sgml#30 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/articles/contributors/contrib.committers.sgml#36 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/l10n/chapter.sgml#8 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/porters-handbook/book.sgml#71 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/captions/2007/meetbsd/brueffer-torprvacy.sbv#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/captions/2007/nycbsdcon/dixon-bsdisdying.sbv#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/captions/2009/asiabsdcon/allman-internetmail.sbv#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/captions/2009/dcbsdcon/bejtlich-networksecurity.sbv#1 branch .. //depot/projects/docproj_nl/nl_NL.ISO8859-1/books/handbook/network-servers/chapter.sgml#24 integrate .. //depot/projects/docproj_nl/www/en/releases/8.0R/announce.sgml#2 integrate .. //depot/projects/docproj_nl/www/share/sgml/news.xml#64 integrate Differences ... ==== //depot/projects/docproj_nl/en_US.ISO8859-1/articles/committers-guide/article.sgml#30 (text+ko) ==== @@ -9,7 +9,7 @@ The &os; Documentation Project - $FreeBSD: doc/en_US.ISO8859-1/articles/committers-guide/article.sgml,v 1.287 2009/10/15 05:41:12 ale Exp $ + $FreeBSD: doc/en_US.ISO8859-1/articles/committers-guide/article.sgml,v 1.288 2010/02/01 14:07:51 uqs Exp $ 1999 @@ -23,6 +23,7 @@ 2007 2008 2009 + 2010 The FreeBSD Documentation Project @@ -1132,8 +1133,18 @@ - If you are subscribed to the &a.cvsall;, you will - probably want to unsubscribe to avoid receiving duplicate + If you already have an account at the &os; wiki, + make sure your mentor moves you from the + Contributors group + to the + Developers group. + Otherwise, consider signing up for an account so you can publish + projects and ideas you are working on. + + + + If you subscribe to &a.svn-src-all.name; or the &a.cvsall;, + you will probably want to unsubscribe to avoid receiving duplicate copies of commit messages and their followups. ==== //depot/projects/docproj_nl/en_US.ISO8859-1/articles/contributors/contrib.committers.sgml#36 (text+ko) ==== @@ -1,4 +1,4 @@ - + @@ -311,7 +311,7 @@ language. Make sure these settings appear in /etc/login.conf: - language_name:accounts_title:\ + language_name|Account Type Description:\ :charset=MIME_charset:\ :lang=locale_name:\ :tc=default: @@ -319,7 +319,7 @@ So sticking with our previous example using Latin-1, it would look like this: - german:German Users Accounts:\ + german|German Users Accounts:\ :charset=ISO-8859-1:\ :lang=de_DE.ISO8859-1:\ :tc=default: ==== //depot/projects/docproj_nl/en_US.ISO8859-1/books/porters-handbook/book.sgml#71 (text+ko) ==== @@ -1,7 +1,7 @@ + 800502 + January 31, 2010 + 8.0-STABLE after addition of + sigpause(3). + + 900000 August 22, 2009 9.0-CURRENT. ==== //depot/projects/docproj_nl/nl_NL.ISO8859-1/books/handbook/network-servers/chapter.sgml#24 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -373,7 +373,7 @@ juiste taal instelt door de volgende instellingen in /etc/login.conf: - taalnaam:accountstitel:\ + taalnaam|accountstitel:\ :charset=MIME_karakterverzameling: :lang=localenaam:\ :tc=default: @@ -381,7 +381,7 @@ Voor het bovenstaande voorbeeld dat gebruik maakt van Latin-1 ziet dat er als hieronder uit: - german:Duitse gebruikersaccounts:\ + german|Duitse gebruikersaccounts:\ :charset=ISO-8859-1:\ :lang=de_DE.ISO8859-1:\ :tc=default: From owner-p4-projects@FreeBSD.ORG Mon Feb 1 16:58:40 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1FC981065672; Mon, 1 Feb 2010 16:58:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9291106566B for ; Mon, 1 Feb 2010 16:58:39 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C69A78FC12 for ; Mon, 1 Feb 2010 16:58:39 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o11GwdSE093704 for ; Mon, 1 Feb 2010 16:58:39 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o11GwdhJ093702 for perforce@freebsd.org; Mon, 1 Feb 2010 16:58:39 GMT (envelope-from mav@freebsd.org) Date: Mon, 1 Feb 2010 16:58:39 GMT Message-Id: <201002011658.o11GwdhJ093702@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174102 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 16:58:40 -0000 http://p4web.freebsd.org/chv.cgi?CH=174102 Change 174102 by mav@mav_mavtest on 2010/02/01 16:57:47 Report "ATAPI packet length" in negotiate result. Affected files ... .. //depot/projects/scottl-camlock/src/sbin/camcontrol/camcontrol.c#37 edit Differences ... ==== //depot/projects/scottl-camlock/src/sbin/camcontrol/camcontrol.c#37 (text+ko) ==== @@ -2804,6 +2804,10 @@ fprintf(stdout, "%sATA mode: %s\n", pathstr, ata_mode2string(ata->mode)); } + if ((ata->valid & CTS_ATA_VALID_ATAPI) != 0) { + fprintf(stdout, "%sATAPI packet length: %d\n", pathstr, + ata->atapi); + } if ((ata->valid & CTS_ATA_VALID_BYTECOUNT) != 0) { fprintf(stdout, "%sPIO transaction length: %d\n", pathstr, ata->bytecount); @@ -2821,6 +2825,10 @@ fprintf(stdout, "%sATA mode: %s\n", pathstr, ata_mode2string(sata->mode)); } + if ((sata->valid & CTS_SATA_VALID_ATAPI) != 0) { + fprintf(stdout, "%sATAPI packet length: %d\n", pathstr, + sata->atapi); + } if ((sata->valid & CTS_SATA_VALID_BYTECOUNT) != 0) { fprintf(stdout, "%sPIO transaction length: %d\n", pathstr, sata->bytecount); From owner-p4-projects@FreeBSD.ORG Mon Feb 1 22:57:43 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C9AF7106568B; Mon, 1 Feb 2010 22:57:42 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7411D10656B0 for ; Mon, 1 Feb 2010 22:57:42 +0000 (UTC) (envelope-from jona@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 155608FC14 for ; Mon, 1 Feb 2010 22:57:42 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o11MvgxT039031 for ; Mon, 1 Feb 2010 22:57:42 GMT (envelope-from jona@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o11Mvg2s039029 for perforce@freebsd.org; Mon, 1 Feb 2010 22:57:42 GMT (envelope-from jona@FreeBSD.org) Date: Mon, 1 Feb 2010 22:57:42 GMT Message-Id: <201002012257.o11Mvg2s039029@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jona@FreeBSD.org using -f From: Jonathan Anderson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174128 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 22:57:43 -0000 http://p4web.freebsd.org/chv.cgi?CH=174128 Change 174128 by jona@jona-belle-freebsd8 on 2010/02/01 22:57:19 Use lc_fdlist for sandbox configuration. No more need for ld_libcache, and libcapsicum has been simplified somewhat. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.3#3 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#11 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#9 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#10 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_internal.h#5 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox_api.h#3 edit .. //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf-cap/Makefile#21 edit .. //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf-cap/rtld_libcache.c#5 delete .. //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf-cap/rtld_libcache.h#4 delete .. //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#34 edit .. //depot/projects/trustedbsd/capabilities/src/tools/cap/ld_libdirs/Makefile#1 add .. //depot/projects/trustedbsd/capabilities/src/tools/cap/ld_libdirs/ld_libdirs.c#1 add .. //depot/projects/trustedbsd/capabilities/src/usr.bin/gzip/gzsandbox.c#12 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.3#3 (text+ko) ==== @@ -34,7 +34,7 @@ .\" .Dd June 11, 2009 .Os -.Dt LIBCAPABILITY 3 +.Dt LIBCAPSICUM 3 .Sh NAME .Nm libcapsicum .Nd "library interface to capability-mode services" @@ -89,7 +89,7 @@ .Xr libcapsicum_fdlist 3 , may be used to manage the delegation of file descriptors/capabilities to sandboxes using a namespace. -.Sh CAPABILITY API +.Sh CAPSICUM API .Fn lc_limitfd is a wrapper around .Xr cap_new 2 , ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.c#3 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.c#2 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.c#3 $ */ #include @@ -154,7 +154,7 @@ _lc_send_rights(int fd, const void *msg, size_t len, int flags, int lc_flags, int *fdp, int fdcount) { - char cmsgbuf[CMSG_SPACE(LIBCAPABILITY_SANDBOX_API_MAXRIGHTS * + char cmsgbuf[CMSG_SPACE(LIBCAPSICUM_SANDBOX_API_MAXRIGHTS * sizeof(int))]; struct cmsghdr *cmsg; struct msghdr msghdr; @@ -170,7 +170,7 @@ return (-1); } - if (fdcount > LIBCAPABILITY_SANDBOX_API_MAXRIGHTS) { + if (fdcount > LIBCAPSICUM_SANDBOX_API_MAXRIGHTS) { errno = EMSGSIZE; return (-1); } @@ -224,7 +224,7 @@ _lc_recv_rights(int fd, void *buf, size_t len, int flags, int lc_flags, int *fdp, int *fdcountp) { - char cmsgbuf[CMSG_SPACE(LIBCAPABILITY_SANDBOX_API_MAXRIGHTS * + char cmsgbuf[CMSG_SPACE(LIBCAPSICUM_SANDBOX_API_MAXRIGHTS * sizeof(int))]; struct msghdr msghdr; struct iovec iov; @@ -238,7 +238,7 @@ return (-1); } - if (*fdcountp > LIBCAPABILITY_SANDBOX_API_MAXRIGHTS) { + if (*fdcountp > LIBCAPSICUM_SANDBOX_API_MAXRIGHTS) { errno = EMSGSIZE; return (-1); } ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#11 (text+ko) ==== @@ -30,11 +30,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#10 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#11 $ */ -#ifndef _LIBCAPABILITY_H_ -#define _LIBCAPABILITY_H_ +#ifndef _LIBCAPSICUM_H_ +#define _LIBCAPSICUM_H_ #include #include @@ -73,7 +73,7 @@ * Add a file descriptor to the list. * * lfp the list to add to - * subsystem a software component name, e.g. "org.freebsd.rtld-elf" + * subsystem a software component name, e.g. "org.freebsd.rtld-elf-cap" * classname a class name, e.g. "libdir" or "library" * name an instance name, e.g. "system library dir" or "libc.so.6" * fd the file descriptor @@ -141,13 +141,12 @@ int lch_start(const char *sandbox, char *const argv[], u_int flags, struct lc_fdlist *fds, struct lc_sandbox **lcspp); int lch_start_libs(const char *sandbox, char *const argv[], u_int flags, - struct lc_library *lclp, u_int lcl_count, struct lc_fdlist *fds, - struct lc_sandbox **lcspp); + struct lc_fdlist *fds, struct lc_sandbox **lcspp); int lch_startfd(int fd_sandbox, const char *binname, char *const argv[], u_int flags, struct lc_fdlist *fds, struct lc_sandbox **lcspp); int lch_startfd_libs(int fd_sandbox, const char *binname, - char *const argv[], u_int flags, struct lc_library *lclp, - u_int lcl_count, struct lc_fdlist *fds, struct lc_sandbox **lcspp); + char *const argv[], u_int flags, struct lc_fdlist *fds, + struct lc_sandbox **lcspp); void lch_stop(struct lc_sandbox *lcsp); /* @@ -237,4 +236,4 @@ __END_DECLS -#endif /* !_LIBCAPABILITY_H_ */ +#endif /* !_LIBCAPSICUM_H_ */ ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#9 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#8 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#9 $ */ #include @@ -45,6 +45,7 @@ #include #include +#include "libcapsicum_internal.h" #include "libcapsicum_sandbox_api.h" struct lc_fdlist_entry { @@ -99,7 +100,7 @@ return (&global_fdlist); } - env = getenv(LIBCAPABILITY_SANDBOX_FDLIST); + env = getenv(LIBCAPSICUM_SANDBOX_FDLIST); if ((env != NULL) && (strnlen(env, 8) < 7)) { struct lc_fdlist_storage *lfsp; struct stat sb; @@ -118,7 +119,7 @@ goto fail; lfsp = mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_NOSYNC | MAP_SHARED, fd, 0); - if (lfsp == NULL) + if (lfsp == MAP_FAILED) goto fail; /* @@ -126,8 +127,8 @@ * to make sure sizes/etc are internally consistent. */ global_fdlist.lf_storage = lfsp; + return (&global_fdlist); } - return (&global_fdlist); fail: /* XXX: We don't always set errno before returning. */ @@ -309,7 +310,14 @@ lc_fdlist_append(struct lc_fdlist *to, struct lc_fdlist *from) { int pos = 0; + if (to == NULL) { + errno = EINVAL; + return (-1); + } + if (from == NULL) + return (0); + /* Use address to order lc_fdlist locks. */ if ((uintptr_t)to < (uintptr_t)from) { LOCK(to); @@ -401,7 +409,7 @@ } *fdp = entry->fd; - if (pos) *pos = i + 1; + if (pos != NULL) *pos = i + 1; successful = 1; break; } @@ -421,14 +429,14 @@ LOCK(lfp); lfsp = lfp->lf_storage; - if ((pos == NULL) || (*pos < 0) || (*pos >= (int) lfsp->count) - || (subsystem == NULL) || (classname == NULL) - || (name == NULL) || (fdp == NULL)) { + + if ((subsystem == NULL) || (classname == NULL) || (name == NULL) + || (fdp == NULL) || ((pos != NULL) && (*pos >= (int) lfsp->count))) { errno = EINVAL; return (-1); } - struct lc_fdlist_entry *entry = lfsp->entries + *pos; + struct lc_fdlist_entry *entry = lfsp->entries + (pos ? *pos : 0); char *names = lc_fdlist_storage_names(lfsp); int size = entry->syslen + entry->classnamelen + entry->namelen; char *head = malloc(size); @@ -448,7 +456,8 @@ *fdp = entry->fd; UNLOCK(lfp); - (*pos)++; + if (pos) (*pos)++; + return (0); } @@ -536,3 +545,9 @@ return (((char *) lfsp) + lc_fdlist_storage_size(lfsp) - lfsp->namecapacity); } + +void* +_lc_fdlist_getstorage(struct lc_fdlist* lfp) { + return lfp->lf_storage; +} + ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#10 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#9 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#10 $ */ #include @@ -41,6 +41,7 @@ #include #include +#include #include #include #include @@ -54,275 +55,230 @@ #include "libcapsicum_internal.h" #include "libcapsicum_sandbox_api.h" -#define LIBCAPABILITY_CAPMASK_DEVNULL (CAP_EVENT | CAP_READ | CAP_WRITE) -#define LIBCAPABILITY_CAPMASK_SOCK (CAP_EVENT | CAP_READ | CAP_WRITE) -#define LIBCAPABILITY_CAPMASK_BIN (CAP_READ | CAP_EVENT | CAP_FSTAT | \ +#define LIBCAPSICUM_CAPMASK_DEVNULL (CAP_EVENT | CAP_READ | CAP_WRITE) +#define LIBCAPSICUM_CAPMASK_SOCK (CAP_EVENT | CAP_READ | CAP_WRITE) +#define LIBCAPSICUM_CAPMASK_BIN (CAP_READ | CAP_EVENT | CAP_FSTAT | \ CAP_FSTATFS | \ CAP_FEXECVE | CAP_MMAP | \ CAP_MAPEXEC) -#define LIBCAPABILITY_CAPMASK_SANDBOX LIBCAPABILITY_CAPMASK_BIN -#define LIBCAPABILITY_CAPMASK_LDSO LIBCAPABILITY_CAPMASK_BIN -#define LIBCAPABILITY_CAPMASK_LIB LIBCAPABILITY_CAPMASK_BIN +#define LIBCAPSICUM_CAPMASK_SANDBOX LIBCAPSICUM_CAPMASK_BIN +#define LIBCAPSICUM_CAPMASK_LDSO LIBCAPSICUM_CAPMASK_BIN +#define LIBCAPSICUM_CAPMASK_LIB LIBCAPSICUM_CAPMASK_BIN +#define LIBCAPSICUM_CAPMASK_LIBDIR LIBCAPSICUM_CAPMASK_LIB \ + | CAP_LOOKUP | CAP_ATBASE +#define LIBCAPSICUM_CAPMASK_FDLIST CAP_READ | CAP_WRITE | CAP_FTRUNCATE \ + | CAP_FSTAT | CAP_MMAP #define _PATH_LIB "/lib" #define _PATH_USR_LIB "/usr/lib" -#define LIBC_SO "libc.so.7" -#define LIBCAPABILITY_SO "libcapsicum.so.1" +#define LIBC_SO "libc.so.7" +#define LIBCAPSICUM_SO "libcapsicum.so.1" #define LIBSBUF_SO "libsbuf.so.5" extern char **environ; #define LD_ELF_CAP_SO "ld-elf-cap.so.1" #define PATH_LD_ELF_CAP_SO "/libexec" -char *ldso_argv[] = { - __DECONST(char *, PATH_LD_ELF_CAP_SO "/" LD_ELF_CAP_SO), - NULL, -}; int lch_autosandbox_isenabled(__unused const char *servicename) { - if (getenv("LIBCAPABILITY_NOAUTOSANDBOX") != NULL) + if (getenv("LIBCAPSICUM_NOAUTOSANDBOX") != NULL) return (0); return (1); } -/* - * Install an array of file descriptors using the array index of each - * descriptor in the array as its destination file descriptor number. All - * other existing file descriptors will be closed when this function returns, - * leaving a pristine vector. If calls fail, then we return (-1), but there - * are no guarantees about the state of the file descriptor array for the - * process, so it's a throw-away. - * - * It would be nice not to shuffle descriptors that already have the right - * number. - */ -static int -lch_installfds(u_int fd_count, int *fds) + +static void +lch_sandbox(int fd_sock, int fd_binary, int fd_rtld, int fd_devnull, u_int flags, + const char *binname, char *const argv[], __unused struct lc_fdlist *userfds) { - u_int i; - int highestfd; + struct sbuf *sbufp; + int shmfd = -1; + size_t fdlistsize; + struct lc_fdlist *fds; + void *shm; - if (fd_count == 0) - return (0); + /* + * Inform the run-time linked of the binary's name. + */ + if (setenv("LD_BINNAME", binname, 1) == -1) + err(-1, "Error in setenv(LD_BINNAME)"); /* - * Identify the highest source file descriptor we care about so that - * when we play the dup2() rearranging game, we don't overwrite any - * we care about. + * Create an anonymous shared memory segment for the FD list. */ - highestfd = fds[0]; - for (i = 1; i < fd_count; i++) { - if (fds[i] > highestfd) - highestfd = fds[i]; - } - highestfd++; /* Don't tread on the highest */ + shmfd = open("/tmp/jon-foo"/*SHM_ANON*/, O_RDWR | O_CREAT | O_TRUNC, 0600); + if (shmfd < 0) + err(-1, "Error creating shared memory segment"); /* - * First, move all our descriptors up the range. + * Create and fill up the FD list. */ - for (i = 0; i < fd_count; i++) { - if (dup2(fds[i], highestfd + i) < 0) - return (-1); - } + fds = lc_fdlist_new(); + if (fds == NULL) + err(-1, "Error in lc_fdlist_new()"); + + if (lc_fdlist_addcap(fds, LIBCAPSICUM_FQNAME, "stdin", "", + STDIN_FILENO, 0) < 0) + err(-1, "Error in lc_fdlist_addcap(stdin)"); + + if (lc_fdlist_addcap(fds, LIBCAPSICUM_FQNAME, "stdout", "", + STDOUT_FILENO, + (flags & LCH_PERMIT_STDOUT) ? CAP_WRITE | CAP_SEEK : 0) < 0) + err(-1, "Error in lc_fdlist_addcap(stdout)"); + + if (lc_fdlist_addcap(fds, LIBCAPSICUM_FQNAME, "stderr", "", + STDERR_FILENO, + (flags & LCH_PERMIT_STDERR) ? CAP_WRITE | CAP_SEEK : 0) < 0) + err(-1, "Error in lc_fdlist_addcap(stderr)"); + + if (lc_fdlist_addcap(fds, LIBCAPSICUM_FQNAME, "socket", "", + fd_sock, LIBCAPSICUM_CAPMASK_SOCK) < 0) + err(-1, "Error in lc_fdlist_addcap(fd_sock)"); + + if (lc_fdlist_addcap(fds, LIBCAPSICUM_FQNAME, "/dev/null", "", + fd_devnull, LIBCAPSICUM_CAPMASK_DEVNULL) < 0) + err(-1, "Error in lc_fdlist_addcap(fd_devnull)"); + + if (lc_fdlist_addcap(fds, LIBCAPSICUM_FQNAME, "fdlist", "", + shmfd, LIBCAPSICUM_CAPMASK_FDLIST) < 0) + err(-1, "Error in lc_fdlist_addcap(shmfd)"); + + if (lc_fdlist_addcap(fds, RTLD_CAP_FQNAME, "rtld", "", + fd_rtld, LIBCAPSICUM_CAPMASK_LDSO) < 0) + err(-1, "Error in lc_fdlist_addcap(fd_rtld)"); + + if (lc_fdlist_addcap(fds, RTLD_CAP_FQNAME, "binary", "", + fd_binary, LIBCAPSICUM_CAPMASK_SANDBOX) < 0) + err(-1, "Error in lc_fdlist_addcap(fd_binary)"); + + if (lc_fdlist_append(fds, userfds) < 0) + err(-1, "Error in lc_fdlist_append()"); /* - * Now put them back. + * Ask RTLD for library path descriptors. + * + * NOTE: This is FreeBSD-specific; porting to other operating systems will + * require dynamic linkers capable of answering similar queries. */ - for (i = 0; i < fd_count; i++) { - if (dup2(highestfd + i, i) < 0) - return (-1); + int size = 16; + int *libdirs; + + while (1) { + libdirs = malloc(size * sizeof(int)); + + if (ld_libdirs(libdirs, &size) < 0) { + free(libdirs); + + if (size > 0) continue; + else err(-1, "Error in ld_libdirs()"); + } + else break; } + + for (int j = 0; j < size; j++) + if (lc_fdlist_addcap(fds, RTLD_CAP_FQNAME, "libdir", "", + libdirs[j], LIBCAPSICUM_CAPMASK_LIBDIR) < 0) + err(-1, "Error in lc_fdlist_addcap(libdirs[%d]: %d)", + j, libdirs[j]); + + if (lc_fdlist_reorder(fds) < 0) + err(-1, "Error in lc_fdlist_reorder()"); + + /* - * Close the descriptors that we moved, as well as any others that - * were left open by the caller. + * Find the fdlist shared memory segment. */ - closefrom(fd_count); - return (0); -} + int pos = 0; + if (lc_fdlist_lookup(fds, LIBCAPSICUM_FQNAME, "fdlist", NULL, + &shmfd, &pos) < 0) + err(-1, "Error in lc_fdlist_lookup(fdlist)"); -static void -lch_sandbox(int fd_sock, int fd_sandbox, int fd_ldso, int fd_libc, - int fd_libcapsicum, int fd_libsbuf, int fd_devnull, u_int flags, - struct lc_library *lclp, u_int lcl_count, const char *binname, - char *const argv[], struct lc_fdlist *fds) -{ - int *fd_array, fdcount, fdnum; - struct sbuf *sbufp; - int shmfd = -1; - size_t fdlistsize; - void *shm; - char fdliststr[8]; - u_int i; + char tmp[8]; + sprintf(tmp, "%d", shmfd); + if (setenv(LIBCAPSICUM_SANDBOX_FDLIST, tmp, 1) == -1) + err(-1, "Error in setenv(LIBCAPSICUM_SANDBOX_FDLIST)"); /* - * Create an anonymous shared memory segment for the FD list. + * Map it and copy the list. */ - if (fds == NULL) fds = lc_fdlist_new(); - - shmfd = shm_open(SHM_ANON, O_RDWR, 0600); - if (shmfd < 0) - return; fdlistsize = lc_fdlist_size(fds); if (ftruncate(shmfd, fdlistsize) < 0) - return; + err(-1, "Error in ftruncate(shmfd)"); - /* - * Map it and copy the list. - */ shm = mmap(NULL, fdlistsize, PROT_READ | PROT_WRITE, MAP_NOSYNC | MAP_SHARED, shmfd, 0); if (shm == MAP_FAILED) - return; - memcpy(shm, fds, fdlistsize); + err(-1, "Error mapping fdlist SHM"); + + memcpy(shm, _lc_fdlist_getstorage(fds), fdlistsize); if (munmap(shm, fdlistsize)) - return; + err(-1, "Error in munmap(shm, fdlistsize)"); - if (lc_fdlist_addcap(fds, "org.freebsd.libcapsicum", "/dev/null", "", - fd_devnull, LIBCAPABILITY_CAPMASK_DEVNULL) < 0) - return; - if (lc_fdlist_addcap(fds, "org.freebsd.libcapsicum", "sandbox", "", - fd_sandbox, LIBCAPABILITY_CAPMASK_SANDBOX) < 0) - return; - if (lc_fdlist_addcap(fds, "org.freebsd.libcapsicum", "socket", "", - fd_sock, LIBCAPABILITY_CAPMASK_SOCK) < 0) - return; - if (lc_fdlist_addcap(fds, "org.freebsd.rtld-elf-cap", "ldso", "", - fd_ldso, LIBCAPABILITY_CAPMASK_LDSO) < 0) - return; - if (lc_fdlist_addcap(fds, "org.freebsd.rtld-elf-cap", "lib", "libc", - fd_libc, LIBCAPABILITY_CAPMASK_LIB) < 0) - return; - if (lc_fdlist_addcap(fds, "org.freebsd.rtld-elf-cap", "lib", "libcapsicum", - fd_libcapsicum, LIBCAPABILITY_CAPMASK_LIB) < 0) - return; - if (lc_fdlist_addcap(fds, "org.freebsd.rtld-elf-cap", "lib", "libsbuf", - fd_libsbuf, LIBCAPABILITY_CAPMASK_LIB) < 0) - return; -/* - { - int pos = 0; - char *subsystem; - char *class; - char *name; - int fd; - while (lc_fdlist_getentry(fds, &subsystem, &class, &name, &fd, &pos) - >= 0) { - printf("%d\t'%s'.'%s': '%s' (%d)\n", - pos, subsystem, class, name, fd); - } - } -*/ - if (lc_limitfd(fd_devnull, LIBCAPABILITY_CAPMASK_DEVNULL) < 0) - return; - if (lc_limitfd(fd_sandbox, LIBCAPABILITY_CAPMASK_SANDBOX) < 0) - return; - if (lc_limitfd(fd_sock, LIBCAPABILITY_CAPMASK_SOCK) < 0) - return; - if (lc_limitfd(fd_ldso, LIBCAPABILITY_CAPMASK_LDSO) < 0) - return; - if (lc_limitfd(fd_libc, LIBCAPABILITY_CAPMASK_LIB) < 0) - return; - if (lc_limitfd(fd_libcapsicum, LIBCAPABILITY_CAPMASK_LIB) < 0) - return; - if (lc_limitfd(fd_libsbuf, LIBCAPABILITY_CAPMASK_LIB) < 0) - return; + /* + * Find RTLD. + */ + if (lc_fdlist_lookup(fds, RTLD_CAP_FQNAME, "rtld", NULL, &fd_rtld, + NULL) < 0) + err(-1, "Error in lc_fdlist_lookup(RTLD)"); - fdnum = 10; - if (shmfd != -1) - fdnum++; + /* + * Find the binary for RTLD. + */ + if (lc_fdlist_lookup(fds, RTLD_CAP_FQNAME, "binary", NULL, &fd_binary, + NULL) < 0) + err(-1, "Error in lc_fdlist_lookup(RTLD binary)"); - fdcount = fdnum + lcl_count; - fd_array = malloc(fdcount * sizeof(int)); - if (fd_array == NULL) - return; + sprintf(tmp, "%d", fd_binary); + if (setenv("LD_BINARY", tmp, 1) != 0) + err(-1, "Error in setenv(LD_BINARY)"); - fd_array[0] = fd_devnull; - if (flags & LCH_PERMIT_STDOUT) { - if (lc_limitfd(STDOUT_FILENO, CAP_SEEK | CAP_WRITE) < 0) - return; - fd_array[1] = STDOUT_FILENO; - } else - fd_array[1] = fd_devnull; - if (flags & LCH_PERMIT_STDERR) { - if (lc_limitfd(STDERR_FILENO, CAP_SEEK | CAP_WRITE) < 0) - return; - fd_array[2] = STDERR_FILENO; - } else - fd_array[2] = fd_devnull; - fd_array[3] = fd_sandbox; - fd_array[4] = fd_sock; - fd_array[5] = fd_ldso; - fd_array[6] = fd_libc; - fd_array[7] = fd_libcapsicum; - fd_array[8] = fd_libsbuf; - fd_array[9] = fd_devnull; - if (shmfd != -1) - fd_array[10] = shmfd; - for (i = 0; i < lcl_count; i++) { - if (lc_limitfd(lclp->lcl_fd, LIBCAPABILITY_CAPMASK_LIB) < 0) - return; - fd_array[i + fdnum] = lclp[i].lcl_fd; - } - - if (lch_installfds(fdcount, fd_array) < 0) - return; - + /* + * Build LD_LIBRARY_DIRS for RTLD. + * + * NOTE: This is FreeBSD-specific; porting to other operating systems will + * require dynamic linkers capable of operating on file descriptors. + */ sbufp = sbuf_new_auto(); if (sbufp == NULL) - return; - (void)sbuf_printf(sbufp, "%d:%s,%d:%s,%d:%s,%d:%s,%d:%s,%d:%s", - 3, binname, 5, LD_ELF_CAP_SO, 6, LIBC_SO, 7, LIBCAPABILITY_SO, - 8, LIBSBUF_SO, 9, _PATH_DEVNULL); - for (i = 0; i < lcl_count; i++) - (void)sbuf_printf(sbufp, ",%d:%s", i + fdnum, - lclp[i].lcl_libname); - sbuf_finish(sbufp); - if (sbuf_overflowed(sbufp)) - return; - if (setenv("LD_LIBCACHE", sbuf_data(sbufp), 1) == -1) - return; - sbuf_delete(sbufp); + err(-1, "Error in sbuf_new_auto()"); + + { + int fd; + while (lc_fdlist_lookup(fds, RTLD_CAP_FQNAME, "libdir", + NULL, &fd, &pos) >= 0) + sbuf_printf(sbufp, "%d:", fd); + } - sbufp = sbuf_new_auto(); - if (sbufp == NULL) - return; - (void)sbuf_printf(sbufp, "%s:%d", LIBCAPABILITY_SANDBOX_API_SOCK, 4); sbuf_finish(sbufp); if (sbuf_overflowed(sbufp)) - return; - if (setenv(LIBCAPABILITY_SANDBOX_API_ENV, sbuf_data(sbufp), 1) == -1) - return; + err(-1, "sbuf_overflowed()"); + if (setenv("LD_LIBRARY_DIRS", sbuf_data(sbufp), 1) == -1) + err(-1, "Error in setenv(LD_LIBRARY_DIRS)"); sbuf_delete(sbufp); - if (shmfd != -1) { - sprintf(fdliststr, "%d", 10); - if (setenv(LIBCAPABILITY_SANDBOX_FDLIST, fdliststr, 1) == -1) - return; - } if (cap_enter() < 0) - return; + err(-1, "cap_enter() failed"); - (void)fexecve(5, argv, environ); + (void)fexecve(fd_rtld, argv, environ); } int -lch_startfd_libs(int fd_sandbox, const char *binname, char *const argv[], - u_int flags, struct lc_library *lclp, u_int lcl_count, - struct lc_fdlist *fds, struct lc_sandbox **lcspp) +lch_startfd_libs(int fd_binary, const char *binname, char *const argv[], + u_int flags, struct lc_fdlist *fds, struct lc_sandbox **lcspp) { struct lc_sandbox *lcsp; - int fd_devnull, fd_ldso, fd_libc, fd_libcapsicum, fd_libsbuf; + int fd_devnull, fd_rtld, fd_libc, fd_libcapsicum, fd_libsbuf; int fd_procdesc, fd_sockpair[2]; int error, val; pid_t pid; - fd_devnull = fd_ldso = fd_libc = fd_libcapsicum = fd_libsbuf = + fd_devnull = fd_rtld = fd_libc = fd_libcapsicum = fd_libsbuf = fd_procdesc = fd_sockpair[0] = fd_sockpair[1] = -1; lcsp = malloc(sizeof(*lcsp)); @@ -331,11 +287,11 @@ bzero(lcsp, sizeof(*lcsp)); if (ld_insandbox()) { - if (ld_libcache_lookup(LD_ELF_CAP_SO, &fd_ldso) < 0) + if (ld_libcache_lookup(LD_ELF_CAP_SO, &fd_rtld) < 0) goto out_error; if (ld_libcache_lookup(LIBC_SO, &fd_libc) < 0) goto out_error; - if (ld_libcache_lookup(LIBCAPABILITY_SO, + if (ld_libcache_lookup(LIBCAPSICUM_SO, &fd_libcapsicum) < 0) goto out_error; if (ld_libcache_lookup(LIBSBUF_SO, &fd_libsbuf) < 0) @@ -343,9 +299,9 @@ if (ld_libcache_lookup(_PATH_DEVNULL, &fd_devnull) < 0) goto out_error; } else { - fd_ldso = open(PATH_LD_ELF_CAP_SO "/" LD_ELF_CAP_SO, + fd_rtld = open(PATH_LD_ELF_CAP_SO "/" LD_ELF_CAP_SO, O_RDONLY); - if (fd_ldso < 0) + if (fd_rtld < 0) goto out_error; fd_libc = open(_PATH_LIB "/" LIBC_SO, O_RDONLY); if (fd_libc < 0) @@ -353,7 +309,7 @@ fd_libsbuf = open(_PATH_LIB "/" LIBSBUF_SO, O_RDONLY); if (fd_libsbuf < 0) goto out_error; - fd_libcapsicum = open(_PATH_USR_LIB "/" LIBCAPABILITY_SO, + fd_libcapsicum = open(_PATH_USR_LIB "/" LIBCAPSICUM_SO, O_RDONLY); if (fd_libcapsicum < 0) goto out_error; @@ -378,9 +334,8 @@ goto out_error; } if (pid == 0) { - lch_sandbox(fd_sockpair[1], fd_sandbox, fd_ldso, fd_libc, - fd_libcapsicum, fd_libsbuf, fd_devnull, flags, lclp, - lcl_count, binname, argv, fds); + lch_sandbox(fd_sockpair[1], fd_binary, fd_rtld, fd_devnull, flags, + binname, argv, fds); exit(-1); } #ifndef IN_CAP_MODE @@ -388,7 +343,7 @@ close(fd_libsbuf); close(fd_libcapsicum); close(fd_libc); - close(fd_ldso); + close(fd_rtld); #endif close(fd_sockpair[1]); @@ -414,8 +369,8 @@ close(fd_libcapsicum); if (fd_libc != -1) close(fd_libc); - if (fd_ldso != -1) - close(fd_ldso); + if (fd_rtld != -1) + close(fd_rtld); #endif if (lcsp != NULL) free(lcsp); @@ -424,33 +379,31 @@ } int -lch_startfd(int fd_sandbox, const char *binname, char *const argv[], +lch_startfd(int fd_binary, const char *binname, char *const argv[], u_int flags, __unused struct lc_fdlist *fds, struct lc_sandbox **lcspp) { - return (lch_startfd_libs(fd_sandbox, binname, argv, flags, NULL, 0, + return (lch_startfd_libs(fd_binary, binname, argv, flags, fds, lcspp)); } int lch_start_libs(const char *sandbox, char *const argv[], u_int flags, - struct lc_library *lclp, u_int lcl_count, struct lc_fdlist *fds, - struct lc_sandbox **lcspp) + struct lc_fdlist *fds, struct lc_sandbox **lcspp) { char binname[MAXPATHLEN]; - int error, fd_sandbox, ret; + int error, fd_binary, ret; if (basename_r(sandbox, binname) == NULL) return (-1); - fd_sandbox = open(sandbox, O_RDONLY); - if (fd_sandbox < 0) + fd_binary = open(sandbox, O_RDONLY); + if (fd_binary < 0) return (-1); - ret = lch_startfd_libs(fd_sandbox, binname, argv, flags, lclp, - lcl_count, fds, lcspp); + ret = lch_startfd_libs(fd_binary, binname, argv, flags, fds, lcspp); error = errno; - close(fd_sandbox); + close(fd_binary); errno = error; return (ret); } @@ -460,7 +413,7 @@ struct lc_fdlist *fds, struct lc_sandbox **lcspp) { - return (lch_start_libs(sandbox, argv, flags, NULL, 0, fds, lcspp)); + return (lch_start_libs(sandbox, argv, flags, fds, lcspp)); } void ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_internal.h#5 (text+ko) ==== @@ -30,11 +30,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_internal.h#4 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_internal.h#5 $ */ -#ifndef _LIBCAPABILITY_INTERNAL_H_ -#define _LIBCAPABILITY_INTERNAL_H_ +#ifndef _LIBCAPSICUM_INTERNAL_H_ +#define _LIBCAPSICUM_INTERNAL_H_ + +#define LIBCAPSICUM_FQNAME "org.freebsd.libcapsicum" +#define RTLD_CAP_FQNAME "org.freebsd.rtld-elf-cap" struct lc_host { int lch_fd_sock; @@ -46,6 +49,8 @@ pid_t lcs_pid; }; +void* _lc_fdlist_getstorage(struct lc_fdlist*); + /* * Communications flags for recv/send calls (lc_flags). */ @@ -63,4 +68,4 @@ ssize_t _lc_send_rights(int fd, const void *msg, size_t len, int flags, int lc_flags, int *fdp, int fdcount); -#endif /* !_LIBCAPABILITY_INTERNAL_H_ */ +#endif /* !_LIBCAPSICUM_INTERNAL_H_ */ ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox.c#3 (text+ko) ==== @@ -41,6 +41,7 @@ #include #include +#include /* TODO: temporary */ #include #include @@ -54,9 +55,7 @@ int lcs_get(struct lc_host **lchpp) { - char *endp, *env, *env_dup, *env_dup_free, *name, *token, *value; - int error, fd_sock; - long long ll; + int fd_sock; if (lch_initialized) { *lchpp = &lch_global; @@ -68,39 +67,16 @@ return (-1); } - env = getenv(LIBCAPABILITY_SANDBOX_API_ENV); - if (env == NULL) { - errno = EINVAL; /* XXXRW: Better errno? */ + struct lc_fdlist *fds = lc_fdlist_global(); + if (lc_fdlist_lookup(fds, LIBCAPSICUM_FQNAME, "socket", NULL, + &fd_sock, NULL) < 0) return (-1); - } - - env_dup = env_dup_free = strdup(env); - if (env_dup == NULL) + if (fd_sock == -1) return (-1); - fd_sock = -1; - while ((token = strsep(&env_dup, ",")) != NULL) { - name = strsep(&token, ":"); - if (name == NULL) - continue; - value = token; - if (strcmp(name, LIBCAPABILITY_SANDBOX_API_SOCK) == 0) { - ll = strtoll(value, &endp, 10); - if (*endp != '\0' || ll < 0 || ll > INT_MAX) - continue; - fd_sock = ll; - } - } - if (fd_sock == -1) { - error = errno; - free(env_dup_free); - errno = error; - return (-1); - } lch_global.lch_fd_sock = fd_sock; lch_initialized = 1; *lchpp = &lch_global; - free(env_dup_free); return (0); } ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox_api.h#3 (text+ko) ==== @@ -30,25 +30,25 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox_api.h#2 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox_api.h#3 $ */ -#ifndef _LIBCAPABILITY_SANDBOX_API_H_ -#define _LIBCAPABILITY_SANDBOX_API_H_ +#ifndef _LIBCAPSICUM_SANDBOX_API_H_ +#define _LIBCAPSICUM_SANDBOX_API_H_ /* * This include file captures the assumptions libcapsicum sandboxs will * make about the runtime environment set up by libcapsicum hosts. */ -#define LIBCAPABILITY_SANDBOX_API_ENV "LIBCAPABILITY_SANDBOX" -#define LIBCAPABILITY_SANDBOX_FDLIST "LIBCAPABILITY_FDLIST" -#define LIBCAPABILITY_SANDBOX_API_SOCK "sock" +#define LIBCAPSICUM_SANDBOX_API_ENV "LIBCAPSICUM_SANDBOX" +#define LIBCAPSICUM_SANDBOX_FDLIST "LIBCAPSICUM_FDLIST" +#define LIBCAPSICUM_SANDBOX_API_SOCK "sock" /* * Maximum number of file descriptor rights we will ever send as part of an * RPC. */ -#define LIBCAPABILITY_SANDBOX_API_MAXRIGHTS 16 +#define LIBCAPSICUM_SANDBOX_API_MAXRIGHTS 16 /* * Simple libcapsicum RPC facility (lcrpc) definitions. @@ -79,4 +79,4 @@ u_int64_t _lcrpc_rephdr_spare0; } __packed; -#endif /* !_LIBCAPABILITY_H_ */ +#endif /* !_LIBCAPSICUM_H_ */ ==== //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf-cap/Makefile#21 (text+ko) ==== @@ -1,5 +1,5 @@ # $FreeBSD$ -# $P4: //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf-cap/Makefile#20 $ +# $P4: //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf-cap/Makefile#21 $ .include MK_SSP= no @@ -8,7 +8,7 @@ SRCS= rtld_start.S \ reloc.c rtld.c rtld_lock.c map_object.c \ malloc.c xmalloc.c debug.c \ - crtbrand.c rtld_libcache.c rtld_sandbox.c + crtbrand.c rtld_sandbox.c MAN= rtld-elf-cap.1 CSTD?= gnu99 CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -DIN_RTLD_CAP -g ==== //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#34 (text+ko) ==== @@ -60,7 +60,6 @@ #include "rtld_tls.h" #ifdef IN_RTLD_CAP -#include "rtld_libcache.h" #include "rtld_sandbox.h" #endif @@ -119,6 +118,7 @@ static void init_rtld(caddr_t); static void initlist_add_neededs(Needed_Entry *, Objlist *); static void initlist_add_objects(Obj_Entry *, Obj_Entry **, Objlist *); +static void init_libdirs(void); static bool is_exported(const Elf_Sym *); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Feb 2 10:56:42 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4179B10656A3; Tue, 2 Feb 2010 10:56:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 052CC1065696 for ; Tue, 2 Feb 2010 10:56:42 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E4F008FC32 for ; Tue, 2 Feb 2010 10:56:41 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12Auf1w036178 for ; Tue, 2 Feb 2010 10:56:41 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12AufHi036174 for perforce@freebsd.org; Tue, 2 Feb 2010 10:56:41 GMT (envelope-from mav@freebsd.org) Date: Tue, 2 Feb 2010 10:56:41 GMT Message-Id: <201002021056.o12AufHi036174@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174139 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 10:56:42 -0000 http://p4web.freebsd.org/chv.cgi?CH=174139 Change 174139 by mav@mav_mavbook on 2010/02/02 10:56:03 IFC Affected files ... .. //depot/projects/scottl-camlock/src/contrib/csup/Makefile#3 integrate .. //depot/projects/scottl-camlock/src/contrib/csup/TODO#3 integrate .. //depot/projects/scottl-camlock/src/contrib/csup/auth.c#1 branch .. //depot/projects/scottl-camlock/src/contrib/csup/auth.h#1 branch .. //depot/projects/scottl-camlock/src/contrib/csup/config.h#2 integrate .. //depot/projects/scottl-camlock/src/contrib/csup/cpasswd.1#1 branch .. //depot/projects/scottl-camlock/src/contrib/csup/cpasswd.sh#1 branch .. //depot/projects/scottl-camlock/src/contrib/csup/csup.1#3 integrate .. //depot/projects/scottl-camlock/src/contrib/csup/main.c#2 integrate .. //depot/projects/scottl-camlock/src/contrib/csup/proto.c#3 integrate .. //depot/projects/scottl-camlock/src/contrib/netcat/FREEBSD-vendor#4 integrate .. //depot/projects/scottl-camlock/src/etc/rc.d/ntpdate#2 integrate .. //depot/projects/scottl-camlock/src/etc/services#6 integrate .. //depot/projects/scottl-camlock/src/gnu/usr.bin/groff/tmac/mdoc.local#7 integrate .. //depot/projects/scottl-camlock/src/lib/Makefile#9 integrate .. //depot/projects/scottl-camlock/src/lib/libc/gen/devname.c#2 integrate .. //depot/projects/scottl-camlock/src/lib/libc/net/sctp_opt_info.3#4 integrate .. //depot/projects/scottl-camlock/src/lib/libc/net/sctp_recvmsg.3#4 integrate .. //depot/projects/scottl-camlock/src/lib/libc/net/sctp_send.3#5 integrate .. //depot/projects/scottl-camlock/src/lib/libc/net/sctp_sendmsg.3#5 integrate .. //depot/projects/scottl-camlock/src/lib/libc/net/sctp_sys_calls.c#3 integrate .. //depot/projects/scottl-camlock/src/lib/libc/nls/msgcat.c#3 integrate .. //depot/projects/scottl-camlock/src/lib/libc/stdlib/malloc.3#5 integrate .. //depot/projects/scottl-camlock/src/lib/libc/stdlib/malloc.c#9 integrate .. //depot/projects/scottl-camlock/src/lib/libc/stdlib/ql.h#1 branch .. //depot/projects/scottl-camlock/src/lib/libc/stdlib/qr.h#1 branch .. //depot/projects/scottl-camlock/src/lib/libc/sys/shm_open.2#2 integrate .. //depot/projects/scottl-camlock/src/lib/libefi/Makefile#1 branch .. //depot/projects/scottl-camlock/src/lib/libefi/efi_getvar.c#1 branch .. //depot/projects/scottl-camlock/src/lib/libefi/efi_nextvarname.c#1 branch .. //depot/projects/scottl-camlock/src/lib/libefi/efi_setvar.c#1 branch .. //depot/projects/scottl-camlock/src/lib/libefi/libefi.3#1 branch .. //depot/projects/scottl-camlock/src/lib/libefi/libefi.c#1 branch .. //depot/projects/scottl-camlock/src/lib/libefi/libefi.h#1 branch .. //depot/projects/scottl-camlock/src/lib/libefi/libefi_int.h#1 branch .. //depot/projects/scottl-camlock/src/lib/libgpib/Makefile#5 integrate .. //depot/projects/scottl-camlock/src/lib/libgpib/gpib.3#1 branch .. //depot/projects/scottl-camlock/src/release/doc/en_US.ISO8859-1/relnotes/article.sgml#8 integrate .. //depot/projects/scottl-camlock/src/sbin/mknod/mknod.8#4 integrate .. //depot/projects/scottl-camlock/src/sbin/mknod/mknod.c#3 integrate .. //depot/projects/scottl-camlock/src/sbin/restore/Makefile#3 integrate .. //depot/projects/scottl-camlock/src/sbin/restore/dirs.c#3 integrate .. //depot/projects/scottl-camlock/src/sbin/restore/extern.h#2 integrate .. //depot/projects/scottl-camlock/src/sbin/restore/interactive.c#3 integrate .. //depot/projects/scottl-camlock/src/sbin/restore/tape.c#3 integrate .. //depot/projects/scottl-camlock/src/sbin/sysctl/sysctl.8#3 integrate .. //depot/projects/scottl-camlock/src/sbin/sysctl/sysctl.c#6 integrate .. //depot/projects/scottl-camlock/src/share/examples/kld/cdev/test/Makefile#3 integrate .. //depot/projects/scottl-camlock/src/share/examples/kld/syscall/test/Makefile#3 integrate .. //depot/projects/scottl-camlock/src/share/man/man4/gpib.4#3 integrate .. //depot/projects/scottl-camlock/src/share/man/man4/pcii.4#2 integrate .. //depot/projects/scottl-camlock/src/share/man/man4/tnt4882.4#2 integrate .. //depot/projects/scottl-camlock/src/share/man/man5/tmpfs.5#3 integrate .. //depot/projects/scottl-camlock/src/share/misc/committers-src.dot#10 integrate .. //depot/projects/scottl-camlock/src/sys/amd64/amd64/amd64_mem.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/amd64/amd64/msi.c#13 integrate .. //depot/projects/scottl-camlock/src/sys/amd64/conf/NOTES#24 integrate .. //depot/projects/scottl-camlock/src/sys/arm/arm/db_trace.c#9 integrate .. //depot/projects/scottl-camlock/src/sys/conf/files#64 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#101 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-netcell.c#7 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ah_eeprom_v4k.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5212/ar5212_power.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5212/ar5212reg.h#3 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_power.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416desc.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416phy.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416reg.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar9280_attach.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar9285.ini#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar9285v2.ini#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/bge/if_bge.c#36 integrate .. //depot/projects/scottl-camlock/src/sys/dev/drm/drmP.h#14 integrate .. //depot/projects/scottl-camlock/src/sys/dev/drm/drm_hashtab.c#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/drm_hashtab.h#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/drm_linux_list.h#6 integrate .. //depot/projects/scottl-camlock/src/sys/dev/drm/drm_memory.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/dev/drm/drm_mm.c#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/drm_mm.h#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/drm_sman.c#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/drm_sman.h#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/i915_drv.c#6 integrate .. //depot/projects/scottl-camlock/src/sys/dev/drm/i915_drv.h#9 integrate .. //depot/projects/scottl-camlock/src/sys/dev/drm/via_3d_reg.h#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/via_dma.c#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/via_dmablit.c#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/via_dmablit.h#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/via_drm.h#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/via_drv.c#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/via_drv.h#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/via_irq.c#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/via_map.c#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/via_mm.c#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/via_verifier.c#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/via_verifier.h#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/drm/via_video.c#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/e1000/if_em.c#14 integrate .. //depot/projects/scottl-camlock/src/sys/dev/e1000/if_igb.c#16 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ieee488/ibfoo.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ieee488/pcii.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ieee488/tnt4882.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ieee488/tnt4882.h#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/ieee488/upd7210.c#7 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ieee488/upd7210.h#5 integrate .. //depot/projects/scottl-camlock/src/sys/dev/pci/pcireg.h#18 integrate .. //depot/projects/scottl-camlock/src/sys/dev/siba/siba.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/siba/siba_bwn.c#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/siba/siba_cc.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/siba/siba_core.c#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/siba/siba_ids.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/siba/siba_pcib.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/siba/sibareg.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/siba/sibavar.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#39 integrate .. //depot/projects/scottl-camlock/src/sys/fs/devfs/devfs_devs.c#13 integrate .. //depot/projects/scottl-camlock/src/sys/fs/nfsclient/nfs_clvfsops.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/fs/nfsclient/nfs_clvnops.c#12 integrate .. //depot/projects/scottl-camlock/src/sys/fs/nfsclient/nfsmount.h#3 integrate .. //depot/projects/scottl-camlock/src/sys/fs/nfsclient/nfsnode.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/fs/tmpfs/tmpfs_vfsops.c#8 integrate .. //depot/projects/scottl-camlock/src/sys/geom/part/g_part_gpt.c#11 integrate .. //depot/projects/scottl-camlock/src/sys/i386/conf/NOTES#31 integrate .. //depot/projects/scottl-camlock/src/sys/i386/i386/i686_mem.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/i386/i386/msi.c#13 integrate .. //depot/projects/scottl-camlock/src/sys/i386/i386/pmap.c#42 integrate .. //depot/projects/scottl-camlock/src/sys/mips/include/cpu.h#4 integrate .. //depot/projects/scottl-camlock/src/sys/mips/include/pcpu.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/mips/mips/genassym.c#3 integrate .. //depot/projects/scottl-camlock/src/sys/mips/mips/locore.S#5 integrate .. //depot/projects/scottl-camlock/src/sys/mips/mips/machdep.c#6 integrate .. //depot/projects/scottl-camlock/src/sys/mips/mips/pmap.c#10 integrate .. //depot/projects/scottl-camlock/src/sys/modules/Makefile#44 integrate .. //depot/projects/scottl-camlock/src/sys/modules/ath/Makefile#8 integrate .. //depot/projects/scottl-camlock/src/sys/modules/drm/Makefile#4 integrate .. //depot/projects/scottl-camlock/src/sys/modules/drm/drm/Makefile#2 integrate .. //depot/projects/scottl-camlock/src/sys/modules/drm/via/Makefile#1 branch .. //depot/projects/scottl-camlock/src/sys/modules/siba_bwn/Makefile#1 branch .. //depot/projects/scottl-camlock/src/sys/net/if_bridge.c#29 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/ip.h#8 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/tcp.h#13 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/mpc85xx/pci_ocp.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/security/audit/audit_bsm.c#14 integrate .. //depot/projects/scottl-camlock/src/sys/sparc64/sparc64/genassym.c#12 integrate .. //depot/projects/scottl-camlock/src/sys/sparc64/sparc64/swtch.S#5 integrate .. //depot/projects/scottl-camlock/src/sys/sun4v/include/bus.h#4 integrate .. //depot/projects/scottl-camlock/src/sys/sun4v/sun4v/bus_machdep.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/vm/vm_map.c#28 integrate .. //depot/projects/scottl-camlock/src/tools/build/mk/OptionalObsoleteFiles.inc#8 integrate .. //depot/projects/scottl-camlock/src/usr.bin/calendar/calendars/calendar.freebsd#9 integrate .. //depot/projects/scottl-camlock/src/usr.bin/cpio/cmdline.c#4 integrate .. //depot/projects/scottl-camlock/src/usr.bin/cpio/cpio.c#3 integrate .. //depot/projects/scottl-camlock/src/usr.bin/cpio/cpio.h#2 integrate .. //depot/projects/scottl-camlock/src/usr.bin/csup/Makefile#3 integrate Differences ... ==== //depot/projects/scottl-camlock/src/contrib/csup/Makefile#3 (text) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/contrib/csup/Makefile,v 1.2 2009/01/05 15:18:16 lulf Exp $ +# $FreeBSD: src/contrib/csup/Makefile,v 1.3 2010/02/02 05:57:42 lulf Exp $ PREFIX?= /usr/local BINDIR?= ${PREFIX}/bin @@ -7,7 +7,7 @@ UNAME!= /usr/bin/uname -s PROG= csup -SRCS= attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \ +SRCS= attrstack.c auth.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \ globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c parse.y \ pathcomp.c proto.c status.c stream.c threads.c token.l updater.c \ rcsfile.c rcsparse.c lex.rcs.c rsyncfile.c @@ -42,4 +42,7 @@ DPADD= ${LIBCRYPTO} ${LIBZ} LDADD= -lcrypto -lz +SCRIPTS= cpasswd.sh +MAN= csup.1 cpasswd.1 + .include ==== //depot/projects/scottl-camlock/src/contrib/csup/TODO#3 (text) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/contrib/csup/TODO,v 1.2 2009/01/05 15:18:16 lulf Exp $ +$FreeBSD: src/contrib/csup/TODO,v 1.3 2010/02/02 05:57:42 lulf Exp $ BUGS: @@ -17,7 +17,6 @@ MISSING FEATURES: -- Add support for authentication. - Add support for shell commands sent by the server. - Add missing support for various CVSup options : -D, -a (requires authentication support), -e and -E (requires shell commands support) ==== //depot/projects/scottl-camlock/src/contrib/csup/config.h#2 (text) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/contrib/csup/config.h,v 1.1.1.2 2006/03/14 03:51:12 mux Exp $ + * $FreeBSD: src/contrib/csup/config.h,v 1.2 2010/02/02 05:57:42 lulf Exp $ */ #ifndef _CONFIG_H_ #define _CONFIG_H_ @@ -108,6 +108,7 @@ struct chan *chan1; struct stream *server; fattr_support_t fasupport; + int reqauth; }; struct config *config_init(const char *, struct coll *, int); ==== //depot/projects/scottl-camlock/src/contrib/csup/csup.1#3 (text) ==== @@ -22,7 +22,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $Id: cvsup.1,v 1.70 2003/03/04 18:23:46 jdp Exp $ -.\" $FreeBSD: src/contrib/csup/csup.1,v 1.2 2009/01/07 18:37:07 lulf Exp $ +.\" $FreeBSD: src/contrib/csup/csup.1,v 1.3 2010/02/02 05:57:42 lulf Exp $ .\" .Dd February 1, 2006 .Os FreeBSD @@ -32,7 +32,7 @@ .Nd network distribution package for CVS repositories .Sh SYNOPSIS .Nm -.Op Fl 146ksvzZ +.Op Fl 146aksvzZ .Op Fl A Ar addr .Op Fl b Ar base .Op Fl c Ar collDir @@ -106,6 +106,12 @@ Forces .Nm to use IPv6 addresses only. +.It Fl a +Requires the server to authenticate itself (prove its identity) to +the client. If authentication of the server fails, the update is +canceled. See +.Sx AUTHENTICATION , +below. .It Fl A Ar addr Specifies a local address to bind to when connecting to the server. The local address might be a hostname or a numeric host address string @@ -793,6 +799,102 @@ .It .Pa /bar/stool/src-all/refuse.cvs:RELENG_3 .El +.Sh AUTHENTICATION +.Nm +implements an optional authentication mechanism which can be used by the +client and server to verify each other's identities. +Public CVSup servers normally do not enable authentication. +.Nm +users may ignore this section unless they have been informed +that authentication is required by the administrator of their server. +.Pp +The authentication subsystem uses a +challenge-response protocol which is immune to packet sniffing and +replay attacks. No passwords are sent over the network in either +direction. Both the client and the server can independently verify +the identities of each other. +.Pp +The file +.Li $ Ns Ev HOME Ns Pa /.csup/auth +holds the information used for authentication. This file contains a +record for each server that the client is allowed to access. Each +record occupies one line in the file. Lines beginning with +.Ql # +are ignored, as are lines containing only white space. White space is +significant everywhere else in the file. Fields are separated by +.Ql \&: +characters. +.Pp +Each record of the file has the following form: +.Bd -literal -offset indent +.Sm off +.Xo Ar serverName No : Ar clientName No : +.Ar password No : Ar comment +.Xc +.Sm on +.Ed +.Pp +All fields must be present even if some of them are empty. +.Ar ServerName +is the name of the server to which the record applies. By convention, +it is the canonical fully-qualified domain name of the server, e.g., +.Ql CVSup177.FreeBSD.ORG . +This must agree with the server's own idea of its name. The name is +case-insensitive. +.Pp +.Ar ClientName +is the name the client uses to gain access to the server. By +convention, e-mail addresses are used for all client names, e.g., +.Ql BillyJoe@FreeBSD.ORG . +Client names are case-insensitive. +.Pp +.Ar Password +is a secret string of characters that the client uses to prove its +identity. It may not contain any +.Ql \&: +or newline characters. +.Pp +.Ar Comment +may contain any additional information to identify the record. It +is not interpreted by the program. +.Pp +To set up authentication for a given server, one must perform the +following steps: +.Bl -enum +.It +Obtain the official +.Ar serverName +from the administrator of the server or from some other source. +.It +Choose an appropriate +.Ar clientName . +It should be in the form of a valid e-mail address, to make it easy +for the server administrator to contact the user if necessary. +.It +Choose an arbitrary secret +.Ar password . +.It +Run the +.Nm cpasswd +utility, and type in the +.Ar password +when prompted for it. The utility will print out a line to send +to the server administrator, and instruct you how to modify your +.Li $ Ns Ev HOME Ns Pa /.csup/auth +file. You should use a secure channel to send the line to the +server administrator. +.El +.Pp +Since +.Li $ Ns Ev HOME Ns Pa /.csup/auth +contains passwords, you should ensure that it is not readable by +anyone except yourself. +.Pp +Authentication works independently in both directions. The server +administrator controls whether you must prove your identity. +You control whether to check the server's identity, by means of the +.Fl a +command line option. .Sh csup AND FIREWALLS In its default mode, .Nm @@ -865,6 +967,7 @@ List files. .El .Sh SEE ALSO +.Xr cpasswd 1 , .Xr cvs 1 , .Xr rcsintro 1 , .Xr ssh 1 . ==== //depot/projects/scottl-camlock/src/contrib/csup/main.c#2 (text) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/contrib/csup/main.c,v 1.1.1.2 2006/03/14 03:51:11 mux Exp $ + * $FreeBSD: src/contrib/csup/main.c,v 1.2 2010/02/02 05:57:42 lulf Exp $ */ #include @@ -60,6 +60,8 @@ "(same as \"-r 0\")"); lprintf(-1, USAGE_OPTFMT, "-4", "Force usage of IPv4 addresses"); lprintf(-1, USAGE_OPTFMT, "-6", "Force usage of IPv6 addresses"); + lprintf(-1, USAGE_OPTFMT, "-a", + "Require server to authenticate itself to us"); lprintf(-1, USAGE_OPTFMT, "-A addr", "Bind local socket to a specific address"); lprintf(-1, USAGE_OPTFMT, "-b base", @@ -107,7 +109,7 @@ struct stream *lock; char *argv0, *file, *lockfile; int family, error, lockfd, lflag, overridemask; - int c, i, deletelim, port, retries, status; + int c, i, deletelim, port, retries, status, reqauth; time_t nexttry; error = 0; @@ -124,9 +126,10 @@ lockfile = NULL; override = coll_new(NULL); overridemask = 0; + reqauth = 0; while ((c = getopt(argc, argv, - "146A:b:c:d:gh:i:kl:L:p:P:r:svzZ")) != -1) { + "146aA:b:c:d:gh:i:kl:L:p:P:r:svzZ")) != -1) { switch (c) { case '1': retries = 0; @@ -137,6 +140,10 @@ case '6': family = AF_INET6; break; + case 'a': + /* Require server authentication */ + reqauth = 1; + break; case 'A': error = getaddrinfo(optarg, NULL, NULL, &res); if (error) { @@ -303,6 +310,7 @@ config->laddrlen = laddrlen; } config->deletelim = deletelim; + config->reqauth = reqauth; lprintf(2, "Connecting to %s\n", config->host); i = 0; ==== //depot/projects/scottl-camlock/src/contrib/csup/proto.c#3 (text) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/contrib/csup/proto.c,v 1.3 2009/02/15 13:22:21 lulf Exp $ + * $FreeBSD: src/contrib/csup/proto.c,v 1.4 2010/02/02 05:57:42 lulf Exp $ */ #include @@ -45,6 +45,7 @@ #include #include +#include "auth.h" #include "config.h" #include "detailer.h" #include "fattr.h" @@ -74,7 +75,6 @@ static int proto_waitconnect(int); static int proto_greet(struct config *); static int proto_negproto(struct config *); -static int proto_login(struct config *); static int proto_fileattr(struct config *); static int proto_xchgcoll(struct config *); static struct mux *proto_mux(struct config *); @@ -251,56 +251,6 @@ return (STATUS_FAILURE); } -static int -proto_login(struct config *config) -{ - struct stream *s; - char hostbuf[MAXHOSTNAMELEN]; - char *line, *login, *host, *cmd, *realm, *challenge, *msg; - int error; - - s = config->server; - error = gethostname(hostbuf, sizeof(hostbuf)); - hostbuf[sizeof(hostbuf) - 1] = '\0'; - if (error) - host = NULL; - else - host = hostbuf; - login = getlogin(); - proto_printf(s, "USER %s %s\n", login != NULL ? login : "?", - host != NULL ? host : "?"); - stream_flush(s); - line = stream_getln(s, NULL); - cmd = proto_get_ascii(&line); - realm = proto_get_ascii(&line); - challenge = proto_get_ascii(&line); - if (challenge == NULL || line != NULL) - goto bad; - if (strcmp(realm, ".") != 0 || strcmp(challenge, ".") != 0) { - lprintf(-1, "Authentication required by the server and not " - "supported by client\n"); - return (STATUS_FAILURE); - } - proto_printf(s, "AUTHMD5 . . .\n"); - stream_flush(s); - line = stream_getln(s, NULL); - cmd = proto_get_ascii(&line); - if (cmd == NULL || line == NULL) - goto bad; - if (strcmp(cmd, "OK") == 0) - return (STATUS_SUCCESS); - if (strcmp(cmd, "!") == 0) { - msg = proto_get_rest(&line); - if (msg == NULL) - goto bad; - lprintf(-1, "Server error: %s\n", msg); - return (STATUS_FAILURE); - } -bad: - lprintf(-1, "Invalid server reply to AUTHMD5\n"); - return (STATUS_FAILURE); -} - /* * File attribute support negotiation. */ @@ -601,7 +551,7 @@ if (status == STATUS_SUCCESS) status = proto_negproto(config); if (status == STATUS_SUCCESS) - status = proto_login(config); + status = auth_login(config); if (status == STATUS_SUCCESS) status = proto_fileattr(config); if (status == STATUS_SUCCESS) ==== //depot/projects/scottl-camlock/src/contrib/netcat/FREEBSD-vendor#4 (text+ko) ==== @@ -1,5 +1,5 @@ -# $FreeBSD: src/contrib/netcat/FREEBSD-vendor,v 1.4 2009/12/08 19:12:38 delphij Exp $ +# $FreeBSD: src/contrib/netcat/FREEBSD-vendor,v 1.5 2010/02/02 00:30:44 delphij Exp $ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL: http://www.openbsd.org/ -Version: 4.5 +Version: 4.6 License: BSD ==== //depot/projects/scottl-camlock/src/etc/rc.d/ntpdate#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/ntpdate,v 1.16 2006/07/20 10:07:34 flz Exp $ +# $FreeBSD: src/etc/rc.d/ntpdate,v 1.17 2010/01/30 16:34:52 ume Exp $ # # PROVIDE: ntpdate @@ -19,7 +19,9 @@ if [ -z "$ntpdate_hosts" -a -f ${ntpdate_config} ]; then ntpdate_hosts=`awk ' /^server[ \t]*127.127/ {next} - /^(server|peer)/ {print $2} + /^(server|peer)/ { + if ($2 ~/^-/) {print $3} + else {print $2}} ' < ${ntpdate_config}` fi if [ -n "$ntpdate_hosts" -o -n "$rc_flags" ]; then ==== //depot/projects/scottl-camlock/src/etc/services#6 (text+ko) ==== @@ -16,7 +16,7 @@ # Kerberos services are for Kerberos v4, and are unofficial. Sites running # v5 should uncomment v5 entries and comment v4 entries. # -# $FreeBSD: src/etc/services,v 1.116 2010/01/27 11:23:21 edwin Exp $ +# $FreeBSD: src/etc/services,v 1.117 2010/02/01 13:30:06 ume Exp $ # From: @(#)services 5.8 (Berkeley) 5/9/91 # # WELL KNOWN PORT NUMBERS @@ -2225,6 +2225,8 @@ nuts_dem 4132/udp #NUTS Daemon nuts_bootp 4133/tcp #NUTS Bootp Server nuts_bootp 4133/udp #NUTS Bootp Server +sieve 4190/tcp #ManageSieve Protocol +sieve 4190/udp #ManageSieve Protocol rwhois 4321/tcp #Remote Who Is rwhois 4321/udp #Remote Who Is unicall 4343/tcp ==== //depot/projects/scottl-camlock/src/gnu/usr.bin/groff/tmac/mdoc.local#7 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.72 2010/01/15 14:05:06 ru Exp $ +.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.73 2010/02/01 20:54:45 joerg Exp $ .\" .\" %beginstrip% . @@ -46,6 +46,7 @@ .ds doc-str-Lb-libelf ELF Parsing Library (libelf, \-lelf) .ds doc-str-Lb-libfetch File Transfer Library (libfetch, \-lfetch) .ds doc-str-Lb-libgeom Userland API Library for kernel GEOM subsystem (libgeom, \-lgeom) +.ds doc-str-Lb-libgpib General-Purpose Instrument Bus (GPIB) library (libgpib, \-lgpib) .ds doc-str-Lb-libipx IPX Address Conversion Support Library (libipx, \-lipx) .ds doc-str-Lb-libjail Jail Library (libjail, \-ljail) .ds doc-str-Lb-libkiconv Kernel side iconv library (libkiconv, \-lkiconv) ==== //depot/projects/scottl-camlock/src/lib/Makefile#9 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 -# $FreeBSD: src/lib/Makefile,v 1.242 2010/01/25 18:52:47 yongari Exp $ +# $FreeBSD: src/lib/Makefile,v 1.243 2010/01/30 04:24:03 marcel Exp $ .include @@ -33,8 +33,8 @@ libtacplus libutil ${_libypclnt} libalias libarchive \ ${_libatm} libbegemot ${_libbluetooth} ${_libbsnmp} libbz2 \ libcalendar libcam libcompat libdevinfo libdevstat libdisk \ - libdwarf libedit libexpat libfetch libftpio libgeom ${_libgpib} \ - ${_libgssapi} ${_librpcsec_gss} libipsec \ + libdwarf libedit ${_libefi} libexpat libfetch libftpio libgeom \ + ${_libgpib} ${_libgssapi} ${_librpcsec_gss} libipsec \ ${_libipx} libjail libkiconv libmagic libmemstat ${_libmilter} \ ${_libmp} ${_libncp} ${_libngatm} libopie libpam libpcap \ ${_libpmc} libproc librt ${_libsdp} ${_libsm} ${_libsmb} \ @@ -104,6 +104,7 @@ .endif .if ${MACHINE_ARCH} == "ia64" +_libefi= libefi _libsmb= libsmb .endif ==== //depot/projects/scottl-camlock/src/lib/libc/gen/devname.c#2 (text+ko) ==== @@ -31,15 +31,12 @@ static char sccsid[] = "@(#)devname.c 8.2 (Berkeley) 4/29/95"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/devname.c,v 1.11 2007/01/09 00:27:53 imp Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/devname.c,v 1.12 2010/01/31 14:51:04 ed Exp $"); #include #include -#include -#include #include -#include #include #include #include @@ -49,22 +46,22 @@ { int i; size_t j; - char *r; + + if (dev == NODEV || !(S_ISCHR(type) || S_ISBLK(dev))) { + strlcpy(buf, "#NODEV", len); + return (buf); + } - if ((type & S_IFMT) == S_IFCHR) { + if (S_ISCHR(type)) { j = len; i = sysctlbyname("kern.devname", buf, &j, &dev, sizeof (dev)); if (i == 0) - return (buf); + return (buf); } /* Finally just format it */ - if (dev == NODEV) - r = "#NODEV"; - else - r = "#%c:%d:0x%x"; - snprintf(buf, len, r, - (type & S_IFMT) == S_IFCHR ? 'C' : 'B', major(dev), minor(dev)); + snprintf(buf, len, "#%c:%d:0x%x", + S_ISCHR(type) ? 'C' : 'B', major(dev), minor(dev)); return (buf); } @@ -73,5 +70,5 @@ { static char buf[SPECNAMELEN + 1]; - return(devname_r(dev, type, buf, sizeof(buf))); + return (devname_r(dev, type, buf, sizeof(buf))); } ==== //depot/projects/scottl-camlock/src/lib/libc/net/sctp_opt_info.3#4 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)send.2 8.2 (Berkeley) 2/21/94 -.\" $FreeBSD: src/lib/libc/net/sctp_opt_info.3,v 1.5 2010/01/12 21:45:03 brueffer Exp $ +.\" $FreeBSD: src/lib/libc/net/sctp_opt_info.3,v 1.6 2010/01/31 21:45:14 brucec Exp $ .\" .Dd December 15, 2006 .Dt SCTP_OPT_INFO 3 @@ -87,6 +87,8 @@ .Dv SCTP_PEER_AUTH_CHUNKS .Pp .Dv SCTP_LOCAL_AUTH_CHUNKS +.Sh RETURN VALUES +The call returns 0 on success and -1 upon error. .Sh ERRORS The .Fn sctp_opt_info ==== //depot/projects/scottl-camlock/src/lib/libc/net/sctp_recvmsg.3#4 (text+ko) ==== @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/net/sctp_recvmsg.3,v 1.6 2010/01/12 21:45:03 brueffer Exp $ +.\" $FreeBSD: src/lib/libc/net/sctp_recvmsg.3,v 1.7 2010/01/31 21:45:14 brucec Exp $ .\" .Dd August 13, 2007 .Dt SCTP_RECVMSG 3 @@ -269,7 +269,7 @@ but may be caused by transient congestion. .It Bq Er EHOSTUNREACH The remote host was unreachable. -.It Bq Er ENOTCON +.It Bq Er ENOTCONN On a one-to-one style socket no association exists. .It Bq Er ECONNRESET An abort was received by the stack while the user was ==== //depot/projects/scottl-camlock/src/lib/libc/net/sctp_send.3#5 (text+ko) ==== @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/net/sctp_send.3,v 1.6 2010/01/12 21:45:03 brueffer Exp $ +.\" $FreeBSD: src/lib/libc/net/sctp_send.3,v 1.7 2010/01/31 21:45:14 brucec Exp $ .\" .Dd December 15, 2006 .Dt SCTP_SEND 3 @@ -319,7 +319,7 @@ but may be caused by transient congestion. .It Bq Er EHOSTUNREACH The remote host was unreachable. -.It Bq Er ENOTCON +.It Bq Er ENOTCONN On a one-to-one style socket no association exists. .It Bq Er ECONNRESET An abort was received by the stack while the user was ==== //depot/projects/scottl-camlock/src/lib/libc/net/sctp_sendmsg.3#5 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)send.2 8.2 (Berkeley) 2/21/94 -.\" $FreeBSD: src/lib/libc/net/sctp_sendmsg.3,v 1.6 2010/01/12 21:45:03 brueffer Exp $ +.\" $FreeBSD: src/lib/libc/net/sctp_sendmsg.3,v 1.7 2010/01/31 21:45:14 brucec Exp $ .\" .Dd December 15, 2006 .Dt SCTP_SENDMSG 3 @@ -296,7 +296,7 @@ but may be caused by transient congestion. .It Bq Er EHOSTUNREACH The remote host was unreachable. -.It Bq Er ENOTCON +.It Bq Er ENOTCONN On a one-to-one style socket no association exists. .It Bq Er ECONNRESET An abort was received by the stack while the user was ==== //depot/projects/scottl-camlock/src/lib/libc/net/sctp_sys_calls.c#3 (text+ko) ==== @@ -29,7 +29,7 @@ * SUCH DAMAGE. */ #include -__FBSDID("$FreeBSD: src/lib/libc/net/sctp_sys_calls.c,v 1.14 2007/07/24 20:06:01 rrs Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/sctp_sys_calls.c,v 1.15 2010/01/31 21:47:39 brucec Exp $"); #include #include #include @@ -784,7 +784,7 @@ free(buf); if (ret != 0) { if (errno == EALREADY) { - no_end_cx = 1;; + no_end_cx = 1; goto continue_send; } return (ret); ==== //depot/projects/scottl-camlock/src/lib/libc/nls/msgcat.c#3 (text+ko) ==== @@ -32,7 +32,7 @@ ******************************************************************/ #include -__FBSDID("$FreeBSD: src/lib/libc/nls/msgcat.c,v 1.52 2010/01/25 23:44:00 gabor Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/nls/msgcat.c,v 1.53 2010/01/29 18:33:59 gabor Exp $"); #define _NLS_PRIVATE @@ -107,12 +107,12 @@ nl_catd catopen(const char *name, int type) { - int spcleft, saverr; - char path[PATH_MAX]; - char *nlspath, *lang, *base, *cptr, *pathP, *tmpptr; - char *cptr1, *plang, *pter, *pcode; - struct stat sbuf; - struct catentry *np; + struct stat sbuf; + struct catentry *np; + char *base, *cptr, *cptr1, *lang, *nlspath, *pathP, *pcode; + char *plang, *pter, *tmpptr; + int saverr, spcleft; + char path[PATH_MAX]; if (name == NULL || *name == '\0') NLRETERR(EINVAL); @@ -247,10 +247,10 @@ char * catgets(nl_catd catd, int set_id, int msg_id, const char *s) { - struct _nls_cat_hdr *cat_hdr; - struct _nls_set_hdr *set_hdr; - struct _nls_msg_hdr *msg_hdr; - int l, u, i, r; + struct _nls_cat_hdr *cat_hdr; + struct _nls_msg_hdr *msg_hdr; + struct _nls_set_hdr *set_hdr; + int i, l, r, u; if (catd == NULL || catd == NLERR) { errno = EBADF; @@ -315,7 +315,7 @@ int catclose(nl_catd catd) { - struct catentry *np; + struct catentry *np; if (catd == NULL || catd == NLERR) { errno = EBADF; @@ -348,11 +348,11 @@ static nl_catd load_msgcat(const char *path, const char *name, const char *lang) { - struct stat st; - nl_catd catd; - struct catentry *np; - void *data; - int fd; + struct stat st; + nl_catd catd; + struct catentry *np; + void *data; + int fd; /* path/name will never be NULL here */ @@ -418,4 +418,3 @@ UNLOCK; return (catd); } - ==== //depot/projects/scottl-camlock/src/lib/libc/stdlib/malloc.3#5 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)malloc.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.81 2009/09/26 18:20:40 alc Exp $ +.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.82 2010/01/31 23:16:10 jasone Exp $ .\" -.Dd September 26, 2009 +.Dd January 31, 2010 .Dt MALLOC 3 .Os .Sh NAME @@ -55,9 +55,7 @@ .Ft const char * .Va _malloc_options ; .Ft void -.Fo \*(lp*_malloc_message\*(rp -.Fa "const char *p1" "const char *p2" "const char *p3" "const char *p4" -.Fc +.Fn \*(lp*_malloc_message\*(rp "const char *p1" "const char *p2" "const char *p3" "const char *p4" .In malloc_np.h .Ft size_t .Fn malloc_usable_size "const void *ptr" @@ -124,7 +122,9 @@ This is a .Fx specific API designed to ease the problems with traditional coding styles -for realloc causing memory leaks in libraries. +for +.Fn realloc +causing memory leaks in libraries. .Pp The .Fn free @@ -184,18 +184,6 @@ The process will call .Xr abort 3 in these cases. -.It B -Double/halve the per-arena lock contention threshold at which a thread is -randomly re-assigned to an arena. -This dynamic load balancing tends to push threads away from highly contended -arenas, which avoids worst case contention scenarios in which threads -disproportionately utilize arenas. -However, due to the highly dynamic load that applications may place on the -allocator, it is impossible for the allocator to know in advance how sensitive -it should be to contention over arenas. -Therefore, some applications may benefit from increasing or decreasing this -threshold parameter. -This option is not available for some configurations (non-PIC). .It C Double/halve the size of the maximum size class that is a multiple of the cacheline size (64). @@ -209,44 +197,62 @@ See the .Dq M option for related information and interactions. +.It E +Double/halve the size of the maximum medium size class. +The valid range is from one page to one half chunk. +The default value is 32 KiB. .It F -Double/halve the per-arena maximum number of dirty unused pages that are -allowed to accumulate before informing the kernel about at least half of those -pages via +Halve/double the per-arena minimum ratio of active to dirty pages. +Some dirty unused pages may be allowed to accumulate, within the limit set by +the ratio, before informing the kernel about at least half of those pages via .Xr madvise 2 . This provides the kernel with sufficient information to recycle dirty pages if physical memory becomes scarce and the pages remain unused. -The default is 512 pages per arena; -.Ev MALLOC_OPTIONS=10f -will prevent any dirty unused pages from accumulating. +The default minimum ratio is 32:1; +.Ev MALLOC_OPTIONS=6F +will disable dirty page purging. .It G -When there are multiple threads, use thread-specific caching for objects that -are smaller than one page. -This option is enabled by default. -Thread-specific caching allows many allocations to be satisfied without -performing any thread synchronization, at the cost of increased memory use. +Double/halve the approximate interval (counted in terms of +thread-specific cache allocation/deallocation events) between full +thread-specific cache garbage collection sweeps. +Garbage collection is actually performed incrementally, one size +class at a time, in order to avoid large collection pauses. +The default sweep interval is 8192; +.Ev JEMALLOC_OPTIONS=14g +will disable garbage collection. +.It H +Double/halve the number of thread-specific cache slots per size +class. +When there are multiple threads, each thread uses a +thread-specific cache for small and medium objects. +Thread-specific caching allows many allocations to be satisfied +without performing any thread synchronization, at the cost of +increased memory use. See the -.Dq R +.Dq G option for related tuning information. -This option is not available for some configurations (non-PIC). +The default number of cache slots is 128; +.Ev JEMALLOC_OPTIONS=7h +will disable thread-specific caching. +Note that one cache slot per size class is not a valid +configuration due to implementation details. .It J Each byte of new memory allocated by .Fn malloc , >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Feb 2 11:21:07 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EBA671065679; Tue, 2 Feb 2010 11:21:06 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97DD01065672 for ; Tue, 2 Feb 2010 11:21:06 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 851238FC13 for ; Tue, 2 Feb 2010 11:21:06 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12BL6Z2038982 for ; Tue, 2 Feb 2010 11:21:06 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12BL6hJ038980 for perforce@freebsd.org; Tue, 2 Feb 2010 11:21:06 GMT (envelope-from mav@freebsd.org) Date: Tue, 2 Feb 2010 11:21:06 GMT Message-Id: <201002021121.o12BL6hJ038980@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174141 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 11:21:07 -0000 http://p4web.freebsd.org/chv.cgi?CH=174141 Change 174141 by mav@mav_mavbook on 2010/02/02 11:20:13 IFC Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#77 integrate .. //depot/projects/scottl-camlock/src/sys/cam/cam_ccb.h#40 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#102 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.h#36 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.c#51 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.h#30 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-usb.c#11 delete .. //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#40 integrate .. //depot/projects/scottl-camlock/src/sys/dev/siis/siis.h#16 integrate Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#77 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.20 2010/01/28 08:41:30 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.21 2010/02/02 11:09:28 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/cam/cam_ccb.h#40 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/cam/cam_ccb.h,v 1.43 2010/01/28 08:41:30 mav Exp $ + * $FreeBSD: src/sys/cam/cam_ccb.h,v 1.44 2010/02/02 11:09:28 mav Exp $ */ #ifndef _CAM_CAM_CCB_H ==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#102 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ahci/ahci.c,v 1.26 2010/01/29 12:47:04 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ahci/ahci.c,v 1.27 2010/02/02 11:09:28 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.h#36 (text+ko) ==== @@ -24,7 +24,7 @@ * (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: src/sys/dev/ahci/ahci.h,v 1.9 2010/01/28 17:54:47 mav Exp $ + * $FreeBSD: src/sys/dev/ahci/ahci.h,v 1.10 2010/02/02 11:09:28 mav Exp $ */ /* ATA register defines */ ==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.c#51 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.316 2010/01/28 08:41:30 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.317 2010/02/02 11:09:28 mav Exp $"); #include "opt_ata.h" #include ==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.h#30 (text+ko) ==== @@ -23,7 +23,7 @@ * (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: src/sys/dev/ata/ata-all.h,v 1.151 2009/12/13 00:13:21 marius Exp $ + * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.152 2010/02/02 11:09:28 mav Exp $ */ #if 0 ==== //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#40 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/siis/siis.c,v 1.19 2010/01/29 12:47:04 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/siis/siis.c,v 1.20 2010/02/02 11:09:28 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/dev/siis/siis.h#16 (text+ko) ==== @@ -23,7 +23,7 @@ * (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: src/sys/dev/siis/siis.h,v 1.8 2009/12/29 21:49:11 mav Exp $ + * $FreeBSD: src/sys/dev/siis/siis.h,v 1.9 2010/02/02 11:09:28 mav Exp $ */ /* ATA register defines */ From owner-p4-projects@FreeBSD.ORG Tue Feb 2 13:43:42 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D98651065764; Tue, 2 Feb 2010 13:43:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EE28106571E for ; Tue, 2 Feb 2010 13:00:46 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5C09D8FC16 for ; Tue, 2 Feb 2010 13:00:46 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12D0kJs056782 for ; Tue, 2 Feb 2010 13:00:46 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12D0kAf056780 for perforce@freebsd.org; Tue, 2 Feb 2010 13:00:46 GMT (envelope-from mav@freebsd.org) Date: Tue, 2 Feb 2010 13:00:46 GMT Message-Id: <201002021300.o12D0kAf056780@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174143 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 13:43:42 -0000 http://p4web.freebsd.org/chv.cgi?CH=174143 Change 174143 by mav@mav_mavtest on 2010/02/02 13:00:25 - Use separate buffer for identify data fetching. We can't use main buffer, as data need to be formatted before use. - Remove some saved_ccb variables. They are unused now. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#49 edit .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#32 edit .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#78 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#49 (text+ko) ==== @@ -123,7 +123,6 @@ int trim_running; struct disk_params params; struct disk *disk; - union ccb saved_ccb; struct task sysctl_task; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -1098,8 +1097,7 @@ periph = xpt_path_periph(ccb->ccb_h.path); softc = (struct ada_softc *)periph->softc; - return(cam_periph_error(ccb, cam_flags, sense_flags, - &softc->saved_ccb)); + return(cam_periph_error(ccb, cam_flags, sense_flags, NULL)); } static void ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#32 (text+ko) ==== @@ -101,7 +101,6 @@ int events; #define PMP_EV_RESET 1 #define PMP_EV_RESCAN 2 - union ccb saved_ccb; struct task sysctl_task; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -552,8 +551,7 @@ priority = done_ccb->ccb_h.pinfo.priority; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - if (cam_periph_error(done_ccb, 0, 0, - &softc->saved_ccb) == ERESTART) { + if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) { return; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { cam_release_devq(done_ccb->ccb_h.path, ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#78 (text+ko) ==== @@ -37,7 +37,6 @@ #include #include #include -#include #include #include @@ -124,10 +123,9 @@ typedef struct { TAILQ_HEAD(, ccb_hdr) request_ccbs; + struct ata_params ident_data; probe_action action; - union ccb saved_ccb; probe_flags flags; - u_int8_t digest[16]; uint32_t pm_pid; uint32_t pm_prv; int restart; @@ -303,29 +301,13 @@ ata_reset_cmd(ataio); break; case PROBE_IDENTIFY: - if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) { - /* Prepare check that it is the same device. */ - MD5_CTX context; - - MD5Init(&context); - MD5Update(&context, - (unsigned char *)ident_buf->model, - sizeof(ident_buf->model)); - MD5Update(&context, - (unsigned char *)ident_buf->revision, - sizeof(ident_buf->revision)); - MD5Update(&context, - (unsigned char *)ident_buf->serial, - sizeof(ident_buf->serial)); - MD5Final(softc->digest, &context); - } cam_fill_ataio(ataio, 1, probedone, /*flags*/CAM_DIR_IN, 0, - /*data_ptr*/(u_int8_t *)ident_buf, - /*dxfer_len*/sizeof(struct ata_params), + /*data_ptr*/(u_int8_t *)&softc->ident_data, + /*dxfer_len*/sizeof(softc->ident_data), 30 * 1000); if (periph->path->device->protocol == PROTO_ATA) ata_28bit_cmd(ataio, ATA_ATA_IDENTIFY, 0, 0, 0); @@ -695,8 +677,7 @@ ident_buf = &path->device->ident_data; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { -device_fail: if (cam_periph_error(done_ccb, 0, 0, - &softc->saved_ccb) == ERESTART) { +device_fail: if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) { return; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ @@ -724,6 +705,8 @@ goto done; } noerror: + if (softc->restart) + goto done; switch (softc->action) { case PROBE_RESET: { @@ -766,6 +749,7 @@ { int16_t *ptr; + ident_buf = &softc->ident_data; for (ptr = (int16_t *)ident_buf; ptr < (int16_t *)ident_buf + sizeof(struct ata_params)/2; ptr++) { *ptr = le16toh(*ptr); @@ -784,28 +768,22 @@ ata_bpack(ident_buf->revision, ident_buf->revision, sizeof(ident_buf->revision)); ata_btrim(ident_buf->serial, sizeof(ident_buf->serial)); ata_bpack(ident_buf->serial, ident_buf->serial, sizeof(ident_buf->serial)); + ident_buf = &path->device->ident_data; if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) { /* Check that it is the same device. */ - MD5_CTX context; - u_int8_t digest[16]; - - MD5Init(&context); - MD5Update(&context, - (unsigned char *)ident_buf->model, - sizeof(ident_buf->model)); - MD5Update(&context, - (unsigned char *)ident_buf->revision, - sizeof(ident_buf->revision)); - MD5Update(&context, - (unsigned char *)ident_buf->serial, - sizeof(ident_buf->serial)); - MD5Final(digest, &context); - if (bcmp(digest, softc->digest, sizeof(digest))) { + if (bcmp(softc->ident_data.model, ident_buf->model, + sizeof(ident_buf->model)) || + bcmp(softc->ident_data.revision, ident_buf->revision, + sizeof(ident_buf->revision)) || + bcmp(softc->ident_data.serial, ident_buf->serial, + sizeof(ident_buf->serial))) { /* Device changed. */ xpt_async(AC_LOST_DEVICE, path, NULL); - } + } else + bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); } else { + bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); /* Clean up from previous instance of this device */ if (path->device->serial_num != NULL) { free(path->device->serial_num, M_CAMXPT); From owner-p4-projects@FreeBSD.ORG Tue Feb 2 14:18:18 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 534071065696; Tue, 2 Feb 2010 14:18:18 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D9F0106568D for ; Tue, 2 Feb 2010 14:18:18 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EF6448FC17 for ; Tue, 2 Feb 2010 14:18:17 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12EIH26064704 for ; Tue, 2 Feb 2010 14:18:17 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12EIH5i064702 for perforce@freebsd.org; Tue, 2 Feb 2010 14:18:17 GMT (envelope-from mav@freebsd.org) Date: Tue, 2 Feb 2010 14:18:17 GMT Message-Id: <201002021418.o12EIH5i064702@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174145 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 14:18:18 -0000 http://p4web.freebsd.org/chv.cgi?CH=174145 Change 174145 by mav@mav_mavtest on 2010/02/02 14:17:19 - Add forgotten part of previous ATAPI-related patch. - Use functions instead of direct refcount manupulation. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#147 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#147 (text+ko) ==== @@ -1201,8 +1201,10 @@ printf(" ("); if (ata->valid & CTS_ATA_VALID_MODE) printf("%s, ", ata_mode2string(ata->mode)); + if ((ata->valid & CTS_ATA_VALID_ATAPI) && ata->atapi != 0) + printf("ATAPI %dbytes, ", ata->atapi); if (ata->valid & CTS_ATA_VALID_BYTECOUNT) - printf("PIO size %dbytes", ata->bytecount); + printf("PIO %dbytes", ata->bytecount); printf(")"); } if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_SATA) { @@ -1214,8 +1216,10 @@ printf("SATA %d.x, ", sata->revision); if (sata->valid & CTS_SATA_VALID_MODE) printf("%s, ", ata_mode2string(sata->mode)); + if ((sata->valid & CTS_ATA_VALID_ATAPI) && sata->atapi != 0) + printf("ATAPI %dbytes, ", sata->atapi); if (sata->valid & CTS_SATA_VALID_BYTECOUNT) - printf("PIO size %dbytes", sata->bytecount); + printf("PIO %dbytes", sata->bytecount); printf(")"); } if (path->device->inq_flags & SID_CmdQue @@ -2881,7 +2885,7 @@ if (csa->event_enable == 0) { SLIST_REMOVE(async_head, cur_entry, async_node, links); - csa->ccb_h.path->device->refcount--; + xpt_release_device(csa->ccb_h.path->device); free(cur_entry, M_CAMXPT); } else { cur_entry->event_enable = csa->event_enable; @@ -2897,7 +2901,7 @@ cur_entry->callback_arg = csa->callback_arg; cur_entry->callback = csa->callback; SLIST_INSERT_HEAD(async_head, cur_entry, links); - csa->ccb_h.path->device->refcount++; + xpt_acquire_device(csa->ccb_h.path->device); } /* From owner-p4-projects@FreeBSD.ORG Tue Feb 2 15:14:14 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9CD8210656A6; Tue, 2 Feb 2010 15:14:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3179F1065698 for ; Tue, 2 Feb 2010 15:14:14 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC098FC21 for ; Tue, 2 Feb 2010 15:14:14 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12FEEsv069841 for ; Tue, 2 Feb 2010 15:14:14 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12FEDlt069839 for perforce@freebsd.org; Tue, 2 Feb 2010 15:14:13 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 2 Feb 2010 15:14:13 GMT Message-Id: <201002021514.o12FEDlt069839@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174148 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 15:14:14 -0000 http://p4web.freebsd.org/chv.cgi?CH=174148 Change 174148 by rwatson@rwatson_vimage_client on 2010/02/02 15:13:49 Clarify a regression test output. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/regression/sockets/unix_gc/unix_gc.c#3 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/regression/sockets/unix_gc/unix_gc.c#3 (text+ko) ==== @@ -256,8 +256,8 @@ after_openfiles = getopenfiles(); if (after_openfiles != before_openfiles) - warnx("%s: before: %d, after: %d", test, before_openfiles, - after_openfiles); + warnx("%s: before openfiles: %d, after openfiles: %d", + test, before_openfiles, after_openfiles); } static void From owner-p4-projects@FreeBSD.ORG Tue Feb 2 16:17:17 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7C4F9106566C; Tue, 2 Feb 2010 16:17:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AD371065676 for ; Tue, 2 Feb 2010 16:17:17 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 282D78FC22 for ; Tue, 2 Feb 2010 16:17:17 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12GHHb3075965 for ; Tue, 2 Feb 2010 16:17:17 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12GHHnT075963 for perforce@freebsd.org; Tue, 2 Feb 2010 16:17:17 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 2 Feb 2010 16:17:17 GMT Message-Id: <201002021617.o12GHHnT075963@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174149 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 16:17:17 -0000 http://p4web.freebsd.org/chv.cgi?CH=174149 Change 174149 by rwatson@rwatson_vimage_client on 2010/02/02 16:17:07 Fix a few last references to LIBCAPABILITY in libcapsicum. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.3#5 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.3#2 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox.3#2 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.3#5 (text+ko) ==== @@ -34,7 +34,7 @@ .\" .Dd January 31, 2010 .Os -.Dt LIBCAPABILITY_FDLIST 3 +.Dt LIBCAPSICUM_FDLIST 3 .Sh NAME .Nm libcapsicum .Nd "library interface to file descriptor lists" ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.3#2 (text+ko) ==== @@ -34,7 +34,7 @@ .\" .Dd June 11, 2009 .Os -.Dt LIBCAPABILITY_HOST 3 +.Dt LIBCAPSICUM_HOST 3 .Sh NAME .Nm libcapsicum .Nd "library interface to capability-mode services" ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox.3#2 (text+ko) ==== @@ -34,7 +34,7 @@ .\" .Dd June 11, 2009 .Os -.Dt LIBCAPABILITY_SANDBOX 3 +.Dt LIBCAPSICUM_SANDBOX 3 .Sh NAME .Nm libcapsicum .Nd "library interface to capability-mode services" From owner-p4-projects@FreeBSD.ORG Tue Feb 2 16:18:19 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0FD3010656B3; Tue, 2 Feb 2010 16:18:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFAD710656B0 for ; Tue, 2 Feb 2010 16:18:18 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 67D6A8FC18 for ; Tue, 2 Feb 2010 16:18:18 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12GIITe076083 for ; Tue, 2 Feb 2010 16:18:18 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12GIIYW076081 for perforce@freebsd.org; Tue, 2 Feb 2010 16:18:18 GMT (envelope-from mav@freebsd.org) Date: Tue, 2 Feb 2010 16:18:18 GMT Message-Id: <201002021618.o12GIIYW076081@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174150 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 16:18:19 -0000 http://p4web.freebsd.org/chv.cgi?CH=174150 Change 174150 by mav@mav_mavtest on 2010/02/02 16:17:35 Change the way in which fake async events generated. Do not use taskqueue for lock decoupling, as it causes unwanted races. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#148 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#148 (text+ko) ==== @@ -2392,10 +2392,8 @@ { struct cam_path path; struct ccb_getdev cgd; - struct async_node *cur_entry; + struct ccb_setasync *csa = (struct ccb_setasync *)arg; - cur_entry = (struct async_node *)arg; - /* * Don't report unconfigured devices (Wildcard devs, * devices only for target mode, device instances @@ -2413,7 +2411,7 @@ xpt_setup_ccb(&cgd.ccb_h, &path, CAM_PRIORITY_NORMAL); cgd.ccb_h.func_code = XPT_GDEV_TYPE; xpt_action((union ccb *)&cgd); - cur_entry->callback(cur_entry->callback_arg, + csa->callback(csa->callback_arg, AC_FOUND_DEVICE, &path, &cgd); xpt_release_path(&path); @@ -2426,9 +2424,7 @@ { struct cam_path path; struct ccb_pathinq cpi; - struct async_node *cur_entry; - - cur_entry = (struct async_node *)arg; + struct ccb_setasync *csa = (struct ccb_setasync *)arg; xpt_compile_path(&path, /*periph*/NULL, bus->sim->path_id, @@ -2437,7 +2433,7 @@ xpt_setup_ccb(&cpi.ccb_h, &path, CAM_PRIORITY_NORMAL); cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); - cur_entry->callback(cur_entry->callback_arg, + csa->callback(csa->callback_arg, AC_PATH_REGISTERED, &path, &cpi); xpt_release_path(&path); @@ -2445,35 +2441,6 @@ return(1); } -static void -xpt_action_sasync_cb(void *context, int pending) -{ - struct async_node *cur_entry; - struct xpt_task *task; - uint32_t added; - - task = (struct xpt_task *)context; - cur_entry = (struct async_node *)task->data1; - added = task->data2; - - if ((added & AC_FOUND_DEVICE) != 0) { - /* - * Get this peripheral up to date with all - * the currently existing devices. - */ - xpt_for_all_devices(xptsetasyncfunc, cur_entry); - } - if ((added & AC_PATH_REGISTERED) != 0) { - /* - * Get this peripheral up to date with all - * the currently existing busses. - */ - xpt_for_all_busses(xptsetasyncbusfunc, cur_entry); - } - - free(task, M_CAMXPT); -} - void xpt_action(union ccb *start_ccb) { @@ -2890,6 +2857,7 @@ } else { cur_entry->event_enable = csa->event_enable; } + csa->event_enable = added; } else { cur_entry = malloc(sizeof(*cur_entry), M_CAMXPT, M_NOWAIT); @@ -2903,27 +2871,6 @@ SLIST_INSERT_HEAD(async_head, cur_entry, links); xpt_acquire_device(csa->ccb_h.path->device); } - - /* - * Need to decouple this operation via a taqskqueue so that - * the locking doesn't become a mess. - */ - if ((added & (AC_FOUND_DEVICE | AC_PATH_REGISTERED)) != 0) { - struct xpt_task *task; - - task = malloc(sizeof(struct xpt_task), M_CAMXPT, - M_NOWAIT); - if (task == NULL) { - csa->ccb_h.status = CAM_RESRC_UNAVAIL; - break; - } - - TASK_INIT(&task->task, 0, xpt_action_sasync_cb, task); - task->data1 = cur_entry; - task->data2 = added; - taskqueue_enqueue(taskqueue_thread, &task->task); - } - start_ccb->ccb_h.status = CAM_REQ_CMP; break; } @@ -4823,6 +4770,23 @@ if (xptpath) { xpt_free_path(path); mtx_unlock(&xsoftc.xpt_lock); + + if ((status == CAM_REQ_CMP) && + (csa.event_enable & AC_FOUND_DEVICE)) { + /* + * Get this peripheral up to date with all + * the currently existing devices. + */ + xpt_for_all_devices(xptsetasyncfunc, &csa); + } + if ((status == CAM_REQ_CMP) && + (csa.event_enable & AC_PATH_REGISTERED)) { + /* + * Get this peripheral up to date with all + * the currently existing busses. + */ + xpt_for_all_busses(xptsetasyncbusfunc, &csa); + } } return (status); } From owner-p4-projects@FreeBSD.ORG Tue Feb 2 16:49:54 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 58F4D1065670; Tue, 2 Feb 2010 16:49:54 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F46B106568D for ; Tue, 2 Feb 2010 16:49:54 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0CBA38FC19 for ; Tue, 2 Feb 2010 16:49:54 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12GnrI0088849 for ; Tue, 2 Feb 2010 16:49:53 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12GnrF1088847 for perforce@freebsd.org; Tue, 2 Feb 2010 16:49:53 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 2 Feb 2010 16:49:53 GMT Message-Id: <201002021649.o12GnrF1088847@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174155 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 16:49:54 -0000 http://p4web.freebsd.org/chv.cgi?CH=174155 Change 174155 by rwatson@rwatson_vimage_client on 2010/02/02 16:49:33 Various updates and fixes to the fdlist man page. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.3#6 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.3#6 (text+ko) ==== @@ -57,7 +57,11 @@ .Ft int .Fn lc_fdlist_addcap "struct lc_fdlist *lfp" "const char *subsystem" "const char *classname" "const char *name" "int fd" "cap_rights_t rights" .Ft int -.Fn lc_fdlist_lookup "struct lc_fdlist *lfp" "const char *subsystem" "const char **name" "int *fdp" "int *pos" +.Fn lc_fdlist_append "struct lc_fdlist *to" "struct lc_fdlist *from" +.Ft int +.Fn lc_fdlist_getentry "struct lc_fdlist *lfp" "char **subsystem" "char **classname" "char **name" "int *fdp" "int *pos" +.Ft int +.Fn lc_fdlist_lookup "struct lc_fdlist *lfp" "const char *subsystem" "const char *classname" "const char **name" "int *fdp" "int *pos" .Sh DESCRIPTION These .Nm @@ -147,6 +151,8 @@ .Fa name from the file descriptor list .Fa lfp . +.Fn lc_fdlist_getentry +may be used to iterate through all descriptors in the list. .Sh RETURN VALUES The .Fn lc_fdlist_new , From owner-p4-projects@FreeBSD.ORG Tue Feb 2 16:50:55 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 835CD106568D; Tue, 2 Feb 2010 16:50:55 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 313071065676 for ; Tue, 2 Feb 2010 16:50:55 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1D7868FC18 for ; Tue, 2 Feb 2010 16:50:55 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12Gotjg088971 for ; Tue, 2 Feb 2010 16:50:55 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12GotxS088969 for perforce@freebsd.org; Tue, 2 Feb 2010 16:50:55 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 2 Feb 2010 16:50:55 GMT Message-Id: <201002021650.o12GotxS088969@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174156 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 16:50:55 -0000 http://p4web.freebsd.org/chv.cgi?CH=174156 Change 174156 by rwatson@rwatson_vimage_client on 2010/02/02 16:50:26 Style tweaks. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.c#4 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#12 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#10 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#11 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host_io.c#3 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_internal.h#6 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox.c#4 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox_api.h#4 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox_io.c#3 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.c#4 (text+ko) ==== @@ -5,9 +5,9 @@ * WARNING: THIS IS EXPERIMENTAL SECURITY SOFTWARE THAT MUST NOT BE RELIED * ON IN PRODUCTION SYSTEMS. IT WILL BREAK YOUR SOFTWARE IN NEW AND * UNEXPECTED WAYS. - * + * * This software was developed at the University of Cambridge Computer - * Laboratory with support from a grant from Google, Inc. + * Laboratory with support from a grant from Google, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.c#3 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.c#4 $ */ #include ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#12 (text+ko) ==== @@ -5,9 +5,9 @@ * WARNING: THIS IS EXPERIMENTAL SECURITY SOFTWARE THAT MUST NOT BE RELIED * ON IN PRODUCTION SYSTEMS. IT WILL BREAK YOUR SOFTWARE IN NEW AND * UNEXPECTED WAYS. - * + * * This software was developed at the University of Cambridge Computer - * Laboratory with support from a grant from Google, Inc. + * Laboratory with support from a grant from Google, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#11 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#12 $ */ #ifndef _LIBCAPSICUM_H_ @@ -45,15 +45,6 @@ struct lc_host; /* - * Description of a library passed to lch_start_libs(). - */ -struct lc_library { - const char *lcl_libpath; - const char *lcl_libname; - int lcl_fd; -}; - -/* * A list of file descriptors, which can be passed around in shared memory. */ struct lc_fdlist; ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#10 (text+ko) ==== @@ -6,9 +6,9 @@ * WARNING: THIS IS EXPERIMENTAL SECURITY SOFTWARE THAT MUST NOT BE RELIED * ON IN PRODUCTION SYSTEMS. IT WILL BREAK YOUR SOFTWARE IN NEW AND * UNEXPECTED WAYS. - * + * * This software was developed at the University of Cambridge Computer - * Laboratory with support from a grant from Google, Inc. + * Laboratory with support from a grant from Google, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#9 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_fdlist.c#10 $ */ #include @@ -99,7 +99,6 @@ UNLOCK(&global_fdlist); return (&global_fdlist); } - env = getenv(LIBCAPSICUM_SANDBOX_FDLIST); if ((env != NULL) && (strnlen(env, 8) < 7)) { struct lc_fdlist_storage *lfsp; @@ -430,8 +429,8 @@ LOCK(lfp); lfsp = lfp->lf_storage; - if ((subsystem == NULL) || (classname == NULL) || (name == NULL) - || (fdp == NULL) || ((pos != NULL) && (*pos >= (int) lfsp->count))) { + if ((subsystem == NULL) || (classname == NULL) || (name == NULL) || + (fdp == NULL) || ((pos != NULL) && (*pos >= (int) lfsp->count))) { errno = EINVAL; return (-1); } @@ -441,23 +440,22 @@ int size = entry->syslen + entry->classnamelen + entry->namelen; char *head = malloc(size); - strncpy(head, names + entry->sysoff, entry->syslen + 1); + strncpy(head, names + entry->sysoff, entry->syslen + 1); *subsystem = head; head += size; - strncpy(head, names + entry->classoff, entry->classnamelen + 1); + strncpy(head, names + entry->classoff, entry->classnamelen + 1); *classname = head; head += size; - strncpy(head, names + entry->nameoff, entry->namelen + 1); + strncpy(head, names + entry->nameoff, entry->namelen + 1); *name = head; head += size; *fdp = entry->fd; UNLOCK(lfp); - - if (pos) (*pos)++; - + if (pos) + (*pos)++; return (0); } @@ -547,7 +545,8 @@ } void* -_lc_fdlist_getstorage(struct lc_fdlist* lfp) { - return lfp->lf_storage; +_lc_fdlist_getstorage(struct lc_fdlist* lfp) +{ + + return (lfp->lf_storage); } - ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#11 (text+ko) ==== @@ -5,9 +5,9 @@ * WARNING: THIS IS EXPERIMENTAL SECURITY SOFTWARE THAT MUST NOT BE RELIED * ON IN PRODUCTION SYSTEMS. IT WILL BREAK YOUR SOFTWARE IN NEW AND * UNEXPECTED WAYS. - * + * * This software was developed at the University of Cambridge Computer - * Laboratory with support from a grant from Google, Inc. + * Laboratory with support from a grant from Google, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#10 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#11 $ */ #include @@ -89,10 +89,16 @@ return (1); } - +/* + * Once in the child process, create the new sandbox. + * + * XXX: A number of things happen here that are not safe after fork(), + * especially calls to err(). + */ static void -lch_sandbox(int fd_sock, int fd_binary, int fd_rtld, int fd_devnull, u_int flags, - const char *binname, char *const argv[], __unused struct lc_fdlist *userfds) +lch_sandbox(int fd_sock, int fd_binary, int fd_rtld, int fd_devnull, + u_int flags, const char *binname, char *const argv[], + struct lc_fdlist *userfds) { struct sbuf *sbufp; int shmfd = -1; @@ -160,41 +166,38 @@ /* * Ask RTLD for library path descriptors. * - * NOTE: This is FreeBSD-specific; porting to other operating systems will - * require dynamic linkers capable of answering similar queries. + * NOTE: This is FreeBSD-specific; porting to other operating systems + * will require dynamic linkers capable of answering similar queries. */ int size = 16; int *libdirs; while (1) { libdirs = malloc(size * sizeof(int)); - if (ld_libdirs(libdirs, &size) < 0) { free(libdirs); - - if (size > 0) continue; - else err(-1, "Error in ld_libdirs()"); - } - else break; + if (size > 0) + continue; + err(-1, "Error in ld_libdirs()"); + } else + break; } - for (int j = 0; j < size; j++) if (lc_fdlist_addcap(fds, RTLD_CAP_FQNAME, "libdir", "", - libdirs[j], LIBCAPSICUM_CAPMASK_LIBDIR) < 0) + libdirs[j], LIBCAPSICUM_CAPMASK_LIBDIR) < 0) err(-1, "Error in lc_fdlist_addcap(libdirs[%d]: %d)", j, libdirs[j]); if (lc_fdlist_reorder(fds) < 0) err(-1, "Error in lc_fdlist_reorder()"); - /* * Find the fdlist shared memory segment. */ int pos = 0; - if (lc_fdlist_lookup(fds, LIBCAPSICUM_FQNAME, "fdlist", NULL, - &shmfd, &pos) < 0) + if (lc_fdlist_lookup(fds, LIBCAPSICUM_FQNAME, "fdlist", NULL, &shmfd, + &pos) < 0) err(-1, "Error in lc_fdlist_lookup(fdlist)"); char tmp[8]; @@ -229,8 +232,8 @@ /* * Find the binary for RTLD. */ - if (lc_fdlist_lookup(fds, RTLD_CAP_FQNAME, "binary", NULL, &fd_binary, - NULL) < 0) + if (lc_fdlist_lookup(fds, RTLD_CAP_FQNAME, "binary", NULL, + &fd_binary, NULL) < 0) err(-1, "Error in lc_fdlist_lookup(RTLD binary)"); sprintf(tmp, "%d", fd_binary); @@ -240,8 +243,9 @@ /* * Build LD_LIBRARY_DIRS for RTLD. * - * NOTE: This is FreeBSD-specific; porting to other operating systems will - * require dynamic linkers capable of operating on file descriptors. + * NOTE: This is FreeBSD-specific; porting to other operating systems + * will require dynamic linkers capable of operating on file + * descriptors. */ sbufp = sbuf_new_auto(); if (sbufp == NULL) @@ -249,8 +253,8 @@ { int fd; - while (lc_fdlist_lookup(fds, RTLD_CAP_FQNAME, "libdir", - NULL, &fd, &pos) >= 0) + while (lc_fdlist_lookup(fds, RTLD_CAP_FQNAME, "libdir", NULL, + &fd, &pos) >= 0) sbuf_printf(sbufp, "%d:", fd); } @@ -261,7 +265,6 @@ err(-1, "Error in setenv(LD_LIBRARY_DIRS)"); sbuf_delete(sbufp); - if (cap_enter() < 0) err(-1, "cap_enter() failed"); @@ -334,8 +337,8 @@ goto out_error; } if (pid == 0) { - lch_sandbox(fd_sockpair[1], fd_binary, fd_rtld, fd_devnull, flags, - binname, argv, fds); + lch_sandbox(fd_sockpair[1], fd_binary, fd_rtld, fd_devnull, + flags, binname, argv, fds); exit(-1); } #ifndef IN_CAP_MODE @@ -380,11 +383,11 @@ int lch_startfd(int fd_binary, const char *binname, char *const argv[], - u_int flags, __unused struct lc_fdlist *fds, struct lc_sandbox **lcspp) + u_int flags, struct lc_fdlist *fds, struct lc_sandbox **lcspp) { - return (lch_startfd_libs(fd_binary, binname, argv, flags, - fds, lcspp)); + return (lch_startfd_libs(fd_binary, binname, argv, flags, fds, + lcspp)); } int ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host_io.c#3 (text+ko) ==== @@ -5,9 +5,9 @@ * WARNING: THIS IS EXPERIMENTAL SECURITY SOFTWARE THAT MUST NOT BE RELIED * ON IN PRODUCTION SYSTEMS. IT WILL BREAK YOUR SOFTWARE IN NEW AND * UNEXPECTED WAYS. - * + * * This software was developed at the University of Cambridge Computer - * Laboratory with support from a grant from Google, Inc. + * Laboratory with support from a grant from Google, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host_io.c#2 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host_io.c#3 $ */ #include ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_internal.h#6 (text+ko) ==== @@ -5,9 +5,9 @@ * WARNING: THIS IS EXPERIMENTAL SECURITY SOFTWARE THAT MUST NOT BE RELIED * ON IN PRODUCTION SYSTEMS. IT WILL BREAK YOUR SOFTWARE IN NEW AND * UNEXPECTED WAYS. - * + * * This software was developed at the University of Cambridge Computer - * Laboratory with support from a grant from Google, Inc. + * Laboratory with support from a grant from Google, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,14 +30,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_internal.h#5 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_internal.h#6 $ */ #ifndef _LIBCAPSICUM_INTERNAL_H_ #define _LIBCAPSICUM_INTERNAL_H_ -#define LIBCAPSICUM_FQNAME "org.freebsd.libcapsicum" -#define RTLD_CAP_FQNAME "org.freebsd.rtld-elf-cap" +#define LIBCAPSICUM_FQNAME "org.freebsd.libcapsicum" +#define RTLD_CAP_FQNAME "org.freebsd.rtld-elf-cap" struct lc_host { int lch_fd_sock; ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox.c#4 (text+ko) ==== @@ -5,9 +5,9 @@ * WARNING: THIS IS EXPERIMENTAL SECURITY SOFTWARE THAT MUST NOT BE RELIED * ON IN PRODUCTION SYSTEMS. IT WILL BREAK YOUR SOFTWARE IN NEW AND * UNEXPECTED WAYS. - * + * * This software was developed at the University of Cambridge Computer - * Laboratory with support from a grant from Google, Inc. + * Laboratory with support from a grant from Google, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox_api.h#4 (text+ko) ==== @@ -5,9 +5,9 @@ * WARNING: THIS IS EXPERIMENTAL SECURITY SOFTWARE THAT MUST NOT BE RELIED * ON IN PRODUCTION SYSTEMS. IT WILL BREAK YOUR SOFTWARE IN NEW AND * UNEXPECTED WAYS. - * + * * This software was developed at the University of Cambridge Computer - * Laboratory with support from a grant from Google, Inc. + * Laboratory with support from a grant from Google, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox_api.h#3 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox_api.h#4 $ */ #ifndef _LIBCAPSICUM_SANDBOX_API_H_ @@ -41,7 +41,7 @@ * make about the runtime environment set up by libcapsicum hosts. */ #define LIBCAPSICUM_SANDBOX_API_ENV "LIBCAPSICUM_SANDBOX" -#define LIBCAPSICUM_SANDBOX_FDLIST "LIBCAPSICUM_FDLIST" +#define LIBCAPSICUM_SANDBOX_FDLIST "LIBCAPSICUM_FDLIST" #define LIBCAPSICUM_SANDBOX_API_SOCK "sock" /* ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_sandbox_io.c#3 (text+ko) ==== @@ -5,9 +5,9 @@ * WARNING: THIS IS EXPERIMENTAL SECURITY SOFTWARE THAT MUST NOT BE RELIED * ON IN PRODUCTION SYSTEMS. IT WILL BREAK YOUR SOFTWARE IN NEW AND * UNEXPECTED WAYS. - * + * * This software was developed at the University of Cambridge Computer - * Laboratory with support from a grant from Google, Inc. + * Laboratory with support from a grant from Google, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-p4-projects@FreeBSD.ORG Tue Feb 2 17:00:05 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C4CC51065672; Tue, 2 Feb 2010 17:00:05 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88D7D106566B for ; Tue, 2 Feb 2010 17:00:05 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 680478FC0C for ; Tue, 2 Feb 2010 17:00:04 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12H04vq089561 for ; Tue, 2 Feb 2010 17:00:04 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12H049B089559 for perforce@freebsd.org; Tue, 2 Feb 2010 17:00:04 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 2 Feb 2010 17:00:04 GMT Message-Id: <201002021700.o12H049B089559@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174157 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 17:00:06 -0000 http://p4web.freebsd.org/chv.cgi?CH=174157 Change 174157 by rwatson@rwatson_vimage_client on 2010/02/02 16:59:55 Revert to using an anonymous POSIX shared memory segment to pass fdlist information from the sandbox host into the sandbox. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#12 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#12 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#11 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#12 $ */ #include @@ -115,7 +115,7 @@ /* * Create an anonymous shared memory segment for the FD list. */ - shmfd = open("/tmp/jon-foo"/*SHM_ANON*/, O_RDWR | O_CREAT | O_TRUNC, 0600); + shmfd = shm_open(SHM_ANON, O_RDWR | O_CREAT | O_TRUNC, 0600); if (shmfd < 0) err(-1, "Error creating shared memory segment"); From owner-p4-projects@FreeBSD.ORG Tue Feb 2 17:14:19 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 63907106566C; Tue, 2 Feb 2010 17:14:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2842E1065694 for ; Tue, 2 Feb 2010 17:14:19 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 15B158FC14 for ; Tue, 2 Feb 2010 17:14:19 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12HEIKs091627 for ; Tue, 2 Feb 2010 17:14:18 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12HEI5H091625 for perforce@freebsd.org; Tue, 2 Feb 2010 17:14:18 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 2 Feb 2010 17:14:18 GMT Message-Id: <201002021714.o12HEI5H091625@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174160 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 17:14:19 -0000 http://p4web.freebsd.org/chv.cgi?CH=174160 Change 174160 by rwatson@rwatson_vimage_client on 2010/02/02 17:14:13 Garbage collect historic library management for sandboxes: we now pass in directory descriptors for library path directories and the sandboxed rtld can just search the path itself. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#13 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#13 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#12 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#13 $ */ #include @@ -63,18 +63,11 @@ CAP_MAPEXEC) #define LIBCAPSICUM_CAPMASK_SANDBOX LIBCAPSICUM_CAPMASK_BIN #define LIBCAPSICUM_CAPMASK_LDSO LIBCAPSICUM_CAPMASK_BIN -#define LIBCAPSICUM_CAPMASK_LIB LIBCAPSICUM_CAPMASK_BIN -#define LIBCAPSICUM_CAPMASK_LIBDIR LIBCAPSICUM_CAPMASK_LIB \ +#define LIBCAPSICUM_CAPMASK_LIBDIR LIBCAPSICUM_CAPMASK_BIN \ | CAP_LOOKUP | CAP_ATBASE #define LIBCAPSICUM_CAPMASK_FDLIST CAP_READ | CAP_WRITE | CAP_FTRUNCATE \ | CAP_FSTAT | CAP_MMAP -#define _PATH_LIB "/lib" -#define _PATH_USR_LIB "/usr/lib" -#define LIBC_SO "libc.so.7" -#define LIBCAPSICUM_SO "libcapsicum.so.1" -#define LIBSBUF_SO "libsbuf.so.5" - extern char **environ; #define LD_ELF_CAP_SO "ld-elf-cap.so.1" @@ -272,17 +265,17 @@ } int -lch_startfd_libs(int fd_binary, const char *binname, char *const argv[], +lch_startfd(int fd_binary, const char *binname, char *const argv[], u_int flags, struct lc_fdlist *fds, struct lc_sandbox **lcspp) { struct lc_sandbox *lcsp; - int fd_devnull, fd_rtld, fd_libc, fd_libcapsicum, fd_libsbuf; + int fd_devnull, fd_rtld; int fd_procdesc, fd_sockpair[2]; int error, val; pid_t pid; - fd_devnull = fd_rtld = fd_libc = fd_libcapsicum = fd_libsbuf = - fd_procdesc = fd_sockpair[0] = fd_sockpair[1] = -1; + fd_devnull = fd_rtld = fd_procdesc = fd_sockpair[0] = + fd_sockpair[1] = -1; lcsp = malloc(sizeof(*lcsp)); if (lcsp == NULL) @@ -292,13 +285,6 @@ if (ld_insandbox()) { if (ld_libcache_lookup(LD_ELF_CAP_SO, &fd_rtld) < 0) goto out_error; - if (ld_libcache_lookup(LIBC_SO, &fd_libc) < 0) - goto out_error; - if (ld_libcache_lookup(LIBCAPSICUM_SO, - &fd_libcapsicum) < 0) - goto out_error; - if (ld_libcache_lookup(LIBSBUF_SO, &fd_libsbuf) < 0) - goto out_error; if (ld_libcache_lookup(_PATH_DEVNULL, &fd_devnull) < 0) goto out_error; } else { @@ -306,16 +292,6 @@ O_RDONLY); if (fd_rtld < 0) goto out_error; - fd_libc = open(_PATH_LIB "/" LIBC_SO, O_RDONLY); - if (fd_libc < 0) - goto out_error; - fd_libsbuf = open(_PATH_LIB "/" LIBSBUF_SO, O_RDONLY); - if (fd_libsbuf < 0) - goto out_error; - fd_libcapsicum = open(_PATH_USR_LIB "/" LIBCAPSICUM_SO, - O_RDONLY); - if (fd_libcapsicum < 0) - goto out_error; fd_devnull = open(_PATH_DEVNULL, O_RDWR); if (fd_devnull < 0) goto out_error; @@ -343,9 +319,6 @@ } #ifndef IN_CAP_MODE close(fd_devnull); - close(fd_libsbuf); - close(fd_libcapsicum); - close(fd_libc); close(fd_rtld); #endif close(fd_sockpair[1]); @@ -366,12 +339,6 @@ #ifndef IN_CAP_MODE if (fd_devnull != -1) close(fd_devnull); - if (fd_libsbuf != -1) - close(fd_libsbuf); - if (fd_libcapsicum != -1) - close(fd_libcapsicum); - if (fd_libc != -1) - close(fd_libc); if (fd_rtld != -1) close(fd_rtld); #endif @@ -382,16 +349,7 @@ } int -lch_startfd(int fd_binary, const char *binname, char *const argv[], - u_int flags, struct lc_fdlist *fds, struct lc_sandbox **lcspp) -{ - - return (lch_startfd_libs(fd_binary, binname, argv, flags, fds, - lcspp)); -} - -int -lch_start_libs(const char *sandbox, char *const argv[], u_int flags, +lch_start(const char *sandbox, char *const argv[], u_int flags, struct lc_fdlist *fds, struct lc_sandbox **lcspp) { char binname[MAXPATHLEN]; @@ -404,21 +362,13 @@ if (fd_binary < 0) return (-1); - ret = lch_startfd_libs(fd_binary, binname, argv, flags, fds, lcspp); + ret = lch_startfd(fd_binary, binname, argv, flags, fds, lcspp); error = errno; close(fd_binary); errno = error; return (ret); } -int -lch_start(const char *sandbox, char *const argv[], u_int flags, - struct lc_fdlist *fds, struct lc_sandbox **lcspp) -{ - - return (lch_start_libs(sandbox, argv, flags, fds, lcspp)); -} - void lch_stop(struct lc_sandbox *lcsp) { From owner-p4-projects@FreeBSD.ORG Tue Feb 2 17:15:20 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8A8E51065670; Tue, 2 Feb 2010 17:15:20 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EC7E106566C for ; Tue, 2 Feb 2010 17:15:20 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3C8F08FC19 for ; Tue, 2 Feb 2010 17:15:20 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12HFKGT091745 for ; Tue, 2 Feb 2010 17:15:20 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12HFK91091743 for perforce@freebsd.org; Tue, 2 Feb 2010 17:15:20 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 2 Feb 2010 17:15:20 GMT Message-Id: <201002021715.o12HFK91091743@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174161 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 17:15:20 -0000 http://p4web.freebsd.org/chv.cgi?CH=174161 Change 174161 by rwatson@rwatson_vimage_client on 2010/02/02 17:14:40 Garbage collect historic library behavior of libcapsicum: no special library logic is required in gzip anymore. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/usr.bin/gzip/gzsandbox.c#13 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/usr.bin/gzip/gzsandbox.c#13 (text+ko) ==== @@ -49,27 +49,10 @@ #include "gzip.h" -/* - * In the future, these library dependencies won't need to be explicit, so - * this will go away. - */ -#define LC_LIB_LIBZ_SO "/lib/libz.so.5" -#define LC_LIBZ_SO "libz.so.5" - -#define LC_USR_LIB_LIBBZ2_SO "/usr/lib/libbz2.so.4" -#define LC_LIBBZ2_SO "libbz2.so.4" - #define LC_USR_BIN_GZIP_SANDBOX "/usr/bin/gzip" #ifndef NO_SANDBOX_SUPPORT -struct lc_library gzsandbox_libs[] = { - { LC_LIB_LIBZ_SO, LC_LIBZ_SO, -1 }, - { LC_USR_LIB_LIBBZ2_SO, LC_LIBBZ2_SO, -1 }, -}; -static const u_int gzsandbox_libs_count = sizeof(gzsandbox_libs) / - sizeof(gzsandbox_libs[0]); - static char *lc_sandbox_argv[] = { __DECONST(char *, LC_USR_BIN_GZIP_SANDBOX), NULL }; @@ -84,7 +67,6 @@ static void gzsandbox_initialize(void) { - u_int i; if (gzsandbox_initialized) return; @@ -93,17 +75,7 @@ if (!gzsandbox_enabled) return; - /* - * If sandboxes are in use, open libraries that we'll require in the - * sandbox and kick it off. - */ - for (i = 0; i < gzsandbox_libs_count; i++) { - gzsandbox_libs[i].lcl_fd = - open(gzsandbox_libs[i].lcl_libpath, O_RDONLY); - if (gzsandbox_libs[i].lcl_fd < 0) - err(-1, "open: %s", gzsandbox_libs[i].lcl_libname); - } - if (lch_start_libs(LC_USR_BIN_GZIP_SANDBOX, lc_sandbox_argv, + if (lch_start(LC_USR_BIN_GZIP_SANDBOX, lc_sandbox_argv, LCH_PERMIT_STDERR, NULL, &lcsp) < 0) err(-1, "lch_start %s", LC_USR_BIN_GZIP_SANDBOX); } From owner-p4-projects@FreeBSD.ORG Tue Feb 2 17:17:22 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B6C8B1065670; Tue, 2 Feb 2010 17:17:22 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B697106566B for ; Tue, 2 Feb 2010 17:17:22 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 693EB8FC08 for ; Tue, 2 Feb 2010 17:17:22 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12HHMXO091864 for ; Tue, 2 Feb 2010 17:17:22 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12HHMTf091862 for perforce@freebsd.org; Tue, 2 Feb 2010 17:17:22 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 2 Feb 2010 17:17:22 GMT Message-Id: <201002021717.o12HHMTf091862@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174162 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 17:17:22 -0000 http://p4web.freebsd.org/chv.cgi?CH=174162 Change 174162 by rwatson@rwatson_vimage_client on 2010/02/02 17:16:44 libc no longer requires stub libcache functions. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libc/gen/Makefile.inc#17 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libc/gen/Symbol.map#19 edit .. //depot/projects/trustedbsd/capabilities/src/lib/libc/gen/ld_libcache.c#4 delete Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libc/gen/Makefile.inc#17 (text+ko) ==== @@ -20,7 +20,7 @@ getpeereid.c getprogname.c getpwent.c getttyent.c \ getusershell.c getvfsbyname.c glob.c \ initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \ - ld_libcache.c ld_libdirs.c ld_sandbox.c \ + ld_libdirs.c ld_sandbox.c \ lockf.c lrand48.c mrand48.c nftw.c nice.c \ nlist.c nrand48.c opendir.c \ pause.c pmadvise.c popen.c posix_spawn.c \ ==== //depot/projects/trustedbsd/capabilities/src/lib/libc/gen/Symbol.map#19 (text) ==== @@ -370,8 +370,6 @@ sem_post; sem_wait; sem_unlink; - ld_libcache_add; - ld_libcache_lookup; ld_insandbox; ld_libdirs; }; From owner-p4-projects@FreeBSD.ORG Tue Feb 2 17:34:40 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3BBC11065692; Tue, 2 Feb 2010 17:34:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC180106568D for ; Tue, 2 Feb 2010 17:34:39 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C9BBD8FC0A for ; Tue, 2 Feb 2010 17:34:39 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12HYdEE093232 for ; Tue, 2 Feb 2010 17:34:39 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12HYdY9093230 for perforce@freebsd.org; Tue, 2 Feb 2010 17:34:39 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 2 Feb 2010 17:34:39 GMT Message-Id: <201002021734.o12HYdY9093230@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174163 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 17:34:40 -0000 http://p4web.freebsd.org/chv.cgi?CH=174163 Change 174163 by rwatson@rwatson_vimage_client on 2010/02/02 17:33:46 No longer need special handling of /dev/null during sandbox creation, we simply now pass in the original stdin/stdout/stderr, but without any capability rights. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#14 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#14 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#13 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#14 $ */ #include @@ -55,7 +55,6 @@ #include "libcapsicum_internal.h" #include "libcapsicum_sandbox_api.h" -#define LIBCAPSICUM_CAPMASK_DEVNULL (CAP_EVENT | CAP_READ | CAP_WRITE) #define LIBCAPSICUM_CAPMASK_SOCK (CAP_EVENT | CAP_READ | CAP_WRITE) #define LIBCAPSICUM_CAPMASK_BIN (CAP_READ | CAP_EVENT | CAP_FSTAT | \ CAP_FSTATFS | \ @@ -89,9 +88,8 @@ * especially calls to err(). */ static void -lch_sandbox(int fd_sock, int fd_binary, int fd_rtld, int fd_devnull, - u_int flags, const char *binname, char *const argv[], - struct lc_fdlist *userfds) +lch_sandbox(int fd_sock, int fd_binary, int fd_rtld, u_int flags, + const char *binname, char *const argv[], struct lc_fdlist *userfds) { struct sbuf *sbufp; int shmfd = -1; @@ -137,10 +135,6 @@ fd_sock, LIBCAPSICUM_CAPMASK_SOCK) < 0) err(-1, "Error in lc_fdlist_addcap(fd_sock)"); - if (lc_fdlist_addcap(fds, LIBCAPSICUM_FQNAME, "/dev/null", "", - fd_devnull, LIBCAPSICUM_CAPMASK_DEVNULL) < 0) - err(-1, "Error in lc_fdlist_addcap(fd_devnull)"); - if (lc_fdlist_addcap(fds, LIBCAPSICUM_FQNAME, "fdlist", "", shmfd, LIBCAPSICUM_CAPMASK_FDLIST) < 0) err(-1, "Error in lc_fdlist_addcap(shmfd)"); @@ -269,13 +263,12 @@ u_int flags, struct lc_fdlist *fds, struct lc_sandbox **lcspp) { struct lc_sandbox *lcsp; - int fd_devnull, fd_rtld; + int fd_rtld; int fd_procdesc, fd_sockpair[2]; int error, val; pid_t pid; - fd_devnull = fd_rtld = fd_procdesc = fd_sockpair[0] = - fd_sockpair[1] = -1; + fd_rtld = fd_procdesc = fd_sockpair[0] = fd_sockpair[1] = -1; lcsp = malloc(sizeof(*lcsp)); if (lcsp == NULL) @@ -285,16 +278,11 @@ if (ld_insandbox()) { if (ld_libcache_lookup(LD_ELF_CAP_SO, &fd_rtld) < 0) goto out_error; - if (ld_libcache_lookup(_PATH_DEVNULL, &fd_devnull) < 0) - goto out_error; } else { fd_rtld = open(PATH_LD_ELF_CAP_SO "/" LD_ELF_CAP_SO, O_RDONLY); if (fd_rtld < 0) goto out_error; - fd_devnull = open(_PATH_DEVNULL, O_RDWR); - if (fd_devnull < 0) - goto out_error; } if (socketpair(PF_LOCAL, SOCK_STREAM, 0, fd_sockpair) < 0) @@ -313,12 +301,11 @@ goto out_error; } if (pid == 0) { - lch_sandbox(fd_sockpair[1], fd_binary, fd_rtld, fd_devnull, - flags, binname, argv, fds); + lch_sandbox(fd_sockpair[1], fd_binary, fd_rtld, flags, + binname, argv, fds); exit(-1); } #ifndef IN_CAP_MODE - close(fd_devnull); close(fd_rtld); #endif close(fd_sockpair[1]); @@ -337,8 +324,6 @@ if (fd_sockpair[1] != -1) close(fd_sockpair[1]); #ifndef IN_CAP_MODE - if (fd_devnull != -1) - close(fd_devnull); if (fd_rtld != -1) close(fd_rtld); #endif From owner-p4-projects@FreeBSD.ORG Tue Feb 2 17:55:00 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 90D5910656A4; Tue, 2 Feb 2010 17:55:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55632106568B for ; Tue, 2 Feb 2010 17:55:00 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 42F568FC16 for ; Tue, 2 Feb 2010 17:55:00 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12Ht0Vo094649 for ; Tue, 2 Feb 2010 17:55:00 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12Ht0ID094647 for perforce@freebsd.org; Tue, 2 Feb 2010 17:55:00 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 2 Feb 2010 17:55:00 GMT Message-Id: <201002021755.o12Ht0ID094647@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174164 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 17:55:00 -0000 http://p4web.freebsd.org/chv.cgi?CH=174164 Change 174164 by rwatson@rwatson_vimage_client on 2010/02/02 17:54:38 When creating a sandbox from within a sandbox, look in the global fdlist inherited from the parent sandbox to find the runtime linker. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#15 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#15 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#14 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#15 $ */ #include @@ -276,7 +276,14 @@ bzero(lcsp, sizeof(*lcsp)); if (ld_insandbox()) { - if (ld_libcache_lookup(LD_ELF_CAP_SO, &fd_rtld) < 0) + struct lc_fdlist *globals; + int pos = 0; + + globals = lc_fdlist_global(); + if (globals == NULL) + goto out_error; + if (lc_fdlist_lookup(globals, RTLD_CAP_FQNAME, "rtld", NULL, + &fd_rtld, &pos) < 0) goto out_error; } else { fd_rtld = open(PATH_LD_ELF_CAP_SO "/" LD_ELF_CAP_SO, From owner-p4-projects@FreeBSD.ORG Tue Feb 2 18:35:42 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 738FD1065692; Tue, 2 Feb 2010 18:35:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37D25106568B for ; Tue, 2 Feb 2010 18:35:42 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2595A8FC29 for ; Tue, 2 Feb 2010 18:35:42 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12IZgec098841 for ; Tue, 2 Feb 2010 18:35:42 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12IZgaZ098839 for perforce@freebsd.org; Tue, 2 Feb 2010 18:35:42 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 2 Feb 2010 18:35:42 GMT Message-Id: <201002021835.o12IZgaZ098839@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174171 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 18:35:42 -0000 http://p4web.freebsd.org/chv.cgi?CH=174171 Change 174171 by rwatson@rwatson_vimage_client on 2010/02/02 18:35:07 Process LD_BINARY in rtld-elf-cap rather than using a hard-coded descriptor number; this is already set in libcapsicum but we weren't using it. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#35 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#35 (text+ko) ==== @@ -395,6 +395,11 @@ assert(aux_info[AT_BASE] != NULL); init_rtld((caddr_t) aux_info[AT_BASE]->a_un.a_ptr); + /* XXXRW: Need to do something about program names in capability mode. */ + __progname = obj_rtld.path; /* TODO: binary name */ + argv0 = argv[0] != NULL ? argv[0] : "(null)"; + environ = env; + #ifdef IN_RTLD_CAP /* * In capability mode, the kernel has executed ld-elf-cap.so directly, @@ -404,23 +409,32 @@ * descriptor using AT_EXECFD. */ if (aux_info[AT_EXECFD] == NULL) { - bzero(&aux_execfd, sizeof(aux_execfd)); - aux_execfd.a_type = AT_EXECFD; - aux_execfd.a_un.a_val = 7; /* TODO: stop hardcoding */ - aux_info[AT_EXECFD] = &aux_execfd; - if (fstat(7, &sb) < 0) { + const char *ld_binary; + char *endp; + long ld_binary_fd; + + ld_binary = getenv(LD_ "BINARY"); + if (ld_binary == NULL) { + _rtld_error("LD_BINARY unset; aborting"); + die(); + } + ld_binary_fd = strtol(ld_binary, &endp, 10); + if (ld_binary_fd < 0 || ld_binary_fd > __INT_MAX || *endp != 0) { + _rtld_error("LD_BINARY invalid"); + die(); + } + if (fstat(ld_binary_fd, &sb) < 0) { __progname = "ld-elf-cap.so"; _rtld_error("executable file descriptor unusable"); die(); } + bzero(&aux_execfd, sizeof(aux_execfd)); + aux_execfd.a_type = AT_EXECFD; + aux_execfd.a_un.a_val = ld_binary_fd; + aux_info[AT_EXECFD] = &aux_execfd; } #endif - /* XXXRW: Need to do something about program names in capability mode. */ - __progname = obj_rtld.path; /* TODO: binary name */ - argv0 = argv[0] != NULL ? argv[0] : "(null)"; - environ = env; - trust = !issetugid(); ld_bind_now = getenv(LD_ "BIND_NOW"); From owner-p4-projects@FreeBSD.ORG Tue Feb 2 19:19:27 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 201E8106568B; Tue, 2 Feb 2010 19:19:27 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8DA5106566B for ; Tue, 2 Feb 2010 19:19:26 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ACCD48FC14 for ; Tue, 2 Feb 2010 19:19:26 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12JJQnO003437 for ; Tue, 2 Feb 2010 19:19:26 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12JJQiv003435 for perforce@freebsd.org; Tue, 2 Feb 2010 19:19:26 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 2 Feb 2010 19:19:26 GMT Message-Id: <201002021919.o12JJQiv003435@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174178 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 19:19:27 -0000 http://p4web.freebsd.org/chv.cgi?CH=174178 Change 174178 by rwatson@rwatson_vimage_client on 2010/02/02 19:18:45 When compressing in a sandbox, forward 'numflag' for zlib compression, asithat controls the compression level. Reported by: kris Affected files ... .. //depot/projects/trustedbsd/capabilities/src/usr.bin/gzip/gzip.c#9 edit .. //depot/projects/trustedbsd/capabilities/src/usr.bin/gzip/gzip.h#3 edit .. //depot/projects/trustedbsd/capabilities/src/usr.bin/gzip/gzsandbox.c#14 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/usr.bin/gzip/gzip.c#9 (text+ko) ==== @@ -186,7 +186,7 @@ static int cflag; /* stdout mode */ static int dflag; /* decompress mode */ static int lflag; /* list mode */ -static int numflag = 6; /* gzip -1..-9 value */ +int numflag = 6; /* gzip -1..-9 value */ #ifndef SMALL static int fflag; /* force mode */ ==== //depot/projects/trustedbsd/capabilities/src/usr.bin/gzip/gzip.h#3 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Robert N. M. Watson + * Copyright (c) 2009-2010 Robert N. M. Watson * All rights reserved. * * WARNING: THIS IS EXPERIMENTAL SECURITY SOFTWARE THAT MUST NOT BE RELIED @@ -34,6 +34,12 @@ #ifndef _GZIP_H_ #define _GZIP_H_ +/* + * We need to forward the global variable 'numflag' to the sandbox as well as + * function arguments. + */ +extern int numflag; + off_t gz_compress(int in, int out, off_t *gsizep, const char *origname, uint32_t mtime); off_t gz_compress_wrapper(int in, int out, off_t *gsizep, ==== //depot/projects/trustedbsd/capabilities/src/usr.bin/gzip/gzsandbox.c#14 (text+ko) ==== @@ -82,6 +82,7 @@ struct host_gz_compress_req { char hgc_req_origname[PATH_MAX]; + int hgc_req_numflag; uint32_t hgc_req_mtime; } __packed; @@ -103,6 +104,7 @@ bzero(&req, sizeof(req)); strlcpy(req.hgc_req_origname, origname, sizeof(req.hgc_req_origname)); + req.hgc_req_numflag = numflag; req.hgc_req_mtime = mtime; iov_req.iov_base = &req; iov_req.iov_len = sizeof(req); @@ -137,6 +139,7 @@ bcopy(buffer, &req, sizeof(req)); bzero(&rep, sizeof(rep)); + numflag = req.hgc_req_numflag; rep.hgc_rep_retval = gz_compress(fd_in, fd_out, &rep.hgc_rep_gsize, req.hgc_req_origname, req.hgc_req_mtime); iov.iov_base = &rep; From owner-p4-projects@FreeBSD.ORG Tue Feb 2 19:58:06 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9DA60106568B; Tue, 2 Feb 2010 19:58:06 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 621941065672 for ; Tue, 2 Feb 2010 19:58:06 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4E4C88FC1A for ; Tue, 2 Feb 2010 19:58:06 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12Jw6IF006675 for ; Tue, 2 Feb 2010 19:58:06 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12Jw6Ro006673 for perforce@freebsd.org; Tue, 2 Feb 2010 19:58:06 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 2 Feb 2010 19:58:06 GMT Message-Id: <201002021958.o12Jw6Ro006673@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174184 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 19:58:06 -0000 http://p4web.freebsd.org/chv.cgi?CH=174184 Change 174184 by rwatson@rwatson_vimage_client on 2010/02/02 19:57:54 Update a number of regression tests, some to the point of workingness, for the new world order. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/cap/fdlist/fdlist.c#9 edit .. //depot/projects/trustedbsd/capabilities/src/tools/cap/fdrpc/fdrpc.c#8 edit .. //depot/projects/trustedbsd/capabilities/src/tools/cap/fdsendrecv/fdsendrecv.c#5 edit .. //depot/projects/trustedbsd/capabilities/src/tools/cap/sandbox_echo/sandbox_echo.c#12 edit .. //depot/projects/trustedbsd/capabilities/src/tools/cap/sandbox_world/sandbox_world.c#7 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/cap/fdlist/fdlist.c#9 (text+ko) ==== @@ -56,69 +56,44 @@ int main(int argc, char *argv[]) { + struct lc_fdlist *lfp; + int testfd; + printf("fdlist: PID %d\n", getpid()); - /* create a shared memory segment for FDs */ - int shmfd = shm_open(SHM_ANON, O_RDWR, 0600); - if (shmfd < 0) - err(-1, "Error opening shared memory"); - - /* create an FD list and add some junk to it */ - struct lc_fdlist *lfp = lc_fdlist_new(); - if (lfp == NULL) err(-1, "Error in lc_fdlist_new()"); + lfp = lc_fdlist_new(); + if (lfp == NULL) + err(-1, "lc_fdlist_new()"); - lc_fdlist_addcap(lfp, "org.freebsd.Capsicum.fdlist", "stdin", "", + lc_fdlist_addcap(lfp, "org.freebsd.test.fdlist", "stdin", "", 0, CAP_READ); - lc_fdlist_addcap(lfp, "org.freebsd.Capsicum.fdlist", "stdout", "", + lc_fdlist_addcap(lfp, "org.freebsd.test.fdlist", "stdout", "", 1, CAP_WRITE | CAP_SEEK); - lc_fdlist_addcap(lfp, "org.freebsd.Capsicum.fdlist", "stderr", "", + lc_fdlist_addcap(lfp, "org.freebsd.test.fdlist", "stderr", "", 2, CAP_WRITE | CAP_SEEK); - lc_fdlist_add(lfp, "org.freebsd.Capsicum.fdlist", "testfile", + lc_fdlist_add(lfp, "org.freebsd.test.fdlist", "testfile", "/etc/passwd", open("/etc/passwd", O_RDONLY)); - lc_fdlist_addcap(lfp, "org.freebsd.Capsicum.fdlist", "testfile", + lc_fdlist_addcap(lfp, "org.freebsd.test.fdlist", "testfile", "/etc/group", open("/etc/group", O_RDONLY), CAP_READ); - lc_fdlist_add(lfp, "org.freebsd.Capsicum.fdlist", "fdlist", - "", shmfd); - - print_fdlist(lfp); - - printf("Reordering FDs...\n"); - if (lc_fdlist_reorder(lfp)) - err(-1, "lc_fdlist_reorder(lfp) failed"); print_fdlist(lfp); - char *name; - if (lc_fdlist_lookup(lfp, "org.freebsd.Capsicum.fdlist", "fdlist", - &name, &shmfd, NULL) < 0) { - err(-1, "Error in lc_fdlist_lookup()"); + if (lc_fdlist_lookup(lfp, "org.freebsd.test.fdlist", "stdin", + &name, &testfd, NULL) < 0) { + err(-1, "lc_fdlist_lookup: can't find stdin"); } - int size = lc_fdlist_size(lfp); - if (ftruncate(shmfd, size) < 0) - err(-1, "Error truncating shmfd"); - - void *shm = mmap(NULL, size, PROT_READ | PROT_WRITE, - MAP_NOSYNC | MAP_SHARED, shmfd, 0); - - if (shm == MAP_FAILED) - err(-1, "Error mmap'ing shared memory"); - - - memcpy(shm, lfp, lc_fdlist_size(lfp)); - - printf("Starting sandbox...\n"); - /* run sandbox */ int me = open(argv[0], O_RDONLY); - if (me < 0) err(-1, "Error opening my own binary, '%s'", argv[0]); + if (me < 0) + err(-1, "Error opening my own binary, '%s'", argv[0]); char *sargv[] = { "fdlist-sandbox", NULL }; struct lc_sandbox *sandbox; @@ -134,7 +109,8 @@ -int cap_main(__unused int argc, __unused char *argv[]) +int +cap_main(__unused int argc, __unused char *argv[]) { printf("cap_main() alive\n"); fflush(stdout); @@ -157,9 +133,8 @@ return 0; } - - -void print_fdlist(struct lc_fdlist* lfp) +void +print_fdlist(struct lc_fdlist* lfp) { int pos = 0; char *subsystem; @@ -173,4 +148,3 @@ pos, subsystem, class, name, fd); } } - ==== //depot/projects/trustedbsd/capabilities/src/tools/cap/fdrpc/fdrpc.c#8 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Robert N. M. Watson + * Copyright (c) 2009-2010 Robert N. M. Watson * All rights reserved. * * WARNING: THIS IS EXPERIMENTAL SECURITY SOFTWARE THAT MUST NOT BE RELIED @@ -71,7 +71,8 @@ /* * Create a sandbox, do permit access to stderr. */ - if (lch_start(FDRPC_SANDBOX, fdrpc_argv, LCH_PERMIT_STDERR, &lcsp) < 0) + if (lch_start(FDRPC_SANDBOX, fdrpc_argv, LCH_PERMIT_STDERR, NULL, + &lcsp) < 0) err(-1, "lch_start %s", FDRPC_SANDBOX); /* ==== //depot/projects/trustedbsd/capabilities/src/tools/cap/fdsendrecv/fdsendrecv.c#5 (text+ko) ==== @@ -60,7 +60,7 @@ errx(-1, "usage: fdsendrecv_host"); if (lch_start(FDSENDRECV_SANDBOX, fdsendrecv_argv, LCH_PERMIT_STDERR, - &lcsp) < 0) + NULL, &lcsp) < 0) err(-1, "lch_start %s", FDSENDRECV_SANDBOX); /* @@ -79,7 +79,8 @@ if (fdcount == 1) printf("lch_recv_rights: OK\n"); else - printf("lch_recv_rights: fdcount %d\n", fdcount); + printf("lch_recv_rights: fdcount %d: %d %d\n", fdcount, + fdarray[0], fdarray[1]); lch_stop(lcsp); } @@ -97,14 +98,17 @@ while (1) { fdcount = 2; + fdarray[0] = fdarray[1] = -1; len = lcs_recv_rights(lchp, &ch, sizeof(ch), MSG_WAITALL, fdarray, &fdcount); if (len < 0) err(-1, "lcs_recv_rights"); if (len != sizeof(ch)) errx(-1, "lcs_recv_rights: len %d", len); + fflush(stdout); if (fdcount != 1) - errx(-1, "lcs_recv_rights: fdcount %d", fdcount); + errx(-1, "lcs_recv_rights: fdcount %d: %d %d", + fdcount, fdarray[0], fdarray[1]); len = lcs_send_rights(lchp, &ch, sizeof(ch), 0, fdarray, fdcount); if (len < 0) ==== //depot/projects/trustedbsd/capabilities/src/tools/cap/sandbox_echo/sandbox_echo.c#12 (text+ko) ==== @@ -61,7 +61,7 @@ errx(-1, "usage: sandbox_echo"); if (lch_start(MYNAME, sandbox_argv, - LCH_PERMIT_STDOUT | LCH_PERMIT_STDERR, &lcsp) < 0) + LCH_PERMIT_STDOUT | LCH_PERMIT_STDERR, NULL, &lcsp) < 0) err(-1, "lch_start %s", argv[1]); for (i = 0; i < 10; i++) { @@ -107,7 +107,7 @@ err(-10, "ld_libcache_lookup(%s)", MYNAME); if (lch_startfd(fd, MYNAME, sandbox_argv, LCH_PERMIT_STDERR, - &lcsp) < 0) + NULL, &lcsp) < 0) err(-1, "lch_startfd %s", argv[1]); while (1) { if (lcs_recvrpc(lchp, &opno, &seqno, &buffer, &len) ==== //depot/projects/trustedbsd/capabilities/src/tools/cap/sandbox_world/sandbox_world.c#7 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Robert N. M. Watson + * Copyright (c) 2009-2010 Robert N. M. Watson * All rights reserved. * * WARNING: THIS IS EXPERIMENTAL SECURITY SOFTWARE THAT MUST NOT BE RELIED @@ -72,7 +72,7 @@ * Create a sandbox, do permit access to stdout and stderr. */ if (lch_start(MYNAME, sandbox_argv, LCH_PERMIT_STDERR | - LCH_PERMIT_STDOUT, &lcsp) < 0) + LCH_PERMIT_STDOUT, NULL, &lcsp) < 0) err(-1, "lch_start %s", argv[1]); /* From owner-p4-projects@FreeBSD.ORG Tue Feb 2 20:39:49 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1560010656A4; Tue, 2 Feb 2010 20:39:49 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD9C3106568D for ; Tue, 2 Feb 2010 20:39:48 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BBA308FC14 for ; Tue, 2 Feb 2010 20:39:48 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12KdmG9010802 for ; Tue, 2 Feb 2010 20:39:48 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12KdmFI010800 for perforce@freebsd.org; Tue, 2 Feb 2010 20:39:48 GMT (envelope-from mav@freebsd.org) Date: Tue, 2 Feb 2010 20:39:48 GMT Message-Id: <201002022039.o12KdmFI010800@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174189 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 20:39:49 -0000 http://p4web.freebsd.org/chv.cgi?CH=174189 Change 174189 by mav@mav_mavtest on 2010/02/02 20:39:12 Make CAM to stop all attached devices on system shutdown. It allows devices to park heads, reducing power loss stress. Add `kern.cam.power_down` tunable and sysctl to controll it. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#149 edit .. //depot/projects/scottl-camlock/src/sys/kern/kern_shutdown.c#20 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#149 (text+ko) ==== @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include @@ -153,6 +153,10 @@ TUNABLE_INT("kern.cam.boot_delay", &xsoftc.boot_delay); SYSCTL_INT(_kern_cam, OID_AUTO, boot_delay, CTLFLAG_RDTUN, &xsoftc.boot_delay, 0, "Bus registration wait time"); +static int xpt_power_down = 1; +TUNABLE_INT("kern.cam.power_down", &xpt_power_down); +SYSCTL_INT(_kern_cam, OID_AUTO, power_down, CTLFLAG_RW, + &xpt_power_down, 0, "Power down devices on shutdown"); /* Queues for our software interrupt handler */ typedef TAILQ_HEAD(cam_isrq, ccb_hdr) cam_isrq_t; @@ -236,6 +240,7 @@ xpt_find_device(struct cam_et *target, lun_id_t lun_id); static void xpt_config(void *arg); static xpt_devicefunc_t xptpassannouncefunc; +static void xpt_shutdown(void *arg, int howto); static void xptaction(struct cam_sim *sim, union ccb *work_ccb); static void xptpoll(struct cam_sim *sim); static void camisr(void *); @@ -4660,6 +4665,12 @@ #endif /* CAM_DEBUG_BUS */ #endif /* CAMDEBUG */ + /* Register our shutdown event handler */ + if ((EVENTHANDLER_REGISTER(shutdown_final, xpt_shutdown, + NULL, SHUTDOWN_PRI_FIRST)) == NULL) { + printf("xpt_config: failed to register shutdown event.\n"); + } + periphdriver_init(1); xpt_hold_boot(); callout_init(&xsoftc.boot_callout, 1); @@ -4667,7 +4678,7 @@ xpt_boot_delay, NULL); /* Fire up rescan thread. */ if (kproc_create(xpt_scanner_thread, NULL, NULL, 0, 0, "xpt_thrd")) { - printf("xpt_init: failed to create rescan thread\n"); + printf("xpt_config: failed to create rescan thread.\n"); } } @@ -4741,6 +4752,87 @@ free(context, M_CAMXPT); } +/* + * Power down all devices when we are going to power down the system. + */ +static void +xpt_shutdown_dev_done(struct cam_periph *periph, union ccb *done_ccb) +{ + + /* No-op. We're polling. */ + return; +} + +static int +xpt_shutdown_dev(struct cam_ed *device, void *arg) +{ + union ccb ccb; + struct cam_path path; + + if (device->flags & CAM_DEV_UNCONFIGURED) + return (1); + + if (device->protocol == PROTO_ATA) { + /* Only power down device if it supports power management. */ + if ((device->ident_data.support.command1 & + ATA_SUPPORT_POWERMGT) == 0) + return (1); + } else if (device->protocol != PROTO_SCSI) + return (1); + + xpt_compile_path(&path, + NULL, + device->target->bus->path_id, + device->target->target_id, + device->lun_id); + xpt_setup_ccb(&ccb.ccb_h, &path, CAM_PRIORITY_NORMAL); + if (device->protocol == PROTO_ATA) { + cam_fill_ataio(&ccb.ataio, + 1, + xpt_shutdown_dev_done, + CAM_DIR_NONE, + 0, + NULL, + 0, + 30*1000); + ata_28bit_cmd(&ccb.ataio, ATA_SLEEP, 0, 0, 0); + } else { + scsi_start_stop(&ccb.csio, + /*retries*/1, + xpt_shutdown_dev_done, + MSG_SIMPLE_Q_TAG, + /*start*/FALSE, + /*load/eject*/FALSE, + /*immediate*/TRUE, + SSD_FULL_SIZE, + /*timeout*/50*1000); + } + xpt_polled_action(&ccb); + + if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) + xpt_print(&path, "Device power down failed\n"); + if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) + cam_release_devq(ccb.ccb_h.path, + /*relsim_flags*/0, + /*reduction*/0, + /*timeout*/0, + /*getcount_only*/0); + xpt_release_path(&path); + return (1); +} + +static void +xpt_shutdown(void * arg, int howto) +{ + + if (!xpt_power_down) + return; + if ((howto & RB_POWEROFF) == 0) + return; + + xpt_for_all_devices(xpt_shutdown_dev, NULL); +} + cam_status xpt_register_async(int event, ac_callback_t *cbfunc, void *cbarg, struct cam_path *path) ==== //depot/projects/scottl-camlock/src/sys/kern/kern_shutdown.c#20 (text+ko) ==== @@ -142,7 +142,7 @@ { EVENTHANDLER_REGISTER(shutdown_final, poweroff_wait, NULL, - SHUTDOWN_PRI_FIRST); + SHUTDOWN_PRI_FIRST + 100); EVENTHANDLER_REGISTER(shutdown_final, shutdown_halt, NULL, SHUTDOWN_PRI_LAST + 100); EVENTHANDLER_REGISTER(shutdown_final, shutdown_panic, NULL, From owner-p4-projects@FreeBSD.ORG Tue Feb 2 23:38:49 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 32B6F1065670; Tue, 2 Feb 2010 23:38:49 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB622106566B for ; Tue, 2 Feb 2010 23:38:48 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D990F8FC1C for ; Tue, 2 Feb 2010 23:38:48 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12NcmBl038512 for ; Tue, 2 Feb 2010 23:38:48 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12Ncm20038510 for perforce@freebsd.org; Tue, 2 Feb 2010 23:38:48 GMT (envelope-from mav@freebsd.org) Date: Tue, 2 Feb 2010 23:38:48 GMT Message-Id: <201002022338.o12Ncm20038510@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174199 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 23:38:49 -0000 http://p4web.freebsd.org/chv.cgi?CH=174199 Change 174199 by mav@mav_mavtest on 2010/02/02 23:38:30 Add Power Up In Stand-by feature support. Device with PUIS enabled require explicit command to do initial spin-up. Mark that command with CAM_HIGH_POWER flag, to allow CAM manage staggered spin-up. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.c#37 edit .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#79 edit .. //depot/projects/scottl-camlock/src/sys/sys/ata.h#22 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.c#37 (text+ko) ==== @@ -146,6 +146,9 @@ case 0x03: return ("SETFEATURES SET TRANSFER MODE"); case 0x02: return ("SETFEATURES ENABLE WCACHE"); case 0x82: return ("SETFEATURES DISABLE WCACHE"); + case 0x06: return ("SETFEATURES ENABLE PUIS"); + case 0x86: return ("SETFEATURES DISABLE PUIS"); + case 0x07: return ("SETFEATURES SPIN-UP"); case 0xaa: return ("SETFEATURES ENABLE RCACHE"); case 0x55: return ("SETFEATURES DISABLE RCACHE"); } ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#79 (text+ko) ==== @@ -86,6 +86,7 @@ typedef enum { PROBE_RESET, PROBE_IDENTIFY, + PROBE_SPINUP, PROBE_SETMODE, PROBE_SET_MULTI, PROBE_INQUIRY, @@ -98,6 +99,7 @@ static char *probe_action_text[] = { "PROBE_RESET", "PROBE_IDENTIFY", + "PROBE_SPINUP", "PROBE_SETMODE", "PROBE_SET_MULTI", "PROBE_INQUIRY", @@ -129,6 +131,7 @@ uint32_t pm_pid; uint32_t pm_prv; int restart; + int spinup; struct cam_periph *periph; } probe_softc; @@ -212,7 +215,7 @@ return(CAM_REQ_CMP_ERR); } - softc = (probe_softc *)malloc(sizeof(*softc), M_CAMXPT, M_NOWAIT); + softc = (probe_softc *)malloc(sizeof(*softc), M_CAMXPT, M_ZERO | M_NOWAIT); if (softc == NULL) { printf("proberegister: Unable to probe new device. " @@ -314,6 +317,19 @@ else ata_28bit_cmd(ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0); break; + case PROBE_SPINUP: + if (bootverbose) + xpt_print(path, "Spinning up device\n"); + cam_fill_ataio(ataio, + 1, + probedone, + /*flags*/CAM_DIR_NONE | CAM_HIGH_POWER, + 0, + /*data_ptr*/NULL, + /*dxfer_len*/0, + 30 * 1000); + ata_28bit_cmd(ataio, ATA_SETFEATURES, ATA_SF_PUIS_SPINUP, 0, 0); + break; case PROBE_SETMODE: { int mode, wantmode; @@ -768,8 +784,18 @@ ata_bpack(ident_buf->revision, ident_buf->revision, sizeof(ident_buf->revision)); ata_btrim(ident_buf->serial, sizeof(ident_buf->serial)); ata_bpack(ident_buf->serial, ident_buf->serial, sizeof(ident_buf->serial)); + /* Device may need spin-up before IDENTIFY become valid. */ + if ((ident_buf->config & ATA_RESP_INCOMPLETE) || + ((ident_buf->support.command2 & ATA_SUPPORT_STANDBY) && + (ident_buf->enabled.command2 & ATA_SUPPORT_STANDBY) && + (ident_buf->support.command2 & ATA_SUPPORT_SPINUP) && + softc->spinup == 0)) { + PROBE_SET_ACTION(softc, PROBE_SPINUP); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } ident_buf = &path->device->ident_data; - if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) { /* Check that it is the same device. */ if (bcmp(softc->ident_data.model, ident_buf->model, @@ -829,6 +855,14 @@ xpt_schedule(periph, priority); return; } + case PROBE_SPINUP: + if (bootverbose) + xpt_print(path, "Spin-up done\n"); + softc->spinup = 1; + PROBE_SET_ACTION(softc, PROBE_IDENTIFY); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; case PROBE_SETMODE: if (path->device->protocol == PROTO_ATA) { PROBE_SET_ACTION(softc, PROBE_SET_MULTI); ==== //depot/projects/scottl-camlock/src/sys/sys/ata.h#22 (text+ko) ==== @@ -48,6 +48,7 @@ #define ATA_DRQ_SLOW 0x0000 /* cpu 3 ms delay */ #define ATA_DRQ_INTR 0x0020 /* interrupt 10 ms delay */ #define ATA_DRQ_FAST 0x0040 /* accel 50 us delay */ +#define ATA_RESP_INCOMPLETE 0x0004 /*001*/ u_int16_t cylinders; /* # of cylinders */ u_int16_t reserved2; @@ -345,6 +346,9 @@ #define ATA_SF_SETXFER 0x03 /* set transfer mode */ #define ATA_SF_ENAB_WCACHE 0x02 /* enable write cache */ #define ATA_SF_DIS_WCACHE 0x82 /* disable write cache */ +#define ATA_SF_ENAB_PUIS 0x06 /* enable PUIS */ +#define ATA_SF_DIS_PUIS 0x86 /* disable PUIS */ +#define ATA_SF_PUIS_SPINUP 0x07 /* PUIS spin-up */ #define ATA_SF_ENAB_RCACHE 0xaa /* enable readahead cache */ #define ATA_SF_DIS_RCACHE 0x55 /* disable readahead cache */ #define ATA_SF_ENAB_RELIRQ 0x5d /* enable release interrupt */ From owner-p4-projects@FreeBSD.ORG Wed Feb 3 00:08:19 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DB8131065670; Wed, 3 Feb 2010 00:08:18 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87A721065676 for ; Wed, 3 Feb 2010 00:08:18 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 734BE8FC0A for ; Wed, 3 Feb 2010 00:08:18 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o1308Iu2042073 for ; Wed, 3 Feb 2010 00:08:18 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o1308IEW042070 for perforce@freebsd.org; Wed, 3 Feb 2010 00:08:18 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 00:08:18 GMT Message-Id: <201002030008.o1308IEW042070@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174200 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 00:08:19 -0000 http://p4web.freebsd.org/chv.cgi?CH=174200 Change 174200 by rwatson@rwatson_vimage_client on 2010/02/03 00:07:51 Rework syscall timing microbenchmark to make it a bit more flexible, add some capability-related tests. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/Makefile#2 edit .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#2 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/Makefile#2 (text+ko) ==== @@ -3,7 +3,7 @@ # PROG= syscall_timing -CFLAGS+= -static -O +CFLAGS+= -static -O -Wall NO_MAN= .include ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#2 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003-2004 Robert N. M. Watson + * Copyright (c) 2003-2004, 2010 Robert N. M. Watson * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,15 +27,23 @@ */ #include +#include +#include #include +#include #include #include +#include +#include +#include #include #include #include #include +static struct timespec ts_start, ts_end; + #define timespecsub(vvp, uvp) \ do { \ (vvp)->tv_sec -= (uvp)->tv_sec; \ @@ -46,7 +54,21 @@ } \ } while (0) -inline void +static void +benchmark_start(void) +{ + + assert(clock_gettime(CLOCK_REALTIME, &ts_start) == 0); +} + +static void +benchmark_stop(void) +{ + + assert(clock_gettime(CLOCK_REALTIME, &ts_end) == 0); +} + +void test_getuid(int num) { int i; @@ -55,11 +77,13 @@ * Thread-local data should require no locking if system * call is MPSAFE. */ + benchmark_start(); for (i = 0; i < num; i++) getuid(); + benchmark_stop(); } -inline void +void test_getppid(int num) { int i; @@ -68,28 +92,28 @@ * This is process-local, but can change, so will require a * lock. */ + benchmark_start(); for (i = 0; i < num; i++) getppid(); + benchmark_stop(); } -inline void +void test_clock_gettime(int num) { struct timespec ts; int i; - for (i = 0; i < num; i++) { - if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { - perror("clock_gettime"); - exit(-1); - } - } + benchmark_start(); + for (i = 0; i < num; i++) + (void)clock_gettime(CLOCK_REALTIME, &ts); + benchmark_stop(); } -inline void +void test_pipe(int num) { - int i; + int fd[2], i; /* * pipe creation is expensive, as it will allocate a new file @@ -97,144 +121,241 @@ * Destroying is also expensive, as we now have to free up * the file descriptors and return the pipe. */ + if (pipe(fd) < 0) + err(-1, "test_pipe: pipe"); + close(fd[0]); + close(fd[1]); + benchmark_start(); for (i = 0; i < num; i++) { - int fd[2]; - if (pipe(fd) == -1) { - perror("pipe"); - exit(-1); - } - + if (pipe(fd) == -1) + err(-1, "test_pipe: pipe"); close(fd[0]); close(fd[1]); } + benchmark_stop(); } -inline void +void test_socket_stream(int num) { int i, so; + so = socket(PF_LOCAL, SOCK_STREAM, 0); + if (so < 0) + err(-1, "test_socket_stream: socket"); + close(so); + benchmark_start(); for (i = 0; i < num; i++) { so = socket(PF_LOCAL, SOCK_STREAM, 0); - if (so == -1) { - perror("socket_stream"); - exit(-1); - } + if (so == -1) + err(-1, "test_socket_stream: socket"); close(so); } + benchmark_stop(); } -inline void +void test_socket_dgram(int num) { int i, so; + so = socket(PF_LOCAL, SOCK_DGRAM, 0); + if (so < 0) + err(-1, "test_socket_dgram: socket"); + close(so); + benchmark_start(); for (i = 0; i < num; i++) { so = socket(PF_LOCAL, SOCK_DGRAM, 0); - if (so == -1) { - perror("socket_dgram"); - exit(-1); - } + if (so == -1) + err(-1, "test_socket_dgram: socket"); close(so); } + benchmark_stop(); } -inline void +void test_socketpair_stream(int num) { int i, so[2]; + if (socketpair(PF_LOCAL, SOCK_STREAM, 0, so) == -1) + err(-1, "test_socketpair_stream: socketpair"); + close(so[0]); + close(so[1]); + benchmark_start(); for (i = 0; i < num; i++) { - if (socketpair(PF_LOCAL, SOCK_STREAM, 0, so) == -1) { - perror("socketpair_stream"); - exit(-1); - } + if (socketpair(PF_LOCAL, SOCK_STREAM, 0, so) == -1) + err(-1, "test_socketpair_stream: socketpair"); close(so[0]); close(so[1]); } + benchmark_stop(); } -inline void +void test_socketpair_dgram(int num) { int i, so[2]; + if (socketpair(PF_LOCAL, SOCK_DGRAM, 0, so) == -1) + err(-1, "test_socketpair_dgram: socketpair"); + close(so[0]); + close(so[1]); + benchmark_start(); for (i = 0; i < num; i++) { - if (socketpair(PF_LOCAL, SOCK_DGRAM, 0, so) == -1) { - perror("socketpair_dgram"); - exit(-1); - } + if (socketpair(PF_LOCAL, SOCK_DGRAM, 0, so) == -1) + err(-1, "test_socketpair_dgram: socketpair"); close(so[0]); close(so[1]); } + benchmark_stop(); } +void +test_dup(int num) +{ + int fd, i, shmfd; + + shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600); + if (shmfd < 0) + err(-1, "test_dup: shm_open"); + fd = dup(shmfd); + if (fd >= 0) + close(fd); + benchmark_start(); + for (i = 0; i < num; i++) { + fd = dup(shmfd); + if (fd >= 0) + close(fd); + } + benchmark_stop(); + close(shmfd); +} + +void +test_cap_new(int num) +{ + int fd, i, shmfd; + + shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600); + if (shmfd < 0) + err(-1, "test_cap_new: shm_open"); + fd = cap_new(shmfd, 0); + if (fd >= 0) + close(fd); + benchmark_start(); + for (i = 0; i < num; i++) { + fd = cap_new(shmfd, 0); + if (fd >= 0) + close(fd); + } + benchmark_stop(); + close(shmfd); +} + +void +test_fstat_shmfd(int num) +{ + struct stat sb; + int i, shmfd; + + shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600); + if (shmfd < 0) + err(-1, "test_fstat_shmfd: shm_open"); + if (fstat(shmfd, &sb) < 0) + err(-1, "test_fstat_shmfd: fstat"); + benchmark_start(); + for (i = 0; i < num; i++) + (void)fstat(shmfd, &sb); + benchmark_stop(); + close(shmfd); +} + +void +test_fstat_cap_shmfd(int num) +{ + struct stat sb; + int fd, i, shmfd; + + shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600); + if (shmfd < 0) + err(-1, "test_fstat_cap_shmfd: shm_open"); + fd = cap_new(shmfd, CAP_FSTAT); + if (fd < 0) + err(-1, "test_fstat_cap_shmfd: shm_open"); + if (fstat(fd, &sb) < 0) + err(-1, "test_fstat_cap_shmfd: fstat"); + benchmark_start(); + for (i = 0; i < num; i++) + (void)fstat(fd, &sb); + benchmark_stop(); + close(fd); + close(shmfd); +} + +struct test { + const char *t_name; + void (*t_func)(int); +}; + +static const struct test tests[] = { + { "getuid", test_getuid }, + { "getppid", test_getppid }, + { "clock_gettime", test_clock_gettime }, + { "pipe", test_pipe }, + { "socket_stream", test_socket_stream }, + { "socket_dgram", test_socket_dgram }, + { "socketpair_stream", test_socketpair_stream }, + { "socketpair_dgram", test_socketpair_dgram }, + { "dup", test_dup }, + { "cap_new", test_cap_new }, + { "fstat_shmfd", test_fstat_shmfd }, + { "fstat_cap_shmfd", test_fstat_cap_shmfd }, +}; +static const int tests_count = sizeof(tests) / sizeof(tests[0]); + static void usage(void) { + int i; fprintf(stderr, "syscall_timing [iterations] [test]\n"); - fprintf(stderr, - "supported tests: getuid getppid clock_gettime pipe\n" - "socket_stream socket_dgram socketpair_stream\n" - "socketpair_dgram\n"); + for (i = 0; i < tests_count; i++) + fprintf(stderr, " %s\n", tests[i].t_name); exit(-1); } int main(int argc, char *argv[]) { - struct timespec ts_start, ts_end, ts_res; - int count; + struct timespec ts_res; + const struct test *the_test; + int count, i; if (argc != 3) usage(); count = atoi(argv[1]); assert(clock_getres(CLOCK_REALTIME, &ts_res) == 0); - printf("Clock resolution: %d.%09lu\n", ts_res.tv_sec, ts_res.tv_nsec); + printf("Clock resolution: %ju.%ju\n", (uintmax_t)ts_res.tv_sec, + (uintmax_t)ts_res.tv_nsec); - if (strcmp(argv[2], "getuid") == 0) { - assert(clock_gettime(CLOCK_REALTIME, &ts_start) == 0); - test_getuid(count); - assert(clock_gettime(CLOCK_REALTIME, &ts_end) == 0); - } else if (strcmp(argv[2], "getppid") == 0) { - assert(clock_gettime(CLOCK_REALTIME, &ts_start) == 0); - test_getppid(count); - assert(clock_gettime(CLOCK_REALTIME, &ts_end) == 0); - } else if (strcmp(argv[2], "clock_gettime") == 0) { - assert(clock_gettime(CLOCK_REALTIME, &ts_start) == 0); - test_clock_gettime(count); - assert(clock_gettime(CLOCK_REALTIME, &ts_end) == 0); - } else if (strcmp(argv[2], "pipe") == 0) { - assert(clock_gettime(CLOCK_REALTIME, &ts_start) == 0); - test_pipe(count); - assert(clock_gettime(CLOCK_REALTIME, &ts_end) == 0); - } else if (strcmp(argv[2], "socket_stream") == 0) { - assert(clock_gettime(CLOCK_REALTIME, &ts_start) == 0); - test_socket_stream(count); - assert(clock_gettime(CLOCK_REALTIME, &ts_end) == 0); - } else if (strcmp(argv[2], "socket_dgram") == 0) { - assert(clock_gettime(CLOCK_REALTIME, &ts_start) == 0); - test_socket_dgram(count); - assert(clock_gettime(CLOCK_REALTIME, &ts_end) == 0); - } else if (strcmp(argv[2], "socketpair_stream") == 0) { - assert(clock_gettime(CLOCK_REALTIME, &ts_start) == 0); - test_socketpair_stream(count); - assert(clock_gettime(CLOCK_REALTIME, &ts_end) == 0); - } else if (strcmp(argv[2], "socketpair_dgram") == 0) { - assert(clock_gettime(CLOCK_REALTIME, &ts_start) == 0); - test_socketpair_dgram(count); - assert(clock_gettime(CLOCK_REALTIME, &ts_end) == 0); - } else + the_test = NULL; + for (i = 0; i < tests_count; i++) { + if (strcmp(argv[2], tests[i].t_name) == 0) + the_test = &tests[i]; + } + if (the_test == NULL) usage(); + the_test->t_func(count); + timespecsub(&ts_end, &ts_start); printf("test: %s\n", argv[2]); - printf("%d.%09lu for %d iterations\n", ts_end.tv_sec, - ts_end.tv_nsec, count); + printf("%ju.%09ju for %d iterations\n", (uintmax_t)ts_end.tv_sec, + (uintmax_t)ts_end.tv_nsec, count); /* * Note. This assumes that each iteration takes less than @@ -243,7 +364,7 @@ * but not for long things. */ ts_end.tv_sec *= 1000000000 / count; - printf("0.%09lu per/iteration\n", - ts_end.tv_sec + ts_end.tv_nsec / count); + printf("0.%09ju per/iteration\n", + (uintmax_t)(ts_end.tv_sec + ts_end.tv_nsec / count)); return (0); } From owner-p4-projects@FreeBSD.ORG Wed Feb 3 00:29:40 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 560CD10656A3; Wed, 3 Feb 2010 00:29:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1948C1065696 for ; Wed, 3 Feb 2010 00:29:40 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 05B568FC22 for ; Wed, 3 Feb 2010 00:29:40 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o130TdCQ043890 for ; Wed, 3 Feb 2010 00:29:39 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o130TdN5043888 for perforce@freebsd.org; Wed, 3 Feb 2010 00:29:39 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 00:29:39 GMT Message-Id: <201002030029.o130TdN5043888@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174201 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 00:29:40 -0000 http://p4web.freebsd.org/chv.cgi?CH=174201 Change 174201 by rwatson@rwatson_vimage_client on 2010/02/03 00:29:28 Allow multiple loops of a test to be run, not just iterations within a test. Add microbenchmark to compare cost of creating a shared memory object w/o a capability, and cost w/ a capability. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#3 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#3 (text+ko) ==== @@ -254,6 +254,52 @@ } void +test_shmfd(int num) +{ + int i, shmfd; + + shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600); + if (shmfd < 0) + err(-1, "test_shmfd: shm_open"); + close(shmfd); + benchmark_start(); + for (i = 0; i < num; i++) { + shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600); + if (shmfd < 0) + err(-1, "test_shmfd: shm_open"); + close(shmfd); + } + benchmark_stop(); +} + +void +test_cap_shmfd(int num) +{ + int fd, i, shmfd; + + shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600); + if (shmfd < 0) + err(-1, "test_cap_shmfd: shm_open"); + fd = cap_new(shmfd, 0); + if (fd < 0) + err(-1, "test_cap_shmfd: cap_new"); + close(fd); + close(shmfd); + benchmark_start(); + for (i = 0; i < num; i++) { + shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600); + if (shmfd < 0) + err(-1, "test_cap_shmfd: shm_open"); + fd = cap_new(shmfd, 0); + if (fd < 0) + err(-1, "test_cap_shmfd: cap_new"); + close(fd); + close(shmfd); + } + benchmark_stop(); +} + +void test_fstat_shmfd(int num) { struct stat sb; @@ -309,6 +355,8 @@ { "socketpair_dgram", test_socketpair_dgram }, { "dup", test_dup }, { "cap_new", test_cap_new }, + { "test_shmfd", test_shmfd }, + { "test_cap_shmfd", test_cap_shmfd }, { "fstat_shmfd", test_fstat_shmfd }, { "fstat_cap_shmfd", test_fstat_cap_shmfd }, }; @@ -319,7 +367,7 @@ { int i; - fprintf(stderr, "syscall_timing [iterations] [test]\n"); + fprintf(stderr, "syscall_timing [iterations] [loops] [test]\n"); for (i = 0; i < tests_count; i++) fprintf(stderr, " %s\n", tests[i].t_name); exit(-1); @@ -330,41 +378,55 @@ { struct timespec ts_res; const struct test *the_test; - int count, i; + long long ll; + char *endp; + int i, j, k; + int iterations, loops; + + if (argc < 3) + usage(); + + ll = strtoll(argv[1], &endp, 10); + if (*endp != 0 || ll < 0 || ll > 100000) + usage(); + iterations = ll; - if (argc != 3) + ll = strtoll(argv[2], &endp, 10); + if (*endp != 0 || ll < 0 || ll > 100000) usage(); - count = atoi(argv[1]); + loops = ll; assert(clock_getres(CLOCK_REALTIME, &ts_res) == 0); printf("Clock resolution: %ju.%ju\n", (uintmax_t)ts_res.tv_sec, (uintmax_t)ts_res.tv_nsec); + printf("test\tloop\ttotal\titerations\tperiteration\n"); - the_test = NULL; - for (i = 0; i < tests_count; i++) { - if (strcmp(argv[2], tests[i].t_name) == 0) - the_test = &tests[i]; - } - if (the_test == NULL) - usage(); + for (j = 3; j < argc; j++) { + the_test = NULL; + for (i = 0; i < tests_count; i++) { + if (strcmp(argv[j], tests[i].t_name) == 0) + the_test = &tests[i]; + } + if (the_test == NULL) + usage(); - the_test->t_func(count); + for (k = 0; k < loops; k++) { + the_test->t_func(iterations); + timespecsub(&ts_end, &ts_start); + printf("%s\t%d\t", the_test->t_name, k); + printf("%ju.%09ju\t%d\t", (uintmax_t)ts_end.tv_sec, + (uintmax_t)ts_end.tv_nsec, iterations); - timespecsub(&ts_end, &ts_start); - - printf("test: %s\n", argv[2]); - - printf("%ju.%09ju for %d iterations\n", (uintmax_t)ts_end.tv_sec, - (uintmax_t)ts_end.tv_nsec, count); - - /* - * Note. This assumes that each iteration takes less than - * a second, and that our total nanoseconds doesn't exceed - * the room in our arithmetic unit. Fine for system calls, - * but not for long things. - */ - ts_end.tv_sec *= 1000000000 / count; - printf("0.%09ju per/iteration\n", - (uintmax_t)(ts_end.tv_sec + ts_end.tv_nsec / count)); + /* + * Note. This assumes that each iteration takes less than + * a second, and that our total nanoseconds doesn't exceed + * the room in our arithmetic unit. Fine for system calls, + * but not for long things. + */ + ts_end.tv_sec *= 1000000000 / iterations; + printf("0.%09ju\n", (uintmax_t)(ts_end.tv_sec + + ts_end.tv_nsec / iterations)); + } + } return (0); } From owner-p4-projects@FreeBSD.ORG Wed Feb 3 00:42:54 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D86501065672; Wed, 3 Feb 2010 00:42:53 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 849EB106566B for ; Wed, 3 Feb 2010 00:42:53 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6D1548FC08 for ; Wed, 3 Feb 2010 00:42:53 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o130grAX044910 for ; Wed, 3 Feb 2010 00:42:53 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o130grBY044908 for perforce@freebsd.org; Wed, 3 Feb 2010 00:42:53 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 00:42:53 GMT Message-Id: <201002030042.o130grBY044908@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174202 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 00:42:54 -0000 http://p4web.freebsd.org/chv.cgi?CH=174202 Change 174202 by rwatson@rwatson_vimage_client on 2010/02/03 00:42:30 cap_enter, fork, pdfork benchmarks. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#4 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#4 (text+ko) ==== @@ -29,9 +29,12 @@ #include #include #include +#include +#include #include #include #include +#include #include #include @@ -45,14 +48,14 @@ static struct timespec ts_start, ts_end; #define timespecsub(vvp, uvp) \ - do { \ - (vvp)->tv_sec -= (uvp)->tv_sec; \ - (vvp)->tv_nsec -= (uvp)->tv_nsec; \ - if ((vvp)->tv_nsec < 0) { \ - (vvp)->tv_sec--; \ - (vvp)->tv_nsec += 1000000000; \ - } \ - } while (0) + do { \ + (vvp)->tv_sec -= (uvp)->tv_sec; \ + (vvp)->tv_nsec -= (uvp)->tv_nsec; \ + if ((vvp)->tv_nsec < 0) { \ + (vvp)->tv_sec--; \ + (vvp)->tv_nsec += 1000000000; \ + } \ + } while (0) static void benchmark_start(void) @@ -339,6 +342,91 @@ close(shmfd); } +void +test_cap_enter(int num) +{ + int i; + + /* XXXRW: Note that some tests will fail after this test. */ + + if (cap_enter() < 0) + err(-1, "test_cap_enter: cap_enter"); + benchmark_start(); + for (i = 0; i < num; i++) { + if (cap_enter() < 0) + err(-1, "test_cap_enter: cap_enter"); + } + benchmark_stop(); +} + +void +test_fork(int num) +{ + pid_t pid; + int i; + + pid = fork(); + if (pid < 0) + err(-1, "test_fork: fork"); + if (pid == 0) + exit(0); + if (waitpid(pid, NULL, 0) < 0) + err(-1, "test_fork: waitpid"); + benchmark_start(); + for (i = 0; i < num; i++) { + pid = fork(); + if (pid < 0) + err(-1, "test_fork: fork"); + if (pid == 0) + exit(0); + if (waitpid(pid, NULL, 0) < 0) + err(-1, "test_fork: waitpid"); + } + benchmark_stop(); +} + +void +test_pdfork(int num) +{ + struct pollfd pollfd; + pid_t pid; + int fd, i, n; + + pid = pdfork(&fd); + if (pid < 0) + err(-1, "test_pdfork: pdfork"); + if (pid == 0) + exit(0); + pollfd.fd = fd; + pollfd.events = POLLHUP; + pollfd.revents = 0; + n = poll(&pollfd, 1, INFTIM); + if (n < 0) + err(-1, "poll"); + if (n != 1) + errx(-1, "poll returned %d", n); + close(fd); + + benchmark_start(); + for (i = 0; i < num; i++) { + pid = pdfork(&fd); + if (pid < 0) + err(-1, "test_pdfork: pdfork"); + if (pid == 0) + exit(0); + pollfd.fd = fd; + pollfd.events = POLLHUP; + pollfd.revents = 0; + n = poll(&pollfd, 1, INFTIM); + if (n < 0) + err(-1, "poll"); + if (n != 1) + errx(-1, "poll returned %d", n); + close(fd); + } + benchmark_stop(); +} + struct test { const char *t_name; void (*t_func)(int); @@ -359,6 +447,9 @@ { "test_cap_shmfd", test_cap_shmfd }, { "fstat_shmfd", test_fstat_shmfd }, { "fstat_cap_shmfd", test_fstat_cap_shmfd }, + { "cap_enter", test_cap_enter }, + { "fork", test_fork }, + { "pdfork", test_pdfork }, }; static const int tests_count = sizeof(tests) / sizeof(tests[0]); From owner-p4-projects@FreeBSD.ORG Wed Feb 3 00:54:05 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 410FA1065694; Wed, 3 Feb 2010 00:54:05 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E16E7106568B for ; Wed, 3 Feb 2010 00:54:04 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CE57E8FC1C for ; Wed, 3 Feb 2010 00:54:04 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o130s4sv056257 for ; Wed, 3 Feb 2010 00:54:04 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o130s4f5056255 for perforce@freebsd.org; Wed, 3 Feb 2010 00:54:04 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 00:54:04 GMT Message-Id: <201002030054.o130s4f5056255@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174203 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 00:54:05 -0000 http://p4web.freebsd.org/chv.cgi?CH=174203 Change 174203 by rwatson@rwatson_vimage_client on 2010/02/03 00:53:49 First cut at a sandbox create/rpc/destroy benchmark, which appears not to work. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/Makefile#3 edit .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#5 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/Makefile#3 (text+ko) ==== @@ -3,7 +3,8 @@ # PROG= syscall_timing -CFLAGS+= -static -O -Wall +CFLAGS+= -static -O -Wall -rdynamic NO_MAN= +LDADD= -lcapsicum -lsbuf .include ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#5 (text+ko) ==== @@ -38,8 +38,10 @@ #include #include +#include #include #include +#include #include #include #include @@ -427,6 +429,100 @@ benchmark_stop(); } +#define MYNAME "./syscall_timing" /* Binary to run in sandbox. */ + +/* + * Unsandboxed host process with full user rights. + */ +void +test_sandbox(int num) +{ + struct lc_sandbox *lcsp; + char *sandbox_argv[2] = { MYNAME, NULL }; + struct iovec iov; + size_t len; + char ch; + int i; + + if (lch_start(MYNAME, sandbox_argv, LCH_PERMIT_STDERR | + LCH_PERMIT_STDOUT, NULL, &lcsp) < 0) + err(-1, "lch_start %s", MYNAME); + ch = 'X'; + iov.iov_base = &ch; + iov.iov_len = sizeof(ch); + printf("lch_rpc\n"); + if (lch_rpc(lcsp, 0, &iov, 1, &iov, 1, &len) < 0) + err(-1, "lch_rpc"); + if (len != sizeof(ch)) + errx(-1, "lch_rpc returned size %zd not %zd", len, sizeof(ch)); + if (ch != 'X') + errx(-1, "lch_recv: expected %d and got %d", 'X', ch); + lch_stop(lcsp); + + benchmark_start(); + for (i = 0; i < num; i++) { + if (lch_start(MYNAME, sandbox_argv, LCH_PERMIT_STDERR | + LCH_PERMIT_STDOUT, NULL, &lcsp) < 0) + err(-1, "lch_start %s", MYNAME); + ch = 'X'; + iov.iov_base = &ch; + iov.iov_len = sizeof(ch); + if (lch_rpc(lcsp, 0, &iov, 1, &iov, 1, &len) < 0) + err(-1, "lch_rpc"); + if (len != sizeof(ch)) + errx(-1, "lch_rpc returned size %zd not %zd", len, + sizeof(ch)); + if (ch != 'X') + errx(-1, "lch_recv: expected %d and got %d", 'X', ch); + lch_stop(lcsp); + } + benchmark_stop(); +} + +int +cap_main(int argc, char *argv[]) +{ + struct lc_host *lchp; + u_int32_t opno, seqno; + struct iovec iov; + u_char *buffer; + size_t len; + + if (lcs_get(&lchp) < 0) + err(-1, "lcs_get"); + + /* + * Serve RPCs from the host until the sandbox is killed. + */ + while (1) { + /* + * Receive a one-byte RPC from the host. + */ + if (lcs_recvrpc(lchp, &opno, &seqno, &buffer, &len) < 0) { + if (errno != EPIPE) + err(-6, "lcs_recvrpc"); + else + exit(-6); + } + if (len != 1) + errx(-7, "lcs_recvrpc len"); + + /* + * Reply with the same message. Remember to free the message + * when done. + */ + iov.iov_base = buffer; + iov.iov_len = 1; + if (lcs_sendrpc(lchp, opno, seqno, &iov, 1) < 0) { + if (errno != EPIPE) + err(-8, "lcs_sendrpc"); + else + exit(-8); + } + free(buffer); + } +} + struct test { const char *t_name; void (*t_func)(int); @@ -450,6 +546,7 @@ { "cap_enter", test_cap_enter }, { "fork", test_fork }, { "pdfork", test_pdfork }, + { "sandbox", test_sandbox }, }; static const int tests_count = sizeof(tests) / sizeof(tests[0]); From owner-p4-projects@FreeBSD.ORG Wed Feb 3 01:13:25 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8E1451065694; Wed, 3 Feb 2010 01:13:24 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52770106566B for ; Wed, 3 Feb 2010 01:13:24 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3F7DA8FC17 for ; Wed, 3 Feb 2010 01:13:24 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o131DOl1058694 for ; Wed, 3 Feb 2010 01:13:24 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o131DOLs058692 for perforce@freebsd.org; Wed, 3 Feb 2010 01:13:24 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 01:13:24 GMT Message-Id: <201002030113.o131DOLs058692@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174204 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 01:13:25 -0000 http://p4web.freebsd.org/chv.cgi?CH=174204 Change 174204 by rwatson@rwatson_vimage_client on 2010/02/03 01:13:08 Microbenchmark for vfork. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#6 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#6 (text+ko) ==== @@ -388,6 +388,32 @@ } void +test_vfork(int num) +{ + pid_t pid; + int i; + + pid = vfork(); + if (pid < 0) + err(-1, "test_vfork: vfork"); + if (pid == 0) + exit(0); + if (waitpid(pid, NULL, 0) < 0) + err(-1, "test_vfork: waitpid"); + benchmark_start(); + for (i = 0; i < num; i++) { + pid = vfork(); + if (pid < 0) + err(-1, "test_vfork: vfork"); + if (pid == 0) + exit(0); + if (waitpid(pid, NULL, 0) < 0) + err(-1, "test_vfork: waitpid"); + } + benchmark_stop(); +} + +void test_pdfork(int num) { struct pollfd pollfd; @@ -545,6 +571,7 @@ { "fstat_cap_shmfd", test_fstat_cap_shmfd }, { "cap_enter", test_cap_enter }, { "fork", test_fork }, + { "vfork", test_vfork }, { "pdfork", test_pdfork }, { "sandbox", test_sandbox }, }; From owner-p4-projects@FreeBSD.ORG Wed Feb 3 09:27:39 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8D1F41065679; Wed, 3 Feb 2010 09:27:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D89391065672 for ; Wed, 3 Feb 2010 09:27:38 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C55278FC12 for ; Wed, 3 Feb 2010 09:27:38 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o139RcuR024613 for ; Wed, 3 Feb 2010 09:27:38 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o139Rc49024611 for perforce@freebsd.org; Wed, 3 Feb 2010 09:27:38 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 09:27:38 GMT Message-Id: <201002030927.o139Rc49024611@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174211 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 09:27:39 -0000 http://p4web.freebsd.org/chv.cgi?CH=174211 Change 174211 by rwatson@rwatson_vimage_client on 2010/02/03 09:27:04 There's no IN_CAP_MODE definition for libcapsicum, so just test for a negative fd_rtld before closing. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#16 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#16 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#15 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#16 $ */ #include @@ -312,9 +312,8 @@ binname, argv, fds); exit(-1); } -#ifndef IN_CAP_MODE - close(fd_rtld); -#endif + if (fd_rtld != -1) + close(fd_rtld); close(fd_sockpair[1]); lcsp->lcs_fd_procdesc = fd_procdesc; @@ -330,10 +329,8 @@ close(fd_sockpair[0]); if (fd_sockpair[1] != -1) close(fd_sockpair[1]); -#ifndef IN_CAP_MODE if (fd_rtld != -1) close(fd_rtld); -#endif if (lcsp != NULL) free(lcsp); errno = error; From owner-p4-projects@FreeBSD.ORG Wed Feb 3 10:12:24 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6B3E31065672; Wed, 3 Feb 2010 10:12:24 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EAAE106566B for ; Wed, 3 Feb 2010 10:12:24 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1A34C8FC08 for ; Wed, 3 Feb 2010 10:12:24 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13ACNtT030536 for ; Wed, 3 Feb 2010 10:12:23 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13ACNb3030534 for perforce@freebsd.org; Wed, 3 Feb 2010 10:12:23 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 10:12:23 GMT Message-Id: <201002031012.o13ACNb3030534@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174213 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 10:12:24 -0000 http://p4web.freebsd.org/chv.cgi?CH=174213 Change 174213 by rwatson@rwatson_vimage_client on 2010/02/03 10:11:53 Improve style alignment of capability-related code with existing rtld style (which isn't style(9)). Affected files ... .. //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#36 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#36 (text+ko) ==== @@ -251,7 +251,6 @@ (func_ptr_type) &ld_insandbox, #endif (func_ptr_type) &ld_libdirs, - NULL }; @@ -833,19 +832,19 @@ static void * find_capstart(const Obj_Entry *obj) { - const char *capstart_str = "_capstart"; - const Elf_Sym *def; - const Obj_Entry *defobj; - unsigned long hash; + const char *capstart_str = "_capstart"; + const Elf_Sym *def; + const Obj_Entry *defobj; + unsigned long hash; - hash = elf_hash(capstart_str); - def = symlook_default(capstart_str, hash, obj, &defobj, NULL, - SYMLOOK_IN_PLT); - if (def == NULL) - return (NULL); - if (ELF_ST_TYPE(def->st_info) != STT_FUNC) - return (NULL); - return (make_function_pointer(def, defobj)); + hash = elf_hash(capstart_str); + def = symlook_default(capstart_str, hash, obj, &defobj, NULL, + SYMLOOK_IN_PLT); + if (def == NULL) + return (NULL); + if (ELF_ST_TYPE(def->st_info) != STT_FUNC) + return (NULL); + return (make_function_pointer(def, defobj)); } #endif @@ -1233,23 +1232,24 @@ #ifdef IN_RTLD_CAP /* - * Find the library with the given name, and return an open file descriptor to it. + * Find the library with the given name, and return an open file descriptor + * to it. */ static int -find_library_fd(const char *name) { +find_library_fd(const char *name) +{ + int fd, i; if (ld_library_dirs == NULL) - init_libdirs(); - - for (int i = 0; (i < ld_library_dirlen) && (ld_library_dirs[i] != -1); i++) { - - int fd = openat(ld_library_dirs[i], name, O_RDONLY); + init_libdirs(); + for (i = 0; (i < ld_library_dirlen) && (ld_library_dirs[i] != -1); i++) { + fd = openat(ld_library_dirs[i], name, O_RDONLY); if (fd >= 0) - return fd; + return (fd); } - return (-1); } + #else /* * Find the library with the given name, and return its full pathname. @@ -1663,24 +1663,22 @@ _rtld_error("Unable to find \"%s\" in LD_LIBRARY_DIRS", path); } #else - if (fd == -1) { - path = find_library(name, refobj); - if (path == NULL) + path = find_library(name, refobj); + if (path == NULL) return NULL; - /* - * If we didn't find a match by pathname, open the file and check - * again by device and inode. This avoids false mismatches caused - * by multiple links or ".." in pathnames. - * - * To avoid a race, we open the file and use fstat() rather than - * using stat(). - */ - if ((fd = open(path, O_RDONLY)) == -1) { + /* + * If we didn't find a match by pathname, open the file and check + * again by device and inode. This avoids false mismatches caused + * by multiple links or ".." in pathnames. + * + * To avoid a race, we open the file and use fstat() rather than + * using stat(). + */ + if ((fd = open(path, O_RDONLY)) == -1) { _rtld_error("Cannot open \"%s\"", path); free(path); return NULL; - } } #endif if (fstat(fd, &sb) == -1) { @@ -2113,40 +2111,42 @@ * Add a file descriptor to ld_library_dirs. */ static void -add_libdir_fd(int fd) { +add_libdir_fd(int fd) +{ + int i; - if (ld_library_dirs == NULL) { - /* Initialize the FD list. */ + if (ld_library_dirs == NULL) { + /* Initialize the FD list. */ + ld_library_dirlen = INITIAL_FDLEN; + ld_library_dirs = xmalloc(ld_library_dirlen * sizeof(int)); + memset(ld_library_dirs, 0xff, ld_library_dirlen * sizeof(int)); + } - ld_library_dirlen = INITIAL_FDLEN; - ld_library_dirs = xmalloc(ld_library_dirlen * sizeof(int)); - memset(ld_library_dirs, 0xff, ld_library_dirlen * sizeof(int)); - } + /* Find the next available FD slot. */ + for (i = 0; (i < ld_library_dirlen) && (ld_library_dirs[i] != -1); i++) + ; - /* Find the next available FD slot. */ - int i; - for (i = 0; (i < ld_library_dirlen) && (ld_library_dirs[i] != -1); i++) ; + if (i == ld_library_dirlen) { + /* We need more space. */ + int old_size = ld_library_dirlen + sizeof(int); - if (i == ld_library_dirlen) { - /* We need more space. */ - int old_size = ld_library_dirlen + sizeof(int); + ld_library_dirlen *= 2; + ld_library_dirs = realloc(ld_library_dirs, 2 * old_size); + memset(ld_library_dirs + old_size, 0xff, old_size); - ld_library_dirlen *= 2; - ld_library_dirs = realloc(ld_library_dirs, 2 * old_size); - memset(ld_library_dirs + old_size, 0xff, old_size); - - if (ld_library_dirs == NULL) - err(-1, "realloc() failed"); - } - - ld_library_dirs[i] = fd; + if (ld_library_dirs == NULL) + err(-1, "realloc() failed"); + } + ld_library_dirs[i] = fd; } /* - * Add file descriptors for a path list (e.g. '/lib:/usr/lib') to ld_library_dirs. + * Add file descriptors for a path list (e.g. '/lib:/usr/lib') to + * ld_library_dirs. */ static void -add_libdir_paths(const char *path) { +add_libdir_paths(const char *path) +{ if (path == NULL) return; @@ -2158,24 +2158,22 @@ strncpy(pathcopy, path, pathlen + 1); for (dirname = strtok_r(pathcopy, ":", &tokcontext); dirname; - dirname = strtok_r(NULL, ":", &tokcontext)) { - + dirname = strtok_r(NULL, ":", &tokcontext)) { + struct try_library_args arg; int fd; - struct try_library_args arg; arg.name = ""; arg.namelen = 0; arg.buffer = xmalloc(PATH_MAX); arg.buflen = PATH_MAX; - if (try_library_path(dirname, strnlen(dirname, PATH_MAX), &arg)) + if (try_library_path(dirname, strnlen(dirname, PATH_MAX), &arg)) { fd = open(dirname, O_RDONLY); - - else { + } else { /* 'dirname' is not a directory path; perhaps it's a descriptor? */ fd = (int) strtol(dirname, NULL, 0); if ((fd == 0) && (errno == 0)) - continue; + continue; } if (fd >= 0) @@ -2189,17 +2187,16 @@ * Build the list of library file descriptors. */ static void -init_libdirs(void) { +init_libdirs(void) +{ #ifdef IN_RTLD_CAP + char *envvar = getenv(LD_ "LIBRARY_DIRS"); - char *envvar = getenv(LD_ "LIBRARY_DIRS"); if (envvar == NULL) err(-1, "No %s set in capability mode", LD_ "LIBRARY_DIRS"); add_libdir_paths(envvar); - #else /* !IN_RTLD_CAP */ - /* Look for directories a la find_library (TODO: refactor!). */ add_libdir_paths(ld_library_path); add_libdir_paths(gethints()); @@ -2212,34 +2209,34 @@ ld_library_dirs[0] = -1; } } + /* * Return an array of file descriptors for the library search paths. + * + * XXX: synchronization of ld_library_dirs? */ int -ld_libdirs(int *fds, int *fdcount) { +ld_libdirs(int *fds, int *fdcount) +{ + int i = 0; - if (fdcount == NULL) - return (-1); - - else if (fds == NULL) { - *fdcount = -1; - return (-1); - } - - if (ld_library_dirs == NULL) - init_libdirs(); - - int i = 0; - for (i = 0; (i < ld_library_dirlen) && (ld_library_dirs[i] != -1); i++) ; - - if (*fdcount < i) { - *fdcount = i; - return (-1); - } - + if (fdcount == NULL) + return (-1); + else if (fds == NULL) { + *fdcount = -1; + return (-1); + } + if (ld_library_dirs == NULL) + init_libdirs(); + for (i = 0; (i < ld_library_dirlen) && (ld_library_dirs[i] != -1); i++) + ; + if (*fdcount < i) { *fdcount = i; - memcpy(fds, ld_library_dirs, i * sizeof(int)); - return 0; + return (-1); + } + *fdcount = i; + memcpy(fds, ld_library_dirs, i * sizeof(int)); + return (0); } int From owner-p4-projects@FreeBSD.ORG Wed Feb 3 10:13:25 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 914761065693; Wed, 3 Feb 2010 10:13:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54C2D106568B for ; Wed, 3 Feb 2010 10:13:25 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 414788FC23 for ; Wed, 3 Feb 2010 10:13:25 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13ADP5l030621 for ; Wed, 3 Feb 2010 10:13:25 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13ADPHI030619 for perforce@freebsd.org; Wed, 3 Feb 2010 10:13:25 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 10:13:25 GMT Message-Id: <201002031013.o13ADPHI030619@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174214 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 10:13:25 -0000 http://p4web.freebsd.org/chv.cgi?CH=174214 Change 174214 by rwatson@rwatson_vimage_client on 2010/02/03 10:12:43 Add missing free of string and explicit NULL return on error. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#37 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#37 (text+ko) ==== @@ -1661,6 +1661,8 @@ path = xstrdup(name); if ((fd = find_library_fd(path)) < 0) { _rtld_error("Unable to find \"%s\" in LD_LIBRARY_DIRS", path); + free(path); + return NULL; } #else path = find_library(name, refobj); From owner-p4-projects@FreeBSD.ORG Wed Feb 3 10:21:34 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 214FD1065670; Wed, 3 Feb 2010 10:21:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C13081065676 for ; Wed, 3 Feb 2010 10:21:33 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ACF5A8FC0C for ; Wed, 3 Feb 2010 10:21:33 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13ALX97031217 for ; Wed, 3 Feb 2010 10:21:33 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13ALXsO031214 for perforce@freebsd.org; Wed, 3 Feb 2010 10:21:33 GMT (envelope-from mav@freebsd.org) Date: Wed, 3 Feb 2010 10:21:33 GMT Message-Id: <201002031021.o13ALXsO031214@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174216 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 10:21:34 -0000 http://p4web.freebsd.org/chv.cgi?CH=174216 Change 174216 by mav@mav_mavbook on 2010/02/03 10:20:37 IFC Affected files ... .. //depot/projects/scottl-camlock/src/gnu/usr.bin/binutils/Makefile.inc#2 integrate .. //depot/projects/scottl-camlock/src/lib/libc/gen/rand48.3#2 integrate .. //depot/projects/scottl-camlock/src/lib/libc/string/strndup.c#2 integrate .. //depot/projects/scottl-camlock/src/lib/libpam/modules/pam_unix/pam_unix.c#3 integrate .. //depot/projects/scottl-camlock/src/sbin/camcontrol/camcontrol.c#38 integrate .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.c#38 integrate .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#50 integrate .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#33 integrate .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#80 integrate .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#150 integrate .. //depot/projects/scottl-camlock/src/sys/geom/geom_redboot.c#3 integrate .. //depot/projects/scottl-camlock/src/sys/geom/virstor/g_virstor.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/kern/kern_shutdown.c#21 integrate .. //depot/projects/scottl-camlock/src/sys/kern/kern_umtx.c#22 integrate .. //depot/projects/scottl-camlock/src/sys/kern/vfs_lookup.c#22 integrate .. //depot/projects/scottl-camlock/src/sys/mips/include/proc.h#3 integrate .. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_adhoc.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_hostap.c#7 integrate .. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_ioctl.h#17 integrate .. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_mesh.c#8 integrate .. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_sta.c#8 integrate .. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_wds.c#6 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/in.c#31 integrate .. //depot/projects/scottl-camlock/src/sys/sys/ata.h#23 integrate .. //depot/projects/scottl-camlock/src/usr.sbin/rtsold/rtsold.c#4 integrate Differences ... ==== //depot/projects/scottl-camlock/src/gnu/usr.bin/binutils/Makefile.inc#2 (text+ko) ==== @@ -1,9 +1,5 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/Makefile.inc,v 1.9 2006/09/12 19:24:01 obrien Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/Makefile.inc,v 1.10 2010/02/03 02:39:08 imp Exp $ -.if (${TARGET_ARCH} == "alpha") -WARNS?= 2 -.else WARNS?= 3 -.endif .include "../Makefile.inc" ==== //depot/projects/scottl-camlock/src/lib/libc/gen/rand48.3#2 (text+ko) ==== @@ -10,9 +10,9 @@ .\" to anyone/anything when using this software. .\" .\" @(#)rand48.3 V1.0 MB 8 Oct 1993 -.\" $FreeBSD: src/lib/libc/gen/rand48.3,v 1.17 2005/01/20 09:17:02 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/rand48.3,v 1.19 2010/02/02 19:44:51 gavin Exp $ .\" -.Dd October 8, 1993 +.Dd February 2, 2010 .Dt RAND48 3 .Os .Sh NAME @@ -57,7 +57,7 @@ particular formula employed is r(n+1) = (a * r(n) + c) mod m where the default values are -for the multiplicand a = 0xfdeece66d = 25214903917 and +for the multiplicand a = 0x5deece66d = 25214903917 and the addend c = 0xb = 11. The modulo is always fixed at m = 2 ** 48. r(n) is called the seed of the random number generator. ==== //depot/projects/scottl-camlock/src/lib/libc/string/strndup.c#2 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/string/strndup.c,v 1.1 2008/12/06 09:37:54 kib Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/string/strndup.c,v 1.2 2010/02/02 19:02:08 ed Exp $"); #include #include @@ -42,9 +42,7 @@ size_t len; char *copy; - for (len = 0; len < n && str[len]; len++) - continue; - + len = strnlen(str, n); if ((copy = malloc(len + 1)) == NULL) return (NULL); memcpy(copy, str, len); ==== //depot/projects/scottl-camlock/src/lib/libpam/modules/pam_unix/pam_unix.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libpam/modules/pam_unix/pam_unix.c,v 1.53 2007/12/21 12:00:16 des Exp $"); +__FBSDID("$FreeBSD: src/lib/libpam/modules/pam_unix/pam_unix.c,v 1.54 2010/02/02 13:47:18 des Exp $"); #include #include @@ -271,10 +271,11 @@ const void *yp_domain, *yp_server; #endif char salt[SALTSIZE + 1]; - login_cap_t * lc; + login_cap_t *lc; struct passwd *pwd, *old_pwd; const char *user, *old_pass, *new_pass; char *encrypted; + time_t passwordtime; int pfd, tfd, retval; if (openpam_get_option(pamh, PAM_OPT_AUTH_AS_SELF)) @@ -377,11 +378,17 @@ if ((old_pwd = pw_dup(pwd)) == NULL) return (PAM_BUF_ERR); - pwd->pw_change = 0; lc = login_getclass(pwd->pw_class); if (login_setcryptfmt(lc, password_hash, NULL) == NULL) openpam_log(PAM_LOG_ERROR, "can't set password cipher, relying on default"); + + /* set password expiry date */ + pwd->pw_change = 0; + passwordtime = login_getcaptime(lc, "passwordtime", 0, 0); + if (passwordtime > 0) + pwd->pw_change = time(NULL) + passwordtime; + login_close(lc); makesalt(salt); pwd->pw_passwd = crypt(new_pass, salt); ==== //depot/projects/scottl-camlock/src/sbin/camcontrol/camcontrol.c#38 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/camcontrol/camcontrol.c,v 1.72 2010/01/20 13:31:12 mav Exp $"); +__FBSDID("$FreeBSD: src/sbin/camcontrol/camcontrol.c,v 1.73 2010/02/02 11:09:28 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.c#38 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/ata/ata_all.c,v 1.13 2010/01/28 08:41:30 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/ata/ata_all.c,v 1.14 2010/02/03 10:06:03 mav Exp $"); #include ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#50 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/ata/ata_da.c,v 1.15 2010/01/28 08:41:30 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/ata/ata_da.c,v 1.16 2010/02/02 18:03:21 mav Exp $"); #include ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#33 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/ata/ata_pmp.c,v 1.6 2010/01/28 08:41:30 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/ata/ata_pmp.c,v 1.7 2010/02/02 18:03:21 mav Exp $"); #include ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#80 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.21 2010/02/02 11:09:28 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.23 2010/02/03 10:06:03 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#150 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.237 2010/01/28 08:41:30 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.240 2010/02/03 08:42:08 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/geom/geom_redboot.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/geom_redboot.c,v 1.3 2009/06/24 06:42:13 jhay Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/geom_redboot.c,v 1.4 2010/02/03 01:12:19 gonzo Exp $"); #include #include @@ -252,7 +252,8 @@ if (!strcmp(pp->geom->class->name, REDBOOT_CLASS_NAME)) return (NULL); /* XXX only taste flash providers */ - if (strncmp(pp->name, "cfi", 3)) + if (strncmp(pp->name, "cfi", 3) && + strncmp(pp->name, "flash/spi", 9)) return (NULL); gp = g_slice_new(mp, REDBOOT_MAXSLICE, pp, &cp, &sc, sizeof(*sc), g_redboot_start); ==== //depot/projects/scottl-camlock/src/sys/geom/virstor/g_virstor.c#4 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/virstor/g_virstor.c,v 1.5 2010/01/25 20:51:40 ivoras Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/virstor/g_virstor.c,v 1.6 2010/02/02 22:25:22 delphij Exp $"); #include #include @@ -311,6 +311,11 @@ snprintf(aname, sizeof aname, "arg%d", i); prov_name = gctl_get_asciiparam(req, aname); + if (prov_name == NULL) { + gctl_error(req, "Error fetching argument '%s'", aname); + g_topology_unlock(); + return; + } if (strncmp(prov_name, _PATH_DEV, strlen(_PATH_DEV)) == 0) prov_name += strlen(_PATH_DEV); @@ -565,6 +570,10 @@ sprintf(param, "arg%d", i); prov_name = gctl_get_asciiparam(req, param); + if (prov_name == NULL) { + gctl_error(req, "Error fetching argument '%s'", param); + return; + } if (strncmp(prov_name, _PATH_DEV, strlen(_PATH_DEV)) == 0) prov_name += strlen(_PATH_DEV); ==== //depot/projects/scottl-camlock/src/sys/kern/kern_shutdown.c#21 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_shutdown.c,v 1.201 2009/10/23 15:09:51 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_shutdown.c,v 1.202 2010/02/03 08:42:08 mav Exp $"); #include "opt_ddb.h" #include "opt_kdb.h" ==== //depot/projects/scottl-camlock/src/sys/kern/kern_umtx.c#22 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_umtx.c,v 1.79 2010/01/10 09:31:57 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_umtx.c,v 1.81 2010/02/03 07:21:20 davidxu Exp $"); #include "opt_compat.h" #include @@ -2526,6 +2526,12 @@ umtxq_busy(&uq->uq_key); umtxq_unlock(&uq->uq_key); + /* + * re-read the state, in case it changed between the try-lock above + * and the check below + */ + state = fuword32(__DEVOLATILE(int32_t *, &rwlock->rw_state)); + /* set read contention bit */ while ((state & wrflags) && !(state & URWLOCK_READ_WAITERS)) { oldstate = casuword32(&rwlock->rw_state, state, state | URWLOCK_READ_WAITERS); @@ -2658,6 +2664,12 @@ umtxq_busy(&uq->uq_key); umtxq_unlock(&uq->uq_key); + /* + * re-read the state, in case it changed between the try-lock above + * and the check below + */ + state = fuword32(__DEVOLATILE(int32_t *, &rwlock->rw_state)); + while (((state & URWLOCK_WRITE_OWNER) || URWLOCK_READER_COUNT(state) != 0) && (state & URWLOCK_WRITE_WAITERS) == 0) { oldstate = casuword32(&rwlock->rw_state, state, state | URWLOCK_WRITE_WAITERS); @@ -2852,8 +2864,7 @@ } /* - * The magic thing is we should set c_has_waiters to 1 before - * releasing user mutex. + * set waiters byte and sleep. */ suword32(__DEVOLATILE(uint32_t *, &sem->_has_waiters), 1); ==== //depot/projects/scottl-camlock/src/sys/kern/vfs_lookup.c#22 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_lookup.c,v 1.133 2009/11/10 11:50:37 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_lookup.c,v 1.134 2010/02/02 23:10:27 rwatson Exp $"); #include "opt_kdtrace.h" #include "opt_ktrace.h" @@ -162,11 +162,16 @@ error = copyinstr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, (size_t *)&ndp->ni_pathlen); - /* If we are auditing the kernel pathname, save the user pathname. */ - if (cnp->cn_flags & AUDITVNODE1) - AUDIT_ARG_UPATH1(td, cnp->cn_pnbuf); - if (cnp->cn_flags & AUDITVNODE2) - AUDIT_ARG_UPATH2(td, cnp->cn_pnbuf); + if (error == 0) { + /* + * If we are auditing the kernel pathname, save the user + * pathname. + */ + if (cnp->cn_flags & AUDITVNODE1) + AUDIT_ARG_UPATH1(td, cnp->cn_pnbuf); + if (cnp->cn_flags & AUDITVNODE2) + AUDIT_ARG_UPATH2(td, cnp->cn_pnbuf); + } /* * Don't allow empty pathnames. ==== //depot/projects/scottl-camlock/src/sys/mips/include/proc.h#3 (text+ko) ==== @@ -33,7 +33,7 @@ * * @(#)proc.h 8.1 (Berkeley) 6/10/93 * JNPR: proc.h,v 1.7.2.1 2007/09/10 06:25:24 girish - * $FreeBSD: src/sys/mips/include/proc.h,v 1.2 2010/01/10 19:50:24 imp Exp $ + * $FreeBSD: src/sys/mips/include/proc.h,v 1.3 2010/02/03 04:09:36 neel Exp $ */ #ifndef _MACHINE_PROC_H_ @@ -44,7 +44,7 @@ */ struct mdthread { int md_flags; /* machine-dependent flags */ - int md_upte[KSTACK_PAGES]; /* ptes for mapping u pcb */ + int md_upte[KSTACK_PAGES - 1]; /* ptes for mapping u pcb */ int md_ss_addr; /* single step address for ptrace */ int md_ss_instr; /* single step instruction for ptrace */ register_t md_saved_intr; ==== //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_adhoc.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ #include #ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_adhoc.c,v 1.17 2009/07/05 17:59:19 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_adhoc.c,v 1.18 2010/02/03 10:07:43 rpaulo Exp $"); #endif /* @@ -293,7 +293,7 @@ struct ieee80211_frame *wh; struct ieee80211_key *key; struct ether_header *eh; - int hdrspace, need_tap; + int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; uint8_t *bssid; uint16_t rxseq; @@ -318,7 +318,6 @@ KASSERT(ni != NULL, ("null node")); ni->ni_inact = ni->ni_inact_reload; - need_tap = 1; /* mbuf need to be tapped. */ type = -1; /* undefined */ if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) { ==== //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_hostap.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ #include #ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_hostap.c,v 1.28 2009/12/08 00:54:08 rpaulo Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_hostap.c,v 1.29 2010/02/03 10:07:43 rpaulo Exp $"); #endif /* @@ -480,7 +480,7 @@ struct ieee80211_frame *wh; struct ieee80211_key *key; struct ether_header *eh; - int hdrspace, need_tap; + int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; uint8_t *bssid; uint16_t rxseq; @@ -505,7 +505,6 @@ KASSERT(ni != NULL, ("null node")); ni->ni_inact = ni->ni_inact_reload; - need_tap = 1; /* mbuf need to be tapped. */ type = -1; /* undefined */ if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) { ==== //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_ioctl.h#17 (text+ko) ==== @@ -23,7 +23,7 @@ * (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: src/sys/net80211/ieee80211_ioctl.h,v 1.42 2009/11/09 11:23:37 rpaulo Exp $ + * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.43 2010/02/03 10:07:43 rpaulo Exp $ */ #ifndef _NET80211_IEEE80211_IOCTL_H_ #define _NET80211_IEEE80211_IOCTL_H_ @@ -334,12 +334,12 @@ }; struct ieee80211req_mesh_route { + uint8_t imr_dest[IEEE80211_ADDR_LEN]; + uint8_t imr_nexthop[IEEE80211_ADDR_LEN]; + uint16_t imr_nhops; uint8_t imr_flags; #define IEEE80211_MESHRT_FLAGS_VALID 0x01 #define IEEE80211_MESHRT_FLAGS_PROXY 0x02 - uint8_t imr_dest[IEEE80211_ADDR_LEN]; - uint8_t imr_nexthop[IEEE80211_ADDR_LEN]; - uint16_t imr_nhops; uint8_t imr_pad; uint32_t imr_metric; uint32_t imr_lifetime; ==== //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_mesh.c#8 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include #ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_mesh.c,v 1.13 2010/01/14 19:23:41 rpaulo Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_mesh.c,v 1.14 2010/02/03 10:12:49 rpaulo Exp $"); #endif /* @@ -1468,11 +1468,12 @@ if (xrates != NULL) IEEE80211_VERIFY_ELEMENT(xrates, IEEE80211_RATE_MAXSIZE - rates[1], return); - if (meshid != NULL) + if (meshid != NULL) { IEEE80211_VERIFY_ELEMENT(meshid, IEEE80211_MESHID_LEN, return); - /* NB: meshid, not ssid */ - IEEE80211_VERIFY_SSID(vap->iv_bss, meshid, return); + /* NB: meshid, not ssid */ + IEEE80211_VERIFY_SSID(vap->iv_bss, meshid, return); + } /* XXX find a better class or define it's own */ IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_INPUT, wh->i_addr2, ==== //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_sta.c#8 (text+ko) ==== @@ -25,7 +25,7 @@ #include #ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_sta.c,v 1.28 2010/01/25 12:23:51 rpaulo Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_sta.c,v 1.29 2010/02/03 10:07:43 rpaulo Exp $"); #endif /* @@ -517,7 +517,7 @@ struct ieee80211_frame *wh; struct ieee80211_key *key; struct ether_header *eh; - int hdrspace, need_tap; + int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; uint8_t *bssid; uint16_t rxseq; @@ -542,7 +542,6 @@ KASSERT(ni != NULL, ("null node")); ni->ni_inact = ni->ni_inact_reload; - need_tap = 1; /* mbuf need to be tapped. */ type = -1; /* undefined */ if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) { ==== //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_wds.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ #include #ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_wds.c,v 1.15 2009/07/05 18:17:37 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_wds.c,v 1.16 2010/02/03 10:07:43 rpaulo Exp $"); #endif /* @@ -414,7 +414,7 @@ struct ieee80211_frame *wh; struct ieee80211_key *key; struct ether_header *eh; - int hdrspace, need_tap; + int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; uint16_t rxseq; @@ -437,7 +437,6 @@ KASSERT(ni != NULL, ("null node")); - need_tap = 1; /* mbuf need to be tapped. */ type = -1; /* undefined */ if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) { ==== //depot/projects/scottl-camlock/src/sys/netinet/in.c#31 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/netinet/in.c,v 1.156 2010/01/08 17:49:24 qingli Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/in.c,v 1.157 2010/02/02 20:38:30 qingli Exp $"); #include "opt_carp.h" @@ -921,6 +921,12 @@ if (ia->ia_addr.sin_addr.s_addr == INADDR_ANY) return (0); + if (ifp->if_flags & IFF_POINTOPOINT) { + if (ia->ia_dstaddr.sin_addr.s_addr == ia->ia_addr.sin_addr.s_addr) + return (0); + } + + /* * add a loopback route to self */ ==== //depot/projects/scottl-camlock/src/sys/sys/ata.h#23 (text+ko) ==== @@ -23,7 +23,7 @@ * (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: src/sys/sys/ata.h,v 1.48 2009/12/28 20:08:01 mav Exp $ + * $FreeBSD: src/sys/sys/ata.h,v 1.49 2010/02/03 10:06:03 mav Exp $ */ #ifndef _SYS_ATA_H_ ==== //depot/projects/scottl-camlock/src/usr.sbin/rtsold/rtsold.c#4 (text+ko) ==== @@ -28,20 +28,25 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/usr.sbin/rtsold/rtsold.c,v 1.24 2009/09/12 22:14:58 hrs Exp $ + * $FreeBSD: src/usr.sbin/rtsold/rtsold.c,v 1.26 2010/02/02 18:38:17 ume Exp $ */ #include +#include #include #include #include #include #include +#include #include #include +#include +#include + #include #include #include @@ -785,8 +790,9 @@ static char **argv = NULL; static int n = 0; char **a; - int i, found; + int s, i, found; struct ifaddrs *ifap, *ifa, *target; + struct in6_ndireq nd; /* initialize */ while (n--) @@ -800,6 +806,11 @@ if (getifaddrs(&ifap) != 0) return NULL; + if (!Fflag && (s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { + err(1, "socket"); + /* NOTREACHED */ + } + target = NULL; /* find an ethernet */ for (ifa = ifap; ifa; ifa = ifa->ifa_next) { @@ -825,6 +836,23 @@ if (found) continue; + /* + * Skip the interfaces which IPv6 and/or accepting RA + * is disabled. + */ + if (!Fflag) { + memset(&nd, 0, sizeof(nd)); + strlcpy(nd.ifname, ifa->ifa_name, sizeof(nd.ifname)); + if (ioctl(s, SIOCGIFINFO_IN6, (caddr_t)&nd) < 0) { + err(1, "ioctl(SIOCGIFINFO_IN6)"); + /* NOTREACHED */ + } + if ((nd.ndi.flags & ND6_IFF_IFDISABLED)) + continue; + if (!(nd.ndi.flags & ND6_IFF_ACCEPT_RTADV)) + continue; + } + /* if we find multiple candidates, just warn. */ if (n != 0 && dflag > 1) warnx("multiple interfaces found"); @@ -837,7 +865,6 @@ if (!argv[n]) err(1, "malloc"); n++; - argv[n] = NULL; } if (n) { @@ -852,6 +879,8 @@ warnx("probing %s", argv[i]); } } + if (!Fflag) + close(s); freeifaddrs(ifap); return argv; } From owner-p4-projects@FreeBSD.ORG Wed Feb 3 10:34:47 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CF2711065676; Wed, 3 Feb 2010 10:34:47 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B56C1065670 for ; Wed, 3 Feb 2010 10:34:47 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6763D8FC08 for ; Wed, 3 Feb 2010 10:34:47 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13AYltJ032137 for ; Wed, 3 Feb 2010 10:34:47 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13AYlRq032135 for perforce@freebsd.org; Wed, 3 Feb 2010 10:34:47 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 10:34:47 GMT Message-Id: <201002031034.o13AYlRq032135@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174218 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 10:34:48 -0000 http://p4web.freebsd.org/chv.cgi?CH=174218 Change 174218 by rwatson@rwatson_vimage_client on 2010/02/03 10:34:01 Keep a running count of valid file descriptors in the directory length array, rather than marking unused ones as (-1). This avoids several loops. While here, fix a (+ sizeof(int)) into a (* sizeof(int)) and a few other nits. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#38 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#38 (text+ko) ==== @@ -188,7 +188,9 @@ static char *ld_bind_now; /* Environment variable for immediate binding */ static char *ld_debug; /* Environment variable for debugging */ static int *ld_library_dirs = NULL; /* File descriptors of lib path (end: -1) */ +static int ld_library_dirs_done; /* ld_library_dirs has been initialized */ static int ld_library_dirlen; /* Capacity of ld_library_dirs */ +static int ld_library_dircount; /* Number of entries in ld_library_dirs */ #ifndef IN_RTLD_CAP static char *ld_library_path; /* Environment variable for search path */ static char *ld_preload; /* Environment variable for libraries to @@ -1240,9 +1242,9 @@ { int fd, i; - if (ld_library_dirs == NULL) + if (!ld_library_dirs_done) init_libdirs(); - for (i = 0; (i < ld_library_dirlen) && (ld_library_dirs[i] != -1); i++) { + for (i = 0; i < ld_library_dircount); i++) { fd = openat(ld_library_dirs[i], name, O_RDONLY); if (fd >= 0) return (fd); @@ -2111,35 +2113,39 @@ /* * Add a file descriptor to ld_library_dirs. + * + * XXX: This may be called from either the rtld startup code, or from + * ld_libdirs. We have no way to distinguish them on error, so die() + * unconditionally. Perhaps the latter case should allow graceful failure. + * + * XXX: Synchronization? */ static void add_libdir_fd(int fd) { - int i; - if (ld_library_dirs == NULL) { - /* Initialize the FD list. */ + /* Initialize the FD list. */ + if (!ld_library_dirs_done) { ld_library_dirlen = INITIAL_FDLEN; + ld_library_dircount = 0; ld_library_dirs = xmalloc(ld_library_dirlen * sizeof(int)); - memset(ld_library_dirs, 0xff, ld_library_dirlen * sizeof(int)); + ld_library_dirs_done = 1; } - /* Find the next available FD slot. */ - for (i = 0; (i < ld_library_dirlen) && (ld_library_dirs[i] != -1); i++) - ; - - if (i == ld_library_dirlen) { - /* We need more space. */ - int old_size = ld_library_dirlen + sizeof(int); - + /* Do we need to grow? */ + if (ld_library_dirlen == ld_library_dircount) { ld_library_dirlen *= 2; - ld_library_dirs = realloc(ld_library_dirs, 2 * old_size); - memset(ld_library_dirs + old_size, 0xff, old_size); + ld_library_dirs = realloc(ld_library_dirs, + ld_library_dirlen * sizeof(int)); + if (ld_library_dirs == NULL) { + _rtld_error("add_libdir_fd: realloc failed"); + die(); + } + } - if (ld_library_dirs == NULL) - err(-1, "realloc() failed"); - } - ld_library_dirs[i] = fd; + /* Add the new library directory fd to the end. */ + ld_library_dirs[ld_library_dircount] = fd; + ld_library_dircount++; } /* @@ -2204,12 +2210,6 @@ add_libdir_paths(gethints()); add_libdir_paths(STANDARD_LIBRARY_PATH); #endif - - /* If all else fails, create an empty array */ - if (ld_library_dirlen == 0) { - ld_library_dirs = malloc(sizeof(int)); - ld_library_dirs[0] = -1; - } } /* @@ -2220,7 +2220,6 @@ int ld_libdirs(int *fds, int *fdcount) { - int i = 0; if (fdcount == NULL) return (-1); @@ -2228,16 +2227,14 @@ *fdcount = -1; return (-1); } - if (ld_library_dirs == NULL) + if (!ld_library_dirs_done) init_libdirs(); - for (i = 0; (i < ld_library_dirlen) && (ld_library_dirs[i] != -1); i++) - ; - if (*fdcount < i) { - *fdcount = i; + if (*fdcount < ld_library_dircount) { + *fdcount = ld_library_dircount; return (-1); } - *fdcount = i; - memcpy(fds, ld_library_dirs, i * sizeof(int)); + *fdcount = ld_library_dircount; + memcpy(fds, ld_library_dirs, ld_library_dircount * sizeof(int)); return (0); } From owner-p4-projects@FreeBSD.ORG Wed Feb 3 10:39:53 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EAFEA1065679; Wed, 3 Feb 2010 10:39:52 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF9F9106566C for ; Wed, 3 Feb 2010 10:39:52 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9BE898FC17 for ; Wed, 3 Feb 2010 10:39:52 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Adqh3032495 for ; Wed, 3 Feb 2010 10:39:52 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13Adq7d032493 for perforce@freebsd.org; Wed, 3 Feb 2010 10:39:52 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 10:39:52 GMT Message-Id: <201002031039.o13Adq7d032493@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174219 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 10:39:53 -0000 http://p4web.freebsd.org/chv.cgi?CH=174219 Change 174219 by rwatson@rwatson_vimage_client on 2010/02/03 10:39:06 Can't create sandboxes from a statically linked binary, so don't try. Remove debugging printf, we can now micro-benchmark sandbox creation. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/Makefile#4 edit .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#7 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/Makefile#4 (text+ko) ==== @@ -3,7 +3,7 @@ # PROG= syscall_timing -CFLAGS+= -static -O -Wall -rdynamic +CFLAGS+= -O -Wall -rdynamic NO_MAN= LDADD= -lcapsicum -lsbuf ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#7 (text+ko) ==== @@ -476,7 +476,6 @@ ch = 'X'; iov.iov_base = &ch; iov.iov_len = sizeof(ch); - printf("lch_rpc\n"); if (lch_rpc(lcsp, 0, &iov, 1, &iov, 1, &len) < 0) err(-1, "lch_rpc"); if (len != sizeof(ch)) From owner-p4-projects@FreeBSD.ORG Wed Feb 3 10:51:04 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 646CF106568F; Wed, 3 Feb 2010 10:51:04 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10CF0106568D for ; Wed, 3 Feb 2010 10:51:04 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E96FE8FC08 for ; Wed, 3 Feb 2010 10:51:03 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Ap3D1033400 for ; Wed, 3 Feb 2010 10:51:03 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13Ap3o6033398 for perforce@freebsd.org; Wed, 3 Feb 2010 10:51:03 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 10:51:03 GMT Message-Id: <201002031051.o13Ap3o6033398@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174220 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 10:51:04 -0000 http://p4web.freebsd.org/chv.cgi?CH=174220 Change 174220 by rwatson@rwatson_vimage_client on 2010/02/03 10:50:29 Benchmark various fork variations with exec of /usr/bin/true. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#8 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#8 (text+ko) ==== @@ -455,6 +455,116 @@ benchmark_stop(); } +#define USR_BIN_TRUE "/usr/bin/true" +static char *execve_args[] = { USR_BIN_TRUE, NULL}; +extern char **environ; + +void +test_fork_exec(int num) +{ + pid_t pid; + int i; + + pid = fork(); + if (pid < 0) + err(-1, "test_fork: fork"); + if (pid == 0) { + (void)execve(USR_BIN_TRUE, execve_args, environ); + err(-1, "execve"); + } + if (waitpid(pid, NULL, 0) < 0) + err(-1, "test_fork: waitpid"); + benchmark_start(); + for (i = 0; i < num; i++) { + pid = fork(); + if (pid < 0) + err(-1, "test_fork: fork"); + if (pid == 0) { + (void)execve(USR_BIN_TRUE, execve_args, environ); + err(-1, "execve"); + } + if (waitpid(pid, NULL, 0) < 0) + err(-1, "test_fork: waitpid"); + } + benchmark_stop(); +} + +void +test_vfork_exec(int num) +{ + pid_t pid; + int i; + + pid = vfork(); + if (pid < 0) + err(-1, "test_vfork: vfork"); + if (pid == 0) { + (void)execve(USR_BIN_TRUE, execve_args, environ); + err(-1, "execve"); + } + if (waitpid(pid, NULL, 0) < 0) + err(-1, "test_vfork: waitpid"); + benchmark_start(); + for (i = 0; i < num; i++) { + pid = vfork(); + if (pid < 0) + err(-1, "test_vfork: vfork"); + if (pid == 0) { + (void)execve(USR_BIN_TRUE, execve_args, environ); + err(-1, "execve"); + } + if (waitpid(pid, NULL, 0) < 0) + err(-1, "test_vfork: waitpid"); + } + benchmark_stop(); +} + +void +test_pdfork_exec(int num) +{ + struct pollfd pollfd; + pid_t pid; + int fd, i, n; + + pid = pdfork(&fd); + if (pid < 0) + err(-1, "test_pdfork: pdfork"); + if (pid == 0) { + (void)execve(USR_BIN_TRUE, execve_args, environ); + err(-1, "execve"); + } + pollfd.fd = fd; + pollfd.events = POLLHUP; + pollfd.revents = 0; + n = poll(&pollfd, 1, INFTIM); + if (n < 0) + err(-1, "poll"); + if (n != 1) + errx(-1, "poll returned %d", n); + close(fd); + + benchmark_start(); + for (i = 0; i < num; i++) { + pid = pdfork(&fd); + if (pid < 0) + err(-1, "test_pdfork: pdfork"); + if (pid == 0) { + (void)execve(USR_BIN_TRUE, execve_args, environ); + err(-1, "execve"); + } + pollfd.fd = fd; + pollfd.events = POLLHUP; + pollfd.revents = 0; + n = poll(&pollfd, 1, INFTIM); + if (n < 0) + err(-1, "poll"); + if (n != 1) + errx(-1, "poll returned %d", n); + close(fd); + } + benchmark_stop(); +} + #define MYNAME "./syscall_timing" /* Binary to run in sandbox. */ /* @@ -572,6 +682,9 @@ { "fork", test_fork }, { "vfork", test_vfork }, { "pdfork", test_pdfork }, + { "fork_exec", test_fork_exec }, + { "vfork_exec", test_vfork_exec }, + { "pdfork_exec", test_pdfork_exec }, { "sandbox", test_sandbox }, }; static const int tests_count = sizeof(tests) / sizeof(tests[0]); From owner-p4-projects@FreeBSD.ORG Wed Feb 3 13:47:02 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E3F701065679; Wed, 3 Feb 2010 13:47:01 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A899E106566B for ; Wed, 3 Feb 2010 13:47:01 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 946258FC1A for ; Wed, 3 Feb 2010 13:47:01 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Dl1dJ060200 for ; Wed, 3 Feb 2010 13:47:01 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13Dl1dj060198 for perforce@freebsd.org; Wed, 3 Feb 2010 13:47:01 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 13:47:01 GMT Message-Id: <201002031347.o13Dl1dj060198@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174234 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 13:47:02 -0000 http://p4web.freebsd.org/chv.cgi?CH=174234 Change 174234 by rwatson@rwatson_vimage_client on 2010/02/03 13:46:09 Consistently don't stick "test_" in front of printed test names, since they are all tests. On the other hand, we do use test_ in front of internal function names. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#9 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#9 (text+ko) ==== @@ -674,8 +674,8 @@ { "socketpair_dgram", test_socketpair_dgram }, { "dup", test_dup }, { "cap_new", test_cap_new }, - { "test_shmfd", test_shmfd }, - { "test_cap_shmfd", test_cap_shmfd }, + { "shmfd", test_shmfd }, + { "cap_shmfd", test_cap_shmfd }, { "fstat_shmfd", test_fstat_shmfd }, { "fstat_cap_shmfd", test_fstat_cap_shmfd }, { "cap_enter", test_cap_enter }, From owner-p4-projects@FreeBSD.ORG Wed Feb 3 13:54:09 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 46595106568B; Wed, 3 Feb 2010 13:54:09 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6A7D1065670 for ; Wed, 3 Feb 2010 13:54:08 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D1E6E8FC16 for ; Wed, 3 Feb 2010 13:54:08 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Ds8O3060772 for ; Wed, 3 Feb 2010 13:54:08 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13Ds8tg060770 for perforce@freebsd.org; Wed, 3 Feb 2010 13:54:08 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 13:54:08 GMT Message-Id: <201002031354.o13Ds8tg060770@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174235 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 13:54:09 -0000 http://p4web.freebsd.org/chv.cgi?CH=174235 Change 174235 by rwatson@rwatson_vimage_client on 2010/02/03 13:53:55 Improve debugging output. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#10 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#10 (text+ko) ==== @@ -430,9 +430,9 @@ pollfd.revents = 0; n = poll(&pollfd, 1, INFTIM); if (n < 0) - err(-1, "poll"); + err(-1, "test_pdfork: poll"); if (n != 1) - errx(-1, "poll returned %d", n); + errx(-1, "test_pdfork: poll returned %d", n); close(fd); benchmark_start(); @@ -447,9 +447,9 @@ pollfd.revents = 0; n = poll(&pollfd, 1, INFTIM); if (n < 0) - err(-1, "poll"); + err(-1, "test_pdfork: poll"); if (n != 1) - errx(-1, "poll returned %d", n); + errx(-1, "test_pdfork: poll returned %d", n); close(fd); } benchmark_stop(); @@ -467,7 +467,7 @@ pid = fork(); if (pid < 0) - err(-1, "test_fork: fork"); + err(-1, "test_fork_exec: fork"); if (pid == 0) { (void)execve(USR_BIN_TRUE, execve_args, environ); err(-1, "execve"); @@ -478,13 +478,13 @@ for (i = 0; i < num; i++) { pid = fork(); if (pid < 0) - err(-1, "test_fork: fork"); + err(-1, "test_fork_exec: fork"); if (pid == 0) { (void)execve(USR_BIN_TRUE, execve_args, environ); - err(-1, "execve"); + err(-1, "test_fork_exec: execve"); } if (waitpid(pid, NULL, 0) < 0) - err(-1, "test_fork: waitpid"); + err(-1, "test_fork_exec: waitpid"); } benchmark_stop(); } @@ -497,24 +497,24 @@ pid = vfork(); if (pid < 0) - err(-1, "test_vfork: vfork"); + err(-1, "test_vfork_exec: vfork"); if (pid == 0) { (void)execve(USR_BIN_TRUE, execve_args, environ); - err(-1, "execve"); + err(-1, "test_vfork_exec: execve"); } if (waitpid(pid, NULL, 0) < 0) - err(-1, "test_vfork: waitpid"); + err(-1, "test_vfork_exec: waitpid"); benchmark_start(); for (i = 0; i < num; i++) { pid = vfork(); if (pid < 0) - err(-1, "test_vfork: vfork"); + err(-1, "test_vfork_exec: vfork"); if (pid == 0) { (void)execve(USR_BIN_TRUE, execve_args, environ); err(-1, "execve"); } if (waitpid(pid, NULL, 0) < 0) - err(-1, "test_vfork: waitpid"); + err(-1, "test_vfork_exec: waitpid"); } benchmark_stop(); } @@ -528,38 +528,38 @@ pid = pdfork(&fd); if (pid < 0) - err(-1, "test_pdfork: pdfork"); + err(-1, "test_pdfork_exec: pdfork"); if (pid == 0) { (void)execve(USR_BIN_TRUE, execve_args, environ); - err(-1, "execve"); + err(-1, "test_pdfork_exec: execve"); } pollfd.fd = fd; pollfd.events = POLLHUP; pollfd.revents = 0; n = poll(&pollfd, 1, INFTIM); if (n < 0) - err(-1, "poll"); + err(-1, "test_pdfork_exec: poll"); if (n != 1) - errx(-1, "poll returned %d", n); + errx(-1, "test_pdfork_exec: poll returned %d", n); close(fd); benchmark_start(); for (i = 0; i < num; i++) { pid = pdfork(&fd); if (pid < 0) - err(-1, "test_pdfork: pdfork"); + err(-1, "test_pdfork_exec: pdfork"); if (pid == 0) { (void)execve(USR_BIN_TRUE, execve_args, environ); - err(-1, "execve"); + err(-1, "test_pdfork_exec: execve"); } pollfd.fd = fd; pollfd.events = POLLHUP; pollfd.revents = 0; n = poll(&pollfd, 1, INFTIM); if (n < 0) - err(-1, "poll"); + err(-1, "test_pdfork_exec: poll"); if (n != 1) - errx(-1, "poll returned %d", n); + errx(-1, "test_pdfork_exec: poll returned %d", n); close(fd); } benchmark_stop(); From owner-p4-projects@FreeBSD.ORG Wed Feb 3 13:59:14 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6185D1065672; Wed, 3 Feb 2010 13:59:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26305106566B for ; Wed, 3 Feb 2010 13:59:14 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1217A8FC15 for ; Wed, 3 Feb 2010 13:59:14 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13DxDbc061153 for ; Wed, 3 Feb 2010 13:59:13 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13DxDsX061151 for perforce@freebsd.org; Wed, 3 Feb 2010 13:59:13 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 13:59:13 GMT Message-Id: <201002031359.o13DxDsX061151@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174236 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 13:59:14 -0000 http://p4web.freebsd.org/chv.cgi?CH=174236 Change 174236 by rwatson@rwatson_vimage_client on 2010/02/03 13:58:36 Use _exit(0) not exit(0) after fork, or I/O may be flushed more than once. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#11 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#11 (text+ko) ==== @@ -371,7 +371,7 @@ if (pid < 0) err(-1, "test_fork: fork"); if (pid == 0) - exit(0); + _exit(0); if (waitpid(pid, NULL, 0) < 0) err(-1, "test_fork: waitpid"); benchmark_start(); @@ -380,7 +380,7 @@ if (pid < 0) err(-1, "test_fork: fork"); if (pid == 0) - exit(0); + _exit(0); if (waitpid(pid, NULL, 0) < 0) err(-1, "test_fork: waitpid"); } @@ -397,7 +397,7 @@ if (pid < 0) err(-1, "test_vfork: vfork"); if (pid == 0) - exit(0); + _exit(0); if (waitpid(pid, NULL, 0) < 0) err(-1, "test_vfork: waitpid"); benchmark_start(); @@ -406,7 +406,7 @@ if (pid < 0) err(-1, "test_vfork: vfork"); if (pid == 0) - exit(0); + _exit(0); if (waitpid(pid, NULL, 0) < 0) err(-1, "test_vfork: waitpid"); } @@ -424,7 +424,7 @@ if (pid < 0) err(-1, "test_pdfork: pdfork"); if (pid == 0) - exit(0); + _exit(0); pollfd.fd = fd; pollfd.events = POLLHUP; pollfd.revents = 0; @@ -441,7 +441,7 @@ if (pid < 0) err(-1, "test_pdfork: pdfork"); if (pid == 0) - exit(0); + _exit(0); pollfd.fd = fd; pollfd.events = POLLHUP; pollfd.revents = 0; From owner-p4-projects@FreeBSD.ORG Wed Feb 3 14:11:31 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C573E1065676; Wed, 3 Feb 2010 14:11:31 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71E891065670 for ; Wed, 3 Feb 2010 14:11:31 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5DB128FC1E for ; Wed, 3 Feb 2010 14:11:31 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13EBVdr063157 for ; Wed, 3 Feb 2010 14:11:31 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13EBTYD063153 for perforce@freebsd.org; Wed, 3 Feb 2010 14:11:29 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 14:11:29 GMT Message-Id: <201002031411.o13EBTYD063153@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174238 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 14:11:32 -0000 http://p4web.freebsd.org/chv.cgi?CH=174238 Change 174238 by rwatson@rwatson_vimage_client on 2010/02/03 14:10:57 Add a 'pingpong' test, which is socketpair + fork + send + recv + send + recv + exit + waitpid. A bit like sandbox but no exec or sandboxy magic. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#12 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#12 (text+ko) ==== @@ -565,6 +565,94 @@ benchmark_stop(); } +/* + * A bit like sandbox, in that a process is forked, IPC ping-pong is done, + * but with none of the sandboxing goo. + */ +void +test_pingpong(int num) +{ + char ch; + int so[2]; + pid_t pid; + ssize_t len; + int i; + + if (socketpair(PF_LOCAL, SOCK_STREAM, 0, so) < 0) + err(-1, "test_pingpong: socketpair"); + pid = fork(); + if (pid < 0) + err(-1, "test_pingpong: fork"); + if (pid == 0) { + close(so[0]); + len = recv(so[1], &ch, sizeof(ch), 0); + if (len < 0) + err(-1, "test_pingpong: child: recv"); + if (len != 1) + errx(-1, "test_pingpong: child: recv %d", (int)len); + len = send(so[1], &ch, sizeof(ch), 0); + if (len < 0) + err(-1, "test_pingpong: child: send"); + if (len != 1) + errx(-1, "test_pingpong: child: send %d", (int)len); + _exit(0); + } + close(so[1]); + len = send(so[0], &ch, sizeof(ch), 0); + if (len < 0) + err(-1, "test_pingpong: parent: send"); + if (len != 1) + errx(-1, "test_pingpong: parent: send %d", (int)len); + len = recv(so[0], &ch, sizeof(ch), 0); + if (len < 0) + err(-1, "test_pingpong: parent: recv"); + if (len != 1) + errx(-1, "test_pingpong: parent: recv %d", (int)len); + close(so[0]); + if (waitpid(pid, NULL, 0) < 0) + err(-1, "test_pingpong: waitpid"); + + benchmark_start(); + for (i = 0; i < num; i++) { + if (socketpair(PF_LOCAL, SOCK_STREAM, 0, so) < 0) + err(-1, "test_pingpong: socketpair"); + pid = fork(); + if (pid < 0) + err(-1, "test_pingpong: fork"); + if (pid == 0) { + close(so[0]); + len = recv(so[1], &ch, sizeof(ch), 0); + if (len < 0) + err(-1, "test_pingpong: child: recv"); + if (len != 1) + errx(-1, "test_pingpong: child: recv %d", + (int)len); + len = send(so[1], &ch, sizeof(ch), 0); + if (len < 0) + err(-1, "test_pingpong: child: send"); + if (len != 1) + errx(-1, "test_pingpong: child: send %d", + (int)len); + _exit(0); + } + close(so[1]); + len = send(so[0], &ch, sizeof(ch), 0); + if (len < 0) + err(-1, "test_pingpong: parent: send"); + if (len != 1) + errx(-1, "test_pingpong: parent: send %d", (int)len); + len = recv(so[0], &ch, sizeof(ch), 0); + if (len < 0) + err(-1, "test_pingpong: parent: recv"); + if (len != 1) + errx(-1, "test_pingpong: parent: recv %d", (int)len); + close(so[0]); + if (waitpid(pid, NULL, 0) < 0) + err(-1, "test_pingpong: waitpid"); + } + benchmark_stop(); +} + #define MYNAME "./syscall_timing" /* Binary to run in sandbox. */ /* @@ -685,6 +773,7 @@ { "fork_exec", test_fork_exec }, { "vfork_exec", test_vfork_exec }, { "pdfork_exec", test_pdfork_exec }, + { "pingpong", test_pingpong }, { "sandbox", test_sandbox }, }; static const int tests_count = sizeof(tests) / sizeof(tests[0]); From owner-p4-projects@FreeBSD.ORG Wed Feb 3 15:29:50 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 26D0A10656AB; Wed, 3 Feb 2010 15:29:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF7FA10656A9 for ; Wed, 3 Feb 2010 15:29:49 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CC6EC8FC0A for ; Wed, 3 Feb 2010 15:29:49 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13FTn8W069775 for ; Wed, 3 Feb 2010 15:29:49 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13FTnRr069773 for perforce@freebsd.org; Wed, 3 Feb 2010 15:29:49 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 15:29:49 GMT Message-Id: <201002031529.o13FTnRr069773@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174240 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 15:29:50 -0000 http://p4web.freebsd.org/chv.cgi?CH=174240 Change 174240 by rwatson@rwatson_vimage_client on 2010/02/03 15:29:13 Further constrain sandboxed tcpdump: don't allow excessive access to stdin, stdout, and stderr. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/contrib/tcpdump/tcpdump.c#6 edit .. //depot/projects/trustedbsd/capabilities/src/usr.sbin/tcpdump/tcpdump/Makefile#3 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/contrib/tcpdump/tcpdump.c#6 (text+ko) ==== @@ -77,6 +77,7 @@ #endif /* WIN32 */ #include +#include #include "netdissect.h" #include "interface.h" @@ -1198,6 +1199,12 @@ (void)fflush(stderr); } #endif /* WIN32 */ + if (lc_limitfd(STDIN_FILENO, CAP_FSTAT) < 0) + error("lc_limitfd: unable to limit STDIN_FILENO"); + if (lc_limitfd(STDOUT_FILENO, CAP_FSTAT | CAP_SEEK | CAP_WRITE) < 0) + error("lc_limitfd: unable to limit STDIN_FILENO"); + if (lc_limitfd(STDERR_FILENO, CAP_FSTAT | CAP_SEEK | CAP_WRITE) < 0) + error("lc_limitfd: unable to limit STDIN_FILENO"); if (cap_enter() < 0) error("cap_enter: %s", pcap_strerror(errno)); status = pcap_loop(pd, cnt, callback, pcap_userdata); ==== //depot/projects/trustedbsd/capabilities/src/usr.sbin/tcpdump/tcpdump/Makefile#3 (text+ko) ==== @@ -50,8 +50,8 @@ CFLAGS+= -DLBL_ALIGN .endif -DPADD= ${LIBL} ${LIBPCAP} -LDADD= -ll -lpcap +DPADD= ${LIBL} ${LIBPCAP} ${LIBCAPSICUM} +LDADD= -ll -lpcap -lcapsicum .if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto From owner-p4-projects@FreeBSD.ORG Wed Feb 3 15:41:01 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ACD051065679; Wed, 3 Feb 2010 15:41:01 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 715131065672 for ; Wed, 3 Feb 2010 15:41:01 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2896D8FC12 for ; Wed, 3 Feb 2010 15:41:01 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Ff1JP070672 for ; Wed, 3 Feb 2010 15:41:01 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13Ff1m5070670 for perforce@freebsd.org; Wed, 3 Feb 2010 15:41:01 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 15:41:01 GMT Message-Id: <201002031541.o13Ff1m5070670@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174241 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 15:41:01 -0000 http://p4web.freebsd.org/chv.cgi?CH=174241 Change 174241 by rwatson@rwatson_vimage_client on 2010/02/03 15:40:58 Fix typo affecting rtld-elf-cap but not rtld-elf. Submitted by: antoine Affected files ... .. //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#39 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#39 (text+ko) ==== @@ -1244,7 +1244,7 @@ if (!ld_library_dirs_done) init_libdirs(); - for (i = 0; i < ld_library_dircount); i++) { + for (i = 0; i < ld_library_dircount; i++) { fd = openat(ld_library_dirs[i], name, O_RDONLY); if (fd >= 0) return (fd); From owner-p4-projects@FreeBSD.ORG Wed Feb 3 15:46:06 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ABD331065670; Wed, 3 Feb 2010 15:46:06 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 709FC106566B for ; Wed, 3 Feb 2010 15:46:06 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5DB0A8FC08 for ; Wed, 3 Feb 2010 15:46:06 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Fk6JA071061 for ; Wed, 3 Feb 2010 15:46:06 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13Fk62f071059 for perforce@freebsd.org; Wed, 3 Feb 2010 15:46:06 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 15:46:06 GMT Message-Id: <201002031546.o13Fk62f071059@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174242 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 15:46:07 -0000 http://p4web.freebsd.org/chv.cgi?CH=174242 Change 174242 by rwatson@rwatson_vimage_client on 2010/02/03 15:45:19 Force at least one benchmark to be run. Submitted by: antoine Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#13 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#13 (text+ko) ==== @@ -799,7 +799,7 @@ int i, j, k; int iterations, loops; - if (argc < 3) + if (argc < 4) usage(); ll = strtoll(argv[1], &endp, 10); From owner-p4-projects@FreeBSD.ORG Wed Feb 3 16:06:27 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 731341065694; Wed, 3 Feb 2010 16:06:27 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06D73106568F for ; Wed, 3 Feb 2010 16:06:27 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E81278FC12 for ; Wed, 3 Feb 2010 16:06:26 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13G6QRZ073535 for ; Wed, 3 Feb 2010 16:06:26 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13G6Qtq073533 for perforce@freebsd.org; Wed, 3 Feb 2010 16:06:26 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 16:06:26 GMT Message-Id: <201002031606.o13G6Qtq073533@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174244 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 16:06:27 -0000 http://p4web.freebsd.org/chv.cgi?CH=174244 Change 174244 by rwatson@rwatson_vimage_client on 2010/02/03 16:06:06 Fix copy-and-paste mistake in error message. Submitted by: antoine Affected files ... .. //depot/projects/trustedbsd/capabilities/src/contrib/tcpdump/tcpdump.c#7 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/contrib/tcpdump/tcpdump.c#7 (text+ko) ==== @@ -1204,7 +1204,7 @@ if (lc_limitfd(STDOUT_FILENO, CAP_FSTAT | CAP_SEEK | CAP_WRITE) < 0) error("lc_limitfd: unable to limit STDIN_FILENO"); if (lc_limitfd(STDERR_FILENO, CAP_FSTAT | CAP_SEEK | CAP_WRITE) < 0) - error("lc_limitfd: unable to limit STDIN_FILENO"); + error("lc_limitfd: unable to limit STDERR_FILENO"); if (cap_enter() < 0) error("cap_enter: %s", pcap_strerror(errno)); status = pcap_loop(pd, cnt, callback, pcap_userdata); From owner-p4-projects@FreeBSD.ORG Wed Feb 3 20:05:28 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 722071065676; Wed, 3 Feb 2010 20:05:28 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36A801065670 for ; Wed, 3 Feb 2010 20:05:28 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0CB388FC0C for ; Wed, 3 Feb 2010 20:05:28 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13K5RVs005299 for ; Wed, 3 Feb 2010 20:05:27 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13K5RX2005297 for perforce@freebsd.org; Wed, 3 Feb 2010 20:05:27 GMT (envelope-from raj@freebsd.org) Date: Wed, 3 Feb 2010 20:05:27 GMT Message-Id: <201002032005.o13K5RX2005297@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174255 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:05:28 -0000 http://p4web.freebsd.org/chv.cgi?CH=174255 Change 174255 by raj@raj_fdt on 2010/02/03 20:04:33 Improve FDT fixup handling in loader. Fixup were not applied previously upon DTB unload and consecutive loading. This is now fixed with a run-time created 'fixup-applied' prop in the /chosen node. Affected files ... .. //depot/projects/fdt/sys/boot/uboot/lib/fdt.c#4 edit Differences ... ==== //depot/projects/fdt/sys/boot/uboot/lib/fdt.c#4 (text+ko) ==== @@ -91,7 +91,6 @@ }; static char cwd[FDT_CWD_LEN] = "/"; -static unsigned char fdt_fixup_applied = 0; static int fdt_setup_fdtp() @@ -382,15 +381,12 @@ { const char *env; char *ethstr; - int err, eth_no, len; + int chosen, err, eth_no, len; struct sys_info *si; env = NULL; eth_no = 0; - if (fdt_fixup_applied) - return (CMD_OK); - if (!fdtp) { err = fdt_setup_fdtp(); if (err) { @@ -401,8 +397,13 @@ } /* Create /chosen node (if not exists) */ - if (fdt_subnode_offset(fdtp, 0, "chosen") == -FDT_ERR_NOTFOUND) - fdt_add_subnode(fdtp, 0, "chosen"); + if ((chosen = fdt_subnode_offset(fdtp, 0, "chosen")) == + -FDT_ERR_NOTFOUND) + chosen = fdt_add_subnode(fdtp, 0, "chosen"); + + /* Value assigned to fixup-applied does not matter. */ + if (fdt_getprop(fdtp, chosen, "fixup-applied", NULL)) + return (CMD_OK); /* Acquire sys_info */ si = ub_get_sys_info(); @@ -444,7 +445,7 @@ /* Fixup memory regions */ fixup_memory(si); - fdt_fixup_applied = 1; + fdt_setprop(fdtp, chosen, "fixup-applied", NULL, 0); return (CMD_OK); } @@ -462,6 +463,11 @@ } /* + * Check if uboot env vars were parsed already. If not, do it now. + */ + fdt_fixup(); + + /* * Validate fdt . */ cmd = strdup(argv[1]); @@ -483,11 +489,6 @@ if (!fdtp) if (fdt_setup_fdtp()) return (CMD_ERROR); - /* - * Check if uboot env vars were parsed already. If not, do it now. - */ - if (!fdt_fixup_applied) - fdt_fixup(); /* * Call command handler. From owner-p4-projects@FreeBSD.ORG Wed Feb 3 20:09:33 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C33431065670; Wed, 3 Feb 2010 20:09:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87F231065693 for ; Wed, 3 Feb 2010 20:09:33 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5E88B8FC18 for ; Wed, 3 Feb 2010 20:09:33 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13K9XBl005547 for ; Wed, 3 Feb 2010 20:09:33 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13K9X7G005545 for perforce@freebsd.org; Wed, 3 Feb 2010 20:09:33 GMT (envelope-from raj@freebsd.org) Date: Wed, 3 Feb 2010 20:09:33 GMT Message-Id: <201002032009.o13K9X7G005545@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174257 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:09:34 -0000 http://p4web.freebsd.org/chv.cgi?CH=174257 Change 174257 by raj@raj_fdt on 2010/02/03 20:08:44 Adjust DB-88F6281 DTS file. - Fix IRQ numbers used by the GPIO controller. - Provide 'reg-shift' for the UART node. - Improve 'model' value for the board (add manufacturer prefix). - Put PIC and timer as the first nodes to initialize. - Other minor cosmetics. Affected files ... .. //depot/projects/fdt/sys/boot/fdt/dts/db88f6281.dts#3 edit Differences ... ==== //depot/projects/fdt/sys/boot/fdt/dts/db88f6281.dts#3 (text+ko) ==== @@ -1,6 +1,4 @@ /* - * Marvell Kirkwood DB-88F6281 Device Tree Source. - * * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * @@ -27,12 +25,17 @@ * 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. + * + * Marvell Kirkwood DB-88F6281 Device Tree Source. + * + * $FreeBSD$ + * */ /dts-v1/; / { - model = "DB-88F6281"; + model = "mrvl,DB-88F6281"; compatible = "DB-88F6281-BP", "DB-88F6281-BP-A"; #address-cells = <1>; #size-cells = <1>; @@ -118,6 +121,22 @@ ranges = <0x0 0xf1000000 0x00100000>; bus-frequency = <0>; + PIC: pic@20200 { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + reg = <0x20200 0x3c>; + compatible = "mrvl,pic"; + }; + + timer@20300 { + compatible = "mrvl,timer"; + reg = <0x20300 0x30>; + interrupts = <1>; + interrupt-parent = <&PIC>; + mrvl,has-wdt; + }; + MPP: mpp@10000 { #pin-cells = <2>; compatible = "mrvl,mpp"; @@ -153,7 +172,7 @@ compatible = "mrvl,gpio"; reg = <0x10100 0x20>; gpio-controller; - interrupts = <6 7 8 9>; + interrupts = <35 36 37 38 39 40 41>; interrupt-parent = <&PIC>; }; @@ -188,6 +207,7 @@ cell-index = <0>; compatible = "ns16550"; reg = <0x12000 0x20>; + reg-shift = <2>; clock-frequency = <0>; interrupts = <33>; interrupt-parent = <&PIC>; @@ -197,19 +217,12 @@ cell-index = <1>; compatible = "ns16550"; reg = <0x12100 0x20>; + reg-shift = <2>; clock-frequency = <0>; interrupts = <34>; interrupt-parent = <&PIC>; }; - timer@20300 { - compatible = "mrvl,timer"; - reg = <0x20300 0x30>; - interrupts = <1>; - interrupt-parent = <&PIC>; - mrvl,has-wdt; - }; - crypto@30000 { compatible = "mrvl,cesa"; reg = <0x30000 0x10000>; @@ -217,14 +230,6 @@ interrupt-parent = <&PIC>; }; - PIC: pic@20200 { - interrupt-controller; - #address-cells = <0>; - #interrupt-cells = <1>; - reg = <0x20200 0x3c>; - compatible = "mrvl,pic"; - }; - usb@50000 { compatible = "mrvl,usb-ehci", "usb-ehci"; reg = <0x50000 0x1000>; From owner-p4-projects@FreeBSD.ORG Wed Feb 3 20:14:39 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 046B91065672; Wed, 3 Feb 2010 20:14:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCB28106566C for ; Wed, 3 Feb 2010 20:14:38 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 92C198FC08 for ; Wed, 3 Feb 2010 20:14:38 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13KEcql005931 for ; Wed, 3 Feb 2010 20:14:38 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13KEcII005929 for perforce@freebsd.org; Wed, 3 Feb 2010 20:14:38 GMT (envelope-from raj@freebsd.org) Date: Wed, 3 Feb 2010 20:14:38 GMT Message-Id: <201002032014.o13KEcII005929@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174258 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:14:39 -0000 http://p4web.freebsd.org/chv.cgi?CH=174258 Change 174258 by raj@raj_fdt on 2010/02/03 20:14:21 o Set up SATA decode window based on DT blob. o [Temporarily] deactivate PM state detection; this will be fixed after some complementary code is in place. Affected files ... .. //depot/projects/fdt/sys/arm/mv/common.c#3 edit Differences ... ==== //depot/projects/fdt/sys/arm/mv/common.c#3 (text+ko) ==== @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -45,9 +46,6 @@ #include #include -#include "../../contrib/dtc/libfdt/libfdt_env.h" -#include "../../../sys/dev/fdt/fdt_common.h" - #define MAX_CPU_WIN 5 #define DEBUG @@ -93,6 +91,7 @@ u_long cesa_base = 0; u_long usb0_base = 0; u_long eth0_base = 0; +u_long sata0_base = 0; static const struct decode_win *cpu_wins = cpu_win_tbl; @@ -105,6 +104,7 @@ { "mrvl,cesa", &cesa_base }, { "mrvl,ge", ð0_base }, { "mrvl,usb-ehci", &usb0_base }, + { "mrvl,sata", &sata0_base }, { NULL, NULL }, }; @@ -112,17 +112,22 @@ pm_is_disabled(uint32_t mask) { +#if 0 return (soc_power_ctrl_get(mask) == mask ? 0 : 1); +#endif + return (1); } static __inline uint32_t obio_get_pm_mask(uint32_t base) { +#if 0 struct obio_device *od; for (od = obio_devices; od->od_name != NULL; od++) if (od->od_base == base) return (od->od_pwr_mask); +#endif return (CPU_PM_CTRL_NONE); } @@ -391,10 +396,12 @@ #undef MV_USB0_BASE #undef MV_CESA_BASE #undef MV_ETH0_BASE +#undef MV_SATAHC_BASE #define MV_USB0_BASE (MV_BASE + usb0_base) #define MV_CESA_BASE (MV_BASE + cesa_base) #define MV_ETH0_BASE (MV_BASE + eth0_base) +#define MV_SATAHC_BASE (MV_BASE + sata0_base) /************************************************************************** * Decode windows registers accessors From owner-p4-projects@FreeBSD.ORG Wed Feb 3 20:18:43 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 40EFC1065679; Wed, 3 Feb 2010 20:18:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 051331065676 for ; Wed, 3 Feb 2010 20:18:43 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E8A0B8FC0A for ; Wed, 3 Feb 2010 20:18:42 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13KIgvn006258 for ; Wed, 3 Feb 2010 20:18:42 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13KIgg3006256 for perforce@freebsd.org; Wed, 3 Feb 2010 20:18:42 GMT (envelope-from raj@freebsd.org) Date: Wed, 3 Feb 2010 20:18:42 GMT Message-Id: <201002032018.o13KIgg3006256@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174260 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:18:43 -0000 http://p4web.freebsd.org/chv.cgi?CH=174260 Change 174260 by raj@raj_fdt on 2010/02/03 20:18:02 Make FDT uart(4) attachment system wide. Affected files ... .. //depot/projects/fdt/sys/conf/files#11 edit .. //depot/projects/fdt/sys/conf/files.powerpc#16 edit Differences ... ==== //depot/projects/fdt/sys/conf/files#11 (text+ko) ==== @@ -1611,6 +1611,7 @@ dev/uart/uart_bus_acpi.c optional uart acpi #dev/uart/uart_bus_cbus.c optional uart cbus dev/uart/uart_bus_ebus.c optional uart ebus +dev/uart/uart_bus_fdt.c optional uart fdt dev/uart/uart_bus_isa.c optional uart isa dev/uart/uart_bus_pccard.c optional uart pccard dev/uart/uart_bus_pci.c optional uart pci ==== //depot/projects/fdt/sys/conf/files.powerpc#16 (text+ko) ==== @@ -61,7 +61,6 @@ dev/syscons/scvtb.c optional sc dev/tsec/if_tsec.c optional tsec dev/tsec/if_tsec_fdt.c optional tsec fdt -dev/uart/uart_bus_fdt.c optional uart fdt dev/uart/uart_cpu_powerpc.c optional uart kern/syscalls.c optional ktr libkern/ashldi3.c standard From owner-p4-projects@FreeBSD.ORG Wed Feb 3 20:21:46 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6DF041065672; Wed, 3 Feb 2010 20:21:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3291F106566C for ; Wed, 3 Feb 2010 20:21:46 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 21FCF8FC15 for ; Wed, 3 Feb 2010 20:21:46 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13KLkPk006522 for ; Wed, 3 Feb 2010 20:21:46 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13KLkPO006520 for perforce@freebsd.org; Wed, 3 Feb 2010 20:21:46 GMT (envelope-from raj@freebsd.org) Date: Wed, 3 Feb 2010 20:21:46 GMT Message-Id: <201002032021.o13KLkPO006520@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174261 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:21:46 -0000 http://p4web.freebsd.org/chv.cgi?CH=174261 Change 174261 by raj@raj_fdt on 2010/02/03 20:20:54 Bring more endian-safety for FDT uart(4) attachment. Affected files ... .. //depot/projects/fdt/sys/dev/uart/uart_bus_fdt.c#5 edit Differences ... ==== //depot/projects/fdt/sys/dev/uart/uart_bus_fdt.c#5 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 The FreeBSD Foundation + * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * * This software was developed by Semihalf under sponsorship from @@ -35,11 +35,15 @@ #include #include +#include + #include #include #include #include +#include "../../contrib/dtc/libfdt/libfdt_env.h" + static int uart_fdt_probe(device_t); static device_method_t uart_fdt_methods[] = { @@ -81,8 +85,11 @@ sizeof(clock))) <= 0) clock = 0; + clock = fdt32_to_cpu(clock); + if ((OF_getprop(node, "reg-shift", &shift, sizeof(shift))) <= 0) shift = 0; + shift = fdt32_to_cpu(shift); return (uart_bus_probe(dev, (int)shift, (int)clock, 0, 0)); } From owner-p4-projects@FreeBSD.ORG Wed Feb 3 20:24:42 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 14F5E1065694; Wed, 3 Feb 2010 20:24:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCE441065676; Wed, 3 Feb 2010 20:24:41 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id A42598FC12; Wed, 3 Feb 2010 20:24:41 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id C89E1582A6; Wed, 3 Feb 2010 14:24:40 -0600 (CST) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id moVoTrIgyPPY; Wed, 3 Feb 2010 14:24:40 -0600 (CST) Received: from wanderer.tachypleus.net (i3-dhcp-172-16-55-200.icecube.wisc.edu [172.16.55.200]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 92EB858267; Wed, 3 Feb 2010 14:24:40 -0600 (CST) Message-ID: <4B69DB88.2050502@freebsd.org> Date: Wed, 03 Feb 2010 14:24:40 -0600 From: Nathan Whitehorn User-Agent: Thunderbird 2.0.0.23 (X11/20091207) MIME-Version: 1.0 To: Rafal Jaworowski References: <201002032021.o13KLkPO006520@repoman.freebsd.org> In-Reply-To: <201002032021.o13KLkPO006520@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Perforce Change Reviews Subject: Re: PERFORCE change 174261 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:24:42 -0000 Rafal Jaworowski wrote: > http://p4web.freebsd.org/chv.cgi?CH=174261 > > Change 174261 by raj@raj_fdt on 2010/02/03 20:20:54 > > Bring more endian-safety for FDT uart(4) attachment. > > Affected files ... > > .. //depot/projects/fdt/sys/dev/uart/uart_bus_fdt.c#5 edit > > Differences ... > > ==== //depot/projects/fdt/sys/dev/uart/uart_bus_fdt.c#5 (text+ko) ==== > > @@ -1,5 +1,5 @@ > /*- > - * Copyright (c) 2009 The FreeBSD Foundation > + * Copyright (c) 2009-2010 The FreeBSD Foundation > * All rights reserved. > * > * This software was developed by Semihalf under sponsorship from > @@ -35,11 +35,15 @@ > #include > #include > > +#include > + > #include > #include > #include > #include > > +#include "../../contrib/dtc/libfdt/libfdt_env.h" > + > static int uart_fdt_probe(device_t); > > static device_method_t uart_fdt_methods[] = { > @@ -81,8 +85,11 @@ > sizeof(clock))) <= 0) > clock = 0; > > + clock = fdt32_to_cpu(clock); > + Can't you just use ntoh*? As far as I know, FDT (and Open Firmware) are defined to always use network byte order. -Nathan From owner-p4-projects@FreeBSD.ORG Wed Feb 3 20:31:57 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1A9F31065679; Wed, 3 Feb 2010 20:31:57 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2CAE1065672 for ; Wed, 3 Feb 2010 20:31:56 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C13498FC24 for ; Wed, 3 Feb 2010 20:31:56 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13KVuql007277 for ; Wed, 3 Feb 2010 20:31:56 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13KVuuk007275 for perforce@freebsd.org; Wed, 3 Feb 2010 20:31:56 GMT (envelope-from raj@freebsd.org) Date: Wed, 3 Feb 2010 20:31:56 GMT Message-Id: <201002032031.o13KVuuk007275@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174262 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:31:57 -0000 http://p4web.freebsd.org/chv.cgi?CH=174262 Change 174262 by raj@raj_fdt on 2010/02/03 20:31:34 Optimize {fdt,simple}bus framework. - Rework simplebus fixups processing: we are now handler list oriented, with individual handlers (platfrom-specific) in dedicated files, only used when needed. - Eliminate an ugly MPC85XX hack for base address of direct '/' descendants (like localbus and pci nodes). - Give more generic name to internal registers range: IMMR (Internal Mem-Mapped Registers). Affected files ... .. //depot/projects/fdt/sys/arm/include/fdt.h#2 edit .. //depot/projects/fdt/sys/arm/mv/mv_machdep.c#6 edit .. //depot/projects/fdt/sys/dev/fdt/fdt_common.c#9 edit .. //depot/projects/fdt/sys/dev/fdt/fdt_common.h#5 edit .. //depot/projects/fdt/sys/dev/fdt/fdt_powerpc.c#2 edit .. //depot/projects/fdt/sys/dev/fdt/fdtbus.c#5 edit .. //depot/projects/fdt/sys/dev/fdt/simplebus.c#6 edit .. //depot/projects/fdt/sys/dev/uart/uart_cpu_powerpc.c#5 edit .. //depot/projects/fdt/sys/powerpc/include/fdt.h#2 edit Differences ... ==== //depot/projects/fdt/sys/arm/include/fdt.h#2 (text+ko) ==== @@ -37,17 +37,17 @@ #include /* - * This is the base virtual address the simple-bus internal registers range is - * available at. + * This is the base virtual address the internal mem-mapped registers (IMMR) + * range is available at. */ -#define FDT_SIMPLEBUS_VA MV_BASE +#define FDT_IMMR_VA MV_BASE /* Max interrupt number */ -#define FDT_INTR_MAX NIRQ +#define FDT_INTR_MAX NIRQ /* * Bus space tag. XXX endianess info needs to be derived from the blob. */ -#define fdtbus_bs_tag obio_tag +#define fdtbus_bs_tag obio_tag #endif /* _MACHINE_FDT_H_ */ ==== //depot/projects/fdt/sys/arm/mv/mv_machdep.c#6 (text+ko) ==== @@ -63,13 +63,12 @@ #include #include #include -#include #include #include +#include #include #include -#include "../../contrib/dtc/libfdt/libfdt_env.h" #include #include @@ -724,7 +723,7 @@ &start, &size); if (rv != 0) return (rv); - start += FDT_SIMPLEBUS_VA; + start += FDT_IMMR_VA; /* * Process 'pin-max' and 'pin-map' props. ==== //depot/projects/fdt/sys/dev/fdt/fdt_common.c#9 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 The FreeBSD Foundation + * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * * This software was developed by Semihalf under sponsorship from @@ -38,15 +38,13 @@ #include +#include #include #include #include #include "ofw_bus_if.h" -#include "fdt_common.h" -#include "../../contrib/dtc/libfdt/libfdt_env.h" - #define DEBUG #undef DEBUG @@ -315,6 +313,7 @@ reg += addr_cells + size_cells; /* Calculate address range relative to base. */ + start &= 0x000ffffful; start = base + start; end = start + count - 1; ==== //depot/projects/fdt/sys/dev/fdt/fdt_common.h#5 (text+ko) ==== @@ -27,9 +27,10 @@ * SUCH DAMAGE. */ -#ifndef FDT_COMMON_H -#define FDT_COMMON_H +#ifndef _FDT_COMMON_H_ +#define _FDT_COMMON_H_ +#include "../../contrib/dtc/libfdt/libfdt_env.h" #include #define DI_MAX_INTR_NUM 8 @@ -40,8 +41,14 @@ }; typedef int (*fdt_pic_decode_t)(phandle_t, pcell_t *, int *, int *, int *); +extern fdt_pic_decode_t fdt_pic_table[]; -extern fdt_pic_decode_t fdt_pic_table[]; +typedef void (*fdt_fixup_t)(phandle_t); +struct fdt_fixup_entry { + char *model; + fdt_fixup_t handler; +}; +extern struct fdt_fixup_entry fdt_fixup_table[]; int fdt_addrsize_cells(phandle_t, int *, int *); u_long fdt_data_get(void *, int); @@ -55,4 +62,4 @@ int fdt_is_enabled(phandle_t); phandle_t fdt_find_compatible(phandle_t start, const char *compat); -#endif /* FDT_COMMON_H */ +#endif /* _FDT_COMMON_H_ */ ==== //depot/projects/fdt/sys/dev/fdt/fdt_powerpc.c#2 (text+ko) ==== @@ -45,6 +45,35 @@ #include "ofw_bus_if.h" #include "fdt_common.h" +static void +fdt_fixup_busfreq(phandle_t node) +{ + phandle_t cpus, child; + pcell_t freq; + + /* + * This fixup uses /cpus/ bus-frequency prop value to set simple-bus + * bus-frequency property. + */ + if ((cpus = OF_finddevice("/cpus")) == 0) + panic("simplebus: no /cpus node"); + + if ((child = OF_child(cpus)) == 0) + return; + + if (OF_getprop(child, "bus-frequency", (void *)&freq, + sizeof(freq)) <= 0) + return; + + OF_setprop(node, "bus-frequency", (void *)&freq, sizeof(freq)); +} + +struct fdt_fixup_entry fdt_fixup_table[] = { + { "fsl,MPC8572DS", &fdt_fixup_busfreq}, + { "MPC8555CDS", &fdt_fixup_busfreq }, + { NULL, NULL } +}; + static int fdt_pic_decode_iic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, int *pol) ==== //depot/projects/fdt/sys/dev/fdt/fdtbus.c#5 (text+ko) ==== @@ -30,7 +30,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_platform.h" #include #include #include @@ -260,7 +259,6 @@ static device_t newbus_device_from_fdt_node(device_t parent, phandle_t node) { - u_long base; device_t child; struct fdtbus_devinfo *di; char *name, *type, *compat; @@ -286,17 +284,8 @@ di->di_compat = compat; resource_list_init(&di->di_res); -#ifdef MPC85XX - /* - * XXX this 0x1ef00000 offset is a gross hack, which assumes: - * - physical addresses in the DTS are 0xe0000000 range, and - * - virtual CCSR base in kernel is 0xfef00000 - */ - base = 0x1ef00000; -#else - base = 0; -#endif - if (fdt_reg_to_rl(node, &di->di_res, base)) { + + if (fdt_reg_to_rl(node, &di->di_res, FDT_IMMR_VA)) { device_printf(child, "could not process 'reg' " "property\n"); newbus_device_destroy(child); ==== //depot/projects/fdt/sys/dev/fdt/simplebus.c#6 (text+ko) ==== @@ -148,7 +148,7 @@ device_set_desc(dev, "Flattened device tree simple bus"); sc = device_get_softc(dev); - sc->sc_start_va = FDT_SIMPLEBUS_VA; + sc->sc_start_va = FDT_IMMR_VA; return (BUS_PROBE_DEFAULT); } @@ -156,34 +156,28 @@ static void simplebus_fixup(phandle_t node) { - phandle_t cpus, child, root; + phandle_t root; char *model; - pcell_t freq; - int len; + int i, len; - /* Fixup handling is platform specific. */ if ((root = OF_finddevice("/")) == 0) panic("simplebus: no root node"); + len = OF_getprop_alloc(root, "model", 1, (void **)&model); if (len <= 0) return; - /* XXX this should be a table with {model->fixup_handler} */ - if (!(strcmp(model, "fsl,MPC8572DS") == 0 || - strcmp(model, "MPC8555CDS") == 0)) - goto out; - if ((cpus = OF_finddevice("/cpus")) == 0) - panic("simplebus: no /cpus node"); + for (i = 0; fdt_fixup_table[i].model != NULL; i++) { + if (strcmp(model, fdt_fixup_table[i].model) != 0) + continue; - if ((child = OF_child(cpus)) == 0) - return; - - if (OF_getprop(child, "bus-frequency", (void *)&freq, - sizeof(freq)) <= 0) - return; - - OF_setprop(node, "bus-frequency", (void *)&freq, sizeof(freq)); -out: + if (fdt_fixup_table[i].handler != NULL) { + if (bootverbose) + printf("simplebus: using fixup for '%s'\n", + model); + (*fdt_fixup_table[i].handler)(node); + } + } free(model, M_OFWPROP); } ==== //depot/projects/fdt/sys/dev/uart/uart_cpu_powerpc.c#5 (text) ==== @@ -63,7 +63,7 @@ int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { -#ifdef MPC85XX +#ifdef FDT return ((b1->bsh == b2->bsh) ? 1 : 0); #else return ((pmap_kextract(b1->bsh) == pmap_kextract(b2->bsh)) ? 1 : 0); @@ -140,7 +140,7 @@ rv = fdt_data_to_res(prop, par_addr_cells, par_size_cells, &start, &size); - start += FDT_SIMPLEBUS_VA; + start += FDT_IMMR_VA; rv = bus_space_map(*tag, start, size, 0, handle); if (rv) ==== //depot/projects/fdt/sys/powerpc/include/fdt.h#2 (text+ko) ==== @@ -36,17 +36,17 @@ #include /* - * This is the base virtual address the simple-bus internal registers range is - * available at. + * This is the base virtual address the internal mem-mapped registers (IMMR) + * range is available at. */ -#define FDT_SIMPLEBUS_VA CCSRBAR_VA +#define FDT_IMMR_VA CCSRBAR_VA /* Max interrupt number */ -#define FDT_INTR_MAX INTR_VECTORS +#define FDT_INTR_MAX INTR_VECTORS /* * Bus space tag. XXX endianess info needs to be derived from the blob. */ -#define fdtbus_bs_tag (&bs_be_tag) +#define fdtbus_bs_tag (&bs_be_tag) #endif /* _MACHINE_FDT_H_ */ From owner-p4-projects@FreeBSD.ORG Wed Feb 3 20:36:01 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E68AB1065679; Wed, 3 Feb 2010 20:36:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB2E6106566C for ; Wed, 3 Feb 2010 20:36:00 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9A88E8FC0C for ; Wed, 3 Feb 2010 20:36:00 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Ka0eW007707 for ; Wed, 3 Feb 2010 20:36:00 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13Ka061007705 for perforce@freebsd.org; Wed, 3 Feb 2010 20:36:00 GMT (envelope-from raj@freebsd.org) Date: Wed, 3 Feb 2010 20:36:00 GMT Message-Id: <201002032036.o13Ka061007705@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174263 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:36:01 -0000 http://p4web.freebsd.org/chv.cgi?CH=174263 Change 174263 by raj@raj_fdt on 2010/02/03 20:35:24 Introduce 'bus-frequency' fixup. Affected files ... .. //depot/projects/fdt/sys/dev/fdt/fdt_arm.c#3 edit Differences ... ==== //depot/projects/fdt/sys/dev/fdt/fdt_arm.c#3 (text+ko) ==== @@ -38,14 +38,32 @@ #include +#include #include #include #include +#include + #include "ofw_bus_if.h" -#include "fdt_common.h" + +static void +fdt_fixup_busfreq(phandle_t node) +{ + pcell_t freq; + + /* + * This fixup sets the simple-bus bus-frequency property. + */ + freq = cpu_to_fdt32(get_tclk()); + OF_setprop(node, "bus-frequency", (void *)&freq, sizeof(freq)); +} + +struct fdt_fixup_entry fdt_fixup_table[] = { + { "mrvl,DB-88F6281", &fdt_fixup_busfreq }, + { NULL, NULL } +}; -#include "../../contrib/dtc/libfdt/libfdt_env.h" static int fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, From owner-p4-projects@FreeBSD.ORG Wed Feb 3 20:39:04 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4D652106568B; Wed, 3 Feb 2010 20:39:04 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11DE11065676 for ; Wed, 3 Feb 2010 20:39:04 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0120B8FC20 for ; Wed, 3 Feb 2010 20:39:04 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Kd3No007886 for ; Wed, 3 Feb 2010 20:39:03 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13Kd3Rq007884 for perforce@freebsd.org; Wed, 3 Feb 2010 20:39:03 GMT (envelope-from raj@freebsd.org) Date: Wed, 3 Feb 2010 20:39:03 GMT Message-Id: <201002032039.o13Kd3Rq007884@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174265 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:39:04 -0000 http://p4web.freebsd.org/chv.cgi?CH=174265 Change 174265 by raj@raj_fdt on 2010/02/03 20:38:19 Convert GPIO attachment to FDT/simplebus convention. This driver needs more work to fully work in the new environemt, as GPIO resources description in DTS and handling is a bit cumbersome. Affected files ... .. //depot/projects/fdt/sys/arm/mv/gpio.c#2 edit Differences ... ==== //depot/projects/fdt/sys/arm/mv/gpio.c#2 (text+ko) ==== @@ -46,6 +46,9 @@ #include #include +#include +#include + #include #include @@ -100,12 +103,15 @@ static devclass_t mv_gpio_devclass; -DRIVER_MODULE(gpio, mbus, mv_gpio_driver, mv_gpio_devclass, 0, 0); +DRIVER_MODULE(gpio, simplebus, mv_gpio_driver, mv_gpio_devclass, 0, 0); static int mv_gpio_probe(device_t dev) { + if (!ofw_bus_is_compatible(dev, "mrvl,gpio")) + return (ENXIO); + device_set_desc(dev, "Marvell Integrated GPIO Controller"); return (0); } From owner-p4-projects@FreeBSD.ORG Wed Feb 3 20:39:05 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0A4C7106575B; Wed, 3 Feb 2010 20:39:04 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32F4B106566B for ; Wed, 3 Feb 2010 20:39:04 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 227148FC21 for ; Wed, 3 Feb 2010 20:39:04 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Kd4hv007891 for ; Wed, 3 Feb 2010 20:39:04 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13Kd4Kr007889 for perforce@freebsd.org; Wed, 3 Feb 2010 20:39:04 GMT (envelope-from raj@freebsd.org) Date: Wed, 3 Feb 2010 20:39:04 GMT Message-Id: <201002032039.o13Kd4Kr007889@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174266 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:39:05 -0000 http://p4web.freebsd.org/chv.cgi?CH=174266 Change 174266 by raj@raj_fdt on 2010/02/03 20:39:00 Convert Marvell PIC to FDT/simplebus convention. Affected files ... .. //depot/projects/fdt/sys/arm/mv/ic.c#2 edit Differences ... ==== //depot/projects/fdt/sys/arm/mv/ic.c#2 (text+ko) ==== @@ -40,6 +40,9 @@ #include #include +#include +#include + #include #include @@ -76,6 +79,9 @@ mv_ic_probe(device_t dev) { + if (!ofw_bus_is_compatible(dev, "mrvl,pic")) + return (ENXIO); + device_set_desc(dev, "Marvell Integrated Interrupt Controller"); return (0); } @@ -134,7 +140,7 @@ static devclass_t mv_ic_devclass; -DRIVER_MODULE(ic, mbus, mv_ic_driver, mv_ic_devclass, 0, 0); +DRIVER_MODULE(ic, simplebus, mv_ic_driver, mv_ic_devclass, 0, 0); int arm_get_next_irq(int last __unused) From owner-p4-projects@FreeBSD.ORG Wed Feb 3 20:40:05 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9379E106568B; Wed, 3 Feb 2010 20:40:05 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 598B91065672 for ; Wed, 3 Feb 2010 20:40:05 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 48D3E8FC1B for ; Wed, 3 Feb 2010 20:40:05 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Ke5xe007988 for ; Wed, 3 Feb 2010 20:40:05 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13Ke5IR007986 for perforce@freebsd.org; Wed, 3 Feb 2010 20:40:05 GMT (envelope-from raj@freebsd.org) Date: Wed, 3 Feb 2010 20:40:05 GMT Message-Id: <201002032040.o13Ke5IR007986@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174267 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:40:05 -0000 http://p4web.freebsd.org/chv.cgi?CH=174267 Change 174267 by raj@raj_fdt on 2010/02/03 20:39:57 Convert Marvell CPU timer driver to FDT/simplebus convention. Affected files ... .. //depot/projects/fdt/sys/arm/mv/timer.c#2 edit Differences ... ==== //depot/projects/fdt/sys/arm/mv/timer.c#2 (text+ko) ==== @@ -48,6 +48,9 @@ #include #include +#include +#include + #define MV_TIMER_TICK (get_tclk() / hz) #define INITIAL_TIMECOUNTER (0xffffffff) #define MAX_WATCHDOG_TICKS (0xffffffff) @@ -97,6 +100,9 @@ mv_timer_probe(device_t dev) { + if (!ofw_bus_is_compatible(dev, "mrvl,timer")) + return (ENXIO); + device_set_desc(dev, "Marvell CPU Timer"); return (0); } @@ -171,7 +177,7 @@ static devclass_t mv_timer_devclass; -DRIVER_MODULE(timer, mbus, mv_timer_driver, mv_timer_devclass, 0, 0); +DRIVER_MODULE(timer, simplebus, mv_timer_driver, mv_timer_devclass, 0, 0); static unsigned mv_timer_get_timecount(struct timecounter *tc) From owner-p4-projects@FreeBSD.ORG Wed Feb 3 20:44:10 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0B34A1065694; Wed, 3 Feb 2010 20:44:10 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA9641065670 for ; Wed, 3 Feb 2010 20:44:09 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 916558FC1D for ; Wed, 3 Feb 2010 20:44:09 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Ki9Nk008285 for ; Wed, 3 Feb 2010 20:44:09 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13Ki9V2008283 for perforce@freebsd.org; Wed, 3 Feb 2010 20:44:09 GMT (envelope-from raj@freebsd.org) Date: Wed, 3 Feb 2010 20:44:09 GMT Message-Id: <201002032044.o13Ki9V2008283@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174268 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:44:10 -0000 http://p4web.freebsd.org/chv.cgi?CH=174268 Change 174268 by raj@raj_fdt on 2010/02/03 20:43:48 Say good bye to unused entities.. We are now working almost entirely off of FDT on Marvell ARM! Actually, this is for the 88F6281 for now, but other variations are mostly only a matter of a proper DTS config file. Affected files ... .. //depot/projects/fdt/sys/arm/mv/files.mv#3 edit .. //depot/projects/fdt/sys/arm/mv/kirkwood/kirkwood.c#7 edit .. //depot/projects/fdt/sys/arm/mv/mvvar.h#4 edit .. //depot/projects/fdt/sys/arm/mv/obio.c#2 delete .. //depot/projects/fdt/sys/dev/uart/uart_bus_mbus.c#2 delete Differences ... ==== //depot/projects/fdt/sys/arm/mv/files.mv#3 (text+ko) ==== @@ -25,12 +25,10 @@ arm/mv/mv_machdep.c standard arm/mv/mv_pci.c optional pci arm/mv/mv_sata.c optional ata | atamvsata -arm/mv/obio.c standard arm/mv/timer.c standard arm/mv/twsi.c optional iicbus dev/mge/if_mge.c optional mge -dev/uart/uart_bus_mbus.c optional uart dev/uart/uart_cpu_mv.c optional uart dev/uart/uart_dev_ns8250.c optional uart dev/usb/controller/ehci_mv.c optional ehci ==== //depot/projects/fdt/sys/arm/mv/kirkwood/kirkwood.c#7 (text+ko) ==== @@ -42,46 +42,6 @@ #include #include -struct obio_device obio_devices[] = { - { "ic", MV_IC_BASE, MV_IC_SIZE, - { -1 }, - { -1 }, - CPU_PM_CTRL_NONE - }, - { "timer", MV_TIMERS_BASE, MV_TIMERS_SIZE, - { MV_INT_BRIDGE, -1 }, - { -1 }, - CPU_PM_CTRL_NONE - }, - { "gpio", MV_GPIO_BASE, MV_GPIO_SIZE, - { MV_INT_GPIO7_0, MV_INT_GPIO15_8, - MV_INT_GPIO23_16, MV_INT_GPIO31_24, - MV_INT_GPIOHI7_0, MV_INT_GPIOHI15_8, - MV_INT_GPIOHI23_16, -1 }, - { -1 }, - CPU_PM_CTRL_NONE - }, - { "uart", MV_UART0_BASE, MV_UART_SIZE, - { MV_INT_UART0, -1 }, - { -1 }, - CPU_PM_CTRL_NONE - }, - { "uart", MV_UART1_BASE, MV_UART_SIZE, - { MV_INT_UART1, -1 }, - { -1 }, - CPU_PM_CTRL_NONE - }, - { "xor", MV_XOR_BASE, MV_XOR_SIZE, - { MV_INT_XOR0_CHAN0, MV_INT_XOR0_CHAN1, - MV_INT_XOR1_CHAN0, MV_INT_XOR1_CHAN1, - MV_INT_XOR0_ERR, MV_INT_XOR1_ERR, - -1 }, - { -1 }, - CPU_PM_CTRL_XOR0 | CPU_PM_CTRL_XOR1 - }, - { NULL, 0, 0, { 0 }, { 0 }, 0 } -}; - const struct obio_pci mv_pci_info[] = { { MV_TYPE_PCIE, MV_PCIE_BASE, MV_PCIE_SIZE, ==== //depot/projects/fdt/sys/arm/mv/mvvar.h#4 (text+ko) ==== @@ -57,16 +57,6 @@ struct rman obio_gpio; }; -struct obio_device { - const char *od_name; - u_long od_base; - u_long od_size; - u_int od_irqs[7 + 1]; /* keep additional entry for -1 sentinel */ - u_int od_gpio[2 + 1]; /* as above for IRQ */ - u_int od_pwr_mask; - struct resource_list od_resources; -}; - struct obio_pci_irq_map { int opim_slot; int opim_pin; @@ -112,7 +102,6 @@ extern const struct obio_pci mv_pci_info[]; extern const struct gpio_config mv_gpio_config[]; extern bus_space_tag_t obio_tag; -extern struct obio_device obio_devices[]; extern const struct decode_win *idma_wins; extern const struct decode_win *xor_wins; extern int idma_wins_no; From owner-p4-projects@FreeBSD.ORG Wed Feb 3 20:47:54 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 853CA1065693; Wed, 3 Feb 2010 20:47:54 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 490FC1065672; Wed, 3 Feb 2010 20:47:54 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id E8A918FC08; Wed, 3 Feb 2010 20:47:53 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id 037FFC42D2; Wed, 3 Feb 2010 21:49:21 +0100 (CET) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id C3ipFWs+RXSp; Wed, 3 Feb 2010 21:49:20 +0100 (CET) Received: from [192.168.133.14] (nat2-102.ghnet.pl [91.150.223.102]) by smtp.semihalf.com (Postfix) with ESMTPSA id 48037C41E7; Wed, 3 Feb 2010 21:49:20 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Rafal Jaworowski In-Reply-To: <4B69DB88.2050502@freebsd.org> Date: Wed, 3 Feb 2010 21:47:50 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <95088A21-2657-424D-AD80-725F05F26AAB@semihalf.com> References: <201002032021.o13KLkPO006520@repoman.freebsd.org> <4B69DB88.2050502@freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1077) Cc: Perforce Change Reviews Subject: Re: PERFORCE change 174261 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:47:54 -0000 On 2010-02-03, at 21:24, Nathan Whitehorn wrote: > Rafal Jaworowski wrote: >> http://p4web.freebsd.org/chv.cgi?CH=3D174261 >>=20 >> Change 174261 by raj@raj_fdt on 2010/02/03 20:20:54 >>=20 >> Bring more endian-safety for FDT uart(4) attachment. >>=20 >> Affected files ... >>=20 >> .. //depot/projects/fdt/sys/dev/uart/uart_bus_fdt.c#5 edit >>=20 >> Differences ... >>=20 >> =3D=3D=3D=3D //depot/projects/fdt/sys/dev/uart/uart_bus_fdt.c#5 = (text+ko) =3D=3D=3D=3D >>=20 >> @@ -1,5 +1,5 @@ >> /*- >> - * Copyright (c) 2009 The FreeBSD Foundation >> + * Copyright (c) 2009-2010 The FreeBSD Foundation >> * All rights reserved. >> * >> * This software was developed by Semihalf under sponsorship from >> @@ -35,11 +35,15 @@ >> #include >> #include >> +#include >> + >> #include >> #include >> #include >> #include >> +#include "../../contrib/dtc/libfdt/libfdt_env.h" >> + >> static int uart_fdt_probe(device_t); >> static device_method_t uart_fdt_methods[] =3D { >> @@ -81,8 +85,11 @@ >> sizeof(clock))) <=3D 0) >> clock =3D 0; >> + clock =3D fdt32_to_cpu(clock); >> + > Can't you just use ntoh*? As far as I know, FDT (and Open Firmware) = are defined to always use network byte order. Techinically yes, although the fdt* accessors are native for libfdt, so = I'd rather stay with uniform behaviour. Also, they are explict in name = while noth* could be a bit confusing, I think, for people not intimate = with FDT internals. Rafal From owner-p4-projects@FreeBSD.ORG Wed Feb 3 21:00:26 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 51C101065672; Wed, 3 Feb 2010 21:00:26 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1DC2106566C for ; Wed, 3 Feb 2010 21:00:25 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DF65D8FC13 for ; Wed, 3 Feb 2010 21:00:25 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13L0Ptr019871 for ; Wed, 3 Feb 2010 21:00:25 GMT (envelope-from rene@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13L0P4R019869 for perforce@freebsd.org; Wed, 3 Feb 2010 21:00:25 GMT (envelope-from rene@FreeBSD.org) Date: Wed, 3 Feb 2010 21:00:25 GMT Message-Id: <201002032100.o13L0P4R019869@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rene@FreeBSD.org using -f From: Rene Ladan To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174269 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 21:00:26 -0000 http://p4web.freebsd.org/chv.cgi?CH=174269 Change 174269 by rene@rene_self on 2010/02/03 21:00:16 IFC Affected files ... .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/virtualization/chapter.sgml#8 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/captions/2007/meetbsd/brueffer-torprvacy.sbv#2 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/captions/2007/nycbsdcon/dixon-bsdisdying.sbv#2 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/captions/2009/asiabsdcon/allman-internetmail.sbv#2 integrate .. //depot/projects/docproj_nl/nl_NL.ISO8859-1/books/handbook/l10n/chapter.sgml#15 integrate .. //depot/projects/docproj_nl/share/pgpkeys/rpaulo.key#2 integrate .. //depot/projects/docproj_nl/www/en/donations/donors.sgml#24 integrate .. //depot/projects/docproj_nl/www/share/sgml/news.xml#65 integrate Differences ... ==== //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/virtualization/chapter.sgml#8 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -989,10 +989,10 @@ Installing &virtualbox; &virtualbox; is available as a &os; port - in emulators/virtualbox, and + in emulators/virtualbox-ose, and may be installed using the following commands: - &prompt.root; cd /usr/ports/emulators/virtualbox + &prompt.root; cd /usr/ports/emulators/virtualbox-ose &prompt.root; make install clean One useful option in the configuration dialog is the @@ -1017,9 +1017,14 @@ vboxdrv_load="YES" - &virtualbox; also requires the - proc file system to be - mounted: + Versions of &virtualbox; prior to 3.1.2 + require the proc file system + to be mounted. This is not needed in recent versions, which utilize + the functions provided by the &man.sysctl.3; library. + + When using an older version of the port, follow the instructions + below to make sure proc is + mounted properly: &prompt.root; mount -t procfs proc /proc ==== //depot/projects/docproj_nl/en_US.ISO8859-1/captions/2007/meetbsd/brueffer-torprvacy.sbv#2 (text+ko) ==== @@ -1,6 +1,6 @@ 0:00:09.649,0:00:15.249 Fortunately my slide will be centered, because -I'll have to change resolutions, I think this works out.. +I'll have to change resolutions. I think this works out... 0:00:15.249,0:00:19.310 And, it's about protecting your privacy with FreeBSD and Tor @@ -9,10 +9,10 @@ and, uh... 0:00:20.859,0:00:21.480 -Privacy +Privacy. 0:00:21.480,0:00:25.859 -what I mean here is mostly anonymity +What I mean here is mostly anonymity 0:00:25.859,0:00:28.889 but there are some other aspects that @@ -27,10 +27,10 @@ I want to first talk about who needs anonimity anyway 0:00:39.500,0:00:42.880 -is it just for criminals or some other bad guys, right? +Is it just for criminals or some other bad guys, right? 0:00:42.880,0:00:44.209 -after this +After this 0:00:44.209,0:00:50.940 anonymization concepts, then Tor. Tor's a, well, a tool @@ -52,7 +52,7 @@ when you want to be anonymous on the Web or the Internet 0:01:06.070,0:01:06.650 -and uh, +And uh, 0:01:06.650,0:01:12.280 if time permits I'd like to do a little demonstration @@ -79,16 +79,16 @@ when the military coup was going on 0:01:32.510,0:01:38.150 -and the journalists in Thailand couldn't really uh, +and the journalists in Thailand couldn't really uh 0:01:38.150,0:01:39.830 -journalists couldn't really, uh +Journalists couldn't really, uh 0:01:39.830,0:01:43.050 get the information they needed to do their work 0:01:43.050,0:01:45.750 -also, uh, informants +Also, uh, informants 0:01:45.750,0:01:49.100 whistleblowers... people who want to tell you about @@ -100,7 +100,7 @@ and don't want to lose their job for it... Dissidents 0:01:56.460,0:01:58.250 -uh, best case +Uh, best case 0:01:58.250,0:02:01.610 when in Myanmar @@ -109,19 +109,19 @@ last few weeks ago 0:02:03.750,0:02:05.290 -when the +When the 0:02:05.290,0:02:07.649 all the Buddhists monks were going to the streets and uh, 0:02:07.649,0:02:09.879 -the Internet was totally censored +the Internet was heavily censored 0:02:09.879,0:02:14.899 -it was really dangerous to do anything on the Internet +It was really dangerous to do anything on the Internet 0:02:14.899,0:02:17.719 -so, so umm +So, so umm 0:02:17.719,0:02:20.489 socialy sensitive information, like when you want to uh, @@ -140,7 +140,7 @@ as it will be very embarrassing 0:02:31.840,0:02:33.779 -also Law Enforcement, ah +Also Law Enforcement, ah 0:02:33.779,0:02:38.579 for example, uh, when you want to set up a @@ -149,7 +149,7 @@ an anonymous tipline for crime reporting 0:02:41.669,0:02:45.810 -and uh, also companies that want to, uh +And uh, also companies that want to, uh 0:02:45.810,0:02:48.079 research competition, as one case that, uh @@ -192,7 +192,7 @@ anonymization research. 0:03:24.319,0:03:26.169 -and maybe you +And maybe you 0:03:26.169,0:03:28.799 may have heard of the European Union @@ -201,7 +201,7 @@ Data Retention Directive? 0:03:30.349,0:03:33.039 -where, umm +Where, umm 0:03:33.039,0:03:35.739 collection data gets stored @@ -217,7 +217,7 @@ the law was passed in Germany 0:03:47.729,0:03:48.900 -so, uh +So, uh 0:03:48.900,0:03:50.450 from first January on, @@ -235,7 +235,7 @@ by providers for six months 0:04:00.449,0:04:02.510 -and, uh, +And, uh, 0:04:02.510,0:04:05.379 sooner or later it's going to be in Poland as well @@ -244,16 +244,16 @@ [talking] 0:04:07.689,0:04:14.689 -well, you're part of the Euro Union now, so ah, welcome! +Well, you're part of the Euro Union now, so ah, welcome! 0:04:16.989,0:04:18.529 -okay, uh +Okay, uh 0:04:18.529,0:04:21.220 that's a 0:04:21.220,0:04:27.110 -maybe you want to hide what interests you have and uh, +Maybe you want to hide what interests you have and uh, who you talk to, I mean uh, 0:04:27.110,0:04:30.889 @@ -267,15 +267,15 @@ if they bother to find out 0:04:37.780,0:04:40.709 -yeah, and also +Yeah, and also 0:04:40.709,0:04:46.279 -criminals, but um, they already do illegal stuff and they +criminals, but they already do illegal stuff and they don't care about 0:04:46.279,0:04:51.629 doing more illegal stuff to stay anonymous, right? They can -uh, steal people's identities, they can rent botnets or +steal people's identities, they can rent botnets or create them in the first place 0:04:51.629,0:04:53.829 @@ -289,7 +289,7 @@ no big deal 0:04:59.689,0:05:02.029 -so, uh +So, uh 0:05:02.029,0:05:05.199 Criminals already do this and uh, @@ -322,7 +322,7 @@ stay anonymous on your own 0:05:25.930,0:05:28.999 -you needs the help of more people +you need the help of more people 0:05:28.999,0:05:30.559 and uh, @@ -339,12 +339,8 @@ 0:05:40.979,0:05:42.949 anonymization concepts -0:05:42.949,0:05:44.539 -uh huh - 0:05:44.539,0:05:51.539 Proxy? Everyone here probably knows how a proxy works, -uh yeah 0:05:52.559,0:05:53.169 LANs connect to the proxy and request @@ -355,14 +351,8 @@ 0:05:57.290,0:06:00.359 just passes it on and pass through -0:06:00.359,0:06:03.789 -right - -0:06:03.789,0:06:04.680 -um - 0:06:04.680,0:06:09.329 -Proxys are fast and simple but it's a single point of +Proxys are fast and simple but it's really a single point of failure, like uh, 0:06:09.329,0:06:13.139 @@ -379,52 +369,52 @@ break into the computer room or whatever 0:06:22.440,0:06:26.400 -it's pretty easy +It's pretty easy 0:06:26.400,0:06:30.050 -Second anonymization concept is mixed, +Second anonymization concept is MIX, 0:06:30.050,0:06:32.549 it's really old from nineteen eighty one 0:06:32.549,0:06:35.099 -so you can see, uh, +So you can see, uh, 0:06:35.099,0:06:41.150 how long the research in this area is going on 0:06:41.150,0:06:43.150 -the mix is kind of similar to a proxy +The MIX is kind of similar to a proxy 0:06:43.150,0:06:47.090 -like, trying to connect to it to send the messages +Like, trying to connect to it to send the messages 0:06:47.090,0:06:50.779 -and the mix collects them +and the MIX collects them 0:06:50.779,0:06:54.550 -and no less than um +and coalesces them 0:06:54.550,0:06:56.699 -it puts them all +Like, it puts them all 0:06:56.699,0:06:58.319 -in through different coincides and uhm, +into coming sites and uhm, 0:06:58.319,0:07:00.169 you see here it 0:07:00.169,0:07:03.849 -shuffles them and waits +shuffles them. It waits 0:07:03.849,0:07:08.930 -til there's enough data in it and just +until there's enough data in it and just 0:07:08.930,0:07:11.039 -shoves them and sends them back out so +shuffles them and sends them back out so 0:07:11.039,0:07:18.039 -um, this is to protect against correlation effects. +um, this is to protect against correlation attacks. 0:07:20.219,0:07:22.439 But second in... @@ -433,22 +423,22 @@ Oh yeah, and 0:07:23.379,0:07:27.879 -when you actually put several mixes uh +when you actually put several MIXes uh 0:07:27.879,0:07:31.259 -behind them; it's a mixed escape and uh, +behind them; it's a MIX cascade and uh, 0:07:31.259,0:07:32.149 between mixes is also 0:07:32.149,0:07:35.330 -a friction going on, uh, the first +encryption going on, uh, the first 0:07:35.330,0:07:38.349 -or the client which is +or the client which 0:07:38.349,0:07:44.069 -you could see here if this lights would be centered, uh, +you could see here if the slides would be centered, uh, 0:07:44.069,0:07:46.029 what else gets the @@ -515,10 +505,10 @@ but what's good about it it's uh 0:08:47.060,0:08:50.500 -distrinuted trust uh, +distributed trust uh, 0:08:50.500,0:08:54.940 -just one these mixes has to be secure to actually +just one these MIXes has to be secure to actually 0:08:54.940,0:08:56.840 anonymize the whole connection @@ -542,13 +532,13 @@ both these concepts 0:09:17.720,0:09:21.340 -mixes and proxies. +MIXes and proxies. 0:09:21.340,0:09:22.770 It's a TCP-Overlay network, 0:09:22.770,0:09:24.900 -means you can, uh +that means you can, uh 0:09:24.900,0:09:25.560 channel any @@ -560,29 +550,29 @@ theoretically 0:09:28.480,0:09:31.310 -uh, theoretically I will explain +Uh, theoretically I will explain 0:09:31.310,0:09:33.790 a couple of slides later 0:09:33.790,0:09:37.040 -it provides a SOCKS interface so you don't need any uh, +It provides a SOCKS interface so you don't need any uh, 0:09:37.040,0:09:42.060 special application proxies like any application that uses -SOCKS interface can just, +SOCKS interface can just 0:09:42.060,0:09:43.370 -talk to talk +talk to Tor 0:09:43.370,0:09:48.070 and it's available on, um, all major platforms 0:09:48.070,0:09:53.940 -what is uh, especially important is available in Windows +What is uh, especially important it's available in Windows 0:09:53.940,0:09:55.850 -'cause, uhm, like I said earlier once +Because, uhm, like I said earlier once 0:09:55.850,0:09:57.740 you want a really diverse, @@ -606,7 +596,7 @@ combine the positive attributes of 0:10:15.939,0:10:17.480 -proxies and mixes +proxies and MIXes 0:10:17.480,0:10:18.749 Like, proxies are fast, but @@ -615,7 +605,7 @@ seem prone to failure 0:10:20.620,0:10:21.770 -and mixes +and MIXes 0:10:21.770,0:10:24.590 distributed trust, you want to combine them @@ -624,22 +614,22 @@ so uh 0:10:29.930,0:10:31.310 -Fast, uh, Tor use not only public key +Fast, uh, Tor uses not only public key 0:10:31.310,0:10:33.220 encryption but also session keys 0:10:33.220,0:10:35.170 -symmetrically encrypted. +so it's symmetrically encrypted. 0:10:35.170,0:10:37.260 -so uh +So uh 0:10:37.260,0:10:41.710 -All the connection set up is this public key so you just, uh +all the connection set up is this public key so you just, uh 0:10:41.710,0:10:44.840 -authentication and stuff? +authentication and stuff 0:10:44.840,0:10:50.860 And uh, the actual communication that's going on later @@ -673,10 +663,10 @@ to patch his PC off the Operating System or something 0:11:12.680,0:11:16.070 -just be in a... workable state really fast +just be in a... workable state really fast. 0:11:16.070,0:11:19.340 -um, usability, +Um, usability, 0:11:19.340,0:11:20.600 so you get the uh, @@ -697,10 +687,10 @@ in this whole area. 0:11:32.010,0:11:33.059 -so, uh +So, uh 0:11:33.059,0:11:34.679 -the protocol to all users +the protocol Tor users 0:11:34.679,0:11:37.890 should be really flexible @@ -754,8 +744,8 @@ for example 0:12:30.380,0:12:34.280 -The first one is the entry node, middle LAN nodes, and the -uh exit nodes, I will leave thes for later +The first one is the entry node, middleman nodes, and the +uh exit nodes, I will leave these for later 0:12:34.280,0:12:41.000 uh, so this @@ -774,7 +764,8 @@ thing goes on 0:12:53.090,0:12:58.520 -in these two and these two so they can communicate later on +between these two and these two so they can communicate +later on 0:12:58.520,0:12:59.780 What's really important here @@ -792,10 +783,10 @@ So it has to be unencrypted 0:13:06.610,0:13:13.610 -so you can get your request through +so you can actually get your request through 0:13:20.690,0:13:22.700 -this is a virtual circuit +This is a virtual circuit 0:13:22.700,0:13:24.490 that gets established and uh @@ -810,10 +801,10 @@ a new circuit is built 0:13:32.450,0:13:37.250 -when a new website, when a new request come through, so uh +when a new website, when a new request comes through, so uh 0:13:37.250,0:13:40.080 -this one stays, all these connections above stays +this one stays, all these connections above stay 0:13:40.080,0:13:41.940 in this circuit @@ -840,13 +831,13 @@ in case one connection is compromised, for example. 0:14:00.220,0:14:01.600 -An these ten minutes +And these ten minutes 0:14:01.600,0:14:04.490 -are really an arbitrary value +are really an arbitrary value, 0:14:04.490,0:14:08.560 -,you can choose anything +you can choose anything 0:14:08.560,0:14:10.660 you have to do the research @@ -858,13 +849,13 @@ ten minutes is compromised. 0:14:19.840,0:14:22.240 -With all you get exit policies, +With Tor you get exit policies, 0:14:22.240,0:14:24.640 this is important for the exit node 0:14:24.640,0:14:27.880 -the one which actually send the uh, +the one which actually sends the uh, 0:14:27.880,0:14:30.410 original request to the destination server @@ -879,10 +870,10 @@ TCP connections you want 0:14:34.220,0:14:39.180 -to allow from your node if you want +to allow from your own node if you want 0:14:39.180,0:14:41.000 -that's default policy which uh +As default policy which uh 0:14:41.000,0:14:43.610 blocks SMTP and NNTP to prevent uh @@ -909,7 +900,7 @@ all the important stuff 0:15:01.630,0:15:05.250 -that you would want to minimize just works +that you would want to anonymize just works 0:15:05.250,0:15:10.290 and uh, if you uh @@ -918,7 +909,7 @@ this is important for uh, if you 0:15:13.050,0:15:18.540 -want to run you node, uh +want to run you own node, uh 0:15:18.540,0:15:19.220 waht kind of node you actually want to run @@ -928,7 +919,7 @@ 0:15:24.120,0:15:31.120 there's these three different nodes: entry node, -middleman note, and exit node +middleman node, and exit node 0:15:32.400,0:15:34.180 and uh, which node you want to run @@ -967,7 +958,7 @@ of the 0:16:05.340,0:16:11.230 -exit node in his forum and not the one +exit node in his logs and not the one 0:16:11.230,0:16:15.330 of Alice so uh he's going to have the problems later on @@ -979,8 +970,8 @@ but you have to keep this in mind 0:16:21.600,0:16:28.600 -and uh, keep up everything and uh we can play the role of -entry nodes and middle man nodes +And uh, keep up everything and uh we can play the role of +entry nodes and middleman nodes 0:16:30.170,0:16:37.170 which is also important @@ -995,7 +986,7 @@ accessed 0:16:46.990,0:16:49.420 -without having an IP address +without having the IP address of them 0:16:49.420,0:16:50.960 so uh @@ -1004,17 +995,17 @@ you can't really find them physically 0:16:56.300,0:16:57.880 -so if you want to run a +So if you want to run a 0:16:57.880,0:16:59.720 hidden service you can do it from anywhere 0:16:59.720,0:17:01.850 -do it from inside this private network here +You can even do it from inside this private network here 0:17:01.850,0:17:05.950 -instead of a service and everyone in the outside world can -actually access it +You can set up a service and everyone in the outside world +can actually access it 0:17:05.950,0:17:07.770 even if you don't have the rights to do @@ -1029,13 +1020,13 @@ resist Denial of Service, for example 0:17:15.690,0:17:20.160 -'cause every uh, +Because every uh, 0:17:20.160,0:17:20.519 every client that wants to 0:17:20.519,0:17:22.829 -access the service uh, gets +access the service uh, 0:17:22.829,0:17:25.700 gets a different route in the network @@ -1056,7 +1047,7 @@ And the addresses look like this: 0:17:38.510,0:17:43.280 -it's really a hash of a private key +it's really a hash of a public key 0:17:43.280,0:17:47.340 and each hidden service is actually, well, identified @@ -1065,7 +1056,7 @@ by a public key 0:17:53.300,0:17:59.000 -this how it works, uhm, yet Alice the client +This how it works, uhm, yet Alice the client 0:17:59.000,0:18:02.170 and the hidden server, Bob. @@ -1090,14 +1081,14 @@ and uh he sends 0:18:22.530,0:18:26.860 -this public key into each of these three introduction +this public key and the list of three introduction points to the directory server. 0:18:26.860,0:18:28.740 Now Alice wants to uh, 0:18:28.740,0:18:31.610 -connect to Bob, but first the first thing she does +connect to Bob, the first the first thing she does 0:18:31.610,0:18:34.480 is download this @@ -1109,7 +1100,7 @@ public key from the directory server. After that, uh 0:18:50.120,0:18:54.299 -she choose one of the uh introduction points +she chooses one of the uh introduction points 0:18:54.299,0:18:55.930 and uh, @@ -1217,10 +1208,10 @@ so they can decrypt it later 0:20:42.910,0:20:47.860 -and uh, yeah, it's not... +and uh, yeah, it's not really great 0:20:47.860,0:20:50.010 -and it's actually last week was the first case +and actually last week was the first case 0:20:50.010,0:20:52.890 when this was actually used in @@ -1229,13 +1220,13 @@ Great Britain 0:20:56.600,0:21:00.720 -uh, there can be special laws like in Germany +Uh, there can be special laws like in Germany 0:21:00.720,0:21:03.480 sort of like a hacker paragraph 0:21:03.480,0:21:06.990 -just a nickname, it has some cryptic legal name +It's just a nickname, it has some cryptic legal name 0:21:06.990,0:21:07.940 uh, in reality @@ -1274,7 +1265,7 @@ restrict anything. From a map to a 0:21:36.669,0:21:39.210 -to God know what? Network tools. +to God know what Network tools. 0:21:39.210,0:21:40.880 and uh @@ -1303,7 +1294,7 @@ and uh, the biggest Tor 0:22:00.990,0:22:02.250 -problems +problem is 0:22:02.250,0:22:07.480 that, uh @@ -1375,13 +1366,13 @@ that's random stuff that can happen 0:22:55.530,0:22:56.540 -though, uh, +So uh, 0:22:56.540,0:22:59.559 as an exit nodes provider you can get 0:22:59.559,0:23:03.690 -letters from Law Enforcement entities, and uh +letters from Law Enforcement agencies, and uh 0:23:03.690,0:23:05.649 What are you doing there? @@ -1393,7 +1384,7 @@ And you have to explain to them that you are 0:23:10.040,0:23:12.260 -providing Tor server +providing Tor server and 0:23:12.260,0:23:13.980 it wasn't you @@ -1429,7 +1420,7 @@ depends on what kind of guy you're actually talking to 0:23:41.440,0:23:47.120 -So what's... what kind of role plays FreeBSD here? +So what's... What kind of role plays FreeBSD here? 0:23:47.120,0:23:51.880 uh, FreeBSD is really well suited as a Tor node, uh @@ -1445,7 +1436,7 @@ and it shouldn't matter 0:23:59.150,0:24:00.830 -There's one of the, uh +This is one of the, uh 0:24:00.830,0:24:03.130 like I said earlier one of the design @@ -1463,7 +1454,7 @@ as actually uh, 0:24:14.290,0:24:17.320 -the security of other depends on your node +the security of others depends on your node 0:24:17.320,0:24:20.690 and uh, @@ -1493,7 +1484,7 @@ there's also audit 0:24:39.390,0:24:40.740 -and the mac framework +and the MAC framework 0:24:40.740,0:24:43.780 when you want to run your installation @@ -1520,16 +1511,16 @@ Well maintained Tor-related ports. 0:25:04.060,0:25:07.390 -There is the main port, security Tor +There is the main port, security/Tor 0:25:07.390,0:25:11.370 -Which is a client and server if you want to run +Which is a client and server if you want to run 0:25:11.370,0:25:13.610 a network node, or just a client. 0:25:13.610,0:25:15.210 -There's Tor level +There's tor-devel 0:25:15.210,0:25:16.450 and these are really up to date, uhm @@ -1538,7 +1529,7 @@ Tor development happens really fast 0:25:22.830,0:25:23.710 -and ports get updated +and the ports get updated 0:25:23.710,0:25:30.710 pretty soon after a release is made. @@ -1549,7 +1540,7 @@ 0:25:41.320,0:25:44.310 And there's net management Vidalia which is a -graphical content +graphical frontend 0:25:44.310,0:25:47.200 also for Windows @@ -1558,7 +1549,7 @@ and, uhm 0:25:48.260,0:25:53.929 -there's trans-proxy Tor +there's trans-proxy-tor 0:25:53.929,0:25:58.650 which enables you to actually @@ -1576,10 +1567,10 @@ that makes it hard for Tor to 0:26:07.510,0:26:08.860 -run with them +anonymize them 0:26:08.860,0:26:10.810 -and you can use trans-proxy Tor +and you can use trans-proxy-tor 0:26:10.810,0:26:15.510 to tunnel such connections through the Tor network. @@ -1601,7 +1592,7 @@ bypass the configured proxy 0:26:30.500,0:26:34.500 -for example FireFox versions below version 1.5, +for example Firefox versions below version 1.5, 0:26:34.500,0:26:35.700 which send every data, @@ -1703,7 +1694,7 @@ And it's really surprising how many people uh, do this. 0:28:13.450,0:28:16.700 -So, lesson learned: use secure protocol. +So, lesson learned: use secure protocols. 0:28:16.700,0:28:18.220 There are also other services that require @@ -1742,13 +1733,14 @@ Privoxy on this system 0:29:24.810,0:29:27.180 -the config files are on the usual places. +Config files are on the usual places. 0:29:27.180,0:29:34.180 -And if you read this, this little.. small.. Is this alright? +And if you read this, this little... small... +Is this alright? 0:29:46.950,0:29:50.600 -So there is this Tor I see sample file +So there is this torrc sample file 0:29:50.600,0:29:57.600 which we can use @@ -1772,7 +1764,7 @@ SOCKS port and SOCKS listen address information 0:30:24.220,0:30:31.220 -that's the +that just 0:30:32.770,0:30:34.659 tells you where to connect your uh, @@ -1818,7 +1810,7 @@ Privoxy uh, 0:31:33.809,0:31:40.809 -where to send connections requests. +where to send connection requests. 0:31:51.740,0:31:53.659 Ok, I've actually entered this earlier @@ -1839,19 +1831,19 @@ So we just start 0:32:34.120,0:32:38.870 -Ok, so we all set +Ok, so we are all set 0:32:38.870,0:32:40.480 Now we can just do 0:32:40.480,0:32:47.480 -everything with our brother +everything with our browser 0:32:50.790,0:32:52.029 -we all started times +Startup time sucks a bit >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Feb 3 21:16:45 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9D5521065679; Wed, 3 Feb 2010 21:16:45 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49A181065670 for ; Wed, 3 Feb 2010 21:16:45 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 380698FC08 for ; Wed, 3 Feb 2010 21:16:45 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13LGjBT022124 for ; Wed, 3 Feb 2010 21:16:45 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13LGjPA022122 for perforce@freebsd.org; Wed, 3 Feb 2010 21:16:45 GMT (envelope-from pgj@FreeBSD.org) Date: Wed, 3 Feb 2010 21:16:45 GMT Message-Id: <201002032116.o13LGjPA022122@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to pgj@FreeBSD.org using -f From: Gabor Pali To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174271 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 21:16:45 -0000 http://p4web.freebsd.org/chv.cgi?CH=174271 Change 174271 by pgj@Binturong on 2010/02/03 21:16:07 IFC Affected files ... .. //depot/projects/docproj_hu/doc/share/pgpkeys/rpaulo.key#2 integrate .. //depot/projects/docproj_hu/src/release/doc/en_US.ISO8859-1/relnotes/article.sgml#15 integrate .. //depot/projects/docproj_hu/src_7/release/doc/en_US.ISO8859-1/relnotes/article.sgml#10 integrate .. //depot/projects/docproj_hu/www/en/donations/donors.sgml#25 integrate .. //depot/projects/docproj_hu/www/en/releases/8.0R/announce.sgml#2 integrate .. //depot/projects/docproj_hu/www/hu/share/sgml/events.xml#28 integrate .. //depot/projects/docproj_hu/www/share/sgml/news.xml#82 integrate Differences ... ==== //depot/projects/docproj_hu/doc/share/pgpkeys/rpaulo.key#2 (text+ko) ==== @@ -1,44 +1,76 @@ - + +pub 4096R/39CB4153 2010-02-03 + Key fingerprint = ABE8 8465 DE8F F04D E9C8 3FF6 AF89 B2E6 39CB 4153 uid Rui Paulo -sub 2048g/D0851F30 2007-09-19 +uid Rui Paulo +sub 4096R/F87D2F34 2010-02-03 ]]> ==== //depot/projects/docproj_hu/src/release/doc/en_US.ISO8859-1/relnotes/article.sgml#15 (text+ko) ==== @@ -17,7 +17,7 @@ The &os; Project - $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/article.sgml,v 1.1103 2009/09/10 01:26:45 edwin Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/article.sgml,v 1.1104 2010/01/31 19:56:37 gshapiro Exp $ 2000 @@ -468,7 +468,7 @@ Figwort release to the Hydrangea release. sendmail has been updated from - 8.14.1 to 8.14.3. + 8.14.1 to 8.14.4. The timezone database has been updated from the tzdata2008h release to ==== //depot/projects/docproj_hu/src_7/release/doc/en_US.ISO8859-1/relnotes/article.sgml#10 (text+ko) ==== @@ -17,7 +17,7 @@ The &os; Project - $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/article.sgml,v 1.1068.2.33 2009/05/27 03:51:04 bmah Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/article.sgml,v 1.1068.2.34 2010/01/31 20:01:28 gshapiro Exp $ 2000 @@ -199,7 +199,8 @@ Contributed Software - + sendmail has been updated from + version 8.14.3 to version 8.14.4. ==== //depot/projects/docproj_hu/www/en/donations/donors.sgml#25 (text+ko) ==== @@ -1,6 +1,6 @@ - + %developers; @@ -2671,6 +2671,15 @@ brd (firewalls and infrastructure servers
for the new NYC FreeBSD co-location) Received + + + + Garrett Cooper + Cisco 877WAGN router + ehaupt + Received + + &footer; ==== //depot/projects/docproj_hu/www/en/releases/8.0R/announce.sgml#2 (text+ko) ==== @@ -1,6 +1,6 @@ - + ]> @@ -36,7 +36,7 @@

The press release contains more - information on this relese.

+ information on this release.

For a complete list of new features and known problems, please see the online release notes and errata list available at:

==== //depot/projects/docproj_hu/www/hu/share/sgml/events.xml#28 (text+ko) ==== @@ -17,7 +17,7 @@ - $FreeBSD: www/hu/share/sgml/events.xml,v 1.12 2010/01/21 23:49:04 pgj Exp $ + $FreeBSD: www/hu/share/sgml/events.xml,v 1.13 2010/01/30 19:53:58 pgj Exp $ ==== //depot/projects/docproj_hu/www/share/sgml/news.xml#82 (text+ko) ==== @@ -25,7 +25,7 @@ - $FreeBSD: www/share/sgml/news.xml,v 1.289 2010/01/29 14:37:34 brucec Exp $ + $FreeBSD: www/share/sgml/news.xml,v 1.292 2010/02/02 11:51:21 gabor Exp $ @@ -33,8 +33,45 @@ 2010 + 2 + + + 2 + + + Enhanced commit privileges: + <a href="mailto:gabor@FreeBSD.org">Gábor Kövesdán</a> + (src, ports, doc) + +

Gábor Kövesdán + participated in + Google Summer of Code + 2008/2009 and for his work he has been given commit acces to the + source code. His first pieces of work will be bringing in the result + of his summer work into the tree.

+
+
+
+ + 1 + + 30 + + + &os; 7.3-BETA1 Available + +

The first BETA build for the &os;-7.3 + release cycle is now available. ISO images for Tier-1 + architectures are now available + on most of the &os; + mirror sites.

+
+
+ 29 From owner-p4-projects@FreeBSD.ORG Wed Feb 3 21:18:48 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0C2DF1065695; Wed, 3 Feb 2010 21:18:48 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3E8D1065693 for ; Wed, 3 Feb 2010 21:18:47 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 994BD8FC17 for ; Wed, 3 Feb 2010 21:18:47 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13LIlEu022237 for ; Wed, 3 Feb 2010 21:18:47 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13LIlDh022235 for perforce@freebsd.org; Wed, 3 Feb 2010 21:18:47 GMT (envelope-from pgj@FreeBSD.org) Date: Wed, 3 Feb 2010 21:18:47 GMT Message-Id: <201002032118.o13LIlDh022235@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to pgj@FreeBSD.org using -f From: Gabor Pali To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174272 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 21:18:48 -0000 http://p4web.freebsd.org/chv.cgi?CH=174272 Change 174272 by pgj@Binturong on 2010/02/03 21:18:46 MFen (www): 1.289 -> 1.293 hu/share/sgml/news.xml Affected files ... .. //depot/projects/docproj_hu/www/hu/share/sgml/news.xml#79 edit Differences ... ==== //depot/projects/docproj_hu/www/hu/share/sgml/news.xml#79 (text+ko) ==== @@ -5,13 +5,13 @@ - $FreeBSD: www/hu/share/sgml/news.xml,v 1.33 2010/01/18 00:29:17 pgj Exp $ + $FreeBSD: www/hu/share/sgml/news.xml,v 1.34 2010/01/30 19:53:59 pgj Exp $ @@ -19,9 +19,50 @@ 2010 + 2 + + + 2 + + + Bõvebb commit jogosultság: <a + href="mailto:gabor@FreeBSD.org">Kövesdán Gábor</a> + (src, ports, doc) + +

Kövesdán + Gábor 2008-ban és 2009-ban résztvett a + Google Summer of Code + programban, és munkájának + eredményeképpen most commit jogot kapott az + alaprendszer forrásaihoz. Elsõként a + nyári munkájának + eredményét szeretné + integrálni.

+
+
+
+ + 1 + 30 + + + Megjelent a &os; 7.3-BETA1! + +

Megérkezett a &os; 7.3 kiadási + ciklusának elsõ béta változata. + Már az összes Tier 1 + architektúrára elérhetõek + ISO lemezképek a legtöbb &os; + tükrözésrõl.

+
+
+ + 29 From owner-p4-projects@FreeBSD.ORG Wed Feb 3 21:55:25 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3458A1065676; Wed, 3 Feb 2010 21:55:25 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED51D106566B for ; Wed, 3 Feb 2010 21:55:24 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C27438FC0C for ; Wed, 3 Feb 2010 21:55:24 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13LtOxT025156 for ; Wed, 3 Feb 2010 21:55:24 GMT (envelope-from rene@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13LtOAY025154 for perforce@freebsd.org; Wed, 3 Feb 2010 21:55:24 GMT (envelope-from rene@FreeBSD.org) Date: Wed, 3 Feb 2010 21:55:24 GMT Message-Id: <201002032155.o13LtOAY025154@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rene@FreeBSD.org using -f From: Rene Ladan To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174278 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 21:55:25 -0000 http://p4web.freebsd.org/chv.cgi?CH=174278 Change 174278 by rene@rene_self on 2010/02/03 21:55:21 MFen handbook/virtualization 1.22 -> 1.23 Affected files ... .. //depot/projects/docproj_nl/nl_NL.ISO8859-1/books/handbook/virtualization/chapter.sgml#17 edit Differences ... ==== //depot/projects/docproj_nl/nl_NL.ISO8859-1/books/handbook/virtualization/chapter.sgml#17 (text+ko) ==== @@ -4,7 +4,7 @@ $FreeBSD: doc/nl_NL.ISO8859-1/books/handbook/virtualization/chapter.sgml,v 1.8 2009/11/17 22:36:13 rene Exp $ %SOURCE% en_US.ISO8859-1/books/handbook/virtualization/chapter.sgml - %SRCID% 1.22 + %SRCID% 1.23 --> @@ -1022,10 +1022,11 @@ &virtualbox; installeren &virtualbox; is beschikbaar als een - &os;-port in emulators/virtualbox en - kan met de volgende commando's geïnstalleerd worden: + &os;-port in emulators/virtualbox-ose en kan met de + volgende commando's geïnstalleerd worden:
- &prompt.root; cd /usr/ports/emulators/virtualbox + &prompt.root; cd /usr/ports/emulators/virtualbox-ose &prompt.root; make install clean Een nuttige optie in het configuratiescherm is de verzameling @@ -1052,9 +1053,15 @@ vboxdrv_load="YES" - &virtualbox; vereist ook dat het - proc-bestandssysteem is - aangekoppeld: + Voor versies van &virtualbox; lager dan + 3.1.2 is het nodig om het bestandssysteem + proc aan te koppelen. Voor + recente versies is dit niet nodig, die maken gebruik van de functies die + door de bibliotheek &man.sysctl.3; worden aangeboden. + + Volg de onderstaande instructies op bij het gebruik van een oudere + versie van de port om er zeker van te zijn dat proc juist is aangekoppeld: &prompt.root; mount -t procfs proc /proc From owner-p4-projects@FreeBSD.ORG Wed Feb 3 22:30:00 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A1B87106568B; Wed, 3 Feb 2010 22:30:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 665DC1065670 for ; Wed, 3 Feb 2010 22:30:00 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3E8EE8FC0A for ; Wed, 3 Feb 2010 22:30:00 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13MU0T4028753 for ; Wed, 3 Feb 2010 22:30:00 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13MU01c028751 for perforce@freebsd.org; Wed, 3 Feb 2010 22:30:00 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 22:30:00 GMT Message-Id: <201002032230.o13MU01c028751@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174284 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 22:30:00 -0000 http://p4web.freebsd.org/chv.cgi?CH=174284 Change 174284 by rwatson@rwatson_vimage_client on 2010/02/03 22:29:44 Micro-benchmarks for chroot() and setuid(). Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#14 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#14 (text+ko) ==== @@ -565,6 +565,38 @@ benchmark_stop(); } +void +test_chroot(int num) +{ + int i; + + if (chroot("/") < 0) + err(-1, "test_chroot: chroot"); + benchmark_start(); + for (i = 0; i < num; i++) { + if (chroot("/") < 0) + err(-1, "test_chroot: chroot"); + } + benchmark_stop(); +} + +void +test_setuid(int num) +{ + uid_t uid; + int i; + + uid = getuid(); + if (setuid(uid) < 0) + err(-1, "test_setuid: setuid"); + benchmark_start(); + for (i = 0; i < num; i++) { + if (setuid(uid) < 0) + err(-1, "test_setuid: setuid"); + } + benchmark_stop(); +} + /* * A bit like sandbox, in that a process is forked, IPC ping-pong is done, * but with none of the sandboxing goo. @@ -773,6 +805,8 @@ { "fork_exec", test_fork_exec }, { "vfork_exec", test_vfork_exec }, { "pdfork_exec", test_pdfork_exec }, + { "chroot", test_chroot }, + { "setuid", test_setuid }, { "pingpong", test_pingpong }, { "sandbox", test_sandbox }, }; From owner-p4-projects@FreeBSD.ORG Wed Feb 3 22:36:07 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5A2D01065672; Wed, 3 Feb 2010 22:36:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DF54106566B for ; Wed, 3 Feb 2010 22:36:07 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0A1D18FC08 for ; Wed, 3 Feb 2010 22:36:07 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13Ma74m029304 for ; Wed, 3 Feb 2010 22:36:07 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13Ma64u029302 for perforce@freebsd.org; Wed, 3 Feb 2010 22:36:06 GMT (envelope-from raj@freebsd.org) Date: Wed, 3 Feb 2010 22:36:06 GMT Message-Id: <201002032236.o13Ma64u029302@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174285 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 22:36:07 -0000 http://p4web.freebsd.org/chv.cgi?CH=174285 Change 174285 by raj@raj_fdt on 2010/02/03 22:35:45 IFC @174275 Affected files ... .. //depot/projects/fdt/contrib/csup/Makefile#2 integrate .. //depot/projects/fdt/contrib/csup/TODO#2 integrate .. //depot/projects/fdt/contrib/csup/auth.c#1 branch .. //depot/projects/fdt/contrib/csup/auth.h#1 branch .. //depot/projects/fdt/contrib/csup/config.h#2 integrate .. //depot/projects/fdt/contrib/csup/cpasswd.1#1 branch .. //depot/projects/fdt/contrib/csup/cpasswd.sh#1 branch .. //depot/projects/fdt/contrib/csup/csup.1#2 integrate .. //depot/projects/fdt/contrib/csup/main.c#2 integrate .. //depot/projects/fdt/contrib/csup/proto.c#2 integrate .. //depot/projects/fdt/contrib/netcat/FREEBSD-vendor#3 integrate .. //depot/projects/fdt/etc/defaults/rc.conf#5 integrate .. //depot/projects/fdt/etc/network.subr#3 integrate .. //depot/projects/fdt/etc/rc.d/Makefile#3 integrate .. //depot/projects/fdt/etc/rc.d/ntpdate#2 integrate .. //depot/projects/fdt/etc/rc.d/rtsold#1 branch .. //depot/projects/fdt/etc/services#3 integrate .. //depot/projects/fdt/gnu/usr.bin/binutils/Makefile.inc#2 integrate .. //depot/projects/fdt/gnu/usr.bin/binutils/gdb/Makefile.alpha#2 delete .. //depot/projects/fdt/gnu/usr.bin/binutils/ld/Makefile.alpha#2 delete .. //depot/projects/fdt/gnu/usr.bin/binutils/libbfd/Makefile#2 integrate .. //depot/projects/fdt/gnu/usr.bin/binutils/libbfd/Makefile.alpha#2 delete .. //depot/projects/fdt/gnu/usr.bin/binutils/libopcodes/Makefile.alpha#2 delete .. //depot/projects/fdt/gnu/usr.bin/groff/tmac/mdoc.local#3 integrate .. //depot/projects/fdt/lib/Makefile#5 integrate .. //depot/projects/fdt/lib/libc/gen/devname.c#2 integrate .. //depot/projects/fdt/lib/libc/gen/getutxent.3#3 integrate .. //depot/projects/fdt/lib/libc/gen/rand48.3#2 integrate .. //depot/projects/fdt/lib/libc/mips/sys/ptrace.S#2 integrate .. //depot/projects/fdt/lib/libc/net/sctp_opt_info.3#3 integrate .. //depot/projects/fdt/lib/libc/net/sctp_recvmsg.3#3 integrate .. //depot/projects/fdt/lib/libc/net/sctp_send.3#4 integrate .. //depot/projects/fdt/lib/libc/net/sctp_sendmsg.3#4 integrate .. //depot/projects/fdt/lib/libc/net/sctp_sys_calls.c#2 integrate .. //depot/projects/fdt/lib/libc/nls/msgcat.c#3 integrate .. //depot/projects/fdt/lib/libc/stdlib/malloc.3#2 integrate .. //depot/projects/fdt/lib/libc/stdlib/malloc.c#5 integrate .. //depot/projects/fdt/lib/libc/stdlib/ql.h#1 branch .. //depot/projects/fdt/lib/libc/stdlib/qr.h#1 branch .. //depot/projects/fdt/lib/libc/string/strndup.c#2 integrate .. //depot/projects/fdt/lib/libc/sys/shm_open.2#2 integrate .. //depot/projects/fdt/lib/libefi/Makefile#1 branch .. //depot/projects/fdt/lib/libefi/efi_getvar.c#1 branch .. //depot/projects/fdt/lib/libefi/efi_nextvarname.c#1 branch .. //depot/projects/fdt/lib/libefi/efi_setvar.c#1 branch .. //depot/projects/fdt/lib/libefi/libefi.3#1 branch .. //depot/projects/fdt/lib/libefi/libefi.c#1 branch .. //depot/projects/fdt/lib/libefi/libefi.h#1 branch .. //depot/projects/fdt/lib/libefi/libefi_int.h#1 branch .. //depot/projects/fdt/lib/libgpib/Makefile#3 integrate .. //depot/projects/fdt/lib/libgpib/gpib.3#1 branch .. //depot/projects/fdt/lib/libpam/modules/pam_unix/pam_unix.c#2 integrate .. //depot/projects/fdt/lib/libusb/libusb20.3#3 integrate .. //depot/projects/fdt/lib/libusb/libusb20.c#5 integrate .. //depot/projects/fdt/lib/libusb/libusb20.h#3 integrate .. //depot/projects/fdt/lib/libusb/libusb20_int.h#2 integrate .. //depot/projects/fdt/lib/libusb/libusb20_ugen20.c#3 integrate .. //depot/projects/fdt/lib/msun/amd64/fenv.c#2 integrate .. //depot/projects/fdt/lib/msun/amd64/fenv.h#2 integrate .. //depot/projects/fdt/lib/msun/i387/fenv.c#2 integrate .. //depot/projects/fdt/lib/msun/i387/fenv.h#2 integrate .. //depot/projects/fdt/release/doc/en_US.ISO8859-1/relnotes/article.sgml#2 integrate .. //depot/projects/fdt/sbin/camcontrol/camcontrol.c#5 integrate .. //depot/projects/fdt/sbin/mknod/mknod.8#3 integrate .. //depot/projects/fdt/sbin/mknod/mknod.c#2 integrate .. //depot/projects/fdt/sbin/restore/Makefile#2 integrate .. //depot/projects/fdt/sbin/restore/dirs.c#2 integrate .. //depot/projects/fdt/sbin/restore/extern.h#2 integrate .. //depot/projects/fdt/sbin/restore/interactive.c#2 integrate .. //depot/projects/fdt/sbin/restore/tape.c#2 integrate .. //depot/projects/fdt/sbin/sysctl/sysctl.8#2 integrate .. //depot/projects/fdt/sbin/sysctl/sysctl.c#3 integrate .. //depot/projects/fdt/share/examples/kld/cdev/test/Makefile#3 integrate .. //depot/projects/fdt/share/examples/kld/syscall/test/Makefile#3 integrate .. //depot/projects/fdt/share/man/man4/Makefile#8 integrate .. //depot/projects/fdt/share/man/man4/ahci.4#2 integrate .. //depot/projects/fdt/share/man/man4/gpib.4#2 integrate .. //depot/projects/fdt/share/man/man4/pcii.4#2 integrate .. //depot/projects/fdt/share/man/man4/run.4#1 branch .. //depot/projects/fdt/share/man/man4/tnt4882.4#2 integrate .. //depot/projects/fdt/share/man/man5/tmpfs.5#2 integrate .. //depot/projects/fdt/share/man/man9/locking.9#2 integrate .. //depot/projects/fdt/share/misc/committers-src.dot#3 integrate .. //depot/projects/fdt/sys/amd64/amd64/amd64_mem.c#2 integrate .. //depot/projects/fdt/sys/amd64/amd64/msi.c#2 integrate .. //depot/projects/fdt/sys/amd64/conf/NOTES#4 integrate .. //depot/projects/fdt/sys/arm/arm/db_trace.c#3 integrate .. //depot/projects/fdt/sys/cam/ata/ata_all.c#8 integrate .. //depot/projects/fdt/sys/cam/ata/ata_da.c#6 integrate .. //depot/projects/fdt/sys/cam/ata/ata_pmp.c#7 integrate .. //depot/projects/fdt/sys/cam/ata/ata_xpt.c#8 integrate .. //depot/projects/fdt/sys/cam/cam_ccb.h#5 integrate .. //depot/projects/fdt/sys/cam/cam_xpt.c#6 integrate .. //depot/projects/fdt/sys/conf/NOTES#10 integrate .. //depot/projects/fdt/sys/conf/files#12 integrate .. //depot/projects/fdt/sys/contrib/dev/run/LICENSE#1 branch .. //depot/projects/fdt/sys/contrib/dev/run/rt2870.fw.uu#1 branch .. //depot/projects/fdt/sys/dev/acpica/acpi_cpu.c#3 integrate .. //depot/projects/fdt/sys/dev/ahci/ahci.c#9 integrate .. //depot/projects/fdt/sys/dev/ahci/ahci.h#6 integrate .. //depot/projects/fdt/sys/dev/ata/ata-all.c#7 integrate .. //depot/projects/fdt/sys/dev/ata/ata-all.h#4 integrate .. //depot/projects/fdt/sys/dev/ata/atapi-cam.c#3 integrate .. //depot/projects/fdt/sys/dev/ata/chipsets/ata-netcell.c#3 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ah_eeprom_v4k.h#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5212/ar5212_power.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5212/ar5212reg.h#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416.h#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_power.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416desc.h#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416phy.h#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar5416reg.h#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar9280_attach.c#2 integrate .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar9285.ini#1 branch .. //depot/projects/fdt/sys/dev/ath/ath_hal/ar5416/ar9285v2.ini#1 branch .. //depot/projects/fdt/sys/dev/bge/if_bge.c#8 integrate .. //depot/projects/fdt/sys/dev/drm/drmP.h#3 integrate .. //depot/projects/fdt/sys/dev/drm/drm_hashtab.c#1 branch .. //depot/projects/fdt/sys/dev/drm/drm_hashtab.h#1 branch .. //depot/projects/fdt/sys/dev/drm/drm_linux_list.h#2 integrate .. //depot/projects/fdt/sys/dev/drm/drm_memory.c#2 integrate .. //depot/projects/fdt/sys/dev/drm/drm_mm.c#1 branch .. //depot/projects/fdt/sys/dev/drm/drm_mm.h#1 branch .. //depot/projects/fdt/sys/dev/drm/drm_sman.c#1 branch .. //depot/projects/fdt/sys/dev/drm/drm_sman.h#1 branch .. //depot/projects/fdt/sys/dev/drm/i915_drv.c#2 integrate .. //depot/projects/fdt/sys/dev/drm/i915_drv.h#2 integrate .. //depot/projects/fdt/sys/dev/drm/via_3d_reg.h#1 branch .. //depot/projects/fdt/sys/dev/drm/via_dma.c#1 branch .. //depot/projects/fdt/sys/dev/drm/via_dmablit.c#1 branch .. //depot/projects/fdt/sys/dev/drm/via_dmablit.h#1 branch .. //depot/projects/fdt/sys/dev/drm/via_drm.h#1 branch .. //depot/projects/fdt/sys/dev/drm/via_drv.c#1 branch .. //depot/projects/fdt/sys/dev/drm/via_drv.h#1 branch .. //depot/projects/fdt/sys/dev/drm/via_irq.c#1 branch .. //depot/projects/fdt/sys/dev/drm/via_map.c#1 branch .. //depot/projects/fdt/sys/dev/drm/via_mm.c#1 branch .. //depot/projects/fdt/sys/dev/drm/via_verifier.c#1 branch .. //depot/projects/fdt/sys/dev/drm/via_verifier.h#1 branch .. //depot/projects/fdt/sys/dev/drm/via_video.c#1 branch .. //depot/projects/fdt/sys/dev/e1000/if_em.c#5 integrate .. //depot/projects/fdt/sys/dev/e1000/if_igb.c#6 integrate .. //depot/projects/fdt/sys/dev/ieee488/ibfoo.c#3 integrate .. //depot/projects/fdt/sys/dev/ieee488/pcii.c#3 integrate .. //depot/projects/fdt/sys/dev/ieee488/tnt4882.c#3 integrate .. //depot/projects/fdt/sys/dev/ieee488/tnt4882.h#1 branch .. //depot/projects/fdt/sys/dev/ieee488/upd7210.c#3 integrate .. //depot/projects/fdt/sys/dev/ieee488/upd7210.h#3 integrate .. //depot/projects/fdt/sys/dev/isp/isp.c#5 integrate .. //depot/projects/fdt/sys/dev/isp/isp_freebsd.c#3 integrate .. //depot/projects/fdt/sys/dev/isp/isp_library.c#3 integrate .. //depot/projects/fdt/sys/dev/isp/isp_library.h#2 integrate .. //depot/projects/fdt/sys/dev/isp/isp_pci.c#2 integrate .. //depot/projects/fdt/sys/dev/isp/isp_sbus.c#3 integrate .. //depot/projects/fdt/sys/dev/isp/ispmbox.h#2 integrate .. //depot/projects/fdt/sys/dev/isp/ispvar.h#2 integrate .. //depot/projects/fdt/sys/dev/pci/pcireg.h#2 integrate .. //depot/projects/fdt/sys/dev/siba/siba.c#2 integrate .. //depot/projects/fdt/sys/dev/siba/siba_bwn.c#1 branch .. //depot/projects/fdt/sys/dev/siba/siba_cc.c#2 integrate .. //depot/projects/fdt/sys/dev/siba/siba_core.c#1 branch .. //depot/projects/fdt/sys/dev/siba/siba_ids.h#2 integrate .. //depot/projects/fdt/sys/dev/siba/siba_pcib.c#2 integrate .. //depot/projects/fdt/sys/dev/siba/sibareg.h#2 integrate .. //depot/projects/fdt/sys/dev/siba/sibavar.h#2 integrate .. //depot/projects/fdt/sys/dev/siis/siis.c#8 integrate .. //depot/projects/fdt/sys/dev/siis/siis.h#6 integrate .. //depot/projects/fdt/sys/dev/usb/controller/ehci.c#4 integrate .. //depot/projects/fdt/sys/dev/usb/quirk/usb_quirk.c#5 integrate .. //depot/projects/fdt/sys/dev/usb/storage/umass.c#7 integrate .. //depot/projects/fdt/sys/dev/usb/usbdevs#8 integrate .. //depot/projects/fdt/sys/dev/usb/wlan/if_rum.c#3 integrate .. //depot/projects/fdt/sys/dev/usb/wlan/if_run.c#1 branch .. //depot/projects/fdt/sys/dev/usb/wlan/if_runreg.h#1 branch .. //depot/projects/fdt/sys/dev/usb/wlan/if_runvar.h#1 branch .. //depot/projects/fdt/sys/dev/usb/wlan/if_uath.c#3 integrate .. //depot/projects/fdt/sys/dev/usb/wlan/if_zyd.c#2 integrate .. //depot/projects/fdt/sys/fs/devfs/devfs_devs.c#2 integrate .. //depot/projects/fdt/sys/fs/nfsclient/nfs.h#3 integrate .. //depot/projects/fdt/sys/fs/nfsclient/nfs_clbio.c#3 integrate .. //depot/projects/fdt/sys/fs/nfsclient/nfs_clnfsiod.c#2 integrate .. //depot/projects/fdt/sys/fs/nfsclient/nfs_clsubs.c#2 integrate .. //depot/projects/fdt/sys/fs/nfsclient/nfs_clvfsops.c#2 integrate .. //depot/projects/fdt/sys/fs/nfsclient/nfs_clvnops.c#5 integrate .. //depot/projects/fdt/sys/fs/nfsclient/nfsmount.h#2 integrate .. //depot/projects/fdt/sys/fs/nfsclient/nfsnode.h#2 integrate .. //depot/projects/fdt/sys/fs/tmpfs/tmpfs_vfsops.c#5 integrate .. //depot/projects/fdt/sys/geom/geom_redboot.c#2 integrate .. //depot/projects/fdt/sys/geom/part/g_part_gpt.c#6 integrate .. //depot/projects/fdt/sys/geom/virstor/g_virstor.c#3 integrate .. //depot/projects/fdt/sys/i386/conf/NOTES#5 integrate .. //depot/projects/fdt/sys/i386/i386/i686_mem.c#2 integrate .. //depot/projects/fdt/sys/i386/i386/msi.c#2 integrate .. //depot/projects/fdt/sys/i386/i386/pmap.c#6 integrate .. //depot/projects/fdt/sys/kern/kern_shutdown.c#2 integrate .. //depot/projects/fdt/sys/kern/kern_umtx.c#5 integrate .. //depot/projects/fdt/sys/kern/vfs_lookup.c#3 integrate .. //depot/projects/fdt/sys/mips/atheros/ar71xx_pci.c#2 integrate .. //depot/projects/fdt/sys/mips/cavium/asm_octeon.S#2 integrate .. //depot/projects/fdt/sys/mips/cavium/dev/rgmii/octeon_fau.c#3 integrate .. //depot/projects/fdt/sys/mips/cavium/dev/rgmii/octeon_fau.h#2 integrate .. //depot/projects/fdt/sys/mips/cavium/dev/rgmii/octeon_fpa.c#4 integrate .. //depot/projects/fdt/sys/mips/cavium/dev/rgmii/octeon_fpa.h#2 integrate .. //depot/projects/fdt/sys/mips/cavium/dev/rgmii/octeon_ipd.c#3 integrate .. //depot/projects/fdt/sys/mips/cavium/dev/rgmii/octeon_ipd.h#2 integrate .. //depot/projects/fdt/sys/mips/cavium/dev/rgmii/octeon_pip.h#2 integrate .. //depot/projects/fdt/sys/mips/cavium/dev/rgmii/octeon_pko.c#3 integrate .. //depot/projects/fdt/sys/mips/cavium/dev/rgmii/octeon_pko.h#2 integrate .. //depot/projects/fdt/sys/mips/cavium/dev/rgmii/octeon_rgmx.c#3 integrate .. //depot/projects/fdt/sys/mips/cavium/dev/rgmii/octeon_rgmx.h#2 integrate .. //depot/projects/fdt/sys/mips/cavium/driveid.h#2 integrate .. //depot/projects/fdt/sys/mips/cavium/obiovar.h#2 integrate .. //depot/projects/fdt/sys/mips/cavium/octeon_ebt3000_cf.c#3 integrate .. //depot/projects/fdt/sys/mips/cavium/octeon_ebt3000_cf.h#2 integrate .. //depot/projects/fdt/sys/mips/cavium/octeon_machdep.c#4 integrate .. //depot/projects/fdt/sys/mips/cavium/octeon_pcmap_regs.h#3 integrate .. //depot/projects/fdt/sys/mips/conf/ALCHEMY#2 integrate .. //depot/projects/fdt/sys/mips/include/cpu.h#4 integrate .. //depot/projects/fdt/sys/mips/include/pcpu.h#2 integrate .. //depot/projects/fdt/sys/mips/include/proc.h#3 integrate .. //depot/projects/fdt/sys/mips/mips/genassym.c#3 integrate .. //depot/projects/fdt/sys/mips/mips/locore.S#4 integrate .. //depot/projects/fdt/sys/mips/mips/machdep.c#5 integrate .. //depot/projects/fdt/sys/mips/mips/pmap.c#5 integrate .. //depot/projects/fdt/sys/mips/rmi/pic.h#3 integrate .. //depot/projects/fdt/sys/mips/rmi/xlr_machdep.c#3 integrate .. //depot/projects/fdt/sys/modules/Makefile#5 integrate .. //depot/projects/fdt/sys/modules/ath/Makefile#2 integrate .. //depot/projects/fdt/sys/modules/drm/Makefile#2 integrate .. //depot/projects/fdt/sys/modules/drm/drm/Makefile#2 integrate .. //depot/projects/fdt/sys/modules/drm/via/Makefile#1 branch .. //depot/projects/fdt/sys/modules/runfw/Makefile#1 branch .. //depot/projects/fdt/sys/modules/siba_bwn/Makefile#1 branch .. //depot/projects/fdt/sys/modules/usb/Makefile#4 integrate .. //depot/projects/fdt/sys/modules/usb/run/Makefile#1 branch .. //depot/projects/fdt/sys/net/if_bridge.c#5 integrate .. //depot/projects/fdt/sys/net80211/ieee80211_adhoc.c#2 integrate .. //depot/projects/fdt/sys/net80211/ieee80211_hostap.c#3 integrate .. //depot/projects/fdt/sys/net80211/ieee80211_ioctl.h#3 integrate .. //depot/projects/fdt/sys/net80211/ieee80211_mesh.c#3 integrate .. //depot/projects/fdt/sys/net80211/ieee80211_sta.c#3 integrate .. //depot/projects/fdt/sys/net80211/ieee80211_wds.c#2 integrate .. //depot/projects/fdt/sys/netinet/in.c#4 integrate .. //depot/projects/fdt/sys/netinet/ip.h#2 integrate .. //depot/projects/fdt/sys/netinet/tcp.h#3 integrate .. //depot/projects/fdt/sys/powerpc/mpc85xx/pci_ocp.c#3 integrate .. //depot/projects/fdt/sys/security/audit/audit_bsm.c#2 integrate .. //depot/projects/fdt/sys/sparc64/sparc64/genassym.c#2 integrate .. //depot/projects/fdt/sys/sparc64/sparc64/swtch.S#2 integrate .. //depot/projects/fdt/sys/sun4v/include/bus.h#2 integrate .. //depot/projects/fdt/sys/sun4v/sun4v/bus_machdep.c#2 integrate .. //depot/projects/fdt/sys/sys/ata.h#6 integrate .. //depot/projects/fdt/sys/vm/vm_map.c#5 integrate .. //depot/projects/fdt/tools/build/mk/OptionalObsoleteFiles.inc#4 integrate .. //depot/projects/fdt/usr.bin/bc/Makefile#2 integrate .. //depot/projects/fdt/usr.bin/bc/bc.y#2 integrate .. //depot/projects/fdt/usr.bin/bc/scan.l#2 integrate .. //depot/projects/fdt/usr.bin/calendar/calendars/calendar.freebsd#4 integrate .. //depot/projects/fdt/usr.bin/cpio/cmdline.c#2 integrate .. //depot/projects/fdt/usr.bin/cpio/cpio.c#2 integrate .. //depot/projects/fdt/usr.bin/cpio/cpio.h#2 integrate .. //depot/projects/fdt/usr.bin/csup/Makefile#2 integrate .. //depot/projects/fdt/usr.bin/dc/Makefile#2 integrate .. //depot/projects/fdt/usr.bin/dc/bcode.c#2 integrate .. //depot/projects/fdt/usr.bin/dc/bcode.h#2 integrate .. //depot/projects/fdt/usr.bin/dc/dc.c#2 integrate .. //depot/projects/fdt/usr.bin/dc/inout.c#2 integrate .. //depot/projects/fdt/usr.bin/dc/mem.c#2 integrate .. //depot/projects/fdt/usr.bin/dc/stack.c#2 integrate .. //depot/projects/fdt/usr.bin/truss/mips-fbsd.c#2 integrate .. //depot/projects/fdt/usr.sbin/rtsold/rtsold.c#2 integrate Differences ... ==== //depot/projects/fdt/contrib/csup/Makefile#2 (text) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/contrib/csup/Makefile,v 1.2 2009/01/05 15:18:16 lulf Exp $ +# $FreeBSD: src/contrib/csup/Makefile,v 1.3 2010/02/02 05:57:42 lulf Exp $ PREFIX?= /usr/local BINDIR?= ${PREFIX}/bin @@ -7,7 +7,7 @@ UNAME!= /usr/bin/uname -s PROG= csup -SRCS= attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \ +SRCS= attrstack.c auth.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \ globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c parse.y \ pathcomp.c proto.c status.c stream.c threads.c token.l updater.c \ rcsfile.c rcsparse.c lex.rcs.c rsyncfile.c @@ -42,4 +42,7 @@ DPADD= ${LIBCRYPTO} ${LIBZ} LDADD= -lcrypto -lz +SCRIPTS= cpasswd.sh +MAN= csup.1 cpasswd.1 + .include ==== //depot/projects/fdt/contrib/csup/TODO#2 (text) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/contrib/csup/TODO,v 1.2 2009/01/05 15:18:16 lulf Exp $ +$FreeBSD: src/contrib/csup/TODO,v 1.3 2010/02/02 05:57:42 lulf Exp $ BUGS: @@ -17,7 +17,6 @@ MISSING FEATURES: -- Add support for authentication. - Add support for shell commands sent by the server. - Add missing support for various CVSup options : -D, -a (requires authentication support), -e and -E (requires shell commands support) ==== //depot/projects/fdt/contrib/csup/config.h#2 (text) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/contrib/csup/config.h,v 1.1.1.2 2006/03/14 03:51:12 mux Exp $ + * $FreeBSD: src/contrib/csup/config.h,v 1.2 2010/02/02 05:57:42 lulf Exp $ */ #ifndef _CONFIG_H_ #define _CONFIG_H_ @@ -108,6 +108,7 @@ struct chan *chan1; struct stream *server; fattr_support_t fasupport; + int reqauth; }; struct config *config_init(const char *, struct coll *, int); ==== //depot/projects/fdt/contrib/csup/csup.1#2 (text) ==== @@ -22,7 +22,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $Id: cvsup.1,v 1.70 2003/03/04 18:23:46 jdp Exp $ -.\" $FreeBSD: src/contrib/csup/csup.1,v 1.2 2009/01/07 18:37:07 lulf Exp $ +.\" $FreeBSD: src/contrib/csup/csup.1,v 1.3 2010/02/02 05:57:42 lulf Exp $ .\" .Dd February 1, 2006 .Os FreeBSD @@ -32,7 +32,7 @@ .Nd network distribution package for CVS repositories .Sh SYNOPSIS .Nm -.Op Fl 146ksvzZ +.Op Fl 146aksvzZ .Op Fl A Ar addr .Op Fl b Ar base .Op Fl c Ar collDir @@ -106,6 +106,12 @@ Forces .Nm to use IPv6 addresses only. +.It Fl a +Requires the server to authenticate itself (prove its identity) to +the client. If authentication of the server fails, the update is +canceled. See +.Sx AUTHENTICATION , +below. .It Fl A Ar addr Specifies a local address to bind to when connecting to the server. The local address might be a hostname or a numeric host address string @@ -793,6 +799,102 @@ .It .Pa /bar/stool/src-all/refuse.cvs:RELENG_3 .El +.Sh AUTHENTICATION +.Nm +implements an optional authentication mechanism which can be used by the +client and server to verify each other's identities. +Public CVSup servers normally do not enable authentication. +.Nm +users may ignore this section unless they have been informed +that authentication is required by the administrator of their server. +.Pp +The authentication subsystem uses a +challenge-response protocol which is immune to packet sniffing and +replay attacks. No passwords are sent over the network in either +direction. Both the client and the server can independently verify +the identities of each other. +.Pp +The file +.Li $ Ns Ev HOME Ns Pa /.csup/auth +holds the information used for authentication. This file contains a +record for each server that the client is allowed to access. Each +record occupies one line in the file. Lines beginning with +.Ql # +are ignored, as are lines containing only white space. White space is +significant everywhere else in the file. Fields are separated by +.Ql \&: +characters. +.Pp +Each record of the file has the following form: +.Bd -literal -offset indent +.Sm off +.Xo Ar serverName No : Ar clientName No : +.Ar password No : Ar comment +.Xc +.Sm on +.Ed +.Pp +All fields must be present even if some of them are empty. +.Ar ServerName +is the name of the server to which the record applies. By convention, +it is the canonical fully-qualified domain name of the server, e.g., +.Ql CVSup177.FreeBSD.ORG . +This must agree with the server's own idea of its name. The name is +case-insensitive. +.Pp +.Ar ClientName +is the name the client uses to gain access to the server. By +convention, e-mail addresses are used for all client names, e.g., +.Ql BillyJoe@FreeBSD.ORG . +Client names are case-insensitive. +.Pp +.Ar Password +is a secret string of characters that the client uses to prove its +identity. It may not contain any +.Ql \&: +or newline characters. +.Pp +.Ar Comment +may contain any additional information to identify the record. It +is not interpreted by the program. +.Pp +To set up authentication for a given server, one must perform the +following steps: +.Bl -enum +.It +Obtain the official +.Ar serverName +from the administrator of the server or from some other source. +.It +Choose an appropriate +.Ar clientName . +It should be in the form of a valid e-mail address, to make it easy +for the server administrator to contact the user if necessary. +.It +Choose an arbitrary secret +.Ar password . +.It +Run the +.Nm cpasswd +utility, and type in the +.Ar password +when prompted for it. The utility will print out a line to send +to the server administrator, and instruct you how to modify your +.Li $ Ns Ev HOME Ns Pa /.csup/auth +file. You should use a secure channel to send the line to the +server administrator. +.El +.Pp +Since +.Li $ Ns Ev HOME Ns Pa /.csup/auth +contains passwords, you should ensure that it is not readable by +anyone except yourself. +.Pp +Authentication works independently in both directions. The server +administrator controls whether you must prove your identity. +You control whether to check the server's identity, by means of the +.Fl a +command line option. .Sh csup AND FIREWALLS In its default mode, .Nm @@ -865,6 +967,7 @@ List files. .El .Sh SEE ALSO +.Xr cpasswd 1 , .Xr cvs 1 , .Xr rcsintro 1 , .Xr ssh 1 . ==== //depot/projects/fdt/contrib/csup/main.c#2 (text) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/contrib/csup/main.c,v 1.1.1.2 2006/03/14 03:51:11 mux Exp $ + * $FreeBSD: src/contrib/csup/main.c,v 1.2 2010/02/02 05:57:42 lulf Exp $ */ #include @@ -60,6 +60,8 @@ "(same as \"-r 0\")"); lprintf(-1, USAGE_OPTFMT, "-4", "Force usage of IPv4 addresses"); lprintf(-1, USAGE_OPTFMT, "-6", "Force usage of IPv6 addresses"); + lprintf(-1, USAGE_OPTFMT, "-a", + "Require server to authenticate itself to us"); lprintf(-1, USAGE_OPTFMT, "-A addr", "Bind local socket to a specific address"); lprintf(-1, USAGE_OPTFMT, "-b base", @@ -107,7 +109,7 @@ struct stream *lock; char *argv0, *file, *lockfile; int family, error, lockfd, lflag, overridemask; - int c, i, deletelim, port, retries, status; + int c, i, deletelim, port, retries, status, reqauth; time_t nexttry; error = 0; @@ -124,9 +126,10 @@ lockfile = NULL; override = coll_new(NULL); overridemask = 0; + reqauth = 0; while ((c = getopt(argc, argv, - "146A:b:c:d:gh:i:kl:L:p:P:r:svzZ")) != -1) { + "146aA:b:c:d:gh:i:kl:L:p:P:r:svzZ")) != -1) { switch (c) { case '1': retries = 0; @@ -137,6 +140,10 @@ case '6': family = AF_INET6; break; + case 'a': + /* Require server authentication */ + reqauth = 1; + break; case 'A': error = getaddrinfo(optarg, NULL, NULL, &res); if (error) { @@ -303,6 +310,7 @@ config->laddrlen = laddrlen; } config->deletelim = deletelim; + config->reqauth = reqauth; lprintf(2, "Connecting to %s\n", config->host); i = 0; ==== //depot/projects/fdt/contrib/csup/proto.c#2 (text) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/contrib/csup/proto.c,v 1.3 2009/02/15 13:22:21 lulf Exp $ + * $FreeBSD: src/contrib/csup/proto.c,v 1.4 2010/02/02 05:57:42 lulf Exp $ */ #include @@ -45,6 +45,7 @@ #include #include +#include "auth.h" #include "config.h" #include "detailer.h" #include "fattr.h" @@ -74,7 +75,6 @@ static int proto_waitconnect(int); static int proto_greet(struct config *); static int proto_negproto(struct config *); -static int proto_login(struct config *); static int proto_fileattr(struct config *); static int proto_xchgcoll(struct config *); static struct mux *proto_mux(struct config *); @@ -251,56 +251,6 @@ return (STATUS_FAILURE); } -static int -proto_login(struct config *config) -{ - struct stream *s; - char hostbuf[MAXHOSTNAMELEN]; - char *line, *login, *host, *cmd, *realm, *challenge, *msg; - int error; - - s = config->server; - error = gethostname(hostbuf, sizeof(hostbuf)); - hostbuf[sizeof(hostbuf) - 1] = '\0'; - if (error) - host = NULL; - else - host = hostbuf; - login = getlogin(); - proto_printf(s, "USER %s %s\n", login != NULL ? login : "?", - host != NULL ? host : "?"); - stream_flush(s); - line = stream_getln(s, NULL); - cmd = proto_get_ascii(&line); - realm = proto_get_ascii(&line); - challenge = proto_get_ascii(&line); - if (challenge == NULL || line != NULL) - goto bad; - if (strcmp(realm, ".") != 0 || strcmp(challenge, ".") != 0) { - lprintf(-1, "Authentication required by the server and not " - "supported by client\n"); - return (STATUS_FAILURE); - } - proto_printf(s, "AUTHMD5 . . .\n"); - stream_flush(s); - line = stream_getln(s, NULL); - cmd = proto_get_ascii(&line); - if (cmd == NULL || line == NULL) - goto bad; - if (strcmp(cmd, "OK") == 0) - return (STATUS_SUCCESS); - if (strcmp(cmd, "!") == 0) { - msg = proto_get_rest(&line); - if (msg == NULL) - goto bad; - lprintf(-1, "Server error: %s\n", msg); - return (STATUS_FAILURE); - } -bad: - lprintf(-1, "Invalid server reply to AUTHMD5\n"); - return (STATUS_FAILURE); -} - /* * File attribute support negotiation. */ @@ -601,7 +551,7 @@ if (status == STATUS_SUCCESS) status = proto_negproto(config); if (status == STATUS_SUCCESS) - status = proto_login(config); + status = auth_login(config); if (status == STATUS_SUCCESS) status = proto_fileattr(config); if (status == STATUS_SUCCESS) ==== //depot/projects/fdt/contrib/netcat/FREEBSD-vendor#3 (text+ko) ==== @@ -1,5 +1,5 @@ -# $FreeBSD: src/contrib/netcat/FREEBSD-vendor,v 1.4 2009/12/08 19:12:38 delphij Exp $ +# $FreeBSD: src/contrib/netcat/FREEBSD-vendor,v 1.5 2010/02/02 00:30:44 delphij Exp $ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL: http://www.openbsd.org/ -Version: 4.5 +Version: 4.6 License: BSD ==== //depot/projects/fdt/etc/defaults/rc.conf#5 (text+ko) ==== @@ -15,7 +15,7 @@ # For a more detailed explanation of all the rc.conf variables, please # refer to the rc.conf(5) manual page. # -# $FreeBSD: src/etc/defaults/rc.conf,v 1.367 2010/01/17 08:41:07 ume Exp $ +# $FreeBSD: src/etc/defaults/rc.conf,v 1.368 2010/02/03 16:18:42 ume Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -460,6 +460,10 @@ # Now this works only for IPv6 link local # multicast addrs. rtsol_flags="" # Flags to IPv6 router solicitation. +rtsold_enable="NO" # Set to YES to enable an IPv6 router + # solicitation daemon. +rtsold_flags="-a" # Flags to an IPv6 router solicitation + # daemon. rtadvd_enable="NO" # Set to YES to enable an IPv6 router # advertisement daemon. If set to YES, # this router becomes a possible candidate ==== //depot/projects/fdt/etc/network.subr#3 (text+ko) ==== @@ -22,7 +22,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/network.subr,v 1.205 2009/12/29 21:06:49 jhb Exp $ +# $FreeBSD: src/etc/network.subr,v 1.206 2010/02/03 16:18:42 ume Exp $ # # @@ -882,7 +882,9 @@ { if ipv6_autoconfif $1; then ifconfig $1 inet6 accept_rtadv up - rtsol ${rtsol_flags} $1 + if ! checkyesno rtsold_enable; then + rtsol ${rtsol_flags} $1 + fi fi } ==== //depot/projects/fdt/etc/rc.d/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.102 2009/12/02 15:05:26 ume Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.103 2010/02/03 16:18:42 ume Exp $ .include @@ -30,7 +30,7 @@ powerd power_profile ppp pppoed pwcheck \ quota \ random rarpd resolv rfcomm_pppd_server root \ - route6d routed routing rpcbind rtadvd rwho \ + route6d routed routing rpcbind rtadvd rtsold rwho \ savecore sdpd securelevel sendmail \ serial sppp statd static_arp stf swap1 \ syscons sysctl syslogd \ ==== //depot/projects/fdt/etc/rc.d/ntpdate#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/ntpdate,v 1.16 2006/07/20 10:07:34 flz Exp $ +# $FreeBSD: src/etc/rc.d/ntpdate,v 1.17 2010/01/30 16:34:52 ume Exp $ # # PROVIDE: ntpdate @@ -19,7 +19,9 @@ if [ -z "$ntpdate_hosts" -a -f ${ntpdate_config} ]; then ntpdate_hosts=`awk ' /^server[ \t]*127.127/ {next} - /^(server|peer)/ {print $2} + /^(server|peer)/ { + if ($2 ~/^-/) {print $3} + else {print $2}} ' < ${ntpdate_config}` fi if [ -n "$ntpdate_hosts" -o -n "$rc_flags" ]; then ==== //depot/projects/fdt/etc/services#3 (text+ko) ==== @@ -16,7 +16,7 @@ # Kerberos services are for Kerberos v4, and are unofficial. Sites running # v5 should uncomment v5 entries and comment v4 entries. # -# $FreeBSD: src/etc/services,v 1.116 2010/01/27 11:23:21 edwin Exp $ +# $FreeBSD: src/etc/services,v 1.117 2010/02/01 13:30:06 ume Exp $ # From: @(#)services 5.8 (Berkeley) 5/9/91 # # WELL KNOWN PORT NUMBERS @@ -2225,6 +2225,8 @@ nuts_dem 4132/udp #NUTS Daemon nuts_bootp 4133/tcp #NUTS Bootp Server nuts_bootp 4133/udp #NUTS Bootp Server +sieve 4190/tcp #ManageSieve Protocol +sieve 4190/udp #ManageSieve Protocol rwhois 4321/tcp #Remote Who Is rwhois 4321/udp #Remote Who Is unicall 4343/tcp ==== //depot/projects/fdt/gnu/usr.bin/binutils/Makefile.inc#2 (text+ko) ==== @@ -1,9 +1,5 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/Makefile.inc,v 1.9 2006/09/12 19:24:01 obrien Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/Makefile.inc,v 1.10 2010/02/03 02:39:08 imp Exp $ -.if (${TARGET_ARCH} == "alpha") -WARNS?= 2 -.else WARNS?= 3 -.endif .include "../Makefile.inc" ==== //depot/projects/fdt/gnu/usr.bin/binutils/libbfd/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/libbfd/Makefile,v 1.33 2004/10/24 15:32:25 ru Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/libbfd/Makefile,v 1.34 2010/02/03 18:29:35 imp Exp $ .include "../Makefile.inc0" @@ -11,8 +11,7 @@ section.c srec.c stab-syms.c stabs.c syms.c targets.c tekhex.c \ targmatch.h dwarf1.c dwarf2.c config.h bfdver.h bfdio.c simple.c WARNS?= 0 -.if (${TARGET_ARCH} == "alpha" || ${TARGET_ARCH} == "ia64" || \ - ${TARGET_ARCH} == "sparc64") +.if (${TARGET_ARCH} == "ia64" || ${TARGET_ARCH} == "sparc64") WARNS?= 2 .endif CFLAGS+= -D_GNU_SOURCE ==== //depot/projects/fdt/gnu/usr.bin/groff/tmac/mdoc.local#3 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.72 2010/01/15 14:05:06 ru Exp $ +.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.73 2010/02/01 20:54:45 joerg Exp $ .\" .\" %beginstrip% . @@ -46,6 +46,7 @@ .ds doc-str-Lb-libelf ELF Parsing Library (libelf, \-lelf) .ds doc-str-Lb-libfetch File Transfer Library (libfetch, \-lfetch) .ds doc-str-Lb-libgeom Userland API Library for kernel GEOM subsystem (libgeom, \-lgeom) +.ds doc-str-Lb-libgpib General-Purpose Instrument Bus (GPIB) library (libgpib, \-lgpib) .ds doc-str-Lb-libipx IPX Address Conversion Support Library (libipx, \-lipx) .ds doc-str-Lb-libjail Jail Library (libjail, \-ljail) .ds doc-str-Lb-libkiconv Kernel side iconv library (libkiconv, \-lkiconv) ==== //depot/projects/fdt/lib/Makefile#5 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 -# $FreeBSD: src/lib/Makefile,v 1.242 2010/01/25 18:52:47 yongari Exp $ +# $FreeBSD: src/lib/Makefile,v 1.243 2010/01/30 04:24:03 marcel Exp $ .include @@ -33,8 +33,8 @@ libtacplus libutil ${_libypclnt} libalias libarchive \ ${_libatm} libbegemot ${_libbluetooth} ${_libbsnmp} libbz2 \ libcalendar libcam libcompat libdevinfo libdevstat libdisk \ - libdwarf libedit libexpat libfetch libftpio libgeom ${_libgpib} \ - ${_libgssapi} ${_librpcsec_gss} libipsec \ + libdwarf libedit ${_libefi} libexpat libfetch libftpio libgeom \ + ${_libgpib} ${_libgssapi} ${_librpcsec_gss} libipsec \ ${_libipx} libjail libkiconv libmagic libmemstat ${_libmilter} \ ${_libmp} ${_libncp} ${_libngatm} libopie libpam libpcap \ ${_libpmc} libproc librt ${_libsdp} ${_libsm} ${_libsmb} \ @@ -104,6 +104,7 @@ .endif .if ${MACHINE_ARCH} == "ia64" +_libefi= libefi _libsmb= libsmb .endif ==== //depot/projects/fdt/lib/libc/gen/devname.c#2 (text+ko) ==== @@ -31,15 +31,12 @@ static char sccsid[] = "@(#)devname.c 8.2 (Berkeley) 4/29/95"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/devname.c,v 1.11 2007/01/09 00:27:53 imp Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/devname.c,v 1.12 2010/01/31 14:51:04 ed Exp $"); #include #include -#include -#include #include -#include #include #include #include @@ -49,22 +46,22 @@ { int i; size_t j; - char *r; + + if (dev == NODEV || !(S_ISCHR(type) || S_ISBLK(dev))) { + strlcpy(buf, "#NODEV", len); + return (buf); + } - if ((type & S_IFMT) == S_IFCHR) { + if (S_ISCHR(type)) { j = len; i = sysctlbyname("kern.devname", buf, &j, &dev, sizeof (dev)); if (i == 0) - return (buf); + return (buf); } /* Finally just format it */ - if (dev == NODEV) - r = "#NODEV"; - else - r = "#%c:%d:0x%x"; - snprintf(buf, len, r, - (type & S_IFMT) == S_IFCHR ? 'C' : 'B', major(dev), minor(dev)); + snprintf(buf, len, "#%c:%d:0x%x", + S_ISCHR(type) ? 'C' : 'B', major(dev), minor(dev)); return (buf); } @@ -73,5 +70,5 @@ { static char buf[SPECNAMELEN + 1]; - return(devname_r(dev, type, buf, sizeof(buf))); + return (devname_r(dev, type, buf, sizeof(buf))); } ==== //depot/projects/fdt/lib/libc/gen/getutxent.3#3 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/gen/getutxent.3,v 1.7 2010/01/23 17:58:40 ed Exp $ +.\" $FreeBSD: src/lib/libc/gen/getutxent.3,v 1.8 2010/02/03 19:31:02 ed Exp $ .\" .Dd January 8, 2010 .Os @@ -426,8 +426,10 @@ .Fa ut_type . This prevents the need for special utility functions to update the other databases, such as the +.Fn updlastlogx +and .Fn updwtmpx -function which is often available in other implementations. +functions which are available in other implementations. It also tries to replace .Dv DEAD_PROCESS entries in the active sessions database when storing ==== //depot/projects/fdt/lib/libc/gen/rand48.3#2 (text+ko) ==== @@ -10,9 +10,9 @@ .\" to anyone/anything when using this software. .\" .\" @(#)rand48.3 V1.0 MB 8 Oct 1993 -.\" $FreeBSD: src/lib/libc/gen/rand48.3,v 1.17 2005/01/20 09:17:02 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/rand48.3,v 1.19 2010/02/02 19:44:51 gavin Exp $ .\" -.Dd October 8, 1993 +.Dd February 2, 2010 .Dt RAND48 3 .Os .Sh NAME @@ -57,7 +57,7 @@ particular formula employed is r(n+1) = (a * r(n) + c) mod m where the default values are -for the multiplicand a = 0xfdeece66d = 25214903917 and +for the multiplicand a = 0x5deece66d = 25214903917 and the addend c = 0xb = 11. The modulo is always fixed at m = 2 ** 48. r(n) is called the seed of the random number generator. ==== //depot/projects/fdt/lib/libc/mips/sys/ptrace.S#2 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/mips/sys/ptrace.S,v 1.3 2008/04/26 12:08:02 imp Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/mips/sys/ptrace.S,v 1.5 2010/02/03 20:54:04 rrs Exp $"); #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) @@ -42,14 +42,23 @@ #endif /* LIBC_SCCS and not lint */ LEAF(ptrace) + .frame sp, 40, ra + .mask 0x80000000, -8 #ifdef __ABICALLS__ .set noreorder .cpload t9 .set reorder #endif + subu sp, sp, 40 + sw ra, 32(sp) +#ifdef __ABICALLS__ + .cprestore 16 +#endif la t9, _C_LABEL(__error) # locate address of errno jalr t9 sw zero, 0(v0) + lw ra, 32(sp) + addu sp, sp, 40 li v0, SYS_ptrace syscall >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Feb 3 22:53:25 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BC96A10656A3; Wed, 3 Feb 2010 22:53:24 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80F5E1065695 for ; Wed, 3 Feb 2010 22:53:24 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6D6E98FC16 for ; Wed, 3 Feb 2010 22:53:24 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13MrOAn030482 for ; Wed, 3 Feb 2010 22:53:24 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13MrOD6030480 for perforce@freebsd.org; Wed, 3 Feb 2010 22:53:24 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 3 Feb 2010 22:53:24 GMT Message-Id: <201002032253.o13MrOD6030480@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174286 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 22:53:25 -0000 http://p4web.freebsd.org/chv.cgi?CH=174286 Change 174286 by rwatson@rwatson_vimage_client on 2010/02/03 22:52:48 Always do one "warmup" run of every test before the measured loops. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#15 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#15 (text+ko) ==== @@ -860,6 +860,10 @@ if (the_test == NULL) usage(); + /* + * Run one warmup, then do the real thing (loops) times. + */ + the_test->t_func(iterations); for (k = 0; k < loops; k++) { the_test->t_func(iterations); timespecsub(&ts_end, &ts_start); From owner-p4-projects@FreeBSD.ORG Thu Feb 4 00:50:22 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 534561065676; Thu, 4 Feb 2010 00:50:22 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17FAC106566C for ; Thu, 4 Feb 2010 00:50:22 +0000 (UTC) (envelope-from jona@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 04EA28FC08 for ; Thu, 4 Feb 2010 00:50:22 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o140oLAa052178 for ; Thu, 4 Feb 2010 00:50:21 GMT (envelope-from jona@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o140oLbu052176 for perforce@freebsd.org; Thu, 4 Feb 2010 00:50:21 GMT (envelope-from jona@FreeBSD.org) Date: Thu, 4 Feb 2010 00:50:21 GMT Message-Id: <201002040050.o140oLbu052176@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jona@FreeBSD.org using -f From: Jonathan Anderson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174292 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 00:50:22 -0000 http://p4web.freebsd.org/chv.cgi?CH=174292 Change 174292 by jona@jona-belle-freebsd8 on 2010/02/04 00:49:41 Removed lch_start_libs and lch_startfd_libs, which have no more implementation Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#13 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#13 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#12 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#13 $ */ #ifndef _LIBCAPSICUM_H_ @@ -131,13 +131,8 @@ */ int lch_start(const char *sandbox, char *const argv[], u_int flags, struct lc_fdlist *fds, struct lc_sandbox **lcspp); -int lch_start_libs(const char *sandbox, char *const argv[], u_int flags, - struct lc_fdlist *fds, struct lc_sandbox **lcspp); int lch_startfd(int fd_sandbox, const char *binname, char *const argv[], u_int flags, struct lc_fdlist *fds, struct lc_sandbox **lcspp); -int lch_startfd_libs(int fd_sandbox, const char *binname, - char *const argv[], u_int flags, struct lc_fdlist *fds, - struct lc_sandbox **lcspp); void lch_stop(struct lc_sandbox *lcsp); /* From owner-p4-projects@FreeBSD.ORG Fri Feb 5 00:43:22 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BBF5F1065676; Fri, 5 Feb 2010 00:43:21 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8079F106566C for ; Fri, 5 Feb 2010 00:43:21 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6EBD08FC14 for ; Fri, 5 Feb 2010 00:43:21 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o150hLmW035213 for ; Fri, 5 Feb 2010 00:43:21 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o150hLLn035211 for perforce@freebsd.org; Fri, 5 Feb 2010 00:43:21 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Fri, 5 Feb 2010 00:43:21 GMT Message-Id: <201002050043.o150hLLn035211@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174337 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 00:43:22 -0000 http://p4web.freebsd.org/chv.cgi?CH=174337 Change 174337 by rwatson@rwatson_vimage_client on 2010/02/05 00:42:38 Add missing free() call to lch_stop(). Spotted by: kris Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#17 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#17 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#16 $ + * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#17 $ */ #include @@ -367,6 +367,7 @@ lcsp->lcs_fd_sock = -1; lcsp->lcs_fd_procdesc = -1; lcsp->lcs_pid = -1; + free(lcsp); } int From owner-p4-projects@FreeBSD.ORG Fri Feb 5 00:46:25 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0E8F910656C1; Fri, 5 Feb 2010 00:46:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C74911065676 for ; Fri, 5 Feb 2010 00:46:24 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9C20F8FC1D for ; Fri, 5 Feb 2010 00:46:24 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o150kOvE035525 for ; Fri, 5 Feb 2010 00:46:24 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o150kOOU035523 for perforce@freebsd.org; Fri, 5 Feb 2010 00:46:24 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Fri, 5 Feb 2010 00:46:24 GMT Message-Id: <201002050046.o150kOOU035523@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174338 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 00:46:25 -0000 http://p4web.freebsd.org/chv.cgi?CH=174338 Change 174338 by rwatson@rwatson_vimage_client on 2010/02/05 00:46:03 - Do not print process descriptor pid twice - Handle vnode, fifo, pts and procdesc with default case for network protocol Submitted by: antoine Add new capability rights so that procstat can print them, update copyright. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/usr.bin/procstat/procstat_files.c#15 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/usr.bin/procstat/procstat_files.c#15 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007-2009 Robert N. M. Watson + * Copyright (c) 2007-2010 Robert N. M. Watson * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -168,6 +168,7 @@ { CAP_MAC_GET, "mg" }, { CAP_MAC_SET, "ms" }, { CAP_ACCEPT, "at" }, + { CAP_CONNECT, "co" }, { CAP_BIND, "bd" }, { CAP_GETSOCKOPT, "gs" }, { CAP_SETSOCKOPT, "ss" }, @@ -182,6 +183,17 @@ { CAP_PDGETPID, "pg" }, { CAP_PDWAIT, "pw" }, { CAP_PDKILL, "pk" }, + { CAP_MAPEXEC, "me" }, + { CAP_TTYHOOK, "th" }, + { CAP_FCHDIR, "cd" }, + { CAP_FSCK, "fk" }, + { CAP_ATBASE, "ab" }, + { CAP_ABSOLUTEPATH, "ap" }, + { CAP_CREATE, "cr" }, + { CAP_DELETE, "de" }, + { CAP_MKDIR, "md" }, + { CAP_RMDIR, "rm" }, + { CAP_MKFIFO, "mf" }, }; static const u_int cap_desc_count = sizeof(cap_desc) / sizeof(cap_desc[0]); @@ -414,22 +426,12 @@ } switch (kif->kf_type) { - case KF_TYPE_VNODE: - case KF_TYPE_FIFO: - case KF_TYPE_PTS: - printf("%-3s ", "-"); - break; - case KF_TYPE_SOCKET: printf("%-3s ", protocol_to_string(kif->kf_sock_domain, kif->kf_sock_type, kif->kf_sock_protocol)); break; - case KF_TYPE_PROCDESC: - printf("%-3s %d", "-", kif->kf_pid); - break; - default: printf("%-3s ", "-"); } From owner-p4-projects@FreeBSD.ORG Fri Feb 5 04:51:30 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 96CB8106568F; Fri, 5 Feb 2010 04:51:30 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 379D61065672 for ; Fri, 5 Feb 2010 04:51:30 +0000 (UTC) (envelope-from gabor@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 275718FC17 for ; Fri, 5 Feb 2010 04:51:30 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o154pUNd079672 for ; Fri, 5 Feb 2010 04:51:30 GMT (envelope-from gabor@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o154pU3l079670 for perforce@freebsd.org; Fri, 5 Feb 2010 04:51:30 GMT (envelope-from gabor@freebsd.org) Date: Fri, 5 Feb 2010 04:51:30 GMT Message-Id: <201002050451.o154pU3l079670@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@freebsd.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174343 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 04:51:30 -0000 http://p4web.freebsd.org/chv.cgi?CH=174343 Change 174343 by gabor@gabor_aspire on 2010/02/05 04:51:22 - Remove custom merge sort; use qsort() instead of reinventing the wheel - Remove swapping to disk; we have to choose between performance or memory consumption and we prefer the former - Make it WARNS=6 clean Affected files ... .. //depot/projects/soc2008/gabor_textproc/newsort/Makefile#2 edit .. //depot/projects/soc2008/gabor_textproc/newsort/coll.c#11 edit .. //depot/projects/soc2008/gabor_textproc/newsort/file.c#4 edit .. //depot/projects/soc2008/gabor_textproc/newsort/msort.c#3 delete .. //depot/projects/soc2008/gabor_textproc/newsort/sort.c#5 edit .. //depot/projects/soc2008/gabor_textproc/newsort/sort.h#3 edit Differences ... ==== //depot/projects/soc2008/gabor_textproc/newsort/Makefile#2 (text+ko) ==== @@ -1,7 +1,9 @@ PROG= sort -SRCS= coll.c file.c mem.c msort.c sort.c +SRCS= coll.c file.c mem.c sort.c + +WARNS= 6 -CFLAGS+= -std=c99 -Wall -pedantic +CFLAGS+= --param max-inline-insns-single=64 .if !defined(WITHOUT_NLS) NLS+= hu_HU.ISO8859-2 ==== //depot/projects/soc2008/gabor_textproc/newsort/coll.c#11 (text+ko) ==== @@ -107,7 +107,7 @@ *preproc(const wchar_t *s) { wchar_t *ret, *sp, *ep; size_t len; - int i; + unsigned int i; if (kflag && (sfield > 1)) { sp = wcschr(s, field_sep); @@ -150,11 +150,13 @@ * the underlying collate functions, which done the actual comparison. */ int -coll(const wchar_t *s1, const wchar_t *s2) { - wchar_t *ps1, *ps2; +coll(const void *s1, const void *s2) { + const wchar_t *const *ss1 = (const wchar_t * const *)s1; + const wchar_t *const *ss2 = (const wchar_t * const *)s2; + wchar_t *ps1, *ps2; - ps1 = preproc(s1); - ps2 = preproc(s2); + ps1 = preproc(*ss1); + ps2 = preproc(*ss2); if (rflag) { wchar_t *tmp = ps1; @@ -324,7 +326,7 @@ len = wcslen(s); ls = sort_malloc(sizeof(wint_t) * (len + 1)); - for (int i = 0; i < len; i++) + for (unsigned int i = 0; i < len; i++) ls[i] = towlower(s[i]); if (months == NULL) { @@ -340,7 +342,7 @@ continue; } m[len] = L'\0'; - for (int j = 0; j < len; j++) + for (unsigned int j = 0; j < len; j++) m[j] = towlower(m[j]); months[i] = m; } ==== //depot/projects/soc2008/gabor_textproc/newsort/file.c#4 (text+ko) ==== @@ -37,27 +37,11 @@ #include "sort.h" /* - * Prints the internal buffer to a file or to stdout if - * "-" is given as output filename. - */ -void -print(char *fn) { - FILE *file = NULL; - - file = openfile(fn, "w"); - - for (int i = 0; i < count; i++) { - fprintf(file, "%ls%s", list[i], zflag ? "\0" : "\n"); - } - fclose(file); -} - -/* * Checks if the given file is sorted. Stops at the first disorder, * prints the disordered line and returns 1. */ int -check(char *fn) { +check(const char *fn) { int pos = 1; wchar_t *s1, *s2, *tmp; FILE *file; @@ -94,19 +78,10 @@ * opened. */ FILE -*openfile(char *fn, char *mode) { +*openfile(const char *fn, const char *mode) { FILE *file; - int len, fd; - if (fn == NULL) { - tempfiles = sort_realloc(tempfiles, sizeof(char *) * ++tempno); - len = strlen(tmpdir) + strlen(TMPPAT); - tempfiles[tempno - 1] = sort_malloc(sizeof(char) * (len + 1)); - sprintf(tempfiles[tempno - 1], "%s" TMPPAT, tmpdir); - fd = mkstemp(tempfiles[tempno - 1]); - if ((file = fdopen(fd, "w")) == NULL) - err(2, NULL); - } else if (strcmp(fn, "-") == 0) { + if (strcmp(fn, "-") == 0) { return (stdout); } else { if((file = fopen(fn, mode)) == NULL) @@ -132,35 +107,12 @@ list = sort_realloc(list, sizeof(struct qentry*) * ++listlen); } list[count++] = item; - if ((bufcnt -= sizeof(item)) < 0) - return (1); } fclose (file); return (0); } /* - * Calculates the optimal buffer size. - */ -int -optbufsize(char *fn) { - struct stat st; - - if (bufsiz > 0) - return (bufsiz); - - if (stat(fn, &st) != 0) - err(2, NULL); - - if (st.st_size/OPT_SLICES < OPT_BUFSIZE) - return (OPT_BUFSIZE); - else if (st.st_size/OPT_SLICES > MAX_BUFSIZE) - return (MAX_BUFSIZE); - else - return (st.st_size/OPT_SLICES); -} - -/* * Prints the content of f1 to f2, which can also be * stdout. */ @@ -183,7 +135,7 @@ * stdout. */ void -merge_files(char *fn1, char *fn2, char *fn3) { +merge_files(const char *fn1, const char *fn2, const char *fn3) { FILE *f1, *f2, *f3; wchar_t *s1, *s2, *tmp; size_t len; ==== //depot/projects/soc2008/gabor_textproc/newsort/sort.c#5 (text+ko) ==== @@ -51,7 +51,7 @@ * Default messages to use when NLS is disabled or no catalogue * is found. */ -char *nlsstr[] = { +const char *nlsstr[] = { "", /* 1*/ "you cannot use -%c and -%c together", /* 2*/ "extra argument not allowed with -c" @@ -60,11 +60,9 @@ extern char *__progname; -int count, bufcnt, listlen = 0, tempno = 0; +int count, listlen = 0; wchar_t **list; wchar_t field_sep = L' '; -char **tempfiles; -char *tmpdir = "/var/tmp"; unsigned long sfield, lfield; unsigned long long bufsiz = 0; bool cflag; @@ -100,7 +98,7 @@ {"reverse", no_argument, NULL, 'r'}, {"buffer-size", required_argument, NULL, 'S'}, {"field-separator", required_argument, NULL, 't'}, - {"temporary-directory", required_argument, NULL, 'T'}, +// {"temporary-directory", required_argument, NULL, 'T'}, {"unique", no_argument, NULL, 'u'}, {"version", no_argument, NULL, 'V'}, {"zero-terminated", no_argument, NULL, 'z'}, @@ -118,22 +116,12 @@ main(int argc, char *argv[]) { char c; char *sptr; - char *outfile = "-"; - struct stat st; + char *outfile; + + outfile = strdup("-"); setlocale(LC_ALL, ""); - if ((sptr = getenv("TMPDIR")) != NULL) { - stat(sptr, &st); - - if (!S_ISDIR(st.st_mode)) { - errno = ENOTDIR; - err(2, NULL); - } - - tmpdir = sptr; - } - while (((c = getopt_long(argc, argv, OPTIONS, long_options, NULL)) != -1)) { switch (c) { case 'b': @@ -226,17 +214,6 @@ printf("field_sep = %lc\n", field_sep); } break; - case 'T': - stat(optarg, &st); - - if (!S_ISDIR(st.st_mode)) { - errno = ENOTDIR; - err(2, NULL); - } - - tmpdir = sort_malloc(sizeof(char) * (strlen(optarg) + 2)); - strlcpy(tmpdir, optarg, strlen(optarg) + 1); - break; case 'u': uflag = true; break; @@ -287,44 +264,15 @@ FILE *file; file = openfile(*argv, "r"); - bufcnt = optbufsize(*argv); - while (procfile(file)) { - list = merge_sort(list, count); - print(NULL); - file = openfile(*argv, "r"); - for (int i = 0; i < count; i++) - free(list[i]); - free(list); - count = 0; - } - list = merge_sort(list, count); - print(NULL); + procfile(file); --argc; ++argv; } - if (tempno == 0) { - list = merge_sort(list, count); - print(outfile); - } else { - for (int i = 0; i < tempno;) { - if (i == (tempno - 2)) { - merge_files(tempfiles[i], tempfiles[i + 1], "-"); - unlink(tempfiles[i]); - unlink(tempfiles[i + 1]); - break; - } else if ( i == (tempno - 1)) { - printfile(openfile(tempfiles[i], "r"), stdout); - unlink(tempfiles[i]); - break; - } else { - merge_files(tempfiles[i], tempfiles[i + 1], NULL); - unlink(tempfiles[i]); - unlink(tempfiles[i + 1]); - i += 2; - } - } - } + qsort(list, count, sizeof(wchar_t *), coll); + + for (int i = 0; i < count; i++) + printf("%ls\n", list[i]); return (0); } else if (cflag) { ==== //depot/projects/soc2008/gabor_textproc/newsort/sort.h#3 (text+ko) ==== @@ -43,7 +43,7 @@ #define getstr(n) catgets(catalog, 1, n, nlsstr[n]) #endif -extern char *nlsstr[]; +extern const char *nlsstr[]; /* * sort.c @@ -59,16 +59,14 @@ /* * coll.c */ -int coll(const wchar_t *, const wchar_t *); +int coll(const void *, const void *); /* * file.c */ -int check(char *); -void merge_files(char *, char *, char *); -FILE *openfile(char *, char *); -int optbufsize(char *); -void print(char *); +int check(const char *); +void merge_files(const char *, const char *, const char *); +FILE *openfile(const char *, const char *); void printfile(FILE *, FILE *); int procfile(FILE *); From owner-p4-projects@FreeBSD.ORG Fri Feb 5 06:00:39 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A9AC11065698; Fri, 5 Feb 2010 06:00:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55CF81065695 for ; Fri, 5 Feb 2010 06:00:39 +0000 (UTC) (envelope-from gabor@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4661A8FC0A for ; Fri, 5 Feb 2010 06:00:39 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o1560dKe085749 for ; Fri, 5 Feb 2010 06:00:39 GMT (envelope-from gabor@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o1560dL9085747 for perforce@freebsd.org; Fri, 5 Feb 2010 06:00:39 GMT (envelope-from gabor@freebsd.org) Date: Fri, 5 Feb 2010 06:00:39 GMT Message-Id: <201002050600.o1560dL9085747@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@freebsd.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174344 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 06:00:39 -0000 http://p4web.freebsd.org/chv.cgi?CH=174344 Change 174344 by gabor@gabor_aspire on 2010/02/05 05:59:38 - Add support for various sorting algoritms by command line options - Add support for -s - Remove some leftovers Affected files ... .. //depot/projects/soc2008/gabor_textproc/newsort/sort.c#6 edit .. //depot/projects/soc2008/gabor_textproc/newsort/sort.h#4 edit Differences ... ==== //depot/projects/soc2008/gabor_textproc/newsort/sort.c#6 (text+ko) ==== @@ -61,6 +61,7 @@ extern char *__progname; int count, listlen = 0; +int sort_method = SORT_QSORT; wchar_t **list; wchar_t field_sep = L' '; unsigned long sfield, lfield; @@ -76,10 +77,17 @@ bool nflag; bool mflag; bool rflag; +bool sflag; bool uflag; bool zflag; -#define OPTIONS "cbdfghik:Mmno:rS:t:T:uVz" +enum { + QSORT_OPT = CHAR_MAX + 1, + MERGESORT_OPT, + HEAPSORT_OPT +}; + +#define OPTIONS "cbdfghik:Mmno:rst:uVz" struct option long_options[]= { @@ -96,12 +104,14 @@ {"merge", no_argument, NULL, 'm'}, {"output", required_argument, NULL, 'o'}, {"reverse", no_argument, NULL, 'r'}, - {"buffer-size", required_argument, NULL, 'S'}, + {"stable", no_argument, NULL, 's'}, {"field-separator", required_argument, NULL, 't'}, -// {"temporary-directory", required_argument, NULL, 'T'}, {"unique", no_argument, NULL, 'u'}, {"version", no_argument, NULL, 'V'}, {"zero-terminated", no_argument, NULL, 'z'}, + {"qsort", no_argument, NULL, QSORT_OPT}, + {"mergesort", no_argument, NULL, MERGESORT_OPT}, + {"heapsort", no_argument, NULL, HEAPSORT_OPT}, {NULL, no_argument, NULL, 0} }; @@ -114,7 +124,7 @@ int main(int argc, char *argv[]) { - char c; + int c; char *sptr; char *outfile; @@ -196,10 +206,8 @@ case 'r': rflag = true; break; - case 'S': - bufsiz = strtoull(optarg, (char **)NULL, 10); - if ((errno == ERANGE) && (bufsiz == ULLONG_MAX)) - err(2, NULL); + case 's': + sflag = true; break; case 't': if (strlen(optarg) > 1) @@ -224,6 +232,15 @@ case 'z': zflag = true; break; + case QSORT_OPT: + sort_method = SORT_QSORT; + break; + case MERGESORT_OPT: + sort_method = SORT_MERGESORT; + break; + case HEAPSORT_OPT: + sort_method = SORT_HEAPSORT; + break; case 'h': default: usage(); @@ -249,6 +266,9 @@ if (mflag && (argc != 2)) errx(1, getstr(2), 'c'); + if (sflag && (sort_method != SORT_MERGESORT)) + errx(2, "stable sort is only available with merge sort"); + #ifndef WITHOUT_NLS catclose(catalog); #endif @@ -269,7 +289,19 @@ ++argv; } - qsort(list, count, sizeof(wchar_t *), coll); + switch (sort_method) { + case SORT_QSORT: + qsort(list, count, sizeof(wchar_t *), coll); + break; + case SORT_MERGESORT: + if (mergesort(list, count, sizeof(wchar_t *), coll) == -1) + err(2, NULL); + break; + case SORT_HEAPSORT: + if (heapsort(list, count, sizeof(wchar_t *), coll) == -1) + err(2, NULL); + break; + } for (int i = 0; i < count; i++) printf("%ls\n", list[i]); ==== //depot/projects/soc2008/gabor_textproc/newsort/sort.h#4 (text+ko) ==== @@ -29,10 +29,9 @@ #include #define VERSION "5.3.0-FreeBSD" -#define OPT_BUFSIZE (64 * 1024) -#define MAX_BUFSIZE (512 * 1024) -#define OPT_SLICES 8 -#define TMPPAT "/sort.XXXXXXXX" +#define SORT_QSORT 0 +#define SORT_MERGESORT 1 +#define SORT_HEAPSORT 2 #ifdef WITHOUT_NLS #define getstr(n) nlsstr[n] @@ -49,11 +48,9 @@ * sort.c */ extern bool cflag, bflag, dflag, fflag, gflag, iflag, kflag, Mflag, mflag, - nflag, rflag, uflag, zflag; -extern int bufcnt, count, listlen, tempno; + nflag, rflag, sflag, uflag, zflag; +extern int count, listlen; extern wchar_t field_sep, **list; -extern char **tempfiles, *tmpdir; -extern unsigned long long bufsiz; extern unsigned long lfield, sfield; /* @@ -75,9 +72,3 @@ */ void * sort_malloc(size_t); void * sort_realloc(void *, size_t); - -/* - * msort.c - */ -wchar_t **merge(wchar_t **, int, wchar_t **, int); -wchar_t **merge_sort(wchar_t **, int); From owner-p4-projects@FreeBSD.ORG Fri Feb 5 19:22:49 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6EC361065676; Fri, 5 Feb 2010 19:22:49 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 336491065670 for ; Fri, 5 Feb 2010 19:22:48 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A5B138FC0A for ; Fri, 5 Feb 2010 19:22:48 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o15JMmN4076886 for ; Fri, 5 Feb 2010 19:22:48 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o15JMme9076884 for perforce@freebsd.org; Fri, 5 Feb 2010 19:22:48 GMT (envelope-from raj@freebsd.org) Date: Fri, 5 Feb 2010 19:22:48 GMT Message-Id: <201002051922.o15JMme9076884@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174365 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 19:22:49 -0000 http://p4web.freebsd.org/chv.cgi?CH=174365 Change 174365 by raj@raj_fdt on 2010/02/05 19:22:34 Import device tree source file for MPC8555CDS. Many thanks to Freescale Semiconductor, Inc. for dual-licensing the MPC85XX DTS files for the benfit of using them in FreeBSD FDT environment. Special thank-you to Phil Brownfield for support and help with re-licensing. Obtained from: Freescale Semiconductor, Inc. Affected files ... .. //depot/projects/fdt/sys/boot/fdt/dts/mpc8555cds.dts#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Fri Feb 5 19:51:17 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A97C2106568F; Fri, 5 Feb 2010 19:51:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CDD610656A6 for ; Fri, 5 Feb 2010 19:51:17 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5A1208FC1E for ; Fri, 5 Feb 2010 19:51:17 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o15JpHQR078967 for ; Fri, 5 Feb 2010 19:51:17 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o15JpH1i078965 for perforce@freebsd.org; Fri, 5 Feb 2010 19:51:17 GMT (envelope-from mav@freebsd.org) Date: Fri, 5 Feb 2010 19:51:17 GMT Message-Id: <201002051951.o15JpH1i078965@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174366 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 19:51:17 -0000 http://p4web.freebsd.org/chv.cgi?CH=174366 Change 174366 by mav@mav_mavbook on 2010/02/05 19:50:55 IFC Affected files ... .. //depot/projects/scottl-camlock/src/bin/pax/Makefile#2 integrate .. //depot/projects/scottl-camlock/src/etc/defaults/rc.conf#15 integrate .. //depot/projects/scottl-camlock/src/etc/network.subr#11 integrate .. //depot/projects/scottl-camlock/src/etc/rc.d/Makefile#10 integrate .. //depot/projects/scottl-camlock/src/etc/rc.d/rtsold#1 branch .. //depot/projects/scottl-camlock/src/games/morse/Makefile#2 integrate .. //depot/projects/scottl-camlock/src/games/morse/morse.c#3 integrate .. //depot/projects/scottl-camlock/src/gnu/usr.bin/binutils/gdb/Makefile.alpha#2 delete .. //depot/projects/scottl-camlock/src/gnu/usr.bin/binutils/ld/Makefile.alpha#2 delete .. //depot/projects/scottl-camlock/src/gnu/usr.bin/binutils/libbfd/Makefile#2 integrate .. //depot/projects/scottl-camlock/src/gnu/usr.bin/binutils/libbfd/Makefile.alpha#2 delete .. //depot/projects/scottl-camlock/src/gnu/usr.bin/binutils/libopcodes/Makefile.alpha#2 delete .. //depot/projects/scottl-camlock/src/lib/libc/gen/getutxent.3#3 integrate .. //depot/projects/scottl-camlock/src/lib/libc/mips/sys/ptrace.S#2 integrate .. //depot/projects/scottl-camlock/src/lib/libc/string/memccpy.3#2 integrate .. //depot/projects/scottl-camlock/src/lib/libc/string/memchr.3#3 integrate .. //depot/projects/scottl-camlock/src/lib/libc/string/memcmp.3#3 integrate .. //depot/projects/scottl-camlock/src/lib/libc/string/memset.3#3 integrate .. //depot/projects/scottl-camlock/src/lib/msun/amd64/fenv.c#2 integrate .. //depot/projects/scottl-camlock/src/lib/msun/amd64/fenv.h#2 integrate .. //depot/projects/scottl-camlock/src/lib/msun/i387/fenv.c#2 integrate .. //depot/projects/scottl-camlock/src/lib/msun/i387/fenv.h#2 integrate .. //depot/projects/scottl-camlock/src/release/doc/en_US.ISO8859-1/hardware/article.sgml#7 integrate .. //depot/projects/scottl-camlock/src/sbin/dump/itime.c#3 integrate .. //depot/projects/scottl-camlock/src/sbin/dump/main.c#3 integrate .. //depot/projects/scottl-camlock/src/sbin/geom/class/multipath/geom_multipath.c#3 integrate .. //depot/projects/scottl-camlock/src/sbin/ifconfig/ifcarp.c#2 integrate .. //depot/projects/scottl-camlock/src/sbin/iscontrol/iscontrol.h#2 integrate .. //depot/projects/scottl-camlock/src/sbin/iscontrol/pdu.c#2 integrate .. //depot/projects/scottl-camlock/src/sbin/mount_nfs/mount_nfs.c#7 integrate .. //depot/projects/scottl-camlock/src/sbin/umount/umount.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#81 integrate .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#151 integrate .. //depot/projects/scottl-camlock/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c#6 integrate .. //depot/projects/scottl-camlock/src/sys/dev/acpica/acpi_cpu.c#18 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#103 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-cam.c#24 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-siliconimage.c#17 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ciss/ciss.c#27 integrate .. //depot/projects/scottl-camlock/src/sys/dev/fb/vesa.c#11 integrate .. //depot/projects/scottl-camlock/src/sys/dev/isp/isp.c#22 integrate .. //depot/projects/scottl-camlock/src/sys/dev/isp/isp_freebsd.c#30 integrate .. //depot/projects/scottl-camlock/src/sys/dev/isp/isp_library.c#10 integrate .. //depot/projects/scottl-camlock/src/sys/dev/isp/isp_library.h#6 integrate .. //depot/projects/scottl-camlock/src/sys/dev/isp/isp_pci.c#18 integrate .. //depot/projects/scottl-camlock/src/sys/dev/isp/isp_sbus.c#17 integrate .. //depot/projects/scottl-camlock/src/sys/dev/isp/ispmbox.h#11 integrate .. //depot/projects/scottl-camlock/src/sys/dev/isp/ispvar.h#15 integrate .. //depot/projects/scottl-camlock/src/sys/dev/mpt/mpt_cam.c#32 integrate .. //depot/projects/scottl-camlock/src/sys/dev/mpt/mpt_raid.c#21 integrate .. //depot/projects/scottl-camlock/src/sys/dev/pci/pci.c#31 integrate .. //depot/projects/scottl-camlock/src/sys/dev/pci/pcivar.h#17 integrate .. //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#41 integrate .. //depot/projects/scottl-camlock/src/sys/dev/usb/serial/u3g.c#15 integrate .. //depot/projects/scottl-camlock/src/sys/dev/usb/usbdevs#43 integrate .. //depot/projects/scottl-camlock/src/sys/mips/conf/SWARM#3 integrate .. //depot/projects/scottl-camlock/src/sys/mips/mips/exception.S#5 integrate .. //depot/projects/scottl-camlock/src/sys/mips/mips/swtch.S#4 integrate .. //depot/projects/scottl-camlock/src/sys/mips/mips/trap.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/mips/sibyte/sb_asm.S#2 integrate .. //depot/projects/scottl-camlock/src/sys/mips/sibyte/sb_machdep.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/mips/sibyte/sb_scd.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/mips/sibyte/sb_scd.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/mips/sibyte/sb_zbbus.c#3 integrate .. //depot/projects/scottl-camlock/src/sys/mips/sibyte/sb_zbpci.c#3 integrate .. //depot/projects/scottl-camlock/src/sys/net/vnet.c#6 integrate .. //depot/projects/scottl-camlock/src/sys/net/vnet.h#12 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/sctp_input.c#18 integrate .. //depot/projects/scottl-camlock/src/sys/sys/fbio.h#6 integrate .. //depot/projects/scottl-camlock/src/usr.bin/bc/Makefile#2 integrate .. //depot/projects/scottl-camlock/src/usr.bin/bc/bc.y#2 integrate .. //depot/projects/scottl-camlock/src/usr.bin/bc/extern.h#2 integrate .. //depot/projects/scottl-camlock/src/usr.bin/bc/scan.l#2 integrate .. //depot/projects/scottl-camlock/src/usr.bin/dc/Makefile#2 integrate .. //depot/projects/scottl-camlock/src/usr.bin/dc/bcode.c#2 integrate .. //depot/projects/scottl-camlock/src/usr.bin/dc/bcode.h#2 integrate .. //depot/projects/scottl-camlock/src/usr.bin/dc/dc.c#2 integrate .. //depot/projects/scottl-camlock/src/usr.bin/dc/inout.c#2 integrate .. //depot/projects/scottl-camlock/src/usr.bin/dc/mem.c#2 integrate .. //depot/projects/scottl-camlock/src/usr.bin/dc/stack.c#2 integrate .. //depot/projects/scottl-camlock/src/usr.bin/gcore/extern.h#2 integrate .. //depot/projects/scottl-camlock/src/usr.bin/gcore/gcore.c#4 integrate .. //depot/projects/scottl-camlock/src/usr.bin/truss/mips-fbsd.c#3 integrate .. //depot/projects/scottl-camlock/src/usr.sbin/powerd/Makefile#3 integrate .. //depot/projects/scottl-camlock/src/usr.sbin/powerd/powerd.c#5 integrate Differences ... ==== //depot/projects/scottl-camlock/src/bin/pax/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 -# $FreeBSD: src/bin/pax/Makefile,v 1.12 2004/05/14 13:31:19 cognet Exp $ +# $FreeBSD: src/bin/pax/Makefile,v 1.13 2010/02/04 07:18:19 imp Exp $ # To install on versions prior to BSD 4.4 the following may have to be # defined with CFLAGS += @@ -33,8 +33,6 @@ #MAN= pax.1 tar.1 cpio.1 #LINKS= ${BINDIR}/pax ${BINDIR}/tar ${BINDIR}/pax ${BINDIR}/cpio -.if ${MACHINE_ARCH} == "arm" WARNS?= 3 -.endif .include ==== //depot/projects/scottl-camlock/src/etc/defaults/rc.conf#15 (text+ko) ==== @@ -15,7 +15,7 @@ # For a more detailed explanation of all the rc.conf variables, please # refer to the rc.conf(5) manual page. # -# $FreeBSD: src/etc/defaults/rc.conf,v 1.367 2010/01/17 08:41:07 ume Exp $ +# $FreeBSD: src/etc/defaults/rc.conf,v 1.368 2010/02/03 16:18:42 ume Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -460,6 +460,10 @@ # Now this works only for IPv6 link local # multicast addrs. rtsol_flags="" # Flags to IPv6 router solicitation. +rtsold_enable="NO" # Set to YES to enable an IPv6 router + # solicitation daemon. +rtsold_flags="-a" # Flags to an IPv6 router solicitation + # daemon. rtadvd_enable="NO" # Set to YES to enable an IPv6 router # advertisement daemon. If set to YES, # this router becomes a possible candidate ==== //depot/projects/scottl-camlock/src/etc/network.subr#11 (text+ko) ==== @@ -22,7 +22,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/network.subr,v 1.205 2009/12/29 21:06:49 jhb Exp $ +# $FreeBSD: src/etc/network.subr,v 1.206 2010/02/03 16:18:42 ume Exp $ # # @@ -882,7 +882,9 @@ { if ipv6_autoconfif $1; then ifconfig $1 inet6 accept_rtadv up - rtsol ${rtsol_flags} $1 + if ! checkyesno rtsold_enable; then + rtsol ${rtsol_flags} $1 + fi fi } ==== //depot/projects/scottl-camlock/src/etc/rc.d/Makefile#10 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.102 2009/12/02 15:05:26 ume Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.103 2010/02/03 16:18:42 ume Exp $ .include @@ -30,7 +30,7 @@ powerd power_profile ppp pppoed pwcheck \ quota \ random rarpd resolv rfcomm_pppd_server root \ - route6d routed routing rpcbind rtadvd rwho \ + route6d routed routing rpcbind rtadvd rtsold rwho \ savecore sdpd securelevel sendmail \ serial sppp statd static_arp stf swap1 \ syscons sysctl syslogd \ ==== //depot/projects/scottl-camlock/src/games/morse/Makefile#2 (text+ko) ==== @@ -1,11 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 -# $FreeBSD: src/games/morse/Makefile,v 1.8 2005/11/11 09:57:32 ru Exp $ +# $FreeBSD: src/games/morse/Makefile,v 1.9 2010/02/04 07:08:06 imp Exp $ PROG= morse MAN= morse.6 -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" -CFLAGS += -DSPEAKER=\"/dev/speaker\" -.endif - .include ==== //depot/projects/scottl-camlock/src/games/morse/morse.c#3 (text+ko) ==== @@ -47,7 +47,7 @@ static char sccsid[] = "@(#)morse.c 8.1 (Berkeley) 5/31/93"; #endif static const char rcsid[] = - "$FreeBSD: src/games/morse/morse.c,v 1.22 2008/06/08 19:35:47 scf Exp $"; + "$FreeBSD: src/games/morse/morse.c,v 1.23 2010/02/04 07:08:06 imp Exp $"; #endif /* not lint */ #include @@ -63,6 +63,9 @@ #include #include +/* Always use the speaker, let the open fail if -p is selected */ +#define SPEAKER "/dev/speaker" + #ifdef SPEAKER #include #endif ==== //depot/projects/scottl-camlock/src/gnu/usr.bin/binutils/libbfd/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/libbfd/Makefile,v 1.33 2004/10/24 15:32:25 ru Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/libbfd/Makefile,v 1.34 2010/02/03 18:29:35 imp Exp $ .include "../Makefile.inc0" @@ -11,8 +11,7 @@ section.c srec.c stab-syms.c stabs.c syms.c targets.c tekhex.c \ targmatch.h dwarf1.c dwarf2.c config.h bfdver.h bfdio.c simple.c WARNS?= 0 -.if (${TARGET_ARCH} == "alpha" || ${TARGET_ARCH} == "ia64" || \ - ${TARGET_ARCH} == "sparc64") +.if (${TARGET_ARCH} == "ia64" || ${TARGET_ARCH} == "sparc64") WARNS?= 2 .endif CFLAGS+= -D_GNU_SOURCE ==== //depot/projects/scottl-camlock/src/lib/libc/gen/getutxent.3#3 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/gen/getutxent.3,v 1.7 2010/01/23 17:58:40 ed Exp $ +.\" $FreeBSD: src/lib/libc/gen/getutxent.3,v 1.8 2010/02/03 19:31:02 ed Exp $ .\" .Dd January 8, 2010 .Os @@ -426,8 +426,10 @@ .Fa ut_type . This prevents the need for special utility functions to update the other databases, such as the +.Fn updlastlogx +and .Fn updwtmpx -function which is often available in other implementations. +functions which are available in other implementations. It also tries to replace .Dv DEAD_PROCESS entries in the active sessions database when storing ==== //depot/projects/scottl-camlock/src/lib/libc/mips/sys/ptrace.S#2 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/mips/sys/ptrace.S,v 1.3 2008/04/26 12:08:02 imp Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/mips/sys/ptrace.S,v 1.6 2010/02/04 05:49:59 neel Exp $"); #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) @@ -42,14 +42,26 @@ #endif /* LIBC_SCCS and not lint */ LEAF(ptrace) + .frame sp, 40, ra + .mask 0x80000000, -8 #ifdef __ABICALLS__ .set noreorder .cpload t9 .set reorder #endif + subu sp, sp, 40 + sw ra, 32(sp) +#ifdef __ABICALLS__ + .cprestore 16 +#endif la t9, _C_LABEL(__error) # locate address of errno jalr t9 +#ifdef __ABICALLS__ + lw gp, 16(sp) +#endif sw zero, 0(v0) + lw ra, 32(sp) + addu sp, sp, 40 li v0, SYS_ptrace syscall bne a3, zero, 1f ==== //depot/projects/scottl-camlock/src/lib/libc/string/memccpy.3#2 (text+ko) ==== @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)memccpy.3 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD: src/lib/libc/string/memccpy.3,v 1.7 2007/01/09 00:28:12 imp Exp $ +.\" $FreeBSD: src/lib/libc/string/memccpy.3,v 1.8 2010/02/04 11:23:28 ru Exp $ .\" .Dd June 9, 1993 .Dt MEMCCPY 3 @@ -50,7 +50,9 @@ .Fa dst . If the character .Fa c -(as converted to an unsigned char) occurs in the string +(as converted to an +.Vt "unsigned char" ) +occurs in the string .Fa src , the copy stops and a pointer to the byte after the copy of .Fa c ==== //depot/projects/scottl-camlock/src/lib/libc/string/memchr.3#3 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)memchr.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/memchr.3,v 1.12 2009/04/23 08:37:56 brueffer Exp $ +.\" $FreeBSD: src/lib/libc/string/memchr.3,v 1.13 2010/02/04 11:23:28 ru Exp $ .\" .Dd April 9, 2008 .Dt MEMCHR 3 @@ -52,7 +52,8 @@ function locates the first occurrence of .Fa c -(converted to an unsigned char) +(converted to an +.Vt "unsigned char" ) in string .Fa b . .Pp ==== //depot/projects/scottl-camlock/src/lib/libc/string/memcmp.3#3 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)memcmp.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/memcmp.3,v 1.10 2009/04/07 13:42:53 trasz Exp $ +.\" $FreeBSD: src/lib/libc/string/memcmp.3,v 1.11 2010/02/04 11:23:28 ru Exp $ .\" .Dd June 4, 1993 .Dt MEMCMP 3 @@ -61,7 +61,9 @@ function returns zero if the two strings are identical, otherwise returns the difference between the first two differing bytes -(treated as unsigned char values, so that +(treated as +.Vt "unsigned char" +values, so that .Sq Li \e200 is greater than .Sq Li \&\e0 , ==== //depot/projects/scottl-camlock/src/lib/libc/string/memset.3#3 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)memset.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/memset.3,v 1.9 2009/04/07 13:42:53 trasz Exp $ +.\" $FreeBSD: src/lib/libc/string/memset.3,v 1.10 2010/02/04 11:23:28 ru Exp $ .\" .Dd June 4, 1993 .Dt MEMSET 3 @@ -52,7 +52,9 @@ .Fa len bytes of value .Fa c -(converted to an unsigned char) to the string +(converted to an +.Vt "unsigned char" ) +to the string .Fa b . .Sh RETURN VALUES The ==== //depot/projects/scottl-camlock/src/lib/msun/amd64/fenv.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/msun/amd64/fenv.c,v 1.4 2007/01/05 07:15:26 das Exp $ + * $FreeBSD: src/lib/msun/amd64/fenv.c,v 1.5 2010/02/03 20:23:47 kib Exp $ */ #include @@ -86,7 +86,7 @@ int feholdexcept(fenv_t *envp) { - int mxcsr; + __uint32_t mxcsr; __stmxcsr(&mxcsr); __fnstenv(&envp->__x87); @@ -101,7 +101,8 @@ int feupdateenv(const fenv_t *envp) { - int mxcsr, status; + __uint32_t mxcsr; + __uint16_t status; __fnstsw(&status); __stmxcsr(&mxcsr); @@ -113,7 +114,8 @@ int __feenableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); @@ -129,7 +131,8 @@ int __fedisableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); ==== //depot/projects/scottl-camlock/src/lib/msun/amd64/fenv.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/msun/amd64/fenv.h,v 1.6 2007/01/06 21:46:23 das Exp $ + * $FreeBSD: src/lib/msun/amd64/fenv.h,v 1.7 2010/02/03 20:23:47 kib Exp $ */ #ifndef _FENV_H_ @@ -110,7 +110,8 @@ static __inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __stmxcsr(&__mxcsr); __fnstsw(&__status); @@ -124,7 +125,8 @@ static __inline int fetestexcept(int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __stmxcsr(&__mxcsr); __fnstsw(&__status); @@ -134,7 +136,7 @@ static __inline int fegetround(void) { - int __control; + __uint16_t __control; /* * We assume that the x87 and the SSE unit agree on the @@ -149,7 +151,8 @@ static __inline int fesetround(int __round) { - int __mxcsr, __control; + __uint32_t __mxcsr; + __uint16_t __control; if (__round & ~_ROUND_MASK) return (-1); @@ -197,7 +200,7 @@ static __inline int fegetexcept(void) { - int __control; + __uint16_t __control; /* * We assume that the masks for the x87 and the SSE unit are ==== //depot/projects/scottl-camlock/src/lib/msun/i387/fenv.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/msun/i387/fenv.c,v 1.3 2007/01/05 07:15:26 das Exp $ + * $FreeBSD: src/lib/msun/i387/fenv.c,v 1.4 2010/02/03 20:23:47 kib Exp $ */ #include @@ -87,7 +87,7 @@ fesetexceptflag(const fexcept_t *flagp, int excepts) { fenv_t env; - int mxcsr; + __uint32_t mxcsr; __fnstenv(&env); env.__status &= ~excepts; @@ -117,7 +117,7 @@ int fegetenv(fenv_t *envp) { - int mxcsr; + __uint32_t mxcsr; __fnstenv(envp); /* @@ -135,7 +135,7 @@ int feholdexcept(fenv_t *envp) { - int mxcsr; + __uint32_t mxcsr; __fnstenv(envp); __fnclex(); @@ -152,7 +152,8 @@ int feupdateenv(const fenv_t *envp) { - int mxcsr, status; + __uint32_t mxcsr; + __uint16_t status; __fnstsw(&status); if (__HAS_SSE()) @@ -167,7 +168,8 @@ int __feenableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); @@ -188,7 +190,8 @@ int __fedisableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); ==== //depot/projects/scottl-camlock/src/lib/msun/i387/fenv.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/msun/i387/fenv.h,v 1.6 2007/01/06 21:46:23 das Exp $ + * $FreeBSD: src/lib/msun/i387/fenv.h,v 1.7 2010/02/03 20:23:47 kib Exp $ */ #ifndef _FENV_H_ @@ -114,7 +114,7 @@ feclearexcept(int __excepts) { fenv_t __env; - int __mxcsr; + __uint32_t __mxcsr; if (__excepts == FE_ALL_EXCEPT) { __fnclex(); @@ -134,7 +134,8 @@ static __inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __fnstsw(&__status); if (__HAS_SSE()) @@ -151,7 +152,8 @@ static __inline int fetestexcept(int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __fnstsw(&__status); if (__HAS_SSE()) @@ -164,7 +166,7 @@ static __inline int fegetround(void) { - int __control; + __uint16_t __control; /* * We assume that the x87 and the SSE unit agree on the @@ -179,7 +181,8 @@ static __inline int fesetround(int __round) { - int __mxcsr, __control; + __uint32_t __mxcsr; + __uint16_t __control; if (__round & ~_ROUND_MASK) return (-1); @@ -206,7 +209,7 @@ fesetenv(const fenv_t *__envp) { fenv_t __env = *__envp; - int __mxcsr; + __uint32_t __mxcsr; __mxcsr = __get_mxcsr(__env); __set_mxcsr(__env, 0xffffffff); @@ -234,7 +237,7 @@ static __inline int fegetexcept(void) { - int __control; + __uint16_t __control; /* * We assume that the masks for the x87 and the SSE unit are ==== //depot/projects/scottl-camlock/src/release/doc/en_US.ISO8859-1/hardware/article.sgml#7 (text+ko) ==== @@ -17,7 +17,7 @@ The &os; Documentation Project - $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/article.sgml,v 1.358 2010/01/19 22:44:29 brueffer Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/article.sgml,v 1.359 2010/02/05 16:41:19 nwhitehorn Exp $ 2000 @@ -316,8 +316,51 @@ powerpc - The information for this paragraph has yet to be - compiled. + This section describes the systems currently known to be + supported by &os; on the PowerPC platform. This list is not + exhaustive. + + In general, all New World architecture Apple hardware + is supported, as well a limited selection of non-Apple + machines. + + All systems listed below are fully supported, with the + exception that software fan control is currently missing on + the Power Macintosh G5. SMP is supported on all systems with + more than 1 processor. + + + + Apple iMac + + + Apple Power Macintosh G3 (Blue & White) + + + Apple Power Macintosh G4 + + + Apple Power Macintosh G5 (non-970MP models) + + + Apple iBook + + + Apple PowerBook G4 + + + Apple XServe G4 + + + Apple XServe G5 + + + Apple Mac Mini + + + Embedded boards based on MPC85XX + + ==== //depot/projects/scottl-camlock/src/sbin/dump/itime.c#3 (text+ko) ==== @@ -32,7 +32,7 @@ static char sccsid[] = "@(#)itime.c 8.1 (Berkeley) 6/5/93"; #endif static const char rcsid[] = - "$FreeBSD: src/sbin/dump/itime.c,v 1.17 2008/05/24 05:20:46 mckusick Exp $"; + "$FreeBSD: src/sbin/dump/itime.c,v 1.18 2010/02/03 23:56:12 delphij Exp $"; #endif /* not lint */ #include @@ -106,8 +106,10 @@ for (;;) { dtwalk = (struct dumptime *)calloc(1, sizeof (struct dumptime)); - if (getrecord(df, &(dtwalk->dt_value)) < 0) + if (getrecord(df, &(dtwalk->dt_value)) < 0) { + free(dtwalk); break; + } nddates++; SLIST_INSERT_HEAD(&dthead, dtwalk, dt_list); } ==== //depot/projects/scottl-camlock/src/sbin/dump/main.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95"; #endif static const char rcsid[] = - "$FreeBSD: src/sbin/dump/main.c,v 1.67 2008/05/24 05:20:46 mckusick Exp $"; + "$FreeBSD: src/sbin/dump/main.c,v 1.68 2010/02/03 23:56:12 delphij Exp $"; #endif /* not lint */ #include @@ -767,7 +767,8 @@ if (flags) { *p = '\0'; *nargv++ = flagsp; - } + } else + free(flagsp); /* Copy remaining arguments. */ while ((*nargv++ = *argv++)); ==== //depot/projects/scottl-camlock/src/sbin/geom/class/multipath/geom_multipath.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/geom/class/multipath/geom_multipath.c,v 1.2 2007/05/15 20:25:17 marcel Exp $"); +__FBSDID("$FreeBSD: src/sbin/geom/class/multipath/geom_multipath.c,v 1.3 2010/02/04 21:51:33 mjacob Exp $"); #include #include #include @@ -55,6 +55,10 @@ NULL, "[-v] name prov ..." }, { + "destroy", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, + NULL, "[-v] prov ..." + }, + { "clear", G_FLAG_VERBOSE, mp_main, G_NULL_OPTS, NULL, "[-v] prov ..." }, ==== //depot/projects/scottl-camlock/src/sbin/ifconfig/ifcarp.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sbin/ifconfig/ifcarp.c,v 1.2 2005/02/22 14:07:47 glebius Exp $ */ +/* $FreeBSD: src/sbin/ifconfig/ifcarp.c,v 1.3 2010/02/04 11:43:22 ru Exp $ */ /* from $OpenBSD: ifconfig.c,v 1.82 2003/10/19 05:43:35 mcbride Exp $ */ /* @@ -96,6 +96,7 @@ if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1) err(1, "SIOCGVH"); + memset(carpr.carpr_key, 0, sizeof(carpr.carpr_key)); /* XXX Should hash the password into the key here, perhaps? */ strlcpy(carpr.carpr_key, val, CARP_KEY_LEN); ==== //depot/projects/scottl-camlock/src/sbin/iscontrol/iscontrol.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sbin/iscontrol/iscontrol.h,v 1.2 2008/11/25 07:17:11 scottl Exp $ + * $FreeBSD: src/sbin/iscontrol/iscontrol.h,v 1.3 2010/02/03 23:58:00 delphij Exp $ */ /* | $Id: iscontrol.h,v 2.3 2007/04/27 08:36:49 danny Exp danny $ @@ -144,7 +144,6 @@ void freePDU(pdu_t *pp); int xmitpdu(isess_t *sess, pdu_t *pp); int recvpdu(isess_t *sess, pdu_t *pp); -void pukeText(char *it, pdu_t *pp); int lookup(token_t *tbl, char *m); ==== //depot/projects/scottl-camlock/src/sbin/iscontrol/pdu.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/iscontrol/pdu.c,v 1.2 2008/11/25 07:17:11 scottl Exp $"); +__FBSDID("$FreeBSD: src/sbin/iscontrol/pdu.c,v 1.3 2010/02/03 23:58:00 delphij Exp $"); #include #include @@ -46,6 +46,8 @@ #include "iscsi.h" #include "iscontrol.h" +static void pukeText(char *it, pdu_t *pp); + int xmitpdu(isess_t *sess, pdu_t *pp) { @@ -153,7 +155,7 @@ pp->ds_size = pp->ds_len = 0; } -void +static void pukeText(char *it, pdu_t *pp) { char *ptr; ==== //depot/projects/scottl-camlock/src/sbin/mount_nfs/mount_nfs.c#7 (text+ko) ==== @@ -42,7 +42,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/sbin/mount_nfs/mount_nfs.c,v 1.90 2009/10/26 14:57:33 jh Exp $"); +__FBSDID("$FreeBSD: src/sbin/mount_nfs/mount_nfs.c,v 1.92 2010/02/04 15:17:49 ume Exp $"); #include #include @@ -130,20 +130,19 @@ TRYRET_LOCALERR /* Local failure. */ }; -int fallback_mount(struct iovec *iov, int iovlen, int mntflags); -int sec_name_to_num(char *sec); -char *sec_num_to_name(int num); -int getnfsargs(char *, struct iovec **iov, int *iovlen); +static int fallback_mount(struct iovec *iov, int iovlen, int mntflags); +static int sec_name_to_num(char *sec); +static char *sec_num_to_name(int num); +static int getnfsargs(char *, struct iovec **iov, int *iovlen); /* void set_rpc_maxgrouplist(int); */ -struct netconfig *getnetconf_cached(const char *netid); -const char *netidbytype(int af, int sotype); -void usage(void) __dead2; -int xdr_dir(XDR *, char *); -int xdr_fh(XDR *, struct nfhret *); -enum tryret nfs_tryproto(struct addrinfo *ai, char *hostp, char *spec, +static struct netconfig *getnetconf_cached(const char *netid); +static const char *netidbytype(int af, int sotype); +static void usage(void) __dead2; +static int xdr_dir(XDR *, char *); +static int xdr_fh(XDR *, struct nfhret *); +static enum tryret nfs_tryproto(struct addrinfo *ai, char *hostp, char *spec, char **errstr, struct iovec **iov, int *iovlen); -enum tryret returncode(enum clnt_stat stat, struct rpc_err *rpcerr); -extern int getosreldate(void); +static enum tryret returncode(enum clnt_stat stat, struct rpc_err *rpcerr); int main(int argc, char *argv[]) @@ -476,7 +475,7 @@ * passing NFS mount options to nmount() as individual * parameters. It should be eventually be removed. */ -int +static int fallback_mount(struct iovec *iov, int iovlen, int mntflags) { struct nfs_args args = { @@ -663,7 +662,7 @@ return nmount(newiov, newiovlen, mntflags); } -int +static int sec_name_to_num(char *sec) { if (!strcmp(sec, "krb5")) @@ -677,7 +676,7 @@ return (-1); } -char * +static char * sec_num_to_name(int flavor) { switch (flavor) { @@ -693,17 +692,22 @@ return (NULL); } -int +static int getnfsargs(char *spec, struct iovec **iov, int *iovlen) { struct addrinfo hints, *ai_nfs, *ai; enum tryret ret; - int ecode, speclen, remoteerr; + int ecode, speclen, remoteerr, offset, have_bracket = 0; char *hostp, *delimp, *errstr; size_t len; static char nam[MNAMELEN + 1], pname[MAXHOSTNAMELEN + 5]; - if ((delimp = strrchr(spec, ':')) != NULL) { + if (*spec == '[' && (delimp = strchr(spec + 1, ']')) != NULL && + *(delimp + 1) == ':') { + hostp = spec + 1; + spec = delimp + 2; + have_bracket = 1; + } else if ((delimp = strrchr(spec, ':')) != NULL) { hostp = spec; spec = delimp + 1; } else if ((delimp = strrchr(spec, '@')) != NULL) { @@ -731,10 +735,15 @@ /* Make both '@' and ':' notations equal */ if (*hostp != '\0') { len = strlen(hostp); - memmove(nam, hostp, len); - nam[len] = ':'; - memmove(nam + len + 1, spec, speclen); - nam[len + speclen + 1] = '\0'; + offset = 0; + if (have_bracket) + nam[offset++] = '['; + memmove(nam + offset, hostp, len); + if (have_bracket) + nam[len + offset++] = ']'; + nam[len + offset++] = ':'; + memmove(nam + len + offset, spec, speclen); + nam[len + speclen + offset] = '\0'; } /* @@ -839,7 +848,7 @@ * In all error cases, *errstr will be set to a statically-allocated string * describing the error. */ -enum tryret +static enum tryret nfs_tryproto(struct addrinfo *ai, char *hostp, char *spec, char **errstr, struct iovec **iov, int *iovlen) { @@ -1061,7 +1070,7 @@ * Catagorise a RPC return status and error into an `enum tryret' * return code. */ -enum tryret +static enum tryret returncode(enum clnt_stat stat, struct rpc_err *rpcerr) { switch (stat) { @@ -1096,7 +1105,7 @@ * * XXX there should be a library function for this. */ -const char * +static const char * netidbytype(int af, int sotype) { struct nc_protos *p; @@ -1116,7 +1125,7 @@ * Otherwise it behaves just like getnetconfigent(), so nc_*error() * work on failure. */ -struct netconfig * +static struct netconfig * getnetconf_cached(const char *netid) { static struct nc_entry { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Feb 6 00:37:05 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1261E1065697; Sat, 6 Feb 2010 00:37:05 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB1E71065695 for ; Sat, 6 Feb 2010 00:37:04 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B924D8FC24 for ; Sat, 6 Feb 2010 00:37:04 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o160b47h016450 for ; Sat, 6 Feb 2010 00:37:04 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o160b4dV016448 for perforce@freebsd.org; Sat, 6 Feb 2010 00:37:04 GMT (envelope-from mav@freebsd.org) Date: Sat, 6 Feb 2010 00:37:04 GMT Message-Id: <201002060037.o160b4dV016448@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174382 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 00:37:05 -0000 http://p4web.freebsd.org/chv.cgi?CH=174382 Change 174382 by mav@mav_mavtest on 2010/02/06 00:36:09 With FBS enabled, we have no idea what command caused timeout. Implement same logic as in siis(4) - wait for other commands complete or timeout and then give some more time. Affected files ... .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#104 edit .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.h#37 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#104 (text+ko) ==== @@ -1663,6 +1663,45 @@ return; } +/* Must be called with channel locked. */ +static void +ahci_process_timeout(device_t dev) +{ + struct ahci_channel *ch = device_get_softc(dev); + int i; + + mtx_assert(&ch->mtx, MA_OWNED); + /* Handle the rest of commands. */ + for (i = 0; i < ch->numslots; i++) { + /* Do we have a running request on slot? */ + if (ch->slot[i].state < AHCI_SLOT_RUNNING) + continue; + ahci_end_transaction(&ch->slot[i], AHCI_ERR_TIMEOUT); + } +} + +/* Must be called with channel locked. */ +static void +ahci_rearm_timeout(device_t dev) +{ + struct ahci_channel *ch = device_get_softc(dev); + int i; + + mtx_assert(&ch->mtx, MA_OWNED); + for (i = 0; i < ch->numslots; i++) { + struct ahci_slot *slot = &ch->slot[i]; + + /* Do we have a running request on slot? */ + if (slot->state < AHCI_SLOT_RUNNING) + continue; + if ((ch->toslots & (1 << i)) == 0) + continue; + callout_reset(&slot->timeout, + (int)slot->ccb->ccb_h.timeout * hz / 2000, + (timeout_t*)ahci_timeout, slot); + } +} + /* Locked by callout mechanism. */ static void ahci_timeout(struct ahci_slot *slot) @@ -1699,7 +1738,6 @@ ATA_INL(ch->r_mem, AHCI_P_SACT), ch->rslots, ATA_INL(ch->r_mem, AHCI_P_TFD), ATA_INL(ch->r_mem, AHCI_P_SERR)); - ch->fatalerr = 1; /* Handle frozen command. */ if (ch->frozen) { union ccb *fccb = ch->frozen; @@ -1711,14 +1749,28 @@ } xpt_done(fccb); } - /* Handle command with timeout. */ - ahci_end_transaction(&ch->slot[slot->slot], AHCI_ERR_TIMEOUT); - /* Handle the rest of commands. */ - for (i = 0; i < ch->numslots; i++) { - /* Do we have a running request on slot? */ - if (ch->slot[i].state < AHCI_SLOT_RUNNING) - continue; - ahci_end_transaction(&ch->slot[i], AHCI_ERR_INNOCENT); + if (!ch->fbs_enabled) { + /* Without FBS we know real timeout source. */ + ch->fatalerr = 1; + /* Handle command with timeout. */ + ahci_end_transaction(&ch->slot[slot->slot], AHCI_ERR_TIMEOUT); + /* Handle the rest of commands. */ + for (i = 0; i < ch->numslots; i++) { + /* Do we have a running request on slot? */ + if (ch->slot[i].state < AHCI_SLOT_RUNNING) + continue; + ahci_end_transaction(&ch->slot[i], AHCI_ERR_INNOCENT); + } + } else { + /* With FBS we wait for other commands timeout and pray. */ + if (ch->toslots == 0) + xpt_freeze_simq(ch->sim, 1); + ch->toslots |= (1 << slot->slot); + if ((ch->rslots & ~ch->toslots) == 0) + ahci_process_timeout(dev); + else + device_printf(dev, " ... waiting for slots %08x\n", + ch->rslots & ~ch->toslots); } } @@ -1815,10 +1867,6 @@ ccb->ccb_h.status |= CAM_UNCOR_PARITY; break; case AHCI_ERR_TIMEOUT: - /* Do no treat soft-reset timeout as fatal here. */ - if (ccb->ccb_h.func_code != XPT_ATA_IO || - !(ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL)) - ch->fatalerr = 1; if (!ch->readlog) { xpt_freeze_simq(ch->sim, 1); ccb->ccb_h.status &= ~CAM_STATUS_MASK; @@ -1834,6 +1882,11 @@ ch->oslots &= ~(1 << slot->slot); ch->rslots &= ~(1 << slot->slot); ch->aslots &= ~(1 << slot->slot); + if (et != AHCI_ERR_TIMEOUT) { + if (ch->toslots == (1 << slot->slot)) + xpt_release_simq(ch->sim, TRUE); + ch->toslots &= ~(1 << slot->slot); + } slot->state = AHCI_SLOT_EMPTY; slot->ccb = NULL; /* Update channel stats. */ @@ -1873,7 +1926,7 @@ /* If we have no other active commands, ... */ if (ch->rslots == 0) { /* if there was fatal error - reset port. */ - if (ch->fatalerr) { + if (ch->toslots != 0 || ch->fatalerr) { ahci_reset(dev); } else { /* if we have slots in error, we can reinit port. */ @@ -1885,7 +1938,10 @@ if (!ch->readlog && ch->numhslots) ahci_issue_read_log(dev); } - } + /* If all the rest of commands are in timeout - give them chance. */ + } else if ((ch->rslots & ~ch->toslots) == 0 && + et != AHCI_ERR_TIMEOUT) + ahci_rearm_timeout(dev); /* Start PM timer. */ if (ch->numrslots == 0 && ch->pm_level > 3) { callout_schedule(&ch->pm_timer, @@ -2149,7 +2205,10 @@ ch->hold[i] = NULL; ch->numhslots--; } + if (ch->toslots != 0) + xpt_release_simq(ch->sim, TRUE); ch->eslots = 0; + ch->toslots = 0; ch->fatalerr = 0; /* Tell the XPT about the event */ xpt_async(AC_BUS_RESET, ch->path, NULL); ==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.h#37 (text+ko) ==== @@ -401,6 +401,7 @@ uint32_t rslots; /* Running slots */ uint32_t aslots; /* Slots with atomic commands */ uint32_t eslots; /* Slots in error */ + uint32_t toslots; /* Slots in timeout */ int numrslots; /* Number of running slots */ int numrslotspd[16];/* Number of running slots per dev */ int numtslots; /* Number of tagged slots */ From owner-p4-projects@FreeBSD.ORG Sat Feb 6 01:02:31 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 12E561065696; Sat, 6 Feb 2010 01:02:31 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB7EC106568D for ; Sat, 6 Feb 2010 01:02:30 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 842FD8FC16 for ; Sat, 6 Feb 2010 01:02:30 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o1612UtP028744 for ; Sat, 6 Feb 2010 01:02:30 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o1612Uh8028742 for perforce@freebsd.org; Sat, 6 Feb 2010 01:02:30 GMT (envelope-from mav@freebsd.org) Date: Sat, 6 Feb 2010 01:02:30 GMT Message-Id: <201002060102.o1612Uh8028742@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174385 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 01:02:31 -0000 http://p4web.freebsd.org/chv.cgi?CH=174385 Change 174385 by mav@mav_mavtest on 2010/02/06 01:01:49 After last running command completed, give commands in timeout second time. Affected files ... .. //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#42 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#42 (text+ko) ==== @@ -1074,6 +1074,28 @@ } } +/* Must be called with channel locked. */ +static void +siis_rearm_timeout(device_t dev) +{ + struct siis_channel *ch = device_get_softc(dev); + int i; + + mtx_assert(&ch->mtx, MA_OWNED); + for (i = 0; i < SIIS_MAX_SLOTS; i++) { + struct siis_slot *slot = &ch->slot[i]; + + /* Do we have a running request on slot? */ + if (slot->state < SIIS_SLOT_RUNNING) + continue; + if ((ch->toslots & (1 << i)) == 0) + continue; + callout_reset(&slot->timeout, + (int)slot->ccb->ccb_h.timeout * hz / 1000, + (timeout_t*)siis_timeout, slot); + } +} + /* Locked by callout mechanism. */ static void siis_timeout(struct siis_slot *slot) @@ -1235,8 +1257,9 @@ siis_issue_read_log(dev); } /* If all the reset of commands are in timeout - abort them. */ - } else if ((ch->rslots & ~ch->toslots) == 0) - siis_process_timeout(dev); + } else if ((ch->rslots & ~ch->toslots) == 0 && + et != SIIS_ERR_TIMEOUT) + siis_rearm_timeout(dev); } static void From owner-p4-projects@FreeBSD.ORG Sat Feb 6 11:48:17 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 866711065676; Sat, 6 Feb 2010 11:48:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3188A1065670 for ; Sat, 6 Feb 2010 11:48:17 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1675D8FC17 for ; Sat, 6 Feb 2010 11:48:17 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o16BmHPK007878 for ; Sat, 6 Feb 2010 11:48:17 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o16BmGDu007876 for perforce@freebsd.org; Sat, 6 Feb 2010 11:48:16 GMT (envelope-from trasz@freebsd.org) Date: Sat, 6 Feb 2010 11:48:16 GMT Message-Id: <201002061148.o16BmGDu007876@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to trasz@freebsd.org using -f From: Edward Tomasz Napierala To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174394 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 11:48:17 -0000 http://p4web.freebsd.org/chv.cgi?CH=174394 Change 174394 by trasz@trasz_victim on 2010/02/06 11:47:49 IFC. Affected files ... .. //depot/projects/soc2009/trasz_limits/bin/pax/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/csup/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/csup/TODO#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/csup/auth.c#1 branch .. //depot/projects/soc2009/trasz_limits/contrib/csup/auth.h#1 branch .. //depot/projects/soc2009/trasz_limits/contrib/csup/config.h#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/csup/cpasswd.1#1 branch .. //depot/projects/soc2009/trasz_limits/contrib/csup/cpasswd.sh#1 branch .. //depot/projects/soc2009/trasz_limits/contrib/csup/csup.1#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/csup/main.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/csup/proto.c#2 integrate .. //depot/projects/soc2009/trasz_limits/contrib/netcat/FREEBSD-vendor#4 integrate .. //depot/projects/soc2009/trasz_limits/etc/defaults/rc.conf#12 integrate .. //depot/projects/soc2009/trasz_limits/etc/network.subr#9 integrate .. //depot/projects/soc2009/trasz_limits/etc/rc.d/Makefile#10 integrate .. //depot/projects/soc2009/trasz_limits/etc/rc.d/rtsold#1 branch .. //depot/projects/soc2009/trasz_limits/etc/services#4 integrate .. //depot/projects/soc2009/trasz_limits/games/morse/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/games/morse/morse.c#2 integrate .. //depot/projects/soc2009/trasz_limits/gnu/usr.bin/binutils/Makefile.inc#2 integrate .. //depot/projects/soc2009/trasz_limits/gnu/usr.bin/binutils/gdb/Makefile.alpha#2 delete .. //depot/projects/soc2009/trasz_limits/gnu/usr.bin/binutils/ld/Makefile.alpha#2 delete .. //depot/projects/soc2009/trasz_limits/gnu/usr.bin/binutils/libbfd/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/gnu/usr.bin/binutils/libbfd/Makefile.alpha#2 delete .. //depot/projects/soc2009/trasz_limits/gnu/usr.bin/binutils/libopcodes/Makefile.alpha#2 delete .. //depot/projects/soc2009/trasz_limits/gnu/usr.bin/groff/tmac/mdoc.local#6 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/getutxent.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/gen/rand48.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/mips/sys/ptrace.S#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_opt_info.3#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_recvmsg.3#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_send.3#4 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_sendmsg.3#4 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_sys_calls.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/stdlib/malloc.3#3 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/stdlib/malloc.c#6 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/stdlib/ql.h#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libc/stdlib/qr.h#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libc/string/memccpy.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/string/memchr.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/string/memcmp.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/string/memset.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libc/string/strndup.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libefi/libefi.3#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgpib/Makefile#4 integrate .. //depot/projects/soc2009/trasz_limits/lib/libgpib/gpib.3#1 branch .. //depot/projects/soc2009/trasz_limits/lib/libpam/modules/pam_unix/pam_unix.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/msun/amd64/fenv.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/msun/amd64/fenv.h#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/msun/i387/fenv.c#2 integrate .. //depot/projects/soc2009/trasz_limits/lib/msun/i387/fenv.h#2 integrate .. //depot/projects/soc2009/trasz_limits/release/doc/en_US.ISO8859-1/hardware/article.sgml#6 integrate .. //depot/projects/soc2009/trasz_limits/release/doc/en_US.ISO8859-1/relnotes/article.sgml#6 integrate .. //depot/projects/soc2009/trasz_limits/sbin/camcontrol/camcontrol.c#7 integrate .. //depot/projects/soc2009/trasz_limits/sbin/dump/itime.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/dump/main.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/geom/class/multipath/geom_multipath.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/ifconfig/ifcarp.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/iscontrol.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/pdu.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/mount_nfs/mount_nfs.c#8 integrate .. //depot/projects/soc2009/trasz_limits/sbin/newfs/newfs.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/sysctl/sysctl.8#2 integrate .. //depot/projects/soc2009/trasz_limits/sbin/sysctl/sysctl.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sbin/umount/umount.c#4 integrate .. //depot/projects/soc2009/trasz_limits/share/examples/kld/cdev/test/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/share/examples/kld/syscall/test/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/gpib.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/pcii.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/man/man4/tnt4882.4#2 integrate .. //depot/projects/soc2009/trasz_limits/share/misc/committers-src.dot#8 integrate .. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/amd64_mem.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/cam/ata/ata_all.c#6 integrate .. //depot/projects/soc2009/trasz_limits/sys/cam/ata/ata_da.c#8 integrate .. //depot/projects/soc2009/trasz_limits/sys/cam/ata/ata_pmp.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/cam/ata/ata_xpt.c#7 integrate .. //depot/projects/soc2009/trasz_limits/sys/cam/cam_ccb.h#7 integrate .. //depot/projects/soc2009/trasz_limits/sys/cam/cam_xpt.c#8 integrate .. //depot/projects/soc2009/trasz_limits/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/cddl/contrib/opensolaris/uts/common/sys/dkio.h#2 delete .. //depot/projects/soc2009/trasz_limits/sys/cddl/contrib/opensolaris/uts/common/sys/dklabel.h#2 delete .. //depot/projects/soc2009/trasz_limits/sys/dev/acpica/acpi_cpu.c#7 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ahci/ahci.c#8 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ahci/ahci.h#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ata/ata-all.c#8 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ata/ata-all.h#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ata/atapi-cam.c#6 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ata/chipsets/ata-netcell.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ata/chipsets/ata-siliconimage.c#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/bge/if_bge.c#9 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ciss/ciss.c#8 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/e1000/if_em.c#10 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/e1000/if_igb.c#11 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/fb/vesa.c#6 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ieee488/ibfoo.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ieee488/pcii.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ieee488/tnt4882.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ieee488/tnt4882.h#1 branch .. //depot/projects/soc2009/trasz_limits/sys/dev/ieee488/upd7210.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/ieee488/upd7210.h#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/isp/isp.c#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/isp/isp_freebsd.c#7 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/isp/isp_library.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/isp/isp_library.h#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/isp/isp_pci.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/isp/isp_sbus.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/isp/ispmbox.h#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/isp/ispvar.h#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/mpt/mpt_cam.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/mpt/mpt_raid.c#6 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/pci/pci.c#10 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/pci/pcireg.h#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/pci/pcivar.h#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/siba/siba.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/siba/siba_bwn.c#1 branch .. //depot/projects/soc2009/trasz_limits/sys/dev/siba/siba_cc.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/siba/siba_core.c#1 branch .. //depot/projects/soc2009/trasz_limits/sys/dev/siba/siba_ids.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/siba/siba_pcib.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/siba/sibareg.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/siba/sibavar.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/siis/siis.c#6 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/siis/siis.h#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/usb/serial/u3g.c#10 integrate .. //depot/projects/soc2009/trasz_limits/sys/dev/usb/usbdevs#16 integrate .. //depot/projects/soc2009/trasz_limits/sys/fs/nfsclient/nfs_clvfsops.c#7 integrate .. //depot/projects/soc2009/trasz_limits/sys/fs/nfsclient/nfs_clvnops.c#13 integrate .. //depot/projects/soc2009/trasz_limits/sys/fs/nfsclient/nfsmount.h#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/fs/nfsclient/nfsnode.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/geom/geom_redboot.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/geom/virstor/g_virstor.c#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/gnu/fs/ext2fs/ext2_readwrite.c#5 delete .. //depot/projects/soc2009/trasz_limits/sys/i386/i386/pmap.c#13 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/kern_shutdown.c#7 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/kern_umtx.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/kern/vfs_lookup.c#8 integrate .. //depot/projects/soc2009/trasz_limits/sys/mips/conf/SWARM#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/mips/include/proc.h#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/mips/mips/exception.S#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/mips/mips/swtch.S#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/mips/mips/trap.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/mips/sibyte/sb_asm.S#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/mips/sibyte/sb_machdep.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/mips/sibyte/sb_scd.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/mips/sibyte/sb_scd.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/mips/sibyte/sb_zbbus.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/mips/sibyte/sb_zbpci.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/modules/Makefile#15 integrate .. //depot/projects/soc2009/trasz_limits/sys/modules/siba_bwn/Makefile#1 branch .. //depot/projects/soc2009/trasz_limits/sys/net/vnet.c#6 integrate .. //depot/projects/soc2009/trasz_limits/sys/net/vnet.h#11 integrate .. //depot/projects/soc2009/trasz_limits/sys/net80211/ieee80211_adhoc.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/net80211/ieee80211_hostap.c#7 integrate .. //depot/projects/soc2009/trasz_limits/sys/net80211/ieee80211_ioctl.h#9 integrate .. //depot/projects/soc2009/trasz_limits/sys/net80211/ieee80211_mesh.c#7 integrate .. //depot/projects/soc2009/trasz_limits/sys/net80211/ieee80211_sta.c#8 integrate .. //depot/projects/soc2009/trasz_limits/sys/net80211/ieee80211_wds.c#5 integrate .. //depot/projects/soc2009/trasz_limits/sys/netinet/in.c#14 integrate .. //depot/projects/soc2009/trasz_limits/sys/netinet/ip.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/netinet/sctp_input.c#7 integrate .. //depot/projects/soc2009/trasz_limits/sys/netinet/tcp.h#3 integrate .. //depot/projects/soc2009/trasz_limits/sys/powerpc/mpc85xx/pci_ocp.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/security/audit/audit_bsm.c#4 integrate .. //depot/projects/soc2009/trasz_limits/sys/sun4v/include/bus.h#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/sun4v/sun4v/bus_machdep.c#2 integrate .. //depot/projects/soc2009/trasz_limits/sys/sys/ata.h#6 integrate .. //depot/projects/soc2009/trasz_limits/sys/sys/fbio.h#3 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/bc/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/bc/bc.y#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/bc/extern.h#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/bc/scan.l#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/csup/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/dc/Makefile#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/dc/bcode.c#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/dc/bcode.h#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/dc/dc.c#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/dc/inout.c#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/dc/mem.c#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/dc/stack.c#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/gcore/extern.h#2 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/gcore/gcore.c#3 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/procstat/procstat.1#3 integrate .. //depot/projects/soc2009/trasz_limits/usr.bin/truss/mips-fbsd.c#4 integrate .. //depot/projects/soc2009/trasz_limits/usr.sbin/powerd/Makefile#3 integrate .. //depot/projects/soc2009/trasz_limits/usr.sbin/powerd/powerd.c#4 integrate .. //depot/projects/soc2009/trasz_limits/usr.sbin/rtsold/rtsold.c#3 integrate Differences ... ==== //depot/projects/soc2009/trasz_limits/bin/pax/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 -# $FreeBSD: src/bin/pax/Makefile,v 1.12 2004/05/14 13:31:19 cognet Exp $ +# $FreeBSD: src/bin/pax/Makefile,v 1.13 2010/02/04 07:18:19 imp Exp $ # To install on versions prior to BSD 4.4 the following may have to be # defined with CFLAGS += @@ -33,8 +33,6 @@ #MAN= pax.1 tar.1 cpio.1 #LINKS= ${BINDIR}/pax ${BINDIR}/tar ${BINDIR}/pax ${BINDIR}/cpio -.if ${MACHINE_ARCH} == "arm" WARNS?= 3 -.endif .include ==== //depot/projects/soc2009/trasz_limits/contrib/csup/Makefile#2 (text) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/contrib/csup/Makefile,v 1.2 2009/01/05 15:18:16 lulf Exp $ +# $FreeBSD: src/contrib/csup/Makefile,v 1.3 2010/02/02 05:57:42 lulf Exp $ PREFIX?= /usr/local BINDIR?= ${PREFIX}/bin @@ -7,7 +7,7 @@ UNAME!= /usr/bin/uname -s PROG= csup -SRCS= attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \ +SRCS= attrstack.c auth.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \ globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c parse.y \ pathcomp.c proto.c status.c stream.c threads.c token.l updater.c \ rcsfile.c rcsparse.c lex.rcs.c rsyncfile.c @@ -42,4 +42,7 @@ DPADD= ${LIBCRYPTO} ${LIBZ} LDADD= -lcrypto -lz +SCRIPTS= cpasswd.sh +MAN= csup.1 cpasswd.1 + .include ==== //depot/projects/soc2009/trasz_limits/contrib/csup/TODO#2 (text) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/contrib/csup/TODO,v 1.2 2009/01/05 15:18:16 lulf Exp $ +$FreeBSD: src/contrib/csup/TODO,v 1.3 2010/02/02 05:57:42 lulf Exp $ BUGS: @@ -17,7 +17,6 @@ MISSING FEATURES: -- Add support for authentication. - Add support for shell commands sent by the server. - Add missing support for various CVSup options : -D, -a (requires authentication support), -e and -E (requires shell commands support) ==== //depot/projects/soc2009/trasz_limits/contrib/csup/config.h#2 (text) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/contrib/csup/config.h,v 1.1.1.2 2006/03/14 03:51:12 mux Exp $ + * $FreeBSD: src/contrib/csup/config.h,v 1.2 2010/02/02 05:57:42 lulf Exp $ */ #ifndef _CONFIG_H_ #define _CONFIG_H_ @@ -108,6 +108,7 @@ struct chan *chan1; struct stream *server; fattr_support_t fasupport; + int reqauth; }; struct config *config_init(const char *, struct coll *, int); ==== //depot/projects/soc2009/trasz_limits/contrib/csup/csup.1#2 (text) ==== @@ -22,7 +22,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $Id: cvsup.1,v 1.70 2003/03/04 18:23:46 jdp Exp $ -.\" $FreeBSD: src/contrib/csup/csup.1,v 1.2 2009/01/07 18:37:07 lulf Exp $ +.\" $FreeBSD: src/contrib/csup/csup.1,v 1.3 2010/02/02 05:57:42 lulf Exp $ .\" .Dd February 1, 2006 .Os FreeBSD @@ -32,7 +32,7 @@ .Nd network distribution package for CVS repositories .Sh SYNOPSIS .Nm -.Op Fl 146ksvzZ +.Op Fl 146aksvzZ .Op Fl A Ar addr .Op Fl b Ar base .Op Fl c Ar collDir @@ -106,6 +106,12 @@ Forces .Nm to use IPv6 addresses only. +.It Fl a +Requires the server to authenticate itself (prove its identity) to +the client. If authentication of the server fails, the update is +canceled. See +.Sx AUTHENTICATION , +below. .It Fl A Ar addr Specifies a local address to bind to when connecting to the server. The local address might be a hostname or a numeric host address string @@ -793,6 +799,102 @@ .It .Pa /bar/stool/src-all/refuse.cvs:RELENG_3 .El +.Sh AUTHENTICATION +.Nm +implements an optional authentication mechanism which can be used by the +client and server to verify each other's identities. +Public CVSup servers normally do not enable authentication. +.Nm +users may ignore this section unless they have been informed +that authentication is required by the administrator of their server. +.Pp +The authentication subsystem uses a +challenge-response protocol which is immune to packet sniffing and +replay attacks. No passwords are sent over the network in either +direction. Both the client and the server can independently verify +the identities of each other. +.Pp +The file +.Li $ Ns Ev HOME Ns Pa /.csup/auth +holds the information used for authentication. This file contains a +record for each server that the client is allowed to access. Each +record occupies one line in the file. Lines beginning with +.Ql # +are ignored, as are lines containing only white space. White space is +significant everywhere else in the file. Fields are separated by +.Ql \&: +characters. +.Pp +Each record of the file has the following form: +.Bd -literal -offset indent +.Sm off +.Xo Ar serverName No : Ar clientName No : +.Ar password No : Ar comment +.Xc +.Sm on +.Ed +.Pp +All fields must be present even if some of them are empty. +.Ar ServerName +is the name of the server to which the record applies. By convention, +it is the canonical fully-qualified domain name of the server, e.g., +.Ql CVSup177.FreeBSD.ORG . +This must agree with the server's own idea of its name. The name is +case-insensitive. +.Pp +.Ar ClientName +is the name the client uses to gain access to the server. By +convention, e-mail addresses are used for all client names, e.g., +.Ql BillyJoe@FreeBSD.ORG . +Client names are case-insensitive. +.Pp +.Ar Password +is a secret string of characters that the client uses to prove its +identity. It may not contain any +.Ql \&: +or newline characters. +.Pp +.Ar Comment +may contain any additional information to identify the record. It +is not interpreted by the program. +.Pp +To set up authentication for a given server, one must perform the +following steps: +.Bl -enum +.It +Obtain the official +.Ar serverName +from the administrator of the server or from some other source. +.It +Choose an appropriate +.Ar clientName . +It should be in the form of a valid e-mail address, to make it easy +for the server administrator to contact the user if necessary. +.It +Choose an arbitrary secret +.Ar password . +.It +Run the +.Nm cpasswd +utility, and type in the +.Ar password +when prompted for it. The utility will print out a line to send +to the server administrator, and instruct you how to modify your +.Li $ Ns Ev HOME Ns Pa /.csup/auth +file. You should use a secure channel to send the line to the +server administrator. +.El +.Pp +Since +.Li $ Ns Ev HOME Ns Pa /.csup/auth +contains passwords, you should ensure that it is not readable by +anyone except yourself. +.Pp +Authentication works independently in both directions. The server +administrator controls whether you must prove your identity. +You control whether to check the server's identity, by means of the +.Fl a +command line option. .Sh csup AND FIREWALLS In its default mode, .Nm @@ -865,6 +967,7 @@ List files. .El .Sh SEE ALSO +.Xr cpasswd 1 , .Xr cvs 1 , .Xr rcsintro 1 , .Xr ssh 1 . ==== //depot/projects/soc2009/trasz_limits/contrib/csup/main.c#2 (text) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/contrib/csup/main.c,v 1.1.1.2 2006/03/14 03:51:11 mux Exp $ + * $FreeBSD: src/contrib/csup/main.c,v 1.2 2010/02/02 05:57:42 lulf Exp $ */ #include @@ -60,6 +60,8 @@ "(same as \"-r 0\")"); lprintf(-1, USAGE_OPTFMT, "-4", "Force usage of IPv4 addresses"); lprintf(-1, USAGE_OPTFMT, "-6", "Force usage of IPv6 addresses"); + lprintf(-1, USAGE_OPTFMT, "-a", + "Require server to authenticate itself to us"); lprintf(-1, USAGE_OPTFMT, "-A addr", "Bind local socket to a specific address"); lprintf(-1, USAGE_OPTFMT, "-b base", @@ -107,7 +109,7 @@ struct stream *lock; char *argv0, *file, *lockfile; int family, error, lockfd, lflag, overridemask; - int c, i, deletelim, port, retries, status; + int c, i, deletelim, port, retries, status, reqauth; time_t nexttry; error = 0; @@ -124,9 +126,10 @@ lockfile = NULL; override = coll_new(NULL); overridemask = 0; + reqauth = 0; while ((c = getopt(argc, argv, - "146A:b:c:d:gh:i:kl:L:p:P:r:svzZ")) != -1) { + "146aA:b:c:d:gh:i:kl:L:p:P:r:svzZ")) != -1) { switch (c) { case '1': retries = 0; @@ -137,6 +140,10 @@ case '6': family = AF_INET6; break; + case 'a': + /* Require server authentication */ + reqauth = 1; + break; case 'A': error = getaddrinfo(optarg, NULL, NULL, &res); if (error) { @@ -303,6 +310,7 @@ config->laddrlen = laddrlen; } config->deletelim = deletelim; + config->reqauth = reqauth; lprintf(2, "Connecting to %s\n", config->host); i = 0; ==== //depot/projects/soc2009/trasz_limits/contrib/csup/proto.c#2 (text) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/contrib/csup/proto.c,v 1.3 2009/02/15 13:22:21 lulf Exp $ + * $FreeBSD: src/contrib/csup/proto.c,v 1.4 2010/02/02 05:57:42 lulf Exp $ */ #include @@ -45,6 +45,7 @@ #include #include +#include "auth.h" #include "config.h" #include "detailer.h" #include "fattr.h" @@ -74,7 +75,6 @@ static int proto_waitconnect(int); static int proto_greet(struct config *); static int proto_negproto(struct config *); -static int proto_login(struct config *); static int proto_fileattr(struct config *); static int proto_xchgcoll(struct config *); static struct mux *proto_mux(struct config *); @@ -251,56 +251,6 @@ return (STATUS_FAILURE); } -static int -proto_login(struct config *config) -{ - struct stream *s; - char hostbuf[MAXHOSTNAMELEN]; - char *line, *login, *host, *cmd, *realm, *challenge, *msg; - int error; - - s = config->server; - error = gethostname(hostbuf, sizeof(hostbuf)); - hostbuf[sizeof(hostbuf) - 1] = '\0'; - if (error) - host = NULL; - else - host = hostbuf; - login = getlogin(); - proto_printf(s, "USER %s %s\n", login != NULL ? login : "?", - host != NULL ? host : "?"); - stream_flush(s); - line = stream_getln(s, NULL); - cmd = proto_get_ascii(&line); - realm = proto_get_ascii(&line); - challenge = proto_get_ascii(&line); - if (challenge == NULL || line != NULL) - goto bad; - if (strcmp(realm, ".") != 0 || strcmp(challenge, ".") != 0) { - lprintf(-1, "Authentication required by the server and not " - "supported by client\n"); - return (STATUS_FAILURE); - } - proto_printf(s, "AUTHMD5 . . .\n"); - stream_flush(s); - line = stream_getln(s, NULL); - cmd = proto_get_ascii(&line); - if (cmd == NULL || line == NULL) - goto bad; - if (strcmp(cmd, "OK") == 0) - return (STATUS_SUCCESS); - if (strcmp(cmd, "!") == 0) { - msg = proto_get_rest(&line); - if (msg == NULL) - goto bad; - lprintf(-1, "Server error: %s\n", msg); - return (STATUS_FAILURE); - } -bad: - lprintf(-1, "Invalid server reply to AUTHMD5\n"); - return (STATUS_FAILURE); -} - /* * File attribute support negotiation. */ @@ -601,7 +551,7 @@ if (status == STATUS_SUCCESS) status = proto_negproto(config); if (status == STATUS_SUCCESS) - status = proto_login(config); + status = auth_login(config); if (status == STATUS_SUCCESS) status = proto_fileattr(config); if (status == STATUS_SUCCESS) ==== //depot/projects/soc2009/trasz_limits/contrib/netcat/FREEBSD-vendor#4 (text+ko) ==== @@ -1,5 +1,5 @@ -# $FreeBSD: src/contrib/netcat/FREEBSD-vendor,v 1.4 2009/12/08 19:12:38 delphij Exp $ +# $FreeBSD: src/contrib/netcat/FREEBSD-vendor,v 1.5 2010/02/02 00:30:44 delphij Exp $ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL: http://www.openbsd.org/ -Version: 4.5 +Version: 4.6 License: BSD ==== //depot/projects/soc2009/trasz_limits/etc/defaults/rc.conf#12 (text+ko) ==== @@ -15,7 +15,7 @@ # For a more detailed explanation of all the rc.conf variables, please # refer to the rc.conf(5) manual page. # -# $FreeBSD: src/etc/defaults/rc.conf,v 1.367 2010/01/17 08:41:07 ume Exp $ +# $FreeBSD: src/etc/defaults/rc.conf,v 1.368 2010/02/03 16:18:42 ume Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -460,6 +460,10 @@ # Now this works only for IPv6 link local # multicast addrs. rtsol_flags="" # Flags to IPv6 router solicitation. +rtsold_enable="NO" # Set to YES to enable an IPv6 router + # solicitation daemon. +rtsold_flags="-a" # Flags to an IPv6 router solicitation + # daemon. rtadvd_enable="NO" # Set to YES to enable an IPv6 router # advertisement daemon. If set to YES, # this router becomes a possible candidate ==== //depot/projects/soc2009/trasz_limits/etc/network.subr#9 (text+ko) ==== @@ -22,7 +22,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/network.subr,v 1.205 2009/12/29 21:06:49 jhb Exp $ +# $FreeBSD: src/etc/network.subr,v 1.206 2010/02/03 16:18:42 ume Exp $ # # @@ -882,7 +882,9 @@ { if ipv6_autoconfif $1; then ifconfig $1 inet6 accept_rtadv up - rtsol ${rtsol_flags} $1 + if ! checkyesno rtsold_enable; then + rtsol ${rtsol_flags} $1 + fi fi } ==== //depot/projects/soc2009/trasz_limits/etc/rc.d/Makefile#10 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.102 2009/12/02 15:05:26 ume Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.103 2010/02/03 16:18:42 ume Exp $ .include @@ -30,7 +30,7 @@ powerd power_profile ppp pppoed pwcheck \ quota \ random rarpd resolv rfcomm_pppd_server root \ - route6d routed routing rpcbind rtadvd rwho \ + route6d routed routing rpcbind rtadvd rtsold rwho \ savecore sdpd securelevel sendmail \ serial sppp statd static_arp stf swap1 \ syscons sysctl syslogd \ ==== //depot/projects/soc2009/trasz_limits/etc/services#4 (text+ko) ==== @@ -16,7 +16,7 @@ # Kerberos services are for Kerberos v4, and are unofficial. Sites running # v5 should uncomment v5 entries and comment v4 entries. # -# $FreeBSD: src/etc/services,v 1.116 2010/01/27 11:23:21 edwin Exp $ +# $FreeBSD: src/etc/services,v 1.117 2010/02/01 13:30:06 ume Exp $ # From: @(#)services 5.8 (Berkeley) 5/9/91 # # WELL KNOWN PORT NUMBERS @@ -2225,6 +2225,8 @@ nuts_dem 4132/udp #NUTS Daemon nuts_bootp 4133/tcp #NUTS Bootp Server nuts_bootp 4133/udp #NUTS Bootp Server +sieve 4190/tcp #ManageSieve Protocol +sieve 4190/udp #ManageSieve Protocol rwhois 4321/tcp #Remote Who Is rwhois 4321/udp #Remote Who Is unicall 4343/tcp ==== //depot/projects/soc2009/trasz_limits/games/morse/Makefile#2 (text+ko) ==== @@ -1,11 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 -# $FreeBSD: src/games/morse/Makefile,v 1.8 2005/11/11 09:57:32 ru Exp $ +# $FreeBSD: src/games/morse/Makefile,v 1.9 2010/02/04 07:08:06 imp Exp $ PROG= morse MAN= morse.6 -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" -CFLAGS += -DSPEAKER=\"/dev/speaker\" -.endif - .include ==== //depot/projects/soc2009/trasz_limits/games/morse/morse.c#2 (text+ko) ==== @@ -47,7 +47,7 @@ static char sccsid[] = "@(#)morse.c 8.1 (Berkeley) 5/31/93"; #endif static const char rcsid[] = - "$FreeBSD: src/games/morse/morse.c,v 1.22 2008/06/08 19:35:47 scf Exp $"; + "$FreeBSD: src/games/morse/morse.c,v 1.23 2010/02/04 07:08:06 imp Exp $"; #endif /* not lint */ #include @@ -63,6 +63,9 @@ #include #include +/* Always use the speaker, let the open fail if -p is selected */ +#define SPEAKER "/dev/speaker" + #ifdef SPEAKER #include #endif ==== //depot/projects/soc2009/trasz_limits/gnu/usr.bin/binutils/Makefile.inc#2 (text+ko) ==== @@ -1,9 +1,5 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/Makefile.inc,v 1.9 2006/09/12 19:24:01 obrien Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/Makefile.inc,v 1.10 2010/02/03 02:39:08 imp Exp $ -.if (${TARGET_ARCH} == "alpha") -WARNS?= 2 -.else WARNS?= 3 -.endif .include "../Makefile.inc" ==== //depot/projects/soc2009/trasz_limits/gnu/usr.bin/binutils/libbfd/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/libbfd/Makefile,v 1.33 2004/10/24 15:32:25 ru Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/libbfd/Makefile,v 1.34 2010/02/03 18:29:35 imp Exp $ .include "../Makefile.inc0" @@ -11,8 +11,7 @@ section.c srec.c stab-syms.c stabs.c syms.c targets.c tekhex.c \ targmatch.h dwarf1.c dwarf2.c config.h bfdver.h bfdio.c simple.c WARNS?= 0 -.if (${TARGET_ARCH} == "alpha" || ${TARGET_ARCH} == "ia64" || \ - ${TARGET_ARCH} == "sparc64") +.if (${TARGET_ARCH} == "ia64" || ${TARGET_ARCH} == "sparc64") WARNS?= 2 .endif CFLAGS+= -D_GNU_SOURCE ==== //depot/projects/soc2009/trasz_limits/gnu/usr.bin/groff/tmac/mdoc.local#6 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.72 2010/01/15 14:05:06 ru Exp $ +.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.73 2010/02/01 20:54:45 joerg Exp $ .\" .\" %beginstrip% . @@ -46,6 +46,7 @@ .ds doc-str-Lb-libelf ELF Parsing Library (libelf, \-lelf) .ds doc-str-Lb-libfetch File Transfer Library (libfetch, \-lfetch) .ds doc-str-Lb-libgeom Userland API Library for kernel GEOM subsystem (libgeom, \-lgeom) +.ds doc-str-Lb-libgpib General-Purpose Instrument Bus (GPIB) library (libgpib, \-lgpib) .ds doc-str-Lb-libipx IPX Address Conversion Support Library (libipx, \-lipx) .ds doc-str-Lb-libjail Jail Library (libjail, \-ljail) .ds doc-str-Lb-libkiconv Kernel side iconv library (libkiconv, \-lkiconv) ==== //depot/projects/soc2009/trasz_limits/lib/libc/gen/getutxent.3#2 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/gen/getutxent.3,v 1.7 2010/01/23 17:58:40 ed Exp $ +.\" $FreeBSD: src/lib/libc/gen/getutxent.3,v 1.8 2010/02/03 19:31:02 ed Exp $ .\" .Dd January 8, 2010 .Os @@ -426,8 +426,10 @@ .Fa ut_type . This prevents the need for special utility functions to update the other databases, such as the +.Fn updlastlogx +and .Fn updwtmpx -function which is often available in other implementations. +functions which are available in other implementations. It also tries to replace .Dv DEAD_PROCESS entries in the active sessions database when storing ==== //depot/projects/soc2009/trasz_limits/lib/libc/gen/rand48.3#2 (text+ko) ==== @@ -10,9 +10,9 @@ .\" to anyone/anything when using this software. .\" .\" @(#)rand48.3 V1.0 MB 8 Oct 1993 -.\" $FreeBSD: src/lib/libc/gen/rand48.3,v 1.17 2005/01/20 09:17:02 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/rand48.3,v 1.19 2010/02/02 19:44:51 gavin Exp $ .\" -.Dd October 8, 1993 +.Dd February 2, 2010 .Dt RAND48 3 .Os .Sh NAME @@ -57,7 +57,7 @@ particular formula employed is r(n+1) = (a * r(n) + c) mod m where the default values are -for the multiplicand a = 0xfdeece66d = 25214903917 and +for the multiplicand a = 0x5deece66d = 25214903917 and the addend c = 0xb = 11. The modulo is always fixed at m = 2 ** 48. r(n) is called the seed of the random number generator. ==== //depot/projects/soc2009/trasz_limits/lib/libc/mips/sys/ptrace.S#2 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/mips/sys/ptrace.S,v 1.3 2008/04/26 12:08:02 imp Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/mips/sys/ptrace.S,v 1.6 2010/02/04 05:49:59 neel Exp $"); #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) @@ -42,14 +42,26 @@ #endif /* LIBC_SCCS and not lint */ LEAF(ptrace) + .frame sp, 40, ra + .mask 0x80000000, -8 #ifdef __ABICALLS__ .set noreorder .cpload t9 .set reorder #endif + subu sp, sp, 40 + sw ra, 32(sp) +#ifdef __ABICALLS__ + .cprestore 16 +#endif la t9, _C_LABEL(__error) # locate address of errno jalr t9 +#ifdef __ABICALLS__ + lw gp, 16(sp) +#endif sw zero, 0(v0) + lw ra, 32(sp) + addu sp, sp, 40 li v0, SYS_ptrace syscall bne a3, zero, 1f ==== //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_opt_info.3#3 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)send.2 8.2 (Berkeley) 2/21/94 -.\" $FreeBSD: src/lib/libc/net/sctp_opt_info.3,v 1.5 2010/01/12 21:45:03 brueffer Exp $ +.\" $FreeBSD: src/lib/libc/net/sctp_opt_info.3,v 1.6 2010/01/31 21:45:14 brucec Exp $ .\" .Dd December 15, 2006 .Dt SCTP_OPT_INFO 3 @@ -87,6 +87,8 @@ .Dv SCTP_PEER_AUTH_CHUNKS .Pp .Dv SCTP_LOCAL_AUTH_CHUNKS +.Sh RETURN VALUES +The call returns 0 on success and -1 upon error. .Sh ERRORS The .Fn sctp_opt_info ==== //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_recvmsg.3#3 (text+ko) ==== @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/net/sctp_recvmsg.3,v 1.6 2010/01/12 21:45:03 brueffer Exp $ +.\" $FreeBSD: src/lib/libc/net/sctp_recvmsg.3,v 1.7 2010/01/31 21:45:14 brucec Exp $ .\" .Dd August 13, 2007 .Dt SCTP_RECVMSG 3 @@ -269,7 +269,7 @@ but may be caused by transient congestion. .It Bq Er EHOSTUNREACH The remote host was unreachable. -.It Bq Er ENOTCON +.It Bq Er ENOTCONN On a one-to-one style socket no association exists. .It Bq Er ECONNRESET An abort was received by the stack while the user was ==== //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_send.3#4 (text+ko) ==== @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/net/sctp_send.3,v 1.6 2010/01/12 21:45:03 brueffer Exp $ +.\" $FreeBSD: src/lib/libc/net/sctp_send.3,v 1.7 2010/01/31 21:45:14 brucec Exp $ .\" .Dd December 15, 2006 .Dt SCTP_SEND 3 @@ -319,7 +319,7 @@ but may be caused by transient congestion. .It Bq Er EHOSTUNREACH The remote host was unreachable. -.It Bq Er ENOTCON +.It Bq Er ENOTCONN On a one-to-one style socket no association exists. .It Bq Er ECONNRESET An abort was received by the stack while the user was ==== //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_sendmsg.3#4 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)send.2 8.2 (Berkeley) 2/21/94 -.\" $FreeBSD: src/lib/libc/net/sctp_sendmsg.3,v 1.6 2010/01/12 21:45:03 brueffer Exp $ +.\" $FreeBSD: src/lib/libc/net/sctp_sendmsg.3,v 1.7 2010/01/31 21:45:14 brucec Exp $ .\" .Dd December 15, 2006 .Dt SCTP_SENDMSG 3 @@ -296,7 +296,7 @@ but may be caused by transient congestion. .It Bq Er EHOSTUNREACH The remote host was unreachable. -.It Bq Er ENOTCON +.It Bq Er ENOTCONN On a one-to-one style socket no association exists. .It Bq Er ECONNRESET An abort was received by the stack while the user was ==== //depot/projects/soc2009/trasz_limits/lib/libc/net/sctp_sys_calls.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ * SUCH DAMAGE. */ #include -__FBSDID("$FreeBSD: src/lib/libc/net/sctp_sys_calls.c,v 1.14 2007/07/24 20:06:01 rrs Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/sctp_sys_calls.c,v 1.15 2010/01/31 21:47:39 brucec Exp $"); #include #include #include @@ -784,7 +784,7 @@ free(buf); if (ret != 0) { if (errno == EALREADY) { - no_end_cx = 1;; + no_end_cx = 1; goto continue_send; } return (ret); ==== //depot/projects/soc2009/trasz_limits/lib/libc/stdlib/malloc.3#3 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)malloc.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.81 2009/09/26 18:20:40 alc Exp $ +.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.82 2010/01/31 23:16:10 jasone Exp $ .\" -.Dd September 26, 2009 +.Dd January 31, 2010 .Dt MALLOC 3 .Os .Sh NAME @@ -55,9 +55,7 @@ .Ft const char * .Va _malloc_options ; .Ft void -.Fo \*(lp*_malloc_message\*(rp -.Fa "const char *p1" "const char *p2" "const char *p3" "const char *p4" -.Fc +.Fn \*(lp*_malloc_message\*(rp "const char *p1" "const char *p2" "const char *p3" "const char *p4" .In malloc_np.h .Ft size_t .Fn malloc_usable_size "const void *ptr" @@ -124,7 +122,9 @@ This is a .Fx specific API designed to ease the problems with traditional coding styles -for realloc causing memory leaks in libraries. +for +.Fn realloc +causing memory leaks in libraries. .Pp The .Fn free @@ -184,18 +184,6 @@ The process will call .Xr abort 3 in these cases. -.It B -Double/halve the per-arena lock contention threshold at which a thread is -randomly re-assigned to an arena. -This dynamic load balancing tends to push threads away from highly contended >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Feb 6 15:00:32 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8CAF41065679; Sat, 6 Feb 2010 15:00:31 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50AB61065672 for ; Sat, 6 Feb 2010 15:00:31 +0000 (UTC) (envelope-from gabor@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3EEAC8FC1D for ; Sat, 6 Feb 2010 15:00:31 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o16F0VR2036378 for ; Sat, 6 Feb 2010 15:00:31 GMT (envelope-from gabor@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o16F0Vgx036376 for perforce@freebsd.org; Sat, 6 Feb 2010 15:00:31 GMT (envelope-from gabor@freebsd.org) Date: Sat, 6 Feb 2010 15:00:31 GMT Message-Id: <201002061500.o16F0Vgx036376@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@freebsd.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174403 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 15:00:32 -0000 http://p4web.freebsd.org/chv.cgi?CH=174403 Change 174403 by gabor@gabor_server on 2010/02/06 15:00:02 - style(9) Affected files ... .. //depot/projects/soc2008/gabor_textproc/grep/fastgrep.c#17 edit .. //depot/projects/soc2008/gabor_textproc/grep/file.c#49 edit .. //depot/projects/soc2008/gabor_textproc/grep/grep.c#93 edit .. //depot/projects/soc2008/gabor_textproc/grep/grep.h#53 edit .. //depot/projects/soc2008/gabor_textproc/grep/queue.c#10 edit .. //depot/projects/soc2008/gabor_textproc/grep/util.c#87 edit Differences ... ==== //depot/projects/soc2008/gabor_textproc/grep/fastgrep.c#17 (text+ko) ==== @@ -52,7 +52,7 @@ void fgrepcomp(fastgrep_t *fg, const char *pat) { - unsigned int i; + unsigned int i; /* Initialize. */ fg->len = strlen(pat); @@ -76,14 +76,14 @@ int fastcomp(fastgrep_t *fg, const char *pat) { - unsigned int i; - bool bol = false; - bool eol = false; - int shiftPatternLen; - int hasDot = 0; - int firstHalfDot = -1; - int firstLastHalfDot = -1; - int lastHalfDot = 0; + unsigned int i; + int firstHalfDot = -1; + int firstLastHalfDot = -1; + int hasDot = 0; + int lastHalfDot = 0; + int shiftPatternLen; + bool bol = false; + bool eol = false; /* Initialize. */ fg->len = strlen(pat); @@ -201,8 +201,8 @@ int grep_search(fastgrep_t *fg, unsigned char *data, size_t len, regmatch_t *pmatch) { - unsigned int j; - int ret = REG_NOMATCH; + unsigned int j; + int ret = REG_NOMATCH; if (pmatch->rm_so == (ssize_t)len) return (ret); @@ -280,9 +280,9 @@ static int grep_cmp(const unsigned char *pat, const unsigned char *data, size_t len) { - unsigned int i; - size_t size; - wchar_t *wdata, *wpat; + size_t size; + wchar_t *wdata, *wpat; + unsigned int i; if (iflag) { if ((size = mbstowcs(NULL, (const char *)data, 0)) == ((size_t) - 1)) @@ -320,8 +320,8 @@ static void grep_revstr(unsigned char *str, int len) { - int i; - char c; + int i; + char c; for (i = 0; i < len / 2; i++) { c = str[i]; ==== //depot/projects/soc2008/gabor_textproc/grep/file.c#49 (text+ko) ==== @@ -69,7 +69,7 @@ int grep_fgetc(struct file *f) { - unsigned char c; + unsigned char c; switch (filebehave) { case FILE_STDIO: @@ -117,9 +117,9 @@ char * grep_fgetln(struct file *f, size_t *len) { - int ch = 0; - struct stat st; - size_t bufsiz, i = 0; + struct stat st; + size_t bufsiz, i = 0; + int ch = 0; /* Fill in the buffer if it is empty. */ if (binbufptr == NULL) { @@ -178,7 +178,7 @@ struct file * grep_stdin_open(void) { - struct file *f; + struct file *f; snprintf(fname, sizeof fname, getstr(1)); @@ -199,7 +199,7 @@ struct file * grep_open(const char *path) { - struct file *f; + struct file *f; snprintf(fname, sizeof fname, "%s", path); ==== //depot/projects/soc2008/gabor_textproc/grep/grep.c#93 (text+ko) ==== @@ -262,9 +262,9 @@ static void read_patterns(const char *fn) { - FILE *f; - char *line; - size_t len; + FILE *f; + char *line; + size_t len; if ((f = fopen(fn, "r")) == NULL) err(2, "%s", fn); @@ -278,11 +278,11 @@ int main(int argc, char *argv[]) { - int c, lastc, prevoptind, newarg, needpattern; - unsigned int i, eargc, aargc; - char *ep; unsigned long long l; - char **eargv, **aargv, *eopts; + char **aargv, **eargv, *eopts; + char *ep; + unsigned int aargc, eargc, i; + int c, lastc, needpattern, newarg, prevoptind; setlocale(LC_ALL, ""); @@ -328,7 +328,7 @@ eargc = 1; if (eopts != NULL) { - char *str; + char *str; for(i = 0; i < strlen(eopts); i++) if (eopts[i] == ' ') ==== //depot/projects/soc2008/gabor_textproc/grep/grep.h#53 (text+ko) ==== @@ -78,31 +78,31 @@ #define MAX_LINE_MATCHES 32 struct file { + struct mmfile *mmf; + BZFILE *bzf; + FILE *f; + gzFile *gzf; bool binary; bool stdin; - FILE *f; - struct mmfile *mmf; - gzFile *gzf; - BZFILE *bzf; }; struct str { + off_t off; size_t len; + char *dat; + char *file; int line_no; - off_t off; - char *file; - char *dat; }; struct epat { char *pat; + int mode; int type; - int mode; }; typedef struct { + size_t len; unsigned char *pattern; - size_t len; int qsBc[UCHAR_MAX + 1]; /* flags */ bool bol; @@ -117,17 +117,17 @@ extern bool Eflag, Fflag, Gflag, Hflag, Lflag, bflag, cflag, hflag, iflag, lflag, mflag, nflag, oflag, qflag, sflag, vflag, wflag, xflag; -extern bool nullflag, exclflag; +extern bool exclflag, nullflag; extern unsigned long long Aflag, Bflag, mcount; extern char *color, *label; -extern int grepbehave, binbehave, filebehave, devbehave, dirbehave, linkbehave; +extern int binbehave, devbehave, dirbehave, filebehave, grepbehave, linkbehave; -extern bool matchall, first, prev, notfound; +extern bool first, matchall, notfound, prev; extern int tail; -extern unsigned int patterns, epatterns; +extern unsigned int epatterns, patterns; extern char **pattern; extern struct epat *epattern; -extern regex_t *r_pattern, *er_pattern; +extern regex_t *er_pattern, *r_pattern; extern fastgrep_t *fg_pattern; /* For regex errors */ ==== //depot/projects/soc2008/gabor_textproc/grep/queue.c#10 (text+ko) ==== @@ -53,7 +53,7 @@ void enqueue(struct str *x) { - struct qentry *item; + struct qentry *item; item = grep_malloc(sizeof(struct qentry)); item->data.dat = grep_malloc(sizeof(char) * x->len); @@ -72,7 +72,7 @@ static struct qentry * dequeue(void) { - struct qentry *item; + struct qentry *item; item = STAILQ_FIRST(&queue); if (item == NULL) @@ -86,7 +86,7 @@ void printqueue(void) { - struct qentry *item; + struct qentry *item; while ((item = dequeue()) != NULL) { printline(&item->data, '-', (regmatch_t *)NULL, 0); @@ -97,7 +97,7 @@ void clearqueue(void) { - struct qentry *item; + struct qentry *item; while ((item = dequeue()) != NULL) free(item); ==== //depot/projects/soc2008/gabor_textproc/grep/util.c#87 (text+ko) ==== @@ -56,11 +56,11 @@ int grep_tree(char **argv) { - FTS *fts; - FTSENT *p; - int c, ok, fts_flags; - char *d, *dir; - unsigned int i; + FTS *fts; + FTSENT *p; + char *d, *dir; + unsigned int i; + int c, fts_flags, ok; c = fts_flags = 0; @@ -138,11 +138,11 @@ int procfile(const char *fn) { - struct str ln; - struct file *f; - struct stat sb; - mode_t s; - int c, t; + struct file *f; + struct stat sb; + struct str ln; + mode_t s; + int c, t; if (mflag && (mcount <= 0)) return (0); @@ -246,11 +246,11 @@ static int procline(struct str *l, int nottext) { - regmatch_t pmatch; - regmatch_t matches[MAX_LINE_MATCHES]; - size_t st = 0; - int c = 0, r = 0, m = 0; - unsigned int i; + regmatch_t matches[MAX_LINE_MATCHES]; + regmatch_t pmatch; + size_t st = 0; + unsigned int i; + int c = 0, m = 0, r = 0; if (!matchall) { /* Loop to process the whole line */ @@ -282,9 +282,9 @@ r = REG_NOMATCH; /* Check for whole word match */ if (r == 0 && wflag && pmatch.rm_so != 0 && (size_t)pmatch.rm_eo != l->len) { - wchar_t *wbegin; - wint_t wend; - size_t size; + wchar_t *wbegin; + wint_t wend; + size_t size; size = mbstowcs(NULL, l->dat, pmatch.rm_so); @@ -357,7 +357,7 @@ void * grep_malloc(size_t size) { - void *ptr; + void *ptr; if ((ptr = malloc(size)) == NULL) err(2, "malloc"); @@ -370,7 +370,7 @@ void * grep_calloc(size_t nmemb, size_t size) { - void *ptr; + void *ptr; if ((ptr = calloc(nmemb, size)) == NULL) err(2, "calloc"); @@ -395,8 +395,8 @@ void printline(struct str *line, int sep, regmatch_t *matches, int m) { - int i, n = 0; - size_t a = 0; + size_t a = 0; + int i, n = 0; if (!hflag) { if (nullflag == 0) From owner-p4-projects@FreeBSD.ORG Sat Feb 6 15:04:35 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BBF39106568F; Sat, 6 Feb 2010 15:04:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80A321065672 for ; Sat, 6 Feb 2010 15:04:35 +0000 (UTC) (envelope-from gabor@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6F87C8FC0A for ; Sat, 6 Feb 2010 15:04:35 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o16F4ZOf037588 for ; Sat, 6 Feb 2010 15:04:35 GMT (envelope-from gabor@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o16F4Z8r037586 for perforce@freebsd.org; Sat, 6 Feb 2010 15:04:35 GMT (envelope-from gabor@freebsd.org) Date: Sat, 6 Feb 2010 15:04:35 GMT Message-Id: <201002061504.o16F4Z8r037586@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@freebsd.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174404 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 15:04:36 -0000 http://p4web.freebsd.org/chv.cgi?CH=174404 Change 174404 by gabor@gabor_server on 2010/02/06 15:03:57 - style(9) - syntax cleanup Affected files ... .. //depot/projects/soc2008/gabor_textproc/grep/util.c#88 edit Differences ... ==== //depot/projects/soc2008/gabor_textproc/grep/util.c#88 (text+ko) ==== @@ -60,7 +60,8 @@ FTSENT *p; char *d, *dir; unsigned int i; - int c, fts_flags, ok; + int c, fts_flags; + bool ok; c = fts_flags = 0; @@ -92,7 +93,7 @@ break; default: /* Check for file exclusion/inclusion */ - ok = 1; + ok = true; if (exclflag) { d = strrchr(p->fts_path, '/'); dir = grep_malloc(sizeof(char) * (d - p->fts_path + 2)); @@ -100,20 +101,12 @@ for (i = 0; i < epatterns; ++i) { switch(epattern[i].type) { case FILE_PAT: - if (fnmatch(epattern[i].pat, basename(p->fts_path), 0) == 0) { - if (epattern[i].mode == EXCL_PAT) - ok = 0; - else - ok = 1; - } + if (fnmatch(epattern[i].pat, basename(p->fts_path), 0) == 0) + ok = epattern[i].mode != EXCL_PAT; break; case DIR_PAT: - if (strstr(dir, epattern[i].pat) != NULL) { - if (epattern[i].mode == EXCL_PAT) - ok = 0; - else - ok = 1; - } + if (strstr(dir, epattern[i].pat) != NULL) + ok = epattern[i].mode != EXCL_PAT; break; } } @@ -408,13 +401,13 @@ ++n; } if (nflag) { - if (n) + if (n > 0) putchar(sep); printf("%d", line->line_no); ++n; } if (bflag) { - if (n) + if (n > 0) putchar(sep); printf("%lld", (long long)line->off); ++n; From owner-p4-projects@FreeBSD.ORG Sat Feb 6 21:46:19 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CC59D1065679; Sat, 6 Feb 2010 21:46:18 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 903EB1065676 for ; Sat, 6 Feb 2010 21:46:18 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7BBAF8FC1C for ; Sat, 6 Feb 2010 21:46:18 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o16LkIVU094933 for ; Sat, 6 Feb 2010 21:46:18 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o16LkItM094931 for perforce@freebsd.org; Sat, 6 Feb 2010 21:46:18 GMT (envelope-from pgj@FreeBSD.org) Date: Sat, 6 Feb 2010 21:46:18 GMT Message-Id: <201002062146.o16LkItM094931@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to pgj@FreeBSD.org using -f From: Gabor Pali To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174417 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 21:46:19 -0000 http://p4web.freebsd.org/chv.cgi?CH=174417 Change 174417 by pgj@Binturong on 2010/02/06 21:45:22 IFC Affected files ... .. //depot/projects/docproj_hu/doc/en_US.ISO8859-1/share/sgml/authors.ent#43 integrate .. //depot/projects/docproj_hu/doc/en_US.ISO8859-1/share/sgml/mailing-lists.ent#12 integrate .. //depot/projects/docproj_hu/doc/share/pgpkeys/bschmidt.key#1 branch .. //depot/projects/docproj_hu/doc/share/pgpkeys/pgpkeys-developers.sgml#38 integrate .. //depot/projects/docproj_hu/doc/share/pgpkeys/pgpkeys.ent#36 integrate .. //depot/projects/docproj_hu/src/release/doc/en_US.ISO8859-1/hardware/article.sgml#19 integrate .. //depot/projects/docproj_hu/www/en/developers.sgml#39 integrate .. //depot/projects/docproj_hu/www/en/releng/index.sgml#35 integrate .. //depot/projects/docproj_hu/www/en/security/security.sgml#9 integrate .. //depot/projects/docproj_hu/www/hu/share/sgml/news.xml#80 integrate .. //depot/projects/docproj_hu/www/share/sgml/commercial.consult.xml#20 integrate .. //depot/projects/docproj_hu/www/share/sgml/commercial.hardware.xml#4 integrate .. //depot/projects/docproj_hu/www/share/sgml/commercial.isp.xml#18 integrate .. //depot/projects/docproj_hu/www/share/sgml/news.xml#83 integrate Differences ... ==== //depot/projects/docproj_hu/doc/en_US.ISO8859-1/share/sgml/authors.ent#43 (text+ko) ==== @@ -13,7 +13,7 @@ builds for the other languages, and we will poke fun of you in public. - $FreeBSD: doc/en_US.ISO8859-1/share/sgml/authors.ent,v 1.496 2010/01/28 14:55:44 uqs Exp $ + $FreeBSD: doc/en_US.ISO8859-1/share/sgml/authors.ent,v 1.497 2010/02/06 18:08:09 bschmidt Exp $ --> aaron@FreeBSD.org"> @@ -160,6 +160,8 @@ bsam@FreeBSD.org"> +bschmidt@FreeBSD.org"> + bsd@FreeBSD.org"> bushman@FreeBSD.org"> ==== //depot/projects/docproj_hu/doc/en_US.ISO8859-1/share/sgml/mailing-lists.ent#12 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -435,6 +435,10 @@ SVN commit messages for only the 7-stable src tree"> svn-src-stable-7"> + +SVN commit messages for only the 8-stable src tree"> +svn-src-stable-8"> + SVN commit messages for the old stable src trees"> svn-src-stable-other"> ==== //depot/projects/docproj_hu/doc/share/pgpkeys/pgpkeys-developers.sgml#38 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -9,6 +9,11 @@ &pgpkey.ariff; + + &a.tabthorpe; + &pgpkey.tabthorpe; + + &a.shaun; &pgpkey.shaun; @@ -34,9 +39,9 @@ &pgpkey.anholt; - - &a.mat; - &pgpkey.mat; + + &a.mva; + &pgpkey.mva; @@ -44,6 +49,11 @@ &pgpkey.araujo; + + &a.mat; + &pgpkey.mat; + + &a.asami; &pgpkey.asami; @@ -84,16 +94,6 @@ &pgpkey.dougb; - - &a.bvs; - &pgpkey.bvs; - - - - &a.garga; - &pgpkey.garga; - - &a.kib; &pgpkey.kib; @@ -119,17 +119,27 @@ &pgpkey.mbr; + + &a.bvs; + &pgpkey.bvs; + + &a.novel; &pgpkey.novel; + + &a.garga; + &pgpkey.garga; + + &a.alexbl; &pgpkey.alexbl; - + &a.harti; &pgpkey.harti; @@ -144,6 +154,11 @@ &pgpkey.makc; + + &a.jmb; + &pgpkey.jmb; + + &a.antoine; &pgpkey.antoine; @@ -154,16 +169,6 @@ &pgpkey.db; - - &a.jmb; - &pgpkey.jmb; - - - - &a.brucec; - &pgpkey.brucec; - - &a.brueffer; &pgpkey.brueffer; @@ -206,6 +211,11 @@ --> + + &a.dchagin; + &pgpkey.dchagin; + + &a.perky; &pgpkey.perky; @@ -255,12 +265,17 @@ &a.nik; &pgpkey.nik; - + &a.benjsc; &pgpkey.benjsc; + + &a.brucec; + &pgpkey.brucec; + + &a.aaron; &pgpkey.aaron; @@ -376,16 +391,6 @@ &pgpkey.lioux; - - &a.lippe; - &pgpkey.lippe; - - - - &a.fabient; - &pgpkey.fabient; - - &a.fanf; &pgpkey.fanf; @@ -466,6 +471,11 @@ &pgpkey.dhartmei; + + &a.ehaupt; + &pgpkey.ehaupt; + + &a.jhay; &pgpkey.jhay; @@ -506,6 +516,11 @@ &pgpkey.mux; + + &a.dhn; + &pgpkey.dhn; + + &a.pho; &pgpkey.pho; @@ -537,8 +552,8 @@ - &a.versus; - &pgpkey.versus; + &a.versus; + &pgpkey.versus; @@ -546,6 +561,11 @@ &pgpkey.weongyo; + + &a.jinmei; + &pgpkey.jinmei; + + &a.ahze; &pgpkey.ahze; @@ -581,11 +601,6 @@ &pgpkey.kris; - - &a.skreuzer; - &pgpkey.skreuzer; - - &a.fjoe; &pgpkey.fjoe; @@ -617,8 +632,8 @@ - &a.maxim; - &pgpkey.maxim; + &a.maxim; + &pgpkey.maxim; @@ -631,6 +646,11 @@ &pgpkey.wkoszek; + + &a.skreuzer; + &pgpkey.skreuzer; + + &a.gabor; &pgpkey.gabor; @@ -826,16 +846,6 @@ &pgpkey.dwmalone; - - &a.sem; - &pgpkey.sem; - - - - &a.ehaupt; - &pgpkey.ehaupt; - - &a.amdmi3; &pgpkey.amdmi3; @@ -856,6 +866,11 @@ &pgpkey.mm; + + &a.sem; + &pgpkey.sem; + + &a.tmclaugh; &pgpkey.tmclaugh; @@ -896,16 +911,16 @@ &pgpkey.marck; - - &a.tmm; - &pgpkey.tmm; - - &a.mav; &pgpkey.mav; + + &a.lippe; + &pgpkey.lippe; + + &a.rich; &pgpkey.rich; @@ -916,6 +931,11 @@ &pgpkey.knu; + + &a.tmm; + &pgpkey.tmm; + + &a.max; &pgpkey.max; @@ -1109,7 +1129,7 @@ &a.matteo; &pgpkey.matteo; - + &a.roberto; @@ -1141,6 +1161,11 @@ &pgpkey.marks; + + &a.bschmidt; + &pgpkey.bschmidt; + + &a.wosch; &pgpkey.wosch; @@ -1181,26 +1206,21 @@ &pgpkey.gshapiro; + + &a.arun; + &pgpkey.arun; + + &a.wxs; &pgpkey.wxs; - - &a.arun; - &pgpkey.arun; - - &a.nork; &pgpkey.nork; - - &a.sylvio; - &pgpkey.sylvio; - - &a.syrinx; &pgpkey.syrinx; @@ -1266,6 +1286,11 @@ &pgpkey.brian; + + &a.sson; + &pgpkey.sson; + + &a.nsouch; &pgpkey.nsouch; @@ -1285,12 +1310,17 @@ &a.rink; &pgpkey.rink; - + &a.vsevolod; &pgpkey.vsevolod; + + &a.rrs; + &pgpkey.rrs; + + &a.vs; &pgpkey.vs; @@ -1341,6 +1371,11 @@ &pgpkey.tota; + + &a.sylvio; + &pgpkey.sylvio; + + &a.itetcu; &pgpkey.itetcu; @@ -1366,6 +1401,11 @@ &pgpkey.lx; + + &a.fabient; + &pgpkey.fabient; + + &a.thierry; &pgpkey.thierry; @@ -1426,6 +1466,11 @@ &pgpkey.nivit; + + &a.ivoras; + &pgpkey.ivoras; + + &a.stefan; &pgpkey.stefan; @@ -1446,31 +1491,41 @@ &pgpkey.peter; + + &a.nwhitehorn; + &pgpkey.nwhitehorn; + + + + &a.miwi; + &pgpkey.miwi; + + &a.nate; &pgpkey.nate; + + &a.twinterg; + &pgpkey.twinterg; + + &a.wollman; &pgpkey.wollman; - - &a.miwi; - &pgpkey.miwi; - - - - &a.twinterg; - &pgpkey.twinterg; - - &a.joerg; &pgpkey.joerg; + + &a.davidxu; + &pgpkey.davidxu; + + &a.emax; &pgpkey.emax; @@ -1486,57 +1541,7 @@ &pgpkey.phantom; - - &a.davidxu; - &pgpkey.davidxu; - - - - &a.rrs; - &pgpkey.rrs; - - &a.sephe; &pgpkey.sephe; - - - &a.jinmei; - &pgpkey.jinmei; - - - - &a.tabthorpe; - &pgpkey.tabthorpe; - - - - &a.ivoras; - &pgpkey.ivoras; - - - - &a.nwhitehorn; - &pgpkey.nwhitehorn; - - - - &a.sson; - &pgpkey.sson; - - - - &a.mva; - &pgpkey.mva; - - - - &a.dchagin; - &pgpkey.dchagin; - - - - &a.dhn; - &pgpkey.dhn; - ==== //depot/projects/docproj_hu/doc/share/pgpkeys/pgpkeys.ent#36 (text+ko) ==== @@ -1,5 +1,5 @@ - + @@ -46,6 +46,7 @@ + ==== //depot/projects/docproj_hu/src/release/doc/en_US.ISO8859-1/hardware/article.sgml#19 (text+ko) ==== @@ -17,7 +17,7 @@ The &os; Documentation Project - $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/article.sgml,v 1.358 2010/01/19 22:44:29 brueffer Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/article.sgml,v 1.359 2010/02/05 16:41:19 nwhitehorn Exp $ 2000 @@ -316,8 +316,51 @@ powerpc - The information for this paragraph has yet to be - compiled. + This section describes the systems currently known to be + supported by &os; on the PowerPC platform. This list is not + exhaustive. + + In general, all New World architecture Apple hardware + is supported, as well a limited selection of non-Apple + machines. + + All systems listed below are fully supported, with the + exception that software fan control is currently missing on + the Power Macintosh G5. SMP is supported on all systems with + more than 1 processor. + + + + Apple iMac + + + Apple Power Macintosh G3 (Blue & White) + + + Apple Power Macintosh G4 + + + Apple Power Macintosh G5 (non-970MP models) + + + Apple iBook + + + Apple PowerBook G4 + + + Apple XServe G4 + + + Apple XServe G5 + + + Apple Mac Mini + + + Embedded boards based on MPC85XX + + ==== //depot/projects/docproj_hu/www/en/developers.sgml#39 (text+ko) ==== @@ -6,7 +6,7 @@ us to update author names, or the representation of those names (such as adding email addresses), by just editing a single file. -$FreeBSD: www/en/developers.sgml,v 1.240 2010/01/29 14:27:20 brucec Exp $ +$FreeBSD: www/en/developers.sgml,v 1.241 2010/02/06 18:09:19 bschmidt Exp $ --> @@ -82,6 +82,7 @@ + ==== //depot/projects/docproj_hu/www/en/releng/index.sgml#35 (text+ko) ==== @@ -1,6 +1,6 @@ - + @@ -100,8 +100,8 @@ RELENG_7 - Open - committers + Frozen + &contact.re; Development branch for 7-STABLE. @@ -144,7 +144,7 @@ RELENG_6_3 Frozen &contact.so; - FreeBSD 6.3 supported errata fix branch. + FreeBSD 6.3 errata fix branch (not officially supported). ==== //depot/projects/docproj_hu/www/en/security/security.sgml#9 (text+ko) ==== @@ -1,12 +1,12 @@ - + %developers; ]> - + &header; @@ -252,13 +252,6 @@ November 30, 2010 - RELENG_6_3 - 6.3-RELEASE - Extended - January 18, 2008 - January 31, 2010 - - RELENG_6_4 6.4-RELEASE Extended ==== //depot/projects/docproj_hu/www/hu/share/sgml/news.xml#80 (text+ko) ==== @@ -11,7 +11,7 @@ - $FreeBSD: www/hu/share/sgml/news.xml,v 1.34 2010/01/30 19:53:59 pgj Exp $ + $FreeBSD: www/hu/share/sgml/news.xml,v 1.35 2010/02/03 21:40:47 pgj Exp $ ==== //depot/projects/docproj_hu/www/share/sgml/commercial.consult.xml#20 (text+ko) ==== @@ -1,12 +1,12 @@ - + - $FreeBSD: www/share/sgml/commercial.consult.xml,v 1.69 2009/12/29 20:35:42 jkois Exp $ + $FreeBSD: www/share/sgml/commercial.consult.xml,v 1.71 2010/02/06 20:35:57 jkois Exp $ @@ -972,8 +972,32 @@ appliance; and integrated Samba into Internet-accessible, VPN-based file services. Phone: +1-225-343-3056. + + + + Pendulo Software + http://www.pendulosoftware.com.ve + + Based in Caracas, Venezuela, Pendulo Software provides and + specializes in support and consulting for FreeBSD and Linux + solutions. We offer onsite as well as offsite support, web + development, design (2D and 3D), Multimedia, VPNs implementation, + Virtualization, VoIP, high performance servers, Firewalls, custom + application programming and many others services. Our experience + covers the most important branches of current IT industry, from + routine of server management, security audits and updates, to high + performance computing and mitigating attacks. For more information + about our services, please visit our multilanguage website, send an + email to atencioncliente@pendulosoftware.com.ve + or infocorp@pendulosoftware.com.ve + or call us under +58 (212) 637-1074, +1 (407) 536-9895, or + +1 (253) 642-6484. + + - Peter Dufault mailto:dufault@hda.com ==== //depot/projects/docproj_hu/www/share/sgml/commercial.hardware.xml#4 (text+ko) ==== @@ -1,12 +1,12 @@ - + - $FreeBSD: www/share/sgml/commercial.hardware.xml,v 1.8 2009/12/20 22:53:09 jkois Exp $ + $FreeBSD: www/share/sgml/commercial.hardware.xml,v 1.17 2010/02/06 11:23:51 jkois Exp $ @@ -89,16 +89,29 @@ - - Computer Access Technology Corporation - http://www.catc.com/ + + Core Systems + http://www.coresystemsusa.com/ - CATC - Computer Access Technology Corporation, popularly called CATC - ("cat-see"), is the world's leading supplier of development and test - tools for the Universal Serial Bus (USB) and IEEE 1394 (FireWire[tm]) - serial communication standards. The company also offers a variety of - peripheral devices, including a USB-to-Ethernet interface and the - industry's first USB hub. + Core Systems is the market leader in rackmount + computers and rackmount + LCD displays and supports multiple versions of FreeBSD. We + manufacture a complete line of + industrial computer chassis, + single board computer and passive + backplane rackmount + systems. We design and manufacture all of our 1U and 4U + rack mounted systems in-house to maintain strict revision control over + our entire product line. Our systems engineering design and + development staff is second to none in the rackmount industry. + Please visit our website + for further information. @@ -304,24 +317,6 @@ - - iMimic Networking, Inc. - http://www.imimic.com/ - - iMimic Networking, Inc. offers the DataReactor family of Web-cache - appliances. The DataReactor family leads the caching industry in - price/performance, from an aggressively priced entry-level caching - appliance to a high-end caching appliance at mid-level prices. - The FreeBSD-based DataReactor Core - software includes management features such as SNMP monitoring - support, Common Logfile Format logging, and Web-based or - console-based configuration. Please send mail to info@imimic.com for more - information. - - - INetU Dedicated Managed Hosting http://www.inetu.net/ @@ -506,57 +501,6 @@ - - Sangoma Technologies, Inc. - http://www.sangoma.com/ - - Sangoma Technologies Inc. offers the WANPIPE™ range of high - speed intelligent communication adapters that support a number of - downloadable protocol modules including PPP, Frame Relay and X.25. - The cards are available with RS-232/V.35/X.21/EIA530 interfaces or an - on board T1 or Fractional T-1 CSU/DSU. All of our FreeBSD and Linux - code is distributed under the GNU Public License (GPL) in source code - form. The FreeBSD PPP driver and utilities for Sangoma WANPIPE™ - kits are available for download at ftp.sangoma.com/FreeBSD. - Frame Relay and X.25 support will follow shortly. - - - - - SBE - http://www.sbei.com/ - - SBE specializes in providing high-performance, advanced - communications and networking solutions for CompactPCI-, PCI-, and - PMC-based applications. FreeBSD driver support is provided for a - range of high-performance WAN adapters, providing connectivity for - Synchronous Serial, T1/E1, DS3/T3, and HSSI. For more information, - contact info@sbei.com or visit http://www.sbei.com. - - - - - Sera Systems - http://www.serasystems.com - - Sera Systems is a manufacturer of xBSD-based servers and - workstations. Sera Systems was formed to address the security needs - of Internet-connected businesses by helping develop, setup, and - support network infrastructure computers with reliable, - proactively-secure free software. Sera Systems products include the - SeraBox, a low-cost, multi-function server, the SeraVPN, a dedicated - virtual private network server, and a line of customizable servers - based on choice of xBSD. Sera Systems offers with all products a - value-added preconfiguration service which is designed to help - customers implement specific network applications using xBSD and be - up and running as quickly as possible. For more information please visit our web site or e-mail sales@serasystems.com. - - - Perle Specialix http://www.perle.com/ @@ -575,11 +519,12 @@ for the ISA, EISA, MCA and PCI buses. Although Stallion does not officially support drivers for FreeBSD, there is an unsupported, freely available driver available from their FTP site. This driver supports the Stallion - EasyIO and EasyConnection 8/32 multiport boards. - For local pricing and availability information, contact Stallion via - their WWW page. + href="ftp://ftp.stallion.com/drivers/unsupported/FreeBSD/stalbsd-2.0.0.tar.gz">FTP site. + This driver supports the Stallion + EasyIO, EasyConnection 8/32 and + EasyConnection 8/64 PCI range of multiport boards. + For local pricing and availability information, contact Stallion + via their WWW page. >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Feb 6 21:59:32 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 463971065672; Sat, 6 Feb 2010 21:59:32 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E68EC106566C for ; Sat, 6 Feb 2010 21:59:31 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D35678FC1F for ; Sat, 6 Feb 2010 21:59:31 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o16LxVsM097867 for ; Sat, 6 Feb 2010 21:59:31 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o16LxVmu097865 for perforce@freebsd.org; Sat, 6 Feb 2010 21:59:31 GMT (envelope-from pgj@FreeBSD.org) Date: Sat, 6 Feb 2010 21:59:31 GMT Message-Id: <201002062159.o16LxVmu097865@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to pgj@FreeBSD.org using -f From: Gabor Pali To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174418 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 21:59:32 -0000 http://p4web.freebsd.org/chv.cgi?CH=174418 Change 174418 by pgj@Binturong on 2010/02/06 21:58:33 MFen (www): 1.293 -> 1.294 hu/share/sgml/news.xml 1.208 -> 1.209 hu/security/security.sgml Affected files ... .. //depot/projects/docproj_hu/doc/hu_HU.ISO8859-2/share/sgml/mailing-lists.ent#25 edit .. //depot/projects/docproj_hu/www/hu/security/security.sgml#14 edit .. //depot/projects/docproj_hu/www/hu/share/sgml/news.xml#81 edit Differences ... ==== //depot/projects/docproj_hu/doc/hu_HU.ISO8859-2/share/sgml/mailing-lists.ent#25 (text+ko) ==== @@ -7,7 +7,7 @@ @@ -441,6 +441,10 @@ Az src fa 7-stable ágának SVN commit üzenetei"> svn-src-stable-7"> + +Az src fa 8-stable ágának SVN commit üzenetei"> +svn-src-stable-8"> + Az src fa régebbi -stable ágainak SVN commit üzenetei"> svn-src-stable-other"> ==== //depot/projects/docproj_hu/www/hu/security/security.sgml#14 (text+ko) ==== @@ -11,7 +11,7 @@ @@ -346,13 +346,6 @@ 2010. november 30. - RELENG_6_3 - 6.3-RELEASE - bõvített - 2008. január 18. - 2010. január 31. - - RELENG_6_4 6.4-RELEASE bõvített ==== //depot/projects/docproj_hu/www/hu/share/sgml/news.xml#81 (text+ko) ==== @@ -5,7 +5,7 @@ @@ -22,6 +22,15 @@ 2 + 6 + + +

Új tag: Bernhard + Schmidt (src)

+
+
+ + 2 From owner-p4-projects@FreeBSD.ORG Sat Feb 6 22:23:57 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 010851065692; Sat, 6 Feb 2010 22:23:57 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9ACE106568D for ; Sat, 6 Feb 2010 22:23:56 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A66C18FC0A for ; Sat, 6 Feb 2010 22:23:56 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o16MNuu8000772 for ; Sat, 6 Feb 2010 22:23:56 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o16MNuAm000770 for perforce@freebsd.org; Sat, 6 Feb 2010 22:23:56 GMT (envelope-from pgj@FreeBSD.org) Date: Sat, 6 Feb 2010 22:23:56 GMT Message-Id: <201002062223.o16MNuAm000770@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to pgj@FreeBSD.org using -f From: Gabor Pali To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174421 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 22:23:57 -0000 http://p4web.freebsd.org/chv.cgi?CH=174421 Change 174421 by pgj@Binturong on 2010/02/06 22:23:32 MFen (doc): 1.199 -> 1.200 hu_HU.ISO8859-2/books/handbook/eresources/chapter.sgml 1.131 -> 1.132 hu_HU.ISO8859-2/books/handbook/l10n/chapter.sgml 1.139 -> 1.140 hu_HU.ISO8859-2/books/handbook/linuxemu/chapter.sgml 1.118 -> 1.119 hu_HU.ISO8859-2/books/handbook/network-servers/chapter.sgml 1.22 -> 1.23 hu_HU.ISO8859-2/books/handbook/virtualization/chapter.sgml Affected files ... .. //depot/projects/docproj_hu/doc/hu_HU.ISO8859-2/books/handbook/eresources/chapter.sgml#28 edit .. //depot/projects/docproj_hu/doc/hu_HU.ISO8859-2/books/handbook/l10n/chapter.sgml#16 edit .. //depot/projects/docproj_hu/doc/hu_HU.ISO8859-2/books/handbook/linuxemu/chapter.sgml#12 edit .. //depot/projects/docproj_hu/doc/hu_HU.ISO8859-2/books/handbook/network-servers/chapter.sgml#31 edit .. //depot/projects/docproj_hu/doc/hu_HU.ISO8859-2/books/handbook/virtualization/chapter.sgml#17 edit Differences ... ==== //depot/projects/docproj_hu/doc/hu_HU.ISO8859-2/books/handbook/eresources/chapter.sgml#28 (text+ko) ==== @@ -7,7 +7,7 @@ @@ -890,6 +890,15 @@
+ &a.svn-src-stable-8.name; + /usr/src + A stable/8 ág + változásai a forrásokat + tároló Subversion repositoryn + belül + + + &a.svn-src-stable-other.name; /usr/src A Subversion repositoryban található ==== //depot/projects/docproj_hu/doc/hu_HU.ISO8859-2/books/handbook/l10n/chapter.sgml#16 (text+ko) ==== @@ -6,7 +6,7 @@ @@ -466,7 +466,7 @@ kapnak az /etc/login.conf állományban: - nyelv_neve:hozzáférés_megnevezése:\ + nyelv_neve|A hozzáférés típusának leírása:\ :charset=MIME_karakterkészlet:\ :lang=nyelvi_beállítás_neve:\ :tc=default: @@ -474,7 +474,7 @@ Folytassuk tovább az elõbbi Latin-1-es példánk szerint: - nemet:Nemet felhasznalok hozzaferesei:\ + nemet|Nemet felhasznalok hozzaferesei:\ :charset=ISO-8859-1:\ :lang=de_DE.ISO8859-1:\ :tc=default: ==== //depot/projects/docproj_hu/doc/hu_HU.ISO8859-2/books/handbook/linuxemu/chapter.sgml#12 (text+ko) ==== @@ -7,7 +7,7 @@ The FreeBSD Hungarian Documentation Project Translated by: PALI, Gabor %SOURCE% en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml - %SRCID% 1.139 + %SRCID% 1.140 --> ==== //depot/projects/docproj_hu/doc/hu_HU.ISO8859-2/books/handbook/network-servers/chapter.sgml#31 (text+ko) ==== @@ -7,7 +7,7 @@ @@ -3534,7 +3534,7 @@ dhclient, amely a &os; részeként érkezik, és a szerver oldali elem pedig a net/isc-dhcp3-server porton + role="package">net/isc-dhcp31-server porton keresztül érhetõ el. A lentebb említett hivatkozások mellett a témában még a &man.dhclient.8;, &man.dhcp-options.5; és a @@ -3697,7 +3697,7 @@ A DHCP szerver, a dhcpd a - net/isc-dhcp3-server + net/isc-dhcp31-server port részeként érhetõ el. Az a port tartalmazza az ISC DHCP szerverét és a hozzátartozó @@ -3792,7 +3792,7 @@ szolgáltatás elindításához elõször fel kell raknunk a net/isc-dhcp3-server portot. A + role="package">net/isc-dhcp31-server portot. A Portgyûjtemény használatára vonatkozóan a lehet segítségünkre. @@ -3849,7 +3849,7 @@ kell szerkesztenünk a mintaként mellékelt dhcpd.conf állományt, amelyet a net/isc-dhcp3-server port rakott + role="package">net/isc-dhcp31-server port rakott fel. Ez alapértelmezés szerint a /usr/local/etc/dhcpd.conf.sample néven található meg, és @@ -3995,7 +3995,7 @@ kiadásával indítsuk el a szervert: - &prompt.root; /usr/local/etc/rc.d/isc-dhcpd.sh start + &prompt.root; /usr/local/etc/rc.d/isc-dhcpd start Amikor a jövõben valamit változtatunk a konfigurációs állományon, akkor @@ -4076,7 +4076,7 @@ szükség lenne erre a lehetõségre, akkor telepítsük fel a net/isc-dhcp3-relay portot. A + role="package">net/isc-dhcp31-relay portot. A porthoz tartozó &man.dhcrelay.8; man oldal ennek részleteit taglalja. ==== //depot/projects/docproj_hu/doc/hu_HU.ISO8859-2/books/handbook/virtualization/chapter.sgml#17 (text+ko) ==== @@ -7,7 +7,7 @@ The FreeBSD Hungarian Documentation Project Translated by: PALI, Gabor %SOURCE% en_US.ISO8859-1/books/handbook/virtualization/chapter.sgml - %SRCID% 1.22 + %SRCID% 1.23 --> @@ -1256,12 +1256,12 @@ telepítése A &virtualbox; a emulators/virtualbox + role="package">emulators/virtualbox-ose könyvtárból érhetõ el portként, és onnan a következõ parancsokkal telepíthetõ: - &prompt.root; cd /usr/ports/emulators/virtualbox + &prompt.root; cd /usr/ports/emulators/virtualbox-ose &prompt.root; make install clean A beállítások közt az egyik @@ -1303,10 +1303,21 @@ vboxdrv_load="YES" - A &virtualbox; - ezenkívül még igényli a proc állományrendszer - csatlakoztatását is: + A &virtualbox; 3.1.2 elõtti + változatai ezenkívül még + igénylik a proc + állományrendszer csatlakoztatását + is. Az újabb változatokban erre már nincs + szükség, mivel ezekben helyette már a + &man.sysctl.3; könyvtár függvényeit + használják. + + Ha viszont a port valamelyik korábbi + változatát használjuk, akkor + kövessük a lentebb szereplõ + utasításokat és csatlakoztassuk a proc + állományrendszert: &prompt.root; mount -t procfs proc /proc