svn commit: r350162 - head/sys/dev/sdhci
Author: ganbold Date: Sat Jul 20 02:53:06 2019 New Revision: 350162 URL: https://svnweb.freebsd.org/changeset/base/350162 Log: Add emmc support for Rockchip RK3399 SoC. Tested on NanoPC-T4 board. Reviewed by: manu Differential Revision:https://reviews.freebsd.org/D20156 Modified: head/sys/dev/sdhci/sdhci_fdt.c Modified: head/sys/dev/sdhci/sdhci_fdt.c == --- head/sys/dev/sdhci/sdhci_fdt.c Sat Jul 20 02:03:31 2019 (r350161) +++ head/sys/dev/sdhci/sdhci_fdt.c Sat Jul 20 02:53:06 2019 (r350162) @@ -52,6 +52,14 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef EXT_RESOURCES +#include +#include +#include +#include +#include +#endif + #include #include @@ -61,16 +69,37 @@ __FBSDID("$FreeBSD$"); #include "opt_mmccam.h" +#ifdef EXT_RESOURCES +#include "clkdev_if.h" +#include "syscon_if.h" +#endif + #defineMAX_SLOTS 6 #defineSDHCI_FDT_ARMADA38X 1 #defineSDHCI_FDT_GENERIC 2 #defineSDHCI_FDT_XLNX_ZY7 3 #defineSDHCI_FDT_QUALCOMM 4 +#defineSDHCI_FDT_RK33995 +#ifdef EXT_RESOURCES +#defineRK3399_GRF_EMMCCORE_CON00xf000 +#define RK3399_CORECFG_BASECLKFREQ 0xff00 +#define RK3399_CORECFG_TIMEOUTCLKUNIT (1 << 7) +#define RK3399_CORECFG_TUNINGCOUNT 0x3f +#defineRK3399_GRF_EMMCCORE_CON11 0xf02c +#define RK3399_CORECFG_CLOCKMULTIPLIER 0xff + +#defineLOWEST_SET_BIT(mask)mask) - 1) & (mask)) ^ (mask)) +#defineSHIFTIN(x, mask)((x) * LOWEST_SET_BIT(mask)) + +#defineEMMCCARDCLK_ID 1000 +#endif + static struct ofw_compat_data compat_data[] = { { "marvell,armada-380-sdhci", SDHCI_FDT_ARMADA38X }, { "sdhci_generic", SDHCI_FDT_GENERIC }, { "qcom,sdhci-msm-v4", SDHCI_FDT_QUALCOMM }, + { "rockchip,rk3399-sdhci-5.1", SDHCI_FDT_RK3399 }, { "xlnx,zy7_sdhci", SDHCI_FDT_XLNX_ZY7 }, { NULL, 0 } }; @@ -90,8 +119,209 @@ struct sdhci_fdt_softc { boolwp_inverted;/* WP pin is inverted */ boolno_18v; /* No 1.8V support */ + +#ifdef EXT_RESOURCES + clk_t clk_xin;/* xin24m fixed clock */ + clk_t clk_ahb;/* ahb clock */ + phy_t phy;/* phy to be used */ +#endif }; +#ifdef EXT_RESOURCES +struct rk3399_emmccardclk_sc { + device_tclkdev; + bus_addr_t reg; +}; + +static int +rk3399_emmccardclk_init(struct clknode *clk, device_t dev) +{ + + clknode_init_parent_idx(clk, 0); + return (0); +} + +static clknode_method_t rk3399_emmccardclk_clknode_methods[] = { + /* Device interface */ + CLKNODEMETHOD(clknode_init, rk3399_emmccardclk_init), + CLKNODEMETHOD_END +}; +DEFINE_CLASS_1(rk3399_emmccardclk_clknode, rk3399_emmccardclk_clknode_class, +rk3399_emmccardclk_clknode_methods, sizeof(struct rk3399_emmccardclk_sc), +clknode_class); + +static int +rk3399_ofw_map(struct clkdom *clkdom, uint32_t ncells, +phandle_t *cells, struct clknode **clk) +{ + + if (ncells == 0) + *clk = clknode_find_by_id(clkdom, EMMCCARDCLK_ID); + else + return (ERANGE); + + if (*clk == NULL) + return (ENXIO); + return (0); +} + +static void +sdhci_init_rk3399_emmccardclk(device_t dev) +{ + struct clknode_init_def def; + struct rk3399_emmccardclk_sc *sc; + struct clkdom *clkdom; + struct clknode *clk; + clk_t clk_parent; + bus_addr_t paddr; + bus_size_t psize; + const char **clknames; + phandle_t node; + int i, nclocks, ncells, error; + + node = ofw_bus_get_node(dev); + + if (ofw_reg_to_paddr(node, 0, , , NULL) != 0) { + device_printf(dev, "cannot parse 'reg' property\n"); + return; + } + + error = ofw_bus_parse_xref_list_get_length(node, "clocks", + "#clock-cells", ); + if (error != 0 || ncells != 2) { + device_printf(dev, "couldn't find parent clocks\n"); + return; + } + + nclocks = ofw_bus_string_list_to_array(node, "clock-output-names", + ); + /* No clocks to export */ + if (nclocks <= 0) + return; + + if (nclocks != 1) { + device_printf(dev, "Having %d clock instead of 1, aborting\n", + nclocks); + return; + } + + clkdom = clkdom_create(dev); + clkdom_set_ofw_mapper(clkdom, rk3399_ofw_map); + + memset(, 0, sizeof(def)); + def.id = EMMCCARDCLK_ID; + def.name = clknames[0]; + def.parent_names = malloc(sizeof(char *) * ncells, M_OFWPROP,
svn commit: r350161 - in head/sys: arm64/conf arm64/rockchip conf
Author: ganbold Date: Sat Jul 20 02:03:31 2019 New Revision: 350161 URL: https://svnweb.freebsd.org/changeset/base/350161 Log: Add driver for Rockchip RK3399 eMMC PHY. Tested on NanoPC-T4 board. Reviewed by: manu Differential Revision:https://reviews.freebsd.org/D20840 Added: head/sys/arm64/rockchip/rk3399_emmcphy.c (contents, props changed) Modified: head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 Modified: head/sys/arm64/conf/GENERIC == --- head/sys/arm64/conf/GENERIC Fri Jul 19 23:58:30 2019(r350160) +++ head/sys/arm64/conf/GENERIC Sat Jul 20 02:03:31 2019(r350161) @@ -188,6 +188,7 @@ device aw_mmc # Allwinner SD/MMC controller device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards device dwmmc +device rk_emmcphy # Serial (COM) ports device uart# Generic UART driver Added: head/sys/arm64/rockchip/rk3399_emmcphy.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/rockchip/rk3399_emmcphy.cSat Jul 20 02:03:31 2019 (r350161) @@ -0,0 +1,341 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Ganbold Tsagaankhuu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Rockchip RK3399 eMMC PHY + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "syscon_if.h" + +#defineGRF_EMMCPHY_BASE0xf780 +#defineGRF_EMMCPHY_CON0(GRF_EMMCPHY_BASE + 0x00) +#define PHYCTRL_FRQSEL (1 << 13) | (1 << 12) +#define PHYCTRL_FRQSEL_200M 0 +#define PHYCTRL_FRQSEL_50M1 +#define PHYCTRL_FRQSEL_100M 2 +#define PHYCTRL_FRQSEL_150M 3 +#define PHYCTRL_OTAPDLYENA (1 << 11) +#define PHYCTRL_OTAPDLYSEL (1 << 10) | (1 << 9) | (1 << 8) | (1 << 7) +#define PHYCTRL_ITAPCHGWIN (1 << 6) +#define PHYCTRL_ITAPDLYSEL (1 << 5) | (1 << 4) | (1 << 3) | (1 << 2) | \ +(1 << 1) +#define PHYCTRL_ITAPDLYENA (1 << 0) +#defineGRF_EMMCPHY_CON1(GRF_EMMCPHY_BASE + 0x04) +#define PHYCTRL_CLKBUFSEL (1 << 8) | (1 << 7) | (1 << 6) +#define PHYCTRL_SELDLYTXCLK(1 << 5) +#define PHYCTRL_SELDLYRXCLK(1 << 4) +#define PHYCTRL_STRBSEL0xf +#defineGRF_EMMCPHY_CON2(GRF_EMMCPHY_BASE + 0x08) +#define PHYCTRL_REN_STRB (1 << 9) +#define PHYCTRL_REN_CMD(1 << 8) +#define PHYCTRL_REN_DAT0xff +#defineGRF_EMMCPHY_CON3(GRF_EMMCPHY_BASE + 0x0c) +#define PHYCTRL_PU_STRB(1 << 9) +#define PHYCTRL_PU_CMD (1 << 8) +#define PHYCTRL_PU_DAT 0xff +#defineGRF_EMMCPHY_CON4(GRF_EMMCPHY_BASE + 0x10) +#define PHYCTRL_OD_RELEASE_CMD (1 << 9) +#define PHYCTRL_OD_RELEASE_STRB(1 << 8) +#define PHYCTRL_OD_RELEASE_DAT 0xff +#defineGRF_EMMCPHY_CON5(GRF_EMMCPHY_BASE + 0x14) +#define PHYCTRL_ODEN_STRB (1 << 9) +#define PHYCTRL_ODEN_CMD (1 << 8) +#define PHYCTRL_ODEN_DAT 0xff +#defineGRF_EMMCPHY_CON6(GRF_EMMCPHY_BASE + 0x18) +#define PHYCTRL_DLL_TRM_ICP(1 << 12) | (1 << 11) |
svn commit: r350160 - head/lib/libc/tests/string
Author: brooks Date: Fri Jul 19 23:58:30 2019 New Revision: 350160 URL: https://svnweb.freebsd.org/changeset/base/350160 Log: Avoid copying too much from the input string. This avoids reading past the end of the static strings. On a system with bounds checking these tests fault. Reviewed by: asomers Obtained from:CheriBSD MFC after:1 week Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D21004 Modified: head/lib/libc/tests/string/wcsnlen_test.c Modified: head/lib/libc/tests/string/wcsnlen_test.c == --- head/lib/libc/tests/string/wcsnlen_test.c Fri Jul 19 23:39:21 2019 (r350159) +++ head/lib/libc/tests/string/wcsnlen_test.c Fri Jul 19 23:58:30 2019 (r350160) @@ -65,7 +65,7 @@ test_wcsnlen(const wchar_t *s) for (i = 0; i <= 1; i++) { for (bufsize = 0; bufsize <= size + 10; bufsize++) { s1 = makebuf(bufsize * sizeof(wchar_t), i); - wmemcpy(s1, s, bufsize); + wmemcpy(s1, s, bufsize <= size ? bufsize : size); len = (size > bufsize) ? bufsize : size - 1; ATF_CHECK(wcsnlen(s1, bufsize) == len); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350159 - head/share/mk
Author: brooks Date: Fri Jul 19 23:39:21 2019 New Revision: 350159 URL: https://svnweb.freebsd.org/changeset/base/350159 Log: Make setting mips endian and ABI less verbose. Allow ABI to be over ridden to allow (with other changes) programs to be built targeting ABIs other than the default. This is used in CheriBSD. Reviewed by: imp Obtained from:CheriBSD MFC after:1 week Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D21001 Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk == --- head/share/mk/bsd.cpu.mkFri Jul 19 23:10:43 2019(r350158) +++ head/share/mk/bsd.cpu.mkFri Jul 19 23:39:21 2019(r350159) @@ -314,27 +314,20 @@ MACHINE_CPU = v9 ultrasparc ultrasparc3 .if ${MACHINE_CPUARCH} == "mips" CFLAGS += -G0 +AFLAGS+= -${MIPS_ENDIAN} -mabi=${MIPS_ABI} +CFLAGS+= -${MIPS_ENDIAN} -mabi=${MIPS_ABI} +LDFLAGS+= -${MIPS_ENDIAN} -mabi=${MIPS_ABI} . if ${MACHINE_ARCH:Mmips*el*} != "" -AFLAGS += -EL -CFLAGS += -EL -LDFLAGS += -EL +MIPS_ENDIAN= EL . else -AFLAGS += -EB -CFLAGS += -EB -LDFLAGS += -EB +MIPS_ENDIAN= EB . endif . if ${MACHINE_ARCH:Mmips64*} != "" -AFLAGS+= -mabi=64 -CFLAGS+= -mabi=64 -LDFLAGS+= -mabi=64 +MIPS_ABI?= 64 . elif ${MACHINE_ARCH:Mmipsn32*} != "" -AFLAGS+= -mabi=n32 -CFLAGS+= -mabi=n32 -LDFLAGS+= -mabi=n32 +MIPS_ABI?= n32 . else -AFLAGS+= -mabi=32 -CFLAGS+= -mabi=32 -LDFLAGS+= -mabi=32 +MIPS_ABI?= 32 . endif . if ${MACHINE_ARCH:Mmips*hf} CFLAGS += -mhard-float ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350158 - head/lib/libproc
Author: brooks Date: Fri Jul 19 23:10:43 2019 New Revision: 350158 URL: https://svnweb.freebsd.org/changeset/base/350158 Log: Remove an unneeded temporary variable in two functions. There is no need to convert an intptr_t to a long just to cast it to a (void *). Obtained from:CheriBSD MFC after:1 week Sponsored by: DARPA, AFRL Modified: head/lib/libproc/proc_bkpt.c Modified: head/lib/libproc/proc_bkpt.c == --- head/lib/libproc/proc_bkpt.cFri Jul 19 22:54:09 2019 (r350157) +++ head/lib/libproc/proc_bkpt.cFri Jul 19 23:10:43 2019 (r350158) @@ -102,7 +102,6 @@ proc_bkptset(struct proc_handle *phdl, uintptr_t addre unsigned long *saved) { struct ptrace_io_desc piod; - unsigned long caddr; int ret = 0, stopped; instr_t instr; @@ -125,10 +124,9 @@ proc_bkptset(struct proc_handle *phdl, uintptr_t addre /* * Read the original instruction. */ - caddr = address; instr = 0; piod.piod_op = PIOD_READ_I; - piod.piod_offs = (void *)caddr; + piod.piod_offs = (void *)address; piod.piod_addr = piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t), 0) < 0) { @@ -141,10 +139,9 @@ proc_bkptset(struct proc_handle *phdl, uintptr_t addre /* * Write a breakpoint instruction to that address. */ - caddr = address; instr = BREAKPOINT_INSTR; piod.piod_op = PIOD_WRITE_I; - piod.piod_offs = (void *)caddr; + piod.piod_offs = (void *)address; piod.piod_addr = piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t), 0) < 0) { @@ -167,7 +164,6 @@ proc_bkptdel(struct proc_handle *phdl, uintptr_t addre unsigned long saved) { struct ptrace_io_desc piod; - unsigned long caddr; int ret = 0, stopped; instr_t instr; @@ -189,10 +185,9 @@ proc_bkptdel(struct proc_handle *phdl, uintptr_t addre /* * Overwrite the breakpoint instruction that we setup previously. */ - caddr = address; instr = saved; piod.piod_op = PIOD_WRITE_I; - piod.piod_offs = (void *)caddr; + piod.piod_offs = (void *)address; piod.piod_addr = piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t), 0) < 0) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350157 - head/lib/libgssapi
Author: brooks Date: Fri Jul 19 22:54:09 2019 New Revision: 350157 URL: https://svnweb.freebsd.org/changeset/base/350157 Log: Use the __DECONST macro rather than hand rolling it. Obtained from:CheriBSD MFC after:1 week Sponsored by: DARPA, AFRL Modified: head/lib/libgssapi/gss_accept_sec_context.c head/lib/libgssapi/gss_names.c Modified: head/lib/libgssapi/gss_accept_sec_context.c == --- head/lib/libgssapi/gss_accept_sec_context.c Fri Jul 19 20:51:39 2019 (r350156) +++ head/lib/libgssapi/gss_accept_sec_context.c Fri Jul 19 22:54:09 2019 (r350157) @@ -100,11 +100,11 @@ parse_header(const gss_buffer_t input_token, gss_OID m } static gss_OID_desc krb5_mechanism = -{9, (void *)(uintptr_t) "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02"}; +{9, __DECONST(void *, "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02")}; static gss_OID_desc ntlm_mechanism = -{10, (void *)(uintptr_t) "\x2b\x06\x01\x04\x01\x82\x37\x02\x02\x0a"}; +{10, __DECONST(void *, "\x2b\x06\x01\x04\x01\x82\x37\x02\x02\x0a")}; static gss_OID_desc spnego_mechanism = -{6, (void *)(uintptr_t) "\x2b\x06\x01\x05\x05\x02"}; +{6, __DECONST(void *, "\x2b\x06\x01\x05\x05\x02")}; static OM_uint32 choose_mech(const gss_buffer_t input, gss_OID mech_oid) Modified: head/lib/libgssapi/gss_names.c == --- head/lib/libgssapi/gss_names.c Fri Jul 19 20:51:39 2019 (r350156) +++ head/lib/libgssapi/gss_names.c Fri Jul 19 22:54:09 2019 (r350157) @@ -49,7 +49,7 @@ * to that gss_OID_desc. */ static gss_OID_desc GSS_C_NT_USER_NAME_storage = - {10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x01"}; + {10, __DECONST(void *, "\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x01")}; gss_OID GSS_C_NT_USER_NAME = _C_NT_USER_NAME_storage; /* @@ -64,7 +64,7 @@ gss_OID GSS_C_NT_USER_NAME = _C_NT_USER_NAME_stora * initialized to point to that gss_OID_desc. */ static gss_OID_desc GSS_C_NT_MACHINE_UID_NAME_storage = - {10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x02"}; + {10, __DECONST(void *, "\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x02")}; gss_OID GSS_C_NT_MACHINE_UID_NAME = _C_NT_MACHINE_UID_NAME_storage; /* @@ -79,7 +79,7 @@ gss_OID GSS_C_NT_MACHINE_UID_NAME = _C_NT_MACHINE_ * initialized to point to that gss_OID_desc. */ static gss_OID_desc GSS_C_NT_STRING_UID_NAME_storage = - {10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03"}; + {10, __DECONST(void *, "\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03")}; gss_OID GSS_C_NT_STRING_UID_NAME = _C_NT_STRING_UID_NAME_storage; /* @@ -100,7 +100,7 @@ gss_OID GSS_C_NT_STRING_UID_NAME = _C_NT_STRING_UI * implementations */ static gss_OID_desc GSS_C_NT_HOSTBASED_SERVICE_X_storage = - {6, (void *)(uintptr_t)"\x2b\x06\x01\x05\x06\x02"}; + {6, __DECONST(void *, "\x2b\x06\x01\x05\x06\x02")}; gss_OID GSS_C_NT_HOSTBASED_SERVICE_X = _C_NT_HOSTBASED_SERVICE_X_storage; /* @@ -115,7 +115,7 @@ gss_OID GSS_C_NT_HOSTBASED_SERVICE_X = _C_NT_HOSTB * to point to that gss_OID_desc. */ static gss_OID_desc GSS_C_NT_HOSTBASED_SERVICE_storage = - {10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x04"}; + {10, __DECONST(void *, "\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x04")}; gss_OID GSS_C_NT_HOSTBASED_SERVICE = _C_NT_HOSTBASED_SERVICE_storage; /* @@ -129,7 +129,7 @@ gss_OID GSS_C_NT_HOSTBASED_SERVICE = _C_NT_HOSTBAS * to that gss_OID_desc. */ static gss_OID_desc GSS_C_NT_ANONYMOUS_storage = - {6, (void *)(uintptr_t)"\x2b\x06\01\x05\x06\x03"}; + {6, __DECONST(void *, "\x2b\x06\01\x05\x06\x03")}; gss_OID GSS_C_NT_ANONYMOUS = _C_NT_ANONYMOUS_storage; /* @@ -143,7 +143,7 @@ gss_OID GSS_C_NT_ANONYMOUS = _C_NT_ANONYMOUS_stora * to that gss_OID_desc. */ static gss_OID_desc GSS_C_NT_EXPORT_NAME_storage = - {6, (void *)(uintptr_t)"\x2b\x06\x01\x05\x06\x04"}; + {6, __DECONST(void *, "\x2b\x06\x01\x05\x06\x04")}; gss_OID GSS_C_NT_EXPORT_NAME = _C_NT_EXPORT_NAME_storage; /* @@ -153,7 +153,7 @@ gss_OID GSS_C_NT_EXPORT_NAME = _C_NT_EXPORT_NAME_s * is "GSS_KRB5_NT_PRINCIPAL_NAME". */ static gss_OID_desc GSS_KRB5_NT_PRINCIPAL_NAME_storage = -{10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01"}; +{10, __DECONST(void *, "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01")}; gss_OID GSS_KRB5_NT_PRINCIPAL_NAME = _KRB5_NT_PRINCIPAL_NAME_storage; /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350156 - head/sys/kern
Author: kib Date: Fri Jul 19 20:51:39 2019 New Revision: 350156 URL: https://svnweb.freebsd.org/changeset/base/350156 Log: Fix leak of memory and file refs with sendmsg(2) over unix domain sockets. When sendmsg(2) sucessfully internalized one SCM_RIGHTS control message, but failed to process some other control message later, both file references and filedescent memory needs to be freed. This was not done, only mbuf chain was freed. Noted, test case written, reviewed by:markj Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D21000 Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c == --- head/sys/kern/uipc_usrreq.c Fri Jul 19 20:47:35 2019(r350155) +++ head/sys/kern/uipc_usrreq.c Fri Jul 19 20:51:39 2019(r350156) @@ -2120,30 +2120,53 @@ unp_init(void) UNP_DEFERRED_LOCK_INIT(); } +static void +unp_internalize_cleanup_rights(struct mbuf *control) +{ + struct cmsghdr *cp; + struct mbuf *m; + void *data; + socklen_t datalen; + + for (m = control; m != NULL; m = m->m_next) { + cp = mtod(m, struct cmsghdr *); + if (cp->cmsg_level != SOL_SOCKET || + cp->cmsg_type != SCM_RIGHTS) + continue; + data = CMSG_DATA(cp); + datalen = (caddr_t)cp + cp->cmsg_len - (caddr_t)data; + unp_freerights(data, datalen / sizeof(struct filedesc *)); + } +} + static int unp_internalize(struct mbuf **controlp, struct thread *td) { - struct mbuf *control = *controlp; - struct proc *p = td->td_proc; - struct filedesc *fdesc = p->p_fd; + struct mbuf *control, **initial_controlp; + struct proc *p; + struct filedesc *fdesc; struct bintime *bt; - struct cmsghdr *cm = mtod(control, struct cmsghdr *); + struct cmsghdr *cm; struct cmsgcred *cmcred; struct filedescent *fde, **fdep, *fdev; struct file *fp; struct timeval *tv; struct timespec *ts; - int i, *fdp; void *data; - socklen_t clen = control->m_len, datalen; - int error, oldfds; + socklen_t clen, datalen; + int i, error, *fdp, oldfds; u_int newlen; UNP_LINK_UNLOCK_ASSERT(); + p = td->td_proc; + fdesc = p->p_fd; error = 0; + control = *controlp; + clen = control->m_len; *controlp = NULL; - while (cm != NULL) { + initial_controlp = controlp; + for (cm = mtod(control, struct cmsghdr *); cm != NULL;) { if (sizeof(*cm) > clen || cm->cmsg_level != SOL_SOCKET || cm->cmsg_len > clen || cm->cmsg_len < sizeof(*cm)) { error = EINVAL; @@ -2294,6 +2317,8 @@ unp_internalize(struct mbuf **controlp, struct thread } out: + if (error != 0 && initial_controlp != NULL) + unp_internalize_cleanup_rights(*initial_controlp); m_freem(control); return (error); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350155 - head/sys/vm
Author: dougm Date: Fri Jul 19 20:47:35 2019 New Revision: 350155 URL: https://svnweb.freebsd.org/changeset/base/350155 Log: Define vm_map_entry_in_transition to handle an in-transition map entry, combining code currently in vm_map_unwire and vm_map_wire_locked into a single function, called by each of them for entries in transition. Discussed with: kib, markj Reviewed by: alc Approved by: kib, markj (mentors, implicit) Tested by: pho Differential Revision: https://reviews.freebsd.org/D20833 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c == --- head/sys/vm/vm_map.cFri Jul 19 20:04:31 2019(r350154) +++ head/sys/vm/vm_map.cFri Jul 19 20:47:35 2019(r350155) @@ -2837,6 +2837,55 @@ vm_map_inherit(vm_map_t map, vm_offset_t start, vm_off } /* + * vm_map_entry_in_transition: + * + * Release the map lock, and sleep until the entry is no longer in + * transition. Awake and acquire the map lock. If the map changed while + * another held the lock, lookup a possibly-changed entry at or after the + * 'start' position of the old entry. + */ +static vm_map_entry_t +vm_map_entry_in_transition(vm_map_t map, vm_offset_t in_start, +vm_offset_t *io_end, bool holes_ok, vm_map_entry_t in_entry) +{ + vm_map_entry_t entry; + vm_offset_t start; + u_int last_timestamp; + + VM_MAP_ASSERT_LOCKED(map); + KASSERT((in_entry->eflags & MAP_ENTRY_IN_TRANSITION) != 0, + ("not in-tranition map entry %p", in_entry)); + /* +* We have not yet clipped the entry. +*/ + start = MAX(in_start, in_entry->start); + in_entry->eflags |= MAP_ENTRY_NEEDS_WAKEUP; + last_timestamp = map->timestamp; + if (vm_map_unlock_and_wait(map, 0)) { + /* +* Allow interruption of user wiring/unwiring? +*/ + } + vm_map_lock(map); + if (last_timestamp + 1 == map->timestamp) + return (in_entry); + + /* +* Look again for the entry because the map was modified while it was +* unlocked. Specifically, the entry may have been clipped, merged, or +* deleted. +*/ + if (!vm_map_lookup_entry(map, start, )) { + if (!holes_ok) { + *io_end = start; + return (NULL); + } + entry = entry->next; + } + return (entry); +} + +/* * vm_map_unwire: * * Implements both kernel and user unwiring. @@ -2845,11 +2894,9 @@ int vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offset_t end, int flags) { - vm_map_entry_t entry, first_entry, tmp_entry; - vm_offset_t saved_start; - unsigned int last_timestamp; + vm_map_entry_t entry, first_entry; int rv; - bool holes_ok, need_wakeup, user_unwire; + bool first_iteration, holes_ok, need_wakeup, user_unwire; if (start == end) return (KERN_SUCCESS); @@ -2865,7 +2912,7 @@ vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offs return (KERN_INVALID_ADDRESS); } } - last_timestamp = map->timestamp; + first_iteration = true; entry = first_entry; rv = KERN_SUCCESS; while (entry->start < end) { @@ -2873,48 +2920,20 @@ vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offs /* * We have not yet clipped the entry. */ - saved_start = (start >= entry->start) ? start : - entry->start; - entry->eflags |= MAP_ENTRY_NEEDS_WAKEUP; - if (vm_map_unlock_and_wait(map, 0)) { - /* -* Allow interruption of user unwiring? -*/ - } - vm_map_lock(map); - if (last_timestamp+1 != map->timestamp) { - /* -* Look again for the entry because the map was -* modified while it was unlocked. -* Specifically, the entry may have been -* clipped, merged, or deleted. -*/ - if (!vm_map_lookup_entry(map, saved_start, - _entry)) { - if (holes_ok) - tmp_entry = tmp_entry->next; - else { - if (saved_start == start) { - /* -
svn commit: r350153 - head/share/man/man8
Author: imp Date: Fri Jul 19 20:04:26 2019 New Revision: 350153 URL: https://svnweb.freebsd.org/changeset/base/350153 Log: Remove RELEASE_CRUNCH in example RELEASE_CRUNCH is no longer relevant. Modified: head/share/man/man8/picobsd.8 Modified: head/share/man/man8/picobsd.8 == --- head/share/man/man8/picobsd.8 Fri Jul 19 20:04:21 2019 (r350152) +++ head/share/man/man8/picobsd.8 Fri Jul 19 20:04:26 2019 (r350153) @@ -267,7 +267,7 @@ We can pass build options to those makefiles which und that, in order to reduce the size of the programs. This is achieved with a line of the form .Pp -.Dl "buildopts -DNO_PAM -DRELEASE_CRUNCH ..." +.Dl "buildopts -DNO_PAM ..." .It When providing the list of directories where source files are, it is convenient to list the following entry first: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350154 - head/usr.bin/vi
Author: imp Date: Fri Jul 19 20:04:31 2019 New Revision: 350154 URL: https://svnweb.freebsd.org/changeset/base/350154 Log: Remove RELEASE_CRUNCH here If someone wants to subset, they can set MK_ICONV=no. We no longer use it for the release. Modified: head/usr.bin/vi/Makefile Modified: head/usr.bin/vi/Makefile == --- head/usr.bin/vi/MakefileFri Jul 19 20:04:26 2019(r350153) +++ head/usr.bin/vi/MakefileFri Jul 19 20:04:31 2019(r350154) @@ -37,7 +37,7 @@ CFLAGS+=-I${.CURDIR} -I${SRCDIR} -I${SRCDIR}/regex LIBADD=util ncursesw CFLAGS+= -DUSE_WIDECHAR -.if ${MK_ICONV} == "yes" && !defined(RESCUE) && !defined(RELEASE_CRUNCH) +.if ${MK_ICONV} == "yes" && !defined(RESCUE) CFLAGS+= -DUSE_ICONV .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350152 - head/usr.sbin/crunch/crunchgen
Author: imp Date: Fri Jul 19 20:04:21 2019 New Revision: 350152 URL: https://svnweb.freebsd.org/changeset/base/350152 Log: Remove obsolete RELEASE_CRUNCH Remove documentation of RELEASE_CRUNCH here. It's obsolete and no longer a good example. Modified: head/usr.sbin/crunch/crunchgen/crunchgen.1 Modified: head/usr.sbin/crunch/crunchgen/crunchgen.1 == --- head/usr.sbin/crunch/crunchgen/crunchgen.1 Fri Jul 19 20:04:13 2019 (r350151) +++ head/usr.sbin/crunch/crunchgen/crunchgen.1 Fri Jul 19 20:04:21 2019 (r350152) @@ -137,9 +137,7 @@ Set the name of a file to be included at the beginning .Pa Makefile Ns s generated by .Nm . -This is useful to define some make variables such as -.Va RELEASE_CRUNCH -or similar, which might affect the behavior of +This is useful to define some make variables which might affect the behavior of .Xr make 1 and are annoying to pass through environment variables. .It Fl m Ar makefile-name ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350151 - head/sbin/ifconfig
Author: imp Date: Fri Jul 19 20:04:13 2019 New Revision: 350151 URL: https://svnweb.freebsd.org/changeset/base/350151 Log: Remove RELEASE_CRUNCH RELEASE_CRUNCH isn't used for releases any more. If someone wants to subset, then they can set MK_JAIL=no instead. Modified: head/sbin/ifconfig/Makefile Modified: head/sbin/ifconfig/Makefile == --- head/sbin/ifconfig/Makefile Fri Jul 19 20:02:01 2019(r350150) +++ head/sbin/ifconfig/Makefile Fri Jul 19 20:04:13 2019(r350151) @@ -63,7 +63,7 @@ CFLAGS+= -DINET6 .if ${MK_INET_SUPPORT} != "no" CFLAGS+= -DINET .endif -.if ${MK_JAIL} != "no" && !defined(RELEASE_CRUNCH) && !defined(RESCUE) +.if ${MK_JAIL} != "no" && !defined(RESCUE) CFLAGS+= -DJAIL LIBADD+= jail .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350150 - head/sbin/camcontrol
Author: mav Date: Fri Jul 19 20:02:01 2019 New Revision: 350150 URL: https://svnweb.freebsd.org/changeset/base/350150 Log: Properly report ACS revisions alike to kernel. MFC after:2 weeks Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c == --- head/sbin/camcontrol/camcontrol.c Fri Jul 19 19:15:08 2019 (r350149) +++ head/sbin/camcontrol/camcontrol.c Fri Jul 19 20:02:01 2019 (r350150) @@ -1478,6 +1478,7 @@ atasata(struct ata_params *parm) static void atacapprint(struct ata_params *parm) { + const char *proto; u_int32_t lbasize = (u_int32_t)parm->lba_size_1 | ((u_int32_t)parm->lba_size_2 << 16); @@ -1488,7 +1489,19 @@ atacapprint(struct ata_params *parm) printf("\n"); printf("protocol "); - printf("ATA/ATAPI-%d", ata_version(parm->version_major)); + proto = (parm->config == ATA_PROTO_CFA) ? "CFA" : + (parm->config & ATA_PROTO_ATAPI) ? "ATAPI" : "ATA"; + if (ata_version(parm->version_major) == 0) { + printf("%s", proto); + } else if (ata_version(parm->version_major) <= 7) { + printf("%s-%d", proto, + ata_version(parm->version_major)); + } else if (ata_version(parm->version_major) == 8) { + printf("%s8-ACS", proto); + } else { + printf("ACS-%d %s", + ata_version(parm->version_major) - 7, proto); + } if (parm->satacapabilities && parm->satacapabilities != 0x) { if (parm->satacapabilities & ATA_SATA_GEN3) printf(" SATA 3.x\n"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350149 - in head: sbin/camcontrol sys/cam/ata sys/sys
Author: mav Date: Fri Jul 19 19:15:08 2019 New Revision: 350149 URL: https://svnweb.freebsd.org/changeset/base/350149 Log: Add Accessible Max Address Configuration support to camcontrol. AMA replaced HPA in ACS-3 specification. It allows to limit size of the disk alike to HPA, but declares inaccessible data as indeterminate. One of its practical use cases is to under-provision SATA SSDs for better reliability and performance. While there, fix HPA Security detection/reporting. MFC after:2 weeks Relnotes: yes Sponsored by: iXsystems, Inc. Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c head/sys/cam/ata/ata_all.c head/sys/sys/ata.h Modified: head/sbin/camcontrol/camcontrol.8 == --- head/sbin/camcontrol/camcontrol.8 Fri Jul 19 18:47:13 2019 (r350148) +++ head/sbin/camcontrol/camcontrol.8 Fri Jul 19 19:15:08 2019 (r350149) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 22, 2019 +.Dd July 19, 2019 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -292,6 +292,13 @@ .Op Fl U Ar pwd .Op Fl y .Nm +.Ic ama +.Op device id +.Op generic args +.Op Fl f +.Op Fl q +.Op Fl s Ar max_sectors +.Nm .Ic persist .Op device id .Op generic args @@ -1599,6 +1606,40 @@ without prompting for confirmation .Pp The password for all HPA commands is limited to 32 characters, longer passwords will fail. +.It Ic ama +Update or report Accessible Max Address Configuration. +By default +.Nm +will print out the Accessible Max Address Configuration support and associated +settings of the device. +The +.Ic ama +command takes several optional arguments: +.Bl -tag -width 0n +.It Fl f +.Pp +Freeze the Accessible Max Address Configuration of the specified device. +.Pp +After command completion any other commands that update the configuration +shall be command aborted. +Frozen mode is disabled by power-off. +.It Fl q +.Pp +Be quiet, do not print any status messages. +.It Fl s Ar max_sectors +.Pp +Configures the maximum user accessible sectors of the device. +This will change the number of sectors the device reports. +.Pp +.Em WARNING! WARNING! WARNING! +.Pp +Changing the max sectors of a device using this option will make the data on +the device beyond the specified value indeterminate. +.Pp +Only one successful +.Fl s Ar max_sectors +call can be made without a power-on reset of the device. +.El .It Ic fwdownload Program firmware of the named .Tn SCSI Modified: head/sbin/camcontrol/camcontrol.c == --- head/sbin/camcontrol/camcontrol.c Fri Jul 19 18:47:13 2019 (r350148) +++ head/sbin/camcontrol/camcontrol.c Fri Jul 19 19:15:08 2019 (r350149) @@ -110,6 +110,7 @@ typedef enum { CAM_CMD_MMCSD_CMD = 0x0029, CAM_CMD_POWER_MODE = 0x002a, CAM_CMD_DEVTYPE = 0x002b, + CAM_CMD_AMA = 0x002c, } cam_cmdmask; typedef enum { @@ -236,6 +237,7 @@ static struct camcontrol_opts option_table[] = { {"fwdownload", CAM_CMD_DOWNLOAD_FW, CAM_ARG_NONE, "f:qsy"}, {"security", CAM_CMD_SECURITY, CAM_ARG_NONE, "d:e:fh:k:l:qs:T:U:y"}, {"hpa", CAM_CMD_HPA, CAM_ARG_NONE, "Pflp:qs:U:y"}, + {"ama", CAM_CMD_AMA, CAM_ARG_NONE, "fqs:"}, {"persist", CAM_CMD_PERSIST, CAM_ARG_NONE, "ai:I:k:K:o:ps:ST:U"}, {"attrib", CAM_CMD_ATTRIB, CAM_ARG_NONE, "a:ce:F:p:r:s:T:w:V:"}, {"opcodes", CAM_CMD_OPCODES, CAM_ARG_NONE, "No:s:T"}, @@ -359,6 +361,8 @@ static int atasecurity(struct cam_device *device, int int argc, char **argv, char *combinedopt); static int atahpa(struct cam_device *device, int retry_count, int timeout, int argc, char **argv, char *combinedopt); +static int ataama(struct cam_device *device, int retry_count, int timeout, + int argc, char **argv, char *combinedopt); static int scsiprintoneopcode(struct cam_device *device, int req_opcode, int sa_set, int req_sa, uint8_t *buf, uint32_t valid_len); @@ -1423,8 +1427,9 @@ atahpa_print(struct ata_params *parm, u_int64_t hpasiz lba, hpasize); printf("HPA - Security "); - if (parm->support.command1 & ATA_SUPPORT_MAXSECURITY) - printf("yes\n"); + if (parm->support.command2 & ATA_SUPPORT_MAXSECURITY) + printf("yes %s\n", (parm->enabled.command2 & + ATA_SUPPORT_MAXSECURITY) ? "yes" : "no "); else printf("no\n"); } else { @@ -1432,6 +1437,32 @@ atahpa_print(struct ata_params *parm, u_int64_t hpasiz } } +static void +ataama_print(struct ata_params *parm, u_int64_t nativesize, int header) +{ + u_int32_t lbasize =
svn commit: r350148 - head/libexec/bootpd
Author: brooks Date: Fri Jul 19 18:47:13 2019 New Revision: 350148 URL: https://svnweb.freebsd.org/changeset/base/350148 Log: Restore WARNS?=1 here. I missed that libexec/bootpd/bootpgw existed. Modified: head/libexec/bootpd/Makefile.inc Modified: head/libexec/bootpd/Makefile.inc == --- head/libexec/bootpd/Makefile.incFri Jul 19 18:39:24 2019 (r350147) +++ head/libexec/bootpd/Makefile.incFri Jul 19 18:47:13 2019 (r350148) @@ -1,3 +1,5 @@ # $FreeBSD$ +WARNS?=1 + .include "../Makefile.inc" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350147 - head/sys/dev/nvme
Author: imp Date: Fri Jul 19 18:39:24 2019 New Revision: 350147 URL: https://svnweb.freebsd.org/changeset/base/350147 Log: Keep track of the number of commands that exhaust their retry limit. While we print failure messages on the console, sometimes logs are lost or overwhelmed. Keeping a count of how many times we've failed retriable commands helps get a magnitude of the problem. Modified: head/sys/dev/nvme/nvme_private.h head/sys/dev/nvme/nvme_qpair.c head/sys/dev/nvme/nvme_sysctl.c Modified: head/sys/dev/nvme/nvme_private.h == --- head/sys/dev/nvme/nvme_private.hFri Jul 19 18:39:18 2019 (r350146) +++ head/sys/dev/nvme/nvme_private.hFri Jul 19 18:39:24 2019 (r350147) @@ -191,6 +191,7 @@ struct nvme_qpair { int64_t num_cmds; int64_t num_intr_handler_calls; int64_t num_retries; + int64_t num_failures; struct nvme_command *cmd; struct nvme_completion *cpl; Modified: head/sys/dev/nvme/nvme_qpair.c == --- head/sys/dev/nvme/nvme_qpair.c Fri Jul 19 18:39:18 2019 (r350146) +++ head/sys/dev/nvme/nvme_qpair.c Fri Jul 19 18:39:24 2019 (r350147) @@ -387,14 +387,16 @@ nvme_qpair_complete_tracker(struct nvme_qpair *qpair, struct nvme_completion *cpl, error_print_t print_on_error) { struct nvme_request *req; - boolean_t retry, error; + boolean_t retry, error, retriable; req = tr->req; error = nvme_completion_is_error(cpl); - retry = error && nvme_completion_is_retry(cpl) && - req->retries < nvme_retry_count; + retriable = nvme_completion_is_retry(cpl); + retry = error && retriable && req->retries < nvme_retry_count; if (retry) qpair->num_retries++; + if (error && req->retries >= nvme_retry_count && retriable) + qpair->num_failures++; if (error && (print_on_error == ERROR_PRINT_ALL || (!retry && print_on_error == ERROR_PRINT_NO_RETRY))) { @@ -687,6 +689,7 @@ nvme_qpair_construct(struct nvme_qpair *qpair, uint32_ qpair->num_cmds = 0; qpair->num_intr_handler_calls = 0; qpair->num_retries = 0; + qpair->num_failures = 0; qpair->cmd = (struct nvme_command *)queuemem; qpair->cpl = (struct nvme_completion *)(queuemem + cmdsz); prpmem = (uint8_t *)(queuemem + cmdsz + cplsz); Modified: head/sys/dev/nvme/nvme_sysctl.c == --- head/sys/dev/nvme/nvme_sysctl.c Fri Jul 19 18:39:18 2019 (r350146) +++ head/sys/dev/nvme/nvme_sysctl.c Fri Jul 19 18:39:24 2019 (r350147) @@ -167,6 +167,7 @@ nvme_qpair_reset_stats(struct nvme_qpair *qpair) qpair->num_cmds = 0; qpair->num_intr_handler_calls = 0; qpair->num_retries = 0; + qpair->num_failures = 0; } static int @@ -215,6 +216,21 @@ nvme_sysctl_num_retries(SYSCTL_HANDLER_ARGS) } static int +nvme_sysctl_num_failures(SYSCTL_HANDLER_ARGS) +{ + struct nvme_controller *ctrlr = arg1; + int64_t num_failures = 0; + int i; + + num_failures = ctrlr->adminq.num_failures; + + for (i = 0; i < ctrlr->num_io_queues; i++) + num_failures += ctrlr->ioq[i].num_failures; + + return (sysctl_handle_64(oidp, _failures, 0, req)); +} + +static int nvme_sysctl_reset_stats(SYSCTL_HANDLER_ARGS) { struct nvme_controller *ctrlr = arg1; @@ -267,6 +283,9 @@ nvme_sysctl_initialize_queue(struct nvme_qpair *qpair, "coalescing)"); SYSCTL_ADD_QUAD(ctrlr_ctx, que_list, OID_AUTO, "num_retries", CTLFLAG_RD, >num_retries, "Number of commands retried"); + SYSCTL_ADD_QUAD(ctrlr_ctx, que_list, OID_AUTO, "num_failures", + CTLFLAG_RD, >num_failures, + "Number of commands ending in failure after all retries"); SYSCTL_ADD_PROC(ctrlr_ctx, que_list, OID_AUTO, "dump_debug", CTLTYPE_UINT | CTLFLAG_RW, qpair, 0, @@ -322,6 +341,11 @@ nvme_sysctl_initialize_ctrlr(struct nvme_controller *c "num_retries", CTLTYPE_S64 | CTLFLAG_RD, ctrlr, 0, nvme_sysctl_num_retries, "IU", "Number of commands retried"); + + SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, + "num_failures", CTLTYPE_S64 | CTLFLAG_RD, + ctrlr, 0, nvme_sysctl_num_failures, "IU", + "Number of commands ending in failure after all retries"); SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, "reset_stats", CTLTYPE_UINT | CTLFLAG_RW, ctrlr, 0, ___ svn-src-head@freebsd.org mailing list
svn commit: r350145 - head/sys/libkern
Author: imp Date: Fri Jul 19 18:38:47 2019 New Revision: 350145 URL: https://svnweb.freebsd.org/changeset/base/350145 Log: Remove pre-FreeBSD 7.0 compatibility. Modified: head/sys/libkern/inet_pton.c Modified: head/sys/libkern/inet_pton.c == --- head/sys/libkern/inet_pton.cFri Jul 19 18:03:30 2019 (r350144) +++ head/sys/libkern/inet_pton.cFri Jul 19 18:38:47 2019 (r350145) @@ -27,10 +27,6 @@ __FBSDID("$FreeBSD$"); #include -#if __FreeBSD_version < 70 -#define strchr index -#endif - /*% * WARNING: Don't even consider trying to compile this on a system where * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350146 - head/sys/dev/nvme
Author: imp Date: Fri Jul 19 18:39:18 2019 New Revision: 350146 URL: https://svnweb.freebsd.org/changeset/base/350146 Log: Keep track of the number of retried commands. Retried commands can indicate a performance degredation of an nvme drive. Keep track of the number of retries and report it out via sysctl, just like number of commands an interrupts. Modified: head/sys/dev/nvme/nvme_private.h head/sys/dev/nvme/nvme_qpair.c head/sys/dev/nvme/nvme_sysctl.c Modified: head/sys/dev/nvme/nvme_private.h == --- head/sys/dev/nvme/nvme_private.hFri Jul 19 18:38:47 2019 (r350145) +++ head/sys/dev/nvme/nvme_private.hFri Jul 19 18:39:18 2019 (r350146) @@ -190,6 +190,7 @@ struct nvme_qpair { int64_t num_cmds; int64_t num_intr_handler_calls; + int64_t num_retries; struct nvme_command *cmd; struct nvme_completion *cpl; Modified: head/sys/dev/nvme/nvme_qpair.c == --- head/sys/dev/nvme/nvme_qpair.c Fri Jul 19 18:38:47 2019 (r350145) +++ head/sys/dev/nvme/nvme_qpair.c Fri Jul 19 18:39:18 2019 (r350146) @@ -393,6 +393,8 @@ nvme_qpair_complete_tracker(struct nvme_qpair *qpair, error = nvme_completion_is_error(cpl); retry = error && nvme_completion_is_retry(cpl) && req->retries < nvme_retry_count; + if (retry) + qpair->num_retries++; if (error && (print_on_error == ERROR_PRINT_ALL || (!retry && print_on_error == ERROR_PRINT_NO_RETRY))) { @@ -684,6 +686,7 @@ nvme_qpair_construct(struct nvme_qpair *qpair, uint32_ qpair->num_cmds = 0; qpair->num_intr_handler_calls = 0; + qpair->num_retries = 0; qpair->cmd = (struct nvme_command *)queuemem; qpair->cpl = (struct nvme_completion *)(queuemem + cmdsz); prpmem = (uint8_t *)(queuemem + cmdsz + cplsz); Modified: head/sys/dev/nvme/nvme_sysctl.c == --- head/sys/dev/nvme/nvme_sysctl.c Fri Jul 19 18:38:47 2019 (r350145) +++ head/sys/dev/nvme/nvme_sysctl.c Fri Jul 19 18:39:18 2019 (r350146) @@ -166,6 +166,7 @@ nvme_qpair_reset_stats(struct nvme_qpair *qpair) qpair->num_cmds = 0; qpair->num_intr_handler_calls = 0; + qpair->num_retries = 0; } static int @@ -199,6 +200,21 @@ nvme_sysctl_num_intr_handler_calls(SYSCTL_HANDLER_ARGS } static int +nvme_sysctl_num_retries(SYSCTL_HANDLER_ARGS) +{ + struct nvme_controller *ctrlr = arg1; + int64_t num_retries = 0; + int i; + + num_retries = ctrlr->adminq.num_retries; + + for (i = 0; i < ctrlr->num_io_queues; i++) + num_retries += ctrlr->ioq[i].num_retries; + + return (sysctl_handle_64(oidp, _retries, 0, req)); +} + +static int nvme_sysctl_reset_stats(SYSCTL_HANDLER_ARGS) { struct nvme_controller *ctrlr = arg1; @@ -249,6 +265,8 @@ nvme_sysctl_initialize_queue(struct nvme_qpair *qpair, "Number of times interrupt handler was invoked (will typically be " "less than number of actual interrupts generated due to " "coalescing)"); + SYSCTL_ADD_QUAD(ctrlr_ctx, que_list, OID_AUTO, "num_retries", + CTLFLAG_RD, >num_retries, "Number of commands retried"); SYSCTL_ADD_PROC(ctrlr_ctx, que_list, OID_AUTO, "dump_debug", CTLTYPE_UINT | CTLFLAG_RW, qpair, 0, @@ -299,6 +317,11 @@ nvme_sysctl_initialize_ctrlr(struct nvme_controller *c "Number of times interrupt handler was invoked (will " "typically be less than number of actual interrupts " "generated due to coalescing)"); + + SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, + "num_retries", CTLTYPE_S64 | CTLFLAG_RD, + ctrlr, 0, nvme_sysctl_num_retries, "IU", + "Number of commands retried"); SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, "reset_stats", CTLTYPE_UINT | CTLFLAG_RW, ctrlr, 0, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350143 - in head/libexec/bootpd: . tools
Author: brooks Date: Fri Jul 19 17:52:23 2019 New Revision: 350143 URL: https://svnweb.freebsd.org/changeset/base/350143 Log: Chain Makefile.inc's so default are inherited as expected. Remove unneeded or duplicate variables. No functional change. Obtained from:CheriBSD MFC after:1 week Sponsored by: DARPA, AFRL Modified: head/libexec/bootpd/Makefile.inc head/libexec/bootpd/tools/Makefile.inc Modified: head/libexec/bootpd/Makefile.inc == --- head/libexec/bootpd/Makefile.incFri Jul 19 17:48:29 2019 (r350142) +++ head/libexec/bootpd/Makefile.incFri Jul 19 17:52:23 2019 (r350143) @@ -1,5 +1,3 @@ # $FreeBSD$ -BINDIR?= /usr/libexec - -WARNS?=1 +.include "../Makefile.inc" Modified: head/libexec/bootpd/tools/Makefile.inc == --- head/libexec/bootpd/tools/Makefile.inc Fri Jul 19 17:48:29 2019 (r350142) +++ head/libexec/bootpd/tools/Makefile.inc Fri Jul 19 17:52:23 2019 (r350143) @@ -4,3 +4,5 @@ BINDIR=/usr/sbin WARNS?=1 + +.include "../Makefile.inc" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350142 - head/sys/conf
Author: imp Date: Fri Jul 19 17:48:29 2019 New Revision: 350142 URL: https://svnweb.freebsd.org/changeset/base/350142 Log: Add comments about KERN_OPT here. Modified: head/sys/conf/config.mk Modified: head/sys/conf/config.mk == --- head/sys/conf/config.mk Fri Jul 19 16:21:19 2019(r350141) +++ head/sys/conf/config.mk Fri Jul 19 17:48:29 2019(r350142) @@ -45,6 +45,8 @@ KERN_OPTS+= INET TCP_OFFLOAD KERN_OPTS+= INET6 .endif .elif !defined(KERN_OPTS) +# Add all the options that are mentioned in any opt_*.h file when we +# have a kernel build directory to pull them from. KERN_OPTS!=cat ${KERNBUILDDIR}/opt*.h | awk '{print $$2;}' | sort -u .export KERN_OPTS .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350136 - in head/share/man: man1 man3 man4 man4/man4.aarch64 man4/man4.arm man4/man4.i386 man4/man4.powerpc man4/man4.sparc64 man5 man6 man7 man8 man9
Author: manu Date: Fri Jul 19 15:12:20 2019 New Revision: 350136 URL: https://svnweb.freebsd.org/changeset/base/350136 Log: pkgbase: move man pages from runtime-manual to runtime We don't split the other man pages in their own package so do the same for runtime. Reviewed by: bapt, gjb Differential Revision:https://reviews.freebsd.org/D20962 Modified: head/share/man/man1/Makefile head/share/man/man3/Makefile head/share/man/man4/Makefile head/share/man/man4/man4.aarch64/Makefile head/share/man/man4/man4.arm/Makefile head/share/man/man4/man4.i386/Makefile head/share/man/man4/man4.powerpc/Makefile head/share/man/man4/man4.sparc64/Makefile head/share/man/man5/Makefile head/share/man/man6/Makefile head/share/man/man7/Makefile head/share/man/man8/Makefile head/share/man/man9/Makefile Modified: head/share/man/man1/Makefile == --- head/share/man/man1/MakefileFri Jul 19 15:11:32 2019 (r350135) +++ head/share/man/man1/MakefileFri Jul 19 15:12:20 2019 (r350136) @@ -5,8 +5,6 @@ MAN= builtin.1 intro.1 -PACKAGE=runtime-manuals - .if ${MK_TESTS} != "no" ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/doc Modified: head/share/man/man3/Makefile == --- head/share/man/man3/MakefileFri Jul 19 15:11:32 2019 (r350135) +++ head/share/man/man3/MakefileFri Jul 19 15:12:20 2019 (r350136) @@ -3,8 +3,6 @@ .include -PACKAGE=runtime-manuals - MAN= assert.3 \ ATOMIC_VAR_INIT.3 \ bitstring.3 \ Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileFri Jul 19 15:11:32 2019 (r350135) +++ head/share/man/man4/MakefileFri Jul 19 15:12:20 2019 (r350136) @@ -3,8 +3,6 @@ .include -PACKAGE=runtime-manuals - MAN= aac.4 \ aacraid.4 \ acpi.4 \ Modified: head/share/man/man4/man4.aarch64/Makefile == --- head/share/man/man4/man4.aarch64/Makefile Fri Jul 19 15:11:32 2019 (r350135) +++ head/share/man/man4/man4.aarch64/Makefile Fri Jul 19 15:12:20 2019 (r350136) @@ -1,7 +1,5 @@ # $FreeBSD$ -PACKAGE=runtime-manuals - .PATH: ${.CURDIR}/../man4.arm # Some manpages are common to arm and aarch64 MAN= \ Modified: head/share/man/man4/man4.arm/Makefile == --- head/share/man/man4/man4.arm/Makefile Fri Jul 19 15:11:32 2019 (r350135) +++ head/share/man/man4/man4.arm/Makefile Fri Jul 19 15:12:20 2019 (r350136) @@ -1,7 +1,5 @@ # $FreeBSD$ -PACKAGE=runtime-manuals - MAN= \ aw_gpio.4 \ aw_mmc.4 \ Modified: head/share/man/man4/man4.i386/Makefile == --- head/share/man/man4/man4.i386/Makefile Fri Jul 19 15:11:32 2019 (r350135) +++ head/share/man/man4/man4.i386/Makefile Fri Jul 19 15:12:20 2019 (r350136) @@ -1,7 +1,5 @@ # $FreeBSD$ -PACKAGE=runtime-manuals - MAN= apm.4 \ ce.4 \ cp.4 \ Modified: head/share/man/man4/man4.powerpc/Makefile == --- head/share/man/man4/man4.powerpc/Makefile Fri Jul 19 15:11:32 2019 (r350135) +++ head/share/man/man4/man4.powerpc/Makefile Fri Jul 19 15:12:20 2019 (r350136) @@ -1,7 +1,5 @@ # $FreeBSD$ -PACKAGE=runtime-manuals - MAN= adb.4 \ akbd.4 \ abtn.4 \ Modified: head/share/man/man4/man4.sparc64/Makefile == --- head/share/man/man4/man4.sparc64/Makefile Fri Jul 19 15:11:32 2019 (r350135) +++ head/share/man/man4/man4.sparc64/Makefile Fri Jul 19 15:12:20 2019 (r350136) @@ -1,7 +1,5 @@ # $FreeBSD$ -PACKAGE=runtime-manuals - MAN= auxio.4 \ central.4 \ clkbrd.4 \ Modified: head/share/man/man5/Makefile == --- head/share/man/man5/MakefileFri Jul 19 15:11:32 2019 (r350135) +++ head/share/man/man5/MakefileFri Jul 19 15:12:20 2019 (r350136) @@ -3,8 +3,6 @@ .include -PACKAGE=runtime-manuals - #MISSING: dump.5 plot.5 MAN= acct.5 \ ar.5 \ Modified: head/share/man/man6/Makefile == --- head/share/man/man6/MakefileFri Jul 19 15:11:32 2019 (r350135) +++ head/share/man/man6/MakefileFri Jul 19 15:12:20 2019 (r350136) @@ -2,6 +2,4 @@ MAN= intro.6 -PACKAGE=runtime-manuals -
svn commit: r350135 - head/share/mk
Author: manu Date: Fri Jul 19 15:11:32 2019 New Revision: 350135 URL: https://svnweb.freebsd.org/changeset/base/350135 Log: bsd.confs.mk: Test the correct value for the destination package Reviewed by: bapt, gjb Differential Revision:https://reviews.freebsd.org/D20961 Modified: head/share/mk/bsd.confs.mk Modified: head/share/mk/bsd.confs.mk == --- head/share/mk/bsd.confs.mk Fri Jul 19 15:11:14 2019(r350134) +++ head/share/mk/bsd.confs.mk Fri Jul 19 15:11:32 2019(r350135) @@ -43,7 +43,7 @@ STAGE_SETS+= ${group:C,[/*],_,g} . if defined(NO_ROOT) .if !defined(${group}TAGS) || ! ${${group}TAGS:Mpackage=*} -. if defined(${${group}PACKAGE}) +. if defined(${group}PACKAGE) ${group}TAGS+= package=${${group}PACKAGE:Uruntime} . else ${group}TAGS+= package=${PACKAGE:Uruntime} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350133 - in head: lib/libdpv lib/libfigpar usr.bin/dpv
Author: manu Date: Fri Jul 19 15:10:53 2019 New Revision: 350133 URL: https://svnweb.freebsd.org/changeset/base/350133 Log: pkgbase: Add a FreeBSD-dpv package Move the dpv related files from FreeBSD-runtime to a new package named FreeBSD-dpv The only consumer is bsdinstall which is already in it's own package. Reviewed by: bapt, gjb Differential Revision:https://reviews.freebsd.org/D20960 Modified: head/lib/libdpv/Makefile head/lib/libfigpar/Makefile head/usr.bin/dpv/Makefile Modified: head/lib/libdpv/Makefile == --- head/lib/libdpv/MakefileFri Jul 19 15:10:03 2019(r350132) +++ head/lib/libdpv/MakefileFri Jul 19 15:10:53 2019(r350133) @@ -1,6 +1,6 @@ # $FreeBSD$ -PACKAGE=lib${LIB} +PACKAGE= dpv LIB= dpv SHLIB_MAJOR= 1 INCS= dpv.h Modified: head/lib/libfigpar/Makefile == --- head/lib/libfigpar/Makefile Fri Jul 19 15:10:03 2019(r350132) +++ head/lib/libfigpar/Makefile Fri Jul 19 15:10:53 2019(r350133) @@ -1,6 +1,6 @@ # $FreeBSD$ -PACKAGE=lib${LIB} +PACKAGE= dpv LIB= figpar SHLIB_MAJOR= 0 INCS= figpar.h string_m.h Modified: head/usr.bin/dpv/Makefile == --- head/usr.bin/dpv/Makefile Fri Jul 19 15:10:03 2019(r350132) +++ head/usr.bin/dpv/Makefile Fri Jul 19 15:10:53 2019(r350133) @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= dpv + PROG= dpv CFLAGS+= -I${.CURDIR} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r350132 - in head: libexec/rc/rc.d release/packages usr.bin/bluetooth/bthost usr.bin/bluetooth/btsockstat usr.bin/bluetooth/rfcomm_sppd usr.sbin/bluetooth/ath3kfw usr.sbin/bluetooth/bcm...
Author: manu Date: Fri Jul 19 15:10:03 2019 New Revision: 350132 URL: https://svnweb.freebsd.org/changeset/base/350132 Log: pkgbase: Add a FreeBSD-bluetooth package Move the bluetooth related files from FreeBSD-runtime to a new package named FreeBSD-bluetooth The FreeBSD runtime is only intended to have everything for a working FreeBSD installation and bluetooth isn't needed for that. Reviewed by: bapt, gjb Differential Revision:https://reviews.freebsd.org/D20959 Added: head/release/packages/bluetooth.ucl (contents, props changed) Modified: head/libexec/rc/rc.d/Makefile head/release/packages/Makefile.package head/usr.bin/bluetooth/bthost/Makefile head/usr.bin/bluetooth/btsockstat/Makefile head/usr.bin/bluetooth/rfcomm_sppd/Makefile head/usr.sbin/bluetooth/ath3kfw/Makefile head/usr.sbin/bluetooth/bcmfw/Makefile head/usr.sbin/bluetooth/bluetooth-config/Makefile head/usr.sbin/bluetooth/bt3cfw/Makefile head/usr.sbin/bluetooth/bthidcontrol/Makefile head/usr.sbin/bluetooth/bthidd/Makefile head/usr.sbin/bluetooth/btpand/Makefile head/usr.sbin/bluetooth/hccontrol/Makefile head/usr.sbin/bluetooth/hcsecd/Makefile head/usr.sbin/bluetooth/hcseriald/Makefile head/usr.sbin/bluetooth/l2control/Makefile head/usr.sbin/bluetooth/l2ping/Makefile head/usr.sbin/bluetooth/rfcomm_pppd/Makefile head/usr.sbin/bluetooth/sdpcontrol/Makefile head/usr.sbin/bluetooth/sdpd/Makefile Modified: head/libexec/rc/rc.d/Makefile == --- head/libexec/rc/rc.d/Makefile Fri Jul 19 15:09:00 2019 (r350131) +++ head/libexec/rc/rc.d/Makefile Fri Jul 19 15:10:03 2019 (r350132) @@ -17,9 +17,7 @@ CONFS=DAEMON \ archdep \ bgfsck \ ${_blacklistd} \ - ${_bluetooth} \ bridge \ - ${_bthidd} \ cfumass \ cleanvar \ cleartmp \ @@ -40,7 +38,6 @@ CONFS=DAEMON \ gptboot \ growfs \ gssd \ - ${_hcsecd} \ hostid \ hostid_save \ hostname \ @@ -111,7 +108,6 @@ CONFS= DAEMON \ sysctl \ syslogd \ tmp \ - ${_ubthidhci} \ ugidfw \ ${_utx} \ var \ @@ -175,12 +171,14 @@ _blacklistd+= blacklistd .endif .if ${MK_BLUETOOTH} != "no" -_bluetooth=bluetooth -_bthidd= bthidd -_hcsecd= hcsecd -CONFS+=rfcomm_pppd_server -CONFS+=sdpd -_ubthidhci=ubthidhci +CONFGROUPS+= BLUETOOTH +BLUETOOTH+=bluetooth \ + bthidd \ + hcsecd \ + rfcomm_pppd_server \ + sdpd \ + ubthidhci +BLUETOOTHPACKAGE= bluetooth .endif .if ${MK_BOOTPARAMD} != "no" Modified: head/release/packages/Makefile.package == --- head/release/packages/Makefile.package Fri Jul 19 15:09:00 2019 (r350131) +++ head/release/packages/Makefile.package Fri Jul 19 15:10:03 2019 (r350132) @@ -18,6 +18,8 @@ bhyve_COMMENT=Bhyve Utilities bhyve_DESC=Bhyve Utilities binutils_COMMENT= Binutils binutils_DESC= Binutils +bluetooth_COMMENT= Bluetooth Utilities +bluetooth_DESC=Bluetooth Utilities bsdinstall_COMMENT=BSDInstall Utilities bsdinstall_DESC= BSDInstall Utilities bsnmp_COMMENT= BSNMP Utilities Added: head/release/packages/bluetooth.ucl == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/packages/bluetooth.ucl Fri Jul 19 15:10:03 2019 (r350132) @@ -0,0 +1,24 @@ +# +# $FreeBSD$ +# + +name = "FreeBSD-%PKGNAME%" +origin = "base" +version = "%VERSION%" +comment = "%COMMENT%" +categories = [ base ] +maintainer = "r...@freebsd.org" +www = "https://www.FreeBSD.org; +prefix = "/" +licenselogic = "single" +licenses = [ BSD2CLAUSE ] +desc =
svn commit: r350131 - in head: release/packages usr.sbin/wpa/hostapd usr.sbin/wpa/hostapd_cli
Author: manu Date: Fri Jul 19 15:09:00 2019 New Revision: 350131 URL: https://svnweb.freebsd.org/changeset/base/350131 Log: pkgbase: Add a FreeBSD-hostapd package Move the hostapd related files from FreeBSD-runtime to a new package n FreeBSD-hostapd The FreeBSD runtime is only intended to have everything for a working FreeBSD installation and hostapd isn't needed for that. Reviewed by: bapt, gjb Differential Revision:https://reviews.freebsd.org/D20958 Added: head/release/packages/hostapd.ucl (contents, props changed) Modified: head/release/packages/Makefile.package head/usr.sbin/wpa/hostapd/Makefile head/usr.sbin/wpa/hostapd_cli/Makefile Modified: head/release/packages/Makefile.package == --- head/release/packages/Makefile.package Fri Jul 19 15:07:31 2019 (r350130) +++ head/release/packages/Makefile.package Fri Jul 19 15:09:00 2019 (r350131) @@ -38,6 +38,8 @@ groff_COMMENT=Groff Utilities groff_DESC=Groff Utilities hast_COMMENT= Highly Available Storage daemon hast_DESC= Highly Available Storage daemon +hostapd_COMMENT= 802.11 Access Point Daemon an Utilities +hostapd_DESC= 802.11 Access Point Daemon an Utilities jail_COMMENT= Jail Utilities jail_DESC= Jail Utilities jail-debug_DESCR= Debugging Symbols Added: head/release/packages/hostapd.ucl == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/packages/hostapd.ucl Fri Jul 19 15:09:00 2019 (r350131) @@ -0,0 +1,23 @@ +# +# $FreeBSD$ +# + +name = "FreeBSD-%PKGNAME%" +origin = "base" +version = "%VERSION%" +comment = "%COMMENT%" +categories = [ base ] +maintainer = "r...@freebsd.org" +www = "https://www.FreeBSD.org; +prefix = "/" +licenselogic = "single" +licenses = [ BSD2CLAUSE ] +desc =
svn commit: r350129 - in head: release/packages usr.sbin/wpa/wpa_cli usr.sbin/wpa/wpa_passphrase usr.sbin/wpa/wpa_priv usr.sbin/wpa/wpa_supplicant
Author: manu Date: Fri Jul 19 15:07:30 2019 New Revision: 350129 URL: https://svnweb.freebsd.org/changeset/base/350129 Log: pkgbase: Add a FreeBSD-wpa package Move the wpa related files from FreeBSD-runtime to a new package named FreeBSD-wpa The FreeBSD runtime is only intended to have everything for a working FreeBSD installation and wpa isn't needed for that. Reviewed by:bapt, gjb Differential Revision: https://reviews.freebsd.org/D20957 Added: head/release/packages/wpa.ucl (contents, props changed) Modified: head/release/packages/Makefile.package head/usr.sbin/wpa/wpa_cli/Makefile head/usr.sbin/wpa/wpa_passphrase/Makefile head/usr.sbin/wpa/wpa_priv/Makefile head/usr.sbin/wpa/wpa_supplicant/Makefile Modified: head/release/packages/Makefile.package == --- head/release/packages/Makefile.package Fri Jul 19 14:27:18 2019 (r350128) +++ head/release/packages/Makefile.package Fri Jul 19 15:07:30 2019 (r350129) @@ -78,3 +78,5 @@ unbound_COMMENT= Unbound DNS Resolver unbound_DESC= Unbound DNS Resolver vi_COMMENT=Vi Editor vi_DESC= Vi Editor +wpa_COMMENT= 802.11 Supplicant +wpa_DESC= 802.11 Supplicant Added: head/release/packages/wpa.ucl == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/packages/wpa.ucl Fri Jul 19 15:07:30 2019 (r350129) @@ -0,0 +1,24 @@ +# +# $FreeBSD$ +# + +name = "FreeBSD-%PKGNAME%" +origin = "base" +version = "%VERSION%" +comment = "%COMMENT%" +categories = [ base ] +maintainer = "r...@freebsd.org" +www = "https://www.FreeBSD.org; +prefix = "/" +licenselogic = "single" +licenses = [ BSD2CLAUSE ] +desc =
Re: svn commit: r350116 - head/lib/libc/gen
On Thu, Jul 18, 2019 at 09:41:15PM +, Brooks Davis wrote: > On Thu, Jul 18, 2019 at 09:33:56PM +, Brooks Davis wrote: > > Author: brooks > > Date: Thu Jul 18 21:33:55 2019 > > New Revision: 350116 > > URL: https://svnweb.freebsd.org/changeset/base/350116 > > Log: > > Document that setmode(3) is not thread safe. > > In some circumstances, setmode(3) may call umask(2) twice to retrieve > > the current mode and then restore it. Between calls, the process will > > have a umask of 0. > This race isn't especially serious, since it only occurs when > security.bsd.unprivileged_proc_debug=0, but it's probably something to > fix. The easiest solution would probably be to implement a getumask() > syscall. Or make the KERN_PROC_UMASK sysctl work on the process itself even if security.bsd.unprivileged_proc_debug=0. This security sysctl is currently also lowering security. -- Jilles Tjoelker ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"