CVS commit: src/sys/dev/pci
Module Name:src Committed By: rin Date: Sun Nov 26 06:38:28 UTC 2023 Modified Files: src/sys/dev/pci: ppb.c Log Message: ppb(4): Print out PCIe Gen5 link speed correctly To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/dev/pci/ppb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: rin Date: Sun Nov 26 06:38:28 UTC 2023 Modified Files: src/sys/dev/pci: ppb.c Log Message: ppb(4): Print out PCIe Gen5 link speed correctly To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/dev/pci/ppb.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/ppb.c diff -u src/sys/dev/pci/ppb.c:1.74 src/sys/dev/pci/ppb.c:1.75 --- src/sys/dev/pci/ppb.c:1.74 Sun Oct 10 23:28:36 2021 +++ src/sys/dev/pci/ppb.c Sun Nov 26 06:38:28 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: ppb.c,v 1.74 2021/10/10 23:28:36 msaitoh Exp $ */ +/* $NetBSD: ppb.c,v 1.75 2023/11/26 06:38:28 rin Exp $ */ /* * Copyright (c) 1996, 1998 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.74 2021/10/10 23:28:36 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.75 2023/11/26 06:38:28 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_ppb.h" @@ -58,8 +58,8 @@ __KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.74 (PCIE_SLCSR_ABP | PCIE_SLCSR_PFD | PCIE_SLCSR_MSC | \ PCIE_SLCSR_PDC | PCIE_SLCSR_CC | PCIE_SLCSR_LACS) -static const char pcie_linkspeed_strings[5][5] = { - "1.25", "2.5", "5.0", "8.0", "16.0" +static const char pcie_linkspeed_strings[6][5] = { + "1.25", "2.5", "5.0", "8.0", "16.0", "32.0", }; int ppb_printevent = 0; /* Print event type if the value is not 0 */
CVS commit: src/sys/arch/arm/acpi
Module Name:src Committed By: jmcneill Date: Sat Nov 25 20:17:52 UTC 2023 Modified Files: src/sys/arch/arm/acpi: gic_acpi.c Log Message: gicv2: Fix truncation of GICC / GICD base addresses above 4GB. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/acpi/gic_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/acpi
Module Name:src Committed By: jmcneill Date: Sat Nov 25 20:17:52 UTC 2023 Modified Files: src/sys/arch/arm/acpi: gic_acpi.c Log Message: gicv2: Fix truncation of GICC / GICD base addresses above 4GB. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/acpi/gic_acpi.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/arm/acpi/gic_acpi.c diff -u src/sys/arch/arm/acpi/gic_acpi.c:1.7 src/sys/arch/arm/acpi/gic_acpi.c:1.8 --- src/sys/arch/arm/acpi/gic_acpi.c:1.7 Sat Aug 7 16:18:42 2021 +++ src/sys/arch/arm/acpi/gic_acpi.c Sat Nov 25 20:17:52 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: gic_acpi.c,v 1.7 2021/08/07 16:18:42 thorpej Exp $ */ +/* $NetBSD: gic_acpi.c,v 1.8 2023/11/25 20:17:52 jmcneill Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "pci.h" #include -__KERNEL_RCSID(0, "$NetBSD: gic_acpi.c,v 1.7 2021/08/07 16:18:42 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gic_acpi.c,v 1.8 2023/11/25 20:17:52 jmcneill Exp $"); #include #include @@ -102,8 +102,8 @@ gic_acpi_attach(device_t parent, device_ return; } - const bus_addr_t addr = uimin(gicd->BaseAddress, gicc->BaseAddress); - const bus_size_t end = uimax(gicd->BaseAddress + GICD_SIZE, gicc->BaseAddress + GICC_SIZE); + const bus_addr_t addr = ulmin(gicd->BaseAddress, gicc->BaseAddress); + const bus_size_t end = ulmax(gicd->BaseAddress + GICD_SIZE, gicc->BaseAddress + GICC_SIZE); const bus_size_t size = end - addr; error = bus_space_map(_generic_bs_tag, addr, size, 0, );
CVS commit: src/external/mit/xorg/lib/gallium
Module Name:src Committed By: rjs Date: Sat Nov 25 20:00:25 UTC 2023 Modified Files: src/external/mit/xorg/lib/gallium: Makefile Log Message: Make building of more files conditional on MKLLVMRT. Make r300_state_derived.c compile with gcc 12. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/external/mit/xorg/lib/gallium/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/mit/xorg/lib/gallium
Module Name:src Committed By: rjs Date: Sat Nov 25 20:00:25 UTC 2023 Modified Files: src/external/mit/xorg/lib/gallium: Makefile Log Message: Make building of more files conditional on MKLLVMRT. Make r300_state_derived.c compile with gcc 12. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/external/mit/xorg/lib/gallium/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/lib/gallium/Makefile diff -u src/external/mit/xorg/lib/gallium/Makefile:1.52 src/external/mit/xorg/lib/gallium/Makefile:1.53 --- src/external/mit/xorg/lib/gallium/Makefile:1.52 Wed Nov 22 17:48:35 2023 +++ src/external/mit/xorg/lib/gallium/Makefile Sat Nov 25 20:00:25 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.52 2023/11/22 17:48:35 rjs Exp $ +# $NetBSD: Makefile,v 1.53 2023/11/25 20:00:25 rjs Exp $ # Link the gallium mega driver. @@ -343,8 +343,12 @@ GALLIUM_SOURCES.auxiliary/util= \ GALLIUM_SOURCES.auxiliary/nir = \ nir_draw_helpers.c \ nir_to_tgsi.c \ - nir_to_tgsi_info.c \ tgsi_to_nir.c + +.if ${MKLLVMRT} != "no" +GALLIUM_SOURCES.auxiliary/nir+= nir_to_tgsi_info.c +.endif + GALLIUM_SOURCES.auxiliary/vl= \ vl_bicubic_filter.c \ vl_compositor.c \ @@ -384,6 +388,7 @@ CPPFLAGS.${_f} += -I${X11SRCDIR.Mesa}/sr GALLIUM_SOURCES.auxiliary/renderonly= \ renderonly.c +.if ${MKLLVMRT} != "no" GALLIUM_SOURCES.auxiliary/gallivm= \ lp_bld_arit.c \ lp_bld_arit_overflow.c \ @@ -422,8 +427,9 @@ GALLIUM_SOURCES.auxiliary/gallivm= \ lp_bld_tgsi.c \ lp_bld_tgsi_info.c \ lp_bld_tgsi_soa.c \ - lp_bld_type.c - #lp_bld_debug.cpp + lp_bld_type.c \ + lp_bld_debug.cpp +.endif .for _f in ${GALLIUM_SOURCES.auxiliary/gallivm} CPPFLAGS.${_f} += -I${X11SRCDIR.Mesa}/src/gallium/auxiliary/util @@ -736,6 +742,8 @@ GALLIUM_SOURCES.drivers/r300 = \ r300_vs.c \ r300_vs_draw.c +CPPFLAGS.r300_state_derived.c = ${CC_WNO_STRINGOP_OVERREAD} + GALLIUM_SOURCES.drivers/r300/compiler = \ memory_pool.c \ r300_fragprog.c \
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sat Nov 25 19:43:26 UTC 2023 Modified Files: src/usr.sbin/sysinst: partman.c Log Message: PR 57698: avoid a few potential sysinst crashes in environments where not all binaries are available - e.g. w/o cgdconfig(8) the "cgds" pointer would be NULL (as there can't be any) and we crashed when naively dereferencing it. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/usr.sbin/sysinst/partman.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/sysinst/partman.c diff -u src/usr.sbin/sysinst/partman.c:1.56 src/usr.sbin/sysinst/partman.c:1.57 --- src/usr.sbin/sysinst/partman.c:1.56 Sun Jul 10 10:52:41 2022 +++ src/usr.sbin/sysinst/partman.c Sat Nov 25 19:43:26 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: partman.c,v 1.56 2022/07/10 10:52:41 martin Exp $ */ +/* $NetBSD: partman.c,v 1.57 2023/11/25 19:43:26 martin Exp $ */ /* * Copyright 2012 Eugene Lozovoy @@ -817,6 +817,8 @@ pm_raid_commit(void) FILE *f; char f_name[STRSIZE], devname[STRSIZE]; + if (!have_raid) + return 0; for (i = 0; i < MAX_RAID; i++) { if (! pm_raid_check([i])) continue; @@ -1163,6 +1165,8 @@ pm_vnd_commit(void) part_id id, part_suit = NO_PART; struct disk_part_info info; + if (!have_vnd) + return 0; for (i = 0; i < MAX_VND; i++) { error = 0; if (! pm_vnd_check([i])) @@ -1454,6 +1458,8 @@ pm_cgd_commit(void) char devname[STRSIZE]; int i, error = 0; + if (!have_cgd) + return 0; for (i = 0; i < MAX_CGD; i++) { if (! pm_cgd_check([i])) continue; @@ -1979,6 +1985,8 @@ pm_lvm_commit(void) uint used_size = 0; char params[STRSIZE*3], devs[STRSIZE*3], arg[STRSIZE]; + if (!have_lvm) + return 0; for (i = 0; i < MAX_LVM_VG; i++) { /* Stage 0: checks */ if (! pm_lvm_check([i])) @@ -2118,7 +2126,7 @@ pm_getrefdev(struct pm_devs *pm_cur) char descr[MENUSTRSIZE], dev[MENUSTRSIZE] = ""; pm_cur->refdev = NULL; - if (! strncmp(pm_cur->diskdev, "cgd", 3)) { + if (have_cgd && strncmp(pm_cur->diskdev, "cgd", 3) == 0) { dev_num = pm_cur->diskdev[3] - '0'; for (i = 0; i < MAX_CGD; i++) if (cgds[i].blocked && cgds[i].node == dev_num) { @@ -2130,7 +2138,7 @@ pm_getrefdev(struct pm_devs *pm_cur) sizeof(pm_cur->diskdev_descr)); break; } - } else if (! strncmp(pm_cur->diskdev, "vnd", 3)) { + } else if (have_vnd && strncmp(pm_cur->diskdev, "vnd", 3) == 0) { dev_num = pm_cur->diskdev[3] - '0'; for (i = 0; i < MAX_VND; i++) if (vnds[i].blocked && vnds[i].node == dev_num) { @@ -2145,7 +2153,7 @@ pm_getrefdev(struct pm_devs *pm_cur) sizeof(pm_cur->diskdev_descr)); break; } - } else if (! strncmp(pm_cur->diskdev, "raid", 4)) { + } else if (have_raid && strncmp(pm_cur->diskdev, "raid", 4) == 0) { dev_num = pm_cur->diskdev[4] - '0'; for (i = 0; i < MAX_RAID; i++) if (raids[i].blocked && raids[i].node == dev_num) { @@ -2237,7 +2245,7 @@ pm_partusage(struct pm_devs *pm_cur, int if (id >= pm_cur->parts->num_part) return 0; - for (i = 0; i < MAX_CGD; i++) + for (i = 0; have_cgd && i < MAX_CGD; i++) if (cgds[i].enabled && cgds[i].pm == pm_cur && cgds[i].pm_part == id) { @@ -2247,7 +2255,7 @@ pm_partusage(struct pm_devs *pm_cur, int } return 1; } - for (i = 0; i < MAX_RAID; i++) + for (i = 0; have_raid && i < MAX_RAID; i++) for (ii = 0; ii < MAX_IN_RAID; ii++) if (raids[i].enabled && raids[i].comp[ii].parts == pm_cur->parts && @@ -2256,7 +2264,7 @@ pm_partusage(struct pm_devs *pm_cur, int raids[i].comp[ii].parts = NULL; return 1; } - for (i = 0; i < MAX_LVM_VG; i++) + for (i = 0; have_lvm && i < MAX_LVM_VG; i++) for (ii = 0; ii < MAX_LVM_PV; ii++) if (lvms[i].enabled && lvms[i].pv[ii].pm == pm_cur &&
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sat Nov 25 19:43:26 UTC 2023 Modified Files: src/usr.sbin/sysinst: partman.c Log Message: PR 57698: avoid a few potential sysinst crashes in environments where not all binaries are available - e.g. w/o cgdconfig(8) the "cgds" pointer would be NULL (as there can't be any) and we crashed when naively dereferencing it. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/usr.sbin/sysinst/partman.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/libexec/ftpd
Module Name:src Committed By: prlw1 Date: Sat Nov 25 15:39:51 UTC 2023 Modified Files: src/libexec/ftpd: Makefile Log Message: ftpd: deduplicate gcc warning avoidance OK lukem@ To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/libexec/ftpd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ftpd/Makefile diff -u src/libexec/ftpd/Makefile:1.69 src/libexec/ftpd/Makefile:1.70 --- src/libexec/ftpd/Makefile:1.69 Sat Jun 3 09:09:11 2023 +++ src/libexec/ftpd/Makefile Sat Nov 25 15:39:51 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.69 2023/06/03 09:09:11 lukem Exp $ +# $NetBSD: Makefile,v 1.70 2023/11/25 15:39:51 prlw1 Exp $ # @(#)Makefile 8.2 (Berkeley) 4/4/94 .include @@ -39,9 +39,6 @@ LDADD+= -lskey .endif .endif # USE_PAM == no -COPTS.ftpd.c += ${CC_WNO_STRINGOP_TRUNCATION} -COPTS.logwtmp.c += ${CC_WNO_STRINGOP_TRUNCATION} - ftpd.o ftpcmd.o: version.h #.if (${USE_KERBEROS} != "no")
CVS commit: src/libexec/ftpd
Module Name:src Committed By: prlw1 Date: Sat Nov 25 15:39:51 UTC 2023 Modified Files: src/libexec/ftpd: Makefile Log Message: ftpd: deduplicate gcc warning avoidance OK lukem@ To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/libexec/ftpd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils.old
Module Name:src Committed By: rin Date: Sat Nov 25 12:15:00 UTC 2023 Modified Files: src/external/gpl3/binutils.old/lib/libbfd/arch/vax: bfd.h bfd_stdint.h defs.mk src/external/gpl3/binutils.old/lib/libiberty/arch/vax: defs.mk src/external/gpl3/binutils.old/usr.bin/gas/arch/vax: config.h Log Message: binutils.old: Regen for vax to explicitly enable 64-bit integer support To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h \ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h \ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/usr.bin/gas/arch/vax/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils.old
Module Name:src Committed By: rin Date: Sat Nov 25 12:15:00 UTC 2023 Modified Files: src/external/gpl3/binutils.old/lib/libbfd/arch/vax: bfd.h bfd_stdint.h defs.mk src/external/gpl3/binutils.old/lib/libiberty/arch/vax: defs.mk src/external/gpl3/binutils.old/usr.bin/gas/arch/vax: config.h Log Message: binutils.old: Regen for vax to explicitly enable 64-bit integer support To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h \ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h \ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/usr.bin/gas/arch/vax/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h diff -u src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h:1.7 src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h:1.8 --- src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h:1.7 Fri Dec 23 17:09:33 2022 +++ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h Sat Nov 25 12:14:59 2023 @@ -90,7 +90,7 @@ extern "C" { /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have been selected with --enable-targets, or if --enable-64-bit-bfd. */ -#define BFD_ARCH_SIZE 32 +#define BFD_ARCH_SIZE 64 /* The word size of the default bfd target. */ #define BFD_DEFAULT_TARGET_SIZE 32 Index: src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h diff -u src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h:1.7 src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h:1.8 --- src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h:1.7 Fri Dec 23 17:09:33 2022 +++ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h Sat Nov 25 12:14:59 2023 @@ -2,7 +2,7 @@ /* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for vax--netbsdelf-gcc (NetBSD nb1 20210411) 10.3.0 */ +/* generated for vax--netbsdelf-gcc (NetBSD nb3 20231008) 10.5.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 Index: src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk diff -u src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk:1.7 src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk:1.8 --- src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk:1.7 Fri Dec 23 17:09:33 2022 +++ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk Sat Nov 25 12:14:59 2023 @@ -2,7 +2,7 @@ # Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-vax.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo vaxnetbsd.lo aout32.lo vax1knetbsd.lo elf32-gen.lo plugin.lo cpu-vax.lo netbsd-core.lo ofiles +G_libbfd_la_DEPENDENCIES=elf32-vax.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo vaxnetbsd.lo aout32.lo vax1knetbsd.lo elf32-gen.lo plugin.lo cpu-vax.lo netbsd-core.lo archive64.lo ofiles G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coff-bfd.lo compress.lo corefile.lo elf-properties.lo format.lo hash.lo init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo binary.lo ihex.lo srec.lo tekhex.lo verilog.lo G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= Index: src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk diff -u src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk:1.7 src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk:1.8 --- src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk:1.7 Fri Dec 23 17:09:37 2022 +++ src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk Sat Nov 25 12:15:00 2023 @@ -4,5 +4,5 @@ # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o strverscmp.o +G_LIBOBJS=strverscmp.o G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o
CVS commit: src/tools/binutils
Module Name:src Committed By: rin Date: Sat Nov 25 12:11:27 UTC 2023 Modified Files: src/tools/binutils: Makefile Added Files: src/tools/binutils: mknative-binutils.old Log Message: tools/binutils: Add support to mknative for binutils.old To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/tools/binutils/Makefile cvs rdiff -u -r0 -r1.1 src/tools/binutils/mknative-binutils.old Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils.old/dist/bfd
Module Name:src Committed By: rin Date: Sat Nov 25 12:09:59 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/bfd: config.bfd Log Message: binutils.old/bfd: Require 64-bit integer support for vax Taken from binutils/bfd: https://mail-index.netbsd.org/source-changes/2023/11/25/msg148607.html To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/binutils.old/dist/bfd/config.bfd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils.old/dist/bfd
Module Name:src Committed By: rin Date: Sat Nov 25 12:09:59 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/bfd: config.bfd Log Message: binutils.old/bfd: Require 64-bit integer support for vax Taken from binutils/bfd: https://mail-index.netbsd.org/source-changes/2023/11/25/msg148607.html To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/binutils.old/dist/bfd/config.bfd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils.old/dist/bfd/config.bfd diff -u src/external/gpl3/binutils.old/dist/bfd/config.bfd:1.9 src/external/gpl3/binutils.old/dist/bfd/config.bfd:1.10 --- src/external/gpl3/binutils.old/dist/bfd/config.bfd:1.9 Fri Dec 23 17:09:18 2022 +++ src/external/gpl3/binutils.old/dist/bfd/config.bfd Sat Nov 25 12:09:59 2023 @@ -1454,6 +1454,13 @@ case "${targ_defvec} ${targ_selvecs}" in ;; esac +# vax natively supports 64-bit integers. +case "${targ_defvec} ${targ_selvecs}" in + *vax*) +want64=true +;; +esac + case "${host64}${want64}" in *true*) targ_selvecs="${targ_selvecs} ${targ64_selvecs}"
CVS commit: src/external/gpl3/binutils.old/dist/gas/config
Module Name:src Committed By: rin Date: Sat Nov 25 12:07:58 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c Log Message: binutils.old/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [11/21] PR toolchain/43314: pc relative relocations are "off by 1*size" on vax Address http://gnats.netbsd.org/43314 Taken from binutils/gas: https://mail-index.netbsd.org/source-changes/2023/10/07/msg147942.html To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c diff -u src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.9 src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.10 --- src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.9 Sat Nov 25 12:06:42 2023 +++ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c Sat Nov 25 12:07:58 2023 @@ -3581,12 +3581,39 @@ void vax_cons_fix_new (fragS *frag, int where, unsigned int nbytes, expressionS *exp, bfd_reloc_code_real_type r) { - if (r == NO_RELOC) + int pcrel; + // fix PC relative frags too ... + switch (r) +{ +case BFD_RELOC_8_PCREL: +case BFD_RELOC_16_PCREL: +case BFD_RELOC_32_PCREL: + pcrel = 1; + /* + * Displacement mode addressing (of which PC relative is one + * type) uses the updated contents of the register as the base + * address. VARM, Leonard 1987, pp34 + */ + switch (exp->X_op) + { + case O_constant: + case O_symbol: + exp->X_add_number += nbytes; + break; + } + break; +case NO_RELOC: r = (nbytes == 1 ? BFD_RELOC_8 : nbytes == 2 ? BFD_RELOC_16 : BFD_RELOC_32); + pcrel = 0; + break; +default: + pcrel = 0; + break; +} - fix_new_exp (frag, where, (int) nbytes, exp, 0, r); + fix_new_exp (frag, where, (int) nbytes, exp, pcrel, r); } const char *
CVS commit: src/external/gpl3/binutils.old/dist/gas/config
Module Name:src Committed By: rin Date: Sat Nov 25 12:07:58 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c Log Message: binutils.old/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [11/21] PR toolchain/43314: pc relative relocations are "off by 1*size" on vax Address http://gnats.netbsd.org/43314 Taken from binutils/gas: https://mail-index.netbsd.org/source-changes/2023/10/07/msg147942.html To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils.old/dist/gas/config
Module Name:src Committed By: rin Date: Sat Nov 25 12:06:43 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c tc-vax.h Log Message: binutils.old/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [10/21] Try not to emit relocations in the .eh_frame section Taken from binutils/gas: https://mail-index.netbsd.org/source-changes/2023/10/07/msg147941.html To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c diff -u src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.8 src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.9 --- src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.8 Sat Nov 25 12:05:22 2023 +++ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c Sat Nov 25 12:06:42 2023 @@ -282,6 +282,29 @@ md_apply_fix (fixS *fixP, valueT *valueP if (fixP->fx_subsy != (symbolS *) NULL) as_bad_where (fixP->fx_file, fixP->fx_line, _("expression too complex")); + if (fixP->fx_pcrel) +{ + switch (fixP->fx_r_type) + { + case BFD_RELOC_32: + /* change the relocation type to 32 bit PC-relative */ + fixP->fx_r_type = BFD_RELOC_32_PCREL; + if (fixP->fx_addsy != NULL) + { + /* Hack around bfd_install_relocation brain damage. */ + value += fixP->fx_frag->fr_address + fixP->fx_where; + } + if (fixP->fx_addsy == abs_section_sym) + fixP->fx_done = 1; + break; + default: + break; + } +} + + /* + * Common code for pc-relative and non-pc-relative cases + */ if (fixP->fx_addsy == NULL) fixP->fx_done = 1; @@ -3601,6 +3624,11 @@ tc_vax_regname_to_dw2regnum (char *regna void vax_cfi_emit_pcrel_expr (expressionS *expP, unsigned int nbytes) { + expressionS tmp = *expP; + + tmp.X_op = O_subtract; + tmp.X_op_symbol = symbol_temp_new_now (); + expP = expP->X_add_number += nbytes; emit_expr (expP, nbytes); } Index: src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h diff -u src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h:1.7 src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h:1.8 --- src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h:1.7 Fri Dec 23 17:09:22 2022 +++ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h Sat Nov 25 12:06:42 2023 @@ -37,6 +37,8 @@ #ifdef OBJ_ELF #define TARGET_FORMAT "elf32-vax" +#define DIFF_EXPR_OK 1 +#define CFI_DIFF_EXPR_OK 0 #endif #define TARGET_ARCH bfd_arch_vax
CVS commit: src/external/gpl3/binutils.old/dist/gas/config
Module Name:src Committed By: rin Date: Sat Nov 25 12:06:43 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c tc-vax.h Log Message: binutils.old/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [10/21] Try not to emit relocations in the .eh_frame section Taken from binutils/gas: https://mail-index.netbsd.org/source-changes/2023/10/07/msg147941.html To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils.old/dist/gas/config
Module Name:src Committed By: rin Date: Sat Nov 25 12:05:22 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c Log Message: binutils.old/gas: vax: Cherry-pick upstream commits for binutils-gdb:30715 PR port-vax/57646: Import major vax toolchain fix by Kalvis Duckmanton Taken from binutils/gas: https://mail-index.netbsd.org/source-changes/2023/10/07/msg147931.html To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils.old/dist/gas/config
Module Name:src Committed By: rin Date: Sat Nov 25 12:05:22 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c Log Message: binutils.old/gas: vax: Cherry-pick upstream commits for binutils-gdb:30715 PR port-vax/57646: Import major vax toolchain fix by Kalvis Duckmanton Taken from binutils/gas: https://mail-index.netbsd.org/source-changes/2023/10/07/msg147931.html To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c diff -u src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.7 src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.8 --- src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.7 Fri Dec 23 17:09:22 2022 +++ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c Sat Nov 25 12:05:22 2023 @@ -2332,18 +2332,19 @@ md_create_short_jump (char *ptr, void md_create_long_jump (char *ptr, - addressT from_addr ATTRIBUTE_UNUSED, + addressT from_addr, addressT to_addr, - fragS *frag, - symbolS *to_symbol) + fragS *frag ATTRIBUTE_UNUSED, + symbolS *to_symbol ATTRIBUTE_UNUSED) { valueT offset; - offset = to_addr - S_GET_VALUE (to_symbol); - *ptr++ = VAX_JMP; /* Arbitrary jump. */ - *ptr++ = VAX_ABSOLUTE_MODE; + /* Account for 1 byte instruction, 1 byte of address specifier and + 4 bytes of offset from PC. */ + offset = to_addr - (from_addr + 1 + 1 + 4); + *ptr++ = VAX_JMP; + *ptr++ = VAX_PC_RELATIVE_MODE; md_number_to_chars (ptr, offset, 4); - fix_new (frag, ptr - frag->fr_literal, 4, to_symbol, (long) 0, 0, NO_RELOC); } #ifdef OBJ_VMS
CVS commit: src/external/gpl3/binutils/lib/libbfd/arch/vax
Module Name:src Committed By: rin Date: Sat Nov 25 11:58:34 UTC 2023 Modified Files: src/external/gpl3/binutils/lib/libbfd/arch/vax: bfd.h defs.mk Log Message: binutils: Regen for vax to explicitly enable 64-bit integer support To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils/lib/libbfd/arch/vax
Module Name:src Committed By: rin Date: Sat Nov 25 11:58:34 UTC 2023 Modified Files: src/external/gpl3/binutils/lib/libbfd/arch/vax: bfd.h defs.mk Log Message: binutils: Regen for vax to explicitly enable 64-bit integer support To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h diff -u src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h:1.10 src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h:1.11 --- src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h:1.10 Mon Jan 16 15:10:34 2023 +++ src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h Sat Nov 25 11:58:34 2023 @@ -1,5 +1,5 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.14 2022/12/24 20:17:46 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.15 2023/02/07 20:37:30 christos Exp */ /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically @@ -75,7 +75,7 @@ extern "C" { /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have been selected with --enable-targets, or if --enable-64-bit-bfd. */ -#define BFD_ARCH_SIZE 32 +#define BFD_ARCH_SIZE 64 /* The word size of the default bfd target. */ #define BFD_DEFAULT_TARGET_SIZE 32 Index: src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk diff -u src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk:1.5 src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk:1.6 --- src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk:1.5 Sat Apr 4 20:45:46 2020 +++ src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk Sat Nov 25 11:58:34 2023 @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.15 2023/02/07 20:37:30 christos Exp # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-vax.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo vaxnetbsd.lo aout32.lo vax1knetbsd.lo elf32-gen.lo plugin.lo cpu-vax.lo netbsd-core.lo ofiles +G_libbfd_la_DEPENDENCIES=elf32-vax.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo vaxnetbsd.lo aout32.lo vax1knetbsd.lo elf32-gen.lo plugin.lo cpu-vax.lo netbsd-core.lo archive64.lo ofiles G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coff-bfd.lo compress.lo corefile.lo elf-properties.lo format.lo hash.lo init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo binary.lo ihex.lo srec.lo tekhex.lo verilog.lo G_DEFS=-DHAVE_CONFIG_H G_INCLUDES=
CVS commit: src/external/gpl3/binutils/dist/bfd
Module Name:src Committed By: rin Date: Sat Nov 25 11:57:55 UTC 2023 Modified Files: src/external/gpl3/binutils/dist/bfd: config.bfd Log Message: binutils/bfd: Require 64-bit integer support for vax Otherwise, e.g., gas cannot assemble 64-bit immediates correctly on ILP32 hosts. Thanks hans@ for analysis: https://mail-index.netbsd.org/port-vax/2023/11/23/msg004546.html To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/external/gpl3/binutils/dist/bfd/config.bfd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/dist/bfd/config.bfd diff -u src/external/gpl3/binutils/dist/bfd/config.bfd:1.42 src/external/gpl3/binutils/dist/bfd/config.bfd:1.43 --- src/external/gpl3/binutils/dist/bfd/config.bfd:1.42 Mon Aug 28 00:35:52 2023 +++ src/external/gpl3/binutils/dist/bfd/config.bfd Sat Nov 25 11:57:55 2023 @@ -1511,6 +1511,13 @@ case "${targ_defvec} ${targ_selvecs}" in ;; esac +# vax natively supports 64-bit integers. +case "${targ_defvec} ${targ_selvecs}" in + *vax*) +want64=true +;; +esac + case "${host64}${want64}" in *true*) targ_selvecs="${targ_selvecs} ${targ64_selvecs}"
CVS commit: src/external/gpl3/binutils/dist/bfd
Module Name:src Committed By: rin Date: Sat Nov 25 11:57:55 UTC 2023 Modified Files: src/external/gpl3/binutils/dist/bfd: config.bfd Log Message: binutils/bfd: Require 64-bit integer support for vax Otherwise, e.g., gas cannot assemble 64-bit immediates correctly on ILP32 hosts. Thanks hans@ for analysis: https://mail-index.netbsd.org/port-vax/2023/11/23/msg004546.html To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/external/gpl3/binutils/dist/bfd/config.bfd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/iscsi
Module Name:src Committed By: mlelstv Date: Sat Nov 25 10:08:27 UTC 2023 Modified Files: src/sys/dev/iscsi: iscsi.h iscsi_globals.h iscsi_ioctl.c iscsi_send.c iscsi_text.c iscsi_utils.c Log Message: Adapt to bignum representation of target. Fix negotiation for mutual authentication. Prepare for more CHAP types. Fix crashes for invalid socket descriptors passed to kernel. Protect usecount with connection mutex, avoids race on connection close. Minor cosmetics. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/iscsi/iscsi.h cvs rdiff -u -r1.27 -r1.28 src/sys/dev/iscsi/iscsi_globals.h cvs rdiff -u -r1.33 -r1.34 src/sys/dev/iscsi/iscsi_ioctl.c cvs rdiff -u -r1.39 -r1.40 src/sys/dev/iscsi/iscsi_send.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/iscsi/iscsi_text.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/iscsi/iscsi_utils.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/iscsi
Module Name:src Committed By: mlelstv Date: Sat Nov 25 10:08:27 UTC 2023 Modified Files: src/sys/dev/iscsi: iscsi.h iscsi_globals.h iscsi_ioctl.c iscsi_send.c iscsi_text.c iscsi_utils.c Log Message: Adapt to bignum representation of target. Fix negotiation for mutual authentication. Prepare for more CHAP types. Fix crashes for invalid socket descriptors passed to kernel. Protect usecount with connection mutex, avoids race on connection close. Minor cosmetics. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/iscsi/iscsi.h cvs rdiff -u -r1.27 -r1.28 src/sys/dev/iscsi/iscsi_globals.h cvs rdiff -u -r1.33 -r1.34 src/sys/dev/iscsi/iscsi_ioctl.c cvs rdiff -u -r1.39 -r1.40 src/sys/dev/iscsi/iscsi_send.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/iscsi/iscsi_text.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/iscsi/iscsi_utils.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/iscsi/iscsi.h diff -u src/sys/dev/iscsi/iscsi.h:1.4 src/sys/dev/iscsi/iscsi.h:1.5 --- src/sys/dev/iscsi/iscsi.h:1.4 Wed Jun 15 04:30:30 2016 +++ src/sys/dev/iscsi/iscsi.h Sat Nov 25 10:08:27 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: iscsi.h,v 1.4 2016/06/15 04:30:30 mlelstv Exp $ */ +/* $NetBSD: iscsi.h,v 1.5 2023/11/25 10:08:27 mlelstv Exp $ */ /*- * Copyright (c) 2004,2006,2011 The NetBSD Foundation, Inc. @@ -54,6 +54,13 @@ typedef enum { Indicates SRP authentication (for future use). */ +typedef enum { + ISCSI_CHAP_MD5 = 5, + ISCSI_CHAP_SHA1 = 6, + ISCSI_CHAP_SHA256 = 7, + ISCSI_CHAP_SHA3_256 = 8 +} iscsi_chap_types_t; + typedef struct { unsigned int mutual_auth:1; unsigned int is_secure:1; Index: src/sys/dev/iscsi/iscsi_globals.h diff -u src/sys/dev/iscsi/iscsi_globals.h:1.27 src/sys/dev/iscsi/iscsi_globals.h:1.28 --- src/sys/dev/iscsi/iscsi_globals.h:1.27 Tue Sep 13 13:09:16 2022 +++ src/sys/dev/iscsi/iscsi_globals.h Sat Nov 25 10:08:27 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: iscsi_globals.h,v 1.27 2022/09/13 13:09:16 mlelstv Exp $ */ +/* $NetBSD: iscsi_globals.h,v 1.28 2023/11/25 10:08:27 mlelstv Exp $ */ /*- * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc. @@ -135,11 +135,10 @@ /* Connection state */ typedef enum { - /* first three correspond to CSG/NSG coding */ ST_SEC_NEG = 0, /* security negotiation phase */ - ST_OP_NEG = 1, /* operational negotiation phase */ + ST_SEC_FIN = 1, /* switch from SEC after mutual CHAP */ + ST_OP_NEG = 2, /* operational negotiation phase */ ST_FULL_FEATURE = 3, /* full feature phase */ - /* rest is internal */ ST_WINDING_DOWN = 4, /* connection termination initiated, logging out */ ST_LOGOUT_SENT = 5, /* logout has been sent */ ST_SETTLING = 6, /* waiting for things to settle down */ Index: src/sys/dev/iscsi/iscsi_ioctl.c diff -u src/sys/dev/iscsi/iscsi_ioctl.c:1.33 src/sys/dev/iscsi/iscsi_ioctl.c:1.34 --- src/sys/dev/iscsi/iscsi_ioctl.c:1.33 Tue Sep 13 13:09:16 2022 +++ src/sys/dev/iscsi/iscsi_ioctl.c Sat Nov 25 10:08:27 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: iscsi_ioctl.c,v 1.33 2022/09/13 13:09:16 mlelstv Exp $ */ +/* $NetBSD: iscsi_ioctl.c,v 1.34 2023/11/25 10:08:27 mlelstv Exp $ */ /*- * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc. @@ -728,18 +728,11 @@ create_connection(iscsi_login_parameters } rc = get_socket(par->socket, >c_sock); - fd_close(par->socket); + if (rc != EBADF) + fd_close(par->socket); if (rc) { DEBOUT(("Invalid socket %d\n", par->socket)); - - callout_destroy(>c_timeout); - rw_destroy(>c_sock_rw); - cv_destroy(>c_idle_cv); - cv_destroy(>c_ccb_cv); - cv_destroy(>c_pdu_cv); - cv_destroy(>c_conn_cv); - mutex_destroy(>c_lock); free(conn, M_DEVBUF); par->status = ISCSI_STATUS_INVALID_SOCKET; return rc; @@ -901,11 +894,13 @@ recreate_connection(iscsi_login_paramete DEBOUT(("Too many connections (max = %d, curr = %d)\n", sess->s_MaxConnections, sess->s_active_connections)); - /* Always close the desecriptor */ - fd_close(par->socket); + /* Close the desecriptor */ + rc = EIO; + if (fd_getfile(par->socket) != NULL) + rc = fd_close(par->socket); par->status = ISCSI_STATUS_MAXED_CONNECTIONS; - return EIO; + return rc; } rw_enter(>c_sock_rw, RW_WRITER); @@ -915,7 +910,8 @@ recreate_connection(iscsi_login_paramete } rc = get_socket(par->socket, >c_sock); rw_exit(>c_sock_rw); - fd_close(par->socket); + if (rc != EBADF) + fd_close(par->socket); if (rc) { DEBOUT(("Invalid socket %d\n", par->socket)); @@ -1739,19 +1735,23 @@ iscsi_cleanup_thread(void *par) * the send/recv threads have been killed */ DEBC(conn, 5, ("Cleanup: Waiting for threads to exit\n")); + + mutex_enter(>c_lock); while (conn->c_sendproc || conn->c_rcvproc) -kpause("threads", false, hz, NULL); +kpause("threads", false, hz, >c_lock); for (s=1; conn->c_usecount > 0 && s < 3; ++s) -kpause("usecount", false,
CVS commit: src/sbin
Module Name:src Committed By: mlelstv Date: Sat Nov 25 08:06:02 UTC 2023 Modified Files: src/sbin/iscsictl: iscsic_parse.c src/sbin/iscsid: iscsid_driverif.c Log Message: Parse IPv6 targets and handle IPv6 addresses. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sbin/iscsictl/iscsic_parse.c cvs rdiff -u -r1.8 -r1.9 src/sbin/iscsid/iscsid_driverif.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin
Module Name:src Committed By: mlelstv Date: Sat Nov 25 08:06:02 UTC 2023 Modified Files: src/sbin/iscsictl: iscsic_parse.c src/sbin/iscsid: iscsid_driverif.c Log Message: Parse IPv6 targets and handle IPv6 addresses. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sbin/iscsictl/iscsic_parse.c cvs rdiff -u -r1.8 -r1.9 src/sbin/iscsid/iscsid_driverif.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/iscsictl/iscsic_parse.c diff -u src/sbin/iscsictl/iscsic_parse.c:1.4 src/sbin/iscsictl/iscsic_parse.c:1.5 --- src/sbin/iscsictl/iscsic_parse.c:1.4 Fri Dec 3 13:27:38 2021 +++ src/sbin/iscsictl/iscsic_parse.c Sat Nov 25 08:06:02 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: iscsic_parse.c,v 1.4 2021/12/03 13:27:38 andvar Exp $ */ +/* $NetBSD: iscsic_parse.c,v 1.5 2023/11/25 08:06:02 mlelstv Exp $ */ /*- * Copyright (c) 2005,2006,2011 The NetBSD Foundation, Inc. @@ -48,50 +48,62 @@ STATIC void get_address(iscsi_portal_address_t * portal, char *str, char *arg) { - char *sp, *sp2; + char *sp; int val; if (!str || !*str) arg_error(arg, "Address is missing"); - /* is there a port? don't check inside square brackets (IPv6 addr) */ - for (sp = str + 1, val = 0; *sp && (*sp != ':' || val); sp++) { - if (*sp == '[') - val = 1; - else if (*sp == ']') - val = 0; - } - - /* */ - if (*sp) { - for (sp2 = sp + 1; *sp2 && *sp2 != ':'; sp2++); - /* if there's a second colon, assume it's an unbracketed IPv6 address */ - if (!*sp2) { - /* truncate source, that's the address */ - *sp++ = '\0'; - if (sscanf(sp, "%d", ) != 1) -arg_error(arg, "Bad address format: Expected port number"); - if (val < 0 || val > 0x) -arg_error(arg, "Bad address format: Port number out of range"); - portal->port = (uint16_t) val; - } - /* is there a group tag? */ - for (; isdigit((unsigned char)*sp); sp++); - if (*sp && *sp != ',') - arg_error(arg, "Bad address format: Extra character(s) '%c'", *sp); - } else - for (sp = str + 1; *sp && *sp != ','; sp++); - - if (*sp) { + /* Parse and strip trailing group tag */ + sp = strrchr(str, ','); + if (sp != NULL) { if (sscanf(sp + 1, "%d", ) != 1) arg_error(arg, "Bad address format: Expected group tag"); if (val < 0 || val > 0x) arg_error(arg, "Bad address format: Group tag out of range"); portal->group_tag = (uint16_t) val; - /* truncate source, that's the address */ *sp = '\0'; } - /* only check length, don't verify correct format (too many possibilities) */ + + /* Skip over bracketed IPv6 address */ + sp = strchr(str, ']'); + if (sp != NULL) + sp++; + else + sp = str; + + /* Parse and strip trailing port number */ + sp = strchr(sp, ':'); + if (sp != NULL) { + if (strchr(sp + 1, ':') != NULL) { + /* + * If there's a second colon, assume + * it's an unbracketed IPv6 address + */ + portal->port = 0; + } else { + if (sscanf(sp + 1, "%d", ) != 1) +arg_error(arg, "Bad address format: Expected port number"); + if (val < 0 || val > 0x) +arg_error(arg, "Bad address format: Port number ut of range"); + portal->port = (uint16_t) val; + *sp = '\0'; + } + } + + /* Remove brackets */ + if (*str == '[') { + sp = strchr(str, ']'); + if (sp != NULL && !*(sp+1)) { + str = str + 1; + *sp = '\0'; + } + } + + /* + * only check length, don't verify correct format + * (too many possibilities) + */ if (strlen(str) >= sizeof(portal->address)) arg_error(arg, "Bad address format: Address string too long"); Index: src/sbin/iscsid/iscsid_driverif.c diff -u src/sbin/iscsid/iscsid_driverif.c:1.8 src/sbin/iscsid/iscsid_driverif.c:1.9 --- src/sbin/iscsid/iscsid_driverif.c:1.8 Sun May 29 13:35:45 2016 +++ src/sbin/iscsid/iscsid_driverif.c Sat Nov 25 08:06:02 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: iscsid_driverif.c,v 1.8 2016/05/29 13:35:45 mlelstv Exp $ */ +/* $NetBSD: iscsid_driverif.c,v 1.9 2023/11/25 08:06:02 mlelstv Exp $ */ /*- * Copyright (c) 2005,2006,2011 The NetBSD Foundation, Inc. @@ -98,23 +98,29 @@ set_node_name(iscsid_set_node_name_req_t static int bind_socket(int sock, uint8_t * addr) { - struct sockaddr_in serverAddress; - struct hostent *host; + struct addrinfo hints, *ai, *ai0; + int ret = FALSE; DEB(8, ("Binding to <%s>", addr)); - (void) memset(, 0x0, sizeof(serverAddress)); - host = gethostbyname((char *)addr); - if (host == NULL) - return FALSE; - if (host->h_length > (int)sizeof(serverAddress.sin_addr)) - return FALSE; - serverAddress.sin_family = host->h_addrtype; - serverAddress.sin_port = 0; - serverAddress.sin_len = host->h_length; - memcpy(_addr, host->h_addr_list[0], host->h_length); + + memset(, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_PASSIVE; + if (getaddrinfo((char *)addr, NULL, , )) + return ret; + + for (ai = ai0; ai; ai = ai->ai_next) { + if (bind(sock,