svn commit: r339769 - in stable/11/sys: dev/hwpmc i386/include
Author: mmacy Date: Fri Oct 26 06:12:56 2018 New Revision: 339769 URL: https://svnweb.freebsd.org/changeset/base/339769 Log: fix i386 breakage caused by r339767 Modified: stable/11/sys/dev/hwpmc/hwpmc_amd.c stable/11/sys/i386/include/pmc_mdep.h Modified: stable/11/sys/dev/hwpmc/hwpmc_amd.c == --- stable/11/sys/dev/hwpmc/hwpmc_amd.c Fri Oct 26 05:25:22 2018 (r339768) +++ stable/11/sys/dev/hwpmc/hwpmc_amd.c Fri Oct 26 06:12:56 2018 (r339769) @@ -130,11 +130,7 @@ static struct amd_descr amd_pmcdesc[AMD_NPMCS] = struct amd_event_code_map { enum pmc_event pe_ev; /* enum value */ -#ifdefined(__i386__) - uint8_t pe_code; /* encoded event mask */ -#elif defined(__amd64__) uint16_tpe_code; /* encoded event mask */ -#endif uint8_t pe_mask; /* bits allowed in unit mask */ }; @@ -532,7 +528,6 @@ amd_allocate_pmc(int cpu, int ri, struct pmc *pm, { int i; uint32_t allowed_unitmask, caps, unitmask; - uint16_t eventval, extevent; enum pmc_event pe; const struct pmc_descr *pd; @@ -541,6 +536,7 @@ amd_allocate_pmc(int cpu, int ri, struct pmc *pm, uint32_t config; #elif defined(__amd64__) uint64_t config; + uint16_t eventval, extevent; #endif KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), Modified: stable/11/sys/i386/include/pmc_mdep.h == --- stable/11/sys/i386/include/pmc_mdep.h Fri Oct 26 05:25:22 2018 (r339768) +++ stable/11/sys/i386/include/pmc_mdep.h Fri Oct 26 06:12:56 2018 (r339769) @@ -69,6 +69,7 @@ struct pmc_mdep; #definePMC_MDEP_CLASS_INDEX_TSC1 #definePMC_MDEP_CLASS_INDEX_K7 2 #definePMC_MDEP_CLASS_INDEX_K8 2 +#definePMC_MDEP_CLASS_INDEX_F17H 2 #definePMC_MDEP_CLASS_INDEX_P4 2 #definePMC_MDEP_CLASS_INDEX_P5 2 #definePMC_MDEP_CLASS_INDEX_P6 2 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339768 - head/usr.sbin/bsdinstall/scripts
Author: dteske Date: Fri Oct 26 05:25:22 2018 New Revision: 339768 URL: https://svnweb.freebsd.org/changeset/base/339768 Log: Adjust bsdinstall zfsboot code to 80-columns and whitespace fixes No functional changes. Sponsored by: Smule, Inc. Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot == --- head/usr.sbin/bsdinstall/scripts/zfsbootFri Oct 26 05:12:56 2018 (r339767) +++ head/usr.sbin/bsdinstall/scripts/zfsbootFri Oct 26 05:25:22 2018 (r339768) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2013-2016 Allan Jude -# Copyright (c) 2013-2015 Devin Teske +# Copyright (c) 2013-2018 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -627,7 +627,7 @@ dialog_menu_layout() # Not enough disks selected f_dprintf "$funcname: %s: %s (%u < %u minimum)" \ "$ZFSBOOT_VDEV_TYPE" \ - "Not enough disks selected." \ + "Not enough disks selected." \ $ndisks $want_disks f_interactive || return $FAILURE msg_yes="$msg_change_selection" msg_no="$msg_cancel" \ @@ -843,15 +843,17 @@ zfs_create_diskpart() # # 2. Add small freebsd-boot and/or efi partition # - if [ "$ZFSBOOT_BOOT_TYPE" = "UEFI" -o "$ZFSBOOT_BOOT_TYPE" = "BIOS+UEFI" ]; then + if [ "$ZFSBOOT_BOOT_TYPE" = "UEFI" -o \ +"$ZFSBOOT_BOOT_TYPE" = "BIOS+UEFI" ] + then f_eval_catch $funcname gpart \ "$GPART_ADD_ALIGN_LABEL_WITH_SIZE" \ "$align_small" efiboot$index efi 200M \ -$disk || -return $FAILURE +$disk || return $FAILURE f_eval_catch $funcname mkdir "$MKDIR_P" \ -"$BSDINSTALL_TMPETC/esp" || return $FAILURE +"$BSDINSTALL_TMPETC/esp" || +return $FAILURE f_eval_catch $funcname newfs_msdos "$NEWFS_ESP" "16" \ "EFISYS" "/dev/${disk}p1" || return $FAILURE @@ -874,19 +876,23 @@ zfs_create_diskpart() return $FAILURE fi - if [ "$ZFSBOOT_BOOT_TYPE" = "BIOS" -o "$ZFSBOOT_BOOT_TYPE" = "BIOS+UEFI" ]; then + if [ "$ZFSBOOT_BOOT_TYPE" = "BIOS" -o \ +"$ZFSBOOT_BOOT_TYPE" = "BIOS+UEFI" ] + then f_eval_catch $funcname gpart \ "$GPART_ADD_ALIGN_LABEL_WITH_SIZE" \ -"$align_small" gptboot$index freebsd-boot \ -512k $disk || return $FAILURE +"$align_small" gptboot$index \ +freebsd-boot 512k $disk || return $FAILURE if [ "$ZFSBOOT_BOOT_TYPE" = "BIOS" ]; then - f_eval_catch $funcname gpart "$GPART_BOOTCODE_PART" \ -/boot/pmbr /boot/gptzfsboot 1 $disk || -return $FAILURE + f_eval_catch $funcname gpart \ +"$GPART_BOOTCODE_PART" \ +/boot/pmbr /boot/gptzfsboot 1 \ +$disk || return $FAILURE else - f_eval_catch $funcname gpart "$GPART_BOOTCODE_PART" \ -/boot/pmbr /boot/gptzfsboot 2 $disk || -return $FAILURE + f_eval_catch $funcname gpart \ +"$GPART_BOOTCODE_PART" \ +/boot/pmbr /boot/gptzfsboot 2 \ +$disk || return $FAILURE fi fi @@ -918,8 +924,7 @@ zfs_create_diskpart() f_eval_catch $funcname gpart \ "$GPART_ADD_ALIGN_LABEL_WITH_SIZE" \ "$align_big" boot$index freebsd-zfs \ -${bootsize}b $disk || -return $FAILURE +${bootsize}b $disk || return $FAILURE
svn commit: r339767 - in stable/11: lib/libpmc sys/amd64/include sys/dev/hwpmc sys/sys
Author: mmacy Date: Fri Oct 26 05:12:56 2018 New Revision: 339767 URL: https://svnweb.freebsd.org/changeset/base/339767 Log: hwpmc: Enable hwpmc support for AMD Family 17H devices Adds new counters and events for family 17H devices. Adds libpmc support for family 17H devices. Direct commit to 11 as this is supported by way of JSON counter descriptions on 12 & HEAD. Submitted by: Girish Nandibasappa Differential Revision:https://reviews.freebsd.org/D17464 Modified: stable/11/lib/libpmc/libpmc.c stable/11/sys/amd64/include/pmc_mdep.h stable/11/sys/dev/hwpmc/hwpmc_amd.c stable/11/sys/dev/hwpmc/hwpmc_amd.h stable/11/sys/dev/hwpmc/pmc_events.h stable/11/sys/sys/pmc.h Modified: stable/11/lib/libpmc/libpmc.c == --- stable/11/lib/libpmc/libpmc.c Fri Oct 26 04:53:29 2018 (r339766) +++ stable/11/lib/libpmc/libpmc.c Fri Oct 26 05:12:56 2018 (r339767) @@ -61,6 +61,8 @@ static int ucp_allocate_pmc(enum pmc_event _pe, char * struct pmc_op_pmcallocate *_pmc_config); static int k8_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); +static int f17h_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); static int p4_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); #endif @@ -157,6 +159,7 @@ struct pmc_class_descr { PMC_CLASSDEP_TABLE(iaf, IAF); PMC_CLASSDEP_TABLE(k7, K7); PMC_CLASSDEP_TABLE(k8, K8); +PMC_CLASSDEP_TABLE(f17h, F17H); PMC_CLASSDEP_TABLE(p4, P4); PMC_CLASSDEP_TABLE(p5, P5); PMC_CLASSDEP_TABLE(p6, P6); @@ -342,6 +345,7 @@ PMC_MDEP_TABLE(westmere, IAP, PMC_CLASS_SOFT, PMC_CLAS PMC_MDEP_TABLE(westmere_ex, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(k7, K7, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(k8, K8, PMC_CLASS_SOFT, PMC_CLASS_TSC); +PMC_MDEP_TABLE(f17h, F17H, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(p4, P4, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(p5, P5, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(p6, P6, PMC_CLASS_SOFT, PMC_CLASS_TSC); @@ -408,6 +412,7 @@ PMC_CLASS_TABLE_DESC(k7, K7, k7, k7); #endif #ifdefined(__i386__) || defined(__amd64__) PMC_CLASS_TABLE_DESC(k8, K8, k8, k8); +PMC_CLASS_TABLE_DESC(f17h, F17H, f17h, f17h); PMC_CLASS_TABLE_DESC(p4, P4, p4, p4); #endif #ifdefined(__i386__) @@ -1158,7 +1163,717 @@ ucp_allocate_pmc(enum pmc_event pe, char *ctrspec, return (0); } +/* AMD Fam17H PMCs */ +static struct pmc_event_alias f17h_aliases[] = { + EV_ALIAS("branches","ex_ret_brn_tkn"), + EV_ALIAS("branch-mispredicts", + "ex_ret_brn_tkn_misp"), + EV_ALIAS("cycles", "tsc"), + EV_ALIAS("dc-access", "ls_dc_access"), + EV_ALIAS("ic-misses", "ic_fw32_miss"), + EV_ALIAS("instructions","ex_ret_inst"), + EV_ALIAS("unhalted-cycles", "ls_not_halted_cycle"), + EV_ALIAS(NULL, NULL) +}; +#define__F17HMASK(N, V) PMCMASK(N, (1 << (V))) +static const struct pmc_masks f17h_mask_FPU_PIPEASSIGMENT[] = { + __F17HMASK(FPU_PIPEASSIGMENT_uOP_P0,0), + __F17HMASK(FPU_PIPEASSIGMENT_uOP_P1,1), + __F17HMASK(FPU_PIPEASSIGMENT_uOP_P2,2), + __F17HMASK(FPU_PIPEASSIGMENT_uOP_P3,3), + __F17HMASK(FPU_PIPEASSIGMENT_MultiuOP_P0, 4), + __F17HMASK(FPU_PIPEASSIGMENT_MultiuOP_P1, 5), + __F17HMASK(FPU_PIPEASSIGMENT_MultiuOP_P2, 6), + __F17HMASK(FPU_PIPEASSIGMENT_MultiuOP_P3, 7), + NULLMASK +}; +static const struct pmc_masks f17h_mask_FP_SCHED_EMPTY[] = { + __F17HMASK(FP_SCHED_EMPTY, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_FP_RET_X87_FPOPS[] = { + __F17HMASK(FP_RET_X87_ADDSUBOPS, 0), + __F17HMASK(FP_RET_X87_MULOPS, 1), + __F17HMASK(FP_RET_X87_DIVSQRTOPS, 2), + NULLMASK +}; +static const struct pmc_masks f17h_mask_FP_RET_SSEAVX_OPS[] = { + __F17HMASK(FP_RET_SSEAVX_SPADDSUBOPS, 0), + __F17HMASK(FP_RET_SSEAVX_SPMULOPS, 1), + __F17HMASK(FP_RET_SSEAVX_SPDIVOPS, 2), + __F17HMASK(FP_RET_SSEAVX_SPMULADDOPS, 3), + __F17HMASK(FP_RET_SSEAVX_DPADDSUBOPS, 4), + __F17HMASK(FP_RET_SSEAVX_DPMULOPS, 5), + __F17HMASK(FP_RET_SSEAVX_DPDIVOPS, 6), + __F17HMASK(FP_RET_SSEAVX_DPMULADDOPS, 7), + NULLMASK +}; +static const struct pmc_masks f17h_mask_FP_NUM_MOVELIM_SCAL_OPT[] = { + __F17HMASK(FP_NUM_SSEMOV_OPS, 0), + __F17HMASK(FP_NUM_SSEMOV_ELIM, 1), + __F17HMASK(FP_NUM_OPS_OPTPOT, 2), + __F17HMASK(FP_NUM_OPS_OPT, 3), + NULLMASK +}; +static const struct pmc_masks f17h_mask_FP_RET_SEROPS[] = { + __F17HMASK(FP_RET_SSE_BOTEXEC, 0), + __F17HMASK(FP_RET_SSE_CTRL, 1), + __F17HMASK
svn commit: r339766 - head/sys/sys
Author: imp Date: Fri Oct 26 04:53:29 2018 New Revision: 339766 URL: https://svnweb.freebsd.org/changeset/base/339766 Log: Remove #warning since it breaks libsysdecode Modified: head/sys/sys/joystick.h Modified: head/sys/sys/joystick.h == --- head/sys/sys/joystick.h Fri Oct 26 04:13:56 2018(r339765) +++ head/sys/sys/joystick.h Fri Oct 26 04:53:29 2018(r339766) @@ -49,6 +49,4 @@ struct joystick { #define JOY_GET_X_OFFSET _IOR('J', 5, int)/* get offset on X-axis */ #define JOY_GET_Y_OFFSET _IOR('J', 6, int)/* get offset on Y-axis */ -#warning "This interface is for obsolete hardware and will be removed in FreeBSD 13" - #endif /* !_SYS_JOYSTICK_H_ */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339765 - in head/sys: modules sys
Author: imp Date: Fri Oct 26 04:13:56 2018 New Revision: 339765 URL: https://svnweb.freebsd.org/changeset/base/339765 Log: Bump to 132 for sys/joystick.h removal reversion. Modified: head/sys/modules/Makefile head/sys/sys/param.h Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Fri Oct 26 04:11:58 2018(r339764) +++ head/sys/modules/Makefile Fri Oct 26 04:13:56 2018(r339765) @@ -205,7 +205,6 @@ SUBDIR= \ ${_ixv} \ ${_ixl} \ jme \ - joy \ kbdmux \ kgssapi \ kgssapi_krb5 \ Modified: head/sys/sys/param.h == --- head/sys/sys/param.hFri Oct 26 04:11:58 2018(r339764) +++ head/sys/sys/param.hFri Oct 26 04:13:56 2018(r339765) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 131 /* Master, propagated to newvers */ +#define __FreeBSD_version 132 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339764 - head/sys/sys
Author: imp Date: Fri Oct 26 04:11:58 2018 New Revision: 339764 URL: https://svnweb.freebsd.org/changeset/base/339764 Log: Add warning to sys/joystick.h announcing its planned demise. Modified: head/sys/sys/joystick.h Modified: head/sys/sys/joystick.h == --- head/sys/sys/joystick.h Fri Oct 26 04:10:32 2018(r339763) +++ head/sys/sys/joystick.h Fri Oct 26 04:11:58 2018(r339764) @@ -49,4 +49,6 @@ struct joystick { #define JOY_GET_X_OFFSET _IOR('J', 5, int)/* get offset on X-axis */ #define JOY_GET_Y_OFFSET _IOR('J', 6, int)/* get offset on Y-axis */ +#warning "This interface is for obsolete hardware and will be removed in FreeBSD 13" + #endif /* !_SYS_JOYSTICK_H_ */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339763 - in head: . share/man/man4 sys/conf sys/dev/joy sys/modules sys/modules/joy sys/sys tools/kerneldoc/subsys
Author: imp Date: Fri Oct 26 04:10:32 2018 New Revision: 339763 URL: https://svnweb.freebsd.org/changeset/base/339763 Log: Revert r339563. I held the mistaken belief this was completely unused. While the driver is unused and likely not relevant for a long time, sys/joystick.h lives on in maybe half a dozen ports, even though hardware to use it hasn't been widely used in maybe 15 years. Added: head/share/man/man4/joy.4 - copied unchanged from r339562, head/share/man/man4/joy.4 head/sys/dev/joy/joy.c - copied unchanged from r339562, head/sys/dev/joy/joy.c head/sys/dev/joy/joy_isa.c - copied unchanged from r339562, head/sys/dev/joy/joy_isa.c head/sys/dev/joy/joyvar.h - copied unchanged from r339562, head/sys/dev/joy/joyvar.h head/sys/modules/joy/Makefile - copied unchanged from r339562, head/sys/modules/joy/Makefile head/sys/sys/joystick.h - copied unchanged from r339562, head/sys/sys/joystick.h head/tools/kerneldoc/subsys/Doxyfile-dev_joy - copied unchanged from r339562, head/tools/kerneldoc/subsys/Doxyfile-dev_joy Modified: head/ObsoleteFiles.inc head/share/man/man4/Makefile head/sys/conf/NOTES head/sys/conf/files head/sys/modules/Makefile Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Fri Oct 26 04:05:48 2018(r339762) +++ head/ObsoleteFiles.inc Fri Oct 26 04:10:32 2018(r339763) @@ -45,9 +45,6 @@ OLD_LIBS+=usr/lib32/libcrypto.so.9 OLD_LIBS+=usr/lib32/libssl.so.9 # 20181021: mse(4) removal OLD_FILES+=usr/share/man/man4/mse.4.gz -# 20181021: joy(4) removal -OLD_FILES+=usr/share/man/man4/joy.4.gz -OLD_FILES+=usr/include/sys/joystick.h # 20181015: Stale libcasper(3) files following r329452 OLD_LIBS+=lib/casper/libcap_sysctl.so.0 OLD_LIBS+=lib/casper/libcap_grp.so.0 Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileFri Oct 26 04:05:48 2018 (r339762) +++ head/share/man/man4/MakefileFri Oct 26 04:10:32 2018 (r339763) @@ -239,6 +239,7 @@ MAN=aac.4 \ ixl.4 \ jedec_dimm.4 \ jme.4 \ + joy.4 \ kbdmux.4 \ keyboard.4 \ kld.4 \ Copied: head/share/man/man4/joy.4 (from r339562, head/share/man/man4/joy.4) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/joy.4 Fri Oct 26 04:10:32 2018(r339763, copy of r339562, head/share/man/man4/joy.4) @@ -0,0 +1,119 @@ +.\" +.\" $FreeBSD$ +.\" +.Dd January 23, 1995 +.Dt JOY 4 +.Os +.Sh NAME +.Nm joy +.Nd joystick device driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device joy" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +joy_load="YES" +.Ed +.Pp +In +.Pa /boot/device.hints : +.Cd hint.joy.0.at="isa" +.Cd hint.joy.0.port="0x201" +.Cd hint.joy.1.at="isa" +.Cd hint.joy.1.port="0x201" +.Pp +.In sys/joystick.h +.Sh DESCRIPTION +The joystick device driver allows applications to read the status of +the PC joystick. +.Pp +This device may be opened by only one process at a time. +.Pp +The joystick status is read from a structure via a read() +call. +The structure is defined in the header file as follows: +.Bd -literal -offset indent + struct joystick { + int x; /* x position */ + int y; /* y position */ + int b1;/* button 1 status */ + int b2;/* button 2 status */ + }; +.Ed +.Pp +Positions are typically in the range 0-2000. +.Ss One line perl example: +.Bd -literal -compact +perl -e 'open(JOY,"/dev/joy0")||die;while(1) +{sysread(JOY,$x,16);@j=unpack("",$x);print "@j\\n";sleep(1);}' +.Ed +.Ss ioctl calls +Several ioctl() calls are also available. +They take an argument of +type int * +.Bl -tag -width JOY_SET_X_OFFSET +.It Dv JOY_SETTIMEOUT Fa int *limit +Set the time limit (in microseconds) for reading the joystick +status. +Setting a value +too small may prevent to get correct values for the positions (which +are then set to -2147483648), however this can be useful if one is +only interested by the buttons status. +.It Dv JOY_GETTIMEOUT Fa int *limit +Get the time limit (in microseconds) used for reading the joystick +status. +.It Dv JOY_SET_X_OFFSET Fa int *offset +Set the value to be added to the X position when reading the joystick +status. +.It Dv JOY_SET_Y_OFFSET Fa int *offset +Set the value to be added to the Y position when reading the joystick +status. +.It Dv JOY_GET_X_OFFSET Fa int *offset +Get the value which is added to the X position when reading th
svn commit: r339762 - head/sys/modules/joy
Author: imp Date: Fri Oct 26 04:05:48 2018 New Revision: 339762 URL: https://svnweb.freebsd.org/changeset/base/339762 Log: add modules/joy before revert of r339563 Added: head/sys/modules/joy/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339761 - head/sys/dev/joy
Author: imp Date: Fri Oct 26 03:59:35 2018 New Revision: 339761 URL: https://svnweb.freebsd.org/changeset/base/339761 Log: Put sys/dev/joy back for the moment Added: head/sys/dev/joy/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r339563 - in head: . share/man/man4 sys/conf sys/dev/joy sys/modules sys/modules/joy sys/sys tools/kerneldoc/subsys
On Thu, Oct 25, 2018 at 9:30 PM Jan Beich wrote: > Warner Losh writes: > > > On Wed, Oct 24, 2018 at 9:42 AM Jan Beich wrote: > > > >> Warner Losh writes: > >> > >> > Author: imp > >> > Date: Mon Oct 22 02:34:00 2018 > >> > New Revision: 339563 > >> > URL: https://svnweb.freebsd.org/changeset/base/339563 > >> > > >> > Log: > >> > Remove joy(4) driver. > >> > > >> > This driver was marked as gone in 12. We're at 13 now. Remove it. > >> > Data from nycbug's dmesg cache shows only one potential user, > >> > suggesting it never was used much. > >> > > >> > RelNotes: yes > >> > Differential Revision: https://reviews.freebsd.org/D17629 > >> > >> Breaking userland API but not bothering with an exp-run or bumping > >> __FreeBSD_version. > >> Is the following the pointy hat you were looking for? > >> > >> > >> > https://forums.freebsd.org/threads/graphics-freeglut-fails-to-build-sys-joystick-h-not-found.68002/ > > > > > > Your tone is not acceptable. Please try again, only this time with the > > required level of professionalism. I'm not an idiot, and you will treat > me > > with respect. > > Apologies for the snide remark. I've expected someone with ports/ commit > bit > to be a bit more careful. > To be honest, I've never been burned before. It has been a learning lession. > > This driver was flagged for removal in 12 ages ago and the port failed to > > update to take that deprecation into account. > > Not sure what "ages ago" refers to when not even 1 year passed since > r328523. > Neither joy(4) manpage mentioned deprecation nor > __attribute__((deprecated)) > was used. Maintainers of consumers aren't necessarily joy(4) users. > But only joy(4) generates events and supports things described here. And joy(4) hasn't been relevant in this century. I thought this was totally safe. And I've not ever used / seen __attribute__((deprecated)). I will have to start using it. > Was joy(4) deprecation announced on the public mailing lists? For some > reason, > I can't easily find it in the archives. > I thought I had, but I'm not seeing it in my archives. > > You can use the bump to 130 as the version to fix it. I didn't bump > the > > revision because it wasn't needed. > > poudriere won't force rebuild everything if __FreeBSD_version doesn't > change. > Right. OK. I was not aware of that. > Expect silence from pkg-fallout@ until the next bump. > There was one earlier today. > > http://www.ipv6proxy.net/go.php?u=http://beefy12.nyi.freebsd.org/data/latest-per-pkg/sdl/1.2.15_12,2/head-amd64-default.log > > http://www.ipv6proxy.net/go.php?u=http://beefy12.nyi.freebsd.org/data/latest-per-pkg/plib/1.8.5_7/head-amd64-default.log > > vs. > > > http://beefy8.nyi.freebsd.org/data/latest-per-pkg/sdl/1.2.15_12,2/head-armv6-default.log > > http://beefy8.nyi.freebsd.org/data/latest-per-pkg/plib/1.8.5_7/head-armv6-default.log Yea, that's more extensive than I'd expected. > I posted a patch to the port that makes it compile for me to that thread. > > If there's confirmation that it works, i'll work with x...@freebsd.org to > > get it pushed in. Or just push it in myself since I'm on that list and > I'm > > a ports committer. > > https://codesearch.debian.net/search?q=sys/joystick.h could've been used > to guess a few consumers before pkg-fallout@ complains. > True. Most of them are bogus, but many are not. Given the number, I'm going to add sys/joystick.h back and bump the __FreeBSD_version and learn from my mistake. Warner ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r339563 - in head: . share/man/man4 sys/conf sys/dev/joy sys/modules sys/modules/joy sys/sys tools/kerneldoc/subsys
Warner Losh writes: > On Wed, Oct 24, 2018 at 9:42 AM Jan Beich wrote: > >> Warner Losh writes: >> >> > Author: imp >> > Date: Mon Oct 22 02:34:00 2018 >> > New Revision: 339563 >> > URL: https://svnweb.freebsd.org/changeset/base/339563 >> > >> > Log: >> > Remove joy(4) driver. >> > >> > This driver was marked as gone in 12. We're at 13 now. Remove it. >> > Data from nycbug's dmesg cache shows only one potential user, >> > suggesting it never was used much. >> > >> > RelNotes: yes >> > Differential Revision: https://reviews.freebsd.org/D17629 >> >> Breaking userland API but not bothering with an exp-run or bumping >> __FreeBSD_version. >> Is the following the pointy hat you were looking for? >> >> >> https://forums.freebsd.org/threads/graphics-freeglut-fails-to-build-sys-joystick-h-not-found.68002/ > > > Your tone is not acceptable. Please try again, only this time with the > required level of professionalism. I'm not an idiot, and you will treat me > with respect. Apologies for the snide remark. I've expected someone with ports/ commit bit to be a bit more careful. > This driver was flagged for removal in 12 ages ago and the port failed to > update to take that deprecation into account. Not sure what "ages ago" refers to when not even 1 year passed since r328523. Neither joy(4) manpage mentioned deprecation nor __attribute__((deprecated)) was used. Maintainers of consumers aren't necessarily joy(4) users. Was joy(4) deprecation announced on the public mailing lists? For some reason, I can't easily find it in the archives. > You can use the bump to 130 as the version to fix it. I didn't bump the > revision because it wasn't needed. poudriere won't force rebuild everything if __FreeBSD_version doesn't change. Expect silence from pkg-fallout@ until the next bump. http://www.ipv6proxy.net/go.php?u=http://beefy12.nyi.freebsd.org/data/latest-per-pkg/sdl/1.2.15_12,2/head-amd64-default.log http://www.ipv6proxy.net/go.php?u=http://beefy12.nyi.freebsd.org/data/latest-per-pkg/plib/1.8.5_7/head-amd64-default.log vs. http://beefy8.nyi.freebsd.org/data/latest-per-pkg/sdl/1.2.15_12,2/head-armv6-default.log http://beefy8.nyi.freebsd.org/data/latest-per-pkg/plib/1.8.5_7/head-armv6-default.log > I posted a patch to the port that makes it compile for me to that thread. > If there's confirmation that it works, i'll work with x...@freebsd.org to > get it pushed in. Or just push it in myself since I'm on that list and I'm > a ports committer. https://codesearch.debian.net/search?q=sys/joystick.h could've been used to guess a few consumers before pkg-fallout@ complains. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r339738 - in head: gnu/lib lib/csu lib/csu/aarch64 lib/csu/amd64 lib/csu/common lib/csu/i386 lib/csu/powerpc64 lib/csu/tests lib/csu/tests/dynamic lib/csu/tests/static share/mk tools/b
On Thu, Oct 25, 2018 at 12:40 PM Andrew Turner wrote: > > Author: andrew > Date: Thu Oct 25 17:39:41 2018 > New Revision: 339738 > URL: https://svnweb.freebsd.org/changeset/base/339738 > > Log: > Implement a BSD licensed crtbegin/crtend > > These are needed for .ctors/.dtors and .jcr handling. The former needs > all the function pointers to be called in the correct order from the > .init/.fini section. The latter just needs to call a gcj specific function > if it exists with a pointer to the start of the .jcr section. > > This is currently disabled until __dso_handle support is added. > > Reviewed by: emaste > MFC after:1 month > Sponsored by: DARPA, AFRL > Differential Revision:https://reviews.freebsd.org/D17587 > > Added: > head/lib/csu/aarch64/crt.h (contents, props changed) > head/lib/csu/amd64/crt.h (contents, props changed) > head/lib/csu/common/crtbegin.c (contents, props changed) > head/lib/csu/common/crtend.c (contents, props changed) > head/lib/csu/i386/crt.h (contents, props changed) > head/lib/csu/powerpc64/crt.h (contents, props changed) > head/lib/csu/tests/ > head/lib/csu/tests/Makefile (contents, props changed) > head/lib/csu/tests/Makefile.inc (contents, props changed) > head/lib/csu/tests/Makefile.tests (contents, props changed) > head/lib/csu/tests/cxx_constructors.cc (contents, props changed) > head/lib/csu/tests/dynamic/ > head/lib/csu/tests/dynamic/Makefile (contents, props changed) > head/lib/csu/tests/fini_test.c (contents, props changed) > head/lib/csu/tests/init_test.c (contents, props changed) > head/lib/csu/tests/static/ > head/lib/csu/tests/static/Makefile (contents, props changed) > head/tools/build/options/WITHOUT_BSD_CRTBEGIN (contents, props changed) > head/tools/build/options/WITH_BSD_CRTBEGIN (contents, props changed) > Modified: > head/gnu/lib/Makefile > head/lib/csu/Makefile > head/lib/csu/Makefile.inc > head/share/mk/src.opts.mk > Hi, The tests seems to have given CI some heartburn on ppc64/riscv64 after they were enabled: https://ci.freebsd.org/job/FreeBSD-head-powerpc64-build/7811/console Thanks, Kyle Evans ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339760 - head/usr.sbin/bsdinstall/scripts
Author: dteske Date: Fri Oct 26 02:08:44 2018 New Revision: 339760 URL: https://svnweb.freebsd.org/changeset/base/339760 Log: Fix dialog autosizing in bsdinstall auto error messages Sponsored by: Smule, Inc. Modified: head/usr.sbin/bsdinstall/scripts/auto Modified: head/usr.sbin/bsdinstall/scripts/auto == --- head/usr.sbin/bsdinstall/scripts/auto Fri Oct 26 01:57:32 2018 (r339759) +++ head/usr.sbin/bsdinstall/scripts/auto Fri Oct 26 02:08:44 2018 (r339760) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2018 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -33,30 +33,58 @@ BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 f_include $BSDCFG_SHARE/dialog.subr - FUNCTIONS + GLOBALS -error() { - local msg - if [ -n "$1" ]; then - msg="$1\n\n" - fi - test -n "$DISTDIR_IS_UNIONFS" && umount -f $BSDINSTALL_DISTDIR - test -f $PATH_FSTAB && bsdinstall umount - dialog --backtitle "FreeBSD Installer" --title "Abort" \ - --no-label "Exit" --yes-label "Restart" --yesno \ - "${msg}An installation step has been aborted. Would you like to restart the installation or exit the installer?" 0 0 - if [ $? -ne 0 ]; then - exit 1 - else - exec $0 - fi -} - +# +# Strings that should be moved to an i18n file and loaded with f_include_lang() +# hline_arrows_tab_enter="Press arrows, TAB or ENTER" +hline_arrows_tab_space_enter="Press arrows, TAB, SPACE or ENTER" +msg_abort="Abort" +msg_exit="Exit" +msg_freebsd_installer="FreeBSD Installer" msg_gpt_active_fix="Your hardware is known to have issues booting in CSM/Legacy/BIOS mode from GPT partitions that are not set active. Would you like the installer to apply this workaround for you?" msg_lenovo_fix="Your model of Lenovo is known to have a BIOS bug that prevents it booting from GPT partitions without UEFI. Would you like the installer to apply a workaround for you?" +msg_an_installation_step_has_been_aborted="An installation step has been aborted. Would you like\nto restart the installation or exit the installer?" msg_no="NO" +msg_restart="Restart" msg_yes="YES" + + FUNCTIONS + +# error [$msg] +# +# Display generic error message when a script fails. An optional message +# argument can preceed the generic message. User is given the choice of +# restarting the installer or exiting. +# +error() +{ + local title="$msg_abort" + local btitle="$msg_freebsd_installer" + local prompt="${1:+$1\n\n}$msg_an_installation_step_has_been_aborted" + local hline="$hline_arrows_tab_space_enter" + + [ "$DISTDIR_IS_UNIONFS" ] && umount -f "$BSDINSTALL_DISTDIR" + [ -f "$PATH_FSTAB" ] && bsdinstall umount + + local height width + f_dialog_buttonbox_size height width \ + "$title" "$btitle" "$prompt" "$hline" + + if $DIALOG \ + --title "$title" \ + --backtitle "$btitle" \ + --hline "$hline" \ + --no-label "$msg_exit" \ + --yes-label "$msg_restart" \ + --yesno "$prompt" $height $width + then + exec $0 + # NOTREACHED + fi + exit 1 +} # dialog_workaround # ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339759 - head/usr.sbin/bsdinstall/scripts
Author: dteske Date: Fri Oct 26 01:57:32 2018 New Revision: 339759 URL: https://svnweb.freebsd.org/changeset/base/339759 Log: Whitespace alignment in bsdinstall hostname Aligning line-continuation characters to prevent mistakes. This is also the prevalent style replication throughout. Sponsored by: Smule, Inc. Modified: head/usr.sbin/bsdinstall/scripts/hostname Modified: head/usr.sbin/bsdinstall/scripts/hostname == --- head/usr.sbin/bsdinstall/scripts/hostname Fri Oct 26 01:47:52 2018 (r339758) +++ head/usr.sbin/bsdinstall/scripts/hostname Fri Oct 26 01:57:32 2018 (r339759) @@ -79,13 +79,13 @@ dialog_hostname() "$DIALOG_TITLE" "$DIALOG_BACKTITLE" "$prompt" "$value" "$hline" $DIALOG \ - --title "$DIALOG_TITLE" \ + --title "$DIALOG_TITLE" \ --backtitle "$DIALOG_BACKTITLE" \ - --hline "$hline" \ - --ok-label "$msg_ok" \ - --no-cancel \ - --inputbox "$prompt" \ - $height $width "$value" \ + --hline "$hline"\ + --ok-label "$msg_ok"\ + --no-cancel \ + --inputbox "$prompt"\ + $height $width "$value" \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339758 - head/usr.sbin/bsdinstall/scripts
Author: dteske Date: Fri Oct 26 01:47:52 2018 New Revision: 339758 URL: https://svnweb.freebsd.org/changeset/base/339758 Log: Sort i18n strings in bsdinstall hostname Sponsored by: Smule, Inc. Modified: head/usr.sbin/bsdinstall/scripts/hostname Modified: head/usr.sbin/bsdinstall/scripts/hostname == --- head/usr.sbin/bsdinstall/scripts/hostname Fri Oct 26 01:13:20 2018 (r339757) +++ head/usr.sbin/bsdinstall/scripts/hostname Fri Oct 26 01:47:52 2018 (r339758) @@ -51,10 +51,10 @@ f_include $BSDCFG_SHARE/dialog.subr # # Strings that should be moved to an i18n file and loaded with f_include_lang() # -msg_set_hostname="Set Hostname" -msg_please_choose_a_hostname="Please choose a hostname for this machine.\n\nIf you are running on a managed network, please ask\nyour network administrator for an appropriate name." -msg_ok="OK" msg_freebsd_installer="FreeBSD Installer" +msg_ok="OK" +msg_please_choose_a_hostname="Please choose a hostname for this machine.\n\nIf you are running on a managed network, please ask\nyour network administrator for an appropriate name." +msg_set_hostname="Set Hostname" # # Command strings for various tasks ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339757 - head
Author: emaste Date: Fri Oct 26 01:13:20 2018 New Revision: 339757 URL: https://svnweb.freebsd.org/changeset/base/339757 Log: Update elftoolchain bootstrapping test after r339083 Sponsored by: The FreeBSD Foundation Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Fri Oct 26 01:06:03 2018(r339756) +++ head/Makefile.inc1 Fri Oct 26 01:13:20 2018(r339757) @@ -1934,7 +1934,8 @@ update: .PHONY # r310724 fixed PR 215350, a crash in libdwarf with objects built by GCC 6.2. # r334881 added libdwarf constants used by ctfconvert. # r338478 fixed a crash in objcopy for mips64el objects -.if ${BOOTSTRAPPING} < 1200084 +# r339083 libelf: correct mips64el test to use ELF header +.if ${BOOTSTRAPPING} < 1200085 _elftoolchain_libs= lib/libelf lib/libdwarf .endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339756 - head/usr.sbin/bsdinstall/scripts
Author: dteske Date: Fri Oct 26 01:06:03 2018 New Revision: 339756 URL: https://svnweb.freebsd.org/changeset/base/339756 Log: Add improved error checking to bsdinstall hostname Sponsored by: Smule, Inc. Modified: head/usr.sbin/bsdinstall/scripts/hostname Modified: head/usr.sbin/bsdinstall/scripts/hostname == --- head/usr.sbin/bsdinstall/scripts/hostname Fri Oct 26 00:08:27 2018 (r339755) +++ head/usr.sbin/bsdinstall/scripts/hostname Fri Oct 26 01:06:03 2018 (r339756) @@ -56,6 +56,12 @@ msg_please_choose_a_hostname="Please choose a hostname msg_ok="OK" msg_freebsd_installer="FreeBSD Installer" +# +# Command strings for various tasks +# +ECHO_OVERWRITE='echo "%s" > "%s"' +SET_HOSTNAME='hostname -s "%s"' + FUNCTIONS # dialog_hostname @@ -100,14 +106,15 @@ HOSTNAME=$( dialog_hostname "$HOSTNAME" ) # # Store the user's choice # -echo "hostname=\"$HOSTNAME\"" > "$HOSTNAMEFILE" +f_eval_catch "$pgm" echo "$ECHO_OVERWRITE" \ + 'hostname=\"$HOSTNAME\"' "$HOSTNAMEFILE" retval=$? # # Activate entry if configured # if [ "$BSDINSTALL_CONFIGCURRENT" ]; then - hostname -s "$HOSTNAME" + f_eval_catch "$pgm" hostname "$SET_HOSTNAME" "$HOSTNAME" retval=$? fi ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339755 - head/usr.sbin/bsdinstall/scripts
Author: dteske Date: Fri Oct 26 00:08:27 2018 New Revision: 339755 URL: https://svnweb.freebsd.org/changeset/base/339755 Log: Fix dialog autosizing in bsdinstall hostname Sponsored by: Smule, Inc. Modified: head/usr.sbin/bsdinstall/scripts/hostname Modified: head/usr.sbin/bsdinstall/scripts/hostname == --- head/usr.sbin/bsdinstall/scripts/hostname Fri Oct 26 00:05:46 2018 (r339754) +++ head/usr.sbin/bsdinstall/scripts/hostname Fri Oct 26 00:08:27 2018 (r339755) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn -# Copyright (c) 2015 Devin Teske +# Copyright (c) 2015-2018 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -26,27 +26,93 @@ # SUCH DAMAGE. # # $FreeBSD$ +# + INCLUDES -: ${DIALOG_OK=0} -: ${DIALOG_CANCEL=1} -: ${DIALOG_HELP=2} -: ${DIALOG_EXTRA=3} -: ${DIALOG_ITEM_HELP=4} -: ${DIALOG_ESC=255} +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading_includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr -exec 3>&1 -HOSTNAME=`dialog --backtitle 'FreeBSD Installer' --title 'Set Hostname' --nocancel --inputbox \ - 'Please choose a hostname for this machine. + CONFIGURATION -If you are running on a managed network, please ask your network administrator for an appropriate name.' \ - 0 0 $(hostname) 2>&1 1>&3` -if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi -exec 3>&- +# +# Default value +# +: ${HOSTNAME=$( hostname )} -echo "hostname=\"$HOSTNAME\"" > $BSDINSTALL_TMPETC/rc.conf.hostname +# +# Default file to store hostname entry in +# +: ${HOSTNAMEFILE:=$BSDINSTALL_TMPETC/rc.conf.hostname} + + GLOBALS + +# +# Strings that should be moved to an i18n file and loaded with f_include_lang() +# +msg_set_hostname="Set Hostname" +msg_please_choose_a_hostname="Please choose a hostname for this machine.\n\nIf you are running on a managed network, please ask\nyour network administrator for an appropriate name." +msg_ok="OK" +msg_freebsd_installer="FreeBSD Installer" + + FUNCTIONS + +# dialog_hostname +# +# Display input box (without cancel button) for user to enter desired hostname. +# +dialog_hostname() +{ + local prompt="$msg_please_choose_a_hostname" + local hline= + local value="$*" + + local height width + f_dialog_inputbox_size height width \ + "$DIALOG_TITLE" "$DIALOG_BACKTITLE" "$prompt" "$value" "$hline" + + $DIALOG \ + --title "$DIALOG_TITLE" \ + --backtitle "$DIALOG_BACKTITLE" \ + --hline "$hline" \ + --ok-label "$msg_ok" \ + --no-cancel \ + --inputbox "$prompt" \ + $height $width "$value" \ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD +} + + MAIN + +# +# Initialize +# +f_dialog_title "$msg_set_hostname" +f_dialog_backtitle "$msg_freebsd_installer" + +# +# Get user input +# +HOSTNAME=$( dialog_hostname "$HOSTNAME" ) +[ $? -eq $DIALOG_CANCEL ] && exit 1 + +# +# Store the user's choice +# +echo "hostname=\"$HOSTNAME\"" > "$HOSTNAMEFILE" retval=$? + +# +# Activate entry if configured +# if [ "$BSDINSTALL_CONFIGCURRENT" ]; then hostname -s "$HOSTNAME" retval=$? fi + exit $retval + + +# END + ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339754 - in head/sys/dev: acpi_support acpica amdgpio asmc fdc gpio hyperv/vmbus ichiic intel ipmi sdhci tpm
Author: takawata Date: Fri Oct 26 00:05:46 2018 New Revision: 339754 URL: https://svnweb.freebsd.org/changeset/base/339754 Log: Distinguish _CID match and _HID match and make lower priority probe when _CID match. Reviewed by: jhb, imp Differential Revision:https://reviews.freebsd.org/D16468 Modified: head/sys/dev/acpi_support/acpi_asus.c head/sys/dev/acpi_support/acpi_fujitsu.c head/sys/dev/acpi_support/acpi_ibm.c head/sys/dev/acpi_support/acpi_panasonic.c head/sys/dev/acpi_support/acpi_rapidstart.c head/sys/dev/acpi_support/acpi_sony.c head/sys/dev/acpi_support/acpi_toshiba.c head/sys/dev/acpi_support/acpi_wmi.c head/sys/dev/acpi_support/atk0110.c head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpi_acad.c head/sys/dev/acpica/acpi_button.c head/sys/dev/acpica/acpi_cmbat.c head/sys/dev/acpica/acpi_container.c head/sys/dev/acpica/acpi_cpu.c head/sys/dev/acpica/acpi_ec.c head/sys/dev/acpica/acpi_hpet.c head/sys/dev/acpica/acpi_if.m head/sys/dev/acpica/acpi_isab.c head/sys/dev/acpica/acpi_lid.c head/sys/dev/acpica/acpi_pci_link.c head/sys/dev/acpica/acpi_resource.c head/sys/dev/acpica/acpi_smbat.c head/sys/dev/acpica/acpivar.h head/sys/dev/amdgpio/amdgpio.c head/sys/dev/asmc/asmc.c head/sys/dev/fdc/fdc_acpi.c head/sys/dev/gpio/bytgpio.c head/sys/dev/gpio/chvgpio.c head/sys/dev/hyperv/vmbus/vmbus_res.c head/sys/dev/ichiic/ig4_acpi.c head/sys/dev/intel/spi.c head/sys/dev/ipmi/ipmi_acpi.c head/sys/dev/sdhci/sdhci_acpi.c head/sys/dev/tpm/tpm_acpi.c Modified: head/sys/dev/acpi_support/acpi_asus.c == --- head/sys/dev/acpi_support/acpi_asus.c Fri Oct 26 00:00:13 2018 (r339753) +++ head/sys/dev/acpi_support/acpi_asus.c Fri Oct 26 00:05:46 2018 (r339754) @@ -549,15 +549,16 @@ acpi_asus_probe(device_t dev) ACPI_OBJECT Arg, *Obj; ACPI_OBJECT_LISTArgs; static char *asus_ids[] = { "ATK0100", "ASUS010", NULL }; + int rv; char *rstr; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); if (acpi_disabled("asus")) return (ENXIO); - rstr = ACPI_ID_PROBE(device_get_parent(dev), dev, asus_ids); - if (rstr == NULL) { - return (ENXIO); + rv = ACPI_ID_PROBE(device_get_parent(dev), dev, asus_ids, &rstr); + if (rv > 0) { + return (rv); } sc = device_get_softc(dev); @@ -595,7 +596,7 @@ acpi_asus_probe(device_t dev) sc->model = &acpi_samsung_models[0]; device_set_desc(dev, "Samsung P30 Laptop Extras"); AcpiOsFree(Buf.Pointer); - return (0); + return (rv); } /* EeePC */ @@ -603,7 +604,7 @@ acpi_asus_probe(device_t dev) sc->model = &acpi_eeepc_models[0]; device_set_desc(dev, "ASUS EeePC"); AcpiOsFree(Buf.Pointer); - return (0); + return (rv); } } @@ -627,7 +628,7 @@ good: sbuf_delete(sb); AcpiOsFree(Buf.Pointer); - return (0); + return (rv); } /* Modified: head/sys/dev/acpi_support/acpi_fujitsu.c == --- head/sys/dev/acpi_support/acpi_fujitsu.cFri Oct 26 00:00:13 2018 (r339753) +++ head/sys/dev/acpi_support/acpi_fujitsu.cFri Oct 26 00:05:46 2018 (r339754) @@ -228,16 +228,15 @@ acpi_fujitsu_probe(device_t dev) { char *name; char buffer[64]; + int rv; - name = ACPI_ID_PROBE(device_get_parent(dev), dev, fujitsu_ids); - if (acpi_disabled("fujitsu") || name == NULL || - device_get_unit(dev) > 1) + rv = ACPI_ID_PROBE(device_get_parent(dev), dev, fujitsu_ids, &name); + if (acpi_disabled("fujitsu") || rv > 0 || device_get_unit(dev) > 1) return (ENXIO); - sprintf(buffer, "Fujitsu Function Hotkeys %s", name); device_set_desc_copy(dev, buffer); - return (0); + return (rv); } static int Modified: head/sys/dev/acpi_support/acpi_ibm.c == --- head/sys/dev/acpi_support/acpi_ibm.cFri Oct 26 00:00:13 2018 (r339753) +++ head/sys/dev/acpi_support/acpi_ibm.cFri Oct 26 00:05:46 2018 (r339754) @@ -411,14 +411,17 @@ acpi_ibm_mic_led_set (struct acpi_ibm_softc *sc, int a static int acpi_ibm_probe(device_t dev) { + int rv; + if (acpi_disabled("ibm") || - ACPI_ID_PROBE(device_get_parent(dev), dev, ibm_ids) == NULL || device_get_unit(
svn commit: r339753 - stable/12/sys/conf
Author: gjb Date: Fri Oct 26 00:00:13 2018 New Revision: 339753 URL: https://svnweb.freebsd.org/changeset/base/339753 Log: Update stable/12 from BETA1 to BETA2 as part of the 12.0-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/conf/newvers.sh Modified: stable/12/sys/conf/newvers.sh == --- stable/12/sys/conf/newvers.sh Thu Oct 25 23:32:32 2018 (r339752) +++ stable/12/sys/conf/newvers.sh Fri Oct 26 00:00:13 2018 (r339753) @@ -46,7 +46,7 @@ TYPE="FreeBSD" REVISION="12.0" -BRANCH="BETA1" +BRANCH="BETA2" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339752 - head/usr.sbin/bsdconfig/share
Author: dteske Date: Thu Oct 25 23:32:32 2018 New Revision: 339752 URL: https://svnweb.freebsd.org/changeset/base/339752 Log: Remove vestigial DIALOG_ITEM_HELP value in bsdconfig dialog.subr Sponsored by: Smule, Inc. Modified: head/usr.sbin/bsdconfig/share/dialog.subr Modified: head/usr.sbin/bsdconfig/share/dialog.subr == --- head/usr.sbin/bsdconfig/share/dialog.subr Thu Oct 25 23:13:19 2018 (r339751) +++ head/usr.sbin/bsdconfig/share/dialog.subr Thu Oct 25 23:32:32 2018 (r339752) @@ -79,7 +79,6 @@ unset XDIALOG_INFOBOX_TIMEOUT DIALOG_OK=${SUCCESS:-0} DIALOG_CANCEL=${FAILURE:-1} DIALOG_HELP=2 -DIALOG_ITEM_HELP=2 DIALOG_EXTRA=3 DIALOG_ITEM_HELP=4 export DIALOG_ERROR=254 # sh(1) can't handle the default of `-1' ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339751 - head/contrib/libarchive/libarchive
Author: mm Date: Thu Oct 25 23:13:19 2018 New Revision: 339751 URL: https://svnweb.freebsd.org/changeset/base/339751 Log: MFV r339750: Sync libarchive with vendor. Relevant vendor changes: RAR5 reader: FreeBSD build platform fixes for powerpc(64), mips(64), sparc64 and riscv64 MFC after:1 month Modified: head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c == --- head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c Thu Oct 25 23:10:06 2018(r339750) +++ head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c Thu Oct 25 23:13:19 2018(r339751) @@ -737,11 +737,11 @@ static void dist_cache_push(struct rar5* rar, int valu q[0] = value; } -static int dist_cache_touch(struct rar5* rar, int index) { +static int dist_cache_touch(struct rar5* rar, int idx) { int* q = rar->cstate.dist_cache; -int i, dist = q[index]; +int i, dist = q[idx]; -for(i = index; i > 0; i--) +for(i = idx; i > 0; i--) q[i] = q[i - 1]; q[0] = dist; @@ -1500,10 +1500,10 @@ static int process_head_main(struct archive_read* a, s (void) entry; int ret; -size_t extra_data_size, -extra_field_size, -extra_field_id, -archive_flags; +size_t extra_data_size = 0; +size_t extra_field_size = 0; +size_t extra_field_id = 0; +size_t archive_flags = 0; if(block_flags & HFL_EXTRA_DATA) { if(!read_var_sized(a, &extra_data_size, NULL)) @@ -1528,7 +1528,7 @@ static int process_head_main(struct archive_read* a, s rar->main.solid = (archive_flags & SOLID) > 0; if(archive_flags & VOLUME_NUMBER) { -size_t v; +size_t v = 0; if(!read_var_sized(a, &v, NULL)) { return ARCHIVE_EOF; } @@ -1644,7 +1644,8 @@ static int process_base_block(struct archive_read* a, struct rar5* rar = get_context(a); uint32_t hdr_crc, computed_crc; size_t raw_hdr_size, hdr_size_len, hdr_size; -size_t header_id, header_flags; +size_t header_id = 0; +size_t header_flags = 0; const uint8_t* p; int ret; @@ -2529,8 +2530,8 @@ static int do_uncompress_block(struct archive_read* a, continue; } else if(num < 262) { -const int index = num - 258; -const int dist = dist_cache_touch(rar, index); +const int idx = num - 258; +const int dist = dist_cache_touch(rar, idx); uint16_t len_slot; int len; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339750 - vendor/libarchive/dist/libarchive
Author: mm Date: Thu Oct 25 23:10:06 2018 New Revision: 339750 URL: https://svnweb.freebsd.org/changeset/base/339750 Log: Update vendor/libarchive/dist to git 1266f6d281a6d7c6604a8c14cdad14dc83ea4b88 Relevant vendor changes: RAR5 reader: FreeBSD build platform fixes for powerpc(64), mips(64), sparc64 and riscv64 Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c == --- vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c Thu Oct 25 22:55:18 2018(r339749) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c Thu Oct 25 23:10:06 2018(r339750) @@ -737,11 +737,11 @@ static void dist_cache_push(struct rar5* rar, int valu q[0] = value; } -static int dist_cache_touch(struct rar5* rar, int index) { +static int dist_cache_touch(struct rar5* rar, int idx) { int* q = rar->cstate.dist_cache; -int i, dist = q[index]; +int i, dist = q[idx]; -for(i = index; i > 0; i--) +for(i = idx; i > 0; i--) q[i] = q[i - 1]; q[0] = dist; @@ -1500,10 +1500,10 @@ static int process_head_main(struct archive_read* a, s (void) entry; int ret; -size_t extra_data_size, -extra_field_size, -extra_field_id, -archive_flags; +size_t extra_data_size = 0; +size_t extra_field_size = 0; +size_t extra_field_id = 0; +size_t archive_flags = 0; if(block_flags & HFL_EXTRA_DATA) { if(!read_var_sized(a, &extra_data_size, NULL)) @@ -1528,7 +1528,7 @@ static int process_head_main(struct archive_read* a, s rar->main.solid = (archive_flags & SOLID) > 0; if(archive_flags & VOLUME_NUMBER) { -size_t v; +size_t v = 0; if(!read_var_sized(a, &v, NULL)) { return ARCHIVE_EOF; } @@ -1644,7 +1644,8 @@ static int process_base_block(struct archive_read* a, struct rar5* rar = get_context(a); uint32_t hdr_crc, computed_crc; size_t raw_hdr_size, hdr_size_len, hdr_size; -size_t header_id, header_flags; +size_t header_id = 0; +size_t header_flags = 0; const uint8_t* p; int ret; @@ -2529,8 +2530,8 @@ static int do_uncompress_block(struct archive_read* a, continue; } else if(num < 262) { -const int index = num - 258; -const int dist = dist_cache_touch(rar, index); +const int idx = num - 258; +const int dist = dist_cache_touch(rar, idx); uint16_t len_slot; int len; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339749 - head/sys/dev/cxgbe
Author: np Date: Thu Oct 25 22:55:18 2018 New Revision: 339749 URL: https://svnweb.freebsd.org/changeset/base/339749 Log: cxgbe(4): Add a knob to split the rx queues for a netmap enabled interface into two groups. Filters can be used to match traffic and distribute it across a group. hw.cxgbe.nm_split_rss Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_netmap.c Modified: head/sys/dev/cxgbe/t4_netmap.c == --- head/sys/dev/cxgbe/t4_netmap.c Thu Oct 25 22:16:34 2018 (r339748) +++ head/sys/dev/cxgbe/t4_netmap.c Thu Oct 25 22:55:18 2018 (r339749) @@ -101,6 +101,15 @@ int lazy_tx_credit_flush = 1; SYSCTL_INT(_hw_cxgbe, OID_AUTO, lazy_tx_credit_flush, CTLFLAG_RWTUN, &lazy_tx_credit_flush, 0, "lazy credit flush for netmap tx queues."); +/* + * Split the netmap rx queues into two groups that populate separate halves of + * the RSS indirection table. This allows filters with hashmask to steer to a + * particular group of queues. + */ +static int nm_split_rss = 0; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nm_split_rss, CTLFLAG_RWTUN, +&nm_split_rss, 0, "Split the netmap rx queues into two groups."); + static int alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq *nm_rxq, int cong) { @@ -333,7 +342,7 @@ cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi struct netmap_kring *kring; struct sge_nm_rxq *nm_rxq; struct sge_nm_txq *nm_txq; - int rc, i, j, hwidx; + int rc, i, j, hwidx, defq, nrssq; struct hw_buf_info *hwb; ASSERT_SYNCHRONIZED_OP(sc); @@ -403,20 +412,69 @@ cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi vi->nm_rss = malloc(vi->rss_size * sizeof(uint16_t), M_CXGBE, M_ZERO | M_WAITOK); } - for (i = 0; i < vi->rss_size;) { - for_each_nm_rxq(vi, j, nm_rxq) { - vi->nm_rss[i++] = nm_rxq->iq_abs_id; - if (i == vi->rss_size) - break; + + MPASS(vi->nnmrxq > 0); + if (nm_split_rss == 0 || vi->nnmrxq == 1) { + for (i = 0; i < vi->rss_size;) { + for_each_nm_rxq(vi, j, nm_rxq) { + vi->nm_rss[i++] = nm_rxq->iq_abs_id; + if (i == vi->rss_size) + break; + } } + defq = vi->nm_rss[0]; + } else { + /* We have multiple queues and we want to split the table. */ + MPASS(nm_split_rss != 0); + MPASS(vi->nnmrxq > 1); + + nm_rxq = &sc->sge.nm_rxq[vi->first_nm_rxq]; + nrssq = vi->nnmrxq; + if (vi->nnmrxq & 1) { + /* +* Odd number of queues. The first rxq is designated the +* default queue, the rest are split evenly. +*/ + defq = nm_rxq->iq_abs_id; + nm_rxq++; + nrssq--; + } else { + /* +* Even number of queues split into two halves. The +* first rxq in one of the halves is designated the +* default queue. +*/ +#if 1 + /* First rxq in the first half. */ + defq = nm_rxq->iq_abs_id; +#else + /* First rxq in the second half. */ + defq = nm_rxq[vi->nnmrxq / 2].iq_abs_id; +#endif + } + + i = 0; + while (i < vi->rss_size / 2) { + for (j = 0; j < nrssq / 2; j++) { + vi->nm_rss[i++] = nm_rxq[j].iq_abs_id; + if (i == vi->rss_size / 2) + break; + } + } + while (i < vi->rss_size) { + for (j = nrssq / 2; j < nrssq; j++) { + vi->nm_rss[i++] = nm_rxq[j].iq_abs_id; + if (i == vi->rss_size) + break; + } + } } rc = -t4_config_rss_range(sc, sc->mbox, vi->viid, 0, vi->rss_size, vi->nm_rss, vi->rss_size); if (rc != 0) if_printf(ifp, "netmap rss_config failed: %d\n", rc); - rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, vi->hashen, - vi->nm_rss[0], 0, 0); + rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, vi->hashen, defq, 0, 0); if (rc != 0) if_printf(ifp, "netmap rss hash/defaultq config failed: %d\n", rc); ___ svn-src-all@freebsd.org mailing l
svn commit: r339748 - in head: lib/libc/sys sys/cddl/compat/opensolaris/sys sys/compat/cloudabi sys/compat/linux sys/kern sys/sys sys/ufs/ffs
Author: kib Date: Thu Oct 25 22:16:34 2018 New Revision: 339748 URL: https://svnweb.freebsd.org/changeset/base/339748 Log: Implement O_BENEATH and AT_BENEATH. Flags prevent open(2) and *at(2) vfs syscalls name lookup from escaping the starting directory. Supposedly the interface is similar to the same proposed Linux flags. Reviewed by: jilles (code, previous version of manpages), 0mp (manpages) Discussed with: allanjude, emaste, jonathan Sponsored by: The FreeBSD Foundation Differential revision:https://reviews.freebsd.org/D17547 Modified: head/lib/libc/sys/access.2 head/lib/libc/sys/chflags.2 head/lib/libc/sys/chmod.2 head/lib/libc/sys/chown.2 head/lib/libc/sys/link.2 head/lib/libc/sys/open.2 head/lib/libc/sys/stat.2 head/lib/libc/sys/unlink.2 head/lib/libc/sys/utimensat.2 head/sys/cddl/compat/opensolaris/sys/vnode.h head/sys/compat/cloudabi/cloudabi_file.c head/sys/compat/linux/linux_file.c head/sys/kern/vfs_lookup.c head/sys/kern/vfs_mountroot.c head/sys/kern/vfs_syscalls.c head/sys/kern/vfs_vnops.c head/sys/sys/fcntl.h head/sys/sys/namei.h head/sys/sys/syscallsubr.h head/sys/ufs/ffs/ffs_alloc.c Modified: head/lib/libc/sys/access.2 == --- head/lib/libc/sys/access.2 Thu Oct 25 21:45:24 2018(r339747) +++ head/lib/libc/sys/access.2 Thu Oct 25 22:16:34 2018(r339748) @@ -28,7 +28,7 @@ .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" $FreeBSD$ .\" -.Dd September 15, 2014 +.Dd October 20, 2018 .Dt ACCESS 2 .Os .Sh NAME @@ -120,6 +120,8 @@ list, defined in The checks for accessibility are performed using the effective user and group IDs instead of the real user and group ID as required in a call to .Fn access . +.It Dv AT_BENEATH +Only operate on files and directories below the starting directory. .El .Pp Even if a process's real or effective user has appropriate privileges @@ -195,6 +197,15 @@ argument is not an absolute path and is neither .Dv AT_FDCWD nor a file descriptor associated with a directory. +.It Bq Er ENOTCAPABLE +The +.Dv AT_BENEATH +flag was specified but +.Fa path +is not strictly relative to the starting directory. +For example, +.Fa path +is absolute or includes a ".." component that escapes the starting directory. .El .Sh SEE ALSO .Xr chmod 2 , Modified: head/lib/libc/sys/chflags.2 == --- head/lib/libc/sys/chflags.2 Thu Oct 25 21:45:24 2018(r339747) +++ head/lib/libc/sys/chflags.2 Thu Oct 25 22:16:34 2018(r339748) @@ -28,7 +28,7 @@ .\"@(#)chflags.2 8.3 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd March 22, 2013 +.Dd October 20, 2018 .Dt CHFLAGS 2 .Os .Sh NAME @@ -94,6 +94,9 @@ defined in If .Fa path names a symbolic link, then the flags of the symbolic link are changed. +.It Dv AT_BENEATH +Only allow to change flags for a file which is beneath of +the starting directory. .El .Pp If @@ -302,6 +305,15 @@ error occurred while reading from or writing to the fi The underlying file system does not support file flags, or does not support all of the flags set in .Fa flags . +.It Bq Er ENOTCAPABLE +The +.Dv AT_BENEATH +flag was specified but +.Fa path +is not strictly relative to the starting directory. +For example, +.Fa path +is absolute or includes a ".." component that escapes the starting directory. .El .Sh SEE ALSO .Xr chflags 1 , Modified: head/lib/libc/sys/chmod.2 == --- head/lib/libc/sys/chmod.2 Thu Oct 25 21:45:24 2018(r339747) +++ head/lib/libc/sys/chmod.2 Thu Oct 25 22:16:34 2018(r339748) @@ -28,7 +28,7 @@ .\" @(#)chmod.28.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd October 20, 2018 .Dt CHMOD 2 .Os .Sh NAME @@ -101,6 +101,9 @@ in If .Fa path names a symbolic link, then the mode of the symbolic link is changed. +.It Dv AT_BENEATH +Only allow to change permissions of a file which is beneath of +the starting directory. .El .Pp If @@ -285,6 +288,15 @@ argument is not an absolute path and is neither .Dv AT_FDCWD nor a file descriptor associated with a directory. +.It Bq Er ENOTCAPABLE +The +.Dv AT_BENEATH +flag was specified but +.Fa path +is not strictly relative to the starting directory. +For example, +.Fa path +is absolute or includes a ".." component that escapes the starting directory. .El .Sh SEE ALSO .Xr chmod 1 , Modified: head/lib/libc/sys/chown.2 == --- head/lib/libc/sys/chown.2 Thu Oct 25 21:45:24 2018(r339747) +++ head/lib/libc/sys/chown.2 Thu Oct 25 22:16:34 2018(r339748) @@ -28,7 +28,7 @@ .\" @(#)chown.28.4 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd Octover 20, 2018 .Dt CHOWN 2 .Os .Sh NAME @@ -118,6 +118,9
svn commit: r339747 - head/usr.sbin/rtsold
Author: markj Date: Thu Oct 25 21:45:24 2018 New Revision: 339747 URL: https://svnweb.freebsd.org/changeset/base/339747 Log: Minor style fixes around script execution. MFC after:2 weeks Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/rtsold/rtsol.c Modified: head/usr.sbin/rtsold/rtsol.c == --- head/usr.sbin/rtsold/rtsol.cThu Oct 25 21:44:17 2018 (r339746) +++ head/usr.sbin/rtsold/rtsol.cThu Oct 25 21:45:24 2018 (r339747) @@ -98,22 +98,20 @@ static char *make_rsid(const char *, const char *, str #define_ARGS_RESADDresolvconf_script, "-a", rsid #define_ARGS_RESDELresolvconf_script, "-d", rsid -#defineCALL_SCRIPT(name, sm_head) \ - do {\ - const char *const sarg[] = { _ARGS_##name, NULL }; \ - call_script(sizeof(sarg), sarg, sm_head); \ - } while(0) +#defineCALL_SCRIPT(name, sm_head) do { \ + const char *const sarg[] = { _ARGS_##name, NULL }; \ + call_script(sizeof(sarg), sarg, sm_head); \ +} while (0) -#defineELM_MALLOC(p,error_action) \ - do {\ - p = malloc(sizeof(*p)); \ - if (p == NULL) {\ - warnmsg(LOG_ERR, __func__, "malloc failed: %s", \ - strerror(errno)); \ - error_action; \ - } \ - memset(p, 0, sizeof(*p)); \ - } while(0) +#defineELM_MALLOC(p, error_action) do {\ + p = malloc(sizeof(*p)); \ + if (p == NULL) {\ + warnmsg(LOG_ERR, __func__, "malloc failed: %s", \ + strerror(errno)); \ + error_action; \ + } \ + memset(p, 0, sizeof(*p)); \ +} while (0) int sockopen(void) @@ -697,13 +695,12 @@ make_rsid(const char *ifname, const char *origin, stru } int -ra_opt_rdnss_dispatch(struct ifinfo *ifi, -struct rainfo *rai, +ra_opt_rdnss_dispatch(struct ifinfo *ifi, struct rainfo *rai, struct script_msg_head_t *sm_rdnss_head, struct script_msg_head_t *sm_dnssl_head) { - const char *r; struct script_msg *smp1; + const char *r; int error; error = 0; @@ -715,10 +712,7 @@ ra_opt_rdnss_dispatch(struct ifinfo *ifi, } TAILQ_CONCAT(sm_rdnss_head, sm_dnssl_head, sm_next); - if (rai != NULL && uflag) - r = make_rsid(ifi->ifname, DNSINFO_ORIGIN_LABEL, rai); - else - r = make_rsid(ifi->ifname, DNSINFO_ORIGIN_LABEL, NULL); + r = make_rsid(ifi->ifname, DNSINFO_ORIGIN_LABEL, uflag ? rai : NULL); if (r == NULL) { warnmsg(LOG_ERR, __func__, "make_rsid() failed. " "Script was not invoked."); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339746 - in head: contrib/libarchive contrib/libarchive/cpio contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar contrib/libarchive/test_utils lib/l...
Author: mm Date: Thu Oct 25 21:44:17 2018 New Revision: 339746 URL: https://svnweb.freebsd.org/changeset/base/339746 Log: MFV r339640,339641,339644: Sync libarchive with vendor Relevant vendor changes: PR #1013: Add missing h_base offset when performing absolute seeks in xar decompression PR #1061: Add support for extraction of RAR v5 archives PR #1066: Fix out of bounds read on empty string filename for gnutar, pax and v7tar PR #1067: Fix temporary file path buffer overflow in tests IS #1068: Correctly process and verify integer arguments passed to bsdcpio and bsdtar PR #1070: Don't default XAR entry atime/mtime to the current time MFC after:1 month Added: head/contrib/libarchive/libarchive/archive_blake2.h - copied unchanged from r339640, vendor/libarchive/dist/libarchive/archive_blake2.h head/contrib/libarchive/libarchive/archive_blake2_impl.h - copied unchanged from r339640, vendor/libarchive/dist/libarchive/archive_blake2_impl.h head/contrib/libarchive/libarchive/archive_blake2s_ref.c - copied unchanged from r339640, vendor/libarchive/dist/libarchive/archive_blake2s_ref.c head/contrib/libarchive/libarchive/archive_blake2sp_ref.c - copied unchanged from r339640, vendor/libarchive/dist/libarchive/archive_blake2sp_ref.c head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c - copied, changed from r339640, vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c head/contrib/libarchive/libarchive/test/test_read_format_rar5.c - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5.c head/contrib/libarchive/libarchive/test/test_read_format_rar5_arm.rar.uu - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_arm.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_blake2.rar.uu - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_blake2.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_compressed.rar.uu - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_compressed.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_multiarchive.part01.rar.uu - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_multiarchive.part01.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_multiarchive.part02.rar.uu - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_multiarchive.part02.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_multiarchive.part03.rar.uu - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_multiarchive.part03.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_multiarchive.part04.rar.uu - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_multiarchive.part04.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_multiarchive.part05.rar.uu - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_multiarchive.part05.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_multiarchive.part06.rar.uu - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_multiarchive.part06.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_multiarchive.part07.rar.uu - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_multiarchive.part07.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_multiarchive.part08.rar.uu - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_multiarchive.part08.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_multiarchive_solid.part01.rar.uu - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_multiarchive_solid.part01.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_multiarchive_solid.part02.rar.uu - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_multiarchive_solid.part02.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_multiarchive_solid.part03.rar.uu - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_multiarchive_solid.part03.rar.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_multiarchive_solid.part04.rar.uu - copied unchanged from r339640, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_multiarchive_solid.part04.rar.uu head/contrib/libarchive/libarchive
svn commit: r339745 - head/usr.sbin/rtsold
Author: markj Date: Thu Oct 25 21:41:58 2018 New Revision: 339745 URL: https://svnweb.freebsd.org/changeset/base/339745 Log: Clarify the description of the -u option. MFC after:2 weeks Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/rtsold/rtsold.8 Modified: head/usr.sbin/rtsold/rtsold.8 == --- head/usr.sbin/rtsold/rtsold.8 Thu Oct 25 21:08:15 2018 (r339744) +++ head/usr.sbin/rtsold/rtsold.8 Thu Oct 25 21:41:58 2018 (r339745) @@ -241,16 +241,16 @@ The .Xr resolvconf 8 script is used by default. .It Fl u -Specifies whether adding the source address of Router Advertisement -messages to the interface name in an argument of the RDNSS and DNSSL -script. +Specifies whether to add the source address of Router Advertisement +messages to the interface name in the parameters of the RDNSS and DNSSL +scripts. .Pp If .Fl u -is specified, the interface name in the script argument will be +is specified, the interface name in the script parameters will be .Ql ifname:slaac:[RA-source-address] . .Pp -If not, it will be +Otherwise it will be .Ql ifname:slaac . .El .Sh FILES ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339744 - head/lib/csu
Author: andrew Date: Thu Oct 25 21:08:15 2018 New Revision: 339744 URL: https://svnweb.freebsd.org/changeset/base/339744 Log: Add a missing include for src.opts.mk. Without it MK_TESTS isn't defined. MFC with: r339738 Sponsored by: DARPA, AFRL Modified: head/lib/csu/Makefile Modified: head/lib/csu/Makefile == --- head/lib/csu/Makefile Thu Oct 25 20:44:14 2018(r339743) +++ head/lib/csu/Makefile Thu Oct 25 21:08:15 2018(r339744) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .if exists(${.CURDIR}/${MACHINE_ARCH}) SUBDIR+= ${MACHINE_ARCH} .else ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339742 - stable/12/crypto/openssl/include/openssl
Author: gjb Date: Thu Oct 25 19:57:42 2018 New Revision: 339742 URL: https://svnweb.freebsd.org/changeset/base/339742 Log: MFC r339741: Update SHLIB_VERSION_NUMBER following the OpenSSL shared library number bump. Approved by: re (bdrewery) Sponsored by: The FreeBSD Foundation Modified: stable/12/crypto/openssl/include/openssl/opensslv.h Directory Properties: stable/12/ (props changed) Modified: stable/12/crypto/openssl/include/openssl/opensslv.h == --- stable/12/crypto/openssl/include/openssl/opensslv.h Thu Oct 25 18:46:45 2018(r339741) +++ stable/12/crypto/openssl/include/openssl/opensslv.h Thu Oct 25 19:57:42 2018(r339742) @@ -92,7 +92,7 @@ extern "C" { * should only keep the versions that are binary compatible with the current. */ # define SHLIB_VERSION_HISTORY "" -# define SHLIB_VERSION_NUMBER "9" +# define SHLIB_VERSION_NUMBER "111" #ifdef __cplusplus ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r339709 - in head: . secure/lib/libcrypto secure/lib/libssl
On 18. 10. 25., Konstantin Belousov wrote: > On Thu, Oct 25, 2018 at 02:20:15PM -0400, Jung-uk Kim wrote: >> On 18. 10. 25., Konstantin Belousov wrote: >>> Author: kib >>> Date: Thu Oct 25 13:37:57 2018 >>> New Revision: 339709 >>> URL: https://svnweb.freebsd.org/changeset/base/339709 >>> >>> Log: >>> Bump base OpenSSL libraries versions to avoid conflict with port's >>> libraries. >>> >>> Reported by: many >>> Reviewed by: gjb >>> Sponsored by: The FreeBSD Foundation >>> MFC after:3 hours >>> >>> Modified: >>> head/ObsoleteFiles.inc >>> head/secure/lib/libcrypto/Makefile >>> head/secure/lib/libssl/Makefile >>> >>> Modified: head/ObsoleteFiles.inc >>> == >>> --- head/ObsoleteFiles.inc Thu Oct 25 12:27:16 2018(r339708) >>> +++ head/ObsoleteFiles.inc Thu Oct 25 13:37:57 2018(r339709) >>> @@ -38,6 +38,11 @@ >>> # xargs -n1 | sort | uniq -d; >>> # done >>> >>> +# 20181025: OpenSSL libraries version bump to avoid conflict with ports >>> +OLD_LIBS+=lib/libcrypto.so.9 >>> +OLD_LIBS+=usr/lib/libssl.so.9 >>> +OLD_LIBS+=usr/lib32/libcrypto.so.9 >>> +OLD_LIBS+=usr/lib32/libssl.so.9 >>> # 20181021: mse(4) removal >>> OLD_FILES+=usr/share/man/man4/mse.4.gz >>> # 20181021: joy(4) removal >>> >>> Modified: head/secure/lib/libcrypto/Makefile >>> == >>> --- head/secure/lib/libcrypto/Makefile Thu Oct 25 12:27:16 2018 >>> (r339708) >>> +++ head/secure/lib/libcrypto/Makefile Thu Oct 25 13:37:57 2018 >>> (r339709) >>> @@ -6,7 +6,7 @@ SUBDIR= engines >>> .include >>> >>> LIB= crypto >>> -SHLIB_MAJOR= 9 >>> +SHLIB_MAJOR= 111 >>> VERSION_MAP= ${.CURDIR}/Version.map >>> >>> NO_LINT= >>> >>> Modified: head/secure/lib/libssl/Makefile >>> == >>> --- head/secure/lib/libssl/Makefile Thu Oct 25 12:27:16 2018 >>> (r339708) >>> +++ head/secure/lib/libssl/Makefile Thu Oct 25 13:37:57 2018 >>> (r339709) >>> @@ -1,7 +1,7 @@ >>> # $FreeBSD$ >>> >>> LIB= ssl >>> -SHLIB_MAJOR= 9 >>> +SHLIB_MAJOR= 111 >>> VERSION_MAP= ${.CURDIR}/Version.map >>> >>> NO_LINT= >> >> You forgot to update SHLIB_VERSION_NUMBER. >> >> https://svnweb.freebsd.org/base/head/crypto/openssl/include/openssl/opensslv.h?revision=339270&view=markup#l95 >> > > Would the following be enough ? > > diff --git a/crypto/openssl/include/openssl/opensslv.h > b/crypto/openssl/include/openssl/opensslv.h > index d23d73f90ce..363359d9ef4 100644 > --- a/crypto/openssl/include/openssl/opensslv.h > +++ b/crypto/openssl/include/openssl/opensslv.h > @@ -92,7 +92,7 @@ extern "C" { > * should only keep the versions that are binary compatible with the current. > */ > # define SHLIB_VERSION_HISTORY "" > -# define SHLIB_VERSION_NUMBER "9" > +# define SHLIB_VERSION_NUMBER "111" > > > #ifdef __cplusplus Yes. Jung-uk Kim signature.asc Description: OpenPGP digital signature
svn commit: r339741 - head/crypto/openssl/include/openssl
Author: gjb Date: Thu Oct 25 18:46:45 2018 New Revision: 339741 URL: https://svnweb.freebsd.org/changeset/base/339741 Log: Update SHLIB_VERSION_NUMBER following the OpenSSL shared library number bump. Reported by: jkim Discussed with: kib MFC after:immediate Sponsored by: The FreeBSD Foundation Modified: head/crypto/openssl/include/openssl/opensslv.h Modified: head/crypto/openssl/include/openssl/opensslv.h == --- head/crypto/openssl/include/openssl/opensslv.h Thu Oct 25 18:06:23 2018(r339740) +++ head/crypto/openssl/include/openssl/opensslv.h Thu Oct 25 18:46:45 2018(r339741) @@ -92,7 +92,7 @@ extern "C" { * should only keep the versions that are binary compatible with the current. */ # define SHLIB_VERSION_HISTORY "" -# define SHLIB_VERSION_NUMBER "9" +# define SHLIB_VERSION_NUMBER "111" #ifdef __cplusplus ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r339709 - in head: . secure/lib/libcrypto secure/lib/libssl
On Thu, Oct 25, 2018 at 02:20:15PM -0400, Jung-uk Kim wrote: > On 18. 10. 25., Konstantin Belousov wrote: > > Author: kib > > Date: Thu Oct 25 13:37:57 2018 > > New Revision: 339709 > > URL: https://svnweb.freebsd.org/changeset/base/339709 > > > > Log: > > Bump base OpenSSL libraries versions to avoid conflict with port's > > libraries. > > > > Reported by: many > > Reviewed by: gjb > > Sponsored by: The FreeBSD Foundation > > MFC after:3 hours > > > > Modified: > > head/ObsoleteFiles.inc > > head/secure/lib/libcrypto/Makefile > > head/secure/lib/libssl/Makefile > > > > Modified: head/ObsoleteFiles.inc > > == > > --- head/ObsoleteFiles.inc Thu Oct 25 12:27:16 2018(r339708) > > +++ head/ObsoleteFiles.inc Thu Oct 25 13:37:57 2018(r339709) > > @@ -38,6 +38,11 @@ > > # xargs -n1 | sort | uniq -d; > > # done > > > > +# 20181025: OpenSSL libraries version bump to avoid conflict with ports > > +OLD_LIBS+=lib/libcrypto.so.9 > > +OLD_LIBS+=usr/lib/libssl.so.9 > > +OLD_LIBS+=usr/lib32/libcrypto.so.9 > > +OLD_LIBS+=usr/lib32/libssl.so.9 > > # 20181021: mse(4) removal > > OLD_FILES+=usr/share/man/man4/mse.4.gz > > # 20181021: joy(4) removal > > > > Modified: head/secure/lib/libcrypto/Makefile > > == > > --- head/secure/lib/libcrypto/Makefile Thu Oct 25 12:27:16 2018 > > (r339708) > > +++ head/secure/lib/libcrypto/Makefile Thu Oct 25 13:37:57 2018 > > (r339709) > > @@ -6,7 +6,7 @@ SUBDIR= engines > > .include > > > > LIB= crypto > > -SHLIB_MAJOR= 9 > > +SHLIB_MAJOR= 111 > > VERSION_MAP= ${.CURDIR}/Version.map > > > > NO_LINT= > > > > Modified: head/secure/lib/libssl/Makefile > > == > > --- head/secure/lib/libssl/Makefile Thu Oct 25 12:27:16 2018 > > (r339708) > > +++ head/secure/lib/libssl/Makefile Thu Oct 25 13:37:57 2018 > > (r339709) > > @@ -1,7 +1,7 @@ > > # $FreeBSD$ > > > > LIB= ssl > > -SHLIB_MAJOR= 9 > > +SHLIB_MAJOR= 111 > > VERSION_MAP= ${.CURDIR}/Version.map > > > > NO_LINT= > > You forgot to update SHLIB_VERSION_NUMBER. > > https://svnweb.freebsd.org/base/head/crypto/openssl/include/openssl/opensslv.h?revision=339270&view=markup#l95 > Would the following be enough ? diff --git a/crypto/openssl/include/openssl/opensslv.h b/crypto/openssl/include/openssl/opensslv.h index d23d73f90ce..363359d9ef4 100644 --- a/crypto/openssl/include/openssl/opensslv.h +++ b/crypto/openssl/include/openssl/opensslv.h @@ -92,7 +92,7 @@ extern "C" { * should only keep the versions that are binary compatible with the current. */ # define SHLIB_VERSION_HISTORY "" -# define SHLIB_VERSION_NUMBER "9" +# define SHLIB_VERSION_NUMBER "111" #ifdef __cplusplus ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r339709 - in head: . secure/lib/libcrypto secure/lib/libssl
On 18. 10. 25., Konstantin Belousov wrote: > Author: kib > Date: Thu Oct 25 13:37:57 2018 > New Revision: 339709 > URL: https://svnweb.freebsd.org/changeset/base/339709 > > Log: > Bump base OpenSSL libraries versions to avoid conflict with port's > libraries. > > Reported by:many > Reviewed by:gjb > Sponsored by: The FreeBSD Foundation > MFC after: 3 hours > > Modified: > head/ObsoleteFiles.inc > head/secure/lib/libcrypto/Makefile > head/secure/lib/libssl/Makefile > > Modified: head/ObsoleteFiles.inc > == > --- head/ObsoleteFiles.incThu Oct 25 12:27:16 2018(r339708) > +++ head/ObsoleteFiles.incThu Oct 25 13:37:57 2018(r339709) > @@ -38,6 +38,11 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20181025: OpenSSL libraries version bump to avoid conflict with ports > +OLD_LIBS+=lib/libcrypto.so.9 > +OLD_LIBS+=usr/lib/libssl.so.9 > +OLD_LIBS+=usr/lib32/libcrypto.so.9 > +OLD_LIBS+=usr/lib32/libssl.so.9 > # 20181021: mse(4) removal > OLD_FILES+=usr/share/man/man4/mse.4.gz > # 20181021: joy(4) removal > > Modified: head/secure/lib/libcrypto/Makefile > == > --- head/secure/lib/libcrypto/MakefileThu Oct 25 12:27:16 2018 > (r339708) > +++ head/secure/lib/libcrypto/MakefileThu Oct 25 13:37:57 2018 > (r339709) > @@ -6,7 +6,7 @@ SUBDIR= engines > .include > > LIB= crypto > -SHLIB_MAJOR= 9 > +SHLIB_MAJOR= 111 > VERSION_MAP= ${.CURDIR}/Version.map > > NO_LINT= > > Modified: head/secure/lib/libssl/Makefile > == > --- head/secure/lib/libssl/Makefile Thu Oct 25 12:27:16 2018 > (r339708) > +++ head/secure/lib/libssl/Makefile Thu Oct 25 13:37:57 2018 > (r339709) > @@ -1,7 +1,7 @@ > # $FreeBSD$ > > LIB= ssl > -SHLIB_MAJOR= 9 > +SHLIB_MAJOR= 111 > VERSION_MAP= ${.CURDIR}/Version.map > > NO_LINT= You forgot to update SHLIB_VERSION_NUMBER. https://svnweb.freebsd.org/base/head/crypto/openssl/include/openssl/opensslv.h?revision=339270&view=markup#l95 Jung-uk Kim signature.asc Description: OpenPGP digital signature
svn commit: r339740 - head/sbin/ipfw
Author: ae Date: Thu Oct 25 18:06:23 2018 New Revision: 339740 URL: https://svnweb.freebsd.org/changeset/base/339740 Log: Use correct format specificator to print setdscp action. PR: 232642 MFC after:3 days Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c == --- head/sbin/ipfw/ipfw2.c Thu Oct 25 17:42:43 2018(r339739) +++ head/sbin/ipfw/ipfw2.c Thu Oct 25 18:06:23 2018(r339740) @@ -1946,7 +1946,7 @@ print_action_instruction(struct buf_pr *bp, const stru if (s != NULL) bprintf(bp, "setdscp %s", s); else - bprintf(bp, "setdscp %s", cmd->arg1 & 0x3F); + bprintf(bp, "setdscp %u", cmd->arg1 & 0x3F); break; case O_REASS: bprintf(bp, "reass"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339739 - head/share/man/man5
Author: andrew Date: Thu Oct 25 17:42:43 2018 New Revision: 339739 URL: https://svnweb.freebsd.org/changeset/base/339739 Log: Regen src.conf.5 to add WITH_BSD_CRTBEGIN Sponsored by: DARPA, AFRL Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Thu Oct 25 17:39:41 2018 (r339738) +++ head/share/man/man5/src.conf.5 Thu Oct 25 17:42:43 2018 (r339739) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd October 21, 2018 +.Dd October 25, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -219,6 +219,11 @@ and related programs. .It Va WITHOUT_BSD_CPIO Set to not build the BSD licensed version of cpio based on .Xr libarchive 3 . +.It Va WITH_BSD_CRTBEGIN +Enable the BSD licensed +.Pa crtbegin.o +and +.Pa crtend.o . .It Va WITH_BSD_GREP Install BSD-licensed grep as '[ef]grep' instead of GNU grep. .It Va WITHOUT_BSNMP ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339738 - in head: gnu/lib lib/csu lib/csu/aarch64 lib/csu/amd64 lib/csu/common lib/csu/i386 lib/csu/powerpc64 lib/csu/tests lib/csu/tests/dynamic lib/csu/tests/static share/mk tools/bu...
Author: andrew Date: Thu Oct 25 17:39:41 2018 New Revision: 339738 URL: https://svnweb.freebsd.org/changeset/base/339738 Log: Implement a BSD licensed crtbegin/crtend These are needed for .ctors/.dtors and .jcr handling. The former needs all the function pointers to be called in the correct order from the .init/.fini section. The latter just needs to call a gcj specific function if it exists with a pointer to the start of the .jcr section. This is currently disabled until __dso_handle support is added. Reviewed by: emaste MFC after:1 month Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D17587 Added: head/lib/csu/aarch64/crt.h (contents, props changed) head/lib/csu/amd64/crt.h (contents, props changed) head/lib/csu/common/crtbegin.c (contents, props changed) head/lib/csu/common/crtend.c (contents, props changed) head/lib/csu/i386/crt.h (contents, props changed) head/lib/csu/powerpc64/crt.h (contents, props changed) head/lib/csu/tests/ head/lib/csu/tests/Makefile (contents, props changed) head/lib/csu/tests/Makefile.inc (contents, props changed) head/lib/csu/tests/Makefile.tests (contents, props changed) head/lib/csu/tests/cxx_constructors.cc (contents, props changed) head/lib/csu/tests/dynamic/ head/lib/csu/tests/dynamic/Makefile (contents, props changed) head/lib/csu/tests/fini_test.c (contents, props changed) head/lib/csu/tests/init_test.c (contents, props changed) head/lib/csu/tests/static/ head/lib/csu/tests/static/Makefile (contents, props changed) head/tools/build/options/WITHOUT_BSD_CRTBEGIN (contents, props changed) head/tools/build/options/WITH_BSD_CRTBEGIN (contents, props changed) Modified: head/gnu/lib/Makefile head/lib/csu/Makefile head/lib/csu/Makefile.inc head/share/mk/src.opts.mk Modified: head/gnu/lib/Makefile == --- head/gnu/lib/Makefile Thu Oct 25 17:36:28 2018(r339737) +++ head/gnu/lib/Makefile Thu Oct 25 17:39:41 2018(r339738) @@ -2,11 +2,15 @@ .include -SUBDIR=csu +SUBDIR= SUBDIR.${MK_DIALOG}+= libdialog SUBDIR.${MK_GCC}+= libgcov libgomp SUBDIR.${MK_SSP}+= libssp SUBDIR.${MK_TESTS}+= tests + +.if ${MK_BSD_CRTBEGIN} == "no" +SUBDIR+= csu +.endif .if ${MK_GNU_GREP} != "no" || ${MK_GNU_GREP_COMPAT} != "no" || \ ${MK_GDB} != "no" Modified: head/lib/csu/Makefile == --- head/lib/csu/Makefile Thu Oct 25 17:36:28 2018(r339737) +++ head/lib/csu/Makefile Thu Oct 25 17:39:41 2018(r339738) @@ -6,4 +6,10 @@ SUBDIR+= ${MACHINE_ARCH} SUBDIR+= ${MACHINE_CPUARCH} .endif +.if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "amd64" || \ +${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc64" +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests +.endif + .include Modified: head/lib/csu/Makefile.inc == --- head/lib/csu/Makefile.inc Thu Oct 25 17:36:28 2018(r339737) +++ head/lib/csu/Makefile.inc Thu Oct 25 17:39:41 2018(r339738) @@ -6,4 +6,27 @@ SED_FIX_NOTE = -i "" -e '/\.note\.tag/s/progbits/note/ NO_WMISSING_VARIABLE_DECLARATIONS= +.include + +.if ${MK_BSD_CRTBEGIN} != "no" && !defined(BUILDING_TESTS) + +OBJS+= crtbegin.o crtbeginS.o crtbeginT.o +OBJS+= crtend.o crtendS.o + +CFLAGS_CRTS= -DSHARED ${PICFLAG} + +crtbegin.o: crtbegin.c +crtbeginS.o: crtbegin.c +crtbeginT.o: crtbegin.c +crtend.o: crtend.c +crtendS.o: crtend.c + +crtbegin.o crtend.o crtbeginT.o: + ${CC} ${CFLAGS} -I${.CURDIR} -c -o ${.TARGET} ${.ALLSRC} + +crtbeginS.o crtendS.o: + ${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o ${.TARGET} ${.ALLSRC} + +.endif + .include "../Makefile.inc" Added: head/lib/csu/aarch64/crt.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/csu/aarch64/crt.h Thu Oct 25 17:39:41 2018(r339738) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +/* Empty so we can include this unconditionally */ Added: head/lib/csu/amd64/crt.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/csu/amd64/crt.hThu Oct 25 17:39:41 2018(r339738) @@ -0,0 +1,32 @@ +/*- + * SPDX-License-Identifier: BSD-1-Clause + * + * Copyright 2018 Andrew Turner + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED B
svn commit: r339737 - head/sys/kern
Author: markj Date: Thu Oct 25 17:36:28 2018 New Revision: 339737 URL: https://svnweb.freebsd.org/changeset/base/339737 Log: Remove a dead store. CID: 1304878 MFC after:1 week Modified: head/sys/kern/vfs_mountroot.c Modified: head/sys/kern/vfs_mountroot.c == --- head/sys/kern/vfs_mountroot.c Thu Oct 25 17:17:11 2018 (r339736) +++ head/sys/kern/vfs_mountroot.c Thu Oct 25 17:36:28 2018 (r339737) @@ -579,7 +579,7 @@ parse_dir_md(char **conf) if (root_mount_mddev != -1) { mdio->md_unit = root_mount_mddev; - error = kern_ioctl(td, fd, MDIOCDETACH, (void *)mdio); + (void)kern_ioctl(td, fd, MDIOCDETACH, (void *)mdio); /* Ignore errors. We don't care. */ root_mount_mddev = -1; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339736 - head/sys/dev/acpica
Author: imp Date: Thu Oct 25 17:17:11 2018 New Revision: 339736 URL: https://svnweb.freebsd.org/changeset/base/339736 Log: Update comment for AMI00[12]0 override. The AML is even stupider than always returning 0. It will only return non-zero for an OS that reports itself as "Windows 2015", at least on the Threadripper board's AML that I've examined. Those AMLs also suggest we may need this quirk for AMI0030 as well. There may be other cases where we need to override the _STA in a generic way, so we should consider writing code to do that. Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c == --- head/sys/dev/acpica/acpi.c Thu Oct 25 17:00:39 2018(r339735) +++ head/sys/dev/acpica/acpi.c Thu Oct 25 17:17:11 2018(r339736) @@ -,10 +,10 @@ acpi_DeviceIsPresent(device_t dev) status = acpi_GetInteger(h, "_STA", &s); /* -* Onboard serial ports on certain AMD motherboards have an invalid _STA -* method that always returns 0. Force them to always be treated as present. -* -* This may solely be a quirk of a preproduction BIOS. +* Certain Treadripper boards always returns 0 for FreeBSD because it +* only returns non-zero for the OS string "Windows 2015". Otherwise it +* will return zero. Force them to always be treated as present. +* Beata versions were worse: they always returned 0. */ if (acpi_MatchHid(h, "AMDI0020") || acpi_MatchHid(h, "AMDI0010")) return (TRUE); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339735 - in stable/12: share/man/man4 share/man/man4/man4.i386 share/man/man4/man4.powerpc sys/dev/ae sys/dev/bm sys/dev/cs sys/dev/de sys/dev/dme sys/dev/ed sys/dev/ep sys/dev/ex sys/...
Author: brooks Date: Thu Oct 25 17:00:39 2018 New Revision: 339735 URL: https://svnweb.freebsd.org/changeset/base/339735 Log: MFC r339703: Deprecate a number of less used 10 and 10/100 Ethernet devices. The current deprecated list is: ae, bm, cs, de, dme, ed, ep, ex, fe, pcn, sf, sn, tl, tx, txp, vx, wb, xe The list was defined as part of FCP-0101. Per the FCP, devices may be removed from the deprecation list if enough users are found or they are converted to iflib. FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md Approved by: re (gjb) Reviewed by: rgrimes Differential Revision:https://reviews.freebsd.org/D17654 Modified: stable/12/share/man/man4/ae.4 stable/12/share/man/man4/de.4 stable/12/share/man/man4/ed.4 stable/12/share/man/man4/man4.i386/cs.4 stable/12/share/man/man4/man4.i386/ep.4 stable/12/share/man/man4/man4.i386/ex.4 stable/12/share/man/man4/man4.i386/fe.4 stable/12/share/man/man4/man4.i386/vx.4 stable/12/share/man/man4/man4.powerpc/bm.4 stable/12/share/man/man4/pcn.4 stable/12/share/man/man4/sf.4 stable/12/share/man/man4/sn.4 stable/12/share/man/man4/tl.4 stable/12/share/man/man4/tx.4 stable/12/share/man/man4/txp.4 stable/12/share/man/man4/wb.4 stable/12/share/man/man4/xe.4 stable/12/sys/dev/ae/if_ae.c stable/12/sys/dev/bm/if_bm.c stable/12/sys/dev/cs/if_cs.c stable/12/sys/dev/de/if_de.c stable/12/sys/dev/dme/if_dme.c stable/12/sys/dev/ed/if_ed.c stable/12/sys/dev/ep/if_ep.c stable/12/sys/dev/ex/if_ex.c stable/12/sys/dev/fe/if_fe.c stable/12/sys/dev/pcn/if_pcn.c stable/12/sys/dev/sf/if_sf.c stable/12/sys/dev/sn/if_sn.c stable/12/sys/dev/tl/if_tl.c stable/12/sys/dev/tx/if_tx.c stable/12/sys/dev/txp/if_txp.c stable/12/sys/dev/vx/if_vx.c stable/12/sys/dev/wb/if_wb.c stable/12/sys/dev/xe/if_xe.c stable/12/sys/sys/systm.h Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/ae.4 == --- stable/12/share/man/man4/ae.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/ae.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 4, 2008 +.Dd October 24, 2018 .Dt AE 4 .Os .Sh NAME @@ -44,6 +44,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_ae_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/de.4 == --- stable/12/share/man/man4/de.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/de.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd October 24, 2018 .Dt DE 4 .Os .Sh NAME @@ -45,6 +45,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_de_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/ed.4 == --- stable/12/share/man/man4/ed.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/ed.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2012 +.Dd October 24, 2018 .Dt ED 4 .Os .Sh NAME @@ -51,6 +51,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_ed_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/man4.i386/cs.4 == --- stable/12/share/man/man4/man4.i386/cs.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/man4.i386/cs.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd October 24 2018 .Dt CS 4 i386 .Os .Sh NAME @@ -52,6 +52,14 @@ In .Cd hint.cs.0.port="0x300" .Cd hint.cs.0.irq="10" .Cd hint.cs.0.maddr="0xd000" +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/man4.i386/ep.4 == --- stable/12/share/man/man4/man4.i386/ep.4 Thu Oct 25 16:01:19 201
svn commit: r339734 - stable/11/sys/compat/linuxkpi/common/include/linux
Author: tijl Date: Thu Oct 25 16:01:19 2018 New Revision: 339734 URL: https://svnweb.freebsd.org/changeset/base/339734 Log: MFC r339618: Define linuxkpi readq for 64-bit architectures. It is used by drm-kmod. Currently the compiler picks up the definition in machine/cpufunc.h. Add compiler memory barriers to read* and write*. The Linux x86 implementation of these functions uses inline asm with "memory" clobber. The Linux x86 implementation of read_relaxed* and write_relaxed* uses the same inline asm without "memory" clobber. Implement ioread* and iowrite* in terms of read* and write* so they also have memory barriers. Qualify the addr parameter in write* as volatile. Like Linux, define macros with the same name as the inline functions. Only define 64-bit versions on 64-bit architectures because generally 32-bit architectures can't do atomic 64-bit loads and stores. Regroup the functions a bit and add brief comments explaining what they do: - __raw_read*, __raw_write*: atomic, no barriers, no byte swapping - read_relaxed*, write_relaxed*: atomic, no barriers, little-endian - read*, write*: atomic, with barriers, little-endian Add a comment that says our implementation of ioread* and iowrite* only handles MMIO and does not support port IO. Reviewed by: hselasky Modified: stable/11/sys/compat/linuxkpi/common/include/linux/io.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/io.h == --- stable/11/sys/compat/linuxkpi/common/include/linux/io.h Thu Oct 25 16:01:10 2018(r339733) +++ stable/11/sys/compat/linuxkpi/common/include/linux/io.h Thu Oct 25 16:01:19 2018(r339734) @@ -38,153 +38,309 @@ #include #include +/* + * XXX This is all x86 specific. It should be bus space access. + */ + +/* Access MMIO registers atomically without barriers and byte swapping. */ + +static inline uint8_t +__raw_readb(const volatile void *addr) +{ + return (*(const volatile uint8_t *)addr); +} +#define__raw_readb(addr) __raw_readb(addr) + +static inline void +__raw_writeb(uint8_t v, volatile void *addr) +{ + *(volatile uint8_t *)addr = v; +} +#define__raw_writeb(v, addr) __raw_writeb(v, addr) + +static inline uint16_t +__raw_readw(const volatile void *addr) +{ + return (*(const volatile uint16_t *)addr); +} +#define__raw_readw(addr) __raw_readw(addr) + +static inline void +__raw_writew(uint16_t v, volatile void *addr) +{ + *(volatile uint16_t *)addr = v; +} +#define__raw_writew(v, addr) __raw_writew(v, addr) + static inline uint32_t __raw_readl(const volatile void *addr) { - return *(const volatile uint32_t *)addr; + return (*(const volatile uint32_t *)addr); } +#define__raw_readl(addr) __raw_readl(addr) static inline void -__raw_writel(uint32_t b, volatile void *addr) +__raw_writel(uint32_t v, volatile void *addr) { - *(volatile uint32_t *)addr = b; + *(volatile uint32_t *)addr = v; } +#define__raw_writel(v, addr) __raw_writel(v, addr) +#ifdef __LP64__ static inline uint64_t __raw_readq(const volatile void *addr) { - return *(const volatile uint64_t *)addr; + return (*(const volatile uint64_t *)addr); } +#define__raw_readq(addr) __raw_readq(addr) static inline void -__raw_writeq(uint64_t b, volatile void *addr) +__raw_writeq(uint64_t v, volatile void *addr) { - *(volatile uint64_t *)addr = b; + *(volatile uint64_t *)addr = v; } +#define__raw_writeq(v, addr) __raw_writeq(v, addr) +#endif -/* - * XXX This is all x86 specific. It should be bus space access. - */ #definemmiowb()barrier() -#undef writel +/* Access little-endian MMIO registers atomically with memory barriers. */ + +#undef readb +static inline uint8_t +readb(const volatile void *addr) +{ + uint8_t v; + + __compiler_membar(); + v = *(const volatile uint8_t *)addr; + __compiler_membar(); + return (v); +} +#definereadb(addr) readb(addr) + +#undef writeb static inline void -writel(uint32_t b, void *addr) +writeb(uint8_t v, volatile void *addr) { - *(volatile uint32_t *)addr = b; + __compiler_membar(); + *(volatile uint8_t *)addr = v; + __compiler_membar(); } +#definewriteb(v, addr) writeb(v, addr) -#undef writel_relaxed +#undef readw +static inline uint16_t +readw(const volatile void *addr) +{ + uint16_t v; + + __compiler_membar(); + v = *(const volatile uint16_t *)addr; + __compiler_membar(); + return (v); +} +#definereadw(addr) readw(addr) + +#undef writew static inline void -writel_relaxed(uint32_t b, void *addr) +writew(uint16_t v, volatile void *addr) { - *(volatile uint32
svn commit: r339733 - stable/12/sys/compat/linuxkpi/common/include/linux
Author: tijl Date: Thu Oct 25 16:01:10 2018 New Revision: 339733 URL: https://svnweb.freebsd.org/changeset/base/339733 Log: MFC r339618: Define linuxkpi readq for 64-bit architectures. It is used by drm-kmod. Currently the compiler picks up the definition in machine/cpufunc.h. Add compiler memory barriers to read* and write*. The Linux x86 implementation of these functions uses inline asm with "memory" clobber. The Linux x86 implementation of read_relaxed* and write_relaxed* uses the same inline asm without "memory" clobber. Implement ioread* and iowrite* in terms of read* and write* so they also have memory barriers. Qualify the addr parameter in write* as volatile. Like Linux, define macros with the same name as the inline functions. Only define 64-bit versions on 64-bit architectures because generally 32-bit architectures can't do atomic 64-bit loads and stores. Regroup the functions a bit and add brief comments explaining what they do: - __raw_read*, __raw_write*: atomic, no barriers, no byte swapping - read_relaxed*, write_relaxed*: atomic, no barriers, little-endian - read*, write*: atomic, with barriers, little-endian Add a comment that says our implementation of ioread* and iowrite* only handles MMIO and does not support port IO. Reviewed by: hselasky Approved by: re (gjb) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/io.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/io.h == --- stable/12/sys/compat/linuxkpi/common/include/linux/io.h Thu Oct 25 15:49:59 2018(r339732) +++ stable/12/sys/compat/linuxkpi/common/include/linux/io.h Thu Oct 25 16:01:10 2018(r339733) @@ -38,153 +38,309 @@ #include #include +/* + * XXX This is all x86 specific. It should be bus space access. + */ + +/* Access MMIO registers atomically without barriers and byte swapping. */ + +static inline uint8_t +__raw_readb(const volatile void *addr) +{ + return (*(const volatile uint8_t *)addr); +} +#define__raw_readb(addr) __raw_readb(addr) + +static inline void +__raw_writeb(uint8_t v, volatile void *addr) +{ + *(volatile uint8_t *)addr = v; +} +#define__raw_writeb(v, addr) __raw_writeb(v, addr) + +static inline uint16_t +__raw_readw(const volatile void *addr) +{ + return (*(const volatile uint16_t *)addr); +} +#define__raw_readw(addr) __raw_readw(addr) + +static inline void +__raw_writew(uint16_t v, volatile void *addr) +{ + *(volatile uint16_t *)addr = v; +} +#define__raw_writew(v, addr) __raw_writew(v, addr) + static inline uint32_t __raw_readl(const volatile void *addr) { - return *(const volatile uint32_t *)addr; + return (*(const volatile uint32_t *)addr); } +#define__raw_readl(addr) __raw_readl(addr) static inline void -__raw_writel(uint32_t b, volatile void *addr) +__raw_writel(uint32_t v, volatile void *addr) { - *(volatile uint32_t *)addr = b; + *(volatile uint32_t *)addr = v; } +#define__raw_writel(v, addr) __raw_writel(v, addr) +#ifdef __LP64__ static inline uint64_t __raw_readq(const volatile void *addr) { - return *(const volatile uint64_t *)addr; + return (*(const volatile uint64_t *)addr); } +#define__raw_readq(addr) __raw_readq(addr) static inline void -__raw_writeq(uint64_t b, volatile void *addr) +__raw_writeq(uint64_t v, volatile void *addr) { - *(volatile uint64_t *)addr = b; + *(volatile uint64_t *)addr = v; } +#define__raw_writeq(v, addr) __raw_writeq(v, addr) +#endif -/* - * XXX This is all x86 specific. It should be bus space access. - */ #definemmiowb()barrier() -#undef writel +/* Access little-endian MMIO registers atomically with memory barriers. */ + +#undef readb +static inline uint8_t +readb(const volatile void *addr) +{ + uint8_t v; + + __compiler_membar(); + v = *(const volatile uint8_t *)addr; + __compiler_membar(); + return (v); +} +#definereadb(addr) readb(addr) + +#undef writeb static inline void -writel(uint32_t b, void *addr) +writeb(uint8_t v, volatile void *addr) { - *(volatile uint32_t *)addr = b; + __compiler_membar(); + *(volatile uint8_t *)addr = v; + __compiler_membar(); } +#definewriteb(v, addr) writeb(v, addr) -#undef writel_relaxed +#undef readw +static inline uint16_t +readw(const volatile void *addr) +{ + uint16_t v; + + __compiler_membar(); + v = *(const volatile uint16_t *)addr; + __compiler_membar(); + return (v); +} +#definereadw(addr) readw(addr) + +#undef writew static inline void -writel_relaxed(uint32_t b, void *addr) +writew(uint16_t v, volatile void *addr) {
svn commit: r339732 - in stable/12: . secure/lib/libcrypto secure/lib/libssl sys/sys
Author: kib Date: Thu Oct 25 15:49:59 2018 New Revision: 339732 URL: https://svnweb.freebsd.org/changeset/base/339732 Log: MFC r339709: Bump base OpenSSL libraries versions to avoid conflict with port's libraries. Approved by: re (gjb) Modified: stable/12/ObsoleteFiles.inc stable/12/secure/lib/libcrypto/Makefile stable/12/secure/lib/libssl/Makefile stable/12/sys/sys/param.h Directory Properties: stable/12/ (props changed) Modified: stable/12/ObsoleteFiles.inc == --- stable/12/ObsoleteFiles.inc Thu Oct 25 15:43:21 2018(r339731) +++ stable/12/ObsoleteFiles.inc Thu Oct 25 15:49:59 2018(r339732) @@ -38,6 +38,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20181025: OpenSSL libraries version bump to avoid conflict with ports +OLD_LIBS+=lib/libcrypto.so.9 +OLD_LIBS+=usr/lib/libssl.so.9 +OLD_LIBS+=usr/lib32/libcrypto.so.9 +OLD_LIBS+=usr/lib32/libssl.so.9 # 20181015: Stale libcasper(3) files following r329452 OLD_LIBS+=lib/casper/libcap_sysctl.so.0 OLD_LIBS+=lib/casper/libcap_grp.so.0 Modified: stable/12/secure/lib/libcrypto/Makefile == --- stable/12/secure/lib/libcrypto/Makefile Thu Oct 25 15:43:21 2018 (r339731) +++ stable/12/secure/lib/libcrypto/Makefile Thu Oct 25 15:49:59 2018 (r339732) @@ -6,7 +6,7 @@ SUBDIR= engines .include LIB= crypto -SHLIB_MAJOR= 9 +SHLIB_MAJOR= 111 VERSION_MAP= ${.CURDIR}/Version.map NO_LINT= Modified: stable/12/secure/lib/libssl/Makefile == --- stable/12/secure/lib/libssl/MakefileThu Oct 25 15:43:21 2018 (r339731) +++ stable/12/secure/lib/libssl/MakefileThu Oct 25 15:49:59 2018 (r339732) @@ -1,7 +1,7 @@ # $FreeBSD$ LIB= ssl -SHLIB_MAJOR= 9 +SHLIB_MAJOR= 111 VERSION_MAP= ${.CURDIR}/Version.map NO_LINT= Modified: stable/12/sys/sys/param.h == --- stable/12/sys/sys/param.h Thu Oct 25 15:43:21 2018(r339731) +++ stable/12/sys/sys/param.h Thu Oct 25 15:49:59 2018(r339732) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200085 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200086 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339731 - head/sys/kern
Author: markj Date: Thu Oct 25 15:43:21 2018 New Revision: 339731 URL: https://svnweb.freebsd.org/changeset/base/339731 Log: Add FALLTHROUGH comments to appease Coverity. CID: 1017862-1017864, 1017866-1017868 MFC after:2 weeks Modified: head/sys/kern/kern_environment.c head/sys/kern/vfs_mount.c Modified: head/sys/kern/kern_environment.c == --- head/sys/kern/kern_environment.cThu Oct 25 15:41:26 2018 (r339730) +++ head/sys/kern/kern_environment.cThu Oct 25 15:43:21 2018 (r339731) @@ -839,10 +839,13 @@ getenv_quad(const char *name, quad_t *data) switch (vtp[0]) { case 't': case 'T': iv *= 1024; + /* FALLTHROUGH */ case 'g': case 'G': iv *= 1024; + /* FALLTHROUGH */ case 'm': case 'M': iv *= 1024; + /* FALLTHROUGH */ case 'k': case 'K': iv *= 1024; case '\0': Modified: head/sys/kern/vfs_mount.c == --- head/sys/kern/vfs_mount.c Thu Oct 25 15:41:26 2018(r339730) +++ head/sys/kern/vfs_mount.c Thu Oct 25 15:43:21 2018(r339731) @@ -1647,17 +1647,16 @@ vfs_getopt_size(struct vfsoptlist *opts, const char *n if (iv < 0) return (EINVAL); switch (vtp[0]) { - case 't': - case 'T': + case 't': case 'T': iv *= 1024; - case 'g': - case 'G': + /* FALLTHROUGH */ + case 'g': case 'G': iv *= 1024; - case 'm': - case 'M': + /* FALLTHROUGH */ + case 'm': case 'M': iv *= 1024; - case 'k': - case 'K': + /* FALLTHROUGH */ + case 'k': case 'K': iv *= 1024; case '\0': break; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339729 - head/lib/libefivar
Author: 0mp (ports committer) Date: Thu Oct 25 15:41:19 2018 New Revision: 339729 URL: https://svnweb.freebsd.org/changeset/base/339729 Log: efivar(3): Fix some typos and improve style - Fix some typos. - Remove redundant semicolons from the synopsis section. - Stylize variable names and types with Vt and Va respectively. - Use a list to present non-implemented functions. - Sort the order of the sections. - Add a history section. - Use Nm when "libefivar" is mentioned. PR: 232626 Reported by: Tiwei Bie Reviewed by: bcr, imp Approved by: krion (mentor, implicit), mat (mentor, implicit) MFC after:3 days Differential Revision:https://reviews.freebsd.org/D17686 Modified: head/lib/libefivar/efivar.3 Modified: head/lib/libefivar/efivar.3 == --- head/lib/libefivar/efivar.3 Thu Oct 25 15:40:59 2018(r339728) +++ head/lib/libefivar/efivar.3 Thu Oct 25 15:41:19 2018(r339729) @@ -24,12 +24,12 @@ .\" .\" $FreeBSD$ .\" -.Dd September 14, 2016 +.Dd October 25, 2018 .Dt LIBEFIVAR 3 .Os .Sh NAME .Nm libefivar -.Nd EFI Non Volatile Variable Suppoert +.Nd EFI Non Volatile Variable Support .Sh SYNOPSIS .In efivar.h .Ft int @@ -55,15 +55,17 @@ .Ft int .Fn efi_set_variable "efi_guid_t guid" "const char *name" "void *data" "size_t data_size" "uint32_t attributes" .Ft int -.Fn efi_str_to_guid "const char *s" "efi_guid_t *guid"; +.Fn efi_str_to_guid "const char *s" "efi_guid_t *guid" .Ft int -.Fn efi_variables_supported "void"; +.Fn efi_variables_supported "void" .Sh DESCRIPTION The .Nm library implements access to EFI Variables via the EFI Runtime -Serivces. -All char * strings are converted to 16-bit UTF strings before passing +Services. +All +.Vt "char *" +strings are converted to 16-bit UTF strings before passing them to EFI. .Pp .Fn efi_variables_supported @@ -73,28 +75,48 @@ Otherwise zero is returned. .Pp .Fn efi_del_variable deletes the EFI variable selected by -.Dv guid +.Va guid and -.Dv name . +.Va name . .Pp +The following functions have not been implemented yet: +.Bl -dash -offset indent -compact +.It +.Fn efi_append_variable +.It +.Fn efi_get_next_variable_name +.It .Fn efi_get_variable +.It .Fn efi_get_variable_attributes +.It .Fn efi_get_variable_size -.Fn efi_append_variable -.Fn efi_set_variable -.Fn efi_get_next_variable_name -.Fn efi_str_to_guid -.Fn efi_guid_to_str -.Fn efi_name_to_guid +.It .Fn efi_guid_to_name +.It +.Fn efi_guid_to_str +.It .Fn efi_guid_to_symbol -This function is not actually implemented. -.Sh BUGS -No facilities exist to process the strings as native UTF. -This is a limitation in the Linux libefivar library interface. +.It +.Fn efi_name_to_guid +.It +.Fn efi_set_variable +.It +.Fn efi_str_to_guid +.El .Sh SEE ALSO .Xr efidev 4 +.Sh HISTORY +The +.Nm +library first appeared in +.Fx 12.0 . .Sh AUTHORS .An -nosplit This software was originally written by .An Warner Losh . +.Sh BUGS +No facilities exist to process the strings as native UTF. +This is a limitation in the Linux +.Nm +library interface. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339730 - head/sys/sys
Author: gjb Date: Thu Oct 25 15:41:26 2018 New Revision: 339730 URL: https://svnweb.freebsd.org/changeset/base/339730 Log: Bump __FreeBSD_version following the OpenSSL shared library version number bump. Submitted by: antoine MFC with: r339709 Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h == --- head/sys/sys/param.hThu Oct 25 15:41:19 2018(r339729) +++ head/sys/sys/param.hThu Oct 25 15:41:26 2018(r339730) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 130 /* Master, propagated to newvers */ +#define __FreeBSD_version 131 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339728 - head/sys/kern
Author: markj Date: Thu Oct 25 15:40:59 2018 New Revision: 339728 URL: https://svnweb.freebsd.org/changeset/base/339728 Log: Remove a redundant check. CID: 1042100 MFC after:2 weeks Modified: head/sys/kern/subr_vmem.c Modified: head/sys/kern/subr_vmem.c == --- head/sys/kern/subr_vmem.c Thu Oct 25 15:35:12 2018(r339727) +++ head/sys/kern/subr_vmem.c Thu Oct 25 15:40:59 2018(r339728) @@ -283,7 +283,7 @@ bt_fill(vmem_t *vm, int flags) VMEM_UNLOCK(vm); bt = uma_zalloc(vmem_bt_zone, flags); VMEM_LOCK(vm); - if (bt == NULL && (flags & M_NOWAIT) != 0) + if (bt == NULL) break; } LIST_INSERT_HEAD(&vm->vm_freetags, bt, bt_freelist); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339727 - stable/12/sbin/nvmecontrol
Author: imp Date: Thu Oct 25 15:35:12 2018 New Revision: 339727 URL: https://svnweb.freebsd.org/changeset/base/339727 Log: MFC r339493: add wdc as an alias for wds wdc is the preferred name for Western Digital. wds should never have been committed in the first place. Add wdc as an alias for 12 and in 13 we'll retire the undocumented wds. Approved by: re@ (kib) Modified: stable/12/sbin/nvmecontrol/logpage.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/nvmecontrol/logpage.c == --- stable/12/sbin/nvmecontrol/logpage.cThu Oct 25 15:18:54 2018 (r339726) +++ stable/12/sbin/nvmecontrol/logpage.cThu Oct 25 15:35:12 2018 (r339727) @@ -865,6 +865,8 @@ static struct logpage_function { print_log_firmware,sizeof(struct nvme_firmware_page)}, {HGST_INFO_LOG, "hgst", "Detailed Health/SMART", print_hgst_info_log, DEFAULT_SIZE}, + {HGST_INFO_LOG, "wdc", "Detailed Health/SMART", +print_hgst_info_log, DEFAULT_SIZE}, {HGST_INFO_LOG, "wds", "Detailed Health/SMART", print_hgst_info_log, DEFAULT_SIZE}, {INTEL_LOG_TEMP_STATS, "intel", "Temperature Stats", ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339726 - stable/12/contrib/elftoolchain/elfcopy
Author: emaste Date: Thu Oct 25 15:18:54 2018 New Revision: 339726 URL: https://svnweb.freebsd.org/changeset/base/339726 Log: MFC r339451: objcopy: restore behaviour required by GCC's build In r339350 filter_reloc() was removed, to fix the case of stripping statically linked binaries with relocations (which may come from ifunc use, for example). As a side effect this changed the behaviour when stripping object files - the output was broken both before and after r339350, in different ways. Unfortunately GCC's build process relies on the previous behaviour, so: - Revert r339350, restoring filter_reloc(). - Fix an unitialized variable use (commited as r3638 in ELF Tool Chain). - Change filter_reloc() to omit relocations referencing removed symbols, while retaining relocations with no symbol reference. - Retain the entire relocation section if it references the dynamic symbol table (fix from kaiw in D17596). PR: 232176 Approved by: re (gjb, kib) Sponsored by: The FreeBSD Foundation Modified: stable/12/contrib/elftoolchain/elfcopy/sections.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/elfcopy/sections.c == --- stable/12/contrib/elftoolchain/elfcopy/sections.c Thu Oct 25 15:14:16 2018(r339725) +++ stable/12/contrib/elftoolchain/elfcopy/sections.c Thu Oct 25 15:18:54 2018(r339726) @@ -39,6 +39,7 @@ ELFTC_VCSID("$Id: sections.c 3443 2016-04-15 18:57:54Z static voidadd_gnu_debuglink(struct elfcopy *ecp); static uint32_t calc_crc32(const char *p, size_t len, uint32_t crc); static voidcheck_section_rename(struct elfcopy *ecp, struct section *s); +static voidfilter_reloc(struct elfcopy *ecp, struct section *s); static int get_section_flags(struct elfcopy *ecp, const char *name); static voidinsert_sections(struct elfcopy *ecp); static voidinsert_to_strtab(struct section *t, const char *s); @@ -573,6 +574,14 @@ copy_content(struct elfcopy *ecp) continue; /* +* If strip action is STRIP_ALL, relocation info need +* to be stripped. Skip filtering otherwisw. +*/ + if (ecp->strip == STRIP_ALL && + (s->type == SHT_REL || s->type == SHT_RELA)) + filter_reloc(ecp, s); + + /* * The section indices in the SHT_GROUP section needs * to be updated since we might have stripped some * sections and changed section numbering. @@ -661,6 +670,140 @@ update_section_group(struct elfcopy *ecp, struct secti s->sz -= 4; } + s->nocopy = 1; +} + +/* + * Filter relocation entries, only keep those entries whose + * symbol is in the keep list. + */ +static void +filter_reloc(struct elfcopy *ecp, struct section *s) +{ + const char *name; + GElf_Shdrish; + GElf_Rel rel; + GElf_Relarela; + Elf32_Rel *rel32; + Elf64_Rel *rel64; + Elf32_Rela *rela32; + Elf64_Rela *rela64; + Elf_Data*id; + uint64_t cap, n, nrels, sym; + int elferr, i; + + if (gelf_getshdr(s->is, &ish) == NULL) + errx(EXIT_FAILURE, "gelf_getehdr() failed: %s", + elf_errmsg(-1)); + + /* We don't want to touch relocation info for dynamic symbols. */ + if ((ecp->flags & SYMTAB_EXIST) == 0) { + /* +* No symbol table in output. If sh_link points to a section +* that exists in the output object, this relocation section +* is for dynamic symbols. Don't touch it. +*/ + if (ish.sh_link != 0 && ecp->secndx[ish.sh_link] != 0) + return; + } else { + /* Symbol table exist, check if index equals. */ + if (ish.sh_link != elf_ndxscn(ecp->symtab->is)) + return; + } + +#defineCOPYREL(REL, SZ) do { \ + if (nrels == 0) { \ + if ((REL##SZ = malloc(cap * \ + sizeof(*REL##SZ))) == NULL) \ + err(EXIT_FAILURE, "malloc failed"); \ + } \ + if (nrels >= cap) { \ + cap *= 2; \ + if ((REL##SZ = realloc(REL##SZ, cap * \ + sizeof(*REL##SZ))) == NULL) \ + err(EXIT_FAILURE, "realloc failed");\ + } \ +
svn commit: r339725 - stable/11/release/tools
Author: gjb Date: Thu Oct 25 15:14:16 2018 New Revision: 339725 URL: https://svnweb.freebsd.org/changeset/base/339725 Log: MFC r339684: Reduce the GCE image size to 27G to be lower than the free quota limit. PR: 232313 Sponsored by: The FreeBSD Foundation Modified: stable/11/release/tools/gce.conf Directory Properties: stable/11/ (props changed) Modified: stable/11/release/tools/gce.conf == --- stable/11/release/tools/gce.confThu Oct 25 15:11:18 2018 (r339724) +++ stable/11/release/tools/gce.confThu Oct 25 15:14:16 2018 (r339725) @@ -3,6 +3,9 @@ # $FreeBSD$ # +# Reduce VMSIZE to be below the free quota limit. +export VMSIZE=27G + # Set to a list of packages to install. export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \ google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine \ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339724 - stable/12/release/tools
Author: gjb Date: Thu Oct 25 15:11:18 2018 New Revision: 339724 URL: https://svnweb.freebsd.org/changeset/base/339724 Log: MFC r339684: Reduce the GCE image size to 27G to be lower than the free quota limit. PR: 232313 Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/12/release/tools/gce.conf Directory Properties: stable/12/ (props changed) Modified: stable/12/release/tools/gce.conf == --- stable/12/release/tools/gce.confThu Oct 25 15:02:06 2018 (r339723) +++ stable/12/release/tools/gce.confThu Oct 25 15:11:18 2018 (r339724) @@ -3,6 +3,9 @@ # $FreeBSD$ # +# Reduce VMSIZE to be below the free quota limit. +export VMSIZE=27G + # Set to a list of packages to install. export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \ google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine \ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339723 - stable/8/sys/dev/sound/midi
Author: hselasky Date: Thu Oct 25 15:02:06 2018 New Revision: 339723 URL: https://svnweb.freebsd.org/changeset/base/339723 Log: MFC r339582: Drop sequencer mutex around uiomove() and make sure we don't move more bytes than is available, else a panic might happen. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/8/sys/dev/sound/midi/sequencer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/midi/ (props changed) Modified: stable/8/sys/dev/sound/midi/sequencer.c == --- stable/8/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:57:33 2018 (r339722) +++ stable/8/sys/dev/sound/midi/sequencer.c Thu Oct 25 15:02:06 2018 (r339723) @@ -928,7 +928,9 @@ seq_read(struct cdev *i_dev, struct uio *uio, int iofl SEQ_DEBUG(8, printf("midiread: uiomove cc=%d\n", used)); MIDIQ_DEQ(scp->in_q, buf, used); + mtx_unlock(&scp->seq_lock); retval = uiomove(buf, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err1; } @@ -1003,7 +1005,9 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof retval = ENXIO; goto err0; } + mtx_unlock(&scp->seq_lock); retval = uiomove(event, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1041,7 +1045,9 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(2, printf("seq_write: SEQ_FULLSIZE flusing buffer.\n")); while (uio->uio_resid > 0) { - retval = uiomove(event, EV_SZ, uio); + mtx_unlock(&scp->seq_lock); + retval = uiomove(event, MIN(EV_SZ, uio->uio_resid), uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1052,6 +1058,7 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof } retval = EINVAL; if (ev_code >= 128) { + int error; /* * Some sort of an extended event. The size is eight @@ -1061,7 +1068,13 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(2, printf("seq_write: invalid level two event %x.\n", ev_code)); goto err0; } - if (uiomove((caddr_t)&event[4], 4, uio)) { + mtx_unlock(&scp->seq_lock); + if (uio->uio_resid < 4) + error = EINVAL; + else + error = uiomove((caddr_t)&event[4], 4, uio); + mtx_lock(&scp->seq_lock); + if (error) { SEQ_DEBUG(2, printf("seq_write: user memory mangled?\n")); goto err0; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339722 - stable/9/sys/dev/sound/midi
Author: hselasky Date: Thu Oct 25 14:57:33 2018 New Revision: 339722 URL: https://svnweb.freebsd.org/changeset/base/339722 Log: MFC r339582: Drop sequencer mutex around uiomove() and make sure we don't move more bytes than is available, else a panic might happen. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/9/sys/dev/sound/midi/sequencer.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/sound/midi/sequencer.c == --- stable/9/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:56:19 2018 (r339721) +++ stable/9/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:57:33 2018 (r339722) @@ -928,7 +928,9 @@ seq_read(struct cdev *i_dev, struct uio *uio, int iofl SEQ_DEBUG(8, printf("midiread: uiomove cc=%d\n", used)); MIDIQ_DEQ(scp->in_q, buf, used); + mtx_unlock(&scp->seq_lock); retval = uiomove(buf, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err1; } @@ -1003,7 +1005,9 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof retval = ENXIO; goto err0; } + mtx_unlock(&scp->seq_lock); retval = uiomove(event, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1041,7 +1045,9 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(2, printf("seq_write: SEQ_FULLSIZE flusing buffer.\n")); while (uio->uio_resid > 0) { - retval = uiomove(event, EV_SZ, uio); + mtx_unlock(&scp->seq_lock); + retval = uiomove(event, MIN(EV_SZ, uio->uio_resid), uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1052,6 +1058,7 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof } retval = EINVAL; if (ev_code >= 128) { + int error; /* * Some sort of an extended event. The size is eight @@ -1061,7 +1068,13 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(2, printf("seq_write: invalid level two event %x.\n", ev_code)); goto err0; } - if (uiomove((caddr_t)&event[4], 4, uio)) { + mtx_unlock(&scp->seq_lock); + if (uio->uio_resid < 4) + error = EINVAL; + else + error = uiomove((caddr_t)&event[4], 4, uio); + mtx_lock(&scp->seq_lock); + if (error) { SEQ_DEBUG(2, printf("seq_write: user memory mangled?\n")); goto err0; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339721 - stable/10/sys/dev/sound/midi
Author: hselasky Date: Thu Oct 25 14:56:19 2018 New Revision: 339721 URL: https://svnweb.freebsd.org/changeset/base/339721 Log: MFC r339582: Drop sequencer mutex around uiomove() and make sure we don't move more bytes than is available, else a panic might happen. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/sound/midi/sequencer.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/midi/sequencer.c == --- stable/10/sys/dev/sound/midi/sequencer.cThu Oct 25 14:55:04 2018 (r339720) +++ stable/10/sys/dev/sound/midi/sequencer.cThu Oct 25 14:56:19 2018 (r339721) @@ -928,7 +928,9 @@ seq_read(struct cdev *i_dev, struct uio *uio, int iofl SEQ_DEBUG(8, printf("midiread: uiomove cc=%d\n", used)); MIDIQ_DEQ(scp->in_q, buf, used); + mtx_unlock(&scp->seq_lock); retval = uiomove(buf, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err1; } @@ -1003,7 +1005,9 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof retval = ENXIO; goto err0; } + mtx_unlock(&scp->seq_lock); retval = uiomove(event, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1041,7 +1045,9 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(2, printf("seq_write: SEQ_FULLSIZE flusing buffer.\n")); while (uio->uio_resid > 0) { - retval = uiomove(event, EV_SZ, uio); + mtx_unlock(&scp->seq_lock); + retval = uiomove(event, MIN(EV_SZ, uio->uio_resid), uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1052,6 +1058,7 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof } retval = EINVAL; if (ev_code >= 128) { + int error; /* * Some sort of an extended event. The size is eight @@ -1061,7 +1068,13 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(2, printf("seq_write: invalid level two event %x.\n", ev_code)); goto err0; } - if (uiomove((caddr_t)&event[4], 4, uio)) { + mtx_unlock(&scp->seq_lock); + if (uio->uio_resid < 4) + error = EINVAL; + else + error = uiomove((caddr_t)&event[4], 4, uio); + mtx_lock(&scp->seq_lock); + if (error) { SEQ_DEBUG(2, printf("seq_write: user memory mangled?\n")); goto err0; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339720 - stable/11/sys/dev/sound/midi
Author: hselasky Date: Thu Oct 25 14:55:04 2018 New Revision: 339720 URL: https://svnweb.freebsd.org/changeset/base/339720 Log: MFC r339582: Drop sequencer mutex around uiomove() and make sure we don't move more bytes than is available, else a panic might happen. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/sound/midi/sequencer.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sound/midi/sequencer.c == --- stable/11/sys/dev/sound/midi/sequencer.cThu Oct 25 14:53:24 2018 (r339719) +++ stable/11/sys/dev/sound/midi/sequencer.cThu Oct 25 14:55:04 2018 (r339720) @@ -919,7 +919,9 @@ mseq_read(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(8, printf("midiread: uiomove cc=%d\n", used)); MIDIQ_DEQ(scp->in_q, buf, used); + mtx_unlock(&scp->seq_lock); retval = uiomove(buf, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err1; } @@ -994,7 +996,9 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io retval = ENXIO; goto err0; } + mtx_unlock(&scp->seq_lock); retval = uiomove(event, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1032,7 +1036,9 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io SEQ_DEBUG(2, printf("seq_write: SEQ_FULLSIZE flusing buffer.\n")); while (uio->uio_resid > 0) { - retval = uiomove(event, EV_SZ, uio); + mtx_unlock(&scp->seq_lock); + retval = uiomove(event, MIN(EV_SZ, uio->uio_resid), uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1043,6 +1049,7 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io } retval = EINVAL; if (ev_code >= 128) { + int error; /* * Some sort of an extended event. The size is eight @@ -1052,7 +1059,13 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io SEQ_DEBUG(2, printf("seq_write: invalid level two event %x.\n", ev_code)); goto err0; } - if (uiomove((caddr_t)&event[4], 4, uio)) { + mtx_unlock(&scp->seq_lock); + if (uio->uio_resid < 4) + error = EINVAL; + else + error = uiomove((caddr_t)&event[4], 4, uio); + mtx_lock(&scp->seq_lock); + if (error) { SEQ_DEBUG(2, printf("seq_write: user memory mangled?\n")); goto err0; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339719 - stable/12/sys/dev/sound/midi
Author: hselasky Date: Thu Oct 25 14:53:24 2018 New Revision: 339719 URL: https://svnweb.freebsd.org/changeset/base/339719 Log: MFC r339582: Drop sequencer mutex around uiomove() and make sure we don't move more bytes than is available, else a panic might happen. Found by: Peter Holm Approved by: re (rgrimes) Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/sound/midi/sequencer.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/midi/sequencer.c == --- stable/12/sys/dev/sound/midi/sequencer.cThu Oct 25 14:38:03 2018 (r339718) +++ stable/12/sys/dev/sound/midi/sequencer.cThu Oct 25 14:53:24 2018 (r339719) @@ -921,7 +921,9 @@ mseq_read(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(8, printf("midiread: uiomove cc=%d\n", used)); MIDIQ_DEQ(scp->in_q, buf, used); + mtx_unlock(&scp->seq_lock); retval = uiomove(buf, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err1; } @@ -996,7 +998,9 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io retval = ENXIO; goto err0; } + mtx_unlock(&scp->seq_lock); retval = uiomove(event, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1034,7 +1038,9 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io SEQ_DEBUG(2, printf("seq_write: SEQ_FULLSIZE flusing buffer.\n")); while (uio->uio_resid > 0) { - retval = uiomove(event, EV_SZ, uio); + mtx_unlock(&scp->seq_lock); + retval = uiomove(event, MIN(EV_SZ, uio->uio_resid), uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1045,6 +1051,7 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io } retval = EINVAL; if (ev_code >= 128) { + int error; /* * Some sort of an extended event. The size is eight @@ -1054,7 +1061,13 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io SEQ_DEBUG(2, printf("seq_write: invalid level two event %x.\n", ev_code)); goto err0; } - if (uiomove((caddr_t)&event[4], 4, uio)) { + mtx_unlock(&scp->seq_lock); + if (uio->uio_resid < 4) + error = EINVAL; + else + error = uiomove((caddr_t)&event[4], 4, uio); + mtx_lock(&scp->seq_lock); + if (error) { SEQ_DEBUG(2, printf("seq_write: user memory mangled?\n")); goto err0; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339718 - stable/8/sys/dev/sound/midi
Author: hselasky Date: Thu Oct 25 14:38:03 2018 New Revision: 339718 URL: https://svnweb.freebsd.org/changeset/base/339718 Log: MFC r339581: Fix off-by-one which can lead to panics. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/8/sys/dev/sound/midi/sequencer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/midi/ (props changed) Modified: stable/8/sys/dev/sound/midi/sequencer.c == --- stable/8/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:37:26 2018 (r339717) +++ stable/8/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:38:03 2018 (r339718) @@ -737,7 +737,7 @@ static int seq_fetch_mid(struct seq_softc *scp, int unit, kobj_t *md) { - if (unit > scp->midi_number || unit < 0) + if (unit >= scp->midi_number || unit < 0) return EINVAL; *md = scp->midis[unit]; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339716 - stable/9/sys/dev/sound/midi
Author: hselasky Date: Thu Oct 25 14:36:56 2018 New Revision: 339716 URL: https://svnweb.freebsd.org/changeset/base/339716 Log: MFC r339581: Fix off-by-one which can lead to panics. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/9/sys/dev/sound/midi/sequencer.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/sound/midi/sequencer.c == --- stable/9/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:35:52 2018 (r339715) +++ stable/9/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:36:56 2018 (r339716) @@ -737,7 +737,7 @@ static int seq_fetch_mid(struct seq_softc *scp, int unit, kobj_t *md) { - if (unit > scp->midi_number || unit < 0) + if (unit >= scp->midi_number || unit < 0) return EINVAL; *md = scp->midis[unit]; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339717 - head/sys/dev/cxgbe
Author: np Date: Thu Oct 25 14:37:26 2018 New Revision: 339717 URL: https://svnweb.freebsd.org/changeset/base/339717 Log: cxgbe(4): Allow "pass" filters to distribute matching traffic using a subset of a VI's RSS indirection table. This makes it possible to make groups out of rx queues and steer different kinds of traffic to different groups. For example, an interface with 8 rx queues could have all non-TCP traffic delivered to queues 0-3 and all TCP traffic to queues 4-7. Note that it is already possible for filters to steer traffic to a particular queue or to distribute it using the full indirection table (much like normal rx does). Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_filter.c head/sys/dev/cxgbe/t4_ioctl.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_filter.c == --- head/sys/dev/cxgbe/t4_filter.c Thu Oct 25 14:36:56 2018 (r339716) +++ head/sys/dev/cxgbe/t4_filter.c Thu Oct 25 14:37:26 2018 (r339717) @@ -864,8 +864,8 @@ set_filter(struct adapter *sc, struct t4_filter *t) if (t->fs.val.iport >= sc->params.nports) return (EINVAL); - /* Can't specify an iq if not steering to it */ - if (!t->fs.dirsteer && t->fs.iq) + /* Can't specify an iqid/rss_info if not steering. */ + if (!t->fs.dirsteer && !t->fs.dirsteerhash && !t->fs.maskhash && t->fs.iq) return (EINVAL); /* Validate against the global filter mode and ingress config */ Modified: head/sys/dev/cxgbe/t4_ioctl.h == --- head/sys/dev/cxgbe/t4_ioctl.h Thu Oct 25 14:36:56 2018 (r339716) +++ head/sys/dev/cxgbe/t4_ioctl.h Thu Oct 25 14:37:26 2018 (r339717) @@ -209,7 +209,7 @@ struct t4_filter_specification { uint32_t rpttid:1; /* report TID in RSS hash field */ uint32_t dirsteer:1;/* 0 => RSS, 1 => steer to iq */ uint32_t iq:10; /* ingress queue */ - uint32_t maskhash:1;/* dirsteer=0: store RSS hash in TCB */ + uint32_t maskhash:1;/* dirsteer=0: steer to an RSS sub-region */ uint32_t dirsteerhash:1;/* dirsteer=1: 0 => TCB contains RSS hash */ /* 1 => TCB contains IQ ID */ Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cThu Oct 25 14:36:56 2018 (r339716) +++ head/sys/dev/cxgbe/t4_main.cThu Oct 25 14:37:26 2018 (r339717) @@ -4156,6 +4156,11 @@ set_params__post_init(struct adapter *sc) if (t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val) == 0) sc->params.port_caps32 = 1; + /* Let filter + maskhash steer to a part of the VI's RSS region. */ + val = 1 << (G_MASKSIZE(t4_read_reg(sc, A_TP_RSS_CONFIG_TNL)) - 1); + t4_set_reg_field(sc, A_TP_RSS_CONFIG_TNL, V_MASKFILTER(M_MASKFILTER), + V_MASKFILTER(val - 1)); + #ifdef TCP_OFFLOAD /* * Override the TOE timers with user provided tunables. This is not the ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339715 - stable/10/sys/dev/sound/midi
Author: hselasky Date: Thu Oct 25 14:35:52 2018 New Revision: 339715 URL: https://svnweb.freebsd.org/changeset/base/339715 Log: MFC r339581: Fix off-by-one which can lead to panics. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/sound/midi/sequencer.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/midi/sequencer.c == --- stable/10/sys/dev/sound/midi/sequencer.cThu Oct 25 14:34:38 2018 (r339714) +++ stable/10/sys/dev/sound/midi/sequencer.cThu Oct 25 14:35:52 2018 (r339715) @@ -737,7 +737,7 @@ static int seq_fetch_mid(struct seq_softc *scp, int unit, kobj_t *md) { - if (unit > scp->midi_number || unit < 0) + if (unit >= scp->midi_number || unit < 0) return EINVAL; *md = scp->midis[unit]; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339714 - stable/11/sys/dev/sound/midi
Author: hselasky Date: Thu Oct 25 14:34:38 2018 New Revision: 339714 URL: https://svnweb.freebsd.org/changeset/base/339714 Log: MFC r339581: Fix off-by-one which can lead to panics. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/sound/midi/sequencer.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sound/midi/sequencer.c == --- stable/11/sys/dev/sound/midi/sequencer.cThu Oct 25 14:12:48 2018 (r339713) +++ stable/11/sys/dev/sound/midi/sequencer.cThu Oct 25 14:34:38 2018 (r339714) @@ -728,7 +728,7 @@ static int seq_fetch_mid(struct seq_softc *scp, int unit, kobj_t *md) { - if (unit > scp->midi_number || unit < 0) + if (unit >= scp->midi_number || unit < 0) return EINVAL; *md = scp->midis[unit]; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339713 - in stable/10/sys/dev/mlx5: . mlx5_core
Author: slavash Date: Thu Oct 25 14:12:48 2018 New Revision: 339713 URL: https://svnweb.freebsd.org/changeset/base/339713 Log: MFC r339584: mlx5: Notify user that the ConnectX-6 shutdown its port due to power limitation If power exceed the slot limit, or slot limit is unknown the ConnectX-6 firmware will shutdown its port. Inform the user via debug message. Approved by:hselasky (mentor), kib (mentor) Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/device.h stable/10/sys/dev/mlx5/mlx5_core/mlx5_eq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/device.h == --- stable/10/sys/dev/mlx5/device.h Thu Oct 25 14:10:28 2018 (r339712) +++ stable/10/sys/dev/mlx5/device.h Thu Oct 25 14:12:48 2018 (r339713) @@ -475,6 +475,7 @@ enum { MLX5_MODULE_EVENT_ERROR_UNKNOWN_IDENTIFIER= 0x5, MLX5_MODULE_EVENT_ERROR_HIGH_TEMPERATURE = 0x6, MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED = 0x7, + MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED = 0xc, }; struct mlx5_eqe_port_module_event { Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_eq.c == --- stable/10/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Oct 25 14:10:28 2018 (r339712) +++ stable/10/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Oct 25 14:12:48 2018 (r339713) @@ -618,6 +618,12 @@ static const char *mlx5_port_module_event_error_type_t return "High Temperature"; case MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED: return "Cable is shorted"; + case MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED: + return "One or more network ports have been powered " + "down due to insufficient/unadvertised power on " + "the PCIe slot. Please refer to the card's user " + "manual for power specifications or contact " + "Mellanox support."; default: return "Unknown error type"; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339712 - in stable/11/sys/dev/mlx5: . mlx5_core
Author: slavash Date: Thu Oct 25 14:10:28 2018 New Revision: 339712 URL: https://svnweb.freebsd.org/changeset/base/339712 Log: MFC r339584 : mlx5: Notify user that the ConnectX-6 shutdown its port due to power limitation If power exceed the slot limit, or slot limit is unknown the ConnectX-6 firmware will shutdown its port. Inform the user via debug message. Approved by:hselasky (mentor), kib (mentor) Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/device.h stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/device.h == --- stable/11/sys/dev/mlx5/device.h Thu Oct 25 14:07:28 2018 (r339711) +++ stable/11/sys/dev/mlx5/device.h Thu Oct 25 14:10:28 2018 (r339712) @@ -549,6 +549,7 @@ enum { MLX5_MODULE_EVENT_ERROR_UNSUPPORTED_CABLE = 0x5, MLX5_MODULE_EVENT_ERROR_HIGH_TEMPERATURE = 0x6, MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED = 0x7, + MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED = 0xc, }; struct mlx5_eqe_port_module_event { Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c == --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Oct 25 14:07:28 2018 (r339711) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Oct 25 14:10:28 2018 (r339712) @@ -615,6 +615,12 @@ static const char *mlx5_port_module_event_error_type_t return "High Temperature"; case MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED: return "Cable is shorted"; + case MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED: + return "One or more network ports have been powered " + "down due to insufficient/unadvertised power on " + "the PCIe slot. Please refer to the card's user " + "manual for power specifications or contact " + "Mellanox support."; default: return "Unknown error type"; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339711 - in stable/12/sys/dev/mlx5: . mlx5_core
Author: slavash Date: Thu Oct 25 14:07:28 2018 New Revision: 339711 URL: https://svnweb.freebsd.org/changeset/base/339711 Log: MFC r339584: mlx5: Notify user that the ConnectX-6 shutdown its port due to power limitation If power exceed the slot limit, or slot limit is unknown the ConnectX-6 firmware will shutdown its port. Inform the user via debug message. Approved by:re(rgrimes), hselasky (mentor), kib (mentor) Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/device.h stable/12/sys/dev/mlx5/mlx5_core/mlx5_eq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/device.h == --- stable/12/sys/dev/mlx5/device.h Thu Oct 25 13:46:28 2018 (r339710) +++ stable/12/sys/dev/mlx5/device.h Thu Oct 25 14:07:28 2018 (r339711) @@ -549,6 +549,7 @@ enum { MLX5_MODULE_EVENT_ERROR_UNSUPPORTED_CABLE = 0x5, MLX5_MODULE_EVENT_ERROR_HIGH_TEMPERATURE = 0x6, MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED = 0x7, + MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED = 0xc, }; struct mlx5_eqe_port_module_event { Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_eq.c == --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Oct 25 13:46:28 2018 (r339710) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Oct 25 14:07:28 2018 (r339711) @@ -615,6 +615,12 @@ static const char *mlx5_port_module_event_error_type_t return "High Temperature"; case MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED: return "Cable is shorted"; + case MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED: + return "One or more network ports have been powered " + "down due to insufficient/unadvertised power on " + "the PCIe slot. Please refer to the card's user " + "manual for power specifications or contact " + "Mellanox support."; default: return "Unknown error type"; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339710 - stable/11/contrib/elftoolchain/elfcopy
Author: emaste Date: Thu Oct 25 13:46:28 2018 New Revision: 339710 URL: https://svnweb.freebsd.org/changeset/base/339710 Log: elfcopy: avoid stripping relocations from static binaries MFC r339350: elfcopy: delete filter_reloc, it is broken and unnecessary elfcopy contained logic to filter individual relocations in STRIP_ALL mode. However, this is not valid; relocations emitted by the linker are required, unless they apply to an entire section being removed (which is handled by other logic in elfcopy). Note that filter_reloc was also buggy: for RELA relocation sections it operated on uninitialized rel.r_info resulting in invalid operation. The logic most likely needs to be inverted: instead of removing relocations because their associated symbols are being removed, we must keep symbols referenced by relocations. That said, in practice we do not encounter this code path today: objects being stripped are either dynamically linked binaries which retain .dynsym, or static binaries with no relocations. Just remove filter_reloc. This fixes certain cases including statically linked binaries containing ifuncs. Stripping binaries with relocations referencing removed symbols was already broken, and after this change may still be broken in a different way. MFC r339451: objcopy: restore behaviour required by GCC's build In r339350 filter_reloc() was removed, to fix the case of stripping statically linked binaries with relocations (which may come from ifunc use, for example). As a side effect this changed the behaviour when stripping object files - the output was broken both before and after r339350, in different ways. Unfortunately GCC's build process relies on the previous behaviour, so: - Revert r339350, restoring filter_reloc(). - Fix an unitialized variable use (commited as r3638 in ELF Tool Chain). - Change filter_reloc() to omit relocations referencing removed symbols, while retaining relocations with no symbol reference. - Retain the entire relocation section if it references the dynamic symbol table (fix from kaiw in D17596). PR: 232176 Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/elftoolchain/elfcopy/sections.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/elfcopy/sections.c == --- stable/11/contrib/elftoolchain/elfcopy/sections.c Thu Oct 25 13:37:57 2018(r339709) +++ stable/11/contrib/elftoolchain/elfcopy/sections.c Thu Oct 25 13:46:28 2018(r339710) @@ -689,7 +689,7 @@ filter_reloc(struct elfcopy *ecp, struct section *s) Elf32_Rela *rela32; Elf64_Rela *rela64; Elf_Data*id; - uint64_t cap, n, nrels; + uint64_t cap, n, nrels, sym; int elferr, i; if (gelf_getshdr(s->is, &ish) == NULL) @@ -698,15 +698,13 @@ filter_reloc(struct elfcopy *ecp, struct section *s) /* We don't want to touch relocation info for dynamic symbols. */ if ((ecp->flags & SYMTAB_EXIST) == 0) { - if (ish.sh_link == 0 || ecp->secndx[ish.sh_link] == 0) { - /* -* This reloc section applies to the symbol table -* that was stripped, so discard whole section. -*/ - s->nocopy = 1; - s->sz = 0; - } - return; + /* +* No symbol table in output. If sh_link points to a section +* that exists in the output object, this relocation section +* is for dynamic symbols. Don't touch it. +*/ + if (ish.sh_link != 0 && ecp->secndx[ish.sh_link] != 0) + return; } else { /* Symbol table exist, check if index equals. */ if (ish.sh_link != elf_ndxscn(ecp->symtab->is)) @@ -747,28 +745,45 @@ filter_reloc(struct elfcopy *ecp, struct section *s) if (gelf_getrel(id, i, &rel) != &rel) errx(EXIT_FAILURE, "gelf_getrel failed: %s", elf_errmsg(-1)); + sym = GELF_R_SYM(rel.r_info); } else { if (gelf_getrela(id, i, &rela) != &rela) errx(EXIT_FAILURE, "gelf_getrel failed: %s", elf_errmsg(-1)); + sym = GELF_R_SYM(rela.r_info); } - name = elf_strptr(ecp->ein, elf_ndxscn(ecp->strtab->is), - GELF_R_SYM(rel.r_info)); - if (name == NULL) - errx(EXIT_FAILURE, "elf_strptr failed: %s", - elf_errmsg(-1)); - i
svn commit: r339709 - in head: . secure/lib/libcrypto secure/lib/libssl
Author: kib Date: Thu Oct 25 13:37:57 2018 New Revision: 339709 URL: https://svnweb.freebsd.org/changeset/base/339709 Log: Bump base OpenSSL libraries versions to avoid conflict with port's libraries. Reported by: many Reviewed by: gjb Sponsored by: The FreeBSD Foundation MFC after:3 hours Modified: head/ObsoleteFiles.inc head/secure/lib/libcrypto/Makefile head/secure/lib/libssl/Makefile Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Thu Oct 25 12:27:16 2018(r339708) +++ head/ObsoleteFiles.inc Thu Oct 25 13:37:57 2018(r339709) @@ -38,6 +38,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20181025: OpenSSL libraries version bump to avoid conflict with ports +OLD_LIBS+=lib/libcrypto.so.9 +OLD_LIBS+=usr/lib/libssl.so.9 +OLD_LIBS+=usr/lib32/libcrypto.so.9 +OLD_LIBS+=usr/lib32/libssl.so.9 # 20181021: mse(4) removal OLD_FILES+=usr/share/man/man4/mse.4.gz # 20181021: joy(4) removal Modified: head/secure/lib/libcrypto/Makefile == --- head/secure/lib/libcrypto/Makefile Thu Oct 25 12:27:16 2018 (r339708) +++ head/secure/lib/libcrypto/Makefile Thu Oct 25 13:37:57 2018 (r339709) @@ -6,7 +6,7 @@ SUBDIR= engines .include LIB= crypto -SHLIB_MAJOR= 9 +SHLIB_MAJOR= 111 VERSION_MAP= ${.CURDIR}/Version.map NO_LINT= Modified: head/secure/lib/libssl/Makefile == --- head/secure/lib/libssl/Makefile Thu Oct 25 12:27:16 2018 (r339708) +++ head/secure/lib/libssl/Makefile Thu Oct 25 13:37:57 2018 (r339709) @@ -1,7 +1,7 @@ # $FreeBSD$ LIB= ssl -SHLIB_MAJOR= 9 +SHLIB_MAJOR= 111 VERSION_MAP= ${.CURDIR}/Version.map NO_LINT= ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r339704 - in stable/12/sys: amd64/conf i386/conf
On Thu, Oct 25, 2018, 5:12 AM Rodney W. Grimes < free...@pdx.rh.cn85.dnsmgr.net> wrote: > > Author: imp > > Date: Thu Oct 25 05:18:25 2018 > > New Revision: 339704 > > URL: https://svnweb.freebsd.org/changeset/base/339704 > > > > Log: > > MFC: r339562 (remove obsolete drivers from GENERIC) > > > > Remove the drivers we'd planned on removing from 12.x from GENERIC. > > > > Approved by:re@ (rgrimes@) > > There has just been a report of one of the NON-PNP devices that > are marked gonein(12) by a person on BETA1, I am asking for > specific details. > > I had that it was in this list of devices, but it appears there > is yet more to be removed as these are just the old scsi cards, > and iirc these > That's unrelated to this change. I'd gotten some reports of them for something weird and thought they were resolved months ago. I'll check into it, but it is harmless for now I think. Thanks for forwarding it my way. Warner > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339708 - stable/12/sys/dev/sound/midi
Author: hselasky Date: Thu Oct 25 12:27:16 2018 New Revision: 339708 URL: https://svnweb.freebsd.org/changeset/base/339708 Log: MFC r339581: Fix off-by-one which can lead to panics. Found by: Peter Holm Approved by: re (kib) Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/sound/midi/sequencer.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/midi/sequencer.c == --- stable/12/sys/dev/sound/midi/sequencer.cThu Oct 25 12:13:13 2018 (r339707) +++ stable/12/sys/dev/sound/midi/sequencer.cThu Oct 25 12:27:16 2018 (r339708) @@ -730,7 +730,7 @@ static int seq_fetch_mid(struct seq_softc *scp, int unit, kobj_t *md) { - if (unit > scp->midi_number || unit < 0) + if (unit >= scp->midi_number || unit < 0) return EINVAL; *md = scp->midis[unit]; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339707 - head/sbin/fdisk
Author: rgrimes Date: Thu Oct 25 12:13:13 2018 New Revision: 339707 URL: https://svnweb.freebsd.org/changeset/base/339707 Log: Allow fdisk(8) to deal with sectors larger than 2048 especially for 4Kn drives with PMBR's Approved by:bde (mentor) MFC:3 days Modified: head/sbin/fdisk/fdisk.c Modified: head/sbin/fdisk/fdisk.c == --- head/sbin/fdisk/fdisk.c Thu Oct 25 08:05:53 2018(r339706) +++ head/sbin/fdisk/fdisk.c Thu Oct 25 12:13:13 2018(r339707) @@ -67,7 +67,7 @@ static char lbuf[LBUF]; #define Decimal(str, ans, tmp, maxval) if (decimal(str, &tmp, ans, maxval)) ans = tmp -#define MAX_SEC_SIZE 2048 /* maximum section size that is supported */ +#define MAX_SEC_SIZE 65536 /* maximum sector size that is supported */ #define MIN_SEC_SIZE 512 /* the sector size to start sensing at */ static int secsize = 0;/* the sensed sector size */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r339704 - in stable/12/sys: amd64/conf i386/conf
> Author: imp > Date: Thu Oct 25 05:18:25 2018 > New Revision: 339704 > URL: https://svnweb.freebsd.org/changeset/base/339704 > > Log: > MFC: r339562 (remove obsolete drivers from GENERIC) > > Remove the drivers we'd planned on removing from 12.x from GENERIC. > > Approved by:re@ (rgrimes@) There has just been a report of one of the NON-PNP devices that are marked gonein(12) by a person on BETA1, I am asking for specific details. I had that it was in this list of devices, but it appears there is yet more to be removed as these are just the old scsi cards, and iirc these are all PnP. -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339706 - head/usr.sbin/portsnap/portsnap
Author: delphij Date: Thu Oct 25 08:05:53 2018 New Revision: 339706 URL: https://svnweb.freebsd.org/changeset/base/339706 Log: Now that the portsnap buildbox is generating the raw bits for INDEX-13, add it to the set of INDEX files built by portsnap. Switch to INDEX-13 for head/. Modified: head/usr.sbin/portsnap/portsnap/portsnap.conf Modified: head/usr.sbin/portsnap/portsnap/portsnap.conf == --- head/usr.sbin/portsnap/portsnap/portsnap.conf Thu Oct 25 06:24:42 2018(r339705) +++ head/usr.sbin/portsnap/portsnap/portsnap.conf Thu Oct 25 08:05:53 2018(r339706) @@ -32,4 +32,5 @@ KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddbd64f13f978f2f3 # List of INDEX files to build and the DESCRIBE file to use for each #INDEX INDEX-10 DESCRIBE.10 #INDEX INDEX-11 DESCRIBE.11 -INDEX INDEX-12 DESCRIBE.12 +#INDEX INDEX-12 DESCRIBE.12 +INDEX INDEX-13 DESCRIBE.13 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"