From owner-svn-src-stable-11@freebsd.org Sun Jun 7 09:38:46 2020 Return-Path: Delivered-To: svn-src-stable-11@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 379C834E10D; Sun, 7 Jun 2020 09:38:46 +0000 (UTC) (envelope-from kib@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49frtG0cchz4Jwv; Sun, 7 Jun 2020 09:38:46 +0000 (UTC) (envelope-from kib@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 0BDFB10E55; Sun, 7 Jun 2020 09:38:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0579cjnc047383; Sun, 7 Jun 2020 09:38:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0579cj9l047381; Sun, 7 Jun 2020 09:38:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006070938.0579cj9l047381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 7 Jun 2020 09:38:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361889 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/libexec/rtld-elf X-SVN-Commit-Revision: 361889 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2020 09:38:46 -0000 Author: kib Date: Sun Jun 7 09:38:45 2020 New Revision: 361889 URL: https://svnweb.freebsd.org/changeset/base/361889 Log: MFC r360201: Fix ldd for PIE binaries with static TLS segment. PR: 245677 Modified: stable/11/libexec/rtld-elf/rtld.c stable/11/libexec/rtld-elf/rtld.h Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Sun Jun 7 09:17:57 2020 (r361888) +++ stable/11/libexec/rtld-elf/rtld.c Sun Jun 7 09:38:45 2020 (r361889) @@ -3303,7 +3303,7 @@ rtld_dlopen(const char *name, int fd, int mode) if (mode & RTLD_DEEPBIND) lo_flags |= RTLD_LO_DEEPBIND; if (ld_tracing != NULL) - lo_flags |= RTLD_LO_TRACE; + lo_flags |= RTLD_LO_TRACE | RTLD_LO_IGNSTLS; return (dlopen_object(name, fd, obj_main, lo_flags, mode & (RTLD_MODEMASK | RTLD_GLOBAL), NULL)); @@ -3356,15 +3356,15 @@ dlopen_object(const char *name, int fd, Obj_Entry *ref if ((lo_flags & RTLD_LO_DEEPBIND) != 0) obj->symbolic = true; result = 0; - if ((lo_flags & RTLD_LO_EARLY) == 0 && obj->static_tls && - !allocate_tls_offset(obj)) { + if ((lo_flags & (RTLD_LO_EARLY | RTLD_LO_IGNSTLS)) == 0 && + obj->static_tls && !allocate_tls_offset(obj)) { _rtld_error("%s: No space available " "for static Thread Local Storage", obj->path); result = -1; } if (result != -1) result = load_needed_objects(obj, lo_flags & (RTLD_LO_DLOPEN | - RTLD_LO_EARLY)); + RTLD_LO_EARLY | RTLD_LO_IGNSTLS)); init_dag(obj); ref_dag(obj); if (result != -1) Modified: stable/11/libexec/rtld-elf/rtld.h ============================================================================== --- stable/11/libexec/rtld-elf/rtld.h Sun Jun 7 09:17:57 2020 (r361888) +++ stable/11/libexec/rtld-elf/rtld.h Sun Jun 7 09:38:45 2020 (r361889) @@ -303,6 +303,7 @@ TAILQ_HEAD(obj_entry_q, Struct_Obj_Entry); #define RTLD_LO_FILTEES 0x10 /* Loading filtee. */ #define RTLD_LO_EARLY 0x20 /* Do not call ctors, postpone it to the initialization during the image start. */ +#define RTLD_LO_IGNSTLS 0x40 /* Do not allocate static TLS */ #define RTLD_LO_DEEPBIND 0x80 /* Force symbolic for this object */ /* From owner-svn-src-stable-11@freebsd.org Mon Jun 8 09:24:28 2020 Return-Path: Delivered-To: svn-src-stable-11@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 9EA52328B9D; Mon, 8 Jun 2020 09:24:28 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49gSWJ3fWSz41Kb; Mon, 8 Jun 2020 09:24:28 +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 7891D22158; Mon, 8 Jun 2020 09:24: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 0589OShR029548; Mon, 8 Jun 2020 09:24:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0589OSvm029547; Mon, 8 Jun 2020 09:24:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006080924.0589OSvm029547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 8 Jun 2020 09:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361907 - stable/11/sys/dev/usb X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb X-SVN-Commit-Revision: 361907 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2020 09:24:28 -0000 Author: hselasky Date: Mon Jun 8 09:24:28 2020 New Revision: 361907 URL: https://svnweb.freebsd.org/changeset/base/361907 Log: MFC r361577: Don't allow USB device drivers to parent own interface. It will prevent proper USB device detach. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/usb_device.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/usb_device.c ============================================================================== --- stable/11/sys/dev/usb/usb_device.c Mon Jun 8 09:23:52 2020 (r361906) +++ stable/11/sys/dev/usb/usb_device.c Mon Jun 8 09:24:28 2020 (r361907) @@ -1400,7 +1400,7 @@ usbd_set_parent_iface(struct usb_device *udev, uint8_t { struct usb_interface *iface; - if (udev == NULL) { + if (udev == NULL || iface_index == parent_index) { /* nothing to do */ return; } From owner-svn-src-stable-11@freebsd.org Mon Jun 8 09:27:49 2020 Return-Path: Delivered-To: svn-src-stable-11@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 3E2A8328F13; Mon, 8 Jun 2020 09:27:49 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49gSb90ydhz4267; Mon, 8 Jun 2020 09:27:49 +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 1C5C922500; Mon, 8 Jun 2020 09:27: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 0589RmlJ029961; Mon, 8 Jun 2020 09:27:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0589Rm3B029960; Mon, 8 Jun 2020 09:27:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006080927.0589Rm3B029960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 8 Jun 2020 09:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361911 - stable/11/sys/dev/usb X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb X-SVN-Commit-Revision: 361911 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2020 09:27:49 -0000 Author: hselasky Date: Mon Jun 8 09:27:48 2020 New Revision: 361911 URL: https://svnweb.freebsd.org/changeset/base/361911 Log: MFC r361581: Implement helper function, usbd_get_max_frame_length(), which allows kernel device drivers to correctly predict the default USB transfer frame length. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/usb_transfer.c stable/11/sys/dev/usb/usbdi.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/11/sys/dev/usb/usb_transfer.c Mon Jun 8 09:26:46 2020 (r361910) +++ stable/11/sys/dev/usb/usb_transfer.c Mon Jun 8 09:27:48 2020 (r361911) @@ -373,6 +373,81 @@ usbd_transfer_setup_sub_malloc(struct usb_setup_params #endif /*------------------------------------------------------------------------* + * usbd_get_max_frame_length + * + * This function returns the maximum single frame length as computed by + * usbd_transfer_setup(). It is useful when computing buffer sizes for + * devices having multiple alternate settings. The SuperSpeed endpoint + * companion pointer is allowed to be NULL. + *------------------------------------------------------------------------*/ +uint32_t +usbd_get_max_frame_length(const struct usb_endpoint_descriptor *edesc, + const struct usb_endpoint_ss_comp_descriptor *ecomp, + enum usb_dev_speed speed) +{ + uint32_t max_packet_size; + uint32_t max_packet_count; + uint8_t type; + + max_packet_size = UGETW(edesc->wMaxPacketSize); + max_packet_count = 1; + type = (edesc->bmAttributes & UE_XFERTYPE); + + switch (speed) { + case USB_SPEED_HIGH: + switch (type) { + case UE_ISOCHRONOUS: + case UE_INTERRUPT: + max_packet_count += + (max_packet_size >> 11) & 3; + + /* check for invalid max packet count */ + if (max_packet_count > 3) + max_packet_count = 3; + break; + default: + break; + } + max_packet_size &= 0x7FF; + break; + case USB_SPEED_SUPER: + max_packet_count += (max_packet_size >> 11) & 3; + + if (ecomp != NULL) + max_packet_count += ecomp->bMaxBurst; + + if ((max_packet_count == 0) || + (max_packet_count > 16)) + max_packet_count = 16; + + switch (type) { + case UE_CONTROL: + max_packet_count = 1; + break; + case UE_ISOCHRONOUS: + if (ecomp != NULL) { + uint8_t mult; + + mult = UE_GET_SS_ISO_MULT( + ecomp->bmAttributes) + 1; + if (mult > 3) + mult = 3; + + max_packet_count *= mult; + } + break; + default: + break; + } + max_packet_size &= 0x7FF; + break; + default: + break; + } + return (max_packet_size * max_packet_count); +} + +/*------------------------------------------------------------------------* * usbd_transfer_setup_sub - transfer setup subroutine * * This function must be called from the "xfer_setup" callback of the Modified: stable/11/sys/dev/usb/usbdi.h ============================================================================== --- stable/11/sys/dev/usb/usbdi.h Mon Jun 8 09:26:46 2020 (r361910) +++ stable/11/sys/dev/usb/usbdi.h Mon Jun 8 09:27:48 2020 (r361911) @@ -552,6 +552,9 @@ uint8_t usbd_get_interface_altindex(struct usb_interfa usb_error_t usbd_set_alt_interface_index(struct usb_device *udev, uint8_t iface_index, uint8_t alt_index); uint32_t usbd_get_isoc_fps(struct usb_device *udev); +uint32_t usbd_get_max_frame_length(const struct usb_endpoint_descriptor *, + const struct usb_endpoint_ss_comp_descriptor *, + enum usb_dev_speed); usb_error_t usbd_transfer_setup(struct usb_device *udev, const uint8_t *ifaces, struct usb_xfer **pxfer, const struct usb_config *setup_start, uint16_t n_setup, From owner-svn-src-stable-11@freebsd.org Mon Jun 8 09:30:43 2020 Return-Path: Delivered-To: svn-src-stable-11@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 E9FB7329188; Mon, 8 Jun 2020 09:30:43 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49gSfW604cz42hv; Mon, 8 Jun 2020 09:30:43 +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 C803522504; Mon, 8 Jun 2020 09:30:43 +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 0589Uhid031983; Mon, 8 Jun 2020 09:30:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0589Uh7T031982; Mon, 8 Jun 2020 09:30:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006080930.0589Uh7T031982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 8 Jun 2020 09:30:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361915 - stable/11/sys/netgraph/bluetooth/drivers/ubt X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/netgraph/bluetooth/drivers/ubt X-SVN-Commit-Revision: 361915 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2020 09:30:44 -0000 Author: hselasky Date: Mon Jun 8 09:30:43 2020 New Revision: 361915 URL: https://svnweb.freebsd.org/changeset/base/361915 Log: MFC r361582: Fix check for wMaxPacketSize in USB bluetooth driver, in case device is not FULL speed. Sponsored by: Mellanox Technologies Modified: stable/11/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c ============================================================================== --- stable/11/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Mon Jun 8 09:30:08 2020 (r361914) +++ stable/11/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Mon Jun 8 09:30:43 2020 (r361915) @@ -540,7 +540,7 @@ ubt_attach(device_t dev) struct usb_endpoint_descriptor *ed; struct usb_interface_descriptor *id; struct usb_interface *iface; - uint16_t wMaxPacketSize; + uint32_t wMaxPacketSize; uint8_t alt_index, i, j; uint8_t iface_index[2] = { 0, 1 }; @@ -630,9 +630,10 @@ ubt_attach(device_t dev) if ((ed->bDescriptorType == UDESC_ENDPOINT) && (ed->bLength >= sizeof(*ed)) && (i == 1)) { - uint16_t temp; + uint32_t temp; - temp = UGETW(ed->wMaxPacketSize); + temp = usbd_get_max_frame_length( + ed, NULL, usbd_get_speed(uaa->device)); if (temp > wMaxPacketSize) { wMaxPacketSize = temp; alt_index = j; From owner-svn-src-stable-11@freebsd.org Mon Jun 8 09:33:38 2020 Return-Path: Delivered-To: svn-src-stable-11@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 328E8329510; Mon, 8 Jun 2020 09:33:38 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49gSjt0c5bz43XT; Mon, 8 Jun 2020 09:33:38 +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 101A4224CE; Mon, 8 Jun 2020 09:33:38 +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 0589Xbvi036512; Mon, 8 Jun 2020 09:33:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0589Xb2O036511; Mon, 8 Jun 2020 09:33:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006080933.0589Xb2O036511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 8 Jun 2020 09:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361919 - in stable/11: lib/libusbhid sys/dev/usb X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11: lib/libusbhid sys/dev/usb X-SVN-Commit-Revision: 361919 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2020 09:33:38 -0000 Author: hselasky Date: Mon Jun 8 09:33:37 2020 New Revision: 361919 URL: https://svnweb.freebsd.org/changeset/base/361919 Log: MFC r361827: USB HID descriptors may push/pop the current state to allow description of items residing in a so-called union. FreeBSD currently only supports 4 such push levels. If the push level is not restored within the processing of the same HID item, an invalid memory location may be used for subsequent HID item processing. Verify that the push level is always valid when processing HID items. Reported by: Andy Nguyen (Google) Sponsored by: Mellanox Technologies Modified: stable/11/lib/libusbhid/parse.c stable/11/sys/dev/usb/usb_hid.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libusbhid/parse.c ============================================================================== --- stable/11/lib/libusbhid/parse.c Mon Jun 8 09:32:57 2020 (r361918) +++ stable/11/lib/libusbhid/parse.c Mon Jun 8 09:33:37 2020 (r361919) @@ -401,26 +401,28 @@ hid_get_item_raw(hid_data_t s, hid_item_t *h) s->loc_count = dval & mask; break; case 10: /* Push */ + /* stop parsing, if invalid push level */ + if ((s->pushlevel + 1) >= MAXPUSH) + return (0); s->pushlevel ++; - if (s->pushlevel < MAXPUSH) { - s->cur[s->pushlevel] = *c; - /* store size and count */ - c->report_size = s->loc_size; - c->report_count = s->loc_count; - /* update current item pointer */ - c = &s->cur[s->pushlevel]; - } + s->cur[s->pushlevel] = *c; + /* store size and count */ + c->report_size = s->loc_size; + c->report_count = s->loc_count; + /* update current item pointer */ + c = &s->cur[s->pushlevel]; break; case 11: /* Pop */ + /* stop parsing, if invalid push level */ + if (s->pushlevel == 0) + return (0); s->pushlevel --; - if (s->pushlevel < MAXPUSH) { - c = &s->cur[s->pushlevel]; - /* restore size and count */ - s->loc_size = c->report_size; - s->loc_count = c->report_count; - c->report_size = 0; - c->report_count = 0; - } + c = &s->cur[s->pushlevel]; + /* restore size and count */ + s->loc_size = c->report_size; + s->loc_count = c->report_count; + c->report_size = 0; + c->report_count = 0; break; default: break; Modified: stable/11/sys/dev/usb/usb_hid.c ============================================================================== --- stable/11/sys/dev/usb/usb_hid.c Mon Jun 8 09:32:57 2020 (r361918) +++ stable/11/sys/dev/usb/usb_hid.c Mon Jun 8 09:33:37 2020 (r361919) @@ -434,36 +434,36 @@ hid_get_item(struct hid_data *s, struct hid_item *h) s->loc_count = dval & mask; break; case 10: /* Push */ - s->pushlevel ++; - if (s->pushlevel < MAXPUSH) { - s->cur[s->pushlevel] = *c; - /* store size and count */ - c->loc.size = s->loc_size; - c->loc.count = s->loc_count; - /* update current item pointer */ - c = &s->cur[s->pushlevel]; - } else { - DPRINTFN(0, "Cannot push " - "item @ %d\n", s->pushlevel); + /* stop parsing, if invalid push level */ + if ((s->pushlevel + 1) >= MAXPUSH) { + DPRINTFN(0, "Cannot push item @ %d\n", s->pushlevel); + return (0); } + s->pushlevel ++; + s->cur[s->pushlevel] = *c; + /* store size and count */ + c->loc.size = s->loc_size; + c->loc.count = s->loc_count; + /* update current item pointer */ + c = &s->cur[s->pushlevel]; break; case 11: /* Pop */ - s->pushlevel --; - if (s->pushlevel < MAXPUSH) { - /* preserve position */ - oldpos = c->loc.pos; - c = &s->cur[s->pushlevel]; - /* restore size and count */ - s->loc_size = c->loc.size; - s->loc_count = c->loc.count; - /* set default item location */ - c->loc.pos = oldpos; - c->loc.size = 0; - c->loc.count = 0; - } else { - DPRINTFN(0, "Cannot pop " - "item @ %d\n", s->pushlevel); + /* stop parsing, if invalid push level */ + if (s->pushlevel == 0) { + DPRINTFN(0, "Cannot pop item @ 0\n"); + return (0); } + s->pushlevel --; + /* preserve position */ + oldpos = c->loc.pos; + c = &s->cur[s->pushlevel]; + /* restore size and count */ + s->loc_size = c->loc.size; + s->loc_count = c->loc.count; + /* set default item location */ + c->loc.pos = oldpos; + c->loc.size = 0; + c->loc.count = 0; break; default: DPRINTFN(0, "Global bTag=%d\n", bTag); From owner-svn-src-stable-11@freebsd.org Mon Jun 8 09:39:16 2020 Return-Path: Delivered-To: svn-src-stable-11@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 ABD9B3297C2; Mon, 8 Jun 2020 09:39:16 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49gSrN480xz44RM; Mon, 8 Jun 2020 09:39:16 +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 899B1224CF; Mon, 8 Jun 2020 09:39:16 +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 0589dGEg037064; Mon, 8 Jun 2020 09:39:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0589dGtJ037063; Mon, 8 Jun 2020 09:39:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006080939.0589dGtJ037063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 8 Jun 2020 09:39:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361924 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 361924 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2020 09:39:16 -0000 Author: hselasky Date: Mon Jun 8 09:39:16 2020 New Revision: 361924 URL: https://svnweb.freebsd.org/changeset/base/361924 Log: MFC r361110: Implement synchronize_srcu_expedited() in the LinuxKPI. Differential Revision: https://reviews.freebsd.org/D24798 Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/srcu.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/srcu.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/srcu.h Mon Jun 8 09:37:20 2020 (r361923) +++ stable/11/sys/compat/linuxkpi/common/include/linux/srcu.h Mon Jun 8 09:39:16 2020 (r361924) @@ -49,4 +49,8 @@ extern void srcu_barrier(struct srcu_struct *); extern int init_srcu_struct(struct srcu_struct *); extern void cleanup_srcu_struct(struct srcu_struct *); +#define synchronize_srcu_expedited(srcu) do { \ + synchronize_srcu(srcu); \ +} while (0) + #endif /* _LINUX_SRCU_H_ */ From owner-svn-src-stable-11@freebsd.org Mon Jun 8 14:00:12 2020 Return-Path: Delivered-To: svn-src-stable-11@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 94E423305E0; Mon, 8 Jun 2020 14:00:12 +0000 (UTC) (envelope-from cy@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49gZdS1d7tz4ZDR; Mon, 8 Jun 2020 14:00:12 +0000 (UTC) (envelope-from cy@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 2F01A256D9; Mon, 8 Jun 2020 14:00:12 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 058E0CFt099664; Mon, 8 Jun 2020 14:00:12 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 058E0ClQ099663; Mon, 8 Jun 2020 14:00:12 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202006081400.058E0ClQ099663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 8 Jun 2020 14:00:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361928 - in stable: 10/contrib/ipfilter/man 11/contrib/ipfilter/man 12/contrib/ipfilter/man X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/ipfilter/man 11/contrib/ipfilter/man 12/contrib/ipfilter/man X-SVN-Commit-Revision: 361928 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2020 14:00:12 -0000 Author: cy Date: Mon Jun 8 14:00:11 2020 New Revision: 361928 URL: https://svnweb.freebsd.org/changeset/base/361928 Log: MFC 361721: Per-rule hit counts (-h) can be used with either -i (input) or -o (output) filter rule lists. Modified: stable/11/contrib/ipfilter/man/ipfstat.8 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/man/ipfstat.8 stable/12/contrib/ipfilter/man/ipfstat.8 Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/contrib/ipfilter/man/ipfstat.8 ============================================================================== --- stable/11/contrib/ipfilter/man/ipfstat.8 Mon Jun 8 13:27:45 2020 (r361927) +++ stable/11/contrib/ipfilter/man/ipfstat.8 Mon Jun 8 14:00:11 2020 (r361928) @@ -69,8 +69,7 @@ the kernel) if any is present. Show groups currently configured (both active and inactive). .TP .B \-h -Show per-rule the number of times each one scores a "hit". For use in -combination with \fB\-i\fP. +Show per-rule the number of times each one scores a "hit". .TP .B \-i Display the filter list used for the input side of the kernel IP processing. From owner-svn-src-stable-11@freebsd.org Tue Jun 9 00:26:31 2020 Return-Path: Delivered-To: svn-src-stable-11@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 0409C33F5A4; Tue, 9 Jun 2020 00:26:31 +0000 (UTC) (envelope-from emaste@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49grX66PPSz3yvY; Tue, 9 Jun 2020 00:26:30 +0000 (UTC) (envelope-from emaste@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 D707ECE7E; Tue, 9 Jun 2020 00:26:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0590QUK7099840; Tue, 9 Jun 2020 00:26:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0590QUVI099838; Tue, 9 Jun 2020 00:26:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202006090026.0590QUVI099838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 9 Jun 2020 00:26:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361947 - in stable/11/contrib/llvm-project/llvm: include/llvm/BinaryFormat tools/llvm-readobj X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/11/contrib/llvm-project/llvm: include/llvm/BinaryFormat tools/llvm-readobj X-SVN-Commit-Revision: 361947 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2020 00:26:31 -0000 Author: emaste Date: Tue Jun 9 00:26:30 2020 New Revision: 361947 URL: https://svnweb.freebsd.org/changeset/base/361947 Log: MFC r361739: llvm: Add DF_1_PIE Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h stable/11/contrib/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp Directory Properties: stable/11/ (props changed) stable/11/contrib/llvm-project/llvm/ (props changed) Modified: stable/11/contrib/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h ============================================================================== --- stable/11/contrib/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h Tue Jun 9 00:25:53 2020 (r361946) +++ stable/11/contrib/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h Tue Jun 9 00:26:30 2020 (r361947) @@ -1290,7 +1290,8 @@ enum { DF_1_NORELOC = 0x00400000, DF_1_SYMINTPOSE = 0x00800000, // Object has individual interposers. DF_1_GLOBAUDIT = 0x01000000, // Global auditing required. - DF_1_SINGLETON = 0x02000000 // Singleton symbols are used. + DF_1_SINGLETON = 0x02000000, // Singleton symbols are used. + DF_1_PIE = 0x08000000, // Object is a position-independent executable. }; // DT_MIPS_FLAGS values. Modified: stable/11/contrib/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp ============================================================================== --- stable/11/contrib/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp Tue Jun 9 00:25:53 2020 (r361946) +++ stable/11/contrib/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp Tue Jun 9 00:26:30 2020 (r361947) @@ -2213,7 +2213,8 @@ static const EnumEntry ElfDynamicDTFlags1[] LLVM_READOBJ_DT_FLAG_ENT(DF_1, NORELOC), LLVM_READOBJ_DT_FLAG_ENT(DF_1, SYMINTPOSE), LLVM_READOBJ_DT_FLAG_ENT(DF_1, GLOBAUDIT), - LLVM_READOBJ_DT_FLAG_ENT(DF_1, SINGLETON) + LLVM_READOBJ_DT_FLAG_ENT(DF_1, SINGLETON), + LLVM_READOBJ_DT_FLAG_ENT(DF_1, PIE), }; static const EnumEntry ElfDynamicDTMipsFlags[] = { From owner-svn-src-stable-11@freebsd.org Tue Jun 9 00:27:55 2020 Return-Path: Delivered-To: svn-src-stable-11@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 CECE333F6C6; Tue, 9 Jun 2020 00:27:55 +0000 (UTC) (envelope-from emaste@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49grYl53GFz40HL; Tue, 9 Jun 2020 00:27:55 +0000 (UTC) (envelope-from emaste@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 A8736D119; Tue, 9 Jun 2020 00:27:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0590Rtaw099970; Tue, 9 Jun 2020 00:27:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0590RtUl099969; Tue, 9 Jun 2020 00:27:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202006090027.0590RtUl099969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 9 Jun 2020 00:27:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361948 - in stable: 11/contrib/llvm-project/lld/ELF 12/contrib/llvm-project/lld/ELF X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable: 11/contrib/llvm-project/lld/ELF 12/contrib/llvm-project/lld/ELF X-SVN-Commit-Revision: 361948 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2020 00:27:55 -0000 Author: emaste Date: Tue Jun 9 00:27:54 2020 New Revision: 361948 URL: https://svnweb.freebsd.org/changeset/base/361948 Log: MFC r361740: lld: Set DF_1_PIE for -pie DF_1_PIE originated from Solaris[1]. GNU ld[2] sets the flag on non-Solaris platforms. It can help distinguish PIE from ET_DYN. eu-classify from elfutils uses this to recognize PIE[3]. glibc uses this flag to reject dlopen'ing a PIE[4] [1] https://docs.oracle.com/cd/E36784_01/html/E36857/chapter6-42444.html [2] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5fe2850dd96483f176858fd75c098313d5b20bc2 [3] https://sourceware.org/git/?p=elfutils.git;a=commit;h=3f489b5c7c78df6d52f8982f79c36e9a220e8951 [4] https://sourceware.org/bugzilla/show_bug.cgi?id=24323 Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/llvm-project/lld/ELF/SyntheticSections.cpp Directory Properties: stable/11/ (props changed) stable/11/contrib/llvm-project/lld/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/llvm-project/lld/ELF/SyntheticSections.cpp Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/llvm-project/lld/ELF/SyntheticSections.cpp ============================================================================== --- stable/11/contrib/llvm-project/lld/ELF/SyntheticSections.cpp Tue Jun 9 00:26:30 2020 (r361947) +++ stable/11/contrib/llvm-project/lld/ELF/SyntheticSections.cpp Tue Jun 9 00:27:54 2020 (r361948) @@ -1315,6 +1315,8 @@ template void DynamicSection::final dtFlags1 |= DF_1_NODELETE; if (config->zNodlopen) dtFlags1 |= DF_1_NOOPEN; + if (config->pie) + dtFlags1 |= DF_1_PIE; if (config->zNow) { dtFlags |= DF_BIND_NOW; dtFlags1 |= DF_1_NOW; From owner-svn-src-stable-11@freebsd.org Tue Jun 9 14:20:17 2020 Return-Path: Delivered-To: svn-src-stable-11@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 6671132E943; Tue, 9 Jun 2020 14:20:17 +0000 (UTC) (envelope-from emaste@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49hC2926yDz3S27; Tue, 9 Jun 2020 14:20:17 +0000 (UTC) (envelope-from emaste@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 3F7CF16F85; Tue, 9 Jun 2020 14:20:17 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 059EKGTs013723; Tue, 9 Jun 2020 14:20:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 059EKGlU013722; Tue, 9 Jun 2020 14:20:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202006091420.059EKGlU013722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 9 Jun 2020 14:20:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361966 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 361966 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2020 14:20:17 -0000 Author: emaste Date: Tue Jun 9 14:20:16 2020 New Revision: 361966 URL: https://svnweb.freebsd.org/changeset/base/361966 Log: MFC r361657: elf_common.h: define DF_1_PIE DF_1_PIE indicates that the object is a position-independent executable. Reference: https://docs.oracle.com/cd/E36784_01/html/E36857/chapter6-42444.html Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/sys/elf_common.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/elf_common.h ============================================================================== --- stable/11/sys/sys/elf_common.h Tue Jun 9 14:16:18 2020 (r361965) +++ stable/11/sys/sys/elf_common.h Tue Jun 9 14:20:16 2020 (r361966) @@ -732,6 +732,7 @@ typedef struct { #define DF_1_ORIGIN 0x00000080 /* Process $ORIGIN */ #define DF_1_INTERPOSE 0x00000400 /* Interpose all objects but main */ #define DF_1_NODEFLIB 0x00000800 /* Do not search default paths */ +#define DF_1_PIE 0x08000000 /* Is position-independent executable */ /* Values for l_flags. */ #define LL_NONE 0x0 /* no flags */ From owner-svn-src-stable-11@freebsd.org Tue Jun 9 17:34:29 2020 Return-Path: Delivered-To: svn-src-stable-11@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 BDA20337AA3; Tue, 9 Jun 2020 17:34:29 +0000 (UTC) (envelope-from gjb@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49hHLF4jJcz4CkG; Tue, 9 Jun 2020 17:34:29 +0000 (UTC) (envelope-from gjb@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 9C6AF19753; Tue, 9 Jun 2020 17:34:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 059HYT7T038972; Tue, 9 Jun 2020 17:34:29 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 059HYTgI038971; Tue, 9 Jun 2020 17:34:29 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202006091734.059HYTgI038971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 Jun 2020 17:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361978 - stable/11/release/doc/share/xml X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/share/xml X-SVN-Commit-Revision: 361978 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2020 17:34:29 -0000 Author: gjb Date: Tue Jun 9 17:34:29 2020 New Revision: 361978 URL: https://svnweb.freebsd.org/changeset/base/361978 Log: Document SA-20:17, EN-20:11, EN-20:12. Fix a copy/paste error while here. Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: stable/11/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/security.xml ============================================================================== --- stable/11/release/doc/share/xml/security.xml Tue Jun 9 17:17:43 2020 (r361977) +++ stable/11/release/doc/share/xml/security.xml Tue Jun 9 17:34:29 2020 (r361978) @@ -211,9 +211,17 @@ FreeBSD-SA-20:14.cryptodev + xlink:href="&security.url;/FreeBSD-SA-20:15.cryptodev.asc">FreeBSD-SA-20:15.cryptodev 12 May 2020 Use-after-free condition + + + + FreeBSD-SA-20:17.usb + 9 June 2020 + HID descripter parsing + error From owner-svn-src-stable-11@freebsd.org Tue Jun 9 19:07:45 2020 Return-Path: Delivered-To: svn-src-stable-11@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 59C2333998E; Tue, 9 Jun 2020 19:07:45 +0000 (UTC) (envelope-from gjb@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49hKPs1mWvz4PXm; Tue, 9 Jun 2020 19:07:45 +0000 (UTC) (envelope-from gjb@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 37C001A81C; Tue, 9 Jun 2020 19:07:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 059J7j3R095342; Tue, 9 Jun 2020 19:07:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 059J7jpK095341; Tue, 9 Jun 2020 19:07:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202006091907.059J7jpK095341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 Jun 2020 19:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361981 - releng/11.4/release/doc/share/xml stable/11/release/doc/share/xml X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/11.4/release/doc/share/xml stable/11/release/doc/share/xml X-SVN-Commit-Revision: 361981 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2020 19:07:45 -0000 Author: gjb Date: Tue Jun 9 19:07:44 2020 New Revision: 361981 URL: https://svnweb.freebsd.org/changeset/base/361981 Log: Fix a typo. Submitted by: yuripv Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: stable/11/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: releng/11.4/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/security.xml ============================================================================== --- stable/11/release/doc/share/xml/security.xml Tue Jun 9 18:13:52 2020 (r361980) +++ stable/11/release/doc/share/xml/security.xml Tue Jun 9 19:07:44 2020 (r361981) @@ -220,7 +220,7 @@ FreeBSD-SA-20:17.usb 9 June 2020 - HID descripter parsing + HID descriptor parsing error From owner-svn-src-stable-11@freebsd.org Tue Jun 9 19:16:50 2020 Return-Path: Delivered-To: svn-src-stable-11@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 4A960339D85; Tue, 9 Jun 2020 19:16:50 +0000 (UTC) (envelope-from kib@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49hKcL1LfVz4Qks; Tue, 9 Jun 2020 19:16:50 +0000 (UTC) (envelope-from kib@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 2958D1A6B3; Tue, 9 Jun 2020 19:16:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 059JGnbF001813; Tue, 9 Jun 2020 19:16:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 059JGnU7001811; Tue, 9 Jun 2020 19:16:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006091916.059JGnU7001811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 9 Jun 2020 19:16:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361983 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/libexec/rtld-elf X-SVN-Commit-Revision: 361983 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2020 19:16:50 -0000 Author: kib Date: Tue Jun 9 19:16:49 2020 New Revision: 361983 URL: https://svnweb.freebsd.org/changeset/base/361983 Log: MFC r361725, r361728: Do not allow to load ET_DYN object with DF_1_PIE flag set. Modified: stable/11/libexec/rtld-elf/rtld.c stable/11/libexec/rtld-elf/rtld.h Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Tue Jun 9 19:15:43 2020 (r361982) +++ stable/11/libexec/rtld-elf/rtld.c Tue Jun 9 19:16:49 2020 (r361983) @@ -1313,6 +1313,8 @@ digest_dynamic1(Obj_Entry *obj, int early, const Elf_D obj->z_interpose = true; if (dynp->d_un.d_val & DF_1_NODEFLIB) obj->z_nodeflib = true; + if (dynp->d_un.d_val & DF_1_PIE) + obj->z_pie = true; break; default: @@ -2510,6 +2512,10 @@ do_load_object(int fd, const char *name, char *path, s obj->path = path; if (!digest_dynamic(obj, 0)) goto errp; + if (obj->z_pie) { + _rtld_error("Cannot load PIE binary %s as DSO", obj->path); + goto errp; + } dbg("%s valid_hash_sysv %d valid_hash_gnu %d dynsymcount %d", obj->path, obj->valid_hash_sysv, obj->valid_hash_gnu, obj->dynsymcount); if (obj->z_noopen && (flags & (RTLD_LO_DLOPEN | RTLD_LO_TRACE)) == Modified: stable/11/libexec/rtld-elf/rtld.h ============================================================================== --- stable/11/libexec/rtld-elf/rtld.h Tue Jun 9 19:15:43 2020 (r361982) +++ stable/11/libexec/rtld-elf/rtld.h Tue Jun 9 19:16:49 2020 (r361983) @@ -253,6 +253,7 @@ typedef struct Struct_Obj_Entry { bool z_interpose : 1; /* Interpose all objects but main */ bool z_nodeflib : 1; /* Don't search default library path */ bool z_global : 1; /* Make the object global */ + bool z_pie : 1; /* Object proclaimed itself PIE executable */ bool static_tls : 1; /* Needs static TLS allocation */ bool static_tls_copied : 1; /* Needs static TLS copying */ bool ref_nodel : 1; /* Refcount increased to prevent dlclose */ From owner-svn-src-stable-11@freebsd.org Thu Jun 11 11:45:32 2020 Return-Path: Delivered-To: svn-src-stable-11@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 B951D32B8F8; Thu, 11 Jun 2020 11:45:32 +0000 (UTC) (envelope-from kib@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49jMVh4xN3z4SMN; Thu, 11 Jun 2020 11:45:32 +0000 (UTC) (envelope-from kib@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 A4AE8179A2; Thu, 11 Jun 2020 11:45:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05BBjWnd011394; Thu, 11 Jun 2020 11:45:32 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05BBjUH0011385; Thu, 11 Jun 2020 11:45:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006111145.05BBjUH0011385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 11 Jun 2020 11:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362050 - in stable/11/sys/ufs: ffs ufs X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys/ufs: ffs ufs X-SVN-Commit-Revision: 362050 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2020 11:45:32 -0000 Author: kib Date: Thu Jun 11 11:45:30 2020 New Revision: 362050 URL: https://svnweb.freebsd.org/changeset/base/362050 Log: MFC r361785, r361801 (by mckusick), r361803 (by se), r361814 (by mckusick), r361875 (by mckusick): Fixes for UFS fdatasync(2). Modified: stable/11/sys/ufs/ffs/ffs_alloc.c stable/11/sys/ufs/ffs/ffs_balloc.c stable/11/sys/ufs/ffs/ffs_inode.c stable/11/sys/ufs/ffs/ffs_snapshot.c stable/11/sys/ufs/ffs/ffs_softdep.c stable/11/sys/ufs/ffs/ffs_vnops.c stable/11/sys/ufs/ufs/inode.h stable/11/sys/ufs/ufs/ufs_lookup.c stable/11/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_alloc.c Thu Jun 11 11:36:49 2020 (r362049) +++ stable/11/sys/ufs/ffs/ffs_alloc.c Thu Jun 11 11:45:30 2020 (r362050) @@ -2897,7 +2897,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) break; ip = VTOI(vp); DIP_SET(ip, i_size, cmd.size); - ip->i_flag |= IN_CHANGE | IN_MODIFIED; + ip->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_MODIFIED; error = ffs_update(vp, 1); vput(vp); break; Modified: stable/11/sys/ufs/ffs/ffs_balloc.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_balloc.c Thu Jun 11 11:36:49 2020 (r362049) +++ stable/11/sys/ufs/ffs/ffs_balloc.c Thu Jun 11 11:45:30 2020 (r362050) @@ -152,7 +152,8 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, i ip->i_size = smalllblktosize(fs, nb + 1); dp->di_size = ip->i_size; dp->di_db[nb] = dbtofsb(fs, bp->b_blkno); - ip->i_flag |= IN_CHANGE | IN_UPDATE; + ip->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_UPDATE | + IN_IBLKDATA; if (flags & IO_SYNC) bwrite(bp); else @@ -222,7 +223,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, i nsize, 0, bp); } dp->di_db[lbn] = dbtofsb(fs, bp->b_blkno); - ip->i_flag |= IN_CHANGE | IN_UPDATE; + ip->i_flag |= IN_CHANGE | IN_UPDATE | IN_IBLKDATA; *bpp = bp; return (0); } @@ -279,7 +280,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, i } allocib = &dp->di_ib[indirs[0].in_off]; *allocib = nb; - ip->i_flag |= IN_CHANGE | IN_UPDATE; + ip->i_flag |= IN_CHANGE | IN_UPDATE | IN_IBLKDATA; } /* * Fetch through the indirect blocks, allocating as necessary. @@ -632,7 +633,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i dp->di_extsize = smalllblktosize(fs, nb + 1); dp->di_extb[nb] = dbtofsb(fs, bp->b_blkno); bp->b_xflags |= BX_ALTDATA; - ip->i_flag |= IN_CHANGE; + ip->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_IBLKDATA; if (flags & IO_SYNC) bwrite(bp); else @@ -708,7 +709,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i nsize, 0, bp); } dp->di_extb[lbn] = dbtofsb(fs, bp->b_blkno); - ip->i_flag |= IN_CHANGE; + ip->i_flag |= IN_CHANGE | IN_IBLKDATA; *bpp = bp; return (0); } @@ -737,7 +738,8 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i ip->i_size = smalllblktosize(fs, nb + 1); dp->di_size = ip->i_size; dp->di_db[nb] = dbtofsb(fs, bp->b_blkno); - ip->i_flag |= IN_CHANGE | IN_UPDATE; + ip->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_UPDATE | + IN_IBLKDATA; if (flags & IO_SYNC) bwrite(bp); else @@ -809,7 +811,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i nsize, 0, bp); } dp->di_db[lbn] = dbtofsb(fs, bp->b_blkno); - ip->i_flag |= IN_CHANGE | IN_UPDATE; + ip->i_flag |= IN_CHANGE | IN_UPDATE | IN_IBLKDATA; *bpp = bp; return (0); } @@ -867,7 +869,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i } allocib = &dp->di_ib[indirs[0].in_off]; *allocib = nb; - ip->i_flag |= IN_CHANGE | IN_UPDATE; + ip->i_flag |= IN_CHANGE | IN_UPDATE | IN_IBLKDATA; } /* * Fetch through the indirect blocks, allocating as necessary. Modified: stable/11/sys/ufs/ffs/ffs_inode.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_inode.c Thu Jun 11 11:36:49 2020 (r362049) +++ stable/11/sys/ufs/ffs/ffs_inode.c Thu Jun 11 11:45:30 2020 (r362050) @@ -92,6 +92,26 @@ ffs_update(vp, waitfor) if ((ip->i_flag & IN_MODIFIED) == 0 && waitfor == 0) return (0); ip->i_flag &= ~(IN_LAZYACCESS | IN_LAZYMOD | IN_MODIFIED); + /* + * The IN_SIZEMOD and IN_IBLKDATA flags indicate changes to the + * file size and block pointer fields in the inode. When these + * fields have been changed, the fsync() and fsyncdata() system + * calls must write the inode to ensure their semantics that the + * file is on stable store. + * + * The IN_SIZEMOD and IN_IBLKDATA flags cannot be cleared until + * a synchronous write of the inode is done. If they are cleared + * on an asynchronous write, then the inode may not yet have been + * written to the disk when an fsync() or fsyncdata() call is done. + * Absent these flags, these calls would not know that they needed + * to write the inode. Thus, these flags only can be cleared on + * synchronous writes of the inode. Since the inode will be locked + * for the duration of the I/O that writes it to disk, no fsync() + * or fsyncdata() will be able to run before the on-disk inode + * is complete. + */ + if (waitfor) + ip->i_flag &= ~(IN_SIZEMOD | IN_IBLKDATA); fs = ITOFS(ip); if (fs->fs_ronly && ITOUMP(ip)->um_fsckpid == 0) return (0); @@ -263,7 +283,7 @@ ffs_truncate(vp, length, flags, cred) oldblks[i] = ip->i_din2->di_extb[i]; ip->i_din2->di_extb[i] = 0; } - ip->i_flag |= IN_CHANGE; + ip->i_flag |= IN_SIZEMOD | IN_CHANGE; if ((error = ffs_update(vp, !DOINGASYNC(vp)))) return (error); for (i = 0; i < NXADDR; i++) { @@ -287,7 +307,7 @@ ffs_truncate(vp, length, flags, cred) bzero(SHORTLINK(ip), (u_int)ip->i_size); ip->i_size = 0; DIP_SET(ip, i_size, 0); - ip->i_flag |= IN_CHANGE | IN_UPDATE; + ip->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_UPDATE; if (needextclean) goto extclean; return (ffs_update(vp, !DOINGASYNC(vp))); @@ -327,7 +347,7 @@ ffs_truncate(vp, length, flags, cred) bdwrite(bp); else bawrite(bp); - ip->i_flag |= IN_CHANGE | IN_UPDATE; + ip->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_UPDATE; return (ffs_update(vp, !DOINGASYNC(vp))); } /* @@ -413,6 +433,7 @@ ffs_truncate(vp, length, flags, cred) if (blkno != 0 && offset == 0) { ip->i_size = length; DIP_SET(ip, i_size, length); + ip->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_UPDATE; } else { lbn = lblkno(fs, length); flags |= BA_CLRBUF; @@ -447,6 +468,7 @@ ffs_truncate(vp, length, flags, cred) bdwrite(bp); else bawrite(bp); + ip->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_UPDATE; } /* * Calculate index into inode's block list of @@ -496,6 +518,7 @@ ffs_truncate(vp, length, flags, cred) } ip->i_size = osize; DIP_SET(ip, i_size, osize); + ip->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_UPDATE; error = vtruncbuf(vp, length, fs->fs_bsize); if (error && (allerror == 0)) @@ -560,6 +583,7 @@ ffs_truncate(vp, length, flags, cred) oldspace = blksize(fs, ip, lastblock); ip->i_size = length; DIP_SET(ip, i_size, length); + ip->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_UPDATE; newspace = blksize(fs, ip, lastblock); if (newspace == 0) panic("ffs_truncate: newspace"); @@ -599,7 +623,7 @@ done: DIP_SET(ip, i_blocks, DIP(ip, i_blocks) - blocksreleased); else /* sanity */ DIP_SET(ip, i_blocks, 0); - ip->i_flag |= IN_CHANGE; + ip->i_flag |= IN_SIZEMOD | IN_CHANGE; #ifdef QUOTA (void) chkdq(ip, -blocksreleased, NOCRED, 0); #endif Modified: stable/11/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_snapshot.c Thu Jun 11 11:36:49 2020 (r362049) +++ stable/11/sys/ufs/ffs/ffs_snapshot.c Thu Jun 11 11:45:30 2020 (r362050) @@ -315,7 +315,7 @@ restart: goto out; ip->i_size = lblktosize(fs, (off_t)numblks); DIP_SET(ip, i_size, ip->i_size); - ip->i_flag |= IN_CHANGE | IN_UPDATE; + ip->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_UPDATE; error = readblock(vp, bp, numblks - 1); bawrite(bp); if (error != 0) Modified: stable/11/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_softdep.c Thu Jun 11 11:36:49 2020 (r362049) +++ stable/11/sys/ufs/ffs/ffs_softdep.c Thu Jun 11 11:45:30 2020 (r362050) @@ -6617,6 +6617,7 @@ softdep_journal_freeblocks(ip, cred, length, flags) } ip->i_size = length; DIP_SET(ip, i_size, ip->i_size); + ip->i_flag |= IN_SIZEMOD | IN_CHANGE; datablocks = DIP(ip, i_blocks) - extblocks; if (length != 0) datablocks = blkcount(fs, datablocks, length); @@ -6627,6 +6628,7 @@ softdep_journal_freeblocks(ip, cred, length, flags) setup_freeext(freeblks, ip, i, needj); ip->i_din2->di_extsize = 0; datablocks += extblocks; + ip->i_flag |= IN_SIZEMOD | IN_CHANGE; } #ifdef QUOTA /* Reference the quotas in case the block count is wrong in the end. */ @@ -6735,7 +6737,7 @@ softdep_journal_freeblocks(ip, cred, length, flags) } ip->i_size = length; DIP_SET(ip, i_size, length); - ip->i_flag |= IN_CHANGE | IN_UPDATE; + ip->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_UPDATE; allocbuf(bp, frags); ffs_update(vp, 0); bawrite(bp); @@ -6881,6 +6883,7 @@ softdep_setup_freeblocks(ip, length, flags) setup_freeindir(freeblks, ip, i, -lbn -i, 0); ip->i_size = 0; DIP_SET(ip, i_size, 0); + ip->i_flag |= IN_SIZEMOD | IN_CHANGE; datablocks = DIP(ip, i_blocks) - extblocks; } if ((flags & IO_EXT) != 0) { @@ -6888,6 +6891,7 @@ softdep_setup_freeblocks(ip, length, flags) setup_freeext(freeblks, ip, i, 0); ip->i_din2->di_extsize = 0; datablocks += extblocks; + ip->i_flag |= IN_SIZEMOD | IN_CHANGE; } #ifdef QUOTA /* Reference the quotas in case the block count is wrong in the end. */ Modified: stable/11/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_vnops.c Thu Jun 11 11:36:49 2020 (r362049) +++ stable/11/sys/ufs/ffs/ffs_vnops.c Thu Jun 11 11:45:30 2020 (r362050) @@ -385,6 +385,8 @@ next: error = ffs_update(vp, 1); if (DOINGSUJ(vp)) softdep_journal_fsync(VTOI(vp)); + } else if ((ip->i_flags & (IN_SIZEMOD | IN_IBLKDATA)) != 0) { + error = ffs_update(vp, 1); } return (error); } @@ -758,6 +760,7 @@ ffs_write(ap) if (uio->uio_offset + xfersize > ip->i_size) { ip->i_size = uio->uio_offset + xfersize; DIP_SET(ip, i_size, ip->i_size); + ip->i_flag |= IN_SIZEMOD | IN_CHANGE; } size = blksize(fs, ip, lbn) - bp->b_resid; @@ -1037,8 +1040,10 @@ ffs_extwrite(struct vnode *vp, struct uio *uio, int io if ((bp->b_flags & B_CACHE) == 0 && fs->fs_bsize <= xfersize) vfs_bio_clrbuf(bp); - if (uio->uio_offset + xfersize > dp->di_extsize) + if (uio->uio_offset + xfersize > dp->di_extsize) { dp->di_extsize = uio->uio_offset + xfersize; + ip->i_flag |= IN_SIZEMOD | IN_CHANGE; + } size = sblksize(fs, dp->di_extsize, lbn) - bp->b_resid; if (size < xfersize) Modified: stable/11/sys/ufs/ufs/inode.h ============================================================================== --- stable/11/sys/ufs/ufs/inode.h Thu Jun 11 11:36:49 2020 (r362049) +++ stable/11/sys/ufs/ufs/inode.h Thu Jun 11 11:45:30 2020 (r362050) @@ -125,12 +125,13 @@ struct inode { #define IN_LAZYMOD 0x0020 /* Modified, but don't write yet. */ #define IN_LAZYACCESS 0x0040 /* Process IN_ACCESS after the suspension finished */ -#define IN_EA_LOCKED 0x0080 -#define IN_EA_LOCKWAIT 0x0100 - +#define IN_EA_LOCKED 0x0080 /* Extended attributes locked */ +#define IN_EA_LOCKWAIT 0x0100 /* Want extended attributes lock */ #define IN_TRUNCATED 0x0200 /* Journaled truncation pending. */ - #define IN_UFS2 0x0400 /* UFS2 vs UFS1 */ +#define IN_IBLKDATA 0x0800 /* datasync requires inode block + update */ +#define IN_SIZEMOD 0x1000 /* Inode size has been modified */ #define i_dirhash i_un.dirhash #define i_snapblklist i_un.snapblklist Modified: stable/11/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_lookup.c Thu Jun 11 11:36:49 2020 (r362049) +++ stable/11/sys/ufs/ufs/ufs_lookup.c Thu Jun 11 11:45:30 2020 (r362050) @@ -554,7 +554,7 @@ found: ufs_dirbad(dp, i_offset, "i_size too small"); dp->i_size = i_offset + DIRSIZ(OFSFMT(vdp), ep); DIP_SET(dp, i_size, dp->i_size); - dp->i_flag |= IN_CHANGE | IN_UPDATE; + dp->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_UPDATE; } brelse(bp); @@ -916,7 +916,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp, isrename) dp->i_size = dp->i_offset + DIRBLKSIZ; DIP_SET(dp, i_size, dp->i_size); dp->i_endoff = dp->i_size; - dp->i_flag |= IN_CHANGE | IN_UPDATE; + dp->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_UPDATE; dirp->d_reclen = DIRBLKSIZ; blkoff = dp->i_offset & (VFSTOUFS(dvp->v_mount)->um_mountp->mnt_stat.f_iosize - 1); @@ -1002,6 +1002,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp, isrename) if (dp->i_offset + dp->i_count > dp->i_size) { dp->i_size = dp->i_offset + dp->i_count; DIP_SET(dp, i_size, dp->i_size); + dp->i_flag |= IN_SIZEMOD | IN_MODIFIED; } /* * Get the block containing the space for the new directory entry. Modified: stable/11/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_vnops.c Thu Jun 11 11:36:49 2020 (r362049) +++ stable/11/sys/ufs/ufs/ufs_vnops.c Thu Jun 11 11:45:30 2020 (r362050) @@ -1925,7 +1925,7 @@ ufs_mkdir(ap) goto bad; ip->i_size = DIRBLKSIZ; DIP_SET(ip, i_size, DIRBLKSIZ); - ip->i_flag |= IN_CHANGE | IN_UPDATE; + ip->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_UPDATE; bcopy((caddr_t)&dirtemplate, (caddr_t)bp->b_data, sizeof dirtemplate); if (DOINGSOFTDEP(tvp)) { /* @@ -2112,7 +2112,7 @@ ufs_symlink(ap) bcopy(ap->a_target, SHORTLINK(ip), len); ip->i_size = len; DIP_SET(ip, i_size, len); - ip->i_flag |= IN_CHANGE | IN_UPDATE; + ip->i_flag |= IN_SIZEMOD | IN_CHANGE | IN_UPDATE; error = UFS_UPDATE(vp, 0); } else error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0, From owner-svn-src-stable-11@freebsd.org Thu Jun 11 14:49:38 2020 Return-Path: Delivered-To: svn-src-stable-11@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 B1210333F1D; Thu, 11 Jun 2020 14:49:38 +0000 (UTC) (envelope-from markj@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49jRb64L4cz3XH8; Thu, 11 Jun 2020 14:49:38 +0000 (UTC) (envelope-from markj@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 901F619AD0; Thu, 11 Jun 2020 14:49:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05BEnc9j025666; Thu, 11 Jun 2020 14:49:38 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05BEncQc025665; Thu, 11 Jun 2020 14:49:38 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006111449.05BEncQc025665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 11 Jun 2020 14:49:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362058 - stable/11/sys/dev/mps X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/dev/mps X-SVN-Commit-Revision: 362058 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2020 14:49:38 -0000 Author: markj Date: Thu Jun 11 14:49:38 2020 New Revision: 362058 URL: https://svnweb.freebsd.org/changeset/base/362058 Log: MFC r342660 (by scottl): Port over the SCSI sense handling fix from mpr(4) in r342528, and fix whitespace to match. PR: 223813 Reported and tested by: farrokhi Modified: stable/11/sys/dev/mps/mps_user.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mps/mps_user.c ============================================================================== --- stable/11/sys/dev/mps/mps_user.c Thu Jun 11 14:48:20 2020 (r362057) +++ stable/11/sys/dev/mps/mps_user.c Thu Jun 11 14:49:38 2020 (r362058) @@ -1036,10 +1036,12 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru if (((MPI2_SCSI_IO_REPLY *)rpl)->SCSIState & MPI2_SCSI_STATE_AUTOSENSE_VALID) { sense_len = - MIN((le32toh(((MPI2_SCSI_IO_REPLY *)rpl)->SenseCount)), - sizeof(struct scsi_sense_data)); + MIN((le32toh(((MPI2_SCSI_IO_REPLY *)rpl)-> + SenseCount)), sizeof(struct + scsi_sense_data)); mps_unlock(sc); - copyout(cm->cm_sense, cm->cm_req + 64, sense_len); + copyout(cm->cm_sense, (PTRIN(data->PtrReply + + sizeof(MPI2_SCSI_IO_REPLY))), sense_len); mps_lock(sc); } } From owner-svn-src-stable-11@freebsd.org Thu Jun 11 19:52:49 2020 Return-Path: Delivered-To: svn-src-stable-11@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 3EFFD33FC4E; Thu, 11 Jun 2020 19:52:49 +0000 (UTC) (envelope-from gjb@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49jZJx0xbqz4JyP; Thu, 11 Jun 2020 19:52:49 +0000 (UTC) (envelope-from gjb@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 1BB1B1DA2E; Thu, 11 Jun 2020 19:52:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05BJqms7022305; Thu, 11 Jun 2020 19:52:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05BJqmVX022304; Thu, 11 Jun 2020 19:52:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202006111952.05BJqmVX022304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 11 Jun 2020 19:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362073 - stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Commit-Revision: 362073 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2020 19:52:49 -0000 Author: gjb Date: Thu Jun 11 19:52:48 2020 New Revision: 362073 URL: https://svnweb.freebsd.org/changeset/base/362073 Log: Sync the stable/11 errata page for 11.4 with the releng/11.4 version. Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jun 11 18:59:57 2020 (r362072) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jun 11 19:52:48 2020 (r362073) @@ -49,8 +49,7 @@ &os;. This errata document for &os; &release; will be maintained - until the release of &os; &release.next; (if - applicable). + until &os; &release; reaches end-of-life. @@ -97,38 +96,21 @@ - [2019-07-04] An issue which can cause a crash when - connecting to a &man.bhyve.4; instance with - a VNC client under certain circumstances - had been reported. An errata notice is planned - post-release. - + [2020-06-11] Source-based upgrades from &os; 11.2 on the + &arch.i386; architecture may fail to compile + clang due to the amount of + RAM consumed. - - [2019-07-04] An issue booting &man.bhyve.4; virtual - machines compiled with &man.clang.1; version 8.0.0 or later - had been reported late in the release cycle. An errata - notice is planned post-release. + Adding CFLAGS+=-O1 to + /etc/make.conf or + /etc/src.conf has been observed to work + around the compile-time RAM exhaustion. - This issue is believed to only affect OpenBSD virtual - machines compiled with &man.clang.1;. + See + PR + 246274 for additional details. - - - [2019-07-04] An issue when upgrading from &os; 11.3 - to &os; 12.0 (which occurred earlier in time, - comparatively), had been reported where the - com.delphix:spacemap_v2 &man.zpool.8; - feature does not exist on &os; 12.0, will fail to - import the ZFS pool. - - At this time, it is advised to defer migrating from - &os; 11.3 to &os; 12.x until &os; 12.1 is - available. - - Upgrading from earlier &os; 11.x releases to - &os; 12.0 are believed to be unaffected. - @@ -137,27 +119,7 @@ - [2019-12-06] An issue has been reported with the - &os; 11.3-RELEASE images on the Google Compute Engine - platform which causes virtual machines to fail to start - properly. - - While we intend to investigate how to handle similar - situations should they arise in the future, updated images - will not be provided as of this time. - - Users wanting to use &os; in Google Compute Engine are - advised to use 12.0-RELEASE or 12.1-RELEASE, or for those - who wish to track 11.X, the - freebsd-11-3-stable-amd64-v20190801 - snapshot from stable/11 has been - - reported to work correctly. - - More details can be found in PR - 242303. + No late-breaking news. From owner-svn-src-stable-11@freebsd.org Fri Jun 12 01:03:53 2020 Return-Path: Delivered-To: svn-src-stable-11@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 05C0E328062; Fri, 12 Jun 2020 01:03:53 +0000 (UTC) (envelope-from cy@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49jjCr6Mktz3Rfl; Fri, 12 Jun 2020 01:03:52 +0000 (UTC) (envelope-from cy@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 D53F92107D; Fri, 12 Jun 2020 01:03:52 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05C13qdI015876; Fri, 12 Jun 2020 01:03:52 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05C13q0e015872; Fri, 12 Jun 2020 01:03:52 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202006120103.05C13q0e015872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 12 Jun 2020 01:03:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362081 - in stable: 11/contrib/wpa/src/wps 12/contrib/wpa/src/wps X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/wpa/src/wps 12/contrib/wpa/src/wps X-SVN-Commit-Revision: 362081 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2020 01:03:53 -0000 Author: cy Date: Fri Jun 12 01:03:51 2020 New Revision: 362081 URL: https://svnweb.freebsd.org/changeset/base/362081 Log: MFC r361957-r361960 r361957: MFV r361936: Upstream commit message: [PATCH 1/3] WPS UPnP: Do not allow event subscriptions with URLs to other networks The UPnP Device Architecture 2.0 specification errata ("UDA errata 16-04-2020.docx") addresses a problem with notifications being allowed to go out to other domains by disallowing such cases. Do such filtering for the notification callback URLs to avoid undesired connections to external networks based on subscriptions that any device in the local network could request when WPS support for external registrars is enabled (the upnp_iface parameter in hostapd configuration). Obtained from: https://w1.fi/security/2020-1/\ 0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch Security: VU#339275 and CVE-2020-12695 r361958: MFV r361937: Upstream commit message: [PATCH 2/3] WPS UPnP: Fix event message generation using a long URL path More than about 700 character URL ended up overflowing the wpabuf used for building the event notification and this resulted in the wpabuf buffer overflow checks terminating the hostapd process. Fix this by allocating the buffer to be large enough to contain the full URL path. However, since that around 700 character limit has been the practical limit for more than ten years, start explicitly enforcing that as the limit or the callback URLs since any longer ones had not worked before and there is no need to enable them now either. Obtained from: https://w1.fi/security/2020-1/\ 0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch Security: VU#339275 and CVE-2020-12695 r361959: MFV r361938: Upstream commit message: [PATCH 3/3] WPS UPnP: Handle HTTP initiation failures for events more properly While it is appropriate to try to retransmit the event to another callback URL on a failure to initiate the HTTP client connection, there is no point in trying the exact same operation multiple times in a row. Replve the event_retry() calls with event_addr_failure() for these cases to avoid busy loops trying to repeat the same failing operation. These potential busy loops would go through eloop callbacks, so the process is not completely stuck on handling them, but unnecessary CPU would be used to process the continues retries that will keep failing for the same reason. Obtained from: https://w1.fi/security/2020-1/\ 0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch Security: VU#339275 and CVE-2020-12695 r361960: Post CVE-2020-12695 cleanup patch: Resolve a Linuxism to fix the build. Modified: stable/11/contrib/wpa/src/wps/wps_er.c stable/11/contrib/wpa/src/wps/wps_upnp.c stable/11/contrib/wpa/src/wps/wps_upnp_event.c stable/11/contrib/wpa/src/wps/wps_upnp_i.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/wpa/src/wps/wps_er.c stable/12/contrib/wpa/src/wps/wps_upnp.c stable/12/contrib/wpa/src/wps/wps_upnp_event.c stable/12/contrib/wpa/src/wps/wps_upnp_i.h Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/wpa/src/wps/wps_er.c ============================================================================== --- stable/11/contrib/wpa/src/wps/wps_er.c Fri Jun 12 00:42:05 2020 (r362080) +++ stable/11/contrib/wpa/src/wps/wps_er.c Fri Jun 12 01:03:51 2020 (r362081) @@ -1298,7 +1298,7 @@ wps_er_init(struct wps_context *wps, const char *ifnam "with %s", filter); } if (get_netif_info(er->ifname, &er->ip_addr, &er->ip_addr_text, - er->mac_addr)) { + NULL, er->mac_addr)) { wpa_printf(MSG_INFO, "WPS UPnP: Could not get IP/MAC address " "for %s. Does it have IP address?", er->ifname); wps_er_deinit(er, NULL, NULL); Modified: stable/11/contrib/wpa/src/wps/wps_upnp.c ============================================================================== --- stable/11/contrib/wpa/src/wps/wps_upnp.c Fri Jun 12 00:42:05 2020 (r362080) +++ stable/11/contrib/wpa/src/wps/wps_upnp.c Fri Jun 12 01:03:51 2020 (r362081) @@ -303,6 +303,14 @@ static void subscr_addr_free_all(struct subscription * } +static int local_network_addr(struct upnp_wps_device_sm *sm, + struct sockaddr_in *addr) +{ + return (addr->sin_addr.s_addr & sm->netmask.s_addr) == + (sm->ip_addr & sm->netmask.s_addr); +} + + /* subscr_addr_add_url -- add address(es) for one url to subscription */ static void subscr_addr_add_url(struct subscription *s, const char *url, size_t url_len) @@ -320,9 +328,14 @@ static void subscr_addr_add_url(struct subscription *s int rerr; size_t host_len, path_len; - /* url MUST begin with http: */ - if (url_len < 7 || os_strncasecmp(url, "http://", 7)) + /* URL MUST begin with HTTP scheme. In addition, limit the length of + * the URL to 700 characters which is around the limit that was + * implicitly enforced for more than 10 years due to a bug in + * generating the event messages. */ + if (url_len < 7 || os_strncasecmp(url, "http://", 7) || url_len > 700) { + wpa_printf(MSG_DEBUG, "WPS UPnP: Reject an unacceptable URL"); goto fail; + } url += 7; url_len -= 7; @@ -381,6 +394,7 @@ static void subscr_addr_add_url(struct subscription *s for (rp = result; rp; rp = rp->ai_next) { struct subscr_addr *a; + struct sockaddr_in *addr = (struct sockaddr_in *) rp->ai_addr; /* Limit no. of address to avoid denial of service attack */ if (dl_list_len(&s->addr_list) >= MAX_ADDR_PER_SUBSCRIPTION) { @@ -389,6 +403,13 @@ static void subscr_addr_add_url(struct subscription *s break; } + if (!local_network_addr(s->sm, addr)) { + wpa_printf(MSG_INFO, + "WPS UPnP: Ignore a delivery URL that points to another network %s", + inet_ntoa(addr->sin_addr)); + continue; + } + a = os_zalloc(sizeof(*a) + alloc_len); if (a == NULL) break; @@ -889,11 +910,12 @@ static int eth_get(const char *device, u8 ea[ETH_ALEN] * @net_if: Selected network interface name * @ip_addr: Buffer for returning IP address in network byte order * @ip_addr_text: Buffer for returning a pointer to allocated IP address text + * @netmask: Buffer for returning netmask or %NULL if not needed * @mac: Buffer for returning MAC address * Returns: 0 on success, -1 on failure */ int get_netif_info(const char *net_if, unsigned *ip_addr, char **ip_addr_text, - u8 mac[ETH_ALEN]) + struct in_addr *netmask, u8 mac[ETH_ALEN]) { struct ifreq req; int sock = -1; @@ -919,6 +941,23 @@ int get_netif_info(const char *net_if, unsigned *ip_ad in_addr.s_addr = *ip_addr; os_snprintf(*ip_addr_text, 16, "%s", inet_ntoa(in_addr)); + if (netmask) { + os_memset(&req, 0, sizeof(req)); + os_strlcpy(req.ifr_name, net_if, sizeof(req.ifr_name)); + if (ioctl(sock, SIOCGIFNETMASK, &req) < 0) { + wpa_printf(MSG_ERROR, + "WPS UPnP: SIOCGIFNETMASK failed: %d (%s)", + errno, strerror(errno)); + goto fail; + } +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + addr = (struct sockaddr_in *) &req.ifr_addr; +#else + addr = (struct sockaddr_in *) &req.ifr_netmask; +#endif + netmask->s_addr = addr->sin_addr.s_addr; + } + #ifdef __linux__ os_strlcpy(req.ifr_name, net_if, sizeof(req.ifr_name)); if (ioctl(sock, SIOCGIFHWADDR, &req) < 0) { @@ -1025,11 +1064,15 @@ static int upnp_wps_device_start(struct upnp_wps_devic /* Determine which IP and mac address we're using */ if (get_netif_info(net_if, &sm->ip_addr, &sm->ip_addr_text, - sm->mac_addr)) { + &sm->netmask, sm->mac_addr)) { wpa_printf(MSG_INFO, "WPS UPnP: Could not get IP/MAC address " "for %s. Does it have IP address?", net_if); goto fail; } + wpa_printf(MSG_DEBUG, "WPS UPnP: Local IP address %s netmask %s hwaddr " + MACSTR, + sm->ip_addr_text, inet_ntoa(sm->netmask), + MAC2STR(sm->mac_addr)); /* Listen for incoming TCP connections so that others * can fetch our "xml files" from us. Modified: stable/11/contrib/wpa/src/wps/wps_upnp_event.c ============================================================================== --- stable/11/contrib/wpa/src/wps/wps_upnp_event.c Fri Jun 12 00:42:05 2020 (r362080) +++ stable/11/contrib/wpa/src/wps/wps_upnp_event.c Fri Jun 12 01:03:51 2020 (r362081) @@ -147,7 +147,8 @@ static struct wpabuf * event_build_message(struct wps_ struct wpabuf *buf; char *b; - buf = wpabuf_alloc(1000 + wpabuf_len(e->data)); + buf = wpabuf_alloc(1000 + os_strlen(e->addr->path) + + wpabuf_len(e->data)); if (buf == NULL) return NULL; wpabuf_printf(buf, "NOTIFY %s HTTP/1.1\r\n", e->addr->path); @@ -293,7 +294,7 @@ static int event_send_start(struct subscription *s) buf = event_build_message(e); if (buf == NULL) { - event_retry(e, 0); + event_addr_failure(e); return -1; } @@ -301,7 +302,7 @@ static int event_send_start(struct subscription *s) event_http_cb, e); if (e->http_event == NULL) { wpabuf_free(buf); - event_retry(e, 0); + event_addr_failure(e); return -1; } Modified: stable/11/contrib/wpa/src/wps/wps_upnp_i.h ============================================================================== --- stable/11/contrib/wpa/src/wps/wps_upnp_i.h Fri Jun 12 00:42:05 2020 (r362080) +++ stable/11/contrib/wpa/src/wps/wps_upnp_i.h Fri Jun 12 01:03:51 2020 (r362081) @@ -128,6 +128,7 @@ struct upnp_wps_device_sm { u8 mac_addr[ETH_ALEN]; /* mac addr of network i.f. we use */ char *ip_addr_text; /* IP address of network i.f. we use */ unsigned ip_addr; /* IP address of network i.f. we use (host order) */ + struct in_addr netmask; int multicast_sd; /* send multicast messages over this socket */ int ssdp_sd; /* receive discovery UPD packets on socket */ int ssdp_sd_registered; /* nonzero if we must unregister */ @@ -158,7 +159,7 @@ struct subscription * subscription_find(struct upnp_wp const u8 uuid[UUID_LEN]); void subscr_addr_delete(struct subscr_addr *a); int get_netif_info(const char *net_if, unsigned *ip_addr, char **ip_addr_text, - u8 mac[ETH_ALEN]); + struct in_addr *netmask, u8 mac[ETH_ALEN]); /* wps_upnp_ssdp.c */ void msearchreply_state_machine_stop(struct advertisement_state_machine *a); From owner-svn-src-stable-11@freebsd.org Fri Jun 12 23:01:30 2020 Return-Path: Delivered-To: svn-src-stable-11@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 BEDA13497A0; Fri, 12 Jun 2020 23:01:30 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49kGSB50b4z4D5S; Fri, 12 Jun 2020 23:01:30 +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 A67951129E; Fri, 12 Jun 2020 23:01:30 +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 05CN1UaL034044; Fri, 12 Jun 2020 23:01:30 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05CN1TAa034040; Fri, 12 Jun 2020 23:01:29 GMT (envelope-from mm@FreeBSD.org) Message-Id: <202006122301.05CN1TAa034040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Fri, 12 Jun 2020 23:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362133 - in stable/11: contrib/libarchive contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar lib/libarchive/tests usr.bin/bsdcat usr.bin/cpio usr.b... X-SVN-Group: stable-11 X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in stable/11: contrib/libarchive contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar lib/libarchive/tests usr.bin/bsdcat usr.bin/cpio usr.bin/tar X-SVN-Commit-Revision: 362133 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-11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2020 23:01:30 -0000 Author: mm Date: Fri Jun 12 23:01:29 2020 New Revision: 362133 URL: https://svnweb.freebsd.org/changeset/base/362133 Log: MFC r361294: Update libarchive to 3.4.3 Relevant vendor changes: PR #1352: support negative zstd compression levels PR #1359: improve zstd version checking PR #1348: support RHT.security.selinux from GNU tar PR #1357: support for archives compressed with pzstd PR #1367: fix issues in acl tests PR #1372: child handling cleanup PR #1378: fix memory leak from passphrase callback Relnotes: yes Added: stable/11/contrib/libarchive/libarchive/test/test_compat_zstd_2.tar.zst.uu - copied unchanged from r361294, head/contrib/libarchive/libarchive/test/test_compat_zstd_2.tar.zst.uu stable/11/contrib/libarchive/libarchive/test/test_read_pax_xattr_rht_security_selinux.c - copied unchanged from r361294, head/contrib/libarchive/libarchive/test/test_read_pax_xattr_rht_security_selinux.c stable/11/contrib/libarchive/libarchive/test/test_read_pax_xattr_rht_security_selinux.tar.uu - copied unchanged from r361294, head/contrib/libarchive/libarchive/test/test_read_pax_xattr_rht_security_selinux.tar.uu stable/11/contrib/libarchive/libarchive/test/test_read_pax_xattr_schily.c - copied unchanged from r361294, head/contrib/libarchive/libarchive/test/test_read_pax_xattr_schily.c stable/11/contrib/libarchive/libarchive/test/test_read_pax_xattr_schily.tar.uu - copied unchanged from r361294, head/contrib/libarchive/libarchive/test/test_read_pax_xattr_schily.tar.uu Deleted: stable/11/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.c stable/11/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.tar.uu Modified: stable/11/contrib/libarchive/NEWS stable/11/contrib/libarchive/README.md stable/11/contrib/libarchive/libarchive/archive.h stable/11/contrib/libarchive/libarchive/archive_digest.c stable/11/contrib/libarchive/libarchive/archive_entry.c stable/11/contrib/libarchive/libarchive/archive_entry.h stable/11/contrib/libarchive/libarchive/archive_entry_stat.3 stable/11/contrib/libarchive/libarchive/archive_read_add_passphrase.c stable/11/contrib/libarchive/libarchive/archive_read_disk_posix.c stable/11/contrib/libarchive/libarchive/archive_read_support_filter_program.c stable/11/contrib/libarchive/libarchive/archive_read_support_filter_zstd.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_rar5.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_tar.c stable/11/contrib/libarchive/libarchive/archive_write_add_filter_program.c stable/11/contrib/libarchive/libarchive/archive_write_add_filter_zstd.c stable/11/contrib/libarchive/libarchive/archive_write_set_options.3 stable/11/contrib/libarchive/libarchive/filter_fork.h stable/11/contrib/libarchive/libarchive/filter_fork_posix.c stable/11/contrib/libarchive/libarchive/test/test_acl_platform_nfs4.c stable/11/contrib/libarchive/libarchive/test/test_acl_platform_posix1e.c stable/11/contrib/libarchive/libarchive/test/test_compat_zstd.c stable/11/contrib/libarchive/libarchive/test/test_write_filter_zstd.c stable/11/contrib/libarchive/tar/bsdtar.1 stable/11/lib/libarchive/tests/Makefile stable/11/usr.bin/bsdcat/Makefile stable/11/usr.bin/cpio/Makefile stable/11/usr.bin/tar/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libarchive/NEWS ============================================================================== --- stable/11/contrib/libarchive/NEWS Fri Jun 12 22:59:59 2020 (r362132) +++ stable/11/contrib/libarchive/NEWS Fri Jun 12 23:01:29 2020 (r362133) @@ -1,3 +1,9 @@ +May 20, 2020: libarchive 3.4.3 released + +Apr 30, 2020: Support for pzstd compressed files + +Apr 16, 2020: Support for RHT.security.selinux tar extended attribute + Feb 11, 2020: libarchive 3.4.2 released Jan 23, 2020: Important fixes for writing XAR archives Modified: stable/11/contrib/libarchive/README.md ============================================================================== --- stable/11/contrib/libarchive/README.md Fri Jun 12 22:59:59 2020 (r362132) +++ stable/11/contrib/libarchive/README.md Fri Jun 12 23:01:29 2020 (r362133) @@ -70,7 +70,7 @@ know about any errors or omissions you find. ## Supported Formats -Currently, the library automatically detects and reads the following fomats: +Currently, the library automatically detects and reads the following formats: * Old V7 tar archives * POSIX ustar * GNU tar format (including GNU long filenames, long link names, and sparse files) Modified: stable/11/contrib/libarchive/libarchive/archive.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive.h Fri Jun 12 22:59:59 2020 (r362132) +++ stable/11/contrib/libarchive/libarchive/archive.h Fri Jun 12 23:01:29 2020 (r362133) @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3004002 +#define ARCHIVE_VERSION_NUMBER 3004003 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.4.2" +#define ARCHIVE_VERSION_ONLY_STRING "3.4.3" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); Modified: stable/11/contrib/libarchive/libarchive/archive_digest.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_digest.c Fri Jun 12 22:59:59 2020 (r362132) +++ stable/11/contrib/libarchive/libarchive/archive_digest.c Fri Jun 12 23:01:29 2020 (r362133) @@ -109,14 +109,14 @@ win_crypto_Final(unsigned char *buf, size_t bufsize, D #if defined(ARCHIVE_CRYPTO_MD5_LIBC) static int -__archive_libc_md5init(archive_md5_ctx *ctx) +__archive_md5init(archive_md5_ctx *ctx) { MD5Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc_md5update(archive_md5_ctx *ctx, const void *indata, +__archive_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { MD5Update(ctx, indata, insize); @@ -124,7 +124,7 @@ __archive_libc_md5update(archive_md5_ctx *ctx, const v } static int -__archive_libc_md5final(archive_md5_ctx *ctx, void *md) +__archive_md5final(archive_md5_ctx *ctx, void *md) { MD5Final(md, ctx); return (ARCHIVE_OK); @@ -133,14 +133,14 @@ __archive_libc_md5final(archive_md5_ctx *ctx, void *md #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) static int -__archive_libmd_md5init(archive_md5_ctx *ctx) +__archive_md5init(archive_md5_ctx *ctx) { MD5Init(ctx); return (ARCHIVE_OK); } static int -__archive_libmd_md5update(archive_md5_ctx *ctx, const void *indata, +__archive_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { MD5Update(ctx, indata, insize); @@ -148,7 +148,7 @@ __archive_libmd_md5update(archive_md5_ctx *ctx, const } static int -__archive_libmd_md5final(archive_md5_ctx *ctx, void *md) +__archive_md5final(archive_md5_ctx *ctx, void *md) { MD5Final(md, ctx); return (ARCHIVE_OK); @@ -157,14 +157,14 @@ __archive_libmd_md5final(archive_md5_ctx *ctx, void *m #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) static int -__archive_libsystem_md5init(archive_md5_ctx *ctx) +__archive_md5init(archive_md5_ctx *ctx) { CC_MD5_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libsystem_md5update(archive_md5_ctx *ctx, const void *indata, +__archive_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { CC_MD5_Update(ctx, indata, insize); @@ -172,7 +172,7 @@ __archive_libsystem_md5update(archive_md5_ctx *ctx, co } static int -__archive_libsystem_md5final(archive_md5_ctx *ctx, void *md) +__archive_md5final(archive_md5_ctx *ctx, void *md) { CC_MD5_Final(md, ctx); return (ARCHIVE_OK); @@ -181,7 +181,7 @@ __archive_libsystem_md5final(archive_md5_ctx *ctx, voi #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) static int -__archive_mbedtls_md5init(archive_md5_ctx *ctx) +__archive_md5init(archive_md5_ctx *ctx) { mbedtls_md5_init(ctx); if (mbedtls_md5_starts_ret(ctx) == 0) @@ -191,7 +191,7 @@ __archive_mbedtls_md5init(archive_md5_ctx *ctx) } static int -__archive_mbedtls_md5update(archive_md5_ctx *ctx, const void *indata, +__archive_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) @@ -201,7 +201,7 @@ __archive_mbedtls_md5update(archive_md5_ctx *ctx, cons } static int -__archive_mbedtls_md5final(archive_md5_ctx *ctx, void *md) +__archive_md5final(archive_md5_ctx *ctx, void *md) { if (mbedtls_md5_finish_ret(ctx, md) == 0) { mbedtls_md5_free(ctx); @@ -215,14 +215,14 @@ __archive_mbedtls_md5final(archive_md5_ctx *ctx, void #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) static int -__archive_nettle_md5init(archive_md5_ctx *ctx) +__archive_md5init(archive_md5_ctx *ctx) { md5_init(ctx); return (ARCHIVE_OK); } static int -__archive_nettle_md5update(archive_md5_ctx *ctx, const void *indata, +__archive_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { md5_update(ctx, insize, indata); @@ -230,7 +230,7 @@ __archive_nettle_md5update(archive_md5_ctx *ctx, const } static int -__archive_nettle_md5final(archive_md5_ctx *ctx, void *md) +__archive_md5final(archive_md5_ctx *ctx, void *md) { md5_digest(ctx, MD5_DIGEST_SIZE, md); return (ARCHIVE_OK); @@ -239,7 +239,7 @@ __archive_nettle_md5final(archive_md5_ctx *ctx, void * #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) static int -__archive_openssl_md5init(archive_md5_ctx *ctx) +__archive_md5init(archive_md5_ctx *ctx) { if ((*ctx = EVP_MD_CTX_new()) == NULL) return (ARCHIVE_FAILED); @@ -248,7 +248,7 @@ __archive_openssl_md5init(archive_md5_ctx *ctx) } static int -__archive_openssl_md5update(archive_md5_ctx *ctx, const void *indata, +__archive_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { EVP_DigestUpdate(*ctx, indata, insize); @@ -256,7 +256,7 @@ __archive_openssl_md5update(archive_md5_ctx *ctx, cons } static int -__archive_openssl_md5final(archive_md5_ctx *ctx, void *md) +__archive_md5final(archive_md5_ctx *ctx, void *md) { /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so * this is meant to cope with that. Real fix is probably to fix @@ -273,20 +273,20 @@ __archive_openssl_md5final(archive_md5_ctx *ctx, void #elif defined(ARCHIVE_CRYPTO_MD5_WIN) static int -__archive_windowsapi_md5init(archive_md5_ctx *ctx) +__archive_md5init(archive_md5_ctx *ctx) { return (win_crypto_init(ctx, CALG_MD5)); } static int -__archive_windowsapi_md5update(archive_md5_ctx *ctx, const void *indata, +__archive_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { return (win_crypto_Update(ctx, indata, insize)); } static int -__archive_windowsapi_md5final(archive_md5_ctx *ctx, void *md) +__archive_md5final(archive_md5_ctx *ctx, void *md) { return (win_crypto_Final(md, 16, ctx)); } @@ -294,14 +294,14 @@ __archive_windowsapi_md5final(archive_md5_ctx *ctx, vo #else static int -__archive_stub_md5init(archive_md5_ctx *ctx) +__archive_md5init(archive_md5_ctx *ctx) { (void)ctx; /* UNUSED */ return (ARCHIVE_FAILED); } static int -__archive_stub_md5update(archive_md5_ctx *ctx, const void *indata, +__archive_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { (void)ctx; /* UNUSED */ @@ -311,7 +311,7 @@ __archive_stub_md5update(archive_md5_ctx *ctx, const v } static int -__archive_stub_md5final(archive_md5_ctx *ctx, void *md) +__archive_md5final(archive_md5_ctx *ctx, void *md) { (void)ctx; /* UNUSED */ (void)md; /* UNUSED */ @@ -324,14 +324,14 @@ __archive_stub_md5final(archive_md5_ctx *ctx, void *md #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) static int -__archive_libc_ripemd160init(archive_rmd160_ctx *ctx) +__archive_ripemd160init(archive_rmd160_ctx *ctx) { RMD160Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, +__archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, size_t insize) { RMD160Update(ctx, indata, insize); @@ -339,7 +339,7 @@ __archive_libc_ripemd160update(archive_rmd160_ctx *ctx } static int -__archive_libc_ripemd160final(archive_rmd160_ctx *ctx, void *md) +__archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) { RMD160Final(md, ctx); return (ARCHIVE_OK); @@ -348,14 +348,14 @@ __archive_libc_ripemd160final(archive_rmd160_ctx *ctx, #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) static int -__archive_libmd_ripemd160init(archive_rmd160_ctx *ctx) +__archive_ripemd160init(archive_rmd160_ctx *ctx) { RIPEMD160_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libmd_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, +__archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, size_t insize) { RIPEMD160_Update(ctx, indata, insize); @@ -363,7 +363,7 @@ __archive_libmd_ripemd160update(archive_rmd160_ctx *ct } static int -__archive_libmd_ripemd160final(archive_rmd160_ctx *ctx, void *md) +__archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) { RIPEMD160_Final(md, ctx); return (ARCHIVE_OK); @@ -372,7 +372,7 @@ __archive_libmd_ripemd160final(archive_rmd160_ctx *ctx #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) static int -__archive_mbedtls_ripemd160init(archive_rmd160_ctx *ctx) +__archive_ripemd160init(archive_rmd160_ctx *ctx) { mbedtls_ripemd160_init(ctx); if (mbedtls_ripemd160_starts_ret(ctx) == 0) @@ -382,7 +382,7 @@ __archive_mbedtls_ripemd160init(archive_rmd160_ctx *ct } static int -__archive_mbedtls_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, +__archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, size_t insize) { if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) @@ -392,7 +392,7 @@ __archive_mbedtls_ripemd160update(archive_rmd160_ctx * } static int -__archive_mbedtls_ripemd160final(archive_rmd160_ctx *ctx, void *md) +__archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) { if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { mbedtls_ripemd160_free(ctx); @@ -406,14 +406,14 @@ __archive_mbedtls_ripemd160final(archive_rmd160_ctx *c #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) static int -__archive_nettle_ripemd160init(archive_rmd160_ctx *ctx) +__archive_ripemd160init(archive_rmd160_ctx *ctx) { ripemd160_init(ctx); return (ARCHIVE_OK); } static int -__archive_nettle_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, +__archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, size_t insize) { ripemd160_update(ctx, insize, indata); @@ -421,7 +421,7 @@ __archive_nettle_ripemd160update(archive_rmd160_ctx *c } static int -__archive_nettle_ripemd160final(archive_rmd160_ctx *ctx, void *md) +__archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) { ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); return (ARCHIVE_OK); @@ -430,7 +430,7 @@ __archive_nettle_ripemd160final(archive_rmd160_ctx *ct #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) static int -__archive_openssl_ripemd160init(archive_rmd160_ctx *ctx) +__archive_ripemd160init(archive_rmd160_ctx *ctx) { if ((*ctx = EVP_MD_CTX_new()) == NULL) return (ARCHIVE_FAILED); @@ -439,7 +439,7 @@ __archive_openssl_ripemd160init(archive_rmd160_ctx *ct } static int -__archive_openssl_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, +__archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, size_t insize) { EVP_DigestUpdate(*ctx, indata, insize); @@ -447,7 +447,7 @@ __archive_openssl_ripemd160update(archive_rmd160_ctx * } static int -__archive_openssl_ripemd160final(archive_rmd160_ctx *ctx, void *md) +__archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) { if (*ctx) { EVP_DigestFinal(*ctx, md, NULL); @@ -460,14 +460,14 @@ __archive_openssl_ripemd160final(archive_rmd160_ctx *c #else static int -__archive_stub_ripemd160init(archive_rmd160_ctx *ctx) +__archive_ripemd160init(archive_rmd160_ctx *ctx) { (void)ctx; /* UNUSED */ return (ARCHIVE_FAILED); } static int -__archive_stub_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, +__archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, size_t insize) { (void)ctx; /* UNUSED */ @@ -477,7 +477,7 @@ __archive_stub_ripemd160update(archive_rmd160_ctx *ctx } static int -__archive_stub_ripemd160final(archive_rmd160_ctx *ctx, void *md) +__archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) { (void)ctx; /* UNUSED */ (void)md; /* UNUSED */ @@ -490,14 +490,14 @@ __archive_stub_ripemd160final(archive_rmd160_ctx *ctx, #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) static int -__archive_libc_sha1init(archive_sha1_ctx *ctx) +__archive_sha1init(archive_sha1_ctx *ctx) { SHA1Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc_sha1update(archive_sha1_ctx *ctx, const void *indata, +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { SHA1Update(ctx, indata, insize); @@ -505,7 +505,7 @@ __archive_libc_sha1update(archive_sha1_ctx *ctx, const } static int -__archive_libc_sha1final(archive_sha1_ctx *ctx, void *md) +__archive_sha1final(archive_sha1_ctx *ctx, void *md) { SHA1Final(md, ctx); return (ARCHIVE_OK); @@ -514,14 +514,14 @@ __archive_libc_sha1final(archive_sha1_ctx *ctx, void * #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) static int -__archive_libmd_sha1init(archive_sha1_ctx *ctx) +__archive_sha1init(archive_sha1_ctx *ctx) { SHA1_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libmd_sha1update(archive_sha1_ctx *ctx, const void *indata, +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { SHA1_Update(ctx, indata, insize); @@ -529,7 +529,7 @@ __archive_libmd_sha1update(archive_sha1_ctx *ctx, cons } static int -__archive_libmd_sha1final(archive_sha1_ctx *ctx, void *md) +__archive_sha1final(archive_sha1_ctx *ctx, void *md) { SHA1_Final(md, ctx); return (ARCHIVE_OK); @@ -538,14 +538,14 @@ __archive_libmd_sha1final(archive_sha1_ctx *ctx, void #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) static int -__archive_libsystem_sha1init(archive_sha1_ctx *ctx) +__archive_sha1init(archive_sha1_ctx *ctx) { CC_SHA1_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libsystem_sha1update(archive_sha1_ctx *ctx, const void *indata, +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { CC_SHA1_Update(ctx, indata, insize); @@ -553,7 +553,7 @@ __archive_libsystem_sha1update(archive_sha1_ctx *ctx, } static int -__archive_libsystem_sha1final(archive_sha1_ctx *ctx, void *md) +__archive_sha1final(archive_sha1_ctx *ctx, void *md) { CC_SHA1_Final(md, ctx); return (ARCHIVE_OK); @@ -562,7 +562,7 @@ __archive_libsystem_sha1final(archive_sha1_ctx *ctx, v #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) static int -__archive_mbedtls_sha1init(archive_sha1_ctx *ctx) +__archive_sha1init(archive_sha1_ctx *ctx) { mbedtls_sha1_init(ctx); if (mbedtls_sha1_starts_ret(ctx) == 0) @@ -572,7 +572,7 @@ __archive_mbedtls_sha1init(archive_sha1_ctx *ctx) } static int -__archive_mbedtls_sha1update(archive_sha1_ctx *ctx, const void *indata, +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) @@ -582,7 +582,7 @@ __archive_mbedtls_sha1update(archive_sha1_ctx *ctx, co } static int -__archive_mbedtls_sha1final(archive_sha1_ctx *ctx, void *md) +__archive_sha1final(archive_sha1_ctx *ctx, void *md) { if (mbedtls_sha1_finish_ret(ctx, md) == 0) { mbedtls_sha1_free(ctx); @@ -596,14 +596,14 @@ __archive_mbedtls_sha1final(archive_sha1_ctx *ctx, voi #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) static int -__archive_nettle_sha1init(archive_sha1_ctx *ctx) +__archive_sha1init(archive_sha1_ctx *ctx) { sha1_init(ctx); return (ARCHIVE_OK); } static int -__archive_nettle_sha1update(archive_sha1_ctx *ctx, const void *indata, +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { sha1_update(ctx, insize, indata); @@ -611,7 +611,7 @@ __archive_nettle_sha1update(archive_sha1_ctx *ctx, con } static int -__archive_nettle_sha1final(archive_sha1_ctx *ctx, void *md) +__archive_sha1final(archive_sha1_ctx *ctx, void *md) { sha1_digest(ctx, SHA1_DIGEST_SIZE, md); return (ARCHIVE_OK); @@ -620,7 +620,7 @@ __archive_nettle_sha1final(archive_sha1_ctx *ctx, void #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) static int -__archive_openssl_sha1init(archive_sha1_ctx *ctx) +__archive_sha1init(archive_sha1_ctx *ctx) { if ((*ctx = EVP_MD_CTX_new()) == NULL) return (ARCHIVE_FAILED); @@ -629,7 +629,7 @@ __archive_openssl_sha1init(archive_sha1_ctx *ctx) } static int -__archive_openssl_sha1update(archive_sha1_ctx *ctx, const void *indata, +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { EVP_DigestUpdate(*ctx, indata, insize); @@ -637,7 +637,7 @@ __archive_openssl_sha1update(archive_sha1_ctx *ctx, co } static int -__archive_openssl_sha1final(archive_sha1_ctx *ctx, void *md) +__archive_sha1final(archive_sha1_ctx *ctx, void *md) { /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so * this is meant to cope with that. Real fix is probably to fix @@ -654,20 +654,20 @@ __archive_openssl_sha1final(archive_sha1_ctx *ctx, voi #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) static int -__archive_windowsapi_sha1init(archive_sha1_ctx *ctx) +__archive_sha1init(archive_sha1_ctx *ctx) { return (win_crypto_init(ctx, CALG_SHA1)); } static int -__archive_windowsapi_sha1update(archive_sha1_ctx *ctx, const void *indata, +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { return (win_crypto_Update(ctx, indata, insize)); } static int -__archive_windowsapi_sha1final(archive_sha1_ctx *ctx, void *md) +__archive_sha1final(archive_sha1_ctx *ctx, void *md) { return (win_crypto_Final(md, 20, ctx)); } @@ -675,14 +675,14 @@ __archive_windowsapi_sha1final(archive_sha1_ctx *ctx, #else static int -__archive_stub_sha1init(archive_sha1_ctx *ctx) +__archive_sha1init(archive_sha1_ctx *ctx) { (void)ctx; /* UNUSED */ return (ARCHIVE_FAILED); } static int -__archive_stub_sha1update(archive_sha1_ctx *ctx, const void *indata, +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { (void)ctx; /* UNUSED */ @@ -692,7 +692,7 @@ __archive_stub_sha1update(archive_sha1_ctx *ctx, const } static int -__archive_stub_sha1final(archive_sha1_ctx *ctx, void *md) +__archive_sha1final(archive_sha1_ctx *ctx, void *md) { (void)ctx; /* UNUSED */ (void)md; /* UNUSED */ @@ -705,14 +705,14 @@ __archive_stub_sha1final(archive_sha1_ctx *ctx, void * #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) static int -__archive_libc_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { SHA256_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { SHA256_Update(ctx, indata, insize); @@ -720,7 +720,7 @@ __archive_libc_sha256update(archive_sha256_ctx *ctx, c } static int -__archive_libc_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { SHA256_Final(md, ctx); return (ARCHIVE_OK); @@ -729,14 +729,14 @@ __archive_libc_sha256final(archive_sha256_ctx *ctx, vo #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) static int -__archive_libc2_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { SHA256Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc2_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { SHA256Update(ctx, indata, insize); @@ -744,7 +744,7 @@ __archive_libc2_sha256update(archive_sha256_ctx *ctx, } static int -__archive_libc2_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { SHA256Final(md, ctx); return (ARCHIVE_OK); @@ -753,14 +753,14 @@ __archive_libc2_sha256final(archive_sha256_ctx *ctx, v #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) static int -__archive_libc3_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { SHA256Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc3_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { SHA256Update(ctx, indata, insize); @@ -768,7 +768,7 @@ __archive_libc3_sha256update(archive_sha256_ctx *ctx, } static int -__archive_libc3_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { SHA256Final(md, ctx); return (ARCHIVE_OK); @@ -777,14 +777,14 @@ __archive_libc3_sha256final(archive_sha256_ctx *ctx, v #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) static int -__archive_libmd_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { SHA256_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libmd_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { SHA256_Update(ctx, indata, insize); @@ -792,7 +792,7 @@ __archive_libmd_sha256update(archive_sha256_ctx *ctx, } static int -__archive_libmd_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { SHA256_Final(md, ctx); return (ARCHIVE_OK); @@ -801,14 +801,14 @@ __archive_libmd_sha256final(archive_sha256_ctx *ctx, v #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) static int -__archive_libsystem_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { CC_SHA256_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libsystem_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { CC_SHA256_Update(ctx, indata, insize); @@ -816,7 +816,7 @@ __archive_libsystem_sha256update(archive_sha256_ctx *c } static int -__archive_libsystem_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { CC_SHA256_Final(md, ctx); return (ARCHIVE_OK); @@ -825,7 +825,7 @@ __archive_libsystem_sha256final(archive_sha256_ctx *ct #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) static int -__archive_mbedtls_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { mbedtls_sha256_init(ctx); if (mbedtls_sha256_starts_ret(ctx, 0) == 0) @@ -835,7 +835,7 @@ __archive_mbedtls_sha256init(archive_sha256_ctx *ctx) } static int -__archive_mbedtls_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) @@ -845,7 +845,7 @@ __archive_mbedtls_sha256update(archive_sha256_ctx *ctx } static int -__archive_mbedtls_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { if (mbedtls_sha256_finish_ret(ctx, md) == 0) { mbedtls_sha256_free(ctx); @@ -859,14 +859,14 @@ __archive_mbedtls_sha256final(archive_sha256_ctx *ctx, #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) static int -__archive_nettle_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { sha256_init(ctx); return (ARCHIVE_OK); } static int -__archive_nettle_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { sha256_update(ctx, insize, indata); @@ -874,7 +874,7 @@ __archive_nettle_sha256update(archive_sha256_ctx *ctx, } static int -__archive_nettle_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { sha256_digest(ctx, SHA256_DIGEST_SIZE, md); return (ARCHIVE_OK); @@ -883,7 +883,7 @@ __archive_nettle_sha256final(archive_sha256_ctx *ctx, #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) static int -__archive_openssl_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { if ((*ctx = EVP_MD_CTX_new()) == NULL) return (ARCHIVE_FAILED); @@ -892,7 +892,7 @@ __archive_openssl_sha256init(archive_sha256_ctx *ctx) } static int -__archive_openssl_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { EVP_DigestUpdate(*ctx, indata, insize); @@ -900,7 +900,7 @@ __archive_openssl_sha256update(archive_sha256_ctx *ctx } static int -__archive_openssl_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { if (*ctx) { EVP_DigestFinal(*ctx, md, NULL); @@ -913,20 +913,20 @@ __archive_openssl_sha256final(archive_sha256_ctx *ctx, #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) static int -__archive_windowsapi_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { return (win_crypto_init(ctx, CALG_SHA_256)); } static int -__archive_windowsapi_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { return (win_crypto_Update(ctx, indata, insize)); } static int -__archive_windowsapi_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { return (win_crypto_Final(md, 32, ctx)); } @@ -934,14 +934,14 @@ __archive_windowsapi_sha256final(archive_sha256_ctx *c #else static int -__archive_stub_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { (void)ctx; /* UNUSED */ return (ARCHIVE_FAILED); } static int -__archive_stub_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { (void)ctx; /* UNUSED */ @@ -951,7 +951,7 @@ __archive_stub_sha256update(archive_sha256_ctx *ctx, c } static int -__archive_stub_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { (void)ctx; /* UNUSED */ (void)md; /* UNUSED */ @@ -964,14 +964,14 @@ __archive_stub_sha256final(archive_sha256_ctx *ctx, vo #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) static int -__archive_libc_sha384init(archive_sha384_ctx *ctx) +__archive_sha384init(archive_sha384_ctx *ctx) { SHA384_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc_sha384update(archive_sha384_ctx *ctx, const void *indata, +__archive_sha384update(archive_sha384_ctx *ctx, const void *indata, size_t insize) { SHA384_Update(ctx, indata, insize); @@ -979,7 +979,7 @@ __archive_libc_sha384update(archive_sha384_ctx *ctx, c } static int -__archive_libc_sha384final(archive_sha384_ctx *ctx, void *md) +__archive_sha384final(archive_sha384_ctx *ctx, void *md) { SHA384_Final(md, ctx); return (ARCHIVE_OK); @@ -988,14 +988,14 @@ __archive_libc_sha384final(archive_sha384_ctx *ctx, vo #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) static int -__archive_libc2_sha384init(archive_sha384_ctx *ctx) +__archive_sha384init(archive_sha384_ctx *ctx) { SHA384Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc2_sha384update(archive_sha384_ctx *ctx, const void *indata, +__archive_sha384update(archive_sha384_ctx *ctx, const void *indata, size_t insize) { SHA384Update(ctx, indata, insize); @@ -1003,7 +1003,7 @@ __archive_libc2_sha384update(archive_sha384_ctx *ctx, } static int -__archive_libc2_sha384final(archive_sha384_ctx *ctx, void *md) +__archive_sha384final(archive_sha384_ctx *ctx, void *md) { SHA384Final(md, ctx); return (ARCHIVE_OK); @@ -1012,14 +1012,14 @@ __archive_libc2_sha384final(archive_sha384_ctx *ctx, v #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) static int -__archive_libc3_sha384init(archive_sha384_ctx *ctx) +__archive_sha384init(archive_sha384_ctx *ctx) { SHA384Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc3_sha384update(archive_sha384_ctx *ctx, const void *indata, +__archive_sha384update(archive_sha384_ctx *ctx, const void *indata, size_t insize) { SHA384Update(ctx, indata, insize); @@ -1027,7 +1027,7 @@ __archive_libc3_sha384update(archive_sha384_ctx *ctx, } static int -__archive_libc3_sha384final(archive_sha384_ctx *ctx, void *md) +__archive_sha384final(archive_sha384_ctx *ctx, void *md) { SHA384Final(md, ctx); return (ARCHIVE_OK); @@ -1036,14 +1036,14 @@ __archive_libc3_sha384final(archive_sha384_ctx *ctx, v #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) static int -__archive_libsystem_sha384init(archive_sha384_ctx *ctx) +__archive_sha384init(archive_sha384_ctx *ctx) { CC_SHA384_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libsystem_sha384update(archive_sha384_ctx *ctx, const void *indata, +__archive_sha384update(archive_sha384_ctx *ctx, const void *indata, size_t insize) { CC_SHA384_Update(ctx, indata, insize); @@ -1051,7 +1051,7 @@ __archive_libsystem_sha384update(archive_sha384_ctx *c } static int -__archive_libsystem_sha384final(archive_sha384_ctx *ctx, void *md) +__archive_sha384final(archive_sha384_ctx *ctx, void *md) { CC_SHA384_Final(md, ctx); return (ARCHIVE_OK); @@ -1060,7 +1060,7 @@ __archive_libsystem_sha384final(archive_sha384_ctx *ct #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) static int -__archive_mbedtls_sha384init(archive_sha384_ctx *ctx) +__archive_sha384init(archive_sha384_ctx *ctx) { mbedtls_sha512_init(ctx); if (mbedtls_sha512_starts_ret(ctx, 1) == 0) @@ -1070,7 +1070,7 @@ __archive_mbedtls_sha384init(archive_sha384_ctx *ctx) } static int -__archive_mbedtls_sha384update(archive_sha384_ctx *ctx, const void *indata, +__archive_sha384update(archive_sha384_ctx *ctx, const void *indata, size_t insize) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***