From owner-svn-src-stable-10@freebsd.org Wed Mar 11 08:21:52 2020 Return-Path: Delivered-To: svn-src-stable-10@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 22615258787; Wed, 11 Mar 2020 08:21:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48clL75GcZz3HQG; Wed, 11 Mar 2020 08:21:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D5079A14; Wed, 11 Mar 2020 08:21:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02B8LmTE060577; Wed, 11 Mar 2020 08:21:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02B8Lm96060575; Wed, 11 Mar 2020 08:21:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003110821.02B8Lm96060575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 11 Mar 2020 08:21:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r358875 - in stable/10/sys/dev/usb: . controller X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/10/sys/dev/usb: . controller X-SVN-Commit-Revision: 358875 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2020 08:21:52 -0000 Author: hselasky Date: Wed Mar 11 08:21:48 2020 New Revision: 358875 URL: https://svnweb.freebsd.org/changeset/base/358875 Log: MFC r358738: Remove the power bit from the super speed root hub port status register because it clobbers the super speed link status when a device is in super speed mode. Currently the power bit is not needed for anything in the USB hub driver. This fixes USB warm reset for super speed devices. Tested by: Shichun.Ma@dell.com Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/usb/controller/xhci.c stable/10/sys/dev/usb/usb_hub.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Wed Mar 11 08:21:04 2020 (r358874) +++ stable/10/sys/dev/usb/controller/xhci.c Wed Mar 11 08:21:48 2020 (r358875) @@ -3591,13 +3591,10 @@ xhci_roothub_exec(struct usb_device *udev, i |= UPS_OVERCURRENT_INDICATOR; if (v & XHCI_PS_PR) i |= UPS_RESET; - if (v & XHCI_PS_PP) { - /* - * The USB 3.0 RH is using the - * USB 2.0's power bit - */ - i |= UPS_PORT_POWER; - } +#if 0 + if (v & XHCI_PS_PP) + /* XXX undefined */ +#endif USETW(sc->sc_hub_desc.ps.wPortStatus, i); i = 0; Modified: stable/10/sys/dev/usb/usb_hub.c ============================================================================== --- stable/10/sys/dev/usb/usb_hub.c Wed Mar 11 08:21:04 2020 (r358874) +++ stable/10/sys/dev/usb/usb_hub.c Wed Mar 11 08:21:48 2020 (r358875) @@ -692,7 +692,7 @@ repeat: break; case USB_SPEED_SUPER: if (udev->parent_hub == NULL) - power_mask = UPS_PORT_POWER; + power_mask = 0; /* XXX undefined */ else power_mask = UPS_PORT_POWER_SS; break; @@ -700,7 +700,7 @@ repeat: power_mask = 0; break; } - if (!(sc->sc_st.port_status & power_mask)) { + if ((sc->sc_st.port_status & power_mask) != power_mask) { DPRINTF("WARNING: strange, connected port %d " "has no power\n", portno); } From owner-svn-src-stable-10@freebsd.org Wed Mar 11 08:26:15 2020 Return-Path: Delivered-To: svn-src-stable-10@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 91B99258CAA; Wed, 11 Mar 2020 08:26:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48clRB58DBz3M5m; Wed, 11 Mar 2020 08:26:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 09B489A8C; Wed, 11 Mar 2020 08:26:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02B8QC8O065076; Wed, 11 Mar 2020 08:26:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02B8QCFM065073; Wed, 11 Mar 2020 08:26:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003110826.02B8QCFM065073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 11 Mar 2020 08:26:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r358879 - stable/10/sys/dev/sound/pcm X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/sound/pcm X-SVN-Commit-Revision: 358879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2020 08:26:16 -0000 Author: hselasky Date: Wed Mar 11 08:26:11 2020 New Revision: 358879 URL: https://svnweb.freebsd.org/changeset/base/358879 Log: MFC r358629: Implement a detaching flag for the sound(4) subsystem to take appropriate actions when we are trying to detach an audio device, but cannot because someone is using it. This avoids applications having to wait for the DSP read data timeout before they receive any error indication. Tested with virtual_oss(8). Remove some unused definitions while at it. PR: 194727 Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/sound/pcm/dsp.c stable/10/sys/dev/sound/pcm/mixer.c stable/10/sys/dev/sound/pcm/sound.c stable/10/sys/dev/sound/pcm/sound.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pcm/dsp.c ============================================================================== --- stable/10/sys/dev/sound/pcm/dsp.c Wed Mar 11 08:25:33 2020 (r358878) +++ stable/10/sys/dev/sound/pcm/dsp.c Wed Mar 11 08:26:11 2020 (r358879) @@ -459,7 +459,7 @@ dsp_open(struct cdev *i_dev, int flags, int mode, stru return (ENODEV); d = dsp_get_info(i_dev); - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) return (EBADF); PCM_GIANT_ENTER(d); @@ -829,7 +829,7 @@ dsp_io_ops(struct cdev *i_dev, struct uio *buf) ("%s(): io train wreck!", __func__)); d = dsp_get_info(i_dev); - if (!DSP_REGISTERED(d, i_dev)) + if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev)) return (EBADF); PCM_GIANT_ENTER(d); @@ -1074,7 +1074,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int *arg_i, ret, tmp; d = dsp_get_info(i_dev); - if (!DSP_REGISTERED(d, i_dev)) + if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev)) return (EBADF); PCM_GIANT_ENTER(d); @@ -2169,9 +2169,11 @@ dsp_poll(struct cdev *i_dev, int events, struct thread int ret, e; d = dsp_get_info(i_dev); - if (!DSP_REGISTERED(d, i_dev)) - return (EBADF); - + if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev)) { + /* XXX many clients don't understand POLLNVAL */ + return (events & (POLLHUP | POLLPRI | POLLIN | + POLLRDNORM | POLLOUT | POLLWRNORM)); + } PCM_GIANT_ENTER(d); wrch = NULL; @@ -2242,7 +2244,7 @@ dsp_mmap_single(struct cdev *i_dev, vm_ooffset_t *offs return (EINVAL); d = dsp_get_info(i_dev); - if (!DSP_REGISTERED(d, i_dev)) + if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev)) return (EINVAL); PCM_GIANT_ENTER(d); Modified: stable/10/sys/dev/sound/pcm/mixer.c ============================================================================== --- stable/10/sys/dev/sound/pcm/mixer.c Wed Mar 11 08:25:33 2020 (r358878) +++ stable/10/sys/dev/sound/pcm/mixer.c Wed Mar 11 08:26:11 2020 (r358879) @@ -152,7 +152,7 @@ mixer_set_softpcmvol(struct snd_mixer *m, struct sndde struct pcm_channel *c; int dropmtx, acquiremtx; - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) return (EINVAL); if (mtx_owned(m->lock)) @@ -205,7 +205,7 @@ mixer_set_eq(struct snd_mixer *m, struct snddev_info * else return (EINVAL); - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) return (EINVAL); if (mtx_owned(m->lock)) @@ -1045,7 +1045,7 @@ mixer_open(struct cdev *i_dev, int flags, int mode, st m = i_dev->si_drv1; d = device_get_softc(m->dev); - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) return (EBADF); /* XXX Need Giant magic entry ??? */ @@ -1201,7 +1201,7 @@ mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t ar return (EBADF); d = device_get_softc(((struct snd_mixer *)i_dev->si_drv1)->dev); - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) return (EBADF); PCM_GIANT_ENTER(d); @@ -1412,7 +1412,7 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { d = devclass_get_softc(pcm_devclass, i); - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) continue; /* XXX Need Giant magic entry */ Modified: stable/10/sys/dev/sound/pcm/sound.c ============================================================================== --- stable/10/sys/dev/sound/pcm/sound.c Wed Mar 11 08:25:33 2020 (r358878) +++ stable/10/sys/dev/sound/pcm/sound.c Wed Mar 11 08:26:11 2020 (r358879) @@ -1154,6 +1154,8 @@ pcm_unregister(device_t dev) PCM_LOCK(d); PCM_WAIT(d); + d->flags |= SD_F_DETACHING; + if (d->inprog != 0) { device_printf(dev, "unregister: operation in progress\n"); PCM_UNLOCK(d); Modified: stable/10/sys/dev/sound/pcm/sound.h ============================================================================== --- stable/10/sys/dev/sound/pcm/sound.h Wed Mar 11 08:25:33 2020 (r358878) +++ stable/10/sys/dev/sound/pcm/sound.h Wed Mar 11 08:26:11 2020 (r358879) @@ -135,15 +135,8 @@ struct snd_mixer; #define SD_F_SIMPLEX 0x00000001 #define SD_F_AUTOVCHAN 0x00000002 #define SD_F_SOFTPCMVOL 0x00000004 -/* - * Obsolete due to better matrixing - */ -#if 0 -#define SD_F_PSWAPLR 0x00000008 -#define SD_F_RSWAPLR 0x00000010 -#endif #define SD_F_DYING 0x00000008 -#define SD_F_SUICIDE 0x00000010 +#define SD_F_DETACHING 0x00000010 #define SD_F_BUSY 0x00000020 #define SD_F_MPSAFE 0x00000040 #define SD_F_REGISTERED 0x00000080 @@ -169,7 +162,7 @@ struct snd_mixer; "\002AUTOVCHAN" \ "\003SOFTPCMVOL" \ "\004DYING" \ - "\005SUICIDE" \ + "\005DETACHING" \ "\006BUSY" \ "\007MPSAFE" \ "\010REGISTERED" \ @@ -187,6 +180,8 @@ struct snd_mixer; !((x)->flags & SD_F_DYING)) #define PCM_REGISTERED(x) (PCM_ALIVE(x) && \ ((x)->flags & SD_F_REGISTERED)) + +#define PCM_DETACHING(x) ((x)->flags & SD_F_DETACHING) /* many variables should be reduced to a range. Here define a macro */ #define RANGE(var, low, high) (var) = \ From owner-svn-src-stable-10@freebsd.org Fri Mar 13 01:06:11 2020 Return-Path: Delivered-To: svn-src-stable-10@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A68C270606; Fri, 13 Mar 2020 01:06:11 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48dnZW0ZLqz4Zqk; Fri, 13 Mar 2020 01:06:11 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0C7662DFD4; Fri, 13 Mar 2020 01:06:11 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02D16Ba6033555; Fri, 13 Mar 2020 01:06:11 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02D168To033542; Fri, 13 Mar 2020 01:06:08 GMT (envelope-from mm@FreeBSD.org) Message-Id: <202003130106.02D168To033542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Fri, 13 Mar 2020 01:06:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r358927 - in stable/10/contrib/libarchive: cpio cpio/test libarchive libarchive/test X-SVN-Group: stable-10 X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in stable/10/contrib/libarchive: cpio cpio/test libarchive libarchive/test X-SVN-Commit-Revision: 358927 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 01:06:11 -0000 Author: mm Date: Fri Mar 13 01:06:08 2020 New Revision: 358927 URL: https://svnweb.freebsd.org/changeset/base/358927 Log: MFC r358533: Sync libarchive with vendor. Relevant vendor changes: Issue #1257: Add testcase for ZIPX files with LZMA_STREAM_END marker PR #1331: cpio.5: fix hard link description Issue #1335: archive_read.c: fix UBSan warning about undefined behavior Issue #1338: XAR reader: fix UBSan warning about undefined behavior Issue #1339: bsdcpio_test: fix datatype in from_hex() Issue #1341: Safe writes: delete temporary file if rename fails. Issue #1341: Safe writes: improve error handling Added: stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu - copied unchanged from r358533, head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu Modified: stable/10/contrib/libarchive/cpio/cpio.c stable/10/contrib/libarchive/cpio/cpio.h stable/10/contrib/libarchive/cpio/test/test_format_newc.c stable/10/contrib/libarchive/libarchive/archive_read.c stable/10/contrib/libarchive/libarchive/archive_read_open_filename.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_xar.c stable/10/contrib/libarchive/libarchive/archive_util.c stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_xar.c stable/10/contrib/libarchive/libarchive/cpio.5 stable/10/contrib/libarchive/libarchive/test/test_read_format_zip.c Modified: stable/10/contrib/libarchive/cpio/cpio.c ============================================================================== --- stable/10/contrib/libarchive/cpio/cpio.c Fri Mar 13 01:05:55 2020 (r358926) +++ stable/10/contrib/libarchive/cpio/cpio.c Fri Mar 13 01:06:08 2020 (r358927) @@ -737,7 +737,7 @@ file_to_archive(struct cpio *cpio, const char *srcpath */ destpath = srcpath; if (cpio->destdir) { - len = strlen(cpio->destdir) + strlen(srcpath) + 8; + len = cpio->destdir_len + strlen(srcpath) + 8; if (len >= cpio->pass_destpath_alloc) { while (len >= cpio->pass_destpath_alloc) { cpio->pass_destpath_alloc += 512; @@ -1226,15 +1226,14 @@ mode_pass(struct cpio *cpio, const char *destdir) struct lafe_line_reader *lr; const char *p; int r; - size_t destdir_len; /* Ensure target dir has a trailing '/' to simplify path surgery. */ - destdir_len = strlen(destdir); - cpio->destdir = malloc(destdir_len + 8); - memcpy(cpio->destdir, destdir, destdir_len); - if (destdir_len == 0 || destdir[destdir_len - 1] != '/') - cpio->destdir[destdir_len++] = '/'; - cpio->destdir[destdir_len++] = '\0'; + cpio->destdir_len = strlen(destdir); + cpio->destdir = malloc(cpio->destdir_len + 8); + memcpy(cpio->destdir, destdir, cpio->destdir_len); + if (cpio->destdir_len == 0 || destdir[cpio->destdir_len - 1] != '/') + cpio->destdir[cpio->destdir_len++] = '/'; + cpio->destdir[cpio->destdir_len] = '\0'; cpio->archive = archive_write_disk_new(); if (cpio->archive == NULL) Modified: stable/10/contrib/libarchive/cpio/cpio.h ============================================================================== --- stable/10/contrib/libarchive/cpio/cpio.h Fri Mar 13 01:05:55 2020 (r358926) +++ stable/10/contrib/libarchive/cpio/cpio.h Fri Mar 13 01:06:08 2020 (r358927) @@ -64,6 +64,7 @@ struct cpio { int option_numeric_uid_gid; /* -n */ int option_rename; /* -r */ char *destdir; + size_t destdir_len; size_t pass_destpath_alloc; char *pass_destpath; int uid_override; Modified: stable/10/contrib/libarchive/cpio/test/test_format_newc.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_format_newc.c Fri Mar 13 01:05:55 2020 (r358926) +++ stable/10/contrib/libarchive/cpio/test/test_format_newc.c Fri Mar 13 01:06:08 2020 (r358927) @@ -49,10 +49,11 @@ is_hex(const char *p, size_t l) return (1); } -static int +/* Convert up to 8 hex characters to unsigned 32-bit decimal integer */ +static uint32_t from_hex(const char *p, size_t l) { - int r = 0; + uint32_t r = 0; while (l > 0) { r *= 16; @@ -82,11 +83,11 @@ DEFINE_TEST(test_format_newc) { FILE *list; int r; - int devmajor, devminor, ino, gid; - int uid = -1; + uint32_t devmajor, devminor, ino, gid, uid; time_t t, t2, now; char *p, *e; - size_t s, fs, ns; + size_t s; + uint64_t fs, ns; char result[1024]; assertUmask(0); @@ -199,9 +200,11 @@ DEFINE_TEST(test_format_newc) #else assertEqualInt(0x81a4, from_hex(e + 14, 8)); /* Mode */ #endif - if (uid < 0) - uid = from_hex(e + 22, 8); +#if defined(_WIN32) + uid = from_hex(e + 22, 8); +#else assertEqualInt(from_hex(e + 22, 8), uid); /* uid */ +#endif gid = from_hex(e + 30, 8); /* gid */ assertEqualMem(e + 38, "00000003", 8); /* nlink */ t = from_hex(e + 46, 8); /* mtime */ @@ -215,14 +218,14 @@ DEFINE_TEST(test_format_newc) " first appearance should be empty, so this file size\n" " field should be zero"); assertEqualInt(0, from_hex(e + 54, 8)); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); devmajor = from_hex(e + 62, 8); /* devmajor */ devminor = from_hex(e + 70, 8); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000006", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "file1\0", 6); /* Name contents */ @@ -249,14 +252,14 @@ DEFINE_TEST(test_format_newc) " at t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000005", 8); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000008", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "symlink\0\0\0", 10); /* Name contents */ @@ -285,14 +288,14 @@ DEFINE_TEST(test_format_newc) "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000000", 8); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000004", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "dir\0\0\0", 6); /* Name contents */ @@ -319,14 +322,14 @@ DEFINE_TEST(test_format_newc) "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualInt(10, from_hex(e + 54, 8)); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000009", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "hardlink\0\0", 10); /* Name contents */ Modified: stable/10/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read.c Fri Mar 13 01:05:55 2020 (r358926) +++ stable/10/contrib/libarchive/libarchive/archive_read.c Fri Mar 13 01:06:08 2020 (r358927) @@ -892,15 +892,16 @@ archive_read_data(struct archive *_a, void *buff, size len = a->read_data_remaining; if (len > s) len = s; - if (len) + if (len) { memcpy(dest, a->read_data_block, len); - s -= len; - a->read_data_block += len; - a->read_data_remaining -= len; - a->read_data_output_offset += len; - a->read_data_offset += len; - dest += len; - bytes_read += len; + s -= len; + a->read_data_block += len; + a->read_data_remaining -= len; + a->read_data_output_offset += len; + a->read_data_offset += len; + dest += len; + bytes_read += len; + } } } a->read_data_is_posix_read = 0; Modified: stable/10/contrib/libarchive/libarchive/archive_read_open_filename.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_open_filename.c Fri Mar 13 01:05:55 2020 (r358926) +++ stable/10/contrib/libarchive/libarchive/archive_read_open_filename.c Fri Mar 13 01:06:08 2020 (r358927) @@ -221,7 +221,9 @@ file_open(struct archive *a, void *client_data) struct read_file_data *mine = (struct read_file_data *)client_data; void *buffer; const char *filename = NULL; +#if defined(_WIN32) && !defined(__CYGWIN__) const wchar_t *wfilename = NULL; +#endif int fd = -1; int is_disk_like = 0; #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) @@ -281,10 +283,12 @@ file_open(struct archive *a, void *client_data) #endif } if (fstat(fd, &st) != 0) { +#if defined(_WIN32) && !defined(__CYGWIN__) if (mine->filename_type == FNT_WCS) archive_set_error(a, errno, "Can't stat '%S'", wfilename); else +#endif archive_set_error(a, errno, "Can't stat '%s'", filename); goto fail; Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_format_xar.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_format_xar.c Fri Mar 13 01:05:55 2020 (r358926) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_format_xar.c Fri Mar 13 01:06:08 2020 (r358927) @@ -458,6 +458,11 @@ archive_read_support_format_xar(struct archive *_a) return (ARCHIVE_FATAL); } + /* initialize xar->file_queue */ + xar->file_queue.allocated = 0; + xar->file_queue.used = 0; + xar->file_queue.files = NULL; + r = __archive_read_register_format(a, xar, "xar", @@ -1221,10 +1226,12 @@ heap_add_entry(struct archive_read *a, /* Expand our pending files list as necessary. */ if (heap->used >= heap->allocated) { struct xar_file **new_pending_files; - int new_size = heap->allocated * 2; + int new_size; if (heap->allocated < 1024) new_size = 1024; + else + new_size = heap->allocated * 2; /* Overflow might keep us from growing the list. */ if (new_size <= heap->allocated) { archive_set_error(&a->archive, @@ -1238,9 +1245,11 @@ heap_add_entry(struct archive_read *a, ENOMEM, "Out of memory"); return (ARCHIVE_FATAL); } - memcpy(new_pending_files, heap->files, - heap->allocated * sizeof(new_pending_files[0])); - free(heap->files); + if (heap->allocated) { + memcpy(new_pending_files, heap->files, + heap->allocated * sizeof(new_pending_files[0])); + free(heap->files); + } heap->files = new_pending_files; heap->allocated = new_size; } Modified: stable/10/contrib/libarchive/libarchive/archive_util.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_util.c Fri Mar 13 01:05:55 2020 (r358926) +++ stable/10/contrib/libarchive/libarchive/archive_util.c Fri Mar 13 01:06:08 2020 (r358927) @@ -365,6 +365,7 @@ __archive_mktempx(const char *tmpdir, wchar_t *templat } fd = _open_osfhandle((intptr_t)h, _O_BINARY | _O_RDWR); if (fd == -1) { + la_dosmaperr(GetLastError()); CloseHandle(h); goto exit_tmpfile; } else Modified: stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c Fri Mar 13 01:05:55 2020 (r358926) +++ stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c Fri Mar 13 01:06:08 2020 (r358927) @@ -1840,8 +1840,9 @@ finish_metadata: if (a->tmpname) { if (rename(a->tmpname, a->name) == -1) { archive_set_error(&a->archive, errno, - "rename failed"); - ret = ARCHIVE_FATAL; + "Failed to rename temporary file"); + ret = ARCHIVE_FAILED; + unlink(a->tmpname); } a->tmpname = NULL; } @@ -2128,8 +2129,11 @@ restore_entry(struct archive_write_disk *a) if ((a->flags & ARCHIVE_EXTRACT_SAFE_WRITES) && S_ISREG(a->st.st_mode)) { /* Use a temporary file to extract */ - if ((a->fd = la_mktemp(a)) == -1) + if ((a->fd = la_mktemp(a)) == -1) { + archive_set_error(&a->archive, errno, + "Can't create temporary file"); return ARCHIVE_FAILED; + } a->pst = NULL; en = 0; } else { Modified: stable/10/contrib/libarchive/libarchive/archive_write_set_format_xar.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_write_set_format_xar.c Fri Mar 13 01:05:55 2020 (r358926) +++ stable/10/contrib/libarchive/libarchive/archive_write_set_format_xar.c Fri Mar 13 01:06:08 2020 (r358927) @@ -681,7 +681,8 @@ xar_write_data(struct archive_write *a, const void *bu { struct xar *xar; enum la_zaction run; - size_t size, rsize; + size_t size = 0; + size_t rsize; int r; xar = (struct xar *)a->format_data; Modified: stable/10/contrib/libarchive/libarchive/cpio.5 ============================================================================== --- stable/10/contrib/libarchive/libarchive/cpio.5 Fri Mar 13 01:05:55 2020 (r358926) +++ stable/10/contrib/libarchive/libarchive/cpio.5 Fri Mar 13 01:06:08 2020 (r358927) @@ -244,7 +244,7 @@ Note that this format supports only 4 gigabyte files ( older ASCII format, which supports 8 gigabyte files). .Pp In this format, hardlinked files are handled by setting the -filesize to zero for each entry except the last one that +filesize to zero for each entry except the first one that appears in the archive. .Ss New CRC Format The CRC format is identical to the new ASCII format described Modified: stable/10/contrib/libarchive/libarchive/test/test_read_format_zip.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/test/test_read_format_zip.c Fri Mar 13 01:05:55 2020 (r358926) +++ stable/10/contrib/libarchive/libarchive/test/test_read_format_zip.c Fri Mar 13 01:06:08 2020 (r358927) @@ -916,3 +916,53 @@ DEFINE_TEST(test_read_format_zip_lzma_alone_leak) * suite under Valgrind or ASan, the test runner won't return with * exit code 0 in case if a memory leak. */ } + +DEFINE_TEST(test_read_format_zip_lzma_stream_end) +{ + const char *refname = "test_read_format_zip_lzma_stream_end.zipx"; + struct archive *a; + struct archive_entry *ae; + + assert((a = archive_read_new()) != NULL); + if (ARCHIVE_OK != archive_read_support_filter_lzma(a)) { + skipping("lzma reading not fully supported on this platform"); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + return; + } + extract_reference_file(refname); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, refname, 37)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("ZIP 6.3 (lzma)", archive_format_name(a)); + assertEqualString("vimrc", archive_entry_pathname(ae)); + assertEqualIntA(a, 0, extract_one(a, ae, 0xBA8E3BAA)); + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); +} + +DEFINE_TEST(test_read_format_zip_lzma_stream_end_blockread) +{ + const char *refname = "test_read_format_zip_lzma_stream_end.zipx"; + struct archive *a; + struct archive_entry *ae; + + assert((a = archive_read_new()) != NULL); + if (ARCHIVE_OK != archive_read_support_filter_lzma(a)) { + skipping("lzma reading not fully supported on this platform"); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + return; + } + extract_reference_file(refname); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, refname, 37)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("ZIP 6.3 (lzma)", archive_format_name(a)); + assertEqualString("vimrc", archive_entry_pathname(ae)); + assertEqualIntA(a, 0, extract_one_using_blocks(a, 13, 0xBA8E3BAA)); + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); +} Copied: stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu (from r358533, head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu Fri Mar 13 01:06:08 2020 (r358927, copy of r358533, head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu) @@ -0,0 +1,19 @@ +begin 664 test_read_format_zip_lzma_stream_end.zipx +M4$L#!#\``@`.`#TQD4VJ.XZZ/@(``)`#```%````=FEM)82Q1PWAL +M+U`,N0L_$]^&650C/X$D6#4QFD$\A/"_![4!O/5O/!KH`WCQ*4?T2*]4P#/D +M0'9I?EZG=N69Z0V;H0I=CP*$?".I\ +MGMG/80.A'^W>R4J'S/CZ%P`8`>F=R>R&R$2T@EM#X)"OQH1?A7,`:4IU9WV! +M#2W*DXT',;.4YIN4A:-X)O=IREL201ZSOC=YSAU[C4-::/YV8\)%"L17+>VC +M%/'B]ZCQN$2(Q*9*\KJZ`Y131`]5C&G';@1S-QES_RZF!2OX45@58+??ES%( +MUJ<(\`11M$NO)HK#/MK-9RT"15.2I:IZN8VTM1_?$G\L#BH67]$S%[4 +M%C-$\Q<+./&HV](4,7)OL-@C^M0F"2O!0N$OHOW54H87^QLBQVH*D%A<#SI% +M/#+-5U(W';:KC)RE>0Y^5YI!RECQNR"R4.UW9IR!@:B!UB8?_D5$FT8YCJHJ +M2[2"-&-_D2BJ6#XK[6G=%K"%;'^-+0]FHCY4ER#`^ Delivered-To: svn-src-stable-10@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7909F277C68; Fri, 13 Mar 2020 08:50:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48dztn0jBHz48XD; Fri, 13 Mar 2020 08:50:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9CEE36D7; Fri, 13 Mar 2020 08:50:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02D8ouT0010312; Fri, 13 Mar 2020 08:50:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02D8ouWd010311; Fri, 13 Mar 2020 08:50:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003130850.02D8ouWd010311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Mar 2020 08:50:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r358933 - stable/10/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Commit-Revision: 358933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 08:50:57 -0000 Author: hselasky Date: Fri Mar 13 08:50:56 2020 New Revision: 358933 URL: https://svnweb.freebsd.org/changeset/base/358933 Log: MFC r358694: Fix some whitespace issues in ipoib. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Fri Mar 13 08:49:45 2020 (r358932) +++ stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Fri Mar 13 08:50:56 2020 (r358933) @@ -1544,12 +1544,12 @@ module_exit(ipoib_cleanup_module); static int ipoib_evhand(module_t mod, int event, void *arg) { - return (0); + return (0); } static moduledata_t ipoib_mod = { - .name = "ipoib", - .evhand = ipoib_evhand, + .name = "ipoib", + .evhand = ipoib_evhand, }; DECLARE_MODULE(ipoib, ipoib_mod, SI_SUB_SMP, SI_ORDER_ANY); From owner-svn-src-stable-10@freebsd.org Fri Mar 13 08:54:01 2020 Return-Path: Delivered-To: svn-src-stable-10@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F37C7277F9F; Fri, 13 Mar 2020 08:54:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48dzyJ5FTHz4Hj2; Fri, 13 Mar 2020 08:54:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6046C38BA; Fri, 13 Mar 2020 08:54:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02D8s03c015215; Fri, 13 Mar 2020 08:54:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02D8s00c015214; Fri, 13 Mar 2020 08:54:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003130854.02D8s00c015214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Mar 2020 08:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r358937 - stable/10/sys/sys X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/sys X-SVN-Commit-Revision: 358937 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 08:54:01 -0000 Author: hselasky Date: Fri Mar 13 08:53:59 2020 New Revision: 358937 URL: https://svnweb.freebsd.org/changeset/base/358937 Log: MFC r358695: Define more subsystem orders. Intended for use with module_init_order() in the LinuxKPI. Sponsored by: Mellanox Technologies Modified: stable/10/sys/sys/kernel.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/kernel.h ============================================================================== --- stable/10/sys/sys/kernel.h Fri Mar 13 08:53:26 2020 (r358936) +++ stable/10/sys/sys/kernel.h Fri Mar 13 08:53:59 2020 (r358937) @@ -183,6 +183,10 @@ enum sysinit_elem_order { SI_ORDER_SECOND = 0x0000001, /* second*/ SI_ORDER_THIRD = 0x0000002, /* third*/ SI_ORDER_FOURTH = 0x0000003, /* fourth*/ + SI_ORDER_FIFTH = 0x0000004, /* fifth*/ + SI_ORDER_SIXTH = 0x0000005, /* sixth*/ + SI_ORDER_SEVENTH = 0x0000006, /* seventh*/ + SI_ORDER_EIGHTH = 0x0000007, /* eighth*/ SI_ORDER_MIDDLE = 0x1000000, /* somewhere in the middle */ SI_ORDER_ANY = 0xfffffff /* last*/ }; From owner-svn-src-stable-10@freebsd.org Fri Mar 13 08:57:24 2020 Return-Path: Delivered-To: svn-src-stable-10@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40FB425826C; Fri, 13 Mar 2020 08:57:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48f02C5lK7z4RDS; Fri, 13 Mar 2020 08:57:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F802390F; Fri, 13 Mar 2020 08:57:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02D8vN1p015638; Fri, 13 Mar 2020 08:57:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02D8vNF2015637; Fri, 13 Mar 2020 08:57:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003130857.02D8vNF2015637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Mar 2020 08:57:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r358941 - stable/10/sys/compat/linux X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/compat/linux X-SVN-Commit-Revision: 358941 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 08:57:24 -0000 Author: hselasky Date: Fri Mar 13 08:57:22 2020 New Revision: 358941 URL: https://svnweb.freebsd.org/changeset/base/358941 Log: MFC r358838: Add support for the device statistics IOCTL, needed by the coming linux_libusb upgrade. Sponsored by: Mellanox Technologies Modified: stable/10/sys/compat/linux/linux_ioctl.c stable/10/sys/compat/linux/linux_ioctl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/10/sys/compat/linux/linux_ioctl.c Fri Mar 13 08:56:46 2020 (r358940) +++ stable/10/sys/compat/linux/linux_ioctl.c Fri Mar 13 08:57:22 2020 (r358941) @@ -3555,6 +3555,9 @@ linux_ioctl_fbsd_usb(struct thread *td, struct linux_i case FBSD_LUSB_GET_POWER_USAGE: args->cmd = USB_GET_POWER_USAGE; break; + case FBSD_LUSB_DEVICESTATS: + args->cmd = USB_DEVICESTATS; + break; default: error = ENOIOCTL; } Modified: stable/10/sys/compat/linux/linux_ioctl.h ============================================================================== --- stable/10/sys/compat/linux/linux_ioctl.h Fri Mar 13 08:56:46 2020 (r358940) +++ stable/10/sys/compat/linux/linux_ioctl.h Fri Mar 13 08:57:22 2020 (r358941) @@ -740,9 +740,10 @@ #define FBSD_LUSB_FS_OPEN_STREAM 0xffdf #define FBSD_LUSB_GET_DEV_PORT_PATH 0xffde #define FBSD_LUSB_GET_POWER_USAGE 0xffdd +#define FBSD_LUSB_DEVICESTATS 0xffdc #define FBSD_LUSB_MAX 0xffff -#define FBSD_LUSB_MIN 0xffdd +#define FBSD_LUSB_MIN 0xffdc /* * Linux btrfs clone operation From owner-svn-src-stable-10@freebsd.org Fri Mar 13 09:18:29 2020 Return-Path: Delivered-To: svn-src-stable-10@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 63A40258FD1; Fri, 13 Mar 2020 09:18:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48f0VY0z06z43gv; Fri, 13 Mar 2020 09:18:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 92F713D4F; Fri, 13 Mar 2020 09:18:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02D9ISjD028468; Fri, 13 Mar 2020 09:18:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02D9ISwY028467; Fri, 13 Mar 2020 09:18:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003130918.02D9ISwY028467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Mar 2020 09:18:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r358949 - stable/10/lib/libusb X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/lib/libusb X-SVN-Commit-Revision: 358949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 09:18:29 -0000 Author: hselasky Date: Fri Mar 13 09:18:28 2020 New Revision: 358949 URL: https://svnweb.freebsd.org/changeset/base/358949 Log: MFC r358841: Fix for building libusb under Linux. Sponsored by: Mellanox Technologies Modified: stable/10/lib/libusb/libusb_global_linux.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libusb/libusb_global_linux.h ============================================================================== --- stable/10/lib/libusb/libusb_global_linux.h Fri Mar 13 09:17:51 2020 (r358948) +++ stable/10/lib/libusb/libusb_global_linux.h Fri Mar 13 09:18:28 2020 (r358949) @@ -75,4 +75,11 @@ } while (0) #endif +#ifndef TAILQ_FOREACH_SAFE +#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = TAILQ_FIRST((head)); \ + (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ + (var) = (tvar)) +#endif + #endif /* _LIBUSB_GLOBAL_LINUX_H_ */