CVS commit: [pgoyette-compat] src/sys/compat/linux32/common
Module Name:src Committed By: pgoyette Date: Thu Jan 24 06:48:27 UTC 2019 Modified Files: src/sys/compat/linux32/common [pgoyette-compat]: linux32_mod.c Log Message: Restore the MD-vs-REQ requirements structure, just in case To generate a diff of this commit: cvs rdiff -u -r1.11.2.4 -r1.11.2.5 \ src/sys/compat/linux32/common/linux32_mod.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux32/common/linux32_mod.c diff -u src/sys/compat/linux32/common/linux32_mod.c:1.11.2.4 src/sys/compat/linux32/common/linux32_mod.c:1.11.2.5 --- src/sys/compat/linux32/common/linux32_mod.c:1.11.2.4 Thu Jan 24 06:23:26 2019 +++ src/sys/compat/linux32/common/linux32_mod.c Thu Jan 24 06:48:27 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_mod.c,v 1.11.2.4 2019/01/24 06:23:26 pgoyette Exp $ */ +/* $NetBSD: linux32_mod.c,v 1.11.2.5 2019/01/24 06:48:27 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_mod.c,v 1.11.2.4 2019/01/24 06:23:26 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_mod.c,v 1.11.2.5 2019/01/24 06:48:27 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_execfmt.h" @@ -51,11 +51,16 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_mod. #include #include -#define REQ1 "exec_elf32,compat_netbsd32,compat_linux" -#define REQ2 ",sysv_ipc,compat_netbsd32_sysvipc,compat_sysv_50" -#define REQ3 ",compat_netbsd32_50,compat_netbsd32_43" +#if defined(EXEC_ELF32) +# define MD1 ",exec_elf32,compat_netbsd32,compat_netbsd32_sysvipc" +#else +# define MD1 "" +#endif + +#define REQ1 "compat_linux,sysv_ipc,compat_sysv_50" +#define REQ2 ",compat_netbsd32_50,compat_netbsd32_43" -MODULE(MODULE_CLASS_EXEC, compat_linux32, REQ1 REQ2 REQ3); +MODULE(MODULE_CLASS_EXEC, compat_linux32, REQ1 REQ2 MD1); static struct execsw linux32_execsw[] = { #if defined(EXEC_ELF32)
CVS commit: [pgoyette-compat] src/sys/compat/linux32/common
Module Name:src Committed By: pgoyette Date: Thu Jan 24 06:23:26 UTC 2019 Modified Files: src/sys/compat/linux32/common [pgoyette-compat]: linux32_mod.c Log Message: Clean up and reorganize the requirements for compat_linux32 module To generate a diff of this commit: cvs rdiff -u -r1.11.2.3 -r1.11.2.4 \ src/sys/compat/linux32/common/linux32_mod.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux32/common/linux32_mod.c diff -u src/sys/compat/linux32/common/linux32_mod.c:1.11.2.3 src/sys/compat/linux32/common/linux32_mod.c:1.11.2.4 --- src/sys/compat/linux32/common/linux32_mod.c:1.11.2.3 Wed Sep 12 08:09:23 2018 +++ src/sys/compat/linux32/common/linux32_mod.c Thu Jan 24 06:23:26 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_mod.c,v 1.11.2.3 2018/09/12 08:09:23 pgoyette Exp $ */ +/* $NetBSD: linux32_mod.c,v 1.11.2.4 2019/01/24 06:23:26 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_mod.c,v 1.11.2.3 2018/09/12 08:09:23 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_mod.c,v 1.11.2.4 2019/01/24 06:23:26 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_execfmt.h" @@ -51,18 +51,11 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_mod. #include #include -#if defined(EXEC_ELF32) -# define MD1 ",exec_elf32,compat_netbsd32,compat_netbsd32_sysvipc" -#else -# define MD1 "" -#endif - -#define REQ1 "compat_linux,compat_sysv_50" -#define REQ2 ",compat_netbsd32_43,compat_netbsd32_50,compat_netbsd32_12" -#define REQ3 ",compat_netbsd32_30,compat_netbsd32_16" -#define REQ4",compat_ossaudio,sysv_ipc,compat_netbsd32_sysvipc" +#define REQ1 "exec_elf32,compat_netbsd32,compat_linux" +#define REQ2 ",sysv_ipc,compat_netbsd32_sysvipc,compat_sysv_50" +#define REQ3 ",compat_netbsd32_50,compat_netbsd32_43" -MODULE(MODULE_CLASS_EXEC, compat_linux32, REQ1 REQ2 REQ3 REQ4 MD1); +MODULE(MODULE_CLASS_EXEC, compat_linux32, REQ1 REQ2 REQ3); static struct execsw linux32_execsw[] = { #if defined(EXEC_ELF32)
CVS commit: [pgoyette-compat] src/sys/compat/linux/common
Module Name:src Committed By: pgoyette Date: Thu Jan 24 05:06:43 UTC 2019 Modified Files: src/sys/compat/linux/common [pgoyette-compat]: linux_exec_elf32.c Log Message: Move the definition around to avoid strange compiler error (something about trying to set a section attribute on a local variable). To generate a diff of this commit: cvs rdiff -u -r1.94.12.6 -r1.94.12.7 \ src/sys/compat/linux/common/linux_exec_elf32.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/common/linux_exec_elf32.c diff -u src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.6 src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.7 --- src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.6 Thu Jan 24 04:52:58 2019 +++ src/sys/compat/linux/common/linux_exec_elf32.c Thu Jan 24 05:06:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec_elf32.c,v 1.94.12.6 2019/01/24 04:52:58 pgoyette Exp $ */ +/* $NetBSD: linux_exec_elf32.c,v 1.94.12.7 2019/01/24 05:06:43 pgoyette Exp $ */ /*- * Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.6 2019/01/24 04:52:58 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.7 2019/01/24 05:06:43 pgoyette Exp $"); #ifndef ELFSIZE /* XXX should die */ @@ -74,6 +74,10 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec_e #include #include +#if (ELFSIZE == 32) + MODULE_HOOK(netbsd32_machine32_hook, const char *, (void)); +#endif + #define LINUX_GO_RT0_SIGNATURE #ifdef DEBUG_LINUX @@ -335,7 +339,6 @@ ELFNAME2(linux,go_rt0_signature)(struct goto out; #if (ELFSIZE == 32) - MODULE_HOOK(netbsd32_machine32_hook, const char *, (void)); extern struct netbsd32_machine32_hook_t netbsd32_machine32_hook; MODULE_CALL_HOOK(netbsd32_machine32_hook, (), machine, m); #else
CVS commit: [pgoyette-compat] src/sys/compat/linux/common
Module Name:src Committed By: pgoyette Date: Thu Jan 24 04:52:58 UTC 2019 Modified Files: src/sys/compat/linux/common [pgoyette-compat]: linux_exec_elf32.c Log Message: revert previous, just define the hook here To generate a diff of this commit: cvs rdiff -u -r1.94.12.5 -r1.94.12.6 \ src/sys/compat/linux/common/linux_exec_elf32.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/common/linux_exec_elf32.c diff -u src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.5 src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.6 --- src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.5 Thu Jan 24 04:41:34 2019 +++ src/sys/compat/linux/common/linux_exec_elf32.c Thu Jan 24 04:52:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec_elf32.c,v 1.94.12.5 2019/01/24 04:41:34 pgoyette Exp $ */ +/* $NetBSD: linux_exec_elf32.c,v 1.94.12.6 2019/01/24 04:52:58 pgoyette Exp $ */ /*- * Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.5 2019/01/24 04:41:34 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.6 2019/01/24 04:52:58 pgoyette Exp $"); #ifndef ELFSIZE /* XXX should die */ @@ -73,7 +73,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec_e #include #include -#include #define LINUX_GO_RT0_SIGNATURE @@ -336,6 +335,7 @@ ELFNAME2(linux,go_rt0_signature)(struct goto out; #if (ELFSIZE == 32) + MODULE_HOOK(netbsd32_machine32_hook, const char *, (void)); extern struct netbsd32_machine32_hook_t netbsd32_machine32_hook; MODULE_CALL_HOOK(netbsd32_machine32_hook, (), machine, m); #else
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Jan 24 04:50:04 UTC 2019 Modified Files: src/sys/dev/pci: if_wm.c Log Message: No functional change intended: - Use "do {} while (/*CONSTCOND*/false)" for null DPRINTF(). - Reduce indent level of wm_linkintr_gmii(). To generate a diff of this commit: cvs rdiff -u -r1.617 -r1.618 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.617 src/sys/dev/pci/if_wm.c:1.618 --- src/sys/dev/pci/if_wm.c:1.617 Tue Jan 22 03:42:27 2019 +++ src/sys/dev/pci/if_wm.c Thu Jan 24 04:50:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.617 2019/01/22 03:42:27 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.618 2019/01/24 04:50:04 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -83,7 +83,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.617 2019/01/22 03:42:27 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.618 2019/01/24 04:50:04 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -160,7 +160,7 @@ int wm_debug = WM_DEBUG_TX | WM_DEBUG_RX #define DPRINTF(x, y) if (wm_debug & (x)) printf y #else -#define DPRINTF(x, y) /* nothing */ +#define DPRINTF(x, y) do { } while (/*CONSTCOND*/false) #endif /* WM_DEBUG */ #ifdef NET_MPSAFE @@ -3975,10 +3975,9 @@ wm_get_cfg_done(struct wm_softc *sc) break; delay(1000); } - if (i >= WM_PHY_CFG_TIMEOUT) { + if (i >= WM_PHY_CFG_TIMEOUT) DPRINTF(WM_DEBUG_GMII, ("%s: %s failed\n", device_xname(sc->sc_dev), __func__)); - } break; case WM_T_ICH8: case WM_T_ICH9: @@ -4091,11 +4090,10 @@ wm_write_smbus_addr(struct wm_softc *sc) HV_SMB_ADDR_FREQ_LOW); phy_data |= __SHIFTIN((freq & 0x02) != 0, HV_SMB_ADDR_FREQ_HIGH); - } else { + } else DPRINTF(WM_DEBUG_INIT, ("%s: %s Unsupported SMB frequency in PHY\n", device_xname(sc->sc_dev), __func__)); - } } return wm_gmii_hv_writereg_locked(sc->sc_dev, 2, HV_SMB_ADDR, @@ -8955,142 +8953,142 @@ wm_rxeof(struct wm_rxqueue *rxq, u_int l static void wm_linkintr_gmii(struct wm_softc *sc, uint32_t icr) { + uint32_t status, reg; + bool link; KASSERT(WM_CORE_LOCKED(sc)); DPRINTF(WM_DEBUG_LINK, ("%s: %s:\n", device_xname(sc->sc_dev), __func__)); - if (icr & ICR_LSC) { - uint32_t status = CSR_READ(sc, WMREG_STATUS); - uint32_t reg; - bool link; - - link = status & STATUS_LU; - if (link) { - DPRINTF(WM_DEBUG_LINK, ("%s: LINK: LSC -> up %s\n", -device_xname(sc->sc_dev), -(status & STATUS_FD) ? "FDX" : "HDX")); - } else { - DPRINTF(WM_DEBUG_LINK, ("%s: LINK: LSC -> down\n", + if ((icr & ICR_LSC) == 0) { + if (icr & ICR_RXSEQ) + DPRINTF(WM_DEBUG_LINK, + ("%s: LINK Receive sequence error\n", device_xname(sc->sc_dev))); - } - if ((sc->sc_type == WM_T_ICH8) && (link == false)) - wm_gig_downshift_workaround_ich8lan(sc); + return; + } - if ((sc->sc_type == WM_T_ICH8) - && (sc->sc_phytype == WMPHY_IGP_3)) { - wm_kmrn_lock_loss_workaround_ich8lan(sc); - } - DPRINTF(WM_DEBUG_LINK, ("%s: LINK: LSC -> mii_pollstat\n", + /* Link status changed */ + status = CSR_READ(sc, WMREG_STATUS); + link = status & STATUS_LU; + if (link) + DPRINTF(WM_DEBUG_LINK, ("%s: LINK: LSC -> up %s\n", + device_xname(sc->sc_dev), + (status & STATUS_FD) ? "FDX" : "HDX")); + else + DPRINTF(WM_DEBUG_LINK, ("%s: LINK: LSC -> down\n", device_xname(sc->sc_dev))); - mii_pollstat(>sc_mii); - if (sc->sc_type == WM_T_82543) { - int miistatus, active; - - /* - * With 82543, we need to force speed and - * duplex on the MAC equal to what the PHY - * speed and duplex configuration is. - */ - miistatus = sc->sc_mii.mii_media_status; + if ((sc->sc_type == WM_T_ICH8) && (link == false)) + wm_gig_downshift_workaround_ich8lan(sc); - if (miistatus & IFM_ACTIVE) { -active = sc->sc_mii.mii_media_active; -sc->sc_ctrl &= ~(CTRL_SPEED_MASK | CTRL_FD); -switch (IFM_SUBTYPE(active)) { -case IFM_10_T: - sc->sc_ctrl |= CTRL_SPEED_10; - break; -case IFM_100_TX: - sc->sc_ctrl |= CTRL_SPEED_100; - break; -case IFM_1000_T: - sc->sc_ctrl |= CTRL_SPEED_1000; - break; -default: - /* - * fiber? - * Shoud not enter here. - */ - printf("unknown media (%x)\n", active); - break; -} -if (active & IFM_FDX) - sc->sc_ctrl |= CTRL_FD; -CSR_WRITE(sc, WMREG_CTRL, sc->sc_ctrl); - } - } else if (sc->sc_type == WM_T_PCH) { - wm_k1_gig_workaround_hv(sc, - ((sc->sc_mii.mii_media_status & IFM_ACTIVE) != 0)); - } + if ((sc->sc_type == WM_T_ICH8) + && (sc->sc_phytype == WMPHY_IGP_3)) { + wm_kmrn_lock_loss_workaround_ich8lan(sc); + } + DPRINTF(WM_DEBUG_LINK, ("%s: LINK: LSC -> mii_pollstat\n", + device_xname(sc->sc_dev))); + mii_pollstat(>sc_mii); + if
CVS commit: [pgoyette-compat] src/sys/compat/linux/common
Module Name:src Committed By: pgoyette Date: Thu Jan 24 04:41:34 UTC 2019 Modified Files: src/sys/compat/linux/common [pgoyette-compat]: linux_exec_elf32.c Log Message: And include the definition To generate a diff of this commit: cvs rdiff -u -r1.94.12.4 -r1.94.12.5 \ src/sys/compat/linux/common/linux_exec_elf32.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/common/linux_exec_elf32.c diff -u src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.4 src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.5 --- src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.4 Thu Jan 24 04:37:24 2019 +++ src/sys/compat/linux/common/linux_exec_elf32.c Thu Jan 24 04:41:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec_elf32.c,v 1.94.12.4 2019/01/24 04:37:24 pgoyette Exp $ */ +/* $NetBSD: linux_exec_elf32.c,v 1.94.12.5 2019/01/24 04:41:34 pgoyette Exp $ */ /*- * Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.4 2019/01/24 04:37:24 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.5 2019/01/24 04:41:34 pgoyette Exp $"); #ifndef ELFSIZE /* XXX should die */ @@ -73,6 +73,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec_e #include #include +#include #define LINUX_GO_RT0_SIGNATURE
CVS commit: [pgoyette-compat] src/sys/compat/linux/common
Module Name:src Committed By: pgoyette Date: Thu Jan 24 04:37:24 UTC 2019 Modified Files: src/sys/compat/linux/common [pgoyette-compat]: linux_exec_elf32.c Log Message: Make sure we declare the hook variable To generate a diff of this commit: cvs rdiff -u -r1.94.12.3 -r1.94.12.4 \ src/sys/compat/linux/common/linux_exec_elf32.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/common/linux_exec_elf32.c diff -u src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.3 src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.4 --- src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.3 Thu Jan 24 04:08:09 2019 +++ src/sys/compat/linux/common/linux_exec_elf32.c Thu Jan 24 04:37:24 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec_elf32.c,v 1.94.12.3 2019/01/24 04:08:09 pgoyette Exp $ */ +/* $NetBSD: linux_exec_elf32.c,v 1.94.12.4 2019/01/24 04:37:24 pgoyette Exp $ */ /*- * Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.3 2019/01/24 04:08:09 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.94.12.4 2019/01/24 04:37:24 pgoyette Exp $"); #ifndef ELFSIZE /* XXX should die */ @@ -335,6 +335,7 @@ ELFNAME2(linux,go_rt0_signature)(struct goto out; #if (ELFSIZE == 32) + extern struct netbsd32_machine32_hook_t netbsd32_machine32_hook; MODULE_CALL_HOOK(netbsd32_machine32_hook, (), machine, m); #else m = machine;
CVS commit: [pgoyette-compat] src/sys/compat/netbsd32
Module Name:src Committed By: pgoyette Date: Thu Jan 24 04:32:41 UTC 2019 Modified Files: src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_sysctl.c Log Message: I must be getting tired - use the correct name of the hook To generate a diff of this commit: cvs rdiff -u -r1.38.2.4 -r1.38.2.5 src/sys/compat/netbsd32/netbsd32_sysctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_sysctl.c diff -u src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.4 src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.5 --- src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.4 Thu Jan 24 04:31:19 2019 +++ src/sys/compat/netbsd32/netbsd32_sysctl.c Thu Jan 24 04:32:41 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_sysctl.c,v 1.38.2.4 2019/01/24 04:31:19 pgoyette Exp $ */ +/* $NetBSD: netbsd32_sysctl.c,v 1.38.2.5 2019/01/24 04:32:41 pgoyette Exp $ */ /* * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.4 2019/01/24 04:31:19 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.5 2019/01/24 04:32:41 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_ddb.h" @@ -171,7 +171,7 @@ netbsd32_sysctl_init(void) CTLTYPE_INT, "alignbytes", NULL, NULL, ALIGNBYTES32, NULL, 0, CTL_HW, HW_ALIGNBYTES, CTL_EOL); - MODULE_CALL_HOOK(netbsd32_machine_32_hook, (), machine, m); + MODULE_CALL_HOOK(netbsd32_machine32_hook, (), machine, m); sysctl_createv(_clog, 0, &_root, NULL, CTLFLAG_PERMANENT, CTLTYPE_STRING, "machine", NULL,
CVS commit: [pgoyette-compat] src/sys/compat/netbsd32
Module Name:src Committed By: pgoyette Date: Thu Jan 24 04:31:19 UTC 2019 Modified Files: src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_sysctl.c Log Message: I wrote this stuff, when will I ever learn to use MODULE_CALL_HOOK instead of MODULE_HOOK_CALL ? :) To generate a diff of this commit: cvs rdiff -u -r1.38.2.3 -r1.38.2.4 src/sys/compat/netbsd32/netbsd32_sysctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_sysctl.c diff -u src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.3 src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.4 --- src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.3 Thu Jan 24 04:24:52 2019 +++ src/sys/compat/netbsd32/netbsd32_sysctl.c Thu Jan 24 04:31:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_sysctl.c,v 1.38.2.3 2019/01/24 04:24:52 pgoyette Exp $ */ +/* $NetBSD: netbsd32_sysctl.c,v 1.38.2.4 2019/01/24 04:31:19 pgoyette Exp $ */ /* * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.3 2019/01/24 04:24:52 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.4 2019/01/24 04:31:19 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_ddb.h" @@ -171,7 +171,7 @@ netbsd32_sysctl_init(void) CTLTYPE_INT, "alignbytes", NULL, NULL, ALIGNBYTES32, NULL, 0, CTL_HW, HW_ALIGNBYTES, CTL_EOL); - MODULE_HOOK_CALL(netbsd32_machine_32_hook, (), machine, m); + MODULE_CALL_HOOK(netbsd32_machine_32_hook, (), machine, m); sysctl_createv(_clog, 0, &_root, NULL, CTLFLAG_PERMANENT, CTLTYPE_STRING, "machine", NULL,
CVS commit: othersrc/libexec/tnftpd/libnetbsd
Module Name:othersrc Committed By: lukem Date: Thu Jan 24 04:27:39 UTC 2019 Modified Files: othersrc/libexec/tnftpd/libnetbsd: fparseln.c Log Message: remove obsolete rcsid To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/libexec/tnftpd/libnetbsd/fparseln.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/libnetbsd/fparseln.c diff -u othersrc/libexec/tnftpd/libnetbsd/fparseln.c:1.3 othersrc/libexec/tnftpd/libnetbsd/fparseln.c:1.4 --- othersrc/libexec/tnftpd/libnetbsd/fparseln.c:1.3 Wed Jan 23 05:34:09 2019 +++ othersrc/libexec/tnftpd/libnetbsd/fparseln.c Thu Jan 24 04:27:39 2019 @@ -1,5 +1,4 @@ -/* $NetBSD: fparseln.c,v 1.3 2019/01/23 05:34:09 lukem Exp $ */ -/* from NetBSD: fparseln.c,v 1.5 1997/12/01 02:58:41 lukem Exp */ +/* $NetBSD: fparseln.c,v 1.4 2019/01/24 04:27:39 lukem Exp $ */ /* from NetBSD: fparseln.c,v 1.10 2009/10/21 01:07:45 snj Exp */ /*
CVS commit: [pgoyette-compat] src/sys/compat/netbsd32
Module Name:src Committed By: pgoyette Date: Thu Jan 24 04:24:52 UTC 2019 Modified Files: src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_sysctl.c Log Message: Use the hook to get the value of machine32 To generate a diff of this commit: cvs rdiff -u -r1.38.2.2 -r1.38.2.3 src/sys/compat/netbsd32/netbsd32_sysctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_sysctl.c diff -u src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.2 src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.3 --- src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.2 Thu Jan 24 03:41:48 2019 +++ src/sys/compat/netbsd32/netbsd32_sysctl.c Thu Jan 24 04:24:52 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_sysctl.c,v 1.38.2.2 2019/01/24 03:41:48 pgoyette Exp $ */ +/* $NetBSD: netbsd32_sysctl.c,v 1.38.2.3 2019/01/24 04:24:52 pgoyette Exp $ */ /* * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.2 2019/01/24 03:41:48 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.3 2019/01/24 04:24:52 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_ddb.h" @@ -171,6 +171,7 @@ netbsd32_sysctl_init(void) CTLTYPE_INT, "alignbytes", NULL, NULL, ALIGNBYTES32, NULL, 0, CTL_HW, HW_ALIGNBYTES, CTL_EOL); + MODULE_HOOK_CALL(netbsd32_machine_32_hook, (), machine, m); sysctl_createv(_clog, 0, &_root, NULL, CTLFLAG_PERMANENT, CTLTYPE_STRING, "machine", NULL,
CVS commit: othersrc/libexec/tnftpd/libnetbsd
Module Name:othersrc Committed By: lukem Date: Thu Jan 24 04:25:23 UTC 2019 Modified Files: othersrc/libexec/tnftpd/libnetbsd: glob.c Log Message: sync to NetBSD glob.c 1.38 Update from NetBSD src/lib/libc/gen/glob.c 1.34 to 1.38: - Minimize changes from upstream NetBSD source. - 1.35: Use unsigned foo not u_FOO. [Already done] - 1.36: Bump the glob limits to 512KB for total string size and 64K path entries. The old limits were too small for some important FTP use cases like a pkgsrc repository. - 1.37: Switch from a recursive pattern matching algorithm to handle '*' to a backtracking one. Avoids DoS attacks with patterns "a*a*a*a*a*...b" matching against "..." https://research.swtch.com/glob - 1.38: Use the symbolic M_ALL and trim with M_MASK. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 othersrc/libexec/tnftpd/libnetbsd/glob.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/libnetbsd/glob.c diff -u othersrc/libexec/tnftpd/libnetbsd/glob.c:1.6 othersrc/libexec/tnftpd/libnetbsd/glob.c:1.7 --- othersrc/libexec/tnftpd/libnetbsd/glob.c:1.6 Wed Mar 20 08:54:53 2013 +++ othersrc/libexec/tnftpd/libnetbsd/glob.c Thu Jan 24 04:25:23 2019 @@ -1,5 +1,5 @@ -/* $NetBSD: glob.c,v 1.6 2013/03/20 08:54:53 lukem Exp $ */ -/* from: NetBSD: glob.c,v 1.34 2013/02/21 18:17:43 christos Exp */ +/* $NetBSD: glob.c,v 1.7 2019/01/24 04:25:23 lukem Exp $ */ +/* from: NetBSD: glob.c,v 1.38 2017/05/08 14:42:16 christos Exp */ /* * Copyright (c) 1989, 1993 @@ -33,6 +33,19 @@ * SUCH DAMAGE. */ +#if 0 + +#include +#if defined(LIBC_SCCS) && !defined(lint) +#if 0 +static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; +#else +__RCSID("$NetBSD: glob.c,v 1.7 2019/01/24 04:25:23 lukem Exp $"); +#endif +#endif /* LIBC_SCCS and not lint */ + +#endif + /* * glob(3) -- a superset of the one defined in POSIX 1003.2. * @@ -61,8 +74,17 @@ #include "tnftpd.h" +#define NO_GETPW_R + +#undef TILDE /* XXX: AIX 4.1.5 has this in */ + +#ifndef __UNCONST +#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a)) +#endif + #if 0 +#include "namespace.h" #include #include @@ -70,6 +92,7 @@ #include #include #include +#include #include #include #include @@ -77,13 +100,15 @@ #include #include +#ifdef HAVE_NBTOOL_CONFIG_H +#define NO_GETPW_R #endif -#define NO_GETPW_R +#endif -#define GLOB_LIMIT_STRING 65536 /* number of readdirs */ +#define GLOB_LIMIT_STRING 524288 /* number of readdirs */ #define GLOB_LIMIT_STAT 128 /* number of stat system calls */ -#define GLOB_LIMIT_READDIR 16384 /* total buffer size of path strings */ +#define GLOB_LIMIT_READDIR 65536 /* total buffer size of path strings */ #define GLOB_LIMIT_PATH 1024 /* number of path elements */ #define GLOB_LIMIT_BRACE 128 /* Number of brace calls */ @@ -94,17 +119,12 @@ struct glob_limit { size_t l_brace; }; -#undef TILDE /* XXX: AIX 4.1.5 has this in */ - /* * XXX: For NetBSD 1.4.x compatibility. (kill me l8r) */ #ifndef _DIAGASSERT #define _DIAGASSERT(a) #endif -#ifndef __UNCONST -#define __UNCONST(a) ((void *)(unsigned long)(a)) -#endif #define DOLLAR '$' #define DOT '.' @@ -935,39 +955,45 @@ nospace: /* - * pattern matching function for filenames. Each occurrence of the * - * pattern causes a recursion level. + * pattern matching function for filenames. */ static int match(const Char *name, const Char *pat, const Char *patend) { int ok, negate_range; Char c, k; + const Char *patNext, *nameNext, *nameStart, *nameEnd; _DIAGASSERT(name != NULL); _DIAGASSERT(pat != NULL); _DIAGASSERT(patend != NULL); - - while (pat < patend) { - c = *pat++; + patNext = pat; + nameStart = nameNext = name; + nameEnd = NULL; + + while (pat < patend || *name) { + c = *pat; + if (*name == EOS) + nameEnd = name; switch (c & M_MASK) { case M_ALL: - while (pat < patend && (*pat & M_MASK) == M_ALL) -pat++; /* eat consecutive '*' */ - if (pat == patend) -return 1; - for (; !match(name, pat, patend); name++) -if (*name == EOS) - return 0; - return 1; + while ((pat[1] & M_MASK) == M_ALL) pat++; + patNext = pat; + nameNext = name + 1; + pat++; + continue; case M_ONE: - if (*name++ == EOS) -return 0; - break; + if (*name == EOS) +break; + pat++; + name++; + continue; case M_SET: ok = 0; - if ((k = *name++) == EOS) -return 0; + if ((k = *name) == EOS) +break; + pat++; + name++; if ((negate_range = ((*pat & M_MASK) == M_NOT)) != EOS) ++pat; while (((c = *pat++) & M_MASK) != M_END) @@ -978,15 +1004,24 @@ match(const Char *name, const Char *pat, } else if (c == k) ok = 1; if (ok == negate_range) -return 0; - break; +break; + continue; default: - if (*name++ != c) -return 0; - break; + if (*name != c)
CVS commit: [pgoyette-compat] src/sys/compat/netbsd32
Module Name:src Committed By: pgoyette Date: Thu Jan 24 04:16:03 UTC 2019 Modified Files: src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_exec_elf32.c Log Message: Use correct macro name To generate a diff of this commit: cvs rdiff -u -r1.40.14.1 -r1.40.14.2 \ src/sys/compat/netbsd32/netbsd32_exec_elf32.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_exec_elf32.c diff -u src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.40.14.1 src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.40.14.2 --- src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.40.14.1 Thu Jan 24 03:41:48 2019 +++ src/sys/compat/netbsd32/netbsd32_exec_elf32.c Thu Jan 24 04:16:03 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_exec_elf32.c,v 1.40.14.1 2019/01/24 03:41:48 pgoyette Exp $ */ +/* $NetBSD: netbsd32_exec_elf32.c,v 1.40.14.2 2019/01/24 04:16:03 pgoyette Exp $ */ /* from: NetBSD: exec_aout.c,v 1.15 1996/09/26 23:34:46 cgd Exp */ /* @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.40.14.1 2019/01/24 03:41:48 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.40.14.2 2019/01/24 04:16:03 pgoyette Exp $"); #define ELFSIZE 32 @@ -112,7 +112,7 @@ ELFNAME2(netbsd32,probe_noteless)(struct const char *m; if (itp && epp->ep_interp == NULL) { - MODULE_HOOK_CALL(netbsd32_machine32_hook, (), machine, m); + MODULE_CALL_HOOK(netbsd32_machine32_hook, (), machine, m); (void)compat_elf_check_interp(epp, itp, m); } #ifdef _LP64
CVS commit: src/sys/arch/xen/include
Module Name:src Committed By: cherry Date: Thu Jan 24 04:16:16 UTC 2019 Modified Files: src/sys/arch/xen/include/amd64: hypercalls.h src/sys/arch/xen/include/i386: hypercalls.h Log Message: The event_channel_op hypercall uses a newer API since __XEN_INTERFACE_VERSION__ 0x00030202 Since hvm_op only supports event_channel_op via the newer API, we can't get away with our current event_channel_op_compat shim. We thus introduce the new API to our internal hypercall C API interface. This change should have no effect on the PV kernels, since they will continue to use the pre 0x00030202 API. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/xen/include/amd64/hypercalls.h cvs rdiff -u -r1.16 -r1.17 src/sys/arch/xen/include/i386/hypercalls.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/include/amd64/hypercalls.h diff -u src/sys/arch/xen/include/amd64/hypercalls.h:1.9 src/sys/arch/xen/include/amd64/hypercalls.h:1.10 --- src/sys/arch/xen/include/amd64/hypercalls.h:1.9 Thu Jan 24 04:11:38 2019 +++ src/sys/arch/xen/include/amd64/hypercalls.h Thu Jan 24 04:16:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: hypercalls.h,v 1.9 2019/01/24 04:11:38 cherry Exp $ */ +/* $NetBSD: hypercalls.h,v 1.10 2019/01/24 04:16:16 cherry Exp $ */ /** * hypercall.h * @@ -242,9 +242,14 @@ HYPERVISOR_update_va_mapping( } static inline int -HYPERVISOR_event_channel_op(void *op) +HYPERVISOR_event_channel_op(evtchn_op_t *op) { + KASSERT(op != NULL); +#if __XEN_INTERFACE_VERSION__ < 0x00030202 return _hypercall1(int, event_channel_op, op); +#else + return _hypercall2(int, event_channel_op, op->cmd, >u); +#endif } static inline int Index: src/sys/arch/xen/include/i386/hypercalls.h diff -u src/sys/arch/xen/include/i386/hypercalls.h:1.16 src/sys/arch/xen/include/i386/hypercalls.h:1.17 --- src/sys/arch/xen/include/i386/hypercalls.h:1.16 Thu Jul 26 17:20:08 2018 +++ src/sys/arch/xen/include/i386/hypercalls.h Thu Jan 24 04:16:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: hypercalls.h,v 1.16 2018/07/26 17:20:08 maxv Exp $ */ +/* $NetBSD: hypercalls.h,v 1.17 2019/01/24 04:16:16 cherry Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -457,14 +457,20 @@ HYPERVISOR_multicall(void *call_list, in static __inline int -HYPERVISOR_event_channel_op(void *op) +HYPERVISOR_event_channel_op(evtchn_op_t *op) { int ret; unsigned long ign1; +#if __XEN_INTERFACE_VERSION__ < 0x00030202 _hypercall(__HYPERVISOR_event_channel_op, _harg("1" (op)), _harg("=a" (ret), "=b" (ign1))); +#else +unsigned long ign2; +_hypercall(__HYPERVISOR_event_channel_op, _harg("1" (op->cmd), "2" (>u)), + _harg("=a" (ret), "=b" (ign1), "=c" (ign2))); +#endif return ret; }
CVS commit: src/sys/arch/xen/include/amd64
Module Name:src Committed By: cherry Date: Thu Jan 24 04:11:38 UTC 2019 Modified Files: src/sys/arch/xen/include/amd64: hypercalls.h Log Message: hvm_op returns a signed value. The pattern is that a hypercall which returns a value < 0 may imply an error. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/xen/include/amd64/hypercalls.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/include/amd64/hypercalls.h diff -u src/sys/arch/xen/include/amd64/hypercalls.h:1.8 src/sys/arch/xen/include/amd64/hypercalls.h:1.9 --- src/sys/arch/xen/include/amd64/hypercalls.h:1.8 Wed Dec 7 16:01:39 2011 +++ src/sys/arch/xen/include/amd64/hypercalls.h Thu Jan 24 04:11:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: hypercalls.h,v 1.8 2011/12/07 16:01:39 cegger Exp $ */ +/* $NetBSD: hypercalls.h,v 1.9 2019/01/24 04:11:38 cherry Exp $ */ /** * hypercall.h * @@ -361,11 +361,11 @@ HYPERVISOR_nmi_op( return _hypercall2(int, nmi_op, op, arg); } -static inline unsigned long +static inline long HYPERVISOR_hvm_op( int op, void *arg) { -return _hypercall2(unsigned long, hvm_op, op, arg); +return _hypercall2(long, hvm_op, op, arg); } static inline int
CVS commit: [pgoyette-compat] src/sys
Module Name:src Committed By: pgoyette Date: Thu Jan 24 04:08:10 UTC 2019 Modified Files: src/sys/arch/amd64/amd64 [pgoyette-compat]: netbsd32_machdep.c src/sys/arch/mips/mips [pgoyette-compat]: netbsd32_machdep.c src/sys/arch/sparc64/sparc64 [pgoyette-compat]: netbsd32_machdep.c src/sys/compat/linux/common [pgoyette-compat]: linux_exec_elf32.c src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32.h netbsd32_mod.c src/sys/kern [pgoyette-compat]: compat_stub.c src/sys/sys [pgoyette-compat]: compat_stub.h Log Message: Rework placement of the new netbsd32_machine32_hook To generate a diff of this commit: cvs rdiff -u -r1.115.2.17 -r1.115.2.18 \ src/sys/arch/amd64/amd64/netbsd32_machdep.c cvs rdiff -u -r1.15.2.13 -r1.15.2.14 \ src/sys/arch/mips/mips/netbsd32_machdep.c cvs rdiff -u -r1.110.14.6 -r1.110.14.7 \ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c cvs rdiff -u -r1.94.12.2 -r1.94.12.3 \ src/sys/compat/linux/common/linux_exec_elf32.c cvs rdiff -u -r1.116.2.17 -r1.116.2.18 src/sys/compat/netbsd32/netbsd32.h cvs rdiff -u -r1.13.16.17 -r1.13.16.18 src/sys/compat/netbsd32/netbsd32_mod.c cvs rdiff -u -r1.1.2.40 -r1.1.2.41 src/sys/kern/compat_stub.c cvs rdiff -u -r1.1.2.53 -r1.1.2.54 src/sys/sys/compat_stub.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.17 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.18 --- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.17 Thu Jan 24 03:27:23 2019 +++ src/sys/arch/amd64/amd64/netbsd32_machdep.c Thu Jan 24 04:08:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.115.2.17 2019/01/24 03:27:23 pgoyette Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.115.2.18 2019/01/24 04:08:09 pgoyette Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.115.2.17 2019/01/24 03:27:23 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.115.2.18 2019/01/24 04:08:09 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -969,6 +969,8 @@ netbsd32_vm_default_addr(struct proc *p, return VM_DEFAULT_ADDRESS32_BOTTOMUP(base, sz); } +extern struct netbsd32_machine32_hook_t netbsd32_machine32_hook; + static const char * netbsd32_machine32(void) { Index: src/sys/arch/mips/mips/netbsd32_machdep.c diff -u src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.13 src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.14 --- src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.13 Thu Jan 24 03:27:23 2019 +++ src/sys/arch/mips/mips/netbsd32_machdep.c Thu Jan 24 04:08:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.15.2.13 2019/01/24 03:27:23 pgoyette Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.15.2.14 2019/01/24 04:08:09 pgoyette Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.15.2.13 2019/01/24 03:27:23 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.15.2.14 2019/01/24 04:08:09 pgoyette Exp $"); #include "opt_compat_netbsd.h" #include "opt_coredump.h" @@ -308,6 +308,7 @@ cpu_coredump32(struct lwp *l, struct cor #endif struct netbsd32_sendsig_hook_t netbsd32_sendsig_hook; +extern struct netbsd32_machine32_hook_t netbsd32_machine32_hook; void netbsd32_sendsig(const ksiginfo_t *ksi, const sigset_t *mask) Index: src/sys/arch/sparc64/sparc64/netbsd32_machdep.c diff -u src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.6 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.7 --- src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.6 Thu Jan 24 03:27:24 2019 +++ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c Thu Jan 24 04:08:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.110.14.6 2019/01/24 03:27:24 pgoyette Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.110.14.7 2019/01/24 04:08:09 pgoyette Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.110.14.6 2019/01/24 03:27:24 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.110.14.7 2019/01/24 04:08:09 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -1023,6 +1023,8 @@ netbsd32_machine32(void) return machine32; } +extern struct netbsd32_machine32_hook_t netbsd32_machine32_hook; + void netbsd32_machdep_md_init(void) { Index: src/sys/compat/linux/common/linux_exec_elf32.c diff -u src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.2 src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.3 --- src/sys/compat/linux/common/linux_exec_elf32.c:1.94.12.2 Thu Jan 24 03:27:24 2019 +++
CVS commit: [pgoyette-compat] src/sys/compat/netbsd32
Module Name:src Committed By: pgoyette Date: Thu Jan 24 03:41:48 UTC 2019 Modified Files: src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_exec_elf32.c netbsd32_sysctl.c Log Message: Found a couple other consumers of machine32 - adapt them to use the hook To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.40.14.1 src/sys/compat/netbsd32/netbsd32_exec_elf32.c cvs rdiff -u -r1.38.2.1 -r1.38.2.2 src/sys/compat/netbsd32/netbsd32_sysctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_exec_elf32.c diff -u src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.40 src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.40.14.1 --- src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.40 Sat Aug 6 15:13:13 2016 +++ src/sys/compat/netbsd32/netbsd32_exec_elf32.c Thu Jan 24 03:41:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_exec_elf32.c,v 1.40 2016/08/06 15:13:13 maxv Exp $ */ +/* $NetBSD: netbsd32_exec_elf32.c,v 1.40.14.1 2019/01/24 03:41:48 pgoyette Exp $ */ /* from: NetBSD: exec_aout.c,v 1.15 1996/09/26 23:34:46 cgd Exp */ /* @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.40 2016/08/06 15:13:13 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.40.14.1 2019/01/24 03:41:48 pgoyette Exp $"); #define ELFSIZE 32 @@ -72,6 +72,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_exe #include #include #include +#include #include @@ -108,9 +109,11 @@ int ELFNAME2(netbsd32,probe_noteless)(struct lwp *l, struct exec_package *epp, void *eh, char *itp, vaddr_t *pos) { + const char *m; + if (itp && epp->ep_interp == NULL) { - extern const char machine32[]; - (void)compat_elf_check_interp(epp, itp, machine32); + MODULE_HOOK_CALL(netbsd32_machine32_hook, (), machine, m); + (void)compat_elf_check_interp(epp, itp, m); } #ifdef _LP64 epp->ep_flags |= EXEC_32 | EXEC_FORCEAUX; Index: src/sys/compat/netbsd32/netbsd32_sysctl.c diff -u src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.1 src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.2 --- src/sys/compat/netbsd32/netbsd32_sysctl.c:1.38.2.1 Mon Jun 25 07:25:48 2018 +++ src/sys/compat/netbsd32/netbsd32_sysctl.c Thu Jan 24 03:41:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_sysctl.c,v 1.38.2.1 2018/06/25 07:25:48 pgoyette Exp $ */ +/* $NetBSD: netbsd32_sysctl.c,v 1.38.2.2 2019/01/24 03:41:48 pgoyette Exp $ */ /* * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.1 2018/06/25 07:25:48 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.2 2019/01/24 03:41:48 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_ddb.h" @@ -50,6 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_sys #include #include #include +#include #include @@ -122,7 +123,7 @@ void netbsd32_sysctl_init(void) { const struct sysctlnode *_root = _sysctl_root; - extern const char machine32[]; + const char *m; sysctl_createv(_clog, 0, &_root, NULL, CTLFLAG_PERMANENT, @@ -173,7 +174,7 @@ netbsd32_sysctl_init(void) sysctl_createv(_clog, 0, &_root, NULL, CTLFLAG_PERMANENT, CTLTYPE_STRING, "machine", NULL, - NULL, 0, __UNCONST(), 0, + NULL, 0, __UNCONST(m), 0, CTL_HW, HW_MACHINE, CTL_EOL); sysctl_createv(_clog, 0, &_root, NULL, CTLFLAG_PERMANENT|CTLFLAG_READONLY,
CVS commit: [pgoyette-compat] src/sys
Module Name:src Committed By: pgoyette Date: Thu Jan 24 03:27:24 UTC 2019 Modified Files: src/sys/arch/amd64/amd64 [pgoyette-compat]: netbsd32_machdep.c src/sys/arch/mips/mips [pgoyette-compat]: netbsd32_machdep.c src/sys/arch/sparc64/sparc64 [pgoyette-compat]: netbsd32_machdep.c src/sys/compat/linux/common [pgoyette-compat]: linux_exec_elf32.c src/sys/kern [pgoyette-compat]: compat_stub.c src/sys/sys [pgoyette-compat]: compat_stub.h Log Message: Replace weak symbol definition for machine32 with a hook. Our in-kernel linker doesn't handle weak symbols, so this prevented us from loading the compat_linux32 module. XXX There don't seem to be any other consumers of machine32 (nor does XXX there seem to be any consumers of machine_arch32), even though it XXX is defined for aarch64, arm32, and riscv). To generate a diff of this commit: cvs rdiff -u -r1.115.2.16 -r1.115.2.17 \ src/sys/arch/amd64/amd64/netbsd32_machdep.c cvs rdiff -u -r1.15.2.12 -r1.15.2.13 \ src/sys/arch/mips/mips/netbsd32_machdep.c cvs rdiff -u -r1.110.14.5 -r1.110.14.6 \ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c cvs rdiff -u -r1.94.12.1 -r1.94.12.2 \ src/sys/compat/linux/common/linux_exec_elf32.c cvs rdiff -u -r1.1.2.39 -r1.1.2.40 src/sys/kern/compat_stub.c cvs rdiff -u -r1.1.2.52 -r1.1.2.53 src/sys/sys/compat_stub.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.16 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.17 --- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.115.2.16 Tue Jan 22 07:42:40 2019 +++ src/sys/arch/amd64/amd64/netbsd32_machdep.c Thu Jan 24 03:27:23 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.115.2.16 2019/01/22 07:42:40 pgoyette Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.115.2.17 2019/01/24 03:27:23 pgoyette Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.115.2.16 2019/01/22 07:42:40 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.115.2.17 2019/01/24 03:27:23 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -969,16 +969,23 @@ netbsd32_vm_default_addr(struct proc *p, return VM_DEFAULT_ADDRESS32_BOTTOMUP(base, sz); } +static const char * +netbsd32_machine32(void) +{ + + return machine32; +} + void netbsd32_machdep_md_init(void) { - /* nothing to do */ + MODULE_SET_HOOK(netbsd32_machine32_hook, "mach32", netbsd32_machine32); } void netbsd32_machdep_md_fini(void) { - /* nothing to do */ + MODULE_UNSET_HOOK(netbsd32_machine32_hook); } Index: src/sys/arch/mips/mips/netbsd32_machdep.c diff -u src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.12 src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.13 --- src/sys/arch/mips/mips/netbsd32_machdep.c:1.15.2.12 Tue Jan 22 07:42:40 2019 +++ src/sys/arch/mips/mips/netbsd32_machdep.c Thu Jan 24 03:27:23 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.15.2.12 2019/01/22 07:42:40 pgoyette Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.15.2.13 2019/01/24 03:27:23 pgoyette Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.15.2.12 2019/01/22 07:42:40 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.15.2.13 2019/01/24 03:27:23 pgoyette Exp $"); #include "opt_compat_netbsd.h" #include "opt_coredump.h" @@ -317,16 +317,25 @@ netbsd32_sendsig(const ksiginfo_t *ksi, netbsd32_sendsig_siginfo(ksi, mask)); } -void -netbsd32_machdep_md_init(void) -{ - - /* nothing to do */ -} - -void +static const char * +netbsd32_machine32(void) +{ + + return machine32; +} + +void +netbsd32_machdep_md_init(void) +{ + + MODULE_SET_HOOK(netbsd32_machine32_hook, "mach32", netbsd32_machine32); +} + +void netbsd32_machdep_md_fini(void) -{ +{ - /* nothing to do */ + MODULE_UNSET_HOOK(netbsd32_machine32_hook); } + + Index: src/sys/arch/sparc64/sparc64/netbsd32_machdep.c diff -u src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.5 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.6 --- src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.110.14.5 Tue Jan 22 07:42:40 2019 +++ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c Thu Jan 24 03:27:24 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.110.14.5 2019/01/22 07:42:40 pgoyette Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.110.14.6 2019/01/24 03:27:24 pgoyette Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.110.14.5 2019/01/22 07:42:40 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD:
CVS commit: othersrc/libexec/tnftpd/libnetbsd
Module Name:othersrc Committed By: lukem Date: Thu Jan 24 02:57:10 UTC 2019 Modified Files: othersrc/libexec/tnftpd/libnetbsd: fnmatch.c Log Message: fnmatch.c: minimise changes from NetBSD src To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 othersrc/libexec/tnftpd/libnetbsd/fnmatch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/libnetbsd/fnmatch.c diff -u othersrc/libexec/tnftpd/libnetbsd/fnmatch.c:1.4 othersrc/libexec/tnftpd/libnetbsd/fnmatch.c:1.5 --- othersrc/libexec/tnftpd/libnetbsd/fnmatch.c:1.4 Wed Jan 23 05:13:48 2019 +++ othersrc/libexec/tnftpd/libnetbsd/fnmatch.c Thu Jan 24 02:57:10 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: fnmatch.c,v 1.4 2019/01/23 05:13:48 lukem Exp $ */ +/* $NetBSD: fnmatch.c,v 1.5 2019/01/24 02:57:10 lukem Exp $ */ /* from NetBSD: fnmatch.c,v 1.26 2014/10/12 22:32:33 christos Exp */ /* @@ -35,11 +35,35 @@ #include "tnftpd.h" +#if 0 + +#include +#if defined(LIBC_SCCS) && !defined(lint) +#if 0 +static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94"; +#else +__RCSID("$NetBSD: fnmatch.c,v 1.5 2019/01/24 02:57:10 lukem Exp $"); +#endif +#endif /* LIBC_SCCS and not lint */ + /* * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6. * Compares a filename or pathname to a pattern. */ +#include "namespace.h" + +#include +#include +#include +#include + +#ifdef __weak_alias +__weak_alias(fnmatch,_fnmatch) +#endif + +#endif + #define EOS '\0' static inline int @@ -59,6 +83,8 @@ rangematch(const char *pattern, int test int negate, ok, need; char c, c2; + _DIAGASSERT(pattern != NULL); + /* * A bracket expression starting with an unquoted circumflex * character produces unspecified results (IEEE 1003.2-1992, @@ -101,6 +127,9 @@ fnmatchx(const char *pattern, const char const char *stringstart, *r; char c, test; + _DIAGASSERT(pattern != NULL); + _DIAGASSERT(string != NULL); + if (recursion-- == 0) return FNM_NORES;
CVS commit: othersrc/libexec/tnftpd/libnetbsd
Module Name:othersrc Committed By: lukem Date: Thu Jan 24 02:52:48 UTC 2019 Modified Files: othersrc/libexec/tnftpd/libnetbsd: ftpfts.h fts_open.c Log Message: sync to fts.c 1.49, fts.h 1.19 Update from NetBSD src/lib/libc/gen/fts.c 1.38 to 1.49. Update from NetBSD src/include/fts.h 1.18 to 1.19. Notable changes: - Minimize changes from upstream NetBSD methods. - Bump fts_level from short to int to avoid a potential DoS. - Make sure fts_statp is NULL when FTS_NOSTAT is set. - Use [non-standard] O_CLOEXEC instead of fcntl(FD_CLOEXEC). - Avoid potential integer overflow. - Fix double free in fts_read()/fts_close(). - Use calloc(1, ...) instead of malloc(...) & memset. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 othersrc/libexec/tnftpd/libnetbsd/ftpfts.h cvs rdiff -u -r1.12 -r1.13 othersrc/libexec/tnftpd/libnetbsd/fts_open.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/libnetbsd/ftpfts.h diff -u othersrc/libexec/tnftpd/libnetbsd/ftpfts.h:1.8 othersrc/libexec/tnftpd/libnetbsd/ftpfts.h:1.9 --- othersrc/libexec/tnftpd/libnetbsd/ftpfts.h:1.8 Sun Mar 1 02:50:11 2009 +++ othersrc/libexec/tnftpd/libnetbsd/ftpfts.h Thu Jan 24 02:52:48 2019 @@ -1,5 +1,5 @@ -/* $NetBSD: ftpfts.h,v 1.8 2009/03/01 02:50:11 lukem Exp $ */ -/* from NetBSD: fts.h,v 1.18 2009/01/11 03:04:12 christos Exp */ +/* $NetBSD: ftpfts.h,v 1.9 2019/01/24 02:52:48 lukem Exp $ */ +/* from NetBSD: fts.h,v 1.19 2009/08/16 19:33:38 christos Exp */ /* * Copyright (c) 1989, 1993 @@ -53,6 +53,9 @@ #ifndef __fts_dev_t #define __fts_dev_t dev_t #endif +#ifndef __fts_level_t +#define __fts_level_t int +#endif typedef struct { struct _ftsent *fts_cur; /* current node */ @@ -64,7 +67,7 @@ typedef struct { unsigned int fts_pathlen; /* sizeof(path) */ unsigned int fts_nitems; /* elements in the sort array */ int (*fts_compar) /* compare function */ - (const struct _ftsent **, const struct _ftsent **); + (const struct _ftsent **, const struct _ftsent **); #define FTS_COMFOLLOW 0x001 /* follow command line symlinks */ #define FTS_LOGICAL 0x002 /* logical walk */ @@ -100,7 +103,7 @@ typedef struct _ftsent { #define FTS_ROOTPARENTLEVEL -1 #define FTS_ROOTLEVEL 0 - short fts_level; /* depth (-1 to N) */ + __fts_level_t fts_level; /* depth (-1 to N) */ #define FTS_D 1 /* preorder directory */ #define FTS_DC 2 /* directory that causes cycles */ Index: othersrc/libexec/tnftpd/libnetbsd/fts_open.c diff -u othersrc/libexec/tnftpd/libnetbsd/fts_open.c:1.12 othersrc/libexec/tnftpd/libnetbsd/fts_open.c:1.13 --- othersrc/libexec/tnftpd/libnetbsd/fts_open.c:1.12 Sun Mar 1 03:23:00 2009 +++ othersrc/libexec/tnftpd/libnetbsd/fts_open.c Thu Jan 24 02:52:48 2019 @@ -1,5 +1,5 @@ -/* $NetBSD: fts_open.c,v 1.12 2009/03/01 03:23:00 lukem Exp $ */ -/* from NetBSD: fts.c,v 1.38 2009/02/28 14:34:18 pgoyette Exp */ +/* $NetBSD: fts_open.c,v 1.13 2019/01/24 02:52:48 lukem Exp $ */ +/* from NetBSD: fts.c,v 1.49 2016/05/31 07:49:09 pgoyette Exp */ /*- * Copyright (c) 1990, 1993, 1994 @@ -32,6 +32,40 @@ #include "tnftpd.h" +#if 0 + +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#include +#if defined(LIBC_SCCS) && !defined(lint) +#if 0 +static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; +#else +__RCSID("$NetBSD: fts_open.c,v 1.13 2019/01/24 02:52:48 lukem Exp $"); +#endif +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#if ! HAVE_NBTOOL_CONFIG_H +#define HAVE_STRUCT_DIRENT_D_NAMLEN +#endif + +#endif + static FTSENT *fts_alloc(FTS *, const char *, size_t); static FTSENT *fts_build(FTS *, int); static void fts_free(FTSENT *); @@ -42,9 +76,9 @@ static size_t fts_pow2(size_t); static int fts_palloc(FTS *, size_t); static void fts_padjust(FTS *, FTSENT *); static FTSENT *fts_sort(FTS *, FTSENT *, size_t); -static unsigned short fts_stat(FTS *, FTSENT *, int); +static unsigned short fts_stat(FTS *, FTSENT *, int); static int fts_safe_changedir(const FTS *, const FTSENT *, int, - const char *); +const char *); #if defined(ALIGNBYTES) && defined(ALIGN) #define FTS_ALLOC_ALIGNED 1 @@ -52,6 +86,23 @@ static int fts_safe_changedir(const FTS #undef FTS_ALLOC_ALIGNED #endif +#ifndef ftsent_namelen_truncate +#define ftsent_namelen_truncate(a) \ +((a) > UINT_MAX ? UINT_MAX : (unsigned int)(a)) +#endif +#ifndef ftsent_pathlen_truncate +#define ftsent_pathlen_truncate(a) \ +((a) > UINT_MAX ? UINT_MAX : (unsigned int)(a)) +#endif +#ifndef fts_pathlen_truncate +#define fts_pathlen_truncate(a) \ +((a) > UINT_MAX ? UINT_MAX : (unsigned int)(a)) +#endif +#ifndef fts_nitems_truncate +#define fts_nitems_truncate(a) \ +((a) > UINT_MAX ? UINT_MAX : (unsigned int)(a)) +#endif + #define ISDOT(a) (a[0]
CVS commit: [pgoyette-compat] src/sys/dev/raidframe
Module Name:src Committed By: pgoyette Date: Thu Jan 24 02:09:56 UTC 2019 Modified Files: src/sys/dev/raidframe [pgoyette-compat]: rf_compat80.c Log Message: Need sys/module.h here To generate a diff of this commit: cvs rdiff -u -r1.2.2.7 -r1.2.2.8 src/sys/dev/raidframe/rf_compat80.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_compat80.c diff -u src/sys/dev/raidframe/rf_compat80.c:1.2.2.7 src/sys/dev/raidframe/rf_compat80.c:1.2.2.8 --- src/sys/dev/raidframe/rf_compat80.c:1.2.2.7 Thu Jan 24 02:06:34 2019 +++ src/sys/dev/raidframe/rf_compat80.c Thu Jan 24 02:09:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_compat80.c,v 1.2.2.7 2019/01/24 02:06:34 pgoyette Exp $ */ +/* $NetBSD: rf_compat80.c,v 1.2.2.8 2019/01/24 02:09:56 pgoyette Exp $ */ /* * Copyright (c) 2017 Matthew R. Green @@ -31,6 +31,7 @@ #include #include #include +#include #include
CVS commit: [pgoyette-compat] src/sys
Module Name:src Committed By: pgoyette Date: Thu Jan 24 02:06:35 UTC 2019 Modified Files: src/sys/dev/raidframe [pgoyette-compat]: rf_compat50.c rf_compat80.c src/sys/modules/compat_raid_50 [pgoyette-compat]: Makefile src/sys/modules/compat_raid_80 [pgoyette-compat]: Makefile Removed Files: src/sys/compat/common [pgoyette-compat]: compat_raid_50.c compat_raid_80.c Log Message: The raidframe compat code lives in sys/dev/raidframe/ so move all the module stuff there. Update the Makefiles appropriately. To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r0 src/sys/compat/common/compat_raid_50.c cvs rdiff -u -r1.1.2.1 -r0 src/sys/compat/common/compat_raid_80.c cvs rdiff -u -r1.3.2.8 -r1.3.2.9 src/sys/dev/raidframe/rf_compat50.c cvs rdiff -u -r1.2.2.6 -r1.2.2.7 src/sys/dev/raidframe/rf_compat80.c cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/modules/compat_raid_50/Makefile cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/modules/compat_raid_80/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_compat50.c diff -u src/sys/dev/raidframe/rf_compat50.c:1.3.2.8 src/sys/dev/raidframe/rf_compat50.c:1.3.2.9 --- src/sys/dev/raidframe/rf_compat50.c:1.3.2.8 Wed Jan 23 09:33:47 2019 +++ src/sys/dev/raidframe/rf_compat50.c Thu Jan 24 02:06:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_compat50.c,v 1.3.2.8 2019/01/23 09:33:47 pgoyette Exp $ */ +/* $NetBSD: rf_compat50.c,v 1.3.2.9 2019/01/24 02:06:34 pgoyette Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -254,10 +254,10 @@ raidframe_50_fini(void) MODULE_UNSET_HOOK(raidframe50_ioctl_hook); } -MODULE(MODULE_CLASS_EXEC, raid_50, "raid,compat_50"); +MODULE(MODULE_CLASS_EXEC, compat_raid_50, "raid,compat_50,compat_raid_80"); static int -raid_50_modcmd(modcmd_t cmd, void *arg) +compat_raid_50_modcmd(modcmd_t cmd, void *arg) { switch (cmd) { Index: src/sys/dev/raidframe/rf_compat80.c diff -u src/sys/dev/raidframe/rf_compat80.c:1.2.2.6 src/sys/dev/raidframe/rf_compat80.c:1.2.2.7 --- src/sys/dev/raidframe/rf_compat80.c:1.2.2.6 Wed Jan 23 20:19:47 2019 +++ src/sys/dev/raidframe/rf_compat80.c Thu Jan 24 02:06:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_compat80.c,v 1.2.2.6 2019/01/23 20:19:47 pgoyette Exp $ */ +/* $NetBSD: rf_compat80.c,v 1.2.2.7 2019/01/24 02:06:34 pgoyette Exp $ */ /* * Copyright (c) 2017 Matthew R. Green @@ -277,3 +277,21 @@ raidframe_80_fini(void) MODULE_UNSET_HOOK(raidframe80_ioctl_hook); } + +MODULE(MODULE_CLASS_EXEC, compat_raid_80, "raid,compat_80"); + +static int +compat_raid_80_modcmd(modcmd_t cmd, void *arg) +{ + + switch (cmd) { + case MODULE_CMD_INIT: + raidframe_80_init(); + return 0; + case MODULE_CMD_FINI: + raidframe_80_fini(); + return 0; + default: + return ENOTTY; + } +} Index: src/sys/modules/compat_raid_50/Makefile diff -u src/sys/modules/compat_raid_50/Makefile:1.1.2.2 src/sys/modules/compat_raid_50/Makefile:1.1.2.3 --- src/sys/modules/compat_raid_50/Makefile:1.1.2.2 Sun Sep 23 01:33:26 2018 +++ src/sys/modules/compat_raid_50/Makefile Thu Jan 24 02:06:35 2019 @@ -1,9 +1,7 @@ -# $NetBSD: Makefile,v 1.1.2.2 2018/09/23 01:33:26 pgoyette Exp $ +# $NetBSD: Makefile,v 1.1.2.3 2019/01/24 02:06:35 pgoyette Exp $ .include "../Makefile.inc" -.PATH: ${S}/compat/common - KMOD= compat_raid_50 .PATH: ${S}/dev/raidframe Index: src/sys/modules/compat_raid_80/Makefile diff -u src/sys/modules/compat_raid_80/Makefile:1.1.2.2 src/sys/modules/compat_raid_80/Makefile:1.1.2.3 --- src/sys/modules/compat_raid_80/Makefile:1.1.2.2 Thu Oct 4 01:55:17 2018 +++ src/sys/modules/compat_raid_80/Makefile Thu Jan 24 02:06:35 2019 @@ -1,11 +1,8 @@ -# $NetBSD: Makefile,v 1.1.2.2 2018/10/04 01:55:17 pgoyette Exp $ +# $NetBSD: Makefile,v 1.1.2.3 2019/01/24 02:06:35 pgoyette Exp $ .include "../Makefile.inc" -.PATH: ${S}/compat/common - -KMOD= compat_raid_80 - +KMOD= compat_raid_80 CPPFLAGS+= -DCOMPAT_80 .PATH: ${S}/dev/raidframe
CVS commit: [pgoyette-compat] src/sys/compat/linux/common
Module Name:src Committed By: pgoyette Date: Thu Jan 24 02:05:16 UTC 2019 Modified Files: src/sys/compat/linux/common [pgoyette-compat]: linux_mod.c Log Message: Reduce the list of required modules to what is really needed To generate a diff of this commit: cvs rdiff -u -r1.10.2.3 -r1.10.2.4 src/sys/compat/linux/common/linux_mod.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/common/linux_mod.c diff -u src/sys/compat/linux/common/linux_mod.c:1.10.2.3 src/sys/compat/linux/common/linux_mod.c:1.10.2.4 --- src/sys/compat/linux/common/linux_mod.c:1.10.2.3 Thu Oct 18 22:09:56 2018 +++ src/sys/compat/linux/common/linux_mod.c Thu Jan 24 02:05:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_mod.c,v 1.10.2.3 2018/10/18 22:09:56 pgoyette Exp $ */ +/* $NetBSD: linux_mod.c,v 1.10.2.4 2019/01/24 02:05:16 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.10.2.3 2018/10/18 22:09:56 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.10.2.4 2019/01/24 02:05:16 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_execfmt.h" @@ -67,7 +67,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_mod.c, #endif #define REQ1"compat_ossaudio,sysv_ipc,compat_util" -#define REQ2",compat_12,compat_30,compat_50,compat_43,compat_sysv_50" +#define REQ2",compat_50,compat_43" MODULE(MODULE_CLASS_EXEC, compat_linux, REQ1 REQ2 MD1 MD2 MD3);
CVS commit: [pgoyette-compat] src/sys/arch/amd64/conf
Module Name:src Committed By: pgoyette Date: Thu Jan 24 00:26:32 UTC 2019 Modified Files: src/sys/arch/amd64/conf [pgoyette-compat]: NOCOMPAT Log Message: Disable more COMPAT_xx stuff for the NOCOMPAT config cvs: -- To generate a diff of this commit: cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/arch/amd64/conf/NOCOMPAT Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/NOCOMPAT diff -u src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.8 src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.9 --- src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.8 Tue Jan 22 21:24:01 2019 +++ src/sys/arch/amd64/conf/NOCOMPAT Thu Jan 24 00:26:32 2019 @@ -1,18 +1,19 @@ include "arch/amd64/conf/GENERIC" -#ident "NOCOMPAT-$Revision: 1.1.2.8 $" +#ident "NOCOMPAT-$Revision: 1.1.2.9 $" no options SYSVMSG # System V-like message queues no options SYSVSEM # System V-like semaphores no options SYSVSHM # System V-like memory sharing - + +no options COMPAT_43 +no options COMPAT_44 +no options COMPAT_BSDPTY + # We only to use ``no options COMPAT_15'' because only COMPAT_15 is # explicitly enabled. (The others are pulled in by statements in # sys/conf/files) -#no options COMPAT_43 -#no options COMPAT_44 -#no options COMPAT_BSDPTY #no options COMPAT_09 #no options COMPAT_10 #no options COMPAT_11
CVS commit: src/sys/arch/iyonix
Module Name:src Committed By: macallan Date: Wed Jan 23 22:13:01 UTC 2019 Modified Files: src/sys/arch/iyonix/conf: std.iyonix src/sys/arch/iyonix/include: pci_machdep.h src/sys/arch/iyonix/iyonix: iyonix_pci.c Log Message: get rid of homegrown pci_conf_hook(), use the mechanism from arm32_pci_chipset instead less difference to evbarm To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/iyonix/conf/std.iyonix cvs rdiff -u -r1.2 -r1.3 src/sys/arch/iyonix/include/pci_machdep.h cvs rdiff -u -r1.9 -r1.10 src/sys/arch/iyonix/iyonix/iyonix_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/iyonix/conf/std.iyonix diff -u src/sys/arch/iyonix/conf/std.iyonix:1.7 src/sys/arch/iyonix/conf/std.iyonix:1.8 --- src/sys/arch/iyonix/conf/std.iyonix:1.7 Wed Jan 17 20:30:17 2018 +++ src/sys/arch/iyonix/conf/std.iyonix Wed Jan 23 22:13:01 2019 @@ -1,4 +1,4 @@ -# $NetBSD: std.iyonix,v 1.7 2018/01/17 20:30:17 skrll Exp $ +# $NetBSD: std.iyonix,v 1.8 2019/01/23 22:13:01 macallan Exp $ # # standard NetBSD/iyonix for GENERIC options @@ -18,3 +18,5 @@ options ARM_INTR_IMPL=" -#define __HAVE_PCI_CONF_HOOK -int pci_conf_hook(void *, int, int, int, pcireg_t); - Index: src/sys/arch/iyonix/iyonix/iyonix_pci.c diff -u src/sys/arch/iyonix/iyonix/iyonix_pci.c:1.9 src/sys/arch/iyonix/iyonix/iyonix_pci.c:1.10 --- src/sys/arch/iyonix/iyonix/iyonix_pci.c:1.9 Sun Nov 18 14:12:28 2018 +++ src/sys/arch/iyonix/iyonix/iyonix_pci.c Wed Jan 23 22:13:01 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: iyonix_pci.c,v 1.9 2018/11/18 14:12:28 jmcneill Exp $ */ +/* $NetBSD: iyonix_pci.c,v 1.10 2019/01/23 22:13:01 macallan Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: iyonix_pci.c,v 1.9 2018/11/18 14:12:28 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iyonix_pci.c,v 1.10 2019/01/23 22:13:01 macallan Exp $"); #include #include @@ -70,6 +70,7 @@ void *iyonix_pci_intr_establish(void *, void iyonix_pci_intr_disestablish(void *, void *); void pci_conf_write_byte(pci_chipset_tag_t, pcitag_t, int, int); int pci_conf_read_byte(pci_chipset_tag_t, pcitag_t, int); +int iyonix_pci_conf_hook(void *, int, int, int, pcireg_t); void iyonix_pci_init(pci_chipset_tag_t pc, void *cookie) @@ -81,6 +82,7 @@ iyonix_pci_init(pci_chipset_tag_t pc, vo pc->pc_intr_evcnt = iyonix_pci_intr_evcnt; pc->pc_intr_establish = iyonix_pci_intr_establish; pc->pc_intr_disestablish = iyonix_pci_intr_disestablish; + pc->pc_conf_hook = iyonix_pci_conf_hook; } int @@ -182,7 +184,7 @@ pci_conf_read_byte(pci_chipset_tag_t pc, } int -pci_conf_hook(void *v, int bus, int dev, int func, pcireg_t id) +iyonix_pci_conf_hook(void *v, int bus, int dev, int func, pcireg_t id) { /*
CVS commit: src/usr.sbin/rpcbind
Module Name:src Committed By: christos Date: Wed Jan 23 20:46:18 UTC 2019 Modified Files: src/usr.sbin/rpcbind: util.c Log Message: - fix wrong size allocation that triggers buffer overflow - remove unneeded casts and assertions XXX: pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/rpcbind/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/rpcbind/util.c diff -u src/usr.sbin/rpcbind/util.c:1.22 src/usr.sbin/rpcbind/util.c:1.23 --- src/usr.sbin/rpcbind/util.c:1.22 Thu Jan 3 14:04:21 2019 +++ src/usr.sbin/rpcbind/util.c Wed Jan 23 15:46:18 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.22 2019/01/03 19:04:21 christos Exp $ */ +/* $NetBSD: util.c,v 1.23 2019/01/23 20:46:18 christos Exp $ */ /* $FreeBSD: head/usr.sbin/rpcbind/util.c 300973 2016-05-29 20:28:01Z ngie $ */ /*- @@ -130,14 +130,14 @@ addrmerge(struct netbuf *caller, char *s if (serv_nbp == NULL) return NULL; - serv_sa = (struct sockaddr *)serv_nbp->buf; + serv_sa = serv_nbp->buf; if (clnt_uaddr != NULL) { clnt_nbp = uaddr2taddr(nconf, clnt_uaddr); if (clnt_nbp == NULL) { free(serv_nbp); return NULL; } - clnt_sa = (struct sockaddr *)clnt_nbp->buf; + clnt_sa = clnt_nbp->buf; if (clnt_sa->sa_family == AF_LOCAL) { free(serv_nbp); free(clnt_nbp); @@ -145,7 +145,7 @@ addrmerge(struct netbuf *caller, char *s return strdup(serv_uaddr); } } else { - clnt_sa = malloc(sizeof(*clnt_sa)); + clnt_sa = malloc(clnt->sa_len); if (clnt_sa == NULL) { free(serv_nbp); return NULL; @@ -267,7 +267,6 @@ found: break; #ifdef INET6 case AF_INET6: - assert(newsin6); memcpy(newsin6, ifsin6, clnt_sa->sa_len); newsin6->sin6_port = servsin6->sin6_port; tbuf.maxlen = sizeof (struct sockaddr_storage);
CVS commit: [pgoyette-compat] src/sys/dev/raidframe
Module Name:src Committed By: pgoyette Date: Wed Jan 23 20:19:47 UTC 2019 Modified Files: src/sys/dev/raidframe [pgoyette-compat]: rf_compat80.c Log Message: Another missing semicolon. gr. To generate a diff of this commit: cvs rdiff -u -r1.2.2.5 -r1.2.2.6 src/sys/dev/raidframe/rf_compat80.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_compat80.c diff -u src/sys/dev/raidframe/rf_compat80.c:1.2.2.5 src/sys/dev/raidframe/rf_compat80.c:1.2.2.6 --- src/sys/dev/raidframe/rf_compat80.c:1.2.2.5 Wed Jan 23 03:34:14 2019 +++ src/sys/dev/raidframe/rf_compat80.c Wed Jan 23 20:19:47 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_compat80.c,v 1.2.2.5 2019/01/23 03:34:14 pgoyette Exp $ */ +/* $NetBSD: rf_compat80.c,v 1.2.2.6 2019/01/23 20:19:47 pgoyette Exp $ */ /* * Copyright (c) 2017 Matthew R. Green @@ -275,5 +275,5 @@ void raidframe_80_fini(void) { - MODULE_UNSET_HOOK(raidframe80_ioctl_hook) + MODULE_UNSET_HOOK(raidframe80_ioctl_hook); }
CVS commit: src/lib/libperfuse
Module Name:src Committed By: uwe Date: Wed Jan 23 19:43:49 UTC 2019 Modified Files: src/lib/libperfuse: libperfuse.3 Log Message: It's section 3 page, not section 2. While here, xref puffs(3) in the SEE ALSO section too. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libperfuse/libperfuse.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libperfuse/libperfuse.3 diff -u src/lib/libperfuse/libperfuse.3:1.5 src/lib/libperfuse/libperfuse.3:1.6 --- src/lib/libperfuse/libperfuse.3:1.5 Tue Oct 18 22:26:13 2016 +++ src/lib/libperfuse/libperfuse.3 Wed Jan 23 19:43:49 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: libperfuse.3,v 1.5 2016/10/18 22:26:13 wiz Exp $ +.\" $NetBSD: libperfuse.3,v 1.6 2019/01/23 19:43:49 uwe Exp $ .\" .\" Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved. .\" @@ -23,8 +23,8 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 12, 2010 -.Dt LIBPERFUSE 2 +.Dd January 23, 2019 +.Dt LIBPERFUSE 3 .Os .Sh NAME .Nm perfuse_mount , @@ -130,6 +130,7 @@ bytes, which is enough to queue 16 FUSE .Xr df 1 , .Xr mount 2 , .Xr open 2 , +.Xr puffs 3 , .Xr mount 8 , .Xr perfused 8 .Sh AUTHORS
CVS commit: src/sys/external/bsd/drm2/drm
Module Name:src Committed By: jmcneill Date: Wed Jan 23 19:02:49 UTC 2019 Modified Files: src/sys/external/bsd/drm2/drm: drm_cache.c Log Message: skip clflush on aarch64, too To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/external/bsd/drm2/drm/drm_cache.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/drm/drm_cache.c diff -u src/sys/external/bsd/drm2/drm/drm_cache.c:1.12 src/sys/external/bsd/drm2/drm/drm_cache.c:1.13 --- src/sys/external/bsd/drm2/drm/drm_cache.c:1.12 Mon Aug 27 15:29:19 2018 +++ src/sys/external/bsd/drm2/drm/drm_cache.c Wed Jan 23 19:02:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_cache.c,v 1.12 2018/08/27 15:29:19 riastradh Exp $ */ +/* $NetBSD: drm_cache.c,v 1.13 2019/01/23 19:02:49 jmcneill Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: drm_cache.c,v 1.12 2018/08/27 15:29:19 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drm_cache.c,v 1.13 2019/01/23 19:02:49 jmcneill Exp $"); #include #include @@ -42,7 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: drm_cache.c, #include -#if !defined(__arm__) +#if !defined(__arm__) && !defined(__aarch64__) #define DRM_CLFLUSH 1 #endif
CVS commit: src/tests/lib
Module Name:src Committed By: martin Date: Wed Jan 23 17:36:01 UTC 2019 Modified Files: src/tests/lib/libc/gen: t_fpsetmask.c t_siginfo.c src/tests/lib/libm: t_fenv.c Log Message: There are aarch64 Cortex cpus that do not trap on some floating point exceptions - so apply the arm handling for aarch64 as well. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/tests/lib/libc/gen/t_fpsetmask.c cvs rdiff -u -r1.32 -r1.33 src/tests/lib/libc/gen/t_siginfo.c cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libm/t_fenv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/gen/t_fpsetmask.c diff -u src/tests/lib/libc/gen/t_fpsetmask.c:1.17 src/tests/lib/libc/gen/t_fpsetmask.c:1.18 --- src/tests/lib/libc/gen/t_fpsetmask.c:1.17 Sun Dec 16 02:18:01 2018 +++ src/tests/lib/libc/gen/t_fpsetmask.c Wed Jan 23 17:36:01 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fpsetmask.c,v 1.17 2018/12/16 02:18:01 sevan Exp $ */ +/* $NetBSD: t_fpsetmask.c,v 1.18 2019/01/23 17:36:01 martin Exp $ */ /*- * Copyright (c) 1995 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ ATF_TC_BODY(no_test, tc) #include -#if __arm__ && !__SOFTFP__ +#if (__arm__ && !__SOFTFP__) || __aarch64__ /* * Some NEON fpus do not implement IEEE exception handling, * skip these tests if running on them and compiled for Index: src/tests/lib/libc/gen/t_siginfo.c diff -u src/tests/lib/libc/gen/t_siginfo.c:1.32 src/tests/lib/libc/gen/t_siginfo.c:1.33 --- src/tests/lib/libc/gen/t_siginfo.c:1.32 Wed Jan 17 00:16:43 2018 +++ src/tests/lib/libc/gen/t_siginfo.c Wed Jan 23 17:36:01 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_siginfo.c,v 1.32 2018/01/17 00:16:43 maya Exp $ */ +/* $NetBSD: t_siginfo.c,v 1.33 2019/01/23 17:36:01 martin Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -309,7 +309,7 @@ ATF_TC_BODY(sigfpe_flt, tc) if (isQEMU()) atf_tc_skip("Test does not run correctly under QEMU"); -#if defined(__arm__) && !__SOFTFP__ +#if (__arm__ && !__SOFTFP__) || __aarch64__ /* * Some NEON fpus do not implement IEEE exception handling, * skip these tests if running on them and compiled for Index: src/tests/lib/libm/t_fenv.c diff -u src/tests/lib/libm/t_fenv.c:1.3 src/tests/lib/libm/t_fenv.c:1.4 --- src/tests/lib/libm/t_fenv.c:1.3 Tue Dec 22 14:20:59 2015 +++ src/tests/lib/libm/t_fenv.c Wed Jan 23 17:36:01 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fenv.c,v 1.3 2015/12/22 14:20:59 christos Exp $ */ +/* $NetBSD: t_fenv.c,v 1.4 2019/01/23 17:36:01 martin Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fenv.c,v 1.3 2015/12/22 14:20:59 christos Exp $"); +__RCSID("$NetBSD: t_fenv.c,v 1.4 2019/01/23 17:36:01 martin Exp $"); #include @@ -40,7 +40,7 @@ __RCSID("$NetBSD: t_fenv.c,v 1.3 2015/12 #include -#if __arm__ && !__SOFTFP__ +#if (__arm__ && !__SOFTFP__) || __aarch64__ /* * Some NEON fpus do not implement IEEE exception handling, * skip these tests if running on them and compiled for
CVS commit: xsrc/external/mit
Module Name:xsrc Committed By: christos Date: Wed Jan 23 16:57:01 UTC 2019 Modified Files: xsrc/external/mit/xorg-server/dist/randr: randrstr.h xsrc/external/mit/xorgproto/dist/include/X11/extensions: randrproto.h Log Message: Avoid dup inconsistent definitions. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xorg-server/dist/randr/randrstr.h cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/xorgproto/dist/include/X11/extensions/randrproto.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/randr/randrstr.h diff -u xsrc/external/mit/xorg-server/dist/randr/randrstr.h:1.5 xsrc/external/mit/xorg-server/dist/randr/randrstr.h:1.6 --- xsrc/external/mit/xorg-server/dist/randr/randrstr.h:1.5 Mon Dec 31 04:50:02 2018 +++ xsrc/external/mit/xorg-server/dist/randr/randrstr.h Wed Jan 23 11:57:01 2019 @@ -59,11 +59,15 @@ #define RANDR_INTERFACE_VERSION 0x0104 -typedef XID RRMode; -typedef XID RROutput; -typedef XID RRCrtc; -typedef XID RRProvider; -typedef XID RRLease; +/* All also defined in */ +#ifndef RROutput +#define RROutput CARD32 +#define RRMode CARD32 +#define RRCrtc CARD32 +#define RRProvider CARD32 +#define RRModeFlags CARD32 +#define RRLease CARD32 +#endif extern int RREventBase, RRErrorBase; Index: xsrc/external/mit/xorgproto/dist/include/X11/extensions/randrproto.h diff -u xsrc/external/mit/xorgproto/dist/include/X11/extensions/randrproto.h:1.1.1.1 xsrc/external/mit/xorgproto/dist/include/X11/extensions/randrproto.h:1.2 --- xsrc/external/mit/xorgproto/dist/include/X11/extensions/randrproto.h:1.1.1.1 Wed Mar 14 03:25:46 2018 +++ xsrc/external/mit/xorgproto/dist/include/X11/extensions/randrproto.h Wed Jan 23 11:57:01 2019 @@ -45,12 +45,16 @@ #define Time CARD32 #define KeyCode CARD8 #define KeySym CARD32 + +/* All also defined in */ +#ifndef RROutput #define RROutput CARD32 #define RRMode CARD32 #define RRCrtc CARD32 #define RRProvider CARD32 #define RRModeFlags CARD32 #define RRLease CARD32 +#endif #define Rotation CARD16 #define SizeID CARD16
CVS commit: src/share/misc
Module Name:src Committed By: dholland Date: Wed Jan 23 16:22:15 UTC 2019 Modified Files: src/share/misc: acronyms.comp Log Message: Some acronyms related to SIM cards; PR 53901 from Nikolai Lifanov. To generate a diff of this commit: cvs rdiff -u -r1.225 -r1.226 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.225 src/share/misc/acronyms.comp:1.226 --- src/share/misc/acronyms.comp:1.225 Tue Jan 22 01:32:30 2019 +++ src/share/misc/acronyms.comp Wed Jan 23 16:22:14 2019 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.225 2019/01/22 01:32:30 htodd Exp $ +$NetBSD: acronyms.comp,v 1.226 2019/01/23 16:22:14 dholland Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -667,6 +667,7 @@ IMC integrated memory controller IMCR interrupt mode configuration register IMR interrupt mask register IMS information management system +IMSI international mobile subscriber identity INCITS InterNational Committee for Information Technology Standards IO input/output IOCTL input/output control @@ -1135,6 +1136,7 @@ PTLA pseudo top level aggregator PTP page table page PTV perceived target value PU processing unit +PUC personal unblocking code PUN physical unit number PV physical volume PVG physical volume group @@ -1302,6 +1304,7 @@ SIDH supersingular isogeny Diffie-Hellma SIEM security information and event management SIF source input format SIFS short inter-frame space +SIM subscriber identity module SIMD single instruction, multiple data SIMM single inline memory module SIP Session Initiation Protocol @@ -1490,6 +1493,7 @@ UFS Unix File System UGA universal graphics adapter UI unit interval UI user interface +UICC universal integrated circuit card UID unique identifier UID user identifier UL upload
CVS commit: src/sys/arch/acorn32/stand/boot32
Module Name:src Committed By: sborrill Date: Wed Jan 23 14:52:49 UTC 2019 Modified Files: src/sys/arch/acorn32/stand/boot32: boot32.c Log Message: Don't call OS_ReadSysInfo Platform class call on RISC OS 3 To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/acorn32/stand/boot32/boot32.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/acorn32/stand/boot32/boot32.c diff -u src/sys/arch/acorn32/stand/boot32/boot32.c:1.45 src/sys/arch/acorn32/stand/boot32/boot32.c:1.46 --- src/sys/arch/acorn32/stand/boot32/boot32.c:1.45 Tue Oct 30 20:23:29 2018 +++ src/sys/arch/acorn32/stand/boot32/boot32.c Wed Jan 23 14:52:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: boot32.c,v 1.45 2018/10/30 20:23:29 christos Exp $ */ +/* $NetBSD: boot32.c,v 1.46 2019/01/23 14:52:49 sborrill Exp $ */ /*- * Copyright (c) 2002 Reinoud Zandijk @@ -760,17 +760,57 @@ create_configuration(int argc, char **ar } } +int get_riscos_ver(void); + +#define ModuleName_UtilityModule "UtilityModule" + +int +get_riscos_ver(void) +{ + int module, section; + os_error *e; + char *name; + int version; + + version = 0; + /* Full enumeration */ + module = 0; + section = -1; + do { + e = xosmodule_enumeratewithversion(, , , + NULL, NULL, ); + if (!strncmp(name, ModuleName_UtilityModule, + sizeof (ModuleName_UtilityModule))) { + return version; + } + } while (e == NULL && section == -1); + return 0; +} + int main(int, char **); int main(int argc, char **argv) { int howto, start_args, ret; + int riscosver; int class; + riscosver = get_riscos_ver(); + /* + * RISC OS version is in BCD + * Top 16 bits = major version + * Bottom 16 bits = fractional part + * e.g. 3.71 = 0x00037100 + */ + printf("\n\n"); printf(">> %s, Revision %s\n", bootprog_name, bootprog_rev); printf(">> Booting NetBSD/acorn32 on a RiscPC/A7000/NC\n"); + printf(">> RISC OS version: %d.%d%d\n", + (riscosver >> 16) & 0xff, + (riscosver >> 12) & 0xf, + (riscosver >> 8) & 0xf); printf("\n"); process_args(argc, argv, , booted_file, _args); @@ -855,9 +895,19 @@ main(int argc, char **argv) /* dismount all filesystems */ xosfscontrol_shutdown(); - os_readsysinfo_platform_class(, NULL, NULL); - if (class != osreadsysinfo_Platform_Pace) { - /* reset devices, well they try to anyway */ + /* + * OS_ReadSysInfo Platform class reason code not valid + * on RISC OS 3. + * XXX Don't know about RISC OS 4 + */ + + if (riscosver >= 0x4) { + os_readsysinfo_platform_class(, NULL, NULL); + if (class != osreadsysinfo_Platform_Pace) { + /* reset devices, well try to anyway */ + service_pre_reset(); + } + } else { service_pre_reset(); }
CVS commit: src/sys/arch/acorn32/stand/lib
Module Name:src Committed By: sborrill Date: Wed Jan 23 14:49:00 UTC 2019 Modified Files: src/sys/arch/acorn32/stand/lib: riscoscalls.S riscoscalls.h Log Message: Add xosmodule_enumeratewithversion() to allow operating systems modules to be enumerated along with their version numbers. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/acorn32/stand/lib/riscoscalls.S cvs rdiff -u -r1.12 -r1.13 src/sys/arch/acorn32/stand/lib/riscoscalls.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/acorn32/stand/lib/riscoscalls.S diff -u src/sys/arch/acorn32/stand/lib/riscoscalls.S:1.11 src/sys/arch/acorn32/stand/lib/riscoscalls.S:1.12 --- src/sys/arch/acorn32/stand/lib/riscoscalls.S:1.11 Thu Oct 18 19:02:46 2018 +++ src/sys/arch/acorn32/stand/lib/riscoscalls.S Wed Jan 23 14:49:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: riscoscalls.S,v 1.11 2018/10/18 19:02:46 skrll Exp $ */ +/* $NetBSD: riscoscalls.S,v 1.12 2019/01/23 14:49:00 sborrill Exp $ */ /*- * Copyright (c) 2001 Ben Harris @@ -254,6 +254,36 @@ ENTRY(xosmodule_lookup) mov r0, #0 ldmdb fp, {r4-r8, fp, sp, pc} +ENTRY(xosmodule_enumeratewithversion) + mov ip, sp + stmfd sp!, {r4-r10, fp, ip, lr, pc} + sub fp, ip, #4 + mov r7, r0 + mov r8, r1 + mov r9, r2 + mov r10, r3 + ldr r1, [r7] + ldr r2, [r8] + mov r0, #OSModule_EnumerateWithVersion + swi XOS_Module + ldmdbvs fp, {r4-r10, fp, sp, pc} + str r1, [r7] + str r2, [r8] + teq r9, #0 + strne r3, [r9] + teq r9, #0 + strne r3, [r9] + teq r10, #0 + strne r4, [r10] + ldr r10, [fp, #4] + teq r10, #0 + strne r5, [r10] + ldr r10, [fp, #8] + teq r10, #0 + strne r6, [r10] + mov r0, #0 + ldmdb fp, {r4-r10, fp, sp, pc} + ENTRY(xosfscontrol_shutdown) mov ip, sp stmfd sp!, {fp, ip, lr, pc} Index: src/sys/arch/acorn32/stand/lib/riscoscalls.h diff -u src/sys/arch/acorn32/stand/lib/riscoscalls.h:1.12 src/sys/arch/acorn32/stand/lib/riscoscalls.h:1.13 --- src/sys/arch/acorn32/stand/lib/riscoscalls.h:1.12 Thu May 10 10:27:10 2012 +++ src/sys/arch/acorn32/stand/lib/riscoscalls.h Wed Jan 23 14:49:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: riscoscalls.h,v 1.12 2012/05/10 10:27:10 skrll Exp $ */ +/* $NetBSD: riscoscalls.h,v 1.13 2019/01/23 14:49:00 sborrill Exp $ */ /*- * Copyright (c) 2001 Ben Harris @@ -285,12 +285,15 @@ extern void os_enter_os(void); #define OSModule_Alloc 6 #define OSModule_Free 7 #define OSModule_Lookup 18 +#define OSModule_EnumerateWithVersion 20 #ifndef __ASSEMBLER__ extern os_error *xosmodule_alloc(int, void **); extern os_error *xosmodule_free(void *); extern os_error *xosmodule_lookup(char const *, int *, int *, void **, void **, char **); +extern os_error *xosmodule_enumeratewithversion(int *, int *, char **, int *, +int *, int *); #endif #define OSFSControl_AddFS 12
CVS commit: src/sys/kern
Module Name:src Committed By: kamil Date: Wed Jan 23 13:38:30 UTC 2019 Modified Files: src/sys/kern: init_main.c Log Message: Change the place of initproc initialization The initproc variable cannot be initialized in start_init as there is a race between vfs_mountroot and start_init. PR kern/53817 by Andreas Gustafsson To generate a diff of this commit: cvs rdiff -u -r1.501 -r1.502 src/sys/kern/init_main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/init_main.c diff -u src/sys/kern/init_main.c:1.501 src/sys/kern/init_main.c:1.502 --- src/sys/kern/init_main.c:1.501 Wed Dec 26 22:16:26 2018 +++ src/sys/kern/init_main.c Wed Jan 23 13:38:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.501 2018/12/26 22:16:26 thorpej Exp $ */ +/* $NetBSD: init_main.c,v 1.502 2019/01/23 13:38:30 kamil Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.501 2018/12/26 22:16:26 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.502 2019/01/23 13:38:30 kamil Exp $"); #include "opt_ddb.h" #include "opt_inet.h" @@ -617,6 +617,14 @@ main(void) panic("fork init"); /* + * The initproc variable cannot be initialized in start_init as there + * is a race between vfs_mountroot and start_init. + */ + mutex_enter(proc_lock); + initproc = proc_find_raw(1); + mutex_exit(proc_lock); + + /* * Load any remaining builtin modules, and hand back temporary * storage to the VM system. Then require force when loading any * remaining un-init'ed built-in modules to avoid later surprises. @@ -946,8 +954,6 @@ start_init(void *arg) char ipath[129]; int ipx, len; - initproc = p; - /* * Now in process 1. */
CVS commit: src/sys/dev/pci
Module Name:src Committed By: ryoon Date: Wed Jan 23 11:15:11 UTC 2019 Modified Files: src/sys/dev/pci: if_ena.c Log Message: Fix no options DEBUG nor DIAGNOSTIC build To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/if_ena.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_ena.c diff -u src/sys/dev/pci/if_ena.c:1.12 src/sys/dev/pci/if_ena.c:1.13 --- src/sys/dev/pci/if_ena.c:1.12 Sat Dec 22 20:57:44 2018 +++ src/sys/dev/pci/if_ena.c Wed Jan 23 11:15:11 2019 @@ -31,7 +31,7 @@ #if 0 __FBSDID("$FreeBSD: head/sys/dev/ena/ena.c 333456 2018-05-10 09:37:54Z mw $"); #endif -__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.12 2018/12/22 20:57:44 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.13 2019/01/23 11:15:11 ryoon Exp $"); #include #include @@ -2045,7 +2045,9 @@ err: kcpuset_destroy(affinity); for (i--; i >= 0; i--) { +#if defined(DEBUG) || defined(DIAGNOSTIC) int irq_slot = i + irq_off; +#endif KASSERT(adapter->sc_ihs[irq_slot] != NULL); pci_intr_disestablish(adapter->sc_pa.pa_pc, adapter->sc_ihs[i]); adapter->sc_ihs[i] = NULL;
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Wed Jan 23 09:47:52 UTC 2019 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: - Move the location of calling setup_eee() in ixgbe_attach(). The previous location was too early. The new location is before calling ixgbe_set_phy_power(). - Restore call of setup_eee() in ixgbe_init_locked(). It was removed in rev. 1.99 (FreeBSD r320688). - When calling setup_eee(), pass enable/disable correctly. To generate a diff of this commit: cvs rdiff -u -r1.172 -r1.173 src/sys/dev/pci/ixgbe/ixgbe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.172 src/sys/dev/pci/ixgbe/ixgbe.c:1.173 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.172 Wed Jan 23 09:01:24 2019 +++ src/sys/dev/pci/ixgbe/ixgbe.c Wed Jan 23 09:47:52 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.172 2019/01/23 09:01:24 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.173 2019/01/23 09:47:52 msaitoh Exp $ */ /** @@ -905,10 +905,6 @@ ixgbe_attach(device_t parent, device_t d ixgbe_check_fan_failure(adapter, esdp, FALSE); } - /* Enable EEE power saving */ - if (adapter->feat_en & IXGBE_FEATURE_EEE) - hw->mac.ops.setup_eee(hw, TRUE); - /* Set an initial default flow control value */ hw->fc.requested_mode = ixgbe_flow_control; @@ -1169,6 +1165,11 @@ ixgbe_attach(device_t parent, device_t d /* Enable the optics for 82599 SFP+ fiber */ ixgbe_enable_tx_laser(hw); + /* Enable EEE power saving */ + if (adapter->feat_cap & IXGBE_FEATURE_EEE) + hw->mac.ops.setup_eee(hw, + adapter->feat_en & IXGBE_FEATURE_EEE); + /* Enable power to the phy. */ ixgbe_set_phy_power(hw, TRUE); @@ -4082,6 +4083,11 @@ ixgbe_init_locked(struct adapter *adapte /* Set moderation on the Link interrupt */ ixgbe_eitr_write(adapter, adapter->vector, IXGBE_LINK_ITR); + /* Enable EEE power saving */ + if (adapter->feat_cap & IXGBE_FEATURE_EEE) + hw->mac.ops.setup_eee(hw, + adapter->feat_en & IXGBE_FEATURE_EEE); + /* Enable power to the phy. */ ixgbe_set_phy_power(hw, TRUE);
CVS commit: [pgoyette-compat] src/sys/dev/raidframe
Module Name:src Committed By: pgoyette Date: Wed Jan 23 09:33:47 UTC 2019 Modified Files: src/sys/dev/raidframe [pgoyette-compat]: rf_compat50.c Log Message: Ooops, missed a semicolon - add it back To generate a diff of this commit: cvs rdiff -u -r1.3.2.7 -r1.3.2.8 src/sys/dev/raidframe/rf_compat50.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_compat50.c diff -u src/sys/dev/raidframe/rf_compat50.c:1.3.2.7 src/sys/dev/raidframe/rf_compat50.c:1.3.2.8 --- src/sys/dev/raidframe/rf_compat50.c:1.3.2.7 Wed Jan 23 03:34:14 2019 +++ src/sys/dev/raidframe/rf_compat50.c Wed Jan 23 09:33:47 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_compat50.c,v 1.3.2.7 2019/01/23 03:34:14 pgoyette Exp $ */ +/* $NetBSD: rf_compat50.c,v 1.3.2.8 2019/01/23 09:33:47 pgoyette Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -251,7 +251,7 @@ void raidframe_50_fini(void) { - MODULE_UNSET_HOOK(raidframe50_ioctl_hook) + MODULE_UNSET_HOOK(raidframe50_ioctl_hook); } MODULE(MODULE_CLASS_EXEC, raid_50, "raid,compat_50");
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Wed Jan 23 09:01:25 UTC 2019 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Call ixgbe_init_swfw_semaphore(hw) before calling ixgbe_check_wol_support() because ixgbe_check_wol_support()->ixgbe_check_wol_support()-> ixgbe_get_device_caps() accesses semaphore. To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.172 src/sys/dev/pci/ixgbe/ixgbe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.171 src/sys/dev/pci/ixgbe/ixgbe.c:1.172 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.171 Wed Jan 23 06:56:19 2019 +++ src/sys/dev/pci/ixgbe/ixgbe.c Wed Jan 23 09:01:24 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.171 2019/01/23 06:56:19 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.172 2019/01/23 09:01:24 msaitoh Exp $ */ /** @@ -876,6 +876,9 @@ ixgbe_attach(device_t parent, device_t d } else adapter->num_segs = IXGBE_82598_SCATTER; + /* Ensure SW/FW semaphore is free */ + ixgbe_init_swfw_semaphore(hw); + hw->mac.ops.set_lan_id(hw); ixgbe_init_device_features(adapter); @@ -902,9 +905,6 @@ ixgbe_attach(device_t parent, device_t d ixgbe_check_fan_failure(adapter, esdp, FALSE); } - /* Ensure SW/FW semaphore is free */ - ixgbe_init_swfw_semaphore(hw); - /* Enable EEE power saving */ if (adapter->feat_en & IXGBE_FEATURE_EEE) hw->mac.ops.setup_eee(hw, TRUE);