From owner-svn-src-stable-11@freebsd.org Sun Nov 17 00:52:59 2019 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 5E4001B1D42; Sun, 17 Nov 2019 00:52:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47FtqG6K68z3NZ0; Sun, 17 Nov 2019 00:52:58 +0000 (UTC) (envelope-from mav@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 A7FDD9E8D; Sun, 17 Nov 2019 00:52:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAH0qw2o070778; Sun, 17 Nov 2019 00:52:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAH0qwod070777; Sun, 17 Nov 2019 00:52:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911170052.xAH0qwod070777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 17 Nov 2019 00:52:58 +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: r354782 - stable/11/sys/cam/ctl X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cam/ctl X-SVN-Commit-Revision: 354782 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.29 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, 17 Nov 2019 00:52:59 -0000 Author: mav Date: Sun Nov 17 00:52:58 2019 New Revision: 354782 URL: https://svnweb.freebsd.org/changeset/base/354782 Log: MFC r354268: Remove lock from CTL camsim frontend. CAM does not need a SIM lock for quite a while, and CTL never needed it. Modified: stable/11/sys/cam/ctl/ctl_frontend_cam_sim.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_frontend_cam_sim.c Sun Nov 17 00:52:23 2019 (r354781) +++ stable/11/sys/cam/ctl/ctl_frontend_cam_sim.c Sun Nov 17 00:52:58 2019 (r354782) @@ -44,12 +44,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include -#include #include #include +#include #include #include @@ -78,7 +75,6 @@ struct cfcs_softc { struct cam_sim *sim; struct cam_devq *devq; struct cam_path *path; - struct mtx lock; uint64_t wwnn; uint64_t wwpn; uint32_t cur_tag_num; @@ -133,7 +129,6 @@ cfcs_init(void) softc = &cfcs_softc; bzero(softc, sizeof(*softc)); - mtx_init(&softc->lock, "ctl2cam", NULL, MTX_DEF); port = &softc->port; port->frontend = &cfcs_frontend; @@ -158,7 +153,6 @@ cfcs_init(void) if (retval != 0) { printf("%s: ctl_port_register() failed with error %d!\n", __func__, retval); - mtx_destroy(&softc->lock); return (retval); } @@ -180,7 +174,6 @@ cfcs_init(void) softc->wwpn = port->wwpn; } - mtx_lock(&softc->lock); softc->devq = cam_simq_alloc(port->num_requested_ctl_io); if (softc->devq == NULL) { printf("%s: error allocating devq\n", __func__); @@ -189,7 +182,7 @@ cfcs_init(void) } softc->sim = cam_sim_alloc(cfcs_action, cfcs_poll, softc->port_name, - softc, /*unit*/ 0, &softc->lock, 1, + softc, /*unit*/ 0, NULL, 1, port->num_requested_ctl_io, softc->devq); if (softc->sim == NULL) { printf("%s: error allocating SIM\n", __func__); @@ -213,8 +206,6 @@ cfcs_init(void) goto bailout; } - mtx_unlock(&softc->lock); - return (retval); bailout: @@ -222,9 +213,6 @@ bailout: cam_sim_free(softc->sim, /*free_devq*/ TRUE); else if (softc->devq) cam_simq_free(softc->devq); - mtx_unlock(&softc->lock); - mtx_destroy(&softc->lock); - return (retval); } @@ -237,12 +225,9 @@ cfcs_shutdown(void) ctl_port_offline(port); - mtx_lock(&softc->lock); xpt_free_path(softc->path); xpt_bus_deregister(cam_sim_path(softc->sim)); cam_sim_free(softc->sim, /*free_devq*/ TRUE); - mtx_unlock(&softc->lock); - mtx_destroy(&softc->lock); if ((error = ctl_port_deregister(port)) != 0) printf("%s: cam_sim port deregistration failed\n", __func__); @@ -258,18 +243,15 @@ cfcs_poll(struct cam_sim *sim) static void cfcs_onoffline(void *arg, int online) { - struct cfcs_softc *softc; + struct cfcs_softc *softc = (struct cfcs_softc *)arg; union ccb *ccb; - softc = (struct cfcs_softc *)arg; - - mtx_lock(&softc->lock); softc->online = online; ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { printf("%s: unable to allocate CCB for rescan\n", __func__); - goto bailout; + return; } if (xpt_create_path(&ccb->ccb_h.path, NULL, @@ -277,12 +259,9 @@ cfcs_onoffline(void *arg, int online) CAM_LUN_WILDCARD) != CAM_REQ_CMP) { printf("%s: can't allocate path for rescan\n", __func__); xpt_free_ccb(ccb); - goto bailout; + return; } xpt_rescan(ccb); - -bailout: - mtx_unlock(&softc->lock); } static void @@ -496,13 +475,13 @@ cfcs_done(union ctl_io *io) ccb->ccb_h.status |= CAM_REQ_CMP_ERR; break; } + ctl_free_io(io); if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP && (ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { xpt_freeze_devq(ccb->ccb_h.path, 1); ccb->ccb_h.status |= CAM_DEV_QFRZN; } xpt_done(ccb); - ctl_free_io(io); } void @@ -512,7 +491,6 @@ cfcs_action(struct cam_sim *sim, union ccb *ccb) int err; softc = (struct cfcs_softc *)cam_sim_softc(sim); - mtx_assert(&softc->lock, MA_OWNED); switch (ccb->ccb_h.func_code) { case XPT_SCSI_IO: { @@ -572,7 +550,7 @@ cfcs_action(struct cam_sim *sim, union ccb *ccb) * enough for now. Since we're using unsigned ints, * they'll just wrap around. */ - io->scsiio.tag_num = softc->cur_tag_num++; + io->scsiio.tag_num = atomic_fetchadd_32(&softc->cur_tag_num, 1); csio->tag_id = io->scsiio.tag_num; switch (csio->tag_action) { case CAM_TAG_ACTION_NONE: @@ -778,13 +756,13 @@ cfcs_action(struct cam_sim *sim, union ccb *ccb) cpi->target_sprt = 0; cpi->hba_misc = PIM_EXTLUNS; cpi->hba_eng_cnt = 0; - cpi->max_target = 1; + cpi->max_target = 0; cpi->max_lun = 1024; /* Do we really have a limit? */ cpi->maxio = 1024 * 1024; cpi->async_flags = 0; cpi->hpath_id = 0; - cpi->initiator_id = 0; + cpi->initiator_id = 1; strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); strlcpy(cpi->hba_vid, "FreeBSD", HBA_IDLEN); From owner-svn-src-stable-11@freebsd.org Sun Nov 17 18:26:08 2019 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 1CCE01C674C; Sun, 17 Nov 2019 18:26:08 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47GLBR5w10z4CSl; Sun, 17 Nov 2019 18:26:07 +0000 (UTC) (envelope-from lwhsu@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 764981DCBD; Sun, 17 Nov 2019 18:26:07 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAHIQ7w0090868; Sun, 17 Nov 2019 18:26:07 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAHIQ7Pg090867; Sun, 17 Nov 2019 18:26:07 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201911171826.xAHIQ7Pg090867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Sun, 17 Nov 2019 18:26:07 +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: r354794 - stable/11/lib/msun/src X-SVN-Group: stable-11 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: stable/11/lib/msun/src X-SVN-Commit-Revision: 354794 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.29 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, 17 Nov 2019 18:26:08 -0000 Author: lwhsu Date: Sun Nov 17 18:26:07 2019 New Revision: 354794 URL: https://svnweb.freebsd.org/changeset/base/354794 Log: MFC r354520: Get the fix in back by reverting the part accidentally included in r354491. This brings back r354467. Sponsored by: The FreeBSD Foundation Modified: stable/11/lib/msun/src/k_sincosl.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/msun/src/k_sincosl.h ============================================================================== --- stable/11/lib/msun/src/k_sincosl.h Sun Nov 17 18:25:42 2019 (r354793) +++ stable/11/lib/msun/src/k_sincosl.h Sun Nov 17 18:26:07 2019 (r354794) @@ -28,8 +28,8 @@ S1lo = -9.2563760475949941e-18; /* -0x15580000000000. #define C1 ((long double)C1hi + C1lo) #else static const long double -C1 = 0.0416666666666666666136L; /* 0xaaaaaaaaaaaaaa9b.0p-68 */ -S1 = -0.166666666666666666671L, /* -0xaaaaaaaaaaaaaaab.0p-66 */ +C1 = 0.0416666666666666666136L, /* 0xaaaaaaaaaaaaaa9b.0p-68 */ +S1 = -0.166666666666666666671L; /* -0xaaaaaaaaaaaaaaab.0p-66 */ #endif static const double From owner-svn-src-stable-11@freebsd.org Mon Nov 18 07:05:00 2019 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 2A4621B6FC5; Mon, 18 Nov 2019 07:05:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47Gg240Hvvz4GW1; Mon, 18 Nov 2019 07:05:00 +0000 (UTC) (envelope-from dim@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 E1B8D26588; Mon, 18 Nov 2019 07:04:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAI74xnC039994; Mon, 18 Nov 2019 07:04:59 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAI74xAM039993; Mon, 18 Nov 2019 07:04:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201911180704.xAI74xAM039993@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 18 Nov 2019 07:04:59 +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: r354803 - in stable: 11/contrib/llvm/lib/Transforms/InstCombine 12/contrib/llvm/lib/Transforms/InstCombine X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/llvm/lib/Transforms/InstCombine 12/contrib/llvm/lib/Transforms/InstCombine X-SVN-Commit-Revision: 354803 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.29 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, 18 Nov 2019 07:05:00 -0000 Author: dim Date: Mon Nov 18 07:04:59 2019 New Revision: 354803 URL: https://svnweb.freebsd.org/changeset/base/354803 Log: MFC r354724: Merge commit 5bbb604bb from llvm git (by Craig Topper): [InstCombine] Disable some portions of foldGEPICmp for GEPs that return a vector of pointers. Fix other portions. llvm-svn: 370114 This should fix instances of 'Assertion failed: (isa(Val) && "cast() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm/include/llvm/Support/Casting.h, line 255', when building openjdk8 for aarch64 and armv7. Reported by: jbeich PR: 236566 Modified: stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp Mon Nov 18 04:22:04 2019 (r354802) +++ stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp Mon Nov 18 07:04:59 2019 (r354803) @@ -830,6 +830,10 @@ getAsConstantIndexedAddress(Value *V, const DataLayout static Instruction *transformToIndexedCompare(GEPOperator *GEPLHS, Value *RHS, ICmpInst::Predicate Cond, const DataLayout &DL) { + // FIXME: Support vector of pointers. + if (GEPLHS->getType()->isVectorTy()) + return nullptr; + if (!GEPLHS->hasAllConstantIndices()) return nullptr; @@ -880,7 +884,9 @@ Instruction *InstCombiner::foldGEPICmp(GEPOperator *GE RHS = RHS->stripPointerCasts(); Value *PtrBase = GEPLHS->getOperand(0); - if (PtrBase == RHS && GEPLHS->isInBounds()) { + // FIXME: Support vector pointer GEPs. + if (PtrBase == RHS && GEPLHS->isInBounds() && + !GEPLHS->getType()->isVectorTy()) { // ((gep Ptr, OFFSET) cmp Ptr) ---> (OFFSET cmp 0). // This transformation (ignoring the base and scales) is valid because we // know pointers can't overflow since the gep is inbounds. See if we can @@ -914,11 +920,13 @@ Instruction *InstCombiner::foldGEPICmp(GEPOperator *GE // If we're comparing GEPs with two base pointers that only differ in type // and both GEPs have only constant indices or just one use, then fold // the compare with the adjusted indices. + // FIXME: Support vector of pointers. if (GEPLHS->isInBounds() && GEPRHS->isInBounds() && (GEPLHS->hasAllConstantIndices() || GEPLHS->hasOneUse()) && (GEPRHS->hasAllConstantIndices() || GEPRHS->hasOneUse()) && PtrBase->stripPointerCasts() == - GEPRHS->getOperand(0)->stripPointerCasts()) { + GEPRHS->getOperand(0)->stripPointerCasts() && + !GEPLHS->getType()->isVectorTy()) { Value *LOffset = EmitGEPOffset(GEPLHS); Value *ROffset = EmitGEPOffset(GEPRHS); @@ -962,15 +970,20 @@ Instruction *InstCombiner::foldGEPICmp(GEPOperator *GE unsigned DiffOperand = 0; // The operand that differs. for (unsigned i = 1, e = GEPRHS->getNumOperands(); i != e; ++i) if (GEPLHS->getOperand(i) != GEPRHS->getOperand(i)) { - if (GEPLHS->getOperand(i)->getType()->getPrimitiveSizeInBits() != - GEPRHS->getOperand(i)->getType()->getPrimitiveSizeInBits()) { + Type *LHSType = GEPLHS->getOperand(i)->getType(); + Type *RHSType = GEPRHS->getOperand(i)->getType(); + // FIXME: Better support for vector of pointers. + if (LHSType->getPrimitiveSizeInBits() != + RHSType->getPrimitiveSizeInBits() || + (GEPLHS->getType()->isVectorTy() && + (!LHSType->isVectorTy() || !RHSType->isVectorTy()))) { // Irreconcilable differences. NumDifferences = 2; break; - } else { - if (NumDifferences++) break; - DiffOperand = i; } + + if (NumDifferences++) break; + DiffOperand = i; } if (NumDifferences == 0) // SAME GEP? From owner-svn-src-stable-11@freebsd.org Thu Nov 21 07:39:38 2019 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 01CAD1B25FE; Thu, 21 Nov 2019 07:39:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47JWfd6w6Bz41bD; Thu, 21 Nov 2019 07:39:37 +0000 (UTC) (envelope-from delphij@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 D13607E86; Thu, 21 Nov 2019 07:39:37 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAL7dba2017445; Thu, 21 Nov 2019 07:39:37 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAL7dYcU017427; Thu, 21 Nov 2019 07:39:34 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201911210739.xAL7dYcU017427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 21 Nov 2019 07:39:34 +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: r354939 - in stable/11: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/src contrib/file/tests lib/libmagic X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in stable/11: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/src contrib/file/tests lib/libmagic X-SVN-Commit-Revision: 354939 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.29 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, 21 Nov 2019 07:39:38 -0000 Author: delphij Date: Thu Nov 21 07:39:33 2019 New Revision: 354939 URL: https://svnweb.freebsd.org/changeset/base/354939 Log: MFC r333923, r354595, r354802: MFV r354582: file 5.37 MFV r354798: Apply vendor fixes: 06de62c Detect multiplication overflow when computing sector position 46a8443 Limit the number of elements in a vector (found by oss-fuzz) Security: CVE-2019-18218 Added: stable/11/contrib/file/magic/Magdir/biosig - copied unchanged from r354595, head/contrib/file/magic/Magdir/biosig stable/11/contrib/file/magic/Magdir/clojure - copied unchanged from r354595, head/contrib/file/magic/Magdir/clojure stable/11/contrib/file/magic/Magdir/edid - copied unchanged from r354595, head/contrib/file/magic/Magdir/edid stable/11/contrib/file/magic/Magdir/espressif - copied unchanged from r354595, head/contrib/file/magic/Magdir/espressif stable/11/contrib/file/magic/Magdir/glibc - copied unchanged from r354595, head/contrib/file/magic/Magdir/glibc stable/11/contrib/file/magic/Magdir/hardware - copied unchanged from r354595, head/contrib/file/magic/Magdir/hardware stable/11/contrib/file/magic/Magdir/kicad - copied unchanged from r354595, head/contrib/file/magic/Magdir/kicad stable/11/contrib/file/magic/Magdir/numpy - copied unchanged from r354595, head/contrib/file/magic/Magdir/numpy stable/11/contrib/file/magic/Magdir/rpmsg - copied unchanged from r354595, head/contrib/file/magic/Magdir/rpmsg stable/11/contrib/file/src/is_json.c - copied unchanged from r354595, head/contrib/file/src/is_json.c stable/11/contrib/file/tests/CVE-2014-1943.result - copied unchanged from r354595, head/contrib/file/tests/CVE-2014-1943.result stable/11/contrib/file/tests/CVE-2014-1943.testfile - copied unchanged from r354595, head/contrib/file/tests/CVE-2014-1943.testfile stable/11/contrib/file/tests/fit-map-data.result - copied unchanged from r354595, head/contrib/file/tests/fit-map-data.result stable/11/contrib/file/tests/fit-map-data.testfile - copied unchanged from r354595, head/contrib/file/tests/fit-map-data.testfile stable/11/contrib/file/tests/issue359xlsx.result - copied unchanged from r354595, head/contrib/file/tests/issue359xlsx.result stable/11/contrib/file/tests/issue359xlsx.testfile - copied unchanged from r354595, head/contrib/file/tests/issue359xlsx.testfile stable/11/contrib/file/tests/json1.result - copied unchanged from r354595, head/contrib/file/tests/json1.result stable/11/contrib/file/tests/json1.testfile - copied unchanged from r354595, head/contrib/file/tests/json1.testfile stable/11/contrib/file/tests/json2.result - copied unchanged from r354595, head/contrib/file/tests/json2.result stable/11/contrib/file/tests/json2.testfile - copied unchanged from r354595, head/contrib/file/tests/json2.testfile stable/11/contrib/file/tests/json3.result - copied unchanged from r354595, head/contrib/file/tests/json3.result stable/11/contrib/file/tests/json3.testfile - copied unchanged from r354595, head/contrib/file/tests/json3.testfile stable/11/contrib/file/tests/regex-eol.magic - copied unchanged from r354595, head/contrib/file/tests/regex-eol.magic stable/11/contrib/file/tests/regex-eol.result - copied unchanged from r354595, head/contrib/file/tests/regex-eol.result stable/11/contrib/file/tests/regex-eol.testfile - copied unchanged from r354595, head/contrib/file/tests/regex-eol.testfile stable/11/contrib/file/tests/zstd-3-skippable-frames.result - copied unchanged from r354595, head/contrib/file/tests/zstd-3-skippable-frames.result stable/11/contrib/file/tests/zstd-dictionary-0.result - copied unchanged from r354595, head/contrib/file/tests/zstd-dictionary-0.result stable/11/contrib/file/tests/zstd-dictionary-1.result - copied unchanged from r354595, head/contrib/file/tests/zstd-dictionary-1.result stable/11/contrib/file/tests/zstd-dictionary-2.result - copied unchanged from r354595, head/contrib/file/tests/zstd-dictionary-2.result stable/11/contrib/file/tests/zstd-skippable-frame-0.result - copied unchanged from r354595, head/contrib/file/tests/zstd-skippable-frame-0.result stable/11/contrib/file/tests/zstd-skippable-frame-4.result - copied unchanged from r354595, head/contrib/file/tests/zstd-skippable-frame-4.result stable/11/contrib/file/tests/zstd-skippable-frame-8.result - copied unchanged from r354595, head/contrib/file/tests/zstd-skippable-frame-8.result stable/11/contrib/file/tests/zstd-skippable-frame-C.result - copied unchanged from r354595, head/contrib/file/tests/zstd-skippable-frame-C.result stable/11/contrib/file/tests/zstd-v0.2-FF.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.2-FF.result stable/11/contrib/file/tests/zstd-v0.2-FF.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.2-FF.testfile stable/11/contrib/file/tests/zstd-v0.3-FF.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.3-FF.result stable/11/contrib/file/tests/zstd-v0.3-FF.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.3-FF.testfile stable/11/contrib/file/tests/zstd-v0.4-FF.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.4-FF.result stable/11/contrib/file/tests/zstd-v0.4-FF.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.4-FF.testfile stable/11/contrib/file/tests/zstd-v0.5-FF.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.5-FF.result stable/11/contrib/file/tests/zstd-v0.5-FF.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.5-FF.testfile stable/11/contrib/file/tests/zstd-v0.6-FF.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.6-FF.result stable/11/contrib/file/tests/zstd-v0.6-FF.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.6-FF.testfile stable/11/contrib/file/tests/zstd-v0.7-00.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.7-00.result stable/11/contrib/file/tests/zstd-v0.7-21.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.7-21.result stable/11/contrib/file/tests/zstd-v0.7-21.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.7-21.testfile stable/11/contrib/file/tests/zstd-v0.7-22.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.7-22.result stable/11/contrib/file/tests/zstd-v0.7-22.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.7-22.testfile stable/11/contrib/file/tests/zstd-v0.8-00.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-00.result stable/11/contrib/file/tests/zstd-v0.8-01.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-01.result stable/11/contrib/file/tests/zstd-v0.8-01.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-01.testfile stable/11/contrib/file/tests/zstd-v0.8-02.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-02.result stable/11/contrib/file/tests/zstd-v0.8-02.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-02.testfile stable/11/contrib/file/tests/zstd-v0.8-03.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-03.result stable/11/contrib/file/tests/zstd-v0.8-03.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-03.testfile stable/11/contrib/file/tests/zstd-v0.8-16.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-16.result stable/11/contrib/file/tests/zstd-v0.8-16.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-16.testfile stable/11/contrib/file/tests/zstd-v0.8-20.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-20.result stable/11/contrib/file/tests/zstd-v0.8-20.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-20.testfile stable/11/contrib/file/tests/zstd-v0.8-21.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-21.result stable/11/contrib/file/tests/zstd-v0.8-21.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-21.testfile stable/11/contrib/file/tests/zstd-v0.8-22.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-22.result stable/11/contrib/file/tests/zstd-v0.8-22.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-22.testfile stable/11/contrib/file/tests/zstd-v0.8-23.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-23.result stable/11/contrib/file/tests/zstd-v0.8-23.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-23.testfile stable/11/contrib/file/tests/zstd-v0.8-F4.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-F4.result stable/11/contrib/file/tests/zstd-v0.8-F4.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-F4.testfile stable/11/contrib/file/tests/zstd-v0.8-FF.result - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-FF.result stable/11/contrib/file/tests/zstd-v0.8-FF.testfile - copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-FF.testfile Modified: stable/11/contrib/file/AUTHORS stable/11/contrib/file/COPYING stable/11/contrib/file/ChangeLog stable/11/contrib/file/NEWS stable/11/contrib/file/README stable/11/contrib/file/config.h.in stable/11/contrib/file/configure stable/11/contrib/file/configure.ac stable/11/contrib/file/doc/file.man stable/11/contrib/file/doc/libmagic.man stable/11/contrib/file/doc/magic.man stable/11/contrib/file/magic/Header stable/11/contrib/file/magic/Magdir/acorn stable/11/contrib/file/magic/Magdir/adventure stable/11/contrib/file/magic/Magdir/algol68 stable/11/contrib/file/magic/Magdir/amigaos stable/11/contrib/file/magic/Magdir/android stable/11/contrib/file/magic/Magdir/animation stable/11/contrib/file/magic/Magdir/apple stable/11/contrib/file/magic/Magdir/archive stable/11/contrib/file/magic/Magdir/audio stable/11/contrib/file/magic/Magdir/basis stable/11/contrib/file/magic/Magdir/ber stable/11/contrib/file/magic/Magdir/bioinformatics stable/11/contrib/file/magic/Magdir/blcr stable/11/contrib/file/magic/Magdir/blender stable/11/contrib/file/magic/Magdir/c-lang stable/11/contrib/file/magic/Magdir/cad stable/11/contrib/file/magic/Magdir/cafebabe stable/11/contrib/file/magic/Magdir/coff stable/11/contrib/file/magic/Magdir/commands stable/11/contrib/file/magic/Magdir/compress stable/11/contrib/file/magic/Magdir/console stable/11/contrib/file/magic/Magdir/coverage stable/11/contrib/file/magic/Magdir/ctf stable/11/contrib/file/magic/Magdir/cups stable/11/contrib/file/magic/Magdir/database stable/11/contrib/file/magic/Magdir/dataone stable/11/contrib/file/magic/Magdir/dbpf stable/11/contrib/file/magic/Magdir/dolby stable/11/contrib/file/magic/Magdir/dyadic stable/11/contrib/file/magic/Magdir/ebml stable/11/contrib/file/magic/Magdir/elf stable/11/contrib/file/magic/Magdir/erlang stable/11/contrib/file/magic/Magdir/esri stable/11/contrib/file/magic/Magdir/filesystems stable/11/contrib/file/magic/Magdir/finger stable/11/contrib/file/magic/Magdir/flash stable/11/contrib/file/magic/Magdir/fonts stable/11/contrib/file/magic/Magdir/fsav stable/11/contrib/file/magic/Magdir/games stable/11/contrib/file/magic/Magdir/geo stable/11/contrib/file/magic/Magdir/gnome stable/11/contrib/file/magic/Magdir/gnu stable/11/contrib/file/magic/Magdir/graphviz stable/11/contrib/file/magic/Magdir/guile stable/11/contrib/file/magic/Magdir/hitachi-sh stable/11/contrib/file/magic/Magdir/hp stable/11/contrib/file/magic/Magdir/ibm6000 stable/11/contrib/file/magic/Magdir/images stable/11/contrib/file/magic/Magdir/intel stable/11/contrib/file/magic/Magdir/isz stable/11/contrib/file/magic/Magdir/java stable/11/contrib/file/magic/Magdir/jpeg stable/11/contrib/file/magic/Magdir/keepass stable/11/contrib/file/magic/Magdir/kerberos stable/11/contrib/file/magic/Magdir/kml stable/11/contrib/file/magic/Magdir/linux stable/11/contrib/file/magic/Magdir/lisp stable/11/contrib/file/magic/Magdir/llvm stable/11/contrib/file/magic/Magdir/lua stable/11/contrib/file/magic/Magdir/m4 stable/11/contrib/file/magic/Magdir/macintosh stable/11/contrib/file/magic/Magdir/mail.news stable/11/contrib/file/magic/Magdir/map stable/11/contrib/file/magic/Magdir/marc21 stable/11/contrib/file/magic/Magdir/matroska stable/11/contrib/file/magic/Magdir/mercurial stable/11/contrib/file/magic/Magdir/metastore stable/11/contrib/file/magic/Magdir/microfocus stable/11/contrib/file/magic/Magdir/misctools stable/11/contrib/file/magic/Magdir/modem stable/11/contrib/file/magic/Magdir/mozilla stable/11/contrib/file/magic/Magdir/msdos stable/11/contrib/file/magic/Magdir/msooxml stable/11/contrib/file/magic/Magdir/msvc stable/11/contrib/file/magic/Magdir/neko stable/11/contrib/file/magic/Magdir/netbsd stable/11/contrib/file/magic/Magdir/nitpicker stable/11/contrib/file/magic/Magdir/ole2compounddocs stable/11/contrib/file/magic/Magdir/palm stable/11/contrib/file/magic/Magdir/parrot stable/11/contrib/file/magic/Magdir/pbf stable/11/contrib/file/magic/Magdir/pc98 stable/11/contrib/file/magic/Magdir/pgp stable/11/contrib/file/magic/Magdir/polyml stable/11/contrib/file/magic/Magdir/printer stable/11/contrib/file/magic/Magdir/psl stable/11/contrib/file/magic/Magdir/pwsafe stable/11/contrib/file/magic/Magdir/python stable/11/contrib/file/magic/Magdir/qt stable/11/contrib/file/magic/Magdir/revision stable/11/contrib/file/magic/Magdir/riff stable/11/contrib/file/magic/Magdir/ruby stable/11/contrib/file/magic/Magdir/scientific stable/11/contrib/file/magic/Magdir/selinux stable/11/contrib/file/magic/Magdir/sendmail stable/11/contrib/file/magic/Magdir/sequent stable/11/contrib/file/magic/Magdir/sgml stable/11/contrib/file/magic/Magdir/sniffer stable/11/contrib/file/magic/Magdir/sql stable/11/contrib/file/magic/Magdir/sun stable/11/contrib/file/magic/Magdir/sysex stable/11/contrib/file/magic/Magdir/tcl stable/11/contrib/file/magic/Magdir/terminfo stable/11/contrib/file/magic/Magdir/tex stable/11/contrib/file/magic/Magdir/tplink stable/11/contrib/file/magic/Magdir/unicode stable/11/contrib/file/magic/Magdir/varied.script stable/11/contrib/file/magic/Magdir/virtual stable/11/contrib/file/magic/Magdir/warc stable/11/contrib/file/magic/Magdir/webassembly stable/11/contrib/file/magic/Magdir/windows stable/11/contrib/file/magic/Magdir/wordprocessors stable/11/contrib/file/magic/Magdir/wsdl stable/11/contrib/file/magic/Magdir/xwindows stable/11/contrib/file/magic/Magdir/yara stable/11/contrib/file/magic/Magdir/zip stable/11/contrib/file/magic/Makefile.am stable/11/contrib/file/magic/Makefile.in stable/11/contrib/file/src/Makefile.am stable/11/contrib/file/src/Makefile.in stable/11/contrib/file/src/apprentice.c stable/11/contrib/file/src/apptype.c stable/11/contrib/file/src/ascmagic.c stable/11/contrib/file/src/asprintf.c stable/11/contrib/file/src/buffer.c stable/11/contrib/file/src/cdf.c stable/11/contrib/file/src/cdf.h stable/11/contrib/file/src/cdf_time.c stable/11/contrib/file/src/compress.c stable/11/contrib/file/src/der.c stable/11/contrib/file/src/dprintf.c stable/11/contrib/file/src/elfclass.h stable/11/contrib/file/src/encoding.c stable/11/contrib/file/src/file.c stable/11/contrib/file/src/file.h stable/11/contrib/file/src/fmtcheck.c stable/11/contrib/file/src/fsmagic.c stable/11/contrib/file/src/funcs.c stable/11/contrib/file/src/getopt_long.c stable/11/contrib/file/src/is_tar.c stable/11/contrib/file/src/magic.c stable/11/contrib/file/src/magic.h.in stable/11/contrib/file/src/mygetopt.h stable/11/contrib/file/src/print.c stable/11/contrib/file/src/readcdf.c stable/11/contrib/file/src/readelf.c stable/11/contrib/file/src/readelf.h stable/11/contrib/file/src/seccomp.c stable/11/contrib/file/src/softmagic.c stable/11/contrib/file/src/vasprintf.c stable/11/contrib/file/tests/Makefile.am stable/11/contrib/file/tests/Makefile.in stable/11/lib/libmagic/Makefile stable/11/lib/libmagic/config.h Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/file/AUTHORS ============================================================================== --- stable/11/contrib/file/AUTHORS Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/AUTHORS Thu Nov 21 07:39:33 2019 (r354939) @@ -1 +1 @@ -See COPYING. \ No newline at end of file +See COPYING. Modified: stable/11/contrib/file/COPYING ============================================================================== --- stable/11/contrib/file/COPYING Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/COPYING Thu Nov 21 07:39:33 2019 (r354939) @@ -1,4 +1,4 @@ -$File: COPYING,v 1.1 2008/02/05 19:08:11 christos Exp $ +$File: COPYING,v 1.2 2018/09/09 20:33:28 christos Exp $ Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. Software written by Ian F. Darwin and others; maintained 1994- Christos Zoulas. @@ -15,7 +15,7 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE Modified: stable/11/contrib/file/ChangeLog ============================================================================== --- stable/11/contrib/file/ChangeLog Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/ChangeLog Thu Nov 21 07:39:33 2019 (r354939) @@ -1,3 +1,75 @@ +2019-05-14 22:26 Christos Zoulas + + * release 5.37 + +2019-05-09 22:27 Christos Zoulas + + * Make sure that continuation separators are printed + with -k within softmagic + +2019-05-06 22:27 Christos Zoulas + + * Change SIGPIPE saving and restoring during compression to use + sigaction(2) instead of signal(3) and cache it. (Denys Vlasenko) + * Cache stat(2) calls more to reduce number of calls (Denys Vlasenko) + +2019-05-06 17:25 Christos Zoulas + + * PR/77: Handle --mime-type and -k correctly. + +2019-05-03 15:26 Christos Zoulas + + * Switch decompression code to use vfork() because + tools like rpmdiff and rpmbuild call libmagic + with large process footprints (Denys Vlasenko) + +2019-04-07 14:05 Christos Zoulas + + * PR/75: --enable-zlib, did not work. + +2019-02-27 11:54 Christos Zoulas + + * Improve regex efficiency (Michael Schroeder) by: + 1. Prefixing regex searches with regular search + for keywords where possible + 2. Using memmem(3) where available + +2019-02-20 10:16 Christos Zoulas + + * release 5.36 + +2019-02-19 15:30 Christos Zoulas + + * Fix cast to use cast macros + * Add UCS-32 builtin detection (PR/61) reported by tmc + +2019-02-18 18:24 Christos Zoulas + + * Fix stack read (PR/62) and write (PR/64) stack overflows + reported by spinpx + +2018-10-18 19:32 Christos Zoulas + + * release 5.35 + +2018-09-10 20:38 Christos Zoulas + + * Add FreeBSD ELF core file support (John Baldwin) + +2018-08-20 18:40 Christos Zoulas + + * PR/30: Allow all parameter values to be set (don't treat 0 specially) + * handle default annotations on the softmagic match instead at the + end. + +2018-07-25 10:17 Christos Zoulas + + * PR/23: Recognize JSON files + +2018-07-25 10:17 Christos Zoulas + + * PR/18: file --mime-encoding should not print mime-type + 2018-07-25 8:50 Christos Zoulas * release 5.34 @@ -14,11 +86,11 @@ * release 5.33 -2018-02-24 14:50 Christos Zoulas +2018-02-24 14:50 Christos Zoulas * extend the support for ${x?:} expansions for magic descriptions -2018-02-21 16:25 Christos Zoulas +2018-02-21 16:25 Christos Zoulas * add support for ${x?:} in mime types to handle pie binaries. @@ -90,7 +162,7 @@ * Add missing overflow check in der magic (Jonas Wagner) 2016-10-25 10:40 Christos Zoulas - + * release 5.29 2016-10-24 11:20 Christos Zoulas @@ -131,11 +203,11 @@ - set offset to 0 on failure. 2016-05-13 12:00 Christos Zoulas - + * release 5.27 2016-04-18 9:35 Christos Zoulas - + * Errors comparing DER entries or computing offsets are just indications of malformed non-DER files. Don't print them. @@ -144,7 +216,7 @@ * Put new bytes constant in the right file (not the generated one) 2016-04-16 18:34 Christos Zoulas - + * release 5.26 2016-03-31 13:50 Christos Zoulas @@ -190,7 +262,7 @@ * PR/492: compression forking was broken with magic_buffer. 2015-09-16 9:50 Christos Zoulas - + * release 5.25 2015-09-11 13:25 Christos Zoulas @@ -218,7 +290,7 @@ * release 5.23 2015-06-09 16:10 Christos Zoulas - + * Fix issue with regex range for magic with offset * Always return true from mget with USE (success to mget not match indication). Fixes mime evaluation after USE magic @@ -271,12 +343,12 @@ * add indirect relative for TIFF/Exif 2014-12-16 18:10 Christos Zoulas - + * restructure elf note printing to avoid repeated messages * add note limit, suggested by Alexander Cherepanov 2014-12-16 16:53 Christos Zoulas - + * Bail out on partial pread()'s (Alexander Cherepanov) * Fix incorrect bounds check in file_printable (Alexander Cherepanov) @@ -287,7 +359,7 @@ more places for safety * in ELF, instead of "(uses dynamic libraries)" when PT_INTERP is present print the interpreter name. - + 2014-12-10 20:01 Christos Zoulas * release 5.21 @@ -330,7 +402,7 @@ on a byte by byte basis, so that we don't get issues with locale's trying to interpret random byte streams as UTF-8 and having printf error out with EILSEQ. - + 2014-10-17 11:48 Christos Zoulas * fix bounds in note reading (Francisco Alonso / Red Hat) @@ -361,7 +433,7 @@ * release 5.19 2014-06-09 9:04 Christos Zoulas - + * Misc buffer overruns and missing buffer size tests in cdf parsing (Francisco Alonso, Jan Kaluza) @@ -391,7 +463,7 @@ 2014-05-04 14:55 Christos Zoulas - * PR/351: Fix compilation of empty files + * PR/351: Fix compilation of empty files 2014-04-30 17:39 Christos Zoulas @@ -495,7 +567,7 @@ * Don't treat magic as an error if offset was past EOF (Christoph Biedl) 2013-05-28 17:25 Christos Zoulas - + * Fix spacing issues in softmagic and elf (Jan Kaluza) 2013-05-02 18:00 Christos Zoulas @@ -551,7 +623,7 @@ * Make getline public so that file can link against it. Perhaps it is better to rename it, or hide it differently. Fixes builds on platforms that do not provide it. - + 2013-01-07 16:30 Christos Zoulas * Add SuS d{,1,2,4,8}, u{,1,2,4,8} and document @@ -901,7 +973,7 @@ (Cheng Renquan) 2009-05-08 13:40 Christos Zoulas - + * lint fixes and more from NetBSD 2009-05-06 10:25 Christos Zoulas @@ -921,7 +993,7 @@ 2009-03-27 18:43 Christos Zoulas - * don't print \012- separators in the same magic entry + * don't print \012- separators in the same magic entry if it consists of multiple magic printing lines. 2009-03-23 10:20 Christos Zoulas Modified: stable/11/contrib/file/NEWS ============================================================================== --- stable/11/contrib/file/NEWS Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/NEWS Thu Nov 21 07:39:33 2019 (r354939) @@ -1 +1 @@ -See ChangeLog. \ No newline at end of file +See ChangeLog. Modified: stable/11/contrib/file/README ============================================================================== --- stable/11/contrib/file/README Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/README Thu Nov 21 07:39:33 2019 (r354939) @@ -1,6 +1,6 @@ -## README for file(1) Command ## +## README for file(1) Command and the libmagic(3) library ## - @(#) $File: README,v 1.54 2018/05/30 03:06:56 christos Exp $ + @(#) $File: README,v 1.57 2019/02/06 00:20:56 christos Exp $ Mailing List: file@astron.com Mailing List archives: http://mailman.astron.com/pipermail/file/ @@ -63,53 +63,54 @@ magic numbers assigned to all sorts of data files that are in reasonable circulation. Send your magic numbers, in magic(5) format please, to the maintainer, Christos Zoulas. -COPYING - read this first. -README - read this second (you are currently reading this file). +COPYING - read this first. +README - read this second (you are currently reading this file). INSTALL - read on how to install -src/apprentice.c - parses /etc/magic to learn magic -src/apptype.c - used for OS/2 specific application type magic -src/ascmagic.c - third & last set of tests, based on hardwired assumptions. -src/asctime_r.c - replacement for OS's that don't have it. -src/asprintf.c - replacement for OS's that don't have it. -src/asctime_r.c - replacement for OS's that don't have it. -src/asprintf.c - replacement for OS's that don't have it. +src/apprentice.c - parses /etc/magic to learn magic +src/apptype.c - used for OS/2 specific application type magic +src/ascmagic.c - third & last set of tests, based on hardwired assumptions. +src/asctime_r.c - replacement for OS's that don't have it. +src/asprintf.c - replacement for OS's that don't have it. +src/asctime_r.c - replacement for OS's that don't have it. +src/asprintf.c - replacement for OS's that don't have it. src/buffer.c - buffer handling functions. -src/cdf.[ch] - parser for Microsoft Compound Document Files -src/cdf_time.c - time converter for CDF. -src/compress.c - handles decompressing files to look inside. -src/ctime_r.c - replacement for OS's that don't have it. +src/cdf.[ch] - parser for Microsoft Compound Document Files +src/cdf_time.c - time converter for CDF. +src/compress.c - handles decompressing files to look inside. +src/ctime_r.c - replacement for OS's that don't have it. src/der.[ch] - parser for Distinguished Encoding Rules src/dprintf.c - replacement for OS's that don't have it. src/elfclass.h - common code for elf 32/64. -src/encoding.c - handles unicode encodings -src/file.c - the main program -src/file.h - header file +src/encoding.c - handles unicode encodings +src/file.c - the main program +src/file.h - header file src/file_opts.h - list of options -src/fmtcheck.c - replacement for OS's that don't have it. -src/fsmagic.c - first set of tests the program runs, based on filesystem info -src/funcs.c - utilility functions -src/getline.c - replacement for OS's that don't have it. -src/getopt_long.c - replacement for OS's that don't have it. -src/gmtime_r.c - replacement for OS's that don't have it. -src/is_tar.c, tar.h - knows about Tape ARchive format (courtesy John Gilmore). -src/localtime_r.c - replacement for OS's that don't have it. +src/fmtcheck.c - replacement for OS's that don't have it. +src/fsmagic.c - first set of tests the program runs, based on filesystem info +src/funcs.c - utilility functions +src/getline.c - replacement for OS's that don't have it. +src/getopt_long.c - replacement for OS's that don't have it. +src/gmtime_r.c - replacement for OS's that don't have it. +src/is_json.c - knows about JavaScript Object Notation format (RFC 8259). +src/is_tar.c, tar.h - knows about Tape ARchive format (courtesy John Gilmore). +src/localtime_r.c - replacement for OS's that don't have it. src/magic.h.in - source file for magic.h -src/mygetopt.h - replacement for OS's that don't have it. -src/magic.c - the libmagic api -src/names.h - header file for ascmagic.c -src/pread.c - replacement for OS's that don't have it. -src/print.c - print results, errors, warnings. -src/readcdf.c - CDF wrapper. -src/readelf.[ch] - Stand-alone elf parsing code. -src/softmagic.c - 2nd set of tests, based on /etc/magic -src/mygetopt.h - replacement for OS's that don't have it. -src/strcasestr.c - replacement for OS's that don't have it. -src/strlcat.c - replacement for OS's that don't have it. -src/strlcpy.c - replacement for OS's that don't have it. -src/strndup.c - replacement for OS's that don't have it. +src/mygetopt.h - replacement for OS's that don't have it. +src/magic.c - the libmagic api +src/names.h - header file for ascmagic.c +src/pread.c - replacement for OS's that don't have it. +src/print.c - print results, errors, warnings. +src/readcdf.c - CDF wrapper. +src/readelf.[ch] - Stand-alone elf parsing code. +src/softmagic.c - 2nd set of tests, based on /etc/magic +src/mygetopt.h - replacement for OS's that don't have it. +src/strcasestr.c - replacement for OS's that don't have it. +src/strlcat.c - replacement for OS's that don't have it. +src/strlcpy.c - replacement for OS's that don't have it. +src/strndup.c - replacement for OS's that don't have it. src/tar.h - tar file definitions -src/vasprintf.c - for systems that don't have it. -doc/file.man - man page for the command +src/vasprintf.c - for systems that don't have it. +doc/file.man - man page for the command doc/magic.man - man page for the magic file, courtesy Guy Harris. Install as magic.4 on USG and magic.5 on V7 or Berkeley; cf Makefile. Modified: stable/11/contrib/file/config.h.in ============================================================================== --- stable/11/contrib/file/config.h.in Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/config.h.in Thu Nov 21 07:39:33 2019 (r354939) @@ -83,12 +83,6 @@ /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H - /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R @@ -98,6 +92,9 @@ /* Define to 1 if declares mbstate_t. */ #undef HAVE_MBSTATE_T +/* Define to 1 if you have the `memmem' function. */ +#undef HAVE_MEMMEM + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H @@ -116,18 +113,9 @@ /* Define to 1 if you have the `pread' function. */ #undef HAVE_PREAD -/* Define to 1 if you have the `setlocale' function. */ -#undef HAVE_SETLOCALE - -/* Define to 1 if you have the header file. */ -#undef HAVE_SIGNAL_H - /* Have sig_t type */ #undef HAVE_SIG_T -/* Define to 1 if you have the header file. */ -#undef HAVE_STDDEF_H - /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H @@ -137,9 +125,6 @@ /* Define to 1 if you have the `strcasestr' function. */ #undef HAVE_STRCASESTR -/* Define to 1 if you have the `strerror' function. */ -#undef HAVE_STRERROR - /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H @@ -158,9 +143,6 @@ /* Define to 1 if you have the `strtof' function. */ #undef HAVE_STRTOF -/* Define to 1 if you have the `strtoul' function. */ -#undef HAVE_STRTOUL - /* HAVE_STRUCT_OPTION */ #undef HAVE_STRUCT_OPTION @@ -181,6 +163,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSMACROS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H Modified: stable/11/contrib/file/configure ============================================================================== --- stable/11/contrib/file/configure Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/configure Thu Nov 21 07:39:33 2019 (r354939) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for file 5.34. +# Generated by GNU Autoconf 2.69 for file 5.37. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='file' PACKAGE_TARNAME='file' -PACKAGE_VERSION='5.34' -PACKAGE_STRING='file 5.34' +PACKAGE_VERSION='5.37' +PACKAGE_STRING='file 5.37' PACKAGE_BUGREPORT='christos@astron.com' PACKAGE_URL='' @@ -1329,7 +1329,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures file 5.34 to adapt to many kinds of systems. +\`configure' configures file 5.37 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1399,7 +1399,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of file 5.34:";; + short | recursive ) echo "Configuration of file 5.37:";; esac cat <<\_ACEOF @@ -1511,7 +1511,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -file configure 5.34 +file configure 5.37 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2167,7 +2167,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by file $as_me 5.34, which was +It was created by file $as_me 5.37, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3033,7 +3033,7 @@ fi # Define the identity of the package. PACKAGE='file' - VERSION='5.34' + VERSION='5.37' cat >>confdefs.h <<_ACEOF @@ -12784,7 +12784,7 @@ $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi -for ac_header in stdint.h fcntl.h locale.h stdint.h inttypes.h unistd.h +for ac_header in stdint.h fcntl.h inttypes.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -12797,7 +12797,7 @@ fi done -for ac_header in stddef.h utime.h wchar.h wctype.h limits.h +for ac_header in utime.h wchar.h wctype.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -12810,7 +12810,7 @@ fi done -for ac_header in getopt.h err.h xlocale.h signal.h +for ac_header in getopt.h err.h xlocale.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -12823,7 +12823,7 @@ fi done -for ac_header in sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h +for ac_header in sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h sys/sysmacros.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -12850,10 +12850,7 @@ fi done fi -ac_fn_c_check_type "$LINENO" "sig_t" "ac_cv_type_sig_t" " -#ifdef HAVE_SIGNAL_H -#include -#endif +ac_fn_c_check_type "$LINENO" "sig_t" "ac_cv_type_sig_t" "#include " if test "x$ac_cv_type_sig_t" = xyes; then : @@ -12976,7 +12973,8 @@ _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "$ac_includes_default" +ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include +" if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : cat >>confdefs.h <<_ACEOF @@ -14229,7 +14227,7 @@ fi fi -for ac_func in strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale setlocale +for ac_func in strndup mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale memmem do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -14583,7 +14581,8 @@ if test "$enable_zlib" = "yes"; then if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" != "yesyes"; then as_fn_error $? "zlib support requested but not found" "$LINENO" 5 fi -elif test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then +fi +if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then $as_echo "#define ZLIBSUPPORT 1" >>confdefs.h @@ -15134,7 +15133,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by file $as_me 5.34, which was +This file was extended by file $as_me 5.37, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15200,7 +15199,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -file config.status 5.34 +file config.status 5.37 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: stable/11/contrib/file/configure.ac ============================================================================== --- stable/11/contrib/file/configure.ac Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/configure.ac Thu Nov 21 07:39:33 2019 (r354939) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([file],[5.34],[christos@astron.com]) +AC_INIT([file],[5.37],[christos@astron.com]) AM_INIT_AUTOMAKE([subdir-objects foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -35,12 +35,12 @@ fi], [ ]) AC_MSG_CHECKING(for zlib support) -AC_ARG_ENABLE(zlib, +AC_ARG_ENABLE([zlib], [AS_HELP_STRING([--disable-zlib], [disable zlib compression support @<:@default=auto@:>@])]) AC_MSG_RESULT($enable_zlib) AC_MSG_CHECKING(for libseccomp support) -AC_ARG_ENABLE(libseccomp, +AC_ARG_ENABLE([libseccomp], [AS_HELP_STRING([--disable-libseccomp], [disable libseccomp sandboxing @<:@default=auto@:>@])]) AC_MSG_RESULT($enable_libseccomp) @@ -90,17 +90,14 @@ dnl Checks for headers AC_HEADER_STDC AC_HEADER_MAJOR AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(stdint.h fcntl.h locale.h stdint.h inttypes.h unistd.h) -AC_CHECK_HEADERS(stddef.h utime.h wchar.h wctype.h limits.h) -AC_CHECK_HEADERS(getopt.h err.h xlocale.h signal.h) -AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h) +AC_CHECK_HEADERS(stdint.h fcntl.h inttypes.h unistd.h) +AC_CHECK_HEADERS(utime.h wchar.h wctype.h) +AC_CHECK_HEADERS(getopt.h err.h xlocale.h) +AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h sys/sysmacros.h) if test "$enable_zlib" != "no"; then AC_CHECK_HEADERS(zlib.h) fi -AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[ -#ifdef HAVE_SIGNAL_H -#include -#endif]) +AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[#include ]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -108,7 +105,7 @@ AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_CHECK_MEMBERS([struct stat.st_rdev]) -AC_CHECK_MEMBERS([struct tm.tm_gmtoff]) +AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include ]) AC_STRUCT_TIMEZONE AC_STRUCT_TIMEZONE_DAYLIGHT AC_SYS_LARGEFILE @@ -154,7 +151,7 @@ else fi]) dnl Checks for functions -AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale setlocale) +AC_CHECK_FUNCS(strndup mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale memmem) dnl Provide implementation of some required functions if necessary AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r localtime_r gmtime_r pread strcasestr fmtcheck dprintf) @@ -178,7 +175,8 @@ if test "$enable_zlib" = "yes"; then if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" != "yesyes"; then AC_MSG_ERROR([zlib support requested but not found]) fi -elif test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then +fi +if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then AC_DEFINE([ZLIBSUPPORT], 1, [Enable zlib compression support]) fi Modified: stable/11/contrib/file/doc/file.man ============================================================================== --- stable/11/contrib/file/doc/file.man Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/doc/file.man Thu Nov 21 07:39:33 2019 (r354939) @@ -1,5 +1,5 @@ -.\" $File: file.man,v 1.131 2018/07/24 21:33:56 christos Exp $ -.Dd July 25, 2018 +.\" $File: file.man,v 1.135 2019/03/03 02:32:40 christos Exp $ +.Dd February 18, 2019 .Dt FILE __CSECTION__ .Os .Sh NAME @@ -159,7 +159,7 @@ two groups, so they are performed last. The language test routines also test for some miscellany (such as .Xr tar 1 -archives). +archives, JSON files). .Pp Any file that cannot be identified as having been written in any of the character sets listed above is simply said to be @@ -171,6 +171,8 @@ Causes the file command to output the file type and cr used by older MacOS versions. The code consists of eight letters, the first describing the file type, the latter the creator. +This option works properly only for file formats that have the +apple-style output defined. .It Fl b , Fl Fl brief Do not prepend filenames to output lines (brief mode). .It Fl C , Fl Fl compile @@ -213,6 +215,8 @@ Checks for, and looks inside, compressed files. .It elf Prints ELF file details, provided soft magic tests are enabled and the elf magic is found. +.It json +Examines JSON (RFC-7159) files by parsing them for compliance. .It soft Consults magic files. .It tar @@ -629,11 +633,11 @@ were written by John Gilmore from his public-domain program, and are not covered by the above license. .Sh BUGS Please report bugs and send patches to the bug tracker at -.Pa http://bugs.astron.com/ +.Pa https://bugs.astron.com/ or the mailing list at .Aq file@astron.com (visit -.Pa http://mailman.astron.com/mailman/listinfo/file +.Pa https://mailman.astron.com/mailman/listinfo/file first to subscribe). .Sh TODO Fix output so that tests for MIME and APPLE flags are not needed all Modified: stable/11/contrib/file/doc/libmagic.man ============================================================================== --- stable/11/contrib/file/doc/libmagic.man Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/doc/libmagic.man Thu Nov 21 07:39:33 2019 (r354939) @@ -1,6 +1,6 @@ -.\" $File: libmagic.man,v 1.41 2017/05/23 21:54:07 christos Exp $ +.\" $File: libmagic.man,v 1.44 2018/09/09 20:33:28 christos Exp $ .\" -.\" Copyright (c) Christos Zoulas 2003. +.\" Copyright (c) Christos Zoulas 2003, 2018. .\" All Rights Reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 23, 2017 +.Dd August 18, 2018 .Dt LIBMAGIC 3 .Os .Sh NAME @@ -159,6 +159,8 @@ Don't examine tar files. Don't check for various types of text files. .It Dv MAGIC_NO_CHECK_TOKENS Don't look for known tokens inside ascii files. +.It Dv MAGIC_NO_CHECK_JSON +Don't example JSON files. .El .Pp The @@ -391,6 +393,19 @@ The compiled default magic database. .Sh SEE ALSO .Xr file __CSECTION__ , .Xr magic __FSECTION__ +.Sh BUGS +The results from +.Fn magic_buffer +and +.Fn magic_file +where the buffer and the file contain the same data +can produce different results, because in the +.Fn magic_file +case, the program can +.Xr lseek 2 +and +.Xr stat 2 +the file descriptor. .Sh AUTHORS .An M\(oans Rullg\(oard Initial libmagic implementation, and configuration. Modified: stable/11/contrib/file/doc/magic.man ============================================================================== --- stable/11/contrib/file/doc/magic.man Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/doc/magic.man Thu Nov 21 07:39:33 2019 (r354939) @@ -1,6 +1,5 @@ -.It S2 -.\" $File: magic.man,v 1.93 2018/06/22 20:39:49 christos Exp $ -.Dd June 22, 2018 +.\" $File: magic.man,v 1.96 2019/01/21 14:56:53 christos Exp $ +.Dd January 21, 2019 .Dt MAGIC __FSECTION__ .Os .\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems. @@ -117,13 +116,13 @@ The following modifiers are supported: .It B A byte length (default). .It H -A 4 byte big endian length. -.It h A 2 byte big endian length. +.It h +A 2 byte little endian length. .It L -A 4 byte little endian length. +A 4 byte big endian length. .It l -A 2 byte little endian length. +A 4 byte little endian length. .It J The length includes itself in its count. .El Modified: stable/11/contrib/file/magic/Header ============================================================================== --- stable/11/contrib/file/magic/Header Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/magic/Header Thu Nov 21 07:39:33 2019 (r354939) @@ -2,4 +2,4 @@ # Format is described in magic(files), where: # files is 5 on V7 and BSD, 4 on SV, and ?? on SVID. # Don't edit this file, edit /etc/magic or send your magic improvements -# to the maintainers, at file@mx.gw.com +# to the maintainers, at file@astron.com Modified: stable/11/contrib/file/magic/Magdir/acorn ============================================================================== --- stable/11/contrib/file/magic/Magdir/acorn Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/magic/Magdir/acorn Thu Nov 21 07:39:33 2019 (r354939) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: acorn,v 1.6 2017/10/19 16:40:37 christos Exp $ +# $File: acorn,v 1.7 2019/04/19 00:42:27 christos Exp $ # acorn: file(1) magic for files found on Acorn systems # @@ -83,7 +83,7 @@ # compression mode y (0 - 4) for GIF LZW with a maximum n bits # (y~n,0~12,1~13,2~14,3~15,4~16) >>>5 ulelong+12 x \b, LZW %u-bits compression -# http://www.filebase.org.uk/filetypes +# https://www.filebase.org.uk/filetypes # !Packdir compressed archive has three hexadecimal digits code 68E !:mime application/x-acorn-68E !:ext pkd/bin Modified: stable/11/contrib/file/magic/Magdir/adventure ============================================================================== --- stable/11/contrib/file/magic/Magdir/adventure Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/magic/Magdir/adventure Thu Nov 21 07:39:33 2019 (r354939) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: adventure,v 1.17 2017/07/03 16:03:40 christos Exp $ +# $File: adventure,v 1.18 2019/04/19 00:42:27 christos Exp $ # adventure: file(1) magic for Adventure game files # # from Allen Garvin @@ -21,8 +21,8 @@ # Updated by Adam Buchbinder # #http://www.gnelson.demon.co.uk/zspec/sect11.html -#http://www.jczorkmid.net/~jpenney/ZSpec11-latest.txt -#http://en.wikipedia.org/wiki/Z-machine +#https://www.jczorkmid.net/~jpenney/ZSpec11-latest.txt +#https://en.wikipedia.org/wiki/Z-machine # The first byte is the Z-machine revision; it is always between 1 and 8. We # had false matches (for instance, inbig5.ocp from the Omega TeX extension as # well as an occasional MP3 file), so we sanity-check the version number. @@ -111,7 +111,7 @@ # Danny Milosavljevic # These are ADRIFT (adventure game standard) game files, extension .taf # Checked from source at (http://www.adrift.co/) and various taf files -# found at the Interactive Fiction Archive (http://ifarchive.org/) +# found at the Interactive Fiction Archive (https://ifarchive.org/) 0 belong 0x3C423FC9 >4 belong 0x6A87C2CF Adrift game file version >>8 belong 0x94453661 3.80 Modified: stable/11/contrib/file/magic/Magdir/algol68 ============================================================================== --- stable/11/contrib/file/magic/Magdir/algol68 Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/magic/Magdir/algol68 Thu Nov 21 07:39:33 2019 (r354939) @@ -1,17 +1,17 @@ #------------------------------------------------------------------------------ -# $File: algol68,v 1.2 2016/10/17 14:17:48 christos Exp $ +# $File: algol68,v 1.3 2018/10/19 01:04:21 christos Exp $ # algol68: file(1) magic for Algol 68 source # 0 search/8192 (input, Algol 68 source text !:mime text/x-Algol68 -0 regex \^PROC Algol 68 source text +0 regex/1024 \^PROC Algol 68 source text !:mime text/x-Algol68 -0 regex MODE[\t\ ] Algol 68 source text +0 regex/1024 \bMODE[\t\ ] Algol 68 source text !:mime text/x-Algol68 -0 regex REF[\t\ ] Algol 68 source text +0 regex/1024 \bREF[\t\ ] Algol 68 source text !:mime text/x-Algol68 -0 regex FLEX[\t\ ]\*\\[ Algol 68 source text +0 regex/1024 \bFLEX[\t\ ]\*\\[ Algol 68 source text !:mime text/x-Algol68 #0 regex [\t\ ]OD Algol 68 source text #!:mime text/x-Algol68 Modified: stable/11/contrib/file/magic/Magdir/amigaos ============================================================================== --- stable/11/contrib/file/magic/Magdir/amigaos Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/magic/Magdir/amigaos Thu Nov 21 07:39:33 2019 (r354939) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: amigaos,v 1.16 2017/03/17 21:35:28 christos Exp $ +# $File: amigaos,v 1.17 2018/10/16 18:57:19 christos Exp $ # amigaos: file(1) magic for AmigaOS binary formats: # @@ -66,3 +66,22 @@ # From: Przemek Kramarczyk 0 string .KEY AmigaDOS script 0 string .key AmigaDOS script + +# AMOS Basic file formats +# https://www.exotica.org.uk/wiki/AMOS_file_formats +0 string AMOS\040Basic\040 AMOS Basic source code +>11 byte =0x56 \b, tested +>11 byte =0x76 \b, untested +0 string AMOS\040Pro AMOS Basic source code +>11 byte =0x56 \b, tested +>11 byte =0x76 \b, untested +0 string AmSp AMOS Basic sprite bank +>4 beshort x \b, %d sprites +0 string AmIc AMOS Basic icon bank +>4 beshort x \b, %d icons +0 string AmBk AMOS Basic memory bank +>4 beshort x \b, bank number %d +>8 belong&0xFFFFFFF x \b, length %d +>12 regex .{8} \b, type %s +0 string AmBs AMOS Basic memory banks +>4 beshort x \b, %d banks Modified: stable/11/contrib/file/magic/Magdir/android ============================================================================== --- stable/11/contrib/file/magic/Magdir/android Thu Nov 21 07:29:25 2019 (r354938) +++ stable/11/contrib/file/magic/Magdir/android Thu Nov 21 07:39:33 2019 (r354939) @@ -1,6 +1,6 @@ #------------------------------------------------------------ -# $File: android,v 1.10 2017/03/17 21:35:28 christos Exp $ +# $File: android,v 1.12 2019/04/19 00:42:27 christos Exp $ # Various android related magic entries #------------------------------------------------------------ @@ -32,33 +32,68 @@ # Android Backup archive # From: Ariel Shkedi -# File extension: .ab -# No mime-type defined +# Update: Joerg Jenderek # URL: https://github.com/android/platform_frameworks_base/blob/\ # 0bacfd2ba68d21a68a3df345b830bc2a1e515b5a/services/java/com/\ # android/server/BackupManagerService.java#L2367 +# Reference: https://sourceforge.net/projects/adbextractor/ +# android-backup-extractor/perl/backupencrypt.pl +# Note: only unix line feeds "\n" found # After the header comes a tar file # If compressed, the entire tar file is compressed with JAVA deflate # # Include the version number hardcoded with the magic string to avoid # false positives -0 string/b ANDROID\ BACKUP\n1\n Android Backup +0 string/b ANDROID\ BACKUP\n Android Backup +# maybe look for some more characteristics like linefeed '\n' or version +#>16 string \n +# No mime-type defined offically +!:mime application/x-google-ab +!:ext ab +# on 2nd line version (often 1, 2 on kitkat 4.4.3+, 4 on 7.1.2) +>15 string >\0 \b, version %s +# "1" on 3rd line means compressed >17 string 0\n \b, Not-Compressed >17 string 1\n \b, Compressed +# The 4th line is encryption "none" or "AES-256" # any string as long as it's not the word none (which is matched below) +>19 string none\n \b, Not-Encrypted +# look for backup content after line with encryption info +#>>19 search/7 \n +# data part after header for not encrypted Android Backup +#>>>&0 ubequad x \b, content 0x%16.16llx... +# look for zlib compressed by ./compress after message with 1 space at end +#>>>&0 indirect x \b; contains +# look for tar archive block by ./archive for package name manifest +>>288 string ustar \b; contains +>>>31 use tar-file +# look for zip/jar archive by ./archive ./zip after message with 1 space at end +#>>2079 search/1025/s PK\003\004 \b; contains +#>>>&0 indirect x +>19 string !none >>19 regex/1l \^([^n\n]|n[^o]|no[^n]|non[^e]|none.+).* \b, Encrypted (%s) ->>19 string none\n \b, Not-Encrypted # Commented out because they don't seem useful to print # (but they are part of the header - the tar file comes after them): +# The 5th line is User Password Salt (128 Hex) +# string length too high with standard src configuration +#>>>&1 string >\0 \b, PASSWORD salt: "%-128.128s" #>>>&1 regex/1l .* \b, Password salt: %s +# The 6th line is Master Key Checksum Salt (128 Hex) #>>>>&1 regex/1l .* \b, Master salt: %s +# The 7th line is Number of PBDKF2 Rounds (10000) #>>>>>&1 regex/1l .* \b, PBKDF2 rounds: %s +# The 8th line is User key Initialization Vector (IV) (32 Hex) #>>>>>>&1 regex/1l .* \b, IV: %s +#>>>>>>&1 regex/1l .* \b, IV: %s +# The 9th line is Master IV+Key+Checksum (192 Hex) #>>>>>>>&1 regex/1l .* \b, Key: %s +# look for new line separator char after line number 9 +#>>>0x204 ubyte 0x0a NL found +#>>>>&1 ubequad x \b, Content magic %16.16llx # *.pit files by Joerg Jenderek -# http://forum.xda-developers.com/showthread.php?p=9122369 -# http://forum.xda-developers.com/showthread.php?t=816449 +# https://forum.xda-developers.com/showthread.php?p=9122369 +# https://forum.xda-developers.com/showthread.php?t=816449 # Partition Information Table for Samsung's smartphone with Android *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-11@freebsd.org Thu Nov 21 12:29:01 2019 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 D8DD51BD09D; Thu, 21 Nov 2019 12:29:01 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47Jf4Y5V44z4KRw; Thu, 21 Nov 2019 12:29:01 +0000 (UTC) (envelope-from lwhsu@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 A024FB27B; Thu, 21 Nov 2019 12:29:01 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xALCT1YF088662; Thu, 21 Nov 2019 12:29:01 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xALCT1RZ088661; Thu, 21 Nov 2019 12:29:01 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201911211229.xALCT1RZ088661@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Thu, 21 Nov 2019 12:29:01 +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: r354944 - stable/11/sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: stable/11/sys/conf X-SVN-Commit-Revision: 354944 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.29 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, 21 Nov 2019 12:29:01 -0000 Author: lwhsu Date: Thu Nov 21 12:29:01 2019 New Revision: 354944 URL: https://svnweb.freebsd.org/changeset/base/354944 Log: MFC r354800: Also clean LINT64 kernel configuration for powerpc Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/makeLINT.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/makeLINT.mk ============================================================================== --- stable/11/sys/conf/makeLINT.mk Thu Nov 21 12:28:41 2019 (r354943) +++ stable/11/sys/conf/makeLINT.mk Thu Nov 21 12:29:01 2019 (r354944) @@ -11,6 +11,9 @@ clean: .if ${TARGET} == "amd64" || ${TARGET} == "i386" rm -f LINT-VIMAGE LINT-NOINET LINT-NOINET6 LINT-NOIP .endif +.if ${TARGET} == "powerpc" + rm -f LINT64 +.endif NOTES= ${.CURDIR}/../../conf/NOTES ${.CURDIR}/NOTES MAKELINT_SED= ${.CURDIR}/../../conf/makeLINT.sed From owner-svn-src-stable-11@freebsd.org Thu Nov 21 14:55:28 2019 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 5B4971C172B; Thu, 21 Nov 2019 14:55:28 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47JjKX1pchz4W5K; Thu, 21 Nov 2019 14:55:28 +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 2281BCF29; Thu, 21 Nov 2019 14:55:28 +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 xALEtSCU077349; Thu, 21 Nov 2019 14:55:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xALEtRRN077346; Thu, 21 Nov 2019 14:55:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201911211455.xALEtRRN077346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 21 Nov 2019 14:55:27 +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: r354965 - stable/11/sys/dev/aacraid X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/dev/aacraid X-SVN-Commit-Revision: 354965 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.29 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, 21 Nov 2019 14:55:28 -0000 Author: emaste Date: Thu Nov 21 14:55:27 2019 New Revision: 354965 URL: https://svnweb.freebsd.org/changeset/base/354965 Log: MFC r348091 by sobomax: update aacraid driver to 3.2.10 PR: 209468 Modified: stable/11/sys/dev/aacraid/aacraid.c stable/11/sys/dev/aacraid/aacraid_cam.c stable/11/sys/dev/aacraid/aacraid_reg.h stable/11/sys/dev/aacraid/aacraid_var.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/aacraid/aacraid.c ============================================================================== --- stable/11/sys/dev/aacraid/aacraid.c Thu Nov 21 14:54:20 2019 (r354964) +++ stable/11/sys/dev/aacraid/aacraid.c Thu Nov 21 14:55:27 2019 (r354965) @@ -264,7 +264,7 @@ aacraid_attach(struct aac_softc *sc) /* * Check that the firmware on the card is supported. */ - sc->msi_enabled = FALSE; + sc->msi_enabled = sc->msi_tupelo = FALSE; if ((error = aac_check_firmware(sc)) != 0) return(error); @@ -284,8 +284,8 @@ aacraid_attach(struct aac_softc *sc) */ if ((error = aac_alloc(sc)) != 0) return(error); + aac_define_int_mode(sc); if (!(sc->flags & AAC_FLAGS_SYNC_MODE)) { - aac_define_int_mode(sc); if ((error = aac_init(sc)) != 0) return(error); } @@ -728,7 +728,7 @@ aacraid_free(struct aac_softc *sc) else break; } - if (sc->msi_enabled) + if (sc->msi_enabled || sc->msi_tupelo) pci_release_msi(sc->aac_dev); /* destroy data-transfer DMA tag */ @@ -1316,6 +1316,9 @@ aacraid_map_command_sg(void *arg, bus_dma_segment_t *s fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "nseg %d", nseg); mtx_assert(&sc->aac_io_lock, MA_OWNED); + if ((sc->flags & AAC_FLAGS_SYNC_MODE) && sc->aac_sync_cm) + return; + /* copy into the FIB */ if (cm->cm_sgtable != NULL) { if (fib->Header.Command == RawIo2) { @@ -1433,11 +1436,14 @@ aacraid_map_command_sg(void *arg, bus_dma_segment_t *s cm->cm_flags |= AAC_CMD_MAPPED; - if (sc->flags & AAC_FLAGS_SYNC_MODE) { + if (cm->cm_flags & AAC_CMD_WAIT) { + aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, + cm->cm_fibphys, 0, 0, 0, NULL, NULL); + } else if (sc->flags & AAC_FLAGS_SYNC_MODE) { u_int32_t wait = 0; - aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, cm->cm_fibphys, 0, 0, 0, &wait, NULL); - } else if (cm->cm_flags & AAC_CMD_WAIT) { - aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, cm->cm_fibphys, 0, 0, 0, NULL, NULL); + sc->aac_sync_cm = cm; + aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, + cm->cm_fibphys, 0, 0, 0, &wait, NULL); } else { int count = 10000000L; while (AAC_SEND_COMMAND(sc, cm) != 0) { @@ -1617,6 +1623,7 @@ aac_check_firmware(struct aac_softc *sc) options = AAC_GET_MAILBOX(sc, 1); atu_size = AAC_GET_MAILBOX(sc, 2); sc->supported_options = options; + sc->doorbell_mask = AAC_GET_MAILBOX(sc, 3); if ((options & AAC_SUPPORTED_4GB_WINDOW) != 0 && (sc->flags & AAC_FLAGS_NO4GB) == 0) @@ -1631,13 +1638,13 @@ aac_check_firmware(struct aac_softc *sc) sc->flags |= AAC_FLAGS_SG_64BIT; } if (sc->aac_if.aif_send_command) { - if ((options & AAC_SUPPORTED_NEW_COMM_TYPE3) || - (options & AAC_SUPPORTED_NEW_COMM_TYPE4)) - sc->flags |= AAC_FLAGS_NEW_COMM | AAC_FLAGS_NEW_COMM_TYPE34; + if (options & AAC_SUPPORTED_NEW_COMM_TYPE2) + sc->flags |= AAC_FLAGS_NEW_COMM | AAC_FLAGS_NEW_COMM_TYPE2; else if (options & AAC_SUPPORTED_NEW_COMM_TYPE1) sc->flags |= AAC_FLAGS_NEW_COMM | AAC_FLAGS_NEW_COMM_TYPE1; - else if (options & AAC_SUPPORTED_NEW_COMM_TYPE2) - sc->flags |= AAC_FLAGS_NEW_COMM | AAC_FLAGS_NEW_COMM_TYPE2; + else if ((options & AAC_SUPPORTED_NEW_COMM_TYPE3) || + (options & AAC_SUPPORTED_NEW_COMM_TYPE4)) + sc->flags |= AAC_FLAGS_NEW_COMM | AAC_FLAGS_NEW_COMM_TYPE34; } if (options & AAC_SUPPORTED_64BIT_ARRAYSIZE) sc->flags |= AAC_FLAGS_ARRAY_64BIT; @@ -1851,8 +1858,30 @@ aac_define_int_mode(struct aac_softc *sc) dev = sc->aac_dev; + if (sc->flags & AAC_FLAGS_SYNC_MODE) { + device_printf(dev, "using line interrupts\n"); + sc->aac_max_msix = 1; + sc->aac_vector_cap = sc->aac_max_fibs; + return; + } + /* max. vectors from AAC_MONKER_GETCOMMPREF */ if (sc->aac_max_msix == 0) { + if (sc->aac_hwif == AAC_HWIF_SRC) { + msi_count = 1; + if ((error = pci_alloc_msi(dev, &msi_count)) != 0) { + device_printf(dev, "alloc msi failed - err=%d; " + "will use INTx\n", error); + pci_release_msi(dev); + } else { + sc->msi_tupelo = TRUE; + } + } + if (sc->msi_tupelo) + device_printf(dev, "using MSI interrupts\n"); + else + device_printf(dev, "using line interrupts\n"); + sc->aac_max_msix = 1; sc->aac_vector_cap = sc->aac_max_fibs; return; @@ -1958,7 +1987,7 @@ aac_setup_intr(struct aac_softc *sc) void *tag; msi_count = sc->aac_max_msix; - rid = (sc->msi_enabled ? 1:0); + rid = ((sc->msi_enabled || sc->msi_tupelo)? 1:0); for (i = 0; i < msi_count; i++, rid++) { if ((res = bus_alloc_resource_any(sc->aac_dev,SYS_RES_IRQ, &rid, @@ -2854,14 +2883,14 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t a fib = cm->cm_fib; srbcmd = (struct aac_srb *)fib->data; - if ((error = copyin((void *)&user_srb->data_len, &fibsize, - sizeof (u_int32_t)) != 0)) + if ((error = copyin((void *)&user_srb->data_len, &fibsize, + sizeof (u_int32_t))) != 0) goto out; if (fibsize > (sc->aac_max_fib_size-sizeof(struct aac_fib_header))) { error = EINVAL; goto out; } - if ((error = copyin((void *)user_srb, srbcmd, fibsize) != 0)) + if ((error = copyin((void *)user_srb, srbcmd, fibsize)) != 0) goto out; srbcmd->function = 0; /* SRBF_ExecuteScsi */ @@ -2895,13 +2924,10 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t a srb_sg_bytecount = sg.SgByteCount; srb_sg_address = sg.SgAddress; - if (srb_sg_address > 0xffffffffull && - !(sc->flags & AAC_FLAGS_SG_64BIT)) -#endif - { - error = EINVAL; - goto out; - } +#else + error = EINVAL; + goto out; +#endif } else { error = EINVAL; goto out; @@ -3701,7 +3727,7 @@ aac_get_bus_info(struct aac_softc *sc) caminf->TargetsPerBus = businfo.TargetsPerBus; caminf->BusNumber = i+1; caminf->BusType = PASSTHROUGH_BUS; - caminf->InitiatorBusId = businfo.InitiatorBusId[i]; + caminf->InitiatorBusId = -1; caminf->aac_sc = sc; caminf->sim_dev = child; caminf->aac_cam = NULL; @@ -3745,7 +3771,7 @@ aac_reset_adapter(struct aac_softc *sc) struct aac_fib *fib; struct aac_pause_command *pc; u_int32_t status, reset_mask, waitCount, max_msix_orig; - int msi_enabled_orig; + int ret, msi_enabled_orig; fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); mtx_assert(&sc->aac_io_lock, MA_OWNED); @@ -3804,50 +3830,61 @@ aac_reset_adapter(struct aac_softc *sc) AAC_MEM0_SETREG4(sc, AAC_IRCSR, AAC_IRCSR_CORES_RST); /* We need to wait for 5 seconds before accessing the MU again - * 10000 * 100us = 1000,000us = 1000ms = 1s + * 10000 * 100us = 1000,000us = 1000ms = 1s */ waitCount = 5 * 10000; while (waitCount) { DELAY(100); /* delay 100 microseconds */ waitCount--; } - } else if ((aacraid_sync_command(sc, - AAC_IOP_RESET_ALWAYS, 0, 0, 0, 0, &status, &reset_mask)) != 0) { - /* call IOP_RESET for older firmware */ - if ((aacraid_sync_command(sc, - AAC_IOP_RESET, 0, 0, 0, 0, &status, NULL)) != 0) { + } else { + ret = aacraid_sync_command(sc, AAC_IOP_RESET_ALWAYS, + 0, 0, 0, 0, &status, &reset_mask); + if (ret && !sc->doorbell_mask) { + /* call IOP_RESET for older firmware */ + if ((aacraid_sync_command(sc, AAC_IOP_RESET, 0,0,0,0, + &status, NULL)) != 0) { + if (status == AAC_SRB_STS_INVALID_REQUEST) { + device_printf(sc->aac_dev, + "IOP_RESET not supported\n"); + } else { + /* probably timeout */ + device_printf(sc->aac_dev, + "IOP_RESET failed\n"); + } - if (status == AAC_SRB_STS_INVALID_REQUEST) - device_printf(sc->aac_dev, "IOP_RESET not supported\n"); - else - /* probably timeout */ - device_printf(sc->aac_dev, "IOP_RESET failed\n"); + /* unwind aac_shutdown() */ + aac_alloc_sync_fib(sc, &fib); + pc = (struct aac_pause_command *)&fib->data[0]; + pc->Command = VM_ContainerConfig; + pc->Type = CT_PAUSE_IO; + pc->Timeout = 1; + pc->Min = 1; + pc->NoRescan = 1; - /* unwind aac_shutdown() */ - aac_alloc_sync_fib(sc, &fib); - pc = (struct aac_pause_command *)&fib->data[0]; - pc->Command = VM_ContainerConfig; - pc->Type = CT_PAUSE_IO; - pc->Timeout = 1; - pc->Min = 1; - pc->NoRescan = 1; + (void) aac_sync_fib(sc, ContainerCommand, 0, + fib, sizeof (struct aac_pause_command)); + aac_release_sync_fib(sc); - (void) aac_sync_fib(sc, ContainerCommand, 0, fib, - sizeof (struct aac_pause_command)); - aac_release_sync_fib(sc); - - goto finish; + goto finish; + } + } else if (sc->doorbell_mask) { + ret = 0; + reset_mask = sc->doorbell_mask; } - } else if (sc->aac_support_opt2 & AAC_SUPPORTED_DOORBELL_RESET) { - AAC_MEM0_SETREG4(sc, AAC_SRC_IDBR, reset_mask); - /* - * We need to wait for 5 seconds before accessing the doorbell - * again, 10000 * 100us = 1000,000us = 1000ms = 1s - */ - waitCount = 5 * 10000; - while (waitCount) { - DELAY(100); /* delay 100 microseconds */ - waitCount--; + if (!ret && + (sc->aac_support_opt2 & AAC_SUPPORTED_DOORBELL_RESET)) { + AAC_MEM0_SETREG4(sc, AAC_SRC_IDBR, reset_mask); + /* + * We need to wait for 5 seconds before accessing the + * doorbell again; + * 10000 * 100us = 1000,000us = 1000ms = 1s + */ + waitCount = 5 * 10000; + while (waitCount) { + DELAY(100); /* delay 100 microseconds */ + waitCount--; + } } } Modified: stable/11/sys/dev/aacraid/aacraid_cam.c ============================================================================== --- stable/11/sys/dev/aacraid/aacraid_cam.c Thu Nov 21 14:54:20 2019 (r354964) +++ stable/11/sys/dev/aacraid/aacraid_cam.c Thu Nov 21 14:55:27 2019 (r354965) @@ -1015,8 +1015,8 @@ aac_cam_action(struct cam_sim *sim, union ccb *ccb) cpi->version_num = 1; cpi->target_sprt = 0; cpi->hba_eng_cnt = 0; - cpi->max_target = camsc->inf->TargetsPerBus; - cpi->max_lun = 8; /* Per the controller spec */ + cpi->max_target = camsc->inf->TargetsPerBus - 1; + cpi->max_lun = 7; /* Per the controller spec */ cpi->initiator_id = camsc->inf->InitiatorBusId; cpi->bus_id = camsc->inf->BusNumber; #if __FreeBSD_version >= 800000 @@ -1387,15 +1387,9 @@ aacraid_startio(struct aac_softc *sc) * Try to get a command that's been put off for lack of * resources */ - if (sc->flags & AAC_FLAGS_SYNC_MODE) { - /* sync. transfer mode */ - if (sc->aac_sync_cm) - break; - cm = aac_dequeue_ready(sc); - sc->aac_sync_cm = cm; - } else { - cm = aac_dequeue_ready(sc); - } + if ((sc->flags & AAC_FLAGS_SYNC_MODE) && sc->aac_sync_cm) + break; + cm = aac_dequeue_ready(sc); /* nothing to do? */ if (cm == NULL) Modified: stable/11/sys/dev/aacraid/aacraid_reg.h ============================================================================== --- stable/11/sys/dev/aacraid/aacraid_reg.h Thu Nov 21 14:54:20 2019 (r354964) +++ stable/11/sys/dev/aacraid/aacraid_reg.h Thu Nov 21 14:55:27 2019 (r354965) @@ -40,7 +40,7 @@ /* * Misc. magic numbers. */ -#define AAC_MAX_CONTAINERS 64 +#define AAC_MAX_CONTAINERS 240 #define AAC_BLOCK_SIZE 512 /* Modified: stable/11/sys/dev/aacraid/aacraid_var.h ============================================================================== --- stable/11/sys/dev/aacraid/aacraid_var.h Thu Nov 21 14:54:20 2019 (r354964) +++ stable/11/sys/dev/aacraid/aacraid_var.h Thu Nov 21 14:55:27 2019 (r354965) @@ -47,7 +47,7 @@ #define AAC_DRIVER_MAJOR_VERSION 3 #define AAC_DRIVER_MINOR_VERSION 2 -#define AAC_DRIVER_BUGFIX_LEVEL 5 +#define AAC_DRIVER_BUGFIX_LEVEL 10 #define AAC_DRIVER_TYPE AAC_TYPE_RELEASE #ifndef AAC_DRIVER_BUILD @@ -479,9 +479,12 @@ struct aac_softc u_int32_t aac_feature_bits; /* feature bits from suppl. info */ u_int32_t aac_support_opt2; /* supp. options from suppl. info */ u_int32_t aac_max_aif; /* max. AIF count */ + u_int32_t doorbell_mask; /* for IOP reset */ u_int32_t aac_max_msix; /* max. MSI-X vectors */ u_int32_t aac_vector_cap; /* MSI-X vector capab.*/ int msi_enabled; /* MSI/MSI-X enabled */ + int msi_tupelo; /* Series 6 support for */ + /* single MSI interrupt */ #define AAC_CAM_TARGET_WILDCARD ~0 void (*cam_rescan_cb)(struct aac_softc *, uint32_t, uint32_t); From owner-svn-src-stable-11@freebsd.org Thu Nov 21 15:06:32 2019 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 19EEC1C1CD5; Thu, 21 Nov 2019 15:06:32 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47JjZG3mlqz4Wsg; Thu, 21 Nov 2019 15:06:30 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.110.112]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iXo2H-0004pe-1u; Thu, 21 Nov 2019 16:06:27 +0100 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org, "Dimitry Andric" Subject: Re: svn commit: r354803 - in stable: 11/contrib/llvm/lib/Transforms/InstCombine 12/contrib/llvm/lib/Transforms/InstCombine References: <201911180704.xAI74xAM039993@repo.freebsd.org> Date: Thu, 21 Nov 2019 16:06:22 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201911180704.xAI74xAM039993@repo.freebsd.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: -- X-Spam-Score: -2.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED, BAYES_00 autolearn=disabled version=3.4.2 X-Scan-Signature: e6bdf1242ae0fe6211617ef395c8efe5 X-Rspamd-Queue-Id: 47JjZG3mlqz4Wsg X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 195.190.28.88 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-2.56 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:195.190.28.64/27]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[klop.ws]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; RCPT_COUNT_FIVE(0.00)[5]; IP_SCORE(-0.76)[ip: (-0.89), ipnet: 195.190.28.0/24(-0.33), asn: 47172(-2.61), country: NL(0.02)]; RCVD_IN_DNSWL_NONE(0.00)[88.28.190.195.list.dnswl.org : 127.0.10.0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:47172, ipnet:195.190.28.0/24, country:NL]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 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, 21 Nov 2019 15:06:32 -0000 On Mon, 18 Nov 2019 08:04:59 +0100, Dimitry Andric wrote: > Author: dim > Date: Mon Nov 18 07:04:59 2019 > New Revision: 354803 > URL: https://svnweb.freebsd.org/changeset/base/354803 > > Log: > MFC r354724: > Merge commit 5bbb604bb from llvm git (by Craig Topper): > [InstCombine] Disable some portions of foldGEPICmp for GEPs that > return a vector of pointers. Fix other portions. > llvm-svn: 370114 > This should fix instances of 'Assertion failed: (isa(Val) && > "cast() argument of incompatible type!"), function cast, file > /usr/src/contrib/llvm/include/llvm/Support/Casting.h, line 255', when > building openjdk8 for aarch64 and armv7. > Reported by: jbeich > PR: 236566 > Are there plans for an errata notice for releng-12.1 with this fix? That would keep Openjdk8 as a pkg on aarch64 after 12.0 goes EOL and pkgs will be build on 12.1. If no plans exist how do I request this formally? Regards, Ronald. > Modified: > stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp > Directory Properties: > stable/11/ (props changed) > > Changes in other areas also in this revision: > Modified: > stable/12/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp > Directory Properties: > stable/12/ (props changed) > > Modified: > stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp > ============================================================================== > --- > stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp Mon > Nov 18 04:22:04 2019 (r354802) > +++ > stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp Mon > Nov 18 07:04:59 2019 (r354803) > @@ -830,6 +830,10 @@ getAsConstantIndexedAddress(Value *V, const > DataLayout > static Instruction *transformToIndexedCompare(GEPOperator *GEPLHS, > Value *RHS, > ICmpInst::Predicate Cond, > const DataLayout &DL) { > + // FIXME: Support vector of pointers. > + if (GEPLHS->getType()->isVectorTy()) > + return nullptr; > + > if (!GEPLHS->hasAllConstantIndices()) > return nullptr; > @@ -880,7 +884,9 @@ Instruction *InstCombiner::foldGEPICmp(GEPOperator > *GE > RHS = RHS->stripPointerCasts(); > Value *PtrBase = GEPLHS->getOperand(0); > - if (PtrBase == RHS && GEPLHS->isInBounds()) { > + // FIXME: Support vector pointer GEPs. > + if (PtrBase == RHS && GEPLHS->isInBounds() && > + !GEPLHS->getType()->isVectorTy()) { > // ((gep Ptr, OFFSET) cmp Ptr) ---> (OFFSET cmp 0). > // This transformation (ignoring the base and scales) is valid > because we > // know pointers can't overflow since the gep is inbounds. See if > we can > @@ -914,11 +920,13 @@ Instruction *InstCombiner::foldGEPICmp(GEPOperator > *GE > // If we're comparing GEPs with two base pointers that only > differ in type > // and both GEPs have only constant indices or just one use, then > fold > // the compare with the adjusted indices. > + // FIXME: Support vector of pointers. > if (GEPLHS->isInBounds() && GEPRHS->isInBounds() && > (GEPLHS->hasAllConstantIndices() || GEPLHS->hasOneUse()) && > (GEPRHS->hasAllConstantIndices() || GEPRHS->hasOneUse()) && > PtrBase->stripPointerCasts() == > - GEPRHS->getOperand(0)->stripPointerCasts()) { > + GEPRHS->getOperand(0)->stripPointerCasts() && > + !GEPLHS->getType()->isVectorTy()) { > Value *LOffset = EmitGEPOffset(GEPLHS); > Value *ROffset = EmitGEPOffset(GEPRHS); > @@ -962,15 +970,20 @@ Instruction *InstCombiner::foldGEPICmp(GEPOperator > *GE > unsigned DiffOperand = 0; // The operand that differs. > for (unsigned i = 1, e = GEPRHS->getNumOperands(); i != e; ++i) > if (GEPLHS->getOperand(i) != GEPRHS->getOperand(i)) { > - if > (GEPLHS->getOperand(i)->getType()->getPrimitiveSizeInBits() != > - > GEPRHS->getOperand(i)->getType()->getPrimitiveSizeInBits()) { > + Type *LHSType = GEPLHS->getOperand(i)->getType(); > + Type *RHSType = GEPRHS->getOperand(i)->getType(); > + // FIXME: Better support for vector of pointers. > + if (LHSType->getPrimitiveSizeInBits() != > + RHSType->getPrimitiveSizeInBits() || > + (GEPLHS->getType()->isVectorTy() && > + (!LHSType->isVectorTy() || !RHSType->isVectorTy()))) { > // Irreconcilable differences. > NumDifferences = 2; > break; > - } else { > - if (NumDifferences++) break; > - DiffOperand = i; > } > + > + if (NumDifferences++) break; > + DiffOperand = i; > } > if (NumDifferences == 0) // SAME GEP? > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-stable-11@freebsd.org Thu Nov 21 19:07:58 2019 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 44DAB1C82DE; Thu, 21 Nov 2019 19:07:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from springbank.echomania.com (springbank.echomania.com [IPv6:2a01:7c8:aab2:81::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "springbank.echomania.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47Jpws67rZz3JZJ; Thu, 21 Nov 2019 19:07:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) X-Virus-Scanned: Debian amavisd-new at springbank.echomania.com Received: from [IPv6:2001:470:7a58::a9b6:ac6d:ea45:224e] (unknown [IPv6:2001:470:7a58:0:a9b6:ac6d:ea45:224e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by springbank.echomania.com (Postfix) with ESMTPSA id 1671D580227; Thu, 21 Nov 2019 20:07:53 +0100 (CET) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_C13C8E61-27C0-4564-B130-AA556F53A5A2"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: svn commit: r354803 - in stable: 11/contrib/llvm/lib/Transforms/InstCombine 12/contrib/llvm/lib/Transforms/InstCombine Date: Thu, 21 Nov 2019 20:07:46 +0100 In-Reply-To: Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org To: Ronald Klop References: <201911180704.xAI74xAM039993@repo.freebsd.org> X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 47Jpws67rZz3JZJ X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.36 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.83)[-0.831,0]; NEURAL_HAM_LONG(-0.53)[-0.534,0]; ASN(0.00)[asn:20857, ipnet:2a01:7c8::/32, country:NL] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 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, 21 Nov 2019 19:07:58 -0000 --Apple-Mail=_C13C8E61-27C0-4564-B130-AA556F53A5A2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 21 Nov 2019, at 16:06, Ronald Klop wrote: >=20 > On Mon, 18 Nov 2019 08:04:59 +0100, Dimitry Andric = wrote: >> Author: dim >> Date: Mon Nov 18 07:04:59 2019 >> New Revision: 354803 >> URL: https://svnweb.freebsd.org/changeset/base/354803 >>=20 >> Log: >> MFC r354724: >> Merge commit 5bbb604bb from llvm git (by Craig Topper): >> [InstCombine] Disable some portions of foldGEPICmp for GEPs that >> return a vector of pointers. Fix other portions. >> llvm-svn: 370114 >> This should fix instances of 'Assertion failed: (isa(Val) && >> "cast() argument of incompatible type!"), function cast, file >> /usr/src/contrib/llvm/include/llvm/Support/Casting.h, line 255', = when >> building openjdk8 for aarch64 and armv7. >> Reported by: jbeich >> PR: 236566 >>=20 >=20 >=20 > Are there plans for an errata notice for releng-12.1 with this fix? = That would keep Openjdk8 as a pkg on aarch64 after 12.0 goes EOL and = pkgs will be build on 12.1. There should be no need for this, as release versions (and stable branches) have their copies of clang compiled with assertions disabled. Hence, the assertion reported in PR 236566 cannot occur, unless you have explicitly turned them on again and recompiled the toolchain components. I have tried compiling the original test case from the PR on both 12.0-RELEASE and 12.1-RELEASE. On 12.0-RELEASE, which has clang version 6.0.1 (tags/RELEASE_601/final 335540), it complains that the -fno-delete-null-pointer-checks and -faddrsig options are unknown, but this is to be expected. The former was important to get the original assertion. If I remove both those options, the test case compiles just fine. On 12.1-RELEASE, which has clang version 8.0.1 (tags/RELEASE_801/final 366581), the test case compiles just fine, out of the box. -Dimitry --Apple-Mail=_C13C8E61-27C0-4564-B130-AA556F53A5A2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXdbgggAKCRCwXqMKLiCW o04+AJ9U33dfByow9sRNWHImOn178dgYDgCeO5atGS85s+g4Uq9p/Mk4fTqEnvs= =w6wk -----END PGP SIGNATURE----- --Apple-Mail=_C13C8E61-27C0-4564-B130-AA556F53A5A2-- From owner-svn-src-stable-11@freebsd.org Thu Nov 21 19:41:30 2019 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 D98ED1C8FDC; Thu, 21 Nov 2019 19:41:30 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47JqgZ5Wgdz3Lfp; Thu, 21 Nov 2019 19:41:30 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.110.112]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iXsK1-0005uF-RD; Thu, 21 Nov 2019 20:41:28 +0100 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Dimitry Andric" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r354803 - in stable: 11/contrib/llvm/lib/Transforms/InstCombine 12/contrib/llvm/lib/Transforms/InstCombine References: <201911180704.xAI74xAM039993@repo.freebsd.org> Date: Thu, 21 Nov 2019 20:41:00 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: -- X-Spam-Score: -2.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED, BAYES_00 autolearn=disabled version=3.4.2 X-Scan-Signature: 9b84bad32751a42de3aa9e7877f1ca86 X-Rspamd-Queue-Id: 47JqgZ5Wgdz3Lfp X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-0.99)[-0.986,0]; REPLY(-4.00)[] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 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, 21 Nov 2019 19:41:30 -0000 On Thu, 21 Nov 2019 20:07:46 +0100, Dimitry Andric wrote: > On 21 Nov 2019, at 16:06, Ronald Klop wrote: >> >> On Mon, 18 Nov 2019 08:04:59 +0100, Dimitry Andric >> wrote: >>> Author: dim >>> Date: Mon Nov 18 07:04:59 2019 >>> New Revision: 354803 >>> URL: https://svnweb.freebsd.org/changeset/base/354803 >>> >>> Log: >>> MFC r354724: >>> Merge commit 5bbb604bb from llvm git (by Craig Topper): >>> [InstCombine] Disable some portions of foldGEPICmp for GEPs that >>> return a vector of pointers. Fix other portions. >>> llvm-svn: 370114 >>> This should fix instances of 'Assertion failed: (isa(Val) && >>> "cast() argument of incompatible type!"), function cast, file >>> /usr/src/contrib/llvm/include/llvm/Support/Casting.h, line 255', when >>> building openjdk8 for aarch64 and armv7. >>> Reported by: jbeich >>> PR: 236566 >>> >> >> >> Are there plans for an errata notice for releng-12.1 with this fix? >> That would keep Openjdk8 as a pkg on aarch64 after 12.0 goes EOL and >> pkgs will be build on 12.1. > > There should be no need for this, as release versions (and stable > branches) have their copies of clang compiled with assertions disabled. > > Hence, the assertion reported in PR 236566 cannot occur, unless you have > explicitly turned them on again and recompiled the toolchain components. > > I have tried compiling the original test case from the PR on both > 12.0-RELEASE and 12.1-RELEASE. > > On 12.0-RELEASE, which has clang version 6.0.1 (tags/RELEASE_601/final > 335540), it complains that the -fno-delete-null-pointer-checks and > -faddrsig options are unknown, but this is to be expected. The former > was important to get the original assertion. If I remove both those > options, the test case compiles just fine. > > On 12.1-RELEASE, which has clang version 8.0.1 (tags/RELEASE_801/final > 366581), the test case compiles just fine, out of the box. > > -Dimitry > Dimitry, Thank you for testing and your quick answer. Regards, Ronald. From owner-svn-src-stable-11@freebsd.org Fri Nov 22 14:21:56 2019 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 0D0891B973A; Fri, 22 Nov 2019 14:21:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47KJXM6bPHz3LcF; Fri, 22 Nov 2019 14:21:55 +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 C5F9424D3B; Fri, 22 Nov 2019 14:21:55 +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 xAMELt71003456; Fri, 22 Nov 2019 14:21:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAMELt1F003454; Fri, 22 Nov 2019 14:21:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201911221421.xAMELt1F003454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 22 Nov 2019 14:21: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: r354994 - in stable/11/sys: contrib/rdma/krping ofed/include/rdma X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys: contrib/rdma/krping ofed/include/rdma X-SVN-Commit-Revision: 354994 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.29 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, 22 Nov 2019 14:21:56 -0000 Author: hselasky Date: Fri Nov 22 14:21:55 2019 New Revision: 354994 URL: https://svnweb.freebsd.org/changeset/base/354994 Log: MFC r354727: Correct MR length field to be 64-bit in ibcore. Linux commit: edd31551148c09608feee6b8756ad148d550ee3b Sponsored by: Mellanox Technologies Modified: stable/11/sys/contrib/rdma/krping/krping.c stable/11/sys/ofed/include/rdma/ib_verbs.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/rdma/krping/krping.c ============================================================================== --- stable/11/sys/contrib/rdma/krping/krping.c Fri Nov 22 14:18:12 2019 (r354993) +++ stable/11/sys/contrib/rdma/krping/krping.c Fri Nov 22 14:21:55 2019 (r354994) @@ -736,7 +736,7 @@ static u32 krping_rdma_rkey(struct krping_cb *cb, u64 post_inv, cb->reg_mr_wr.key, cb->reg_mr->page_size, - cb->reg_mr->length, + (unsigned)cb->reg_mr->length, (unsigned long long)cb->reg_mr->iova); if (post_inv) Modified: stable/11/sys/ofed/include/rdma/ib_verbs.h ============================================================================== --- stable/11/sys/ofed/include/rdma/ib_verbs.h Fri Nov 22 14:18:12 2019 (r354993) +++ stable/11/sys/ofed/include/rdma/ib_verbs.h Fri Nov 22 14:21:55 2019 (r354994) @@ -1562,7 +1562,7 @@ struct ib_mr { u32 lkey; u32 rkey; u64 iova; - u32 length; + u64 length; unsigned int page_size; bool need_inval; union { From owner-svn-src-stable-11@freebsd.org Fri Nov 22 14:24:11 2019 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 919DB1B9858; Fri, 22 Nov 2019 14:24:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47KJZz3J2wz3M1W; Fri, 22 Nov 2019 14:24:11 +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 5468024E73; Fri, 22 Nov 2019 14:24:11 +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 xAMEOBRm007654; Fri, 22 Nov 2019 14:24:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAMEOBT6007653; Fri, 22 Nov 2019 14:24:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201911221424.xAMEOBT6007653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 22 Nov 2019 14:24:11 +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: r354996 - stable/11/sys/ofed/include/rdma X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/include/rdma X-SVN-Commit-Revision: 354996 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.29 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, 22 Nov 2019 14:24:11 -0000 Author: hselasky Date: Fri Nov 22 14:24:10 2019 New Revision: 354996 URL: https://svnweb.freebsd.org/changeset/base/354996 Log: MFC r354728: Prevent potential underflow in ibcore. Linux commit: a9018adfde809d44e71189b984fa61cc89682b5e Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/include/rdma/ib_verbs.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/include/rdma/ib_verbs.h ============================================================================== --- stable/11/sys/ofed/include/rdma/ib_verbs.h Fri Nov 22 14:23:11 2019 (r354995) +++ stable/11/sys/ofed/include/rdma/ib_verbs.h Fri Nov 22 14:24:10 2019 (r354996) @@ -283,7 +283,7 @@ enum ib_cq_creation_flags { struct ib_cq_init_attr { unsigned int cqe; - int comp_vector; + u32 comp_vector; u32 flags; }; From owner-svn-src-stable-11@freebsd.org Fri Nov 22 17:13:03 2019 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 9C9C31BC905; Fri, 22 Nov 2019 17:13:03 +0000 (UTC) (envelope-from jgh@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47KNKq3czXz41Dt; Fri, 22 Nov 2019 17:13:03 +0000 (UTC) (envelope-from jgh@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 5F6F026CF5; Fri, 22 Nov 2019 17:13:03 +0000 (UTC) (envelope-from jgh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAMHD3x1008632; Fri, 22 Nov 2019 17:13:03 GMT (envelope-from jgh@FreeBSD.org) Received: (from jgh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAMHD3Lh008631; Fri, 22 Nov 2019 17:13:03 GMT (envelope-from jgh@FreeBSD.org) Message-Id: <201911221713.xAMHD3Lh008631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jgh set sender to jgh@FreeBSD.org using -f From: Jason Helfman Date: Fri, 22 Nov 2019 17:13:03 +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: r355008 - stable/11/share/man/man5 X-SVN-Group: stable-11 X-SVN-Commit-Author: jgh X-SVN-Commit-Paths: stable/11/share/man/man5 X-SVN-Commit-Revision: 355008 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.29 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, 22 Nov 2019 17:13:03 -0000 Author: jgh (doc,ports committer) Date: Fri Nov 22 17:13:02 2019 New Revision: 355008 URL: https://svnweb.freebsd.org/changeset/base/355008 Log: MFH: r351820 - correct HISTORY section - while here clarify wording PR: 240260 (based on) http://www.FreeBSD.org/cgi/query-pr.cgi?pr=240260 Submitted by: gbergling@gmail.com Modified: stable/11/share/man/man5/passwd.5 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man5/passwd.5 ============================================================================== --- stable/11/share/man/man5/passwd.5 Fri Nov 22 17:06:32 2019 (r355007) +++ stable/11/share/man/man5/passwd.5 Fri Nov 22 17:13:02 2019 (r355008) @@ -438,8 +438,8 @@ BEGIN { FS = ":"} .Sh HISTORY A .Nm -file format appeared in -.At v6 . +file format first appeared in +.At v1 . .Pp The .Tn NIS From owner-svn-src-stable-11@freebsd.org Sat Nov 23 13:23:13 2019 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 0E1221B5740; Sat, 23 Nov 2019 13:23:13 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47KvB86bNgz43dr; Sat, 23 Nov 2019 13:23:12 +0000 (UTC) (envelope-from karels@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 C5A06C911; Sat, 23 Nov 2019 13:23:12 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xANDNCus028064; Sat, 23 Nov 2019 13:23:12 GMT (envelope-from karels@FreeBSD.org) Received: (from karels@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xANDNCTb028063; Sat, 23 Nov 2019 13:23:12 GMT (envelope-from karels@FreeBSD.org) Message-Id: <201911231323.xANDNCTb028063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: karels set sender to karels@FreeBSD.org using -f From: Mike Karels Date: Sat, 23 Nov 2019 13:23: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: r355030 - stable/11/usr.bin/netstat X-SVN-Group: stable-11 X-SVN-Commit-Author: karels X-SVN-Commit-Paths: stable/11/usr.bin/netstat X-SVN-Commit-Revision: 355030 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.29 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: Sat, 23 Nov 2019 13:23:13 -0000 Author: karels Date: Sat Nov 23 13:23:12 2019 New Revision: 355030 URL: https://svnweb.freebsd.org/changeset/base/355030 Log: MFC r354633: Fix netstat -gs with ip_mroute module and/or vnet The code for "netstat -gs -f inet" failed if the kernel namelist did not include the _mrtstat symbol. However, that symbol is not in a standard kernel even with the ip_mroute module loaded, where the functionality is available. It is also not in a kernel with MROUTING but also VIMAGE, as there can be multiple sets of stats. However, when running the command on a live system, the symbol is not used; a sysctl is used. Go ahead and try the sysctl in any case, and complain that IPv4 MROUTING is not present only if the sysctl fails with ENOENT. Also fail if _mrtstat is not defined when running on a core file; netstat doesn't know about vnets, so can only work if MROUTING was included, and VIMAGE was not. Reviewed by: bz Modified: stable/11/usr.bin/netstat/mroute.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/netstat/mroute.c ============================================================================== --- stable/11/usr.bin/netstat/mroute.c Sat Nov 23 13:20:24 2019 (r355029) +++ stable/11/usr.bin/netstat/mroute.c Sat Nov 23 13:23:12 2019 (r355030) @@ -407,14 +407,12 @@ mrt_stats() mstaddr = nl[N_MRTSTAT].n_value; - if (mstaddr == 0) { - fprintf(stderr, "No IPv4 MROUTING kernel support.\n"); - return; - } - if (fetch_stats("net.inet.ip.mrtstat", mstaddr, &mrtstat, - sizeof(mrtstat), kread_counters) != 0) + sizeof(mrtstat), kread_counters) != 0) { + if ((live && errno == ENOENT) || (!live && mstaddr == 0)) + fprintf(stderr, "No IPv4 MROUTING kernel support.\n"); return; + } xo_emit("{T:IPv4 multicast forwarding}:\n");