From owner-svn-src-all@freebsd.org Sun Jul 5 02:09:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DF7FA095; Sun, 5 Jul 2015 02:09:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 28B69161D; Sun, 5 Jul 2015 02:09:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6529muk078222; Sun, 5 Jul 2015 02:09:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6529l4U078214; Sun, 5 Jul 2015 02:09:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201507050209.t6529l4U078214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 5 Jul 2015 02:09:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285154 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 02:09:48 -0000 Author: mav Date: Sun Jul 5 02:09:46 2015 New Revision: 285154 URL: https://svnweb.freebsd.org/changeset/base/285154 Log: Remove extra level of target ID indirection (isp_dev_map). FreeBSD never had limitation on number of target IDs, and there is no any other requirement to allocate them densely. Since slots of port database already populated just sequentially, there is no much need for another indirection to allocate sequentially too. Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sat Jul 4 21:50:39 2015 (r285153) +++ head/sys/dev/isp/isp.c Sun Jul 5 02:09:46 2015 (r285154) @@ -2233,9 +2233,6 @@ isp_del_all_init_entries(ispsoftc_t *isp lp = &fcp->portdb[i]; if (lp->state == FC_PORTDB_STATE_NIL || lp->target_mode) continue; - /* - * It's up to the outer layers to clear isp_dev_map. - */ lp->state = FC_PORTDB_STATE_NIL; isp_async(isp, ISPASYNC_DEV_GONE, chan, lp, 1); if (lp->autologin == 0) { @@ -3007,9 +3004,6 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) switch (lp->state) { case FC_PORTDB_STATE_PROBATIONAL: case FC_PORTDB_STATE_DEAD: - /* - * It's up to the outer layers to clear isp_dev_map. - */ lp->state = FC_PORTDB_STATE_NIL; isp_async(isp, ISPASYNC_DEV_GONE, chan, lp, 0); if (lp->autologin == 0) { @@ -3029,10 +3023,6 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) */ break; case FC_PORTDB_STATE_NEW: - /* - * It's up to the outer layers to assign a virtual - * target id in isp_dev_map (if any). - */ lp->portid = lp->new_portid; lp->prli_word3 = lp->new_prli_word3; lp->state = FC_PORTDB_STATE_VALID; @@ -3054,10 +3044,6 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) case FC_PORTDB_STATE_PENDING_VALID: lp->portid = lp->new_portid; lp->prli_word3 = lp->new_prli_word3; - if (lp->dev_map_idx) { - int t = lp->dev_map_idx - 1; - fcp->isp_dev_map[t] = dbidx + 1; - } lp->state = FC_PORTDB_STATE_VALID; isp_async(isp, ISPASYNC_DEV_STAYED, chan, lp); if (dbidx != FL_ID) { @@ -4354,7 +4340,8 @@ isp_start(XS_T *xs) ispreq_t *reqp; void *cdbp, *qep; uint16_t *tptr; - int target, dmaresult, hdlidx = 0; + fcportdb_t *lp; + int target, dmaresult; XS_INITERR(xs); isp = XS_ISP(xs); @@ -4403,29 +4390,23 @@ isp_start(XS_T *xs) return (CMD_RQLATER); } - if (XS_TGT(xs) >= MAX_FC_TARG) { - isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%d target too big", XS_CHANNEL(xs), target, XS_LUN(xs)); + isp_prt(isp, ISP_LOGDEBUG2, "XS_TGT(xs)=%d", target); + lp = &fcp->portdb[target]; + if (target < 0 || target >= MAX_FC_TARG || + lp->dev_map_idx == 0) { XS_SETERR(xs, HBA_SELTIMEOUT); return (CMD_COMPLETE); } - - hdlidx = fcp->isp_dev_map[XS_TGT(xs)] - 1; - isp_prt(isp, ISP_LOGDEBUG2, "XS_TGT(xs)=%d- hdlidx value %d", XS_TGT(xs), hdlidx); - if (hdlidx < 0 || hdlidx >= MAX_FC_TARG) { - XS_SETERR(xs, HBA_SELTIMEOUT); - return (CMD_COMPLETE); - } - if (fcp->portdb[hdlidx].state == FC_PORTDB_STATE_ZOMBIE) { + if (lp->state == FC_PORTDB_STATE_ZOMBIE) { isp_prt(isp, ISP_LOGDEBUG1, "%d.%d.%d target zombie", XS_CHANNEL(xs), target, XS_LUN(xs)); return (CMD_RQLATER); } - if (fcp->portdb[hdlidx].state != FC_PORTDB_STATE_VALID) { - isp_prt(isp, ISP_LOGDEBUG1, "%d.%d.%d bad db port state 0x%x", XS_CHANNEL(xs), target, XS_LUN(xs), fcp->portdb[hdlidx].state); + if (lp->state != FC_PORTDB_STATE_VALID) { + isp_prt(isp, ISP_LOGDEBUG1, "%d.%d.%d bad db port state 0x%x", XS_CHANNEL(xs), target, XS_LUN(xs), lp->state); XS_SETERR(xs, HBA_SELTIMEOUT); return (CMD_COMPLETE); } - target = fcp->portdb[hdlidx].handle; - fcp->portdb[hdlidx].dirty = 1; + lp->dirty = 1; } else { sdparam *sdp = SDPARAM(isp, XS_CHANNEL(xs)); if ((sdp->role & ISP_ROLE_INITIATOR) == 0) { @@ -4567,7 +4548,6 @@ isp_start(XS_T *xs) reqp->req_cdblen = cdblen; } else if (IS_24XX(isp)) { ispreqt7_t *t7 = (ispreqt7_t *)local; - fcportdb_t *lp; if (cdblen > sizeof (t7->req_cdb)) { isp_prt(isp, ISP_LOGERR, "Command Length %u too long for this chip", cdblen); @@ -4575,8 +4555,7 @@ isp_start(XS_T *xs) return (CMD_COMPLETE); } - lp = &FCPARAM(isp, XS_CHANNEL(xs))->portdb[hdlidx]; - t7->req_nphdl = target; + t7->req_nphdl = lp->handle; t7->req_tidlo = lp->portid; t7->req_tidhi = lp->portid >> 16; t7->req_vpidx = ISP_GET_VPIDX(isp, XS_CHANNEL(xs)); @@ -4596,14 +4575,12 @@ isp_start(XS_T *xs) cdbp = t7->req_cdb; } else { ispreqt2_t *t2 = (ispreqt2_t *)local; - fcportdb_t *lp; if (cdblen > sizeof t2->req_cdb) { isp_prt(isp, ISP_LOGERR, "Command Length %u too long for this chip", cdblen); XS_SETERR(xs, HBA_BOTCH); return (CMD_COMPLETE); } - lp = &FCPARAM(isp, XS_CHANNEL(xs))->portdb[hdlidx]; if (FCPARAM(isp, XS_CHANNEL(xs))->fctape_enabled && (lp->prli_word3 & PRLI_WD3_RETRY)) { if (FCP_NEXT_CRN(isp, &t2->req_crn, xs)) { isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%d cannot generate next CRN", XS_CHANNEL(xs), target, XS_LUN(xs)); @@ -4613,16 +4590,16 @@ isp_start(XS_T *xs) } if (ISP_CAP_2KLOGIN(isp)) { ispreqt2e_t *t2e = (ispreqt2e_t *)local; - t2e->req_target = target; + t2e->req_target = lp->handle; t2e->req_scclun = XS_LUN(xs); cdbp = t2e->req_cdb; } else if (ISP_CAP_SCCFW(isp)) { ispreqt2_t *t2 = (ispreqt2_t *)local; - t2->req_target = target; + t2->req_target = lp->handle; t2->req_scclun = XS_LUN(xs); cdbp = t2->req_cdb; } else { - t2->req_target = target; + t2->req_target = lp->handle; t2->req_lun_trn = XS_LUN(xs); cdbp = t2->req_cdb; } @@ -4720,16 +4697,15 @@ isp_control(ispsoftc_t *isp, ispctl_t ct isp24xx_statusreq_t *sp; fcparam *fcp = FCPARAM(isp, chan); fcportdb_t *lp; - int hdlidx; - hdlidx = fcp->isp_dev_map[tgt] - 1; - if (hdlidx < 0 || hdlidx >= MAX_FC_TARG) { - isp_prt(isp, ISP_LOGWARN, "Chan %d bad handle %d trying to reset target %d", chan, hdlidx, tgt); + if (tgt < 0 || tgt >= MAX_FC_TARG) { + isp_prt(isp, ISP_LOGWARN, "Chan %d trying to reset bad target %d", chan, tgt); break; } - lp = &fcp->portdb[hdlidx]; - if (lp->state != FC_PORTDB_STATE_VALID) { - isp_prt(isp, ISP_LOGWARN, "Chan %d handle %d for abort of target %d no longer valid", chan, hdlidx, tgt); + lp = &fcp->portdb[tgt]; + if (lp->dev_map_idx == 0 || + lp->state != FC_PORTDB_STATE_VALID) { + isp_prt(isp, ISP_LOGWARN, "Chan %d abort of no longer valid target %d", chan, tgt); break; } @@ -4810,17 +4786,16 @@ isp_control(ispsoftc_t *isp, ispctl_t ct isp24xx_abrt_t local, *ab = &local, *ab2; fcparam *fcp; fcportdb_t *lp; - int hdlidx; fcp = FCPARAM(isp, chan); - hdlidx = fcp->isp_dev_map[tgt] - 1; - if (hdlidx < 0 || hdlidx >= MAX_FC_TARG) { - isp_prt(isp, ISP_LOGWARN, "Chan %d bad handle %d trying to abort target %d", chan, hdlidx, tgt); + if (tgt < 0 || tgt >= MAX_FC_TARG) { + isp_prt(isp, ISP_LOGWARN, "Chan %d trying to abort bad target %d", chan, tgt); break; } - lp = &fcp->portdb[hdlidx]; - if (lp->state != FC_PORTDB_STATE_VALID) { - isp_prt(isp, ISP_LOGWARN, "Chan %d handle %d for abort of target %d no longer valid", chan, hdlidx, tgt); + lp = &fcp->portdb[tgt]; + if (lp->dev_map_idx == 0 || + lp->state != FC_PORTDB_STATE_VALID) { + isp_prt(isp, ISP_LOGWARN, "Chan %d abort of no longer valid target %d", chan, tgt); break; } isp_prt(isp, ISP_LOGALL, "Chan %d Abort Cmd for N-Port 0x%04x @ Port 0x%06x", chan, lp->handle, lp->portid); @@ -4860,7 +4835,7 @@ isp_control(ispsoftc_t *isp, ispctl_t ct if (ab->abrt_nphdl == ISP24XX_ABRT_OKAY) { return (0); } - isp_prt(isp, ISP_LOGWARN, "Chan %d handle %d abort returned 0x%x", chan, hdlidx, ab->abrt_nphdl); + isp_prt(isp, ISP_LOGWARN, "Chan %d handle %d abort returned 0x%x", chan, tgt, ab->abrt_nphdl); break; } else if (IS_FC(isp)) { if (ISP_CAP_SCCFW(isp)) { Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sat Jul 4 21:50:39 2015 (r285153) +++ head/sys/dev/isp/isp_freebsd.c Sun Jul 5 02:09:46 2015 (r285154) @@ -4684,7 +4684,7 @@ isp_gdt_task(void *arg, int pending) ispsoftc_t *isp = fc->isp; int chan = fc - isp->isp_osinfo.pc.fc; fcportdb_t *lp; - int dbidx, tgt, more_to_do = 0; + int dbidx, more_to_do = 0; ISP_LOCK(isp); isp_prt(isp, ISP_LOGDEBUG0, "Chan %d GDT timer expired", chan); @@ -4703,12 +4703,10 @@ isp_gdt_task(void *arg, int pending) more_to_do++; continue; } - tgt = lp->dev_map_idx - 1; - FCPARAM(isp, chan)->isp_dev_map[tgt] = 0; lp->dev_map_idx = 0; lp->state = FC_PORTDB_STATE_NIL; - isp_prt(isp, ISP_LOGCONFIG, prom3, chan, lp->portid, tgt, "Gone Device Timeout"); - isp_make_gone(isp, lp, chan, tgt); + isp_prt(isp, ISP_LOGCONFIG, prom3, chan, lp->portid, dbidx, "Gone Device Timeout"); + isp_make_gone(isp, lp, chan, dbidx); } if (fc->ready) { if (more_to_do) { @@ -4744,7 +4742,7 @@ isp_ldt_task(void *arg, int pending) ispsoftc_t *isp = fc->isp; int chan = fc - isp->isp_osinfo.pc.fc; fcportdb_t *lp; - int dbidx, tgt, i; + int dbidx, i; ISP_LOCK(isp); isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop Down Timer expired @ %lu", chan, (unsigned long) time_uptime); @@ -4777,7 +4775,7 @@ isp_ldt_task(void *arg, int pending) if ((xs = isp->isp_xflist[i].cmd) == NULL) { continue; } - if (dbidx != (FCPARAM(isp, chan)->isp_dev_map[XS_TGT(xs)] - 1)) { + if (dbidx != XS_TGT(xs)) { continue; } isp_prt(isp, ISP_LOGWARN, "command handle 0x%x for %d.%d.%d orphaned by loop down timeout", @@ -4788,20 +4786,10 @@ isp_ldt_task(void *arg, int pending) * Mark that we've announced that this device is gone.... */ lp->announced = 1; - - /* - * but *don't* change the state of the entry. Just clear - * any target id stuff and announce to CAM that the - * device is gone. This way any necessary PLOGO stuff - * will happen when loop comes back up. - */ - - tgt = lp->dev_map_idx - 1; - FCPARAM(isp, chan)->isp_dev_map[tgt] = 0; lp->dev_map_idx = 0; lp->state = FC_PORTDB_STATE_NIL; - isp_prt(isp, ISP_LOGCONFIG, prom3, chan, lp->portid, tgt, "Loop Down Timeout"); - isp_make_gone(isp, lp, chan, tgt); + isp_prt(isp, ISP_LOGCONFIG, prom3, chan, lp->portid, dbidx, "Loop Down Timeout"); + isp_make_gone(isp, lp, chan, dbidx); } if (FCPARAM(isp, chan)->role & ISP_ROLE_INITIATOR) { @@ -5297,7 +5285,6 @@ isp_action(struct cam_sim *sim, union cc fcparam *fcp = FCPARAM(isp, bus); struct ccb_trans_settings_scsi *scsi = &cts->proto_specific.scsi; struct ccb_trans_settings_fc *fc = &cts->xport_specific.fc; - unsigned int hdlidx; cts->protocol = PROTO_SCSI; cts->protocol_version = SCSI_REV_2; @@ -5309,9 +5296,8 @@ isp_action(struct cam_sim *sim, union cc fc->valid = CTS_FC_VALID_SPEED; fc->bitrate = 100000; fc->bitrate *= fcp->isp_gbspeed; - hdlidx = fcp->isp_dev_map[tgt] - 1; - if (hdlidx < MAX_FC_TARG) { - fcportdb_t *lp = &fcp->portdb[hdlidx]; + if (tgt < MAX_FC_TARG) { + fcportdb_t *lp = &fcp->portdb[tgt]; fc->wwnn = lp->node_wwn; fc->wwpn = lp->port_wwn; fc->port = lp->portid; @@ -5632,17 +5618,9 @@ isp_done(XS_T *sccb) else if ((IS_FC(isp)) && (XS_TGT(sccb) < MAX_FC_TARG)) { fcparam *fcp; - int hdlidx; fcp = FCPARAM(isp, XS_CHANNEL(sccb)); - hdlidx = fcp->isp_dev_map[XS_TGT(sccb)] - 1; - /* - * Note that we have reported that this device is - * gone. If it reappears, we'll need to issue a - * rescan. - */ - if (hdlidx >= 0 && hdlidx < MAX_FC_TARG) - fcp->portdb[hdlidx].reported_gone = 1; + fcp->portdb[XS_TGT(sccb)].reported_gone = 1; } if ((sccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { sccb->ccb_h.status |= CAM_DEV_QFRZN; @@ -5811,24 +5789,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm lp->announced = 0; lp->gone_timer = 0; if ((FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) && (lp->prli_word3 & PRLI_WD3_TARGET_FUNCTION)) { - int dbidx = lp - FCPARAM(isp, bus)->portdb; - int i; - - for (i = 0; i < MAX_FC_TARG; i++) { - if (i >= FL_ID && i <= SNS_ID) { - continue; - } - if (FCPARAM(isp, bus)->isp_dev_map[i] == 0) { - break; - } - } - if (i < MAX_FC_TARG) { - FCPARAM(isp, bus)->isp_dev_map[i] = dbidx + 1; - lp->dev_map_idx = i + 1; - } else { - isp_prt(isp, ISP_LOGWARN, "out of target ids"); - isp_dump_portdb(isp, bus); - } + lp->dev_map_idx = (lp - FCPARAM(isp, bus)->portdb) + 1; } isp_gen_role_str(buf, sizeof (buf), lp->prli_word3); if (lp->dev_map_idx) { @@ -5852,7 +5813,6 @@ isp_async(ispsoftc_t *isp, ispasync_t cm lp->state = FC_PORTDB_STATE_NIL; if (lp->dev_map_idx) { tgt = lp->dev_map_idx - 1; - FCPARAM(isp, bus)->isp_dev_map[tgt] = 0; lp->dev_map_idx = 0; isp_prt(isp, ISP_LOGCONFIG, prom3, bus, lp->portid, tgt, "change is bad"); isp_make_gone(isp, lp, bus, tgt); @@ -5866,8 +5826,6 @@ isp_async(ispsoftc_t *isp, ispasync_t cm lp->prli_word3 = lp->new_prli_word3; isp_gen_role_str(buf, sizeof (buf), lp->prli_word3); if (lp->dev_map_idx) { - int t = lp->dev_map_idx - 1; - FCPARAM(isp, bus)->isp_dev_map[t] = (lp - FCPARAM(isp, bus)->portdb) + 1; tgt = lp->dev_map_idx - 1; isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "changed at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); @@ -5922,7 +5880,6 @@ isp_async(ispsoftc_t *isp, ispasync_t cm if (lp->dev_map_idx && lp->announced == 0 && now) { lp->announced = 1; tgt = lp->dev_map_idx - 1; - FCPARAM(isp, bus)->isp_dev_map[tgt] = 0; lp->dev_map_idx = 0; isp_make_gone(isp, lp, bus, tgt); isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "gone at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Sat Jul 4 21:50:39 2015 (r285153) +++ head/sys/dev/isp/ispvar.h Sun Jul 5 02:09:46 2015 (r285154) @@ -344,12 +344,7 @@ typedef struct { * devices) or by the driver (e.g., for fabric devices). * * It has a state. If the state if VALID, that means that we've logged into - * the device. We also *may* have a initiator map index entry. This is a value - * from 0..MAX_FC_TARG that is used to index into the isp_dev_map array. If - * the value therein is non-zero, then that value minus one is used to index - * into the Port Database to find the handle for forming commands. There is - * back-index minus one value within to Port Database entry that tells us - * which entry in isp_dev_map points to us (to avoid searching). + * the device. * * Local loop devices the firmware automatically performs PLOGI on for us * (which is why that handle is imposed upon us). Fabric devices we assign @@ -395,7 +390,6 @@ typedef struct { /* * The dev_map_idx, if nonzero, is the system virtual target ID (+1) - * as a cross-reference with the isp_dev_map. * * A device is 'autologin' if the firmware automatically logs into * it (re-logins as needed). Basically, local private loop devices. @@ -491,15 +485,6 @@ typedef struct { */ fcportdb_t portdb[MAX_FC_TARG]; - /* - * This maps system virtual 'target' id to a portdb entry. - * - * The mapping function is to take any non-zero entry and - * subtract one to get the portdb index. This means that - * entries which are zero are unmapped (i.e., don't exist). - */ - uint16_t isp_dev_map[MAX_FC_TARG]; - #ifdef ISP_TARGET_MODE /* * This maps N-Port Handle to portdb entry so we From owner-svn-src-all@freebsd.org Sun Jul 5 03:39:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53F2EAE71; Sun, 5 Jul 2015 03:39:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 3853B3E85; Sun, 5 Jul 2015 03:39:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t653d0G1022995; Sun, 5 Jul 2015 03:39:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t653cxQX022985; Sun, 5 Jul 2015 03:38:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201507050338.t653cxQX022985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 5 Jul 2015 03:38:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285155 - in head/sys: cam/ctl dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 03:39:00 -0000 Author: mav Date: Sun Jul 5 03:38:58 2015 New Revision: 285155 URL: https://svnweb.freebsd.org/changeset/base/285155 Log: Make first step toward supporting target and initiator roles same time. To avoid conflicts between target and initiator devices in CAM, make CTL use target ID reported by HBA as its initiator_id in XPT_PATH_INQ. That target ID is known to never be used for initiator role, so it won't conflict. For Fibre Channel and FireWire HBAs this specific ID choice is irrelevant since all target IDs there are virtual. Same time for SPI HBAs it seems could be even requirement to use same target ID for both initiator and target roles. While there are some more things to polish in isp(4) driver, first tests of using both roles same time on the same port appeared successfull: # camcontrol devlist -v scbus0 on isp0 bus 0: at scbus0 target 1 lun 0 (da20,pass21) <> at scbus0 target 256 lun 0 (ctl0) <> at scbus0 target -1 lun ffffffff (ctl1) Modified: head/sys/cam/ctl/scsi_ctl.c head/sys/dev/isp/isp_freebsd.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Sun Jul 5 02:09:46 2015 (r285154) +++ head/sys/cam/ctl/scsi_ctl.c Sun Jul 5 03:38:58 2015 (r285155) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); struct ctlfe_softc { struct ctl_port port; path_id_t path_id; + target_id_t target_id; u_int maxio; struct cam_sim *sim; char port_name[DEV_IDLEN]; @@ -357,6 +358,7 @@ ctlfeasync(void *callback_arg, uint32_t } softc->path_id = cpi->ccb_h.path_id; + softc->target_id = cpi->initiator_id; softc->sim = xpt_path_sim(path); if (cpi->maxio != 0) softc->maxio = cpi->maxio; @@ -1557,6 +1559,8 @@ ctlfe_onoffline(void *arg, int online) } ccb = xpt_alloc_ccb(); xpt_setup_ccb(&ccb->ccb_h, path, CAM_PRIORITY_NONE); + ccb->ccb_h.func_code = XPT_GET_SIM_KNOB; + xpt_action(ccb); /* * Copan WWN format: @@ -1570,15 +1574,7 @@ ctlfe_onoffline(void *arg, int online) * 3 == NL-Port * Bits 7-0: 0 == Node Name, >0 == Port Number */ - if (online != 0) { - - ccb->ccb_h.func_code = XPT_GET_SIM_KNOB; - - - xpt_action(ccb); - - if ((ccb->knob.xport_specific.valid & KNOB_VALID_ADDRESS) != 0){ #ifdef RANDOM_WWNN uint64_t random_bits; @@ -1677,9 +1673,9 @@ ctlfe_onoffline(void *arg, int online) ccb->knob.xport_specific.valid |= KNOB_VALID_ADDRESS; if (online != 0) - ccb->knob.xport_specific.fc.role = KNOB_ROLE_TARGET; + ccb->knob.xport_specific.fc.role |= KNOB_ROLE_TARGET; else - ccb->knob.xport_specific.fc.role = KNOB_ROLE_NONE; + ccb->knob.xport_specific.fc.role &= ~KNOB_ROLE_TARGET; xpt_action(ccb); @@ -1809,7 +1805,7 @@ ctlfe_lun_enable(void *arg, int lun_id) bus_softc = (struct ctlfe_softc *)arg; status = xpt_create_path(&path, /*periph*/ NULL, - bus_softc->path_id, 0, lun_id); + bus_softc->path_id, bus_softc->target_id, lun_id); /* XXX KDM need some way to return status to CTL here? */ if (status != CAM_REQ_CMP) { printf("%s: could not create path, status %#x\n", __func__, Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sun Jul 5 02:09:46 2015 (r285154) +++ head/sys/dev/isp/isp_freebsd.c Sun Jul 5 03:38:58 2015 (r285155) @@ -462,24 +462,11 @@ ispioctl(struct cdev *dev, u_long c, cad retval = EINVAL; break; } - if (IS_FC(isp)) { - /* - * We don't really support dual role at present on FC cards. - * - * We should, but a bunch of things are currently broken, - * so don't allow it. - */ - if (nr == ISP_ROLE_BOTH) { - isp_prt(isp, ISP_LOGERR, "cannot support dual role at present"); - retval = EINVAL; - break; - } - ISP_LOCK(isp); + ISP_LOCK(isp); + if (IS_FC(isp)) *(int *)addr = FCPARAM(isp, chan)->role; - } else { - ISP_LOCK(isp); + else *(int *)addr = SDPARAM(isp, chan)->role; - } retval = isp_control(isp, ISPCTL_CHANGE_ROLE, chan, nr); ISP_UNLOCK(isp); retval = 0; @@ -1262,11 +1249,6 @@ isp_enable_lun(ispsoftc_t *isp, union cc target = ccb->ccb_h.target_id; lun = ccb->ccb_h.target_lun; ISP_PATH_PRT(isp, ISP_LOGTDEBUG0|ISP_LOGCONFIG, ccb->ccb_h.path, "enabling lun %u\n", lun); - if (target != CAM_TARGET_WILDCARD && target != 0) { - ccb->ccb_h.status = CAM_TID_INVALID; - xpt_done(ccb); - return; - } if (target == CAM_TARGET_WILDCARD && lun != CAM_LUN_WILDCARD) { ccb->ccb_h.status = CAM_LUN_INVALID; xpt_done(ccb); @@ -1479,12 +1461,6 @@ isp_disable_lun(ispsoftc_t *isp, union c target = ccb->ccb_h.target_id; lun = ccb->ccb_h.target_lun; ISP_PATH_PRT(isp, ISP_LOGTDEBUG0|ISP_LOGCONFIG, ccb->ccb_h.path, "disabling lun %u\n", lun); - if (target != CAM_TARGET_WILDCARD && target != 0) { - ccb->ccb_h.status = CAM_TID_INVALID; - xpt_done(ccb); - return; - } - if (target == CAM_TARGET_WILDCARD && lun != CAM_LUN_WILDCARD) { ccb->ccb_h.status = CAM_LUN_INVALID; xpt_done(ccb); @@ -5437,21 +5413,10 @@ isp_action(struct cam_sim *sim, union cc } break; case KNOB_ROLE_BOTH: -#if 0 if (fcp->role != ISP_ROLE_BOTH) { rchange = 1; newrole = ISP_ROLE_BOTH; } -#else - /* - * We don't really support dual role at present on FC cards. - * - * We should, but a bunch of things are currently broken, - * so don't allow it. - */ - isp_prt(isp, ISP_LOGERR, "cannot support dual role at present"); - ccb->ccb_h.status = CAM_REQ_INVALID; -#endif break; } if (rchange) { From owner-svn-src-all@freebsd.org Sun Jul 5 09:48:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65F609B4D; Sun, 5 Jul 2015 09:48:05 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 4A5181AB7; Sun, 5 Jul 2015 09:48:05 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t659m5qv004413; Sun, 5 Jul 2015 09:48:05 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t659m41Y004411; Sun, 5 Jul 2015 09:48:04 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507050948.t659m41Y004411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 5 Jul 2015 09:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285156 - in head/usr.sbin/pw: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 09:48:05 -0000 Author: bapt Date: Sun Jul 5 09:48:03 2015 New Revision: 285156 URL: https://svnweb.freebsd.org/changeset/base/285156 Log: Validate expiration dates Use strptime_l(3) to validate the dates provided in input Modified: head/usr.sbin/pw/psdate.c head/usr.sbin/pw/tests/pw_useradd.sh Modified: head/usr.sbin/pw/psdate.c ============================================================================== --- head/usr.sbin/pw/psdate.c Sun Jul 5 03:38:58 2015 (r285155) +++ head/usr.sbin/pw/psdate.c Sun Jul 5 09:48:03 2015 (r285156) @@ -33,6 +33,8 @@ static const char rcsid[] = #include #include #include +#include +#include #include "psdate.h" @@ -95,16 +97,6 @@ weekday(char const ** str) return aindex(days, str, 3); } -static int -month(char const ** str) -{ - static char const *months[] = - {"jan", "feb", "mar", "apr", "may", "jun", "jul", - "aug", "sep", "oct", "nov", "dec", NULL}; - - return aindex(months, str, 3); -} - static void parse_time(char const * str, int *hour, int *min, int *sec) { @@ -122,34 +114,35 @@ parse_time(char const * str, int *hour, static void parse_datesub(char const * str, int *day, int *mon, int *year) { - int i; - - static char const nchrs[] = "0123456789 \t,/-."; + struct tm tm; + locale_t l; + int i; + char *ret; + const char *valid_formats[] = { + "%d-%b-%y", + "%d-%b-%Y", + "%d-%m-%y", + "%d-%m-%Y", + NULL, + }; + + l = newlocale(LC_ALL_MASK, "C", NULL); + + memset(&tm, 0, sizeof(tm)); + for (i=0; valid_formats[i] != NULL; i++) { + ret = strptime_l(str, valid_formats[i], &tm, l); + if (ret && *ret == '\0') { + *day = tm.tm_mday; + *mon = tm.tm_mon; + *year = tm.tm_year; + freelocale(l); + return; + } + } - if ((i = month(&str)) != -1) { - *mon = i; - if ((i = a2i(&str)) != 0) - *day = i; - } else if ((i = a2i(&str)) != 0) { - *day = i; - while (*str && strchr(nchrs + 10, *str) != NULL) - ++str; - if ((i = month(&str)) != -1) - *mon = i; - else if ((i = a2i(&str)) != 0) - *mon = i - 1; - } else - return; + freelocale(l); - while (*str && strchr(nchrs + 10, *str) != NULL) - ++str; - if (isdigit((unsigned char)*str)) { - *year = atoi(str); - if (*year > 1900) - *year -= 1900; - else if (*year < 32) - *year += 100; - } + errx(EXIT_FAILURE, "Invalid date"); } Modified: head/usr.sbin/pw/tests/pw_useradd.sh ============================================================================== --- head/usr.sbin/pw/tests/pw_useradd.sh Sun Jul 5 03:38:58 2015 (r285155) +++ head/usr.sbin/pw/tests/pw_useradd.sh Sun Jul 5 09:48:03 2015 (r285156) @@ -176,6 +176,31 @@ user_add_name_too_long_body() { ${PW} useradd name_very_vert_very_very_very_long } +atf_test_case user_add_expiration +user_add_expiration_body() { + populate_etc_skel + + atf_check -s exit:0 \ + ${PW} useradd foo -e 20-03-2043 + atf_check -o inline:"foo:*:1001:1001::0:2310422400:User &:/home/foo:/bin/sh\n" \ + -s exit:0 grep "^foo" ${HOME}/master.passwd + atf_check -s exit:0 ${PW} userdel foo + atf_check -s exit:0 \ + ${PW} useradd foo -e 20-03-43 + atf_check -o inline:"foo:*:1001:1001::0:2310422400:User &:/home/foo:/bin/sh\n" \ + -s exit:0 grep "^foo" ${HOME}/master.passwd + atf_check -s exit:0 ${PW} userdel foo + atf_check -s exit:0 \ + ${PW} useradd foo -e 20-Mar-2043 + atf_check -o inline:"foo:*:1001:1001::0:2310422400:User &:/home/foo:/bin/sh\n" \ + -s exit:0 grep "^foo" ${HOME}/master.passwd + atf_check -s exit:0 ${PW} userdel foo + atf_check -e inline:"pw: Invalid date\n" -s exit:1 \ + ${PW} useradd foo -e 20-Foo-2043 + atf_check -e inline:"pw: Invalid date\n" -s exit:1 \ + ${PW} useradd foo -e 20-13-2043 +} + atf_init_test_cases() { atf_add_test_case user_add atf_add_test_case user_add_noupdate @@ -193,4 +218,5 @@ atf_init_test_cases() { atf_add_test_case user_add_password_expiration_date_month atf_add_test_case user_add_password_expiration_date_relative atf_add_test_case user_add_name_too_long + atf_add_test_case user_add_expiration } From owner-svn-src-all@freebsd.org Sun Jul 5 10:11:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D02A2A050; Sun, 5 Jul 2015 10:11:36 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 BA06D1580; Sun, 5 Jul 2015 10:11:36 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65ABa3V016052; Sun, 5 Jul 2015 10:11:36 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65ABa9R016050; Sun, 5 Jul 2015 10:11:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507051011.t65ABa9R016050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 5 Jul 2015 10:11:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285157 - in head/usr.sbin/pw: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 10:11:36 -0000 Author: bapt Date: Sun Jul 5 10:11:35 2015 New Revision: 285157 URL: https://svnweb.freebsd.org/changeset/base/285157 Log: Also validate hours via strptime_l(3) Simplify the code, by only using one parser, ensure the dates (hours and dates) are valid Modified: head/usr.sbin/pw/psdate.c head/usr.sbin/pw/tests/pw_useradd.sh Modified: head/usr.sbin/pw/psdate.c ============================================================================== --- head/usr.sbin/pw/psdate.c Sun Jul 5 09:48:03 2015 (r285156) +++ head/usr.sbin/pw/psdate.c Sun Jul 5 10:11:35 2015 (r285157) @@ -98,21 +98,7 @@ weekday(char const ** str) } static void -parse_time(char const * str, int *hour, int *min, int *sec) -{ - *hour = a2i(&str); - if ((str = strchr(str, ':')) == NULL) - *min = *sec = 0; - else { - ++str; - *min = a2i(&str); - *sec = ((str = strchr(str, ':')) == NULL) ? 0 : atoi(++str); - } -} - - -static void -parse_datesub(char const * str, int *day, int *mon, int *year) +parse_datesub(char const * str, struct tm *t) { struct tm tm; locale_t l; @@ -123,6 +109,38 @@ parse_datesub(char const * str, int *day "%d-%b-%Y", "%d-%m-%y", "%d-%m-%Y", + "%H:%M %d-%b-%y", + "%H:%M %d-%b-%Y", + "%H:%M %d-%m-%y", + "%H:%M %d-%m-%Y", + "%H:%M:%S %d-%b-%y", + "%H:%M:%S %d-%b-%Y", + "%H:%M:%S %d-%m-%y", + "%H:%M:%S %d-%m-%Y", + "%d-%b-%y %H:%M", + "%d-%b-%Y %H:%M", + "%d-%m-%y %H:%M", + "%d-%m-%Y %H:%M", + "%d-%b-%y %H:%M:%S", + "%d-%b-%Y %H:%M:%S", + "%d-%m-%y %H:%M:%S", + "%d-%m-%Y %H:%M:%S", + "%H:%M\t%d-%b-%y", + "%H:%M\t%d-%b-%Y", + "%H:%M\t%d-%m-%y", + "%H:%M\t%d-%m-%Y", + "%H:%M\t%S %d-%b-%y", + "%H:%M\t%S %d-%b-%Y", + "%H:%M\t%S %d-%m-%y", + "%H:%M\t%S %d-%m-%Y", + "%d-%b-%y\t%H:%M", + "%d-%b-%Y\t%H:%M", + "%d-%m-%y\t%H:%M", + "%d-%m-%Y\t%H:%M", + "%d-%b-%y\t%H:%M:%S", + "%d-%b-%Y\t%H:%M:%S", + "%d-%m-%y\t%H:%M:%S", + "%d-%m-%Y\t%H:%M:%S", NULL, }; @@ -132,9 +150,12 @@ parse_datesub(char const * str, int *day for (i=0; valid_formats[i] != NULL; i++) { ret = strptime_l(str, valid_formats[i], &tm, l); if (ret && *ret == '\0') { - *day = tm.tm_mday; - *mon = tm.tm_mon; - *year = tm.tm_year; + t->tm_mday = tm.tm_mday; + t->tm_mon = tm.tm_mon; + t->tm_year = tm.tm_year; + t->tm_hour = tm.tm_hour; + t->tm_min = tm.tm_min; + t->tm_sec = tm.tm_sec; freelocale(l); return; } @@ -249,39 +270,7 @@ parse_date(time_t dt, char const * str) } } - /* - * See if there is a time hh:mm[:ss] - */ - if ((p = strchr(tmp, ':')) == NULL) { - - /* - * No time string involved - */ - T->tm_hour = T->tm_min = T->tm_sec = 0; - parse_datesub(tmp, &T->tm_mday, &T->tm_mon, &T->tm_year); - } else { - char datestr[64], timestr[64]; - - /* - * Let's chip off the time string - */ - if ((q = strpbrk(p, " \t")) != NULL) { /* Time first? */ - int l = q - str; - - strlcpy(timestr, str, l + 1); - strlcpy(datestr, q + 1, sizeof(datestr)); - parse_time(timestr, &T->tm_hour, &T->tm_min, &T->tm_sec); - parse_datesub(datestr, &T->tm_mday, &T->tm_mon, &T->tm_year); - } else if ((q = strrchr(tmp, ' ')) != NULL) { /* Time last */ - int l = q - tmp; - - strlcpy(timestr, q + 1, sizeof(timestr)); - strlcpy(datestr, tmp, l + 1); - } else /* Bail out */ - return dt; - parse_time(timestr, &T->tm_hour, &T->tm_min, &T->tm_sec); - parse_datesub(datestr, &T->tm_mday, &T->tm_mon, &T->tm_year); - } + parse_datesub(tmp, T); dt = mktime(T); } return dt; Modified: head/usr.sbin/pw/tests/pw_useradd.sh ============================================================================== --- head/usr.sbin/pw/tests/pw_useradd.sh Sun Jul 5 09:48:03 2015 (r285156) +++ head/usr.sbin/pw/tests/pw_useradd.sh Sun Jul 5 10:11:35 2015 (r285157) @@ -199,6 +199,12 @@ user_add_expiration_body() { ${PW} useradd foo -e 20-Foo-2043 atf_check -e inline:"pw: Invalid date\n" -s exit:1 \ ${PW} useradd foo -e 20-13-2043 + atf_check -s exit:0 ${PW} useradd foo -e "12:00 20-03-2043" + atf_check -s exit:0 ${PW} userdel foo + atf_check -e inline:"pw: Invalid date\n" -s exit:1 \ + ${PW} useradd foo -e "12 20-03-2043" + atf_check -s exit:0 ${PW} useradd foo -e "20-03-2043 12:00" + atf_check -s exit:0 ${PW} userdel foo } atf_init_test_cases() { From owner-svn-src-all@freebsd.org Sun Jul 5 10:14:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB4ECA08B; Sun, 5 Jul 2015 10:14:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 BBE7E18C6; Sun, 5 Jul 2015 10:14:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65AEZK0018975; Sun, 5 Jul 2015 10:14:35 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65AEZcs018974; Sun, 5 Jul 2015 10:14:35 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507051014.t65AEZcs018974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 5 Jul 2015 10:14:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285158 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 10:14:35 -0000 Author: bapt Date: Sun Jul 5 10:14:34 2015 New Revision: 285158 URL: https://svnweb.freebsd.org/changeset/base/285158 Log: Remove dead code Modified: head/usr.sbin/pw/psdate.c Modified: head/usr.sbin/pw/psdate.c ============================================================================== --- head/usr.sbin/pw/psdate.c Sun Jul 5 10:11:35 2015 (r285157) +++ head/usr.sbin/pw/psdate.c Sun Jul 5 10:14:34 2015 (r285158) @@ -40,21 +40,6 @@ static const char rcsid[] = static int -a2i(char const ** str) -{ - int i = 0; - char const *s = *str; - - if (isdigit((unsigned char)*s)) { - i = atoi(s); - while (isdigit((unsigned char)*s)) - ++s; - *str = s; - } - return i; -} - -static int numerics(char const * str) { int rc = isdigit((unsigned char)*str); From owner-svn-src-all@freebsd.org Sun Jul 5 11:42:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57CDDAB9B; Sun, 5 Jul 2015 11:42:02 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 47E3F1968; Sun, 5 Jul 2015 11:42:02 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65Bg2Z0062986; Sun, 5 Jul 2015 11:42:02 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65Bg25N062985; Sun, 5 Jul 2015 11:42:02 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507051142.t65Bg25N062985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 5 Jul 2015 11:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285159 - head/libexec/rtld-elf/aarch64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 11:42:02 -0000 Author: andrew Date: Sun Jul 5 11:42:01 2015 New Revision: 285159 URL: https://svnweb.freebsd.org/changeset/base/285159 Log: Add on the addend when in the R_AARCH64_ABS64 and R_AARCH64_GLOB_DAT cases. This fixes at least sshd, and some of the boehm-gc tests. Sponsored by: ABT Systems Ltd Modified: head/libexec/rtld-elf/aarch64/reloc.c Modified: head/libexec/rtld-elf/aarch64/reloc.c ============================================================================== --- head/libexec/rtld-elf/aarch64/reloc.c Sun Jul 5 10:14:34 2015 (r285158) +++ head/libexec/rtld-elf/aarch64/reloc.c Sun Jul 5 11:42:01 2015 (r285159) @@ -341,7 +341,8 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry if (def == NULL) return (-1); - *where = (Elf_Addr)defobj->relocbase + def->st_value; + *where = (Elf_Addr)defobj->relocbase + def->st_value + + rela->r_addend; break; case R_AARCH64_COPY: /* From owner-svn-src-all@freebsd.org Sun Jul 5 14:15:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B07EE9447; Sun, 5 Jul 2015 14:15:59 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 A0CF91122; Sun, 5 Jul 2015 14:15:59 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65EFxnu044358; Sun, 5 Jul 2015 14:15:59 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65EFxWd044357; Sun, 5 Jul 2015 14:15:59 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201507051415.t65EFxWd044357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 5 Jul 2015 14:15:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285160 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 14:15:59 -0000 Author: ian Date: Sun Jul 5 14:15:58 2015 New Revision: 285160 URL: https://svnweb.freebsd.org/changeset/base/285160 Log: Ensure all the required files get built when you include the IPSEC option. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Jul 5 11:42:01 2015 (r285159) +++ head/sys/conf/files Sun Jul 5 14:15:58 2015 (r285160) @@ -3902,17 +3902,17 @@ ofed/drivers/infiniband/hw/mthca/mthca_u # crypto support opencrypto/cast.c optional crypto | ipsec -opencrypto/criov.c optional crypto -opencrypto/crypto.c optional crypto +opencrypto/criov.c optional crypto | ipsec +opencrypto/crypto.c optional crypto | ipsec opencrypto/cryptodev.c optional cryptodev -opencrypto/cryptodev_if.m optional crypto -opencrypto/cryptosoft.c optional crypto -opencrypto/cryptodeflate.c optional crypto -opencrypto/gmac.c optional crypto -opencrypto/gfmult.c optional crypto +opencrypto/cryptodev_if.m optional crypto | ipsec +opencrypto/cryptosoft.c optional crypto | ipsec +opencrypto/cryptodeflate.c optional crypto | ipsec +opencrypto/gmac.c optional crypto | ipsec +opencrypto/gfmult.c optional crypto | ipsec opencrypto/rmd160.c optional crypto | ipsec -opencrypto/skipjack.c optional crypto -opencrypto/xform.c optional crypto +opencrypto/skipjack.c optional crypto | ipsec +opencrypto/xform.c optional crypto | ipsec rpc/auth_none.c optional krpc | nfslockd | nfscl | nfsd rpc/auth_unix.c optional krpc | nfslockd | nfscl | nfsd rpc/authunix_prot.c optional krpc | nfslockd | nfscl | nfsd From owner-svn-src-all@freebsd.org Sun Jul 5 14:16:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AF999486; Sun, 5 Jul 2015 14:16:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 0B843126B; Sun, 5 Jul 2015 14:16:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65EGVL2044537; Sun, 5 Jul 2015 14:16:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65EGVjL044536; Sun, 5 Jul 2015 14:16:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201507051416.t65EGVjL044536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 5 Jul 2015 14:16:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285161 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 14:16:32 -0000 Author: ian Date: Sun Jul 5 14:16:31 2015 New Revision: 285161 URL: https://svnweb.freebsd.org/changeset/base/285161 Log: Enable ipsec by default on all armv6 platforms. Modified: head/sys/arm/conf/std.armv6 Modified: head/sys/arm/conf/std.armv6 ============================================================================== --- head/sys/arm/conf/std.armv6 Sun Jul 5 14:15:58 2015 (r285160) +++ head/sys/arm/conf/std.armv6 Sun Jul 5 14:16:31 2015 (r285161) @@ -5,6 +5,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options IPSEC # IP (v4/v6) security options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support From owner-svn-src-all@freebsd.org Sun Jul 5 14:17:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C5FD94B5; Sun, 5 Jul 2015 14:17:58 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 6BB2E14CE; Sun, 5 Jul 2015 14:17:58 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65EHwc9044873; Sun, 5 Jul 2015 14:17:58 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65EHwYF044872; Sun, 5 Jul 2015 14:17:58 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201507051417.t65EHwYF044872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Sun, 5 Jul 2015 14:17:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285162 - stable/10/contrib/pf/pflogd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 14:17:58 -0000 Author: wblock (doc committer) Date: Sun Jul 5 14:17:57 2015 New Revision: 285162 URL: https://svnweb.freebsd.org/changeset/base/285162 Log: MFC r284914: Fix a couple of missing lines that obscured the -p description. Approved by: re Modified: stable/10/contrib/pf/pflogd/pflogd.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/pf/pflogd/pflogd.8 ============================================================================== --- stable/10/contrib/pf/pflogd/pflogd.8 Sun Jul 5 14:16:31 2015 (r285161) +++ stable/10/contrib/pf/pflogd/pflogd.8 Sun Jul 5 14:17:57 2015 (r285162) @@ -125,9 +125,11 @@ By default, .Nm will use .Ar pflog0 . +.It Fl p Ar pidfile Writes a file containing the process ID of the program to .Pa /var/run . The file name has the form +.Ao Ar pidfile Ac Ns .pid . The default is .Ar pflogd . .It Fl s Ar snaplen From owner-svn-src-all@freebsd.org Sun Jul 5 14:21:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF16795E9; Sun, 5 Jul 2015 14:21:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 A3DDC19DB; Sun, 5 Jul 2015 14:21:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65ELogM049442; Sun, 5 Jul 2015 14:21:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65ELdbd049254; Sun, 5 Jul 2015 14:21:39 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201507051421.t65ELdbd049254@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Jul 2015 14:21:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r285163 - in vendor/llvm/dist: . autoconf bindings/ocaml/executionengine cmake cmake/modules docs docs/CommandGuide examples/Kaleidoscope/Orc/fully_lazy examples/Kaleidoscope/Orc/initia... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 14:21:51 -0000 Author: dim Date: Sun Jul 5 14:21:36 2015 New Revision: 285163 URL: https://svnweb.freebsd.org/changeset/base/285163 Log: Vendor import of llvm trunk r241361: https://llvm.org/svn/llvm-project/llvm/trunk@241361 Added: vendor/llvm/dist/include/llvm/Analysis/VectorUtils.h (contents, props changed) vendor/llvm/dist/include/llvm/AsmParser/SlotMapping.h (contents, props changed) vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/NullResolver.h (contents, props changed) vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h (contents, props changed) vendor/llvm/dist/include/llvm/IR/ModuleSlotTracker.h (contents, props changed) vendor/llvm/dist/include/llvm/IR/Value.def vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmParserUtils.h (contents, props changed) vendor/llvm/dist/include/llvm/Object/StackMapParser.h (contents, props changed) vendor/llvm/dist/include/llvm/Object/SymbolSize.h (contents, props changed) vendor/llvm/dist/lib/Analysis/VectorUtils.cpp (contents, props changed) vendor/llvm/dist/lib/CodeGen/AsmPrinter/DebugLocStream.cpp (contents, props changed) vendor/llvm/dist/lib/CodeGen/InterleavedAccessPass.cpp (contents, props changed) vendor/llvm/dist/lib/CodeGen/MIRParser/MILexer.cpp (contents, props changed) vendor/llvm/dist/lib/CodeGen/MIRParser/MILexer.h (contents, props changed) vendor/llvm/dist/lib/CodeGen/MIRParser/MIParser.cpp (contents, props changed) vendor/llvm/dist/lib/CodeGen/MIRParser/MIParser.h (contents, props changed) vendor/llvm/dist/lib/ExecutionEngine/Orc/NullResolver.cpp (contents, props changed) vendor/llvm/dist/lib/Object/SymbolSize.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h (contents, props changed) vendor/llvm/dist/lib/Target/AMDGPU/Utils/ vendor/llvm/dist/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h (contents, props changed) vendor/llvm/dist/lib/Target/AMDGPU/Utils/CMakeLists.txt (contents, props changed) vendor/llvm/dist/lib/Target/AMDGPU/Utils/LLVMBuild.txt (contents, props changed) vendor/llvm/dist/lib/Target/AMDGPU/Utils/Makefile (contents, props changed) vendor/llvm/dist/lib/Target/NVPTX/NVPTXPeephole.cpp (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/ vendor/llvm/dist/lib/Target/WebAssembly/CMakeLists.txt (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/InstPrinter/ vendor/llvm/dist/lib/Target/WebAssembly/InstPrinter/CMakeLists.txt (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/InstPrinter/LLVMBuild.txt (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/InstPrinter/Makefile (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/LLVMBuild.txt (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/ vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/CMakeLists.txt (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/LLVMBuild.txt (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/Makefile (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/Makefile (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/README.txt (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/TargetInfo/ vendor/llvm/dist/lib/Target/WebAssembly/TargetInfo/CMakeLists.txt (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/TargetInfo/LLVMBuild.txt (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/TargetInfo/Makefile (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssembly.h (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssembly.td vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyFrameLowering.h (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyISelLowering.h (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyInstrAtomics.td vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyInstrFormats.td vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyInstrInfo.h (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyInstrInfo.td vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyRegisterInfo.h (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyRegisterInfo.td vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.cpp (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.h (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblySubtarget.cpp (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblySubtarget.h (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyTargetMachine.h (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.h (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp (contents, props changed) vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h (contents, props changed) vendor/llvm/dist/test/Analysis/LazyCallGraph/non-leaf-intrinsics.ll vendor/llvm/dist/test/Analysis/LoopAccessAnalysis/non-wrapping-pointer.ll vendor/llvm/dist/test/Assembler/dimodule.ll vendor/llvm/dist/test/Bindings/llvm-c/ARM/ vendor/llvm/dist/test/Bindings/llvm-c/ARM/disassemble.test vendor/llvm/dist/test/Bindings/llvm-c/ARM/lit.local.cfg vendor/llvm/dist/test/Bindings/llvm-c/X86/ vendor/llvm/dist/test/Bindings/llvm-c/X86/disassemble.test vendor/llvm/dist/test/Bindings/llvm-c/X86/lit.local.cfg vendor/llvm/dist/test/Bitcode/Inputs/PR23310.bc (contents, props changed) vendor/llvm/dist/test/Bitcode/PR23310.test vendor/llvm/dist/test/CodeGen/AArch64/aarch-multipart.ll vendor/llvm/dist/test/CodeGen/AArch64/aarch64-interleaved-accesses.ll vendor/llvm/dist/test/CodeGen/AMDGPU/commute-shifts.ll vendor/llvm/dist/test/CodeGen/AMDGPU/subreg-coalescer-undef-use.ll vendor/llvm/dist/test/CodeGen/ARM/arm-interleaved-accesses.ll vendor/llvm/dist/test/CodeGen/ARM/fnattr-trap.ll vendor/llvm/dist/test/CodeGen/ARM/load-store-flags.ll vendor/llvm/dist/test/CodeGen/MIR/X86/ vendor/llvm/dist/test/CodeGen/MIR/X86/expected-machine-operand.mir vendor/llvm/dist/test/CodeGen/MIR/X86/expected-number-after-bb.mir vendor/llvm/dist/test/CodeGen/MIR/X86/global-value-operands.mir vendor/llvm/dist/test/CodeGen/MIR/X86/immediate-operands.mir vendor/llvm/dist/test/CodeGen/MIR/X86/large-index-number-error.mir vendor/llvm/dist/test/CodeGen/MIR/X86/lit.local.cfg vendor/llvm/dist/test/CodeGen/MIR/X86/machine-basic-block-operands.mir vendor/llvm/dist/test/CodeGen/MIR/X86/machine-instructions.mir vendor/llvm/dist/test/CodeGen/MIR/X86/missing-comma.mir vendor/llvm/dist/test/CodeGen/MIR/X86/missing-instruction.mir vendor/llvm/dist/test/CodeGen/MIR/X86/named-registers.mir vendor/llvm/dist/test/CodeGen/MIR/X86/null-register-operands.mir vendor/llvm/dist/test/CodeGen/MIR/X86/register-mask-operands.mir vendor/llvm/dist/test/CodeGen/MIR/X86/undefined-global-value.mir vendor/llvm/dist/test/CodeGen/MIR/X86/undefined-named-global-value.mir vendor/llvm/dist/test/CodeGen/MIR/X86/unknown-instruction.mir vendor/llvm/dist/test/CodeGen/MIR/X86/unknown-machine-basic-block.mir vendor/llvm/dist/test/CodeGen/MIR/X86/unknown-named-machine-basic-block.mir vendor/llvm/dist/test/CodeGen/MIR/X86/unknown-register.mir vendor/llvm/dist/test/CodeGen/MIR/X86/unrecognized-character.mir vendor/llvm/dist/test/CodeGen/MIR/expected-eof-after-successor-mbb.mir vendor/llvm/dist/test/CodeGen/MIR/expected-mbb-reference-for-successor-mbb.mir vendor/llvm/dist/test/CodeGen/MIR/machine-basic-block-redefinition-error.mir vendor/llvm/dist/test/CodeGen/MIR/register-info.mir vendor/llvm/dist/test/CodeGen/MIR/successor-basic-blocks.mir vendor/llvm/dist/test/CodeGen/NVPTX/extloadv.ll vendor/llvm/dist/test/CodeGen/NVPTX/globals_lowering.ll vendor/llvm/dist/test/CodeGen/PowerPC/builtins-ppc-elf2-abi.ll vendor/llvm/dist/test/CodeGen/PowerPC/lxvw4x-bug.ll vendor/llvm/dist/test/CodeGen/PowerPC/swaps-le-3.ll vendor/llvm/dist/test/CodeGen/PowerPC/swaps-le-4.ll vendor/llvm/dist/test/CodeGen/PowerPC/vec_mergeow.ll vendor/llvm/dist/test/CodeGen/X86/asm-mismatched-types.ll vendor/llvm/dist/test/CodeGen/X86/coff-weak.ll vendor/llvm/dist/test/CodeGen/X86/fma-intrinsics-phi-213-to-231.ll vendor/llvm/dist/test/CodeGen/X86/fma-intrinsics-x86.ll vendor/llvm/dist/test/CodeGen/X86/fold-load-binops.ll vendor/llvm/dist/test/CodeGen/X86/fold-vector-sext-crash2.ll vendor/llvm/dist/test/CodeGen/X86/fold-vector-shl-crash.ll vendor/llvm/dist/test/CodeGen/X86/machine-combiner.ll vendor/llvm/dist/test/CodeGen/X86/pr23900.ll vendor/llvm/dist/test/CodeGen/X86/rrlist-livereg-corrutpion.ll vendor/llvm/dist/test/CodeGen/X86/seh-filter-no-personality.ll vendor/llvm/dist/test/CodeGen/X86/system-intrinsics-64.ll vendor/llvm/dist/test/CodeGen/X86/system-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-ashr-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-ashr-256.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-lshr-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-lshr-256.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-shl-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-shl-256.ll vendor/llvm/dist/test/DebugInfo/AArch64/bitfields.ll vendor/llvm/dist/test/DebugInfo/ARM/bitfield.ll vendor/llvm/dist/test/DebugInfo/X86/DIModule.ll vendor/llvm/dist/test/DebugInfo/X86/bitfields.ll vendor/llvm/dist/test/DebugInfo/X86/debug-info-packed-struct.ll vendor/llvm/dist/test/DebugInfo/X86/debug-loc-empty-entries.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/X86/asm_more_registers_than_available.ll vendor/llvm/dist/test/Linker/comdat10.ll vendor/llvm/dist/test/MC/AArch64/alias-addsubimm.s (contents, props changed) vendor/llvm/dist/test/MC/AMDGPU/hsa.s (contents, props changed) vendor/llvm/dist/test/MC/AMDGPU/hsa_code_object_isa_noargs.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/directive-type-diagnostics.s (contents, props changed) vendor/llvm/dist/test/MC/COFF/ARM/ vendor/llvm/dist/test/MC/COFF/ARM/directive-type-diagnostics.s (contents, props changed) vendor/llvm/dist/test/MC/COFF/ARM/lit.local.cfg vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2/valid-mips32r2-el.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r3/valid-mips32r3-el.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r5/valid-mips32r5-el.txt (contents, props changed) vendor/llvm/dist/test/MC/ELF/many-sections-3.s (contents, props changed) vendor/llvm/dist/test/MC/ELF/relax-arith2.s (contents, props changed) vendor/llvm/dist/test/MC/ELF/relax-arith3.s (contents, props changed) vendor/llvm/dist/test/MC/ELF/symver-pr23914.s (contents, props changed) vendor/llvm/dist/test/MC/ELF/undef-temp.s (contents, props changed) vendor/llvm/dist/test/MC/MachO/ARM/directive-type-diagnostics.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/micromips32r6/invalid.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/mips-cop0-reginfo.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/module-hardfloat.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/module-softfloat.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/set-oddspreg-nooddspreg-error.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/set-oddspreg-nooddspreg.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/update-module-level-options.s (contents, props changed) vendor/llvm/dist/test/MC/X86/AlignedBundling/misaligned-bundle-group.s (contents, props changed) vendor/llvm/dist/test/MC/X86/AlignedBundling/misaligned-bundle.s (contents, props changed) vendor/llvm/dist/test/MC/X86/AlignedBundling/rodata-section.s (contents, props changed) vendor/llvm/dist/test/MC/X86/faultmap-section-parsing.s (contents, props changed) vendor/llvm/dist/test/MC/X86/inline-asm-obj.ll vendor/llvm/dist/test/Object/ARM/nm-mapping-symbol.s (contents, props changed) vendor/llvm/dist/test/Object/Inputs/invalid-section-index.elf (contents, props changed) vendor/llvm/dist/test/Object/Inputs/invalid-section-size.elf (contents, props changed) vendor/llvm/dist/test/Object/Inputs/invalid-sh_entsize.elf (contents, props changed) vendor/llvm/dist/test/Object/Inputs/invalid-strtab-non-null.elf (contents, props changed) vendor/llvm/dist/test/Object/Inputs/invalid-strtab-size.elf (contents, props changed) vendor/llvm/dist/test/Object/Inputs/invalid-strtab-type.elf (contents, props changed) vendor/llvm/dist/test/Object/Inputs/stackmap-test.macho-x86-64 (contents, props changed) vendor/llvm/dist/test/Object/X86/nm-print-size.s (contents, props changed) vendor/llvm/dist/test/Object/dllimport-globalref.ll vendor/llvm/dist/test/Object/stackmap-dump.test vendor/llvm/dist/test/Transforms/GVN/br-identical.ll vendor/llvm/dist/test/Transforms/Inline/X86/ vendor/llvm/dist/test/Transforms/Inline/X86/inline-target-attr.ll vendor/llvm/dist/test/Transforms/Inline/X86/lit.local.cfg vendor/llvm/dist/test/Transforms/Inline/nonnull.ll vendor/llvm/dist/test/Transforms/InstCombine/pr23809.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/shl.ll vendor/llvm/dist/test/Transforms/LoopUnroll/X86/mmx.ll vendor/llvm/dist/test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/ptr-indvar-crash.ll vendor/llvm/dist/test/Transforms/LoopVectorize/optsize.ll vendor/llvm/dist/test/Transforms/LowerBitSets/nonglobal.ll vendor/llvm/dist/test/Transforms/PruneEH/pr23971.ll vendor/llvm/dist/test/Transforms/StraightLineStrengthReduce/AMDGPU/pr23975.ll vendor/llvm/dist/test/tools/llvm-cxxdump/X86/ vendor/llvm/dist/test/tools/llvm-cxxdump/X86/lit.local.cfg vendor/llvm/dist/test/tools/llvm-cxxdump/X86/sym-size.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/fat.c (contents, props changed) vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/fat.o (contents, props changed) vendor/llvm/dist/test/tools/llvm-symbolizer/fat.test vendor/llvm/dist/tools/llvm-readobj/StackMapPrinter.h (contents, props changed) vendor/llvm/dist/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp (contents, props changed) Deleted: vendor/llvm/dist/include/llvm/Transforms/Utils/VectorUtils.h vendor/llvm/dist/test/Bindings/llvm-c/disassemble.test vendor/llvm/dist/test/Bindings/llvm-c/lit.local.cfg vendor/llvm/dist/test/CodeGen/X86/avx512-shuffle.ll vendor/llvm/dist/test/CodeGen/X86/fma-intrinsics-x86_64.ll vendor/llvm/dist/test/CodeGen/X86/fma3-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/vec_shift8.ll vendor/llvm/dist/test/MC/Disassembler/Mips/mips2.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2/valid-mips32r2-le.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r3/valid-mips32r3-le.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r5/valid-mips32r5-le.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r6.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r2.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r6.txt vendor/llvm/dist/test/MC/ELF/undef2.s vendor/llvm/dist/test/Transforms/CodeGenPrepare/R600/ vendor/llvm/dist/test/Transforms/LoopIdiom/R600/ vendor/llvm/dist/test/Transforms/SLPVectorizer/R600/ vendor/llvm/dist/test/Transforms/SeparateConstOffsetFromGEP/R600/ vendor/llvm/dist/test/Transforms/SimplifyCFG/R600/ vendor/llvm/dist/test/Transforms/StraightLineStrengthReduce/R600/ Modified: vendor/llvm/dist/.gitignore vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/CODE_OWNERS.TXT vendor/llvm/dist/CREDITS.TXT vendor/llvm/dist/Makefile.config.in vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/bindings/ocaml/executionengine/llvm_executionengine.ml vendor/llvm/dist/cmake/config-ix.cmake vendor/llvm/dist/cmake/modules/AddLLVM.cmake vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake vendor/llvm/dist/cmake/modules/Makefile vendor/llvm/dist/configure vendor/llvm/dist/docs/AMDGPUUsage.rst vendor/llvm/dist/docs/AliasAnalysis.rst vendor/llvm/dist/docs/CMake.rst vendor/llvm/dist/docs/CodeGenerator.rst vendor/llvm/dist/docs/CommandGuide/llvm-dwarfdump.rst vendor/llvm/dist/docs/FaultMaps.rst vendor/llvm/dist/docs/GettingStarted.rst vendor/llvm/dist/docs/LangRef.rst vendor/llvm/dist/docs/Phabricator.rst vendor/llvm/dist/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Orc/initial/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp vendor/llvm/dist/include/llvm-c/lto.h vendor/llvm/dist/include/llvm/ADT/APInt.h vendor/llvm/dist/include/llvm/ADT/APSInt.h vendor/llvm/dist/include/llvm/ADT/ArrayRef.h vendor/llvm/dist/include/llvm/ADT/BitVector.h vendor/llvm/dist/include/llvm/ADT/DenseMap.h vendor/llvm/dist/include/llvm/ADT/DenseMapInfo.h vendor/llvm/dist/include/llvm/ADT/DenseSet.h vendor/llvm/dist/include/llvm/ADT/DepthFirstIterator.h vendor/llvm/dist/include/llvm/ADT/EquivalenceClasses.h vendor/llvm/dist/include/llvm/ADT/GraphTraits.h vendor/llvm/dist/include/llvm/ADT/IndexedMap.h vendor/llvm/dist/include/llvm/ADT/IntEqClasses.h vendor/llvm/dist/include/llvm/ADT/Optional.h vendor/llvm/dist/include/llvm/ADT/PointerUnion.h vendor/llvm/dist/include/llvm/ADT/PostOrderIterator.h vendor/llvm/dist/include/llvm/ADT/PriorityQueue.h vendor/llvm/dist/include/llvm/ADT/SCCIterator.h vendor/llvm/dist/include/llvm/ADT/STLExtras.h vendor/llvm/dist/include/llvm/ADT/SetOperations.h vendor/llvm/dist/include/llvm/ADT/SetVector.h vendor/llvm/dist/include/llvm/ADT/SmallBitVector.h vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h vendor/llvm/dist/include/llvm/ADT/SmallString.h vendor/llvm/dist/include/llvm/ADT/SmallVector.h vendor/llvm/dist/include/llvm/ADT/Statistic.h vendor/llvm/dist/include/llvm/ADT/StringExtras.h vendor/llvm/dist/include/llvm/ADT/StringMap.h vendor/llvm/dist/include/llvm/ADT/StringRef.h vendor/llvm/dist/include/llvm/ADT/StringSet.h vendor/llvm/dist/include/llvm/ADT/Triple.h vendor/llvm/dist/include/llvm/ADT/Twine.h vendor/llvm/dist/include/llvm/ADT/edit_distance.h vendor/llvm/dist/include/llvm/ADT/ilist.h vendor/llvm/dist/include/llvm/ADT/ilist_node.h vendor/llvm/dist/include/llvm/ADT/iterator.h vendor/llvm/dist/include/llvm/ADT/iterator_range.h vendor/llvm/dist/include/llvm/Analysis/AliasAnalysis.h vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h vendor/llvm/dist/include/llvm/Analysis/BlockFrequencyInfo.h vendor/llvm/dist/include/llvm/Analysis/BlockFrequencyInfoImpl.h vendor/llvm/dist/include/llvm/Analysis/BranchProbabilityInfo.h vendor/llvm/dist/include/llvm/Analysis/CFG.h vendor/llvm/dist/include/llvm/Analysis/CFGPrinter.h vendor/llvm/dist/include/llvm/Analysis/CGSCCPassManager.h vendor/llvm/dist/include/llvm/Analysis/CallGraph.h vendor/llvm/dist/include/llvm/Analysis/CallGraphSCCPass.h vendor/llvm/dist/include/llvm/Analysis/CodeMetrics.h vendor/llvm/dist/include/llvm/Analysis/ConstantFolding.h vendor/llvm/dist/include/llvm/Analysis/DomPrinter.h vendor/llvm/dist/include/llvm/Analysis/DominanceFrontier.h vendor/llvm/dist/include/llvm/Analysis/DominanceFrontierImpl.h vendor/llvm/dist/include/llvm/Analysis/IVUsers.h vendor/llvm/dist/include/llvm/Analysis/InlineCost.h vendor/llvm/dist/include/llvm/Analysis/Interval.h vendor/llvm/dist/include/llvm/Analysis/IntervalIterator.h vendor/llvm/dist/include/llvm/Analysis/IntervalPartition.h vendor/llvm/dist/include/llvm/Analysis/IteratedDominanceFrontier.h vendor/llvm/dist/include/llvm/Analysis/JumpInstrTableInfo.h vendor/llvm/dist/include/llvm/Analysis/LazyCallGraph.h vendor/llvm/dist/include/llvm/Analysis/LibCallAliasAnalysis.h vendor/llvm/dist/include/llvm/Analysis/Lint.h vendor/llvm/dist/include/llvm/Analysis/Loads.h vendor/llvm/dist/include/llvm/Analysis/LoopAccessAnalysis.h vendor/llvm/dist/include/llvm/Analysis/LoopInfo.h vendor/llvm/dist/include/llvm/Analysis/LoopInfoImpl.h vendor/llvm/dist/include/llvm/Analysis/LoopPass.h vendor/llvm/dist/include/llvm/Analysis/MemoryBuiltins.h vendor/llvm/dist/include/llvm/Analysis/MemoryDependenceAnalysis.h vendor/llvm/dist/include/llvm/Analysis/MemoryLocation.h vendor/llvm/dist/include/llvm/Analysis/Passes.h vendor/llvm/dist/include/llvm/Analysis/PostDominators.h vendor/llvm/dist/include/llvm/Analysis/PtrUseVisitor.h vendor/llvm/dist/include/llvm/Analysis/RegionInfo.h vendor/llvm/dist/include/llvm/Analysis/RegionPass.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpander.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpressions.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionNormalization.h vendor/llvm/dist/include/llvm/Analysis/TargetFolder.h vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfoImpl.h vendor/llvm/dist/include/llvm/AsmParser/Parser.h vendor/llvm/dist/include/llvm/Bitcode/BitCodes.h vendor/llvm/dist/include/llvm/Bitcode/BitcodeWriterPass.h vendor/llvm/dist/include/llvm/Bitcode/BitstreamReader.h vendor/llvm/dist/include/llvm/Bitcode/BitstreamWriter.h vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h vendor/llvm/dist/include/llvm/Bitcode/ReaderWriter.h vendor/llvm/dist/include/llvm/CodeGen/Analysis.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/BasicTTIImpl.h vendor/llvm/dist/include/llvm/CodeGen/CalcSpillWeights.h vendor/llvm/dist/include/llvm/CodeGen/CommandFlags.h vendor/llvm/dist/include/llvm/CodeGen/DFAPacketizer.h vendor/llvm/dist/include/llvm/CodeGen/DIE.h vendor/llvm/dist/include/llvm/CodeGen/FastISel.h vendor/llvm/dist/include/llvm/CodeGen/FaultMaps.h vendor/llvm/dist/include/llvm/CodeGen/GCMetadata.h vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h vendor/llvm/dist/include/llvm/CodeGen/GCStrategy.h vendor/llvm/dist/include/llvm/CodeGen/GCs.h vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h vendor/llvm/dist/include/llvm/CodeGen/IntrinsicLowering.h vendor/llvm/dist/include/llvm/CodeGen/LatencyPriorityQueue.h vendor/llvm/dist/include/llvm/CodeGen/LexicalScopes.h vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/LivePhysRegs.h vendor/llvm/dist/include/llvm/CodeGen/LiveRangeEdit.h vendor/llvm/dist/include/llvm/CodeGen/LiveStackAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/LiveVariables.h vendor/llvm/dist/include/llvm/CodeGen/MIRYamlMapping.h vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h vendor/llvm/dist/include/llvm/CodeGen/MachineBlockFrequencyInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineBranchProbabilityInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineConstantPool.h vendor/llvm/dist/include/llvm/CodeGen/MachineDominanceFrontier.h vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBuilder.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBundle.h vendor/llvm/dist/include/llvm/CodeGen/MachineJumpTableInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineLoopInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineMemOperand.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h vendor/llvm/dist/include/llvm/CodeGen/MachineRegionInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineRegisterInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineSSAUpdater.h vendor/llvm/dist/include/llvm/CodeGen/MachineValueType.h vendor/llvm/dist/include/llvm/CodeGen/PBQPRAConstraint.h vendor/llvm/dist/include/llvm/CodeGen/Passes.h vendor/llvm/dist/include/llvm/CodeGen/PseudoSourceValue.h vendor/llvm/dist/include/llvm/CodeGen/RegisterScavenging.h vendor/llvm/dist/include/llvm/CodeGen/ResourcePriorityQueue.h vendor/llvm/dist/include/llvm/CodeGen/RuntimeLibcalls.h vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h vendor/llvm/dist/include/llvm/CodeGen/ScheduleHazardRecognizer.h vendor/llvm/dist/include/llvm/CodeGen/ScoreboardHazardRecognizer.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h vendor/llvm/dist/include/llvm/CodeGen/StackMaps.h vendor/llvm/dist/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h vendor/llvm/dist/include/llvm/CodeGen/ValueTypes.h vendor/llvm/dist/include/llvm/CodeGen/VirtRegMap.h vendor/llvm/dist/include/llvm/CodeGen/WinEHFuncInfo.h vendor/llvm/dist/include/llvm/Config/config.h.cmake vendor/llvm/dist/include/llvm/Config/config.h.in vendor/llvm/dist/include/llvm/DebugInfo/DIContext.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFFormValue.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFUnit.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/IPDBDataStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/IPDBLineNumber.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/IPDBSession.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/IPDBSourceFile.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/PDBContext.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/PDBExtras.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/PDBSymDumper.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h vendor/llvm/dist/include/llvm/ExecutionEngine/ExecutionEngine.h vendor/llvm/dist/include/llvm/ExecutionEngine/GenericValue.h vendor/llvm/dist/include/llvm/ExecutionEngine/MCJIT.h vendor/llvm/dist/include/llvm/ExecutionEngine/ObjectCache.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/SectionMemoryManager.h vendor/llvm/dist/include/llvm/IR/Argument.h vendor/llvm/dist/include/llvm/IR/AssemblyAnnotationWriter.h vendor/llvm/dist/include/llvm/IR/Attributes.h vendor/llvm/dist/include/llvm/IR/AutoUpgrade.h vendor/llvm/dist/include/llvm/IR/BasicBlock.h vendor/llvm/dist/include/llvm/IR/CFG.h vendor/llvm/dist/include/llvm/IR/CallSite.h vendor/llvm/dist/include/llvm/IR/CallingConv.h vendor/llvm/dist/include/llvm/IR/Comdat.h vendor/llvm/dist/include/llvm/IR/Constant.h vendor/llvm/dist/include/llvm/IR/ConstantFolder.h vendor/llvm/dist/include/llvm/IR/ConstantRange.h vendor/llvm/dist/include/llvm/IR/Constants.h vendor/llvm/dist/include/llvm/IR/DIBuilder.h vendor/llvm/dist/include/llvm/IR/DataLayout.h vendor/llvm/dist/include/llvm/IR/DebugInfoMetadata.h vendor/llvm/dist/include/llvm/IR/DerivedTypes.h vendor/llvm/dist/include/llvm/IR/Dominators.h vendor/llvm/dist/include/llvm/IR/Function.h vendor/llvm/dist/include/llvm/IR/GVMaterializer.h vendor/llvm/dist/include/llvm/IR/GlobalAlias.h vendor/llvm/dist/include/llvm/IR/GlobalObject.h vendor/llvm/dist/include/llvm/IR/GlobalValue.h vendor/llvm/dist/include/llvm/IR/GlobalVariable.h vendor/llvm/dist/include/llvm/IR/IRBuilder.h vendor/llvm/dist/include/llvm/IR/IRPrintingPasses.h vendor/llvm/dist/include/llvm/IR/InlineAsm.h vendor/llvm/dist/include/llvm/IR/InstIterator.h vendor/llvm/dist/include/llvm/IR/InstVisitor.h vendor/llvm/dist/include/llvm/IR/InstrTypes.h vendor/llvm/dist/include/llvm/IR/Instruction.h vendor/llvm/dist/include/llvm/IR/Instructions.h vendor/llvm/dist/include/llvm/IR/IntrinsicInst.h vendor/llvm/dist/include/llvm/IR/Intrinsics.h vendor/llvm/dist/include/llvm/IR/IntrinsicsARM.td vendor/llvm/dist/include/llvm/IR/IntrinsicsPowerPC.td vendor/llvm/dist/include/llvm/IR/IntrinsicsX86.td vendor/llvm/dist/include/llvm/IR/LLVMContext.h vendor/llvm/dist/include/llvm/IR/LegacyPassManager.h vendor/llvm/dist/include/llvm/IR/LegacyPassManagers.h vendor/llvm/dist/include/llvm/IR/LegacyPassNameParser.h vendor/llvm/dist/include/llvm/IR/Mangler.h vendor/llvm/dist/include/llvm/IR/Metadata.def vendor/llvm/dist/include/llvm/IR/Metadata.h vendor/llvm/dist/include/llvm/IR/Module.h vendor/llvm/dist/include/llvm/IR/NoFolder.h vendor/llvm/dist/include/llvm/IR/OperandTraits.h vendor/llvm/dist/include/llvm/IR/Operator.h vendor/llvm/dist/include/llvm/IR/PassManager.h vendor/llvm/dist/include/llvm/IR/PassManagerInternal.h vendor/llvm/dist/include/llvm/IR/Statepoint.h vendor/llvm/dist/include/llvm/IR/SymbolTableListTraits.h vendor/llvm/dist/include/llvm/IR/Type.h vendor/llvm/dist/include/llvm/IR/TypeFinder.h vendor/llvm/dist/include/llvm/IR/Use.h vendor/llvm/dist/include/llvm/IR/User.h vendor/llvm/dist/include/llvm/IR/Value.h vendor/llvm/dist/include/llvm/IR/ValueHandle.h vendor/llvm/dist/include/llvm/IR/ValueSymbolTable.h vendor/llvm/dist/include/llvm/IR/Verifier.h vendor/llvm/dist/include/llvm/IRReader/IRReader.h vendor/llvm/dist/include/llvm/InitializePasses.h vendor/llvm/dist/include/llvm/LTO/LTOCodeGenerator.h vendor/llvm/dist/include/llvm/LTO/LTOModule.h vendor/llvm/dist/include/llvm/LibDriver/LibDriver.h vendor/llvm/dist/include/llvm/LineEditor/LineEditor.h vendor/llvm/dist/include/llvm/Linker/Linker.h vendor/llvm/dist/include/llvm/MC/MCAsmBackend.h vendor/llvm/dist/include/llvm/MC/MCAsmInfo.h vendor/llvm/dist/include/llvm/MC/MCAsmInfoCOFF.h vendor/llvm/dist/include/llvm/MC/MCCodeEmitter.h vendor/llvm/dist/include/llvm/MC/MCELFObjectWriter.h vendor/llvm/dist/include/llvm/MC/MCExternalSymbolizer.h vendor/llvm/dist/include/llvm/MC/MCFixedLenDisassembler.h vendor/llvm/dist/include/llvm/MC/MCFixup.h vendor/llvm/dist/include/llvm/MC/MCFixupKindInfo.h vendor/llvm/dist/include/llvm/MC/MCInstrAnalysis.h vendor/llvm/dist/include/llvm/MC/MCInstrDesc.h vendor/llvm/dist/include/llvm/MC/MCInstrInfo.h vendor/llvm/dist/include/llvm/MC/MCInstrItineraries.h vendor/llvm/dist/include/llvm/MC/MCMachObjectWriter.h vendor/llvm/dist/include/llvm/MC/MCObjectWriter.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmLexer.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmParser.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmParserExtension.h vendor/llvm/dist/include/llvm/MC/MCRegisterInfo.h vendor/llvm/dist/include/llvm/MC/MCRelocationInfo.h vendor/llvm/dist/include/llvm/MC/MCSchedule.h vendor/llvm/dist/include/llvm/MC/MCStreamer.h vendor/llvm/dist/include/llvm/MC/MCSubtargetInfo.h vendor/llvm/dist/include/llvm/MC/MCSymbol.h vendor/llvm/dist/include/llvm/MC/MCSymbolCOFF.h vendor/llvm/dist/include/llvm/MC/MCSymbolELF.h vendor/llvm/dist/include/llvm/MC/MCSymbolMachO.h vendor/llvm/dist/include/llvm/MC/MCSymbolizer.h vendor/llvm/dist/include/llvm/MC/MCTargetAsmParser.h vendor/llvm/dist/include/llvm/MC/MCWin64EH.h vendor/llvm/dist/include/llvm/MC/MCWinCOFFObjectWriter.h vendor/llvm/dist/include/llvm/MC/MCWinCOFFStreamer.h vendor/llvm/dist/include/llvm/MC/MCWinEH.h vendor/llvm/dist/include/llvm/MC/MachineLocation.h vendor/llvm/dist/include/llvm/MC/StringTableBuilder.h vendor/llvm/dist/include/llvm/MC/YAML.h vendor/llvm/dist/include/llvm/Object/Archive.h vendor/llvm/dist/include/llvm/Object/ArchiveWriter.h vendor/llvm/dist/include/llvm/Object/Binary.h vendor/llvm/dist/include/llvm/Object/COFF.h vendor/llvm/dist/include/llvm/Object/COFFYAML.h vendor/llvm/dist/include/llvm/Object/ELF.h vendor/llvm/dist/include/llvm/Object/ELFObjectFile.h vendor/llvm/dist/include/llvm/Object/ELFTypes.h vendor/llvm/dist/include/llvm/Object/Error.h vendor/llvm/dist/include/llvm/Object/IRObjectFile.h vendor/llvm/dist/include/llvm/Object/MachO.h vendor/llvm/dist/include/llvm/Object/MachOUniversal.h vendor/llvm/dist/include/llvm/Object/ObjectFile.h vendor/llvm/dist/include/llvm/Object/RelocVisitor.h vendor/llvm/dist/include/llvm/Object/SymbolicFile.h vendor/llvm/dist/include/llvm/Option/Arg.h vendor/llvm/dist/include/llvm/Option/ArgList.h vendor/llvm/dist/include/llvm/Option/OptSpecifier.h vendor/llvm/dist/include/llvm/Option/OptTable.h vendor/llvm/dist/include/llvm/Pass.h vendor/llvm/dist/include/llvm/PassAnalysisSupport.h vendor/llvm/dist/include/llvm/PassInfo.h vendor/llvm/dist/include/llvm/PassRegistry.h vendor/llvm/dist/include/llvm/PassSupport.h vendor/llvm/dist/include/llvm/Passes/PassBuilder.h vendor/llvm/dist/include/llvm/ProfileData/CoverageMapping.h vendor/llvm/dist/include/llvm/ProfileData/CoverageMappingReader.h vendor/llvm/dist/include/llvm/ProfileData/InstrProf.h vendor/llvm/dist/include/llvm/ProfileData/InstrProfReader.h vendor/llvm/dist/include/llvm/Support/ARMEHABI.h vendor/llvm/dist/include/llvm/Support/ARMWinEH.h vendor/llvm/dist/include/llvm/Support/ArrayRecycler.h vendor/llvm/dist/include/llvm/Support/Atomic.h vendor/llvm/dist/include/llvm/Support/BlockFrequency.h vendor/llvm/dist/include/llvm/Support/BranchProbability.h vendor/llvm/dist/include/llvm/Support/COM.h vendor/llvm/dist/include/llvm/Support/Casting.h vendor/llvm/dist/include/llvm/Support/CodeGen.h vendor/llvm/dist/include/llvm/Support/CrashRecoveryContext.h vendor/llvm/dist/include/llvm/Support/DOTGraphTraits.h vendor/llvm/dist/include/llvm/Support/DataStream.h vendor/llvm/dist/include/llvm/Support/Debug.h vendor/llvm/dist/include/llvm/Support/Dwarf.h vendor/llvm/dist/include/llvm/Support/DynamicLibrary.h vendor/llvm/dist/include/llvm/Support/ELF.h vendor/llvm/dist/include/llvm/Support/Errc.h vendor/llvm/dist/include/llvm/Support/ErrorHandling.h vendor/llvm/dist/include/llvm/Support/FileSystem.h vendor/llvm/dist/include/llvm/Support/FileUtilities.h vendor/llvm/dist/include/llvm/Support/FormattedStream.h vendor/llvm/dist/include/llvm/Support/GCOV.h vendor/llvm/dist/include/llvm/Support/GenericDomTree.h vendor/llvm/dist/include/llvm/Support/GenericDomTreeConstruction.h vendor/llvm/dist/include/llvm/Support/GraphWriter.h vendor/llvm/dist/include/llvm/Support/Host.h vendor/llvm/dist/include/llvm/Support/LineIterator.h vendor/llvm/dist/include/llvm/Support/MD5.h vendor/llvm/dist/include/llvm/Support/ManagedStatic.h vendor/llvm/dist/include/llvm/Support/MathExtras.h vendor/llvm/dist/include/llvm/Support/Memory.h vendor/llvm/dist/include/llvm/Support/MemoryObject.h vendor/llvm/dist/include/llvm/Support/MipsABIFlags.h vendor/llvm/dist/include/llvm/Support/Mutex.h vendor/llvm/dist/include/llvm/Support/MutexGuard.h vendor/llvm/dist/include/llvm/Support/PluginLoader.h vendor/llvm/dist/include/llvm/Support/Process.h vendor/llvm/dist/include/llvm/Support/Program.h vendor/llvm/dist/include/llvm/Support/RWMutex.h vendor/llvm/dist/include/llvm/Support/RandomNumberGenerator.h vendor/llvm/dist/include/llvm/Support/Recycler.h vendor/llvm/dist/include/llvm/Support/RecyclingAllocator.h vendor/llvm/dist/include/llvm/Support/Regex.h vendor/llvm/dist/include/llvm/Support/Registry.h vendor/llvm/dist/include/llvm/Support/Signals.h vendor/llvm/dist/include/llvm/Support/SourceMgr.h vendor/llvm/dist/include/llvm/Support/StreamingMemoryObject.h vendor/llvm/dist/include/llvm/Support/StringPool.h vendor/llvm/dist/include/llvm/Support/StringSaver.h vendor/llvm/dist/include/llvm/Support/SystemUtils.h vendor/llvm/dist/include/llvm/Support/TargetParser.h vendor/llvm/dist/include/llvm/Support/TargetRegistry.h vendor/llvm/dist/include/llvm/Support/TargetSelect.h vendor/llvm/dist/include/llvm/Support/ThreadLocal.h vendor/llvm/dist/include/llvm/Support/Threading.h vendor/llvm/dist/include/llvm/Support/TimeValue.h vendor/llvm/dist/include/llvm/Support/Timer.h vendor/llvm/dist/include/llvm/Support/ToolOutputFile.h vendor/llvm/dist/include/llvm/Support/UniqueLock.h vendor/llvm/dist/include/llvm/Support/Valgrind.h vendor/llvm/dist/include/llvm/Support/Watchdog.h vendor/llvm/dist/include/llvm/Support/circular_raw_ostream.h vendor/llvm/dist/include/llvm/Support/raw_os_ostream.h vendor/llvm/dist/include/llvm/Support/raw_ostream.h vendor/llvm/dist/include/llvm/Support/type_traits.h vendor/llvm/dist/include/llvm/TableGen/Error.h vendor/llvm/dist/include/llvm/TableGen/Record.h vendor/llvm/dist/include/llvm/TableGen/StringMatcher.h vendor/llvm/dist/include/llvm/Target/TargetCallingConv.h vendor/llvm/dist/include/llvm/Target/TargetFrameLowering.h vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h vendor/llvm/dist/include/llvm/Target/TargetIntrinsicInfo.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetLoweringObjectFile.h vendor/llvm/dist/include/llvm/Target/TargetMachine.h vendor/llvm/dist/include/llvm/Target/TargetOptions.h vendor/llvm/dist/include/llvm/Target/TargetRecip.h vendor/llvm/dist/include/llvm/Target/TargetRegisterInfo.h vendor/llvm/dist/include/llvm/Target/TargetSelectionDAG.td vendor/llvm/dist/include/llvm/Target/TargetSelectionDAGInfo.h vendor/llvm/dist/include/llvm/Target/TargetSubtargetInfo.h vendor/llvm/dist/include/llvm/Transforms/IPO.h vendor/llvm/dist/include/llvm/Transforms/IPO/InlinerPass.h vendor/llvm/dist/include/llvm/Transforms/InstCombine/InstCombine.h vendor/llvm/dist/include/llvm/Transforms/Instrumentation.h vendor/llvm/dist/include/llvm/Transforms/ObjCARC.h vendor/llvm/dist/include/llvm/Transforms/Scalar.h vendor/llvm/dist/include/llvm/Transforms/Scalar/EarlyCSE.h vendor/llvm/dist/include/llvm/Transforms/Scalar/LowerExpectIntrinsic.h vendor/llvm/dist/include/llvm/Transforms/Scalar/SimplifyCFG.h vendor/llvm/dist/include/llvm/Transforms/Utils/ASanStackFrameLayout.h vendor/llvm/dist/include/llvm/Transforms/Utils/BasicBlockUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/BuildLibCalls.h vendor/llvm/dist/include/llvm/Transforms/Utils/Cloning.h vendor/llvm/dist/include/llvm/Transforms/Utils/CodeExtractor.h vendor/llvm/dist/include/llvm/Transforms/Utils/CtorUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/GlobalStatus.h vendor/llvm/dist/include/llvm/Transforms/Utils/IntegerDivision.h vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h vendor/llvm/dist/include/llvm/Transforms/Utils/LoopUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/ModuleUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/PromoteMemToReg.h vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdaterImpl.h vendor/llvm/dist/include/llvm/Transforms/Utils/SimplifyLibCalls.h vendor/llvm/dist/include/llvm/Transforms/Utils/SymbolRewriter.h vendor/llvm/dist/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h vendor/llvm/dist/include/llvm/Transforms/Utils/UnrollLoop.h vendor/llvm/dist/include/llvm/Transforms/Utils/ValueMapper.h vendor/llvm/dist/include/llvm/Transforms/Vectorize.h vendor/llvm/dist/include/llvm/module.modulemap vendor/llvm/dist/lib/Analysis/AliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/AliasAnalysisCounter.cpp vendor/llvm/dist/lib/Analysis/AliasAnalysisEvaluator.cpp vendor/llvm/dist/lib/Analysis/AliasDebugger.cpp vendor/llvm/dist/lib/Analysis/AliasSetTracker.cpp vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/BlockFrequencyInfoImpl.cpp vendor/llvm/dist/lib/Analysis/CFG.cpp vendor/llvm/dist/lib/Analysis/CFGPrinter.cpp vendor/llvm/dist/lib/Analysis/CFLAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/CMakeLists.txt vendor/llvm/dist/lib/Analysis/CaptureTracking.cpp vendor/llvm/dist/lib/Analysis/Delinearization.cpp vendor/llvm/dist/lib/Analysis/DependenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/DivergenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/DomPrinter.cpp vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp vendor/llvm/dist/lib/Analysis/IPA/CallPrinter.cpp vendor/llvm/dist/lib/Analysis/IPA/GlobalsModRef.cpp vendor/llvm/dist/lib/Analysis/IPA/InlineCost.cpp vendor/llvm/dist/lib/Analysis/InstCount.cpp vendor/llvm/dist/lib/Analysis/LazyValueInfo.cpp vendor/llvm/dist/lib/Analysis/Lint.cpp vendor/llvm/dist/lib/Analysis/Loads.cpp vendor/llvm/dist/lib/Analysis/LoopAccessAnalysis.cpp vendor/llvm/dist/lib/Analysis/LoopPass.cpp vendor/llvm/dist/lib/Analysis/MemDepPrinter.cpp vendor/llvm/dist/lib/Analysis/MemDerefPrinter.cpp vendor/llvm/dist/lib/Analysis/MemoryDependenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/ModuleDebugInfoPrinter.cpp vendor/llvm/dist/lib/Analysis/RegionPrinter.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp vendor/llvm/dist/lib/Analysis/ScopedNoAliasAA.cpp vendor/llvm/dist/lib/Analysis/StratifiedSets.h vendor/llvm/dist/lib/Analysis/TargetTransformInfo.cpp vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp vendor/llvm/dist/lib/AsmParser/LLLexer.cpp vendor/llvm/dist/lib/AsmParser/LLParser.cpp vendor/llvm/dist/lib/AsmParser/LLParser.h vendor/llvm/dist/lib/AsmParser/Parser.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriterPass.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.h vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.h vendor/llvm/dist/lib/CodeGen/AllocationOrder.h vendor/llvm/dist/lib/CodeGen/AntiDepBreaker.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/AddressPool.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/ByteStreamer.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIEHash.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIEHash.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DebugLocEntry.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DebugLocStream.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfAccelTable.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfExpression.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfFile.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfFile.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfStringPool.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/WinException.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/WinException.h vendor/llvm/dist/lib/CodeGen/AtomicExpandPass.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.h vendor/llvm/dist/lib/CodeGen/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/CodeGenPrepare.cpp vendor/llvm/dist/lib/CodeGen/CoreCLRGC.cpp vendor/llvm/dist/lib/CodeGen/CriticalAntiDepBreaker.h vendor/llvm/dist/lib/CodeGen/DFAPacketizer.cpp vendor/llvm/dist/lib/CodeGen/DeadMachineInstructionElim.cpp vendor/llvm/dist/lib/CodeGen/EdgeBundles.cpp vendor/llvm/dist/lib/CodeGen/ExecutionDepsFix.cpp vendor/llvm/dist/lib/CodeGen/FaultMaps.cpp vendor/llvm/dist/lib/CodeGen/GCMetadata.cpp vendor/llvm/dist/lib/CodeGen/GCRootLowering.cpp vendor/llvm/dist/lib/CodeGen/IfConversion.cpp vendor/llvm/dist/lib/CodeGen/ImplicitNullChecks.cpp vendor/llvm/dist/lib/CodeGen/InlineSpiller.cpp vendor/llvm/dist/lib/CodeGen/InterferenceCache.h vendor/llvm/dist/lib/CodeGen/LiveDebugVariables.h vendor/llvm/dist/lib/CodeGen/LivePhysRegs.cpp vendor/llvm/dist/lib/CodeGen/MIRParser/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/MIRParser/MIRParser.cpp vendor/llvm/dist/lib/CodeGen/MIRPrinter.cpp vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineBlockPlacement.cpp vendor/llvm/dist/lib/CodeGen/MachineCombiner.cpp vendor/llvm/dist/lib/CodeGen/MachineCopyPropagation.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineFunctionPrinterPass.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineSSAUpdater.cpp vendor/llvm/dist/lib/CodeGen/MachineScheduler.cpp vendor/llvm/dist/lib/CodeGen/MachineTraceMetrics.cpp vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp vendor/llvm/dist/lib/CodeGen/OptimizePHIs.cpp vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp vendor/llvm/dist/lib/CodeGen/PeepholeOptimizer.cpp vendor/llvm/dist/lib/CodeGen/PostRASchedulerList.cpp vendor/llvm/dist/lib/CodeGen/RegAllocFast.cpp vendor/llvm/dist/lib/CodeGen/RegisterCoalescer.cpp vendor/llvm/dist/lib/CodeGen/RegisterCoalescer.h vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGPrinter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/StatepointLowering.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/ShadowStackGCLowering.cpp vendor/llvm/dist/lib/CodeGen/Spiller.h vendor/llvm/dist/lib/CodeGen/SplitKit.h vendor/llvm/dist/lib/CodeGen/StatepointExampleGC.cpp vendor/llvm/dist/lib/CodeGen/TailDuplication.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringBase.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringObjectFileImpl.cpp vendor/llvm/dist/lib/CodeGen/TargetOptionsImpl.cpp vendor/llvm/dist/lib/CodeGen/TwoAddressInstructionPass.cpp vendor/llvm/dist/lib/CodeGen/UnreachableBlockElim.cpp vendor/llvm/dist/lib/CodeGen/WinEHPrepare.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFContext.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFFormValue.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/SyntaxHighlighting.h vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolFunc.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp vendor/llvm/dist/lib/ExecutionEngine/ExecutionEngine.cpp vendor/llvm/dist/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/Interpreter.h vendor/llvm/dist/lib/ExecutionEngine/MCJIT/MCJIT.cpp vendor/llvm/dist/lib/ExecutionEngine/MCJIT/MCJIT.h vendor/llvm/dist/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp vendor/llvm/dist/lib/ExecutionEngine/Orc/CMakeLists.txt vendor/llvm/dist/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h vendor/llvm/dist/lib/IR/AsmWriter.cpp vendor/llvm/dist/lib/IR/AttributeImpl.h vendor/llvm/dist/lib/IR/ConstantFold.h vendor/llvm/dist/lib/IR/Constants.cpp vendor/llvm/dist/lib/IR/DIBuilder.cpp vendor/llvm/dist/lib/IR/DebugInfo.cpp vendor/llvm/dist/lib/IR/DebugInfoMetadata.cpp vendor/llvm/dist/lib/IR/DiagnosticInfo.cpp vendor/llvm/dist/lib/IR/GCOV.cpp vendor/llvm/dist/lib/IR/Globals.cpp vendor/llvm/dist/lib/IR/IRPrintingPasses.cpp vendor/llvm/dist/lib/IR/Instruction.cpp vendor/llvm/dist/lib/IR/Instructions.cpp vendor/llvm/dist/lib/IR/LLVMContextImpl.cpp vendor/llvm/dist/lib/IR/LLVMContextImpl.h vendor/llvm/dist/lib/IR/LegacyPassManager.cpp vendor/llvm/dist/lib/IR/Mangler.cpp vendor/llvm/dist/lib/IR/Operator.cpp vendor/llvm/dist/lib/IR/Pass.cpp vendor/llvm/dist/lib/IR/SymbolTableListTraitsImpl.h vendor/llvm/dist/lib/IR/Use.cpp vendor/llvm/dist/lib/IR/User.cpp vendor/llvm/dist/lib/IR/Value.cpp vendor/llvm/dist/lib/IR/Verifier.cpp vendor/llvm/dist/lib/LTO/LTOCodeGenerator.cpp vendor/llvm/dist/lib/LTO/LTOModule.cpp vendor/llvm/dist/lib/LibDriver/LibDriver.cpp vendor/llvm/dist/lib/Linker/LinkModules.cpp vendor/llvm/dist/lib/MC/ELFObjectWriter.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/MCDisassembler/MCExternalSymbolizer.cpp vendor/llvm/dist/lib/MC/MCDwarf.cpp vendor/llvm/dist/lib/MC/MCExpr.cpp vendor/llvm/dist/lib/MC/MCNullStreamer.cpp vendor/llvm/dist/lib/MC/MCObjectFileInfo.cpp vendor/llvm/dist/lib/MC/MCObjectStreamer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/COFFAsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/ELFAsmParser.cpp vendor/llvm/dist/lib/MC/MCSymbol.cpp vendor/llvm/dist/lib/MC/MCSymbolELF.cpp vendor/llvm/dist/lib/MC/MCWin64EH.cpp vendor/llvm/dist/lib/MC/MCWinEH.cpp vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/MC/WinCOFFStreamer.cpp vendor/llvm/dist/lib/Object/CMakeLists.txt vendor/llvm/dist/lib/Object/COFFObjectFile.cpp vendor/llvm/dist/lib/Object/COFFYAML.cpp vendor/llvm/dist/lib/Object/ELFYAML.cpp vendor/llvm/dist/lib/Object/Error.cpp vendor/llvm/dist/lib/Object/IRObjectFile.cpp vendor/llvm/dist/lib/Object/MachOObjectFile.cpp vendor/llvm/dist/lib/Object/MachOUniversal.cpp vendor/llvm/dist/lib/Object/Object.cpp vendor/llvm/dist/lib/Object/ObjectFile.cpp vendor/llvm/dist/lib/Object/RecordStreamer.h vendor/llvm/dist/lib/Option/ArgList.cpp vendor/llvm/dist/lib/Option/OptTable.cpp vendor/llvm/dist/lib/ProfileData/CoverageMapping.cpp vendor/llvm/dist/lib/ProfileData/CoverageMappingReader.cpp vendor/llvm/dist/lib/ProfileData/CoverageMappingWriter.cpp vendor/llvm/dist/lib/ProfileData/InstrProf.cpp vendor/llvm/dist/lib/ProfileData/InstrProfIndexed.h vendor/llvm/dist/lib/ProfileData/InstrProfReader.cpp vendor/llvm/dist/lib/ProfileData/InstrProfWriter.cpp vendor/llvm/dist/lib/ProfileData/SampleProf.cpp vendor/llvm/dist/lib/Support/APFloat.cpp vendor/llvm/dist/lib/Support/APInt.cpp vendor/llvm/dist/lib/Support/APSInt.cpp vendor/llvm/dist/lib/Support/ARMBuildAttrs.cpp vendor/llvm/dist/lib/Support/ARMWinEH.cpp vendor/llvm/dist/lib/Support/Allocator.cpp vendor/llvm/dist/lib/Support/CMakeLists.txt vendor/llvm/dist/lib/Support/CommandLine.cpp vendor/llvm/dist/lib/Support/CrashRecoveryContext.cpp vendor/llvm/dist/lib/Support/DAGDeltaAlgorithm.cpp vendor/llvm/dist/lib/Support/DataStream.cpp vendor/llvm/dist/lib/Support/Debug.cpp vendor/llvm/dist/lib/Support/Dwarf.cpp vendor/llvm/dist/lib/Support/FileOutputBuffer.cpp vendor/llvm/dist/lib/Support/GraphWriter.cpp vendor/llvm/dist/lib/Support/LockFileManager.cpp vendor/llvm/dist/lib/Support/MD5.cpp vendor/llvm/dist/lib/Support/MathExtras.cpp vendor/llvm/dist/lib/Support/MemoryBuffer.cpp vendor/llvm/dist/lib/Support/Mutex.cpp vendor/llvm/dist/lib/Support/RWMutex.cpp vendor/llvm/dist/lib/Support/Statistic.cpp vendor/llvm/dist/lib/Support/StreamingMemoryObject.cpp vendor/llvm/dist/lib/Support/TargetParser.cpp vendor/llvm/dist/lib/Support/TimeValue.cpp vendor/llvm/dist/lib/Support/Timer.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/Support/Unix/Process.inc vendor/llvm/dist/lib/Support/Unix/Program.inc vendor/llvm/dist/lib/Support/Unix/ThreadLocal.inc vendor/llvm/dist/lib/Support/Unix/TimeValue.inc vendor/llvm/dist/lib/Support/Unix/Watchdog.inc vendor/llvm/dist/lib/Support/Windows/DynamicLibrary.inc vendor/llvm/dist/lib/Support/Windows/Signals.inc vendor/llvm/dist/lib/Support/YAMLParser.cpp vendor/llvm/dist/lib/TableGen/Record.cpp vendor/llvm/dist/lib/TableGen/TGLexer.h vendor/llvm/dist/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64BranchRelaxation.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64CallingConvention.h vendor/llvm/dist/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64FastISel.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64FrameLowering.h vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.h vendor/llvm/dist/lib/Target/AArch64/AArch64InstrFormats.td vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.td vendor/llvm/dist/lib/Target/AArch64/AArch64MCInstLower.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64MCInstLower.h vendor/llvm/dist/lib/Target/AArch64/AArch64MachineFunctionInfo.h vendor/llvm/dist/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64PBQPRegAlloc.h vendor/llvm/dist/lib/Target/AArch64/AArch64SelectionDAGInfo.h vendor/llvm/dist/lib/Target/AArch64/AArch64StorePairSuppress.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64Subtarget.h vendor/llvm/dist/lib/Target/AArch64/AArch64TargetMachine.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64TargetTransformInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64TargetTransformInfo.h vendor/llvm/dist/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp vendor/llvm/dist/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp vendor/llvm/dist/lib/Target/AArch64/Utils/AArch64BaseInfo.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUAsmPrinter.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUInstrInfo.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUMachineFunction.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h vendor/llvm/dist/lib/Target/AMDGPU/AMDKernelCodeT.h vendor/llvm/dist/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp vendor/llvm/dist/lib/Target/AMDGPU/AsmParser/LLVMBuild.txt vendor/llvm/dist/lib/Target/AMDGPU/CMakeLists.txt vendor/llvm/dist/lib/Target/AMDGPU/LLVMBuild.txt vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUFixupKinds.h vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/CMakeLists.txt vendor/llvm/dist/lib/Target/AMDGPU/Makefile vendor/llvm/dist/lib/Target/AMDGPU/Processors.td vendor/llvm/dist/lib/Target/AMDGPU/R600Defines.h vendor/llvm/dist/lib/Target/AMDGPU/R600ISelLowering.h vendor/llvm/dist/lib/Target/AMDGPU/R600InstrInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600InstrInfo.h vendor/llvm/dist/lib/Target/AMDGPU/R600MachineFunctionInfo.h vendor/llvm/dist/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600TextureIntrinsicsReplacer.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIDefines.h vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.h vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARM.h vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.h vendor/llvm/dist/lib/Target/ARM/ARMCallingConv.h vendor/llvm/dist/lib/Target/ARM/ARMConstantIslandPass.cpp vendor/llvm/dist/lib/Target/ARM/ARMConstantPoolValue.h vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp vendor/llvm/dist/lib/Target/ARM/ARMFastISel.cpp vendor/llvm/dist/lib/Target/ARM/ARMFeatures.h vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.h vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.h vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/ARMMachineFunctionInfo.h vendor/llvm/dist/lib/Target/ARM/ARMOptimizeBarriersPass.cpp vendor/llvm/dist/lib/Target/ARM/ARMSelectionDAGInfo.h vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetTransformInfo.h vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackendDarwin.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackendELF.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMWinCOFFStreamer.cpp vendor/llvm/dist/lib/Target/ARM/MLxExpansionPass.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1FrameLowering.h vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.h vendor/llvm/dist/lib/Target/ARM/Thumb2ITBlockPass.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.h vendor/llvm/dist/lib/Target/ARM/Thumb2SizeReduction.cpp vendor/llvm/dist/lib/Target/ARM/ThumbRegisterInfo.h vendor/llvm/dist/lib/Target/BPF/BPFAsmPrinter.cpp vendor/llvm/dist/lib/Target/BPF/BPFFrameLowering.h vendor/llvm/dist/lib/Target/BPF/BPFISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/BPF/BPFISelLowering.cpp vendor/llvm/dist/lib/Target/BPF/BPFISelLowering.h vendor/llvm/dist/lib/Target/BPF/BPFInstrInfo.h vendor/llvm/dist/lib/Target/BPF/BPFMCInstLower.h vendor/llvm/dist/lib/Target/BPF/BPFRegisterInfo.h vendor/llvm/dist/lib/Target/BPF/BPFSubtarget.h vendor/llvm/dist/lib/Target/BPF/BPFTargetMachine.cpp vendor/llvm/dist/lib/Target/BPF/BPFTargetMachine.h vendor/llvm/dist/lib/Target/BPF/InstPrinter/BPFInstPrinter.h vendor/llvm/dist/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp vendor/llvm/dist/lib/Target/BPF/MCTargetDesc/BPFELFObjectWriter.cpp vendor/llvm/dist/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h vendor/llvm/dist/lib/Target/BPF/MCTargetDesc/BPFMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.h vendor/llvm/dist/lib/Target/CppBackend/CPPBackend.cpp vendor/llvm/dist/lib/Target/CppBackend/CPPTargetMachine.h vendor/llvm/dist/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp vendor/llvm/dist/lib/Target/Hexagon/Hexagon.h vendor/llvm/dist/lib/Target/Hexagon/HexagonAsmPrinter.h vendor/llvm/dist/lib/Target/Hexagon/HexagonCFGOptimizer.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonExpandCondsets.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonFixupHwLoops.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonFrameLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonFrameLowering.h vendor/llvm/dist/lib/Target/Hexagon/HexagonISelLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonISelLowering.h vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.h vendor/llvm/dist/lib/Target/Hexagon/HexagonMachineFunctionInfo.h vendor/llvm/dist/lib/Target/Hexagon/HexagonMachineScheduler.h vendor/llvm/dist/lib/Target/Hexagon/HexagonPeephole.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonSelectionDAGInfo.h vendor/llvm/dist/lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetMachine.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetStreamer.h vendor/llvm/dist/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCCompound.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.h vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.h vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.h vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.h vendor/llvm/dist/lib/Target/LLVMBuild.txt vendor/llvm/dist/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h vendor/llvm/dist/lib/Target/MSP430/MSP430.h vendor/llvm/dist/lib/Target/MSP430/MSP430BranchSelector.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430FrameLowering.h vendor/llvm/dist/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.h vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.h vendor/llvm/dist/lib/Target/MSP430/MSP430MCInstLower.h vendor/llvm/dist/lib/Target/MSP430/MSP430MachineFunctionInfo.h vendor/llvm/dist/lib/Target/MSP430/MSP430SelectionDAGInfo.h vendor/llvm/dist/lib/Target/MSP430/MSP430Subtarget.h vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp vendor/llvm/dist/lib/Target/Mips/Disassembler/MipsDisassembler.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCNaCl.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsOptionRecord.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp vendor/llvm/dist/lib/Target/Mips/MicroMips32r6InstrFormats.td vendor/llvm/dist/lib/Target/Mips/MicroMips32r6InstrInfo.td vendor/llvm/dist/lib/Target/Mips/MicroMipsInstrInfo.td vendor/llvm/dist/lib/Target/Mips/Mips.h vendor/llvm/dist/lib/Target/Mips/Mips16FrameLowering.h vendor/llvm/dist/lib/Target/Mips/Mips16HardFloat.cpp vendor/llvm/dist/lib/Target/Mips/Mips16HardFloatInfo.cpp vendor/llvm/dist/lib/Target/Mips/Mips16HardFloatInfo.h vendor/llvm/dist/lib/Target/Mips/Mips16ISelDAGToDAG.h vendor/llvm/dist/lib/Target/Mips/Mips16ISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/Mips16ISelLowering.h vendor/llvm/dist/lib/Target/Mips/Mips16InstrInfo.h vendor/llvm/dist/lib/Target/Mips/Mips64InstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsAnalyzeImmediate.h vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.h vendor/llvm/dist/lib/Target/Mips/MipsCCState.h vendor/llvm/dist/lib/Target/Mips/MipsFastISel.cpp vendor/llvm/dist/lib/Target/Mips/MipsFrameLowering.h vendor/llvm/dist/lib/Target/Mips/MipsISelDAGToDAG.h vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.h vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.h vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsMCInstLower.cpp vendor/llvm/dist/lib/Target/Mips/MipsMCInstLower.h vendor/llvm/dist/lib/Target/Mips/MipsModuleISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Mips/MipsOptionRecord.h vendor/llvm/dist/lib/Target/Mips/MipsOs16.cpp vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.td vendor/llvm/dist/lib/Target/Mips/MipsSEFrameLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEFrameLowering.h vendor/llvm/dist/lib/Target/Mips/MipsSEISelDAGToDAG.h vendor/llvm/dist/lib/Target/Mips/MipsSEISelLowering.h vendor/llvm/dist/lib/Target/Mips/MipsSEInstrInfo.h vendor/llvm/dist/lib/Target/Mips/MipsSelectionDAGInfo.h vendor/llvm/dist/lib/Target/Mips/MipsSubtarget.h vendor/llvm/dist/lib/Target/Mips/MipsTargetMachine.h vendor/llvm/dist/lib/Target/Mips/MipsTargetStreamer.h vendor/llvm/dist/lib/Target/NVPTX/CMakeLists.txt vendor/llvm/dist/lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.h vendor/llvm/dist/lib/Target/NVPTX/MCTargetDesc/NVPTXBaseInfo.h vendor/llvm/dist/lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp vendor/llvm/dist/lib/Target/NVPTX/ManagedStringPool.h vendor/llvm/dist/lib/Target/NVPTX/NVPTX.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXAsmPrinter.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXAsmPrinter.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXAssignValidGlobalNames.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXFavorNonGenericAddrSpaces.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXFrameLowering.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXFrameLowering.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXISelDAGToDAG.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXISelLowering.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXISelLowering.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXImageOptimizer.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXLowerKernelArgs.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXMachineFunctionInfo.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXRegisterInfo.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXRegisterInfo.td vendor/llvm/dist/lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXSubtarget.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetMachine.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXUtilities.h vendor/llvm/dist/lib/Target/NVPTX/NVVMReflect.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h vendor/llvm/dist/lib/Target/PowerPC/PPC.h vendor/llvm/dist/lib/Target/PowerPC/PPCBranchSelector.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCCallingConv.h vendor/llvm/dist/lib/Target/PowerPC/PPCEarlyReturn.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCFastISel.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCFrameLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstrAltivec.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrBuilder.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstrVSX.td vendor/llvm/dist/lib/Target/PowerPC/PPCLoopDataPrefetch.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCLoopPreIncPrep.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCMCInstLower.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCSelectionDAGInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCSubtarget.h vendor/llvm/dist/lib/Target/PowerPC/PPCTLSDynamicCall.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTOCRegDeps.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetStreamer.h vendor/llvm/dist/lib/Target/PowerPC/PPCVSXCopy.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCVSXFMAMutate.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp vendor/llvm/dist/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcFixupKinds.h vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.h vendor/llvm/dist/lib/Target/Sparc/Sparc.h vendor/llvm/dist/lib/Target/Sparc/SparcFrameLowering.h vendor/llvm/dist/lib/Target/Sparc/SparcISelLowering.h vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.h vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.td vendor/llvm/dist/lib/Target/Sparc/SparcMachineFunctionInfo.h vendor/llvm/dist/lib/Target/Sparc/SparcSelectionDAGInfo.h vendor/llvm/dist/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmInstrumentation.h vendor/llvm/dist/lib/Target/X86/AsmParser/X86Operand.h vendor/llvm/dist/lib/Target/X86/Disassembler/X86Disassembler.cpp vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp vendor/llvm/dist/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h vendor/llvm/dist/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86BaseInfo.h vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86FixupKinds.h vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86WinCOFFStreamer.cpp vendor/llvm/dist/lib/Target/X86/Utils/X86ShuffleDecode.cpp vendor/llvm/dist/lib/Target/X86/Utils/X86ShuffleDecode.h vendor/llvm/dist/lib/Target/X86/X86.h vendor/llvm/dist/lib/Target/X86/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/X86AsmPrinter.h vendor/llvm/dist/lib/Target/X86/X86CallFrameOptimization.cpp vendor/llvm/dist/lib/Target/X86/X86CallingConv.h vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist/lib/Target/X86/X86FixupLEAs.cpp vendor/llvm/dist/lib/Target/X86/X86FloatingPoint.cpp vendor/llvm/dist/lib/Target/X86/X86FrameLowering.h vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist/lib/Target/X86/X86InstrAVX512.td vendor/llvm/dist/lib/Target/X86/X86InstrBuilder.h vendor/llvm/dist/lib/Target/X86/X86InstrCompiler.td vendor/llvm/dist/lib/Target/X86/X86InstrFPStack.td vendor/llvm/dist/lib/Target/X86/X86InstrFragmentsSIMD.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86IntrinsicsInfo.h vendor/llvm/dist/lib/Target/X86/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/X86MachineFunctionInfo.h vendor/llvm/dist/lib/Target/X86/X86PadShortFunction.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.h vendor/llvm/dist/lib/Target/X86/X86SelectionDAGInfo.h vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetMachine.h vendor/llvm/dist/lib/Target/X86/X86TargetObjectFile.cpp vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.cpp vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.h vendor/llvm/dist/lib/Target/X86/X86VZeroUpper.cpp vendor/llvm/dist/lib/Target/X86/X86WinEHState.cpp vendor/llvm/dist/lib/Target/XCore/Disassembler/XCoreDisassembler.cpp vendor/llvm/dist/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp vendor/llvm/dist/lib/Target/XCore/XCore.h vendor/llvm/dist/lib/Target/XCore/XCoreFrameLowering.h vendor/llvm/dist/lib/Target/XCore/XCoreFrameToArgsOffsetElim.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.h vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.h vendor/llvm/dist/lib/Target/XCore/XCoreLowerThreadLocal.cpp vendor/llvm/dist/lib/Target/XCore/XCoreMCInstLower.h vendor/llvm/dist/lib/Target/XCore/XCoreMachineFunctionInfo.h vendor/llvm/dist/lib/Target/XCore/XCoreSelectionDAGInfo.h vendor/llvm/dist/lib/Target/XCore/XCoreSubtarget.h vendor/llvm/dist/lib/Target/XCore/XCoreTargetStreamer.h vendor/llvm/dist/lib/Transforms/Hello/Hello.cpp vendor/llvm/dist/lib/Transforms/IPO/ArgumentPromotion.cpp vendor/llvm/dist/lib/Transforms/IPO/BarrierNoopPass.cpp vendor/llvm/dist/lib/Transforms/IPO/ConstantMerge.cpp vendor/llvm/dist/lib/Transforms/IPO/DeadArgumentElimination.cpp vendor/llvm/dist/lib/Transforms/IPO/ExtractGV.cpp vendor/llvm/dist/lib/Transforms/IPO/FunctionAttrs.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalDCE.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalOpt.cpp vendor/llvm/dist/lib/Transforms/IPO/IPConstantPropagation.cpp vendor/llvm/dist/lib/Transforms/IPO/InlineAlways.cpp vendor/llvm/dist/lib/Transforms/IPO/Inliner.cpp vendor/llvm/dist/lib/Transforms/IPO/LoopExtractor.cpp vendor/llvm/dist/lib/Transforms/IPO/LowerBitSets.cpp vendor/llvm/dist/lib/Transforms/IPO/MergeFunctions.cpp vendor/llvm/dist/lib/Transforms/IPO/PartialInlining.cpp vendor/llvm/dist/lib/Transforms/IPO/PruneEH.cpp vendor/llvm/dist/lib/Transforms/IPO/StripSymbols.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAddSub.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombinePHI.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/AddressSanitizer.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/BoundsChecking.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/GCOVProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/InstrProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/MemorySanitizer.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/SafeStack.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/SanitizerCoverage.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/BlotMapVector.h vendor/llvm/dist/lib/Transforms/ObjCARC/ObjCARCAPElim.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/ObjCARCContract.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/ObjCARCExpand.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/ObjCARCOpts.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp vendor/llvm/dist/lib/Transforms/Scalar/ADCE.cpp vendor/llvm/dist/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp vendor/llvm/dist/lib/Transforms/Scalar/BDCE.cpp vendor/llvm/dist/lib/Transforms/Scalar/ConstantHoisting.cpp vendor/llvm/dist/lib/Transforms/Scalar/ConstantProp.cpp vendor/llvm/dist/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp vendor/llvm/dist/lib/Transforms/Scalar/DCE.cpp vendor/llvm/dist/lib/Transforms/Scalar/DeadStoreElimination.cpp vendor/llvm/dist/lib/Transforms/Scalar/EarlyCSE.cpp vendor/llvm/dist/lib/Transforms/Scalar/FlattenCFGPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/Float2Int.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoadCombine.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopDeletion.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopDistribute.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopIdiomRecognize.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopInstSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopRerollPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopRotation.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnrollPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Scalar/LowerAtomic.cpp vendor/llvm/dist/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp vendor/llvm/dist/lib/Transforms/Scalar/MemCpyOptimizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp vendor/llvm/dist/lib/Transforms/Scalar/NaryReassociate.cpp vendor/llvm/dist/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/PlaceSafepoints.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reg2Mem.cpp vendor/llvm/dist/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/Transforms/Scalar/SROA.cpp vendor/llvm/dist/lib/Transforms/Scalar/SampleProfile.cpp vendor/llvm/dist/lib/Transforms/Scalar/ScalarReplAggregates.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyCFGPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/TailRecursionElimination.cpp vendor/llvm/dist/lib/Transforms/Utils/ASanStackFrameLayout.cpp vendor/llvm/dist/lib/Transforms/Utils/BasicBlockUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/BreakCriticalEdges.cpp vendor/llvm/dist/lib/Transforms/Utils/BypassSlowDivision.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneModule.cpp vendor/llvm/dist/lib/Transforms/Utils/CtorUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/FlattenCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/InlineFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/InstructionNamer.cpp vendor/llvm/dist/lib/Transforms/Utils/LCSSA.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnrollRuntime.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerSwitch.cpp vendor/llvm/dist/lib/Transforms/Utils/MetaRenamer.cpp vendor/llvm/dist/lib/Transforms/Utils/SSAUpdater.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyIndVar.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyInstructions.cpp vendor/llvm/dist/lib/Transforms/Utils/SymbolRewriter.cpp vendor/llvm/dist/lib/Transforms/Vectorize/BBVectorize.cpp vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp vendor/llvm/dist/test/CodeGen/AMDGPU/elf.ll vendor/llvm/dist/test/CodeGen/AMDGPU/hsa.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.AMDGPU.div_fmas.ll vendor/llvm/dist/test/CodeGen/ARM/build-attributes.ll vendor/llvm/dist/test/CodeGen/ARM/ldrd.ll vendor/llvm/dist/test/CodeGen/ARM/wrong-t2stmia-size-opt.ll vendor/llvm/dist/test/CodeGen/Generic/vector-casts.ll vendor/llvm/dist/test/CodeGen/MIR/basic-blocks.mir vendor/llvm/dist/test/CodeGen/MIR/machine-basic-block-unknown-name.mir vendor/llvm/dist/test/CodeGen/MIR/machine-function.mir vendor/llvm/dist/test/CodeGen/NVPTX/call-with-alloca-buffer.ll vendor/llvm/dist/test/CodeGen/NVPTX/intrinsics.ll vendor/llvm/dist/test/CodeGen/NVPTX/local-stack-frame.ll vendor/llvm/dist/test/CodeGen/NVPTX/lower-kernel-ptr-arg.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx.ll vendor/llvm/dist/test/CodeGen/Thumb2/float-ops.ll vendor/llvm/dist/test/CodeGen/WinEH/cppeh-prepared-catch.ll vendor/llvm/dist/test/CodeGen/X86/StackColoring.ll vendor/llvm/dist/test/CodeGen/X86/asm-reject-reg-type-mismatch.ll vendor/llvm/dist/test/CodeGen/X86/avx512-build-vector.ll vendor/llvm/dist/test/CodeGen/X86/avx512-fma-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512-fma.ll vendor/llvm/dist/test/CodeGen/X86/avx512-gather-scatter-intrin.ll vendor/llvm/dist/test/CodeGen/X86/avx512-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512bwvl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/commute-two-addr.ll vendor/llvm/dist/test/CodeGen/X86/dllexport-x86_64.ll vendor/llvm/dist/test/CodeGen/X86/dllexport.ll vendor/llvm/dist/test/CodeGen/X86/fma-phi-213-to-231.ll vendor/llvm/dist/test/CodeGen/X86/fma.ll vendor/llvm/dist/test/CodeGen/X86/fp-fast.ll vendor/llvm/dist/test/CodeGen/X86/implicit-null-check-negative.ll vendor/llvm/dist/test/CodeGen/X86/implicit-null-check.ll vendor/llvm/dist/test/CodeGen/X86/movtopush.ll vendor/llvm/dist/test/CodeGen/X86/or-branch.ll vendor/llvm/dist/test/CodeGen/X86/recip-fastmath.ll vendor/llvm/dist/test/CodeGen/X86/sdiv-exact.ll vendor/llvm/dist/test/CodeGen/X86/seh-catch-all-win32.ll vendor/llvm/dist/test/CodeGen/X86/seh-safe-div-win32.ll vendor/llvm/dist/test/CodeGen/X86/shift-combine.ll vendor/llvm/dist/test/CodeGen/X86/sqrt-fastmath.ll vendor/llvm/dist/test/CodeGen/X86/stack-folding-fp-sse42.ll vendor/llvm/dist/test/CodeGen/X86/stack-folding-int-avx2.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-stackmap-format.ll vendor/llvm/dist/test/CodeGen/X86/twoaddr-lea.ll vendor/llvm/dist/test/CodeGen/X86/vec_int_to_fp.ll vendor/llvm/dist/test/CodeGen/X86/vector-sext.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-128-v16.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-128-v8.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-256-v4.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-256-v8.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-512-v8.ll vendor/llvm/dist/test/CodeGen/X86/widen_conv-3.ll vendor/llvm/dist/test/CodeGen/X86/win64_params.ll vendor/llvm/dist/test/CodeGen/X86/win_cst_pool.ll vendor/llvm/dist/test/CodeGen/X86/win_ftol2.ll vendor/llvm/dist/test/CodeGen/X86/xor.ll vendor/llvm/dist/test/DebugInfo/X86/asm-macro-line-number.s vendor/llvm/dist/test/DebugInfo/X86/dwarf-public-names.ll vendor/llvm/dist/test/DebugInfo/dwarfdump-invalid.test vendor/llvm/dist/test/Instrumentation/AddressSanitizer/do-not-instrument-llvm-metadata-darwin.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/do-not-instrument-llvm-metadata.ll vendor/llvm/dist/test/Instrumentation/SanitizerCoverage/coverage.ll vendor/llvm/dist/test/Instrumentation/ThreadSanitizer/atomic.ll vendor/llvm/dist/test/MC/AArch64/basic-a64-diagnostics.s vendor/llvm/dist/test/MC/ARM/directive-fpu-multiple.s vendor/llvm/dist/test/MC/ARM/thumb_set-diagnostics.s vendor/llvm/dist/test/MC/ARM/thumb_set.s vendor/llvm/dist/test/MC/Disassembler/Mips/micromips.txt vendor/llvm/dist/test/MC/Disassembler/Mips/micromips32r6.txt vendor/llvm/dist/test/MC/Disassembler/Mips/micromips_le.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips1/valid-mips1.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips2/valid-mips2.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips3/valid-mips3.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32/valid-mips32-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32/valid-mips32.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32_le.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2/valid-mips32r2.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2_le.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r3/valid-mips32r3.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r5/valid-mips32r5.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r6/valid-mips32r6-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r6/valid-mips32r6.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips4/valid-mips4.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64/valid-mips64-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64/valid-mips64.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r2/valid-mips64r2-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r2/valid-mips64r2.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r3/valid-mips64r3-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r3/valid-mips64r3.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r5/valid-mips64r5-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r5/valid-mips64r5.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r6/valid-mips64r6-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r6/valid-mips64r6.txt vendor/llvm/dist/test/MC/Disassembler/PowerPC/ppc64-encoding-vmx.txt vendor/llvm/dist/test/MC/Disassembler/X86/x86-16.txt vendor/llvm/dist/test/MC/Disassembler/X86/x86-32.txt vendor/llvm/dist/test/MC/Disassembler/X86/x86-64.txt vendor/llvm/dist/test/MC/ELF/discriminator.s vendor/llvm/dist/test/MC/ELF/relax-arith.s vendor/llvm/dist/test/MC/ELF/undef.s vendor/llvm/dist/test/MC/MachO/cstexpr-gotpcrel-64.ll vendor/llvm/dist/test/MC/Mips/branch-pseudos.s vendor/llvm/dist/test/MC/Mips/expr1.s vendor/llvm/dist/test/MC/Mips/micromips32r6/valid.s vendor/llvm/dist/test/MC/Mips/mips-expansions-bad.s vendor/llvm/dist/test/MC/Mips/mips-expansions.s vendor/llvm/dist/test/MC/Mips/mips-fpu-instructions.s vendor/llvm/dist/test/MC/Mips/mips32/valid.s vendor/llvm/dist/test/MC/Mips/mips32r2/valid.s vendor/llvm/dist/test/MC/Mips/mips32r3/valid.s vendor/llvm/dist/test/MC/Mips/mips32r5/valid.s vendor/llvm/dist/test/MC/Mips/mips32r6/relocations.s vendor/llvm/dist/test/MC/Mips/mips32r6/valid.s vendor/llvm/dist/test/MC/Mips/mips64-expansions.s vendor/llvm/dist/test/MC/Mips/mips64/valid.s vendor/llvm/dist/test/MC/Mips/mips64r2/valid.s vendor/llvm/dist/test/MC/Mips/mips64r3/valid.s vendor/llvm/dist/test/MC/Mips/mips64r5/valid.s vendor/llvm/dist/test/MC/Mips/mips64r6/relocations.s vendor/llvm/dist/test/MC/Mips/mips64r6/valid.s vendor/llvm/dist/test/MC/Mips/mips_abi_flags_xx.s vendor/llvm/dist/test/MC/Mips/mips_abi_flags_xx_set.s vendor/llvm/dist/test/MC/Mips/relocation.s vendor/llvm/dist/test/MC/Mips/set-nomacro.s vendor/llvm/dist/test/MC/PowerPC/ppc64-encoding-vmx.s vendor/llvm/dist/test/MC/X86/avx512-encodings.s vendor/llvm/dist/test/MC/X86/avx512vl-encoding.s vendor/llvm/dist/test/MC/X86/x86-64-avx512bw.s vendor/llvm/dist/test/MC/X86/x86-64-avx512bw_vl.s vendor/llvm/dist/test/MC/X86/x86-64-avx512f_vl.s vendor/llvm/dist/test/Object/invalid.test vendor/llvm/dist/test/Object/lit.local.cfg vendor/llvm/dist/test/Object/objdump-symbol-table.test vendor/llvm/dist/test/Object/relocation-executable.test vendor/llvm/dist/test/Transforms/GVN/pr12979.ll vendor/llvm/dist/test/Transforms/InstCombine/select.ll vendor/llvm/dist/test/Transforms/InstCombine/sub.ll vendor/llvm/dist/test/Transforms/LoopDistribute/basic-with-memchecks.ll vendor/llvm/dist/test/Transforms/LoopDistribute/outside-use.ll vendor/llvm/dist/test/Transforms/LoopIdiom/basic.ll vendor/llvm/dist/test/Transforms/LoopReroll/nonconst_lb.ll vendor/llvm/dist/test/Transforms/LoopSimplify/single-backedge.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/2011-10-06-ReusePhi.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/ivchain-stress-X86.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll vendor/llvm/dist/test/Transforms/LoopVectorize/runtime-check.ll vendor/llvm/dist/test/Transforms/NaryReassociate/NVPTX/nary-gep.ll vendor/llvm/dist/test/Transforms/Reassociate/basictest.ll vendor/llvm/dist/test/Transforms/Reassociate/wrap-flags.ll vendor/llvm/dist/test/Transforms/RewriteStatepointsForGC/live-vector.ll vendor/llvm/dist/test/Transforms/SCCP/crash.ll vendor/llvm/dist/test/Transforms/SafeStack/no-attr.ll vendor/llvm/dist/test/tools/gold/slp-vectorize.ll vendor/llvm/dist/test/tools/llvm-objdump/X86/macho-symbol-table.test vendor/llvm/dist/tools/CMakeLists.txt vendor/llvm/dist/tools/dsymutil/DebugMap.cpp vendor/llvm/dist/tools/dsymutil/DwarfLinker.cpp vendor/llvm/dist/tools/dsymutil/MachODebugMapParser.cpp vendor/llvm/dist/tools/lli/OrcLazyJIT.h vendor/llvm/dist/tools/llvm-ar/llvm-ar.cpp vendor/llvm/dist/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp vendor/llvm/dist/tools/llvm-cov/CodeCoverage.cpp vendor/llvm/dist/tools/llvm-cxxdump/llvm-cxxdump.cpp vendor/llvm/dist/tools/llvm-dwarfdump/llvm-dwarfdump.cpp vendor/llvm/dist/tools/llvm-nm/llvm-nm.cpp vendor/llvm/dist/tools/llvm-objdump/CMakeLists.txt vendor/llvm/dist/tools/llvm-objdump/COFFDump.cpp vendor/llvm/dist/tools/llvm-objdump/ELFDump.cpp vendor/llvm/dist/tools/llvm-objdump/MachODump.cpp vendor/llvm/dist/tools/llvm-objdump/llvm-objdump.cpp vendor/llvm/dist/tools/llvm-readobj/ARMEHABIPrinter.h vendor/llvm/dist/tools/llvm-readobj/ARMWinEHPrinter.cpp vendor/llvm/dist/tools/llvm-readobj/CMakeLists.txt vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp vendor/llvm/dist/tools/llvm-readobj/ELFDumper.cpp vendor/llvm/dist/tools/llvm-readobj/MachODumper.cpp vendor/llvm/dist/tools/llvm-readobj/ObjDumper.h vendor/llvm/dist/tools/llvm-readobj/Win64EHDumper.cpp vendor/llvm/dist/tools/llvm-readobj/llvm-readobj.cpp vendor/llvm/dist/tools/llvm-rtdyld/llvm-rtdyld.cpp vendor/llvm/dist/tools/llvm-stress/llvm-stress.cpp vendor/llvm/dist/tools/llvm-symbolizer/LLVMSymbolize.cpp vendor/llvm/dist/tools/llvm-symbolizer/LLVMSymbolize.h vendor/llvm/dist/tools/lto/lto.cpp vendor/llvm/dist/tools/lto/lto.exports vendor/llvm/dist/tools/obj2yaml/coff2yaml.cpp vendor/llvm/dist/tools/obj2yaml/elf2yaml.cpp vendor/llvm/dist/unittests/ADT/APIntTest.cpp vendor/llvm/dist/unittests/ADT/APSIntTest.cpp vendor/llvm/dist/unittests/ADT/DenseMapTest.cpp vendor/llvm/dist/unittests/ADT/TripleTest.cpp vendor/llvm/dist/unittests/AsmParser/AsmParserTest.cpp vendor/llvm/dist/unittests/CodeGen/DIEHashTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/CMakeLists.txt vendor/llvm/dist/unittests/IR/IRBuilderTest.cpp vendor/llvm/dist/unittests/IR/MetadataTest.cpp vendor/llvm/dist/unittests/IR/ValueTest.cpp vendor/llvm/dist/unittests/Option/OptionParsingTest.cpp vendor/llvm/dist/unittests/ProfileData/InstrProfTest.cpp vendor/llvm/dist/unittests/Transforms/Utils/Cloning.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/RegisterInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/X86RecognizableInstr.cpp vendor/llvm/dist/utils/lit/lit/TestingConfig.py vendor/llvm/dist/utils/release/test-release.sh Modified: vendor/llvm/dist/.gitignore ============================================================================== --- vendor/llvm/dist/.gitignore Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/.gitignore Sun Jul 5 14:21:36 2015 (r285163) @@ -43,9 +43,7 @@ autoconf/autom4te.cache # Directories to ignore (do not add trailing '/'s, they skip symlinks). #==============================================================================# # External projects that are tracked independently. -projects/* -!projects/CMakeLists.txt -!projects/Makefile +projects/*/ # Clang, which is tracked independently. tools/clang # LLDB, which is tracked independently. Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/CMakeLists.txt Sun Jul 5 14:21:36 2015 (r285163) @@ -530,7 +530,7 @@ endif() # check its symbols. This is wasteful (the check was done when foo.so # was created) and can fail since it is not the dynamic linker and # doesn't know how to handle search paths correctly. -if (UNIX AND NOT APPLE) +if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-allow-shlib-undefined") endif() Modified: vendor/llvm/dist/CODE_OWNERS.TXT ============================================================================== --- vendor/llvm/dist/CODE_OWNERS.TXT Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/CODE_OWNERS.TXT Sun Jul 5 14:21:36 2015 (r285163) @@ -65,6 +65,10 @@ N: Hal Finkel E: hfinkel@anl.gov D: BBVectorize, the loop reroller, alias analysis and the PowerPC target +N: Dan Gohman +E: sunfish@mozilla.com +D: WebAssembly Backend (lib/Target/WebAssembly/*) + N: Renato Golin E: renato.golin@linaro.org D: ARM Linux support Modified: vendor/llvm/dist/CREDITS.TXT ============================================================================== --- vendor/llvm/dist/CREDITS.TXT Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/CREDITS.TXT Sun Jul 5 14:21:36 2015 (r285163) @@ -152,8 +152,9 @@ E: foldr@codedgers.com D: Author of llvmc2 N: Dan Gohman -E: dan433584@gmail.com +E: sunfish@mozilla.com D: Miscellaneous bug fixes +D: WebAssembly Backend N: David Goodwin E: david@goodwinz.net Modified: vendor/llvm/dist/Makefile.config.in ============================================================================== --- vendor/llvm/dist/Makefile.config.in Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/Makefile.config.in Sun Jul 5 14:21:36 2015 (r285163) @@ -58,20 +58,9 @@ LLVM_OBJ_ROOT := $(call realpath, @abs PROJ_SRC_ROOT := $(LLVM_SRC_ROOT) PROJ_SRC_DIR := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)) -# FIXME: This is temporary during the grace period where in-source builds are -# deprecated. Convert to a hard error when that period is up. -# # See: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150323/268067.html ifeq ($(LLVM_SRC_ROOT), $(LLVM_OBJ_ROOT)) - $(warning ######################################################################################) - $(warning # #) - $(warning # WARNING #) - $(warning # #) - $(warning # In-source builds are deprecated. #) - $(warning # #) - $(warning # Please configure from a separate build directory! #) - $(warning # #) - $(warning ######################################################################################) + $(error In-source builds are not allowed. Please configure from a separate build directory!) endif ifneq ($(CLANG_SRC_ROOT),) Modified: vendor/llvm/dist/autoconf/configure.ac ============================================================================== --- vendor/llvm/dist/autoconf/configure.ac Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/autoconf/configure.ac Sun Jul 5 14:21:36 2015 (r285163) @@ -75,15 +75,7 @@ fi dnl Quit if it is an in-source build if test ${srcdir} == "." ; then - AC_MSG_WARN([**************************************************************************************]) - AC_MSG_WARN([* *]) - AC_MSG_WARN([* WARNING *]) - AC_MSG_WARN([* *]) - AC_MSG_WARN([* In-source builds are deprecated. *]) - AC_MSG_WARN([* *]) - AC_MSG_WARN([* Please configure from a separate build directory! *]) - AC_MSG_WARN([* *]) - AC_MSG_WARN([**************************************************************************************]) + AC_MSG_ERROR([In-source builds are not allowed. Please configure from a separate build directory!]) fi dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS, @@ -445,6 +437,7 @@ AC_CACHE_CHECK([target architecture],[ll hexagon-*) llvm_cv_target_arch="Hexagon" ;; nvptx-*) llvm_cv_target_arch="NVPTX" ;; s390x-*) llvm_cv_target_arch="SystemZ" ;; + wasm*-*) llvm_cv_target_arch="WebAssembly" ;; *) llvm_cv_target_arch="Unknown" ;; esac]) @@ -480,6 +473,7 @@ case $host in msp430-*) host_arch="MSP430" ;; hexagon-*) host_arch="Hexagon" ;; s390x-*) host_arch="SystemZ" ;; + wasm*-*) host_arch="WebAssembly" ;; *) host_arch="Unknown" ;; esac @@ -812,6 +806,7 @@ else Hexagon) AC_SUBST(TARGET_HAS_JIT,0) ;; NVPTX) AC_SUBST(TARGET_HAS_JIT,0) ;; SystemZ) AC_SUBST(TARGET_HAS_JIT,1) ;; + WebAssembly) AC_SUBST(TARGET_HAS_JIT,0) ;; *) AC_SUBST(TARGET_HAS_JIT,0) ;; esac fi @@ -1105,7 +1100,7 @@ TARGETS_TO_BUILD="" AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets], [Build specific host targets: all or target1,target2,... Valid targets are: host, x86, x86_64, sparc, powerpc, arm64, arm, aarch64, mips, hexagon, - xcore, msp430, nvptx, systemz, r600, bpf, and cpp (default=all)]),, + xcore, msp430, nvptx, systemz, r600, bpf, wasm, and cpp (default=all)]),, enableval=all) if test "$enableval" = host-only ; then enableval=host @@ -1134,6 +1129,7 @@ case "$enableval" in systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; amdgpu) TARGETS_TO_BUILD="AMDGPU $TARGETS_TO_BUILD" ;; r600) TARGETS_TO_BUILD="AMDGPU $TARGETS_TO_BUILD" ;; + wasm) TARGETS_TO_BUILD="WebAssembly $TARGETS_TO_BUILD" ;; host) case "$llvm_cv_target_arch" in x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; @@ -1147,6 +1143,7 @@ case "$enableval" in Hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;; NVPTX) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;; SystemZ) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; + WebAssembly) TARGETS_TO_BUILD="WebAssembly $TARGETS_TO_BUILD" ;; *) AC_MSG_ERROR([Can not set target to build]) ;; esac ;; *) AC_MSG_ERROR([Unrecognized target $a_target]) ;; @@ -1631,7 +1628,6 @@ dnl===---------------------------------- AC_CHECK_LIB(m,sin) if test "$llvm_cv_os_type" = "MingW" ; then - AC_CHECK_LIB(imagehlp, main) AC_CHECK_LIB(ole32, main) AC_CHECK_LIB(psapi, main) AC_CHECK_LIB(shell32, main) Modified: vendor/llvm/dist/bindings/ocaml/executionengine/llvm_executionengine.ml ============================================================================== --- vendor/llvm/dist/bindings/ocaml/executionengine/llvm_executionengine.ml Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/bindings/ocaml/executionengine/llvm_executionengine.ml Sun Jul 5 14:21:36 2015 (r285163) @@ -43,11 +43,11 @@ external run_static_dtors : llexecutione = "llvm_ee_run_static_dtors" external data_layout : llexecutionengine -> Llvm_target.DataLayout.t = "llvm_ee_get_data_layout" -external add_global_mapping_ : Llvm.llvalue -> int64 -> llexecutionengine -> unit +external add_global_mapping_ : Llvm.llvalue -> nativeint -> llexecutionengine -> unit = "llvm_ee_add_global_mapping" -external get_global_value_address_ : string -> llexecutionengine -> int64 +external get_global_value_address_ : string -> llexecutionengine -> nativeint = "llvm_ee_get_global_value_address" -external get_function_address_ : string -> llexecutionengine -> int64 +external get_function_address_ : string -> llexecutionengine -> nativeint = "llvm_ee_get_function_address" let add_global_mapping llval ptr ee = @@ -55,14 +55,14 @@ let add_global_mapping llval ptr ee = let get_global_value_address name typ ee = let vptr = get_global_value_address_ name ee in - if Int64.to_int vptr <> 0 then + if Nativeint.to_int vptr <> 0 then let open Ctypes in !@ (coerce (ptr void) (ptr typ) (ptr_of_raw_address vptr)) else raise (Error ("Value " ^ name ^ " not found")) let get_function_address name typ ee = let fptr = get_function_address_ name ee in - if Int64.to_int fptr <> 0 then + if Nativeint.to_int fptr <> 0 then let open Ctypes in coerce (ptr void) typ (ptr_of_raw_address fptr) else raise (Error ("Function " ^ name ^ " not found")) Modified: vendor/llvm/dist/cmake/config-ix.cmake ============================================================================== --- vendor/llvm/dist/cmake/config-ix.cmake Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/cmake/config-ix.cmake Sun Jul 5 14:21:36 2015 (r285163) @@ -358,6 +358,10 @@ elseif (LLVM_NATIVE_ARCH MATCHES "hexago set(LLVM_NATIVE_ARCH Hexagon) elseif (LLVM_NATIVE_ARCH MATCHES "s390x") set(LLVM_NATIVE_ARCH SystemZ) +elseif (LLVM_NATIVE_ARCH MATCHES "wasm32") + set(LLVM_NATIVE_ARCH WebAssembly) +elseif (LLVM_NATIVE_ARCH MATCHES "wasm64") + set(LLVM_NATIVE_ARCH WebAssembly) else () message(FATAL_ERROR "Unknown architecture ${LLVM_NATIVE_ARCH}") endif () @@ -393,12 +397,10 @@ else () endif () if( MINGW ) - set(HAVE_LIBIMAGEHLP 1) set(HAVE_LIBPSAPI 1) set(HAVE_LIBSHELL32 1) # TODO: Check existence of libraries. # include(CheckLibraryExists) - # CHECK_LIBRARY_EXISTS(imagehlp ??? . HAVE_LIBIMAGEHLP) endif( MINGW ) if (NOT HAVE_STRTOLL) @@ -546,13 +548,13 @@ else() if( OCAML_VERSION VERSION_LESS "4.00.0" ) message(STATUS "OCaml bindings disabled, need OCaml >=4.00.0.") else() - find_ocamlfind_package(ctypes VERSION 0.3 OPTIONAL) + find_ocamlfind_package(ctypes VERSION 0.4 OPTIONAL) if( HAVE_OCAML_CTYPES ) message(STATUS "OCaml bindings enabled.") find_ocamlfind_package(oUnit VERSION 2 OPTIONAL) set(LLVM_BINDINGS "${LLVM_BINDINGS} ocaml") else() - message(STATUS "OCaml bindings disabled, need ctypes >=0.3.") + message(STATUS "OCaml bindings disabled, need ctypes >=0.4.") endif() endif() endif() Modified: vendor/llvm/dist/cmake/modules/AddLLVM.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/AddLLVM.cmake Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/cmake/modules/AddLLVM.cmake Sun Jul 5 14:21:36 2015 (r285163) @@ -83,8 +83,13 @@ function(add_llvm_symbol_exports target_ DEPENDS ${export_file} VERBATIM COMMENT "Creating export file for ${target_name}") - set_property(TARGET ${target_name} APPEND_STRING PROPERTY - LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}") + if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") + set_property(TARGET ${target_name} APPEND_STRING PROPERTY + LINK_FLAGS " -Wl,-M,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}") + else() + set_property(TARGET ${target_name} APPEND_STRING PROPERTY + LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}") + endif() else() set(native_export_file "${target_name}.def") @@ -163,7 +168,7 @@ function(add_link_opts target_name) # Pass -O3 to the linker. This enabled different optimizations on different # linkers. - if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32)) + if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin|SunOS" OR WIN32)) set_property(TARGET ${target_name} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-O3") endif() @@ -181,6 +186,9 @@ function(add_link_opts target_name) # ld64's implementation of -dead_strip breaks tools that use plugins. set_property(TARGET ${target_name} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-dead_strip") + elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") + set_property(TARGET ${target_name} APPEND_STRING PROPERTY + LINK_FLAGS " -Wl,-z -Wl,discard-unused=sections") elseif(NOT WIN32 AND NOT LLVM_LINKER_IS_GOLD) # Object files are compiled with -ffunction-data-sections. # Versions of bfd ld < 2.23.1 have a bug in --gc-sections that breaks @@ -495,11 +503,17 @@ macro(add_llvm_library name) else() llvm_add_library(${name} ${ARGN}) endif() - set_property( GLOBAL APPEND PROPERTY LLVM_LIBS ${name} ) + # The gtest libraries should not be installed or exported as a target + if ("${name}" STREQUAL gtest OR "${name}" STREQUAL gtest_main) + set(_is_gtest TRUE) + else() + set(_is_gtest FALSE) + set_property( GLOBAL APPEND PROPERTY LLVM_LIBS ${name} ) + endif() if( EXCLUDE_FROM_ALL ) set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON) - else() + elseif(NOT _is_gtest) if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LTO") if(ARG_SHARED OR BUILD_SHARED_LIBS) if(WIN32 OR CYGWIN) Modified: vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Sun Jul 5 14:21:36 2015 (r285163) @@ -308,9 +308,9 @@ if( MSVC ) -wd4805 # Suppress 'unsafe mix of type and type in operation' -wd4204 # Suppress 'nonstandard extension used : non-constant aggregate initializer' - # Idelly, we'd like this warning to be enabled, but MSVC 2013 doesn't + # Ideally, we'd like this warning to be enabled, but MSVC 2013 doesn't # support the 'aligned' attribute in the way that clang sources requires (for - # any code that uses the LLVM_ALIGNAS marco), so this is must be disabled to + # any code that uses the LLVM_ALIGNAS macro), so this is must be disabled to # avoid unwanted alignment warnings. # When we switch to requiring a version of MSVC that supports the 'alignas' # specifier (MSVC 2015?) this warning can be re-enabled. Modified: vendor/llvm/dist/cmake/modules/Makefile ============================================================================== --- vendor/llvm/dist/cmake/modules/Makefile Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/cmake/modules/Makefile Sun Jul 5 14:21:36 2015 (r285163) @@ -47,6 +47,12 @@ ifeq ($(LLVM_LIBS_TO_EXPORT),Error) $(error llvm-config --libs failed) endif +# Strip out gtest and gtest_main from LLVM_LIBS_TO_EXPORT, these are not +# installed and won't be available from the install tree. +# FIXME: If we used llvm-config from the install tree this wouldn't be +# necessary. +LLVM_LIBS_TO_EXPORT := $(filter-out gtest gtest_main,$(LLVM_LIBS_TO_EXPORT)) + ifndef LLVM_LIBS_TO_EXPORT $(error LLVM_LIBS_TO_EXPORT cannot be empty) endif @@ -54,11 +60,27 @@ endif OBJMODS := LLVMConfig.cmake LLVMConfigVersion.cmake LLVMExports.cmake +LLVM_CONFIG_CODE := \ +\# Compute the CMake directory from the LLVMConfig.cmake file location.\n\ +get_filename_component(_LLVM_CMAKE_DIR "$${CMAKE_CURRENT_LIST_FILE}" PATH)\n\ +\# Compute the installation prefix from the LLVMConfig.cmake file location.\n\ +get_filename_component(LLVM_INSTALL_PREFIX "$${CMAKE_CURRENT_LIST_FILE}" PATH)\n + +# Compute number of levels (typically 3 - ``share/llvm/cmake/``) to PROJ_prefix +# from PROJ_cmake, then emit the appropriate number of calls to +# get_filename_components(). Note this assumes there are no spaces in the +# cmake_path_suffix variable. +cmake_path_suffix := $(subst $(PROJ_prefix),,$(subst $(DESTDIR),,$(PROJ_cmake))) +cmake_path_dirs := $(subst /, ,$(cmake_path_suffix)) +LLVM_CONFIG_CODE += $(foreach __not_used,$(cmake_path_dirs),get_filename_component(LLVM_INSTALL_PREFIX "$${LLVM_INSTALL_PREFIX}" PATH)\n) + +LLVM_CONFIG_CODE += set(_LLVM_LIBRARY_DIR "$${LLVM_INSTALL_PREFIX}\/lib") + $(PROJ_OBJ_DIR)/LLVMConfig.cmake: LLVMConfig.cmake.in Makefile $(LLVMBuildCMakeFrag) $(Echo) 'Generating LLVM CMake package config file' $(Verb) ( \ cat $< | sed \ - -e 's/@LLVM_CONFIG_CODE@/set(LLVM_INSTALL_PREFIX "'"$(subst /,\/,$(PROJ_prefix))"'")/' \ + -e 's/@LLVM_CONFIG_CODE@/$(LLVM_CONFIG_CODE)/' \ -e 's/@LLVM_VERSION_MAJOR@/'"$(LLVM_VERSION_MAJOR)"'/' \ -e 's/@LLVM_VERSION_MINOR@/'"$(LLVM_VERSION_MINOR)"'/' \ -e 's/@LLVM_VERSION_PATCH@/'"$(LLVM_VERSION_PATCH)"'/' \ @@ -81,17 +103,20 @@ $(PROJ_OBJ_DIR)/LLVMConfig.cmake: LLVMCo -e 's/@LLVM_ON_UNIX@/'"$(LLVM_ON_UNIX)"'/' \ -e 's/@LLVM_ON_WIN32@/'"$(LLVM_ON_WIN32)"'/' \ -e 's/@LLVM_LIBDIR_SUFFIX@//' \ - -e 's/@LLVM_CONFIG_INCLUDE_DIRS@/'"$(subst /,\/,$(PROJ_includedir))"'/' \ - -e 's/@LLVM_CONFIG_LIBRARY_DIRS@/'"$(subst /,\/,$(PROJ_libdir))"'/' \ - -e 's/@LLVM_CONFIG_CMAKE_DIR@/'"$(subst /,\/,$(PROJ_cmake))"'/' \ - -e 's/@LLVM_CONFIG_TOOLS_BINARY_DIR@/'"$(subst /,\/,$(PROJ_bindir))"'/' \ + -e 's#@LLVM_CONFIG_INCLUDE_DIRS@#$${LLVM_INSTALL_PREFIX}/include#' \ + -e 's#@LLVM_CONFIG_LIBRARY_DIRS@#$${_LLVM_LIBRARY_DIR}#' \ + -e 's#@LLVM_CONFIG_CMAKE_DIR@#$${_LLVM_CMAKE_DIR}#' \ + -e 's#@LLVM_CONFIG_TOOLS_BINARY_DIR@#$${LLVM_INSTALL_PREFIX}/bin#' \ -e 's/@LLVM_CONFIG_EXPORTS_FILE@/$${LLVM_CMAKE_DIR}\/LLVMExports.cmake/' \ -e 's/@all_llvm_lib_deps@//' \ && \ - grep '^set_property.*LLVMBUILD_LIB_DEPS_' "$(LLVMBuildCMakeFrag)" \ + ( grep '^set_property.*LLVMBUILD_LIB_DEPS_' "$(LLVMBuildCMakeFrag)" | \ + grep -v LLVMBUILD_LIB_DEPS_gtest ) && \ + echo 'unset(_LLVM_CMAKE_DIR)' && \ + echo 'unset(_LLVM_LIBRARY_DIR)' \ ) > $@ -$(PROJ_OBJ_DIR)/LLVMConfigVersion.cmake: LLVMConfigVersion.cmake.in +$(PROJ_OBJ_DIR)/LLVMConfigVersion.cmake: LLVMConfigVersion.cmake.in Makefile $(Echo) 'Generating LLVM CMake package version file' $(Verb) cat $< | sed \ -e 's/@PACKAGE_VERSION@/'"$(LLVMVersion)"'/' \ @@ -100,13 +125,13 @@ $(PROJ_OBJ_DIR)/LLVMConfigVersion.cmake: -e 's/@LLVM_VERSION_PATCH@/'"$(LLVM_VERSION_PATCH)"'/' \ > $@ -$(PROJ_OBJ_DIR)/LLVMExports.cmake: $(LLVMBuildCMakeExportsFrag) +$(PROJ_OBJ_DIR)/LLVMExports.cmake: $(LLVMBuildCMakeExportsFrag) Makefile $(Echo) 'Generating LLVM CMake target exports file' $(Verb) ( \ echo '# LLVM CMake target exports. Do not include directly.' && \ for lib in $(LLVM_LIBS_TO_EXPORT); do \ echo 'add_library('"$$lib"' STATIC IMPORTED)' && \ - echo 'set_property(TARGET '"$$lib"' PROPERTY IMPORTED_LOCATION "'"$(PROJ_libdir)/lib$$lib.a"'")' ; \ + echo 'set_property(TARGET '"$$lib"' PROPERTY IMPORTED_LOCATION "$${_LLVM_LIBRARY_DIR}/'lib$$lib.a'")' ; \ done && \ cat "$(LLVMBuildCMakeExportsFrag)" && \ echo 'set_property(TARGET LLVMSupport APPEND PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES '"$(subst -l,,$(LIBS))"')' \ Modified: vendor/llvm/dist/configure ============================================================================== --- vendor/llvm/dist/configure Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/configure Sun Jul 5 14:21:36 2015 (r285163) @@ -1463,7 +1463,7 @@ Optional Features: target1,target2,... Valid targets are: host, x86, x86_64, sparc, powerpc, arm64, arm, aarch64, mips, hexagon, xcore, msp430, nvptx, systemz, r600, bpf, - and cpp (default=all) + wasm, and cpp (default=all) --enable-experimental-targets Build experimental host targets: disable or target1,target2,... (default=disable) @@ -2033,24 +2033,9 @@ echo "$as_me: error: Already configured fi if test ${srcdir} == "." ; then - { echo "$as_me:$LINENO: WARNING: **************************************************************************************" >&5 -echo "$as_me: WARNING: **************************************************************************************" >&2;} - { echo "$as_me:$LINENO: WARNING: * *" >&5 -echo "$as_me: WARNING: * *" >&2;} - { echo "$as_me:$LINENO: WARNING: * WARNING *" >&5 -echo "$as_me: WARNING: * WARNING *" >&2;} - { echo "$as_me:$LINENO: WARNING: * *" >&5 -echo "$as_me: WARNING: * *" >&2;} - { echo "$as_me:$LINENO: WARNING: * In-source builds are deprecated. *" >&5 -echo "$as_me: WARNING: * In-source builds are deprecated. *" >&2;} - { echo "$as_me:$LINENO: WARNING: * *" >&5 -echo "$as_me: WARNING: * *" >&2;} - { echo "$as_me:$LINENO: WARNING: * Please configure from a separate build directory! *" >&5 -echo "$as_me: WARNING: * Please configure from a separate build directory! *" >&2;} - { echo "$as_me:$LINENO: WARNING: * *" >&5 -echo "$as_me: WARNING: * *" >&2;} - { echo "$as_me:$LINENO: WARNING: **************************************************************************************" >&5 -echo "$as_me: WARNING: **************************************************************************************" >&2;} + { { echo "$as_me:$LINENO: error: In-source builds are not allowed. Please configure from a separate build directory!" >&5 +echo "$as_me: error: In-source builds are not allowed. Please configure from a separate build directory!" >&2;} + { (exit 1); exit 1; }; } fi : ${CFLAGS=} @@ -4207,6 +4192,7 @@ else hexagon-*) llvm_cv_target_arch="Hexagon" ;; nvptx-*) llvm_cv_target_arch="NVPTX" ;; s390x-*) llvm_cv_target_arch="SystemZ" ;; + wasm*-*) llvm_cv_target_arch="WebAssembly" ;; *) llvm_cv_target_arch="Unknown" ;; esac fi @@ -4243,6 +4229,7 @@ case $host in msp430-*) host_arch="MSP430" ;; hexagon-*) host_arch="Hexagon" ;; s390x-*) host_arch="SystemZ" ;; + wasm*-*) host_arch="WebAssembly" ;; *) host_arch="Unknown" ;; esac @@ -5170,6 +5157,8 @@ else ;; SystemZ) TARGET_HAS_JIT=1 ;; + WebAssembly) TARGET_HAS_JIT=0 + ;; *) TARGET_HAS_JIT=0 ;; esac @@ -5667,6 +5656,7 @@ case "$enableval" in systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; amdgpu) TARGETS_TO_BUILD="AMDGPU $TARGETS_TO_BUILD" ;; r600) TARGETS_TO_BUILD="AMDGPU $TARGETS_TO_BUILD" ;; + wasm) TARGETS_TO_BUILD="WebAssembly $TARGETS_TO_BUILD" ;; host) case "$llvm_cv_target_arch" in x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; @@ -5680,6 +5670,7 @@ case "$enableval" in Hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;; NVPTX) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;; SystemZ) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; + WebAssembly) TARGETS_TO_BUILD="WebAssembly $TARGETS_TO_BUILD" ;; *) { { echo "$as_me:$LINENO: error: Can not set target to build" >&5 echo "$as_me: error: Can not set target to build" >&2;} { (exit 1); exit 1; }; } ;; Modified: vendor/llvm/dist/docs/AMDGPUUsage.rst ============================================================================== --- vendor/llvm/dist/docs/AMDGPUUsage.rst Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/docs/AMDGPUUsage.rst Sun Jul 5 14:21:36 2015 (r285163) @@ -92,3 +92,86 @@ strings: v_mul_i32_i24 v1, v2, v3 v_mul_i32_i24_e32 v1, v2, v3 v_mul_i32_i24_e64 v1, v2, v3 + +Assembler Directives +-------------------- + +.hsa_code_object_version major, minor +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +*major* and *minor* are integers that specify the version of the HSA code +object that will be generated by the assembler. This value will be stored +in an entry of the .note section. + +.hsa_code_object_isa [major, minor, stepping, vendor, arch] +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +*major*, *minor*, and *stepping* are all integers that describe the instruction +set architecture (ISA) version of the assembly program. + +*vendor* and *arch* are quoted strings. *vendor* should always be equal to +"AMD" and *arch* should always be equal to "AMDGPU". + +If no arguments are specified, then the assembler will derive the ISA version, +*vendor*, and *arch* from the value of the -mcpu option that is passed to the +assembler. + +ISA version, *vendor*, and *arch* will all be stored in a single entry of the +.note section. + +.amd_kernel_code_t +^^^^^^^^^^^^^^^^^^ + +This directive marks the beginning of a list of key / value pairs that are used +to specify the amd_kernel_code_t object that will be emitted by the assembler. +The list must be terminated by the *.end_amd_kernel_code_t* directive. For +any amd_kernel_code_t values that are unspecified a default value will be +used. The default value for all keys is 0, with the following exceptions: + +- *kernel_code_version_major* defaults to 1. +- *machine_kind* defaults to 1. +- *machine_version_major*, *machine_version_minor*, and + *machine_version_stepping* are derived from the value of the -mcpu option + that is passed to the assembler. +- *kernel_code_entry_byte_offset* defaults to 256. +- *wavefront_size* defaults to 6. +- *kernarg_segment_alignment*, *group_segment_alignment*, and + *private_segment_alignment* default to 4. Note that alignments are specified + as a power of two, so a value of **n** means an alignment of 2^ **n**. + +The *.amd_kernel_code_t* directive must be placed immediately after the +function label and before any instructions. + +For a full list of amd_kernel_code_t keys, see the examples in +test/CodeGen/AMDGPU/hsa.s. For an explanation of the meanings of the different +keys, see the comments in lib/Target/AMDGPU/AmdKernelCodeT.h + +Here is an example of a minimal amd_kernel_code_t specification: + +.. code-block:: nasm + + .hsa_code_object_version 1,0 + .hsa_code_object_isa + + .text + + hello_world: + + .amd_kernel_code_t + enable_sgpr_kernarg_segment_ptr = 1 + is_ptr64 = 1 + compute_pgm_rsrc1_vgprs = 0 + compute_pgm_rsrc1_sgprs = 0 + compute_pgm_rsrc2_user_sgpr = 2 + kernarg_segment_byte_size = 8 + wavefront_sgpr_count = 2 + workitem_vgpr_count = 3 + .end_amd_kernel_code_t + + s_load_dwordx2 s[0:1], s[0:1] 0x0 + v_mov_b32 v0, 3.14159 + s_waitcnt lgkmcnt(0) + v_mov_b32 v1, s0 + v_mov_b32 v2, s1 + flat_store_dword v0, v[1:2] + s_endpgm Modified: vendor/llvm/dist/docs/AliasAnalysis.rst ============================================================================== --- vendor/llvm/dist/docs/AliasAnalysis.rst Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/docs/AliasAnalysis.rst Sun Jul 5 14:21:36 2015 (r285163) @@ -286,8 +286,8 @@ Mod/Ref result, simply return whatever t .. code-block:: c++ - AliasAnalysis::AliasResult alias(const Value *V1, unsigned V1Size, - const Value *V2, unsigned V2Size) { + AliasResult alias(const Value *V1, unsigned V1Size, + const Value *V2, unsigned V2Size) { if (...) return NoAlias; ... Modified: vendor/llvm/dist/docs/CMake.rst ============================================================================== --- vendor/llvm/dist/docs/CMake.rst Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/docs/CMake.rst Sun Jul 5 14:21:36 2015 (r285163) @@ -327,8 +327,8 @@ LLVM-specific variables **LLVM_USE_SANITIZER**:STRING Define the sanitizer used to build LLVM binaries and tests. Possible values - are ``Address``, ``Memory``, ``MemoryWithOrigins`` and ``Undefined``. - Defaults to empty string. + are ``Address``, ``Memory``, ``MemoryWithOrigins``, ``Undefined``, ``Thread``, + and ``Address;Undefined``. Defaults to empty string. **LLVM_PARALLEL_COMPILE_JOBS**:STRING Define the maximum number of concurrent compilation jobs. Modified: vendor/llvm/dist/docs/CodeGenerator.rst ============================================================================== --- vendor/llvm/dist/docs/CodeGenerator.rst Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/docs/CodeGenerator.rst Sun Jul 5 14:21:36 2015 (r285163) @@ -749,7 +749,7 @@ The SelectionDAG is a Directed-Acyclic-G ``SDNode`` class. The primary payload of the ``SDNode`` is its operation code (Opcode) that indicates what operation the node performs and the operands to the operation. The various operation node types are described at the top of the -``include/llvm/CodeGen/SelectionDAGNodes.h`` file. +``include/llvm/CodeGen/ISDOpcodes.h`` file. Although most operations define a single value, each node in the graph may define multiple values. For example, a combined div/rem operation will define @@ -829,7 +829,7 @@ One great way to visualize what is going LLC command line options. The following options pop up a window displaying the SelectionDAG at specific times (if you only get errors printed to the console while using this, you probably `need to configure your -system `_ to add support for it). +system `_ to add support for it). * ``-view-dag-combine1-dags`` displays the DAG after being built, before the first optimization pass. Modified: vendor/llvm/dist/docs/CommandGuide/llvm-dwarfdump.rst ============================================================================== --- vendor/llvm/dist/docs/CommandGuide/llvm-dwarfdump.rst Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/docs/CommandGuide/llvm-dwarfdump.rst Sun Jul 5 14:21:36 2015 (r285163) @@ -26,5 +26,5 @@ OPTIONS EXIT STATUS ----------- -:program:`llvm-dwarfdump` returns 0. Other exit codes imply internal -program error. +:program:`llvm-dwarfdump` returns 0 if the input files were parsed and dumped +successfully. Otherwise, it returns 1. Modified: vendor/llvm/dist/docs/FaultMaps.rst ============================================================================== --- vendor/llvm/dist/docs/FaultMaps.rst Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/docs/FaultMaps.rst Sun Jul 5 14:21:36 2015 (r285163) @@ -49,6 +49,79 @@ The format of this section is FunctionFaultInfo[NumFaultingPCs] { uint32 : FaultKind = FaultMaps::FaultingLoad (only legal value currently) uint32 : FaultingPCOffset - uint32 : handlerPCOffset + uint32 : HandlerPCOffset } } + + +The ``ImplicitNullChecks`` pass +=============================== + +The ``ImplicitNullChecks`` pass transforms explicit control flow for +checking if a pointer is ``null``, like: + +.. code-block:: llvm + + %ptr = call i32* @get_ptr() + %ptr_is_null = icmp i32* %ptr, null + br i1 %ptr_is_null, label %is_null, label %not_null, !make.implicit !0 + + not_null: + %t = load i32, i32* %ptr + br label %do_something_with_t + + is_null: + call void @HFC() + unreachable + + !0 = !{} + +to control flow implicit in the instruction loading or storing through +the pointer being null checked: + +.. code-block:: llvm + + %ptr = call i32* @get_ptr() + %t = load i32, i32* %ptr ;; handler-pc = label %is_null + br label %do_something_with_t + + is_null: + call void @HFC() + unreachable + +This transform happens at the ``MachineInstr`` level, not the LLVM IR +level (so the above example is only representative, not literal). The +``ImplicitNullChecks`` pass runs during codegen, if +``-enable-implicit-null-checks`` is passed to ``llc``. + +The ``ImplicitNullChecks`` pass adds entries to the +``__llvm_faultmaps`` section described above as needed. + +``make.implicit`` metadata +-------------------------- + +Making null checks implicit is an aggressive optimization, and it can +be a net performance pessimization if too many memory operations end +up faulting because of it. A language runtime typically needs to +ensure that only a negligible number of implicit null checks actually +fault once the application has reached a steady state. A standard way +of doing this is by healing failed implicit null checks into explicit +null checks via code patching or recompilation. It follows that there +are two requirements an explicit null check needs to satisfy for it to +be profitable to convert it to an implicit null check: + + 1. The case where the pointer is actually null (i.e. the "failing" + case) is extremely rare. + + 2. The failing path heals the implicit null check into an explicit + null check so that the application does not repeatedly page + fault. + +The frontend is expected to mark branches that satisfy (1) and (2) +using a ``!make.implicit`` metadata node (the actual content of the +metadata node is ignored). Only branches that are marked with +``!make.implicit`` metadata are considered as candidates for +conversion into implicit null checks. + +(Note that while we could deal with (1) using profiling data, dealing +with (2) requires some information not present in branch profiles.) Modified: vendor/llvm/dist/docs/GettingStarted.rst ============================================================================== --- vendor/llvm/dist/docs/GettingStarted.rst Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/docs/GettingStarted.rst Sun Jul 5 14:21:36 2015 (r285163) @@ -326,7 +326,11 @@ Easy steps for installing GCC 4.8.2: .. code-block:: console - % wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2 + % wget https://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2 + % wget https://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2.sig + % wget https://ftp.gnu.org/gnu/gnu-keyring.gpg + % signature_invalid=`gpg --verify --no-default-keyring --keyring ./gnu-keyring.gpg gcc-4.8.2.tar.bz2.sig` + % if [ $signature_invalid ]; then echo "Invalid signature" ; exit 1 ; fi % tar -xvjf gcc-4.8.2.tar.bz2 % cd gcc-4.8.2 % ./contrib/download_prerequisites Modified: vendor/llvm/dist/docs/LangRef.rst ============================================================================== --- vendor/llvm/dist/docs/LangRef.rst Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/docs/LangRef.rst Sun Jul 5 14:21:36 2015 (r285163) @@ -823,9 +823,11 @@ with the same name. This is necessary b COMDAT groups and COMDATs, at the object file level, are represented by sections. -Note that certain IR constructs like global variables and functions may create -COMDATs in the object file in addition to any which are specified using COMDAT -IR. This arises, for example, when a global variable has linkonce_odr linkage. +Note that certain IR constructs like global variables and functions may +create COMDATs in the object file in addition to any which are specified using +COMDAT IR. This arises when the code generator is configured to emit globals +in individual sections (e.g. when `-data-sections` or `-function-sections` +is supplied to `llc`). .. _namedmetadatastructure: @@ -3640,7 +3642,7 @@ will be partially unrolled. '``llvm.loop.unroll.disable``' Metadata ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -This metadata either disables loop unrolling. The metadata has a single operand +This metadata disables loop unrolling. The metadata has a single operand which is the string ``llvm.loop.unroll.disable``. For example: .. code-block:: llvm @@ -3650,7 +3652,7 @@ which is the string ``llvm.loop.unroll.d '``llvm.loop.unroll.runtime.disable``' Metadata ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -This metadata either disables runtime loop unrolling. The metadata has a single +This metadata disables runtime loop unrolling. The metadata has a single operand which is the string ``llvm.loop.unroll.runtime.disable``. For example: .. code-block:: llvm @@ -3660,8 +3662,8 @@ operand which is the string ``llvm.loop. '``llvm.loop.unroll.full``' Metadata ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -This metadata either suggests that the loop should be unrolled fully. The -metadata has a single operand which is the string ``llvm.loop.unroll.disable``. +This metadata suggests that the loop should be unrolled fully. The +metadata has a single operand which is the string ``llvm.loop.unroll.full``. For example: .. code-block:: llvm Modified: vendor/llvm/dist/docs/Phabricator.rst ============================================================================== --- vendor/llvm/dist/docs/Phabricator.rst Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/docs/Phabricator.rst Sun Jul 5 14:21:36 2015 (r285163) @@ -60,26 +60,28 @@ to upload your patch): To upload a new patch: * Click *Differential*. -* Click *Create Diff*. -* Paste the text diff or upload the patch file. - Note that TODO +* Click *+ Create Diff*. +* Paste the text diff or browse to the patch file. Click *Create Diff*. +* Leave the Repository field blank. * Leave the drop down on *Create a new Revision...* and click *Continue*. * Enter a descriptive title and summary. The title and summary are usually in the form of a :ref:`commit message `. * Add reviewers and mailing lists that you want to be included in the review. If your patch is - for LLVM, add llvm-commits as a subscriber; if your patch is for Clang, + for LLVM, add llvm-commits as a Subscriber; if your patch is for Clang, add cfe-commits. +* Leave the Repository and Project fields blank. * Click *Save*. To submit an updated patch: * Click *Differential*. -* Click *Create Diff*. -* Paste the updated diff. +* Click *+ Create Diff*. +* Paste the updated diff or browse to the updated patch file. Click *Create Diff*. * Select the review you want to from the *Attach To* dropdown and click *Continue*. -* Click *Save*. +* Leave the Repository and Project fields blank. +* Add comments about the changes in the new diff. Click *Save*. Reviewing code with Phabricator ------------------------------- Modified: vendor/llvm/dist/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp Sun Jul 5 14:21:36 2015 (r285163) @@ -1168,7 +1168,6 @@ public: KaleidoscopeJIT(SessionContext &Session) : Session(Session), - Mang(Session.getTarget().getDataLayout()), CompileLayer(ObjectLayer, SimpleCompiler(Session.getTarget())), LazyEmitLayer(CompileLayer), CompileCallbacks(LazyEmitLayer, CCMgrMemMgr, Session.getLLVMContext(), @@ -1179,7 +1178,8 @@ public: std::string MangledName; { raw_string_ostream MangledNameStream(MangledName); - Mang.getNameWithPrefix(MangledNameStream, Name); + Mangler::getNameWithPrefix(MangledNameStream, Name, + *Session.getTarget().getDataLayout()); } return MangledName; } @@ -1306,7 +1306,6 @@ private: } SessionContext &Session; - Mangler Mang; SectionMemoryManager CCMgrMemMgr; ObjLayerT ObjectLayer; CompileLayerT CompileLayer; Modified: vendor/llvm/dist/examples/Kaleidoscope/Orc/initial/toy.cpp ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/Orc/initial/toy.cpp Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/examples/Kaleidoscope/Orc/initial/toy.cpp Sun Jul 5 14:21:36 2015 (r285163) @@ -1160,14 +1160,14 @@ public: typedef CompileLayerT::ModuleSetHandleT ModuleHandleT; KaleidoscopeJIT(SessionContext &Session) - : Mang(Session.getTarget().getDataLayout()), - CompileLayer(ObjectLayer, SimpleCompiler(Session.getTarget())) {} + : DL(*Session.getTarget().getDataLayout()), + CompileLayer(ObjectLayer, SimpleCompiler(Session.getTarget())) {} std::string mangle(const std::string &Name) { std::string MangledName; { raw_string_ostream MangledNameStream(MangledName); - Mang.getNameWithPrefix(MangledNameStream, Name); + Mangler::getNameWithPrefix(MangledNameStream, Name, DL); } return MangledName; } @@ -1201,8 +1201,7 @@ public: } private: - - Mangler Mang; + const DataLayout &DL; ObjLayerT ObjectLayer; CompileLayerT CompileLayer; }; Modified: vendor/llvm/dist/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp Sun Jul 5 14:21:36 2015 (r285163) @@ -1162,15 +1162,15 @@ public: typedef LazyEmitLayerT::ModuleSetHandleT ModuleHandleT; KaleidoscopeJIT(SessionContext &Session) - : Mang(Session.getTarget().getDataLayout()), - CompileLayer(ObjectLayer, SimpleCompiler(Session.getTarget())), - LazyEmitLayer(CompileLayer) {} + : DL(*Session.getTarget().getDataLayout()), + CompileLayer(ObjectLayer, SimpleCompiler(Session.getTarget())), + LazyEmitLayer(CompileLayer) {} std::string mangle(const std::string &Name) { std::string MangledName; { raw_string_ostream MangledNameStream(MangledName); - Mang.getNameWithPrefix(MangledNameStream, Name); + Mangler::getNameWithPrefix(MangledNameStream, Name, DL); } return MangledName; } @@ -1204,8 +1204,7 @@ public: } private: - - Mangler Mang; + const DataLayout &DL; ObjLayerT ObjectLayer; CompileLayerT CompileLayer; LazyEmitLayerT LazyEmitLayer; Modified: vendor/llvm/dist/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp Sun Jul 5 14:21:36 2015 (r285163) @@ -1162,7 +1162,6 @@ public: KaleidoscopeJIT(SessionContext &Session) : Session(Session), - Mang(Session.getTarget().getDataLayout()), CompileLayer(ObjectLayer, SimpleCompiler(Session.getTarget())), LazyEmitLayer(CompileLayer) {} @@ -1170,7 +1169,8 @@ public: std::string MangledName; { raw_string_ostream MangledNameStream(MangledName); - Mang.getNameWithPrefix(MangledNameStream, Name); + Mangler::getNameWithPrefix(MangledNameStream, Name, + *Session.getTarget().getDataLayout()); } return MangledName; } @@ -1236,7 +1236,6 @@ private: } SessionContext &Session; - Mangler Mang; ObjLayerT ObjectLayer; CompileLayerT CompileLayer; LazyEmitLayerT LazyEmitLayer; Modified: vendor/llvm/dist/include/llvm-c/lto.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/lto.h Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/include/llvm-c/lto.h Sun Jul 5 14:21:36 2015 (r285163) @@ -40,7 +40,7 @@ typedef bool lto_bool_t; * @{ */ -#define LTO_API_VERSION 15 +#define LTO_API_VERSION 16 /** * \since prior to LTO_API_VERSION=3 @@ -280,39 +280,15 @@ lto_module_get_symbol_attribute(lto_modu /** - * Returns the number of dependent libraries in the object module. + * Returns the module's linker options. * - * \since LTO_API_VERSION=8 - */ -extern unsigned int -lto_module_get_num_deplibs(lto_module_t mod); - - -/** - * Returns the ith dependent library in the module. - * - * \since LTO_API_VERSION=8 - */ -extern const char* -lto_module_get_deplib(lto_module_t mod, unsigned int index); - - -/** - * Returns the number of linker options in the object module. - * - * \since LTO_API_VERSION=8 - */ -extern unsigned int -lto_module_get_num_linkeropts(lto_module_t mod); - - -/** - * Returns the ith linker option in the module. + * The linker options may consist of multiple flags. It is the linker's + * responsibility to split the flags using a platform-specific mechanism. * - * \since LTO_API_VERSION=8 + * \since LTO_API_VERSION=16 */ extern const char* -lto_module_get_linkeropt(lto_module_t mod, unsigned int index); +lto_module_get_linkeropts(lto_module_t mod); /** Modified: vendor/llvm/dist/include/llvm/ADT/APInt.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/APInt.h Sun Jul 5 14:17:57 2015 (r285162) +++ vendor/llvm/dist/include/llvm/ADT/APInt.h Sun Jul 5 14:21:36 2015 (r285163) @@ -1038,7 +1038,9 @@ public: /// the validity of the less-than relationship. /// /// \returns true if *this < RHS when considered unsigned. - bool ult(uint64_t RHS) const { return ult(APInt(getBitWidth(), RHS)); } + bool ult(uint64_t RHS) const { + return getActiveBits() > 64 ? false : getZExtValue() < RHS; + } /// \brief Signed less than comparison /// @@ -1054,7 +1056,9 @@ public: /// the validity of the less-than relationship. /// /// \returns true if *this < RHS when considered signed. - bool slt(uint64_t RHS) const { return slt(APInt(getBitWidth(), RHS)); } + bool slt(int64_t RHS) const { + return getMinSignedBits() > 64 ? isNegative() : getSExtValue() < RHS; + } /// \brief Unsigned less or equal comparison /// @@ -1070,7 +1074,7 @@ public: /// the validity of the less-or-equal relationship. /// /// \returns true if *this <= RHS when considered unsigned. - bool ule(uint64_t RHS) const { return ule(APInt(getBitWidth(), RHS)); } + bool ule(uint64_t RHS) const { return !ugt(RHS); } /// \brief Signed less or equal comparison /// @@ -1086,7 +1090,7 @@ public: /// validity of the less-or-equal relationship. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Jul 5 14:22:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 647CC9612; Sun, 5 Jul 2015 14:22:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 3ACDB1B27; Sun, 5 Jul 2015 14:22:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65EMJQe049802; Sun, 5 Jul 2015 14:22:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65EMJ8q049801; Sun, 5 Jul 2015 14:22:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201507051422.t65EMJ8q049801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Jul 2015 14:22:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r285164 - vendor/llvm/llvm-trunk-r241361 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 14:22:20 -0000 Author: dim Date: Sun Jul 5 14:22:19 2015 New Revision: 285164 URL: https://svnweb.freebsd.org/changeset/base/285164 Log: Tag llvm trunk r241361. Added: - copied from r285163, vendor/llvm/dist/ Directory Properties: vendor/llvm/llvm-trunk-r241361/ (props changed) From owner-svn-src-all@freebsd.org Sun Jul 5 14:24:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12F589647; Sun, 5 Jul 2015 14:24:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 ED83E1C93; Sun, 5 Jul 2015 14:24:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65EO0Sc050343; Sun, 5 Jul 2015 14:24:00 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65EO0h6050336; Sun, 5 Jul 2015 14:24:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201507051424.t65EO0h6050336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Jul 2015 14:24:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r285165 - in vendor/clang/dist: docs docs/CommandGuide docs/tools examples/analyzer-plugin include/clang-c include/clang/AST include/clang/ASTMatchers include/clang/Analysis/Analyses in... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 14:24:01 -0000 Author: dim Date: Sun Jul 5 14:23:59 2015 New Revision: 285165 URL: https://svnweb.freebsd.org/changeset/base/285165 Log: Vendor import of clang trunk r241361: https://llvm.org/svn/llvm-project/cfe/trunk@241361 Added: vendor/clang/dist/docs/CommandGuide/ vendor/clang/dist/docs/CommandGuide/clang.rst vendor/clang/dist/docs/CommandGuide/index.rst vendor/clang/dist/lib/Driver/MinGWToolChain.cpp (contents, props changed) vendor/clang/dist/lib/Headers/avx512cdintrin.h (contents, props changed) vendor/clang/dist/lib/Headers/fxsrintrin.h (contents, props changed) vendor/clang/dist/lib/Headers/inttypes.h (contents, props changed) vendor/clang/dist/test/Analysis/division-by-zero.c (contents, props changed) vendor/clang/dist/test/Analysis/test-include-cpp.cpp (contents, props changed) vendor/clang/dist/test/Analysis/test-include-cpp.h (contents, props changed) vendor/clang/dist/test/Analysis/test-include.c (contents, props changed) vendor/clang/dist/test/Analysis/test-include.h (contents, props changed) vendor/clang/dist/test/CodeCompletion/macros-in-modules.c (contents, props changed) vendor/clang/dist/test/CodeCompletion/macros-in-modules.m vendor/clang/dist/test/CodeGen/avx512cdintrin.c (contents, props changed) vendor/clang/dist/test/CodeGen/builtin-cpu-supports.c (contents, props changed) vendor/clang/dist/test/CodeGen/debug-info-packed-struct.c (contents, props changed) vendor/clang/dist/test/CodeGen/openmp_default_simd_align.c (contents, props changed) vendor/clang/dist/test/CodeGenCXX/debug-info-method-nodebug.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/destructor-crash.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/trap-fnattr.cpp (contents, props changed) vendor/clang/dist/test/CoverageMapping/implicit-def-in-macro.m vendor/clang/dist/test/Driver/Inputs/debian_multiarch_tree/lib/powerpc64le-linux-gnu/ vendor/clang/dist/test/Driver/Inputs/debian_multiarch_tree/lib/powerpc64le-linux-gnu/.keep vendor/clang/dist/test/Driver/Inputs/debian_multiarch_tree/usr/lib/gcc/powerpc64le-linux-gnu/ vendor/clang/dist/test/Driver/Inputs/debian_multiarch_tree/usr/lib/gcc/powerpc64le-linux-gnu/4.5/ vendor/clang/dist/test/Driver/Inputs/debian_multiarch_tree/usr/lib/gcc/powerpc64le-linux-gnu/4.5/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_multiarch_tree/usr/lib/powerpc64le-linux-gnu/ vendor/clang/dist/test/Driver/Inputs/debian_multiarch_tree/usr/lib/powerpc64le-linux-gnu/.keep vendor/clang/dist/test/Driver/ios-version-min.c (contents, props changed) vendor/clang/dist/test/Driver/msan.c (contents, props changed) vendor/clang/dist/test/Modules/Inputs/DebugModule.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/ImportNameInDir.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/NameInDir.framework/ vendor/clang/dist/test/Modules/Inputs/NameInDir.framework/Headers/ vendor/clang/dist/test/Modules/Inputs/NameInDir.framework/Headers/NameInDir.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/NameInDir.framework/Modules/ vendor/clang/dist/test/Modules/Inputs/NameInDir.framework/Modules/module.modulemap vendor/clang/dist/test/Modules/Inputs/NameInDir2.framework/ vendor/clang/dist/test/Modules/Inputs/NameInDir2.framework/Headers/ vendor/clang/dist/test/Modules/Inputs/NameInDir2.framework/Headers/NameInDir2.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/NameInDir2.framework/Modules/ vendor/clang/dist/test/Modules/Inputs/NameInDir2.framework/Modules/module.modulemap vendor/clang/dist/test/Modules/Inputs/NameInDirInferred.framework/ vendor/clang/dist/test/Modules/Inputs/NameInDirInferred.framework/Headers/ vendor/clang/dist/test/Modules/Inputs/NameInDirInferred.framework/Headers/NameInDirInferred.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/crash.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/explicit-build-prefer-self/ vendor/clang/dist/test/Modules/Inputs/explicit-build-prefer-self/a.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/explicit-build-prefer-self/b.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/explicit-build-prefer-self/map vendor/clang/dist/test/Modules/Inputs/explicit-build-prefer-self/x.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/merge-class-definition-visibility/e.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/submodule-visibility/c.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/submodule-visibility/other.h (contents, props changed) vendor/clang/dist/test/Modules/debug-info-moduleimport.m vendor/clang/dist/test/Modules/explicit-build-prefer-self.cpp (contents, props changed) vendor/clang/dist/test/Modules/framework-name.m vendor/clang/dist/test/Modules/module-feature.m vendor/clang/dist/test/Modules/signal.m vendor/clang/dist/test/OpenMP/cancel_ast_print.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/cancel_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/cancellation_point_ast_print.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/cancellation_point_codegen.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/cancellation_point_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/task_depend_messages.cpp (contents, props changed) vendor/clang/dist/test/Parser/cxx-concept-declaration.cpp (contents, props changed) vendor/clang/dist/test/Parser/cxx-concepts-ambig-constraint-expr.cpp (contents, props changed) vendor/clang/dist/test/Parser/cxx-concepts-requires-clause.cpp (contents, props changed) vendor/clang/dist/test/Preprocessor/predefined-nullability.c (contents, props changed) vendor/clang/dist/test/Sema/arm-microsoft-intrinsics.c (contents, props changed) vendor/clang/dist/test/Sema/builtin-cpu-supports.c (contents, props changed) vendor/clang/dist/test/SemaCXX/openmp_default_simd_align.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/virtual-function-in-union.cpp (contents, props changed) vendor/clang/dist/test/SemaTemplate/instantiate-explicitly-after-fatal.cpp (contents, props changed) Deleted: vendor/clang/dist/docs/tools/Makefile vendor/clang/dist/docs/tools/clang.pod vendor/clang/dist/docs/tools/manpage.css Modified: vendor/clang/dist/docs/AddressSanitizer.rst vendor/clang/dist/docs/AttributeReference.rst vendor/clang/dist/docs/CMakeLists.txt vendor/clang/dist/docs/ClangFormatStyleOptions.rst vendor/clang/dist/docs/DriverInternals.rst vendor/clang/dist/docs/LeakSanitizer.rst vendor/clang/dist/docs/LibASTMatchersReference.html vendor/clang/dist/docs/Makefile vendor/clang/dist/docs/ObjectiveCLiterals.rst vendor/clang/dist/docs/SafeStack.rst vendor/clang/dist/docs/conf.py vendor/clang/dist/docs/index.rst vendor/clang/dist/examples/analyzer-plugin/MainCallChecker.cpp vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/ASTMutationListener.h vendor/clang/dist/include/clang/AST/DataRecursiveASTVisitor.h vendor/clang/dist/include/clang/AST/EvaluatedExprVisitor.h vendor/clang/dist/include/clang/AST/ExprObjC.h vendor/clang/dist/include/clang/AST/ExternalASTSource.h vendor/clang/dist/include/clang/AST/Mangle.h vendor/clang/dist/include/clang/AST/NSAPI.h vendor/clang/dist/include/clang/AST/OpenMPClause.h vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h vendor/clang/dist/include/clang/AST/StmtIterator.h vendor/clang/dist/include/clang/AST/StmtOpenMP.h vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h vendor/clang/dist/include/clang/Analysis/Analyses/FormatString.h vendor/clang/dist/include/clang/Basic/Attr.td vendor/clang/dist/include/clang/Basic/AttrDocs.td vendor/clang/dist/include/clang/Basic/BuiltinsARM.def vendor/clang/dist/include/clang/Basic/BuiltinsNVPTX.def vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def vendor/clang/dist/include/clang/Basic/BuiltinsX86.def vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/IdentifierTable.h vendor/clang/dist/include/clang/Basic/LangOptions.def vendor/clang/dist/include/clang/Basic/LangOptions.h vendor/clang/dist/include/clang/Basic/Module.h vendor/clang/dist/include/clang/Basic/OpenMPKinds.def vendor/clang/dist/include/clang/Basic/OpenMPKinds.h vendor/clang/dist/include/clang/Basic/Specifiers.h vendor/clang/dist/include/clang/Basic/StmtNodes.td vendor/clang/dist/include/clang/Basic/TargetInfo.h vendor/clang/dist/include/clang/Basic/TokenKinds.def vendor/clang/dist/include/clang/Basic/TypeTraits.h vendor/clang/dist/include/clang/CodeGen/CodeGenABITypes.h vendor/clang/dist/include/clang/CodeGen/ModuleBuilder.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/CLCompatOptions.td vendor/clang/dist/include/clang/Driver/Compilation.h vendor/clang/dist/include/clang/Driver/Driver.h vendor/clang/dist/include/clang/Driver/Job.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Driver/SanitizerArgs.h vendor/clang/dist/include/clang/Format/Format.h vendor/clang/dist/include/clang/Lex/ExternalPreprocessorSource.h vendor/clang/dist/include/clang/Lex/HeaderSearch.h vendor/clang/dist/include/clang/Lex/ModuleMap.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Sema/DeclSpec.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Serialization/ASTBitCodes.h vendor/clang/dist/include/clang/Serialization/ASTReader.h vendor/clang/dist/include/clang/Serialization/ASTWriter.h vendor/clang/dist/include/clang/Serialization/Module.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h vendor/clang/dist/lib/ARCMigrate/ObjCMT.cpp vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTDumper.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/DeclPrinter.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/ExternalASTSource.cpp vendor/clang/dist/lib/AST/ItaniumMangle.cpp vendor/clang/dist/lib/AST/MicrosoftMangle.cpp vendor/clang/dist/lib/AST/NSAPI.cpp vendor/clang/dist/lib/AST/ParentMap.cpp vendor/clang/dist/lib/AST/Stmt.cpp vendor/clang/dist/lib/AST/StmtIterator.cpp vendor/clang/dist/lib/AST/StmtPrinter.cpp vendor/clang/dist/lib/AST/StmtProfile.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/ASTMatchers/ASTMatchersInternal.cpp vendor/clang/dist/lib/ASTMatchers/Dynamic/Registry.cpp vendor/clang/dist/lib/Analysis/AnalysisDeclContext.cpp vendor/clang/dist/lib/Analysis/CFG.cpp vendor/clang/dist/lib/Analysis/CallGraph.cpp vendor/clang/dist/lib/Analysis/LiveVariables.cpp vendor/clang/dist/lib/Analysis/PrintfFormatString.cpp vendor/clang/dist/lib/Analysis/PseudoConstantAnalysis.cpp vendor/clang/dist/lib/Basic/Diagnostic.cpp vendor/clang/dist/lib/Basic/IdentifierTable.cpp vendor/clang/dist/lib/Basic/Module.cpp vendor/clang/dist/lib/Basic/OpenMPKinds.cpp vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Basic/VirtualFileSystem.cpp vendor/clang/dist/lib/CodeGen/BackendUtil.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCXXABI.cpp vendor/clang/dist/lib/CodeGen/CGCXXABI.h vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.h vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.h vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp vendor/clang/dist/lib/CodeGen/CGVTables.cpp vendor/clang/dist/lib/CodeGen/CodeGenABITypes.cpp vendor/clang/dist/lib/CodeGen/CodeGenAction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/CodeGenPGO.cpp vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp vendor/clang/dist/lib/CodeGen/CoverageMappingGen.cpp vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp vendor/clang/dist/lib/CodeGen/MicrosoftCXXABI.cpp vendor/clang/dist/lib/CodeGen/ModuleBuilder.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.h vendor/clang/dist/lib/Driver/CMakeLists.txt vendor/clang/dist/lib/Driver/Compilation.cpp vendor/clang/dist/lib/Driver/CrossWindowsToolChain.cpp vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/Job.cpp vendor/clang/dist/lib/Driver/MSVCToolChain.cpp vendor/clang/dist/lib/Driver/SanitizerArgs.cpp vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/ToolChains.h vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Driver/Tools.h vendor/clang/dist/lib/Format/ContinuationIndenter.cpp vendor/clang/dist/lib/Format/Format.cpp vendor/clang/dist/lib/Format/TokenAnnotator.cpp vendor/clang/dist/lib/Format/UnwrappedLineParser.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/MultiplexConsumer.cpp vendor/clang/dist/lib/Frontend/Rewrite/InclusionRewriter.cpp vendor/clang/dist/lib/Frontend/Rewrite/RewriteModernObjC.cpp vendor/clang/dist/lib/Frontend/Rewrite/RewriteObjC.cpp vendor/clang/dist/lib/Headers/CMakeLists.txt vendor/clang/dist/lib/Headers/Intrin.h vendor/clang/dist/lib/Headers/__wmmintrin_aes.h vendor/clang/dist/lib/Headers/adxintrin.h vendor/clang/dist/lib/Headers/altivec.h vendor/clang/dist/lib/Headers/ammintrin.h vendor/clang/dist/lib/Headers/avx2intrin.h vendor/clang/dist/lib/Headers/avx512bwintrin.h vendor/clang/dist/lib/Headers/avx512dqintrin.h vendor/clang/dist/lib/Headers/avx512fintrin.h vendor/clang/dist/lib/Headers/avx512vlbwintrin.h vendor/clang/dist/lib/Headers/avx512vldqintrin.h vendor/clang/dist/lib/Headers/avx512vlintrin.h vendor/clang/dist/lib/Headers/avxintrin.h vendor/clang/dist/lib/Headers/bmi2intrin.h vendor/clang/dist/lib/Headers/bmiintrin.h vendor/clang/dist/lib/Headers/emmintrin.h vendor/clang/dist/lib/Headers/f16cintrin.h vendor/clang/dist/lib/Headers/fma4intrin.h vendor/clang/dist/lib/Headers/fmaintrin.h vendor/clang/dist/lib/Headers/immintrin.h vendor/clang/dist/lib/Headers/lzcntintrin.h vendor/clang/dist/lib/Headers/mm3dnow.h vendor/clang/dist/lib/Headers/mmintrin.h vendor/clang/dist/lib/Headers/module.modulemap vendor/clang/dist/lib/Headers/pmmintrin.h vendor/clang/dist/lib/Headers/popcntintrin.h vendor/clang/dist/lib/Headers/rdseedintrin.h vendor/clang/dist/lib/Headers/rtmintrin.h vendor/clang/dist/lib/Headers/shaintrin.h vendor/clang/dist/lib/Headers/smmintrin.h vendor/clang/dist/lib/Headers/tbmintrin.h vendor/clang/dist/lib/Headers/tmmintrin.h vendor/clang/dist/lib/Headers/xmmintrin.h vendor/clang/dist/lib/Headers/xopintrin.h vendor/clang/dist/lib/Lex/HeaderSearch.cpp vendor/clang/dist/lib/Lex/ModuleMap.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPLexerChange.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Parse/ParseCXXInlineMethods.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Parse/ParseOpenMP.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Parse/ParseTentative.cpp vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.cpp vendor/clang/dist/lib/Sema/DeclSpec.cpp vendor/clang/dist/lib/Sema/JumpDiagnostics.cpp vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExceptionSpec.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaExprObjC.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp vendor/clang/dist/lib/Sema/SemaOpenMP.cpp vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/lib/Serialization/ASTCommon.h vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp vendor/clang/dist/lib/Serialization/ASTReaderStmt.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/Serialization/ASTWriterStmt.cpp vendor/clang/dist/lib/Serialization/GeneratePCH.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CStringChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/MallocChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/StreamChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/BasicValueFactory.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/BugReporter.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/CheckerHelpers.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngine.cpp vendor/clang/dist/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp vendor/clang/dist/lib/Tooling/CompilationDatabase.cpp vendor/clang/dist/test/Analysis/retain-release.m vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-1y.cpp vendor/clang/dist/test/CXX/drs/dr9xx.cpp vendor/clang/dist/test/CodeGen/2004-11-27-StaticFunctionRedeclare.c vendor/clang/dist/test/CodeGen/2007-04-14-FNoBuiltin.c vendor/clang/dist/test/CodeGen/PR8880.c vendor/clang/dist/test/CodeGen/arm-microsoft-intrinsics.c vendor/clang/dist/test/CodeGen/arm-target-features.c vendor/clang/dist/test/CodeGen/attr-nodebug.c vendor/clang/dist/test/CodeGen/attr-target.c vendor/clang/dist/test/CodeGen/avx512bw-builtins.c vendor/clang/dist/test/CodeGen/avx512f-builtins.c vendor/clang/dist/test/CodeGen/avx512vl-builtins.c vendor/clang/dist/test/CodeGen/builtins-nvptx.c vendor/clang/dist/test/CodeGen/builtins-ppc-p8vector.c vendor/clang/dist/test/CodeGen/builtins-ppc-vsx.c vendor/clang/dist/test/CodeGen/builtins-x86.c vendor/clang/dist/test/CodeGen/builtinshufflevector2.c vendor/clang/dist/test/CodeGen/c-strings.c vendor/clang/dist/test/CodeGen/c11atomics.c vendor/clang/dist/test/CodeGen/call.c vendor/clang/dist/test/CodeGen/captured-statements-nested.c vendor/clang/dist/test/CodeGen/captured-statements.c vendor/clang/dist/test/CodeGen/complex-convert.c vendor/clang/dist/test/CodeGen/dostmt.c vendor/clang/dist/test/CodeGen/fast-math.c vendor/clang/dist/test/CodeGen/finite-math.c vendor/clang/dist/test/CodeGen/linkage-redecl.c vendor/clang/dist/test/CodeGen/nomathbuiltin.c vendor/clang/dist/test/CodeGen/pr9614.c vendor/clang/dist/test/CodeGen/redefine_extname.c vendor/clang/dist/test/CodeGen/stack-protector.c vendor/clang/dist/test/CodeGen/static-order.c vendor/clang/dist/test/CodeGen/ubsan-blacklist.c vendor/clang/dist/test/CodeGen/volatile-1.c vendor/clang/dist/test/CodeGen/x86_64-arguments.c vendor/clang/dist/test/CodeGenCXX/PR5093-static-member-function.cpp vendor/clang/dist/test/CodeGenCXX/address-of-fntemplate.cpp vendor/clang/dist/test/CodeGenCXX/attr-cleanup.cpp vendor/clang/dist/test/CodeGenCXX/block-byref-cxx-objc.cpp vendor/clang/dist/test/CodeGenCXX/c-linkage.cpp vendor/clang/dist/test/CodeGenCXX/captured-statements.cpp vendor/clang/dist/test/CodeGenCXX/constructor-attr.cpp vendor/clang/dist/test/CodeGenCXX/ctor-globalopt.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-line.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-namespace.cpp vendor/clang/dist/test/CodeGenCXX/deferred-global-init.cpp vendor/clang/dist/test/CodeGenCXX/derived-to-virtual-base-class-calls-final.cpp vendor/clang/dist/test/CodeGenCXX/dllexport.cpp vendor/clang/dist/test/CodeGenCXX/dynamic_cast-no-rtti.cpp vendor/clang/dist/test/CodeGenCXX/extern-c.cpp vendor/clang/dist/test/CodeGenCXX/function-template-explicit-specialization.cpp vendor/clang/dist/test/CodeGenCXX/globalinit-loc.cpp vendor/clang/dist/test/CodeGenCXX/inline-dllexport-member.cpp vendor/clang/dist/test/CodeGenCXX/linetable-virtual-variadic.cpp vendor/clang/dist/test/CodeGenCXX/mangle-address-space.cpp vendor/clang/dist/test/CodeGenCXX/mangle-ms-templates-memptrs-2.cpp vendor/clang/dist/test/CodeGenCXX/mangle-ms-templates-memptrs.cpp vendor/clang/dist/test/CodeGenCXX/mangle-nullptr-arg.cpp vendor/clang/dist/test/CodeGenCXX/mangle-template.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-array-cookies.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-member-pointers.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-thunks.cpp vendor/clang/dist/test/CodeGenCXX/pr11797.cpp vendor/clang/dist/test/CodeGenCXX/pr18661.cpp vendor/clang/dist/test/CodeGenCXX/pr9965.cpp vendor/clang/dist/test/CodeGenCXX/pragma-weak.cpp vendor/clang/dist/test/CodeGenCXX/predefined-expr.cpp vendor/clang/dist/test/CodeGenCXX/redefine_extname.cpp vendor/clang/dist/test/CodeGenCXX/template-dependent-bind-temporary.cpp vendor/clang/dist/test/CodeGenCXX/thunks.cpp vendor/clang/dist/test/CodeGenCXX/typeid-should-throw.cpp vendor/clang/dist/test/CodeGenCXX/vararg-non-pod.cpp vendor/clang/dist/test/CodeGenCXX/virtual-destructor-synthesis.cpp vendor/clang/dist/test/CodeGenCXX/vla-lambda-capturing.cpp vendor/clang/dist/test/CodeGenCXX/volatile-1.cpp vendor/clang/dist/test/CodeGenCXX/x86_64-arguments-nacl-x32.cpp vendor/clang/dist/test/CodeGenObjC/arc-block-copy-escape.m vendor/clang/dist/test/CodeGenObjC/objc2-legacy-dispatch.m vendor/clang/dist/test/CodeGenObjC/related-result-type.m vendor/clang/dist/test/CodeGenObjCXX/arc-mangle.mm vendor/clang/dist/test/CodeGenObjCXX/debug-info-line.mm vendor/clang/dist/test/CodeGenOpenCL/event_t.cl vendor/clang/dist/test/CodeGenOpenCL/local.cl vendor/clang/dist/test/CodeGenOpenCL/opencl_types.cl vendor/clang/dist/test/CoverageMapping/ir.c vendor/clang/dist/test/Driver/arm-mfpu.c vendor/clang/dist/test/Driver/bindings.c vendor/clang/dist/test/Driver/cl-link.c vendor/clang/dist/test/Driver/cl-x86-flags.c vendor/clang/dist/test/Driver/darwin-debug-flags.c vendor/clang/dist/test/Driver/darwin-dsymutil.c vendor/clang/dist/test/Driver/darwin-sdkroot.c vendor/clang/dist/test/Driver/darwin-verify-debug.c vendor/clang/dist/test/Driver/fsanitize.c vendor/clang/dist/test/Driver/integrated-as.s vendor/clang/dist/test/Driver/linux-ld.c vendor/clang/dist/test/Driver/lit.local.cfg vendor/clang/dist/test/Driver/pic.c vendor/clang/dist/test/FixIt/fixit-nullability-declspec.cpp vendor/clang/dist/test/Index/annotate-literals.m vendor/clang/dist/test/Index/complete-objc-message.m vendor/clang/dist/test/Index/complete-stmt.c vendor/clang/dist/test/Modules/Inputs/merge-class-definition-visibility/b.h vendor/clang/dist/test/Modules/Inputs/merge-class-definition-visibility/d.h vendor/clang/dist/test/Modules/Inputs/merge-class-definition-visibility/modmap vendor/clang/dist/test/Modules/Inputs/module.map vendor/clang/dist/test/Modules/Inputs/submodule-visibility/a.h vendor/clang/dist/test/Modules/Inputs/submodule-visibility/b.h vendor/clang/dist/test/Modules/Inputs/submodule-visibility/module.modulemap vendor/clang/dist/test/Modules/Inputs/submodules-merge-defs/defs.h vendor/clang/dist/test/Modules/cxx-irgen.cpp vendor/clang/dist/test/Modules/direct-module-import.m vendor/clang/dist/test/Modules/merge-class-definition-visibility.cpp vendor/clang/dist/test/Modules/module_file_info.m vendor/clang/dist/test/Modules/modules-with-same-name.m vendor/clang/dist/test/Modules/pch-used.m vendor/clang/dist/test/Modules/submodule-visibility.cpp vendor/clang/dist/test/Modules/submodules-merge-defs.cpp vendor/clang/dist/test/OpenMP/barrier_codegen.cpp vendor/clang/dist/test/OpenMP/critical_codegen.cpp vendor/clang/dist/test/OpenMP/flush_codegen.cpp vendor/clang/dist/test/OpenMP/for_codegen.cpp vendor/clang/dist/test/OpenMP/for_firstprivate_codegen.cpp vendor/clang/dist/test/OpenMP/for_private_codegen.cpp vendor/clang/dist/test/OpenMP/for_simd_codegen.cpp vendor/clang/dist/test/OpenMP/master_codegen.cpp vendor/clang/dist/test/OpenMP/ordered_codegen.cpp vendor/clang/dist/test/OpenMP/parallel_codegen.cpp vendor/clang/dist/test/OpenMP/parallel_copyin_codegen.cpp vendor/clang/dist/test/OpenMP/parallel_firstprivate_codegen.cpp vendor/clang/dist/test/OpenMP/parallel_for_codegen.cpp vendor/clang/dist/test/OpenMP/parallel_for_simd_codegen.cpp vendor/clang/dist/test/OpenMP/parallel_if_codegen.cpp vendor/clang/dist/test/OpenMP/parallel_num_threads_codegen.cpp vendor/clang/dist/test/OpenMP/parallel_private_codegen.cpp vendor/clang/dist/test/OpenMP/parallel_proc_bind_codegen.cpp vendor/clang/dist/test/OpenMP/parallel_sections_codegen.cpp vendor/clang/dist/test/OpenMP/sections_codegen.cpp vendor/clang/dist/test/OpenMP/sections_firstprivate_codegen.cpp vendor/clang/dist/test/OpenMP/sections_private_codegen.cpp vendor/clang/dist/test/OpenMP/simd_metadata.c vendor/clang/dist/test/OpenMP/single_codegen.cpp vendor/clang/dist/test/OpenMP/single_firstprivate_codegen.cpp vendor/clang/dist/test/OpenMP/single_private_codegen.cpp vendor/clang/dist/test/OpenMP/task_ast_print.cpp vendor/clang/dist/test/OpenMP/task_codegen.cpp vendor/clang/dist/test/OpenMP/task_if_codegen.cpp vendor/clang/dist/test/OpenMP/task_private_codegen.cpp vendor/clang/dist/test/OpenMP/taskgroup_codegen.cpp vendor/clang/dist/test/PCH/cxx-mangling.cpp vendor/clang/dist/test/PCH/objc_container.m vendor/clang/dist/test/PCH/objc_literals.m vendor/clang/dist/test/PCH/objc_literals.mm vendor/clang/dist/test/PCH/subscripting-literals.m vendor/clang/dist/test/Parser/cxx-class.cpp vendor/clang/dist/test/Parser/nullability.c vendor/clang/dist/test/Preprocessor/cxx_true.cpp vendor/clang/dist/test/Profile/cxx-lambda.cpp vendor/clang/dist/test/Profile/cxx-rangefor.cpp vendor/clang/dist/test/Profile/cxx-templates.cpp vendor/clang/dist/test/Profile/profile-does-not-exist.c vendor/clang/dist/test/Sema/attr-malloc.c vendor/clang/dist/test/Sema/enable_if.c vendor/clang/dist/test/Sema/non-null-warning.c vendor/clang/dist/test/Sema/nullability.c vendor/clang/dist/test/Sema/typo-correction.c vendor/clang/dist/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp vendor/clang/dist/test/SemaCXX/cxx1y-generic-lambdas.cpp vendor/clang/dist/test/SemaCXX/nullability-declspec.cpp vendor/clang/dist/test/SemaCXX/nullability.cpp vendor/clang/dist/test/SemaCXX/typo-correction-cxx11.cpp vendor/clang/dist/test/SemaCXX/virtuals.cpp vendor/clang/dist/test/SemaObjC/arc-unavailable-for-weakref.m vendor/clang/dist/test/SemaObjC/format-strings-objc.m vendor/clang/dist/test/SemaObjC/nullability-arc.m vendor/clang/dist/test/SemaObjC/nullability.m vendor/clang/dist/test/SemaObjC/nullable-weak-property.m vendor/clang/dist/test/SemaObjCXX/Inputs/nullability-consistency-1.h vendor/clang/dist/test/SemaObjCXX/Inputs/nullability-consistency-2.h vendor/clang/dist/test/SemaObjCXX/Inputs/nullability-consistency-3.h vendor/clang/dist/test/SemaObjCXX/Inputs/nullability-consistency-4.h vendor/clang/dist/test/SemaObjCXX/Inputs/nullability-consistency-5.h vendor/clang/dist/test/SemaObjCXX/Inputs/nullability-consistency-8.h vendor/clang/dist/test/SemaObjCXX/Inputs/nullability-consistency-system/nullability-consistency-system.h vendor/clang/dist/test/SemaObjCXX/Inputs/nullability-pragmas-1.h vendor/clang/dist/test/SemaObjCXX/nullability-consistency.mm vendor/clang/dist/test/SemaObjCXX/nullability-pragmas.mm vendor/clang/dist/test/SemaTemplate/instantiate-local-class.cpp vendor/clang/dist/test/lit.cfg vendor/clang/dist/tools/clang-fuzzer/ClangFuzzer.cpp vendor/clang/dist/tools/driver/cc1as_main.cpp vendor/clang/dist/tools/driver/driver.cpp vendor/clang/dist/tools/libclang/CIndex.cpp vendor/clang/dist/tools/libclang/CXCursor.cpp vendor/clang/dist/tools/scan-build/ccc-analyzer vendor/clang/dist/tools/scan-build/scan-build vendor/clang/dist/unittests/ASTMatchers/ASTMatchersTest.cpp vendor/clang/dist/unittests/CodeGen/BufferSourceTest.cpp vendor/clang/dist/unittests/Format/FormatTest.cpp vendor/clang/dist/unittests/Format/FormatTestJS.cpp vendor/clang/dist/unittests/Format/FormatTestJava.cpp vendor/clang/dist/unittests/Format/FormatTestProto.cpp vendor/clang/dist/utils/analyzer/CmpRuns.py vendor/clang/dist/utils/analyzer/SATestBuild.py Modified: vendor/clang/dist/docs/AddressSanitizer.rst ============================================================================== --- vendor/clang/dist/docs/AddressSanitizer.rst Sun Jul 5 14:22:19 2015 (r285164) +++ vendor/clang/dist/docs/AddressSanitizer.rst Sun Jul 5 14:23:59 2015 (r285165) @@ -60,7 +60,28 @@ or: % clang -g -fsanitize=address example_UseAfterFree.o If a bug is detected, the program will print an error message to stderr and -exit with a non-zero exit code. To make AddressSanitizer symbolize its output +exit with a non-zero exit code. AddressSanitizer exits on the first detected error. +This is by design: + +* This approach allows AddressSanitizer to produce faster and smaller generated code + (both by ~5%). +* Fixing bugs becomes unavoidable. AddressSanitizer does not produce + false alarms. Once a memory corruption occurs, the program is in an inconsistent + state, which could lead to confusing results and potentially misleading + subsequent reports. + +If your process is sandboxed and you are running on OS X 10.10 or earlier, you +will need to set ``DYLD_INSERT_LIBRARIES`` environment variable and point it to +the ASan library that is packaged with the compiler used to build the +executable. (You can find the library by searching for dynamic libraries with +``asan`` in their name.) If the environment variable is not set, the process will +try to re-exec. Also keep in mind that when moving the executable to another machine, +the ASan library will also need to be copied over. + +Symbolizing the Reports +========================= + +To make AddressSanitizer symbolize its output you need to set the ``ASAN_SYMBOLIZER_PATH`` environment variable to point to the ``llvm-symbolizer`` binary (or make sure ``llvm-symbolizer`` is in your ``$PATH``): @@ -100,14 +121,63 @@ force disabled by setting ``ASAN_OPTIONS Note that on OS X you may need to run ``dsymutil`` on your binary to have the file\:line info in the AddressSanitizer reports. -AddressSanitizer exits on the first detected error. This is by design. -One reason: it makes the generated code smaller and faster (both by -~5%). Another reason: this makes fixing bugs unavoidable. With Valgrind, -it is often the case that users treat Valgrind warnings as false -positives (which they are not) and don't fix them. +Additional Checks +================= + +Initialization order checking +----------------------------- + +AddressSanitizer can optionally detect dynamic initialization order problems, +when initialization of globals defined in one translation unit uses +globals defined in another translation unit. To enable this check at runtime, +you should set environment variable +``ASAN_OPTIONS=check_initialization_order=1``. + +Note that this option is not supported on OS X. + +Memory leak detection +--------------------- + +For more information on leak detector in AddressSanitizer, see +:doc:`LeakSanitizer`. The leak detection is turned on by default on Linux; +however, it is not yet supported on other platforms. + +Issue Suppression +================= + +AddressSanitizer is not expected to produce false positives. If you see one, +look again; most likely it is a true positive! + +Suppressing Reports in External Libraries +----------------------------------------- +Runtime interposition allows AddressSanitizer to find bugs in code that is +not being recompiled. If you run into an issue in external libraries, we +recommend immediately reporting it to the library maintainer so that it +gets addressed. However, you can use the following suppression mechanism +to unblock yourself and continue on with the testing. This suppression +mechanism should only be used for suppressing issues in external code; it +does not work on code recompiled with AddressSanitizer. To suppress errors +in external libraries, set the ``ASAN_OPTIONS`` environment variable to point +to a suppression file. You can either specify the full path to the file or the +path of the file relative to the location of your executable. + +.. code-block:: bash + + ASAN_OPTIONS=suppressions=MyASan.supp + +Use the following format to specify the names of the functions or libraries +you want to suppress. You can see these in the error report. Remember that +the narrower the scope of the suppression, the more bugs you will be able to +catch. -``__has_feature(address_sanitizer)`` ------------------------------------- +.. code-block:: bash + + interceptor_via_fun:NameOfCFunctionToSuppress + interceptor_via_fun:-[ClassName objCMethodToSuppress:] + interceptor_via_lib:NameOfTheLibraryToSuppress + +Conditional Compilation with ``__has_feature(address_sanitizer)`` +----------------------------------------------------------------- In some cases one may need to execute different code depending on whether AddressSanitizer is enabled. @@ -122,28 +192,19 @@ this purpose. # endif #endif -``__attribute__((no_sanitize_address))`` ------------------------------------------------ +Disabling Instrumentation with ``__attribute__((no_sanitize("address")))`` +-------------------------------------------------------------------------- Some code should not be instrumented by AddressSanitizer. One may use the -function attribute -:ref:`no_sanitize_address ` -(or a deprecated synonym `no_address_safety_analysis`) -to disable instrumentation of a particular function. This attribute may not be -supported by other compilers, so we suggest to use it together with -``__has_feature(address_sanitizer)``. +function attribute ``__attribute__((no_sanitize("address")))`` +(which has deprecated synonyms +:ref:`no_sanitize_address ` and +`no_address_safety_analysis`) to disable instrumentation of a particular +function. This attribute may not be supported by other compilers, so we suggest +to use it together with ``__has_feature(address_sanitizer)``. -Initialization order checking ------------------------------ - -AddressSanitizer can optionally detect dynamic initialization order problems, -when initialization of globals defined in one translation unit uses -globals defined in another translation unit. To enable this check at runtime, -you should set environment variable -``ASAN_OPTIONS=check_initialization_order=1``. - -Blacklist ---------- +Suppressing Errors in Recompiled Code (Blacklist) +------------------------------------------------- AddressSanitizer supports ``src`` and ``fun`` entity types in :doc:`SanitizerSpecialCaseList`, that can be used to suppress error reports @@ -172,24 +233,6 @@ problems happening in certain source fil type:*BadInitClassSubstring*=init src:bad/init/files/*=init -Memory leak detection ---------------------- - -For the experimental memory leak detector in AddressSanitizer, see -:doc:`LeakSanitizer`. - -Supported Platforms -=================== - -AddressSanitizer is supported on - -* Linux i386/x86\_64 (tested on Ubuntu 12.04); -* MacOS 10.6 - 10.9 (i386/x86\_64). -* Android ARM -* FreeBSD i386/x86\_64 (tested on FreeBSD 11-current) - -Ports to various other platforms are in progress. - Limitations =========== @@ -202,6 +245,19 @@ Limitations usually expected. * Static linking is not supported. +Supported Platforms +=================== + +AddressSanitizer is supported on: + +* Linux i386/x86\_64 (tested on Ubuntu 12.04) +* OS X 10.7 - 10.11 (i386/x86\_64) +* iOS Simulator +* Android ARM +* FreeBSD i386/x86\_64 (tested on FreeBSD 11-current) + +Ports to various other platforms are in progress. + Current Status ============== Modified: vendor/clang/dist/docs/AttributeReference.rst ============================================================================== --- vendor/clang/dist/docs/AttributeReference.rst Sun Jul 5 14:22:19 2015 (r285164) +++ vendor/clang/dist/docs/AttributeReference.rst Sun Jul 5 14:23:59 2015 (r285165) @@ -1,1116 +1,13 @@ .. ------------------------------------------------------------------- NOTE: This file is automatically generated by running clang-tblgen - -gen-attr-docs. Do not edit this file by hand!! + -gen-attr-docs. Do not edit this file by hand!! The contents for + this file are automatically generated by a server-side process. + + Please do not commit this file. The file exists for local testing + purposes only. ------------------------------------------------------------------- =================== Attributes in Clang -=================== -.. contents:: - :local: - -Introduction -============ - -This page lists the attributes currently supported by Clang. - -Function Attributes -=================== - - -interrupt ---------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","","","" - -Clang supports the GNU style ``__attribute__((interrupt("TYPE")))`` attribute on -ARM targets. This attribute may be attached to a function definition and -instructs the backend to generate appropriate function entry/exit code so that -it can be used directly as an interrupt service routine. - -The parameter passed to the interrupt attribute is optional, but if -provided it must be a string literal with one of the following values: "IRQ", -"FIQ", "SWI", "ABORT", "UNDEF". - -The semantics are as follows: - -- If the function is AAPCS, Clang instructs the backend to realign the stack to - 8 bytes on entry. This is a general requirement of the AAPCS at public - interfaces, but may not hold when an exception is taken. Doing this allows - other AAPCS functions to be called. -- If the CPU is M-class this is all that needs to be done since the architecture - itself is designed in such a way that functions obeying the normal AAPCS ABI - constraints are valid exception handlers. -- If the CPU is not M-class, the prologue and epilogue are modified to save all - non-banked registers that are used, so that upon return the user-mode state - will not be corrupted. Note that to avoid unnecessary overhead, only - general-purpose (integer) registers are saved in this way. If VFP operations - are needed, that state must be saved manually. - - Specifically, interrupt kinds other than "FIQ" will save all core registers - except "lr" and "sp". "FIQ" interrupts will save r0-r7. -- If the CPU is not M-class, the return instruction is changed to one of the - canonical sequences permitted by the architecture for exception return. Where - possible the function itself will make the necessary "lr" adjustments so that - the "preferred return address" is selected. - - Unfortunately the compiler is unable to make this guarantee for an "UNDEF" - handler, where the offset from "lr" to the preferred return address depends on - the execution state of the code which generated the exception. In this case - a sequence equivalent to "movs pc, lr" will be used. - - -acquire_capability (acquire_shared_capability, clang::acquire_capability, clang::acquire_shared_capability) ------------------------------------------------------------------------------------------------------------ -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","X","","" - -Marks a function as acquiring a capability. - - -assert_capability (assert_shared_capability, clang::assert_capability, clang::assert_shared_capability) -------------------------------------------------------------------------------------------------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","X","","" - -Marks a function that dynamically tests whether a capability is held, and halts -the program if it is not held. - - -availability ------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","","","" - -The ``availability`` attribute can be placed on declarations to describe the -lifecycle of that declaration relative to operating system versions. Consider -the function declaration for a hypothetical function ``f``: - -.. code-block:: c++ - - void f(void) __attribute__((availability(macosx,introduced=10.4,deprecated=10.6,obsoleted=10.7))); - -The availability attribute states that ``f`` was introduced in Mac OS X 10.4, -deprecated in Mac OS X 10.6, and obsoleted in Mac OS X 10.7. This information -is used by Clang to determine when it is safe to use ``f``: for example, if -Clang is instructed to compile code for Mac OS X 10.5, a call to ``f()`` -succeeds. If Clang is instructed to compile code for Mac OS X 10.6, the call -succeeds but Clang emits a warning specifying that the function is deprecated. -Finally, if Clang is instructed to compile code for Mac OS X 10.7, the call -fails because ``f()`` is no longer available. - -The availability attribute is a comma-separated list starting with the -platform name and then including clauses specifying important milestones in the -declaration's lifetime (in any order) along with additional information. Those -clauses can be: - -introduced=\ *version* - The first version in which this declaration was introduced. - -deprecated=\ *version* - The first version in which this declaration was deprecated, meaning that - users should migrate away from this API. - -obsoleted=\ *version* - The first version in which this declaration was obsoleted, meaning that it - was removed completely and can no longer be used. - -unavailable - This declaration is never available on this platform. - -message=\ *string-literal* - Additional message text that Clang will provide when emitting a warning or - error about use of a deprecated or obsoleted declaration. Useful to direct - users to replacement APIs. - -Multiple availability attributes can be placed on a declaration, which may -correspond to different platforms. Only the availability attribute with the -platform corresponding to the target platform will be used; any others will be -ignored. If no availability attribute specifies availability for the current -target platform, the availability attributes are ignored. Supported platforms -are: - -``ios`` - Apple's iOS operating system. The minimum deployment target is specified by - the ``-mios-version-min=*version*`` or ``-miphoneos-version-min=*version*`` - command-line arguments. - -``macosx`` - Apple's Mac OS X operating system. The minimum deployment target is - specified by the ``-mmacosx-version-min=*version*`` command-line argument. - -A declaration can be used even when deploying back to a platform version prior -to when the declaration was introduced. When this happens, the declaration is -`weakly linked -`_, -as if the ``weak_import`` attribute were added to the declaration. A -weakly-linked declaration may or may not be present a run-time, and a program -can determine whether the declaration is present by checking whether the -address of that declaration is non-NULL. - -If there are multiple declarations of the same entity, the availability -attributes must either match on a per-platform basis or later -declarations must not have availability attributes for that -platform. For example: - -.. code-block:: c - - void g(void) __attribute__((availability(macosx,introduced=10.4))); - void g(void) __attribute__((availability(macosx,introduced=10.4))); // okay, matches - void g(void) __attribute__((availability(ios,introduced=4.0))); // okay, adds a new platform - void g(void); // okay, inherits both macosx and ios availability from above. - void g(void) __attribute__((availability(macosx,introduced=10.5))); // error: mismatch - -When one method overrides another, the overriding method can be more widely available than the overridden method, e.g.,: - -.. code-block:: objc - - @interface A - - (id)method __attribute__((availability(macosx,introduced=10.4))); - - (id)method2 __attribute__((availability(macosx,introduced=10.4))); - @end - - @interface B : A - - (id)method __attribute__((availability(macosx,introduced=10.3))); // okay: method moved into base class later - - (id)method __attribute__((availability(macosx,introduced=10.5))); // error: this method was available via the base class in 10.4 - @end - - -_Noreturn ---------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "","","","X" - -A function declared as ``_Noreturn`` shall not return to its caller. The -compiler will generate a diagnostic for a function declared as ``_Noreturn`` -that appears to be capable of returning to its caller. - - -noreturn --------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "","X","","" - -A function declared as ``[[noreturn]]`` shall not return to its caller. The -compiler will generate a diagnostic for a function declared as ``[[noreturn]]`` -that appears to be capable of returning to its caller. - - -carries_dependency ------------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","X","","" - -The ``carries_dependency`` attribute specifies dependency propagation into and -out of functions. - -When specified on a function or Objective-C method, the ``carries_dependency`` -attribute means that the return value carries a dependency out of the function, -so that the implementation need not constrain ordering upon return from that -function. Implementations of the function and its caller may choose to preserve -dependencies instead of emitting memory ordering instructions such as fences. - -Note, this attribute does not change the meaning of the program, but may result -in generation of more efficient code. - - -enable_if ---------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","","","" - -.. Note:: Some features of this attribute are experimental. The meaning of - multiple enable_if attributes on a single declaration is subject to change in - a future version of clang. Also, the ABI is not standardized and the name - mangling may change in future versions. To avoid that, use asm labels. - -The ``enable_if`` attribute can be placed on function declarations to control -which overload is selected based on the values of the function's arguments. -When combined with the ``overloadable`` attribute, this feature is also -available in C. - -.. code-block:: c++ - - int isdigit(int c); - int isdigit(int c) __attribute__((enable_if(c <= -1 || c > 255, "chosen when 'c' is out of range"))) __attribute__((unavailable("'c' must have the value of an unsigned char or EOF"))); - - void foo(char c) { - isdigit(c); - isdigit(10); - isdigit(-10); // results in a compile-time error. - } - -The enable_if attribute takes two arguments, the first is an expression written -in terms of the function parameters, the second is a string explaining why this -overload candidate could not be selected to be displayed in diagnostics. The -expression is part of the function signature for the purposes of determining -whether it is a redeclaration (following the rules used when determining -whether a C++ template specialization is ODR-equivalent), but is not part of -the type. - -The enable_if expression is evaluated as if it were the body of a -bool-returning constexpr function declared with the arguments of the function -it is being applied to, then called with the parameters at the callsite. If the -result is false or could not be determined through constant expression -evaluation, then this overload will not be chosen and the provided string may -be used in a diagnostic if the compile fails as a result. - -Because the enable_if expression is an unevaluated context, there are no global -state changes, nor the ability to pass information from the enable_if -expression to the function body. For example, suppose we want calls to -strnlen(strbuf, maxlen) to resolve to strnlen_chk(strbuf, maxlen, size of -strbuf) only if the size of strbuf can be determined: - -.. code-block:: c++ - - __attribute__((always_inline)) - static inline size_t strnlen(const char *s, size_t maxlen) - __attribute__((overloadable)) - __attribute__((enable_if(__builtin_object_size(s, 0) != -1))), - "chosen when the buffer size is known but 'maxlen' is not"))) - { - return strnlen_chk(s, maxlen, __builtin_object_size(s, 0)); - } - -Multiple enable_if attributes may be applied to a single declaration. In this -case, the enable_if expressions are evaluated from left to right in the -following manner. First, the candidates whose enable_if expressions evaluate to -false or cannot be evaluated are discarded. If the remaining candidates do not -share ODR-equivalent enable_if expressions, the overload resolution is -ambiguous. Otherwise, enable_if overload resolution continues with the next -enable_if attribute on the candidates that have not been discarded and have -remaining enable_if attributes. In this way, we pick the most specific -overload out of a number of viable overloads using enable_if. - -.. code-block:: c++ - - void f() __attribute__((enable_if(true, ""))); // #1 - void f() __attribute__((enable_if(true, ""))) __attribute__((enable_if(true, ""))); // #2 - - void g(int i, int j) __attribute__((enable_if(i, ""))); // #1 - void g(int i, int j) __attribute__((enable_if(j, ""))) __attribute__((enable_if(true))); // #2 - -In this example, a call to f() is always resolved to #2, as the first enable_if -expression is ODR-equivalent for both declarations, but #1 does not have another -enable_if expression to continue evaluating, so the next round of evaluation has -only a single candidate. In a call to g(1, 1), the call is ambiguous even though -#2 has more enable_if attributes, because the first enable_if expressions are -not ODR-equivalent. - -Query for this feature with ``__has_attribute(enable_if)``. - - -flatten (gnu::flatten) ----------------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","X","","" - -The ``flatten`` attribute causes calls within the attributed function to -be inlined unless it is impossible to do so, for example if the body of the -callee is unavailable or if the callee has the ``noinline`` attribute. - - -format (gnu::format) --------------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","X","","" - -Clang supports the ``format`` attribute, which indicates that the function -accepts a ``printf`` or ``scanf``-like format string and corresponding -arguments or a ``va_list`` that contains these arguments. - -Please see `GCC documentation about format attribute -`_ to find details -about attribute syntax. - -Clang implements two kinds of checks with this attribute. - -#. Clang checks that the function with the ``format`` attribute is called with - a format string that uses format specifiers that are allowed, and that - arguments match the format string. This is the ``-Wformat`` warning, it is - on by default. - -#. Clang checks that the format string argument is a literal string. This is - the ``-Wformat-nonliteral`` warning, it is off by default. - - Clang implements this mostly the same way as GCC, but there is a difference - for functions that accept a ``va_list`` argument (for example, ``vprintf``). - GCC does not emit ``-Wformat-nonliteral`` warning for calls to such - fuctions. Clang does not warn if the format string comes from a function - parameter, where the function is annotated with a compatible attribute, - otherwise it warns. For example: - - .. code-block:: c - - __attribute__((__format__ (__scanf__, 1, 3))) - void foo(const char* s, char *buf, ...) { - va_list ap; - va_start(ap, buf); - - vprintf(s, ap); // warning: format string is not a string literal - } - - In this case we warn because ``s`` contains a format string for a - ``scanf``-like function, but it is passed to a ``printf``-like function. - - If the attribute is removed, clang still warns, because the format string is - not a string literal. - - Another example: - - .. code-block:: c - - __attribute__((__format__ (__printf__, 1, 3))) - void foo(const char* s, char *buf, ...) { - va_list ap; - va_start(ap, buf); - - vprintf(s, ap); // warning - } - - In this case Clang does not warn because the format string ``s`` and - the corresponding arguments are annotated. If the arguments are - incorrect, the caller of ``foo`` will receive a warning. - - -noduplicate (clang::noduplicate) --------------------------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","X","","" - -The ``noduplicate`` attribute can be placed on function declarations to control -whether function calls to this function can be duplicated or not as a result of -optimizations. This is required for the implementation of functions with -certain special requirements, like the OpenCL "barrier" function, that might -need to be run concurrently by all the threads that are executing in lockstep -on the hardware. For example this attribute applied on the function -"nodupfunc" in the code below avoids that: - -.. code-block:: c - - void nodupfunc() __attribute__((noduplicate)); - // Setting it as a C++11 attribute is also valid - // void nodupfunc() [[clang::noduplicate]]; - void foo(); - void bar(); - - nodupfunc(); - if (a > n) { - foo(); - } else { - bar(); - } - -gets possibly modified by some optimizations into code similar to this: - -.. code-block:: c - - if (a > n) { - nodupfunc(); - foo(); - } else { - nodupfunc(); - bar(); - } - -where the call to "nodupfunc" is duplicated and sunk into the two branches -of the condition. - - -no_sanitize_address (no_address_safety_analysis, gnu::no_address_safety_analysis, gnu::no_sanitize_address) ------------------------------------------------------------------------------------------------------------ -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","X","","" - -.. _langext-address_sanitizer: - -Use ``__attribute__((no_sanitize_address))`` on a function declaration to -specify that address safety instrumentation (e.g. AddressSanitizer) should -not be applied to that function. - - -no_sanitize_memory ------------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","","","" - -.. _langext-memory_sanitizer: - -Use ``__attribute__((no_sanitize_memory))`` on a function declaration to -specify that checks for uninitialized memory should not be inserted -(e.g. by MemorySanitizer). The function may still be instrumented by the tool -to avoid false positives in other places. - - -no_sanitize_thread ------------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","","","" - -.. _langext-thread_sanitizer: - -Use ``__attribute__((no_sanitize_thread))`` on a function declaration to -specify that checks for data races on plain (non-atomic) memory accesses should -not be inserted by ThreadSanitizer. The function is still instrumented by the -tool to avoid false positives and provide meaningful stack traces. - - -no_split_stack (gnu::no_split_stack) ------------------------------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","X","","" - -The ``no_split_stack`` attribute disables the emission of the split stack -preamble for a particular function. It has no effect if ``-fsplit-stack`` -is not specified. - - -objc_method_family ------------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","","","" - -Many methods in Objective-C have conventional meanings determined by their -selectors. It is sometimes useful to be able to mark a method as having a -particular conventional meaning despite not having the right selector, or as -not having the conventional meaning that its selector would suggest. For these -use cases, we provide an attribute to specifically describe the "method family" -that a method belongs to. - -**Usage**: ``__attribute__((objc_method_family(X)))``, where ``X`` is one of -``none``, ``alloc``, ``copy``, ``init``, ``mutableCopy``, or ``new``. This -attribute can only be placed at the end of a method declaration: - -.. code-block:: objc - - - (NSString *)initMyStringValue __attribute__((objc_method_family(none))); - -Users who do not wish to change the conventional meaning of a method, and who -merely want to document its non-standard retain and release semantics, should -use the retaining behavior attributes (``ns_returns_retained``, -``ns_returns_not_retained``, etc). - -Query for this feature with ``__has_attribute(objc_method_family)``. - - -objc_requires_super -------------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","","","" - -Some Objective-C classes allow a subclass to override a particular method in a -parent class but expect that the overriding method also calls the overridden -method in the parent class. For these cases, we provide an attribute to -designate that a method requires a "call to ``super``" in the overriding -method in the subclass. - -**Usage**: ``__attribute__((objc_requires_super))``. This attribute can only -be placed at the end of a method declaration: - -.. code-block:: objc - - - (void)foo __attribute__((objc_requires_super)); - -This attribute can only be applied the method declarations within a class, and -not a protocol. Currently this attribute does not enforce any placement of -where the call occurs in the overriding method (such as in the case of -``-dealloc`` where the call must appear at the end). It checks only that it -exists. - -Note that on both OS X and iOS that the Foundation framework provides a -convenience macro ``NS_REQUIRES_SUPER`` that provides syntactic sugar for this -attribute: - -.. code-block:: objc - - - (void)foo NS_REQUIRES_SUPER; - -This macro is conditionally defined depending on the compiler's support for -this attribute. If the compiler does not support the attribute the macro -expands to nothing. - -Operationally, when a method has this annotation the compiler will warn if the -implementation of an override in a subclass does not call super. For example: - -.. code-block:: objc - - warning: method possibly missing a [super AnnotMeth] call - - (void) AnnotMeth{}; - ^ - - -optnone (clang::optnone) ------------------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","X","","" - -The ``optnone`` attribute suppresses essentially all optimizations -on a function or method, regardless of the optimization level applied to -the compilation unit as a whole. This is particularly useful when you -need to debug a particular function, but it is infeasible to build the -entire application without optimization. Avoiding optimization on the -specified function can improve the quality of the debugging information -for that function. - -This attribute is incompatible with the ``always_inline`` attribute. - - -overloadable ------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","","","" - -Clang provides support for C++ function overloading in C. Function overloading -in C is introduced using the ``overloadable`` attribute. For example, one -might provide several overloaded versions of a ``tgsin`` function that invokes -the appropriate standard function computing the sine of a value with ``float``, -``double``, or ``long double`` precision: - -.. code-block:: c - - #include - float __attribute__((overloadable)) tgsin(float x) { return sinf(x); } - double __attribute__((overloadable)) tgsin(double x) { return sin(x); } - long double __attribute__((overloadable)) tgsin(long double x) { return sinl(x); } - -Given these declarations, one can call ``tgsin`` with a ``float`` value to -receive a ``float`` result, with a ``double`` to receive a ``double`` result, -etc. Function overloading in C follows the rules of C++ function overloading -to pick the best overload given the call arguments, with a few C-specific -semantics: - -* Conversion from ``float`` or ``double`` to ``long double`` is ranked as a - floating-point promotion (per C99) rather than as a floating-point conversion - (as in C++). - -* A conversion from a pointer of type ``T*`` to a pointer of type ``U*`` is - considered a pointer conversion (with conversion rank) if ``T`` and ``U`` are - compatible types. - -* A conversion from type ``T`` to a value of type ``U`` is permitted if ``T`` - and ``U`` are compatible types. This conversion is given "conversion" rank. - -The declaration of ``overloadable`` functions is restricted to function -declarations and definitions. Most importantly, if any function with a given -name is given the ``overloadable`` attribute, then all function declarations -and definitions with that name (and in that scope) must have the -``overloadable`` attribute. This rule even applies to redeclarations of -functions whose original declaration had the ``overloadable`` attribute, e.g., - -.. code-block:: c - - int f(int) __attribute__((overloadable)); - float f(float); // error: declaration of "f" must have the "overloadable" attribute - - int g(int) __attribute__((overloadable)); - int g(int) { } // error: redeclaration of "g" must also have the "overloadable" attribute - -Functions marked ``overloadable`` must have prototypes. Therefore, the -following code is ill-formed: - -.. code-block:: c - - int h() __attribute__((overloadable)); // error: h does not have a prototype - -However, ``overloadable`` functions are allowed to use a ellipsis even if there -are no named parameters (as is permitted in C++). This feature is particularly -useful when combined with the ``unavailable`` attribute: - -.. code-block:: c++ - - void honeypot(...) __attribute__((overloadable, unavailable)); // calling me is an error - -Functions declared with the ``overloadable`` attribute have their names mangled -according to the same rules as C++ function names. For example, the three -``tgsin`` functions in our motivating example get the mangled names -``_Z5tgsinf``, ``_Z5tgsind``, and ``_Z5tgsine``, respectively. There are two -caveats to this use of name mangling: - -* Future versions of Clang may change the name mangling of functions overloaded - in C, so you should not depend on an specific mangling. To be completely - safe, we strongly urge the use of ``static inline`` with ``overloadable`` - functions. - -* The ``overloadable`` attribute has almost no meaning when used in C++, - because names will already be mangled and functions are already overloadable. - However, when an ``overloadable`` function occurs within an ``extern "C"`` - linkage specification, it's name *will* be mangled in the same way as it - would in C. - -Query for this feature with ``__has_extension(attribute_overloadable)``. - - -pcs (gnu::pcs) --------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","X","","" - -On ARM targets, this can attribute can be used to select calling conventions, -similar to ``stdcall`` on x86. Valid parameter values are "aapcs" and -"aapcs-vfp". - - -release_capability (release_shared_capability, clang::release_capability, clang::release_shared_capability) ------------------------------------------------------------------------------------------------------------ -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","X","","" - -Marks a function as releasing a capability. - - -try_acquire_capability (try_acquire_shared_capability, clang::try_acquire_capability, clang::try_acquire_shared_capability) ---------------------------------------------------------------------------------------------------------------------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","X","","" - -Marks a function that attempts to acquire a capability. This function may fail to -actually acquire the capability; they accept a Boolean value determining -whether acquiring the capability means success (true), or failing to acquire -the capability means success (false). - - -Variable Attributes -=================== - - -section (gnu::section, __declspec(allocate)) --------------------------------------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","X","X","" - -The ``section`` attribute allows you to specify a specific section a -global variable or function should be in after translation. - - -tls_model (gnu::tls_model) --------------------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "X","X","","" - -The ``tls_model`` attribute allows you to specify which thread-local storage -model to use. It accepts the following strings: - -* global-dynamic -* local-dynamic -* initial-exec -* local-exec - -TLS models are mutually exclusive. - - -thread ------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "","","X","" - -The ``__declspec(thread)`` attribute declares a variable with thread local -storage. It is available under the ``-fms-extensions`` flag for MSVC -compatibility. Documentation for the Visual C++ attribute is available on MSDN_. - -.. _MSDN: http://msdn.microsoft.com/en-us/library/9w1sdazb.aspx - -In Clang, ``__declspec(thread)`` is generally equivalent in functionality to the -GNU ``__thread`` keyword. The variable must not have a destructor and must have -a constant initializer, if any. The attribute only applies to variables -declared with static storage duration, such as globals, class static data -members, and static locals. - - -Type Attributes -=============== - - -__single_inhertiance, __multiple_inheritance, __virtual_inheritance -------------------------------------------------------------------- -.. csv-table:: Supported Syntaxes - :header: "GNU", "C++11", "__declspec", "Keyword" - - "","","","X" - -This collection of keywords is enabled under ``-fms-extensions`` and controls -the pointer-to-member representation used on ``*-*-win32`` targets. - -The ``*-*-win32`` targets utilize a pointer-to-member representation which -varies in size and alignment depending on the definition of the underlying -class. - -However, this is problematic when a forward declaration is only available and -no definition has been made yet. In such cases, Clang is forced to utilize the -most general representation that is available to it. - -These keywords make it possible to use a pointer-to-member representation other -than the most general one regardless of whether or not the definition will ever -be present in the current translation unit. - -This family of keywords belong between the ``class-key`` and ``class-name``: - -.. code-block:: c++ - - struct __single_inheritance S; - int S::*i; - struct S {}; - -This keyword can be applied to class templates but only has an effect when used -on full specializations: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Jul 5 14:24:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D019967A; Sun, 5 Jul 2015 14:24:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 E7DB81DCB; Sun, 5 Jul 2015 14:24:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65EOTbj050650; Sun, 5 Jul 2015 14:24:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65EOTRI050649; Sun, 5 Jul 2015 14:24:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201507051424.t65EOTRI050649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Jul 2015 14:24:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r285166 - vendor/clang/clang-trunk-r241361 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 14:24:30 -0000 Author: dim Date: Sun Jul 5 14:24:29 2015 New Revision: 285166 URL: https://svnweb.freebsd.org/changeset/base/285166 Log: Tag clang trunk r241361. Added: - copied from r285165, vendor/clang/dist/ Directory Properties: vendor/clang/clang-trunk-r241361/ (props changed) From owner-svn-src-all@freebsd.org Sun Jul 5 15:30:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14FA1A29E; Sun, 5 Jul 2015 15:30:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 05A461D06; Sun, 5 Jul 2015 15:30:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65FUGHl085795; Sun, 5 Jul 2015 15:30:16 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65FUGQn085794; Sun, 5 Jul 2015 15:30:16 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201507051530.t65FUGQn085794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sun, 5 Jul 2015 15:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285168 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 15:30:17 -0000 Author: bz Date: Sun Jul 5 15:30:16 2015 New Revision: 285168 URL: https://svnweb.freebsd.org/changeset/base/285168 Log: Fix GENERIC64 and LINT64 powerpc builds after r285144. Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Sun Jul 5 14:24:35 2015 (r285167) +++ head/sys/powerpc/powerpc/trap.c Sun Jul 5 15:30:16 2015 (r285168) @@ -426,10 +426,10 @@ printtrap(u_int vector, struct trapframe ver = mfpvr() >> 16; #if defined(AIM) if (MPC745X_P(ver)) - printf(" msssr0 = 0x%x\n", + printf(" msssr0 = 0x%" PRIxPTR "\n", mfspr(SPR_MSSSR0)); #elif defined(BOOKE) - printf(" mcsr = 0x%x\n", + printf(" mcsr = 0x%" PRIxPTR "\n", mfspr(SPR_MCSR)); #endif break; From owner-svn-src-all@freebsd.org Sun Jul 5 15:42:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F9D1A4CB; Sun, 5 Jul 2015 15:42:18 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 EE8DF1554; Sun, 5 Jul 2015 15:42:17 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65FgHgh095298; Sun, 5 Jul 2015 15:42:17 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65FgH7Z095293; Sun, 5 Jul 2015 15:42:17 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201507051542.t65FgH7Z095293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 5 Jul 2015 15:42:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285169 - in head: contrib/ntp contrib/ntp/adjtimed contrib/ntp/clockstuff contrib/ntp/html contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/include/isc contrib/ntp/kernel contr... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 15:42:18 -0000 Author: cy Date: Sun Jul 5 15:42:16 2015 New Revision: 285169 URL: https://svnweb.freebsd.org/changeset/base/285169 Log: MFV ntp-4.2.8p3 (r284990). Approved by: roberto, delphij Security: VuXML: 0d0f3050-1f69-11e5-9ba9-d050996490d0 Security: http://bugs.ntp.org/show_bug.cgi?id=2853 Security: https://www.kb.cert.org/vuls/id/668167 Security: http://support.ntp.org/bin/view/Main/SecurityNotice#June_2015_NTP_Security_Vulnerabi Added: head/contrib/ntp/README.leapsmear - copied unchanged from r284990, vendor/ntp/dist/README.leapsmear head/contrib/ntp/html/drivers/driver40-ja.html - copied unchanged from r284990, vendor/ntp/dist/html/drivers/driver40-ja.html head/contrib/ntp/include/refidsmear.h - copied unchanged from r284990, vendor/ntp/dist/include/refidsmear.h head/contrib/ntp/libjsmn/example/ - copied from r284990, vendor/ntp/dist/libjsmn/example/ head/contrib/ntp/libntp/refidsmear.c - copied unchanged from r284990, vendor/ntp/dist/libntp/refidsmear.c head/contrib/ntp/ntpd/rc_cmdlength.c - copied unchanged from r284990, vendor/ntp/dist/ntpd/rc_cmdlength.c head/contrib/ntp/scripts/update-leap/update-leap.in - copied unchanged from r284990, vendor/ntp/dist/scripts/update-leap/update-leap.in head/contrib/ntp/scripts/update-leap/update-leap.sh - copied unchanged from r284990, vendor/ntp/dist/scripts/update-leap/update-leap.sh head/contrib/ntp/sntp/ag-tpl/Mdoc.pm - copied unchanged from r284990, vendor/ntp/dist/sntp/ag-tpl/Mdoc.pm head/contrib/ntp/sntp/ag-tpl/mdoc2man - copied unchanged from r284990, vendor/ntp/dist/sntp/ag-tpl/mdoc2man head/contrib/ntp/sntp/libevent/build-aux/ar-lib - copied unchanged from r284990, vendor/ntp/dist/sntp/libevent/build-aux/ar-lib head/contrib/ntp/sntp/libevent/build-aux/test-driver - copied unchanged from r284990, vendor/ntp/dist/sntp/libevent/build-aux/test-driver head/contrib/ntp/sntp/libpkgver/ - copied from r284990, vendor/ntp/dist/sntp/libpkgver/ head/contrib/ntp/sntp/m4/ntp_unitytest.m4 - copied unchanged from r284990, vendor/ntp/dist/sntp/m4/ntp_unitytest.m4 head/contrib/ntp/sntp/tests/crypto.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/crypto.c head/contrib/ntp/sntp/tests/fileHandlingTest.h.in - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/fileHandlingTest.h.in head/contrib/ntp/sntp/tests/g_fileHandlingTest.h - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/g_fileHandlingTest.h head/contrib/ntp/sntp/tests/g_networking.cpp - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/g_networking.cpp head/contrib/ntp/sntp/tests/g_packetHandling.cpp - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/g_packetHandling.cpp head/contrib/ntp/sntp/tests/g_packetProcessing.cpp - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/g_packetProcessing.cpp head/contrib/ntp/sntp/tests/g_sntptest.h - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/g_sntptest.h head/contrib/ntp/sntp/tests/keyFile.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/keyFile.c head/contrib/ntp/sntp/tests/kodDatabase.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/kodDatabase.c head/contrib/ntp/sntp/tests/kodFile.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/kodFile.c head/contrib/ntp/sntp/tests/networking.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/networking.c head/contrib/ntp/sntp/tests/packetHandling.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/packetHandling.c head/contrib/ntp/sntp/tests/packetProcessing.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/packetProcessing.c head/contrib/ntp/sntp/tests/run-crypto.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/run-crypto.c head/contrib/ntp/sntp/tests/run-keyFile.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/run-keyFile.c head/contrib/ntp/sntp/tests/run-kodDatabase.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/run-kodDatabase.c head/contrib/ntp/sntp/tests/run-kodFile.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/run-kodFile.c head/contrib/ntp/sntp/tests/run-networking.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/run-networking.c head/contrib/ntp/sntp/tests/run-packetHandling.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/run-packetHandling.c head/contrib/ntp/sntp/tests/run-packetProcessing.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/run-packetProcessing.c head/contrib/ntp/sntp/tests/run-utilities.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/run-utilities.c head/contrib/ntp/sntp/tests/utilities.c - copied unchanged from r284990, vendor/ntp/dist/sntp/tests/utilities.c head/contrib/ntp/sntp/unity/ - copied from r284990, vendor/ntp/dist/sntp/unity/ head/contrib/ntp/sntp/version.c - copied unchanged from r284990, vendor/ntp/dist/sntp/version.c head/contrib/ntp/tests/bug-2803/ - copied from r284990, vendor/ntp/dist/tests/bug-2803/ head/contrib/ntp/tests/libntp/a_md5encrypt.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/a_md5encrypt.c head/contrib/ntp/tests/libntp/atoint.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/atoint.c head/contrib/ntp/tests/libntp/atouint.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/atouint.c head/contrib/ntp/tests/libntp/authkeys.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/authkeys.c head/contrib/ntp/tests/libntp/buftvtots.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/buftvtots.c head/contrib/ntp/tests/libntp/calendar.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/calendar.c head/contrib/ntp/tests/libntp/caljulian.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/caljulian.c head/contrib/ntp/tests/libntp/caltontp.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/caltontp.c head/contrib/ntp/tests/libntp/calyearstart.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/calyearstart.c head/contrib/ntp/tests/libntp/clocktime.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/clocktime.c head/contrib/ntp/tests/libntp/decodenetnum.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/decodenetnum.c head/contrib/ntp/tests/libntp/g_a_md5encrypt.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_a_md5encrypt.cpp head/contrib/ntp/tests/libntp/g_atoint.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_atoint.cpp head/contrib/ntp/tests/libntp/g_atouint.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_atouint.cpp head/contrib/ntp/tests/libntp/g_authkeys.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_authkeys.cpp head/contrib/ntp/tests/libntp/g_buftvtots.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_buftvtots.cpp head/contrib/ntp/tests/libntp/g_calendar.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_calendar.cpp head/contrib/ntp/tests/libntp/g_caljulian.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_caljulian.cpp head/contrib/ntp/tests/libntp/g_caltontp.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_caltontp.cpp head/contrib/ntp/tests/libntp/g_calyearstart.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_calyearstart.cpp head/contrib/ntp/tests/libntp/g_clocktime.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_clocktime.cpp head/contrib/ntp/tests/libntp/g_decodenetnum.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_decodenetnum.cpp head/contrib/ntp/tests/libntp/g_hextoint.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_hextoint.cpp head/contrib/ntp/tests/libntp/g_hextolfp.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_hextolfp.cpp head/contrib/ntp/tests/libntp/g_humandate.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_humandate.cpp head/contrib/ntp/tests/libntp/g_lfpfunc.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_lfpfunc.cpp head/contrib/ntp/tests/libntp/g_lfptest.h - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_lfptest.h head/contrib/ntp/tests/libntp/g_lfptostr.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_lfptostr.cpp head/contrib/ntp/tests/libntp/g_libntptest.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_libntptest.cpp head/contrib/ntp/tests/libntp/g_libntptest.h - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_libntptest.h head/contrib/ntp/tests/libntp/g_modetoa.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_modetoa.cpp head/contrib/ntp/tests/libntp/g_msyslog.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_msyslog.cpp head/contrib/ntp/tests/libntp/g_netof.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_netof.cpp head/contrib/ntp/tests/libntp/g_numtoa.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_numtoa.cpp head/contrib/ntp/tests/libntp/g_numtohost.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_numtohost.cpp head/contrib/ntp/tests/libntp/g_octtoint.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_octtoint.cpp head/contrib/ntp/tests/libntp/g_prettydate.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_prettydate.cpp head/contrib/ntp/tests/libntp/g_recvbuff.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_recvbuff.cpp head/contrib/ntp/tests/libntp/g_refnumtoa.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_refnumtoa.cpp head/contrib/ntp/tests/libntp/g_sfptostr.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_sfptostr.cpp head/contrib/ntp/tests/libntp/g_sockaddrtest.h - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_sockaddrtest.h head/contrib/ntp/tests/libntp/g_socktoa.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_socktoa.cpp head/contrib/ntp/tests/libntp/g_ssl_init.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_ssl_init.cpp head/contrib/ntp/tests/libntp/g_statestr.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_statestr.cpp head/contrib/ntp/tests/libntp/g_strtolfp.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_strtolfp.cpp head/contrib/ntp/tests/libntp/g_timespecops.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_timespecops.cpp head/contrib/ntp/tests/libntp/g_timestructs.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_timestructs.cpp head/contrib/ntp/tests/libntp/g_timestructs.h - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_timestructs.h head/contrib/ntp/tests/libntp/g_timevalops.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_timevalops.cpp head/contrib/ntp/tests/libntp/g_tstotv.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_tstotv.cpp head/contrib/ntp/tests/libntp/g_tvtots.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_tvtots.cpp head/contrib/ntp/tests/libntp/g_uglydate.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_uglydate.cpp head/contrib/ntp/tests/libntp/g_vi64ops.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_vi64ops.cpp head/contrib/ntp/tests/libntp/g_ymd2yd.cpp - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/g_ymd2yd.cpp head/contrib/ntp/tests/libntp/hextoint.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/hextoint.c head/contrib/ntp/tests/libntp/hextolfp.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/hextolfp.c head/contrib/ntp/tests/libntp/humandate.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/humandate.c head/contrib/ntp/tests/libntp/lfpfunc.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/lfpfunc.c head/contrib/ntp/tests/libntp/lfptostr.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/lfptostr.c head/contrib/ntp/tests/libntp/modetoa.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/modetoa.c head/contrib/ntp/tests/libntp/msyslog.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/msyslog.c head/contrib/ntp/tests/libntp/netof.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/netof.c head/contrib/ntp/tests/libntp/numtoa.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/numtoa.c head/contrib/ntp/tests/libntp/numtohost.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/numtohost.c head/contrib/ntp/tests/libntp/octtoint.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/octtoint.c head/contrib/ntp/tests/libntp/prettydate.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/prettydate.c head/contrib/ntp/tests/libntp/recvbuff.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/recvbuff.c head/contrib/ntp/tests/libntp/refidsmear.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/refidsmear.c head/contrib/ntp/tests/libntp/refnumtoa.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/refnumtoa.c head/contrib/ntp/tests/libntp/run-a_md5encrypt.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-a_md5encrypt.c head/contrib/ntp/tests/libntp/run-atoint.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-atoint.c head/contrib/ntp/tests/libntp/run-atouint.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-atouint.c head/contrib/ntp/tests/libntp/run-authkeys.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-authkeys.c head/contrib/ntp/tests/libntp/run-buftvtots.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-buftvtots.c head/contrib/ntp/tests/libntp/run-calendar.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-calendar.c head/contrib/ntp/tests/libntp/run-caljulian.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-caljulian.c head/contrib/ntp/tests/libntp/run-caltontp.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-caltontp.c head/contrib/ntp/tests/libntp/run-calyearstart.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-calyearstart.c head/contrib/ntp/tests/libntp/run-clocktime.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-clocktime.c head/contrib/ntp/tests/libntp/run-decodenetnum.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-decodenetnum.c head/contrib/ntp/tests/libntp/run-hextoint.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-hextoint.c head/contrib/ntp/tests/libntp/run-hextolfp.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-hextolfp.c head/contrib/ntp/tests/libntp/run-humandate.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-humandate.c head/contrib/ntp/tests/libntp/run-lfpfunc.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-lfpfunc.c head/contrib/ntp/tests/libntp/run-lfptostr.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-lfptostr.c head/contrib/ntp/tests/libntp/run-modetoa.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-modetoa.c head/contrib/ntp/tests/libntp/run-msyslog.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-msyslog.c head/contrib/ntp/tests/libntp/run-netof.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-netof.c head/contrib/ntp/tests/libntp/run-numtoa.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-numtoa.c head/contrib/ntp/tests/libntp/run-numtohost.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-numtohost.c head/contrib/ntp/tests/libntp/run-octtoint.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-octtoint.c head/contrib/ntp/tests/libntp/run-prettydate.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-prettydate.c head/contrib/ntp/tests/libntp/run-recvbuff.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-recvbuff.c head/contrib/ntp/tests/libntp/run-refidsmear.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-refidsmear.c head/contrib/ntp/tests/libntp/run-refnumtoa.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-refnumtoa.c head/contrib/ntp/tests/libntp/run-sfptostr.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-sfptostr.c head/contrib/ntp/tests/libntp/run-socktoa.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-socktoa.c head/contrib/ntp/tests/libntp/run-ssl_init.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-ssl_init.c head/contrib/ntp/tests/libntp/run-statestr.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-statestr.c head/contrib/ntp/tests/libntp/run-strtolfp.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-strtolfp.c head/contrib/ntp/tests/libntp/run-timespecops.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-timespecops.c head/contrib/ntp/tests/libntp/run-timevalops.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-timevalops.c head/contrib/ntp/tests/libntp/run-tstotv.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-tstotv.c head/contrib/ntp/tests/libntp/run-tvtots.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-tvtots.c head/contrib/ntp/tests/libntp/run-uglydate.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-uglydate.c head/contrib/ntp/tests/libntp/run-vi64ops.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-vi64ops.c head/contrib/ntp/tests/libntp/run-ymd2yd.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/run-ymd2yd.c head/contrib/ntp/tests/libntp/sfptostr.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/sfptostr.c head/contrib/ntp/tests/libntp/socktoa.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/socktoa.c head/contrib/ntp/tests/libntp/ssl_init.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/ssl_init.c head/contrib/ntp/tests/libntp/statestr.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/statestr.c head/contrib/ntp/tests/libntp/strtolfp.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/strtolfp.c head/contrib/ntp/tests/libntp/test-libntp.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/test-libntp.c head/contrib/ntp/tests/libntp/test-libntp.h - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/test-libntp.h head/contrib/ntp/tests/libntp/timespecops.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/timespecops.c head/contrib/ntp/tests/libntp/timevalops.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/timevalops.c head/contrib/ntp/tests/libntp/tstotv.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/tstotv.c head/contrib/ntp/tests/libntp/tvtots.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/tvtots.c head/contrib/ntp/tests/libntp/uglydate.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/uglydate.c head/contrib/ntp/tests/libntp/vi64ops.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/vi64ops.c head/contrib/ntp/tests/libntp/ymd2yd.c - copied unchanged from r284990, vendor/ntp/dist/tests/libntp/ymd2yd.c head/contrib/ntp/tests/sandbox/ - copied from r284990, vendor/ntp/dist/tests/sandbox/ head/contrib/ntp/tests/sec-2853/ - copied from r284990, vendor/ntp/dist/tests/sec-2853/ Deleted: head/contrib/ntp/scripts/update-leap/update-leap head/contrib/ntp/sntp/tests/crypto.cpp head/contrib/ntp/sntp/tests/keyFile.cpp head/contrib/ntp/sntp/tests/kodDatabase.cpp head/contrib/ntp/sntp/tests/kodFile.cpp head/contrib/ntp/sntp/tests/networking.cpp head/contrib/ntp/sntp/tests/packetHandling.cpp head/contrib/ntp/sntp/tests/packetProcessing.cpp head/contrib/ntp/sntp/tests/utilities.cpp head/contrib/ntp/tests/libntp/a_md5encrypt.cpp head/contrib/ntp/tests/libntp/atoint.cpp head/contrib/ntp/tests/libntp/atouint.cpp head/contrib/ntp/tests/libntp/authkeys.cpp head/contrib/ntp/tests/libntp/buftvtots.cpp head/contrib/ntp/tests/libntp/calendar.cpp head/contrib/ntp/tests/libntp/caljulian.cpp head/contrib/ntp/tests/libntp/caltontp.cpp head/contrib/ntp/tests/libntp/calyearstart.cpp head/contrib/ntp/tests/libntp/clocktime.cpp head/contrib/ntp/tests/libntp/decodenetnum.cpp head/contrib/ntp/tests/libntp/hextoint.cpp head/contrib/ntp/tests/libntp/hextolfp.cpp head/contrib/ntp/tests/libntp/humandate.cpp head/contrib/ntp/tests/libntp/lfpfunc.cpp head/contrib/ntp/tests/libntp/lfptostr.cpp head/contrib/ntp/tests/libntp/libntptest.cpp head/contrib/ntp/tests/libntp/libntptest.h head/contrib/ntp/tests/libntp/modetoa.cpp head/contrib/ntp/tests/libntp/msyslog.cpp head/contrib/ntp/tests/libntp/netof.cpp head/contrib/ntp/tests/libntp/numtoa.cpp head/contrib/ntp/tests/libntp/numtohost.cpp head/contrib/ntp/tests/libntp/octtoint.cpp head/contrib/ntp/tests/libntp/prettydate.cpp head/contrib/ntp/tests/libntp/recvbuff.cpp head/contrib/ntp/tests/libntp/refnumtoa.cpp head/contrib/ntp/tests/libntp/sfptostr.cpp head/contrib/ntp/tests/libntp/socktoa.cpp head/contrib/ntp/tests/libntp/ssl_init.cpp head/contrib/ntp/tests/libntp/statestr.cpp head/contrib/ntp/tests/libntp/strtolfp.cpp head/contrib/ntp/tests/libntp/timespecops.cpp head/contrib/ntp/tests/libntp/timestructs.cpp head/contrib/ntp/tests/libntp/timestructs.h head/contrib/ntp/tests/libntp/timevalops.cpp head/contrib/ntp/tests/libntp/tstotv.cpp head/contrib/ntp/tests/libntp/tvtots.cpp head/contrib/ntp/tests/libntp/uglydate.cpp head/contrib/ntp/tests/libntp/vi64ops.cpp head/contrib/ntp/tests/libntp/ymd2yd.cpp head/contrib/ntp/util/ansi2knr.1 head/contrib/ntp/util/ansi2knr.c Modified: head/contrib/ntp/ChangeLog head/contrib/ntp/CommitLog head/contrib/ntp/Makefile.am head/contrib/ntp/Makefile.in head/contrib/ntp/NEWS head/contrib/ntp/aclocal.m4 head/contrib/ntp/adjtimed/Makefile.in head/contrib/ntp/bootstrap head/contrib/ntp/clockstuff/Makefile.in head/contrib/ntp/config.h.in head/contrib/ntp/configure head/contrib/ntp/configure.ac head/contrib/ntp/html/drivers/driver22.html head/contrib/ntp/html/drivers/driver40.html head/contrib/ntp/html/drivers/driver46.html head/contrib/ntp/html/miscopt.html head/contrib/ntp/html/refclock.html head/contrib/ntp/include/Makefile.am head/contrib/ntp/include/Makefile.in head/contrib/ntp/include/isc/Makefile.in head/contrib/ntp/include/ntp_io.h head/contrib/ntp/include/ntp_stdlib.h head/contrib/ntp/include/ntp_types.h head/contrib/ntp/include/ntpd.h head/contrib/ntp/include/parse.h head/contrib/ntp/kernel/Makefile.in head/contrib/ntp/kernel/sys/Makefile.in head/contrib/ntp/lib/isc/unix/ifiter_getifaddrs.c head/contrib/ntp/libjsmn/Makefile head/contrib/ntp/libjsmn/README.md head/contrib/ntp/libjsmn/jsmn.c head/contrib/ntp/libjsmn/jsmn.h head/contrib/ntp/libjsmn/jsmn_test.c head/contrib/ntp/libntp/Makefile.am head/contrib/ntp/libntp/Makefile.in head/contrib/ntp/libntp/emalloc.c head/contrib/ntp/libntp/strdup.c head/contrib/ntp/libntp/work_fork.c head/contrib/ntp/libparse/Makefile.in head/contrib/ntp/libparse/clk_meinberg.c head/contrib/ntp/libparse/clk_rawdcf.c head/contrib/ntp/libparse/clk_schmid.c head/contrib/ntp/libparse/parse.c head/contrib/ntp/ntpd/Makefile.am head/contrib/ntp/ntpd/Makefile.in head/contrib/ntp/ntpd/complete.conf.in head/contrib/ntp/ntpd/invoke-ntp.conf.texi head/contrib/ntp/ntpd/invoke-ntp.keys.texi head/contrib/ntp/ntpd/invoke-ntpd.texi head/contrib/ntp/ntpd/keyword-gen-utd head/contrib/ntp/ntpd/keyword-gen.c head/contrib/ntp/ntpd/ntp.conf.5man head/contrib/ntp/ntpd/ntp.conf.5mdoc head/contrib/ntp/ntpd/ntp.conf.def head/contrib/ntp/ntpd/ntp.conf.html head/contrib/ntp/ntpd/ntp.conf.man.in head/contrib/ntp/ntpd/ntp.conf.mdoc.in head/contrib/ntp/ntpd/ntp.keys.5man head/contrib/ntp/ntpd/ntp.keys.5mdoc head/contrib/ntp/ntpd/ntp.keys.html head/contrib/ntp/ntpd/ntp.keys.man.in head/contrib/ntp/ntpd/ntp.keys.mdoc.in head/contrib/ntp/ntpd/ntp_config.c head/contrib/ntp/ntpd/ntp_control.c head/contrib/ntp/ntpd/ntp_crypto.c head/contrib/ntp/ntpd/ntp_io.c head/contrib/ntp/ntpd/ntp_keyword.h head/contrib/ntp/ntpd/ntp_leapsec.c head/contrib/ntp/ntpd/ntp_leapsec.h head/contrib/ntp/ntpd/ntp_loopfilter.c head/contrib/ntp/ntpd/ntp_monitor.c head/contrib/ntp/ntpd/ntp_parser.c head/contrib/ntp/ntpd/ntp_parser.h head/contrib/ntp/ntpd/ntp_proto.c head/contrib/ntp/ntpd/ntp_scanner.c head/contrib/ntp/ntpd/ntp_scanner.h head/contrib/ntp/ntpd/ntp_timer.c head/contrib/ntp/ntpd/ntpd-opts.c head/contrib/ntp/ntpd/ntpd-opts.h head/contrib/ntp/ntpd/ntpd.1ntpdman head/contrib/ntp/ntpd/ntpd.1ntpdmdoc head/contrib/ntp/ntpd/ntpd.html head/contrib/ntp/ntpd/ntpd.man.in head/contrib/ntp/ntpd/ntpd.mdoc.in head/contrib/ntp/ntpd/refclock_gpsdjson.c head/contrib/ntp/ntpd/refclock_jjy.c head/contrib/ntp/ntpd/refclock_parse.c head/contrib/ntp/ntpd/refclock_shm.c head/contrib/ntp/ntpd/refclock_true.c head/contrib/ntp/ntpdate/Makefile.in head/contrib/ntp/ntpdc/Makefile.in head/contrib/ntp/ntpdc/invoke-ntpdc.texi head/contrib/ntp/ntpdc/nl.pl head/contrib/ntp/ntpdc/ntpdc-opts.c head/contrib/ntp/ntpdc/ntpdc-opts.h head/contrib/ntp/ntpdc/ntpdc.1ntpdcman head/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc head/contrib/ntp/ntpdc/ntpdc.html head/contrib/ntp/ntpdc/ntpdc.man.in head/contrib/ntp/ntpdc/ntpdc.mdoc.in head/contrib/ntp/ntpq/Makefile.in head/contrib/ntp/ntpq/invoke-ntpq.texi head/contrib/ntp/ntpq/ntpq-opts.c head/contrib/ntp/ntpq/ntpq-opts.def head/contrib/ntp/ntpq/ntpq-opts.h head/contrib/ntp/ntpq/ntpq-subs.c head/contrib/ntp/ntpq/ntpq.1ntpqman head/contrib/ntp/ntpq/ntpq.1ntpqmdoc head/contrib/ntp/ntpq/ntpq.c head/contrib/ntp/ntpq/ntpq.html head/contrib/ntp/ntpq/ntpq.man.in head/contrib/ntp/ntpq/ntpq.mdoc.in head/contrib/ntp/ntpsnmpd/Makefile.in head/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc head/contrib/ntp/ntpsnmpd/ntpsnmpd.html head/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in head/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in head/contrib/ntp/packageinfo.sh head/contrib/ntp/parseutil/Makefile.in head/contrib/ntp/parseutil/dcfd.c head/contrib/ntp/parseutil/testdcf.c head/contrib/ntp/scripts/Makefile.in head/contrib/ntp/scripts/build/Makefile.in head/contrib/ntp/scripts/calc_tickadj/Makefile.in head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in head/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi head/contrib/ntp/scripts/invoke-plot_summary.texi head/contrib/ntp/scripts/invoke-summary.texi head/contrib/ntp/scripts/lib/Makefile.in head/contrib/ntp/scripts/lib/NTP/Util.pm head/contrib/ntp/scripts/ntp-wait/Makefile.in head/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi head/contrib/ntp/scripts/ntp-wait/ntp-wait-opts head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc head/contrib/ntp/scripts/ntp-wait/ntp-wait.html head/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in head/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in head/contrib/ntp/scripts/ntpsweep/Makefile.in head/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi head/contrib/ntp/scripts/ntpsweep/ntpsweep-opts head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc head/contrib/ntp/scripts/ntpsweep/ntpsweep.html head/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in head/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in head/contrib/ntp/scripts/ntptrace/Makefile.in head/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi head/contrib/ntp/scripts/ntptrace/ntptrace-opts head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc head/contrib/ntp/scripts/ntptrace/ntptrace.html head/contrib/ntp/scripts/ntptrace/ntptrace.man.in head/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in head/contrib/ntp/scripts/plot_summary-opts head/contrib/ntp/scripts/plot_summary.1plot_summaryman head/contrib/ntp/scripts/plot_summary.1plot_summarymdoc head/contrib/ntp/scripts/plot_summary.html head/contrib/ntp/scripts/plot_summary.man.in head/contrib/ntp/scripts/plot_summary.mdoc.in head/contrib/ntp/scripts/summary-opts head/contrib/ntp/scripts/summary.1summaryman head/contrib/ntp/scripts/summary.1summarymdoc head/contrib/ntp/scripts/summary.html head/contrib/ntp/scripts/summary.man.in head/contrib/ntp/scripts/summary.mdoc.in head/contrib/ntp/scripts/update-leap/Makefile.am head/contrib/ntp/scripts/update-leap/Makefile.in head/contrib/ntp/scripts/update-leap/invoke-update-leap.texi head/contrib/ntp/scripts/update-leap/update-leap-opts head/contrib/ntp/scripts/update-leap/update-leap.1update-leapman head/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc head/contrib/ntp/scripts/update-leap/update-leap.html head/contrib/ntp/scripts/update-leap/update-leap.man.in head/contrib/ntp/scripts/update-leap/update-leap.mdoc.in head/contrib/ntp/sntp/Makefile.am head/contrib/ntp/sntp/Makefile.in head/contrib/ntp/sntp/aclocal.m4 head/contrib/ntp/sntp/config.h.in head/contrib/ntp/sntp/configure head/contrib/ntp/sntp/configure.ac head/contrib/ntp/sntp/include/Makefile.in head/contrib/ntp/sntp/include/autogen-version.def head/contrib/ntp/sntp/include/version.def head/contrib/ntp/sntp/include/version.texi head/contrib/ntp/sntp/invoke-sntp.texi head/contrib/ntp/sntp/kod_management.c head/contrib/ntp/sntp/libevent/Makefile.in head/contrib/ntp/sntp/libevent/aclocal.m4 head/contrib/ntp/sntp/libevent/build-aux/ltmain.sh head/contrib/ntp/sntp/libevent/config.h.in head/contrib/ntp/sntp/libevent/configure head/contrib/ntp/sntp/libevent/listener.c head/contrib/ntp/sntp/libevent/m4/ltversion.m4 head/contrib/ntp/sntp/libopts/COPYING.gplv3 head/contrib/ntp/sntp/libopts/COPYING.lgplv3 head/contrib/ntp/sntp/libopts/COPYING.mbsd head/contrib/ntp/sntp/libopts/Makefile.in head/contrib/ntp/sntp/libopts/README head/contrib/ntp/sntp/libopts/ag-char-map.h head/contrib/ntp/sntp/libopts/alias.c head/contrib/ntp/sntp/libopts/ao-strs.c head/contrib/ntp/sntp/libopts/ao-strs.h head/contrib/ntp/sntp/libopts/autoopts.c head/contrib/ntp/sntp/libopts/autoopts.h head/contrib/ntp/sntp/libopts/autoopts/options.h head/contrib/ntp/sntp/libopts/autoopts/project.h head/contrib/ntp/sntp/libopts/autoopts/usage-txt.h head/contrib/ntp/sntp/libopts/boolean.c head/contrib/ntp/sntp/libopts/check.c head/contrib/ntp/sntp/libopts/compat/compat.h head/contrib/ntp/sntp/libopts/compat/pathfind.c head/contrib/ntp/sntp/libopts/compat/windows-config.h head/contrib/ntp/sntp/libopts/configfile.c head/contrib/ntp/sntp/libopts/cook.c head/contrib/ntp/sntp/libopts/enum.c head/contrib/ntp/sntp/libopts/env.c head/contrib/ntp/sntp/libopts/file.c head/contrib/ntp/sntp/libopts/find.c head/contrib/ntp/sntp/libopts/genshell.c head/contrib/ntp/sntp/libopts/gettext.h head/contrib/ntp/sntp/libopts/init.c head/contrib/ntp/sntp/libopts/intprops.h head/contrib/ntp/sntp/libopts/libopts.c head/contrib/ntp/sntp/libopts/load.c head/contrib/ntp/sntp/libopts/m4/libopts.m4 head/contrib/ntp/sntp/libopts/m4/liboptschk.m4 head/contrib/ntp/sntp/libopts/m4/stdnoreturn.m4 head/contrib/ntp/sntp/libopts/makeshell.c head/contrib/ntp/sntp/libopts/nested.c head/contrib/ntp/sntp/libopts/numeric.c head/contrib/ntp/sntp/libopts/option-value-type.c head/contrib/ntp/sntp/libopts/option-value-type.h head/contrib/ntp/sntp/libopts/option-xat-attribute.c head/contrib/ntp/sntp/libopts/option-xat-attribute.h head/contrib/ntp/sntp/libopts/parse-duration.c head/contrib/ntp/sntp/libopts/parse-duration.h head/contrib/ntp/sntp/libopts/pgusage.c head/contrib/ntp/sntp/libopts/proto.h head/contrib/ntp/sntp/libopts/putshell.c head/contrib/ntp/sntp/libopts/reset.c head/contrib/ntp/sntp/libopts/restore.c head/contrib/ntp/sntp/libopts/save.c head/contrib/ntp/sntp/libopts/sort.c head/contrib/ntp/sntp/libopts/stack.c head/contrib/ntp/sntp/libopts/stdnoreturn.in.h head/contrib/ntp/sntp/libopts/streqvcmp.c head/contrib/ntp/sntp/libopts/text_mmap.c head/contrib/ntp/sntp/libopts/time.c head/contrib/ntp/sntp/libopts/tokenize.c head/contrib/ntp/sntp/libopts/usage.c head/contrib/ntp/sntp/libopts/version.c head/contrib/ntp/sntp/m4/ltversion.m4 head/contrib/ntp/sntp/m4/ntp_libntp.m4 head/contrib/ntp/sntp/m4/ntp_openssl.m4 head/contrib/ntp/sntp/m4/os_cflags.m4 head/contrib/ntp/sntp/m4/version.m4 head/contrib/ntp/sntp/main.c head/contrib/ntp/sntp/scripts/Makefile.in head/contrib/ntp/sntp/scripts/genLocInfo head/contrib/ntp/sntp/sntp-opts.c head/contrib/ntp/sntp/sntp-opts.h head/contrib/ntp/sntp/sntp.1sntpman head/contrib/ntp/sntp/sntp.1sntpmdoc head/contrib/ntp/sntp/sntp.html head/contrib/ntp/sntp/sntp.man.in head/contrib/ntp/sntp/sntp.mdoc.in head/contrib/ntp/sntp/tests/Makefile.am head/contrib/ntp/sntp/tests/Makefile.in head/contrib/ntp/sntp/tests/fileHandlingTest.h head/contrib/ntp/sntp/tests/sntptest.h head/contrib/ntp/sntp/tests_main.cpp head/contrib/ntp/tests/Makefile.am head/contrib/ntp/tests/Makefile.in head/contrib/ntp/tests/libntp/Makefile.am head/contrib/ntp/tests/libntp/Makefile.in head/contrib/ntp/tests/libntp/lfptest.h head/contrib/ntp/tests/libntp/sockaddrtest.h head/contrib/ntp/tests/ntpd/Makefile.in head/contrib/ntp/tests/ntpd/leapsec.cpp head/contrib/ntp/util/Makefile.in head/contrib/ntp/util/invoke-ntp-keygen.texi head/contrib/ntp/util/ntp-keygen-opts.c head/contrib/ntp/util/ntp-keygen-opts.h head/contrib/ntp/util/ntp-keygen.1ntp-keygenman head/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc head/contrib/ntp/util/ntp-keygen.html head/contrib/ntp/util/ntp-keygen.man.in head/contrib/ntp/util/ntp-keygen.mdoc.in head/usr.sbin/ntp/libntp/Makefile head/usr.sbin/ntp/ntpd/Makefile Directory Properties: head/contrib/ntp/ (props changed) Modified: head/contrib/ntp/ChangeLog ============================================================================== --- head/contrib/ntp/ChangeLog Sun Jul 5 15:30:16 2015 (r285168) +++ head/contrib/ntp/ChangeLog Sun Jul 5 15:42:16 2015 (r285169) @@ -1,8 +1,145 @@ --- +(4.2.8p3) 2015/06/29 Released by Harlan Stenn + +* [Sec 2853] Crafted remote config packet can crash some versions of + ntpd. Aleksis Kauppinen, Juergen Perlinger, Harlan Stenn. +* [Sec 2853] Initial work on tests/sec-2853/. Harlan Stenn. +* [Bug 1060] Buffer overruns in libparse/clk_rawdcf.c. Helge Oldach. +* [Bug 2846] Report 'unsynchronized' status during the leap second. + Fixed in Martin's changes to Bug 2855. Martin Burnicki. +* [Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel. +* [Bug 2860] ntpq ifstats sanity check is too stringent. Frank Kardel. +* README.leapsmear added. Martin Burnicki. +* README.leapsmear edited. Harlan Stenn. +* tests/libntp/msyslog.c: fixed a gcc warning. Tomasz Flendrich. +* ntpd/ntp.conf.def: Document DSCP and leapsmearinterval. Harlan Stenn. +* html/miscopt.html: Document leapsmearinterval, other cleanup. Harlan Stenn. +--- +(4.2.8p3-RC3) 2015/06/27 Released by Harlan Stenn + +* [Bug 2855] Parser fix for conditional leap smear code. Harlan Stenn. +* [Bug 2855] Report leap smear in the REFID. Harlan Stenn. +* [Bug 2856] ntpd should wait() on terminated child processes. Paul Green. +* [Bug 2857] Stratus VOS does not support SIGIO. Paul Green. +* html/drivers/driver22.html: typo fix. Harlan Stenn. +* refidsmear test cleanup. Tomasz Flendrich. +* refidsmear function support and tests. Harlan Stenn. +* sntp/tests/Makefile.am: remove g_nameresolution.cpp as it tested + something that was only in the 4.2.6 sntp. Harlan Stenn. +* Modified tests/bug-2803/Makefile.am so it builds Unity framework tests. + Damir Tomić +* Modified tests/libtnp/Makefile.am so it builds Unity framework tests. + Damir Tomić +* Modified sntp/tests/Makefile.am so it builds Unity framework tests. + Damir Tomić +* tests/sandbox/smeartest.c: Harlan Stenn, Damir Tomic, Juergen Perlinger. +* Converted from gtest to Unity: tests/bug-2803/. Damir Tomić +* Converted from gtest to Unity: tests/libntp/ a_md5encrypt, atoint.c, + atouint.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c, + calyearstart.c, clocktime.c, hextoint.c, lfpfunc.c, modetoa.c, + numtoa.c, numtohost.c, refnumtoa.c, ssl_init.c, statestr.c, + timespecops.c, timevalops.c, uglydate.c, vi64ops.c, ymd2yd.c. + Damir Tomić +* Converted from gtest to Unity: sntp/tests/ kodDatabase.c, kodFile.c, + networking.c, keyFile.c, utilities.cpp, sntptest.h, + fileHandlingTest.h. Damir Tomić +* Converted from gtest to Unity: sntp/tests/ caltontp.c, humandate.c, + msyslog.c, prettydate.c, recvbuff.c, sfptostr.c, tstotv.c, tvtots.c, + sntp/tests/packetProcessing.c. Tomasz Flendrich +--- +(4.2.8p3-RC2) 2015/06/24 Released by Harlan Stenn + +* [Bug 2778] Implement "apeers" ntpq command to include associd. +* [Bug 2805] ntpd fails to join multicast group. +* [Bug 2824] Convert update-leap to perl. (also see 2769) +* [Bug 2830] ntpd doesn't always transfer the correct TAI offset via autokey + NTPD transfers the current TAI (instead of an announcement) now. + This might still needed improvement. + Update autokey data ASAP when 'sys_tai' changes. + Fix unit test that was broken by changes for autokey update. + Avoid potential signature length issue and use DPRINTF where possible + in ntp_crypto.c. +* [Bug 2832] refclock_jjy.c supports the TDC-300. +* [Bug 2834] Correct a broken html tag in html/refclock.html +* [Bug 2836] DFC77 patches from Frank Kardel to make decoding more + robust, and require 2 consecutive timestamps to be consistent. +* [Bug 2837] Allow a configurable DSCP value. +* [Bug 2837] add test for DSCP to ntpd/complete.conf.in +* [Bug 2842] Glitch in ntp.conf.def documentation stanza. +* [Bug 2842] Bug in mdoc2man. +* [Bug 2843] make check fails on 4.3.36 + Fixed compiler warnings about numeric range overflow + (The original topic was fixed in a byplay to bug#2830) +* [Bug 2845] Harden memory allocation in ntpd. +* [Bug 2852] 'make check' can't find unity.h. Hal Murray. +* [Bug 2854] Missing brace in libntp/strdup.c. Masanari Iida. +* [Bug 2855] Implement conditional leap smear code. Martin Burnicki. +* [Bug 2855] leap smear cleanup. Harlan Stenn. +* Initial support for experimental leap smear code. Harlan Stenn. +* Fixes to sntp/tests/fileHandlingTest.h.in. Harlan Stenn. +* Report select() debug messages at debug level 3 now. +* sntp/scripts/genLocInfo: treat raspbian as debian. +* Unity test framework fixes. + ** Requires ruby for changes to tests. +* Initial support for PACKAGE_VERSION tests. +* sntp/libpkgver belongs in EXTRA_DIST, not DIST_SUBDIRS. +* tests/bug-2803/Makefile.am must distribute bug-2803.h. +* automake-1.15 cleanup for sntp/tests/fileHandlingTest.h.in . Harlan Stenn. +--- +(4.2.8p3-RC1) 2015/05/12 Released by Harlan Stenn + +* CID 739725: Fix a rare resource leak in libevent/listener.c. +* CID 1295478: Quiet a pedantic potential error from the fix for Bug 2776. +* CID 1296235: Fix refclock_jjy.c and correcting type of the driver40-ja.html +* CID 1269537: Clean up a line of dead code in getShmTime(). +* [Bug 2590] autogen-5.18.5. +* [Bug 2612] restrict: Warn when 'monitor' can't be disabled because + of 'limited'. +* [Bug 2650] fix includefile processing. +* [Bug 2745] ntpd -x steps clock on leap second + Fixed an initial-value problem that caused misbehaviour in absence of + any leapsecond information. + Do leap second stepping only of the step adjustment is beyond the + proper jump distance limit and step correction is allowed at all. +* [Bug 2750] build for Win64 + Building for 32bit of loopback ppsapi needs def file +* [Bug 2776] Improve ntpq's 'help keytype'. +* [Bug 2782] Refactor refclock_shm.c, add memory barrier protection. +* [Bug 2792] If the IFF_RUNNING interface flag is supported then an + interface is ignored as long as this flag is not set since the + interface is not usable (e.g., no link). +* [Bug 2794] Clean up kernel clock status reports. +* [Bug 2800] refclock_true.c true_debug() can't open debug log because + of incompatible open/fdopen parameters. +* [Bug 2804] install-local-data assumes GNU 'find' semantics. +* [Bug 2806] refclock_jjy.c supports the Telephone JJY. +* [Bug 2808] GPSD_JSON driver enhancements, step 1. + Fix crash during cleanup if GPS device not present and char device. + Increase internal token buffer to parse all JSON data, even SKY. + Defer logging of errors during driver init until the first unit is + started, so the syslog is not cluttered when the driver is not used. + Various improvements, see http://bugs.ntp.org/2808 for details. + Changed libjsmn to a more recent version. +* [Bug 2810] refclock_shm.c memory barrier code needs tweaks for QNX. +* [Bug 2813] HP-UX needs -D__STDC_VERSION__=199901L and limits.h. +* [Bug 2815] net-snmp before v5.4 has circular library dependencies. +* [Bug 2821] Add a missing NTP_PRINTF and a missing const. +* [Bug 2822] New leap column in sntp broke NTP::Util.pm. +* [Bug 2825] Quiet file installation in html/ . +* [Bug 2830] ntpd doesn't always transfer the correct TAI offset via autokey + NTPD transfers the current TAI (instead of an announcement) now. + This might still needed improvement. +* Add an assert to the ntpq ifstats code. +* Clean up the RLIMIT_STACK code. +* Improve the ntpq documentation around the controlkey keyid. +* ntpq.c cleanup. +* Windows port build cleanup. +--- (4.2.8p2) 2015/04/07 Released by Harlan Stenn (4.2.8p2-RC3) 2015/04/03 Released by Harlan Stenn * [Bug 2763] Fix for different thresholds for forward and backward steps. +* Initial import of the Unity test framework. --- (4.2.8p2-RC2) 2015/04/03 Released by Harlan Stenn @@ -62,6 +199,7 @@ * [Sec 2781] Authentication doesn't protect symmetric associations against DoS attacks. * [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE. +* [Bug 2784] Fix for 2782 uses clock_gettime() instead of get_ostime(). * [Bug 2789] Quiet compiler warnings from libevent. * [Bug 2790] If ntpd sets the Windows MM timer highest resolution pause briefly before measuring system clock precision to yield Modified: head/contrib/ntp/CommitLog ============================================================================== --- head/contrib/ntp/CommitLog Sun Jul 5 15:30:16 2015 (r285168) +++ head/contrib/ntp/CommitLog Sun Jul 5 15:42:16 2015 (r285169) @@ -1,3 +1,6748 @@ +ChangeSet@1.3491, 2015-06-29 16:34:44-04:00, stenn@deacon.udel.edu + NTP_4_2_8P3 + TAG: NTP_4_2_8P3 + + ChangeLog@1.1680 +1 -0 + NTP_4_2_8P3 + + ntpd/invoke-ntp.conf.texi@1.188 +1 -1 + NTP_4_2_8P3 + + ntpd/invoke-ntp.keys.texi@1.182 +1 -1 + NTP_4_2_8P3 + + ntpd/invoke-ntpd.texi@1.499 +2 -2 + NTP_4_2_8P3 + + ntpd/ntp.conf.5man@1.222 +3 -3 + NTP_4_2_8P3 + + ntpd/ntp.conf.5mdoc@1.222 +1 -1 + NTP_4_2_8P3 + + ntpd/ntp.conf.html@1.177 +15 -1 + NTP_4_2_8P3 + + ntpd/ntp.conf.man.in@1.222 +3 -3 + NTP_4_2_8P3 + + ntpd/ntp.conf.mdoc.in@1.222 +1 -1 + NTP_4_2_8P3 + + ntpd/ntp.keys.5man@1.216 +2 -2 + NTP_4_2_8P3 + + ntpd/ntp.keys.5mdoc@1.216 +2 -2 + NTP_4_2_8P3 + + ntpd/ntp.keys.html@1.178 +1 -1 + NTP_4_2_8P3 + + ntpd/ntp.keys.man.in@1.216 +2 -2 + NTP_4_2_8P3 + + ntpd/ntp.keys.mdoc.in@1.216 +2 -2 + NTP_4_2_8P3 + + ntpd/ntpd-opts.c@1.521 +245 -245 + NTP_4_2_8P3 + + ntpd/ntpd-opts.h@1.520 +3 -3 + NTP_4_2_8P3 + + ntpd/ntpd.1ntpdman@1.328 +3 -3 + NTP_4_2_8P3 + + ntpd/ntpd.1ntpdmdoc@1.328 +2 -2 + NTP_4_2_8P3 + + ntpd/ntpd.html@1.172 +2 -2 + NTP_4_2_8P3 + + ntpd/ntpd.man.in@1.328 +3 -3 + NTP_4_2_8P3 + + ntpd/ntpd.mdoc.in@1.328 +2 -2 + NTP_4_2_8P3 + + ntpdc/invoke-ntpdc.texi@1.496 +2 -2 + NTP_4_2_8P3 + + ntpdc/ntpdc-opts.c@1.514 +107 -107 + NTP_4_2_8P3 + + ntpdc/ntpdc-opts.h@1.513 +3 -3 + NTP_4_2_8P3 + + ntpdc/ntpdc.1ntpdcman@1.327 +3 -3 + NTP_4_2_8P3 + + ntpdc/ntpdc.1ntpdcmdoc@1.327 +2 -2 + NTP_4_2_8P3 + + ntpdc/ntpdc.html@1.340 +2 -2 + NTP_4_2_8P3 + + ntpdc/ntpdc.man.in@1.327 +3 -3 + NTP_4_2_8P3 + + ntpdc/ntpdc.mdoc.in@1.327 +2 -2 + NTP_4_2_8P3 + + ntpq/invoke-ntpq.texi@1.503 +2 -2 + NTP_4_2_8P3 + + ntpq/ntpq-opts.c@1.520 +106 -106 + NTP_4_2_8P3 + + ntpq/ntpq-opts.h@1.518 +3 -3 + NTP_4_2_8P3 + + ntpq/ntpq.1ntpqman@1.331 +3 -3 + NTP_4_2_8P3 + + ntpq/ntpq.1ntpqmdoc@1.331 +2 -2 + NTP_4_2_8P3 + + ntpq/ntpq.html@1.169 +2 -2 + NTP_4_2_8P3 + + ntpq/ntpq.man.in@1.331 +3 -3 + NTP_4_2_8P3 + + ntpq/ntpq.mdoc.in@1.331 +2 -2 + NTP_4_2_8P3 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.498 +2 -2 + NTP_4_2_8P3 + + ntpsnmpd/ntpsnmpd-opts.c@1.516 +68 -68 + NTP_4_2_8P3 + + ntpsnmpd/ntpsnmpd-opts.h@1.515 +3 -3 + NTP_4_2_8P3 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.327 +3 -3 + NTP_4_2_8P3 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.327 +2 -2 + NTP_4_2_8P3 + + ntpsnmpd/ntpsnmpd.html@1.167 +1 -1 + NTP_4_2_8P3 + + ntpsnmpd/ntpsnmpd.man.in@1.327 +3 -3 + NTP_4_2_8P3 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.327 +2 -2 + NTP_4_2_8P3 + + packageinfo.sh@1.515 +2 -2 + NTP_4_2_8P3 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.88 +3 -3 + NTP_4_2_8P3 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.89 +2 -2 + NTP_4_2_8P3 + + scripts/calc_tickadj/calc_tickadj.html@1.90 +1 -1 + NTP_4_2_8P3 + + scripts/calc_tickadj/calc_tickadj.man.in@1.87 +3 -3 + NTP_4_2_8P3 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.89 +2 -2 + NTP_4_2_8P3 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.92 +1 -1 + NTP_4_2_8P3 + + scripts/invoke-plot_summary.texi@1.109 +2 -2 + NTP_4_2_8P3 + + scripts/invoke-summary.texi@1.109 +2 -2 + NTP_4_2_8P3 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.319 +2 -2 + NTP_4_2_8P3 + + scripts/ntp-wait/ntp-wait-opts@1.55 +2 -2 + NTP_4_2_8P3 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.316 +3 -3 + NTP_4_2_8P3 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.317 +2 -2 + NTP_4_2_8P3 + + scripts/ntp-wait/ntp-wait.html@1.336 +2 -2 + NTP_4_2_8P3 + + scripts/ntp-wait/ntp-wait.man.in@1.316 +3 -3 + NTP_4_2_8P3 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.317 +2 -2 + NTP_4_2_8P3 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.107 +2 -2 + NTP_4_2_8P3 + + scripts/ntpsweep/ntpsweep-opts@1.57 +2 -2 + NTP_4_2_8P3 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.95 +3 -3 + NTP_4_2_8P3 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.95 +2 -2 + NTP_4_2_8P3 + + scripts/ntpsweep/ntpsweep.html@1.108 +2 -2 + NTP_4_2_8P3 + + scripts/ntpsweep/ntpsweep.man.in@1.95 +3 -3 + NTP_4_2_8P3 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.96 +2 -2 + NTP_4_2_8P3 + + scripts/ntptrace/invoke-ntptrace.texi@1.108 +2 -2 + NTP_4_2_8P3 + + scripts/ntptrace/ntptrace-opts@1.57 +2 -2 + NTP_4_2_8P3 + + scripts/ntptrace/ntptrace.1ntptraceman@1.95 +3 -3 + NTP_4_2_8P3 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.96 +2 -2 + NTP_4_2_8P3 + + scripts/ntptrace/ntptrace.html@1.109 +2 -2 + NTP_4_2_8P3 + + scripts/ntptrace/ntptrace.man.in@1.95 +3 -3 + NTP_4_2_8P3 + + scripts/ntptrace/ntptrace.mdoc.in@1.97 +2 -2 + NTP_4_2_8P3 + + scripts/plot_summary-opts@1.57 +2 -2 + NTP_4_2_8P3 + + scripts/plot_summary.1plot_summaryman@1.107 +3 -3 + NTP_4_2_8P3 + + scripts/plot_summary.1plot_summarymdoc@1.107 +2 -2 + NTP_4_2_8P3 + + scripts/plot_summary.html@1.110 +2 -2 + NTP_4_2_8P3 + + scripts/plot_summary.man.in@1.107 +3 -3 + NTP_4_2_8P3 + + scripts/plot_summary.mdoc.in@1.107 +2 -2 + NTP_4_2_8P3 + + scripts/summary-opts@1.57 +2 -2 + NTP_4_2_8P3 + + scripts/summary.1summaryman@1.107 +3 -3 + NTP_4_2_8P3 + + scripts/summary.1summarymdoc@1.107 +2 -2 + NTP_4_2_8P3 + + scripts/summary.html@1.110 +2 -2 + NTP_4_2_8P3 + + scripts/summary.man.in@1.107 +3 -3 + NTP_4_2_8P3 + + scripts/summary.mdoc.in@1.107 +2 -2 + NTP_4_2_8P3 + + scripts/update-leap/invoke-update-leap.texi@1.8 +1 -1 + NTP_4_2_8P3 + + scripts/update-leap/update-leap-opts@1.8 +2 -2 + NTP_4_2_8P3 + + scripts/update-leap/update-leap.1update-leapman@1.8 +3 -3 + NTP_4_2_8P3 + + scripts/update-leap/update-leap.1update-leapmdoc@1.8 +2 -2 + NTP_4_2_8P3 + + scripts/update-leap/update-leap.html@1.8 +1 -1 + NTP_4_2_8P3 + + scripts/update-leap/update-leap.man.in@1.8 +3 -3 + NTP_4_2_8P3 + + scripts/update-leap/update-leap.mdoc.in@1.8 +2 -2 + NTP_4_2_8P3 + + sntp/invoke-sntp.texi@1.496 +2 -2 + NTP_4_2_8P3 + + sntp/sntp-opts.c@1.515 +159 -159 + NTP_4_2_8P3 + + sntp/sntp-opts.h@1.513 +3 -3 + NTP_4_2_8P3 + + sntp/sntp.1sntpman@1.331 +3 -3 + NTP_4_2_8P3 + + sntp/sntp.1sntpmdoc@1.331 +2 -2 + NTP_4_2_8P3 + + sntp/sntp.html@1.511 +2 -2 + NTP_4_2_8P3 + + sntp/sntp.man.in@1.331 +3 -3 + NTP_4_2_8P3 + + sntp/sntp.mdoc.in@1.331 +2 -2 + NTP_4_2_8P3 + + util/invoke-ntp-keygen.texi@1.499 +2 -2 + NTP_4_2_8P3 + + util/ntp-keygen-opts.c@1.517 +173 -173 + NTP_4_2_8P3 + + util/ntp-keygen-opts.h@1.515 +3 -3 + NTP_4_2_8P3 + + util/ntp-keygen.1ntp-keygenman@1.327 +3 -3 + NTP_4_2_8P3 + + util/ntp-keygen.1ntp-keygenmdoc@1.327 +2 -2 + NTP_4_2_8P3 + + util/ntp-keygen.html@1.173 +2 -2 + NTP_4_2_8P3 + + util/ntp-keygen.man.in@1.327 +3 -3 + NTP_4_2_8P3 + + util/ntp-keygen.mdoc.in@1.327 +2 -2 + NTP_4_2_8P3 + +ChangeSet@1.3490, 2015-06-29 16:11:13-04:00, stenn@deacon.udel.edu + Release ntp-4.2.8p3 + + packageinfo.sh@1.514 +1 -1 + Release ntp-4.2.8p3 + +ChangeSet@1.3489, 2015-06-29 19:33:22+00:00, stenn@psp-at1.ntp.org + NEWS file update for bug 2853 + + NEWS@1.144 +18 -3 + NEWS file update for bug 2853 + +ChangeSet@1.3473.1.40, 2015-06-29 06:00:52+00:00, stenn@psp-at1.ntp.org + html/miscopt.html: Document leapsmearinterval, other cleanup. Harlan Stenn. + + ChangeLog@1.1666.1.19 +1 -0 + html/miscopt.html: Document leapsmearinterval, other cleanup. Harlan Stenn. + + html/miscopt.html@1.82 +18 -15 + html/miscopt.html: Document leapsmearinterval, other cleanup. Harlan Stenn. + +ChangeSet@1.3473.1.39, 2015-06-29 05:28:47+00:00, stenn@psp-at1.ntp.org + ntpd/ntp.conf.def: Document DSCP and leapsmearinterval. Harlan Stenn. + + ChangeLog@1.1666.1.18 +1 -0 + ntpd/ntp.conf.def: Document DSCP and leapsmearinterval. Harlan Stenn. + + ntpd/invoke-ntp.conf.texi@1.187 +17 -1 + ntpd/ntp.conf.def: Document DSCP and leapsmearinterval. Harlan Stenn. + + ntpd/ntp.conf.5man@1.221 +21 -3 + ntpd/ntp.conf.def: Document DSCP and leapsmearinterval. Harlan Stenn. + + ntpd/ntp.conf.5mdoc@1.221 +18 -2 + ntpd/ntp.conf.def: Document DSCP and leapsmearinterval. Harlan Stenn. + + ntpd/ntp.conf.def@1.17 +16 -0 + ntpd/ntp.conf.def: Document DSCP and leapsmearinterval. Harlan Stenn. + + ntpd/ntp.conf.man.in@1.221 +21 -3 + ntpd/ntp.conf.def: Document DSCP and leapsmearinterval. Harlan Stenn. + + ntpd/ntp.conf.mdoc.in@1.221 +18 -2 + ntpd/ntp.conf.def: Document DSCP and leapsmearinterval. Harlan Stenn. + +ChangeSet@1.3486, 2015-06-29 03:39:39+00:00, stenn@psp-at1.ntp.org + Updated entry for Sec 2853 + + ChangeLog@1.1677 +2 -1 + Updated entry for Sec 2853 + +ChangeSet@1.3473.3.2, 2015-06-29 04:57:16+02:00, tomek@tomek-n56vz.(none) + ChangeLog: + moved a change to the proper place + + ChangeLog@1.1666.2.2 +1 -1 + moved a change to the proper place + +ChangeSet@1.3473.3.1, 2015-06-29 04:50:55+02:00, tomek@tomek-n56vz.(none) + ChangeLog: + updated my changes + msyslog.c: + fixed a gcc warning + run-msyslog.c: + checking in the autogenerated file + + ChangeLog@1.1666.2.1 +4 -0 + updated my changes + + tests/libntp/msyslog.c@1.3 +2 -2 + fixed a gcc warning + + tests/libntp/run-msyslog.c@1.3 +1 -0 + checking in the autogenerated file + +ChangeSet@1.3473.1.37, 2015-06-29 01:16:44+00:00, stenn@psp-at1.ntp.org + [Bug 2860] ntpq ifstats sanity check is too stringent. Frank Kardel. + + ChangeLog@1.1666.1.16 +1 -0 + [Bug 2860] ntpq ifstats sanity check is too stringent. Frank Kardel. + + NEWS@1.143 +1 -0 + [Bug 2860] ntpq ifstats sanity check is too stringent. Frank Kardel. + + ntpq/ntpq-subs.c@1.109 +1 -1 + [Bug 2860] ntpq ifstats sanity check is too stringent. Frank Kardel. + +ChangeSet@1.3473.1.36, 2015-06-29 01:13:38+00:00, stenn@psp-at1.ntp.org + Update the NEWS file with info about README.leapsmear + + NEWS@1.142 +2 -1 + Update the NEWS file with info about README.leapsmear + +ChangeSet@1.3473.1.35, 2015-06-29 00:10:53+00:00, stenn@psp-at1.ntp.org + README.leapsmear edited. Harlan Stenn. + + ChangeLog@1.1666.1.15 +1 -0 + README.leapsmear edited. Harlan Stenn. + + README.leapsmear@1.2 +240 -75 + README.leapsmear edited. Harlan Stenn. + +ChangeSet@1.3473.1.34, 2015-06-28 21:20:27+00:00, stenn@psp-at1.ntp.org + README.leapsmear added. Martin Burnicki. + + ChangeLog@1.1666.1.14 +1 -0 + README.leapsmear added. Martin Burnicki. + + Makefile.am@1.132 +1 -0 + README.leapsmear added. Martin Burnicki. + + README.leapsmear@1.1 +107 -0 + BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable/README.leapsmear + + README.leapsmear@1.0 +0 -0 + +ChangeSet@1.3473.1.33, 2015-06-27 23:05:51-04:00, stenn@deacon.udel.edu + [Bug 2846] Report 'unsynchronized' status during the leap second. Fixed in Martin's changes to Bug 2855. Martin Burnicki. + + ChangeLog@1.1666.1.13 +2 -0 + [Bug 2846] Report 'unsynchronized' status during the leap second. Fixed in Martin's changes to Bug 2855. Martin Burnicki. + +ChangeSet@1.3473.1.32, 2015-06-27 21:34:55+00:00, stenn@psp-at1.ntp.org + NEWS file update + + NEWS@1.141 +12 -0 + NEWS file update + +ChangeSet@1.3473.1.31, 2015-06-27 19:25:39+00:00, stenn@psp-at1.ntp.org + [Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel. + + ChangeLog@1.1666.1.12 +4 -0 + [Bug 1060] Buffer overruns in libparse/clk_rawdcf.c. Helge Oldach. + + include/parse.h@1.13 +3 -3 + [Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel. + + libparse/clk_meinberg.c@1.15 +2 -2 + [Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel. + + libparse/clk_rawdcf.c@1.22 +100 -12 + [Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel. + + libparse/clk_schmid.c@1.14 +2 -2 + [Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel. + + ntpd/refclock_parse.c@1.80 +4 -4 + [Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel. + + parseutil/dcfd.c@1.29 +1 -1 + [Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel. + + parseutil/testdcf.c@1.11 +1 -1 + [Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel. + +ChangeSet@1.3473.1.30, 2015-06-27 05:21:56-04:00, stenn@deacon.udel.edu + NTP_4_2_8P3_RC3 + TAG: NTP_4_2_8P3_RC3 + + ChangeLog@1.1666.1.11 +1 -0 + NTP_4_2_8P3_RC3 + + ntpd/invoke-ntp.conf.texi@1.186 +1 -1 + NTP_4_2_8P3_RC3 + + ntpd/invoke-ntp.keys.texi@1.181 +1 -1 + NTP_4_2_8P3_RC3 + + ntpd/invoke-ntpd.texi@1.498 +2 -2 + NTP_4_2_8P3_RC3 + + ntpd/ntp.conf.5man@1.220 +3 -3 + NTP_4_2_8P3_RC3 + + ntpd/ntp.conf.5mdoc@1.220 +2 -2 + NTP_4_2_8P3_RC3 + + ntpd/ntp.conf.html@1.176 +1 -1 + NTP_4_2_8P3_RC3 + + ntpd/ntp.conf.man.in@1.220 +3 -3 + NTP_4_2_8P3_RC3 + + ntpd/ntp.conf.mdoc.in@1.220 +2 -2 + NTP_4_2_8P3_RC3 + + ntpd/ntp.keys.5man@1.215 +2 -2 + NTP_4_2_8P3_RC3 + + ntpd/ntp.keys.5mdoc@1.215 +2 -2 + NTP_4_2_8P3_RC3 + + ntpd/ntp.keys.html@1.177 +1 -1 + NTP_4_2_8P3_RC3 + + ntpd/ntp.keys.man.in@1.215 +2 -2 + NTP_4_2_8P3_RC3 + + ntpd/ntp.keys.mdoc.in@1.215 +2 -2 + NTP_4_2_8P3_RC3 + + ntpd/ntpd-opts.c@1.520 +7 -7 + NTP_4_2_8P3_RC3 + + ntpd/ntpd-opts.h@1.519 +3 -3 + NTP_4_2_8P3_RC3 + + ntpd/ntpd.1ntpdman@1.327 +3 -3 + NTP_4_2_8P3_RC3 + + ntpd/ntpd.1ntpdmdoc@1.327 +2 -2 + NTP_4_2_8P3_RC3 + + ntpd/ntpd.html@1.171 +2 -2 + NTP_4_2_8P3_RC3 + + ntpd/ntpd.man.in@1.327 +3 -3 + NTP_4_2_8P3_RC3 + + ntpd/ntpd.mdoc.in@1.327 +2 -2 + NTP_4_2_8P3_RC3 + + ntpdc/invoke-ntpdc.texi@1.495 +2 -2 + NTP_4_2_8P3_RC3 + + ntpdc/ntpdc-opts.c@1.513 +7 -7 + NTP_4_2_8P3_RC3 + + ntpdc/ntpdc-opts.h@1.512 +3 -3 + NTP_4_2_8P3_RC3 + + ntpdc/ntpdc.1ntpdcman@1.326 +3 -3 + NTP_4_2_8P3_RC3 + + ntpdc/ntpdc.1ntpdcmdoc@1.326 +2 -2 + NTP_4_2_8P3_RC3 + + ntpdc/ntpdc.html@1.339 +2 -2 + NTP_4_2_8P3_RC3 + + ntpdc/ntpdc.man.in@1.326 +3 -3 + NTP_4_2_8P3_RC3 + + ntpdc/ntpdc.mdoc.in@1.326 +2 -2 + NTP_4_2_8P3_RC3 + + ntpq/invoke-ntpq.texi@1.502 +2 -2 + NTP_4_2_8P3_RC3 + + ntpq/ntpq-opts.c@1.519 +7 -7 + NTP_4_2_8P3_RC3 + + ntpq/ntpq-opts.h@1.517 +3 -3 + NTP_4_2_8P3_RC3 + + ntpq/ntpq.1ntpqman@1.330 +3 -3 + NTP_4_2_8P3_RC3 + + ntpq/ntpq.1ntpqmdoc@1.330 +2 -2 + NTP_4_2_8P3_RC3 + + ntpq/ntpq.html@1.168 +2 -2 + NTP_4_2_8P3_RC3 + + ntpq/ntpq.man.in@1.330 +3 -3 + NTP_4_2_8P3_RC3 + + ntpq/ntpq.mdoc.in@1.330 +2 -2 + NTP_4_2_8P3_RC3 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.497 +2 -2 + NTP_4_2_8P3_RC3 + + ntpsnmpd/ntpsnmpd-opts.c@1.515 +7 -7 + NTP_4_2_8P3_RC3 + + ntpsnmpd/ntpsnmpd-opts.h@1.514 +3 -3 + NTP_4_2_8P3_RC3 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.326 +3 -3 + NTP_4_2_8P3_RC3 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.326 +2 -2 + NTP_4_2_8P3_RC3 + + ntpsnmpd/ntpsnmpd.html@1.166 +1 -1 + NTP_4_2_8P3_RC3 + + ntpsnmpd/ntpsnmpd.man.in@1.326 +3 -3 + NTP_4_2_8P3_RC3 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.326 +2 -2 + NTP_4_2_8P3_RC3 + + packageinfo.sh@1.513 +1 -1 + NTP_4_2_8P3_RC3 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.87 +3 -3 + NTP_4_2_8P3_RC3 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.88 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/calc_tickadj/calc_tickadj.html@1.89 +1 -1 + NTP_4_2_8P3_RC3 + + scripts/calc_tickadj/calc_tickadj.man.in@1.86 +3 -3 + NTP_4_2_8P3_RC3 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.88 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.91 +1 -1 + NTP_4_2_8P3_RC3 + + scripts/invoke-plot_summary.texi@1.108 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/invoke-summary.texi@1.108 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.318 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/ntp-wait/ntp-wait-opts@1.54 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.315 +3 -3 + NTP_4_2_8P3_RC3 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.316 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/ntp-wait/ntp-wait.html@1.335 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/ntp-wait/ntp-wait.man.in@1.315 +3 -3 + NTP_4_2_8P3_RC3 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.316 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.106 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/ntpsweep/ntpsweep-opts@1.56 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.94 +3 -3 + NTP_4_2_8P3_RC3 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.94 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/ntpsweep/ntpsweep.html@1.107 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/ntpsweep/ntpsweep.man.in@1.94 +3 -3 + NTP_4_2_8P3_RC3 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.95 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/ntptrace/invoke-ntptrace.texi@1.107 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/ntptrace/ntptrace-opts@1.56 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/ntptrace/ntptrace.1ntptraceman@1.94 +3 -3 + NTP_4_2_8P3_RC3 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.95 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/ntptrace/ntptrace.html@1.108 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/ntptrace/ntptrace.man.in@1.94 +3 -3 + NTP_4_2_8P3_RC3 + + scripts/ntptrace/ntptrace.mdoc.in@1.96 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/plot_summary-opts@1.56 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/plot_summary.1plot_summaryman@1.106 +3 -3 + NTP_4_2_8P3_RC3 + + scripts/plot_summary.1plot_summarymdoc@1.106 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/plot_summary.html@1.109 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/plot_summary.man.in@1.106 +3 -3 + NTP_4_2_8P3_RC3 + + scripts/plot_summary.mdoc.in@1.106 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/summary-opts@1.56 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/summary.1summaryman@1.106 +3 -3 + NTP_4_2_8P3_RC3 + + scripts/summary.1summarymdoc@1.106 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/summary.html@1.109 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/summary.man.in@1.106 +3 -3 + NTP_4_2_8P3_RC3 + + scripts/summary.mdoc.in@1.106 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/update-leap/invoke-update-leap.texi@1.7 +1 -1 + NTP_4_2_8P3_RC3 + + scripts/update-leap/update-leap-opts@1.7 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/update-leap/update-leap.1update-leapman@1.7 +3 -3 + NTP_4_2_8P3_RC3 + + scripts/update-leap/update-leap.1update-leapmdoc@1.7 +2 -2 + NTP_4_2_8P3_RC3 + + scripts/update-leap/update-leap.html@1.7 +51 -2 + NTP_4_2_8P3_RC3 + + scripts/update-leap/update-leap.man.in@1.7 +3 -3 + NTP_4_2_8P3_RC3 + + scripts/update-leap/update-leap.mdoc.in@1.7 +2 -2 + NTP_4_2_8P3_RC3 + + sntp/invoke-sntp.texi@1.495 +2 -2 + NTP_4_2_8P3_RC3 + + sntp/sntp-opts.c@1.514 +7 -7 + NTP_4_2_8P3_RC3 + + sntp/sntp-opts.h@1.512 +3 -3 + NTP_4_2_8P3_RC3 + + sntp/sntp.1sntpman@1.330 +3 -3 + NTP_4_2_8P3_RC3 + + sntp/sntp.1sntpmdoc@1.330 +2 -2 + NTP_4_2_8P3_RC3 + + sntp/sntp.html@1.510 +2 -2 + NTP_4_2_8P3_RC3 + + sntp/sntp.man.in@1.330 +3 -3 + NTP_4_2_8P3_RC3 + + sntp/sntp.mdoc.in@1.330 +2 -2 + NTP_4_2_8P3_RC3 + + util/invoke-ntp-keygen.texi@1.498 +2 -2 + NTP_4_2_8P3_RC3 + + util/ntp-keygen-opts.c@1.516 +7 -7 + NTP_4_2_8P3_RC3 + + util/ntp-keygen-opts.h@1.514 +3 -3 + NTP_4_2_8P3_RC3 + + util/ntp-keygen.1ntp-keygenman@1.326 +3 -3 + NTP_4_2_8P3_RC3 + + util/ntp-keygen.1ntp-keygenmdoc@1.326 +2 -2 + NTP_4_2_8P3_RC3 + + util/ntp-keygen.html@1.172 +2 -2 + NTP_4_2_8P3_RC3 + + util/ntp-keygen.man.in@1.326 +3 -3 + NTP_4_2_8P3_RC3 + + util/ntp-keygen.mdoc.in@1.326 +2 -2 + NTP_4_2_8P3_RC3 + +ChangeSet@1.3473.1.29, 2015-06-27 04:45:02-04:00, stenn@deacon.udel.edu + Update the NEWS file for 4.2.8p3-RC3 + + NEWS@1.140 +26 -0 + Update the NEWS file for 4.2.8p3-RC3 + +ChangeSet@1.3473.1.28, 2015-06-27 04:20:07-04:00, stenn@deacon.udel.edu + html/drivers/driver22.html: typo fix. Harlan Stenn. + + ChangeLog@1.1666.1.10 +1 -0 + html/drivers/driver22.html: typo fix. Harlan Stenn. + + html/drivers/driver22.html@1.23 +1 -1 + html/drivers/driver22.html: typo fix. Harlan Stenn. + +ChangeSet@1.3473.1.27, 2015-06-27 02:22:09-04:00, stenn@deacon.udel.edu + [Bug 2857] Stratus VOS does not support SIGIO. Paul Green. + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Jul 5 16:18:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D42BEAA40; Sun, 5 Jul 2015 16:18:14 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9FB3E1464; Sun, 5 Jul 2015 16:18:14 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by ieqy10 with SMTP id y10so100667362ieq.0; Sun, 05 Jul 2015 09:18:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=BdQrUop6JcfkR2bELZ8IXY8pVME+SZmubOMxvE05vBY=; b=I0UJS+g59Nhn4BtTuw7xzL/76IX/f65FtbCWgyTm0lBe4k4iHqJVpydbVJB3ZBxfHq Sx+GkT8WgcTK3bMpLQnqLEwbSCQ8iF0V6A+GoEc7ir7bY4Tbb2OO6PjohqIDi42TENho LsFfyaLEFf3Ms1oH3bGgMvXRTKnXGtWQ41bqzZM+fZ7/5WKODRjIeTU6y/baCwSxmJVT FM5vJcezstFCg3E+3V9caKE+BL5bmRhIXc4/NuVaoYKBfOJRuc7Op60k2+D0WuQowNDs 2WoYtmo5KoY1+31k9D7ZL0yDtaIntioaJmVwPcHhsbBBO/OQkOB/aRx+jbYnZ8jbcjGN BLTQ== MIME-Version: 1.0 X-Received: by 10.42.170.74 with SMTP id e10mr28210108icz.71.1436113093773; Sun, 05 Jul 2015 09:18:13 -0700 (PDT) Sender: chmeeedalf@gmail.com Received: by 10.36.69.80 with HTTP; Sun, 5 Jul 2015 09:18:13 -0700 (PDT) Received: by 10.36.69.80 with HTTP; Sun, 5 Jul 2015 09:18:13 -0700 (PDT) In-Reply-To: <201507051530.t65FUGQn085794@repo.freebsd.org> References: <201507051530.t65FUGQn085794@repo.freebsd.org> Date: Sun, 5 Jul 2015 09:18:13 -0700 X-Google-Sender-Auth: ETQxkQZ8Bp4yh5nS4LBOOMcK0lE Message-ID: Subject: Re: svn commit: r285168 - head/sys/powerpc/powerpc From: Justin Hibbits To: "Bjoern A. Zeeb" Cc: src-committers , svn-src-head@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 16:18:14 -0000 On Jul 5, 2015 08:30, "Bjoern A. Zeeb" wrote: > > Author: bz > Date: Sun Jul 5 15:30:16 2015 > New Revision: 285168 > URL: https://svnweb.freebsd.org/changeset/base/285168 > > Log: > Fix GENERIC64 and LINT64 powerpc builds after r285144. > > Modified: > head/sys/powerpc/powerpc/trap.c > > Modified: head/sys/powerpc/powerpc/trap.c > ============================================================================== > --- head/sys/powerpc/powerpc/trap.c Sun Jul 5 14:24:35 2015 (r285167) > +++ head/sys/powerpc/powerpc/trap.c Sun Jul 5 15:30:16 2015 (r285168) > @@ -426,10 +426,10 @@ printtrap(u_int vector, struct trapframe > ver = mfpvr() >> 16; > #if defined(AIM) > if (MPC745X_P(ver)) > - printf(" msssr0 = 0x%x\n", > + printf(" msssr0 = 0x%" PRIxPTR "\n", > mfspr(SPR_MSSSR0)); > #elif defined(BOOKE) > - printf(" mcsr = 0x%x\n", > + printf(" mcsr = 0x%" PRIxPTR "\n", > mfspr(SPR_MCSR)); > #endif > break; > Sigh, thanks. Since those are 32 bit registers I only tested my 32 bit compiles. - Justin From owner-svn-src-all@freebsd.org Sun Jul 5 16:19:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B744AA8A for ; Sun, 5 Jul 2015 16:19:31 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) by mx1.freebsd.org (Postfix) with SMTP id 2ADE21600 for ; Sun, 5 Jul 2015 16:19:30 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sun, 5 Jul 2015 16:20:05 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t65GJS01030474; Sun, 5 Jul 2015 10:19:28 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1436113168.1191.1.camel@freebsd.org> Subject: Re: svn commit: r285169 - in head: contrib/ntp contrib/ntp/adjtimed contrib/ntp/clockstuff contrib/ntp/html contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/include/isc contrib/ntp/kernel contr... From: Ian Lepore To: Cy Schubert Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 05 Jul 2015 10:19:28 -0600 In-Reply-To: <201507051542.t65FgH7Z095293@repo.freebsd.org> References: <201507051542.t65FgH7Z095293@repo.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 16:19:31 -0000 On Sun, 2015-07-05 at 15:42 +0000, Cy Schubert wrote: > Author: cy > Date: Sun Jul 5 15:42:16 2015 > New Revision: 285169 > URL: https://svnweb.freebsd.org/changeset/base/285169 > > Log: > MFV ntp-4.2.8p3 (r284990). > > Approved by: roberto, delphij > Security: VuXML: 0d0f3050-1f69-11e5-9ba9-d050996490d0 > Security: http://bugs.ntp.org/show_bug.cgi?id=2853 > Security: https://www.kb.cert.org/vuls/id/668167 > Security: http://support.ntp.org/bin/view/Main/SecurityNotice#June_2015_NTP_Security_Vulnerabi While the checkin says 8.2.8p3, the new version identifies itself as: Jan 1 00:00:24 wand ntpd[590]: ntpd 4.2.8@1.3265-o Mon May 25 22:33:20 UTC 2015 (1): Starting compared to the prior import... Jun 8 03:27:15 dpnand ntpd[61397]: ntpd 4.2.8p2-a (1): Starting Is that expected? -- Ian From owner-svn-src-all@freebsd.org Sun Jul 5 16:48:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C25E990D3; Sun, 5 Jul 2015 16:48:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 B2DE61475; Sun, 5 Jul 2015 16:48:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65GmfKG031286; Sun, 5 Jul 2015 16:48:41 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65Gmfew031285; Sun, 5 Jul 2015 16:48:41 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201507051648.t65Gmfew031285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 5 Jul 2015 16:48:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285170 - head/usr.sbin/ntp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 16:48:41 -0000 Author: cy Date: Sun Jul 5 16:48:40 2015 New Revision: 285170 URL: https://svnweb.freebsd.org/changeset/base/285170 Log: Update ntp version number. (This is a manual update that was missed.) Modified: head/usr.sbin/ntp/config.h Modified: head/usr.sbin/ntp/config.h ============================================================================== --- head/usr.sbin/ntp/config.h Sun Jul 5 15:42:16 2015 (r285169) +++ head/usr.sbin/ntp/config.h Sun Jul 5 16:48:40 2015 (r285170) @@ -1418,7 +1418,7 @@ #define PACKAGE_NAME "ntp" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "ntp 4.2.8p2" +#define PACKAGE_STRING "ntp 4.2.8p3" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "ntp" @@ -1427,7 +1427,7 @@ #define PACKAGE_URL "http://www.ntp.org./" /* Define to the version of this package. */ -#define PACKAGE_VERSION "4.2.8p2" +#define PACKAGE_VERSION "4.2.8p3" /* data dir */ #define PERLLIBDIR "/usr/local/share/ntp/lib" @@ -1608,7 +1608,7 @@ typedef unsigned int uintptr_t; /* #undef USE_UDP_SIGPOLL */ /* Version number of package */ -#define VERSION "4.2.8p2" +#define VERSION "4.2.8p3" /* vsnprintf expands "%m" to strerror(errno) */ /* #undef VSNPRINTF_PERCENT_M */ From owner-svn-src-all@freebsd.org Sun Jul 5 16:54:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E3D7924E; Sun, 5 Jul 2015 16:54:46 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) by mx1.freebsd.org (Postfix) with ESMTP id 14E8F1A4A; Sun, 5 Jul 2015 16:54:45 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from slippy.cwsent.com ([96.50.22.10]) by shaw.ca with SMTP id BnBcZHD1D8qsJBnBdZnd3F; Sun, 05 Jul 2015 10:54:38 -0600 X-Authority-Analysis: v=2.1 cv=U8JYd7fu c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=VxmjJ2MpAAAA:8 a=BWvPGDcYAAAA:8 a=ICAaq7hcmGcA:10 a=kj9zAlcOel0A:10 a=zOBTXjUuO1YA:10 a=6I5d2MoRAAAA:8 a=85N1-lAfAAAA:8 a=TWq6ZYQzAAAA:8 a=YxBL1-UpAAAA:8 a=b4A47e4UaE3y5238LKkA:9 a=CjuIK1q_8ugA:10 Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.14.9/8.14.9) with ESMTP id t65GsZqd012473; Sun, 5 Jul 2015 09:54:35 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201507051654.t65GsZqd012473@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Ian Lepore cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285169 - in head: contrib/ntp contrib/ntp/adjtimed contrib/ntp/clockstuff contrib/ntp/html contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/include/isc contrib/ntp/kernel contr... In-Reply-To: Message from Ian Lepore of "Sun, 05 Jul 2015 10:19:28 -0600." <1436113168.1191.1.camel@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 05 Jul 2015 09:54:35 -0700 X-CMAE-Envelope: MS4wfLr1AvDHE3Z0o3N3+FFra4vQxKxb6SrBMDDLCYd9fBRRd/j0ri4AKKJU2MxxMnOSrwRSNwx7WWlDmFVTJTsG4dyIDxwgHaRD4itA6OQil9hrI/1dJgfsB2t1TffiATnrzoQZRAnfxe6inw6wNvFgixsfObB3AXzqqKAEXe3zCkyGjYuNX5b+AdDsOtYkPrDfth7AJ5gsN9IS67q+zV/ONYE6s6GRDEQhG9EAI6o0sTsLlOCjjG+htjGblvr9vVDsKHUFk3QfTJ9+AyJqy8Qh1RsHCmdxy3HgZc0T2Pg9rKjLHu0FMpcSA5Nhw23UdNb9vA== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 16:54:46 -0000 In message <1436113168.1191.1.camel@freebsd.org>, Ian Lepore writes: > On Sun, 2015-07-05 at 15:42 +0000, Cy Schubert wrote: > > Author: cy > > Date: Sun Jul 5 15:42:16 2015 > > New Revision: 285169 > > URL: https://svnweb.freebsd.org/changeset/base/285169 > > > > Log: > > MFV ntp-4.2.8p3 (r284990). > > > > Approved by: roberto, delphij > > Security: VuXML: 0d0f3050-1f69-11e5-9ba9-d050996490d0 > > Security: http://bugs.ntp.org/show_bug.cgi?id=2853 > > Security: https://www.kb.cert.org/vuls/id/668167 > > Security: http://support.ntp.org/bin/view/Main/SecurityNotice#June_2015_N > TP_Security_Vulnerabi > > While the checkin says 8.2.8p3, the new version identifies itself as: > > Jan 1 00:00:24 wand ntpd[590]: ntpd 4.2.8@1.3265-o Mon May 25 22:33:20 > UTC 2015 (1): Starting > > compared to the prior import... > > Jun 8 03:27:15 dpnand ntpd[61397]: ntpd 4.2.8p2-a (1): Starting > > Is that expected? My bad. That's a manual update that was missed. It's in usr.sbin/ntp/config.h. Version has just been updated. -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sun Jul 5 18:16:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0A77A11E; Sun, 5 Jul 2015 18:16:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 BB0E21C94; Sun, 5 Jul 2015 18:16:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65IG7ju078393; Sun, 5 Jul 2015 18:16:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65IG73W078392; Sun, 5 Jul 2015 18:16:07 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507051816.t65IG73W078392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 5 Jul 2015 18:16:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285171 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 18:16:07 -0000 Author: andrew Date: Sun Jul 5 18:16:06 2015 New Revision: 285171 URL: https://svnweb.freebsd.org/changeset/base/285171 Log: Add the kernel functions needed to enable threading. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/vm_machdep.c Modified: head/sys/arm64/arm64/vm_machdep.c ============================================================================== --- head/sys/arm64/arm64/vm_machdep.c Sun Jul 5 16:48:40 2015 (r285170) +++ head/sys/arm64/arm64/vm_machdep.c Sun Jul 5 18:16:06 2015 (r285171) @@ -184,15 +184,25 @@ void cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { + struct trapframe *tf = td->td_frame; - panic("cpu_set_upcall_kse"); + tf->tf_sp = STACKALIGN(stack->ss_sp + stack->ss_size); + tf->tf_elr = (register_t)entry; + tf->tf_x[0] = (register_t)arg; } int cpu_set_user_tls(struct thread *td, void *tls_base) { + struct pcb *pcb; - panic("cpu_set_user_tls"); + if ((uintptr_t)tls_base >= VM_MAXUSER_ADDRESS) + return (EINVAL); + + pcb = td->td_pcb; + pcb->pcb_tpidr_el0 = (register_t)tls_base; + + return (0); } void From owner-svn-src-all@freebsd.org Sun Jul 5 19:05:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB5E1A9A0; Sun, 5 Jul 2015 19:05:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 B783D1172; Sun, 5 Jul 2015 19:05:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65J5JCO003231; Sun, 5 Jul 2015 19:05:19 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65J5Hre003220; Sun, 5 Jul 2015 19:05:17 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201507051905.t65J5Hre003220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Jul 2015 19:05:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285172 - in head/sys: cddl/compat/opensolaris/sys compat/linux fs/fdescfs kern security/audit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 19:05:20 -0000 Author: mjg Date: Sun Jul 5 19:05:16 2015 New Revision: 285172 URL: https://svnweb.freebsd.org/changeset/base/285172 Log: fd: make 'rights' a manadatory argument to fget* functions Modified: head/sys/cddl/compat/opensolaris/sys/file.h head/sys/compat/linux/linux_stats.c head/sys/fs/fdescfs/fdesc_vnops.c head/sys/kern/kern_descrip.c head/sys/kern/vfs_aio.c head/sys/security/audit/audit_bsm_klib.c Modified: head/sys/cddl/compat/opensolaris/sys/file.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/file.h Sun Jul 5 18:16:06 2015 (r285171) +++ head/sys/cddl/compat/opensolaris/sys/file.h Sun Jul 5 19:05:16 2015 (r285172) @@ -52,9 +52,10 @@ static __inline void releasef(int fd) { struct file *fp; + cap_rights_t rights; /* No CAP_ rights required, as we're only releasing. */ - if (fget(curthread, fd, NULL, &fp) == 0) { + if (fget(curthread, fd, cap_rights_init(&rights), &fp) == 0) { fdrop(fp, curthread); fdrop(fp, curthread); } Modified: head/sys/compat/linux/linux_stats.c ============================================================================== --- head/sys/compat/linux/linux_stats.c Sun Jul 5 18:16:06 2015 (r285171) +++ head/sys/compat/linux/linux_stats.c Sun Jul 5 19:05:16 2015 (r285172) @@ -139,13 +139,14 @@ translate_fd_major_minor(struct thread * { struct file *fp; struct vnode *vp; + cap_rights_t rights; int major, minor; /* * No capability rights required here. */ if ((!S_ISCHR(buf->st_mode) && !S_ISBLK(buf->st_mode)) || - fget(td, fd, 0, &fp) != 0) + fget(td, fd, cap_rights_init(&rights), &fp) != 0) return; vp = fp->f_vnode; if (vp != NULL && vp->v_rdev != NULL && Modified: head/sys/fs/fdescfs/fdesc_vnops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vnops.c Sun Jul 5 18:16:06 2015 (r285171) +++ head/sys/fs/fdescfs/fdesc_vnops.c Sun Jul 5 19:05:16 2015 (r285172) @@ -288,6 +288,7 @@ fdesc_lookup(ap) struct thread *td = cnp->cn_thread; struct file *fp; struct fdesc_get_ino_args arg; + cap_rights_t rights; int nlen = cnp->cn_namelen; u_int fd, fd1; int error; @@ -332,7 +333,7 @@ fdesc_lookup(ap) /* * No rights to check since 'fp' isn't actually used. */ - if ((error = fget(td, fd, NULL, &fp)) != 0) + if ((error = fget(td, fd, cap_rights_init(&rights), &fp)) != 0) goto bad; /* Check if we're looking up ourselves. */ Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Jul 5 18:16:06 2015 (r285171) +++ head/sys/kern/kern_descrip.c Sun Jul 5 19:05:16 2015 (r285172) @@ -2423,13 +2423,10 @@ _fget(struct thread *td, int fd, struct { struct filedesc *fdp; struct file *fp; - cap_rights_t needrights; int error; *fpp = NULL; fdp = td->td_proc->p_fd; - if (needrightsp == NULL) - needrightsp = cap_rights_init(&needrights); error = fget_unlocked(fdp, fd, needrightsp, &fp, seqp); if (error != 0) return (error); Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Sun Jul 5 18:16:06 2015 (r285171) +++ head/sys/kern/vfs_aio.c Sun Jul 5 19:05:16 2015 (r285172) @@ -2058,6 +2058,7 @@ sys_aio_cancel(struct thread *td, struct struct aiocblist *cbe, *cbn; struct file *fp; struct socket *so; + cap_rights_t rights; int error; int remove; int cancelled = 0; @@ -2065,7 +2066,7 @@ sys_aio_cancel(struct thread *td, struct struct vnode *vp; /* Lookup file object. */ - error = fget(td, uap->fd, NULL, &fp); + error = fget(td, uap->fd, cap_rights_init(&rights), &fp); if (error) return (error); Modified: head/sys/security/audit/audit_bsm_klib.c ============================================================================== --- head/sys/security/audit/audit_bsm_klib.c Sun Jul 5 18:16:06 2015 (r285171) +++ head/sys/security/audit/audit_bsm_klib.c Sun Jul 5 19:05:16 2015 (r285172) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -467,6 +468,7 @@ audit_canon_path(struct thread *td, int char *rbuf, *fbuf, *copy; struct filedesc *fdp; struct sbuf sbf; + cap_rights_t rights; int error, needslash; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "%s: at %s:%d", @@ -495,7 +497,7 @@ audit_canon_path(struct thread *td, int vhold(cvnp); } else { /* XXX: fgetvp() that vhold()s vnode instead of vref()ing it would be better */ - error = fgetvp(td, dirfd, NULL, &cvnp); + error = fgetvp(td, dirfd, cap_rights_init(&rights), &cvnp); if (error) { FILEDESC_SUNLOCK(fdp); cpath[0] = '\0'; From owner-svn-src-all@freebsd.org Sun Jul 5 19:29:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE1BFAD00; Sun, 5 Jul 2015 19:29:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 CD08D1C71; Sun, 5 Jul 2015 19:29:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65JTO4n013459; Sun, 5 Jul 2015 19:29:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65JTOj1013458; Sun, 5 Jul 2015 19:29:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201507051929.t65JTOj1013458@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 5 Jul 2015 19:29:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285173 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 19:29:25 -0000 Author: kib Date: Sun Jul 5 19:29:24 2015 New Revision: 285173 URL: https://svnweb.freebsd.org/changeset/base/285173 Log: Document the locking context for the directly dispatched callouts. Cross-reference timeout(9). Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/share/man/man9/locking.9 Modified: head/share/man/man9/locking.9 ============================================================================== --- head/share/man/man9/locking.9 Sun Jul 5 19:05:16 2015 (r285172) +++ head/share/man/man9/locking.9 Sun Jul 5 19:29:24 2015 (r285173) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 30, 2013 +.Dd July 5, 2015 .Dt LOCKING 9 .Os .Sh NAME @@ -387,6 +387,7 @@ At this time this is a rather easy to re .It interrupt filter: Ta \&ok Ta \&no Ta \&no Ta \&no Ta \&no Ta \&no .It interrupt thread: Ta \&ok Ta \&ok Ta \&ok Ta \&no Ta \&no Ta \&no .It callout: Ta \&ok Ta \&ok Ta \&ok Ta \&no Ta \&no Ta \&no +.It direct callout: Ta \&ok Ta \&no Ta \&no Ta \&no Ta \&no Ta \&no .It system call: Ta \&ok Ta \&ok Ta \&ok Ta \&ok Ta \&ok Ta \&ok .El .Sh SEE ALSO @@ -401,7 +402,8 @@ At this time this is a rather easy to re .Xr rwlock 9 , .Xr sema 9 , .Xr sleep 9 , -.Xr sx 9 +.Xr sx 9 , +.Xr timeout 9 .Sh HISTORY These functions appeared in From owner-svn-src-all@freebsd.org Sun Jul 5 19:32:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D15FAEAD; Sun, 5 Jul 2015 19:32:11 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 8C2DC101F; Sun, 5 Jul 2015 19:32:11 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65JWB0U017475; Sun, 5 Jul 2015 19:32:11 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65JWBsG017473; Sun, 5 Jul 2015 19:32:11 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201507051932.t65JWBsG017473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 5 Jul 2015 19:32:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285174 - stable/10/sys/x86/x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 19:32:11 -0000 Author: marius Date: Sun Jul 5 19:32:10 2015 New Revision: 285174 URL: https://svnweb.freebsd.org/changeset/base/285174 Log: MFC: r281751 Refine the workaround for Intel HSD131 [1] added in r269052 (MFCed to stable/10 in r269592): - Use the full mask described by the erratum as with a sufficiently high number of these false-positives, the overflow bit (bit 62) additionally gets set [7]. - HSD131 has been brought into several other Haswell-derived CPUs including to the next generation, i. e. Intel Broadwell. Thus, also skip reporting of these benign errors by default on CPU models affected by HSM142, HSW131 and BDM48 [2 - 5], describing the HSD131 silicon bug for additional models. Also, Celeron 2955U with a CPU ID of 0x45 have been reported to be covered by this fault [6], with the specification update concerned with HSM142 [2] only referring to 0x3c and 0x46. Submitted by: David Froehlich [7] Approved by: re (kib) http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf [1] http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-mobile-specification-update.pdf [2] http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/5th-gen-core-family-spec-update.pdf [3] http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/core-m-processor-family-spec-update.pdf [4] http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-e3-1200v3-spec-update.pdf [5] https://lists.freebsd.org/pipermail/freebsd-hackers/2015-January/046878.html [6] Modified: stable/10/sys/x86/x86/mca.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/x86/mca.c ============================================================================== --- stable/10/sys/x86/x86/mca.c Sun Jul 5 19:29:24 2015 (r285173) +++ stable/10/sys/x86/x86/mca.c Sun Jul 5 19:32:10 2015 (r285174) @@ -254,15 +254,24 @@ mca_mute(const struct mca_record *rec) { /* - * Skip spurious corrected parity errors generated by desktop Haswell - * (see HSD131 erratum) unless reporting is enabled. - * Note that these errors also have been observed with D0-stepping, - * while the revision 014 desktop Haswell specification update only - * talks about C0-stepping. + * Skip spurious corrected parity errors generated by Intel Haswell- + * and Broadwell-based CPUs (see HSD131, HSM142, HSW131 and BDM48 + * erratum respectively), unless reporting is enabled. + * Note that these errors also have been observed with the D0-stepping + * of Haswell, while at least initially the CPU specification updates + * suggested only the C0-stepping to be affected. Similarly, Celeron + * 2955U with a CPU ID of 0x45 apparently are also concerned with the + * same problem, with HSM142 only referring to 0x3c and 0x46. */ - if (rec->mr_cpu_vendor_id == CPU_VENDOR_INTEL && - rec->mr_cpu_id == 0x306c3 && rec->mr_bank == 0 && - rec->mr_status == 0x90000040000f0005 && !intel6h_HSD131) + if (cpu_vendor_id == CPU_VENDOR_INTEL && + CPUID_TO_FAMILY(cpu_id) == 0x6 && + (CPUID_TO_MODEL(cpu_id) == 0x3c || /* HSD131, HSM142, HSW131 */ + CPUID_TO_MODEL(cpu_id) == 0x3d || /* BDM48 */ + CPUID_TO_MODEL(cpu_id) == 0x45 || + CPUID_TO_MODEL(cpu_id) == 0x46) && /* HSM142 */ + rec->mr_bank == 0 && + (rec->mr_status & 0xa0000000ffffffff) == 0x80000000000f0005 && + !intel6h_HSD131) return (1); return (0); From owner-svn-src-all@freebsd.org Sun Jul 5 19:33:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62761AF17; Sun, 5 Jul 2015 19:33:31 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 518C21167; Sun, 5 Jul 2015 19:33:31 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65JXVnb017703; Sun, 5 Jul 2015 19:33:31 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65JXVts017702; Sun, 5 Jul 2015 19:33:31 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201507051933.t65JXVts017702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 5 Jul 2015 19:33:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285175 - stable/9/sys/x86/x86 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 19:33:31 -0000 Author: marius Date: Sun Jul 5 19:33:30 2015 New Revision: 285175 URL: https://svnweb.freebsd.org/changeset/base/285175 Log: MFC: r281751 Refine the workaround for Intel HSD131 [1] added in r269052 (MFCed to stable/9 in r269593): - Use the full mask described by the erratum as with a sufficiently high number of these false-positives, the overflow bit (bit 62) additionally gets set [7]. - HSD131 has been brought into several other Haswell-derived CPUs including to the next generation, i. e. Intel Broadwell. Thus, also skip reporting of these benign errors by default on CPU models affected by HSM142, HSW131 and BDM48 [2 - 5], describing the HSD131 silicon bug for additional models. Also, Celeron 2955U with a CPU ID of 0x45 have been reported to be covered by this fault [6], with the specification update concerned with HSM142 [2] only referring to 0x3c and 0x46. Submitted by: David Froehlich [7] Approved by: re (kib) http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf [1] http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-mobile-specification-update.pdf [2] http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/5th-gen-core-family-spec-update.pdf [3] http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/core-m-processor-family-spec-update.pdf [4] http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-e3-1200v3-spec-update.pdf [5] https://lists.freebsd.org/pipermail/freebsd-hackers/2015-January/046878.html [6] Modified: stable/9/sys/x86/x86/mca.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/x86/x86/mca.c ============================================================================== --- stable/9/sys/x86/x86/mca.c Sun Jul 5 19:32:10 2015 (r285174) +++ stable/9/sys/x86/x86/mca.c Sun Jul 5 19:33:30 2015 (r285175) @@ -254,15 +254,24 @@ mca_mute(const struct mca_record *rec) { /* - * Skip spurious corrected parity errors generated by desktop Haswell - * (see HSD131 erratum) unless reporting is enabled. - * Note that these errors also have been observed with D0-stepping, - * while the revision 014 desktop Haswell specification update only - * talks about C0-stepping. + * Skip spurious corrected parity errors generated by Intel Haswell- + * and Broadwell-based CPUs (see HSD131, HSM142, HSW131 and BDM48 + * erratum respectively), unless reporting is enabled. + * Note that these errors also have been observed with the D0-stepping + * of Haswell, while at least initially the CPU specification updates + * suggested only the C0-stepping to be affected. Similarly, Celeron + * 2955U with a CPU ID of 0x45 apparently are also concerned with the + * same problem, with HSM142 only referring to 0x3c and 0x46. */ - if (rec->mr_cpu_vendor_id == CPU_VENDOR_INTEL && - rec->mr_cpu_id == 0x306c3 && rec->mr_bank == 0 && - rec->mr_status == 0x90000040000f0005 && !intel6h_HSD131) + if (cpu_vendor_id == CPU_VENDOR_INTEL && + CPUID_TO_FAMILY(cpu_id) == 0x6 && + (CPUID_TO_MODEL(cpu_id) == 0x3c || /* HSD131, HSM142, HSW131 */ + CPUID_TO_MODEL(cpu_id) == 0x3d || /* BDM48 */ + CPUID_TO_MODEL(cpu_id) == 0x45 || + CPUID_TO_MODEL(cpu_id) == 0x46) && /* HSM142 */ + rec->mr_bank == 0 && + (rec->mr_status & 0xa0000000ffffffff) == 0x80000000000f0005 && + !intel6h_HSD131) return (1); return (0); From owner-svn-src-all@freebsd.org Sun Jul 5 19:34:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05CDAAF6F; Sun, 5 Jul 2015 19:34:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 E934612AD; Sun, 5 Jul 2015 19:34:45 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65JYjM2017910; Sun, 5 Jul 2015 19:34:45 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65JYjDr017909; Sun, 5 Jul 2015 19:34:45 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201507051934.t65JYjDr017909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 5 Jul 2015 19:34:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r285176 - stable/8/sys/x86/x86 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 19:34:46 -0000 Author: marius Date: Sun Jul 5 19:34:45 2015 New Revision: 285176 URL: https://svnweb.freebsd.org/changeset/base/285176 Log: MFC: r281751 Refine the workaround for Intel HSD131 [1] added in r269052 (MFCed to stable/8 in r269595): - Use the full mask described by the erratum as with a sufficiently high number of these false-positives, the overflow bit (bit 62) additionally gets set [7]. - HSD131 has been brought into several other Haswell-derived CPUs including to the next generation, i. e. Intel Broadwell. Thus, also skip reporting of these benign errors by default on CPU models affected by HSM142, HSW131 and BDM48 [2 - 5], describing the HSD131 silicon bug for additional models. Also, Celeron 2955U with a CPU ID of 0x45 have been reported to be covered by this fault [6], with the specification update concerned with HSM142 [2] only referring to 0x3c and 0x46. Submitted by: David Froehlich [7] Approved by: re (kib) http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf [1] http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-mobile-specification-update.pdf [2] http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/5th-gen-core-family-spec-update.pdf [3] http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/core-m-processor-family-spec-update.pdf [4] http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-e3-1200v3-spec-update.pdf [5] https://lists.freebsd.org/pipermail/freebsd-hackers/2015-January/046878.html [6] Modified: stable/8/sys/x86/x86/mca.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/x86/ (props changed) Modified: stable/8/sys/x86/x86/mca.c ============================================================================== --- stable/8/sys/x86/x86/mca.c Sun Jul 5 19:33:30 2015 (r285175) +++ stable/8/sys/x86/x86/mca.c Sun Jul 5 19:34:45 2015 (r285176) @@ -253,15 +253,24 @@ mca_mute(const struct mca_record *rec) { /* - * Skip spurious corrected parity errors generated by desktop Haswell - * (see HSD131 erratum) unless reporting is enabled. - * Note that these errors also have been observed with D0-stepping, - * while the revision 014 desktop Haswell specification update only - * talks about C0-stepping. + * Skip spurious corrected parity errors generated by Intel Haswell- + * and Broadwell-based CPUs (see HSD131, HSM142, HSW131 and BDM48 + * erratum respectively), unless reporting is enabled. + * Note that these errors also have been observed with the D0-stepping + * of Haswell, while at least initially the CPU specification updates + * suggested only the C0-stepping to be affected. Similarly, Celeron + * 2955U with a CPU ID of 0x45 apparently are also concerned with the + * same problem, with HSM142 only referring to 0x3c and 0x46. */ - if (rec->mr_cpu_vendor_id == CPU_VENDOR_INTEL && - rec->mr_cpu_id == 0x306c3 && rec->mr_bank == 0 && - rec->mr_status == 0x90000040000f0005 && !intel6h_HSD131) + if (cpu_vendor_id == CPU_VENDOR_INTEL && + CPUID_TO_FAMILY(cpu_id) == 0x6 && + (CPUID_TO_MODEL(cpu_id) == 0x3c || /* HSD131, HSM142, HSW131 */ + CPUID_TO_MODEL(cpu_id) == 0x3d || /* BDM48 */ + CPUID_TO_MODEL(cpu_id) == 0x45 || + CPUID_TO_MODEL(cpu_id) == 0x46) && /* HSM142 */ + rec->mr_bank == 0 && + (rec->mr_status & 0xa0000000ffffffff) == 0x80000000000f0005 && + !intel6h_HSD131) return (1); return (0); From owner-svn-src-all@freebsd.org Sun Jul 5 19:50:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3411A1C9; Sun, 5 Jul 2015 19:50:03 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 513A51B39; Sun, 5 Jul 2015 19:50:02 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t65JntQF074148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 5 Jul 2015 12:49:55 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t65Jntc6074147; Sun, 5 Jul 2015 12:49:55 -0700 (PDT) (envelope-from jmg) Date: Sun, 5 Jul 2015 12:49:55 -0700 From: John-Mark Gurney To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285160 - head/sys/conf Message-ID: <20150705194954.GA8523@funkthat.com> References: <201507051415.t65EFxWd044357@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201507051415.t65EFxWd044357@repo.freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sun, 05 Jul 2015 12:49:55 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 19:50:03 -0000 Ian Lepore wrote this message on Sun, Jul 05, 2015 at 14:15 +0000: > Author: ian > Date: Sun Jul 5 14:15:58 2015 > New Revision: 285160 > URL: https://svnweb.freebsd.org/changeset/base/285160 > > Log: > Ensure all the required files get built when you include the IPSEC option. Umm.. This looks more like that IPSEC should require that the crypto device be specified instead of fixing it this way... > Modified: > head/sys/conf/files > > Modified: head/sys/conf/files > ============================================================================== > --- head/sys/conf/files Sun Jul 5 11:42:01 2015 (r285159) > +++ head/sys/conf/files Sun Jul 5 14:15:58 2015 (r285160) > @@ -3902,17 +3902,17 @@ ofed/drivers/infiniband/hw/mthca/mthca_u > > # crypto support > opencrypto/cast.c optional crypto | ipsec > -opencrypto/criov.c optional crypto > -opencrypto/crypto.c optional crypto > +opencrypto/criov.c optional crypto | ipsec > +opencrypto/crypto.c optional crypto | ipsec > opencrypto/cryptodev.c optional cryptodev > -opencrypto/cryptodev_if.m optional crypto > -opencrypto/cryptosoft.c optional crypto > -opencrypto/cryptodeflate.c optional crypto > -opencrypto/gmac.c optional crypto > -opencrypto/gfmult.c optional crypto > +opencrypto/cryptodev_if.m optional crypto | ipsec > +opencrypto/cryptosoft.c optional crypto | ipsec > +opencrypto/cryptodeflate.c optional crypto | ipsec > +opencrypto/gmac.c optional crypto | ipsec > +opencrypto/gfmult.c optional crypto | ipsec > opencrypto/rmd160.c optional crypto | ipsec > -opencrypto/skipjack.c optional crypto > -opencrypto/xform.c optional crypto > +opencrypto/skipjack.c optional crypto | ipsec > +opencrypto/xform.c optional crypto | ipsec > rpc/auth_none.c optional krpc | nfslockd | nfscl | nfsd > rpc/auth_unix.c optional krpc | nfslockd | nfscl | nfsd > rpc/authunix_prot.c optional krpc | nfslockd | nfscl | nfsd -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@freebsd.org Sun Jul 5 20:00:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAB84A353 for ; Sun, 5 Jul 2015 20:00:21 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A25D103C for ; Sun, 5 Jul 2015 20:00:20 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by wiwl6 with SMTP id l6so267425380wiw.0 for ; Sun, 05 Jul 2015 13:00:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=of2vXB4jap4R5D28fCS5e6RnYWtgR3O/uXaQ22x6xQw=; b=bZuwoIdTQ6ilnKA4kQlD0yhrR1sedPkAjDLNja3pW1Q8Eu1qLg5DbbOvhMPRqZmk97 XvxicfPYbsU+MbJzHZLe4YAlGIdjSUv4qYL4VB19g+6zdaPMgPrQ4rPwwRBPfbk4GHmv jHZfTMBZy7BS4+M71h+QU2i0aIeFPa+NkjduHfaa8PwWwwMCLU4M7od9QwSmVPpdERLw GiPwe+qapyWQP65W0zaH4tnjd6pzg3taBp0Dbipau3xFFBo7tBx0HtLBvcaBnEwm+k+e i6yINv5v3pNWxRgFTKkimVHjTyGTxZMUdPzvh0lPi0z7uN5gy4dHDVxkQtDqwa4NjAo/ a7wA== X-Gm-Message-State: ALoCoQkZo2xzEEYKTQZIIebcv6/D/aENZF68uD0TQLhcD+bdQJabZIMn5ZgTZEx+zV1iMxsl7hNG MIME-Version: 1.0 X-Received: by 10.194.71.226 with SMTP id y2mr40281564wju.34.1436125984828; Sun, 05 Jul 2015 12:53:04 -0700 (PDT) Received: by 10.194.81.106 with HTTP; Sun, 5 Jul 2015 12:53:04 -0700 (PDT) In-Reply-To: <20150705194954.GA8523@funkthat.com> References: <201507051415.t65EFxWd044357@repo.freebsd.org> <20150705194954.GA8523@funkthat.com> Date: Sun, 5 Jul 2015 21:53:04 +0200 Message-ID: Subject: Re: svn commit: r285160 - head/sys/conf From: Oliver Pinter To: John-Mark Gurney Cc: Ian Lepore , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 20:00:22 -0000 On 7/5/15, John-Mark Gurney wrote: > Ian Lepore wrote this message on Sun, Jul 05, 2015 at 14:15 +0000: >> Author: ian >> Date: Sun Jul 5 14:15:58 2015 >> New Revision: 285160 >> URL: https://svnweb.freebsd.org/changeset/base/285160 >> >> Log: >> Ensure all the required files get built when you include the IPSEC >> option. > > Umm.. This looks more like that IPSEC should require that the crypto > device be specified instead of fixing it this way... > Is there any way to specify implication rules to config? Ergo if I specify IPSEC without device crypto, then it's auto enable/include. Similar to linux's Kconfig framework.. >> Modified: >> head/sys/conf/files >> >> Modified: head/sys/conf/files >> ============================================================================== >> --- head/sys/conf/files Sun Jul 5 11:42:01 2015 (r285159) >> +++ head/sys/conf/files Sun Jul 5 14:15:58 2015 (r285160) >> @@ -3902,17 +3902,17 @@ ofed/drivers/infiniband/hw/mthca/mthca_u >> >> # crypto support >> opencrypto/cast.c optional crypto | ipsec >> -opencrypto/criov.c optional crypto >> -opencrypto/crypto.c optional crypto >> +opencrypto/criov.c optional crypto | ipsec >> +opencrypto/crypto.c optional crypto | ipsec >> opencrypto/cryptodev.c optional cryptodev >> -opencrypto/cryptodev_if.m optional crypto >> -opencrypto/cryptosoft.c optional crypto >> -opencrypto/cryptodeflate.c optional crypto >> -opencrypto/gmac.c optional crypto >> -opencrypto/gfmult.c optional crypto >> +opencrypto/cryptodev_if.m optional crypto | ipsec >> +opencrypto/cryptosoft.c optional crypto | ipsec >> +opencrypto/cryptodeflate.c optional crypto | ipsec >> +opencrypto/gmac.c optional crypto | ipsec >> +opencrypto/gfmult.c optional crypto | ipsec >> opencrypto/rmd160.c optional crypto | ipsec >> -opencrypto/skipjack.c optional crypto >> -opencrypto/xform.c optional crypto >> +opencrypto/skipjack.c optional crypto | ipsec >> +opencrypto/xform.c optional crypto | ipsec >> rpc/auth_none.c optional krpc | nfslockd | nfscl | nfsd >> rpc/auth_unix.c optional krpc | nfslockd | nfscl | nfsd >> rpc/authunix_prot.c optional krpc | nfslockd | nfscl | nfsd > > -- > John-Mark Gurney Voice: +1 415 225 5579 > > "All that I will do, has been done, All that I have, has not." > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Sun Jul 5 20:04:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7BC7A477 for ; Sun, 5 Jul 2015 20:04:09 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (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 75C21149E for ; Sun, 5 Jul 2015 20:04:09 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 7C7502016C for ; Sun, 5 Jul 2015 16:04:01 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Sun, 05 Jul 2015 16:04:01 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=NfSnQqdtE0U3ifP8GD72xXOhmCY=; b=WTwEd/ crtShslOqCyCHYmHoj/PgQqd4W++e/2cRaSJZMR0ZmOP9zedftWltOKCvxiiz7I2 NVDnpSlWUdzz2R8h1YkWdMkEOhsDUGfVJjQWH+srq4XBzf3dWEhkgp+FUpGKSDsl J2M2TZ6QM1KyL9CPRGANKML+aUIXGxlFzQss0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=NfSnQqdtE0U3ifP 8GD72xXOhmCY=; b=KM+HAtYqANjVRqBJKjxrqw7pMDlICdghAY0KZ0+YG+V1QQD 2lXiUJAQefgZOV6L6alGs6/OMPnmYw/ghPaqagI1y79//FYOOYdTQHJkjw7I/4QH NNxbLchQSFCdsbO1EnuVZlGVomuwtuE7GWI1lf3c4BRSpxSRSfPdCj006TOk= X-Sasl-enc: 4Fm1stot6V/eD34cTIyZr1tWLoWKjZPj6mgMhPOPxHZG 1436126641 Received: from pion.local (robtfraser.plus.com [80.229.9.145]) by mail.messagingengine.com (Postfix) with ESMTPA id 81F1B680180; Sun, 5 Jul 2015 16:04:00 -0400 (EDT) Message-ID: <55998DAF.2000609@fastmail.net> Date: Sun, 05 Jul 2015 21:03:59 +0100 From: Bruce Simpson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: John-Mark Gurney CC: src-committers , svn-src-all@freebsd.org, Ian Lepore , "svn-src-head@freebsd.org" Subject: Re: svn commit: r285160 - head/sys/conf References: <201507051415.t65EFxWd044357@repo.freebsd.org> <20150705194954.GA8523@funkthat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 20:04:09 -0000 On 05/07/15 20:53, Oliver Pinter wrote: >>> Log: >>> Ensure all the required files get built when you include the IPSEC >>> option. +1. IETF position these days is that IPSEC should be a "standard feature". Key management is a separate issue, and support for newer ciphers like ChaCha20 (see NaCL by Daniel Bernstein et al) and authenticated encryption schemes please. >> Umm.. This looks more like that IPSEC should require that the crypto >> device be specified instead of fixing it this way... +1. Expressing static dependencies at the granularity of "file" rather than "module" or "subsystem" is a PITA, and leads to having to depth-first enumerate the deps like this, introducing clutter. > Is there any way to specify implication rules to config? > Ergo if I specify IPSEC without device crypto, then it's auto enable/include. > Similar to linux's Kconfig framework.. +1. I know this can be done at "module" granularity, but I have always found the "options" and "files" syntax somewhat arcane. I almost always copy-paste-edit existing stanzas. From owner-svn-src-all@freebsd.org Sun Jul 5 20:05:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 052DCA4B3 for ; Sun, 5 Jul 2015 20:05:39 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) by mx1.freebsd.org (Postfix) with SMTP id DAB5F1665 for ; Sun, 5 Jul 2015 20:05:38 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sun, 5 Jul 2015 20:06:07 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t65K5USP030769; Sun, 5 Jul 2015 14:05:30 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1436126730.1191.4.camel@freebsd.org> Subject: Re: svn commit: r285160 - head/sys/conf From: Ian Lepore To: John-Mark Gurney Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 05 Jul 2015 14:05:30 -0600 In-Reply-To: <20150705194954.GA8523@funkthat.com> References: <201507051415.t65EFxWd044357@repo.freebsd.org> <20150705194954.GA8523@funkthat.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 20:05:39 -0000 On Sun, 2015-07-05 at 12:49 -0700, John-Mark Gurney wrote: > Ian Lepore wrote this message on Sun, Jul 05, 2015 at 14:15 +0000: > > Author: ian > > Date: Sun Jul 5 14:15:58 2015 > > New Revision: 285160 > > URL: https://svnweb.freebsd.org/changeset/base/285160 > > > > Log: > > Ensure all the required files get built when you include the IPSEC option. > > Umm.. This looks more like that IPSEC should require that the crypto > device be specified instead of fixing it this way... I considered that, but rejected it given the presence of crypto | ipsec on some of the files already, but not a sufficiency of them to actually build sucessfully. Heavily my thinking that was a personal belief that if you say "option foo" it should just work without you needing to know other (likely not well documented) prerequisite options also need to be set. -- Ian From owner-svn-src-all@freebsd.org Sun Jul 5 20:16:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C140A6DB; Sun, 5 Jul 2015 20:16:39 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 6A1ED1C46; Sun, 5 Jul 2015 20:16:39 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65KGcWP037448; Sun, 5 Jul 2015 20:16:38 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65KGcMC037446; Sun, 5 Jul 2015 20:16:38 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201507052016.t65KGcMC037446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 5 Jul 2015 20:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285177 - stable/10/sys/dev/re X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 20:16:39 -0000 Author: marius Date: Sun Jul 5 20:16:38 2015 New Revision: 285177 URL: https://svnweb.freebsd.org/changeset/base/285177 Log: MFC: r281337 Don't enable RX and TX before their initial configuration is done, i. e. after setting up interrupt moderation but before turning interrupts on. This matches what Realtek's r8168 Linux driver does as of version 8.039.00 and fixes problems with certain incarnations of certain MAC revisions like the interface requiring an extra up/down-cycle after boot to start working or DMA configuration not being adhered to. PR: 193743, 197535 Approved by: re (kib) Modified: stable/10/sys/dev/re/if_re.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/re/if_re.c ============================================================================== --- stable/10/sys/dev/re/if_re.c Sun Jul 5 19:34:45 2015 (r285176) +++ stable/10/sys/dev/re/if_re.c Sun Jul 5 20:16:38 2015 (r285177) @@ -3195,11 +3195,6 @@ re_init_locked(struct rl_softc *sc) ~0x00080000); /* - * Enable transmit and receive. - */ - CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_TX_ENB|RL_CMD_RX_ENB); - - /* * Set the initial TX configuration. */ if (sc->rl_testmode) { @@ -3225,6 +3220,11 @@ re_init_locked(struct rl_softc *sc) CSR_WRITE_2(sc, RL_INTRMOD, 0x5100); } + /* + * Enable transmit and receive. + */ + CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_TX_ENB | RL_CMD_RX_ENB); + #ifdef DEVICE_POLLING /* * Disable interrupts if we are polling. @@ -3248,10 +3248,6 @@ re_init_locked(struct rl_softc *sc) /* Start RX/TX process. */ CSR_WRITE_4(sc, RL_MISSEDPKT, 0); -#ifdef notdef - /* Enable receiver and transmitter. */ - CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_TX_ENB|RL_CMD_RX_ENB); -#endif /* * Initialize the timer interrupt register so that From owner-svn-src-all@freebsd.org Sun Jul 5 20:16:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C3A1A711; Sun, 5 Jul 2015 20:16:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 B55E91CEC; Sun, 5 Jul 2015 20:16:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65KGkkI037543; Sun, 5 Jul 2015 20:16:46 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65KGkIj037542; Sun, 5 Jul 2015 20:16:46 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201507052016.t65KGkIj037542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 5 Jul 2015 20:16:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285178 - stable/9/sys/dev/re X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 20:16:47 -0000 Author: marius Date: Sun Jul 5 20:16:45 2015 New Revision: 285178 URL: https://svnweb.freebsd.org/changeset/base/285178 Log: MFC: r281337 Don't enable RX and TX before their initial configuration is done, i. e. after setting up interrupt moderation but before turning interrupts on. This matches what Realtek's r8168 Linux driver does as of version 8.039.00 and fixes problems with certain incarnations of certain MAC revisions like the interface requiring an extra up/down-cycle after boot to start working or DMA configuration not being adhered to. PR: 193743, 197535 Modified: stable/9/sys/dev/re/if_re.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/re/if_re.c ============================================================================== --- stable/9/sys/dev/re/if_re.c Sun Jul 5 20:16:38 2015 (r285177) +++ stable/9/sys/dev/re/if_re.c Sun Jul 5 20:16:45 2015 (r285178) @@ -3195,11 +3195,6 @@ re_init_locked(struct rl_softc *sc) ~0x00080000); /* - * Enable transmit and receive. - */ - CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_TX_ENB|RL_CMD_RX_ENB); - - /* * Set the initial TX configuration. */ if (sc->rl_testmode) { @@ -3225,6 +3220,11 @@ re_init_locked(struct rl_softc *sc) CSR_WRITE_2(sc, RL_INTRMOD, 0x5100); } + /* + * Enable transmit and receive. + */ + CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_TX_ENB | RL_CMD_RX_ENB); + #ifdef DEVICE_POLLING /* * Disable interrupts if we are polling. @@ -3248,10 +3248,6 @@ re_init_locked(struct rl_softc *sc) /* Start RX/TX process. */ CSR_WRITE_4(sc, RL_MISSEDPKT, 0); -#ifdef notdef - /* Enable receiver and transmitter. */ - CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_TX_ENB|RL_CMD_RX_ENB); -#endif /* * Initialize the timer interrupt register so that From owner-svn-src-all@freebsd.org Sun Jul 5 20:16:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 425FEA745; Sun, 5 Jul 2015 20:16:53 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 0B7DC1E38; Sun, 5 Jul 2015 20:16:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65KGqWl037636; Sun, 5 Jul 2015 20:16:52 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65KGqWm037633; Sun, 5 Jul 2015 20:16:52 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201507052016.t65KGqWm037633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 5 Jul 2015 20:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r285179 - stable/8/sys/dev/re X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 20:16:53 -0000 Author: marius Date: Sun Jul 5 20:16:51 2015 New Revision: 285179 URL: https://svnweb.freebsd.org/changeset/base/285179 Log: MFC: r281337 Don't enable RX and TX before their initial configuration is done, i. e. after setting up interrupt moderation but before turning interrupts on. This matches what Realtek's r8168 Linux driver does as of version 8.039.00 and fixes problems with certain incarnations of certain MAC revisions like the interface requiring an extra up/down-cycle after boot to start working or DMA configuration not being adhered to. PR: 193743, 197535 Modified: stable/8/sys/dev/re/if_re.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/re/ (props changed) Modified: stable/8/sys/dev/re/if_re.c ============================================================================== --- stable/8/sys/dev/re/if_re.c Sun Jul 5 20:16:45 2015 (r285178) +++ stable/8/sys/dev/re/if_re.c Sun Jul 5 20:16:51 2015 (r285179) @@ -3109,11 +3109,6 @@ re_init_locked(struct rl_softc *sc) RL_ADDR_LO(sc->rl_ldata.rl_tx_list_addr)); /* - * Enable transmit and receive. - */ - CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_TX_ENB|RL_CMD_RX_ENB); - - /* * Set the initial TX configuration. */ if (sc->rl_testmode) { @@ -3139,6 +3134,11 @@ re_init_locked(struct rl_softc *sc) CSR_WRITE_2(sc, RL_INTRMOD, 0x5100); } + /* + * Enable transmit and receive. + */ + CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_TX_ENB | RL_CMD_RX_ENB); + #ifdef DEVICE_POLLING /* * Disable interrupts if we are polling. @@ -3162,10 +3162,6 @@ re_init_locked(struct rl_softc *sc) /* Start RX/TX process. */ CSR_WRITE_4(sc, RL_MISSEDPKT, 0); -#ifdef notdef - /* Enable receiver and transmitter. */ - CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_TX_ENB|RL_CMD_RX_ENB); -#endif /* * Initialize the timer interrupt register so that From owner-svn-src-all@freebsd.org Sun Jul 5 20:49:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 687FFAD96; Sun, 5 Jul 2015 20:49:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x231.google.com (mail-pa0-x231.google.com [IPv6:2607:f8b0:400e:c03::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35B981FDD; Sun, 5 Jul 2015 20:49:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pactm7 with SMTP id tm7so83988474pac.2; Sun, 05 Jul 2015 13:49:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=C+sgxsYkc1SkcyUvetD6zv0Fa8G7siO9R3/FB/sasWQ=; b=jboaHvdVg+OIJtzkno85OMUiQWw035pQyhgB4k/S+tOJJq9IxvP/3yshi0ON58dtLe rToJQ0JvA3ReYX3CafdCSL/TMPMobdWdT5K0ZuVYgbuZmZ3cW+MUOXzhz0XPJp3u3pJZ yqDfKL+ZGXA6Pwb9Nv1upbLt3mx6VOgMj6jsoaQxBvUU+33GieRG+LJO1TH7fI1mOZNQ bxLWk2+1YiW/sg0mUYU9zBLgdNdBzugRRQw4VUlY0TL5nvmvdBhpgnxonF4HUUkTsjdm VxVq6eM/3rE9YxHKLwQMbyCUImP7CrKv5woYXb97yVr6hpqA+/pXPVMJ33S+5203wy8H zZUw== X-Received: by 10.66.121.163 with SMTP id ll3mr100481967pab.100.1436129349610; Sun, 05 Jul 2015 13:49:09 -0700 (PDT) Received: from [192.168.20.5] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id bi4sm15746271pbc.56.2015.07.05.13.49.08 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 05 Jul 2015 13:49:08 -0700 (PDT) Subject: Re: svn commit: r285160 - head/sys/conf Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_745AE214-2FB7-460D-8CC5-38B1AEFD9AD6"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5 From: Garrett Cooper In-Reply-To: <1436126730.1191.4.camel@freebsd.org> Date: Sun, 5 Jul 2015 13:49:06 -0700 Cc: John-Mark Gurney , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <495E11C2-BB42-4687-8551-604C1F14D37E@gmail.com> References: <201507051415.t65EFxWd044357@repo.freebsd.org> <20150705194954.GA8523@funkthat.com> <1436126730.1191.4.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 20:49:10 -0000 --Apple-Mail=_745AE214-2FB7-460D-8CC5-38B1AEFD9AD6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Jul 5, 2015, at 13:05, Ian Lepore wrote: > On Sun, 2015-07-05 at 12:49 -0700, John-Mark Gurney wrote: >> Ian Lepore wrote this message on Sun, Jul 05, 2015 at 14:15 +0000: >>> Author: ian >>> Date: Sun Jul 5 14:15:58 2015 >>> New Revision: 285160 >>> URL: https://svnweb.freebsd.org/changeset/base/285160 >>>=20 >>> Log: >>> Ensure all the required files get built when you include the IPSEC = option. >>=20 >> Umm.. This looks more like that IPSEC should require that the crypto >> device be specified instead of fixing it this way... >=20 > I considered that, but rejected it given the presence of crypto | = ipsec > on some of the files already, but not a sufficiency of them to = actually > build sucessfully. Heavily my thinking that was a personal belief = that > if you say "option foo" it should just work without you needing to = know > other (likely not well documented) prerequisite options also need to = be > set. Or=85 just create a manpage that says =93options IPSEC=94 requires = =93device crypto=94? --Apple-Mail=_745AE214-2FB7-460D-8CC5-38B1AEFD9AD6 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVmZhCAAoJEMZr5QU6S73eSZoH/R+MKFsLH8slqXxWmzU72vfJ wxJ+oEI72TSbg7Dv8dY4G2kded4zImmnikqVqUcdrheG2Y2mxmYq77z4MhMY2Yky v6TIegkca2NekA3n+r4FxCOC4uXN3enEvWDxCt3co5QrbQmy61bYw8ELQtTj6HpY bGiV1T5hZL69gzKILrCJ8Vi8QbvSDBa5mysxMJ4vYITNKliG7n72dxko7DmIZGvY VM+M/AjmWpzsGuZVg3wF+F0LBZwijraM66k4sFuGtj72szkaPa+ewFAxmUidBi8t WBY5tJu+Yp2iyREP6TxmSuUT+nC3+erQmEeIXlRh05iEQL1C3fAop06EQP3wovI= =iagf -----END PGP SIGNATURE----- --Apple-Mail=_745AE214-2FB7-460D-8CC5-38B1AEFD9AD6-- From owner-svn-src-all@freebsd.org Sun Jul 5 20:50:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83D75ADEE; Sun, 5 Jul 2015 20:50:57 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x231.google.com (mail-pa0-x231.google.com [IPv6:2607:f8b0:400e:c03::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 501DC1288; Sun, 5 Jul 2015 20:50:57 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pacws9 with SMTP id ws9so85378861pac.0; Sun, 05 Jul 2015 13:50:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=FnJ2pV8C2PSKBdD7aAhV1bYcSNkCfXD3+n30n1b1UVU=; b=pTPaJep+v59iqh+r/TmwjoKKF8ilsayUx1UddBYW7CTPa2hUrvwFfrYB6F0yT4tRDM RnceHEcGmo0L4RY0/MxEQrS9jI4mbmxd52tPQb4fUe6KoY28M+Mp9LnC/SGwaeLi1P91 PFj5h5JB9CnK8bqs/UiueNHXid4vZy9Kqt6C85UTuGH3Qc00bZJGfUjcQXltbHIBZRlp V1+CFZFA7FtWu+CRH6/bz9DBEC1ywuOEvIOoxCLsEGgS15ri5IYtRSaf4SNAK1oSFOpg fJAf2RuIHaE/B1gJcz54+Ic5OMmpYLj7S0lqkgy4BH5GJP977Q+2UgXaJJ8LrKRpgDgR Nxaw== X-Received: by 10.70.55.165 with SMTP id t5mr84937595pdp.102.1436129456913; Sun, 05 Jul 2015 13:50:56 -0700 (PDT) Received: from [192.168.20.5] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id td3sm15868838pab.46.2015.07.05.13.50.55 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 05 Jul 2015 13:50:56 -0700 (PDT) Subject: Re: svn commit: r285160 - head/sys/conf Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E0FB4C41-728B-4137-8324-809E2DBA1BE8"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5 From: Garrett Cooper In-Reply-To: <495E11C2-BB42-4687-8551-604C1F14D37E@gmail.com> Date: Sun, 5 Jul 2015 13:50:54 -0700 Cc: John-Mark Gurney , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201507051415.t65EFxWd044357@repo.freebsd.org> <20150705194954.GA8523@funkthat.com> <1436126730.1191.4.camel@freebsd.org> <495E11C2-BB42-4687-8551-604C1F14D37E@gmail.com> To: Ian Lepore X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 20:50:57 -0000 --Apple-Mail=_E0FB4C41-728B-4137-8324-809E2DBA1BE8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Jul 5, 2015, at 13:49, Garrett Cooper wrote: > On Jul 5, 2015, at 13:05, Ian Lepore wrote: >=20 >> On Sun, 2015-07-05 at 12:49 -0700, John-Mark Gurney wrote: >>> Ian Lepore wrote this message on Sun, Jul 05, 2015 at 14:15 +0000: >>>> Author: ian >>>> Date: Sun Jul 5 14:15:58 2015 >>>> New Revision: 285160 >>>> URL: https://svnweb.freebsd.org/changeset/base/285160 >>>>=20 >>>> Log: >>>> Ensure all the required files get built when you include the IPSEC = option. >>>=20 >>> Umm.. This looks more like that IPSEC should require that the crypto >>> device be specified instead of fixing it this way... >>=20 >> I considered that, but rejected it given the presence of crypto | = ipsec >> on some of the files already, but not a sufficiency of them to = actually >> build sucessfully. Heavily my thinking that was a personal belief = that >> if you say "option foo" it should just work without you needing to = know >> other (likely not well documented) prerequisite options also need to = be >> set. >=20 > Or=85 just create a manpage that says =93options IPSEC=94 requires = =93device crypto=94? Oh wait =97 there already is one and it states exactly that... = https://www.freebsd.org/cgi/man.cgi?query=3Dipsec&apropos=3D0&sektion=3D0&= manpath=3DFreeBSD+10.1-RELEASE&arch=3Ddefault&format=3Dhtml . Maybe just add some comments in the KERNCONFs to note that =93options = IPSEC=94 requires =93device crypto=94? --Apple-Mail=_E0FB4C41-728B-4137-8324-809E2DBA1BE8 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVmZiuAAoJEMZr5QU6S73e4GwH/j4Z3r5iNFhRzwBrEkURm6yN SNtF3UgDnNEYRB/VGJDDVNBkrglqu+aW2qgHAxqAJgbANDuOAoQW83bgmY1lOSwm JW2k/MHniKJ6TlQaycVJbk1eBawKlbAvAJsUS3hCoKS/gXS7PEwPuoDPc6fEvcYj IXJcf80aTwp4U8qRRzxqycIDg0L2gE9f5qlBjhCMw3UyGdqKDeEoTCheUA8ezSaO STRiwSWlH8mGP5aJYt5OyrVuvr0ns4r3CnmRkoKuWUOoPQaQ4or51DACGE+bP4uX scdtgp2/S+64rhBlIeIKGd0HW6rW5RxrTVEf7z9XSmCklNdXumSji+jbFvwwr3A= =+D+/ -----END PGP SIGNATURE----- --Apple-Mail=_E0FB4C41-728B-4137-8324-809E2DBA1BE8-- From owner-svn-src-all@freebsd.org Sun Jul 5 21:15:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5130598E593 for ; Sun, 5 Jul 2015 21:15:12 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) by mx1.freebsd.org (Postfix) with SMTP id 042601869 for ; Sun, 5 Jul 2015 21:15:11 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sun, 5 Jul 2015 21:15:45 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t65LF8kv030869; Sun, 5 Jul 2015 15:15:08 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1436130908.1334.3.camel@freebsd.org> Subject: Re: svn commit: r285169 - in head: contrib/ntp contrib/ntp/adjtimed contrib/ntp/clockstuff contrib/ntp/html contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/include/isc contrib/ntp/kernel contr... From: Ian Lepore To: Cy Schubert Cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 05 Jul 2015 15:15:08 -0600 In-Reply-To: <201507051654.t65GsZqd012473@slippy.cwsent.com> References: <201507051654.t65GsZqd012473@slippy.cwsent.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 21:15:12 -0000 On Sun, 2015-07-05 at 09:54 -0700, Cy Schubert wrote: > In message <1436113168.1191.1.camel@freebsd.org>, Ian Lepore writes: > > On Sun, 2015-07-05 at 15:42 +0000, Cy Schubert wrote: > > > Author: cy > > > Date: Sun Jul 5 15:42:16 2015 > > > New Revision: 285169 > > > URL: https://svnweb.freebsd.org/changeset/base/285169 > > > > > > Log: > > > MFV ntp-4.2.8p3 (r284990). > > > > > > Approved by: roberto, delphij > > > Security: VuXML: 0d0f3050-1f69-11e5-9ba9-d050996490d0 > > > Security: http://bugs.ntp.org/show_bug.cgi?id=2853 > > > Security: https://www.kb.cert.org/vuls/id/668167 > > > Security: http://support.ntp.org/bin/view/Main/SecurityNotice#June_2015_N > > TP_Security_Vulnerabi > > > > While the checkin says 8.2.8p3, the new version identifies itself as: > > > > Jan 1 00:00:24 wand ntpd[590]: ntpd 4.2.8@1.3265-o Mon May 25 22:33:20 > > UTC 2015 (1): Starting > > > > compared to the prior import... > > > > Jun 8 03:27:15 dpnand ntpd[61397]: ntpd 4.2.8p2-a (1): Starting > > > > Is that expected? > > My bad. That's a manual update that was missed. It's in > usr.sbin/ntp/config.h. Version has just been updated. The crazy thing about this is that I was actually running an ntpd from ports -- I had forgotten to reset rc.conf after testing a couple weeks ago. But somehow I reported a right problem, even though it was based on wrong evidence. :) -- Ian From owner-svn-src-all@freebsd.org Sun Jul 5 21:44:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6876A98ED5A; Sun, 5 Jul 2015 21:44:26 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) by mx1.freebsd.org (Postfix) with ESMTP id 0C4E51BD9; Sun, 5 Jul 2015 21:44:25 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from slippy.cwsent.com ([96.50.22.10]) by shaw.ca with SMTP id BrhwZIqYW8qsJBrhxZoJXt; Sun, 05 Jul 2015 15:44:18 -0600 X-Authority-Analysis: v=2.1 cv=U8JYd7fu c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=VxmjJ2MpAAAA:8 a=BWvPGDcYAAAA:8 a=ICAaq7hcmGcA:10 a=kj9zAlcOel0A:10 a=zOBTXjUuO1YA:10 a=6I5d2MoRAAAA:8 a=85N1-lAfAAAA:8 a=TWq6ZYQzAAAA:8 a=YxBL1-UpAAAA:8 a=0Wetlo7Iuau2FHvvU3QA:9 a=CjuIK1q_8ugA:10 Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.14.9/8.14.9) with ESMTP id t65LiGqj015220; Sun, 5 Jul 2015 14:44:16 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201507052144.t65LiGqj015220@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Ian Lepore cc: Cy Schubert , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285169 - in head: contrib/ntp contrib/ntp/adjtimed contrib/ntp/clockstuff contrib/ntp/html contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/include/isc contrib/ntp/kernel contr... In-Reply-To: Message from Ian Lepore of "Sun, 05 Jul 2015 15:15:08 -0600." <1436130908.1334.3.camel@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 05 Jul 2015 14:44:16 -0700 X-CMAE-Envelope: MS4wfJyOoOOsVCK8cB9fr3HxnBnp0ZZgIvBcg3EEtSdM1nPR9X8ykYZKXuOxM327qp4YAoOWWd5yztrTpo05HUCxPPQO/Zw5cT/5qtnNiSAbZyNf3sA8dgm7kZSSwAAsxsbs7eKBOOPomb1UCdMz6WBC4ZNvLTe+yWojLPv8uCzb2MS7TiBTK6K9ApfcgRH0haS6jdz8GYYg3kH4/+TuoMRfvslAdJLboaWfw/fYpqADXFPndkliMVSzFX0XOTWyDK9vnJrnEkQ+YBYXoVjEw6o6hMqTNlNA5wZAisNpqjYxiN41x3iyO57H3yYjXwpqcXEyIQ== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 21:44:26 -0000 In message <1436130908.1334.3.camel@freebsd.org>, Ian Lepore writes: > On Sun, 2015-07-05 at 09:54 -0700, Cy Schubert wrote: > > In message <1436113168.1191.1.camel@freebsd.org>, Ian Lepore writes: > > > On Sun, 2015-07-05 at 15:42 +0000, Cy Schubert wrote: > > > > Author: cy > > > > Date: Sun Jul 5 15:42:16 2015 > > > > New Revision: 285169 > > > > URL: https://svnweb.freebsd.org/changeset/base/285169 > > > > > > > > Log: > > > > MFV ntp-4.2.8p3 (r284990). > > > > > > > > Approved by: roberto, delphij > > > > Security: VuXML: 0d0f3050-1f69-11e5-9ba9-d050996490d0 > > > > Security: http://bugs.ntp.org/show_bug.cgi?id=2853 > > > > Security: https://www.kb.cert.org/vuls/id/668167 > > > > Security: http://support.ntp.org/bin/view/Main/SecurityNotice#Jun > e_2015_N > > > TP_Security_Vulnerabi > > > > > > While the checkin says 8.2.8p3, the new version identifies itself as: > > > > > > Jan 1 00:00:24 wand ntpd[590]: ntpd 4.2.8@1.3265-o Mon May 25 22:33:20 > > > UTC 2015 (1): Starting > > > > > > compared to the prior import... > > > > > > Jun 8 03:27:15 dpnand ntpd[61397]: ntpd 4.2.8p2-a (1): Starting > > > > > > Is that expected? > > > > My bad. That's a manual update that was missed. It's in > > usr.sbin/ntp/config.h. Version has just been updated. > > The crazy thing about this is that I was actually running an ntpd from > ports -- I had forgotten to reset rc.conf after testing a couple weeks > ago. But somehow I reported a right problem, even though it was based > on wrong evidence. :) Thanks. I was feeling really badly about missing that detail. It's the little things that bite us in the you-know-where. The MFC is loaded with minor details, not the least of which is the old, messier, way of defining libraries in makefiles. The port was updated last Tuesday after S/O nudged me, so to speak. -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sun Jul 5 22:26:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EFB39924F3; Sun, 5 Jul 2015 22:26:20 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 6F1761C96; Sun, 5 Jul 2015 22:26:20 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65MQKGx001200; Sun, 5 Jul 2015 22:26:20 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65MQKwf001199; Sun, 5 Jul 2015 22:26:20 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201507052226.t65MQKwf001199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Jul 2015 22:26:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285180 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 22:26:20 -0000 Author: markj Date: Sun Jul 5 22:26:19 2015 New Revision: 285180 URL: https://svnweb.freebsd.org/changeset/base/285180 Log: Add a local variable initialization needed in the OBJT_DEFAULT case. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D2992 Modified: head/sys/vm/vm_mmap.c Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sun Jul 5 20:16:51 2015 (r285179) +++ head/sys/vm/vm_mmap.c Sun Jul 5 22:26:19 2015 (r285180) @@ -1414,6 +1414,7 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, return (EINVAL); size = round_page(size); + object = NULL; writecounted = FALSE; /* From owner-svn-src-all@freebsd.org Sun Jul 5 22:37:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8608399276C; Sun, 5 Jul 2015 22:37:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 694321235; Sun, 5 Jul 2015 22:37:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65MbauL006776; Sun, 5 Jul 2015 22:37:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65MbY0o006768; Sun, 5 Jul 2015 22:37:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201507052237.t65MbY0o006768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Jul 2015 22:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285182 - in head/sys: fs/nullfs fs/tmpfs fs/unionfs kern sys ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 22:37:36 -0000 Author: markj Date: Sun Jul 5 22:37:33 2015 New Revision: 285182 URL: https://svnweb.freebsd.org/changeset/base/285182 Log: Check suspendability on the mountpoint returned by VOP_GETWRITEMOUNT. This obviates the need for a MNTK_SUSPENDABLE flag, since passthrough filesystems like nullfs and unionfs no longer need to inherit this information from their lower layer(s). This change also restores the pre-r273336 behaviour of using the presence of a susp_clean VFS method to request suspension support. Reviewed by: kib, mjg Differential Revision: https://reviews.freebsd.org/D2937 Modified: head/sys/fs/nullfs/null_vfsops.c head/sys/fs/tmpfs/tmpfs_vfsops.c head/sys/fs/unionfs/union_vfsops.c head/sys/kern/vfs_vnops.c head/sys/sys/mount.h head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Sun Jul 5 22:34:42 2015 (r285181) +++ head/sys/fs/nullfs/null_vfsops.c Sun Jul 5 22:37:33 2015 (r285182) @@ -199,7 +199,7 @@ nullfs_mount(struct mount *mp) } mp->mnt_kern_flag |= MNTK_LOOKUP_EXCL_DOTDOT; mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & - (MNTK_SUSPENDABLE | MNTK_USES_BCACHE); + MNTK_USES_BCACHE; MNT_IUNLOCK(mp); mp->mnt_data = xmp; vfs_getnewfsid(mp); Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Sun Jul 5 22:34:42 2015 (r285181) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Sun Jul 5 22:37:33 2015 (r285182) @@ -75,6 +75,7 @@ static int tmpfs_root(struct mount *, in static int tmpfs_fhtovp(struct mount *, struct fid *, int, struct vnode **); static int tmpfs_statfs(struct mount *, struct statfs *); +static void tmpfs_susp_clean(struct mount *); static const char *tmpfs_opts[] = { "from", "size", "maxfilesize", "inodes", "uid", "gid", "mode", "export", @@ -256,7 +257,7 @@ tmpfs_mount(struct mount *mp) MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_SUSPENDABLE; + mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED; MNT_IUNLOCK(mp); mp->mnt_data = tmp; @@ -463,6 +464,14 @@ tmpfs_sync(struct mount *mp, int waitfor } /* + * The presence of a susp_clean method tells the VFS to track writes. + */ +static void +tmpfs_susp_clean(struct mount *mp __unused) +{ +} + +/* * tmpfs vfs operations. */ @@ -473,5 +482,6 @@ struct vfsops tmpfs_vfsops = { .vfs_statfs = tmpfs_statfs, .vfs_fhtovp = tmpfs_fhtovp, .vfs_sync = tmpfs_sync, + .vfs_susp_clean = tmpfs_susp_clean, }; VFS_SET(tmpfs_vfsops, tmpfs, VFCF_JAIL); Modified: head/sys/fs/unionfs/union_vfsops.c ============================================================================== --- head/sys/fs/unionfs/union_vfsops.c Sun Jul 5 22:34:42 2015 (r285181) +++ head/sys/fs/unionfs/union_vfsops.c Sun Jul 5 22:37:33 2015 (r285182) @@ -294,9 +294,6 @@ unionfs_domount(struct mount *mp) if ((ump->um_lowervp->v_mount->mnt_flag & MNT_LOCAL) && (ump->um_uppervp->v_mount->mnt_flag & MNT_LOCAL)) mp->mnt_flag |= MNT_LOCAL; - - if ((ump->um_uppervp->v_mount->mnt_kern_flag & MNTK_SUSPENDABLE) != 0) - mp->mnt_kern_flag |= MNTK_SUSPENDABLE; MNT_IUNLOCK(mp); /* Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sun Jul 5 22:34:42 2015 (r285181) +++ head/sys/kern/vfs_vnops.c Sun Jul 5 22:37:33 2015 (r285182) @@ -1589,22 +1589,10 @@ vn_closefile(fp, td) } static bool -vn_suspendable_mp(struct mount *mp) +vn_suspendable(struct mount *mp) { - return ((mp->mnt_kern_flag & MNTK_SUSPENDABLE) != 0); -} - -static bool -vn_suspendable(struct vnode *vp, struct mount **mpp) -{ - - if (vp != NULL) - *mpp = vp->v_mount; - if (*mpp == NULL) - return (false); - - return (vn_suspendable_mp(*mpp)); + return (mp->mnt_op->vfs_susp_clean != NULL); } /* @@ -1657,11 +1645,6 @@ vn_start_write(struct vnode *vp, struct KASSERT((flags & V_MNTREF) == 0 || (*mpp != NULL && vp == NULL), ("V_MNTREF requires mp")); - if (!vn_suspendable(vp, mpp)) { - if ((flags & V_MNTREF) != 0) - vfs_rel(*mpp); - return (0); - } error = 0; /* @@ -1679,6 +1662,12 @@ vn_start_write(struct vnode *vp, struct if ((mp = *mpp) == NULL) return (0); + if (!vn_suspendable(mp)) { + if (vp != NULL || (flags & V_MNTREF) != 0) + vfs_rel(mp); + return (0); + } + /* * VOP_GETWRITEMOUNT() returns with the mp refcount held through * a vfs_ref(). @@ -1708,11 +1697,6 @@ vn_start_secondary_write(struct vnode *v KASSERT((flags & V_MNTREF) == 0 || (*mpp != NULL && vp == NULL), ("V_MNTREF requires mp")); - if (!vn_suspendable(vp, mpp)) { - if ((flags & V_MNTREF) != 0) - vfs_rel(*mpp); - return (0); - } retry: if (vp != NULL) { @@ -1730,6 +1714,12 @@ vn_start_secondary_write(struct vnode *v if ((mp = *mpp) == NULL) return (0); + if (!vn_suspendable(mp)) { + if (vp != NULL || (flags & V_MNTREF) != 0) + vfs_rel(mp); + return (0); + } + /* * VOP_GETWRITEMOUNT() returns with the mp refcount held through * a vfs_ref(). @@ -1772,7 +1762,7 @@ void vn_finished_write(mp) struct mount *mp; { - if (mp == NULL || !vn_suspendable_mp(mp)) + if (mp == NULL || !vn_suspendable(mp)) return; MNT_ILOCK(mp); MNT_REL(mp); @@ -1795,7 +1785,7 @@ void vn_finished_secondary_write(mp) struct mount *mp; { - if (mp == NULL || !vn_suspendable_mp(mp)) + if (mp == NULL || !vn_suspendable(mp)) return; MNT_ILOCK(mp); MNT_REL(mp); @@ -1818,7 +1808,7 @@ vfs_write_suspend(struct mount *mp, int { int error; - MPASS(vn_suspendable_mp(mp)); + MPASS(vn_suspendable(mp)); MNT_ILOCK(mp); if (mp->mnt_susp_owner == curthread) { @@ -1861,7 +1851,7 @@ void vfs_write_resume(struct mount *mp, int flags) { - MPASS(vn_suspendable_mp(mp)); + MPASS(vn_suspendable(mp)); MNT_ILOCK(mp); if ((mp->mnt_kern_flag & MNTK_SUSPEND) != 0) { @@ -1896,7 +1886,7 @@ vfs_write_suspend_umnt(struct mount *mp) { int error; - MPASS(vn_suspendable_mp(mp)); + MPASS(vn_suspendable(mp)); KASSERT((curthread->td_pflags & TDP_IGNSUSP) == 0, ("vfs_write_suspend_umnt: recursed")); Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Sun Jul 5 22:34:42 2015 (r285181) +++ head/sys/sys/mount.h Sun Jul 5 22:37:33 2015 (r285182) @@ -362,7 +362,7 @@ void __mnt_vnode_markerfree_act #define MNTK_SUSPEND 0x08000000 /* request write suspension */ #define MNTK_SUSPEND2 0x04000000 /* block secondary writes */ #define MNTK_SUSPENDED 0x10000000 /* write operations are suspended */ -#define MNTK_SUSPENDABLE 0x20000000 /* writes can be suspended */ +#define MNTK_UNUSED1 0x20000000 #define MNTK_LOOKUP_SHARED 0x40000000 /* FS supports shared lock lookups */ #define MNTK_NOKNOTE 0x80000000 /* Don't send KNOTEs from VOP hooks */ Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sun Jul 5 22:34:42 2015 (r285181) +++ head/sys/ufs/ffs/ffs_vfsops.c Sun Jul 5 22:37:33 2015 (r285182) @@ -1055,8 +1055,7 @@ ffs_mountfs(devvp, mp, td) */ MNT_ILOCK(mp); mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_EXTENDED_SHARED | - MNTK_NO_IOPF | MNTK_UNMAPPED_BUFS | MNTK_SUSPENDABLE | - MNTK_USES_BCACHE; + MNTK_NO_IOPF | MNTK_UNMAPPED_BUFS | MNTK_USES_BCACHE; MNT_IUNLOCK(mp); #ifdef UFS_EXTATTR #ifdef UFS_EXTATTR_AUTOSTART From owner-svn-src-all@freebsd.org Sun Jul 5 22:44:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC42A9928F2; Sun, 5 Jul 2015 22:44:42 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 BC3361925; Sun, 5 Jul 2015 22:44:42 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65Migoj011243; Sun, 5 Jul 2015 22:44:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65MigOb011242; Sun, 5 Jul 2015 22:44:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201507052244.t65MigOb011242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Jul 2015 22:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285183 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 22:44:42 -0000 Author: markj Date: Sun Jul 5 22:44:41 2015 New Revision: 285183 URL: https://svnweb.freebsd.org/changeset/base/285183 Log: Remove a stale descriptive comment for gbincore(). The splay trees referenced in the comment were converted to path-compressed tries in r250551. MFC after: 3 days Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Jul 5 22:37:33 2015 (r285182) +++ head/sys/kern/vfs_subr.c Sun Jul 5 22:44:41 2015 (r285183) @@ -1612,16 +1612,7 @@ buf_vlist_add(struct buf *bp, struct buf } /* - * Lookup a buffer using the splay tree. Note that we specifically avoid - * shadow buffers used in background bitmap writes. - * - * This code isn't quite efficient as it could be because we are maintaining - * two sorted lists and do not know which list the block resides in. - * - * During a "make buildworld" the desired buffer is found at one of - * the roots more than 60% of the time. Thus, checking both roots - * before performing either splay eliminates unnecessary splays on the - * first tree splayed. + * Look up a buffer using the buffer tries. */ struct buf * gbincore(struct bufobj *bo, daddr_t lblkno) From owner-svn-src-all@freebsd.org Sun Jul 5 22:49:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFF98992970; Sun, 5 Jul 2015 22:49:27 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 9A0001AE7; Sun, 5 Jul 2015 22:49:27 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65MnRBv011918; Sun, 5 Jul 2015 22:49:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65MnRZw011917; Sun, 5 Jul 2015 22:49:27 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201507052249.t65MnRZw011917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Jul 2015 22:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285184 - head/tests/sys/file X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 22:49:27 -0000 Author: markj Date: Sun Jul 5 22:49:26 2015 New Revision: 285184 URL: https://svnweb.freebsd.org/changeset/base/285184 Log: The bug caught by flock's test 16 was fixed by r268384. MFC after: 3 days Modified: head/tests/sys/file/flock_test.sh Modified: head/tests/sys/file/flock_test.sh ============================================================================== --- head/tests/sys/file/flock_test.sh Sun Jul 5 22:44:41 2015 (r285183) +++ head/tests/sys/file/flock_test.sh Sun Jul 5 22:49:26 2015 (r285184) @@ -32,7 +32,6 @@ # Testcase # 11 is racy; uses an undocumented kernel interface for testing # locking -# Testcase # 16 is racy/doesn't handle EINTR properly last_testcase=16 echo "1..$last_testcase" @@ -42,10 +41,6 @@ for n in `seq 1 $last_testcase`; do if [ $n -eq 11 ]; then todomsg=" # TODO: racy testcase" - # Test 16 fails: - # F_SETLKW on locked region by two threads: FAIL ((uintptr_t)res != 0) - elif [ $n -eq 16 ]; then - todomsg=" # TODO: racy testcase (doesn't handle EINTR properly)" fi $(dirname $0)/flock_helper . $n | grep -q SUCCEED From owner-svn-src-all@freebsd.org Sun Jul 5 22:56:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14685992B62; Sun, 5 Jul 2015 22:56:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 04B3D1ED7; Sun, 5 Jul 2015 22:56:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65MugNW016561; Sun, 5 Jul 2015 22:56:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65Mug3s016560; Sun, 5 Jul 2015 22:56:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201507052256.t65Mug3s016560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Jul 2015 22:56:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285185 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 22:56:43 -0000 Author: markj Date: Sun Jul 5 22:56:41 2015 New Revision: 285185 URL: https://svnweb.freebsd.org/changeset/base/285185 Log: Move the comment describing namei(9) back to namei()'s definition. MFC after: 3 days Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Sun Jul 5 22:49:26 2015 (r285184) +++ head/sys/kern/vfs_lookup.c Sun Jul 5 22:56:41 2015 (r285185) @@ -99,6 +99,16 @@ static int lookup_shared = 1; SYSCTL_INT(_vfs, OID_AUTO, lookup_shared, CTLFLAG_RWTUN, &lookup_shared, 0, "Enables/Disables shared locks for path name translation"); +static void +namei_cleanup_cnp(struct componentname *cnp) +{ + uma_zfree(namei_zone, cnp->cn_pnbuf); +#ifdef DIAGNOSTIC + cnp->cn_pnbuf = NULL; + cnp->cn_nameptr = NULL; +#endif +} + /* * Convert a pathname into a pointer to a locked vnode. * @@ -119,16 +129,6 @@ SYSCTL_INT(_vfs, OID_AUTO, lookup_shared * if symbolic link, massage name in buffer and continue * } */ -static void -namei_cleanup_cnp(struct componentname *cnp) -{ - uma_zfree(namei_zone, cnp->cn_pnbuf); -#ifdef DIAGNOSTIC - cnp->cn_pnbuf = NULL; - cnp->cn_nameptr = NULL; -#endif -} - int namei(struct nameidata *ndp) { From owner-svn-src-all@freebsd.org Sun Jul 5 23:23:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66102992FCD; Sun, 5 Jul 2015 23:23:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 541F01A6B; Sun, 5 Jul 2015 23:23:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65NNG7w030660; Sun, 5 Jul 2015 23:23:16 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65NNCIU030649; Sun, 5 Jul 2015 23:23:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201507052323.t65NNCIU030649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Jul 2015 23:23:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285186 - in head: . share/man/man4 share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 23:23:16 -0000 Author: markj Date: Sun Jul 5 23:23:12 2015 New Revision: 285186 URL: https://svnweb.freebsd.org/changeset/base/285186 Log: Rename the dtrace-* man pages to dtrace_* for consistency with other subsection man pages (e.g. geom_*, mac_*, snd_*). Added: head/share/man/man4/dtrace_io.4 - copied, changed from r285185, head/share/man/man4/dtrace-io.4 head/share/man/man4/dtrace_ip.4 - copied, changed from r285185, head/share/man/man4/dtrace-ip.4 head/share/man/man4/dtrace_proc.4 - copied, changed from r285185, head/share/man/man4/dtrace-proc.4 head/share/man/man4/dtrace_sched.4 - copied, changed from r285185, head/share/man/man4/dtrace-sched.4 head/share/man/man4/dtrace_tcp.4 - copied, changed from r285185, head/share/man/man4/dtrace-tcp.4 head/share/man/man4/dtrace_udp.4 - copied, changed from r285185, head/share/man/man4/dtrace-udp.4 Deleted: head/share/man/man4/dtrace-io.4 head/share/man/man4/dtrace-ip.4 head/share/man/man4/dtrace-proc.4 head/share/man/man4/dtrace-sched.4 head/share/man/man4/dtrace-tcp.4 head/share/man/man4/dtrace-udp.4 Modified: head/ObsoleteFiles.inc head/share/man/man4/Makefile head/share/man/man9/SDT.9 Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Jul 5 22:56:41 2015 (r285185) +++ head/ObsoleteFiles.inc Sun Jul 5 23:23:12 2015 (r285186) @@ -38,6 +38,13 @@ # xargs -n1 | sort | uniq -d; # done +# 20150705: Rename DTrace provider man pages. +OLD_FILES+=usr/share/man/man4/dtrace-io.4.gz +OLD_FILES+=usr/share/man/man4/dtrace-ip.4.gz +OLD_FILES+=usr/share/man/man4/dtrace-proc.4.gz +OLD_FILES+=usr/share/man/man4/dtrace-sched.4.gz +OLD_FILES+=usr/share/man/man4/dtrace-tcp.4.gz +OLD_FILES+=usr/share/man/man4/dtrace-udp.4.gz # 20150604: Move nvlist man pages to section 9. OLD_FILES+=usr/share/man/man3/libnv.3.gz OLD_FILES+=usr/share/man/man3/nvlist.3.gz Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun Jul 5 22:56:41 2015 (r285185) +++ head/share/man/man4/Makefile Sun Jul 5 23:23:12 2015 (r285186) @@ -820,12 +820,12 @@ _ccd.4= ccd.4 .endif .if ${MK_CDDL} != "no" -_dtrace_io.4= dtrace-io.4 -_dtrace_ip.4= dtrace-ip.4 -_dtrace_proc.4= dtrace-proc.4 -_dtrace_sched.4= dtrace-sched.4 -_dtrace_tcp.4= dtrace-tcp.4 -_dtrace_udp.4= dtrace-udp.4 +_dtrace_io.4= dtrace_io.4 +_dtrace_ip.4= dtrace_ip.4 +_dtrace_proc.4= dtrace_proc.4 +_dtrace_sched.4= dtrace_sched.4 +_dtrace_tcp.4= dtrace_tcp.4 +_dtrace_udp.4= dtrace_udp.4 .endif .if ${MK_ISCSI} != "no" Copied and modified: head/share/man/man4/dtrace_io.4 (from r285185, head/share/man/man4/dtrace-io.4) ============================================================================== --- head/share/man/man4/dtrace-io.4 Sun Jul 5 22:56:41 2015 (r285185, copy source) +++ head/share/man/man4/dtrace_io.4 Sun Jul 5 23:23:12 2015 (r285186) @@ -25,10 +25,10 @@ .\" $FreeBSD$ .\" .Dd April 18, 2015 -.Dt DTRACE-IO 4 +.Dt DTRACE_IO 4 .Os .Sh NAME -.Nm dtrace-io +.Nm dtrace_io .Nd a DTrace provider for tracing events related to disk I/O .Sh SYNOPSIS .Fn io:::start "struct bio *" "struct devstat *" Copied and modified: head/share/man/man4/dtrace_ip.4 (from r285185, head/share/man/man4/dtrace-ip.4) ============================================================================== --- head/share/man/man4/dtrace-ip.4 Sun Jul 5 22:56:41 2015 (r285185, copy source) +++ head/share/man/man4/dtrace_ip.4 Sun Jul 5 23:23:12 2015 (r285186) @@ -25,10 +25,10 @@ .\" $FreeBSD$ .\" .Dd April 18, 2015 -.Dt DTRACE-IP 4 +.Dt DTRACE_IP 4 .Os .Sh NAME -.Nm dtrace-ip +.Nm dtrace_ip .Nd a DTrace provider for tracing events related to the IPv4 and IPv6 protocols .Sh SYNOPSIS .Fn ip:::receive "pktinfo_t *" "csinfo_t *" "ipinfo_t *" "ifinfo_t *" \ @@ -52,9 +52,9 @@ The arguments to these probes can be use the IP headers of the corresponding packet, as well as the network interface on which the packet was sent or received. Unlike the -.Xr dtrace-tcp 4 +.Xr dtrace_tcp 4 and -.Xr dtrace-udp 4 +.Xr dtrace_udp 4 providers, .Nm ip provider probes are triggered by forwarded packets. @@ -268,8 +268,8 @@ This provider is compatible with the providers found in Solaris and Darwin. .Sh SEE ALSO .Xr dtrace 1 , -.Xr dtrace-tcp 4 , -.Xr dtrace-udp 4 , +.Xr dtrace_tcp 4 , +.Xr dtrace_udp 4 , .Xr ip 4 , .Xr ip6 4 , .Xr ifnet 9 , Copied and modified: head/share/man/man4/dtrace_proc.4 (from r285185, head/share/man/man4/dtrace-proc.4) ============================================================================== --- head/share/man/man4/dtrace-proc.4 Sun Jul 5 22:56:41 2015 (r285185, copy source) +++ head/share/man/man4/dtrace_proc.4 Sun Jul 5 23:23:12 2015 (r285186) @@ -25,10 +25,10 @@ .\" $FreeBSD$ .\" .Dd April 18, 2015 -.Dt DTRACE-PROC 4 +.Dt DTRACE_PROC 4 .Os .Sh NAME -.Nm dtrace-proc +.Nm dtrace_proc .Nd a DTrace provider for tracing events related to user processes .Sh SYNOPSIS .Fn proc:::create "struct proc *" "struct proc *" "int" @@ -251,7 +251,7 @@ provider probes found in Solaris are not .Xr vfork 2 , .Xr siginfo 3 , .Xr signal 3 , -.Xr dtrace-sched 4 , +.Xr dtrace_sched 4 , .Xr kproc 9 .Sh HISTORY The Copied and modified: head/share/man/man4/dtrace_sched.4 (from r285185, head/share/man/man4/dtrace-sched.4) ============================================================================== --- head/share/man/man4/dtrace-sched.4 Sun Jul 5 22:56:41 2015 (r285185, copy source) +++ head/share/man/man4/dtrace_sched.4 Sun Jul 5 23:23:12 2015 (r285186) @@ -25,10 +25,10 @@ .\" $FreeBSD$ .\" .Dd April 18, 2015 -.Dt DTRACE-SCHED 4 +.Dt DTRACE_SCHED 4 .Os .Sh NAME -.Nm dtrace-sched +.Nm dtrace_sched .Nd a DTrace provider for tracing CPU scheduling events .Sh SYNOPSIS .Fn sched:::change-pri "struct thread *" "struct proc *" "uint8_t" Copied and modified: head/share/man/man4/dtrace_tcp.4 (from r285185, head/share/man/man4/dtrace-tcp.4) ============================================================================== --- head/share/man/man4/dtrace-tcp.4 Sun Jul 5 22:56:41 2015 (r285185, copy source) +++ head/share/man/man4/dtrace_tcp.4 Sun Jul 5 23:23:12 2015 (r285186) @@ -25,10 +25,10 @@ .\" $FreeBSD$ .\" .Dd April 18, 2015 -.Dt DTRACE-TCP 4 +.Dt DTRACE_TCP 4 .Os .Sh NAME -.Nm dtrace-tcp +.Nm dtrace_tcp .Nd a DTrace provider for tracing events related to the .Xr tcp 4 protocol @@ -56,9 +56,9 @@ provider allows users to trace events in .Xr tcp 4 protocol implementation. This provider is similar to the -.Xr dtrace-ip 4 +.Xr dtrace_ip 4 and -.Xr dtrace-udp 4 +.Xr dtrace_udp 4 providers, but additionally contains probes corresponding to protocol events at a level higher than packet reception and transmission. All @@ -120,12 +120,12 @@ and .Fn tcp:::receive probes fire when the host sends or receives a TCP packet, respectively. As with the -.Xr dtrace-udp 4 +.Xr dtrace_udp 4 provider, .Nm tcp probes fire only for packets sent by or to the local host; forwarded packets are handled in the IP layer and are only visible to the -.Xr dtrace-ip 4 +.Xr dtrace_ip 4 provider. .Pp The @@ -168,7 +168,7 @@ The .Vt ipinfo_t type is a version-agnostic representation of fields from an IP header. Its fields are described in the -.Xr dtrace-ip 4 +.Xr dtrace_ip 4 manual page. .Pp The @@ -373,8 +373,8 @@ This provider is compatible with the provider in Solaris. .Sh SEE ALSO .Xr dtrace 1 , -.Xr dtrace-ip 4 , -.Xr dtrace-udp 4 , +.Xr dtrace_ip 4 , +.Xr dtrace_udp 4 , .Xr tcp 4 , .Xr SDT 9 .Sh HISTORY Copied and modified: head/share/man/man4/dtrace_udp.4 (from r285185, head/share/man/man4/dtrace-udp.4) ============================================================================== --- head/share/man/man4/dtrace-udp.4 Sun Jul 5 22:56:41 2015 (r285185, copy source) +++ head/share/man/man4/dtrace_udp.4 Sun Jul 5 23:23:12 2015 (r285186) @@ -25,10 +25,10 @@ .\" $FreeBSD$ .\" .Dd April 18, 2015 -.Dt DTRACE-UDP 4 +.Dt DTRACE_UDP 4 .Os .Sh NAME -.Nm dtrace-udp +.Nm dtrace_udp .Nd a DTrace provider for tracing events related to the UDP protocol .Sh SYNOPSIS .Fn udp:::receive "pktinfo_t *" "csinfo_t *" "ipinfo_t *" "udpsinfo_t *" \ @@ -184,8 +184,8 @@ This provider is compatible with the provider in Solaris. .Sh SEE ALSO .Xr dtrace 1 , -.Xr dtrace-ip 4 , -.Xr dtrace-tcp 4 , +.Xr dtrace_ip 4 , +.Xr dtrace_tcp 4 , .Xr udp 4 , .Xr SDT 9 .Sh HISTORY Modified: head/share/man/man9/SDT.9 ============================================================================== --- head/share/man/man9/SDT.9 Sun Jul 5 22:56:41 2015 (r285185) +++ head/share/man/man9/SDT.9 Sun Jul 5 23:23:12 2015 (r285186) @@ -305,12 +305,12 @@ SDT_PROBE_DEFINE1_XLATE(ip, , , receive, .Ed .Sh SEE ALSO .Xr dtrace 1 , -.Xr dtrace-io 4 , -.Xr dtrace-ip 4 , -.Xr dtrace-proc 4 , -.Xr dtrace-sched 4 , -.Xr dtrace-tcp 4 , -.Xr dtrace-udp 4 +.Xr dtrace_io 4 , +.Xr dtrace_ip 4 , +.Xr dtrace_proc 4 , +.Xr dtrace_sched 4 , +.Xr dtrace_tcp 4 , +.Xr dtrace_udp 4 .Sh AUTHORS .An -nosplit DTrace and the From owner-svn-src-all@freebsd.org Sun Jul 5 23:24:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC72E992FFF; Sun, 5 Jul 2015 23:24:53 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 BCC411BE4; Sun, 5 Jul 2015 23:24:53 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t65NOr1w030925; Sun, 5 Jul 2015 23:24:53 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t65NOrqB030924; Sun, 5 Jul 2015 23:24:53 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201507052324.t65NOrqB030924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Jul 2015 23:24:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285187 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 23:24:53 -0000 Author: markj Date: Sun Jul 5 23:24:52 2015 New Revision: 285187 URL: https://svnweb.freebsd.org/changeset/base/285187 Log: Remove a BUGS entry that was addressed by r282300. Modified: head/share/man/man4/dtrace_tcp.4 Modified: head/share/man/man4/dtrace_tcp.4 ============================================================================== --- head/share/man/man4/dtrace_tcp.4 Sun Jul 5 23:23:12 2015 (r285186) +++ head/share/man/man4/dtrace_tcp.4 Sun Jul 5 23:24:52 2015 (r285187) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 18, 2015 +.Dd July 5, 2015 .Dt DTRACE_TCP 4 .Os .Sh NAME @@ -388,10 +388,6 @@ This manual page was written by .An Mark Johnston Aq Mt markj@FreeBSD.org . .Sh BUGS The -.Fn tcp:::state-change -probe does not fire upon transitions to the TIME-WAIT state. -.Pp -The .Vt tcps_local and .Vt tcps_active From owner-svn-src-all@freebsd.org Mon Jul 6 01:42:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6DEE99A2; Mon, 6 Jul 2015 01:42:14 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 9C34311E9; Mon, 6 Jul 2015 01:42:14 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t661gDRg001585; Mon, 6 Jul 2015 01:42:13 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t661gDMi001581; Mon, 6 Jul 2015 01:42:13 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201507060142.t661gDMi001581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Mon, 6 Jul 2015 01:42:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285188 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 01:42:14 -0000 Author: pkelsey Date: Mon Jul 6 01:42:12 2015 New Revision: 285188 URL: https://svnweb.freebsd.org/changeset/base/285188 Log: Fix sysctl(3) so it returns the intended values for all mib names in the 'user' sysctl tree, which have all been coming back 0 or empty since r240176. Differential Revision: https://reviews.freebsd.org/D2945 Reviewed by: sbruno Approved by: jmallett (mentor) MFC after: 3 days Modified: head/lib/libc/gen/sysctl.c Modified: head/lib/libc/gen/sysctl.c ============================================================================== --- head/lib/libc/gen/sysctl.c Sun Jul 5 23:24:52 2015 (r285187) +++ head/lib/libc/gen/sysctl.c Mon Jul 6 01:42:12 2015 (r285188) @@ -51,9 +51,21 @@ sysctl(const int *name, u_int namelen, v const void *newp, size_t newlen) { int retval; + size_t orig_oldlen; + orig_oldlen = oldlenp ? *oldlenp : 0; retval = __sysctl(name, namelen, oldp, oldlenp, newp, newlen); - if (retval != -1 || errno != ENOENT || name[0] != CTL_USER) + /* + * All valid names under CTL_USER have a dummy entry in the sysctl + * tree (to support name lookups and enumerations) with an + * empty/zero value, and the true value is supplied by this routine. + * For all such names, __sysctl() is used solely to validate the + * name. + * + * Return here unless there was a successful lookup for a CTL_USER + * name. + */ + if (retval || name[0] != CTL_USER) return (retval); if (newp != NULL) { @@ -67,7 +79,7 @@ sysctl(const int *name, u_int namelen, v switch (name[1]) { case USER_CS_PATH: - if (oldp && *oldlenp < sizeof(_PATH_STDPATH)) { + if (oldp && orig_oldlen < sizeof(_PATH_STDPATH)) { errno = ENOMEM; return -1; } From owner-svn-src-all@freebsd.org Mon Jul 6 01:48:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D331E9B44; Mon, 6 Jul 2015 01:48:24 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 C3C0F158A; Mon, 6 Jul 2015 01:48:24 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t661mOGs002787; Mon, 6 Jul 2015 01:48:24 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t661mOkg002786; Mon, 6 Jul 2015 01:48:24 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201507060148.t661mOkg002786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Mon, 6 Jul 2015 01:48:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285189 - head/usr.sbin/iovctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 01:48:24 -0000 Author: pkelsey Date: Mon Jul 6 01:48:23 2015 New Revision: 285189 URL: https://svnweb.freebsd.org/changeset/base/285189 Log: Fix range upper bound for uint32_t and uint64_t, and reformat range description for uint8_t, uint16_t, uint32_t, and uint64_t. Differential Revision: https://reviews.freebsd.org/D2988 Reviewed by: rstone, wblock Approved by: jmallett (mentor) Sponsored by: Norse Corp, Inc. Modified: head/usr.sbin/iovctl/iovctl.conf.5 Modified: head/usr.sbin/iovctl/iovctl.conf.5 ============================================================================== --- head/usr.sbin/iovctl/iovctl.conf.5 Mon Jul 6 01:42:12 2015 (r285188) +++ head/usr.sbin/iovctl/iovctl.conf.5 Mon Jul 6 01:48:23 2015 (r285189) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 21, 2014 +.Dd July 5, 2015 .Dt IOVCTL.CONF 5 .Os .Sh NAME @@ -103,13 +103,17 @@ xx:xx:xx:xx:xx:xx, where xx is one or tw .It string Accepts any string value. .It uint8_t -Accepts any integer in the range 0-255, inclusive. +Accepts any integer in the range 0 to 255, inclusive. .It uint16_t -Accepts any integer in the range 0-65535, inclusive. +Accepts any integer in the range 0 to 65535, inclusive. .It uint32_t -Accepts any integer in the range 0-2**32, inclusive. +Accepts any integer in the range 0 to +.Po 2**32 - 1 Pc , +inclusive. .It uint64_t -Accepts any integer in the range 0-2**64, inclusive. +Accepts any integer in the range 0 to +.Po 2**64 - 1 Pc , +inclusive. .El .Sh OPTIONS The following parameters are accepted by all PF drivers: From owner-svn-src-all@freebsd.org Mon Jul 6 02:12:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33A2E98E193; Mon, 6 Jul 2015 02:12:50 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 2404910A0; Mon, 6 Jul 2015 02:12:50 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t662CopR018318; Mon, 6 Jul 2015 02:12:50 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t662Com6018317; Mon, 6 Jul 2015 02:12:50 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201507060212.t662Com6018317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Mon, 6 Jul 2015 02:12:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285190 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 02:12:50 -0000 Author: pkelsey Date: Mon Jul 6 02:12:49 2015 New Revision: 285190 URL: https://svnweb.freebsd.org/changeset/base/285190 Log: Fix if_loop so bpfwrite() can use it regardless of the state of bd_hdrcmplt. As if_loop does not use link-level headers, its behavior when used by bpfwrite() should be the same regardless of the state of bd_hdrcmplt. Without this change, libpcap (and other BPF users that work like it) fail when writing to loopback interfaces. Differential Revision: https://reviews.freebsd.org/D2989 Reviewed by: gnn, melifaro Approved by: jmallett (mentor) MFC after: 3 days Modified: head/sys/net/if_loop.c Modified: head/sys/net/if_loop.c ============================================================================== --- head/sys/net/if_loop.c Mon Jul 6 01:48:23 2015 (r285189) +++ head/sys/net/if_loop.c Mon Jul 6 02:12:49 2015 (r285190) @@ -229,7 +229,7 @@ looutput(struct ifnet *ifp, struct mbuf if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len); /* BPF writes need to be handled specially. */ - if (dst->sa_family == AF_UNSPEC) + if (dst->sa_family == AF_UNSPEC || dst->sa_family == pseudo_AF_HDRCMPLT) bcopy(dst->sa_data, &af, sizeof(af)); else af = dst->sa_family; From owner-svn-src-all@freebsd.org Mon Jul 6 02:16:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6CF098E1F5; Mon, 6 Jul 2015 02:16:13 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 A4B1C1246; Mon, 6 Jul 2015 02:16:13 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t662GDqV019070; Mon, 6 Jul 2015 02:16:13 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t662G9GV019047; Mon, 6 Jul 2015 02:16:09 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201507060216.t662G9GV019047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Mon, 6 Jul 2015 02:16:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r285191 - in vendor/tcpdump/dist: . missing tests win32/Src X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 02:16:13 -0000 Author: pkelsey Date: Mon Jul 6 02:16:08 2015 New Revision: 285191 URL: https://svnweb.freebsd.org/changeset/base/285191 Log: Vendor import of tcpdump 4.7.4. Approved by: jmallett (mentor) Added: vendor/tcpdump/dist/print-ftp.c (contents, props changed) vendor/tcpdump/dist/print-geneve.c (contents, props changed) vendor/tcpdump/dist/print-http.c (contents, props changed) vendor/tcpdump/dist/print-rtsp.c (contents, props changed) vendor/tcpdump/dist/print-smtp.c (contents, props changed) vendor/tcpdump/dist/tests/RADIUS-RFC4675.pcap (contents, props changed) vendor/tcpdump/dist/tests/RADIUS-RFC5176.pcap (contents, props changed) vendor/tcpdump/dist/tests/cve2015-0261-crash.out vendor/tcpdump/dist/tests/cve2015-0261-crash.pcap (contents, props changed) vendor/tcpdump/dist/tests/cve2015-0261-ipv6.out vendor/tcpdump/dist/tests/cve2015-0261-ipv6.pcap (contents, props changed) vendor/tcpdump/dist/tests/dhcp-rfc3004-v.out vendor/tcpdump/dist/tests/dhcp-rfc3004.pcap (contents, props changed) vendor/tcpdump/dist/tests/dhcp-rfc5859-v.out vendor/tcpdump/dist/tests/dhcp-rfc5859.pcap (contents, props changed) vendor/tcpdump/dist/tests/geneve-tcp.out vendor/tcpdump/dist/tests/geneve-vni.out vendor/tcpdump/dist/tests/geneve-vv.out vendor/tcpdump/dist/tests/geneve.pcap (contents, props changed) vendor/tcpdump/dist/tests/kday1.out vendor/tcpdump/dist/tests/kday1.pcap (contents, props changed) vendor/tcpdump/dist/tests/kday2.out vendor/tcpdump/dist/tests/kday2.pcap (contents, props changed) vendor/tcpdump/dist/tests/kday3.out vendor/tcpdump/dist/tests/kday3.pcap (contents, props changed) vendor/tcpdump/dist/tests/kday4.out vendor/tcpdump/dist/tests/kday4.pcap (contents, props changed) vendor/tcpdump/dist/tests/kday5.out vendor/tcpdump/dist/tests/kday5.pcap (contents, props changed) vendor/tcpdump/dist/tests/kday6.out vendor/tcpdump/dist/tests/kday6.pcap (contents, props changed) vendor/tcpdump/dist/tests/kday7.out vendor/tcpdump/dist/tests/kday7.pcap (contents, props changed) vendor/tcpdump/dist/tests/kday8.out vendor/tcpdump/dist/tests/kday8.pcap (contents, props changed) vendor/tcpdump/dist/tests/of10_7050sx_bsn-vv.out vendor/tcpdump/dist/tests/of10_7050sx_bsn.pcap (contents, props changed) vendor/tcpdump/dist/tests/radius-rfc4675-v.out (contents, props changed) vendor/tcpdump/dist/tests/radius-rfc5176-v.out Deleted: vendor/tcpdump/dist/bootp.h vendor/tcpdump/dist/win32/Src/ Modified: vendor/tcpdump/dist/CHANGES vendor/tcpdump/dist/CREDITS vendor/tcpdump/dist/INSTALL.txt vendor/tcpdump/dist/Makefile.in vendor/tcpdump/dist/VERSION vendor/tcpdump/dist/aclocal.m4 vendor/tcpdump/dist/addrtoname.c vendor/tcpdump/dist/addrtoname.h vendor/tcpdump/dist/config.guess vendor/tcpdump/dist/config.h.in vendor/tcpdump/dist/config.sub vendor/tcpdump/dist/configure vendor/tcpdump/dist/configure.in vendor/tcpdump/dist/extract.h vendor/tcpdump/dist/interface.h vendor/tcpdump/dist/ip.h vendor/tcpdump/dist/machdep.c vendor/tcpdump/dist/missing/strsep.c vendor/tcpdump/dist/mkdep vendor/tcpdump/dist/netdissect.h vendor/tcpdump/dist/openflow.h vendor/tcpdump/dist/oui.c vendor/tcpdump/dist/oui.h vendor/tcpdump/dist/print-ahcp.c vendor/tcpdump/dist/print-aodv.c vendor/tcpdump/dist/print-arcnet.c vendor/tcpdump/dist/print-arp.c vendor/tcpdump/dist/print-ascii.c vendor/tcpdump/dist/print-atm.c vendor/tcpdump/dist/print-babel.c vendor/tcpdump/dist/print-bgp.c vendor/tcpdump/dist/print-bootp.c vendor/tcpdump/dist/print-cdp.c vendor/tcpdump/dist/print-cfm.c vendor/tcpdump/dist/print-chdlc.c vendor/tcpdump/dist/print-cnfp.c vendor/tcpdump/dist/print-dccp.c vendor/tcpdump/dist/print-decnet.c vendor/tcpdump/dist/print-eigrp.c vendor/tcpdump/dist/print-enc.c vendor/tcpdump/dist/print-ether.c vendor/tcpdump/dist/print-forces.c vendor/tcpdump/dist/print-fr.c vendor/tcpdump/dist/print-geonet.c vendor/tcpdump/dist/print-gre.c vendor/tcpdump/dist/print-icmp.c vendor/tcpdump/dist/print-icmp6.c vendor/tcpdump/dist/print-ip.c vendor/tcpdump/dist/print-ip6.c vendor/tcpdump/dist/print-ipnet.c vendor/tcpdump/dist/print-isoclns.c vendor/tcpdump/dist/print-juniper.c vendor/tcpdump/dist/print-ldp.c vendor/tcpdump/dist/print-lldp.c vendor/tcpdump/dist/print-lmp.c vendor/tcpdump/dist/print-lspping.c vendor/tcpdump/dist/print-lwapp.c vendor/tcpdump/dist/print-mobility.c vendor/tcpdump/dist/print-mpcp.c vendor/tcpdump/dist/print-mpls.c vendor/tcpdump/dist/print-nflog.c vendor/tcpdump/dist/print-null.c vendor/tcpdump/dist/print-olsr.c vendor/tcpdump/dist/print-openflow-1.0.c vendor/tcpdump/dist/print-openflow.c vendor/tcpdump/dist/print-ospf.c vendor/tcpdump/dist/print-pflog.c vendor/tcpdump/dist/print-pim.c vendor/tcpdump/dist/print-ppi.c vendor/tcpdump/dist/print-ppp.c vendor/tcpdump/dist/print-radius.c vendor/tcpdump/dist/print-rpki-rtr.c vendor/tcpdump/dist/print-rsvp.c vendor/tcpdump/dist/print-sflow.c vendor/tcpdump/dist/print-sip.c vendor/tcpdump/dist/print-sl.c vendor/tcpdump/dist/print-sll.c vendor/tcpdump/dist/print-slow.c vendor/tcpdump/dist/print-smb.c vendor/tcpdump/dist/print-tcp.c vendor/tcpdump/dist/print-telnet.c vendor/tcpdump/dist/print-udp.c vendor/tcpdump/dist/print-vxlan.c vendor/tcpdump/dist/print-wb.c vendor/tcpdump/dist/print-zeromq.c vendor/tcpdump/dist/tcp.h vendor/tcpdump/dist/tcpdump.1.in vendor/tcpdump/dist/tcpdump.c vendor/tcpdump/dist/tests/TESTLIST vendor/tcpdump/dist/tests/TESTonce vendor/tcpdump/dist/tests/TESTrun.sh vendor/tcpdump/dist/tests/bgp_infloop-v.out vendor/tcpdump/dist/tests/bgp_vpn_attrset.out vendor/tcpdump/dist/tests/cdp-v.out vendor/tcpdump/dist/tests/crypto.sh vendor/tcpdump/dist/tests/dccp_partial_csum_v4_longer.out vendor/tcpdump/dist/tests/dccp_partial_csum_v4_simple.out vendor/tcpdump/dist/tests/dccp_partial_csum_v6_longer.out vendor/tcpdump/dist/tests/dccp_partial_csum_v6_simple.out vendor/tcpdump/dist/tests/forces1vvv.out vendor/tcpdump/dist/tests/forces1vvvv.out vendor/tcpdump/dist/tests/lldp_cdp-ev.out vendor/tcpdump/dist/tests/lmp-v.sh vendor/tcpdump/dist/tests/mpbgp-linklocal-nexthop.out vendor/tcpdump/dist/tests/of10_7050q-v.out vendor/tcpdump/dist/tests/of10_p3295-vv.out vendor/tcpdump/dist/tests/print-A.out vendor/tcpdump/dist/tests/print-AA.out vendor/tcpdump/dist/tests/print-capX.out vendor/tcpdump/dist/tests/print-capXX.out vendor/tcpdump/dist/tests/print-x.out vendor/tcpdump/dist/tests/print-xx.out vendor/tcpdump/dist/tests/radius-v.out vendor/tcpdump/dist/tests/rpl-14-daovvv.out vendor/tcpdump/dist/tests/rpl-19-pickdag.out vendor/tcpdump/dist/tests/rpl-19-pickdagvvv.out vendor/tcpdump/dist/udp.h vendor/tcpdump/dist/util.c Modified: vendor/tcpdump/dist/CHANGES ============================================================================== --- vendor/tcpdump/dist/CHANGES Mon Jul 6 02:12:49 2015 (r285190) +++ vendor/tcpdump/dist/CHANGES Mon Jul 6 02:16:08 2015 (r285191) @@ -1,4 +1,35 @@ +Friday April 10, 2015 guy@alum.mit.edu + Summary for 4.7.4 tcpdump release + RPKI to Router Protocol: Fix Segmentation Faults and other problems + RPKI to Router Protocol: print strings with fn_printn() + wb: fix some bounds checks + +Wednesday March 11, 2015 mcr@sandelman.ca + Summary for 4.7.3 tcpdump release + Capsicum fixes for FreeBSD 10 + +Tuesday March 10, 2015 mcr@sandelman.ca + Summary for 4.7.2 tcpdump release + DCCP: update Packet Types with RFC4340/IANA names + fixes for CVE-2015-0261: IPv6 mobility header check issue + fixes for CVE-2015-2153, 2154, 2155: kday packets + +Friday Nov. 12, 2014 guy@alum.mit.edu + Summary for 4.7.0 tcpdump release + changes to hex printing of CDP packets + Fix PPI printing + Radius: update Packet Type Codes and Attribute Types with RFC/IANA names + Add a routine to print "text protocols", and add FTP/HTTP/SMTP/RTSP support. + improvements to telnet printer, even if not -v + omit length for bcp, print-tcp uses it + formatting fixes for a bunch of protocols + new bounds checks for a number of protocols + split netflow 1,6, and 6 dissector up. + added geneve dissector + CVE-2014-9140 PPP dissector fixed. + Tuesday Sep. 2, 2014 mcr@sandelman.ca + Summary for 4.6.2 tcpdump release fix out-of-source-tree builds: find libpcap that is out of source better configure check for libsmi Modified: vendor/tcpdump/dist/CREDITS ============================================================================== --- vendor/tcpdump/dist/CREDITS Mon Jul 6 02:12:49 2015 (r285190) +++ vendor/tcpdump/dist/CREDITS Mon Jul 6 02:16:08 2015 (r285191) @@ -2,7 +2,7 @@ This file lists people who have contribu The current maintainers: Bill Fenner - Denis Ovsienko + Denis Ovsienko Fulvio Risso Guy Harris Hannes Gredler @@ -85,6 +85,7 @@ Additional people who have contributed p Harry Raaymakers Heinz-Ado Arnolds Hendrik Scholz + Herwin Weststrate Ian McDonald Ilpo Järvinen Jacek Tobiasz @@ -95,6 +96,7 @@ Additional people who have contributed p Jefferson Ogata Jeffrey Hutzelman Jesper Peterson + Jesse Gross Jim Hutchins João Medeiros Joerg Mayer Modified: vendor/tcpdump/dist/INSTALL.txt ============================================================================== --- vendor/tcpdump/dist/INSTALL.txt Mon Jul 6 02:12:49 2015 (r285190) +++ vendor/tcpdump/dist/INSTALL.txt Mon Jul 6 02:16:08 2015 (r285191) @@ -52,7 +52,6 @@ appletalk.h - AppleTalk definitions atime.awk - TCP ack awk script atm.h - ATM traffic type definitions atmuni31.h - ATM Q.2931 definitions -bootp.h - BOOTP definitions bpf_dump.c - BPF program printing routines, in case libpcap doesn't have them chdlc.h - Cisco HDLC definitions Modified: vendor/tcpdump/dist/Makefile.in ============================================================================== --- vendor/tcpdump/dist/Makefile.in Mon Jul 6 02:12:49 2015 (r285190) +++ vendor/tcpdump/dist/Makefile.in Mon Jul 6 02:16:08 2015 (r285191) @@ -124,13 +124,17 @@ LIBNETDISSECT_SRC=\ print-fddi.c \ print-forces.c \ print-fr.c \ + print-ftp.c \ + print-geneve.c \ print-geonet.c \ print-gre.c \ print-hsrp.c \ + print-http.c \ print-icmp.c \ print-igmp.c \ print-igrp.c \ print-ip.c \ + print-ip6.c \ print-ipcomp.c \ print-ipfc.c \ print-ipnet.c \ @@ -178,6 +182,7 @@ LIBNETDISSECT_SRC=\ print-rpki-rtr.c \ print-rrcp.c \ print-rsvp.c \ + print-rtsp.c \ print-rx.c \ print-sctp.c \ print-sflow.c \ @@ -185,6 +190,7 @@ LIBNETDISSECT_SRC=\ print-sl.c \ print-sll.c \ print-slow.c \ + print-smtp.c \ print-snmp.c \ print-stp.c \ print-sunatm.c \ @@ -231,7 +237,6 @@ HDR = \ appletalk.h \ atm.h \ atmuni31.h \ - bootp.h \ chdlc.h \ cpack.h \ ether.h \ @@ -241,7 +246,6 @@ HDR = \ gmpls.h \ gmt2local.h \ interface.h \ - interface.h \ ip.h \ ip6.h \ ipproto.h \ @@ -330,7 +334,6 @@ EXTRA_DIST = \ print-dhcp6.c \ print-frag6.c \ print-icmp6.c \ - print-ip6.c \ print-ip6opts.c \ print-mobility.c \ print-ospf6.c \ Modified: vendor/tcpdump/dist/VERSION ============================================================================== --- vendor/tcpdump/dist/VERSION Mon Jul 6 02:12:49 2015 (r285190) +++ vendor/tcpdump/dist/VERSION Mon Jul 6 02:16:08 2015 (r285191) @@ -1 +1 @@ -4.6.2 +4.7.4 Modified: vendor/tcpdump/dist/aclocal.m4 ============================================================================== --- vendor/tcpdump/dist/aclocal.m4 Mon Jul 6 02:12:49 2015 (r285190) +++ vendor/tcpdump/dist/aclocal.m4 Mon Jul 6 02:16:08 2015 (r285191) @@ -438,27 +438,31 @@ AC_DEFUN(AC_LBL_LIBPCAP, LIBS="$LIBS $pfopen" fi fi - AC_MSG_CHECKING(for local pcap library) - libpcap=FAIL - lastdir=FAIL - places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \ - egrep '/libpcap-[[0-9]]+\.[[0-9]]+(\.[[0-9]]*)?([[ab]][[0-9]]*|-PRE-GIT)?$'` - places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \ - egrep '/libpcap-[[0-9]]+\.[[0-9]]+(\.[[0-9]]*)?([[ab]][[0-9]]*|-PRE-GIT)?$'` - for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do - basedir=`echo $dir | sed -e 's/[[ab]][[0-9]]*$//' | \ - sed -e 's/-PRE-GIT$//' ` - if test $lastdir = $basedir ; then - dnl skip alphas when an actual release is present - continue; - fi - lastdir=$dir - if test -r $dir/libpcap.a ; then - libpcap=$dir/libpcap.a - d=$dir - dnl continue and select the last one that exists - fi - done + libpcap=FAIL + AC_MSG_CHECKING(for local pcap library) + AC_ARG_WITH([system-libpcap], + [AS_HELP_STRING([--with-system-libpcap], [don't use local pcap library])]) + if test "x$with_system_libpcap" != xyes ; then + lastdir=FAIL + places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \ + egrep '/libpcap-[[0-9]]+\.[[0-9]]+(\.[[0-9]]*)?([[ab]][[0-9]]*|-PRE-GIT)?$'` + places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \ + egrep '/libpcap-[[0-9]]+\.[[0-9]]+(\.[[0-9]]*)?([[ab]][[0-9]]*|-PRE-GIT)?$'` + for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do + basedir=`echo $dir | sed -e 's/[[ab]][[0-9]]*$//' | \ + sed -e 's/-PRE-GIT$//' ` + if test $lastdir = $basedir ; then + dnl skip alphas when an actual release is present + continue; + fi + lastdir=$dir + if test -r $dir/libpcap.a ; then + libpcap=$dir/libpcap.a + d=$dir + dnl continue and select the last one that exists + fi + done + fi if test $libpcap = FAIL ; then AC_MSG_RESULT(not found) @@ -620,54 +624,6 @@ not be able to determine why this is hap able to fix it, without that information, as we have not been able to reproduce this problem ourselves.]) ]) - - dnl - dnl Check for "pcap_list_datalinks()", "pcap_set_datalink()", - dnl and "pcap_datalink_name_to_val()", and use substitute versions - dnl if they're not present. - dnl - AC_CHECK_FUNC(pcap_list_datalinks, - [ - AC_DEFINE(HAVE_PCAP_LIST_DATALINKS, 1, - [define if libpcap has pcap_list_datalinks()]) - AC_CHECK_FUNCS(pcap_free_datalinks) - ], - [ - AC_LIBOBJ(datalinks) - ]) - AC_CHECK_FUNCS(pcap_set_datalink) - AC_CHECK_FUNC(pcap_datalink_name_to_val, - [ - AC_DEFINE(HAVE_PCAP_DATALINK_NAME_TO_VAL, 1, - [define if libpcap has pcap_datalink_name_to_val()]) - AC_CHECK_FUNC(pcap_datalink_val_to_description, - AC_DEFINE(HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION, 1, - [define if libpcap has pcap_datalink_val_to_description()]), - [ - AC_LIBOBJ(dlnames) - ]) - ], - [ - AC_LIBOBJ(dlnames) - ]) - - dnl - dnl Check for "pcap_breakloop()"; you can't substitute for it if - dnl it's absent (it has hooks into the live capture routines), - dnl so just define the HAVE_ value if it's there. - dnl - AC_CHECK_FUNCS(pcap_breakloop) - - dnl - dnl Check for "pcap_dump_ftell()" and use a substitute version - dnl if it's not present. - dnl - AC_CHECK_FUNC(pcap_dump_ftell, - AC_DEFINE(HAVE_PCAP_DUMP_FTELL, 1, - [define if libpcap has pcap_dump_ftell()]), - [ - AC_LIBOBJ(pcap_dump_ftell) - ]) ]) dnl Modified: vendor/tcpdump/dist/addrtoname.c ============================================================================== --- vendor/tcpdump/dist/addrtoname.c Mon Jul 6 02:12:49 2015 (r285190) +++ vendor/tcpdump/dist/addrtoname.c Mon Jul 6 02:16:08 2015 (r285191) @@ -555,7 +555,7 @@ linkaddr_string(netdissect_options *ndo, return (etheraddr_string(ndo, ep)); if (type == LINKADDR_FRELAY) - return (q922_string(ep)); + return (q922_string(ndo, ep, len)); tp = lookup_bytestring(ep, len); if (tp->e_name) @@ -1215,3 +1215,15 @@ newh6namemem(void) return (p); } #endif /* INET6 */ + +/* Represent TCI part of the 802.1Q 4-octet tag as text. */ +const char * +ieee8021q_tci_string(const uint16_t tci) +{ + static char buf[128]; + snprintf(buf, sizeof(buf), "vlan %u, p %u%s", + tci & 0xfff, + tci >> 13, + (tci & 0x1000) ? ", DEI" : ""); + return buf; +} Modified: vendor/tcpdump/dist/addrtoname.h ============================================================================== --- vendor/tcpdump/dist/addrtoname.h Mon Jul 6 02:12:49 2015 (r285190) +++ vendor/tcpdump/dist/addrtoname.h Mon Jul 6 02:16:08 2015 (r285191) @@ -51,6 +51,7 @@ extern struct hnamemem *newhnamemem(void #ifdef INET6 extern struct h6namemem *newh6namemem(void); #endif +extern const char * ieee8021q_tci_string(const uint16_t); #define ipaddr_string(ndo, p) getname(ndo, (const u_char *)(p)) #ifdef INET6 Modified: vendor/tcpdump/dist/config.guess ============================================================================== --- vendor/tcpdump/dist/config.guess Mon Jul 6 02:12:49 2015 (r285190) +++ vendor/tcpdump/dist/config.guess Mon Jul 6 02:16:08 2015 (r285191) @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2015-02-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -22,19 +20,17 @@ timestamp='2012-02-10' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches to . + me=`echo "$0" | sed -e 's,.*/,,'` @@ -54,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -153,20 +168,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) + arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ @@ -182,6 +204,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -198,7 +227,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` @@ -302,7 +335,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -560,8 +593,9 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi @@ -801,10 +835,13 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -852,21 +889,21 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -879,59 +916,54 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -950,54 +982,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1201,6 +1242,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1227,19 +1271,31 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1256,7 +1312,7 @@ EOF NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1330,157 +1386,6 @@ EOF exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 < header file. */ +#undef HAVE_CAP_NG_H /* Define to 1 if you have the `cap_rights_limit' function. */ #undef HAVE_CAP_RIGHTS_LIMIT @@ -55,6 +55,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the `cap-ng' library (-lcap-ng). */ +#undef HAVE_LIBCAP_NG + /* Define to 1 if you have the `crypto' library (-lcrypto). */ #undef HAVE_LIBCRYPTO @@ -136,6 +139,9 @@ /* Define to 1 if you have the `pcap_set_datalink' function. */ #undef HAVE_PCAP_SET_DATALINK +/* Define to 1 if you have the `pcap_set_immediate_mode' function. */ +#undef HAVE_PCAP_SET_IMMEDIATE_MODE + /* Define to 1 if you have the `pcap_set_tstamp_precision' function. */ #undef HAVE_PCAP_SET_TSTAMP_PRECISION @@ -211,6 +217,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* Define to 1 if the system has the type `uintptr_t'. */ +#undef HAVE_UINTPTR_T + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H @@ -382,3 +391,7 @@ /* Define to the type of an unsigned integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ #undef uint8_t + +/* Define to the type of an unsigned integer type wide enough to hold a + pointer, if such a type exists, and if the system does not define it. */ +#undef uintptr_t Modified: vendor/tcpdump/dist/config.sub ============================================================================== --- vendor/tcpdump/dist/config.sub Mon Jul 6 02:12:49 2015 (r285190) +++ vendor/tcpdump/dist/config.sub Mon Jul 6 02:16:08 2015 (r285191) @@ -1,24 +1,18 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. - -timestamp='2012-04-18' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# Copyright 1992-2015 Free Software Foundation, Inc. + +timestamp='2015-02-22' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . @@ -26,11 +20,12 @@ timestamp='2012-04-18' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -73,9 +68,7 @@ Report bugs and patches to Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54F0C98EC6E; Mon, 6 Jul 2015 03:06:14 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 458D11EB4; Mon, 6 Jul 2015 03:06:14 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6636E9k045673; Mon, 6 Jul 2015 03:06:14 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6636EfB045672; Mon, 6 Jul 2015 03:06:14 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201507060306.t6636EfB045672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 6 Jul 2015 03:06:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285192 - head/sys/dev/dwc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 03:06:14 -0000 Author: loos Date: Mon Jul 6 03:06:13 2015 New Revision: 285192 URL: https://svnweb.freebsd.org/changeset/base/285192 Log: Fix the sent packets statistics for if_dwc. Modified: head/sys/dev/dwc/if_dwc.c Modified: head/sys/dev/dwc/if_dwc.c ============================================================================== --- head/sys/dev/dwc/if_dwc.c Mon Jul 6 02:16:08 2015 (r285191) +++ head/sys/dev/dwc/if_dwc.c Mon Jul 6 03:06:13 2015 (r285192) @@ -759,6 +759,7 @@ dwc_txfinish_locked(struct dwc_softc *sc dwc_setup_txdesc(sc, sc->tx_idx_tail, 0, 0); sc->tx_idx_tail = next_txidx(sc, sc->tx_idx_tail); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); } /* If there are no buffers outstanding, muzzle the watchdog. */ From owner-svn-src-all@freebsd.org Mon Jul 6 04:14:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD68B98FA78; Mon, 6 Jul 2015 04:14:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id A1C761EB7; Mon, 6 Jul 2015 04:14:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 789E43C4FCA; Mon, 6 Jul 2015 14:14:39 +1000 (AEST) Date: Mon, 6 Jul 2015 14:14:38 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Justin Hibbits cc: "Bjoern A. Zeeb" , src-committers , svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r285168 - head/sys/powerpc/powerpc In-Reply-To: Message-ID: <20150706123931.T983@besplex.bde.org> References: <201507051530.t65FUGQn085794@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=XMDNMlVE c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=ZgNSYKVrKxufgBT9kvEA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 04:14:50 -0000 On Sun, 5 Jul 2015, Justin Hibbits wrote: > On Jul 5, 2015 08:30, "Bjoern A. Zeeb" wrote: >> >> Author: bz >> Date: Sun Jul 5 15:30:16 2015 >> New Revision: 285168 >> URL: https://svnweb.freebsd.org/changeset/base/285168 >> >> Log: >> Fix GENERIC64 and LINT64 powerpc builds after r285144. >> >> Modified: >> head/sys/powerpc/powerpc/trap.c >> >> Modified: head/sys/powerpc/powerpc/trap.c >> > ============================================================================== >> --- head/sys/powerpc/powerpc/trap.c Sun Jul 5 14:24:35 2015 > (r285167) >> +++ head/sys/powerpc/powerpc/trap.c Sun Jul 5 15:30:16 2015 > (r285168) >> @@ -426,10 +426,10 @@ printtrap(u_int vector, struct trapframe >> ver = mfpvr() >> 16; >> #if defined(AIM) >> if (MPC745X_P(ver)) >> - printf(" msssr0 = 0x%x\n", >> + printf(" msssr0 = 0x%\n", >> mfspr(SPR_MSSSR0)); >> #elif defined(BOOKE) >> - printf(" mcsr = 0x%x\n", >> + printf(" mcsr = 0x%" PRIxPTR "\n", >> mfspr(SPR_MCSR)); >> #endif >> break; >> > > Sigh, thanks. Since those are 32 bit registers I only tested my 32 bit > compiles. This change introduces a style bug and just moves the type error from a harmful one to a harmless one. It uses the PRI* mistake. powerpc only used this mistake 8 times before (1 PRIxPTR in mmu_oea64.c and 7 PRIxPTR's in trap.c). The type in the mistake doesn't even match the type of the arg. PRIxPTR is for printing uintptr_t, but the arg type is register_t. These are logically very differemt, but happen to be the same physically (both are 32 bits or both 64 bits, according to LP32 or LP64). All of the old uses are wrong too. The printf format is always uintptr_t, but: - in mmu_oea64.c, the arg type is vm_paddr_t. This follows the LP32/LP64 switch too - in trap.c, the 7 uses are all to print things in the stack frame. The arg type is always register_t. amd64 and i386 never use the PRI* mistake. They are simpler because the LP32/LP64 switch is at the arch level. i386 would have complications printing things like vm_paddr_t that depend on PAE, but the PRI* mistake is useless for handling such complications, since it has no support for the vm_paddr_t. Similarly for almost all types. register_t too. arm uses the PRI* mistake just 2 times. Both uses are just silly. PRIu32 is used to print a type that isn't even a uint32_t, but the binary promotion of a uint32_t (in the expression raw / 1000, where `raw' has type uint32_t). This is just an obfuscation, except on systems with ints smaller than 32 bits where it is a micro-optimization for speed. But POSIX now requires ints to be at least 32 bits. So the binary promotion of uint32_t is almost known. It it is uint32_t if ints are 32 bits, else int. Both cases can be handled by either %u or %d format. Strictly, %u should be used if ints are 32 bits, else %d should be used. But since `raw' <= UINT32_MAX, raw / 1000 < INT_MAX, so %d always works too. %u always works too because raw / 1000 is always nonnegative. Perhaps PRIu32 works right in this case. Args are subject to unary promotions, and this will change the type from uint32_t to int iff ints are larger than 32 bits, just like for the binary promotion. PRIu32 must be %d and not %u then, unless it can be shown that both %d and %u work and that the compiler doesn't warn about the harmless sign mismatch. If ints are less than 32 bits, then the binary and unary promotions of uint32_t are uint32_t again, and PRIu32 works right. To print a uint32_t without using PRI*, there is nothing better than casting it to u_long. This works well, and should be done in MI code that supports arches with ints less than 32 bits. But arm is MD, and only supports 32-bit ints. It shouldn't handle these complications. Since arm only supports 32-bit ints, it should above these complications by declaring 'raw' as plain u_int instead of uint32_t. (raw is only used in a local table that uses int for everything else. Making it unsigned is probably wrong too.) arm64, mips, sparc64 and kern never use the PRI* mistake. Printing register_t in MD code is very easy. Just cast to u_long and use %lx format. This handles the LP32/LP64 switch correctly in all cases. In the LP64 case, everything is really long or u_long and the cast only fixes the sign error than register_t is a signed type on most arches. In the LP32 case, all types are really 32 bits. All should be u_int, but register_t is usually signed int, and perhaps some broken types are long or u_long. The cast now fixes the sign error and tells the compiler to not compain about the logical type mismatch between %lx format and u_int args, so that the format can be %lx for both LP32 and LP64 case; the cast acts only on logical types so it doesn't cost anything at runtime. Printing register_t in MI code is not so easy. MI code shouldn't assume either LP32 or LP64, so it should cast to uintmax_t, but that has runtime costs if register_t is smaller than uintmax_t. The only excuse for PRI*'s existence is to avoid these runtime costs. But it is useless except for the standard types that it supports. The bug in the original version was that it didn't cast to u_long. amd64 and i386 can just omit such casts and hard-code the format as %lx for amd64 and %x for i386 (except, compilers should warn about the mismatch between the signed type register_t and the unsigned format). I can only find powerpc using this method in 1 printf (in cpu.c). Bruce From owner-svn-src-all@freebsd.org Mon Jul 6 04:29:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFF0B98FCDF; Mon, 6 Jul 2015 04:29:39 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 DD05D3366; Mon, 6 Jul 2015 04:29:39 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t664TdXl085374; Mon, 6 Jul 2015 04:29:39 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t664TZnM085354; Mon, 6 Jul 2015 04:29:35 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507060429.t664TZnM085354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Mon, 6 Jul 2015 04:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r285193 - in vendor/sendmail/dist: . cf cf/cf cf/feature cf/m4 doc/op include/sm libmilter libmilter/docs makemap src X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 04:29:40 -0000 Author: gshapiro Date: Mon Jul 6 04:29:34 2015 New Revision: 285193 URL: https://svnweb.freebsd.org/changeset/base/285193 Log: Import sendmail 8.15.2 Added: vendor/sendmail/dist/cf/feature/tls_session_features.m4 (contents, props changed) Modified: vendor/sendmail/dist/CACerts vendor/sendmail/dist/PGPKEYS vendor/sendmail/dist/RELEASE_NOTES vendor/sendmail/dist/cf/README vendor/sendmail/dist/cf/cf/Makefile vendor/sendmail/dist/cf/cf/generic-bsd4.4.cf vendor/sendmail/dist/cf/cf/generic-hpux10.cf vendor/sendmail/dist/cf/cf/generic-hpux9.cf vendor/sendmail/dist/cf/cf/generic-linux.cf vendor/sendmail/dist/cf/cf/generic-mpeix.cf vendor/sendmail/dist/cf/cf/generic-nextstep3.3.cf vendor/sendmail/dist/cf/cf/generic-osf1.cf vendor/sendmail/dist/cf/cf/generic-solaris.cf vendor/sendmail/dist/cf/cf/generic-sunos4.1.cf vendor/sendmail/dist/cf/cf/generic-ultrix4.cf vendor/sendmail/dist/cf/cf/submit.cf vendor/sendmail/dist/cf/cf/submit.mc vendor/sendmail/dist/cf/feature/block_bad_helo.m4 vendor/sendmail/dist/cf/m4/cfhead.m4 vendor/sendmail/dist/cf/m4/proto.m4 vendor/sendmail/dist/cf/m4/version.m4 vendor/sendmail/dist/doc/op/op.me vendor/sendmail/dist/doc/op/op.ps vendor/sendmail/dist/include/sm/conf.h vendor/sendmail/dist/libmilter/docs/smfi_setsymlist.html vendor/sendmail/dist/libmilter/engine.c vendor/sendmail/dist/libmilter/smfi.c vendor/sendmail/dist/makemap/makemap.c vendor/sendmail/dist/src/conf.c vendor/sendmail/dist/src/daemon.c vendor/sendmail/dist/src/deliver.c vendor/sendmail/dist/src/milter.c vendor/sendmail/dist/src/parseaddr.c vendor/sendmail/dist/src/queue.c vendor/sendmail/dist/src/readcf.c vendor/sendmail/dist/src/sendmail.h vendor/sendmail/dist/src/sfsasl.c vendor/sendmail/dist/src/srvrsmtp.c vendor/sendmail/dist/src/tls.c vendor/sendmail/dist/src/version.c Modified: vendor/sendmail/dist/CACerts ============================================================================== --- vendor/sendmail/dist/CACerts Mon Jul 6 03:06:13 2015 (r285192) +++ vendor/sendmail/dist/CACerts Mon Jul 6 04:29:34 2015 (r285193) @@ -10,6 +10,102 @@ Certificate: Data: Version: 3 (0x2) Serial Number: + 92:91:67:de:e0:ef:2c:e4 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + Validity + Not Before: Mar 2 19:15:29 2015 GMT + Not After : Mar 1 19:15:29 2018 GMT + Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b9:1a:a1:56:ce:cb:16:af:4f:96:ba:2a:70:31: + 70:d3:86:6c:7a:46:26:47:42:3f:de:49:57:3e:08: + 1e:10:25:bf:06:8f:ca:fd:f4:5e:6a:01:7d:31:4d: + 50:88:18:43:71:66:65:42:9c:90:97:0d:95:f2:14: + ef:d7:5e:77:ef:7d:b5:49:3f:02:bb:83:20:f7:e6: + fc:9a:cd:13:df:60:41:28:8e:39:07:a6:a4:40:98: + 15:1e:46:b6:04:2e:f9:ab:32:d1:8b:fe:52:81:f1: + d2:e1:c3:cf:bf:ab:40:a7:f0:e4:e5:a2:82:37:30: + 8c:10:7d:aa:a8:7c:7e:76:cc:5f:1a:24:d0:8c:94: + f6:f2:7f:4a:be:2f:38:67:c0:06:e6:9e:51:ad:55: + d0:cb:26:71:cf:f4:af:7d:5a:41:81:16:fb:26:ec: + f0:35:01:6e:db:f9:e9:00:d7:d0:89:7b:cf:88:16: + 8b:1c:8f:77:1f:5d:ef:70:04:28:76:c5:1b:c6:23: + 8d:49:6b:f0:b8:21:56:d6:7d:68:6c:be:21:e3:e6: + e3:1d:6f:a5:ea:dc:83:e4:27:b3:6f:5f:1b:3d:33: + a1:d5:d3:f0:73:1a:12:eb:d9:95:00:71:59:16:b4: + e4:60:38:b2:2e:7f:b7:d4:c5:e9:3f:74:e4:48:38: + 29:89 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + B1:69:DB:5E:9B:CE:1A:B4:1D:B2:6A:FC:5A:22:97:B6:24:14:6F:32 + X509v3 Authority Key Identifier: + keyid:B1:69:DB:5E:9B:CE:1A:B4:1D:B2:6A:FC:5A:22:97:B6:24:14:6F:32 + DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + serial:92:91:67:DE:E0:EF:2C:E4 + + X509v3 Basic Constraints: + CA:TRUE + X509v3 Subject Alternative Name: + email:ca+ca-rsa2015@esmtp.org + X509v3 Issuer Alternative Name: + email:ca+ca-rsa2015@esmtp.org + Signature Algorithm: sha1WithRSAEncryption + 0a:ce:07:39:77:08:c5:3a:00:04:e8:a0:3b:f7:d2:4c:79:02: + 23:0b:da:c0:55:39:82:71:0a:0c:83:e2:de:f2:3b:fe:23:bc: + 9b:13:34:d1:29:0a:16:3f:01:7d:9f:fb:4b:aa:12:dc:3b:7e: + b9:27:7b:ec:0c:3f:c0:d9:f5:d8:a8:a1:9c:1c:3a:2f:40:df: + 27:1a:1a:a0:74:00:19:b7:82:0e:f9:45:86:bf:32:da:0e:72: + 0a:4c:2c:39:21:63:c3:1f:61:6e:e2:4d:ba:7a:26:1a:15:ce: + b1:f6:1a:59:04:70:ed:e8:72:05:4c:fc:84:c6:a5:f4:e2:4a: + 40:e4:42:70:87:9a:a7:02:26:3a:47:34:09:e0:7b:88:ca:fb: + 99:d9:9b:bb:0c:52:8a:93:d5:59:30:0b:55:42:b4:bb:d2:b1: + 49:55:81:a4:70:a0:49:19:f2:4f:61:94:af:e9:d7:62:68:65: + 97:67:00:26:b8:9b:b2:2c:d0:2c:83:7d:3e:b3:31:73:b9:55: + 49:53:fa:a3:ad:1b:02:67:08:9e:ce:9e:eb:9f:47:0d:6c:95: + e9:6c:30:92:c1:94:67:ad:d9:e3:b9:61:ea:a9:72:98:81:3a: + 62:80:70:20:9a:3e:c4:1f:6f:bd:b4:00:ec:b1:fe:71:da:91: + 15:89:f7:8f +-----BEGIN CERTIFICATE----- +MIIFJzCCBA+gAwIBAgIJAJKRZ97g7yzkMA0GCSqGSIb3DQEBBQUAMIGlMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTERMA8GA1UEBwwIQmVya2VsZXkx +FDASBgNVBAoMC0VuZG1haWwgT3JnMQwwCgYDVQQLDANNVEExIjAgBgNVBAMMGUNs +YXVzIEFzc21hbm4gQ0EgUlNBIDIwMTUxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz +YTIwMTVAZXNtdHAub3JnMB4XDTE1MDMwMjE5MTUyOVoXDTE4MDMwMTE5MTUyOVow +gaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMREwDwYDVQQHDAhC +ZXJrZWxleTEUMBIGA1UECgwLRW5kbWFpbCBPcmcxDDAKBgNVBAsMA01UQTEiMCAG +A1UEAwwZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxNTEmMCQGCSqGSIb3DQEJARYX +Y2ErY2EtcnNhMjAxNUBlc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQC5GqFWzssWr0+WuipwMXDThmx6RiZHQj/eSVc+CB4QJb8Gj8r99F5q +AX0xTVCIGENxZmVCnJCXDZXyFO/XXnfvfbVJPwK7gyD35vyazRPfYEEojjkHpqRA +mBUeRrYELvmrMtGL/lKB8dLhw8+/q0Cn8OTlooI3MIwQfaqofH52zF8aJNCMlPby +f0q+LzhnwAbmnlGtVdDLJnHP9K99WkGBFvsm7PA1AW7b+ekA19CJe8+IFoscj3cf +Xe9wBCh2xRvGI41Ja/C4IVbWfWhsviHj5uMdb6Xq3IPkJ7NvXxs9M6HV0/BzGhLr +2ZUAcVkWtORgOLIuf7fUxek/dORIOCmJAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU +sWnbXpvOGrQdsmr8WiKXtiQUbzIwgdoGA1UdIwSB0jCBz4AUsWnbXpvOGrQdsmr8 +WiKXtiQUbzKhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9y +bmlhMREwDwYDVQQHDAhCZXJrZWxleTEUMBIGA1UECgwLRW5kbWFpbCBPcmcxDDAK +BgNVBAsMA01UQTEiMCAGA1UEAwwZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxNTEm +MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAxNUBlc210cC5vcmeCCQCSkWfe4O8s +5DAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMTVAZXNtdHAu +b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMTVAZXNtdHAub3JnMA0GCSqGSIb3 +DQEBBQUAA4IBAQAKzgc5dwjFOgAE6KA799JMeQIjC9rAVTmCcQoMg+Le8jv+I7yb +EzTRKQoWPwF9n/tLqhLcO365J3vsDD/A2fXYqKGcHDovQN8nGhqgdAAZt4IO+UWG +vzLaDnIKTCw5IWPDH2Fu4k26eiYaFc6x9hpZBHDt6HIFTPyExqX04kpA5EJwh5qn +AiY6RzQJ4HuIyvuZ2Zu7DFKKk9VZMAtVQrS70rFJVYGkcKBJGfJPYZSv6ddiaGWX +ZwAmuJuyLNAsg30+szFzuVVJU/qjrRsCZwiezp7rn0cNbJXpbDCSwZRnrdnjuWHq +qXKYgTpigHAgmj7EH2+9tADssf5x2pEVifeP +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: f1:41:b3:3d:ba:bd:33:49 Signature Algorithm: sha1WithRSAEncryption Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org Modified: vendor/sendmail/dist/PGPKEYS ============================================================================== --- vendor/sendmail/dist/PGPKEYS Mon Jul 6 03:06:13 2015 (r285192) +++ vendor/sendmail/dist/PGPKEYS Mon Jul 6 04:29:34 2015 (r285193) @@ -141,6 +141,185 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0= =SR28 -----END PGP PUBLIC KEY BLOCK----- + +pub 2048R/0xAAF5B5DE05BDCC53 2015-01-02 +fingerprint: 30BC A747 05FA 4154 5573 1D7B AAF5 B5DE 05BD CC53 +uid Sendmail Signing Key/2015 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1 + +mQENBFSl4rQBCADRCzgFSJkzyoOHw9/9L/+G3mzA1fWR7TgCE0WxGX7PDzyLDaUS +a4XpCDtadjXyr7c5YPo1T7ybxUH39yvUgEHBiPQDssik+bbpOiHL7V0sUDAYfKSq +YC8/MG42Oj/zd+0WUhnI+RckFYPBNDQ+sZC6ErLDxCYDZMYhG4vhJOGqAKpglNTb +w4Fdx4LNmL3e4t3z4IEtnzAqeGVxIZm8MGGFhKkb8ufpgh8Jiz4Q6cOis0ZD9K6f +LvMPRJXSBy9jBtmS2oI2e9Q5LLhmzd1PVyA8jwAlK0QfJLmlRrgRUfHFKhkf+EuW +tTi592OYCZ9bw7QVSiGVQUK+7VACfM+FQR81ABEBAAG0MVNlbmRtYWlsIFNpZ25p +bmcgS2V5LzIwMTUgPHNlbmRtYWlsQFNlbmRtYWlsLk9SRz6JATgEEwECACIFAlSl +4rQCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEKr1td4FvcxTTPMH/29J +kNmt6EGNo/eLQySB8HTenfJjZaQxwPRhq22kWgr/7WP1BR2411bopyNk4IZ0rcDr +tnyeJj4UWKJljVuXyTDQPtU8uUlgiOT8QiHEbge7MOzxrn0cy6KIOgKq+vtuxa28 +McaxjENR7XVIDFkesQ7P/yLkcCjlE6jaD4r9OIKpqEVMPs1WUFff+rsgTo7mdcgR +QowQOgYqNil5awQ5Y2Gol71hZ6oRcpqMwSd6w4dEEx2U8rF8oqJuoxeUTgNCSv0n +iFtewLznocmxlrxe1mQAeLfRmUAG4LSL6p5wx1lRjJA3gtyWRjY0404jGxkATLG4 +AtK2OkHj8MbrWLP7PKyJARwEEAECAAYFAlSl5AQACgkQYd4R7OJ2OnPHXAf/Y6Rk +rROF45+SgbsEIiDXQBcBOoO1GKe0nFTc1jfAKUHAQ94fqcDxNeFRA9fNIA2d7XNI +0Lw6W7X3RcEkF58xytIe/Y+EXDmOt/BUbpch9KIz6J9pqBhPdyHvG+ZeyA3A+TGT +ZGnnnAxNFtCjt2IID9lzZSLuWhH8+DNC2Vp15NngDTa1VIk17n5iIvi7r3V5cdIE +MblKLGm+ZaiTeccVLjwMKIUSgrLP87+yF/aaZH2kotuI7f3tD1ycN0sVZJxcFS+c +GFw7uvOarDBSm0Q/FgfhDUOJLy4w5SqVmgPEIAeogz94q0JXxSSr1XWQBD8X9XwF +f3+dPXmgMHXLGRWclYkBHAQQAQIABgUCVKXkPAAKCRA9aLJdUgfK08cnB/96BV+v +xyBx35TPg8eI/WIskdQAIpCQsm6FoO1ejbMzfWn9bImCewOp1UMlowdfQC52Hdp8 +EXnuwCpJ3rtnZctRld5dNM/clbZ+r3lr78wX7hqPUajlvxe+TMpyZbJirLn1f5Ba +yoysE4oICfzJivPfixZd7oFVr9EkftbatYenl0rgf/0lJTKRDIqNGezeeyfxaKdX +qd545wqis7PrrXDOrEq815aosG09KQBhIoPgti2us1R95nSm9z6dVCY/nSDOxL+a +Vyq/XD5KSUqbZVocY+fbR3dNX5haTvawuG0GPvl+YvYb2lW4hhi7Q4aUL7Dd4c9c +vk5+WAvfJwHtbxrgiQEcBBABAgAGBQJUpeREAAoJEI5a6fvO7vQ7OWUH/2NNxhlI +JEtvD+Nj2oPGgVQJrlFI1pbzyMCtD+6iy8Lfnp2DK+qKPMjBw96LUqcXC32VFPQr +17iyZDv26MSb/acmdIfTPpPTwJ6zEmMI8mXradeuoiWxeVHSg7n+D3u0xtikmb9Y +uRKv0yx43fcL70bqV5DzyXQte0chfRnOiwMrImWdgDekkmxE9udbtgK24rifNVGa +TBB6eHJAsFVu5Y38hsZLe10bCKyUCqT6Qywfy3RCMpXYeo6fXOk0fKatG2oi3CZp +LI+AnjmAJ0t2oMkrwUxogkK3LkShJT/aJYIR24eZm0GdzwRHZxXKClGFvdJslIea +TKHSXNK41eEIfreJARwEEAECAAYFAlSl5EgACgkQOaTHfal4hLAXfwf+M0YmlHd4 +1sfvckYhOYf99n1BGnfQx5RJn+X+EBjGyOfPKMBPQuZIlwAI20T+cFnR3WmgrmlO +IBG8qVcSDoValzNPcr0V3WGDrT75fYhf5iYj2ZsZDBUqE1VF3dAVUw40x2c1n+98 +7lbq3NtolSPYk07h5rhEhmkjdNcixv/exVCTGVwaT4X9ZHY8heETmF5tsCtPavpr +i/DjcDQQQ0sQ8um1eX41j2bhrN4MERUC5oadvSULaA2QUoWgCrzVG8zx715Au77N +jLtfA31hJI0GP/dpSREaYlqA0nwVDR5tz1TyTNwPN1ylxjQmjKXtJwx3jUtlT9Zh +qxRf+ngYHpWArokBHAQQAQIABgUCVKXkTAAKCRBgTfvyhUEKvl11B/9aYJBEEQZp +JWAT6HPmQK//i2x4y1euQfaHsjqJALvvPrgiTp/ZE3o6dKHhs+SbawsB57RtootN +maQr7x2drvBojWhJJdaouAh345qOfZYb0bD9klkr6W+Mjl5T0xWIKFEyIZn0Tcbr +8ekHgSIx2trL8LduSJou2bdPMh46PORzEpuQQ4IAyV0uRyBdNFOPwTy2OdXs51fr +M7lp1hJp84+y2a6z3vz3VCs2A9LzlnXKZ6bXljpd5dQfrmrSNXltPKA3jVLkWi8+ +rh9f1rAGsj1e6N1aVF2uJ1Y3u+U0XQ/dwa1vDF3y4KVObxYM9eNGbF4J8lGkUy2a +gZ1s1X8QzEDUiJwEEAECAAYFAlSl5FAACgkQEolum6d/JCmUSQP+KEz6xSvPSbFP +Hip4JiX1Wbvd+t3TyL0u9Fv/POwUrFIHVpTkCwOz6jsBH3TdGGiYOP5F8k/US2jU +3WB0J1mK5Rn3GwLhUGNTEeuaJZCuKE+j3qwMFmDqC/2IxEvlWtrIbTqkgf7cRv/O +O7VNv+EL0axtsrOcwZlUWe6Lc4571oaInAQQAQIABgUCVKXkUwAKCRDYqvDK9rMH +KX7xBACUFTBRCmboY/GRTHMZW1DGfcO2vMxwnYKqWomuzi/YonDCWtoTpeMDaAhY +NnIchC1mlYteIE94/+ZsoYsZeaR3fe7CN6h/deBu4tW/dQ+TW1ZPF6EuVhoviKgz +rd3rb+gcS0f0PgSPyg5LGtoMGMD9/gx1NJOTFec83jmBI95Gb4icBBABAgAGBQJU +peRXAAoJEJdDARhwk7hBAUED/0oyeD2Z4wMQ6IQEprOAWbR+vIRzaThemmCGobRw +UlM44nUXqKSM1+naLEVz/JzBuKWG00zTz6Su3NesWoFzDDUGYcIJggbOm39Pc+V8 +eXV86An64/v3P6gypJc+q9P+FFGGO884wFmYN634Mi4SDBVFUzffcghueAFcxtzt +0mH5iJwEEAECAAYFAlSl5FoACgkQHnuzyK+VliVGdwP/fmdK9MdWIzPD/6eYm6JZ +zbksaGWiqpwgp9IEr/OhSmGkXuwUsP35PFJ8FsJbEV5x/y6pP3UNp6EFRN/116ue +jp5vVM7nnj2K3V8f85J4dXCRbv+kek+Ufo1Qzm5kgvRuBxX1sXpxFX6yBM0Y6WuV +gszdbTVNlS04q6bnPFE9L4uInAQQAQIABgUCVKXkXgAKCRBwoCRNHvmSUZ/7A/9W +yQJrrdrs2SuYtoxov/pL/TVMejbnxsF8Y0dRtM/KiquP57PMQSmLqy4fTRzAMHBv +XK1aKfewTVfGKLcHIzfMfv2XcPpWfwcyMeZKtcSr25lWl9GJZP221rCok76XYwqk +BPPp0pjSwdy0Qq4sd3N3ESZmqAMWJ7ouMmlQ7VWReYicBBABAgAGBQJUpeRhAAoJ +EMjV7SmV9hdxLv0EALX3yjI2KDNG1mo5ctCSYlIlhXHQ6csHuUK9lzj9R1gVEzDU +0dEZH0+a5UXh5xf8nyTDLytUe8PxTtPit3AOP6TvTJlANULh/3MKS6317RwUe2e0 +OitWbhQAOYfpYAkSdXZACzPacxrefkxmSM3Pq+SYoumZTI2N6AvVu8MeCS0GiJwE +EAECAAYFAlSl5GQACgkQIYPhsTlvB4mWJgP/XAlvlBityADJkdN+3mp/OtdYzw04 ++dBdNtmLqWUiMZg6rPPHUQi7dfBKi95FFe2U8hxSRk8oLzSzmh/M/CP72mxKh4pi +PbmEkmKHYlNdyfCCNqXdjkBXFAKXAes/4DaBlZwvLjPtrupEaW2eYdU8cSrdeGuv +1PMLRPxRr3nPCb+InAQQAQIABgUCVKXkaAAKCRCJaWK4Z4wKA3ZVA/4iYD+xrYv0 +8I+0GZJRdEL5f7T97a7Vtf5xSxUhHDww4xC9gs8LzEGWZXoNaZEVl4j+63EnCIbY +o4g+c4m81D5NWFqeJWhWpcyvejo9hfGM3ZK/XbiF+ZTzznU5YJclGaZ7t8TY8gcx +GSWxUzxBJQcSEzAKKi286ielMAXocNx10oicBBABAgAGBQJUpeRrAAoJEDgi20fM +N08tDkwD/2F5j5irsDw+MQyLKpfPv3GRJ5J3ebOPpLQkQ5T34+qeIw4LkcXW9OJA +ohW47JLb7R8zwAlUoqmmNXtxTM0r0FlTYGPOVEnSEkMqqa3KR68B3jWAGXXdqig9 +yBxYRleawQ4ltnegBn8q7gC4MwnIAZxzK+Y8cM0Rk/FjC9+NhwrviJwEEAECAAYF +AlSl5G8ACgkQnBy94uNcVjUfvgQAlQijnoE3de1CanB0JqIN+h+XOLOpalFti+B7 +Swc2ZlnlQ9mofYPK5UHlbsiC7/TilD6xm4YEFKim9sOIMi8FNka8+EH+/d1DmS4M +qVPDssxTG6VOzn7tYOuC9qIw15IpfbHW2bk/YIImwP9nViKCMLIGw+ZgK+uiRQx9 +fT8O1NqInAQQAQIABgUCVKXkcgAKCRBvUpPYo5umVYKeA/9n63K1nF3DNY3Hckvz +tN8OrPmyCIOh+7t4sc5NHhTK0+BQTv+cgG6ig7K2cdI6VBAovs/c/u7+RrcMhp7l +45AVnycfKcNaMHKFyMHDk9FZgpRG/bv1zwDxdh+scUc3IekqkSiQ2wTjDQ5Q/BMK +L5zfOSnTOoltWjpVgsjdM75Ol4icBBABAgAGBQJUpeR2AAoJEO9YlmTUMuGd8R0D +/3mhriMu/cp3DXHnlDykqLJI1q5K4xCHOWwFYZ8DxW116AVjluJYYW1HmWcJrjK3 +cwuN3FUcsIjafanIJWCsdeZaPAyFEfUBEW0YXIIpBXRw2N7jNtrd5X6Zjptd+zW+ +4dUzvT1pqVtdPHjova3fcGLSmcdZYbddotaGi7xi7kXviJwEEAECAAYFAlSl5HoA +CgkQwZwdJRLTRh0iwwP/Y/pwp9ttAMuQUz6oH71BTkUrzu9LiI7vhrYxEquFdzCO +dE4jBNB3LGfwzjhJRtjmQ/gVhjXWWrDYnOXt3gNxb9KzmTHmSDu65cBxX54Un0pZ ++MXjjWOT2l8+GA1lXeICIoZjJL88/zEZAiaH67ch2LEix1fOaJmXJzUSmP1pR3KI +nAQQAQIABgUCVKXkfgAKCRDAKcpAFvTM6XVwA/9Eb+Dwn2lmEFFo64gj8ocpWzP8 +/sD86PP5KkZ+b/HQnGB3lsQTwsGytDvJfutLDa05sS/HWZ9wXPltX/G3omp/A1G5 +qEKzVSe0vEWedpf9wn82Ll6hzaiS5qX7r0+FpyUjY8arNrze5S4Q6Q2kjl8YduXl +wG877igRHkGpAtApxYhGBBARAgAGBQJUpeSHAAoJEBj1A4AkwngCRCMAnjHfd5db +KK6DJxrWVnEbyXs/QJGKAJsErKkiUX55B8k/P3cyzyXIaOujBYicBBABAgAGBQJU +peSOAAoJEHxLZ22gDhVjCDQD/j7DE5wyhpjHrtf0hsQcaQoVHWZb2JTLZUMRAQyj +zKMTSs0GslamlxLZmyV1HqkB+41zuJeBQtRV4gjqa5DQmWDRC2mHl7o9A40v4SDa +O1jmfU5hfJSMecucPyEcfaAG4BIMvBo6TL484uHBi45SN4Ik3f2wc6D1XOluD1vB +gIwpiJwEEAECAAYFAlSl5JMACgkQ1uCh/k++Kt2s6gP/RNcMKtx4u61vz+Aji/Fa +H9q03JxQaRgmN1q2AvZQ/NTWTXU7Y5GnH4kW/8rOoUQiR+agJsvTt4ciM+y33pZ/ +ZZLkAuo0uKelEHhdQhtRbSktKBHSgDWbiqaJJIxazeLpxcSgaoM6RW/7aIFdMtEl +ALAzTACYlTN/nKWWICn8GnGIRgQQEQIABgUCVKXkmAAKCRAh+cW892qb9aWOAKCg +aznvUX8PIvKPzoHld39xWlJ+FgCg76wrEc1h9IiIgUoqH5NWVCxcHneInAQQAQIA +BgUCVKXkngAKCRC92o/WP+p9/ancA/0Z4JHZT7NRBMr47zQvSwE4eLpSE5QDGXi7 +RNmOUgZxrxsFWRZLJCVupXDBQVZEhOBRZYqXPw1eDglOU952oj5OjaHsYnSEu7jz +VUwlp2BxZQ3mnepdUcQz1A3k2cPZ0I6KFP9hP88GU+77nubB7IqRH/Q3QKMgO0eW +yd5kYugyYYkBHAQQAQIABgUCVKXkpwAKCRC9J20ub8+ohR46CADMEvAns+L+BkVN +d9INsiR1rONrNRPT6w4dnBeTLaykkuMjc6+7s+UuXm6AMAelI28pG+fJyt/lZAGx +QLS9zFgREge0lVbOZVeAYeC1YyFsrJE4Lr2quq3fajj23tnsHmCv16znMHrh/E1m +Udm4145NprijrZn+PsjuVWYV+pxiLpLM0YBdGNwCEMi/KCQ1fcaiAZZWSqLmHIe0 +ubWDdqq8/5JRQ22SEnqP2FT/lfOmKTxMNmE0uEr4+C4fG2nd38BvzpHu9eN/4Nwx +IwzK5DhbAj+I57+VDncgkNGe1q4QY/5LaZQh/nHIcmX1ln23f9Lxkr6EYYZ1ptq+ +A8buvD+XiQEcBBABAgAGBQJUp+zrAAoJEBCQryClqlvm6AgIAKAR8HY4G9AD2jDb +ouS4Al4QICagwQ0Y7Rc2/fHyPQEAP714EimakPFVFDbSD6SW569Qtdxr+ggH4wFI +bzd21pCgIUC6nVoDotIjplMdYkNfq8AODpxn3HTBnNQ7e609xnWxFo/+httKoWok +fEP9qZk4MJq7lE75iX+wohjLwoF6v0tCB8CrBFJcfKrDvXQSGvKiaEp4g0sEfyXv +gL6X0xKMflupofdnFLJliV0WqGhBOGUghPdLsA02E3e1utj6WABmudMytRxWB8is +SWGaywaEKLSdCgi+XlQVypKeWNMbZZZcftVZ91r4iNTAkw4cv5Wea+YnngfurGCq +J/jUq7aJAiIEEgEKAAwFAlSn7r4FgweGH4AACgkQZhs61tgqu9C9Aw/+JMTXzwni +NPwBxkbcNWbnWODVEElmDloHNpr3z+ryF1XNgbiOY8dn7uwRnPoeCDhIDwvNkK+x +h4xmjH0970v1ltbzcZv0wnK6UeHQssqN9NGsXM9rbodYRIam4yxbwd1ddOC9QZFM +ToRVWiqCzGOVYL50a24OYKClGjm4ncRznXJrNwYMEjxQ3j5FOkXIn0096z3szWCY +6yDpPzOsl2TPwdjMKZWoMEDh/SvY3AxAXo1XqDCj2/+C8dDwO7kn+QAl3fUGmkI6 +dUHCAJm/WtSyvINdphzhZ1ZdkPhqDUKcR0JTX03QJ6bnu5vmmOncWm2NA7rP74fq +KE9XzT808xP0GBwR1co7Eq+/751j2TA33JSlt/hIgi5aEWc4laCingJ02yaW8tUS +DCoVNITaXcF/B47hjBgovQk8TOTsQ0nkSYvOoh05OYBmzl17G57QuPx1stRJ29QA +VLGem1v1mXAuNdHH0kNE+/Rv0A2vGqauLx9ba84RfbXMM4SJw8CjhX6OxhAM8xoU +tO6T56XZS8qLtWLkNQNZNdNlAo6tYk/cTrjdX1M63nYjoVbuc0nic6Wp+dQk/DEb +wsiIpFoisvMK6EH49v70/c9Gtg6rk5z2yBHMZsjo2Y0TheTKwKIUEz0MuTncH8jD +yB/NtQkrbiBdEqRJUoKKUtS0B4cUYTUyd+SJAhwEEAEKAAYFAlSn8agACgkQ8Ar2 +6sJF0gs2yA//cgc+g1wPRFzJeQGv5UFR3TCAMtS+/bzY3UU/eG2Jmbv2qwPbn+kx +RH5dYlZ72VHXEggBaEweCBrBWsweX5dGEMNDLNlI9ArAjjhBAZFFUQKj55EzIZpp +YTbvgxOD2ENKU2HfeQYCGFYZr3L2DXQ1k0U7VnaElBQV3o88CMi7bIsQq2aWk+c6 +Cy15UVr0niVLm95EUZM4yYm2gOGJXUeaGIExSBtiwuzvAiDEGaqfPGAi1ePkNmLJ +3UzYfgiQumSh1kDVlQkCc8UQiF6ckEma618cmmaHs5vZvHsTX5O2/qPkLpXunA/7 +5yM/Jde8a5VbNGWyZ4rmstlWR5rPd7r3uP85miHn7Arait3aGo8RQeAHzOdTvMqS +n3oCotQlOvBhOo7qA8oYQVlU0+77gOfZZeEXDZG13lU95ptFhdsGstIQH67jPQ6z +TpVnd28ip92ysrwvxPhOzO74yKcYoKtzwLctcvptlKTkrFMHP3wJwqbaSfJGK4JE +rjT8WnnWyHY465nTDN9AKkoH4WQNozniWX8OkF3CpPj7ow8roFXlPOxXH4QsaQu3 +Kk31APn/A925d4xyYuWYHZ7A/FzsHafFHPMoG3iwZyuFhfl1UXVvEd8w9mEcxXoh +2iCy87TdpesG0GDzSmWwEYEPkg20BD2+vdc0EekALDjAGM+lfBxN67KIRgQQEQIA +BgUCVKgM0gAKCRAJp6JK0eWCB94UAJ98O6S6r1hFnCLrbU3GeqrA4DCtBQCfcza/ +WoVLc3/+bOf1jzjJ/eJ20IyJAiIEEwEKAAwFAlSoCRMFgweGH4AACgkQhS2G+DXA +JIrWURAAvgl1LkqB9pRPViK1U+xa3b5zt0O/fLbov59aLhA4uPJ10BgaKptflLim +aE2EsS4Mnk0DQgGEBjlywJ5Ft3aMk3vbRz7lDE3zQ3oWa7+N4fcG7WWsAxmh0NtX +Ak7orN6rQcyGgWgpF7wOau79i4VO7oLHKeS7QNs7X59CW+k64TAJabxi74PRoVMz +843qWPjsuFIYM7n/nF0vdECwhSE8zUgcYG2n5CdA0Lq7XRE+II11VOT2XEXFMyR/ +Qh2m7l+jy12MEzHQfGC1HYBo/Zi/MRIN53Rd2LLJWQdMxz/BDiuSxZhKVeCRe7gT +Mc2k3VrmfViBoaUE0zqMbx0j29XUbNQNU3afE8MOBkmyd6AQjoswBEsgU9uyCJYD +Jq3V1stwSVBm9G7X/l8GFlPawLg/uM9gTYb2JYUYPlphTAwVcL469rKQNMhPj2ww +zT7NzjwFb9XrmyiIrqH5z2ieG+LRjajOPVPwBsqZ3gOA+z9QkU1lRYEJOTlEYCkv +8oA6ZeFm31S4JoeogbCDaMiqDszkFtYGBUgGEbnHoCgXi7aINSb17VZ8LTzpD4V9 +vGdFVuE3vJf2POMERP+buLV8OiG38cBJXb+JVSC+pkpm+32nY0UR5ccDPwAC3cGq +SbI6ftKlQeaYp3UEncFUaB8NNZings3jzRexPjzUzo0vhRkkIs2InAQQAQIABgUC +VKg5iQAKCRBfHshviAyeVbEVBACL9Vve0dF0UqO+DN4PzrTOx2JzRw7ujhcrZ6I/ +TCXjANGLWUheylRWhvxMojvbhZEg2835+9l6tpD7BVnrfkBE+LYIKFTusye+WYre +dAaHFpuN6XfmsXmhXaSodhH9gKS+oftYX61qUmiE7L98nvINNBMnFVkptCQVDl8o +GWiMRYhGBBMRAgAGBQJUqBAmAAoJEMSxB5iFeWojCtoAoLa2/SUyfC5EiKdvEbap +49v6XPyxAJ9mPvhe75aTOU7uWoa+c0wn6fXIcrkBDQRUpeK0AQgA7ctg3cJD4eTw +j4sQ94AtSYjwT+Yp7r2s6h4cHUge6AMZy9ixtyg87JnviRFob2zeo2JFDAwtl7Zs +GHo+py/mJwfQKmUsXUmQqgHJFXDiiux+4+dYOXZyVYKP5bTV0JVlKjRjSWNnh7Bv +yZNUZlrLz5ZKF1NAYKJAw4fx3TFbC4K3hvDwHQW3croPQYq0wNq6as956LHYjUOB +Q5K0uy4TXY2EcIyAy253UX9MAFgacuP1jf3ITEVZpcebzl+gcaB54gXqOfmgQQP5 +PmQDyb96ZxFsKa5UfsS3Kh0PeERa5TDlgiw55O55pUSGKKfYfOXvqpJ/ZKYl+ado +wgsmbq09UwARAQABiQEfBBgBAgAJBQJUpeK0AhsMAAoJEKr1td4FvcxTNO0IAJ2b +V48mulcdCS8G3t8qRHlEXGbxgYBQRa500M9fdgRyIWBxubP7r6/nLFDGiIpdUVmT +g9F3r1JsyK6Q7+VUp9XLirj/gT1kwxXT/UHHIQO8ObtPbfFtqISaBjaklTOUPCud ++nOpzRIfct6CZM0xAVIoqm4kaRFaWefxRiyeosDQ7tCD4lDRwxNJE2deE1WmOeN1 +YCJHa8QaewJXtUvqMq6pRmTlzSn+5/w3gV3XVF+CHjGD/COeSm7CGazLmlypN4n8 +ib9eRg0K2rAqKfUbn+aFwmqSBhBcw/UhOoXnteNQvd9KNdKiHERJEI3qZ2rLAlYf +uYT6oSAR9rPSpsZpyTI= +=Jib4 +-----END PGP PUBLIC KEY BLOCK----- + + Type Bits KeyID Created Expires Algorithm Use pub 2048 E2763A73 2014-01-02 ------- RSA Sign & Encrypt fingerprint: 49F6 A8BE 8473 3949 5191 6F3B 61DE 11EC E276 3A73 @@ -2613,4 +2792,3 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.46 $, Last updated $Date: 2014-01-18 00:20:24 $ Modified: vendor/sendmail/dist/RELEASE_NOTES ============================================================================== --- vendor/sendmail/dist/RELEASE_NOTES Mon Jul 6 03:06:13 2015 (r285192) +++ vendor/sendmail/dist/RELEASE_NOTES Mon Jul 6 04:29:34 2015 (r285193) @@ -5,6 +5,47 @@ This listing shows the version of the se of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.15.2/8.15.2 2015/07/03 + If FEATURE(`nopercenthack') is used then some bogus input triggered + a recursion which was caught and logged as + SYSERR: rewrite: excessive recursion (max 50) ... + Fix based on patch from Ondrej Holas. + DHParameters now by default uses an included 2048 bit prime. + The value 'none' previously caused a log entry claiming + there was an error "cannot read or set DH parameters". + Also note that this option applies to the server side only. + The U= mailer field didn't accept group names containing hyphens, + underbars, or periods. Based on patch from David Gwynne + of the University of Queensland. + CONFIG: Allow connections from IPv6:0:0:0:0:0:0:0:1 to relay again. + Patch from Lars-Johan Liman of Netnod Internet Exchange. + CONFIG: New option UseCompressedIPv6Addresses to select between + compressed and uncompressed IPv6 addresses. The default + value depends on the compile-time option IPV6_FULL: + For 1 the default is False, for 0 it is True, thus + preserving the current behaviour. Based on patch from + John Beck of Oracle. + CONFIG: Account for IPv6 localhost addresses in + FEATURE(`block_bad_helo'). Suggested by Andrey Chernov + from FreeBSD and Robert Scheck from the Fedora Project. + CONFIG: Account for IPv6 localhost addresses in check_mail ruleset. + LIBMILTER: Deal with more invalid protocol data to avoid potential + crashes. Problem noted by Dimitri Kirchner. + LIBMILTER: Allow a milter to specify an empty macro list ("", not + NULL) in smfi_setsymlist() so no macro is sent for the + selected stage. + MAKEMAP: A change to check TrustedUser in fewer cases which was + made in 2013 caused a potential regression when makemap + was run as root (which should not be done anyway). + Note: sendmail often contains options "For Future Releases" + (prefix _FFR_) which might be enabled in a subsequent + version or might simply be removed as they turned out not + to be really useful. These features are usually not + documented but if they are, then the required (FFR) + options are listed in + - doc/op/op.* for rulesets and macros, + - cf/README for mc/cf options. + 8.15.1/8.15.1 2014/12/06 SECURITY: Properly set the close-on-exec flag for file descriptors (except stdin, stdout, and stderr) before executing mailers. Modified: vendor/sendmail/dist/cf/README ============================================================================== --- vendor/sendmail/dist/cf/README Mon Jul 6 03:06:13 2015 (r285192) +++ vendor/sendmail/dist/cf/README Mon Jul 6 04:29:34 2015 (r285193) @@ -158,6 +158,26 @@ FEATURE(`local_procmail'). ******************************************************************* +Note: +Some rulesets, features, and options are only useful if the sendmail +binary has been compiled with the appropriate options, e.g., the +ruleset tls_server is only invoked if sendmail has been compiled +with STARTTLS. This is usually obvious from the context and hence +not further specified here. +There are also so called "For Future Releases" (FFR) compile time +options which might be included in a subsequent version or might +simply be removed as they turned out not to be really useful. +These are generally not documented but if they are, then the required +compile time options are listed in doc/op/op.* for rulesets and +macros, and for mc/cf specific options they are usually listed here. +In addition to compile time options for the sendmail binary, there +can also be FFRs for mc/cf which in general can be enabled when the +configuration file is generated by defining them at the top of your +.mc file: + +define(`_FFR_NAME_HERE', 1) + + +----------------------------+ | A BRIEF INTRODUCTION TO M4 | +----------------------------+ @@ -1455,7 +1475,7 @@ msp Defines config file for Message Sub by default. If you have a machine with IPv6 only, change it to - FEATURE(`msp', `[IPv6:::1]') + FEATURE(`msp', `[IPv6:0:0:0:0:0:0:0:1]') If you want to continue using '[localhost]', (the behavior up to 8.12.6), use @@ -1513,8 +1533,12 @@ block_bad_helo Reject messages from SMTP - connections from IP addresses in class $={R}. Currently access_db lookups can not be used to (selectively) disable this test, moreover, + FEATURE(`delay_checks') - is required. + + is required. Note, the block_bad_helo feature automatically + adds the IPv6 and IPv4 localhost IP addresses to $={w} (local + host names) and $={R} (relay permitted). require_rdns Reject mail from connecting SMTP clients without proper rDNS (reverse DNS), functional gethostbyaddr() resolution. @@ -3176,17 +3200,49 @@ TLS_Clt:laptop.example.com PERM+VER TLS_Rcpt:darth@endmail.org ENCR:112+CN:smtp.endmail.org -Disabling STARTTLS And Setting SMTP Server Features ---------------------------------------------------- +TLS Options per Session +----------------------- By default STARTTLS is used whenever possible. However, there are -some broken MTAs that don't properly implement STARTTLS. To be able -to send to (or receive from) those MTAs, the ruleset try_tls -(srv_features) can be used that work together with the access map. -Entries for the access map must be tagged with Try_TLS (Srv_Features) -and refer to the hostname or IP address of the connecting system. -A default case can be specified by using just the tag. For example, -the following entries in the access map: +MTAs with STARTTLS interoperability issues. To be able to send to +(or receive from) those MTAs several features are available: + +1) Various TLS options be be set per IP/domain. +2) STARTTLS can be turned off for specific IP addresses/domains. + +About 1): the rulesets tls_srv_features and tls_clt_features can +be used to return a (semicolon separated) list of TLS related +options: + +- Options: compare {Server,Client}SSLOptions. +- CipherList: same as the global option. +- CertFile, KeyFile: {Server,Client}{Cert,Key}File + +If FEATURE(`tls_session_features') is used, then default rulesets +are activated which look up entries in the access map with the tags +TLS_Srv_features and TLS_Clt_features, respectively. +For example, these entries: + + TLS_Srv_features:10.0.2.4 CipherList=MEDIUM+aRSA; + TLS_Clt_features:10.1.0.1 Options=SSL_OP_NO_TLSv1_2; CipherList=ALL:-EXPORT + +specify a cipherlist with MEDIUM strength ciphers that use RSA +certificates only for the client with the IP address 10.0.2.4, +and turn off TLSv1.2 when connecting to the server with the IP +address 10.1.0.1 as well as setting a specific cipherlist. +If FEATURE(`tls_session_features') is not used the user can provide +their own rulesets which must return the appropriate data. +If the rulesets are not defined or do not return a value, the +default TLS options are not modified. +(These rulesets require the sendmail binary to be built with +_FFR_TLS_SE_OPTS enabled.) + +About 2): the ruleset try_tls (srv_features) can be used that work +together with the access map. Entries for the access map must be +tagged with Try_TLS (Srv_Features) and refer to the hostname or IP +address of the connecting system. A default case can be specified +by using just the tag. For example, the following entries in the +access map: Try_TLS:broken.server NO Srv_Features:my.domain v @@ -3772,6 +3828,12 @@ confSINGLE_THREAD_DELIVERY SingleThread cached but otherwise idle connection to a host will prevent other sendmails from connecting to the other host. +confUSE_COMPRESSED_IPV6_ADDRESSES + UseCompressedIPv6Addresses + [undefined] If set, use the compressed + form of IPv6 addresses, such as + IPV6:::1, instead of the uncompressed + form, such as IPv6:0:0:0:0:0:0:0:1. confUSE_ERRORS_TO* UseErrorsTo [False] Use the Errors-To: header to deliver error messages. This should not be necessary because of general @@ -4281,10 +4343,11 @@ confLDAP_DEFAULT_SPEC LDAPDefaultSpec [u maps unless they are specified in the individual map specification ('K' command). -confCACERT_PATH CACertPath [undefined] Path to directory - with certs of CAs. -confCACERT CACertFile [undefined] File containing one CA - cert. +confCACERT_PATH CACertPath [undefined] Path to directory with + certificates of CAs which must contain + their hashes as filenames or links. +confCACERT CACertFile [undefined] File containing at least + one CA certificate. confSERVER_CERT ServerCertFile [undefined] File containing the cert of the server, i.e., this cert is used when sendmail acts as Modified: vendor/sendmail/dist/cf/cf/Makefile ============================================================================== --- vendor/sendmail/dist/cf/cf/Makefile Mon Jul 6 03:06:13 2015 (r285192) +++ vendor/sendmail/dist/cf/cf/Makefile Mon Jul 6 04:29:34 2015 (r285193) @@ -100,6 +100,7 @@ M4FILES=\ ${CFDIR}/feature/access_db.m4 \ ${CFDIR}/feature/allmasquerade.m4 \ ${CFDIR}/feature/always_add_domain.m4 \ + ${CFDIR}/feature/bcc.m4 \ ${CFDIR}/feature/bestmx_is_local.m4 \ ${CFDIR}/feature/bitdomain.m4 \ ${CFDIR}/feature/blacklist_recipients.m4 \ @@ -118,9 +119,11 @@ M4FILES=\ ${CFDIR}/feature/masquerade_envelope.m4 \ ${CFDIR}/feature/no_default_msa.m4 \ ${CFDIR}/feature/nocanonify.m4 \ + ${CFDIR}/feature/nopercenthack.m4 \ ${CFDIR}/feature/notsticky.m4 \ ${CFDIR}/feature/nouucp.m4 \ ${CFDIR}/feature/nullclient.m4 \ + ${CFDIR}/feature/prefixmod.m4 \ ${CFDIR}/feature/promiscuous_relay.m4 \ ${CFDIR}/feature/redirect.m4 \ ${CFDIR}/feature/ratecontrol.m4 \ @@ -131,12 +134,14 @@ M4FILES=\ ${CFDIR}/feature/relay_mail_from.m4 \ ${CFDIR}/feature/smrsh.m4 \ ${CFDIR}/feature/stickyhost.m4 \ + ${CFDIR}/feature/tls_session_features.m4 \ ${CFDIR}/feature/use_ct_file.m4 \ ${CFDIR}/feature/use_cw_file.m4 \ ${CFDIR}/feature/uucpdomain.m4 \ ${CFDIR}/feature/virtuser_entire_domain.m4 \ ${CFDIR}/feature/virtusertable.m4 \ ${CFDIR}/hack/cssubdomain.m4 \ + ${CFDIR}/hack/xconnect.m4 \ ${CFDIR}/m4/cf.m4 \ ${CFDIR}/m4/cfhead.m4 \ ${CFDIR}/m4/proto.m4 \ Modified: vendor/sendmail/dist/cf/cf/generic-bsd4.4.cf ============================================================================== --- vendor/sendmail/dist/cf/cf/generic-bsd4.4.cf Mon Jul 6 03:06:13 2015 (r285192) +++ vendor/sendmail/dist/cf/cf/generic-bsd4.4.cf Mon Jul 6 04:29:34 2015 (r285193) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@sandman.dev-lab.sendmail.com on Tue Dec 2 16:21:20 PST 2014 -##### in /x/ca/sm8.git/sendmail/OpenSource/sendmail-8.15.1/cf/cf +##### built by ca@sandman.dev-lab.sendmail.com on Thu Jul 2 05:24:31 PDT 2015 +##### in /x/ca/smi.git/sendmail/OpenSource/sendmail-8.15.2/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -122,7 +122,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.15.1 +DZ8.15.2 ############### @@ -210,6 +210,9 @@ O ConnectionCacheTimeout=5m # use Errors-To: header? O UseErrorsTo=False +# use compressed IPv6 address format? +#O UseCompressedIPv6Addresses + # log level O LogLevel=9 @@ -662,8 +665,8 @@ R$+ ! $+ $@ $>Canonify2 $2 < @ $1 .UUCP # if we have % signs, take the rightmost one R$* % $* $1 @ $2 First make them all @s. R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last. -R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish +R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish # else we must be a local name R$* $@ $>Canonify2 $1 @@ -1052,6 +1055,10 @@ R$* $| $* $: $2 R<@> < $* @ localhost > $: < ? $&{client_name} > < $1 @ localhost > R<@> < $* @ [127.0.0.1] > $: < ? $&{client_name} > < $1 @ [127.0.0.1] > +R<@> < $* @ [IPv6:0:0:0:0:0:0:0:1] > + $: < ? $&{client_name} > < $1 @ [IPv6:0:0:0:0:0:0:0:1] > +R<@> < $* @ [IPv6:::1] > + $: < ? $&{client_name} > < $1 @ [IPv6:::1] > R<@> < $* @ localhost.$m > $: < ? $&{client_name} > < $1 @ localhost.$m > R<@> < $* @ localhost.UUCP > @@ -1166,6 +1173,7 @@ R$* $: $&{client_addr} R$@ $@ RELAY originated locally R0 $@ RELAY originated locally R127.0.0.1 $@ RELAY originated locally +RIPv6:0:0:0:0:0:0:0:1 $@ RELAY originated locally RIPv6:::1 $@ RELAY originated locally R$=R $* $@ RELAY relayable IP address R$* $: [ $1 ] put brackets around it... @@ -1270,6 +1278,8 @@ STLS_connection RSOFTWARE $#error $@ 4.7.0 $: "403 TLS handshake." + + ###################################################################### ### RelayTLS: allow relaying based on TLS authentication ### Modified: vendor/sendmail/dist/cf/cf/generic-hpux10.cf ============================================================================== --- vendor/sendmail/dist/cf/cf/generic-hpux10.cf Mon Jul 6 03:06:13 2015 (r285192) +++ vendor/sendmail/dist/cf/cf/generic-hpux10.cf Mon Jul 6 04:29:34 2015 (r285193) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@sandman.dev-lab.sendmail.com on Tue Dec 2 16:21:20 PST 2014 -##### in /x/ca/sm8.git/sendmail/OpenSource/sendmail-8.15.1/cf/cf +##### built by ca@sandman.dev-lab.sendmail.com on Thu Jul 2 05:24:31 PDT 2015 +##### in /x/ca/smi.git/sendmail/OpenSource/sendmail-8.15.2/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -123,7 +123,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.15.1 +DZ8.15.2 ############### @@ -211,6 +211,9 @@ O ConnectionCacheTimeout=5m # use Errors-To: header? O UseErrorsTo=False +# use compressed IPv6 address format? +#O UseCompressedIPv6Addresses + # log level O LogLevel=9 @@ -663,8 +666,8 @@ R$+ ! $+ $@ $>Canonify2 $2 < @ $1 .UUCP # if we have % signs, take the rightmost one R$* % $* $1 @ $2 First make them all @s. R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last. -R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish +R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish # else we must be a local name R$* $@ $>Canonify2 $1 @@ -1053,6 +1056,10 @@ R$* $| $* $: $2 R<@> < $* @ localhost > $: < ? $&{client_name} > < $1 @ localhost > R<@> < $* @ [127.0.0.1] > $: < ? $&{client_name} > < $1 @ [127.0.0.1] > +R<@> < $* @ [IPv6:0:0:0:0:0:0:0:1] > + $: < ? $&{client_name} > < $1 @ [IPv6:0:0:0:0:0:0:0:1] > +R<@> < $* @ [IPv6:::1] > + $: < ? $&{client_name} > < $1 @ [IPv6:::1] > R<@> < $* @ localhost.$m > $: < ? $&{client_name} > < $1 @ localhost.$m > R<@> < $* @ localhost.UUCP > @@ -1167,6 +1174,7 @@ R$* $: $&{client_addr} R$@ $@ RELAY originated locally R0 $@ RELAY originated locally R127.0.0.1 $@ RELAY originated locally +RIPv6:0:0:0:0:0:0:0:1 $@ RELAY originated locally RIPv6:::1 $@ RELAY originated locally R$=R $* $@ RELAY relayable IP address R$* $: [ $1 ] put brackets around it... @@ -1271,6 +1279,8 @@ STLS_connection RSOFTWARE $#error $@ 4.7.0 $: "403 TLS handshake." + + ###################################################################### ### RelayTLS: allow relaying based on TLS authentication ### Modified: vendor/sendmail/dist/cf/cf/generic-hpux9.cf ============================================================================== --- vendor/sendmail/dist/cf/cf/generic-hpux9.cf Mon Jul 6 03:06:13 2015 (r285192) +++ vendor/sendmail/dist/cf/cf/generic-hpux9.cf Mon Jul 6 04:29:34 2015 (r285193) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@sandman.dev-lab.sendmail.com on Tue Dec 2 16:21:20 PST 2014 -##### in /x/ca/sm8.git/sendmail/OpenSource/sendmail-8.15.1/cf/cf +##### built by ca@sandman.dev-lab.sendmail.com on Thu Jul 2 05:24:31 PDT 2015 +##### in /x/ca/smi.git/sendmail/OpenSource/sendmail-8.15.2/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -123,7 +123,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.15.1 +DZ8.15.2 ############### @@ -211,6 +211,9 @@ O ConnectionCacheTimeout=5m # use Errors-To: header? O UseErrorsTo=False +# use compressed IPv6 address format? +#O UseCompressedIPv6Addresses + # log level O LogLevel=9 @@ -663,8 +666,8 @@ R$+ ! $+ $@ $>Canonify2 $2 < @ $1 .UUCP # if we have % signs, take the rightmost one R$* % $* $1 @ $2 First make them all @s. R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last. -R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish +R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish # else we must be a local name R$* $@ $>Canonify2 $1 @@ -1053,6 +1056,10 @@ R$* $| $* $: $2 R<@> < $* @ localhost > $: < ? $&{client_name} > < $1 @ localhost > R<@> < $* @ [127.0.0.1] > $: < ? $&{client_name} > < $1 @ [127.0.0.1] > +R<@> < $* @ [IPv6:0:0:0:0:0:0:0:1] > + $: < ? $&{client_name} > < $1 @ [IPv6:0:0:0:0:0:0:0:1] > +R<@> < $* @ [IPv6:::1] > + $: < ? $&{client_name} > < $1 @ [IPv6:::1] > R<@> < $* @ localhost.$m > $: < ? $&{client_name} > < $1 @ localhost.$m > R<@> < $* @ localhost.UUCP > @@ -1167,6 +1174,7 @@ R$* $: $&{client_addr} R$@ $@ RELAY originated locally R0 $@ RELAY originated locally R127.0.0.1 $@ RELAY originated locally +RIPv6:0:0:0:0:0:0:0:1 $@ RELAY originated locally RIPv6:::1 $@ RELAY originated locally R$=R $* $@ RELAY relayable IP address R$* $: [ $1 ] put brackets around it... @@ -1271,6 +1279,8 @@ STLS_connection RSOFTWARE $#error $@ 4.7.0 $: "403 TLS handshake." + + ###################################################################### ### RelayTLS: allow relaying based on TLS authentication ### Modified: vendor/sendmail/dist/cf/cf/generic-linux.cf ============================================================================== --- vendor/sendmail/dist/cf/cf/generic-linux.cf Mon Jul 6 03:06:13 2015 (r285192) +++ vendor/sendmail/dist/cf/cf/generic-linux.cf Mon Jul 6 04:29:34 2015 (r285193) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@sandman.dev-lab.sendmail.com on Tue Dec 2 16:21:20 PST 2014 -##### in /x/ca/sm8.git/sendmail/OpenSource/sendmail-8.15.1/cf/cf +##### built by ca@sandman.dev-lab.sendmail.com on Thu Jul 2 05:24:31 PDT 2015 +##### in /x/ca/smi.git/sendmail/OpenSource/sendmail-8.15.2/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -127,7 +127,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.15.1 +DZ8.15.2 ############### @@ -215,6 +215,9 @@ O ConnectionCacheTimeout=5m # use Errors-To: header? O UseErrorsTo=False +# use compressed IPv6 address format? +#O UseCompressedIPv6Addresses + # log level O LogLevel=9 @@ -667,8 +670,8 @@ R$+ ! $+ $@ $>Canonify2 $2 < @ $1 .UUCP # if we have % signs, take the rightmost one R$* % $* $1 @ $2 First make them all @s. R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last. -R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish +R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish # else we must be a local name R$* $@ $>Canonify2 $1 @@ -1057,6 +1060,10 @@ R$* $| $* $: $2 R<@> < $* @ localhost > $: < ? $&{client_name} > < $1 @ localhost > R<@> < $* @ [127.0.0.1] > $: < ? $&{client_name} > < $1 @ [127.0.0.1] > +R<@> < $* @ [IPv6:0:0:0:0:0:0:0:1] > + $: < ? $&{client_name} > < $1 @ [IPv6:0:0:0:0:0:0:0:1] > +R<@> < $* @ [IPv6:::1] > + $: < ? $&{client_name} > < $1 @ [IPv6:::1] > R<@> < $* @ localhost.$m > $: < ? $&{client_name} > < $1 @ localhost.$m > R<@> < $* @ localhost.UUCP > @@ -1171,6 +1178,7 @@ R$* $: $&{client_addr} R$@ $@ RELAY originated locally R0 $@ RELAY originated locally R127.0.0.1 $@ RELAY originated locally +RIPv6:0:0:0:0:0:0:0:1 $@ RELAY originated locally RIPv6:::1 $@ RELAY originated locally R$=R $* $@ RELAY relayable IP address R$* $: [ $1 ] put brackets around it... @@ -1275,6 +1283,8 @@ STLS_connection RSOFTWARE $#error $@ 4.7.0 $: "403 TLS handshake." + + ###################################################################### ### RelayTLS: allow relaying based on TLS authentication ### Modified: vendor/sendmail/dist/cf/cf/generic-mpeix.cf ============================================================================== --- vendor/sendmail/dist/cf/cf/generic-mpeix.cf Mon Jul 6 03:06:13 2015 (r285192) +++ vendor/sendmail/dist/cf/cf/generic-mpeix.cf Mon Jul 6 04:29:34 2015 (r285193) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@sandman.dev-lab.sendmail.com on Tue Dec 2 16:21:20 PST 2014 -##### in /x/ca/sm8.git/sendmail/OpenSource/sendmail-8.15.1/cf/cf +##### built by ca@sandman.dev-lab.sendmail.com on Thu Jul 2 05:24:31 PDT 2015 +##### in /x/ca/smi.git/sendmail/OpenSource/sendmail-8.15.2/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -123,7 +123,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.15.1 +DZ8.15.2 ############### @@ -211,6 +211,9 @@ O ConnectionCacheTimeout=5m # use Errors-To: header? O UseErrorsTo=False +# use compressed IPv6 address format? +#O UseCompressedIPv6Addresses + # log level O LogLevel=9 @@ -663,8 +666,8 @@ R$+ ! $+ $@ $>Canonify2 $2 < @ $1 .UUCP # if we have % signs, take the rightmost one R$* % $* $1 @ $2 First make them all @s. R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last. -R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish +R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish # else we must be a local name R$* $@ $>Canonify2 $1 @@ -1053,6 +1056,10 @@ R$* $| $* $: $2 R<@> < $* @ localhost > $: < ? $&{client_name} > < $1 @ localhost > R<@> < $* @ [127.0.0.1] > $: < ? $&{client_name} > < $1 @ [127.0.0.1] > +R<@> < $* @ [IPv6:0:0:0:0:0:0:0:1] > + $: < ? $&{client_name} > < $1 @ [IPv6:0:0:0:0:0:0:0:1] > +R<@> < $* @ [IPv6:::1] > + $: < ? $&{client_name} > < $1 @ [IPv6:::1] > R<@> < $* @ localhost.$m > $: < ? $&{client_name} > < $1 @ localhost.$m > R<@> < $* @ localhost.UUCP > @@ -1167,6 +1174,7 @@ R$* $: $&{client_addr} R$@ $@ RELAY originated locally R0 $@ RELAY originated locally R127.0.0.1 $@ RELAY originated locally +RIPv6:0:0:0:0:0:0:0:1 $@ RELAY originated locally RIPv6:::1 $@ RELAY originated locally R$=R $* $@ RELAY relayable IP address R$* $: [ $1 ] put brackets around it... @@ -1271,6 +1279,8 @@ STLS_connection RSOFTWARE $#error $@ 4.7.0 $: "403 TLS handshake." + + ###################################################################### ### RelayTLS: allow relaying based on TLS authentication ### Modified: vendor/sendmail/dist/cf/cf/generic-nextstep3.3.cf ============================================================================== --- vendor/sendmail/dist/cf/cf/generic-nextstep3.3.cf Mon Jul 6 03:06:13 2015 (r285192) +++ vendor/sendmail/dist/cf/cf/generic-nextstep3.3.cf Mon Jul 6 04:29:34 2015 (r285193) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@sandman.dev-lab.sendmail.com on Tue Dec 2 16:21:20 PST 2014 -##### in /x/ca/sm8.git/sendmail/OpenSource/sendmail-8.15.1/cf/cf +##### built by ca@sandman.dev-lab.sendmail.com on Thu Jul 2 05:24:31 PDT 2015 +##### in /x/ca/smi.git/sendmail/OpenSource/sendmail-8.15.2/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -122,7 +122,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.15.1 +DZ8.15.2 ############### @@ -210,6 +210,9 @@ O ConnectionCacheTimeout=5m # use Errors-To: header? O UseErrorsTo=False +# use compressed IPv6 address format? +#O UseCompressedIPv6Addresses + # log level O LogLevel=9 @@ -662,8 +665,8 @@ R$+ ! $+ $@ $>Canonify2 $2 < @ $1 .UUCP # if we have % signs, take the rightmost one R$* % $* $1 @ $2 First make them all @s. R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last. -R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish +R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish # else we must be a local name R$* $@ $>Canonify2 $1 @@ -1052,6 +1055,10 @@ R$* $| $* $: $2 R<@> < $* @ localhost > $: < ? $&{client_name} > < $1 @ localhost > R<@> < $* @ [127.0.0.1] > $: < ? $&{client_name} > < $1 @ [127.0.0.1] > +R<@> < $* @ [IPv6:0:0:0:0:0:0:0:1] > + $: < ? $&{client_name} > < $1 @ [IPv6:0:0:0:0:0:0:0:1] > +R<@> < $* @ [IPv6:::1] > + $: < ? $&{client_name} > < $1 @ [IPv6:::1] > R<@> < $* @ localhost.$m > $: < ? $&{client_name} > < $1 @ localhost.$m > R<@> < $* @ localhost.UUCP > @@ -1166,6 +1173,7 @@ R$* $: $&{client_addr} R$@ $@ RELAY originated locally R0 $@ RELAY originated locally R127.0.0.1 $@ RELAY originated locally +RIPv6:0:0:0:0:0:0:0:1 $@ RELAY originated locally RIPv6:::1 $@ RELAY originated locally R$=R $* $@ RELAY relayable IP address R$* $: [ $1 ] put brackets around it... @@ -1270,6 +1278,8 @@ STLS_connection RSOFTWARE $#error $@ 4.7.0 $: "403 TLS handshake." + + ###################################################################### ### RelayTLS: allow relaying based on TLS authentication ### Modified: vendor/sendmail/dist/cf/cf/generic-osf1.cf ============================================================================== --- vendor/sendmail/dist/cf/cf/generic-osf1.cf Mon Jul 6 03:06:13 2015 (r285192) +++ vendor/sendmail/dist/cf/cf/generic-osf1.cf Mon Jul 6 04:29:34 2015 (r285193) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@sandman.dev-lab.sendmail.com on Tue Dec 2 16:21:20 PST 2014 -##### in /x/ca/sm8.git/sendmail/OpenSource/sendmail-8.15.1/cf/cf +##### built by ca@sandman.dev-lab.sendmail.com on Thu Jul 2 05:24:31 PDT 2015 +##### in /x/ca/smi.git/sendmail/OpenSource/sendmail-8.15.2/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -123,7 +123,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.15.1 +DZ8.15.2 ############### @@ -211,6 +211,9 @@ O ConnectionCacheTimeout=5m # use Errors-To: header? O UseErrorsTo=False +# use compressed IPv6 address format? +#O UseCompressedIPv6Addresses + # log level O LogLevel=9 @@ -663,8 +666,8 @@ R$+ ! $+ $@ $>Canonify2 $2 < @ $1 .UUCP # if we have % signs, take the rightmost one R$* % $* $1 @ $2 First make them all @s. R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last. -R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish +R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish # else we must be a local name R$* $@ $>Canonify2 $1 @@ -1053,6 +1056,10 @@ R$* $| $* $: $2 R<@> < $* @ localhost > $: < ? $&{client_name} > < $1 @ localhost > R<@> < $* @ [127.0.0.1] > $: < ? $&{client_name} > < $1 @ [127.0.0.1] > +R<@> < $* @ [IPv6:0:0:0:0:0:0:0:1] > + $: < ? $&{client_name} > < $1 @ [IPv6:0:0:0:0:0:0:0:1] > +R<@> < $* @ [IPv6:::1] > + $: < ? $&{client_name} > < $1 @ [IPv6:::1] > R<@> < $* @ localhost.$m > $: < ? $&{client_name} > < $1 @ localhost.$m > R<@> < $* @ localhost.UUCP > @@ -1167,6 +1174,7 @@ R$* $: $&{client_addr} R$@ $@ RELAY originated locally *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jul 6 04:31:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E88F098FD4C; Mon, 6 Jul 2015 04:31:24 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 BEA82360B; Mon, 6 Jul 2015 04:31:24 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t664VOu5089268; Mon, 6 Jul 2015 04:31:24 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t664VOcd089267; Mon, 6 Jul 2015 04:31:24 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507060431.t664VOcd089267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Mon, 6 Jul 2015 04:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r285194 - vendor/sendmail/8.15.2 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 04:31:25 -0000 Author: gshapiro Date: Mon Jul 6 04:31:24 2015 New Revision: 285194 URL: https://svnweb.freebsd.org/changeset/base/285194 Log: Tag sendmail 8.15.2 Added: - copied from r285193, vendor/sendmail/dist/ Directory Properties: vendor/sendmail/8.15.2/ (props changed) From owner-svn-src-all@freebsd.org Mon Jul 6 05:08:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9B9F9924C5; Mon, 6 Jul 2015 05:08:59 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 BCDD31457; Mon, 6 Jul 2015 05:08:59 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6658xpn006689; Mon, 6 Jul 2015 05:08:59 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6658w0J006681; Mon, 6 Jul 2015 05:08:58 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201507060508.t6658w0J006681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 6 Jul 2015 05:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285195 - in head/sys: conf powerpc/aim powerpc/booke powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 05:08:59 -0000 Author: jhibbits Date: Mon Jul 6 05:08:57 2015 New Revision: 285195 URL: https://svnweb.freebsd.org/changeset/base/285195 Log: Merge booke and aim interrupt.c files. Summary: Both booke and AIM interrupt.c files contain nearly identical code. This merges the two files, to reduce duplication. Reviewers: #powerpc, marcel Reviewed By: marcel Subscribers: imp Differential Revision: https://reviews.freebsd.org/D2991 Added: head/sys/powerpc/powerpc/interrupt.c - copied unchanged from r284893, head/sys/powerpc/aim/interrupt.c Deleted: head/sys/powerpc/aim/interrupt.c head/sys/powerpc/booke/interrupt.c Modified: head/sys/conf/files.powerpc head/sys/powerpc/booke/trap_subr.S Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Mon Jul 6 04:31:24 2015 (r285194) +++ head/sys/conf/files.powerpc Mon Jul 6 05:08:57 2015 (r285195) @@ -99,7 +99,6 @@ libkern/qdivrem.c optional powerpc libkern/ucmpdi2.c optional powerpc libkern/udivdi3.c optional powerpc libkern/umoddi3.c optional powerpc -powerpc/aim/interrupt.c optional aim powerpc/aim/locore.S optional aim no-obj powerpc/aim/aim_machdep.c optional aim powerpc/aim/mmu_oea.c optional aim powerpc @@ -108,7 +107,6 @@ powerpc/aim/moea64_if.m optional aim powerpc/aim/moea64_native.c optional aim powerpc/aim/mp_cpudep.c optional aim powerpc/aim/slb.c optional aim powerpc64 -powerpc/booke/interrupt.c optional booke powerpc/booke/locore.S optional booke no-obj powerpc/booke/booke_machdep.c optional booke powerpc/booke/machdep_e500.c optional booke_e500 @@ -197,6 +195,7 @@ powerpc/powerpc/fpu.c standard powerpc/powerpc/fuswintr.c standard powerpc/powerpc/gdb_machdep.c optional gdb powerpc/powerpc/in_cksum.c optional inet | inet6 +powerpc/powerpc/interrupt.c standard powerpc/powerpc/intr_machdep.c standard powerpc/powerpc/iommu_if.m standard powerpc/powerpc/machdep.c standard Modified: head/sys/powerpc/booke/trap_subr.S ============================================================================== --- head/sys/powerpc/booke/trap_subr.S Mon Jul 6 04:31:24 2015 (r285194) +++ head/sys/powerpc/booke/trap_subr.S Mon Jul 6 05:08:57 2015 (r285195) @@ -401,7 +401,7 @@ INTERRUPT(int_critical_input) STANDARD_PROLOG(SPR_SPRG2, PC_BOOKE_CRITSAVE, SPR_CSRR0, SPR_CSRR1) FRAME_SETUP(SPR_SPRG2, PC_BOOKE_CRITSAVE, EXC_CRIT) addi %r3, %r1, 8 - bl CNAME(powerpc_crit_interrupt) + bl CNAME(powerpc_interrupt) FRAME_LEAVE(SPR_CSRR0, SPR_CSRR1) rfci @@ -413,7 +413,7 @@ INTERRUPT(int_machine_check) STANDARD_PROLOG(SPR_SPRG3, PC_BOOKE_MCHKSAVE, SPR_MCSRR0, SPR_MCSRR1) FRAME_SETUP(SPR_SPRG3, PC_BOOKE_MCHKSAVE, EXC_MCHK) addi %r3, %r1, 8 - bl CNAME(powerpc_mchk_interrupt) + bl CNAME(powerpc_interrupt) FRAME_LEAVE(SPR_MCSRR0, SPR_MCSRR1) rfmci @@ -443,8 +443,8 @@ INTERRUPT(int_external_input) STANDARD_PROLOG(SPR_SPRG1, PC_TEMPSAVE, SPR_SRR0, SPR_SRR1) FRAME_SETUP(SPR_SPRG1, PC_TEMPSAVE, EXC_EXI) addi %r3, %r1, 8 - bl CNAME(powerpc_extr_interrupt) - b trapexit + bl CNAME(powerpc_interrupt) + b clear_we INTERRUPT(int_alignment) @@ -475,8 +475,8 @@ INTERRUPT(int_decrementer) STANDARD_PROLOG(SPR_SPRG1, PC_TEMPSAVE, SPR_SRR0, SPR_SRR1) FRAME_SETUP(SPR_SPRG1, PC_TEMPSAVE, EXC_DECR) addi %r3, %r1, 8 - bl CNAME(powerpc_decr_interrupt) - b trapexit + bl CNAME(powerpc_interrupt) + b clear_we /***************************************************************************** @@ -505,7 +505,7 @@ INTERRUPT(int_performance_counter) STANDARD_PROLOG(SPR_SPRG3, PC_TEMPSAVE, SPR_SRR0, SPR_SRR1) FRAME_SETUP(SPR_SPRG3, PC_TEMPSAVE, EXC_PERF) addi %r3, %r1, 8 - bl CNAME(powerpc_pmc_interrupt) + bl CNAME(powerpc_interrupt) b trapexit #endif @@ -879,6 +879,12 @@ dbleave: rfi #endif /* KDB */ +clear_we: + lwz %r3, (FRAME_SRR1+8)(%r1) + rlwinm %r3, %r3, 0, 14, 12 + stw %r3, (FRAME_SRR1+8)(%r1) + b trapexit + #ifdef SMP ENTRY(tlb_lock) GET_CPUINFO(%r5) Copied: head/sys/powerpc/powerpc/interrupt.c (from r284893, head/sys/powerpc/aim/interrupt.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/powerpc/interrupt.c Mon Jul 6 05:08:57 2015 (r285195, copy of r284893, head/sys/powerpc/aim/interrupt.c) @@ -0,0 +1,122 @@ +/*- + * Copyright 2002 by Peter Grehan. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Interrupts are dispatched to here from locore asm + */ + +#include "opt_hwpmc_hooks.h" + +#include /* RCS ID & Copyright macro defns */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HWPMC_HOOKS +#include +#endif +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "pic_if.h" + +/* + * A very short dispatch, to try and maximise assembler code use + * between all exception types. Maybe 'true' interrupts should go + * here, and the trap code can come in separately + */ +void +powerpc_interrupt(struct trapframe *framep) +{ + struct thread *td; + struct trapframe *oldframe; + register_t ee; + + td = curthread; + + CTR2(KTR_INTR, "%s: EXC=%x", __func__, framep->exc); + + switch (framep->exc) { + case EXC_EXI: + critical_enter(); + PIC_DISPATCH(root_pic, framep); + critical_exit(); + break; + + case EXC_DECR: + critical_enter(); + atomic_add_int(&td->td_intr_nesting_level, 1); + oldframe = td->td_intr_frame; + td->td_intr_frame = framep; + decr_intr(framep); + td->td_intr_frame = oldframe; + atomic_subtract_int(&td->td_intr_nesting_level, 1); + critical_exit(); + break; +#ifdef HWPMC_HOOKS + case EXC_PERF: + critical_enter(); + KASSERT(pmc_intr != NULL, ("Performance exception, but no handler!")); + (*pmc_intr)(PCPU_GET(cpuid), framep); + if (pmc_hook && (PCPU_GET(curthread)->td_pflags & TDP_CALLCHAIN)) + pmc_hook(PCPU_GET(curthread), PMC_FN_USER_CALLCHAIN, framep); + critical_exit(); + break; +#endif + + default: + /* Re-enable interrupts if applicable. */ + ee = framep->srr1 & PSL_EE; + if (ee != 0) + mtmsr(mfmsr() | ee); + trap(framep); + } +} From owner-svn-src-all@freebsd.org Mon Jul 6 05:51:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B159994DDB; Mon, 6 Jul 2015 05:51:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D11C610FB; Mon, 6 Jul 2015 05:51:42 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by wiwl6 with SMTP id l6so273888990wiw.0; Sun, 05 Jul 2015 22:51:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=LQwfrOiVLlR22dWtbGSqdwpkR/raMQCUJBJV3OC5gpY=; b=U2b3A+R8R4H+K8t07tlb2MZB8xwzMc8Ujvrmt8V0h4GuCvH/sP+DqYDGJ0BFOPTBYj f4gBYqdIueKNORPR8kI7wz87n0ACR9eJ0Eih4IOkQNRjcSCsA+EJUw19I4YrhmaIa/Gv Xc+9p7faykPCxzuzkbKmnq+zGjBM1URm0V6L8r0i2vMKNPVWXWGe3GNkiORNCfBfpJ8R jUTIyM8JSRiQZbmLaP2wZTTydEzPRfEf6Lc2atnBEFXQQa7NJuLcGKI9LgMRKbGWWcND uOUzrwQYaQzuZ4Us2yadXud/bOtOkneI9kqF896Ws4sHOHl9I8RrvFf0aJZo9KX499Ru DOnQ== X-Received: by 10.194.142.209 with SMTP id ry17mr12366558wjb.5.1436161900138; Sun, 05 Jul 2015 22:51:40 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id r6sm45281332wiy.13.2015.07.05.22.51.37 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 05 Jul 2015 22:51:37 -0700 (PDT) Date: Mon, 6 Jul 2015 07:51:35 +0200 From: Mateusz Guzik To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r267760 - head/sys/kern Message-ID: <20150706055135.GA28898@dft-labs.eu> References: <20140623080501.GB27040@dft-labs.eu> <20140623081823.GG93733@kib.kiev.ua> <20140623131653.GC27040@dft-labs.eu> <20140623163523.GK93733@kib.kiev.ua> <20140711024351.GA18214@dft-labs.eu> <20140711095551.GA93733@kib.kiev.ua> <20140711111925.GB18214@dft-labs.eu> <20140713132652.GZ93733@kib.kiev.ua> <20140713213623.GA13241@dft-labs.eu> <20140717005638.GF93733@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20140717005638.GF93733@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 05:51:43 -0000 On Thu, Jul 17, 2014 at 03:56:38AM +0300, Konstantin Belousov wrote: > On Sun, Jul 13, 2014 at 11:36:24PM +0200, Mateusz Guzik wrote: > > There is an additional problem with slocked case: witness report a lor > > with devfs vnodes. > > > > lock order reversal: > > 1st 0xfffff80006fe6ab0 process imagelock (process imagelock) @ /usr/src/sys/kern/kern_proc.c:287 > > 2nd 0xfffff80018c88240 devfs (devfs) @ /usr/src/sys/kern/vfs_cache.c:1241 > > KDB: stack backtrace: > > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe012324f120 > > kdb_backtrace() at kdb_backtrace+0x39/frame 0xfffffe012324f1d0 > > witness_checkorder() at witness_checkorder+0xdc2/frame 0xfffffe012324f260 > > __lockmgr_args() at __lockmgr_args+0x588/frame 0xfffffe012324f3a0 > > vop_stdlock() at vop_stdlock+0x3c/frame 0xfffffe012324f3c0 > > VOP_LOCK1_APV() at VOP_LOCK1_APV+0xfc/frame 0xfffffe012324f3f0 > > _vn_lock() at _vn_lock+0xaa/frame 0xfffffe012324f460 > > vn_vptocnp_locked() at vn_vptocnp_locked+0xe8/frame 0xfffffe012324f4d0 > > vn_fullpath1() at vn_fullpath1+0xb0/frame 0xfffffe012324f530 > > vn_fullpath() at vn_fullpath+0xc1/frame 0xfffffe012324f580 > > export_fd_to_sb() at export_fd_to_sb+0x489/frame 0xfffffe012324f7b0 > > kern_proc_filedesc_out() at kern_proc_filedesc_out+0x1c6/frame 0xfffffe012324f840 > > sysctl_kern_proc_filedesc() at sysctl_kern_proc_filedesc+0x84/frame 0xfffffe012324f900 > > sysctl_root_handler_locked() at sysctl_root_handler_locked+0x68/frame 0xfffffe012324f940 > > sysctl_root() at sysctl_root+0x18e/frame 0xfffffe012324f990 > > userland_sysctl() at userland_sysctl+0x192/frame 0xfffffe012324fa30 > > > > witness detected the following lock orders: > > devfs -> proctree > Where is the dependency catched comes from ? I suspect it might be tty. > > I consider this case as an advantage of using sx over the hand-rolled lock, > since the issue is/must be present with the counter as well, or the LOR > is false positive, possibly due to sx taken in shared mode. But debugging > features of sx give the warning, while counter is silent. > > That said, if the issue above is analyzed, I do not have any preference > and will not object strongly against you decision. > [snip] This patch is about providing a way to block execs and exits of processes so that it is safe to inspect their state. For instance it deals with a case where the target process executes a setuid binary, where the process inspecting it could have its permission checked prior to exec but is reading data after setuid completed. LOR mentioned above indeed comes form tty handling and is handled by relocking the vnode. Patch below is the variant with sx lock. diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index fe8e9ef..31f43a8 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -574,6 +574,8 @@ devfs_close(struct vop_close_args *ap) if (vp->v_data == NULL) return (0); + vp_locked = VOP_ISLOCKED(vp); + /* * Hack: a tty device that is a controlling terminal * has a reference from the session structure. @@ -589,6 +591,7 @@ devfs_close(struct vop_close_args *ap) if (vp == p->p_session->s_ttyvp) { PROC_UNLOCK(p); oldvp = NULL; + VOP_UNLOCK(vp, 0); sx_xlock(&proctree_lock); if (vp == p->p_session->s_ttyvp) { SESS_LOCK(p->p_session); @@ -603,6 +606,7 @@ devfs_close(struct vop_close_args *ap) SESS_UNLOCK(p->p_session); } sx_xunlock(&proctree_lock); + vn_lock(vp, vp_locked | LK_RETRY); if (oldvp != NULL) vrele(oldvp); } else @@ -632,7 +636,6 @@ devfs_close(struct vop_close_args *ap) } vholdl(vp); VI_UNLOCK(vp); - vp_locked = VOP_ISLOCKED(vp); VOP_UNLOCK(vp, 0); KASSERT(dev->si_refcount > 0, ("devfs_close() on un-referenced struct cdev *(%s)", devtoname(dev))); diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c index d3bac30..118a7d9 100644 --- a/sys/fs/nfsclient/nfs_clport.c +++ b/sys/fs/nfsclient/nfs_clport.c @@ -1188,7 +1188,7 @@ nfscl_procdoesntexist(u_int8_t *own) tl.cval[2] = *own++; tl.cval[3] = *own++; pid = tl.lval; - p = pfind_locked(pid); + p = pfind_locked(pid, 0); if (p == NULL) return (1); if (p->p_stats == NULL) { diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 0675128..2ad09aa 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1887,6 +1887,7 @@ note_procstat_files(void *arg, struct sbuf *sb, size_t *sizep) sb = sbuf_new(NULL, NULL, 128, SBUF_FIXEDLEN); sbuf_set_drain(sb, sbuf_drain_count, &size); sbuf_bcat(sb, &structsize, sizeof(structsize)); + sx_slock(&p->p_imagelock); PROC_LOCK(p); kern_proc_filedesc_out(p, sb, -1); sbuf_finish(sb); @@ -1895,6 +1896,7 @@ note_procstat_files(void *arg, struct sbuf *sb, size_t *sizep) } else { structsize = sizeof(struct kinfo_file); sbuf_bcat(sb, &structsize, sizeof(structsize)); + sx_slock(&p->p_imagelock); PROC_LOCK(p); kern_proc_filedesc_out(p, sb, -1); } diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 37539c4..9364dcb 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -480,6 +480,7 @@ proc0_init(void *dummy __unused) p->p_flag2 = 0; p->p_state = PRS_NORMAL; knlist_init_mtx(&p->p_klist, &p->p_mtx); + sx_init_flags(&p->p_imagelock, "process imagelock", SX_NEW); STAILQ_INIT(&p->p_ktr); p->p_nice = NZERO; /* pid_max cannot be greater than PID_MAX */ diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 85cda01..bbdcbf5 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -3271,6 +3271,7 @@ kern_proc_filedesc_out(struct proc *p, struct sbuf *sb, ssize_t maxlen) FILEDESC_SUNLOCK(fdp); fddrop(fdp); fail: + sx_sunlock(&p->p_imagelock); free(efbuf, M_TEMP); return (error); } @@ -3292,7 +3293,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER_ARGS) sbuf_new_for_sysctl(&sb, NULL, FILEDESC_SBUF_SIZE, req); sbuf_clear_flags(&sb, SBUF_INCLUDENUL); - error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p); + error = pget((pid_t)name[0], PGET_LOCK, &p); if (error != 0) { sbuf_delete(&sb); return (error); @@ -3359,7 +3360,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) struct proc *p; name = (int *)arg1; - error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p); + error = pget((pid_t)name[0], PGET_LOCK, &p); if (error != 0) return (error); fdp = fdhold(p); @@ -3391,6 +3392,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) } FILEDESC_SUNLOCK(fdp); fddrop(fdp); + sx_sunlock(&p->p_imagelock); free(kif, M_TEMP); free(okif, M_TEMP); return (0); diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 859b2e3..0d9aac1 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -381,6 +381,7 @@ do_execve(td, args, mac_p) * that might allow a local user to illicitly obtain elevated * privileges. */ + sx_xlock(&p->p_imagelock); PROC_LOCK(p); KASSERT((p->p_flag & P_INEXEC) == 0, ("%s(): process already has P_INEXEC flag", __func__)); @@ -907,6 +908,7 @@ exec_fail: SDT_PROBE(proc, kernel, , exec__failure, error, 0, 0, 0, 0); done2: + sx_xunlock(&p->p_imagelock); #ifdef MAC mac_execve_exit(imgp); mac_execve_interpreter_exit(interpvplabel); diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 9ce6d34..27fd764 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -213,6 +213,7 @@ exit1(struct thread *td, int rv) /* * MUST abort all other threads before proceeding past here. */ + sx_xlock(&p->p_imagelock); PROC_LOCK(p); /* * First check if some other thread or external request got @@ -279,6 +280,7 @@ exit1(struct thread *td, int rv) * decided to wait again after we told them we are exiting. */ p->p_flag |= P_WEXIT; + sx_xunlock(&p->p_imagelock); wakeup(&p->p_stype); /* diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 27c6f40..ac6b441 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -230,6 +230,7 @@ proc_init(void *mem, int size, int flags) mtx_init(&p->p_statmtx, "pstatl", NULL, MTX_SPIN | MTX_NEW); mtx_init(&p->p_itimmtx, "pitiml", NULL, MTX_SPIN | MTX_NEW); mtx_init(&p->p_profmtx, "pprofl", NULL, MTX_SPIN | MTX_NEW); + sx_init_flags(&p->p_imagelock, "process imagelock", SX_NEW); cv_init(&p->p_pwait, "ppwait"); cv_init(&p->p_dbgwait, "dbgwait"); TAILQ_INIT(&p->p_threads); /* all threads in proc */ @@ -278,16 +279,20 @@ inferior(struct proc *p) } struct proc * -pfind_locked(pid_t pid) +pfind_locked(pid_t pid, int lockimage) { struct proc *p; sx_assert(&allproc_lock, SX_LOCKED); LIST_FOREACH(p, PIDHASH(pid), p_hash) { if (p->p_pid == pid) { + if (lockimage) + sx_slock(&p->p_imagelock); PROC_LOCK(p); if (p->p_state == PRS_NEW) { PROC_UNLOCK(p); + if (lockimage) + sx_sunlock(&p->p_imagelock); p = NULL; } break; @@ -308,7 +313,7 @@ pfind(pid_t pid) struct proc *p; sx_slock(&allproc_lock); - p = pfind_locked(pid); + p = pfind_locked(pid, 0); sx_sunlock(&allproc_lock); return (p); } @@ -364,11 +369,17 @@ int pget(pid_t pid, int flags, struct proc **pp) { struct proc *p; - int error; + int error, lockimage; + + lockimage = ((flags & PGET_IMAGELOCK) != 0); + if (lockimage) { + MPASS((flags & PGET_NOTWEXIT) != 0); + MPASS((flags & PGET_HOLD) == 0); + } sx_slock(&allproc_lock); if (pid <= PID_MAX) { - p = pfind_locked(pid); + p = pfind_locked(pid, lockimage); if (p == NULL && (flags & PGET_NOTWEXIT) == 0) p = zpfind_locked(pid); } else if ((flags & PGET_NOTID) == 0) { @@ -413,6 +424,8 @@ pget(pid_t pid, int flags, struct proc **pp) return (0); errout: PROC_UNLOCK(p); + if (lockimage) + sx_sunlock(&p->p_imagelock); return (error); } diff --git a/sys/sys/proc.h b/sys/sys/proc.h index e6c83b4..5df817a 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -522,6 +522,7 @@ struct proc { (if I am reaper). */ LIST_ENTRY(proc) p_reapsibling; /* (e) List of siblings - descendants of the same reaper. */ + struct sx p_imagelock; /* Lock blocking exec/exit. */ struct mtx p_mtx; /* (n) Lock for this struct. */ struct mtx p_statmtx; /* Lock for the stats */ struct mtx p_itimmtx; /* Lock for the virt/prof timers */ @@ -886,7 +887,7 @@ extern struct proc *initproc, *pageproc; /* Process slots for init, pager. */ extern struct uma_zone *proc_zone; struct proc *pfind(pid_t); /* Find process by id. */ -struct proc *pfind_locked(pid_t pid); +struct proc *pfind_locked(pid_t pid, int lockimage); struct pgrp *pgfind(pid_t); /* Find process group by id. */ struct proc *zpfind(pid_t); /* Find zombie process by id. */ @@ -900,8 +901,10 @@ struct proc *zpfind(pid_t); /* Find zombie process by id. */ #define PGET_NOTWEXIT 0x00010 /* Check that the process is not in P_WEXIT. */ #define PGET_NOTINEXEC 0x00020 /* Check that the process is not in P_INEXEC. */ #define PGET_NOTID 0x00040 /* Do not assume tid if pid > PID_MAX. */ +#define PGET_IMAGELOCK 0x00080 /* Prevent execs and exits. */ #define PGET_WANTREAD (PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT) +#define PGET_LOCK (PGET_CANDEBUG | PGET_NOTWEXIT | PGET_IMAGELOCK) int pget(pid_t pid, int flags, struct proc **pp); -- Mateusz Guzik From owner-svn-src-all@freebsd.org Mon Jul 6 06:46:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FDD2993203; Mon, 6 Jul 2015 06:46:09 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AD3D019EE; Mon, 6 Jul 2015 06:46:08 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by widjy10 with SMTP id jy10so151662439wid.1; Sun, 05 Jul 2015 23:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=NijR/LXir2oCq+uSPqxv49NhRbjGGOkcuDR3WlumnTs=; b=gXZcisU8QSkkn7mDk+klJR4dHmgPfdJ9UwQ/ojo+sIxoGG/IKVWJcMBqyKXh7A4q9J sxvPnJwDRrEen0eEEarZLFoR2cCNrzhTEsj0olSWvLstHA4CgR+cs2SPM05lgwi/zd+Q Fs8dUqWaNhQZyKCTLPLMM03K3b7do7vLtf4VLOHf3526ZwZG4ANKtAWmvOb6QgHQpkK+ nMeXnumZjNKp7SJ/sZ2qCVPJj1yBNgaEsYdoW/v/s7c9MPFb8YferxSPbevt14aS/mgo oNN8xErT+9wLZ6q3NSfHfJ651N/42QB1icMLOu/SEhjs6aPnSNPDl1EN+X0bLOQJavHK RJKQ== X-Received: by 10.194.58.7 with SMTP id m7mr89609503wjq.109.1436165167000; Sun, 05 Jul 2015 23:46:07 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id lu5sm26411226wjb.9.2015.07.05.23.46.04 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 05 Jul 2015 23:46:04 -0700 (PDT) Date: Mon, 6 Jul 2015 08:46:02 +0200 From: Mateusz Guzik To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r267760 - head/sys/kern Message-ID: <20150706064601.GB28898@dft-labs.eu> References: <20140623081823.GG93733@kib.kiev.ua> <20140623131653.GC27040@dft-labs.eu> <20140623163523.GK93733@kib.kiev.ua> <20140711024351.GA18214@dft-labs.eu> <20140711095551.GA93733@kib.kiev.ua> <20140711111925.GB18214@dft-labs.eu> <20140713132652.GZ93733@kib.kiev.ua> <20140713213623.GA13241@dft-labs.eu> <20140717005638.GF93733@kib.kiev.ua> <20150706055135.GA28898@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150706055135.GA28898@dft-labs.eu> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 06:46:09 -0000 On Mon, Jul 06, 2015 at 07:51:35AM +0200, Mateusz Guzik wrote: > On Thu, Jul 17, 2014 at 03:56:38AM +0300, Konstantin Belousov wrote: > > On Sun, Jul 13, 2014 at 11:36:24PM +0200, Mateusz Guzik wrote: > > > There is an additional problem with slocked case: witness report a lor > > > with devfs vnodes. > > > > > > lock order reversal: > > > 1st 0xfffff80006fe6ab0 process imagelock (process imagelock) @ /usr/src/sys/kern/kern_proc.c:287 > > > 2nd 0xfffff80018c88240 devfs (devfs) @ /usr/src/sys/kern/vfs_cache.c:1241 > > > KDB: stack backtrace: > > > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe012324f120 > > > kdb_backtrace() at kdb_backtrace+0x39/frame 0xfffffe012324f1d0 > > > witness_checkorder() at witness_checkorder+0xdc2/frame 0xfffffe012324f260 > > > __lockmgr_args() at __lockmgr_args+0x588/frame 0xfffffe012324f3a0 > > > vop_stdlock() at vop_stdlock+0x3c/frame 0xfffffe012324f3c0 > > > VOP_LOCK1_APV() at VOP_LOCK1_APV+0xfc/frame 0xfffffe012324f3f0 > > > _vn_lock() at _vn_lock+0xaa/frame 0xfffffe012324f460 > > > vn_vptocnp_locked() at vn_vptocnp_locked+0xe8/frame 0xfffffe012324f4d0 > > > vn_fullpath1() at vn_fullpath1+0xb0/frame 0xfffffe012324f530 > > > vn_fullpath() at vn_fullpath+0xc1/frame 0xfffffe012324f580 > > > export_fd_to_sb() at export_fd_to_sb+0x489/frame 0xfffffe012324f7b0 > > > kern_proc_filedesc_out() at kern_proc_filedesc_out+0x1c6/frame 0xfffffe012324f840 > > > sysctl_kern_proc_filedesc() at sysctl_kern_proc_filedesc+0x84/frame 0xfffffe012324f900 > > > sysctl_root_handler_locked() at sysctl_root_handler_locked+0x68/frame 0xfffffe012324f940 > > > sysctl_root() at sysctl_root+0x18e/frame 0xfffffe012324f990 > > > userland_sysctl() at userland_sysctl+0x192/frame 0xfffffe012324fa30 > > > > > > witness detected the following lock orders: > > > devfs -> proctree > > Where is the dependency catched comes from ? I suspect it might be tty. > > > > I consider this case as an advantage of using sx over the hand-rolled lock, > > since the issue is/must be present with the counter as well, or the LOR > > is false positive, possibly due to sx taken in shared mode. But debugging > > features of sx give the warning, while counter is silent. > > > > That said, if the issue above is analyzed, I do not have any preference > > and will not object strongly against you decision. > > > > [snip] > > This patch is about providing a way to block execs and exits of > processes so that it is safe to inspect their state. For instance it > deals with a case where the target process executes a setuid binary, > where the process inspecting it could have its permission checked prior > to exec but is reading data after setuid completed. > > LOR mentioned above indeed comes form tty handling and is handled by > relocking the vnode. > Oops, the attached patch was missing one place (devfs_lookupx). Updated patch: diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index fe8e9ef..c7f579a 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -574,6 +574,8 @@ devfs_close(struct vop_close_args *ap) if (vp->v_data == NULL) return (0); + vp_locked = VOP_ISLOCKED(vp); + /* * Hack: a tty device that is a controlling terminal * has a reference from the session structure. @@ -589,6 +591,7 @@ devfs_close(struct vop_close_args *ap) if (vp == p->p_session->s_ttyvp) { PROC_UNLOCK(p); oldvp = NULL; + VOP_UNLOCK(vp, 0); sx_xlock(&proctree_lock); if (vp == p->p_session->s_ttyvp) { SESS_LOCK(p->p_session); @@ -603,6 +606,7 @@ devfs_close(struct vop_close_args *ap) SESS_UNLOCK(p->p_session); } sx_xunlock(&proctree_lock); + vn_lock(vp, vp_locked | LK_RETRY); if (oldvp != NULL) vrele(oldvp); } else @@ -632,7 +636,6 @@ devfs_close(struct vop_close_args *ap) } vholdl(vp); VI_UNLOCK(vp); - vp_locked = VOP_ISLOCKED(vp); VOP_UNLOCK(vp, 0); KASSERT(dev->si_refcount > 0, ("devfs_close() on un-referenced struct cdev *(%s)", devtoname(dev))); @@ -964,10 +967,13 @@ devfs_lookupx(struct vop_lookup_args *ap, int *dm_unlock) cdev = NULL; DEVFS_DMP_HOLD(dmp); sx_xunlock(&dmp->dm_lock); + dvplocked = VOP_ISLOCKED(dvp); + VOP_UNLOCK(dvp, 0); sx_slock(&clone_drain_lock); EVENTHANDLER_INVOKE(dev_clone, td->td_ucred, pname, strlen(pname), &cdev); sx_sunlock(&clone_drain_lock); + vn_lock(dvp, dvplocked | LK_RETRY); if (cdev == NULL) sx_xlock(&dmp->dm_lock); diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c index d3bac30..118a7d9 100644 --- a/sys/fs/nfsclient/nfs_clport.c +++ b/sys/fs/nfsclient/nfs_clport.c @@ -1188,7 +1188,7 @@ nfscl_procdoesntexist(u_int8_t *own) tl.cval[2] = *own++; tl.cval[3] = *own++; pid = tl.lval; - p = pfind_locked(pid); + p = pfind_locked(pid, 0); if (p == NULL) return (1); if (p->p_stats == NULL) { diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 0675128..2ad09aa 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1887,6 +1887,7 @@ note_procstat_files(void *arg, struct sbuf *sb, size_t *sizep) sb = sbuf_new(NULL, NULL, 128, SBUF_FIXEDLEN); sbuf_set_drain(sb, sbuf_drain_count, &size); sbuf_bcat(sb, &structsize, sizeof(structsize)); + sx_slock(&p->p_imagelock); PROC_LOCK(p); kern_proc_filedesc_out(p, sb, -1); sbuf_finish(sb); @@ -1895,6 +1896,7 @@ note_procstat_files(void *arg, struct sbuf *sb, size_t *sizep) } else { structsize = sizeof(struct kinfo_file); sbuf_bcat(sb, &structsize, sizeof(structsize)); + sx_slock(&p->p_imagelock); PROC_LOCK(p); kern_proc_filedesc_out(p, sb, -1); } diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 37539c4..9364dcb 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -480,6 +480,7 @@ proc0_init(void *dummy __unused) p->p_flag2 = 0; p->p_state = PRS_NORMAL; knlist_init_mtx(&p->p_klist, &p->p_mtx); + sx_init_flags(&p->p_imagelock, "process imagelock", SX_NEW); STAILQ_INIT(&p->p_ktr); p->p_nice = NZERO; /* pid_max cannot be greater than PID_MAX */ diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 85cda01..bbdcbf5 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -3271,6 +3271,7 @@ kern_proc_filedesc_out(struct proc *p, struct sbuf *sb, ssize_t maxlen) FILEDESC_SUNLOCK(fdp); fddrop(fdp); fail: + sx_sunlock(&p->p_imagelock); free(efbuf, M_TEMP); return (error); } @@ -3292,7 +3293,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER_ARGS) sbuf_new_for_sysctl(&sb, NULL, FILEDESC_SBUF_SIZE, req); sbuf_clear_flags(&sb, SBUF_INCLUDENUL); - error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p); + error = pget((pid_t)name[0], PGET_LOCK, &p); if (error != 0) { sbuf_delete(&sb); return (error); @@ -3359,7 +3360,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) struct proc *p; name = (int *)arg1; - error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p); + error = pget((pid_t)name[0], PGET_LOCK, &p); if (error != 0) return (error); fdp = fdhold(p); @@ -3391,6 +3392,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) } FILEDESC_SUNLOCK(fdp); fddrop(fdp); + sx_sunlock(&p->p_imagelock); free(kif, M_TEMP); free(okif, M_TEMP); return (0); diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 859b2e3..0d9aac1 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -381,6 +381,7 @@ do_execve(td, args, mac_p) * that might allow a local user to illicitly obtain elevated * privileges. */ + sx_xlock(&p->p_imagelock); PROC_LOCK(p); KASSERT((p->p_flag & P_INEXEC) == 0, ("%s(): process already has P_INEXEC flag", __func__)); @@ -907,6 +908,7 @@ exec_fail: SDT_PROBE(proc, kernel, , exec__failure, error, 0, 0, 0, 0); done2: + sx_xunlock(&p->p_imagelock); #ifdef MAC mac_execve_exit(imgp); mac_execve_interpreter_exit(interpvplabel); diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 9ce6d34..27fd764 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -213,6 +213,7 @@ exit1(struct thread *td, int rv) /* * MUST abort all other threads before proceeding past here. */ + sx_xlock(&p->p_imagelock); PROC_LOCK(p); /* * First check if some other thread or external request got @@ -279,6 +280,7 @@ exit1(struct thread *td, int rv) * decided to wait again after we told them we are exiting. */ p->p_flag |= P_WEXIT; + sx_xunlock(&p->p_imagelock); wakeup(&p->p_stype); /* diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 27c6f40..ac6b441 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -230,6 +230,7 @@ proc_init(void *mem, int size, int flags) mtx_init(&p->p_statmtx, "pstatl", NULL, MTX_SPIN | MTX_NEW); mtx_init(&p->p_itimmtx, "pitiml", NULL, MTX_SPIN | MTX_NEW); mtx_init(&p->p_profmtx, "pprofl", NULL, MTX_SPIN | MTX_NEW); + sx_init_flags(&p->p_imagelock, "process imagelock", SX_NEW); cv_init(&p->p_pwait, "ppwait"); cv_init(&p->p_dbgwait, "dbgwait"); TAILQ_INIT(&p->p_threads); /* all threads in proc */ @@ -278,16 +279,20 @@ inferior(struct proc *p) } struct proc * -pfind_locked(pid_t pid) +pfind_locked(pid_t pid, int lockimage) { struct proc *p; sx_assert(&allproc_lock, SX_LOCKED); LIST_FOREACH(p, PIDHASH(pid), p_hash) { if (p->p_pid == pid) { + if (lockimage) + sx_slock(&p->p_imagelock); PROC_LOCK(p); if (p->p_state == PRS_NEW) { PROC_UNLOCK(p); + if (lockimage) + sx_sunlock(&p->p_imagelock); p = NULL; } break; @@ -308,7 +313,7 @@ pfind(pid_t pid) struct proc *p; sx_slock(&allproc_lock); - p = pfind_locked(pid); + p = pfind_locked(pid, 0); sx_sunlock(&allproc_lock); return (p); } @@ -364,11 +369,17 @@ int pget(pid_t pid, int flags, struct proc **pp) { struct proc *p; - int error; + int error, lockimage; + + lockimage = ((flags & PGET_IMAGELOCK) != 0); + if (lockimage) { + MPASS((flags & PGET_NOTWEXIT) != 0); + MPASS((flags & PGET_HOLD) == 0); + } sx_slock(&allproc_lock); if (pid <= PID_MAX) { - p = pfind_locked(pid); + p = pfind_locked(pid, lockimage); if (p == NULL && (flags & PGET_NOTWEXIT) == 0) p = zpfind_locked(pid); } else if ((flags & PGET_NOTID) == 0) { @@ -413,6 +424,8 @@ pget(pid_t pid, int flags, struct proc **pp) return (0); errout: PROC_UNLOCK(p); + if (lockimage) + sx_sunlock(&p->p_imagelock); return (error); } diff --git a/sys/sys/proc.h b/sys/sys/proc.h index e6c83b4..5df817a 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -522,6 +522,7 @@ struct proc { (if I am reaper). */ LIST_ENTRY(proc) p_reapsibling; /* (e) List of siblings - descendants of the same reaper. */ + struct sx p_imagelock; /* Lock blocking exec/exit. */ struct mtx p_mtx; /* (n) Lock for this struct. */ struct mtx p_statmtx; /* Lock for the stats */ struct mtx p_itimmtx; /* Lock for the virt/prof timers */ @@ -886,7 +887,7 @@ extern struct proc *initproc, *pageproc; /* Process slots for init, pager. */ extern struct uma_zone *proc_zone; struct proc *pfind(pid_t); /* Find process by id. */ -struct proc *pfind_locked(pid_t pid); +struct proc *pfind_locked(pid_t pid, int lockimage); struct pgrp *pgfind(pid_t); /* Find process group by id. */ struct proc *zpfind(pid_t); /* Find zombie process by id. */ @@ -900,8 +901,10 @@ struct proc *zpfind(pid_t); /* Find zombie process by id. */ #define PGET_NOTWEXIT 0x00010 /* Check that the process is not in P_WEXIT. */ #define PGET_NOTINEXEC 0x00020 /* Check that the process is not in P_INEXEC. */ #define PGET_NOTID 0x00040 /* Do not assume tid if pid > PID_MAX. */ +#define PGET_IMAGELOCK 0x00080 /* Prevent execs and exits. */ #define PGET_WANTREAD (PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT) +#define PGET_LOCK (PGET_CANDEBUG | PGET_NOTWEXIT | PGET_IMAGELOCK) int pget(pid_t pid, int flags, struct proc **pp); -- Mateusz Guzik From owner-svn-src-all@freebsd.org Mon Jul 6 07:20:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A3F9993956 for ; Mon, 6 Jul 2015 07:20:40 +0000 (UTC) (envelope-from pauladlopez95@gmail.com) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD99018AC for ; Mon, 6 Jul 2015 07:20:39 +0000 (UTC) (envelope-from pauladlopez95@gmail.com) Received: by wibdq8 with SMTP id dq8so144071921wib.1 for ; Mon, 06 Jul 2015 00:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=uaOlbBNyrDbVGS5hMLQolwrAiZdd7TF3YUNGBNTneN8=; b=kmvUM1y8MheGlrZDMABEql+bqX9BEbNaEsPx1Fy7NDeVolQSsSFJhujwH0JzGZxrH1 CIyzZLITpZd3zgUtSNB7EqUh8awx3VxXvbRSymK1FoyUWKX9ikXA3RS2dEHWIHfAOiTH NO3sp/DER+we/WYnFCY3ktJFm9lo3kHDBOe0SYmIgHYgGXEbSLpq6gyXRMV2jUOn1at8 +Csc4htgIOOH7X8rVfFyHoHoRf9P+t3/KyLKNCgDzgeWM6MRIGBNT7yjFOX0nNV8wkoM WQtgdPeHoXcmakZrxB7QFG+7EfWQeM36Wdhhym1Jmp8+wk9PGPJAVf1woDuC10NLDPQx eehA== MIME-Version: 1.0 X-Received: by 10.194.75.132 with SMTP id c4mr87274862wjw.80.1436167238069; Mon, 06 Jul 2015 00:20:38 -0700 (PDT) Received: by 10.28.216.201 with HTTP; Mon, 6 Jul 2015 00:20:38 -0700 (PDT) Date: Mon, 6 Jul 2015 15:20:38 +0800 Message-ID: Subject: Advertising on gcu-squad.org From: Paula Lopez To: svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 07:20:40 -0000 Hello, I=E2=80=99d like to inquire if it=E2=80=99s possible to purchase adverting = space on your website gcu-squad.org If there is any space available please let me and we could discuss further details. Looking forward to your positive reply. From owner-svn-src-all@freebsd.org Mon Jul 6 08:24:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A18BA91B; Mon, 6 Jul 2015 08:24:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 097E411DE; Mon, 6 Jul 2015 08:24:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t668OvPO005579; Mon, 6 Jul 2015 08:24:57 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t668Ovda005578; Mon, 6 Jul 2015 08:24:57 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201507060824.t668Ovda005578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 6 Jul 2015 08:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285197 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 08:24:58 -0000 Author: avg Date: Mon Jul 6 08:24:57 2015 New Revision: 285197 URL: https://svnweb.freebsd.org/changeset/base/285197 Log: MFC r271226: MFV r271223: 5117 space map reallocation can cause corruption In dnode_sync(), do dnode_increase_indirection() before processing. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Mon Jul 6 05:57:41 2015 (r285196) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Mon Jul 6 08:24:57 2015 (r285197) @@ -688,6 +688,11 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) return; } + if (dn->dn_next_nlevels[txgoff]) { + dnode_increase_indirection(dn, tx); + dn->dn_next_nlevels[txgoff] = 0; + } + if (dn->dn_next_nblkptr[txgoff]) { /* this should only happen on a realloc */ ASSERT(dn->dn_allocated_txg == tx->tx_txg); @@ -712,11 +717,6 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) mutex_exit(&dn->dn_mtx); } - if (dn->dn_next_nlevels[txgoff]) { - dnode_increase_indirection(dn, tx); - dn->dn_next_nlevels[txgoff] = 0; - } - dbuf_sync_list(list, tx); if (!DMU_OBJECT_IS_SPECIAL(dn->dn_object)) { From owner-svn-src-all@freebsd.org Mon Jul 6 08:27:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34A0CA980; Mon, 6 Jul 2015 08:27:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 18210145D; Mon, 6 Jul 2015 08:27:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t668Rfvk006012; Mon, 6 Jul 2015 08:27:41 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t668ReVc006007; Mon, 6 Jul 2015 08:27:40 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201507060827.t668ReVc006007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 6 Jul 2015 08:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285198 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 08:27:42 -0000 Author: avg Date: Mon Jul 6 08:27:39 2015 New Revision: 285198 URL: https://svnweb.freebsd.org/changeset/base/285198 Log: MFC r268713: MFV r268702: 4975 missing mutex_destroy() calls in zfs Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Jul 6 08:24:57 2015 (r285197) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Jul 6 08:27:39 2015 (r285198) @@ -1351,6 +1351,12 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_ if (dr->dt.dl.dr_data != db->db_buf) VERIFY(arc_buf_remove_ref(dr->dt.dl.dr_data, db)); } + + if (db->db_level != 0) { + mutex_destroy(&dr->dt.di.dr_mtx); + list_destroy(&dr->dt.di.dr_children); + } + kmem_free(dr, sizeof (dbuf_dirty_record_t)); ASSERT(db->db_dirtycnt > 0); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Jul 6 08:24:57 2015 (r285197) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Jul 6 08:27:39 2015 (r285198) @@ -1083,6 +1083,11 @@ dnode_hold_impl(objset_t *os, uint64_t o } if (winner = dmu_buf_set_user(&db->db, children_dnodes, NULL, dnode_buf_pageout)) { + + for (i = 0; i < epb; i++) { + zrl_destroy(&dnh[i].dnh_zrlock); + } + kmem_free(children_dnodes, sizeof (dnode_children_t) + (epb - 1) * sizeof (dnode_handle_t)); children_dnodes = winner; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Mon Jul 6 08:24:57 2015 (r285197) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Mon Jul 6 08:27:39 2015 (r285198) @@ -479,8 +479,8 @@ dnode_undirty_dbufs(list_t *list) dr->dt.dl.dr_data == db->db_buf); dbuf_unoverride(dr); } else { - list_destroy(&dr->dt.di.dr_children); mutex_destroy(&dr->dt.di.dr_mtx); + list_destroy(&dr->dt.di.dr_children); } kmem_free(dr, sizeof (dbuf_dirty_record_t)); dbuf_rele_and_unlock(db, (void *)(uintptr_t)txg); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Mon Jul 6 08:24:57 2015 (r285197) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Mon Jul 6 08:27:39 2015 (r285198) @@ -270,6 +270,7 @@ dsl_dataset_evict(dmu_buf_t *db, void *d if (mutex_owned(&ds->ds_opening_lock)) mutex_exit(&ds->ds_opening_lock); mutex_destroy(&ds->ds_opening_lock); + mutex_destroy(&ds->ds_sendstream_lock); refcount_destroy(&ds->ds_longholds); kmem_free(ds, sizeof (dsl_dataset_t)); @@ -398,6 +399,7 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin if (err != 0) { mutex_destroy(&ds->ds_lock); mutex_destroy(&ds->ds_opening_lock); + mutex_destroy(&ds->ds_sendstream_lock); refcount_destroy(&ds->ds_longholds); bplist_destroy(&ds->ds_pending_deadlist); dsl_deadlist_close(&ds->ds_deadlist); @@ -454,6 +456,7 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin dsl_dir_rele(ds->ds_dir, ds); mutex_destroy(&ds->ds_lock); mutex_destroy(&ds->ds_opening_lock); + mutex_destroy(&ds->ds_sendstream_lock); refcount_destroy(&ds->ds_longholds); kmem_free(ds, sizeof (dsl_dataset_t)); if (err != 0) { Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Mon Jul 6 08:24:57 2015 (r285197) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Mon Jul 6 08:27:39 2015 (r285198) @@ -1111,6 +1111,9 @@ fail: if (sa->sa_user_table) kmem_free(sa->sa_user_table, sa->sa_user_table_sz); mutex_exit(&sa->sa_lock); + avl_destroy(&sa->sa_layout_hash_tree); + avl_destroy(&sa->sa_layout_num_tree); + mutex_destroy(&sa->sa_lock); kmem_free(sa, sizeof (sa_os_t)); return ((error == ECKSUM) ? EIO : error); } @@ -1146,6 +1149,7 @@ sa_tear_down(objset_t *os) avl_destroy(&sa->sa_layout_hash_tree); avl_destroy(&sa->sa_layout_num_tree); + mutex_destroy(&sa->sa_lock); kmem_free(sa, sizeof (sa_os_t)); os->os_sa = NULL; From owner-svn-src-all@freebsd.org Mon Jul 6 09:10:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B79F73BFD7; Mon, 6 Jul 2015 09:10:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1873019F2; Mon, 6 Jul 2015 09:10:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t6699wLu091580 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 6 Jul 2015 12:09:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t6699wLu091580 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t6699wfm091579; Mon, 6 Jul 2015 12:09:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 6 Jul 2015 12:09:58 +0300 From: Konstantin Belousov To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r267760 - head/sys/kern Message-ID: <20150706090958.GM2080@kib.kiev.ua> References: <20140623131653.GC27040@dft-labs.eu> <20140623163523.GK93733@kib.kiev.ua> <20140711024351.GA18214@dft-labs.eu> <20140711095551.GA93733@kib.kiev.ua> <20140711111925.GB18214@dft-labs.eu> <20140713132652.GZ93733@kib.kiev.ua> <20140713213623.GA13241@dft-labs.eu> <20140717005638.GF93733@kib.kiev.ua> <20150706055135.GA28898@dft-labs.eu> <20150706064601.GB28898@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150706064601.GB28898@dft-labs.eu> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 09:10:06 -0000 On Mon, Jul 06, 2015 at 08:46:02AM +0200, Mateusz Guzik wrote: > On Mon, Jul 06, 2015 at 07:51:35AM +0200, Mateusz Guzik wrote: > > On Thu, Jul 17, 2014 at 03:56:38AM +0300, Konstantin Belousov wrote: > > > On Sun, Jul 13, 2014 at 11:36:24PM +0200, Mateusz Guzik wrote: > > > > There is an additional problem with slocked case: witness report a lor > > > > with devfs vnodes. > > > > > > > > lock order reversal: > > > > 1st 0xfffff80006fe6ab0 process imagelock (process imagelock) @ /usr/src/sys/kern/kern_proc.c:287 > > > > 2nd 0xfffff80018c88240 devfs (devfs) @ /usr/src/sys/kern/vfs_cache.c:1241 > > > > KDB: stack backtrace: > > > > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe012324f120 > > > > kdb_backtrace() at kdb_backtrace+0x39/frame 0xfffffe012324f1d0 > > > > witness_checkorder() at witness_checkorder+0xdc2/frame 0xfffffe012324f260 > > > > __lockmgr_args() at __lockmgr_args+0x588/frame 0xfffffe012324f3a0 > > > > vop_stdlock() at vop_stdlock+0x3c/frame 0xfffffe012324f3c0 > > > > VOP_LOCK1_APV() at VOP_LOCK1_APV+0xfc/frame 0xfffffe012324f3f0 > > > > _vn_lock() at _vn_lock+0xaa/frame 0xfffffe012324f460 > > > > vn_vptocnp_locked() at vn_vptocnp_locked+0xe8/frame 0xfffffe012324f4d0 > > > > vn_fullpath1() at vn_fullpath1+0xb0/frame 0xfffffe012324f530 > > > > vn_fullpath() at vn_fullpath+0xc1/frame 0xfffffe012324f580 > > > > export_fd_to_sb() at export_fd_to_sb+0x489/frame 0xfffffe012324f7b0 > > > > kern_proc_filedesc_out() at kern_proc_filedesc_out+0x1c6/frame 0xfffffe012324f840 > > > > sysctl_kern_proc_filedesc() at sysctl_kern_proc_filedesc+0x84/frame 0xfffffe012324f900 > > > > sysctl_root_handler_locked() at sysctl_root_handler_locked+0x68/frame 0xfffffe012324f940 > > > > sysctl_root() at sysctl_root+0x18e/frame 0xfffffe012324f990 > > > > userland_sysctl() at userland_sysctl+0x192/frame 0xfffffe012324fa30 > > > > > > > > witness detected the following lock orders: > > > > devfs -> proctree > > > Where is the dependency catched comes from ? I suspect it might be tty. > > > > > > I consider this case as an advantage of using sx over the hand-rolled lock, > > > since the issue is/must be present with the counter as well, or the LOR > > > is false positive, possibly due to sx taken in shared mode. But debugging > > > features of sx give the warning, while counter is silent. > > > > > > That said, if the issue above is analyzed, I do not have any preference > > > and will not object strongly against you decision. > > > > > > > [snip] > > > > This patch is about providing a way to block execs and exits of > > processes so that it is safe to inspect their state. For instance it > > deals with a case where the target process executes a setuid binary, > > where the process inspecting it could have its permission checked prior > > to exec but is reading data after setuid completed. > > > > LOR mentioned above indeed comes form tty handling and is handled by > > relocking the vnode. > > > > Oops, the attached patch was missing one place (devfs_lookupx). Updated patch: > > > diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c > index fe8e9ef..c7f579a 100644 > --- a/sys/fs/devfs/devfs_vnops.c > +++ b/sys/fs/devfs/devfs_vnops.c > @@ -574,6 +574,8 @@ devfs_close(struct vop_close_args *ap) > if (vp->v_data == NULL) > return (0); > > + vp_locked = VOP_ISLOCKED(vp); > + > /* > * Hack: a tty device that is a controlling terminal > * has a reference from the session structure. > @@ -589,6 +591,7 @@ devfs_close(struct vop_close_args *ap) > if (vp == p->p_session->s_ttyvp) { > PROC_UNLOCK(p); > oldvp = NULL; > + VOP_UNLOCK(vp, 0); This opens a window where vp can be reclaimed. Then vp->v_rdev is invalid and dev_refthread() below accesses random memory. Might be, the easiest fix is to call dev_refthread() before the td != NULL block, but leave dsw == NULL check where it is now. > sx_xlock(&proctree_lock); > if (vp == p->p_session->s_ttyvp) { > SESS_LOCK(p->p_session); > @@ -603,6 +606,7 @@ devfs_close(struct vop_close_args *ap) > SESS_UNLOCK(p->p_session); > } > sx_xunlock(&proctree_lock); > + vn_lock(vp, vp_locked | LK_RETRY); > if (oldvp != NULL) > vrele(oldvp); > } else > @@ -632,7 +636,6 @@ devfs_close(struct vop_close_args *ap) > } > vholdl(vp); > VI_UNLOCK(vp); > - vp_locked = VOP_ISLOCKED(vp); > VOP_UNLOCK(vp, 0); > KASSERT(dev->si_refcount > 0, > ("devfs_close() on un-referenced struct cdev *(%s)", devtoname(dev))); > @@ -964,10 +967,13 @@ devfs_lookupx(struct vop_lookup_args *ap, int *dm_unlock) > cdev = NULL; > DEVFS_DMP_HOLD(dmp); > sx_xunlock(&dmp->dm_lock); > + dvplocked = VOP_ISLOCKED(dvp); > + VOP_UNLOCK(dvp, 0); > sx_slock(&clone_drain_lock); > EVENTHANDLER_INVOKE(dev_clone, > td->td_ucred, pname, strlen(pname), &cdev); > sx_sunlock(&clone_drain_lock); > + vn_lock(dvp, dvplocked | LK_RETRY); > > if (cdev == NULL) > sx_xlock(&dmp->dm_lock); Again, dvp might be reclaimed while unlocked, then devfs_populate_vp() dereferences dvp->v_mount == NULL. > diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c > index d3bac30..118a7d9 100644 > --- a/sys/fs/nfsclient/nfs_clport.c > +++ b/sys/fs/nfsclient/nfs_clport.c > @@ -1188,7 +1188,7 @@ nfscl_procdoesntexist(u_int8_t *own) > tl.cval[2] = *own++; > tl.cval[3] = *own++; > pid = tl.lval; > - p = pfind_locked(pid); > + p = pfind_locked(pid, 0); > if (p == NULL) > return (1); > if (p->p_stats == NULL) { > diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c > index 0675128..2ad09aa 100644 > --- a/sys/kern/imgact_elf.c > +++ b/sys/kern/imgact_elf.c > @@ -1887,6 +1887,7 @@ note_procstat_files(void *arg, struct sbuf *sb, size_t *sizep) > sb = sbuf_new(NULL, NULL, 128, SBUF_FIXEDLEN); > sbuf_set_drain(sb, sbuf_drain_count, &size); > sbuf_bcat(sb, &structsize, sizeof(structsize)); > + sx_slock(&p->p_imagelock); > PROC_LOCK(p); > kern_proc_filedesc_out(p, sb, -1); > sbuf_finish(sb); > @@ -1895,6 +1896,7 @@ note_procstat_files(void *arg, struct sbuf *sb, size_t *sizep) > } else { > structsize = sizeof(struct kinfo_file); > sbuf_bcat(sb, &structsize, sizeof(structsize)); > + sx_slock(&p->p_imagelock); > PROC_LOCK(p); > kern_proc_filedesc_out(p, sb, -1); > } > diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c > index 37539c4..9364dcb 100644 > --- a/sys/kern/init_main.c > +++ b/sys/kern/init_main.c > @@ -480,6 +480,7 @@ proc0_init(void *dummy __unused) > p->p_flag2 = 0; > p->p_state = PRS_NORMAL; > knlist_init_mtx(&p->p_klist, &p->p_mtx); > + sx_init_flags(&p->p_imagelock, "process imagelock", SX_NEW); > STAILQ_INIT(&p->p_ktr); > p->p_nice = NZERO; > /* pid_max cannot be greater than PID_MAX */ > diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c > index 85cda01..bbdcbf5 100644 > --- a/sys/kern/kern_descrip.c > +++ b/sys/kern/kern_descrip.c > @@ -3271,6 +3271,7 @@ kern_proc_filedesc_out(struct proc *p, struct sbuf *sb, ssize_t maxlen) > FILEDESC_SUNLOCK(fdp); > fddrop(fdp); > fail: > + sx_sunlock(&p->p_imagelock); IMO it would be less confusing to unlock the p_imagelock at the caller' location. At the kern_proc_filedesc_out(), the p_imagelock slocked state must be asserted. Same for ofiledesc(). > free(efbuf, M_TEMP); > return (error); > } > @@ -3292,7 +3293,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER_ARGS) > > sbuf_new_for_sysctl(&sb, NULL, FILEDESC_SBUF_SIZE, req); > sbuf_clear_flags(&sb, SBUF_INCLUDENUL); > - error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p); > + error = pget((pid_t)name[0], PGET_LOCK, &p); > if (error != 0) { > sbuf_delete(&sb); > return (error); > @@ -3359,7 +3360,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) > struct proc *p; > > name = (int *)arg1; > - error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p); > + error = pget((pid_t)name[0], PGET_LOCK, &p); > if (error != 0) > return (error); > fdp = fdhold(p); > @@ -3391,6 +3392,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) > } > FILEDESC_SUNLOCK(fdp); > fddrop(fdp); > + sx_sunlock(&p->p_imagelock); > free(kif, M_TEMP); > free(okif, M_TEMP); > return (0); > diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c > index 859b2e3..0d9aac1 100644 > --- a/sys/kern/kern_exec.c > +++ b/sys/kern/kern_exec.c > @@ -381,6 +381,7 @@ do_execve(td, args, mac_p) > * that might allow a local user to illicitly obtain elevated > * privileges. > */ > + sx_xlock(&p->p_imagelock); > PROC_LOCK(p); > KASSERT((p->p_flag & P_INEXEC) == 0, > ("%s(): process already has P_INEXEC flag", __func__)); > @@ -907,6 +908,7 @@ exec_fail: > SDT_PROBE(proc, kernel, , exec__failure, error, 0, 0, 0, 0); > > done2: > + sx_xunlock(&p->p_imagelock); > #ifdef MAC > mac_execve_exit(imgp); > mac_execve_interpreter_exit(interpvplabel); > diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c > index 9ce6d34..27fd764 100644 > --- a/sys/kern/kern_exit.c > +++ b/sys/kern/kern_exit.c > @@ -213,6 +213,7 @@ exit1(struct thread *td, int rv) > /* > * MUST abort all other threads before proceeding past here. > */ > + sx_xlock(&p->p_imagelock); > PROC_LOCK(p); > /* > * First check if some other thread or external request got > @@ -279,6 +280,7 @@ exit1(struct thread *td, int rv) > * decided to wait again after we told them we are exiting. > */ > p->p_flag |= P_WEXIT; > + sx_xunlock(&p->p_imagelock); I do not understand why p_imagelock is released so early in the exit1(). > wakeup(&p->p_stype); > > /* > diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c > index 27c6f40..ac6b441 100644 > --- a/sys/kern/kern_proc.c > +++ b/sys/kern/kern_proc.c > @@ -230,6 +230,7 @@ proc_init(void *mem, int size, int flags) > mtx_init(&p->p_statmtx, "pstatl", NULL, MTX_SPIN | MTX_NEW); > mtx_init(&p->p_itimmtx, "pitiml", NULL, MTX_SPIN | MTX_NEW); > mtx_init(&p->p_profmtx, "pprofl", NULL, MTX_SPIN | MTX_NEW); > + sx_init_flags(&p->p_imagelock, "process imagelock", SX_NEW); > cv_init(&p->p_pwait, "ppwait"); > cv_init(&p->p_dbgwait, "dbgwait"); > TAILQ_INIT(&p->p_threads); /* all threads in proc */ > @@ -278,16 +279,20 @@ inferior(struct proc *p) > } > > struct proc * > -pfind_locked(pid_t pid) > +pfind_locked(pid_t pid, int lockimage) > { > struct proc *p; > > sx_assert(&allproc_lock, SX_LOCKED); > LIST_FOREACH(p, PIDHASH(pid), p_hash) { > if (p->p_pid == pid) { > + if (lockimage) > + sx_slock(&p->p_imagelock); Probably makes sense to explicitely add imagelock name into the witness' order_lists[] array. > PROC_LOCK(p); > if (p->p_state == PRS_NEW) { > PROC_UNLOCK(p); > + if (lockimage) > + sx_sunlock(&p->p_imagelock); > p = NULL; > } > break; > @@ -308,7 +313,7 @@ pfind(pid_t pid) > struct proc *p; > > sx_slock(&allproc_lock); > - p = pfind_locked(pid); > + p = pfind_locked(pid, 0); > sx_sunlock(&allproc_lock); > return (p); > } > @@ -364,11 +369,17 @@ int > pget(pid_t pid, int flags, struct proc **pp) > { > struct proc *p; > - int error; > + int error, lockimage; > + > + lockimage = ((flags & PGET_IMAGELOCK) != 0); > + if (lockimage) { > + MPASS((flags & PGET_NOTWEXIT) != 0); > + MPASS((flags & PGET_HOLD) == 0); > + } > > sx_slock(&allproc_lock); > if (pid <= PID_MAX) { > - p = pfind_locked(pid); > + p = pfind_locked(pid, lockimage); > if (p == NULL && (flags & PGET_NOTWEXIT) == 0) > p = zpfind_locked(pid); > } else if ((flags & PGET_NOTID) == 0) { > @@ -413,6 +424,8 @@ pget(pid_t pid, int flags, struct proc **pp) > return (0); > errout: > PROC_UNLOCK(p); > + if (lockimage) > + sx_sunlock(&p->p_imagelock); > return (error); > } > > diff --git a/sys/sys/proc.h b/sys/sys/proc.h > index e6c83b4..5df817a 100644 > --- a/sys/sys/proc.h > +++ b/sys/sys/proc.h > @@ -522,6 +522,7 @@ struct proc { > (if I am reaper). */ > LIST_ENTRY(proc) p_reapsibling; /* (e) List of siblings - descendants of > the same reaper. */ > + struct sx p_imagelock; /* Lock blocking exec/exit. */ > struct mtx p_mtx; /* (n) Lock for this struct. */ > struct mtx p_statmtx; /* Lock for the stats */ > struct mtx p_itimmtx; /* Lock for the virt/prof timers */ > @@ -886,7 +887,7 @@ extern struct proc *initproc, *pageproc; /* Process slots for init, pager. */ > extern struct uma_zone *proc_zone; > > struct proc *pfind(pid_t); /* Find process by id. */ > -struct proc *pfind_locked(pid_t pid); > +struct proc *pfind_locked(pid_t pid, int lockimage); > struct pgrp *pgfind(pid_t); /* Find process group by id. */ > struct proc *zpfind(pid_t); /* Find zombie process by id. */ > > @@ -900,8 +901,10 @@ struct proc *zpfind(pid_t); /* Find zombie process by id. */ > #define PGET_NOTWEXIT 0x00010 /* Check that the process is not in P_WEXIT. */ > #define PGET_NOTINEXEC 0x00020 /* Check that the process is not in P_INEXEC. */ > #define PGET_NOTID 0x00040 /* Do not assume tid if pid > PID_MAX. */ > +#define PGET_IMAGELOCK 0x00080 /* Prevent execs and exits. */ > > #define PGET_WANTREAD (PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT) > +#define PGET_LOCK (PGET_CANDEBUG | PGET_NOTWEXIT | PGET_IMAGELOCK) > > int pget(pid_t pid, int flags, struct proc **pp); > > -- > Mateusz Guzik From owner-svn-src-all@freebsd.org Mon Jul 6 09:44:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F18AFA866; Mon, 6 Jul 2015 09:44:08 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 DF66C1CC0; Mon, 6 Jul 2015 09:44:08 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t669i8iR045264; Mon, 6 Jul 2015 09:44:08 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t669i8VC045263; Mon, 6 Jul 2015 09:44:08 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201507060944.t669i8VC045263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 6 Jul 2015 09:44:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285200 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 09:44:09 -0000 Author: smh Date: Mon Jul 6 09:44:07 2015 New Revision: 285200 URL: https://svnweb.freebsd.org/changeset/base/285200 Log: Correct bit offsets for ahci quirks Fix bit offsets causing incorrect quirks being reported on boot for ahci introduced by r280184. MFC after: 3 days Sponsored by: Multiplay Modified: head/sys/dev/ahci/ahci.h Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Mon Jul 6 09:10:27 2015 (r285199) +++ head/sys/dev/ahci/ahci.h Mon Jul 6 09:44:07 2015 (r285200) @@ -600,8 +600,8 @@ enum ahci_err_type { "\020SATA1_UNIT0" \ "\021ABAR0" \ "\0221MSI" \ - "\022FORCE_PI" \ - "\023RESTORE_CAP" + "\023FORCE_PI" \ + "\024RESTORE_CAP" int ahci_attach(device_t dev); int ahci_detach(device_t dev); From owner-svn-src-all@freebsd.org Mon Jul 6 09:57:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3533CACA6; Mon, 6 Jul 2015 09:57:41 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 24D2F142F; Mon, 6 Jul 2015 09:57:41 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t669vfX0050708; Mon, 6 Jul 2015 09:57:41 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t669ve26050707; Mon, 6 Jul 2015 09:57:40 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507060957.t669ve26050707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 6 Jul 2015 09:57:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285201 - head/lib/libc/aarch64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 09:57:41 -0000 Author: andrew Date: Mon Jul 6 09:57:40 2015 New Revision: 285201 URL: https://svnweb.freebsd.org/changeset/base/285201 Log: Add hton and ntoh to the arm64 Symbols.map file, they exist but were not exported. Modified: head/lib/libc/aarch64/Symbol.map Modified: head/lib/libc/aarch64/Symbol.map ============================================================================== --- head/lib/libc/aarch64/Symbol.map Mon Jul 6 09:44:07 2015 (r285200) +++ head/lib/libc/aarch64/Symbol.map Mon Jul 6 09:57:40 2015 (r285201) @@ -21,6 +21,10 @@ FBSD_1.0 { longjmp; sigsetjmp; siglongjmp; + htonl; + htons; + ntohl; + ntohs; vfork; brk; sbrk; From owner-svn-src-all@freebsd.org Mon Jul 6 10:40:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E97A8993E84; Mon, 6 Jul 2015 10:40:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 B7EAC1284; Mon, 6 Jul 2015 10:40:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66AesMO073177; Mon, 6 Jul 2015 10:40:54 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66Aeq4N073171; Mon, 6 Jul 2015 10:40:52 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201507061040.t66Aeq4N073171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 6 Jul 2015 10:40:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285202 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 10:40:55 -0000 Author: avg Date: Mon Jul 6 10:40:51 2015 New Revision: 285202 URL: https://svnweb.freebsd.org/changeset/base/285202 Log: MFC r284593: MFV r284412: 5911 ZFS "hangs" while deleting file illumos/illumos-gate@46e1baa6cf6d5432f5fd231bb588df8f9570c858 https://www.illumos.org/issues/5911 Sometimes ZFS appears to hang while deleting a file. It is actually making slow progress at the file deletion, but other operations (administrative and writes via the data path) "hang" until the file removal completes, which can take a long time if the file has many blocks. The deletion (or most of it) happens in a single txg, and the sync thread spends most of its time reading indirect blocks... Reviewed by: Bayard Bell Reviewed by: Alek Pinchuk Reviewed by: Simon Klinkert Reviewed by: Dan McDonald Approved by: Richard Lowe Author: Matthew Ahrens PR: 199775 Approved by: re(kib) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Jul 6 09:57:40 2015 (r285201) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Jul 6 10:40:51 2015 (r285202) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -1298,6 +1298,16 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_ dbuf_dirty_record_t *dr, **drp; ASSERT(txg != 0); + + /* + * Due to our use of dn_nlevels below, this can only be called + * in open context, unless we are operating on the MOS. + * From syncing context, dn_nlevels may be different from the + * dn_nlevels used when dbuf was dirtied. + */ + ASSERT(db->db_objset == + dmu_objset_pool(db->db_objset)->dp_meta_objset || + txg != spa_syncing_txg(dmu_objset_spa(db->db_objset))); ASSERT(db->db_blkid != DMU_BONUS_BLKID); ASSERT0(db->db_level); ASSERT(MUTEX_HELD(&db->db_mtx)); @@ -1320,11 +1330,8 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_ ASSERT(db->db.db_size != 0); - /* - * Any space we accounted for in dp_dirty_* will be cleaned up by - * dsl_pool_sync(). This is relatively rare so the discrepancy - * is not a big deal. - */ + dsl_pool_undirty_space(dmu_objset_pool(dn->dn_objset), + dr->dr_accounted, txg); *drp = dr->dr_next; @@ -1339,7 +1346,7 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_ list_remove(&dr->dr_parent->dt.di.dr_children, dr); mutex_exit(&dr->dr_parent->dt.di.dr_mtx); } else if (db->db_blkid == DMU_SPILL_BLKID || - db->db_level+1 == dn->dn_nlevels) { + db->db_level + 1 == dn->dn_nlevels) { ASSERT(db->db_blkptr == NULL || db->db_parent == dn->dn_dbuf); mutex_enter(&dn->dn_mtx); list_remove(&dn->dn_dirty_records[txg & TXG_MASK], dr); @@ -1356,11 +1363,6 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_ VERIFY(arc_buf_remove_ref(dr->dt.dl.dr_data, db)); } - if (db->db_level != 0) { - mutex_destroy(&dr->dt.di.dr_mtx); - list_destroy(&dr->dt.di.dr_children); - } - kmem_free(dr, sizeof (dbuf_dirty_record_t)); ASSERT(db->db_dirtycnt > 0); @@ -2318,7 +2320,7 @@ dbuf_sync_indirect(dbuf_dirty_record_t * zio = dr->dr_zio; mutex_enter(&dr->dt.di.dr_mtx); - dbuf_sync_list(&dr->dt.di.dr_children, tx); + dbuf_sync_list(&dr->dt.di.dr_children, db->db_level - 1, tx); ASSERT(list_head(&dr->dt.di.dr_children) == NULL); mutex_exit(&dr->dt.di.dr_mtx); zio_nowait(zio); @@ -2464,7 +2466,7 @@ dbuf_sync_leaf(dbuf_dirty_record_t *dr, } void -dbuf_sync_list(list_t *list, dmu_tx_t *tx) +dbuf_sync_list(list_t *list, int level, dmu_tx_t *tx) { dbuf_dirty_record_t *dr; @@ -2481,6 +2483,10 @@ dbuf_sync_list(list_t *list, dmu_tx_t *t DMU_META_DNODE_OBJECT); break; } + if (dr->dr_dbuf->db_blkid != DMU_BONUS_BLKID && + dr->dr_dbuf->db_blkid != DMU_SPILL_BLKID) { + VERIFY3U(dr->dr_dbuf->db_level, ==, level); + } list_remove(list, dr); if (dr->dr_dbuf->db_level > 0) dbuf_sync_indirect(dr, tx); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Mon Jul 6 09:57:40 2015 (r285201) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Mon Jul 6 10:40:51 2015 (r285202) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. */ #include @@ -686,7 +686,7 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t uint64_t ibyte = i << shift; err = dnode_next_offset(dn, 0, &ibyte, 2, 1, 0); i = ibyte >> shift; - if (err == ESRCH) + if (err == ESRCH || i > end) break; if (err) { tx->tx_err = err; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Jul 6 09:57:40 2015 (r285201) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Jul 6 10:40:51 2015 (r285202) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. */ #include @@ -1492,6 +1492,16 @@ out: rw_downgrade(&dn->dn_struct_rwlock); } +static void +dnode_dirty_l1(dnode_t *dn, uint64_t l1blkid, dmu_tx_t *tx) +{ + dmu_buf_impl_t *db = dbuf_hold_level(dn, 1, l1blkid, FTAG); + if (db != NULL) { + dmu_buf_will_dirty(&db->db, tx); + dbuf_rele(db, FTAG); + } +} + void dnode_free_range(dnode_t *dn, uint64_t off, uint64_t len, dmu_tx_t *tx) { @@ -1612,27 +1622,67 @@ dnode_free_range(dnode_t *dn, uint64_t o nblks += 1; /* - * Dirty the first and last indirect blocks, as they (and/or their - * parents) will need to be written out if they were only - * partially freed. Interior indirect blocks will be themselves freed, - * by free_children(), so they need not be dirtied. Note that these - * interior blocks have already been prefetched by dmu_tx_hold_free(). + * Dirty all the indirect blocks in this range. Note that only + * the first and last indirect blocks can actually be written + * (if they were partially freed) -- they must be dirtied, even if + * they do not exist on disk yet. The interior blocks will + * be freed by free_children(), so they will not actually be written. + * Even though these interior blocks will not be written, we + * dirty them for two reasons: + * + * - It ensures that the indirect blocks remain in memory until + * syncing context. (They have already been prefetched by + * dmu_tx_hold_free(), so we don't have to worry about reading + * them serially here.) + * + * - The dirty space accounting will put pressure on the txg sync + * mechanism to begin syncing, and to delay transactions if there + * is a large amount of freeing. Even though these indirect + * blocks will not be written, we could need to write the same + * amount of space if we copy the freed BPs into deadlists. */ if (dn->dn_nlevels > 1) { uint64_t first, last; first = blkid >> epbs; - if (db = dbuf_hold_level(dn, 1, first, FTAG)) { - dmu_buf_will_dirty(&db->db, tx); - dbuf_rele(db, FTAG); - } + dnode_dirty_l1(dn, first, tx); if (trunc) last = dn->dn_maxblkid >> epbs; else last = (blkid + nblks - 1) >> epbs; - if (last > first && (db = dbuf_hold_level(dn, 1, last, FTAG))) { - dmu_buf_will_dirty(&db->db, tx); - dbuf_rele(db, FTAG); + if (last != first) + dnode_dirty_l1(dn, last, tx); + + int shift = dn->dn_datablkshift + dn->dn_indblkshift - + SPA_BLKPTRSHIFT; + for (uint64_t i = first + 1; i < last; i++) { + /* + * Set i to the blockid of the next non-hole + * level-1 indirect block at or after i. Note + * that dnode_next_offset() operates in terms of + * level-0-equivalent bytes. + */ + uint64_t ibyte = i << shift; + int err = dnode_next_offset(dn, DNODE_FIND_HAVELOCK, + &ibyte, 2, 1, 0); + i = ibyte >> shift; + if (i >= last) + break; + + /* + * Normally we should not see an error, either + * from dnode_next_offset() or dbuf_hold_level() + * (except for ESRCH from dnode_next_offset). + * If there is an i/o error, then when we read + * this block in syncing context, it will use + * ZIO_FLAG_MUSTSUCCEED, and thus hang/panic according + * to the "failmode" property. dnode_next_offset() + * doesn't have a flag to indicate MUSTSUCCEED. + */ + if (err != 0) + break; + + dnode_dirty_l1(dn, i, tx); } } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Mon Jul 6 09:57:40 2015 (r285201) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Mon Jul 6 10:40:51 2015 (r285202) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. */ #include @@ -712,7 +712,7 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) mutex_exit(&dn->dn_mtx); } - dbuf_sync_list(list, tx); + dbuf_sync_list(list, dn->dn_phys->dn_nlevels - 1, tx); if (!DMU_OBJECT_IS_SPECIAL(dn->dn_object)) { ASSERT3P(list_head(list), ==, NULL); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Mon Jul 6 09:57:40 2015 (r285201) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Mon Jul 6 10:40:51 2015 (r285202) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ @@ -287,7 +287,7 @@ void dbuf_evict(dmu_buf_impl_t *db); void dbuf_setdirty(dmu_buf_impl_t *db, dmu_tx_t *tx); void dbuf_unoverride(dbuf_dirty_record_t *dr); -void dbuf_sync_list(list_t *list, dmu_tx_t *tx); +void dbuf_sync_list(list_t *list, int level, dmu_tx_t *tx); void dbuf_release_bp(dmu_buf_impl_t *db); void dbuf_free_range(struct dnode *dn, uint64_t start, uint64_t end, From owner-svn-src-all@freebsd.org Mon Jul 6 10:41:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCA44993ED9; Mon, 6 Jul 2015 10:41:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 C29A61585; Mon, 6 Jul 2015 10:41:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66AfWs8073985; Mon, 6 Jul 2015 10:41:32 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66AfU5Z073979; Mon, 6 Jul 2015 10:41:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201507061041.t66AfU5Z073979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 6 Jul 2015 10:41:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285203 - in stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 10:41:33 -0000 Author: avg Date: Mon Jul 6 10:41:29 2015 New Revision: 285203 URL: https://svnweb.freebsd.org/changeset/base/285203 Log: MFC r284593: MFV r284412: 5911 ZFS "hangs" while deleting file illumos/illumos-gate@46e1baa6cf6d5432f5fd231bb588df8f9570c858 https://www.illumos.org/issues/5911 Sometimes ZFS appears to hang while deleting a file. It is actually making slow progress at the file deletion, but other operations (administrative and writes via the data path) "hang" until the file removal completes, which can take a long time if the file has many blocks. The deletion (or most of it) happens in a single txg, and the sync thread spends most of its time reading indirect blocks... Reviewed by: Bayard Bell Reviewed by: Alek Pinchuk Reviewed by: Simon Klinkert Reviewed by: Dan McDonald Approved by: Richard Lowe Author: Matthew Ahrens PR: 199775 Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Jul 6 10:40:51 2015 (r285202) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Jul 6 10:41:29 2015 (r285203) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -1294,6 +1294,16 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_ dbuf_dirty_record_t *dr, **drp; ASSERT(txg != 0); + + /* + * Due to our use of dn_nlevels below, this can only be called + * in open context, unless we are operating on the MOS. + * From syncing context, dn_nlevels may be different from the + * dn_nlevels used when dbuf was dirtied. + */ + ASSERT(db->db_objset == + dmu_objset_pool(db->db_objset)->dp_meta_objset || + txg != spa_syncing_txg(dmu_objset_spa(db->db_objset))); ASSERT(db->db_blkid != DMU_BONUS_BLKID); ASSERT0(db->db_level); ASSERT(MUTEX_HELD(&db->db_mtx)); @@ -1316,11 +1326,8 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_ ASSERT(db->db.db_size != 0); - /* - * Any space we accounted for in dp_dirty_* will be cleaned up by - * dsl_pool_sync(). This is relatively rare so the discrepancy - * is not a big deal. - */ + dsl_pool_undirty_space(dmu_objset_pool(dn->dn_objset), + dr->dr_accounted, txg); *drp = dr->dr_next; @@ -1335,7 +1342,7 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_ list_remove(&dr->dr_parent->dt.di.dr_children, dr); mutex_exit(&dr->dr_parent->dt.di.dr_mtx); } else if (db->db_blkid == DMU_SPILL_BLKID || - db->db_level+1 == dn->dn_nlevels) { + db->db_level + 1 == dn->dn_nlevels) { ASSERT(db->db_blkptr == NULL || db->db_parent == dn->dn_dbuf); mutex_enter(&dn->dn_mtx); list_remove(&dn->dn_dirty_records[txg & TXG_MASK], dr); @@ -1352,11 +1359,6 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_ VERIFY(arc_buf_remove_ref(dr->dt.dl.dr_data, db)); } - if (db->db_level != 0) { - mutex_destroy(&dr->dt.di.dr_mtx); - list_destroy(&dr->dt.di.dr_children); - } - kmem_free(dr, sizeof (dbuf_dirty_record_t)); ASSERT(db->db_dirtycnt > 0); @@ -2277,7 +2279,7 @@ dbuf_sync_indirect(dbuf_dirty_record_t * zio = dr->dr_zio; mutex_enter(&dr->dt.di.dr_mtx); - dbuf_sync_list(&dr->dt.di.dr_children, tx); + dbuf_sync_list(&dr->dt.di.dr_children, db->db_level - 1, tx); ASSERT(list_head(&dr->dt.di.dr_children) == NULL); mutex_exit(&dr->dt.di.dr_mtx); zio_nowait(zio); @@ -2423,7 +2425,7 @@ dbuf_sync_leaf(dbuf_dirty_record_t *dr, } void -dbuf_sync_list(list_t *list, dmu_tx_t *tx) +dbuf_sync_list(list_t *list, int level, dmu_tx_t *tx) { dbuf_dirty_record_t *dr; @@ -2440,6 +2442,10 @@ dbuf_sync_list(list_t *list, dmu_tx_t *t DMU_META_DNODE_OBJECT); break; } + if (dr->dr_dbuf->db_blkid != DMU_BONUS_BLKID && + dr->dr_dbuf->db_blkid != DMU_SPILL_BLKID) { + VERIFY3U(dr->dr_dbuf->db_level, ==, level); + } list_remove(list, dr); if (dr->dr_dbuf->db_level > 0) dbuf_sync_indirect(dr, tx); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Mon Jul 6 10:40:51 2015 (r285202) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Mon Jul 6 10:41:29 2015 (r285203) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. */ #include @@ -652,7 +652,7 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t uint64_t ibyte = i << shift; err = dnode_next_offset(dn, 0, &ibyte, 2, 1, 0); i = ibyte >> shift; - if (err == ESRCH) + if (err == ESRCH || i > end) break; if (err) { tx->tx_err = err; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Jul 6 10:40:51 2015 (r285202) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Jul 6 10:41:29 2015 (r285203) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. */ #include @@ -1455,6 +1455,16 @@ out: rw_downgrade(&dn->dn_struct_rwlock); } +static void +dnode_dirty_l1(dnode_t *dn, uint64_t l1blkid, dmu_tx_t *tx) +{ + dmu_buf_impl_t *db = dbuf_hold_level(dn, 1, l1blkid, FTAG); + if (db != NULL) { + dmu_buf_will_dirty(&db->db, tx); + dbuf_rele(db, FTAG); + } +} + void dnode_free_range(dnode_t *dn, uint64_t off, uint64_t len, dmu_tx_t *tx) { @@ -1575,27 +1585,67 @@ dnode_free_range(dnode_t *dn, uint64_t o nblks += 1; /* - * Dirty the first and last indirect blocks, as they (and/or their - * parents) will need to be written out if they were only - * partially freed. Interior indirect blocks will be themselves freed, - * by free_children(), so they need not be dirtied. Note that these - * interior blocks have already been prefetched by dmu_tx_hold_free(). + * Dirty all the indirect blocks in this range. Note that only + * the first and last indirect blocks can actually be written + * (if they were partially freed) -- they must be dirtied, even if + * they do not exist on disk yet. The interior blocks will + * be freed by free_children(), so they will not actually be written. + * Even though these interior blocks will not be written, we + * dirty them for two reasons: + * + * - It ensures that the indirect blocks remain in memory until + * syncing context. (They have already been prefetched by + * dmu_tx_hold_free(), so we don't have to worry about reading + * them serially here.) + * + * - The dirty space accounting will put pressure on the txg sync + * mechanism to begin syncing, and to delay transactions if there + * is a large amount of freeing. Even though these indirect + * blocks will not be written, we could need to write the same + * amount of space if we copy the freed BPs into deadlists. */ if (dn->dn_nlevels > 1) { uint64_t first, last; first = blkid >> epbs; - if (db = dbuf_hold_level(dn, 1, first, FTAG)) { - dmu_buf_will_dirty(&db->db, tx); - dbuf_rele(db, FTAG); - } + dnode_dirty_l1(dn, first, tx); if (trunc) last = dn->dn_maxblkid >> epbs; else last = (blkid + nblks - 1) >> epbs; - if (last > first && (db = dbuf_hold_level(dn, 1, last, FTAG))) { - dmu_buf_will_dirty(&db->db, tx); - dbuf_rele(db, FTAG); + if (last != first) + dnode_dirty_l1(dn, last, tx); + + int shift = dn->dn_datablkshift + dn->dn_indblkshift - + SPA_BLKPTRSHIFT; + for (uint64_t i = first + 1; i < last; i++) { + /* + * Set i to the blockid of the next non-hole + * level-1 indirect block at or after i. Note + * that dnode_next_offset() operates in terms of + * level-0-equivalent bytes. + */ + uint64_t ibyte = i << shift; + int err = dnode_next_offset(dn, DNODE_FIND_HAVELOCK, + &ibyte, 2, 1, 0); + i = ibyte >> shift; + if (i >= last) + break; + + /* + * Normally we should not see an error, either + * from dnode_next_offset() or dbuf_hold_level() + * (except for ESRCH from dnode_next_offset). + * If there is an i/o error, then when we read + * this block in syncing context, it will use + * ZIO_FLAG_MUSTSUCCEED, and thus hang/panic according + * to the "failmode" property. dnode_next_offset() + * doesn't have a flag to indicate MUSTSUCCEED. + */ + if (err != 0) + break; + + dnode_dirty_l1(dn, i, tx); } } Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Mon Jul 6 10:40:51 2015 (r285202) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Mon Jul 6 10:41:29 2015 (r285203) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. */ #include @@ -717,7 +717,7 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) mutex_exit(&dn->dn_mtx); } - dbuf_sync_list(list, tx); + dbuf_sync_list(list, dn->dn_phys->dn_nlevels - 1, tx); if (!DMU_OBJECT_IS_SPECIAL(dn->dn_object)) { ASSERT3P(list_head(list), ==, NULL); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Mon Jul 6 10:40:51 2015 (r285202) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Mon Jul 6 10:41:29 2015 (r285203) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ @@ -280,7 +280,7 @@ void dbuf_evict(dmu_buf_impl_t *db); void dbuf_setdirty(dmu_buf_impl_t *db, dmu_tx_t *tx); void dbuf_unoverride(dbuf_dirty_record_t *dr); -void dbuf_sync_list(list_t *list, dmu_tx_t *tx); +void dbuf_sync_list(list_t *list, int level, dmu_tx_t *tx); void dbuf_release_bp(dmu_buf_impl_t *db); void dbuf_free_range(struct dnode *dn, uint64_t start, uint64_t end, From owner-svn-src-all@freebsd.org Mon Jul 6 12:40:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F12C994CFE; Mon, 6 Jul 2015 12:40:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 EE0B816E8; Mon, 6 Jul 2015 12:40:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66CeWZo034023; Mon, 6 Jul 2015 12:40:32 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66CeWWO034022; Mon, 6 Jul 2015 12:40:32 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201507061240.t66CeWWO034022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 6 Jul 2015 12:40:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285204 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 12:40:33 -0000 Author: ae Date: Mon Jul 6 12:40:31 2015 New Revision: 285204 URL: https://svnweb.freebsd.org/changeset/base/285204 Log: Fill the port and protocol information in the SADB_ACQUIRE message in case when security policy has it as required by RFC 2367. PR: 192774 Differential Revision: https://reviews.freebsd.org/D2972 MFC after: 1 week Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Mon Jul 6 10:41:29 2015 (r285203) +++ head/sys/netipsec/key.c Mon Jul 6 12:40:31 2015 (r285204) @@ -6088,16 +6088,21 @@ key_getprop(const struct secasindex *sai static int key_acquire(const struct secasindex *saidx, struct secpolicy *sp) { - struct mbuf *result = NULL, *m; + union sockaddr_union addr; + struct mbuf *result, *m; struct secacq *newacq; - u_int8_t satype; - int error = -1; u_int32_t seq; + int error; + u_int16_t ul_proto; + u_int8_t mask, satype; IPSEC_ASSERT(saidx != NULL, ("null saidx")); satype = key_proto2satype(saidx->proto); IPSEC_ASSERT(satype != 0, ("null satype, protocol %u", saidx->proto)); + error = -1; + result = NULL; + ul_proto = IPSEC_ULPROTO_ANY; /* * We never do anything about acquirng SA. There is anather * solution that kernel blocks to send SADB_ACQUIRE message until @@ -6134,17 +6139,64 @@ key_acquire(const struct secasindex *sai * anything related to NAT-T at this time. */ - /* set sadb_address for saidx's. */ - m = key_setsadbaddr(SADB_EXT_ADDRESS_SRC, - &saidx->src.sa, FULLMASK, IPSEC_ULPROTO_ANY); + /* + * set sadb_address for saidx's. + * + * Note that if sp is supplied, then we're being called from + * key_checkrequest and should supply port and protocol information. + */ + if (sp != NULL && (sp->spidx.ul_proto == IPPROTO_TCP || + sp->spidx.ul_proto == IPPROTO_UDP)) + ul_proto = sp->spidx.ul_proto; + + addr = saidx->src; + mask = FULLMASK; + if (ul_proto != IPSEC_ULPROTO_ANY) { + switch (sp->spidx.src.sa.sa_family) { + case AF_INET: + if (sp->spidx.src.sin.sin_port != IPSEC_PORT_ANY) { + addr.sin.sin_port = sp->spidx.src.sin.sin_port; + mask = sp->spidx.prefs; + } + break; + case AF_INET6: + if (sp->spidx.src.sin6.sin6_port != IPSEC_PORT_ANY) { + addr.sin6.sin6_port = sp->spidx.src.sin6.sin6_port; + mask = sp->spidx.prefs; + } + break; + default: + break; + } + } + m = key_setsadbaddr(SADB_EXT_ADDRESS_SRC, &addr.sa, mask, ul_proto); if (!m) { error = ENOBUFS; goto fail; } m_cat(result, m); - m = key_setsadbaddr(SADB_EXT_ADDRESS_DST, - &saidx->dst.sa, FULLMASK, IPSEC_ULPROTO_ANY); + addr = saidx->dst; + mask = FULLMASK; + if (ul_proto != IPSEC_ULPROTO_ANY) { + switch (sp->spidx.dst.sa.sa_family) { + case AF_INET: + if (sp->spidx.dst.sin.sin_port != IPSEC_PORT_ANY) { + addr.sin.sin_port = sp->spidx.dst.sin.sin_port; + mask = sp->spidx.prefd; + } + break; + case AF_INET6: + if (sp->spidx.dst.sin6.sin6_port != IPSEC_PORT_ANY) { + addr.sin6.sin6_port = sp->spidx.dst.sin6.sin6_port; + mask = sp->spidx.prefd; + } + break; + default: + break; + } + } + m = key_setsadbaddr(SADB_EXT_ADDRESS_DST, &addr.sa, mask, ul_proto); if (!m) { error = ENOBUFS; goto fail; From owner-svn-src-all@freebsd.org Mon Jul 6 13:01:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 114399224; Mon, 6 Jul 2015 13:01:04 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 E9D2D19F0; Mon, 6 Jul 2015 13:01:03 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66D13n9044352; Mon, 6 Jul 2015 13:01:03 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66D12Gx044342; Mon, 6 Jul 2015 13:01:02 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201507061301.t66D12Gx044342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Mon, 6 Jul 2015 13:01:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285205 - in stable/10: lib/libutil usr.sbin/pwd_mkdb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 13:01:04 -0000 Author: garga (ports committer) Date: Mon Jul 6 13:01:01 2015 New Revision: 285205 URL: https://svnweb.freebsd.org/changeset/base/285205 Log: MFC r285050, r285053, r285059: When passwd or group information is changed (by pw, vipw, chpass, ...) temporary file is created and then a rename() call move it to official file. This operation didn't have any check to make sure data was written to disk and if a power cycle happens system could end up with a 0 length passwd or group database. There is a pfSense bug with more information about it: https://redmine.pfsense.org/issues/4523 The following changes were made to protect passwd and group operations: * lib/libutil/gr_util.c: - Replace mkstemp() by mkostemp() with O_SYNC flag to create temp file - After rename(), fsync() call on directory for faster result * lib/libutil/pw_util.c - Replace mkstemp() by mkostemp() with O_SYNC flag to create temp file * usr.sbin/pwd_mkdb/pwd_mkdb.c - Added O_SYNC flag on dbopen() calls - After rename(), fsync() call on directory for faster result * lib/libutil/pw_util.3 - pw_lock() returns a file descriptor to master password file on success Differential Revision: https://reviews.freebsd.org/D2978 Approved by: re (kib), bapt (implicit agreed) Sponsored by: Netgate Modified: stable/10/lib/libutil/gr_util.c stable/10/lib/libutil/pw_util.3 stable/10/lib/libutil/pw_util.c stable/10/usr.sbin/pwd_mkdb/pwd_mkdb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libutil/gr_util.c ============================================================================== --- stable/10/lib/libutil/gr_util.c Mon Jul 6 12:40:31 2015 (r285204) +++ stable/10/lib/libutil/gr_util.c Mon Jul 6 13:01:01 2015 (r285205) @@ -141,7 +141,7 @@ gr_tmp(int mfd) errno = ENAMETOOLONG; return (-1); } - if ((tfd = mkstemp(tempname)) == -1) + if ((tfd = mkostemp(tempname, O_SYNC)) == -1) return (-1); if (mfd != -1) { while ((nr = read(mfd, buf, sizeof(buf))) > 0) @@ -318,10 +318,28 @@ gr_copy(int ffd, int tfd, const struct g int gr_mkdb(void) { + int fd; + if (chmod(tempname, 0644) != 0) return (-1); - return (rename(tempname, group_file)); + if (rename(tempname, group_file) != 0) + return (-1); + + /* + * Make sure new group file is safe on disk. To improve performance we + * will call fsync() to the directory where file lies + */ + if ((fd = open(group_dir, O_RDONLY|O_DIRECTORY)) == -1) + return (-1); + + if (fsync(fd) != 0) { + close(fd); + return (-1); + } + + close(fd); + return(0); } /* Modified: stable/10/lib/libutil/pw_util.3 ============================================================================== --- stable/10/lib/libutil/pw_util.3 Mon Jul 6 12:40:31 2015 (r285204) +++ stable/10/lib/libutil/pw_util.3 Mon Jul 6 13:01:01 2015 (r285205) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 30, 2012 +.Dd July 02, 2015 .Dt PW_UTIL 3 .Os .Sh NAME @@ -233,7 +233,8 @@ function returns 0 in case of success an The .Fn pw_lock function locks the master password file. -It returns 0 in case of success and -1 in case of failure. +It returns a file descriptor to the master password file on success +and -1 on failure. .Pp The .Fn pw_scan Modified: stable/10/lib/libutil/pw_util.c ============================================================================== --- stable/10/lib/libutil/pw_util.c Mon Jul 6 12:40:31 2015 (r285204) +++ stable/10/lib/libutil/pw_util.c Mon Jul 6 13:01:01 2015 (r285205) @@ -226,7 +226,7 @@ pw_tmp(int mfd) errno = ENAMETOOLONG; return (-1); } - if ((tfd = mkstemp(tempname)) == -1) + if ((tfd = mkostemp(tempname, O_SYNC)) == -1) return (-1); if (mfd != -1) { while ((nr = read(mfd, buf, sizeof(buf))) > 0) Modified: stable/10/usr.sbin/pwd_mkdb/pwd_mkdb.c ============================================================================== --- stable/10/usr.sbin/pwd_mkdb/pwd_mkdb.c Mon Jul 6 12:40:31 2015 (r285204) +++ stable/10/usr.sbin/pwd_mkdb/pwd_mkdb.c Mon Jul 6 13:01:01 2015 (r285205) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -224,14 +225,14 @@ main(int argc, char *argv[]) clean = FILE_INSECURE; cp(buf2, buf, PERM_INSECURE); dp = dbopen(buf, - O_RDWR|O_EXCL, PERM_INSECURE, DB_HASH, &openinfo); + O_RDWR|O_EXCL|O_SYNC, PERM_INSECURE, DB_HASH, &openinfo); if (dp == NULL) error(buf); clean = FILE_SECURE; cp(sbuf2, sbuf, PERM_SECURE); sdp = dbopen(sbuf, - O_RDWR|O_EXCL, PERM_SECURE, DB_HASH, &openinfo); + O_RDWR|O_EXCL|O_SYNC, PERM_SECURE, DB_HASH, &openinfo); if (sdp == NULL) error(sbuf); @@ -288,13 +289,13 @@ main(int argc, char *argv[]) method = 0; } else { dp = dbopen(buf, - O_RDWR|O_CREAT|O_EXCL, PERM_INSECURE, DB_HASH, &openinfo); + O_RDWR|O_CREAT|O_EXCL|O_SYNC, PERM_INSECURE, DB_HASH, &openinfo); if (dp == NULL) error(buf); clean = FILE_INSECURE; sdp = dbopen(sbuf, - O_RDWR|O_CREAT|O_EXCL, PERM_SECURE, DB_HASH, &openinfo); + O_RDWR|O_CREAT|O_EXCL|O_SYNC, PERM_SECURE, DB_HASH, &openinfo); if (sdp == NULL) error(sbuf); clean = FILE_SECURE; @@ -714,13 +715,27 @@ void mv(char *from, char *to) { char buf[MAXPATHLEN]; + char *to_dir; + int to_dir_fd = -1; - if (rename(from, to)) { + /* + * Make sure file is safe on disk. To improve performance we will call + * fsync() to the directory where file lies + */ + if (rename(from, to) != 0 || + (to_dir = dirname(to)) == NULL || + (to_dir_fd = open(to_dir, O_RDONLY|O_DIRECTORY)) == -1 || + fsync(to_dir_fd) != 0) { int sverrno = errno; (void)snprintf(buf, sizeof(buf), "%s to %s", from, to); errno = sverrno; + if (to_dir_fd != -1) + close(to_dir_fd); error(buf); } + + if (to_dir_fd != -1) + close(to_dir_fd); } void From owner-svn-src-all@freebsd.org Mon Jul 6 13:23:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 708959972; Mon, 6 Jul 2015 13:23:29 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 5BE3A1AF9; Mon, 6 Jul 2015 13:23:29 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66DNTHJ057430; Mon, 6 Jul 2015 13:23:29 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66DNSUT057426; Mon, 6 Jul 2015 13:23:28 GMT (envelope-from des@FreeBSD.org) Message-Id: <201507061323.t66DNSUT057426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 6 Jul 2015 13:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285206 - in stable/10: . contrib/ldns contrib/ldns/drill contrib/ldns/m4 contrib/ldns/packaging contrib/unbound contrib/unbound/compat contrib/unbound/daemon contrib/unbound/dns64 cont... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 13:23:29 -0000 Author: des Date: Mon Jul 6 13:23:27 2015 New Revision: 285206 URL: https://svnweb.freebsd.org/changeset/base/285206 Log: MFH (r276605, r282089): upgrade to latest Unbound MFH (r276699, r276702, r277057): local control socket MFH (r276599, r276612, r282087, r282088): build fixes This brings in Unbound 1.5.3 from head. Local control sockets are now supported and will be used by default for new installations. Existing systems will continue to use TCP control sockets until the automated setup script is re-run ("service local_unbound setup") and the service restarted ("service local_unbound restart"). Approved by: re (kib) Relnotes: yes Added: stable/10/contrib/ldns/freebsd-configure.sh - copied unchanged from r282088, head/contrib/ldns/freebsd-configure.sh stable/10/contrib/ldns/packaging/ - copied from r282087, head/contrib/ldns/packaging/ stable/10/contrib/unbound/compat/arc4_lock.c - copied unchanged from r276605, head/contrib/unbound/compat/arc4_lock.c stable/10/contrib/unbound/compat/arc4random.c - copied unchanged from r276605, head/contrib/unbound/compat/arc4random.c stable/10/contrib/unbound/compat/arc4random_uniform.c - copied unchanged from r276605, head/contrib/unbound/compat/arc4random_uniform.c stable/10/contrib/unbound/compat/chacha_private.h - copied unchanged from r276605, head/contrib/unbound/compat/chacha_private.h stable/10/contrib/unbound/compat/explicit_bzero.c - copied unchanged from r276605, head/contrib/unbound/compat/explicit_bzero.c stable/10/contrib/unbound/compat/getentropy_linux.c - copied, changed from r276605, head/contrib/unbound/compat/getentropy_linux.c stable/10/contrib/unbound/compat/getentropy_osx.c - copied unchanged from r276605, head/contrib/unbound/compat/getentropy_osx.c stable/10/contrib/unbound/compat/getentropy_solaris.c - copied unchanged from r276605, head/contrib/unbound/compat/getentropy_solaris.c stable/10/contrib/unbound/compat/getentropy_win.c - copied unchanged from r276605, head/contrib/unbound/compat/getentropy_win.c stable/10/contrib/unbound/compat/sha512.c - copied unchanged from r276605, head/contrib/unbound/compat/sha512.c stable/10/contrib/unbound/dns64/ - copied from r276605, head/contrib/unbound/dns64/ stable/10/contrib/unbound/dnstap/ - copied from r276605, head/contrib/unbound/dnstap/ stable/10/contrib/unbound/dnstap/dnstap_config.h - copied unchanged from r276612, head/contrib/unbound/dnstap/dnstap_config.h stable/10/contrib/unbound/doc/README.DNS64 - copied unchanged from r276605, head/contrib/unbound/doc/README.DNS64 stable/10/contrib/unbound/doc/example.conf - copied, changed from r276612, head/contrib/unbound/doc/example.conf stable/10/contrib/unbound/doc/unbound-host.1.in - copied, changed from r276605, head/contrib/unbound/doc/unbound-host.1.in Replaced: stable/10/contrib/unbound/doc/unbound-host.1 - copied, changed from r276612, head/contrib/unbound/doc/unbound-host.1 Modified: stable/10/UPDATING stable/10/contrib/ldns/configure stable/10/contrib/ldns/drill/config.h stable/10/contrib/ldns/drill/configure stable/10/contrib/ldns/drill/drill.1 stable/10/contrib/ldns/ltmain.sh stable/10/contrib/ldns/m4/libtool.m4 stable/10/contrib/ldns/m4/ltoptions.m4 stable/10/contrib/ldns/m4/ltversion.m4 stable/10/contrib/unbound/Makefile.in stable/10/contrib/unbound/aclocal.m4 stable/10/contrib/unbound/acx_python.m4 stable/10/contrib/unbound/compat/fake-rfc2553.c stable/10/contrib/unbound/compat/inet_aton.c stable/10/contrib/unbound/compat/memmove.c stable/10/contrib/unbound/compat/strptime.c stable/10/contrib/unbound/config.guess stable/10/contrib/unbound/config.h stable/10/contrib/unbound/config.h.in stable/10/contrib/unbound/config.sub stable/10/contrib/unbound/configure stable/10/contrib/unbound/configure.ac stable/10/contrib/unbound/daemon/cachedump.c stable/10/contrib/unbound/daemon/daemon.c stable/10/contrib/unbound/daemon/daemon.h stable/10/contrib/unbound/daemon/remote.c stable/10/contrib/unbound/daemon/remote.h stable/10/contrib/unbound/daemon/stats.c stable/10/contrib/unbound/daemon/stats.h stable/10/contrib/unbound/daemon/unbound.c stable/10/contrib/unbound/daemon/worker.c stable/10/contrib/unbound/daemon/worker.h stable/10/contrib/unbound/doc/CREDITS stable/10/contrib/unbound/doc/Changelog stable/10/contrib/unbound/doc/README stable/10/contrib/unbound/doc/README.svn stable/10/contrib/unbound/doc/example.conf.in stable/10/contrib/unbound/doc/libunbound.3 stable/10/contrib/unbound/doc/libunbound.3.in stable/10/contrib/unbound/doc/unbound-anchor.8 stable/10/contrib/unbound/doc/unbound-anchor.8.in stable/10/contrib/unbound/doc/unbound-checkconf.8 stable/10/contrib/unbound/doc/unbound-checkconf.8.in stable/10/contrib/unbound/doc/unbound-control.8 stable/10/contrib/unbound/doc/unbound-control.8.in stable/10/contrib/unbound/doc/unbound.8 stable/10/contrib/unbound/doc/unbound.8.in stable/10/contrib/unbound/doc/unbound.conf.5 stable/10/contrib/unbound/doc/unbound.conf.5.in stable/10/contrib/unbound/doc/unbound.doxygen stable/10/contrib/unbound/freebsd-sources.pl stable/10/contrib/unbound/iterator/iter_delegpt.c stable/10/contrib/unbound/iterator/iter_hints.c stable/10/contrib/unbound/iterator/iter_scrub.c stable/10/contrib/unbound/iterator/iter_utils.c stable/10/contrib/unbound/iterator/iter_utils.h stable/10/contrib/unbound/iterator/iterator.c stable/10/contrib/unbound/iterator/iterator.h stable/10/contrib/unbound/ldns/keyraw.c stable/10/contrib/unbound/ldns/parseutil.c stable/10/contrib/unbound/ldns/rrdef.c stable/10/contrib/unbound/ldns/rrdef.h stable/10/contrib/unbound/ldns/sbuffer.h stable/10/contrib/unbound/ldns/str2wire.c stable/10/contrib/unbound/ldns/wire2str.c stable/10/contrib/unbound/libunbound/libunbound.c stable/10/contrib/unbound/libunbound/libworker.c stable/10/contrib/unbound/libunbound/python/examples/async-lookup.py stable/10/contrib/unbound/libunbound/python/examples/dns-lookup.py stable/10/contrib/unbound/libunbound/python/examples/dnssec-valid.py stable/10/contrib/unbound/libunbound/python/examples/dnssec_test.py stable/10/contrib/unbound/libunbound/python/examples/example8-1.py stable/10/contrib/unbound/libunbound/python/examples/idn-lookup.py stable/10/contrib/unbound/libunbound/python/examples/mx-lookup.py stable/10/contrib/unbound/libunbound/python/examples/ns-lookup.py stable/10/contrib/unbound/libunbound/python/examples/reverse-lookup.py stable/10/contrib/unbound/libunbound/python/libunbound.i stable/10/contrib/unbound/libunbound/ubsyms.def stable/10/contrib/unbound/libunbound/unbound.h stable/10/contrib/unbound/libunbound/worker.h stable/10/contrib/unbound/services/cache/dns.c stable/10/contrib/unbound/services/cache/dns.h stable/10/contrib/unbound/services/listen_dnsport.c stable/10/contrib/unbound/services/listen_dnsport.h stable/10/contrib/unbound/services/localzone.c stable/10/contrib/unbound/services/localzone.h stable/10/contrib/unbound/services/mesh.c stable/10/contrib/unbound/services/mesh.h stable/10/contrib/unbound/services/modstack.c stable/10/contrib/unbound/services/outside_network.c stable/10/contrib/unbound/services/outside_network.h stable/10/contrib/unbound/smallapp/unbound-anchor.c stable/10/contrib/unbound/smallapp/unbound-checkconf.c stable/10/contrib/unbound/smallapp/unbound-control-setup.sh stable/10/contrib/unbound/smallapp/unbound-control-setup.sh.in stable/10/contrib/unbound/smallapp/unbound-control.c stable/10/contrib/unbound/smallapp/unbound-host.c stable/10/contrib/unbound/smallapp/worker_cb.c stable/10/contrib/unbound/util/config_file.c stable/10/contrib/unbound/util/config_file.h stable/10/contrib/unbound/util/configlexer.lex stable/10/contrib/unbound/util/configparser.y stable/10/contrib/unbound/util/configyyrename.h stable/10/contrib/unbound/util/data/dname.c stable/10/contrib/unbound/util/data/msgreply.c stable/10/contrib/unbound/util/data/msgreply.h stable/10/contrib/unbound/util/data/packed_rrset.h stable/10/contrib/unbound/util/fptr_wlist.c stable/10/contrib/unbound/util/fptr_wlist.h stable/10/contrib/unbound/util/iana_ports.inc stable/10/contrib/unbound/util/locks.h stable/10/contrib/unbound/util/log.c stable/10/contrib/unbound/util/mini_event.h stable/10/contrib/unbound/util/module.h stable/10/contrib/unbound/util/net_help.c stable/10/contrib/unbound/util/net_help.h stable/10/contrib/unbound/util/netevent.c stable/10/contrib/unbound/util/netevent.h stable/10/contrib/unbound/util/random.c stable/10/contrib/unbound/util/rtt.c stable/10/contrib/unbound/util/rtt.h stable/10/contrib/unbound/util/storage/lookup3.c stable/10/contrib/unbound/util/storage/slabhash.c stable/10/contrib/unbound/util/storage/slabhash.h stable/10/contrib/unbound/util/winsock_event.h stable/10/contrib/unbound/validator/autotrust.c stable/10/contrib/unbound/validator/val_anchor.c stable/10/contrib/unbound/validator/val_nsec3.c stable/10/contrib/unbound/validator/val_secalgo.c stable/10/contrib/unbound/validator/val_utils.c stable/10/contrib/unbound/validator/val_utils.h stable/10/contrib/unbound/validator/validator.c stable/10/lib/libunbound/Makefile stable/10/usr.sbin/unbound/local-setup/local-unbound-setup.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Mon Jul 6 13:01:01 2015 (r285205) +++ stable/10/UPDATING Mon Jul 6 13:23:27 2015 (r285206) @@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20150703: + The default Unbound configuration now enables remote control + using a local socket. Users who have already enabled the + local_unbound service should regenerate their configuration + by running "service local_unbound setup" as root. + 20150624: An additional fix for the issue described in the 20150614 sendmail entry below has been been committed in revision 284786. Modified: stable/10/contrib/ldns/configure ============================================================================== --- stable/10/contrib/ldns/configure Mon Jul 6 13:01:01 2015 (r285205) +++ stable/10/contrib/ldns/configure Mon Jul 6 13:23:27 2015 (r285206) @@ -1,13 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for ldns 1.6.17. +# Generated by GNU Autoconf 2.69 for ldns 1.6.17. # # Report bugs to . # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -136,6 +134,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -169,7 +192,8 @@ if ( set x; as_fn_ret_success y && test else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -222,21 +246,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -339,6 +367,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -460,6 +496,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -494,16 +534,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -515,28 +555,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -1259,8 +1279,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1544,9 +1562,9 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF ldns configure 1.6.17 -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1823,7 +1841,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2026,7 +2044,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2042,7 +2061,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2068,7 +2088,8 @@ int main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2084,7 +2105,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2118,7 +2140,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2248,7 +2271,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by ldns $as_me 1.6.17, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2628,7 +2651,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2668,7 +2691,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2721,7 +2744,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2762,7 +2785,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2820,7 +2843,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2864,7 +2887,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3310,8 +3333,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3551,7 +3573,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -3617,7 +3639,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -3824,8 +3846,8 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -# define __EXTENSIONS__ 1 - $ac_includes_default +# define __EXTENSIONS__ 1 + $ac_includes_default int main () { @@ -4072,7 +4094,7 @@ do for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -4151,7 +4173,7 @@ do for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -4407,7 +4429,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4451,7 +4473,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4875,7 +4897,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4915,7 +4937,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5221,7 +5243,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5261,7 +5283,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5364,7 +5386,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5408,7 +5430,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5533,7 +5555,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5573,7 +5595,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5632,7 +5654,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5672,7 +5694,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5776,7 +5798,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6363,7 +6385,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6403,7 +6425,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6483,7 +6505,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6523,7 +6545,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6575,7 +6597,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6615,7 +6637,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6667,7 +6689,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6707,7 +6729,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6759,7 +6781,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6799,7 +6821,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6851,7 +6873,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6891,7 +6913,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11152,7 +11174,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11192,7 +11214,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11245,7 +11267,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11286,7 +11308,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -11344,7 +11366,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11388,7 +11410,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11584,8 +11606,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -11820,11 +11841,11 @@ else int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -11841,8 +11862,9 @@ main () ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -11858,10 +11880,10 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -12709,7 +12731,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5 $as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; } -cache=`$as_echo "-D_POSIX_C_SOURCE=200112" | $as_tr_sh` +cache=_D_POSIX_C_SOURCE_200112 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then : $as_echo_n "(cached) " >&6 else @@ -13012,7 +13034,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_doxygen="doxygen" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13410,7 +13432,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13841,7 +13863,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13960,7 +13982,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -14275,7 +14297,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -14355,7 +14377,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -14398,7 +14420,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15370,60 +15392,60 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#ifndef bool - "error: bool is not defined" -#endif -#ifndef false - "error: false is not defined" -#endif -#if false - "error: false is not 0" -#endif -#ifndef true - "error: true is not defined" -#endif -#if true != 1 - "error: true is not 1" -#endif -#ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" -#endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; + #include + #ifndef bool + "error: bool is not defined" + #endif + #ifndef false + "error: false is not defined" + #endif + #if false + "error: false is not 0" + #endif + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" + #endif + + struct s { _Bool s: 1; _Bool t; } s; + + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + /* See body of main program for 'e'. */ + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; int main () { - bool e = &s; - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); + bool e = &s; + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); ; return 0; @@ -15438,7 +15460,7 @@ rm -f core conftest.err conftest.$ac_obj fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } -ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" + ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF @@ -15448,6 +15470,7 @@ _ACEOF fi + if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h @@ -16555,7 +16578,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_WINDRES="${ac_tool_prefix}windres" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -16595,7 +16618,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_WINDRES="windres" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17289,16 +17312,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -17358,28 +17381,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jul 6 14:09:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB211A36B; Mon, 6 Jul 2015 14:09:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 D77EE1FBF; Mon, 6 Jul 2015 14:09:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66E91WE077964; Mon, 6 Jul 2015 14:09:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66E91Qt077963; Mon, 6 Jul 2015 14:09:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201507061409.t66E91Qt077963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 6 Jul 2015 14:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285207 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 14:09:02 -0000 Author: kib Date: Mon Jul 6 14:09:00 2015 New Revision: 285207 URL: https://svnweb.freebsd.org/changeset/base/285207 Log: Mutex memory is not zeroed, add MTX_NEW. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/vfs_aio.c Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Mon Jul 6 13:23:27 2015 (r285206) +++ head/sys/kern/vfs_aio.c Mon Jul 6 14:09:00 2015 (r285207) @@ -583,7 +583,7 @@ aio_init_aioinfo(struct proc *p) struct kaioinfo *ki; ki = uma_zalloc(kaio_zone, M_WAITOK); - mtx_init(&ki->kaio_mtx, "aiomtx", NULL, MTX_DEF); + mtx_init(&ki->kaio_mtx, "aiomtx", NULL, MTX_DEF | MTX_NEW); ki->kaio_flags = 0; ki->kaio_maxactive_count = max_aio_per_proc; ki->kaio_active_count = 0; From owner-svn-src-all@freebsd.org Mon Jul 6 16:07:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABA92A688; Mon, 6 Jul 2015 16:07:22 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 9B6BF12F3; Mon, 6 Jul 2015 16:07:22 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66G7M6s037819; Mon, 6 Jul 2015 16:07:22 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66G7M72037818; Mon, 6 Jul 2015 16:07:22 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201507061607.t66G7M72037818@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Mon, 6 Jul 2015 16:07:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285208 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 16:07:22 -0000 Author: pkelsey Date: Mon Jul 6 16:07:21 2015 New Revision: 285208 URL: https://svnweb.freebsd.org/changeset/base/285208 Log: Don't acquire sysctlmemlock in userland_sysctl() when the old value pointer is NULL, as in that case there are no userland pages that could potentially be wired. It is common for old to be NULL and oldlenp to be non-NULL in calls to userland_sysctl(), as this is used to probe for the length of a variable-length sysctl entry before retrieving a value. Note that it is typical for such calls to be made with an uninitialized value in *oldlenp, so sysctlmemlock was essentially being acquired at random (depending on the uninitialized value in *oldlenp being > PAGE_SIZE or not) for these calls prior to this patch. Differential Revision: https://reviews.freebsd.org/D2987 Reviewed by: mjg, kib Approved by: jmallett (mentor) MFC after: 1 month Modified: head/sys/kern/kern_sysctl.c Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Mon Jul 6 14:09:00 2015 (r285207) +++ head/sys/kern/kern_sysctl.c Mon Jul 6 16:07:21 2015 (r285208) @@ -1784,7 +1784,7 @@ userland_sysctl(struct thread *td, int * ktrsysctl(name, namelen); #endif - if (req.oldlen > PAGE_SIZE) { + if (req.oldptr && req.oldlen > PAGE_SIZE) { memlocked = 1; sx_xlock(&sysctlmemlock); } else From owner-svn-src-all@freebsd.org Mon Jul 6 16:21:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A6DDA8B2 for ; Mon, 6 Jul 2015 16:21:04 +0000 (UTC) (envelope-from pauladlopez95@gmail.com) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A1A791D8E for ; Mon, 6 Jul 2015 16:21:03 +0000 (UTC) (envelope-from pauladlopez95@gmail.com) Received: by widjy10 with SMTP id jy10so165636711wid.1 for ; Mon, 06 Jul 2015 09:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=TE6r1p9M+rJhfFuVl8LNA819WRWkPxheDvH0fYaQQXs=; b=Zr8nCflr4dG0QpJ31LmBYu1wy3Eb7+dqfNs/QA7k1VghWcYEJuXq05/eKYe/YW7tFm YkC4n1UP39svsjFOqnhsbFDhOnrAe3h+MOjgPWjCVTejBvTojXRGhFfH2zJQ+DUQb9wd gHvhrePZT5kEfK9RcV+TlcNv/a8/UZvUIOXd8evgidzsuHWFQGEpeCPnmymvH/jnUakn 3Q/2SzxYOvnRu8GubxvB6ESyKUmbjKO9gmrIHYpNL2dBktp5z/Yd6+nBOaWyPA7TeFcX 4utM//Q3A8nR3ccnDM15jwJRrZfriNk0/trWrfogsF4hwWR6Hwj8B2F6l/3FqZte92Cp rwxQ== MIME-Version: 1.0 X-Received: by 10.181.13.241 with SMTP id fb17mr95657333wid.13.1436199662057; Mon, 06 Jul 2015 09:21:02 -0700 (PDT) Received: by 10.28.216.201 with HTTP; Mon, 6 Jul 2015 09:21:01 -0700 (PDT) Date: Tue, 7 Jul 2015 00:21:01 +0800 Message-ID: Subject: Advertising on gcu.info From: Paula Lopez To: GCU@freenode.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 16:21:04 -0000 Hello, I=E2=80=99d like to inquire if it=E2=80=99s possible to purchase adverting = space on your website gcu.info If there is any space available please let me and we could discuss further details. Looking forward to your positive reply. From owner-svn-src-all@freebsd.org Mon Jul 6 16:45:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AA08ACBD; Mon, 6 Jul 2015 16:45:50 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 E863B1B05; Mon, 6 Jul 2015 16:45:49 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66Gjnvj057829; Mon, 6 Jul 2015 16:45:49 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66GjnIT057824; Mon, 6 Jul 2015 16:45:49 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201507061645.t66GjnIT057824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 6 Jul 2015 16:45:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285209 - head/sys/dev/dwc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 16:45:50 -0000 Author: loos Date: Mon Jul 6 16:45:48 2015 New Revision: 285209 URL: https://svnweb.freebsd.org/changeset/base/285209 Log: Use uint32_t consistently to store registers values. Always use unsigned numbers to avoid undefined behavior on (1 << 31). Remove unused variables and some stray semicolons. No functional changes. Modified: head/sys/dev/dwc/if_dwc.c head/sys/dev/dwc/if_dwc.h Modified: head/sys/dev/dwc/if_dwc.c ============================================================================== --- head/sys/dev/dwc/if_dwc.c Mon Jul 6 16:07:21 2015 (r285208) +++ head/sys/dev/dwc/if_dwc.c Mon Jul 6 16:45:48 2015 (r285209) @@ -89,21 +89,21 @@ __FBSDID("$FreeBSD$"); #define DWC_LOCK(sc) mtx_lock(&(sc)->mtx) #define DWC_UNLOCK(sc) mtx_unlock(&(sc)->mtx) -#define DWC_ASSERT_LOCKED(sc) mtx_assert(&(sc)->mtx, MA_OWNED); -#define DWC_ASSERT_UNLOCKED(sc) mtx_assert(&(sc)->mtx, MA_NOTOWNED); +#define DWC_ASSERT_LOCKED(sc) mtx_assert(&(sc)->mtx, MA_OWNED) +#define DWC_ASSERT_UNLOCKED(sc) mtx_assert(&(sc)->mtx, MA_NOTOWNED) -#define DDESC_TDES0_OWN (1 << 31) -#define DDESC_TDES0_TXINT (1 << 30) -#define DDESC_TDES0_TXLAST (1 << 29) -#define DDESC_TDES0_TXFIRST (1 << 28) -#define DDESC_TDES0_TXCRCDIS (1 << 27) -#define DDESC_TDES0_TXRINGEND (1 << 21) -#define DDESC_TDES0_TXCHAIN (1 << 20) +#define DDESC_TDES0_OWN (1U << 31) +#define DDESC_TDES0_TXINT (1U << 30) +#define DDESC_TDES0_TXLAST (1U << 29) +#define DDESC_TDES0_TXFIRST (1U << 28) +#define DDESC_TDES0_TXCRCDIS (1U << 27) +#define DDESC_TDES0_TXRINGEND (1U << 21) +#define DDESC_TDES0_TXCHAIN (1U << 20) -#define DDESC_RDES0_OWN (1 << 31) +#define DDESC_RDES0_OWN (1U << 31) #define DDESC_RDES0_FL_MASK 0x3fff #define DDESC_RDES0_FL_SHIFT 16 /* Frame Length */ -#define DDESC_RDES1_CHAINED (1 << 14) +#define DDESC_RDES1_CHAINED (1U << 14) struct dwc_bufmap { bus_dmamap_t map; @@ -149,8 +149,6 @@ struct dwc_softc { struct mtx mtx; void * intr_cookie; struct callout dwc_callout; - uint8_t phy_conn_type; - uint8_t mactype; boolean_t link_is_up; boolean_t is_attached; boolean_t is_detaching; @@ -331,7 +329,7 @@ static void dwc_stop_locked(struct dwc_softc *sc) { struct ifnet *ifp; - int reg; + uint32_t reg; DWC_ASSERT_LOCKED(sc); @@ -365,7 +363,7 @@ dwc_stop_locked(struct dwc_softc *sc) static void dwc_clear_stats(struct dwc_softc *sc) { - int reg; + uint32_t reg; reg = READ4(sc, MMC_CONTROL); reg |= (MMC_CONTROL_CNTRST); @@ -448,7 +446,7 @@ static void dwc_init_locked(struct dwc_softc *sc) { struct ifnet *ifp = sc->ifp; - int reg; + uint32_t reg; DWC_ASSERT_LOCKED(sc); @@ -618,15 +616,8 @@ dwc_setup_rxfilter(struct dwc_softc *sc) { struct ifmultiaddr *ifma; struct ifnet *ifp; - uint8_t *eaddr; - uint32_t crc; - uint8_t val; - int hashbit; - int hashreg; - int ffval; - int reg; - int lo; - int hi; + uint8_t *eaddr, val; + uint32_t crc, ffval, hashbit, hashreg, hi, lo, reg; DWC_ASSERT_LOCKED(sc); @@ -774,10 +765,8 @@ dwc_rxfinish_locked(struct dwc_softc *sc struct ifnet *ifp; struct mbuf *m0; struct mbuf *m; - int error; - int rdes0; - int idx; - int len; + int error, idx, len; + uint32_t rdes0; ifp = sc->ifp; @@ -1029,9 +1018,7 @@ out: static int dwc_get_hwaddr(struct dwc_softc *sc, uint8_t *hwaddr) { - int rnd; - int lo; - int hi; + uint32_t hi, lo, rnd; /* * Try to recover a MAC address from the running hardware. If there's @@ -1084,9 +1071,8 @@ dwc_attach(device_t dev) uint8_t macaddr[ETHER_ADDR_LEN]; struct dwc_softc *sc; struct ifnet *ifp; - int error; - int reg; - int i; + int error, i; + uint32_t reg; sc = device_get_softc(dev); sc->dev = dev; @@ -1251,7 +1237,7 @@ dwc_miibus_statchg(device_t dev) { struct dwc_softc *sc; struct mii_data *mii; - int reg; + uint32_t reg; /* * Called by the MII bus driver when the PHY establishes Modified: head/sys/dev/dwc/if_dwc.h ============================================================================== --- head/sys/dev/dwc/if_dwc.h Mon Jul 6 16:07:21 2015 (r285208) +++ head/sys/dev/dwc/if_dwc.h Mon Jul 6 16:45:48 2015 (r285209) @@ -44,7 +44,7 @@ #define CONF_TE (1 << 3) #define CONF_RE (1 << 2) #define MAC_FRAME_FILTER 0x4 -#define FRAME_FILTER_RA (1 << 31) /* Receive All */ +#define FRAME_FILTER_RA (1U << 31) /* Receive All */ #define FRAME_FILTER_HPF (1 << 10) /* Hash or Perfect Filter */ #define FRAME_FILTER_PM (1 << 4) /* Pass multicast */ #define FRAME_FILTER_HMC (1 << 2) From owner-svn-src-all@freebsd.org Mon Jul 6 16:50:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A6B4AD6E; Mon, 6 Jul 2015 16:50:20 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 004FE1E12; Mon, 6 Jul 2015 16:50:19 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66GoJqx059251; Mon, 6 Jul 2015 16:50:19 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66GoJfZ059250; Mon, 6 Jul 2015 16:50:19 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201507061650.t66GoJfZ059250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Mon, 6 Jul 2015 16:50:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r285210 - vendor/tcpdump/4.7.4 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 16:50:20 -0000 Author: pkelsey Date: Mon Jul 6 16:50:19 2015 New Revision: 285210 URL: https://svnweb.freebsd.org/changeset/base/285210 Log: Tag tcpdump 4.7.4 Approved by: jmallett (mentor) Added: - copied from r285209, vendor/tcpdump/dist/ Directory Properties: vendor/tcpdump/4.7.4/ (props changed) From owner-svn-src-all@freebsd.org Mon Jul 6 17:13:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AC5E7CC71; Mon, 6 Jul 2015 17:13:20 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 D1C681F09; Mon, 6 Jul 2015 17:13:19 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66HDIJh073169; Mon, 6 Jul 2015 17:13:18 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66HDILf073168; Mon, 6 Jul 2015 17:13:18 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201507061713.t66HDILf073168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 6 Jul 2015 17:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285211 - head/sys/dev/dwc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 17:13:20 -0000 Author: loos Date: Mon Jul 6 17:13:17 2015 New Revision: 285211 URL: https://svnweb.freebsd.org/changeset/base/285211 Log: When initializing the (unused) TX descriptors it is not necessary set the chain bit. Obtained from: NetBSD Modified: head/sys/dev/dwc/if_dwc.c Modified: head/sys/dev/dwc/if_dwc.c ============================================================================== --- head/sys/dev/dwc/if_dwc.c Mon Jul 6 16:50:19 2015 (r285210) +++ head/sys/dev/dwc/if_dwc.c Mon Jul 6 17:13:17 2015 (r285211) @@ -898,10 +898,8 @@ setup_dma(struct dwc_softc *sc) } for (idx = 0; idx < TX_DESC_COUNT; idx++) { - sc->txdesc_ring[idx].tdes0 = DDESC_TDES0_TXCHAIN; - sc->txdesc_ring[idx].tdes1 = 0; nidx = next_txidx(sc, idx); - sc->txdesc_ring[idx].addr_next = sc->txdesc_ring_paddr + \ + sc->txdesc_ring[idx].addr_next = sc->txdesc_ring_paddr + (nidx * sizeof(struct dwc_hwdesc)); } From owner-svn-src-all@freebsd.org Mon Jul 6 18:27:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 419A6A251; Mon, 6 Jul 2015 18:27:19 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 26C321096; Mon, 6 Jul 2015 18:27:19 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66IRJwt016172; Mon, 6 Jul 2015 18:27:19 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66IRJq6016171; Mon, 6 Jul 2015 18:27:19 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507061827.t66IRJq6016171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 6 Jul 2015 18:27:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285212 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 18:27:19 -0000 Author: andrew Date: Mon Jul 6 18:27:18 2015 New Revision: 285212 URL: https://svnweb.freebsd.org/changeset/base/285212 Log: Add more tlb invalidations. We currently invalidate when we may not need to, but with this I can boot on a simulator that models the tlb. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Mon Jul 6 17:13:17 2015 (r285211) +++ head/sys/arm64/arm64/pmap.c Mon Jul 6 18:27:18 2015 (r285212) @@ -844,17 +844,19 @@ pmap_kextract(vm_offset_t va) ***************************************************/ void -pmap_kenter_device(vm_offset_t va, vm_size_t size, vm_paddr_t pa) +pmap_kenter_device(vm_offset_t sva, vm_size_t size, vm_paddr_t pa) { pt_entry_t *l3; + vm_offset_t va; KASSERT((pa & L3_OFFSET) == 0, ("pmap_kenter_device: Invalid physical address")); - KASSERT((va & L3_OFFSET) == 0, + KASSERT((sva & L3_OFFSET) == 0, ("pmap_kenter_device: Invalid virtual address")); KASSERT((size & PAGE_MASK) == 0, ("pmap_kenter_device: Mapping is not page-sized")); + va = sva; while (size != 0) { l3 = pmap_l3(kernel_pmap, va); KASSERT(l3 != NULL, ("Invalid page table, va: 0x%lx", va)); @@ -866,6 +868,7 @@ pmap_kenter_device(vm_offset_t va, vm_si pa += PAGE_SIZE; size -= PAGE_SIZE; } + pmap_invalidate_range(kernel_pmap, sva, va); } /* @@ -884,18 +887,21 @@ pmap_kremove(vm_offset_t va) cpu_dcache_wb_range(va, L3_SIZE); pmap_load_clear(l3); PTE_SYNC(l3); + pmap_invalidate_page(kernel_pmap, va); } void -pmap_kremove_device(vm_offset_t va, vm_size_t size) +pmap_kremove_device(vm_offset_t sva, vm_size_t size) { pt_entry_t *l3; + vm_offset_t va; - KASSERT((va & L3_OFFSET) == 0, + KASSERT((sva & L3_OFFSET) == 0, ("pmap_kremove_device: Invalid virtual address")); KASSERT((size & PAGE_MASK) == 0, ("pmap_kremove_device: Mapping is not page-sized")); + va = sva; while (size != 0) { l3 = pmap_l3(kernel_pmap, va); KASSERT(l3 != NULL, ("Invalid page table, va: 0x%lx", va)); @@ -905,6 +911,7 @@ pmap_kremove_device(vm_offset_t va, vm_s va += PAGE_SIZE; size -= PAGE_SIZE; } + pmap_invalidate_range(kernel_pmap, sva, va); } /* @@ -954,6 +961,7 @@ pmap_qenter(vm_offset_t sva, vm_page_t * va += L3_SIZE; } + pmap_invalidate_range(kernel_pmap, sva, va); } /* @@ -964,12 +972,21 @@ pmap_qenter(vm_offset_t sva, vm_page_t * void pmap_qremove(vm_offset_t sva, int count) { + pt_entry_t *l3; vm_offset_t va; + KASSERT(sva >= VM_MIN_KERNEL_ADDRESS, ("usermode va %lx", sva)); + va = sva; while (count-- > 0) { - KASSERT(va >= VM_MIN_KERNEL_ADDRESS, ("usermode va %lx", va)); - pmap_kremove(va); + l3 = pmap_l3(kernel_pmap, va); + KASSERT(l3 != NULL, ("pmap_kremove: Invalid address")); + + if (pmap_l3_valid_cacheable(pmap_load(l3))) + cpu_dcache_wb_range(va, L3_SIZE); + pmap_load_clear(l3); + PTE_SYNC(l3); + va += PAGE_SIZE; } pmap_invalidate_range(kernel_pmap, sva, va); @@ -1054,6 +1071,7 @@ _pmap_unwire_l3(pmap_t pmap, vm_offset_t pdpg = PHYS_TO_VM_PAGE(*pmap_l1(pmap, va) & ~ATTR_MASK); pmap_unwire_l3(pmap, va, pdpg, free); } + pmap_invalidate_page(pmap, va); /* * This is a release store so that the ordinary store unmapping @@ -1239,11 +1257,6 @@ retry: if (m == NULL && lockp != NULL) goto retry; } - /* - * XXXARM64: I'm not sure why we need this but it fixes a crash - * when running things from a shell script. - */ - pmap_invalidate_all(pmap); return (m); } @@ -1346,6 +1359,7 @@ pmap_growkernel(vm_offset_t addr) paddr = VM_PAGE_TO_PHYS(nkpg); pmap_load_store(l2, paddr | L2_TABLE); PTE_SYNC(l2); + pmap_invalidate_page(kernel_pmap, kernel_vm_end); kernel_vm_end = (kernel_vm_end + L2_SIZE) & ~L2_OFFSET; if (kernel_vm_end - 1 >= kernel_map->max_offset) { @@ -1626,6 +1640,7 @@ pmap_remove_l3(pmap_t pmap, pt_entry_t * cpu_dcache_wb_range(va, L3_SIZE); old_l3 = pmap_load_clear(l3); PTE_SYNC(l3); + pmap_invalidate_page(pmap, va); if (old_l3 & ATTR_SW_WIRED) pmap->pm_stats.wired_count -= 1; pmap_resident_count_dec(pmap, 1); @@ -1782,6 +1797,7 @@ pmap_remove_all(vm_page_t m) cpu_dcache_wb_range(pv->pv_va, L3_SIZE); tl3 = pmap_load_clear(l3); PTE_SYNC(l3); + pmap_invalidate_page(pmap, pv->pv_va); if (tl3 & ATTR_SW_WIRED) pmap->pm_stats.wired_count--; if ((tl3 & ATTR_AF) != 0) @@ -1793,7 +1809,6 @@ pmap_remove_all(vm_page_t m) if (pmap_page_dirty(tl3)) vm_page_dirty(m); pmap_unuse_l3(pmap, pv->pv_va, *l2, &free); - pmap_invalidate_page(pmap, pv->pv_va); TAILQ_REMOVE(&m->md.pv_list, pv, pv_next); m->md.pv_gen++; free_pv_entry(pmap, pv); @@ -1852,6 +1867,8 @@ pmap_protect(pmap_t pmap, vm_offset_t sv if (pmap_l3_valid(l3)) { pmap_set(l3p, ATTR_AP(ATTR_AP_RO)); PTE_SYNC(l3p); + /* XXX: Use pmap_invalidate_range */ + pmap_invalidate_page(pmap, va); } } } @@ -1899,6 +1916,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, new_l3 |= ATTR_AP(ATTR_AP_USER); new_l3 |= ATTR_IDX(m->md.pv_memattr); + CTR2(KTR_PMAP, "pmap_enter: %.16lx -> %.16lx", va, pa); + mpte = NULL; lock = NULL; @@ -1909,6 +1928,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, nosleep = (flags & PMAP_ENTER_NOSLEEP) != 0; mpte = pmap_alloc_l3(pmap, va, nosleep ? NULL : &lock); if (mpte == NULL && nosleep) { + CTR0(KTR_PMAP, "pmap_enter: mpte == NULL"); if (lock != NULL) rw_wunlock(lock); rw_runlock(&pvh_global_lock); @@ -1953,6 +1973,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, PTE_SYNC(l2); l3 = pmap_l2_to_l3(l2, va); } + pmap_invalidate_page(pmap, va); } om = NULL; @@ -2051,12 +2072,11 @@ validate: if ((orig_l3 & ATTR_SW_MANAGED) != 0) vm_page_dirty(m); } - if ((orig_l3 & ATTR_AF) != 0) - pmap_invalidate_page(pmap, va); } else { pmap_load_store(l3, new_l3); PTE_SYNC(l3); } + pmap_invalidate_page(pmap, va); if ((pmap != pmap_kernel()) && (pmap == &curproc->p_vmspace->vm_pmap)) cpu_icache_sync_range(va, PAGE_SIZE); @@ -2146,6 +2166,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ rw_assert(&pvh_global_lock, RA_LOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); + CTR2(KTR_PMAP, "pmap_enter_quick_locked: %p %lx", pmap, va); /* * In the case that a page table page is not * resident, we are creating it here. @@ -2193,7 +2214,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ } if (l3 == NULL) panic("pmap_enter_quick_locked: No l3"); - if (*l3) { + if (pmap_load(l3) != 0) { if (mpte != NULL) { mpte->wire_count--; mpte = NULL; @@ -2579,6 +2600,7 @@ pmap_remove_pages(pmap_t pmap) cpu_dcache_wb_range(pv->pv_va, L3_SIZE); pmap_load_clear(l3); PTE_SYNC(l3); + pmap_invalidate_page(pmap, pv->pv_va); /* * Update the vm_page_t clean/reference bits. @@ -2972,6 +2994,7 @@ pmap_activate(struct thread *td) pmap = vmspace_pmap(td->td_proc->p_vmspace); td->td_pcb->pcb_l1addr = vtophys(pmap->pm_l1); __asm __volatile("msr ttbr0_el1, %0" : : "r"(td->td_pcb->pcb_l1addr)); + pmap_invalidate_all(pmap); critical_exit(); } From owner-svn-src-all@freebsd.org Mon Jul 6 18:27:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D061A275; Mon, 6 Jul 2015 18:27:43 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 4BC2B11E0; Mon, 6 Jul 2015 18:27:43 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66IRhO8016283; Mon, 6 Jul 2015 18:27:43 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66IRgWw016275; Mon, 6 Jul 2015 18:27:42 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201507061827.t66IRgWw016275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Mon, 6 Jul 2015 18:27:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285213 - in head/sys: arm64/arm64 arm64/include conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 18:27:43 -0000 Author: zbb Date: Mon Jul 6 18:27:41 2015 New Revision: 285213 URL: https://svnweb.freebsd.org/changeset/base/285213 Log: Introduce ITS support for ARM64 Add ARM ITS (Interrupt Translation Services) support required to bring-up message signalled interrupts on some ARM64 platforms. Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Added: head/sys/arm64/arm64/gic_v3_its.c (contents, props changed) Modified: head/sys/arm64/arm64/gic_v3.c head/sys/arm64/arm64/gic_v3_fdt.c head/sys/arm64/arm64/gic_v3_reg.h head/sys/arm64/arm64/gic_v3_var.h head/sys/arm64/include/param.h head/sys/conf/files.arm64 Modified: head/sys/arm64/arm64/gic_v3.c ============================================================================== --- head/sys/arm64/arm64/gic_v3.c Mon Jul 6 18:27:18 2015 (r285212) +++ head/sys/arm64/arm64/gic_v3.c Mon Jul 6 18:27:41 2015 (r285213) @@ -236,19 +236,18 @@ gic_v3_dispatch(device_t dev, struct tra break; if (__predict_true((active_irq >= GIC_FIRST_PPI && - active_irq <= GIC_LAST_SPI))) { + active_irq <= GIC_LAST_SPI) || active_irq >= GIC_FIRST_LPI)) { arm_dispatch_intr(active_irq, frame); continue; } - if (active_irq <= GIC_LAST_SGI || active_irq >= GIC_FIRST_LPI) { + if (active_irq <= GIC_LAST_SGI) { /* - * TODO: Implement proper SGI/LPI handling. + * TODO: Implement proper SGI handling. * Mask it if such is received for some reason. */ device_printf(dev, - "Received unsupported interrupt type: %s\n", - active_irq >= GIC_FIRST_LPI ? "LPI" : "SGI"); + "Received unsupported interrupt type: SGI\n"); PIC_MASK(dev, active_irq); } } @@ -275,6 +274,8 @@ gic_v3_mask_irq(device_t dev, u_int irq) } else if (irq >= GIC_FIRST_SPI && irq <= GIC_LAST_SPI) { /* SPIs in distributor */ gic_r_write(sc, 4, GICD_ICENABLER(irq), GICD_I_MASK(irq)); gic_v3_wait_for_rwp(sc, DIST); + } else if (irq >= GIC_FIRST_LPI) { /* LPIs */ + lpi_mask_irq(dev, irq); } else panic("%s: Unsupported IRQ number %u", __func__, irq); } @@ -293,6 +294,8 @@ gic_v3_unmask_irq(device_t dev, u_int ir } else if (irq >= GIC_FIRST_SPI && irq <= GIC_LAST_SPI) { /* SPIs in distributor */ gic_d_write(sc, 4, GICD_ISENABLER(irq), GICD_I_MASK(irq)); gic_v3_wait_for_rwp(sc, DIST); + } else if (irq >= GIC_FIRST_LPI) { /* LPIs */ + lpi_unmask_irq(dev, irq); } else panic("%s: Unsupported IRQ number %u", __func__, irq); } Modified: head/sys/arm64/arm64/gic_v3_fdt.c ============================================================================== --- head/sys/arm64/arm64/gic_v3_fdt.c Mon Jul 6 18:27:18 2015 (r285212) +++ head/sys/arm64/arm64/gic_v3_fdt.c Mon Jul 6 18:27:41 2015 (r285213) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include @@ -51,11 +53,27 @@ __FBSDID("$FreeBSD$"); static int gic_v3_fdt_probe(device_t); static int gic_v3_fdt_attach(device_t); +static struct resource *gic_v3_ofw_bus_alloc_res(device_t, device_t, int, int *, + u_long, u_long, u_long, u_int); +static const struct ofw_bus_devinfo *gic_v3_ofw_get_devinfo(device_t, device_t); + static device_method_t gic_v3_fdt_methods[] = { /* Device interface */ DEVMETHOD(device_probe, gic_v3_fdt_probe), DEVMETHOD(device_attach, gic_v3_fdt_attach), + /* Bus interface */ + DEVMETHOD(bus_alloc_resource, gic_v3_ofw_bus_alloc_res), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_devinfo, gic_v3_ofw_get_devinfo), + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), + /* End */ DEVMETHOD_END }; @@ -71,6 +89,11 @@ EARLY_DRIVER_MODULE(gic_v3, ofwbus, gic_ 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); /* + * Helper functions declarations. + */ +static int gic_v3_ofw_bus_attach(device_t); + +/* * Device interface. */ static int @@ -109,6 +132,17 @@ gic_v3_fdt_attach(device_t dev) err = gic_v3_attach(dev); if (err) goto error; + /* + * Try to register ITS to this GIC. + * GIC will act as a bus in that case. + * Failure here will not affect main GIC functionality. + */ + if (gic_v3_ofw_bus_attach(dev) != 0) { + if (bootverbose) { + device_printf(dev, + "Failed to attach ITS to this GIC\n"); + } + } return (err); @@ -122,3 +156,155 @@ error: return (err); } + +/* OFW bus interface */ +struct gic_v3_ofw_devinfo { + struct ofw_bus_devinfo di_dinfo; + struct resource_list di_rl; +}; + +static const struct ofw_bus_devinfo * +gic_v3_ofw_get_devinfo(device_t bus __unused, device_t child) +{ + struct gic_v3_ofw_devinfo *di; + + di = device_get_ivars(child); + return (&di->di_dinfo); +} + +static struct resource * +gic_v3_ofw_bus_alloc_res(device_t bus, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct gic_v3_ofw_devinfo *di; + struct resource_list_entry *rle; + int ranges_len; + + if ((start == 0UL) && (end == ~0UL)) { + if ((di = device_get_ivars(child)) == NULL) + return (NULL); + if (type != SYS_RES_MEMORY) + return (NULL); + + /* Find defaults for this rid */ + rle = resource_list_find(&di->di_rl, type, *rid); + if (rle == NULL) + return (NULL); + + start = rle->start; + end = rle->end; + count = rle->count; + } + /* + * XXX: No ranges remap! + * Absolute address is expected. + */ + if (ofw_bus_has_prop(bus, "ranges")) { + ranges_len = OF_getproplen(ofw_bus_get_node(bus), "ranges"); + if (ranges_len != 0) { + if (bootverbose) { + device_printf(child, + "Ranges remap not supported\n"); + } + return (NULL); + } + } + return (bus_generic_alloc_resource(bus, child, type, rid, start, end, + count, flags)); +} + +/* Helper functions */ + +/* + * Bus capability support for GICv3. + * Collects and configures device informations and finally + * adds ITS device as a child of GICv3 in Newbus hierarchy. + */ +static int +gic_v3_ofw_bus_attach(device_t dev) +{ + struct gic_v3_ofw_devinfo *di; + device_t child; + phandle_t parent, node; + pcell_t addr_cells, size_cells; + + parent = ofw_bus_get_node(dev); + if (parent > 0) { + addr_cells = 2; + OF_getencprop(parent, "#address-cells", &addr_cells, + sizeof(addr_cells)); + size_cells = 2; + OF_getencprop(parent, "#size-cells", &size_cells, + sizeof(size_cells)); + /* Iterate through all GIC subordinates */ + for (node = OF_child(parent); node > 0; node = OF_peer(node)) { + /* Allocate and populate devinfo. */ + di = malloc(sizeof(*di), M_GIC_V3, M_WAITOK | M_ZERO); + if (ofw_bus_gen_setup_devinfo(&di->di_dinfo, node)) { + if (bootverbose) { + device_printf(dev, + "Could not set up devinfo for ITS\n"); + } + free(di, M_GIC_V3); + continue; + } + + /* Initialize and populate resource list. */ + resource_list_init(&di->di_rl); + ofw_bus_reg_to_rl(dev, node, addr_cells, size_cells, + &di->di_rl); + + /* Should not have any interrupts, so don't add any */ + + /* Add newbus device for this FDT node */ + child = device_add_child(dev, NULL, -1); + if (!child) { + if (bootverbose) { + device_printf(dev, + "Could not add child: %s\n", + di->di_dinfo.obd_name); + } + resource_list_free(&di->di_rl); + ofw_bus_gen_destroy_devinfo(&di->di_dinfo); + free(di, M_GIC_V3); + continue; + } + + device_set_ivars(child, di); + } + } + + return (bus_generic_attach(dev)); +} + +static int gic_v3_its_fdt_probe(device_t dev); + +static device_method_t gic_v3_its_fdt_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, gic_v3_its_fdt_probe), + + /* End */ + DEVMETHOD_END +}; + +DEFINE_CLASS_1(gic_v3_its, gic_v3_its_fdt_driver, gic_v3_its_fdt_methods, + sizeof(struct gic_v3_its_softc), gic_v3_its_driver); + +static devclass_t gic_v3_its_fdt_devclass; + +EARLY_DRIVER_MODULE(gic_v3_its, gic_v3, gic_v3_its_fdt_driver, + gic_v3_its_fdt_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); + +static int +gic_v3_its_fdt_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, GIC_V3_ITS_COMPSTR)) + return (ENXIO); + + device_set_desc(dev, GIC_V3_ITS_DEVSTR); + return (BUS_PROBE_DEFAULT); +} Added: head/sys/arm64/arm64/gic_v3_its.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/arm64/gic_v3_its.c Mon Jul 6 18:27:41 2015 (r285213) @@ -0,0 +1,1448 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include + +#include "gic_v3_reg.h" +#include "gic_v3_var.h" + +#include "pic_if.h" + +/* Device and PIC methods */ +static int gic_v3_its_attach(device_t); + +static device_method_t gic_v3_its_methods[] = { + /* Device interface */ + DEVMETHOD(device_attach, gic_v3_its_attach), + /* + * PIC interface + */ + /* MSI-X */ + DEVMETHOD(pic_alloc_msix, gic_v3_its_alloc_msix), + DEVMETHOD(pic_map_msix, gic_v3_its_map_msix), + /* MSI */ + DEVMETHOD(pic_alloc_msi, gic_v3_its_alloc_msi), + DEVMETHOD(pic_map_msi, gic_v3_its_map_msix), + + /* End */ + DEVMETHOD_END +}; + +DEFINE_CLASS_0(gic_v3_its, gic_v3_its_driver, gic_v3_its_methods, + sizeof(struct gic_v3_its_softc)); + +MALLOC_DEFINE(M_GIC_V3_ITS, "GICv3 ITS", GIC_V3_ITS_DEVSTR); + +static int its_alloc_tables(struct gic_v3_its_softc *); +static void its_free_tables(struct gic_v3_its_softc *); +static void its_init_commandq(struct gic_v3_its_softc *); +static int its_init_cpu(struct gic_v3_its_softc *); +static void its_init_cpu_collection(struct gic_v3_its_softc *); + +static int its_cmd_send(struct gic_v3_its_softc *, struct its_cmd_desc *); + +static void its_cmd_mapc(struct gic_v3_its_softc *, struct its_col *, uint8_t); +static void its_cmd_mapvi(struct gic_v3_its_softc *, struct its_dev *, uint32_t, + uint32_t); +static void its_cmd_mapi(struct gic_v3_its_softc *, struct its_dev *, uint32_t); +static void its_cmd_inv(struct gic_v3_its_softc *, struct its_dev *, uint32_t); +static void its_cmd_invall(struct gic_v3_its_softc *, struct its_col *); + +static void lpi_init_conftable(struct gic_v3_its_softc *); +static void lpi_bitmap_init(struct gic_v3_its_softc *); +static void lpi_init_cpu(struct gic_v3_its_softc *); +static int lpi_config_cpu(struct gic_v3_its_softc *); + +const char *its_ptab_cache[] = { + [GITS_BASER_CACHE_NCNB] = "(NC,NB)", + [GITS_BASER_CACHE_NC] = "(NC)", + [GITS_BASER_CACHE_RAWT] = "(RA,WT)", + [GITS_BASER_CACHE_RAWB] = "(RA,WB)", + [GITS_BASER_CACHE_WAWT] = "(WA,WT)", + [GITS_BASER_CACHE_WAWB] = "(WA,WB)", + [GITS_BASER_CACHE_RAWAWT] = "(RAWA,WT)", + [GITS_BASER_CACHE_RAWAWB] = "(RAWA,WB)", +}; + +const char *its_ptab_share[] = { + [GITS_BASER_SHARE_NS] = "none", + [GITS_BASER_SHARE_IS] = "inner", + [GITS_BASER_SHARE_OS] = "outer", + [GITS_BASER_SHARE_RES] = "none", +}; + +const char *its_ptab_type[] = { + [GITS_BASER_TYPE_UNIMPL] = "Unimplemented", + [GITS_BASER_TYPE_DEV] = "Devices", + [GITS_BASER_TYPE_VP] = "Virtual Processors", + [GITS_BASER_TYPE_PP] = "Physical Processors", + [GITS_BASER_TYPE_IC] = "Interrupt Collections", + [GITS_BASER_TYPE_RES5] = "Reserved (5)", + [GITS_BASER_TYPE_RES6] = "Reserved (6)", + [GITS_BASER_TYPE_RES7] = "Reserved (7)", +}; + +static struct gic_v3_its_softc *its_sc; + +#define gic_its_read(sc, len, reg) \ + bus_read_##len(&sc->its_res[0], reg) + +#define gic_its_write(sc, len, reg, val) \ + bus_write_##len(&sc->its_res[0], reg, val) + +static int +gic_v3_its_attach(device_t dev) +{ + struct gic_v3_its_softc *sc; + uint64_t gits_tmp; + uint32_t gits_pidr2; + int rid; + int ret; + + sc = device_get_softc(dev); + + /* + * Initialize sleep & spin mutex for ITS + */ + /* Protects ITS device list and assigned LPIs bitmaps. */ + mtx_init(&sc->its_mtx, "ITS sleep lock", NULL, MTX_DEF); + /* Protects access to ITS command circular buffer. */ + mtx_init(&sc->its_spin_mtx, "ITS spin lock", NULL, MTX_SPIN); + + rid = 0; + sc->its_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->its_res == NULL) { + device_printf(dev, "Could not allocate memory\n"); + return (ENXIO); + } + + sc->dev = dev; + + gits_pidr2 = gic_its_read(sc, 4, GITS_PIDR2); + switch (gits_pidr2 & GITS_PIDR2_ARCH_MASK) { + case GITS_PIDR2_ARCH_GICv3: /* fall through */ + case GITS_PIDR2_ARCH_GICv4: + if (bootverbose) { + device_printf(dev, "ITS found. Architecture rev. %u\n", + (u_int)(gits_pidr2 & GITS_PIDR2_ARCH_MASK) >> 4); + } + break; + default: + device_printf(dev, "No ITS found in the system\n"); + gic_v3_its_detach(dev); + return (ENODEV); + } + + /* 1. Initialize commands queue */ + its_init_commandq(sc); + + /* 2. Provide memory for any private ITS tables */ + ret = its_alloc_tables(sc); + if (ret != 0) { + gic_v3_its_detach(dev); + return (ret); + } + + /* 3. Allocate collections. One per-CPU */ + sc->its_cols = malloc(sizeof(*sc->its_cols) * MAXCPU, + M_GIC_V3_ITS, (M_WAITOK | M_ZERO)); + + /* 4. Enable ITS in GITS_CTLR */ + gits_tmp = gic_its_read(sc, 4, GITS_CTLR); + gic_its_write(sc, 4, GITS_CTLR, gits_tmp | GITS_CTLR_EN); + + /* 5. Initialize LPIs configuration table */ + lpi_init_conftable(sc); + + /* 6. LPIs bitmap init */ + lpi_bitmap_init(sc); + + /* 7. CPU init */ + (void)its_init_cpu(sc); + + /* 8. Init ITS devices list */ + TAILQ_INIT(&sc->its_dev_list); + + arm_register_msi_pic(dev); + + /* + * XXX ARM64TODO: We need to have ITS software context + * when being called by the interrupt code (mask/unmask). + * This may be used only when one ITS is present in + * the system and eventually should be removed. + */ + KASSERT(its_sc == NULL, + ("Trying to assign its_sc that is already set")); + its_sc = sc; + + return (0); +} + +/* Will not detach but use it for convenience */ +int +gic_v3_its_detach(device_t dev) +{ + device_t parent; + struct gic_v3_softc *gic_sc; + struct gic_v3_its_softc *sc; + u_int cpuid; + int rid = 0; + + sc = device_get_softc(dev); + cpuid = PCPU_GET(cpuid); + + /* Release what's possible */ + + /* Command queue */ + if ((void *)sc->its_cmdq_base != NULL) { + contigfree((void *)sc->its_cmdq_base, + ITS_CMDQ_SIZE, M_GIC_V3_ITS); + } + /* ITTs */ + its_free_tables(sc); + /* Collections */ + free(sc->its_cols, M_GIC_V3_ITS); + /* LPI config table */ + parent = device_get_parent(sc->dev); + gic_sc = device_get_softc(parent); + if ((void *)gic_sc->gic_redists.lpis.conf_base != NULL) { + contigfree((void *)gic_sc->gic_redists.lpis.conf_base, + LPI_CONFTAB_SIZE, M_GIC_V3_ITS); + } + if ((void *)gic_sc->gic_redists.lpis.pend_base[cpuid] != NULL) { + contigfree((void *)gic_sc->gic_redists.lpis.pend_base[cpuid], + roundup2(LPI_PENDTAB_SIZE, PAGE_SIZE_64K), M_GIC_V3_ITS); + } + + /* Resource... */ + bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->its_res); + + /* XXX ARM64TODO: Reset global pointer to ITS software context */ + its_sc = NULL; + + return (0); +} + +static int +its_alloc_tables(struct gic_v3_its_softc *sc) +{ + uint64_t gits_baser, gits_tmp; + uint64_t type, esize, cache, share, psz; + uint64_t gits_typer; + size_t page_size, npages, nitspages, nidents, tn; + size_t its_tbl_size; + vm_offset_t ptab_vaddr; + vm_paddr_t ptab_paddr; + boolean_t first = TRUE; + + page_size = PAGE_SIZE_64K; + + /* Read features first */ + gits_typer = gic_its_read(sc, 8, GITS_TYPER); + + for (tn = 0; tn < GITS_BASER_NUM; tn++) { + gits_baser = gic_its_read(sc, 8, GITS_BASER(tn)); + type = GITS_BASER_TYPE(gits_baser); + /* Get the Table Entry size */ + esize = GITS_BASER_ESIZE(gits_baser); + + switch (type) { + case GITS_BASER_TYPE_UNIMPL: /* fall through */ + case GITS_BASER_TYPE_RES5: + case GITS_BASER_TYPE_RES6: + case GITS_BASER_TYPE_RES7: + continue; + case GITS_BASER_TYPE_DEV: + nidents = (1 << GITS_TYPER_DEVB(gits_typer)); + its_tbl_size = esize * nidents; + its_tbl_size = roundup2(its_tbl_size, page_size); + npages = howmany(its_tbl_size, PAGE_SIZE); + break; + default: + npages = howmany(page_size, PAGE_SIZE); + break; + } + + /* Allocate required space */ + ptab_vaddr = (vm_offset_t)contigmalloc(npages * PAGE_SIZE, + M_GIC_V3_ITS, (M_WAITOK | M_ZERO), 0, ~0UL, PAGE_SIZE, 0); + + sc->its_ptabs[tn].ptab_vaddr = ptab_vaddr; + sc->its_ptabs[tn].ptab_pgsz = PAGE_SIZE; + sc->its_ptabs[tn].ptab_npages = npages; + + ptab_paddr = vtophys(ptab_vaddr); + KASSERT((ptab_paddr & GITS_BASER_PA_MASK) == ptab_paddr, + ("%s: Unaligned PA for Interrupt Translation Table", + device_get_name(sc->dev))); + + /* Set defaults: WAWB, IS */ + cache = GITS_BASER_CACHE_WAWB; + share = GITS_BASER_SHARE_IS; + + for (;;) { + nitspages = howmany(its_tbl_size, page_size); + + switch (page_size) { + case PAGE_SIZE: /* 4KB */ + psz = GITS_BASER_PSZ_4K; + break; + case PAGE_SIZE_16K: /* 16KB */ + psz = GITS_BASER_PSZ_4K; + break; + case PAGE_SIZE_64K: /* 64KB */ + psz = GITS_BASER_PSZ_64K; + break; + default: + device_printf(sc->dev, + "Unsupported page size: %zuKB\n", + (page_size / 1024)); + its_free_tables(sc); + return (ENXIO); + } + + /* Clear fields under modification first */ + gits_baser &= ~(GITS_BASER_VALID | + GITS_BASER_CACHE_MASK | GITS_BASER_TYPE_MASK | + GITS_BASER_ESIZE_MASK | GITS_BASER_PA_MASK | + GITS_BASER_SHARE_MASK | GITS_BASER_PSZ_MASK | + GITS_BASER_SIZE_MASK); + /* Construct register value */ + gits_baser |= + (type << GITS_BASER_TYPE_SHIFT) | + ((esize - 1) << GITS_BASER_ESIZE_SHIFT) | + (cache << GITS_BASER_CACHE_SHIFT) | + (share << GITS_BASER_SHARE_SHIFT) | + (psz << GITS_BASER_PSZ_SHIFT) | + ptab_paddr | (nitspages - 1) | + GITS_BASER_VALID; + + gic_its_write(sc, 8, GITS_BASER(tn), gits_baser); + /* + * Verify. + * Depending on implementation we may encounter + * shareability and page size mismatch. + */ + gits_tmp = gic_its_read(sc, 8, GITS_BASER(tn)); + if (((gits_tmp ^ gits_baser) & GITS_BASER_SHARE_MASK) != 0) { + share = gits_tmp & GITS_BASER_SHARE_MASK; + share >>= GITS_BASER_SHARE_SHIFT; + continue; + } + + if (((gits_tmp ^ gits_baser) & GITS_BASER_PSZ_MASK) != 0) { + switch (page_size) { + case PAGE_SIZE_16K: + /* Drop to 4KB page */ + page_size = PAGE_SIZE; + continue; + case PAGE_SIZE_64K: + /* Drop to 16KB page */ + page_size = PAGE_SIZE_16K; + continue; + } + } + /* + * All possible adjustments should + * be applied by now so just break the loop. + */ + break; + } + /* + * Do not compare Cacheability field since + * it is implementation defined. + */ + gits_tmp &= ~GITS_BASER_CACHE_MASK; + gits_baser &= ~GITS_BASER_CACHE_MASK; + + if (gits_tmp != gits_baser) { + device_printf(sc->dev, + "Could not allocate ITS tables\n"); + its_free_tables(sc); + return (ENXIO); + } + + if (bootverbose) { + if (first) { + device_printf(sc->dev, + "Allocated ITS private tables:\n"); + first = FALSE; + } + device_printf(sc->dev, + "\tPTAB%zu for %s: PA 0x%lx," + " %lu entries," + " cache policy %s, %s shareable," + " page size %zuKB\n", + tn, its_ptab_type[type], ptab_paddr, + (page_size * nitspages) / esize, + its_ptab_cache[cache], its_ptab_share[share], + page_size / 1024); + } + } + + return (0); +} + +static void +its_free_tables(struct gic_v3_its_softc *sc) +{ + vm_offset_t ptab_vaddr; + size_t size; + size_t tn; + + for (tn = 0; tn < GITS_BASER_NUM; tn++) { + ptab_vaddr = sc->its_ptabs[tn].ptab_vaddr; + if (ptab_vaddr == 0) + continue; + size = sc->its_ptabs[tn].ptab_pgsz; + size *= sc->its_ptabs[tn].ptab_npages; + + if ((void *)ptab_vaddr != NULL) + contigfree((void *)ptab_vaddr, size, M_GIC_V3_ITS); + + /* Clear the table description */ + memset(&sc->its_ptabs[tn], 0, sizeof(sc->its_ptabs[tn])); + } +} + +static void +its_init_commandq(struct gic_v3_its_softc *sc) +{ + uint64_t gits_cbaser, gits_tmp; + uint64_t cache, share; + vm_paddr_t cmdq_paddr; + device_t dev; + + dev = sc->dev; + /* Allocate memory for command queue */ + sc->its_cmdq_base = contigmalloc(ITS_CMDQ_SIZE, M_GIC_V3_ITS, + (M_WAITOK | M_ZERO), 0, ~0UL, ITS_CMDQ_SIZE, 0); + /* Set command queue write pointer (command queue empty) */ + sc->its_cmdq_write = sc->its_cmdq_base; + + /* Save command queue pointer and attributes */ + cmdq_paddr = vtophys(sc->its_cmdq_base); + + /* Set defaults: Normal Inner WAWB, IS */ + cache = GITS_CBASER_CACHE_NIWAWB; + share = GITS_CBASER_SHARE_IS; + + gits_cbaser = (cmdq_paddr | + (cache << GITS_CBASER_CACHE_SHIFT) | + (share << GITS_CBASER_SHARE_SHIFT) | + /* Number of 4KB pages - 1 */ + ((ITS_CMDQ_SIZE / PAGE_SIZE) - 1) | + /* Valid bit */ + GITS_CBASER_VALID); + + gic_its_write(sc, 8, GITS_CBASER, gits_cbaser); + gits_tmp = gic_its_read(sc, 8, GITS_CBASER); + + if (((gits_tmp ^ gits_cbaser) & GITS_CBASER_SHARE_MASK) != 0) { + if (bootverbose) { + device_printf(dev, + "Will use cache flushing for commands queue\n"); + } + /* Command queue needs cache flushing */ + sc->its_flags |= ITS_FLAGS_CMDQ_FLUSH; + } + + gic_its_write(sc, 8, GITS_CWRITER, 0x0); +} + +static int +its_init_cpu(struct gic_v3_its_softc *sc) +{ + device_t parent; + struct gic_v3_softc *gic_sc; + + /* + * Check for LPIs support on this Re-Distributor. + */ + parent = device_get_parent(sc->dev); + gic_sc = device_get_softc(parent); + if ((gic_r_read(gic_sc, 4, GICR_TYPER) & GICR_TYPER_PLPIS) == 0) { + if (bootverbose) { + device_printf(sc->dev, + "LPIs not supported on CPU%u\n", PCPU_GET(cpuid)); + } + return (ENXIO); + } + + /* Initialize LPIs for this CPU */ + lpi_init_cpu(sc); + + /* Initialize collections */ + its_init_cpu_collection(sc); + + return (0); +} + +static void +its_init_cpu_collection(struct gic_v3_its_softc *sc) +{ + device_t parent; + struct gic_v3_softc *gic_sc; + uint64_t typer; + uint64_t target; + vm_offset_t redist_base; + u_int cpuid; + + cpuid = PCPU_GET(cpuid); + parent = device_get_parent(sc->dev); + gic_sc = device_get_softc(parent); + + typer = gic_its_read(sc, 8, GITS_TYPER); + if ((typer & GITS_TYPER_PTA) != 0) { + redist_base = + rman_get_bushandle(gic_sc->gic_redists.pcpu[cpuid]); + /* + * Target Address correspond to the base physical + * address of Re-Distributors. + */ + target = vtophys(redist_base); + } else { + /* Target Address correspond to unique processor numbers */ + typer = gic_r_read(gic_sc, 8, GICR_TYPER); + target = GICR_TYPER_CPUNUM(typer); + } + + sc->its_cols[cpuid].col_target = target; + sc->its_cols[cpuid].col_id = cpuid; + + its_cmd_mapc(sc, &sc->its_cols[cpuid], 1); + its_cmd_invall(sc, &sc->its_cols[cpuid]); +} + +static void +lpi_init_conftable(struct gic_v3_its_softc *sc) +{ + device_t parent; + struct gic_v3_softc *gic_sc; + vm_offset_t conf_base; + uint8_t prio_default; + + parent = device_get_parent(sc->dev); + gic_sc = device_get_softc(parent); + /* + * LPI Configuration Table settings. + * Notice that Configuration Table is shared among all + * Re-Distributors, so this is going to be created just once. + */ + conf_base = (vm_offset_t)contigmalloc(LPI_CONFTAB_SIZE, + M_GIC_V3_ITS, (M_WAITOK | M_ZERO), 0, ~0UL, PAGE_SIZE_64K, 0); + + if (bootverbose) { + device_printf(sc->dev, + "LPI Configuration Table at PA: 0x%lx\n", + vtophys(conf_base)); + } + + /* + * Let the default priority be aligned with all other + * interrupts assuming that each interrupt is assigned + * MAX priority at startup. MAX priority on the other + * hand cannot be higher than 0xFC for LPIs. + */ + prio_default = GIC_PRIORITY_MAX; + + /* Write each settings byte to LPI configuration table */ + memset((void *)conf_base, + (prio_default & LPI_CONF_PRIO_MASK) | LPI_CONF_GROUP1, + LPI_CONFTAB_SIZE); + + cpu_dcache_wb_range((vm_offset_t)conf_base, roundup2(LPI_CONFTAB_SIZE, + PAGE_SIZE_64K)); + + gic_sc->gic_redists.lpis.conf_base = conf_base; +} + +static void +lpi_init_cpu(struct gic_v3_its_softc *sc) +{ + device_t parent; + struct gic_v3_softc *gic_sc; + vm_offset_t pend_base; + u_int cpuid; + + parent = device_get_parent(sc->dev); + gic_sc = device_get_softc(parent); + + /* + * LPI Pending Table settings. + * This has to be done for each Re-Distributor, hence for each CPU. + */ + cpuid = PCPU_GET(cpuid); + + pend_base = (vm_offset_t)contigmalloc( + roundup2(LPI_PENDTAB_SIZE, PAGE_SIZE_64K), M_GIC_V3_ITS, + (M_WAITOK | M_ZERO), 0, ~0UL, PAGE_SIZE_64K, 0); + + /* Clean D-cache so that ITS can see zeroed pages */ + cpu_dcache_wb_range((vm_offset_t)pend_base, + roundup2(LPI_PENDTAB_SIZE, PAGE_SIZE_64K)); + + if (bootverbose) { + device_printf(sc->dev, + "LPI Pending Table for CPU%u at PA: 0x%lx\n", + cpuid, vtophys(pend_base)); + } + + gic_sc->gic_redists.lpis.pend_base[cpuid] = pend_base; + + lpi_config_cpu(sc); +} + +static int +lpi_config_cpu(struct gic_v3_its_softc *sc) +{ + device_t parent; + struct gic_v3_softc *gic_sc; + vm_offset_t conf_base, pend_base; + uint64_t gicr_xbaser, gicr_temp; + uint64_t cache, share, idbits; + uint32_t gicr_ctlr; + u_int cpuid; + + parent = device_get_parent(sc->dev); + gic_sc = device_get_softc(parent); + cpuid = PCPU_GET(cpuid); + + conf_base = gic_sc->gic_redists.lpis.conf_base; + pend_base = gic_sc->gic_redists.lpis.pend_base[cpuid]; + + /* Disable LPIs */ + gicr_ctlr = gic_r_read(gic_sc, 4, GICR_CTLR); + gicr_ctlr &= ~GICR_CTLR_LPI_ENABLE; + gic_r_write(gic_sc, 4, GICR_CTLR, gicr_ctlr); + /* Perform full system barrier */ + dsb(sy); + + /* + * Set GICR_PROPBASER + */ + + /* + * Find out how many bits do we need for LPI identifiers. + * Remark 1.: Even though we have (LPI_CONFTAB_SIZE / 8) LPIs + * the notified LPI ID still starts from 8192 + * (GIC_FIRST_LPI). + * Remark 2.: This could be done on compilation time but there + * seems to be no sufficient macro. + */ + idbits = flsl(LPI_CONFTAB_SIZE + GIC_FIRST_LPI) - 1; + + /* Set defaults: Normal Inner WAWB, IS */ + cache = GICR_PROPBASER_CACHE_NIWAWB; + share = GICR_PROPBASER_SHARE_IS; + + gicr_xbaser = vtophys(conf_base) | + ((idbits - 1) & GICR_PROPBASER_IDBITS_MASK) | + (cache << GICR_PROPBASER_CACHE_SHIFT) | + (share << GICR_PROPBASER_SHARE_SHIFT); + + gic_r_write(gic_sc, 8, GICR_PROPBASER, gicr_xbaser); + gicr_temp = gic_r_read(gic_sc, 8, GICR_PROPBASER); + + if (((gicr_xbaser ^ gicr_temp) & GICR_PROPBASER_SHARE_MASK) != 0) { + if (bootverbose) { + device_printf(sc->dev, + "Will use cache flushing for LPI " + "Configuration Table\n"); + } + gic_sc->gic_redists.lpis.flags |= LPI_FLAGS_CONF_FLUSH; + } + + /* + * Set GICR_PENDBASER + */ + + /* Set defaults: Normal Inner WAWB, IS */ + cache = GICR_PENDBASER_CACHE_NIWAWB; + share = GICR_PENDBASER_SHARE_IS; + + gicr_xbaser = vtophys(pend_base) | + (cache << GICR_PENDBASER_CACHE_SHIFT) | + (share << GICR_PENDBASER_SHARE_SHIFT); + + gic_r_write(gic_sc, 8, GICR_PENDBASER, gicr_xbaser); + + /* Enable LPIs */ + gicr_ctlr = gic_r_read(gic_sc, 4, GICR_CTLR); + gicr_ctlr |= GICR_CTLR_LPI_ENABLE; + gic_r_write(gic_sc, 4, GICR_CTLR, gicr_ctlr); + + dsb(sy); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jul 6 18:53:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AAE2A71C; Mon, 6 Jul 2015 18:53:57 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 74F8A1FF3; Mon, 6 Jul 2015 18:53:57 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66Irv47030282; Mon, 6 Jul 2015 18:53:57 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66Irvi4030281; Mon, 6 Jul 2015 18:53:57 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201507061853.t66Irvi4030281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 6 Jul 2015 18:53:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285214 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 18:53:57 -0000 Author: mjg Date: Mon Jul 6 18:53:56 2015 New Revision: 285214 URL: https://svnweb.freebsd.org/changeset/base/285214 Log: tty: replace several curthread->td_proc with stored curproc No functional changes. Modified: head/sys/kern/tty_tty.c Modified: head/sys/kern/tty_tty.c ============================================================================== --- head/sys/kern/tty_tty.c Mon Jul 6 18:27:41 2015 (r285213) +++ head/sys/kern/tty_tty.c Mon Jul 6 18:53:56 2015 (r285214) @@ -58,25 +58,27 @@ static void ctty_clone(void *arg, struct ucred *cred, char *name, int namelen, struct cdev **dev) { + struct proc *p; if (*dev != NULL) return; if (strcmp(name, "tty")) return; + p = curproc; sx_sunlock(&clone_drain_lock); sx_slock(&proctree_lock); sx_slock(&clone_drain_lock); dev_lock(); - if (!(curthread->td_proc->p_flag & P_CONTROLT)) + if (!(p->p_flag & P_CONTROLT)) *dev = ctty; - else if (curthread->td_proc->p_session->s_ttyvp == NULL) + else if (p->p_session->s_ttyvp == NULL) *dev = ctty; - else if (curthread->td_proc->p_session->s_ttyvp->v_type == VBAD || - curthread->td_proc->p_session->s_ttyvp->v_rdev == NULL) { + else if (p->p_session->s_ttyvp->v_type == VBAD || + p->p_session->s_ttyvp->v_rdev == NULL) { /* e.g. s_ttyvp was revoked */ *dev = ctty; } else - *dev = curthread->td_proc->p_session->s_ttyvp->v_rdev; + *dev = p->p_session->s_ttyvp->v_rdev; dev_refl(*dev); dev_unlock(); sx_sunlock(&proctree_lock); From owner-svn-src-all@freebsd.org Mon Jul 6 19:17:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21A5BAA92; Mon, 6 Jul 2015 19:17:57 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 1238B1BB1; Mon, 6 Jul 2015 19:17:57 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66JHupv040605; Mon, 6 Jul 2015 19:17:56 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66JHuLI040603; Mon, 6 Jul 2015 19:17:56 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201507061917.t66JHuLI040603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Mon, 6 Jul 2015 19:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285215 - head/sys/crypto/aesni X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 19:17:57 -0000 Author: jmg Date: Mon Jul 6 19:17:56 2015 New Revision: 285215 URL: https://svnweb.freebsd.org/changeset/base/285215 Log: remove _NORMAL flag which isn't suppose to be used w/ _alloc_ctx... Reviewed by: kib (a while ago) Modified: head/sys/crypto/aesni/aesni.c Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Mon Jul 6 18:53:56 2015 (r285214) +++ head/sys/crypto/aesni/aesni.c Mon Jul 6 19:17:56 2015 (r285215) @@ -206,8 +206,7 @@ aesni_newsession(device_t dev, uint32_t rw_wunlock(&sc->lock); return (ENOMEM); } - ses->fpu_ctx = fpu_kern_alloc_ctx(FPU_KERN_NORMAL | - FPU_KERN_NOWAIT); + ses->fpu_ctx = fpu_kern_alloc_ctx(FPU_KERN_NOWAIT); if (ses->fpu_ctx == NULL) { free(ses, M_AESNI); rw_wunlock(&sc->lock); From owner-svn-src-all@freebsd.org Mon Jul 6 19:30:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE0E2ACB4; Mon, 6 Jul 2015 19:30:30 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 B38ED12BB; Mon, 6 Jul 2015 19:30:30 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66JUULT046065; Mon, 6 Jul 2015 19:30:30 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66JUU5D046062; Mon, 6 Jul 2015 19:30:30 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201507061930.t66JUU5D046062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Mon, 6 Jul 2015 19:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285216 - head/sys/crypto/aesni X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 19:30:30 -0000 Author: jmg Date: Mon Jul 6 19:30:29 2015 New Revision: 285216 URL: https://svnweb.freebsd.org/changeset/base/285216 Log: Fix for non-random IV's when CRD_F_IV_PRESENT and CRD_F_IV_EXPLICIT flags are not specified... This bug was introduced in r275732... This only affects IPsec ESP only policies w/ the aesni module loaded, other subsystems specify one or both of the flags... Reviewed by: gnn, delphij, eri Modified: head/sys/crypto/aesni/aesni.c head/sys/crypto/aesni/aesni.h Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Mon Jul 6 19:17:56 2015 (r285215) +++ head/sys/crypto/aesni/aesni.c Mon Jul 6 19:30:29 2015 (r285216) @@ -450,6 +450,7 @@ static int aesni_cipher_process(struct aesni_session *ses, struct cryptodesc *enccrd, struct cryptodesc *authcrd, struct cryptop *crp) { + uint8_t iv[AES_BLOCK_LEN]; uint8_t tag[GMAC_DIGEST_LEN]; struct thread *td; uint8_t *buf, *authbuf; @@ -504,15 +505,23 @@ aesni_cipher_process(struct aesni_sessio break; } - /* Setup ses->iv */ - bzero(ses->iv, sizeof ses->iv); - if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT) != 0) - bcopy(enccrd->crd_iv, ses->iv, ivlen); - else if (encflag && ((enccrd->crd_flags & CRD_F_IV_PRESENT) != 0)) - arc4rand(ses->iv, ivlen, 0); - else - crypto_copydata(crp->crp_flags, crp->crp_buf, - enccrd->crd_inject, ivlen, ses->iv); + /* Setup iv */ + if (encflag) { + if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT) != 0) + bcopy(enccrd->crd_iv, iv, ivlen); + else + arc4rand(iv, ivlen, 0); + + if ((enccrd->crd_flags & CRD_F_IV_PRESENT) == 0) + crypto_copyback(crp->crp_flags, crp->crp_buf, + enccrd->crd_inject, ivlen, iv); + } else { + if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT) != 0) + bcopy(enccrd->crd_iv, iv, ivlen); + else + crypto_copydata(crp->crp_flags, crp->crp_buf, + enccrd->crd_inject, ivlen, iv); + } if (authcrd != NULL && !encflag) crypto_copydata(crp->crp_flags, crp->crp_buf, @@ -525,33 +534,33 @@ aesni_cipher_process(struct aesni_sessio case CRYPTO_AES_CBC: if (encflag) aesni_encrypt_cbc(ses->rounds, ses->enc_schedule, - enccrd->crd_len, buf, buf, ses->iv); + enccrd->crd_len, buf, buf, iv); else aesni_decrypt_cbc(ses->rounds, ses->dec_schedule, - enccrd->crd_len, buf, ses->iv); + enccrd->crd_len, buf, iv); break; case CRYPTO_AES_ICM: /* encryption & decryption are the same */ aesni_encrypt_icm(ses->rounds, ses->enc_schedule, - enccrd->crd_len, buf, buf, ses->iv); + enccrd->crd_len, buf, buf, iv); break; case CRYPTO_AES_XTS: if (encflag) aesni_encrypt_xts(ses->rounds, ses->enc_schedule, ses->xts_schedule, enccrd->crd_len, buf, buf, - ses->iv); + iv); else aesni_decrypt_xts(ses->rounds, ses->dec_schedule, ses->xts_schedule, enccrd->crd_len, buf, buf, - ses->iv); + iv); break; case CRYPTO_AES_NIST_GCM_16: if (encflag) - AES_GCM_encrypt(buf, buf, authbuf, ses->iv, tag, + AES_GCM_encrypt(buf, buf, authbuf, iv, tag, enccrd->crd_len, authcrd->crd_len, ivlen, ses->enc_schedule, ses->rounds); else { - if (!AES_GCM_decrypt(buf, buf, authbuf, ses->iv, tag, + if (!AES_GCM_decrypt(buf, buf, authbuf, iv, tag, enccrd->crd_len, authcrd->crd_len, ivlen, ses->enc_schedule, ses->rounds)) error = EBADMSG; @@ -563,13 +572,6 @@ aesni_cipher_process(struct aesni_sessio crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip, enccrd->crd_len, buf); - /* - * OpenBSD doesn't copy this back. This primes the IV for the next - * chain. Why do we not do it for decrypt? - */ - if (encflag && enccrd->crd_alg == CRYPTO_AES_CBC) - bcopy(buf + enccrd->crd_len - AES_BLOCK_LEN, ses->iv, AES_BLOCK_LEN); - if (!error && authcrd != NULL) { crypto_copyback(crp->crp_flags, crp->crp_buf, authcrd->crd_inject, GMAC_DIGEST_LEN, tag); Modified: head/sys/crypto/aesni/aesni.h ============================================================================== --- head/sys/crypto/aesni/aesni.h Mon Jul 6 19:17:56 2015 (r285215) +++ head/sys/crypto/aesni/aesni.h Mon Jul 6 19:30:29 2015 (r285216) @@ -56,7 +56,6 @@ struct aesni_session { uint8_t enc_schedule[AES_SCHED_LEN] __aligned(16); uint8_t dec_schedule[AES_SCHED_LEN] __aligned(16); uint8_t xts_schedule[AES_SCHED_LEN] __aligned(16); - uint8_t iv[AES_BLOCK_LEN]; int algo; int rounds; /* uint8_t *ses_ictx; */ From owner-svn-src-all@freebsd.org Mon Jul 6 19:33:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C9AEAE50; Mon, 6 Jul 2015 19:33:30 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 124ED19FB; Mon, 6 Jul 2015 19:33:30 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66JXT6k050059; Mon, 6 Jul 2015 19:33:29 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66JXTtJ050058; Mon, 6 Jul 2015 19:33:29 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201507061933.t66JXTtJ050058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Mon, 6 Jul 2015 19:33:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285217 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 19:33:30 -0000 Author: neel Date: Mon Jul 6 19:33:29 2015 New Revision: 285217 URL: https://svnweb.freebsd.org/changeset/base/285217 Log: Always assert DCD and DSR in bhyve's uart emulation. The /etc/ttys entry for a serial console in FreeBSD/x86 is as follows: ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure The initial terminal type passed to getty(8) is "3wire" which sets the CLOCAL flag. However reset(1) clears this flag and any programs that try to open the terminal will hang waiting for DCD to be asserted. Fix this by always asserting DCD and DSR in the emulated uart. The following discussion on virtualization@ has more details: https://lists.freebsd.org/pipermail/freebsd-virtualization/2015-June/003666.html Reported by: jmg Discussed with: grehan Modified: head/usr.sbin/bhyve/uart_emul.c Modified: head/usr.sbin/bhyve/uart_emul.c ============================================================================== --- head/usr.sbin/bhyve/uart_emul.c Mon Jul 6 19:30:29 2015 (r285216) +++ head/usr.sbin/bhyve/uart_emul.c Mon Jul 6 19:33:29 2015 (r285217) @@ -272,6 +272,37 @@ uart_opentty(struct uart_softc *sc) assert(sc->mev != NULL); } +static uint8_t +modem_status(uint8_t mcr) +{ + uint8_t msr; + + if (mcr & MCR_LOOPBACK) { + /* + * In the loopback mode certain bits from the MCR are + * reflected back into MSR. + */ + msr = 0; + if (mcr & MCR_RTS) + msr |= MSR_CTS; + if (mcr & MCR_DTR) + msr |= MSR_DSR; + if (mcr & MCR_OUT1) + msr |= MSR_RI; + if (mcr & MCR_OUT2) + msr |= MSR_DCD; + } else { + /* + * Always assert DCD and DSR so tty open doesn't block + * even if CLOCAL is turned off. + */ + msr = MSR_DCD | MSR_DSR; + } + assert((msr & MSR_DELTA_MASK) == 0); + + return (msr); +} + /* * The IIR returns a prioritized interrupt reason: * - receive data available @@ -304,6 +335,7 @@ uart_reset(struct uart_softc *sc) divisor = DEFAULT_RCLK / DEFAULT_BAUD / 16; sc->dll = divisor; sc->dlh = divisor >> 16; + sc->msr = modem_status(sc->mcr); rxfifo_reset(sc, 1); /* no fifo until enabled by software */ } @@ -363,7 +395,7 @@ uart_write(struct uart_softc *sc, int of uint8_t msr; pthread_mutex_lock(&sc->mtx); - + /* * Take care of the special case DLAB accesses first */ @@ -426,22 +458,7 @@ uart_write(struct uart_softc *sc, int of case REG_MCR: /* Apply mask so that bits 5-7 are 0 */ sc->mcr = value & 0x1F; - - msr = 0; - if (sc->mcr & MCR_LOOPBACK) { - /* - * In the loopback mode certain bits from the - * MCR are reflected back into MSR - */ - if (sc->mcr & MCR_RTS) - msr |= MSR_CTS; - if (sc->mcr & MCR_DTR) - msr |= MSR_DSR; - if (sc->mcr & MCR_OUT1) - msr |= MSR_RI; - if (sc->mcr & MCR_OUT2) - msr |= MSR_DCD; - } + msr = modem_status(sc->mcr); /* * Detect if there has been any change between the From owner-svn-src-all@freebsd.org Mon Jul 6 19:41:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2E1D4EBB0; Mon, 6 Jul 2015 19:41:44 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 B02C51FDA; Mon, 6 Jul 2015 19:41:44 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66JfirJ054681; Mon, 6 Jul 2015 19:41:44 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66Jfijl054677; Mon, 6 Jul 2015 19:41:44 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201507061941.t66Jfijl054677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Mon, 6 Jul 2015 19:41:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285218 - in head: lib/libvmmapi sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 19:41:44 -0000 Author: neel Date: Mon Jul 6 19:41:43 2015 New Revision: 285218 URL: https://svnweb.freebsd.org/changeset/base/285218 Log: Move the 'devmem' device nodes from /dev/vmm to /dev/vmm.io Some external tools just do a 'ls /dev/vmm' to figure out the bhyve virtual machines on the host. These tools break if the devmem device nodes also appear in /dev/vmm. Requested by: grehan Modified: head/lib/libvmmapi/vmmapi.c head/sys/amd64/vmm/vmm_dev.c Modified: head/lib/libvmmapi/vmmapi.c ============================================================================== --- head/lib/libvmmapi/vmmapi.c Mon Jul 6 19:33:29 2015 (r285217) +++ head/lib/libvmmapi/vmmapi.c Mon Jul 6 19:41:43 2015 (r285218) @@ -472,7 +472,7 @@ vm_create_devmem(struct vmctx *ctx, int if (error) goto done; - strlcpy(pathname, "/dev/vmm/", sizeof(pathname)); + strlcpy(pathname, "/dev/vmm.io/", sizeof(pathname)); strlcat(pathname, ctx->name, sizeof(pathname)); strlcat(pathname, ".", sizeof(pathname)); strlcat(pathname, name, sizeof(pathname)); Modified: head/sys/amd64/vmm/vmm_dev.c ============================================================================== --- head/sys/amd64/vmm/vmm_dev.c Mon Jul 6 19:33:29 2015 (r285217) +++ head/sys/amd64/vmm/vmm_dev.c Mon Jul 6 19:41:43 2015 (r285218) @@ -943,7 +943,7 @@ devmem_create_cdev(const char *vmname, i int error; error = make_dev_p(MAKEDEV_CHECKNAME, &cdev, &devmemsw, NULL, - UID_ROOT, GID_WHEEL, 0600, "vmm/%s.%s", vmname, devname); + UID_ROOT, GID_WHEEL, 0600, "vmm.io/%s.%s", vmname, devname); if (error) return (error); From owner-svn-src-all@freebsd.org Mon Jul 6 20:10:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EE139953CC; Mon, 6 Jul 2015 20:10:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 8FC1F1179; Mon, 6 Jul 2015 20:10:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66KAmRX067140; Mon, 6 Jul 2015 20:10:48 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66KAm9J067139; Mon, 6 Jul 2015 20:10:48 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201507062010.t66KAm9J067139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 6 Jul 2015 20:10:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285219 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 20:10:48 -0000 Author: imp Date: Mon Jul 6 20:10:47 2015 New Revision: 285219 URL: https://svnweb.freebsd.org/changeset/base/285219 Log: The results of the vote are in. This reflects that vote. Single line statements inside of braces is recognized as an acceptable style. http://reviews.freebsd.org/V3 As always, this isn't license for wholesale change, etc. Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Mon Jul 6 19:41:43 2015 (r285218) +++ head/share/man/man9/style.9 Mon Jul 6 20:10:47 2015 (r285219) @@ -26,7 +26,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd January 7, 2010 +.Dd July 6, 2015 .Dt STYLE 9 .Os .Sh NAME @@ -503,13 +503,14 @@ Code which is unreachable for non-obviou .Pp Space after keywords .Pq Ic if , while , for , return , switch . -No braces +Two styles of braces .Ql ( \&{ and .Ql \&} ) -are -used for control statements with zero or only a single statement unless that -statement is more than a single line in which case they are permitted. +are allowed for single line statements. +Either they are used for all single statements, or +they are used only where needed for clarity. +Usage within a function should be consistent. Forever loops are done with .Ic for Ns 's , not From owner-svn-src-all@freebsd.org Mon Jul 6 20:11:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB0A79953F8 for ; Mon, 6 Jul 2015 20:11:40 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) by mx1.freebsd.org (Postfix) with SMTP id 8F5F4144D for ; Mon, 6 Jul 2015 20:11:40 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Mon, 6 Jul 2015 20:12:10 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t66KBW8G032787; Mon, 6 Jul 2015 14:11:32 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1436213492.1334.64.camel@freebsd.org> Subject: Re: svn commit: r285217 - head/usr.sbin/bhyve From: Ian Lepore To: Neel Natu Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 06 Jul 2015 14:11:32 -0600 In-Reply-To: <201507061933.t66JXTtJ050058@repo.freebsd.org> References: <201507061933.t66JXTtJ050058@repo.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 20:11:40 -0000 On Mon, 2015-07-06 at 19:33 +0000, Neel Natu wrote: > Author: neel > Date: Mon Jul 6 19:33:29 2015 > New Revision: 285217 > URL: https://svnweb.freebsd.org/changeset/base/285217 > > Log: > Always assert DCD and DSR in bhyve's uart emulation. > > The /etc/ttys entry for a serial console in FreeBSD/x86 is as follows: > ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure > > The initial terminal type passed to getty(8) is "3wire" which sets the > CLOCAL flag. However reset(1) clears this flag and any programs that try > to open the terminal will hang waiting for DCD to be asserted. > > Fix this by always asserting DCD and DSR in the emulated uart. > > The following discussion on virtualization@ has more details: > https://lists.freebsd.org/pipermail/freebsd-virtualization/2015-June/003666.html > > Reported by: jmg > Discussed with: grehan This seems like a wrong fix. A real 3-wire serial console doesn't have DCD and DSR wired on. Why isn't the right fix here having the user with this problem to do "stty -f /dev/ttyu0.lock clocal", maybe in rc.local? Hmmm, or maybe it would be right for getty to do the equivelent when it sees a 3wire type? -- Ian From owner-svn-src-all@freebsd.org Mon Jul 6 20:28:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C3F69955F8; Mon, 6 Jul 2015 20:28:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 1D0371E63; Mon, 6 Jul 2015 20:28:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66KSgMR076162; Mon, 6 Jul 2015 20:28:42 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66KSgkk076161; Mon, 6 Jul 2015 20:28:42 GMT (envelope-from np@FreeBSD.org) Message-Id: <201507062028.t66KSgkk076161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 6 Jul 2015 20:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285220 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 20:28:43 -0000 Author: np Date: Mon Jul 6 20:28:42 2015 New Revision: 285220 URL: https://svnweb.freebsd.org/changeset/base/285220 Log: cxgbe(4): Do not override the the global defaults for congestion drops. The hw.cxgbe.cong_drop knob is not affected by this change because the driver sets up congestion drop on a per-queue basis. MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Mon Jul 6 20:10:47 2015 (r285219) +++ head/sys/dev/cxgbe/t4_sge.c Mon Jul 6 20:28:42 2015 (r285220) @@ -472,12 +472,6 @@ t4_tweak_chip_settings(struct adapter *s V_TIMERVALUE5(us_to_core_ticks(sc, intr_timer[5])); t4_write_reg(sc, A_SGE_TIMER_VALUE_4_AND_5, v); - if (cong_drop == 0) { - m = F_TUNNELCNGDROP0 | F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 | - F_TUNNELCNGDROP3; - t4_set_reg_field(sc, A_TP_PARA_REG3, m, 0); - } - /* 4K, 16K, 64K, 256K DDP "page sizes" */ v = V_HPZ0(0) | V_HPZ1(2) | V_HPZ2(4) | V_HPZ3(6); t4_write_reg(sc, A_ULP_RX_TDDP_PSZ, v); @@ -685,17 +679,6 @@ t4_read_chip_settings(struct adapter *sc s->timer_val[4] = G_TIMERVALUE4(r) / core_ticks_per_usec(sc); s->timer_val[5] = G_TIMERVALUE5(r) / core_ticks_per_usec(sc); - if (cong_drop == 0) { - m = F_TUNNELCNGDROP0 | F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 | - F_TUNNELCNGDROP3; - r = t4_read_reg(sc, A_TP_PARA_REG3); - if (r & m) { - device_printf(sc->dev, - "invalid TP_PARA_REG3(0x%x)\n", r); - rc = EINVAL; - } - } - v = V_HPZ0(0) | V_HPZ1(2) | V_HPZ2(4) | V_HPZ3(6); r = t4_read_reg(sc, A_ULP_RX_TDDP_PSZ); if (r != v) { From owner-svn-src-all@freebsd.org Mon Jul 6 20:38:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2ABA9957C7 for ; Mon, 6 Jul 2015 20:38:33 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto2.onthenet.com.au [203.13.68.14]) by mx1.freebsd.org (Postfix) with ESMTP id 8E78F14E4 for ; Mon, 6 Jul 2015 20:38:32 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [203.13.68.150]) by alto.onthenet.com.au (Postfix) with ESMTP id 32B3D1268B for ; Tue, 7 Jul 2015 06:38:25 +1000 (EST) Received: from localhost (iredmail.onthenet.com.au [127.0.0.1]) by iredmail.onthenet.com.au (Postfix) with ESMTP id 2B6D9280F5B for ; Tue, 7 Jul 2015 06:38:25 +1000 (AEST) X-Amavis-Modified: Mail body modified (using disclaimer) - iredmail.onthenet.com.au Received: from iredmail.onthenet.com.au ([127.0.0.1]) by localhost (iredmail.onthenet.com.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eRoBCavMwdxC for ; Tue, 7 Jul 2015 06:38:24 +1000 (AEST) Received: from Peters-MacBook-Pro.local (unknown [64.245.0.210]) by iredmail.onthenet.com.au (Postfix) with ESMTPSA id 9D338280A37; Tue, 7 Jul 2015 06:38:16 +1000 (AEST) Message-ID: <559AE736.4010509@freebsd.org> Date: Mon, 06 Jul 2015 13:38:14 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Ian Lepore , Neel Natu CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285217 - head/usr.sbin/bhyve References: <201507061933.t66JXTtJ050058@repo.freebsd.org> <1436213492.1334.64.camel@freebsd.org> In-Reply-To: <1436213492.1334.64.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 20:38:33 -0000 > This seems like a wrong fix. A real 3-wire serial console doesn't have > DCD and DSR wired on. Why isn't the right fix here having the user with > this problem to do "stty -f /dev/ttyu0.lock clocal", maybe in rc.local? > > Hmmm, or maybe it would be right for getty to do the equivelent when it > sees a 3wire type? Sure, but this will do until that's available. later, Peter. From owner-svn-src-all@freebsd.org Mon Jul 6 20:57:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51FDF995BBF; Mon, 6 Jul 2015 20:57:01 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 319101940; Mon, 6 Jul 2015 20:57:01 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66Kv1p4090818; Mon, 6 Jul 2015 20:57:01 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66Kv0b5090813; Mon, 6 Jul 2015 20:57:00 GMT (envelope-from np@FreeBSD.org) Message-Id: <201507062057.t66Kv0b5090813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 6 Jul 2015 20:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285221 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 20:57:01 -0000 Author: np Date: Mon Jul 6 20:56:59 2015 New Revision: 285221 URL: https://svnweb.freebsd.org/changeset/base/285221 Log: cxgbe(4): Add a new knob that controls the congestion response of netmap rx queues. The default is to drop rather than backpressure. This decouples the congestion settings of NIC and netmap rx queues. MFC after: 3 days Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_netmap.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Mon Jul 6 20:28:42 2015 (r285220) +++ head/sys/dev/cxgbe/adapter.h Mon Jul 6 20:56:59 2015 (r285221) @@ -1052,7 +1052,7 @@ void t4_update_fl_bufsize(struct ifnet * int parse_pkt(struct mbuf **); void *start_wrq_wr(struct sge_wrq *, int, struct wrq_cookie *); void commit_wrq_wr(struct sge_wrq *, void *, struct wrq_cookie *); -int tnl_cong(struct port_info *); +int tnl_cong(struct port_info *, int); /* t4_tracer.c */ struct t4_tracer; Modified: head/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- head/sys/dev/cxgbe/t4_netmap.c Mon Jul 6 20:28:42 2015 (r285220) +++ head/sys/dev/cxgbe/t4_netmap.c Mon Jul 6 20:56:59 2015 (r285221) @@ -77,6 +77,15 @@ int holdoff_tmr_idx = 2; SYSCTL_INT(_hw_cxgbe, OID_AUTO, nm_holdoff_tmr_idx, CTLFLAG_RWTUN, &holdoff_tmr_idx, 0, "Holdoff timer index for netmap rx queues."); +/* + * Congestion drops. + * -1: no congestion feedback (not recommended). + * 0: backpressure the channel instead of dropping packets right away. + * 1: no backpressure, drop packets for the congested queue immediately. + */ +static int nm_cong_drop = 1; +TUNABLE_INT("hw.cxgbe.nm_cong_drop", &nm_cong_drop); + /* netmap ifnet routines */ static void cxgbe_nm_init(void *); static int cxgbe_nm_ioctl(struct ifnet *, unsigned long, caddr_t); @@ -503,7 +512,7 @@ cxgbe_netmap_on(struct adapter *sc, stru nm_set_native_flags(na); for_each_nm_rxq(pi, i, nm_rxq) { - alloc_nm_rxq_hwq(pi, nm_rxq, tnl_cong(pi)); + alloc_nm_rxq_hwq(pi, nm_rxq, tnl_cong(pi, nm_cong_drop)); nm_rxq->fl_hwidx = hwidx; slot = netmap_reset(na, NR_RX, i, 0); MPASS(slot != NULL); /* XXXNM: error check, not assert */ Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Mon Jul 6 20:28:42 2015 (r285220) +++ head/sys/dev/cxgbe/t4_sge.c Mon Jul 6 20:56:59 2015 (r285221) @@ -2903,12 +2903,12 @@ free_mgmtq(struct adapter *sc) } int -tnl_cong(struct port_info *pi) +tnl_cong(struct port_info *pi, int drop) { - if (cong_drop == -1) + if (drop == -1) return (-1); - else if (cong_drop == 1) + else if (drop == 1) return (0); else return (pi->rx_chan_map); @@ -2922,7 +2922,8 @@ alloc_rxq(struct port_info *pi, struct s struct sysctl_oid_list *children; char name[16]; - rc = alloc_iq_fl(pi, &rxq->iq, &rxq->fl, intr_idx, tnl_cong(pi)); + rc = alloc_iq_fl(pi, &rxq->iq, &rxq->fl, intr_idx, + tnl_cong(pi, cong_drop)); if (rc != 0) return (rc); From owner-svn-src-all@freebsd.org Mon Jul 6 21:52:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 916259954EC; Mon, 6 Jul 2015 21:52:27 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 731C1100E; Mon, 6 Jul 2015 21:52:27 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t66LqKJQ096516 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 6 Jul 2015 14:52:20 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t66LqKAw096515; Mon, 6 Jul 2015 14:52:20 -0700 (PDT) (envelope-from jmg) Date: Mon, 6 Jul 2015 14:52:20 -0700 From: John-Mark Gurney To: Ian Lepore Cc: Neel Natu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285217 - head/usr.sbin/bhyve Message-ID: <20150706215220.GP8523@funkthat.com> References: <201507061933.t66JXTtJ050058@repo.freebsd.org> <1436213492.1334.64.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1436213492.1334.64.camel@freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Mon, 06 Jul 2015 14:52:21 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 21:52:27 -0000 Ian Lepore wrote this message on Mon, Jul 06, 2015 at 14:11 -0600: > On Mon, 2015-07-06 at 19:33 +0000, Neel Natu wrote: > > Author: neel > > Date: Mon Jul 6 19:33:29 2015 > > New Revision: 285217 > > URL: https://svnweb.freebsd.org/changeset/base/285217 > > > > Log: > > Always assert DCD and DSR in bhyve's uart emulation. > > > > The /etc/ttys entry for a serial console in FreeBSD/x86 is as follows: > > ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure > > > > The initial terminal type passed to getty(8) is "3wire" which sets the > > CLOCAL flag. However reset(1) clears this flag and any programs that try > > to open the terminal will hang waiting for DCD to be asserted. > > > > Fix this by always asserting DCD and DSR in the emulated uart. > > > > The following discussion on virtualization@ has more details: > > https://lists.freebsd.org/pipermail/freebsd-virtualization/2015-June/003666.html > > > > Reported by: jmg > > Discussed with: grehan > > This seems like a wrong fix. A real 3-wire serial console doesn't have > DCD and DSR wired on. Why isn't the right fix here having the user with > this problem to do "stty -f /dev/ttyu0.lock clocal", maybe in rc.local? > > Hmmm, or maybe it would be right for getty to do the equivelent when it > sees a 3wire type? This seems more sane to me... Ok, so I just tested on real hardware, and something is wrong w/ FreeBSD's behavior... Could this be a change between 10 and HEAD? One a real machine (I manually added 3wire from HEAD so /etc/ttys is exactly the same between the two): # uname -a FreeBSD 10.1-STABLE FreeBSD 10.1-STABLE #102: Mon Jun 22 18:28:28 PDT 2015 jmg@carbon.funkthat.com:/a/home/jmg/consulting/netflix/new_sys/amd64/compile/bhgdb amd64 # echo $TERM vt100 # stty -a | grep clocal cflags: cread cs8 -parenb -parodd -hupcl clocal -cstopb -crtscts -dsrflow # reset Erase is backspace. # stty -a | grep clocal cflags: cread cs8 -parenb -parodd -hupcl clocal -cstopb -crtscts -dsrflow and under bhyve: # uname -a FreeBSD 11.0-CURRENT FreeBSD 11.0-CURRENT #11 r284880M: Fri Jul 3 14:14:49 PDT 2015 jmg@carbon.funkthat.com:/a/obj/a/home/jmg/FreeBSD.svn/HEAD/sys/IPSEC amd64 # echo $TERM vt100 # stty -a | grep clocal cflags: cread cs8 -parenb -parodd hupcl clocal -cstopb -crtscts -dsrflow # reset # stty -a | grep clocal cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow I check and both .init and .lock have the same settings... reset -S both return the same termcap entry... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@freebsd.org Mon Jul 6 22:42:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 249C2995AF0; Mon, 6 Jul 2015 22:42:08 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CBE51C39; Mon, 6 Jul 2015 22:42:07 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by widjy10 with SMTP id jy10so173288073wid.1; Mon, 06 Jul 2015 15:42:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=u9EwUGIYWQqjcMtkOafSSxaYIaLltoed6xsw8Sz/qZo=; b=QhOezq5d6JlImhdSqA8V15e7Dk9wKJEzPSyn52i1c9xII3MW4oEq5PPs8cMHJouNXK SrSEi+jAZdACiG75LPd4DiooMWapLh+lHc4wTySABKIa290Byx3KgVF7F8CRT3Vxs1M3 cKSiqwkjSI+pGI1qomiXXfJQ33y/tH18Qv+bnBHUYnTSFnq0sYaPv3pG79hrQyWYigXE ezYiihp+tYmUTBxJ+CbqoK1fjrduMsBS57CLOpRq0JI0GgbksScgBmXOxcyeUbphen7h ZL2Um+c7HM53NYUdWVNZckIBFe8sH3XLVsVwB/oU0C3RaoOGjQKozfgY73/pEdDs4Q2E YV9Q== X-Received: by 10.181.25.234 with SMTP id it10mr60065956wid.0.1436222525335; Mon, 06 Jul 2015 15:42:05 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id u7sm49413418wif.3.2015.07.06.15.42.03 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 06 Jul 2015 15:42:04 -0700 (PDT) Date: Tue, 7 Jul 2015 00:42:01 +0200 From: Mateusz Guzik To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r267760 - head/sys/kern Message-ID: <20150706224201.GC28898@dft-labs.eu> References: <20140623163523.GK93733@kib.kiev.ua> <20140711024351.GA18214@dft-labs.eu> <20140711095551.GA93733@kib.kiev.ua> <20140711111925.GB18214@dft-labs.eu> <20140713132652.GZ93733@kib.kiev.ua> <20140713213623.GA13241@dft-labs.eu> <20140717005638.GF93733@kib.kiev.ua> <20150706055135.GA28898@dft-labs.eu> <20150706064601.GB28898@dft-labs.eu> <20150706090958.GM2080@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150706090958.GM2080@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 22:42:08 -0000 On Mon, Jul 06, 2015 at 12:09:58PM +0300, Konstantin Belousov wrote: > On Mon, Jul 06, 2015 at 08:46:02AM +0200, Mateusz Guzik wrote: > > diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c > > index fe8e9ef..c7f579a 100644 > > --- a/sys/fs/devfs/devfs_vnops.c > > +++ b/sys/fs/devfs/devfs_vnops.c > > @@ -574,6 +574,8 @@ devfs_close(struct vop_close_args *ap) > > if (vp->v_data == NULL) > > return (0); > > > > + vp_locked = VOP_ISLOCKED(vp); > > + > > /* > > * Hack: a tty device that is a controlling terminal > > * has a reference from the session structure. > > @@ -589,6 +591,7 @@ devfs_close(struct vop_close_args *ap) > > if (vp == p->p_session->s_ttyvp) { > > PROC_UNLOCK(p); > > oldvp = NULL; > > + VOP_UNLOCK(vp, 0); > This opens a window where vp can be reclaimed. Then vp->v_rdev > is invalid and dev_refthread() below accesses random memory. > > Might be, the easiest fix is to call dev_refthread() before the td != > NULL block, but leave dsw == NULL check where it is now. > Instead I made the bare minimum to ensure that modified fields which are accessed here are always protected with proc lock and sess lock, which eliminates the need for proctree lock in problematic cases. In effect there are no games with relocking vnodes. I would commit this patch separately. Note this establishes a process lock -> vnode interlock order which seems fishy, but apparently does not result in lors. diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index fe8e9ef..0a2a6bb 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -586,12 +586,12 @@ devfs_close(struct vop_close_args *ap) if (td != NULL) { p = td->td_proc; PROC_LOCK(p); - if (vp == p->p_session->s_ttyvp) { + if (vp != p->p_session->s_ttyvp) { PROC_UNLOCK(p); + } else { oldvp = NULL; - sx_xlock(&proctree_lock); + SESS_LOCK(p->p_session); if (vp == p->p_session->s_ttyvp) { - SESS_LOCK(p->p_session); VI_LOCK(vp); if (count_dev(dev) == 2 && (vp->v_iflag & VI_DOOMED) == 0) { @@ -600,13 +600,12 @@ devfs_close(struct vop_close_args *ap) oldvp = vp; } VI_UNLOCK(vp); - SESS_UNLOCK(p->p_session); } - sx_xunlock(&proctree_lock); + SESS_UNLOCK(p->p_session); + PROC_UNLOCK(p); if (oldvp != NULL) vrele(oldvp); - } else - PROC_UNLOCK(p); + } } /* * We do not want to really close the device if it diff --git a/sys/kern/tty.c b/sys/kern/tty.c index d9d0cce..5ef5578 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1637,8 +1637,13 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, return (EPERM); } + PROC_LOCK(p); + SESS_LOCK(p->p_session); + if (tp->t_session != NULL && tp->t_session == p->p_session) { /* This is already our controlling TTY. */ + SESS_UNLOCK(p->p_session); + PROC_UNLOCK(p); sx_xunlock(&proctree_lock); return (0); } @@ -1657,6 +1662,8 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, * TTYs of which the session leader has been * killed or the TTY revoked. */ + SESS_UNLOCK(p->p_session); + PROC_UNLOCK(p); sx_xunlock(&proctree_lock); return (EPERM); } @@ -1665,14 +1672,13 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, tp->t_session = p->p_session; tp->t_session->s_ttyp = tp; tp->t_sessioncnt++; - sx_xunlock(&proctree_lock); /* Assign foreground process group. */ tp->t_pgrp = p->p_pgrp; - PROC_LOCK(p); p->p_flag |= P_CONTROLT; + SESS_UNLOCK(p->p_session); PROC_UNLOCK(p); - + sx_xunlock(&proctree_lock); return (0); } case TIOCSPGRP: { diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c index 582b41a..dca619c 100644 --- a/sys/kern/tty_tty.c +++ b/sys/kern/tty_tty.c @@ -65,9 +65,8 @@ ctty_clone(void *arg, struct ucred *cred, char *name, int namelen, if (strcmp(name, "tty")) return; p = curproc; - sx_sunlock(&clone_drain_lock); - sx_slock(&proctree_lock); - sx_slock(&clone_drain_lock); + PROC_LOCK(p); + SESS_LOCK(p->p_session); dev_lock(); if (!(p->p_flag & P_CONTROLT)) *dev = ctty; @@ -81,7 +80,8 @@ ctty_clone(void *arg, struct ucred *cred, char *name, int namelen, *dev = p->p_session->s_ttyvp->v_rdev; dev_refl(*dev); dev_unlock(); - sx_sunlock(&proctree_lock); + SESS_UNLOCK(p->p_session); + PROC_UNLOCK(p); } static void > > diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c > > index 85cda01..bbdcbf5 100644 > > --- a/sys/kern/kern_descrip.c > > +++ b/sys/kern/kern_descrip.c > > @@ -3271,6 +3271,7 @@ kern_proc_filedesc_out(struct proc *p, struct sbuf *sb, ssize_t maxlen) > > FILEDESC_SUNLOCK(fdp); > > fddrop(fdp); > > fail: > > + sx_sunlock(&p->p_imagelock); > IMO it would be less confusing to unlock the p_imagelock at the caller' > location. At the kern_proc_filedesc_out(), the p_imagelock slocked state > must be asserted. > Moved. > Same for ofiledesc(). > This is the top level func which also has the relevant pget call. > > diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c > > index 9ce6d34..27fd764 100644 > > --- a/sys/kern/kern_exit.c > > +++ b/sys/kern/kern_exit.c > > @@ -213,6 +213,7 @@ exit1(struct thread *td, int rv) > > /* > > * MUST abort all other threads before proceeding past here. > > */ > > + sx_xlock(&p->p_imagelock); > > PROC_LOCK(p); > > /* > > * First check if some other thread or external request got > > @@ -279,6 +280,7 @@ exit1(struct thread *td, int rv) > > * decided to wait again after we told them we are exiting. > > */ > > p->p_flag |= P_WEXIT; > > + sx_xunlock(&p->p_imagelock); > I do not understand why p_imagelock is released so early in the exit1(). > Since the process catched with p_imagelock must not be exiting, a lock/unlock sequence paired with setting P_WEXIT gives us a guarantee that nothing will start inspeting it. Past P_WEXIT there are next to no guarantees for stability of most fields of the proc anyway, and soon after proctree lock is taken and we have to drop imagelock by that time to avoid a lor. > > wakeup(&p->p_stype); > > > > /* > > diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c > > index 27c6f40..ac6b441 100644 > > --- a/sys/kern/kern_proc.c > > +++ b/sys/kern/kern_proc.c > > @@ -230,6 +230,7 @@ proc_init(void *mem, int size, int flags) > > mtx_init(&p->p_statmtx, "pstatl", NULL, MTX_SPIN | MTX_NEW); > > mtx_init(&p->p_itimmtx, "pitiml", NULL, MTX_SPIN | MTX_NEW); > > mtx_init(&p->p_profmtx, "pprofl", NULL, MTX_SPIN | MTX_NEW); > > + sx_init_flags(&p->p_imagelock, "process imagelock", SX_NEW); > > cv_init(&p->p_pwait, "ppwait"); > > cv_init(&p->p_dbgwait, "dbgwait"); > > TAILQ_INIT(&p->p_threads); /* all threads in proc */ > > @@ -278,16 +279,20 @@ inferior(struct proc *p) > > } > > > > struct proc * > > -pfind_locked(pid_t pid) > > +pfind_locked(pid_t pid, int lockimage) > > { > > struct proc *p; > > > > sx_assert(&allproc_lock, SX_LOCKED); > > LIST_FOREACH(p, PIDHASH(pid), p_hash) { > > if (p->p_pid == pid) { > > + if (lockimage) > > + sx_slock(&p->p_imagelock); > Probably makes sense to explicitely add imagelock name into the > witness' order_lists[] array. > Added after allprison. As a cosmetic matter I'm pondering a pair like pimage_lock/unlock or similar to wrap relevant pget and unlock of p_imagelock. Note that in this patch I moved exit's imagelock to after singlethreading is in effect. diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c index d3bac30..118a7d9 100644 --- a/sys/fs/nfsclient/nfs_clport.c +++ b/sys/fs/nfsclient/nfs_clport.c @@ -1188,7 +1188,7 @@ nfscl_procdoesntexist(u_int8_t *own) tl.cval[2] = *own++; tl.cval[3] = *own++; pid = tl.lval; - p = pfind_locked(pid); + p = pfind_locked(pid, 0); if (p == NULL) return (1); if (p->p_stats == NULL) { diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 0675128..2ad09aa 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1887,6 +1887,7 @@ note_procstat_files(void *arg, struct sbuf *sb, size_t *sizep) sb = sbuf_new(NULL, NULL, 128, SBUF_FIXEDLEN); sbuf_set_drain(sb, sbuf_drain_count, &size); sbuf_bcat(sb, &structsize, sizeof(structsize)); + sx_slock(&p->p_imagelock); PROC_LOCK(p); kern_proc_filedesc_out(p, sb, -1); sbuf_finish(sb); @@ -1895,6 +1896,7 @@ note_procstat_files(void *arg, struct sbuf *sb, size_t *sizep) } else { structsize = sizeof(struct kinfo_file); sbuf_bcat(sb, &structsize, sizeof(structsize)); + sx_slock(&p->p_imagelock); PROC_LOCK(p); kern_proc_filedesc_out(p, sb, -1); } diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 37539c4..9364dcb 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -480,6 +480,7 @@ proc0_init(void *dummy __unused) p->p_flag2 = 0; p->p_state = PRS_NORMAL; knlist_init_mtx(&p->p_klist, &p->p_mtx); + sx_init_flags(&p->p_imagelock, "process imagelock", SX_NEW); STAILQ_INIT(&p->p_ktr); p->p_nice = NZERO; /* pid_max cannot be greater than PID_MAX */ diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 85cda01..f0f4665 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -3292,13 +3292,14 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER_ARGS) sbuf_new_for_sysctl(&sb, NULL, FILEDESC_SBUF_SIZE, req); sbuf_clear_flags(&sb, SBUF_INCLUDENUL); - error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p); + error = pget((pid_t)name[0], PGET_LOCK, &p); if (error != 0) { sbuf_delete(&sb); return (error); } maxlen = req->oldptr != NULL ? req->oldlen : -1; error = kern_proc_filedesc_out(p, &sb, maxlen); + sx_sunlock(&p->p_imagelock); error2 = sbuf_finish(&sb); sbuf_delete(&sb); return (error != 0 ? error : error2); @@ -3359,7 +3360,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) struct proc *p; name = (int *)arg1; - error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p); + error = pget((pid_t)name[0], PGET_LOCK, &p); if (error != 0) return (error); fdp = fdhold(p); @@ -3391,6 +3392,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) } FILEDESC_SUNLOCK(fdp); fddrop(fdp); + sx_sunlock(&p->p_imagelock); free(kif, M_TEMP); free(okif, M_TEMP); return (0); diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 859b2e3..0d9aac1 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -381,6 +381,7 @@ do_execve(td, args, mac_p) * that might allow a local user to illicitly obtain elevated * privileges. */ + sx_xlock(&p->p_imagelock); PROC_LOCK(p); KASSERT((p->p_flag & P_INEXEC) == 0, ("%s(): process already has P_INEXEC flag", __func__)); @@ -907,6 +908,7 @@ exec_fail: SDT_PROBE(proc, kernel, , exec__failure, error, 0, 0, 0, 0); done2: + sx_xunlock(&p->p_imagelock); #ifdef MAC mac_execve_exit(imgp); mac_execve_interpreter_exit(interpvplabel); diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 9ce6d34..127629d 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -290,6 +290,15 @@ exit1(struct thread *td, int rv) p->p_xstat = rv; /* Let event handler change exit status */ PROC_UNLOCK(p); + + /* + * The lock/unlock pair gives us a guarantee nobody pins the process + * with p_imagelock. While the process is still reachable, consumers + * are supposed to check for P_WEXIT flag set earlier. + */ + sx_xlock(&p->p_imagelock); + sx_xunlock(&p->p_imagelock); + /* Drain the limit callout while we don't have the proc locked */ callout_drain(&p->p_limco); diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 27c6f40..ac6b441 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -230,6 +230,7 @@ proc_init(void *mem, int size, int flags) mtx_init(&p->p_statmtx, "pstatl", NULL, MTX_SPIN | MTX_NEW); mtx_init(&p->p_itimmtx, "pitiml", NULL, MTX_SPIN | MTX_NEW); mtx_init(&p->p_profmtx, "pprofl", NULL, MTX_SPIN | MTX_NEW); + sx_init_flags(&p->p_imagelock, "process imagelock", SX_NEW); cv_init(&p->p_pwait, "ppwait"); cv_init(&p->p_dbgwait, "dbgwait"); TAILQ_INIT(&p->p_threads); /* all threads in proc */ @@ -278,16 +279,20 @@ inferior(struct proc *p) } struct proc * -pfind_locked(pid_t pid) +pfind_locked(pid_t pid, int lockimage) { struct proc *p; sx_assert(&allproc_lock, SX_LOCKED); LIST_FOREACH(p, PIDHASH(pid), p_hash) { if (p->p_pid == pid) { + if (lockimage) + sx_slock(&p->p_imagelock); PROC_LOCK(p); if (p->p_state == PRS_NEW) { PROC_UNLOCK(p); + if (lockimage) + sx_sunlock(&p->p_imagelock); p = NULL; } break; @@ -308,7 +313,7 @@ pfind(pid_t pid) struct proc *p; sx_slock(&allproc_lock); - p = pfind_locked(pid); + p = pfind_locked(pid, 0); sx_sunlock(&allproc_lock); return (p); } @@ -364,11 +369,17 @@ int pget(pid_t pid, int flags, struct proc **pp) { struct proc *p; - int error; + int error, lockimage; + + lockimage = ((flags & PGET_IMAGELOCK) != 0); + if (lockimage) { + MPASS((flags & PGET_NOTWEXIT) != 0); + MPASS((flags & PGET_HOLD) == 0); + } sx_slock(&allproc_lock); if (pid <= PID_MAX) { - p = pfind_locked(pid); + p = pfind_locked(pid, lockimage); if (p == NULL && (flags & PGET_NOTWEXIT) == 0) p = zpfind_locked(pid); } else if ((flags & PGET_NOTID) == 0) { @@ -413,6 +424,8 @@ pget(pid_t pid, int flags, struct proc **pp) return (0); errout: PROC_UNLOCK(p); + if (lockimage) + sx_sunlock(&p->p_imagelock); return (error); } diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 1280807..a423c80 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -475,6 +475,7 @@ static struct witness_order_list_entry order_lists[] = { { "proctree", &lock_class_sx }, { "allproc", &lock_class_sx }, { "allprison", &lock_class_sx }, + { "process imagelock", &lock_class_sx }, { NULL, NULL }, /* * Various mutexes diff --git a/sys/sys/proc.h b/sys/sys/proc.h index e6c83b4..5df817a 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -522,6 +522,7 @@ struct proc { (if I am reaper). */ LIST_ENTRY(proc) p_reapsibling; /* (e) List of siblings - descendants of the same reaper. */ + struct sx p_imagelock; /* Lock blocking exec/exit. */ struct mtx p_mtx; /* (n) Lock for this struct. */ struct mtx p_statmtx; /* Lock for the stats */ struct mtx p_itimmtx; /* Lock for the virt/prof timers */ @@ -886,7 +887,7 @@ extern struct proc *initproc, *pageproc; /* Process slots for init, pager. */ extern struct uma_zone *proc_zone; struct proc *pfind(pid_t); /* Find process by id. */ -struct proc *pfind_locked(pid_t pid); +struct proc *pfind_locked(pid_t pid, int lockimage); struct pgrp *pgfind(pid_t); /* Find process group by id. */ struct proc *zpfind(pid_t); /* Find zombie process by id. */ @@ -900,8 +901,10 @@ struct proc *zpfind(pid_t); /* Find zombie process by id. */ #define PGET_NOTWEXIT 0x00010 /* Check that the process is not in P_WEXIT. */ #define PGET_NOTINEXEC 0x00020 /* Check that the process is not in P_INEXEC. */ #define PGET_NOTID 0x00040 /* Do not assume tid if pid > PID_MAX. */ +#define PGET_IMAGELOCK 0x00080 /* Prevent execs and exits. */ #define PGET_WANTREAD (PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT) +#define PGET_LOCK (PGET_CANDEBUG | PGET_NOTWEXIT | PGET_IMAGELOCK) int pget(pid_t pid, int flags, struct proc **pp); -- Mateusz Guzik From owner-svn-src-all@freebsd.org Mon Jul 6 22:51:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A24DD995CFA for ; Mon, 6 Jul 2015 22:51:26 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto2.onthenet.com.au [203.13.68.14]) by mx1.freebsd.org (Postfix) with ESMTP id 55AA610A3 for ; Mon, 6 Jul 2015 22:51:26 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [203.13.68.150]) by alto.onthenet.com.au (Postfix) with ESMTP id 6544D1262C for ; Tue, 7 Jul 2015 08:51:24 +1000 (EST) Received: from localhost (iredmail.onthenet.com.au [127.0.0.1]) by iredmail.onthenet.com.au (Postfix) with ESMTP id 60260280A97 for ; Tue, 7 Jul 2015 08:51:24 +1000 (AEST) X-Amavis-Modified: Mail body modified (using disclaimer) - iredmail.onthenet.com.au Received: from iredmail.onthenet.com.au ([127.0.0.1]) by localhost (iredmail.onthenet.com.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WAANDFpohv0w for ; Tue, 7 Jul 2015 08:51:24 +1000 (AEST) Received: from Peters-MacBook-Pro.local (unknown [64.245.0.210]) by iredmail.onthenet.com.au (Postfix) with ESMTPSA id 8B18D280A37; Tue, 7 Jul 2015 08:51:15 +1000 (AEST) Message-ID: <559B0661.1090503@freebsd.org> Date: Mon, 06 Jul 2015 15:51:13 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: John-Mark Gurney , Ian Lepore CC: Neel Natu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285217 - head/usr.sbin/bhyve References: <201507061933.t66JXTtJ050058@repo.freebsd.org> <1436213492.1334.64.camel@freebsd.org> <20150706215220.GP8523@funkthat.com> In-Reply-To: <20150706215220.GP8523@funkthat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 22:51:26 -0000 > Ok, so I just tested on real hardware, and something is wrong w/ > FreeBSD's behavior... Could this be a change between 10 and HEAD? uart_tty.c r264175 wasn't MFC'd - see UPDATING, 20140405 for the details. later, Peter. From owner-svn-src-all@freebsd.org Mon Jul 6 22:55:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2AC7995D8B; Mon, 6 Jul 2015 22:55:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 D34C91485; Mon, 6 Jul 2015 22:55:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66Mts51051377; Mon, 6 Jul 2015 22:55:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66MtsjB051371; Mon, 6 Jul 2015 22:55:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201507062255.t66MtsjB051371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 6 Jul 2015 22:55:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r285223 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 22:55:55 -0000 Author: markj Date: Mon Jul 6 22:55:53 2015 New Revision: 285223 URL: https://svnweb.freebsd.org/changeset/base/285223 Log: Welcome Conrad Meyer (cem) as a new src committer. Conrad will at least initially be working on upstreaming Isilon's FreeBSD modifications and general bug-fixing. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Mon Jul 6 22:21:46 2015 (r285222) +++ svnadmin/conf/access Mon Jul 6 22:55:53 2015 (r285223) @@ -47,6 +47,7 @@ brueffer bryanv bschmidt bz +cem charnier cherry cognet Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Mon Jul 6 22:21:46 2015 (r285222) +++ svnadmin/conf/mentors Mon Jul 6 22:55:53 2015 (r285223) @@ -14,6 +14,7 @@ achim scottl Co-mentor: emaste agc scottl Co-mentor: emax benl philip Co-mentor: simon carl jimharris +cem markj cherry gibbs eri gnn Co-mentor: thompsa erj gnn Co-mentor: jfv From owner-svn-src-all@freebsd.org Mon Jul 6 23:00:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D612995E6D; Mon, 6 Jul 2015 23:00:22 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E0A316A6; Mon, 6 Jul 2015 23:00:21 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t66N0LVI097373 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 6 Jul 2015 16:00:21 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t66N0La3097372; Mon, 6 Jul 2015 16:00:21 -0700 (PDT) (envelope-from jmg) Date: Mon, 6 Jul 2015 16:00:21 -0700 From: John-Mark Gurney To: Peter Grehan Cc: Ian Lepore , Neel Natu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285217 - head/usr.sbin/bhyve Message-ID: <20150706230021.GQ8523@funkthat.com> References: <201507061933.t66JXTtJ050058@repo.freebsd.org> <1436213492.1334.64.camel@freebsd.org> <20150706215220.GP8523@funkthat.com> <559B0661.1090503@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <559B0661.1090503@freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Mon, 06 Jul 2015 16:00:21 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 23:00:22 -0000 Peter Grehan wrote this message on Mon, Jul 06, 2015 at 15:51 -0700: > > Ok, so I just tested on real hardware, and something is wrong w/ > > FreeBSD's behavior... Could this be a change between 10 and HEAD? > > uart_tty.c r264175 wasn't MFC'd - see UPDATING, 20140405 for the details. Ok, then we definately need to fix getty the lock clocal on 3wire... Though there is a question is why DCD isn't assert by bhyve when there is a session attached to the console... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@freebsd.org Tue Jul 7 01:38:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51512A575 for ; Tue, 7 Jul 2015 01:38:29 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto2.onthenet.com.au [203.13.68.14]) by mx1.freebsd.org (Postfix) with ESMTP id 0F5591622 for ; Tue, 7 Jul 2015 01:38:28 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [203.13.68.150]) by alto.onthenet.com.au (Postfix) with ESMTP id 3839A12642 for ; Tue, 7 Jul 2015 11:38:26 +1000 (EST) Received: from localhost (iredmail.onthenet.com.au [127.0.0.1]) by iredmail.onthenet.com.au (Postfix) with ESMTP id 32049280F8B for ; Tue, 7 Jul 2015 11:38:26 +1000 (AEST) X-Amavis-Modified: Mail body modified (using disclaimer) - iredmail.onthenet.com.au Received: from iredmail.onthenet.com.au ([127.0.0.1]) by localhost (iredmail.onthenet.com.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fz5f0VCCvK73 for ; Tue, 7 Jul 2015 11:38:25 +1000 (AEST) Received: from Peters-MacBook-Pro.local (unknown [64.245.0.210]) by iredmail.onthenet.com.au (Postfix) with ESMTPSA id 31281280F5B; Tue, 7 Jul 2015 11:38:17 +1000 (AEST) Message-ID: <559B2D87.4030102@freebsd.org> Date: Mon, 06 Jul 2015 18:38:15 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: John-Mark Gurney CC: Ian Lepore , Neel Natu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285217 - head/usr.sbin/bhyve References: <201507061933.t66JXTtJ050058@repo.freebsd.org> <1436213492.1334.64.camel@freebsd.org> <20150706215220.GP8523@funkthat.com> <559B0661.1090503@freebsd.org> <20150706230021.GQ8523@funkthat.com> In-Reply-To: <20150706230021.GQ8523@funkthat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 01:38:29 -0000 > Though there is a question is why DCD isn't assert by bhyve when > there is a session attached to the console... Modem signal policy wasn't implemented. The workaround now is that DCD is permanently asserted, but at some point when a proper terminal backend is in place, the signal policy would be pushed out to there. later, Peter. From owner-svn-src-all@freebsd.org Tue Jul 7 02:17:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA3CCAEF0; Tue, 7 Jul 2015 02:17:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 B9A981943; Tue, 7 Jul 2015 02:17:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t672HP8N051072; Tue, 7 Jul 2015 02:17:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t672HPPu051070; Tue, 7 Jul 2015 02:17:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201507070217.t672HPPu051070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 7 Jul 2015 02:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285224 - stable/10/usr.bin/ar X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 02:17:26 -0000 Author: emaste Date: Tue Jul 7 02:17:24 2015 New Revision: 285224 URL: https://svnweb.freebsd.org/changeset/base/285224 Log: MFC r284928: speed up ar(1) on UFS file systems Fault in the buffer prior to writing to workaround poor performance due to interaction with kernel fs deadlock avoidance code. See the comment prior to vn_io_fault_doio() in sys/kern/vfs_vnops.c for details of the issue. On my stable/10 desktop with a 16MB obj.o and "ar r out.a obj.o" I see the following run times (seconds): x ar.r284891 + ar.patched +----------------------------------------------------------------------+ |+ | |+ x| |+ xx| |A |A| +----------------------------------------------------------------------+ N Min Max Median Avg Stddev x 3 1.307 1.321 1.315 1.3143333 0.0070237692 + 3 0.020 0.023 0.022 0.021666667 0.0015275252 Difference at 95.0% confidence -1.29267 +/- 0.0115203 -98.3515% +/- 0.876513% (Student's t, pooled s = 0.00508265) Thanks to kib for diagnosing and explaining the issue and suggesting the workaround. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/ar/write.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ar/write.c ============================================================================== --- stable/10/usr.bin/ar/write.c Mon Jul 6 22:55:53 2015 (r285223) +++ stable/10/usr.bin/ar/write.c Tue Jul 7 02:17:24 2015 (r285224) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "ar.h" @@ -61,6 +62,7 @@ static void create_symtab_entry(struct b static void free_obj(struct bsdar *bsdar, struct ar_obj *obj); static void insert_obj(struct bsdar *bsdar, struct ar_obj *obj, struct ar_obj *pos); +static void prefault_buffer(const char *buf, size_t s); static void read_objs(struct bsdar *bsdar, const char *archive, int checkargv); static void write_archive(struct bsdar *bsdar, char mode); @@ -551,11 +553,35 @@ write_cleanup(struct bsdar *bsdar) } /* + * Fault in the buffer prior to writing as a workaround for poor performance + * due to interaction with kernel fs deadlock avoidance code. See the comment + * above vn_io_fault_doio() in sys/kern/vfs_vnops.c for details of the issue. + */ +static void +prefault_buffer(const char *buf, size_t s) +{ + volatile const char *p; + size_t page_size; + + if (s == 0) + return; + page_size = sysconf(_SC_PAGESIZE); + for (p = buf; p < buf + s; p += page_size) + *p; + /* + * Ensure we touch the last page as well, in case the buffer is not + * page-aligned. + */ + *(volatile const char *)(buf + s - 1); +} + +/* * Wrapper for archive_write_data(). */ static void write_data(struct bsdar *bsdar, struct archive *a, const void *buf, size_t s) { + prefault_buffer(buf, s); if (archive_write_data(a, buf, s) != (ssize_t)s) bsdar_errc(bsdar, EX_SOFTWARE, 0, "%s", archive_error_string(a)); From owner-svn-src-all@freebsd.org Tue Jul 7 02:30:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 372DF688B9; Tue, 7 Jul 2015 02:30:36 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 1DEAC1D86; Tue, 7 Jul 2015 02:30:36 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t672UZFx056924; Tue, 7 Jul 2015 02:30:35 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t672UZtm056922; Tue, 7 Jul 2015 02:30:35 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507070230.t672UZtm056922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Tue, 7 Jul 2015 02:30:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285225 - head/usr.sbin/sendmail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 02:30:36 -0000 Author: gshapiro Date: Tue Jul 7 02:30:35 2015 New Revision: 285225 URL: https://svnweb.freebsd.org/changeset/base/285225 Log: Temporarily disable WARNS while addressing a non-issue with the upstream code Modified: head/usr.sbin/sendmail/Makefile Modified: head/usr.sbin/sendmail/Makefile ============================================================================== --- head/usr.sbin/sendmail/Makefile Tue Jul 7 02:17:24 2015 (r285224) +++ head/usr.sbin/sendmail/Makefile Tue Jul 7 02:30:35 2015 (r285225) @@ -43,7 +43,7 @@ CFLAGS+= ${DBMDEF} ${NIS} -DTCPWRAPPERS CFLAGS+= -DNETINET6 .endif -WARNS?= 1 +WARNS?= 0 LIBADD= util wrap sm smutil From owner-svn-src-all@freebsd.org Tue Jul 7 02:35:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57B156E729; Tue, 7 Jul 2015 02:35:07 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 478D910AB; Tue, 7 Jul 2015 02:35:07 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t672Z7rm060655; Tue, 7 Jul 2015 02:35:07 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t672Z7KH060654; Tue, 7 Jul 2015 02:35:07 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507070235.t672Z7KH060654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Tue, 7 Jul 2015 02:35:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285226 - head/lib/libsm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 02:35:07 -0000 Author: gshapiro Date: Tue Jul 7 02:35:06 2015 New Revision: 285226 URL: https://svnweb.freebsd.org/changeset/base/285226 Log: libsm/path.c is about to disappear in the merge of sendmail 8.15.2. It is an empty file now so it is safe to remove before the merge. MFC after: 3 days Modified: head/lib/libsm/Makefile Modified: head/lib/libsm/Makefile ============================================================================== --- head/lib/libsm/Makefile Tue Jul 7 02:30:35 2015 (r285225) +++ head/lib/libsm/Makefile Tue Jul 7 02:35:06 2015 (r285226) @@ -29,7 +29,7 @@ SRCS+= assert.c debug.c errstring.c exc. smstdio.c snprintf.c sscanf.c stdio.c strio.c ungetc.c \ vasprintf.c vfprintf.c vfscanf.c vprintf.c vsnprintf.c \ wbuf.c wsetup.c string.c stringf.c \ - xtrap.c strto.c test.c path.c strcasecmp.c strrevcmp.c \ + xtrap.c strto.c test.c strcasecmp.c strrevcmp.c \ signal.c clock.c config.c sem.c shm.c mbdb.c strexit.c cf.c ldap.c \ niprop.c mpeix.c memstat.c util.c inet6_ntop.c CLEANFILES+=sm_os.h From owner-svn-src-all@freebsd.org Tue Jul 7 02:37:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23BD1729B0; Tue, 7 Jul 2015 02:37:30 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 0BB1E1202; Tue, 7 Jul 2015 02:37:30 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t672bTUc061001; Tue, 7 Jul 2015 02:37:29 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t672bToa061000; Tue, 7 Jul 2015 02:37:29 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201507070237.t672bToa061000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 7 Jul 2015 02:37:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285227 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 02:37:30 -0000 Author: jhibbits Date: Tue Jul 7 02:37:29 2015 New Revision: 285227 URL: https://svnweb.freebsd.org/changeset/base/285227 Log: style(9) cleanups. Don't use PRIxPTR, these registers are 32-bits, cast to u_long instead. Pointed out by: bde Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Tue Jul 7 02:35:06 2015 (r285226) +++ head/sys/powerpc/powerpc/trap.c Tue Jul 7 02:37:29 2015 (r285227) @@ -426,11 +426,10 @@ printtrap(u_int vector, struct trapframe ver = mfpvr() >> 16; #if defined(AIM) if (MPC745X_P(ver)) - printf(" msssr0 = 0x%" PRIxPTR "\n", - mfspr(SPR_MSSSR0)); + printf(" msssr0 = 0x%lx\n", + (u_long)mfspr(SPR_MSSSR0)); #elif defined(BOOKE) - printf(" mcsr = 0x%" PRIxPTR "\n", - mfspr(SPR_MCSR)); + printf(" mcsr = 0x%lx\n", (u_long)mfspr(SPR_MCSR)); #endif break; } From owner-svn-src-all@freebsd.org Tue Jul 7 02:42:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40B3A9930D1; Tue, 7 Jul 2015 02:42:49 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 30CDE18AE; Tue, 7 Jul 2015 02:42:49 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t672gnwn065227; Tue, 7 Jul 2015 02:42:49 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t672gnj6065226; Tue, 7 Jul 2015 02:42:49 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201507070242.t672gnj6065226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 7 Jul 2015 02:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285228 - head/sys/dev/wi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 02:42:49 -0000 Author: jhibbits Date: Tue Jul 7 02:42:48 2015 New Revision: 285228 URL: https://svnweb.freebsd.org/changeset/base/285228 Log: Enable the wireless on attach. This comes from the archives of "forgotten in the original commit, and probably pointless now because nobody uses it, and the driver's broken anyway." Modified: head/sys/dev/wi/if_wi_macio.c Modified: head/sys/dev/wi/if_wi_macio.c ============================================================================== --- head/sys/dev/wi/if_wi_macio.c Tue Jul 7 02:37:29 2015 (r285227) +++ head/sys/dev/wi/if_wi_macio.c Tue Jul 7 02:42:48 2015 (r285228) @@ -73,6 +73,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + static int wi_macio_probe(device_t); static int wi_macio_attach(device_t); @@ -129,6 +131,7 @@ wi_macio_attach(device_t dev) error = wi_alloc(dev, 0); if (error == 0) { + macio_enable_wireless(device_get_parent(dev), 1); /* Make sure interrupts are disabled. */ CSR_WRITE_2(sc, WI_INT_EN, 0); CSR_WRITE_2(sc, WI_EVENT_ACK, 0xFFFF); From owner-svn-src-all@freebsd.org Tue Jul 7 02:59:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 427D2993310; Tue, 7 Jul 2015 02:59:07 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 2F6A41E3D; Tue, 7 Jul 2015 02:59:07 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t672x7Ff071340; Tue, 7 Jul 2015 02:59:07 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t672x3W5071321; Tue, 7 Jul 2015 02:59:03 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507070259.t672x3W5071321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Tue, 7 Jul 2015 02:59:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285229 - in head/contrib/sendmail: . cf cf/cf cf/feature cf/hack cf/m4 contrib doc/op editmap include/sendmail include/sm libmilter libmilter/docs libsm libsmdb makemap src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 02:59:07 -0000 Author: gshapiro Date: Tue Jul 7 02:59:02 2015 New Revision: 285229 URL: https://svnweb.freebsd.org/changeset/base/285229 Log: Merge sendmail 8.15.2 to HEAD MFC after: 3 days Added: - copied unchanged from r275719, vendor/sendmail/dist/cf/feature/bcc.m4 - copied unchanged from r275719, vendor/sendmail/dist/cf/feature/nopercenthack.m4 - copied unchanged from r275719, vendor/sendmail/dist/cf/feature/prefixmod.m4 - copied unchanged from r285193, vendor/sendmail/dist/cf/feature/tls_session_features.m4 - copied unchanged from r275719, vendor/sendmail/dist/cf/hack/xconnect.m4 - copied unchanged from r275719, vendor/sendmail/dist/contrib/AuthRealm.p0 Directory Properties: head/contrib/sendmail/cf/feature/bcc.m4 (props changed) head/contrib/sendmail/cf/feature/nopercenthack.m4 (props changed) head/contrib/sendmail/cf/feature/prefixmod.m4 (props changed) head/contrib/sendmail/cf/feature/tls_session_features.m4 (props changed) head/contrib/sendmail/cf/hack/xconnect.m4 (props changed) head/contrib/sendmail/contrib/AuthRealm.p0 (props changed) Deleted: head/contrib/sendmail/libsm/path.c Modified: head/contrib/sendmail/CACerts head/contrib/sendmail/FAQ head/contrib/sendmail/INSTALL head/contrib/sendmail/KNOWNBUGS head/contrib/sendmail/PGPKEYS head/contrib/sendmail/README head/contrib/sendmail/RELEASE_NOTES head/contrib/sendmail/cf/README head/contrib/sendmail/cf/cf/Makefile head/contrib/sendmail/cf/cf/submit.cf head/contrib/sendmail/cf/cf/submit.mc head/contrib/sendmail/cf/feature/block_bad_helo.m4 head/contrib/sendmail/cf/feature/ldap_routing.m4 head/contrib/sendmail/cf/m4/cfhead.m4 head/contrib/sendmail/cf/m4/proto.m4 head/contrib/sendmail/cf/m4/version.m4 head/contrib/sendmail/doc/op/op.me head/contrib/sendmail/editmap/editmap.c head/contrib/sendmail/include/sendmail/sendmail.h head/contrib/sendmail/include/sm/bdb.h head/contrib/sendmail/include/sm/cdefs.h head/contrib/sendmail/include/sm/conf.h head/contrib/sendmail/include/sm/errstring.h head/contrib/sendmail/include/sm/fdset.h head/contrib/sendmail/libmilter/docs/smfi_setsymlist.html head/contrib/sendmail/libmilter/engine.c head/contrib/sendmail/libmilter/handler.c head/contrib/sendmail/libmilter/listener.c head/contrib/sendmail/libmilter/signal.c head/contrib/sendmail/libmilter/smfi.c head/contrib/sendmail/libmilter/worker.c head/contrib/sendmail/libsm/Makefile.m4 head/contrib/sendmail/libsm/errstring.c head/contrib/sendmail/libsm/local.h head/contrib/sendmail/libsm/mbdb.c head/contrib/sendmail/libsm/refill.c head/contrib/sendmail/libsm/stdio.c head/contrib/sendmail/libsm/vfprintf.c head/contrib/sendmail/libsmdb/smdb.c head/contrib/sendmail/makemap/makemap.c head/contrib/sendmail/src/README head/contrib/sendmail/src/TRACEFLAGS head/contrib/sendmail/src/TUNING head/contrib/sendmail/src/bf.c head/contrib/sendmail/src/collect.c head/contrib/sendmail/src/conf.c head/contrib/sendmail/src/daemon.c head/contrib/sendmail/src/deliver.c head/contrib/sendmail/src/envelope.c head/contrib/sendmail/src/err.c head/contrib/sendmail/src/headers.c head/contrib/sendmail/src/main.c head/contrib/sendmail/src/map.c head/contrib/sendmail/src/mci.c head/contrib/sendmail/src/milter.c head/contrib/sendmail/src/parseaddr.c head/contrib/sendmail/src/queue.c head/contrib/sendmail/src/readcf.c head/contrib/sendmail/src/recipient.c head/contrib/sendmail/src/savemail.c head/contrib/sendmail/src/sendmail.8 head/contrib/sendmail/src/sendmail.h head/contrib/sendmail/src/sfsasl.c head/contrib/sendmail/src/sm_resolve.c head/contrib/sendmail/src/srvrsmtp.c head/contrib/sendmail/src/tls.c head/contrib/sendmail/src/usersmtp.c head/contrib/sendmail/src/util.c head/contrib/sendmail/src/version.c Directory Properties: head/contrib/sendmail/ (props changed) Modified: head/contrib/sendmail/CACerts ============================================================================== --- head/contrib/sendmail/CACerts Tue Jul 7 02:42:48 2015 (r285228) +++ head/contrib/sendmail/CACerts Tue Jul 7 02:59:02 2015 (r285229) @@ -10,6 +10,102 @@ Certificate: Data: Version: 3 (0x2) Serial Number: + 92:91:67:de:e0:ef:2c:e4 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + Validity + Not Before: Mar 2 19:15:29 2015 GMT + Not After : Mar 1 19:15:29 2018 GMT + Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b9:1a:a1:56:ce:cb:16:af:4f:96:ba:2a:70:31: + 70:d3:86:6c:7a:46:26:47:42:3f:de:49:57:3e:08: + 1e:10:25:bf:06:8f:ca:fd:f4:5e:6a:01:7d:31:4d: + 50:88:18:43:71:66:65:42:9c:90:97:0d:95:f2:14: + ef:d7:5e:77:ef:7d:b5:49:3f:02:bb:83:20:f7:e6: + fc:9a:cd:13:df:60:41:28:8e:39:07:a6:a4:40:98: + 15:1e:46:b6:04:2e:f9:ab:32:d1:8b:fe:52:81:f1: + d2:e1:c3:cf:bf:ab:40:a7:f0:e4:e5:a2:82:37:30: + 8c:10:7d:aa:a8:7c:7e:76:cc:5f:1a:24:d0:8c:94: + f6:f2:7f:4a:be:2f:38:67:c0:06:e6:9e:51:ad:55: + d0:cb:26:71:cf:f4:af:7d:5a:41:81:16:fb:26:ec: + f0:35:01:6e:db:f9:e9:00:d7:d0:89:7b:cf:88:16: + 8b:1c:8f:77:1f:5d:ef:70:04:28:76:c5:1b:c6:23: + 8d:49:6b:f0:b8:21:56:d6:7d:68:6c:be:21:e3:e6: + e3:1d:6f:a5:ea:dc:83:e4:27:b3:6f:5f:1b:3d:33: + a1:d5:d3:f0:73:1a:12:eb:d9:95:00:71:59:16:b4: + e4:60:38:b2:2e:7f:b7:d4:c5:e9:3f:74:e4:48:38: + 29:89 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + B1:69:DB:5E:9B:CE:1A:B4:1D:B2:6A:FC:5A:22:97:B6:24:14:6F:32 + X509v3 Authority Key Identifier: + keyid:B1:69:DB:5E:9B:CE:1A:B4:1D:B2:6A:FC:5A:22:97:B6:24:14:6F:32 + DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + serial:92:91:67:DE:E0:EF:2C:E4 + + X509v3 Basic Constraints: + CA:TRUE + X509v3 Subject Alternative Name: + email:ca+ca-rsa2015@esmtp.org + X509v3 Issuer Alternative Name: + email:ca+ca-rsa2015@esmtp.org + Signature Algorithm: sha1WithRSAEncryption + 0a:ce:07:39:77:08:c5:3a:00:04:e8:a0:3b:f7:d2:4c:79:02: + 23:0b:da:c0:55:39:82:71:0a:0c:83:e2:de:f2:3b:fe:23:bc: + 9b:13:34:d1:29:0a:16:3f:01:7d:9f:fb:4b:aa:12:dc:3b:7e: + b9:27:7b:ec:0c:3f:c0:d9:f5:d8:a8:a1:9c:1c:3a:2f:40:df: + 27:1a:1a:a0:74:00:19:b7:82:0e:f9:45:86:bf:32:da:0e:72: + 0a:4c:2c:39:21:63:c3:1f:61:6e:e2:4d:ba:7a:26:1a:15:ce: + b1:f6:1a:59:04:70:ed:e8:72:05:4c:fc:84:c6:a5:f4:e2:4a: + 40:e4:42:70:87:9a:a7:02:26:3a:47:34:09:e0:7b:88:ca:fb: + 99:d9:9b:bb:0c:52:8a:93:d5:59:30:0b:55:42:b4:bb:d2:b1: + 49:55:81:a4:70:a0:49:19:f2:4f:61:94:af:e9:d7:62:68:65: + 97:67:00:26:b8:9b:b2:2c:d0:2c:83:7d:3e:b3:31:73:b9:55: + 49:53:fa:a3:ad:1b:02:67:08:9e:ce:9e:eb:9f:47:0d:6c:95: + e9:6c:30:92:c1:94:67:ad:d9:e3:b9:61:ea:a9:72:98:81:3a: + 62:80:70:20:9a:3e:c4:1f:6f:bd:b4:00:ec:b1:fe:71:da:91: + 15:89:f7:8f +-----BEGIN CERTIFICATE----- +MIIFJzCCBA+gAwIBAgIJAJKRZ97g7yzkMA0GCSqGSIb3DQEBBQUAMIGlMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTERMA8GA1UEBwwIQmVya2VsZXkx +FDASBgNVBAoMC0VuZG1haWwgT3JnMQwwCgYDVQQLDANNVEExIjAgBgNVBAMMGUNs +YXVzIEFzc21hbm4gQ0EgUlNBIDIwMTUxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz +YTIwMTVAZXNtdHAub3JnMB4XDTE1MDMwMjE5MTUyOVoXDTE4MDMwMTE5MTUyOVow +gaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMREwDwYDVQQHDAhC +ZXJrZWxleTEUMBIGA1UECgwLRW5kbWFpbCBPcmcxDDAKBgNVBAsMA01UQTEiMCAG +A1UEAwwZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxNTEmMCQGCSqGSIb3DQEJARYX +Y2ErY2EtcnNhMjAxNUBlc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQC5GqFWzssWr0+WuipwMXDThmx6RiZHQj/eSVc+CB4QJb8Gj8r99F5q +AX0xTVCIGENxZmVCnJCXDZXyFO/XXnfvfbVJPwK7gyD35vyazRPfYEEojjkHpqRA +mBUeRrYELvmrMtGL/lKB8dLhw8+/q0Cn8OTlooI3MIwQfaqofH52zF8aJNCMlPby +f0q+LzhnwAbmnlGtVdDLJnHP9K99WkGBFvsm7PA1AW7b+ekA19CJe8+IFoscj3cf +Xe9wBCh2xRvGI41Ja/C4IVbWfWhsviHj5uMdb6Xq3IPkJ7NvXxs9M6HV0/BzGhLr +2ZUAcVkWtORgOLIuf7fUxek/dORIOCmJAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU +sWnbXpvOGrQdsmr8WiKXtiQUbzIwgdoGA1UdIwSB0jCBz4AUsWnbXpvOGrQdsmr8 +WiKXtiQUbzKhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9y +bmlhMREwDwYDVQQHDAhCZXJrZWxleTEUMBIGA1UECgwLRW5kbWFpbCBPcmcxDDAK +BgNVBAsMA01UQTEiMCAGA1UEAwwZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxNTEm +MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAxNUBlc210cC5vcmeCCQCSkWfe4O8s +5DAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMTVAZXNtdHAu +b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMTVAZXNtdHAub3JnMA0GCSqGSIb3 +DQEBBQUAA4IBAQAKzgc5dwjFOgAE6KA799JMeQIjC9rAVTmCcQoMg+Le8jv+I7yb +EzTRKQoWPwF9n/tLqhLcO365J3vsDD/A2fXYqKGcHDovQN8nGhqgdAAZt4IO+UWG +vzLaDnIKTCw5IWPDH2Fu4k26eiYaFc6x9hpZBHDt6HIFTPyExqX04kpA5EJwh5qn +AiY6RzQJ4HuIyvuZ2Zu7DFKKk9VZMAtVQrS70rFJVYGkcKBJGfJPYZSv6ddiaGWX +ZwAmuJuyLNAsg30+szFzuVVJU/qjrRsCZwiezp7rn0cNbJXpbDCSwZRnrdnjuWHq +qXKYgTpigHAgmj7EH2+9tADssf5x2pEVifeP +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: f1:41:b3:3d:ba:bd:33:49 Signature Algorithm: sha1WithRSAEncryption Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org Modified: head/contrib/sendmail/FAQ ============================================================================== --- head/contrib/sendmail/FAQ Tue Jul 7 02:42:48 2015 (r285228) +++ head/contrib/sendmail/FAQ Tue Jul 7 02:59:02 2015 (r285229) @@ -1,8 +1,4 @@ The FAQ is no longer maintained with the sendmail release. It is available at http://www.sendmail.org/faq/ . -A plain-text version of the questions only, with URLs referring to -the answers, is posted to comp.mail.sendmail on the 10th and 25th -of each month. - -$Revision: 8.24 $, Last updated $Date: 1999-02-07 03:21:03 $ +$Revision: 8.25 $, Last updated $Date: 2014-01-27 12:49:52 $ Modified: head/contrib/sendmail/INSTALL ============================================================================== --- head/contrib/sendmail/INSTALL Tue Jul 7 02:42:48 2015 (r285228) +++ head/contrib/sendmail/INSTALL Tue Jul 7 02:59:02 2015 (r285229) @@ -28,8 +28,9 @@ sendmail/SECURITY for more installation /etc/mail/submit.cf. This can be done in the cf/cf by using "sh ./Build install-cf". - Please read sendmail/SECURITY before continuing; you have to create a - new user smmsp and a new group smmsp for the default installation. + Please read sendmail/SECURITY before continuing; you may have to create + a new user smmsp and a new group smmsp for the default installation + if you are updating from a really old version. Then install the sendmail binary built in step 3 by cd-ing back to sendmail/ and running "sh ./Build install". Modified: head/contrib/sendmail/KNOWNBUGS ============================================================================== --- head/contrib/sendmail/KNOWNBUGS Tue Jul 7 02:42:48 2015 (r285228) +++ head/contrib/sendmail/KNOWNBUGS Tue Jul 7 02:59:02 2015 (r285229) @@ -62,9 +62,9 @@ This list is not guaranteed to be comple libmilter and hence the communication fails. This can be avoided by increasing the constant MILTER_CHUNK_SIZE in include/libmilter/mfdef.h and recompiling sendmail, libmilter, and - all (statically linked) milters (or by using an undocumented compile - time option: _FFR_MAXDATASIZE; you have to read the source code in - order to use this properly). + all (statically linked) milters (or by using undocumented compile + time options: _FFR_MAXDATASIZE/_FFR_MDS_NEGOTIATE; you have to + read the source code in order to use these properly). * Sender addresses whose domain part cause a temporary A record lookup failure but have a valid MX record will be temporarily rejected in @@ -102,6 +102,11 @@ Kresolve sequence dnsmx canon Header addresses that have the \231 character (and possibly others in the range \201 - \237) behave in odd and usually unexpected ways. +* AuthRealm for Cyrus SASL may not work as expected. The man page + and the actual usage for sasl_server_new() seem to differ. + Feedback for the "correct" usage is welcome, a patch to match + the description of the man page is in contrib/AuthRealm.p0. + * accept() problem on SVR4. Apparently, the sendmail daemon loop (doing accept()s on the network) @@ -252,7 +257,7 @@ Kresolve sequence dnsmx canon * Race condition for delivery to set-user-ID files - Sendmail will deliver to a fail if the file is owned by the DefaultUser + Sendmail will deliver to a file if the file is owned by the DefaultUser or has the set-user-ID bit set. Unfortunately, some systems clear that bit when a file is modified. Sendmail compensates by resetting the file mode back to it's original settings. Unfortunately, there's still a Modified: head/contrib/sendmail/PGPKEYS ============================================================================== --- head/contrib/sendmail/PGPKEYS Tue Jul 7 02:42:48 2015 (r285228) +++ head/contrib/sendmail/PGPKEYS Tue Jul 7 02:59:02 2015 (r285229) @@ -141,6 +141,185 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0= =SR28 -----END PGP PUBLIC KEY BLOCK----- + +pub 2048R/0xAAF5B5DE05BDCC53 2015-01-02 +fingerprint: 30BC A747 05FA 4154 5573 1D7B AAF5 B5DE 05BD CC53 +uid Sendmail Signing Key/2015 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1 + +mQENBFSl4rQBCADRCzgFSJkzyoOHw9/9L/+G3mzA1fWR7TgCE0WxGX7PDzyLDaUS +a4XpCDtadjXyr7c5YPo1T7ybxUH39yvUgEHBiPQDssik+bbpOiHL7V0sUDAYfKSq +YC8/MG42Oj/zd+0WUhnI+RckFYPBNDQ+sZC6ErLDxCYDZMYhG4vhJOGqAKpglNTb +w4Fdx4LNmL3e4t3z4IEtnzAqeGVxIZm8MGGFhKkb8ufpgh8Jiz4Q6cOis0ZD9K6f +LvMPRJXSBy9jBtmS2oI2e9Q5LLhmzd1PVyA8jwAlK0QfJLmlRrgRUfHFKhkf+EuW +tTi592OYCZ9bw7QVSiGVQUK+7VACfM+FQR81ABEBAAG0MVNlbmRtYWlsIFNpZ25p +bmcgS2V5LzIwMTUgPHNlbmRtYWlsQFNlbmRtYWlsLk9SRz6JATgEEwECACIFAlSl +4rQCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEKr1td4FvcxTTPMH/29J +kNmt6EGNo/eLQySB8HTenfJjZaQxwPRhq22kWgr/7WP1BR2411bopyNk4IZ0rcDr +tnyeJj4UWKJljVuXyTDQPtU8uUlgiOT8QiHEbge7MOzxrn0cy6KIOgKq+vtuxa28 +McaxjENR7XVIDFkesQ7P/yLkcCjlE6jaD4r9OIKpqEVMPs1WUFff+rsgTo7mdcgR +QowQOgYqNil5awQ5Y2Gol71hZ6oRcpqMwSd6w4dEEx2U8rF8oqJuoxeUTgNCSv0n +iFtewLznocmxlrxe1mQAeLfRmUAG4LSL6p5wx1lRjJA3gtyWRjY0404jGxkATLG4 +AtK2OkHj8MbrWLP7PKyJARwEEAECAAYFAlSl5AQACgkQYd4R7OJ2OnPHXAf/Y6Rk +rROF45+SgbsEIiDXQBcBOoO1GKe0nFTc1jfAKUHAQ94fqcDxNeFRA9fNIA2d7XNI +0Lw6W7X3RcEkF58xytIe/Y+EXDmOt/BUbpch9KIz6J9pqBhPdyHvG+ZeyA3A+TGT +ZGnnnAxNFtCjt2IID9lzZSLuWhH8+DNC2Vp15NngDTa1VIk17n5iIvi7r3V5cdIE +MblKLGm+ZaiTeccVLjwMKIUSgrLP87+yF/aaZH2kotuI7f3tD1ycN0sVZJxcFS+c +GFw7uvOarDBSm0Q/FgfhDUOJLy4w5SqVmgPEIAeogz94q0JXxSSr1XWQBD8X9XwF +f3+dPXmgMHXLGRWclYkBHAQQAQIABgUCVKXkPAAKCRA9aLJdUgfK08cnB/96BV+v +xyBx35TPg8eI/WIskdQAIpCQsm6FoO1ejbMzfWn9bImCewOp1UMlowdfQC52Hdp8 +EXnuwCpJ3rtnZctRld5dNM/clbZ+r3lr78wX7hqPUajlvxe+TMpyZbJirLn1f5Ba +yoysE4oICfzJivPfixZd7oFVr9EkftbatYenl0rgf/0lJTKRDIqNGezeeyfxaKdX +qd545wqis7PrrXDOrEq815aosG09KQBhIoPgti2us1R95nSm9z6dVCY/nSDOxL+a +Vyq/XD5KSUqbZVocY+fbR3dNX5haTvawuG0GPvl+YvYb2lW4hhi7Q4aUL7Dd4c9c +vk5+WAvfJwHtbxrgiQEcBBABAgAGBQJUpeREAAoJEI5a6fvO7vQ7OWUH/2NNxhlI +JEtvD+Nj2oPGgVQJrlFI1pbzyMCtD+6iy8Lfnp2DK+qKPMjBw96LUqcXC32VFPQr +17iyZDv26MSb/acmdIfTPpPTwJ6zEmMI8mXradeuoiWxeVHSg7n+D3u0xtikmb9Y +uRKv0yx43fcL70bqV5DzyXQte0chfRnOiwMrImWdgDekkmxE9udbtgK24rifNVGa +TBB6eHJAsFVu5Y38hsZLe10bCKyUCqT6Qywfy3RCMpXYeo6fXOk0fKatG2oi3CZp +LI+AnjmAJ0t2oMkrwUxogkK3LkShJT/aJYIR24eZm0GdzwRHZxXKClGFvdJslIea +TKHSXNK41eEIfreJARwEEAECAAYFAlSl5EgACgkQOaTHfal4hLAXfwf+M0YmlHd4 +1sfvckYhOYf99n1BGnfQx5RJn+X+EBjGyOfPKMBPQuZIlwAI20T+cFnR3WmgrmlO +IBG8qVcSDoValzNPcr0V3WGDrT75fYhf5iYj2ZsZDBUqE1VF3dAVUw40x2c1n+98 +7lbq3NtolSPYk07h5rhEhmkjdNcixv/exVCTGVwaT4X9ZHY8heETmF5tsCtPavpr +i/DjcDQQQ0sQ8um1eX41j2bhrN4MERUC5oadvSULaA2QUoWgCrzVG8zx715Au77N +jLtfA31hJI0GP/dpSREaYlqA0nwVDR5tz1TyTNwPN1ylxjQmjKXtJwx3jUtlT9Zh +qxRf+ngYHpWArokBHAQQAQIABgUCVKXkTAAKCRBgTfvyhUEKvl11B/9aYJBEEQZp +JWAT6HPmQK//i2x4y1euQfaHsjqJALvvPrgiTp/ZE3o6dKHhs+SbawsB57RtootN +maQr7x2drvBojWhJJdaouAh345qOfZYb0bD9klkr6W+Mjl5T0xWIKFEyIZn0Tcbr +8ekHgSIx2trL8LduSJou2bdPMh46PORzEpuQQ4IAyV0uRyBdNFOPwTy2OdXs51fr +M7lp1hJp84+y2a6z3vz3VCs2A9LzlnXKZ6bXljpd5dQfrmrSNXltPKA3jVLkWi8+ +rh9f1rAGsj1e6N1aVF2uJ1Y3u+U0XQ/dwa1vDF3y4KVObxYM9eNGbF4J8lGkUy2a +gZ1s1X8QzEDUiJwEEAECAAYFAlSl5FAACgkQEolum6d/JCmUSQP+KEz6xSvPSbFP +Hip4JiX1Wbvd+t3TyL0u9Fv/POwUrFIHVpTkCwOz6jsBH3TdGGiYOP5F8k/US2jU +3WB0J1mK5Rn3GwLhUGNTEeuaJZCuKE+j3qwMFmDqC/2IxEvlWtrIbTqkgf7cRv/O +O7VNv+EL0axtsrOcwZlUWe6Lc4571oaInAQQAQIABgUCVKXkUwAKCRDYqvDK9rMH +KX7xBACUFTBRCmboY/GRTHMZW1DGfcO2vMxwnYKqWomuzi/YonDCWtoTpeMDaAhY +NnIchC1mlYteIE94/+ZsoYsZeaR3fe7CN6h/deBu4tW/dQ+TW1ZPF6EuVhoviKgz +rd3rb+gcS0f0PgSPyg5LGtoMGMD9/gx1NJOTFec83jmBI95Gb4icBBABAgAGBQJU +peRXAAoJEJdDARhwk7hBAUED/0oyeD2Z4wMQ6IQEprOAWbR+vIRzaThemmCGobRw +UlM44nUXqKSM1+naLEVz/JzBuKWG00zTz6Su3NesWoFzDDUGYcIJggbOm39Pc+V8 +eXV86An64/v3P6gypJc+q9P+FFGGO884wFmYN634Mi4SDBVFUzffcghueAFcxtzt +0mH5iJwEEAECAAYFAlSl5FoACgkQHnuzyK+VliVGdwP/fmdK9MdWIzPD/6eYm6JZ +zbksaGWiqpwgp9IEr/OhSmGkXuwUsP35PFJ8FsJbEV5x/y6pP3UNp6EFRN/116ue +jp5vVM7nnj2K3V8f85J4dXCRbv+kek+Ufo1Qzm5kgvRuBxX1sXpxFX6yBM0Y6WuV +gszdbTVNlS04q6bnPFE9L4uInAQQAQIABgUCVKXkXgAKCRBwoCRNHvmSUZ/7A/9W +yQJrrdrs2SuYtoxov/pL/TVMejbnxsF8Y0dRtM/KiquP57PMQSmLqy4fTRzAMHBv +XK1aKfewTVfGKLcHIzfMfv2XcPpWfwcyMeZKtcSr25lWl9GJZP221rCok76XYwqk +BPPp0pjSwdy0Qq4sd3N3ESZmqAMWJ7ouMmlQ7VWReYicBBABAgAGBQJUpeRhAAoJ +EMjV7SmV9hdxLv0EALX3yjI2KDNG1mo5ctCSYlIlhXHQ6csHuUK9lzj9R1gVEzDU +0dEZH0+a5UXh5xf8nyTDLytUe8PxTtPit3AOP6TvTJlANULh/3MKS6317RwUe2e0 +OitWbhQAOYfpYAkSdXZACzPacxrefkxmSM3Pq+SYoumZTI2N6AvVu8MeCS0GiJwE +EAECAAYFAlSl5GQACgkQIYPhsTlvB4mWJgP/XAlvlBityADJkdN+3mp/OtdYzw04 ++dBdNtmLqWUiMZg6rPPHUQi7dfBKi95FFe2U8hxSRk8oLzSzmh/M/CP72mxKh4pi +PbmEkmKHYlNdyfCCNqXdjkBXFAKXAes/4DaBlZwvLjPtrupEaW2eYdU8cSrdeGuv +1PMLRPxRr3nPCb+InAQQAQIABgUCVKXkaAAKCRCJaWK4Z4wKA3ZVA/4iYD+xrYv0 +8I+0GZJRdEL5f7T97a7Vtf5xSxUhHDww4xC9gs8LzEGWZXoNaZEVl4j+63EnCIbY +o4g+c4m81D5NWFqeJWhWpcyvejo9hfGM3ZK/XbiF+ZTzznU5YJclGaZ7t8TY8gcx +GSWxUzxBJQcSEzAKKi286ielMAXocNx10oicBBABAgAGBQJUpeRrAAoJEDgi20fM +N08tDkwD/2F5j5irsDw+MQyLKpfPv3GRJ5J3ebOPpLQkQ5T34+qeIw4LkcXW9OJA +ohW47JLb7R8zwAlUoqmmNXtxTM0r0FlTYGPOVEnSEkMqqa3KR68B3jWAGXXdqig9 +yBxYRleawQ4ltnegBn8q7gC4MwnIAZxzK+Y8cM0Rk/FjC9+NhwrviJwEEAECAAYF +AlSl5G8ACgkQnBy94uNcVjUfvgQAlQijnoE3de1CanB0JqIN+h+XOLOpalFti+B7 +Swc2ZlnlQ9mofYPK5UHlbsiC7/TilD6xm4YEFKim9sOIMi8FNka8+EH+/d1DmS4M +qVPDssxTG6VOzn7tYOuC9qIw15IpfbHW2bk/YIImwP9nViKCMLIGw+ZgK+uiRQx9 +fT8O1NqInAQQAQIABgUCVKXkcgAKCRBvUpPYo5umVYKeA/9n63K1nF3DNY3Hckvz +tN8OrPmyCIOh+7t4sc5NHhTK0+BQTv+cgG6ig7K2cdI6VBAovs/c/u7+RrcMhp7l +45AVnycfKcNaMHKFyMHDk9FZgpRG/bv1zwDxdh+scUc3IekqkSiQ2wTjDQ5Q/BMK +L5zfOSnTOoltWjpVgsjdM75Ol4icBBABAgAGBQJUpeR2AAoJEO9YlmTUMuGd8R0D +/3mhriMu/cp3DXHnlDykqLJI1q5K4xCHOWwFYZ8DxW116AVjluJYYW1HmWcJrjK3 +cwuN3FUcsIjafanIJWCsdeZaPAyFEfUBEW0YXIIpBXRw2N7jNtrd5X6Zjptd+zW+ +4dUzvT1pqVtdPHjova3fcGLSmcdZYbddotaGi7xi7kXviJwEEAECAAYFAlSl5HoA +CgkQwZwdJRLTRh0iwwP/Y/pwp9ttAMuQUz6oH71BTkUrzu9LiI7vhrYxEquFdzCO +dE4jBNB3LGfwzjhJRtjmQ/gVhjXWWrDYnOXt3gNxb9KzmTHmSDu65cBxX54Un0pZ ++MXjjWOT2l8+GA1lXeICIoZjJL88/zEZAiaH67ch2LEix1fOaJmXJzUSmP1pR3KI +nAQQAQIABgUCVKXkfgAKCRDAKcpAFvTM6XVwA/9Eb+Dwn2lmEFFo64gj8ocpWzP8 +/sD86PP5KkZ+b/HQnGB3lsQTwsGytDvJfutLDa05sS/HWZ9wXPltX/G3omp/A1G5 +qEKzVSe0vEWedpf9wn82Ll6hzaiS5qX7r0+FpyUjY8arNrze5S4Q6Q2kjl8YduXl +wG877igRHkGpAtApxYhGBBARAgAGBQJUpeSHAAoJEBj1A4AkwngCRCMAnjHfd5db +KK6DJxrWVnEbyXs/QJGKAJsErKkiUX55B8k/P3cyzyXIaOujBYicBBABAgAGBQJU +peSOAAoJEHxLZ22gDhVjCDQD/j7DE5wyhpjHrtf0hsQcaQoVHWZb2JTLZUMRAQyj +zKMTSs0GslamlxLZmyV1HqkB+41zuJeBQtRV4gjqa5DQmWDRC2mHl7o9A40v4SDa +O1jmfU5hfJSMecucPyEcfaAG4BIMvBo6TL484uHBi45SN4Ik3f2wc6D1XOluD1vB +gIwpiJwEEAECAAYFAlSl5JMACgkQ1uCh/k++Kt2s6gP/RNcMKtx4u61vz+Aji/Fa +H9q03JxQaRgmN1q2AvZQ/NTWTXU7Y5GnH4kW/8rOoUQiR+agJsvTt4ciM+y33pZ/ +ZZLkAuo0uKelEHhdQhtRbSktKBHSgDWbiqaJJIxazeLpxcSgaoM6RW/7aIFdMtEl +ALAzTACYlTN/nKWWICn8GnGIRgQQEQIABgUCVKXkmAAKCRAh+cW892qb9aWOAKCg +aznvUX8PIvKPzoHld39xWlJ+FgCg76wrEc1h9IiIgUoqH5NWVCxcHneInAQQAQIA +BgUCVKXkngAKCRC92o/WP+p9/ancA/0Z4JHZT7NRBMr47zQvSwE4eLpSE5QDGXi7 +RNmOUgZxrxsFWRZLJCVupXDBQVZEhOBRZYqXPw1eDglOU952oj5OjaHsYnSEu7jz +VUwlp2BxZQ3mnepdUcQz1A3k2cPZ0I6KFP9hP88GU+77nubB7IqRH/Q3QKMgO0eW +yd5kYugyYYkBHAQQAQIABgUCVKXkpwAKCRC9J20ub8+ohR46CADMEvAns+L+BkVN +d9INsiR1rONrNRPT6w4dnBeTLaykkuMjc6+7s+UuXm6AMAelI28pG+fJyt/lZAGx +QLS9zFgREge0lVbOZVeAYeC1YyFsrJE4Lr2quq3fajj23tnsHmCv16znMHrh/E1m +Udm4145NprijrZn+PsjuVWYV+pxiLpLM0YBdGNwCEMi/KCQ1fcaiAZZWSqLmHIe0 +ubWDdqq8/5JRQ22SEnqP2FT/lfOmKTxMNmE0uEr4+C4fG2nd38BvzpHu9eN/4Nwx +IwzK5DhbAj+I57+VDncgkNGe1q4QY/5LaZQh/nHIcmX1ln23f9Lxkr6EYYZ1ptq+ +A8buvD+XiQEcBBABAgAGBQJUp+zrAAoJEBCQryClqlvm6AgIAKAR8HY4G9AD2jDb +ouS4Al4QICagwQ0Y7Rc2/fHyPQEAP714EimakPFVFDbSD6SW569Qtdxr+ggH4wFI +bzd21pCgIUC6nVoDotIjplMdYkNfq8AODpxn3HTBnNQ7e609xnWxFo/+httKoWok +fEP9qZk4MJq7lE75iX+wohjLwoF6v0tCB8CrBFJcfKrDvXQSGvKiaEp4g0sEfyXv +gL6X0xKMflupofdnFLJliV0WqGhBOGUghPdLsA02E3e1utj6WABmudMytRxWB8is +SWGaywaEKLSdCgi+XlQVypKeWNMbZZZcftVZ91r4iNTAkw4cv5Wea+YnngfurGCq +J/jUq7aJAiIEEgEKAAwFAlSn7r4FgweGH4AACgkQZhs61tgqu9C9Aw/+JMTXzwni +NPwBxkbcNWbnWODVEElmDloHNpr3z+ryF1XNgbiOY8dn7uwRnPoeCDhIDwvNkK+x +h4xmjH0970v1ltbzcZv0wnK6UeHQssqN9NGsXM9rbodYRIam4yxbwd1ddOC9QZFM +ToRVWiqCzGOVYL50a24OYKClGjm4ncRznXJrNwYMEjxQ3j5FOkXIn0096z3szWCY +6yDpPzOsl2TPwdjMKZWoMEDh/SvY3AxAXo1XqDCj2/+C8dDwO7kn+QAl3fUGmkI6 +dUHCAJm/WtSyvINdphzhZ1ZdkPhqDUKcR0JTX03QJ6bnu5vmmOncWm2NA7rP74fq +KE9XzT808xP0GBwR1co7Eq+/751j2TA33JSlt/hIgi5aEWc4laCingJ02yaW8tUS +DCoVNITaXcF/B47hjBgovQk8TOTsQ0nkSYvOoh05OYBmzl17G57QuPx1stRJ29QA +VLGem1v1mXAuNdHH0kNE+/Rv0A2vGqauLx9ba84RfbXMM4SJw8CjhX6OxhAM8xoU +tO6T56XZS8qLtWLkNQNZNdNlAo6tYk/cTrjdX1M63nYjoVbuc0nic6Wp+dQk/DEb +wsiIpFoisvMK6EH49v70/c9Gtg6rk5z2yBHMZsjo2Y0TheTKwKIUEz0MuTncH8jD +yB/NtQkrbiBdEqRJUoKKUtS0B4cUYTUyd+SJAhwEEAEKAAYFAlSn8agACgkQ8Ar2 +6sJF0gs2yA//cgc+g1wPRFzJeQGv5UFR3TCAMtS+/bzY3UU/eG2Jmbv2qwPbn+kx +RH5dYlZ72VHXEggBaEweCBrBWsweX5dGEMNDLNlI9ArAjjhBAZFFUQKj55EzIZpp +YTbvgxOD2ENKU2HfeQYCGFYZr3L2DXQ1k0U7VnaElBQV3o88CMi7bIsQq2aWk+c6 +Cy15UVr0niVLm95EUZM4yYm2gOGJXUeaGIExSBtiwuzvAiDEGaqfPGAi1ePkNmLJ +3UzYfgiQumSh1kDVlQkCc8UQiF6ckEma618cmmaHs5vZvHsTX5O2/qPkLpXunA/7 +5yM/Jde8a5VbNGWyZ4rmstlWR5rPd7r3uP85miHn7Arait3aGo8RQeAHzOdTvMqS +n3oCotQlOvBhOo7qA8oYQVlU0+77gOfZZeEXDZG13lU95ptFhdsGstIQH67jPQ6z +TpVnd28ip92ysrwvxPhOzO74yKcYoKtzwLctcvptlKTkrFMHP3wJwqbaSfJGK4JE +rjT8WnnWyHY465nTDN9AKkoH4WQNozniWX8OkF3CpPj7ow8roFXlPOxXH4QsaQu3 +Kk31APn/A925d4xyYuWYHZ7A/FzsHafFHPMoG3iwZyuFhfl1UXVvEd8w9mEcxXoh +2iCy87TdpesG0GDzSmWwEYEPkg20BD2+vdc0EekALDjAGM+lfBxN67KIRgQQEQIA +BgUCVKgM0gAKCRAJp6JK0eWCB94UAJ98O6S6r1hFnCLrbU3GeqrA4DCtBQCfcza/ +WoVLc3/+bOf1jzjJ/eJ20IyJAiIEEwEKAAwFAlSoCRMFgweGH4AACgkQhS2G+DXA +JIrWURAAvgl1LkqB9pRPViK1U+xa3b5zt0O/fLbov59aLhA4uPJ10BgaKptflLim +aE2EsS4Mnk0DQgGEBjlywJ5Ft3aMk3vbRz7lDE3zQ3oWa7+N4fcG7WWsAxmh0NtX +Ak7orN6rQcyGgWgpF7wOau79i4VO7oLHKeS7QNs7X59CW+k64TAJabxi74PRoVMz +843qWPjsuFIYM7n/nF0vdECwhSE8zUgcYG2n5CdA0Lq7XRE+II11VOT2XEXFMyR/ +Qh2m7l+jy12MEzHQfGC1HYBo/Zi/MRIN53Rd2LLJWQdMxz/BDiuSxZhKVeCRe7gT +Mc2k3VrmfViBoaUE0zqMbx0j29XUbNQNU3afE8MOBkmyd6AQjoswBEsgU9uyCJYD +Jq3V1stwSVBm9G7X/l8GFlPawLg/uM9gTYb2JYUYPlphTAwVcL469rKQNMhPj2ww +zT7NzjwFb9XrmyiIrqH5z2ieG+LRjajOPVPwBsqZ3gOA+z9QkU1lRYEJOTlEYCkv +8oA6ZeFm31S4JoeogbCDaMiqDszkFtYGBUgGEbnHoCgXi7aINSb17VZ8LTzpD4V9 +vGdFVuE3vJf2POMERP+buLV8OiG38cBJXb+JVSC+pkpm+32nY0UR5ccDPwAC3cGq +SbI6ftKlQeaYp3UEncFUaB8NNZings3jzRexPjzUzo0vhRkkIs2InAQQAQIABgUC +VKg5iQAKCRBfHshviAyeVbEVBACL9Vve0dF0UqO+DN4PzrTOx2JzRw7ujhcrZ6I/ +TCXjANGLWUheylRWhvxMojvbhZEg2835+9l6tpD7BVnrfkBE+LYIKFTusye+WYre +dAaHFpuN6XfmsXmhXaSodhH9gKS+oftYX61qUmiE7L98nvINNBMnFVkptCQVDl8o +GWiMRYhGBBMRAgAGBQJUqBAmAAoJEMSxB5iFeWojCtoAoLa2/SUyfC5EiKdvEbap +49v6XPyxAJ9mPvhe75aTOU7uWoa+c0wn6fXIcrkBDQRUpeK0AQgA7ctg3cJD4eTw +j4sQ94AtSYjwT+Yp7r2s6h4cHUge6AMZy9ixtyg87JnviRFob2zeo2JFDAwtl7Zs +GHo+py/mJwfQKmUsXUmQqgHJFXDiiux+4+dYOXZyVYKP5bTV0JVlKjRjSWNnh7Bv +yZNUZlrLz5ZKF1NAYKJAw4fx3TFbC4K3hvDwHQW3croPQYq0wNq6as956LHYjUOB +Q5K0uy4TXY2EcIyAy253UX9MAFgacuP1jf3ITEVZpcebzl+gcaB54gXqOfmgQQP5 +PmQDyb96ZxFsKa5UfsS3Kh0PeERa5TDlgiw55O55pUSGKKfYfOXvqpJ/ZKYl+ado +wgsmbq09UwARAQABiQEfBBgBAgAJBQJUpeK0AhsMAAoJEKr1td4FvcxTNO0IAJ2b +V48mulcdCS8G3t8qRHlEXGbxgYBQRa500M9fdgRyIWBxubP7r6/nLFDGiIpdUVmT +g9F3r1JsyK6Q7+VUp9XLirj/gT1kwxXT/UHHIQO8ObtPbfFtqISaBjaklTOUPCud ++nOpzRIfct6CZM0xAVIoqm4kaRFaWefxRiyeosDQ7tCD4lDRwxNJE2deE1WmOeN1 +YCJHa8QaewJXtUvqMq6pRmTlzSn+5/w3gV3XVF+CHjGD/COeSm7CGazLmlypN4n8 +ib9eRg0K2rAqKfUbn+aFwmqSBhBcw/UhOoXnteNQvd9KNdKiHERJEI3qZ2rLAlYf +uYT6oSAR9rPSpsZpyTI= +=Jib4 +-----END PGP PUBLIC KEY BLOCK----- + + Type Bits KeyID Created Expires Algorithm Use pub 2048 E2763A73 2014-01-02 ------- RSA Sign & Encrypt fingerprint: 49F6 A8BE 8473 3949 5191 6F3B 61DE 11EC E276 3A73 @@ -2613,4 +2792,3 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.46 $, Last updated $Date: 2014-01-18 00:20:24 $ Modified: head/contrib/sendmail/README ============================================================================== --- head/contrib/sendmail/README Tue Jul 7 02:42:48 2015 (r285228) +++ head/contrib/sendmail/README Tue Jul 7 02:59:02 2015 (r285229) @@ -211,29 +211,11 @@ There are other files you should read. +--------------+ There are several related RFCs that you may wish to read -- they are -available via anonymous FTP to several sites. For a list of the -primary repositories see: - - http://www.isi.edu/in-notes/rfc-retrieval.txt - -They are also online at: +available from several sites, see + http://www.rfc-editor.org/ http://www.ietf.org/ -They can also be retrieved via electronic mail by sending -email to one of: - - mail-server@nisc.sri.com - Put "send rfcNNN" in message body - nis-info@nis.nsf.net - Put "send RFCnnn.TXT-1" in message body - sendrfc@jvnc.net - Put "RFCnnn" as Subject: line - -For further instructions see: - - http://www.isi.edu/in-notes/rfc-editor/rfc-info - Important RFCs for electronic mail are: RFC821 SMTP protocol Modified: head/contrib/sendmail/RELEASE_NOTES ============================================================================== --- head/contrib/sendmail/RELEASE_NOTES Tue Jul 7 02:42:48 2015 (r285228) +++ head/contrib/sendmail/RELEASE_NOTES Tue Jul 7 02:59:02 2015 (r285229) @@ -5,6 +5,165 @@ This listing shows the version of the se of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.15.2/8.15.2 2015/07/03 + If FEATURE(`nopercenthack') is used then some bogus input triggered + a recursion which was caught and logged as + SYSERR: rewrite: excessive recursion (max 50) ... + Fix based on patch from Ondrej Holas. + DHParameters now by default uses an included 2048 bit prime. + The value 'none' previously caused a log entry claiming + there was an error "cannot read or set DH parameters". + Also note that this option applies to the server side only. + The U= mailer field didn't accept group names containing hyphens, + underbars, or periods. Based on patch from David Gwynne + of the University of Queensland. + CONFIG: Allow connections from IPv6:0:0:0:0:0:0:0:1 to relay again. + Patch from Lars-Johan Liman of Netnod Internet Exchange. + CONFIG: New option UseCompressedIPv6Addresses to select between + compressed and uncompressed IPv6 addresses. The default + value depends on the compile-time option IPV6_FULL: + For 1 the default is False, for 0 it is True, thus + preserving the current behaviour. Based on patch from + John Beck of Oracle. + CONFIG: Account for IPv6 localhost addresses in + FEATURE(`block_bad_helo'). Suggested by Andrey Chernov + from FreeBSD and Robert Scheck from the Fedora Project. + CONFIG: Account for IPv6 localhost addresses in check_mail ruleset. + LIBMILTER: Deal with more invalid protocol data to avoid potential + crashes. Problem noted by Dimitri Kirchner. + LIBMILTER: Allow a milter to specify an empty macro list ("", not + NULL) in smfi_setsymlist() so no macro is sent for the + selected stage. + MAKEMAP: A change to check TrustedUser in fewer cases which was + made in 2013 caused a potential regression when makemap + was run as root (which should not be done anyway). + Note: sendmail often contains options "For Future Releases" + (prefix _FFR_) which might be enabled in a subsequent + version or might simply be removed as they turned out not + to be really useful. These features are usually not + documented but if they are, then the required (FFR) + options are listed in + - doc/op/op.* for rulesets and macros, + - cf/README for mc/cf options. + +8.15.1/8.15.1 2014/12/06 + SECURITY: Properly set the close-on-exec flag for file descriptors + (except stdin, stdout, and stderr) before executing mailers. + If header rewriting fails due to a temporary map lookup failure, + queue the mail for later retry instead of sending it + without rewriting the header. Note: this is done + while the mail is being sent and hence the transaction + is aborted, which only works for SMTP/LMTP mailers + hence the handling of temporary map failures is + suppressed for other mailers. SMTP/LMTP servers may + complain about aborted transactions when this problem + occurs. + See also "DNS Lookups" in sendmail/TUNING. + Incompatible Change: Use uncompressed IPv6 addresses by default, + i.e., they will not contain "::". For example, + instead of ::1 it will be 0:0:0:0:0:0:0:1. This + permits a zero subnet to have a more specific match, + such as different map entries for IPv6:0:0 vs IPv6:0. + This change requires that configuration data + (including maps, files, classes, custom ruleset, + etc) must use the same format, so make certain such + configuration data is updated before using 8.15. + As a very simple check search for patterns like + 'IPv6:[0-9a-fA-F:]*::' and 'IPv6::'. If necessary, + the prior format can be retained by compiling with: + APPENDDEF(`conf_sendmail_ENVDEF', `-DIPV6_FULL=0') + in your devtools/Site/site.config.m4 file. + If debugging is turned on (-d0.14) also print the OpenSSL + versions, both build time and run time + (provided STARTTLS is compiled in). + If a connection to the MTA is dropped by the client before its + hostname can be validated, treat it as "may be forged", + so that the unvalidated hostname is not passed to a + milter in xxfi_connect(). + Add a timeout for communication with socket map servers + which can be specified using the -d option. + Add a compile time option HESIOD_ALLOW_NUMERIC_LOGIN to allow + numeric logins even if HESIOD is enabled. + The new option CertFingerprintAlgorithm specifies the finger- + print algorithm (digest) to use for the presented cert. + If the option is not set, md5 is used and the macro + {cert_md5} contains the cert fingerprint. + However, if the option is set, the specified algorithm + (e.g., sha1) is used and the macro {cert_fp} contains + the cert fingerprint. + That is, as long as the option is not set, the behaviour + does not change, but otherwise, {cert_md5} is superseded + by {cert_fp} even if you set CertFingerprintAlgorithm + to md5. + The options ServerSSLOptions and ClientSSLOptions can be used + to set SSL options for the server and client side + respectively. See SSL_CTX_set_options(3) for a list. + Note: this change turns on SSL_OP_NO_SSLv2 and + SSL_OP_NO_TICKET for the client. See doc/op/op.me + for details. + The option CipherList sets the list of ciphers for STARTTLS. + See ciphers(1) for possible values. + Do not log "STARTTLS: internal error: tls_verify_cb: ssl == NULL" + if a CRLFfile is in use (and LogLevel is 14 or higher.) + Store a more specific TLS protocol version in ${tls_version} + instead of a generic one, e.g., TLSv1 instead of + TLSv1/SSLv3. + Properly set {client_port} value on little endian machines. + Patch from Kelsey Cummings of Sonic.net. + Per RFC 3848, indicate in the Received: header whether SSL or + SMTP AUTH was negotiated by setting the protocol clause + to ESMTPS, ESMTPA, or ESMTPSA instead of ESMTP. + If the 'C' flag is listed as TLSSrvOptions the requirement for the + TLS server to have a cert is removed. This only works + under very specific circumstances and should only be used + if the consequences are understood, e.g., clients + may not work with a server using this. + The options ClientCertFile, ClientKeyFile, ServerCertFile, and + ServerKeyFile can take a second file name, which must be + separated from the first with a comma (note: do not use + any spaces) to set up a second cert/key pair. This can + be used to have certs of different types, e.g., RSA + and DSA. + A new map type "arpa" is available to reverse an IP (IPv4 or IPv6) + address. It returns the string for the PTR lookup, but + without trailing {ip6,in-addr}.arpa. + New operation mode 'C' just checks the configuration file, e.g., + sendmail -C new.cf -bC + will perform a basic syntax/consistency check of new.cf. + The mailer flag 'I' is deprecated and will be removed in a + future version. + Allow local (not just TCP) socket connections to the server, e.g., + O DaemonPortOptions=Family=local, Addr=/var/mta/server.sock + can be used. + If the new option MaxQueueAge is set to a value greater than zero, + entries in the queue will be retried during a queue run + only if the individual retry time has been reached which + is doubled for each attempt. The maximum retry time is + limited by the specified value. + New DontBlameSendmail option GroupReadableDefaultAuthInfoFile + to relax requirement for DefaultAuthInfo file. + Reset timeout after receiving a message to appropriate value if + STARTTLS is in use. Based on patch by Kelsey Cummings + of Sonic.net. + Report correct error messages from the LDAP library for a range of + small negative return values covering those used by OpenLDAP. + Fix compilation with Berkeley DB 5.0 and 6.0. Patch from + Allan E Johannesen of Worcester Polytechnic Institute. + CONFIG: FEATURE(`nopercenthack') takes one parameter: reject or + nospecial which describes whether to disallow "%" in the + local part of an address. + DEVTOOLS: Fix regression in auto-detection of libraries when only + shared libraries are available. Problem reported by + Bryan Costales. + LIBMILTER: Mark communication socket as close-on-exec in case + a user's filter starts other applications. + Based on patch from Paul Howarth. + Portability: + SunOS 5.12 has changed the API for sigwait(2) to conform + with XPG7. Based on patch from Roger Faulkner of Oracle. + Deleted Files: + libsm/path.c + 8.14.9/8.14.9 2014/05/21 SECURITY: Properly set the close-on-exec flag for file descriptors (except stdin, stdout, and stderr) before executing mailers. @@ -681,7 +840,7 @@ summary of the changes in that release. LIBMILTER: The "hostname" argument of the xxfi_connect() callback previously was the equivalent of {client_ptr}. However, this did not match the documentation of the function, hence - it has been changed to {client_name}. See doc/op/op.* + it has been changed to {client_name}. See doc/op/op.me about these macros. 8.13.7/8.13.7 2006/06/14 @@ -3509,11 +3668,11 @@ summary of the changes in that release. Add new STARTTLS related options CACERTPath, CACERTFile, ClientCertFile, ClientKeyFile, DHParameters, RandFile, ServerCertFile, and ServerKeyFile. These are documented in - cf/README and doc/op/op.*. + cf/README and doc/op/op.me. New STARTTLS related macros: ${cert_issuer}, ${cert_subject}, ${tls_version}, ${cipher}, ${cipher_bits}, ${verify}, ${server_name}, and ${server_addr}. These are documented - in cf/README and doc/op/op.*. + in cf/README and doc/op/op.me. Add support for the Entropy Gathering Daemon (EGD) for better random data. New DontBlameSendmail option InsufficientEntropy for systems which Modified: head/contrib/sendmail/cf/README ============================================================================== --- head/contrib/sendmail/cf/README Tue Jul 7 02:42:48 2015 (r285228) +++ head/contrib/sendmail/cf/README Tue Jul 7 02:59:02 2015 (r285229) @@ -158,6 +158,26 @@ FEATURE(`local_procmail'). ******************************************************************* +Note: +Some rulesets, features, and options are only useful if the sendmail +binary has been compiled with the appropriate options, e.g., the +ruleset tls_server is only invoked if sendmail has been compiled +with STARTTLS. This is usually obvious from the context and hence +not further specified here. +There are also so called "For Future Releases" (FFR) compile time +options which might be included in a subsequent version or might +simply be removed as they turned out not to be really useful. +These are generally not documented but if they are, then the required +compile time options are listed in doc/op/op.* for rulesets and +macros, and for mc/cf specific options they are usually listed here. +In addition to compile time options for the sendmail binary, there +can also be FFRs for mc/cf which in general can be enabled when the +configuration file is generated by defining them at the top of your +.mc file: + +define(`_FFR_NAME_HERE', 1) + + +----------------------------+ | A BRIEF INTRODUCTION TO M4 | +----------------------------+ @@ -397,6 +417,10 @@ SMTP_MAILER_CHARSET [undefined] If defin that ARRIVE from an address that resolves to one of the SMTP mailers and which are converted to MIME will be labeled with this character set. +RELAY_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data + that ARRIVE from an address that resolves to the + relay mailers and which are converted to MIME will + be labeled with this character set. SMTP_MAILER_LL [990] The maximum line length for SMTP mailers (except the relay mailer). RELAY_MAILER_LL [2040] The maximum line length for the relay mailer. @@ -743,6 +767,16 @@ nouucp Don't route UUCP addresses. Thi 2. don't remove "!" from OperatorChars if `reject' is given as parameter. +nopercenthack Don't treat % as routing character. This feature takes one + parameter: + `reject': reject addresses which have % in the local + part unless it originates from a system + that is allowed to relay. + `nospecial': don't do anything special with %. + Warnings: 1. See the notice in the anti-spam section. + 2. Don't remove % from OperatorChars if `reject' is + given as parameter. + nocanonify Don't pass addresses to $[ ... $] for canonification by default, i.e., host/domain names are considered canonical, except for unqualified names, which must not be used in this @@ -1441,7 +1475,7 @@ msp Defines config file for Message Sub by default. If you have a machine with IPv6 only, change it to - FEATURE(`msp', `[IPv6:::1]') + FEATURE(`msp', `[IPv6:0:0:0:0:0:0:0:1]') If you want to continue using '[localhost]', (the behavior up to 8.12.6), use @@ -1499,8 +1533,12 @@ block_bad_helo Reject messages from SMTP - connections from IP addresses in class $={R}. Currently access_db lookups can not be used to (selectively) disable this test, moreover, + FEATURE(`delay_checks') - is required. + + is required. Note, the block_bad_helo feature automatically + adds the IPv6 and IPv4 localhost IP addresses to $={w} (local + host names) and $={R} (relay permitted). require_rdns Reject mail from connecting SMTP clients without proper rDNS (reverse DNS), functional gethostbyaddr() resolution. @@ -2442,17 +2480,19 @@ should only be used for sites which have that they provide a gateway for. Use this FEATURE with caution as it can allow spammers to relay through your server if not setup properly. -NOTICE: It is possible to relay mail through a system which the anti-relay -rules do not prevent: the case of a system that does use FEATURE(`nouucp', -`nospecial') (system A) and relays local messages to a mail hub (e.g., via -LOCAL_RELAY or LUSER_RELAY) (system B). If system B doesn't use -FEATURE(`nouucp') at all, addresses of the form - would be relayed to . -System A doesn't recognize `!' as an address separator and therefore -forwards it to the mail hub which in turns relays it because it came from -a trusted local host. So if a mailserver allows UUCP (bang-format) -addresses, all systems from which it allows relaying should do the same -or reject those addresses. +NOTICE: It is possible to relay mail through a system which the +anti-relay rules do not prevent: the case of a system that does use +FEATURE(`nouucp', `nospecial') / FEATURE(`nopercenthack', `nospecial') +(system A) and relays local messages to a mail hub (e.g., via +LOCAL_RELAY or LUSER_RELAY) (system B). If system B doesn't use the +same feature (nouucp / nopercenthack) at all, addresses of the form + / +would be relayed to . +System A doesn't recognize `!' / `%' as an address separator and +therefore forwards it to the mail hub which in turns relays it +because it came from a trusted local host. So if a mailserver +allows UUCP (bang-format) / %-hack addresses, all systems from which +it allows relaying should do the same or reject those addresses. As of 8.9, sendmail will refuse mail if the MAIL FROM: parameter has an unresolvable domain (i.e., one that DNS, your local name service, @@ -3160,17 +3200,49 @@ TLS_Clt:laptop.example.com PERM+VER TLS_Rcpt:darth@endmail.org ENCR:112+CN:smtp.endmail.org -Disabling STARTTLS And Setting SMTP Server Features ---------------------------------------------------- +TLS Options per Session +----------------------- By default STARTTLS is used whenever possible. However, there are -some broken MTAs that don't properly implement STARTTLS. To be able -to send to (or receive from) those MTAs, the ruleset try_tls -(srv_features) can be used that work together with the access map. -Entries for the access map must be tagged with Try_TLS (Srv_Features) -and refer to the hostname or IP address of the connecting system. -A default case can be specified by using just the tag. For example, -the following entries in the access map: +MTAs with STARTTLS interoperability issues. To be able to send to +(or receive from) those MTAs several features are available: + +1) Various TLS options be be set per IP/domain. +2) STARTTLS can be turned off for specific IP addresses/domains. + +About 1): the rulesets tls_srv_features and tls_clt_features can +be used to return a (semicolon separated) list of TLS related +options: + +- Options: compare {Server,Client}SSLOptions. +- CipherList: same as the global option. +- CertFile, KeyFile: {Server,Client}{Cert,Key}File + +If FEATURE(`tls_session_features') is used, then default rulesets +are activated which look up entries in the access map with the tags +TLS_Srv_features and TLS_Clt_features, respectively. +For example, these entries: + + TLS_Srv_features:10.0.2.4 CipherList=MEDIUM+aRSA; + TLS_Clt_features:10.1.0.1 Options=SSL_OP_NO_TLSv1_2; CipherList=ALL:-EXPORT + +specify a cipherlist with MEDIUM strength ciphers that use RSA +certificates only for the client with the IP address 10.0.2.4, +and turn off TLSv1.2 when connecting to the server with the IP +address 10.1.0.1 as well as setting a specific cipherlist. +If FEATURE(`tls_session_features') is not used the user can provide +their own rulesets which must return the appropriate data. +If the rulesets are not defined or do not return a value, the +default TLS options are not modified. +(These rulesets require the sendmail binary to be built with +_FFR_TLS_SE_OPTS enabled.) + +About 2): the ruleset try_tls (srv_features) can be used that work +together with the access map. Entries for the access map must be +tagged with Try_TLS (Srv_Features) and refer to the hostname or IP +address of the connecting system. A default case can be specified +by using just the tag. For example, the following entries in the +access map: Try_TLS:broken.server NO Srv_Features:my.domain v @@ -3756,6 +3828,12 @@ confSINGLE_THREAD_DELIVERY SingleThread cached but otherwise idle connection to a host will prevent other sendmails from connecting to the other host. +confUSE_COMPRESSED_IPV6_ADDRESSES + UseCompressedIPv6Addresses + [undefined] If set, use the compressed + form of IPv6 addresses, such as + IPV6:::1, instead of the uncompressed + form, such as IPv6:0:0:0:0:0:0:0:1. confUSE_ERRORS_TO* UseErrorsTo [False] Use the Errors-To: header to deliver error messages. This should not be necessary because of general @@ -3990,6 +4068,13 @@ confWORK_TIME_FACTOR RetryFactor [90000] confQUEUE_SORT_ORDER QueueSortOrder [Priority] Queue sort algorithm: Priority, Host, Filename, Random, Modification, or Time. +confMAX_QUEUE_AGE MaxQueueAge [undefined] If set to a value greater + than zero, entries in the queue + will be retried during a queue run + only if the individual retry time + has been reached which is doubled + for each attempt. The maximum retry + time is limited by the specified value. confMIN_QUEUE_AGE MinQueueAge [0] The minimum amount of time a job must sit in the queue between queue runs. This allows you to set the @@ -4208,7 +4293,7 @@ confAUTH_MECHANISMS AuthMechanisms [GSSA confAUTH_REALM AuthRealm [undefined] The authentication realm that is passed to the Cyrus SASL library. If no realm is specified, - $j is used. + $j is used. See KNOWNBUGS. confDEF_AUTH_INFO DefaultAuthInfo [undefined] Name of file that contains authentication information for outgoing connections. This file must @@ -4241,6 +4326,14 @@ confTLS_SRV_OPTIONS TLSSrvOptions If thi verification is performed, i.e., the server doesn't ask for a certificate. +confSERVER_SSL_OPTIONS ServerSSLOptions [undefined] SSL related + options for server side. See + SSL_CTX_set_options(3) for a list. +confCLIENT_SSL_OPTIONS ClientSSLOptions [undefined] SSL related + options for client side. See + SSL_CTX_set_options(3) for a list. +confCIPHER_LIST CipherList [undefined] Cipher list for TLS. + See ciphers(1) for possible values. confLDAP_DEFAULT_SPEC LDAPDefaultSpec [undefined] Default map specification for LDAP maps. The value should only contain LDAP @@ -4250,10 +4343,11 @@ confLDAP_DEFAULT_SPEC LDAPDefaultSpec [u maps unless they are specified in the individual map specification ('K' command). -confCACERT_PATH CACertPath [undefined] Path to directory - with certs of CAs. -confCACERT CACertFile [undefined] File containing one CA - cert. +confCACERT_PATH CACertPath [undefined] Path to directory with + certificates of CAs which must contain + their hashes as filenames or links. +confCACERT CACertFile [undefined] File containing at least + one CA certificate. confSERVER_CERT ServerCertFile [undefined] File containing the cert of the server, i.e., this cert is used when sendmail acts as @@ -4281,6 +4375,10 @@ confRAND_FILE RandFile [undefined] File requires this option if the compile flag HASURANDOM is not set (see sendmail/README). +confCERT_FINGERPRINT_ALGORITHM CertFingerprintAlgorithm + [undefined] The fingerprint algorithm + (digest) to use for the presented + cert. confNICE_QUEUE_RUN NiceQueueRun [undefined] If set, the priority of queue runners is set the given value (nice(3)). Modified: head/contrib/sendmail/cf/cf/Makefile ============================================================================== --- head/contrib/sendmail/cf/cf/Makefile Tue Jul 7 02:42:48 2015 (r285228) +++ head/contrib/sendmail/cf/cf/Makefile Tue Jul 7 02:59:02 2015 (r285229) @@ -100,6 +100,7 @@ M4FILES=\ ${CFDIR}/feature/access_db.m4 \ ${CFDIR}/feature/allmasquerade.m4 \ ${CFDIR}/feature/always_add_domain.m4 \ + ${CFDIR}/feature/bcc.m4 \ ${CFDIR}/feature/bestmx_is_local.m4 \ ${CFDIR}/feature/bitdomain.m4 \ ${CFDIR}/feature/blacklist_recipients.m4 \ @@ -118,9 +119,11 @@ M4FILES=\ ${CFDIR}/feature/masquerade_envelope.m4 \ ${CFDIR}/feature/no_default_msa.m4 \ ${CFDIR}/feature/nocanonify.m4 \ + ${CFDIR}/feature/nopercenthack.m4 \ ${CFDIR}/feature/notsticky.m4 \ ${CFDIR}/feature/nouucp.m4 \ ${CFDIR}/feature/nullclient.m4 \ + ${CFDIR}/feature/prefixmod.m4 \ ${CFDIR}/feature/promiscuous_relay.m4 \ ${CFDIR}/feature/redirect.m4 \ ${CFDIR}/feature/ratecontrol.m4 \ @@ -131,12 +134,14 @@ M4FILES=\ ${CFDIR}/feature/relay_mail_from.m4 \ ${CFDIR}/feature/smrsh.m4 \ ${CFDIR}/feature/stickyhost.m4 \ + ${CFDIR}/feature/tls_session_features.m4 \ ${CFDIR}/feature/use_ct_file.m4 \ ${CFDIR}/feature/use_cw_file.m4 \ ${CFDIR}/feature/uucpdomain.m4 \ ${CFDIR}/feature/virtuser_entire_domain.m4 \ ${CFDIR}/feature/virtusertable.m4 \ ${CFDIR}/hack/cssubdomain.m4 \ + ${CFDIR}/hack/xconnect.m4 \ ${CFDIR}/m4/cf.m4 \ ${CFDIR}/m4/cfhead.m4 \ ${CFDIR}/m4/proto.m4 \ Modified: head/contrib/sendmail/cf/cf/submit.cf ============================================================================== --- head/contrib/sendmail/cf/cf/submit.cf Tue Jul 7 02:42:48 2015 (r285228) +++ head/contrib/sendmail/cf/cf/submit.cf Tue Jul 7 02:59:02 2015 (r285229) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@lab.smi.sendmail.com on Tue May 20 12:12:52 PDT 2014 -##### in /home/ca/sm8.git/sendmail/OpenSource/sendmail-8.14.9/cf/cf +##### built by ca@sandman.dev-lab.sendmail.com on Thu Jul 2 05:24:31 PDT 2015 +##### in /x/ca/smi.git/sendmail/OpenSource/sendmail-8.15.2/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.14.9/Submit +DZ8.15.2/Submit ############### @@ -202,6 +202,9 @@ O ConnectionCacheTimeout=5m # use Errors-To: header? O UseErrorsTo=False +# use compressed IPv6 address format? +#O UseCompressedIPv6Addresses + # log level O LogLevel=9 @@ -251,6 +254,9 @@ O PrivacyOptions=goaway,noetrn,restrictq # minimum time in queue before retry #O MinQueueAge=30m +# maximum time in queue before retry (if > 0; only for exponential delay) +#O MaxQueueAge + # how many jobs can you process in the queue? #O MaxQueueRunSize=0 @@ -501,6 +507,12 @@ O PidFile=/var/spool/clientmqueue/sm-cli # SMTP STARTTLS server options #O TLSSrvOptions +# SSL cipherlist +#O CipherList +# server side SSL options +#O ServerSSLOptions +# client side SSL options +#O ClientSSLOptions # Input mail filters #O InputMailFilters @@ -524,6 +536,8 @@ O PidFile=/var/spool/clientmqueue/sm-cli #O DHParameters # Random data source (required for systems without /dev/urandom under OpenSSL) #O RandFile +# fingerprint algorithm (digest) to use for the presented cert +#O CertFingerprintAlgorithm # Maximum number of "useless" commands before slowing down #O MaxNOOPCommands=20 @@ -531,6 +545,8 @@ O PidFile=/var/spool/clientmqueue/sm-cli # Name to use for EHLO (defaults to $j) #O HeloName + + ############################ # QUEUE GROUP DEFINITIONS # ############################ @@ -645,6 +661,7 @@ R$- . $- :: $+ $@ $>Canonify2 $3 < @ $1 # if we have % signs, take the rightmost one R$* % $* $1 @ $2 First make them all @s. R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last. + R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish # else we must be a local name @@ -781,6 +798,7 @@ R$* $=O $* < @ *LOCAL* > $@ $>Parse0 $>canonify $1 $2 $3 ...@*LOCAL* -> ... R$* < @ *LOCAL* > $: $1 + # # Parse1 -- the bottom half of ruleset 0. # @@ -818,6 +836,8 @@ R$* < @$* > $* $#esmtp $@ $2 $: $1 < @ R$=L $#local $: @ $1 special local names R$+ $#local $: $1 regular local names + + ########################################################################### ### Ruleset 5 -- special rewriting after aliases have been expanded ### ########################################################################### @@ -1027,6 +1047,10 @@ R$* $| $* $: $2 R<@> < $* @ localhost > $: < ? $&{client_name} > < $1 @ localhost > R<@> < $* @ [127.0.0.1] > $: < ? $&{client_name} > < $1 @ [127.0.0.1] > +R<@> < $* @ [IPv6:0:0:0:0:0:0:0:1] > + $: < ? $&{client_name} > < $1 @ [IPv6:0:0:0:0:0:0:0:1] > +R<@> < $* @ [IPv6:::1] > + $: < ? $&{client_name} > < $1 @ [IPv6:::1] > R<@> < $* @ localhost.$m > $: < ? $&{client_name} > < $1 @ localhost.$m > R<@> < $* @ localhost.UUCP > @@ -1141,6 +1165,7 @@ R$* $: $&{client_addr} R$@ $@ RELAY originated locally R0 $@ RELAY originated locally R127.0.0.1 $@ RELAY originated locally +RIPv6:0:0:0:0:0:0:0:1 $@ RELAY originated locally RIPv6:::1 $@ RELAY originated locally R$=R $* $@ RELAY relayable IP address R$* $: [ $1 ] put brackets around it... @@ -1245,6 +1270,8 @@ STLS_connection RSOFTWARE $#error $@ 4.7.0 $: "403 TLS handshake." + + ###################################################################### ### RelayTLS: allow relaying based on TLS authentication ### @@ -1442,7 +1469,7 @@ Mrelay, P=[IPC], F=mDFMuXa8k, S=EnvFrom ### submit.mc ### # divert(-1) # # *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jul 7 03:00:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AB0B99335D; Tue, 7 Jul 2015 03:00:58 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 8AAA710E5; Tue, 7 Jul 2015 03:00:58 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6730waX075346; Tue, 7 Jul 2015 03:00:58 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6730wUW075343; Tue, 7 Jul 2015 03:00:58 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507070300.t6730wUW075343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Tue, 7 Jul 2015 03:00:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285230 - head/etc/sendmail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 03:00:58 -0000 Author: gshapiro Date: Tue Jul 7 03:00:57 2015 New Revision: 285230 URL: https://svnweb.freebsd.org/changeset/base/285230 Log: Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.15.2/cf tree. MFC after: 3 days Modified: head/etc/sendmail/freebsd.mc head/etc/sendmail/freebsd.submit.mc Modified: head/etc/sendmail/freebsd.mc ============================================================================== --- head/etc/sendmail/freebsd.mc Tue Jul 7 02:59:02 2015 (r285229) +++ head/etc/sendmail/freebsd.mc Tue Jul 7 03:00:57 2015 (r285230) @@ -42,7 +42,6 @@ divert(-1) # /usr/share/sendmail/cf/README or # /usr/src/contrib/sendmail/cf/README # -# # NOTE: If you enable RunAsUser, make sure that you adjust the permissions # and owner of the SSL certificates and keys in /etc/mail/certs to be usable # by that user. Modified: head/etc/sendmail/freebsd.submit.mc ============================================================================== --- head/etc/sendmail/freebsd.submit.mc Tue Jul 7 02:59:02 2015 (r285229) +++ head/etc/sendmail/freebsd.submit.mc Tue Jul 7 03:00:57 2015 (r285230) @@ -7,7 +7,6 @@ divert(-1) # forth in the LICENSE file which can be found at the top level of # the sendmail distribution. # -# # # This is the FreeBSD configuration for a set-group-ID sm-msp sendmail From owner-svn-src-all@freebsd.org Tue Jul 7 03:02:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C22F993491; Tue, 7 Jul 2015 03:02:10 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 CA645164B; Tue, 7 Jul 2015 03:02:09 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6732824076597; Tue, 7 Jul 2015 03:02:08 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67328Xp076596; Tue, 7 Jul 2015 03:02:08 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507070302.t67328Xp076596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Tue, 7 Jul 2015 03:02:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285231 - head/contrib/sendmail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 03:02:10 -0000 Author: gshapiro Date: Tue Jul 7 03:02:07 2015 New Revision: 285231 URL: https://svnweb.freebsd.org/changeset/base/285231 Log: Update for sendmail 8.15.2 import MFC after: 3 days Modified: head/contrib/sendmail/FREEBSD-upgrade Modified: head/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- head/contrib/sendmail/FREEBSD-upgrade Tue Jul 7 03:00:57 2015 (r285230) +++ head/contrib/sendmail/FREEBSD-upgrade Tue Jul 7 03:02:07 2015 (r285231) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.14.9 +sendmail 8.15.2 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -97,4 +97,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -21-May-2014 +06-July-2015 From owner-svn-src-all@freebsd.org Tue Jul 7 03:03:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F2DF99358B; Tue, 7 Jul 2015 03:03:18 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 7AE021C5A; Tue, 7 Jul 2015 03:03:18 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6733Ixv076795; Tue, 7 Jul 2015 03:03:18 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6733I4K076794; Tue, 7 Jul 2015 03:03:18 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507070303.t6733I4K076794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Tue, 7 Jul 2015 03:03:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285232 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 03:03:18 -0000 Author: gshapiro Date: Tue Jul 7 03:03:17 2015 New Revision: 285232 URL: https://svnweb.freebsd.org/changeset/base/285232 Log: Add warning about change of behavior for sendmail 8.15.2 under FreeBSD 11 with regards to IPv6 address representation in configuration/maps/rulesets. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Jul 7 03:02:07 2015 (r285231) +++ head/UPDATING Tue Jul 7 03:03:17 2015 (r285232) @@ -31,6 +31,20 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20150706: + sendmail has been updated to 8.15.2. Starting with FreeBSD 11.0 + and sendmail 8.15, sendmail uses uncompressed IPv6 addresses by + default, i.e., they will not contain "::". For example, instead + of ::1, it will be 0:0:0:0:0:0:0:1. This permits a zero subnet + to have a more specific match, such as different map entries for + IPv6:0:0 vs IPv6:0. This change requires that configuration + data (including maps, files, classes, custom ruleset, etc.) must + use the same format, so make certain such configuration data is + upgrading. As a very simple check search for patterns like + 'IPv6:[0-9a-fA-F:]*::' and 'IPv6::'. To return to the old + behavior, set the m4 option confUSE_COMPRESSED_IPV6_ADDRESSES or + the cf option UseCompressedIPv6Addresses. + 20150630: The default kernel entropy-processing algorithm is now Fortuna, replacing Yarrow. From owner-svn-src-all@freebsd.org Tue Jul 7 03:06:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3676A9935B8; Tue, 7 Jul 2015 03:06:57 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 1C08C1DE8; Tue, 7 Jul 2015 03:06:57 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6736uZT077306; Tue, 7 Jul 2015 03:06:56 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6736uHL077305; Tue, 7 Jul 2015 03:06:56 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507070306.t6736uHL077305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Tue, 7 Jul 2015 03:06:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285233 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 03:06:57 -0000 Author: gshapiro Date: Tue Jul 7 03:06:56 2015 New Revision: 285233 URL: https://svnweb.freebsd.org/changeset/base/285233 Log: Note merge to head for sendmail 8.15.2 along with a special note for those upgrading to FreeBSD 11. MFC after: 3 days Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jul 7 03:03:17 2015 (r285232) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jul 7 03:06:56 2015 (r285233) @@ -403,9 +403,20 @@ Clang have been updated to version 3.4. - Sendmail has been - updated from 8.14.7 to 8.14.9. + sendmail + has been updated to 8.15.2. Starting with FreeBSD 11.0 and + sendmail 8.15, sendmail uses uncompressed IPv6 addresses by + default, i.e., they will not contain "::". For example, + instead of ::1, it will be 0:0:0:0:0:0:0:1. This permits a + zero subnet to have a more specific match, such as different + map entries for IPv6:0:0 vs IPv6:0. This change requires that + configuration data (including maps, files, classes, custom + ruleset, etc.) must use the same format, so make certain such + configuration data is upgrading. As a very simple check + search for patterns like 'IPv6:[0-9a-fA-F:]*::' and 'IPv6::'. + To return to the old behavior, set the m4 option + confUSE_COMPRESSED_IPV6_ADDRESSES or the cf option + UseCompressedIPv6Addresses. file has been updated to version 5.22. From owner-svn-src-all@freebsd.org Tue Jul 7 03:51:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E45EA993DD9; Tue, 7 Jul 2015 03:51:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 C8F0110C2; Tue, 7 Jul 2015 03:51:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t673pUOJ099096; Tue, 7 Jul 2015 03:51:30 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t673pUKp099094; Tue, 7 Jul 2015 03:51:30 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201507070351.t673pUKp099094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 7 Jul 2015 03:51:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285234 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 03:51:31 -0000 Author: adrian Date: Tue Jul 7 03:51:29 2015 New Revision: 285234 URL: https://svnweb.freebsd.org/changeset/base/285234 Log: Attempt to make 5GHz HT/40 work on the 6xxx series NICs. The 6205 (Taylor Peak) in the Lenovo X230 works fine in 5GHz 11a and 11n HT20, but not 11n HT40. The NIC goes RX deaf the moment HT40 is configured. It's so RX deaf that it doesn't even hear beacons and the firmware sends "BEACON MISS" events. That's pretty deaf. I tried configuring up the HT40 flags in monitor mode and it worked - so I assumed that doing the transition from 20 -> 40MHz channel configuration when going auth->assoc (ie, after the NIC has been partially configured) is a problem. So for now, let's just always set them if they're available. Tested: * Intel 5300, STA mode, 5GHz HT/40 AP; 2GHz HT/20 AP * Intel 6205, STA mode, 5GHz HT/40, HT20, 11a AP; 2GHz HT/20 AP This was pointed out to me by coworkers trying to use FreeBSD-HEAD in the office on their Thinkpad T420p laptops. TODO: * I don't like how the HT40 flags are configured - the whole interop/ protection config should be re-checked. Notably, I think curhtprotmode is 0 in a lot of cases, which means "no interoperability" and i think that's busted. Sponsored by: Norse Corp, Inc. Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnreg.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Tue Jul 7 03:06:56 2015 (r285233) +++ head/sys/dev/iwn/if_iwn.c Tue Jul 7 03:51:29 2015 (r285234) @@ -6503,6 +6503,34 @@ iwn5000_runtime_calib(struct iwn_softc * return iwn_cmd(sc, IWN5000_CMD_CALIB_CONFIG, &cmd, sizeof(cmd), 0); } +static uint32_t +iwn_get_rxon_ht_flags(struct iwn_softc *sc, struct ieee80211_channel *c) +{ + uint32_t htflags = 0; + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + + if (! IEEE80211_IS_CHAN_HT(c)) + return (0); + + htflags |= IWN_RXON_HT_PROTMODE(ic->ic_curhtprotmode); + + if (IEEE80211_IS_CHAN_HT40(c)) { + switch (ic->ic_curhtprotmode) { + case IEEE80211_HTINFO_OPMODE_HT20PR: + htflags |= IWN_RXON_HT_MODEPURE40; + break; + default: + htflags |= IWN_RXON_HT_MODEMIXED; + break; + } + } + if (IEEE80211_IS_CHAN_HT40D(c)) + htflags |= IWN_RXON_HT_HT40MINUS; + + return (htflags); +} + static int iwn_config(struct iwn_softc *sc) { @@ -6633,7 +6661,12 @@ iwn_config(struct iwn_softc *sc) __func__, sc->rxchainmask, sc->nrxchains); - DPRINTF(sc, IWN_DEBUG_RESET, "%s: setting configuration\n", __func__); + + sc->rxon->flags |= htole32(iwn_get_rxon_ht_flags(sc, ic->ic_curchan)); + + DPRINTF(sc, IWN_DEBUG_RESET, + "%s: setting configuration; flags=0x%08x\n", + __func__, le32toh(sc->rxon->flags)); if (sc->sc_is_scanning) device_printf(sc->sc_dev, "%s: is_scanning set, before RXON\n", @@ -7036,6 +7069,10 @@ iwn_auth(struct iwn_softc *sc, struct ie sc->rxon->cck_mask = 0x03; sc->rxon->ofdm_mask = 0x15; } + + /* try HT */ + sc->rxon->flags |= htole32(iwn_get_rxon_ht_flags(sc, ic->ic_curchan)); + DPRINTF(sc, IWN_DEBUG_STATE, "rxon chan %d flags %x cck %x ofdm %x\n", sc->rxon->chan, sc->rxon->flags, sc->rxon->cck_mask, sc->rxon->ofdm_mask); @@ -7080,7 +7117,6 @@ iwn_run(struct iwn_softc *sc, struct iee struct ieee80211com *ic = ifp->if_l2com; struct ieee80211_node *ni = vap->iv_bss; struct iwn_node_info node; - uint32_t htflags = 0; int error; DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__); @@ -7119,25 +7155,11 @@ iwn_run(struct iwn_softc *sc, struct iee sc->rxon->cck_mask = 0x0f; sc->rxon->ofdm_mask = 0x15; } - if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) { - htflags |= IWN_RXON_HT_PROTMODE(ic->ic_curhtprotmode); - if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) { - switch (ic->ic_curhtprotmode) { - case IEEE80211_HTINFO_OPMODE_HT20PR: - htflags |= IWN_RXON_HT_MODEPURE40; - break; - default: - htflags |= IWN_RXON_HT_MODEMIXED; - break; - } - } - if (IEEE80211_IS_CHAN_HT40D(ni->ni_chan)) - htflags |= IWN_RXON_HT_HT40MINUS; - } - sc->rxon->flags |= htole32(htflags); + /* try HT */ + sc->rxon->flags |= htole32(iwn_get_rxon_ht_flags(sc, ni->ni_chan)); sc->rxon->filter |= htole32(IWN_FILTER_BSS); - DPRINTF(sc, IWN_DEBUG_STATE, "rxon chan %d flags %x\n", - sc->rxon->chan, sc->rxon->flags); + DPRINTF(sc, IWN_DEBUG_STATE, "rxon chan %d flags %x, curhtprotmode=%d\n", + sc->rxon->chan, le32toh(sc->rxon->flags), ic->ic_curhtprotmode); if (sc->sc_is_scanning) device_printf(sc->sc_dev, "%s: is_scanning set, before RXON\n", Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Tue Jul 7 03:06:56 2015 (r285233) +++ head/sys/dev/iwn/if_iwnreg.h Tue Jul 7 03:51:29 2015 (r285234) @@ -586,9 +586,13 @@ struct iwn_rxon { #define IWN_RXON_ANTENNA_B (1 << 9) #define IWN_RXON_TSF (1 << 15) #define IWN_RXON_HT_HT40MINUS (1 << 22) + #define IWN_RXON_HT_PROTMODE(x) (x << 23) + +/* 0=legacy, 1=pure40, 2=mixed */ #define IWN_RXON_HT_MODEPURE40 (1 << 25) #define IWN_RXON_HT_MODEMIXED (2 << 25) + #define IWN_RXON_CTS_TO_SELF (1 << 30) uint32_t filter; From owner-svn-src-all@freebsd.org Tue Jul 7 04:09:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7743A98E089; Tue, 7 Jul 2015 04:09:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 4D4781926; Tue, 7 Jul 2015 04:09:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6749a8M007338; Tue, 7 Jul 2015 04:09:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6749abJ007337; Tue, 7 Jul 2015 04:09:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507070409.t6749abJ007337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 7 Jul 2015 04:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285235 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 04:09:36 -0000 Author: gjb Date: Tue Jul 7 04:09:35 2015 New Revision: 285235 URL: https://svnweb.freebsd.org/changeset/base/285235 Log: Sort by svn revision. Fix a few FDP style nits. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jul 7 03:51:29 2015 (r285234) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jul 7 04:09:35 2015 (r285235) @@ -403,21 +403,6 @@ Clang have been updated to version 3.4. - sendmail - has been updated to 8.15.2. Starting with FreeBSD 11.0 and - sendmail 8.15, sendmail uses uncompressed IPv6 addresses by - default, i.e., they will not contain "::". For example, - instead of ::1, it will be 0:0:0:0:0:0:0:1. This permits a - zero subnet to have a more specific match, such as different - map entries for IPv6:0:0 vs IPv6:0. This change requires that - configuration data (including maps, files, classes, custom - ruleset, etc.) must use the same format, so make certain such - configuration data is upgrading. As a very simple check - search for patterns like 'IPv6:[0-9a-fA-F:]*::' and 'IPv6::'. - To return to the old behavior, set the m4 option - confUSE_COMPRESSED_IPV6_ADDRESSES or the cf option - UseCompressedIPv6Addresses. - file has been updated to version 5.22. @@ -487,6 +472,22 @@ The &man.file.1; utility has been updated to version 5.23. + + sendmail has + been updated to 8.15.2. Starting with &os; 11.0 and + sendmail 8.15, sendmail uses uncompressed IPv6 addresses by + default, i.e., they will not contain ::. For + example, instead of ::1, it will be + 0:0:0:0:0:0:0:1. This permits a zero subnet to + have a more specific match, such as different map entries for + IPv6:0:0 vs IPv6:0. This change requires that configuration + data (including maps, files, classes, custom ruleset, etc.) + must use the same format, so make certain such configuration + data is upgrading. As a very simple check search for patterns + like 'IPv6:[0-9a-fA-F:]*::' and 'IPv6::'. To return to the + old behavior, set the m4 option + confUSE_COMPRESSED_IPV6_ADDRESSES or the cf + option UseCompressedIPv6Addresses. From owner-svn-src-all@freebsd.org Tue Jul 7 04:15:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AA7F98E27F; Tue, 7 Jul 2015 04:15:24 +0000 (UTC) (envelope-from whu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 391571DC2; Tue, 7 Jul 2015 04:15:24 +0000 (UTC) (envelope-from whu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t674FO0L011943; Tue, 7 Jul 2015 04:15:24 GMT (envelope-from whu@FreeBSD.org) Received: (from whu@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t674FMtk011936; Tue, 7 Jul 2015 04:15:22 GMT (envelope-from whu@FreeBSD.org) Message-Id: <201507070415.t674FMtk011936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: whu set sender to whu@FreeBSD.org using -f From: Wei Hu Date: Tue, 7 Jul 2015 04:15:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285236 - in stable/10/sys/dev/hyperv: include netvsc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 04:15:24 -0000 Author: whu Date: Tue Jul 7 04:15:22 2015 New Revision: 285236 URL: https://svnweb.freebsd.org/changeset/base/285236 Log: MFC r284746 and r284889 TSO and checksum offloading support for Netvsc driver on Hyper-V. Submitted by: whu Reviewed by: royger Approved by: re Relnotes: yes Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D2906 Modified: stable/10/sys/dev/hyperv/include/hyperv.h stable/10/sys/dev/hyperv/netvsc/hv_net_vsc.c stable/10/sys/dev/hyperv/netvsc/hv_net_vsc.h stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c stable/10/sys/dev/hyperv/netvsc/hv_rndis.h stable/10/sys/dev/hyperv/netvsc/hv_rndis_filter.c stable/10/sys/dev/hyperv/netvsc/hv_rndis_filter.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/include/hyperv.h ============================================================================== --- stable/10/sys/dev/hyperv/include/hyperv.h Tue Jul 7 04:09:35 2015 (r285235) +++ stable/10/sys/dev/hyperv/include/hyperv.h Tue Jul 7 04:15:22 2015 (r285236) @@ -107,7 +107,7 @@ typedef uint8_t hv_bool_uint8_t; #define HV_MAX_PIPE_USER_DEFINED_BYTES 116 -#define HV_MAX_PAGE_BUFFER_COUNT 16 +#define HV_MAX_PAGE_BUFFER_COUNT 32 #define HV_MAX_MULTIPAGE_BUFFER_COUNT 32 #define HV_ALIGN_UP(value, align) \ Modified: stable/10/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/hv_net_vsc.c Tue Jul 7 04:09:35 2015 (r285235) +++ stable/10/sys/dev/hyperv/netvsc/hv_net_vsc.c Tue Jul 7 04:15:22 2015 (r285236) @@ -48,6 +48,7 @@ #include "hv_rndis.h" #include "hv_rndis_filter.h" +MALLOC_DEFINE(M_NETVSC, "netvsc", "Hyper-V netvsc driver"); /* * Forward declarations @@ -58,13 +59,10 @@ static int hv_nv_init_rx_buffer_with_ne static int hv_nv_destroy_send_buffer(netvsc_dev *net_dev); static int hv_nv_destroy_rx_buffer(netvsc_dev *net_dev); static int hv_nv_connect_to_vsp(struct hv_device *device); -static void hv_nv_on_send_completion(struct hv_device *device, - hv_vm_packet_descriptor *pkt); -static void hv_nv_on_receive(struct hv_device *device, - hv_vm_packet_descriptor *pkt); -static void hv_nv_send_receive_completion(struct hv_device *device, - uint64_t tid); - +static void hv_nv_on_send_completion(netvsc_dev *net_dev, + struct hv_device *device, hv_vm_packet_descriptor *pkt); +static void hv_nv_on_receive(netvsc_dev *net_dev, + struct hv_device *device, hv_vm_packet_descriptor *pkt); /* * @@ -75,7 +73,7 @@ hv_nv_alloc_net_device(struct hv_device netvsc_dev *net_dev; hn_softc_t *sc = device_get_softc(device->device); - net_dev = malloc(sizeof(netvsc_dev), M_DEVBUF, M_NOWAIT | M_ZERO); + net_dev = malloc(sizeof(netvsc_dev), M_NETVSC, M_NOWAIT | M_ZERO); if (net_dev == NULL) { return (NULL); } @@ -127,6 +125,34 @@ hv_nv_get_inbound_net_device(struct hv_d return (net_dev); } +int +hv_nv_get_next_send_section(netvsc_dev *net_dev) +{ + unsigned long bitsmap_words = net_dev->bitsmap_words; + unsigned long *bitsmap = net_dev->send_section_bitsmap; + unsigned long idx; + int ret = NVSP_1_CHIMNEY_SEND_INVALID_SECTION_INDEX; + int i; + + for (i = 0; i < bitsmap_words; i++) { + idx = ffs(~bitsmap[i]); + if (0 == idx) + continue; + + idx--; + if (i * BITS_PER_LONG + idx >= net_dev->send_section_count) + return (ret); + + if (synch_test_and_set_bit(idx, &bitsmap[i])) + continue; + + ret = i * BITS_PER_LONG + idx; + break; + } + + return (ret); +} + /* * Net VSC initialize receive buffer with net VSP * @@ -145,12 +171,8 @@ hv_nv_init_rx_buffer_with_net_vsp(struct return (ENODEV); } - net_dev->rx_buf = contigmalloc(net_dev->rx_buf_size, M_DEVBUF, + net_dev->rx_buf = contigmalloc(net_dev->rx_buf_size, M_NETVSC, M_ZERO, 0UL, BUS_SPACE_MAXADDR, PAGE_SIZE, 0); - if (net_dev->rx_buf == NULL) { - ret = ENOMEM; - goto cleanup; - } /* * Establish the GPADL handle for this buffer on this channel. @@ -201,7 +223,7 @@ hv_nv_init_rx_buffer_with_net_vsp(struct init_pkt->msgs.vers_1_msgs.send_rx_buf_complete.num_sections; net_dev->rx_sections = malloc(net_dev->rx_section_count * - sizeof(nvsp_1_rx_buf_section), M_DEVBUF, M_NOWAIT); + sizeof(nvsp_1_rx_buf_section), M_NETVSC, M_NOWAIT); if (net_dev->rx_sections == NULL) { ret = EINVAL; goto cleanup; @@ -245,7 +267,7 @@ hv_nv_init_send_buffer_with_net_vsp(stru return (ENODEV); } - net_dev->send_buf = contigmalloc(net_dev->send_buf_size, M_DEVBUF, + net_dev->send_buf = contigmalloc(net_dev->send_buf_size, M_NETVSC, M_ZERO, 0UL, BUS_SPACE_MAXADDR, PAGE_SIZE, 0); if (net_dev->send_buf == NULL) { ret = ENOMEM; @@ -258,7 +280,7 @@ hv_nv_init_send_buffer_with_net_vsp(stru * channel to establish the gpadl handle. */ ret = hv_vmbus_channel_establish_gpadl(device->channel, - net_dev->send_buf, net_dev->send_buf_size, + net_dev->send_buf, net_dev->send_buf_size, &net_dev->send_buf_gpadl_handle); if (ret != 0) { goto cleanup; @@ -279,7 +301,7 @@ hv_nv_init_send_buffer_with_net_vsp(stru /* Send the gpadl notification request */ ret = hv_vmbus_channel_send_packet(device->channel, init_pkt, - sizeof(nvsp_msg), (uint64_t)(uintptr_t)init_pkt, + sizeof(nvsp_msg), (uint64_t)init_pkt, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); if (ret != 0) { @@ -297,6 +319,17 @@ hv_nv_init_send_buffer_with_net_vsp(stru net_dev->send_section_size = init_pkt->msgs.vers_1_msgs.send_send_buf_complete.section_size; + net_dev->send_section_count = + net_dev->send_buf_size / net_dev->send_section_size; + net_dev->bitsmap_words = howmany(net_dev->send_section_count, + BITS_PER_LONG); + net_dev->send_section_bitsmap = + malloc(net_dev->bitsmap_words * sizeof(long), M_NETVSC, + M_NOWAIT | M_ZERO); + if (NULL == net_dev->send_section_bitsmap) { + ret = ENOMEM; + goto cleanup; + } goto exit; @@ -361,12 +394,12 @@ hv_nv_destroy_rx_buffer(netvsc_dev *net_ if (net_dev->rx_buf) { /* Free up the receive buffer */ - contigfree(net_dev->rx_buf, net_dev->rx_buf_size, M_DEVBUF); + contigfree(net_dev->rx_buf, net_dev->rx_buf_size, M_NETVSC); net_dev->rx_buf = NULL; } if (net_dev->rx_sections) { - free(net_dev->rx_sections, M_DEVBUF); + free(net_dev->rx_sections, M_NETVSC); net_dev->rx_sections = NULL; net_dev->rx_section_count = 0; } @@ -429,10 +462,14 @@ hv_nv_destroy_send_buffer(netvsc_dev *ne if (net_dev->send_buf) { /* Free up the receive buffer */ - contigfree(net_dev->send_buf, net_dev->send_buf_size, M_DEVBUF); + contigfree(net_dev->send_buf, net_dev->send_buf_size, M_NETVSC); net_dev->send_buf = NULL; } + if (net_dev->send_section_bitsmap) { + free(net_dev->send_section_bitsmap, M_NETVSC); + } + return (ret); } @@ -446,7 +483,7 @@ hv_nv_destroy_send_buffer(netvsc_dev *ne */ static int hv_nv_negotiate_nvsp_protocol(struct hv_device *device, netvsc_dev *net_dev, - uint32_t nvsp_ver) + uint32_t nvsp_ver) { nvsp_msg *init_pkt; int ret; @@ -523,8 +560,13 @@ hv_nv_connect_to_vsp(struct hv_device *d { netvsc_dev *net_dev; nvsp_msg *init_pkt; - uint32_t nvsp_vers; uint32_t ndis_version; + uint32_t protocol_list[] = { NVSP_PROTOCOL_VERSION_1, + NVSP_PROTOCOL_VERSION_2, + NVSP_PROTOCOL_VERSION_4, + NVSP_PROTOCOL_VERSION_5 }; + int i; + int protocol_number = nitems(protocol_list); int ret = 0; device_t dev = device->device; hn_softc_t *sc = device_get_softc(dev); @@ -536,26 +578,31 @@ hv_nv_connect_to_vsp(struct hv_device *d } /* - * Negotiate the NVSP version. Try NVSP v2 first. + * Negotiate the NVSP version. Try the latest NVSP first. */ - nvsp_vers = NVSP_PROTOCOL_VERSION_2; - ret = hv_nv_negotiate_nvsp_protocol(device, net_dev, nvsp_vers); - if (ret != 0) { - /* NVSP v2 failed, try NVSP v1 */ - nvsp_vers = NVSP_PROTOCOL_VERSION_1; - ret = hv_nv_negotiate_nvsp_protocol(device, net_dev, nvsp_vers); - if (ret != 0) { - /* NVSP v1 failed, return bad status */ - return (ret); + for (i = protocol_number - 1; i >= 0; i--) { + if (hv_nv_negotiate_nvsp_protocol(device, net_dev, + protocol_list[i]) == 0) { + net_dev->nvsp_version = protocol_list[i]; + if (bootverbose) + device_printf(dev, "Netvsc: got version 0x%x\n", + net_dev->nvsp_version); + break; } } - net_dev->nvsp_version = nvsp_vers; + + if (i < 0) { + if (bootverbose) + device_printf(dev, "failed to negotiate a valid " + "protocol.\n"); + return (EPROTO); + } /* * Set the MTU if supported by this NVSP protocol version * This needs to be right after the NVSP init message per Haiyang */ - if (nvsp_vers >= NVSP_PROTOCOL_VERSION_2) + if (net_dev->nvsp_version >= NVSP_PROTOCOL_VERSION_2) ret = hv_nv_send_ndis_config(device, ifp->if_mtu); /* @@ -565,10 +612,11 @@ hv_nv_connect_to_vsp(struct hv_device *d memset(init_pkt, 0, sizeof(nvsp_msg)); - /* - * Updated to version 5.1, minimum, for VLAN per Haiyang - */ - ndis_version = NDIS_VERSION; + if (net_dev->nvsp_version <= NVSP_PROTOCOL_VERSION_4) { + ndis_version = NDIS_VERSION_6_1; + } else { + ndis_version = NDIS_VERSION_6_30; + } init_pkt->hdr.msg_type = nvsp_msg_1_type_send_ndis_vers; init_pkt->msgs.vers_1_msgs.send_ndis_vers.ndis_major_vers = @@ -620,9 +668,7 @@ netvsc_dev * hv_nv_on_device_add(struct hv_device *device, void *additional_info) { netvsc_dev *net_dev; - netvsc_packet *packet; - netvsc_packet *next_packet; - int i, ret = 0; + int ret = 0; net_dev = hv_nv_alloc_net_device(device); if (!net_dev) @@ -630,29 +676,9 @@ hv_nv_on_device_add(struct hv_device *de /* Initialize the NetVSC channel extension */ net_dev->rx_buf_size = NETVSC_RECEIVE_BUFFER_SIZE; - mtx_init(&net_dev->rx_pkt_list_lock, "HV-RPL", NULL, - MTX_SPIN | MTX_RECURSE); net_dev->send_buf_size = NETVSC_SEND_BUFFER_SIZE; - /* Same effect as STAILQ_HEAD_INITIALIZER() static initializer */ - STAILQ_INIT(&net_dev->myrx_packet_list); - - /* - * malloc a sufficient number of netvsc_packet buffers to hold - * a packet list. Add them to the netvsc device packet queue. - */ - for (i=0; i < NETVSC_RECEIVE_PACKETLIST_COUNT; i++) { - packet = malloc(sizeof(netvsc_packet) + - (NETVSC_RECEIVE_SG_COUNT * sizeof(hv_vmbus_page_buffer)), - M_DEVBUF, M_NOWAIT | M_ZERO); - if (!packet) { - break; - } - STAILQ_INSERT_TAIL(&net_dev->myrx_packet_list, packet, - mylist_entry); - } - sema_init(&net_dev->channel_init_sema, 0, "netdev_sema"); /* @@ -685,19 +711,7 @@ cleanup: */ if (net_dev) { sema_destroy(&net_dev->channel_init_sema); - - packet = STAILQ_FIRST(&net_dev->myrx_packet_list); - while (packet != NULL) { - next_packet = STAILQ_NEXT(packet, mylist_entry); - free(packet, M_DEVBUF); - packet = next_packet; - } - /* Reset the list to initial state */ - STAILQ_INIT(&net_dev->myrx_packet_list); - - mtx_destroy(&net_dev->rx_pkt_list_lock); - - free(net_dev, M_DEVBUF); + free(net_dev, M_NETVSC); } return (NULL); @@ -709,8 +723,6 @@ cleanup: int hv_nv_on_device_remove(struct hv_device *device, boolean_t destroy_channel) { - netvsc_packet *net_vsc_pkt; - netvsc_packet *next_net_vsc_pkt; hn_softc_t *sc = device_get_softc(device->device); netvsc_dev *net_dev = sc->net_dev;; @@ -737,20 +749,8 @@ hv_nv_on_device_remove(struct hv_device hv_vmbus_channel_close(device->channel); - /* Release all resources */ - net_vsc_pkt = STAILQ_FIRST(&net_dev->myrx_packet_list); - while (net_vsc_pkt != NULL) { - next_net_vsc_pkt = STAILQ_NEXT(net_vsc_pkt, mylist_entry); - free(net_vsc_pkt, M_DEVBUF); - net_vsc_pkt = next_net_vsc_pkt; - } - - /* Reset the list to initial state */ - STAILQ_INIT(&net_dev->myrx_packet_list); - - mtx_destroy(&net_dev->rx_pkt_list_lock); sema_destroy(&net_dev->channel_init_sema); - free(net_dev, M_DEVBUF); + free(net_dev, M_NETVSC); return (0); } @@ -758,18 +758,13 @@ hv_nv_on_device_remove(struct hv_device /* * Net VSC on send completion */ -static void -hv_nv_on_send_completion(struct hv_device *device, hv_vm_packet_descriptor *pkt) +static void +hv_nv_on_send_completion(netvsc_dev *net_dev, + struct hv_device *device, hv_vm_packet_descriptor *pkt) { - netvsc_dev *net_dev; nvsp_msg *nvsp_msg_pkt; netvsc_packet *net_vsc_pkt; - net_dev = hv_nv_get_inbound_net_device(device); - if (!net_dev) { - return; - } - nvsp_msg_pkt = (nvsp_msg *)((unsigned long)pkt + (pkt->data_offset8 << 3)); @@ -780,17 +775,25 @@ hv_nv_on_send_completion(struct hv_devic == nvsp_msg_1_type_send_send_buf_complete) { /* Copy the response back */ memcpy(&net_dev->channel_init_packet, nvsp_msg_pkt, - sizeof(nvsp_msg)); + sizeof(nvsp_msg)); sema_post(&net_dev->channel_init_sema); } else if (nvsp_msg_pkt->hdr.msg_type == - nvsp_msg_1_type_send_rndis_pkt_complete) { + nvsp_msg_1_type_send_rndis_pkt_complete) { /* Get the send context */ net_vsc_pkt = (netvsc_packet *)(unsigned long)pkt->transaction_id; + if (NULL != net_vsc_pkt) { + if (net_vsc_pkt->send_buf_section_idx != + NVSP_1_CHIMNEY_SEND_INVALID_SECTION_INDEX) { + synch_change_bit(net_vsc_pkt->send_buf_section_idx, + net_dev->send_section_bitsmap); + } + + /* Notify the layer above us */ + net_vsc_pkt->compl.send.on_send_completion( + net_vsc_pkt->compl.send.send_completion_context); - /* Notify the layer above us */ - net_vsc_pkt->compl.send.on_send_completion( - net_vsc_pkt->compl.send.send_completion_context); + } atomic_subtract_int(&net_dev->num_outstanding_sends, 1); } @@ -821,10 +824,10 @@ hv_nv_on_send(struct hv_device *device, send_msg.msgs.vers_1_msgs.send_rndis_pkt.chan_type = 1; } - /* Not using send buffer section */ send_msg.msgs.vers_1_msgs.send_rndis_pkt.send_buf_section_idx = - 0xFFFFFFFF; - send_msg.msgs.vers_1_msgs.send_rndis_pkt.send_buf_section_size = 0; + pkt->send_buf_section_idx; + send_msg.msgs.vers_1_msgs.send_rndis_pkt.send_buf_section_size = + pkt->send_buf_section_size; if (pkt->page_buf_count) { ret = hv_vmbus_channel_send_packet_pagebuffer(device->channel, @@ -850,157 +853,81 @@ hv_nv_on_send(struct hv_device *device, * In the FreeBSD Hyper-V virtual world, this function deals exclusively * with virtual addresses. */ -static void -hv_nv_on_receive(struct hv_device *device, hv_vm_packet_descriptor *pkt) +static void +hv_nv_on_receive(netvsc_dev *net_dev, struct hv_device *device, + hv_vm_packet_descriptor *pkt) { - netvsc_dev *net_dev; hv_vm_transfer_page_packet_header *vm_xfer_page_pkt; nvsp_msg *nvsp_msg_pkt; - netvsc_packet *net_vsc_pkt = NULL; - unsigned long start; - xfer_page_packet *xfer_page_pkt = NULL; - STAILQ_HEAD(PKT_LIST, netvsc_packet_) mylist_head = - STAILQ_HEAD_INITIALIZER(mylist_head); + netvsc_packet vsc_pkt; + netvsc_packet *net_vsc_pkt = &vsc_pkt; + device_t dev = device->device; int count = 0; int i = 0; - - net_dev = hv_nv_get_inbound_net_device(device); - if (!net_dev) - return; + int status = nvsp_status_success; /* * All inbound packets other than send completion should be * xfer page packet. */ - if (pkt->type != HV_VMBUS_PACKET_TYPE_DATA_USING_TRANSFER_PAGES) + if (pkt->type != HV_VMBUS_PACKET_TYPE_DATA_USING_TRANSFER_PAGES) { + device_printf(dev, "packet type %d is invalid!\n", pkt->type); return; + } nvsp_msg_pkt = (nvsp_msg *)((unsigned long)pkt + (pkt->data_offset8 << 3)); /* Make sure this is a valid nvsp packet */ - if (nvsp_msg_pkt->hdr.msg_type != nvsp_msg_1_type_send_rndis_pkt) + if (nvsp_msg_pkt->hdr.msg_type != nvsp_msg_1_type_send_rndis_pkt) { + device_printf(dev, "packet hdr type %d is invalid!\n", + pkt->type); return; + } vm_xfer_page_pkt = (hv_vm_transfer_page_packet_header *)pkt; - if (vm_xfer_page_pkt->transfer_page_set_id - != NETVSC_RECEIVE_BUFFER_ID) { + if (vm_xfer_page_pkt->transfer_page_set_id != + NETVSC_RECEIVE_BUFFER_ID) { + device_printf(dev, "transfer_page_set_id %d is invalid!\n", + vm_xfer_page_pkt->transfer_page_set_id); return; } - STAILQ_INIT(&mylist_head); - - /* - * Grab free packets (range count + 1) to represent this xfer page - * packet. +1 to represent the xfer page packet itself. We grab it - * here so that we know exactly how many we can fulfill. - */ - mtx_lock_spin(&net_dev->rx_pkt_list_lock); - while (!STAILQ_EMPTY(&net_dev->myrx_packet_list)) { - net_vsc_pkt = STAILQ_FIRST(&net_dev->myrx_packet_list); - STAILQ_REMOVE_HEAD(&net_dev->myrx_packet_list, mylist_entry); - - STAILQ_INSERT_TAIL(&mylist_head, net_vsc_pkt, mylist_entry); - - if (++count == vm_xfer_page_pkt->range_count + 1) - break; - } - - mtx_unlock_spin(&net_dev->rx_pkt_list_lock); - - /* - * We need at least 2 netvsc pkts (1 to represent the xfer page - * and at least 1 for the range) i.e. we can handle some of the - * xfer page packet ranges... - */ - if (count < 2) { - /* Return netvsc packet to the freelist */ - mtx_lock_spin(&net_dev->rx_pkt_list_lock); - for (i=count; i != 0; i--) { - net_vsc_pkt = STAILQ_FIRST(&mylist_head); - STAILQ_REMOVE_HEAD(&mylist_head, mylist_entry); - - STAILQ_INSERT_TAIL(&net_dev->myrx_packet_list, - net_vsc_pkt, mylist_entry); - } - mtx_unlock_spin(&net_dev->rx_pkt_list_lock); - - hv_nv_send_receive_completion(device, - vm_xfer_page_pkt->d.transaction_id); - - return; - } - - /* Take the first packet in the list */ - xfer_page_pkt = (xfer_page_packet *)STAILQ_FIRST(&mylist_head); - STAILQ_REMOVE_HEAD(&mylist_head, mylist_entry); - - /* This is how many data packets we can supply */ - xfer_page_pkt->count = count - 1; + count = vm_xfer_page_pkt->range_count; + net_vsc_pkt->device = device; /* Each range represents 1 RNDIS pkt that contains 1 Ethernet frame */ - for (i=0; i < (count - 1); i++) { - net_vsc_pkt = STAILQ_FIRST(&mylist_head); - STAILQ_REMOVE_HEAD(&mylist_head, mylist_entry); - - /* - * Initialize the netvsc packet - */ - net_vsc_pkt->xfer_page_pkt = xfer_page_pkt; - net_vsc_pkt->compl.rx.rx_completion_context = net_vsc_pkt; - net_vsc_pkt->device = device; - /* Save this so that we can send it back */ - net_vsc_pkt->compl.rx.rx_completion_tid = - vm_xfer_page_pkt->d.transaction_id; - - net_vsc_pkt->tot_data_buf_len = - vm_xfer_page_pkt->ranges[i].byte_count; - net_vsc_pkt->page_buf_count = 1; - - net_vsc_pkt->page_buffers[0].length = - vm_xfer_page_pkt->ranges[i].byte_count; - - /* The virtual address of the packet in the receive buffer */ - start = ((unsigned long)net_dev->rx_buf + + for (i = 0; i < count; i++) { + net_vsc_pkt->status = nvsp_status_success; + net_vsc_pkt->data = (void *)((unsigned long)net_dev->rx_buf + vm_xfer_page_pkt->ranges[i].byte_offset); - start = ((unsigned long)start) & ~(PAGE_SIZE - 1); - - /* Page number of the virtual page containing packet start */ - net_vsc_pkt->page_buffers[0].pfn = start >> PAGE_SHIFT; - - /* Calculate the page relative offset */ - net_vsc_pkt->page_buffers[0].offset = - vm_xfer_page_pkt->ranges[i].byte_offset & (PAGE_SIZE - 1); - - /* - * In this implementation, we are dealing with virtual - * addresses exclusively. Since we aren't using physical - * addresses at all, we don't care if a packet crosses a - * page boundary. For this reason, the original code to - * check for and handle page crossings has been removed. - */ - - /* - * Pass it to the upper layer. The receive completion call - * has been moved into this function. - */ - hv_rf_on_receive(device, net_vsc_pkt); + net_vsc_pkt->tot_data_buf_len = + vm_xfer_page_pkt->ranges[i].byte_count; - /* - * Moved completion call back here so that all received - * messages (not just data messages) will trigger a response - * message back to the host. - */ - hv_nv_on_receive_completion(net_vsc_pkt); + hv_rf_on_receive(net_dev, device, net_vsc_pkt); + if (net_vsc_pkt->status != nvsp_status_success) { + status = nvsp_status_failure; + } } + + /* + * Moved completion call back here so that all received + * messages (not just data messages) will trigger a response + * message back to the host. + */ + hv_nv_on_receive_completion(device, vm_xfer_page_pkt->d.transaction_id, + status); } /* - * Net VSC send receive completion + * Net VSC on receive completion + * + * Send a receive completion packet to RNDIS device (ie NetVsp) */ -static void -hv_nv_send_receive_completion(struct hv_device *device, uint64_t tid) +void +hv_nv_on_receive_completion(struct hv_device *device, uint64_t tid, + uint32_t status) { nvsp_msg rx_comp_msg; int retries = 0; @@ -1010,7 +937,7 @@ hv_nv_send_receive_completion(struct hv_ /* Pass in the status */ rx_comp_msg.msgs.vers_1_msgs.send_rndis_pkt_complete.status = - nvsp_status_success; + status; retry_send_cmplt: /* Send the completion */ @@ -1031,81 +958,26 @@ retry_send_cmplt: } /* - * Net VSC on receive completion - * - * Send a receive completion packet to RNDIS device (ie NetVsp) - */ -void -hv_nv_on_receive_completion(void *context) -{ - netvsc_packet *packet = (netvsc_packet *)context; - struct hv_device *device = (struct hv_device *)packet->device; - netvsc_dev *net_dev; - uint64_t tid = 0; - boolean_t send_rx_completion = FALSE; - - /* - * Even though it seems logical to do a hv_nv_get_outbound_net_device() - * here to send out receive completion, we are using - * hv_nv_get_inbound_net_device() since we may have disabled - * outbound traffic already. - */ - net_dev = hv_nv_get_inbound_net_device(device); - if (net_dev == NULL) - return; - - /* Overloading use of the lock. */ - mtx_lock_spin(&net_dev->rx_pkt_list_lock); - - packet->xfer_page_pkt->count--; - - /* - * Last one in the line that represent 1 xfer page packet. - * Return the xfer page packet itself to the free list. - */ - if (packet->xfer_page_pkt->count == 0) { - send_rx_completion = TRUE; - tid = packet->compl.rx.rx_completion_tid; - STAILQ_INSERT_TAIL(&net_dev->myrx_packet_list, - (netvsc_packet *)(packet->xfer_page_pkt), mylist_entry); - } - - /* Put the packet back on the free list */ - STAILQ_INSERT_TAIL(&net_dev->myrx_packet_list, packet, mylist_entry); - mtx_unlock_spin(&net_dev->rx_pkt_list_lock); - - /* Send a receive completion for the xfer page packet */ - if (send_rx_completion) - hv_nv_send_receive_completion(device, tid); -} - -/* * Net VSC on channel callback */ static void hv_nv_on_channel_callback(void *context) { - /* Fixme: Magic number */ - const int net_pkt_size = 2048; struct hv_device *device = (struct hv_device *)context; netvsc_dev *net_dev; + device_t dev = device->device; uint32_t bytes_rxed; uint64_t request_id; - uint8_t *packet; - hv_vm_packet_descriptor *desc; + hv_vm_packet_descriptor *desc; uint8_t *buffer; - int bufferlen = net_pkt_size; - int ret = 0; - - packet = malloc(net_pkt_size * sizeof(uint8_t), M_DEVBUF, M_NOWAIT); - if (!packet) - return; - - buffer = packet; + int bufferlen = NETVSC_PACKET_SIZE; + int ret = 0; net_dev = hv_nv_get_inbound_net_device(device); if (net_dev == NULL) - goto out; + return; + + buffer = net_dev->callback_buf; do { ret = hv_vmbus_channel_recv_packet_raw(device->channel, @@ -1115,12 +987,15 @@ hv_nv_on_channel_callback(void *context) desc = (hv_vm_packet_descriptor *)buffer; switch (desc->type) { case HV_VMBUS_PACKET_TYPE_COMPLETION: - hv_nv_on_send_completion(device, desc); + hv_nv_on_send_completion(net_dev, device, desc); break; case HV_VMBUS_PACKET_TYPE_DATA_USING_TRANSFER_PAGES: - hv_nv_on_receive(device, desc); + hv_nv_on_receive(net_dev, device, desc); break; default: + device_printf(dev, + "hv_cb recv unknow type %d " + " packet\n", desc->type); break; } } else { @@ -1128,16 +1003,24 @@ hv_nv_on_channel_callback(void *context) } } else if (ret == ENOBUFS) { /* Handle large packet */ - free(buffer, M_DEVBUF); - buffer = malloc(bytes_rxed, M_DEVBUF, M_NOWAIT); + if (bufferlen > NETVSC_PACKET_SIZE) { + free(buffer, M_NETVSC); + buffer = NULL; + } + + /* alloc new buffer */ + buffer = malloc(bytes_rxed, M_NETVSC, M_NOWAIT); if (buffer == NULL) { + device_printf(dev, + "hv_cb malloc buffer failed, len=%u\n", + bytes_rxed); + bufferlen = 0; break; } bufferlen = bytes_rxed; } } while (1); -out: - free(buffer, M_DEVBUF); + if (bufferlen > NETVSC_PACKET_SIZE) + free(buffer, M_NETVSC); } - Modified: stable/10/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/hv_net_vsc.h Tue Jul 7 04:09:35 2015 (r285235) +++ stable/10/sys/dev/hyperv/netvsc/hv_net_vsc.h Tue Jul 7 04:15:22 2015 (r285236) @@ -41,20 +41,26 @@ #include #include #include +#include #include #include +MALLOC_DECLARE(M_NETVSC); #define NVSP_INVALID_PROTOCOL_VERSION (0xFFFFFFFF) #define NVSP_PROTOCOL_VERSION_1 2 #define NVSP_PROTOCOL_VERSION_2 0x30002 +#define NVSP_PROTOCOL_VERSION_4 0x40000 +#define NVSP_PROTOCOL_VERSION_5 0x50000 #define NVSP_MIN_PROTOCOL_VERSION (NVSP_PROTOCOL_VERSION_1) #define NVSP_MAX_PROTOCOL_VERSION (NVSP_PROTOCOL_VERSION_2) #define NVSP_PROTOCOL_VERSION_CURRENT NVSP_PROTOCOL_VERSION_2 +#define VERSION_4_OFFLOAD_SIZE 22 + #define NVSP_OPERATIONAL_STATUS_OK (0x00000000) #define NVSP_OPERATIONAL_STATUS_DEGRADED (0x00000001) #define NVSP_OPERATIONAL_STATUS_NONRECOVERABLE (0x00000002) @@ -544,7 +550,7 @@ typedef struct nvsp_2_msg_indicate_chimn #define NVSP_1_CHIMNEY_SEND_INVALID_OOB_INDEX 0xffffu -#define NVSP_1_CHIMNEY_SEND_INVALID_SECTION_INDEX 0xffffu +#define NVSP_1_CHIMNEY_SEND_INVALID_SECTION_INDEX 0xffffffff /* * NvspMessage2TypeSendChimneyPacket @@ -842,11 +848,11 @@ typedef struct nvsp_msg_ { * Defines */ -#define NETVSC_SEND_BUFFER_SIZE (64*1024) /* 64K */ +#define NETVSC_SEND_BUFFER_SIZE (1024*1024*15) /* 15M */ #define NETVSC_SEND_BUFFER_ID 0xface -#define NETVSC_RECEIVE_BUFFER_SIZE (1024*1024) /* 1MB */ +#define NETVSC_RECEIVE_BUFFER_SIZE (1024*1024*16) /* 16MB */ #define NETVSC_RECEIVE_BUFFER_ID 0xcafe @@ -862,6 +868,8 @@ typedef struct nvsp_msg_ { */ #define NETVSC_MAX_CONFIGURABLE_MTU (9 * 1024) +#define NETVSC_PACKET_SIZE PAGE_SIZE + /* * Data types */ @@ -873,15 +881,14 @@ typedef struct netvsc_dev_ { struct hv_device *dev; int num_outstanding_sends; - /* List of free preallocated NETVSC_PACKET to represent RX packet */ - STAILQ_HEAD(PQ, netvsc_packet_) myrx_packet_list; - struct mtx rx_pkt_list_lock; - /* Send buffer allocated by us but manages by NetVSP */ void *send_buf; uint32_t send_buf_size; uint32_t send_buf_gpadl_handle; uint32_t send_section_size; + uint32_t send_section_count; + unsigned long bitsmap_words; + unsigned long *send_section_bitsmap; /* Receive buffer allocated by us but managed by NetVSP */ void *rx_buf; @@ -903,35 +910,43 @@ typedef struct netvsc_dev_ { hv_bool_uint8_t destroy; /* Negotiated NVSP version */ uint32_t nvsp_version; + + uint8_t callback_buf[NETVSC_PACKET_SIZE]; } netvsc_dev; typedef void (*pfn_on_send_rx_completion)(void *); -#define NETVSC_DEVICE_RING_BUFFER_SIZE (64 * PAGE_SIZE) -#define NETVSC_PACKET_MAXPAGE 16 - +#define NETVSC_DEVICE_RING_BUFFER_SIZE (128 * PAGE_SIZE) +#define NETVSC_PACKET_MAXPAGE 32 -typedef struct xfer_page_packet_ { - /* - * This needs to be here because the network RX code casts - * an instantiation of this structure to a netvsc_packet. - */ - STAILQ_ENTRY(netvsc_packet_) mylist_entry; - uint32_t count; -} xfer_page_packet; +#define NETVSC_VLAN_PRIO_MASK 0xe000 +#define NETVSC_VLAN_PRIO_SHIFT 13 +#define NETVSC_VLAN_VID_MASK 0x0fff + +#define TYPE_IPV4 2 +#define TYPE_IPV6 4 +#define TYPE_TCP 2 +#define TYPE_UDP 4 + +#define TRANSPORT_TYPE_NOT_IP 0 +#define TRANSPORT_TYPE_IPV4_TCP ((TYPE_IPV4 << 16) | TYPE_TCP) +#define TRANSPORT_TYPE_IPV4_UDP ((TYPE_IPV4 << 16) | TYPE_UDP) +#define TRANSPORT_TYPE_IPV6_TCP ((TYPE_IPV6 << 16) | TYPE_TCP) +#define TRANSPORT_TYPE_IPV6_UDP ((TYPE_IPV6 << 16) | TYPE_UDP) + +#ifdef __LP64__ +#define BITS_PER_LONG 64 +#else +#define BITS_PER_LONG 32 +#endif typedef struct netvsc_packet_ { - /* - * List used when enqueued on &net_dev->rx_packet_list, - * and when enqueued within the netvsc code - */ - STAILQ_ENTRY(netvsc_packet_) mylist_entry; struct hv_device *device; hv_bool_uint8_t is_data_pkt; /* One byte */ uint16_t vlan_tci; - xfer_page_packet *xfer_page_pkt; + uint32_t status; /* Completion */ union { @@ -948,9 +963,12 @@ typedef struct netvsc_packet_ { pfn_on_send_rx_completion on_send_completion; } send; } compl; + uint32_t send_buf_section_idx; + uint32_t send_buf_section_size; - void *extension; + void *rndis_mesg; uint32_t tot_data_buf_len; + void *data; uint32_t page_buf_count; hv_vmbus_page_buffer page_buffers[NETVSC_PACKET_MAXPAGE]; } netvsc_packet; @@ -984,16 +1002,16 @@ typedef struct hn_softc { */ extern int hv_promisc_mode; -extern void netvsc_linkstatus_callback(struct hv_device *device_obj, - uint32_t status); -extern int netvsc_recv(struct hv_device *device_obj, netvsc_packet *packet); -extern void netvsc_xmit_completion(void *context); - -extern void hv_nv_on_receive_completion(void *context); -extern netvsc_dev *hv_nv_on_device_add(struct hv_device *device, void *additional_info); -extern int hv_nv_on_device_remove(struct hv_device *device, - boolean_t destroy_channel); -extern int hv_nv_on_send(struct hv_device *device, netvsc_packet *pkt); +void netvsc_linkstatus_callback(struct hv_device *device_obj, uint32_t status); +void netvsc_xmit_completion(void *context); +void hv_nv_on_receive_completion(struct hv_device *device, + uint64_t tid, uint32_t status); +netvsc_dev *hv_nv_on_device_add(struct hv_device *device, + void *additional_info); +int hv_nv_on_device_remove(struct hv_device *device, + boolean_t destroy_channel); +int hv_nv_on_send(struct hv_device *device, netvsc_packet *pkt); +int hv_nv_get_next_send_section(netvsc_dev *net_dev); #endif /* __HV_NET_VSC_H__ */ Modified: stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Jul 7 04:09:35 2015 (r285235) +++ stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Jul 7 04:15:22 2015 (r285236) @@ -55,6 +55,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_inet6.h" +#include "opt_inet.h" + #include #include #include @@ -83,6 +86,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include #include @@ -103,6 +109,8 @@ __FBSDID("$FreeBSD$"); #include +#include + #include #include "hv_net_vsc.h" #include "hv_rndis.h" @@ -165,6 +173,61 @@ static int hn_ioctl(struct ifnet *ifp, static int hn_start_locked(struct ifnet *ifp); static void hn_start(struct ifnet *ifp); +/* + * NetVsc get message transport protocol type + */ +static uint32_t get_transport_proto_type(struct mbuf *m_head) +{ + uint32_t ret_val = TRANSPORT_TYPE_NOT_IP; + uint16_t ether_type = 0; + int ether_len = 0; + struct ether_vlan_header *eh; +#ifdef INET *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jul 7 06:11:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D60D994C2E; Tue, 7 Jul 2015 06:11:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 16F1D1BE8; Tue, 7 Jul 2015 06:11:55 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id B078A784890; Tue, 7 Jul 2015 16:11:46 +1000 (AEST) Date: Tue, 7 Jul 2015 16:11:43 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ian Lepore cc: Neel Natu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285217 - head/usr.sbin/bhyve In-Reply-To: <1436213492.1334.64.camel@freebsd.org> Message-ID: <20150707122407.O1017@besplex.bde.org> References: <201507061933.t66JXTtJ050058@repo.freebsd.org> <1436213492.1334.64.camel@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ItbjC+Lg c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=T05rGouVSgg1oOgTFmIA:9 a=CjuIK1q_8ugA:10 a=qqRaIBg5ldsA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 06:11:56 -0000 On Mon, 6 Jul 2015, Ian Lepore wrote: > On Mon, 2015-07-06 at 19:33 +0000, Neel Natu wrote: >> Author: neel >> Date: Mon Jul 6 19:33:29 2015 >> New Revision: 285217 >> URL: https://svnweb.freebsd.org/changeset/base/285217 >> >> Log: >> Always assert DCD and DSR in bhyve's uart emulation. >> >> The /etc/ttys entry for a serial console in FreeBSD/x86 is as follows: >> ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure >> >> The initial terminal type passed to getty(8) is "3wire" which sets the >> CLOCAL flag. However reset(1) clears this flag and any programs that try >> to open the terminal will hang waiting for DCD to be asserted. >> >> Fix this by always asserting DCD and DSR in the emulated uart. >> >> The following discussion on virtualization@ has more details: >> https://lists.freebsd.org/pipermail/freebsd-virtualization/2015-June/003666.html > > This seems like a wrong fix. A real 3-wire serial console doesn't have > DCD and DSR wired on. Why isn't the right fix here having the user with > this problem to do "stty -f /dev/ttyu0.lock clocal", maybe in rc.local? That is the correct fix. But not in rc.local. rc.d/serial already has support for this, added in 2006. However, rc.d/serial was broken in 2008, in part by removing support for the ioctls used by comcontrol(8) which is used by rc.d/serial. Setting CLOCAL in rc.d/serial doesn't require using comcontrol, but the 3wire entry in rc.d/serial starts with a call to the terminal() function and terminal() uses comcontrol to reset to a default state before making minor adjustments. There is a configuration problem for rc.d/serial. It does nothing by default, since it just has some useful functions and some commented-out examples of some useful configurations. There is no way to pass it parameters to tell it what to do. You have to edit it to configure it. If you actually use rc.d/serial by uncommenting almost anything, then the comcontrol breakage is visible as error messages from comcontrol at boot time. Other breakage is more subtle. E.g., rc.d/serial documents the system default state and resets to it, but the default state was broken in 2008 and rc.d/serial was not broken to match. > Hmmm, or maybe it would be right for getty to do the equivelent when it > sees a 3wire type? That would be another wrong thing, as is the existence of the 3wire type. tty*.lock exists to prevent broken programs like reset(1), getty(8) and cu(1) from breaking the settings, without hard-coding the policy or duplicating configuration details in all programs. It is too hard to fix all such programs. The 3write configuration isn't duplicated, so it only works for getty. The breakage in reset(1) is part of the following mostly-hard-coded settings for c_cflag: % mode.c_cflag &= ~(CSIZE | CSTOPB | PARENB | PARODD | CLOCAL); % mode.c_cflag |= (CS8 | CREAD); % ... % if (tgetflag("EP")) { % mode.c_cflag |= PARENB; % mode.c_cflag &= ~PARODD; % } % if (tgetflag("OP")) { % mode.c_cflag |= PARENB; % mode.c_cflag |= PARODD; % } This clobbers CLOCAL and many other settings. The only ones that can be controlled are PARENB and PARODD. But to control them, you have to set EP and OP in your termcap. All the settings in /etc/gettytab are ignored, except possibly ones for parity if getty somehow arranges to put them in a in termcap and nothing clobbers this. "stty sane" is also quite broken, but not for CLOCAL. It uses a hard-coded default for c_cflag except for CLOCAL: ip->t.c_cflag = TTYDEF_CFLAG | (ip->t.c_cflag & CLOCAL); Most other termios flags and perhaps most control characters do need to be reset by reset(1) and "stty sane", by the definition of resetting. Even CLOCAL might need to be reset, but it is unclear how to control this. TTYDEF_CFLAG is essentially getty's default c_cflag. It is defined in and is a good default for the initial state (set by drivers) too. Other TTYDEF_*FLAG is also essentially getty's defaults. These are also defined in the , but are bad for the initial state unless the device is initially (before getty) a console. I fixed this in my drivers in 1993, but the bug is back in most drivers now. rc.d/serial still documents the fixed initial state (all other flags 0). getty(8) is not very broken. It needs to change from the initial state to settings suitable for logins. gives such settings. The defaults need to be modified in just a few cases. More cases in 1985 than now, since serial ttys were actually often used in 1985, but gettytab is larger now. It has silly old entries like: # Fast dialup terminals, 2400/1200/300 rotary (can start either way) 300 is not too fast, but was not very slow in 1985. ... and silly new entries like: # Entries for 3-wire serial terminals. These don't supply carrier, so # clocal needs to be set, and crtscts needs to be unset. It is painful to have to edit either /etc/ttys or /etc/rc.d/serial to configure the settings, but configuring this in rc.d/serial (or directly in the initial state and lock state devices) has the advantage of working for all programs, while gettytab only works for programs that understand it (just getty(8)?). rc.d/seral also gives more flexibility than gettytab for the 3wire case. The 3wire entries in gettytab are primitive and don't use tc to extend other entries. They enforce no parity, no clocal, and a speed, and accept the default of crtscts being unset by not forcing it to be set. I didn't check the breakage in cu(1), but know that it includes clobbering the device's default speed with a hard coded speed of 9600. The version of cu in Taylor uucp didn't have this bug. ISTR that Taylor had a lot of complications for crtscts that are unnecessary if the system default for crtscts is correct. cu(1) of course doesn't know anything about gettytab, and uses its own config file /etc/remote. So to configure a serial device, the following files need to be edited: - /etc/ttys - termcap files or environment (I set the TERMCAP environment variable in ~/.profile to extend the default of cons25 for other reasons) - /etc/gettytab (if you need a non-default entry) - /etc/remote (if you need a non-default entry. Devices can also be selected in it) - /etc/rc.d/serial (devices must be selected in it. Also change it if you need a non-default entry) It is usually easier not to change all of these. Just use /etc/rc.d/serial or direct sttys on the control devices to fixate a couple of important settings, and depend on defaults for the rest. This is a hack. It depends on normal programs not knowing anything about the lock devices, and on having either correct or suitably broken handling of errors from tcsetattr(). (tcsetattr() is remarkably hard to use. It is supposed to return success iff it set at least 1 attribute successfully, but it can almost always set at least 1 attribute correctly, e.g., by setting an unimportant control character to its previous value. So to determine which attributes were set as requested, the callers should use tcgetattr() after tcsetattr() and check for differences. Changes to individual attributes will fail quite often because the hardware doesn't support the change or the system denies it using the lock state device or otherwise, so callers should be prepared for many differences and only complain about important ones. I haven't seen any programs that do much more than check the return value of tcsetattr(). It would be hard to decide if a large difference like denying a speed or parity change is important.) Some time after 1985, files with default configurations like /etc/gettytab and /etc/remote proved to be far too simple. E.g., communicating with an intelligent modem usually requires a complicated set of commands that is very device-dependent. It is simpler to have this in a script for just one device at a time. Other known bugs involving CLOCAL: - uart used to "fixate" CLOCAL to on for serial consoles, without even making this visible in the initial state or lock state devices, and without allowing this to be controlled by the initial state or lock devices. This gave correct operation, except it didn't allow the controlling CLOCAL in the usual way using the control devices. (Unsetting CLOCAL for a console would usually be foot-shooting, but the sysadmin might know better.) Now, uart doesn't do anything special for CLOCAL, so the other bugs break it. - tty_init_console() doesn't set CLOCAL in the lock state device. So without fixation, bugs like the one in reset(1) break serial consoles. - many console drivers don't even call tty_init_console(). This gives them backwards settings for CLOCAL in the initial state device too. It asks for wronger settings than that, but the default settings are broken by using getty's defaults for non-consoles. - ttydev_open() doesn't honor CLOCAL for callout devices. It ignores the initial state device's setting of CLOCAL and forces CLOCAL on. This usually just breaks later operation of carrier. However, it doesn't even do that if a buggy program like reset(1) accidentally changes CLOCAL back to its correct value. Other known bugs near CLOCAL: - tty_init_console() doesn't clear HUPCL in the initial state device. This is a very large bug. Most of the tty bugs described here are from 2008, but this one is from 2004. - tty_init_console() doesn't set HUPCL in the lock state device - uart still fixates HUPCL for serial consoles. That means ignoring it and acting as if it is off. This works around the 2004 bug above. Before 2004, uart didn't support the initial/lock state devices, so it needed both of the fixation hacks. After 2004, it still needed this one. After 2008, it needed the one for CLOCAL. - sio still fixates HUPCL for serial consoles (in my unbroken version for -current, though not in my development version). Before 2004, it had the only example of correct setting of HUPCL for consoles. But it also fixated HUPCL for consoles, using even uglier code with the same result. Thus it wasn't broken by the 2004 bug, but was always broken by fixation. - uart doesn't honor HUPCL. Combined with fixation, this gives hangup on close never for consoles and always otherwise. I.e., HUPCL is gnored and the condition of not being a console is used to replace the correct condition of HUPCL being set. - tty_init_console() doesn't lock speeds in the lock state device. Bruce From owner-svn-src-all@freebsd.org Tue Jul 7 06:34:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D662E99503D; Tue, 7 Jul 2015 06:34:29 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 C6753145A; Tue, 7 Jul 2015 06:34:29 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t676YTJs085431; Tue, 7 Jul 2015 06:34:29 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t676YTC1085421; Tue, 7 Jul 2015 06:34:29 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201507070634.t676YTC1085421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 7 Jul 2015 06:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285237 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 06:34:29 -0000 Author: tuexen Date: Tue Jul 7 06:34:28 2015 New Revision: 285237 URL: https://svnweb.freebsd.org/changeset/base/285237 Log: Export the ssthresh value per SCTP path via the sysctl interface. MFC after: 1 month Modified: head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_uio.h Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Tue Jul 7 04:15:22 2015 (r285236) +++ head/sys/netinet/sctp_sysctl.c Tue Jul 7 06:34:28 2015 (r285237) @@ -511,6 +511,7 @@ sctp_sysctl_handle_assoclist(SYSCTL_HAND xraddr.mtu = net->mtu; xraddr.rtt = net->rtt / 1000; xraddr.heartbeat_interval = net->heart_beat_delay; + xraddr.ssthresh = net->ssthresh; xraddr.start_time.tv_sec = (uint32_t) net->start_time.tv_sec; xraddr.start_time.tv_usec = (uint32_t) net->start_time.tv_usec; SCTP_INP_RUNLOCK(inp); Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Tue Jul 7 04:15:22 2015 (r285236) +++ head/sys/netinet/sctp_uio.h Tue Jul 7 06:34:28 2015 (r285237) @@ -1228,7 +1228,8 @@ struct xsctp_raddr { struct sctp_timeval start_time; /* sctpAssocLocalRemEntry 8 */ uint32_t rtt; uint32_t heartbeat_interval; - uint32_t extra_padding[31]; /* future */ + uint32_t ssthresh; + uint32_t extra_padding[30]; /* future */ }; #define SCTP_MAX_LOGGING_SIZE 30000 From owner-svn-src-all@freebsd.org Tue Jul 7 08:41:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4091F97C9; Tue, 7 Jul 2015 08:41:04 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 06F5D1062; Tue, 7 Jul 2015 08:41:03 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 028F23C398B; Tue, 7 Jul 2015 18:40:53 +1000 (AEST) Date: Tue, 7 Jul 2015 18:40:53 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Justin Hibbits cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285227 - head/sys/powerpc/powerpc In-Reply-To: <201507070237.t672bToa061000@repo.freebsd.org> Message-ID: <20150707174511.I1878@besplex.bde.org> References: <201507070237.t672bToa061000@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ItbjC+Lg c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=GS57zLzatOhM7tCpRf8A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 08:41:04 -0000 On Tue, 7 Jul 2015, Justin Hibbits wrote: > Log: > style(9) cleanups. > > Don't use PRIxPTR, these registers are 32-bits, cast to u_long instead. > > Pointed out by: bde Thanks. This could actually cast to u_int if values are really 32 bits even when the arch is 64 bits. I don't know if that is the best way to think of them. Registers smaller than the arch width are rare. x86 has some for segment registers. These are 16 bits, and I think of them like that. The difference actually causes minor problems: when you push these registers or move them to a wider integer register, they get extended in unclear MD ways. I don't like some recent changes that pessimize the pushes of segment registers to pushs of $0 followed by a 16-bit store. This pessimizes code that is executed on every entry to the kernel, to do little more than fix printing of the registers in debuggers. Uninitialized bits should be part of the ABI, and printing routines should cast to uint16_t to remove them. Better ABIs would only use 16 bits for them, and pack them in structs, but it is convenient to use register_t for all registers, and not pack trap frames. Several bad examples of PRI* remain. Bruce From owner-svn-src-all@freebsd.org Tue Jul 7 09:20:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26BB5AC08; Tue, 7 Jul 2015 09:20:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90C501238; Tue, 7 Jul 2015 09:20:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t679KQWh062432 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 7 Jul 2015 12:20:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t679KQWh062432 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t679KQBa062430; Tue, 7 Jul 2015 12:20:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 7 Jul 2015 12:20:26 +0300 From: Konstantin Belousov To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r267760 - head/sys/kern Message-ID: <20150707092026.GA2080@kib.kiev.ua> References: <20140711024351.GA18214@dft-labs.eu> <20140711095551.GA93733@kib.kiev.ua> <20140711111925.GB18214@dft-labs.eu> <20140713132652.GZ93733@kib.kiev.ua> <20140713213623.GA13241@dft-labs.eu> <20140717005638.GF93733@kib.kiev.ua> <20150706055135.GA28898@dft-labs.eu> <20150706064601.GB28898@dft-labs.eu> <20150706090958.GM2080@kib.kiev.ua> <20150706224201.GC28898@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150706224201.GC28898@dft-labs.eu> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 09:20:35 -0000 On Tue, Jul 07, 2015 at 12:42:01AM +0200, Mateusz Guzik wrote: > On Mon, Jul 06, 2015 at 12:09:58PM +0300, Konstantin Belousov wrote: > > On Mon, Jul 06, 2015 at 08:46:02AM +0200, Mateusz Guzik wrote: > > > diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c > > > index fe8e9ef..c7f579a 100644 > > > --- a/sys/fs/devfs/devfs_vnops.c > > > +++ b/sys/fs/devfs/devfs_vnops.c > > > @@ -574,6 +574,8 @@ devfs_close(struct vop_close_args *ap) > > > if (vp->v_data == NULL) > > > return (0); > > > > > > + vp_locked = VOP_ISLOCKED(vp); > > > + > > > /* > > > * Hack: a tty device that is a controlling terminal > > > * has a reference from the session structure. > > > @@ -589,6 +591,7 @@ devfs_close(struct vop_close_args *ap) > > > if (vp == p->p_session->s_ttyvp) { > > > PROC_UNLOCK(p); > > > oldvp = NULL; > > > + VOP_UNLOCK(vp, 0); > > This opens a window where vp can be reclaimed. Then vp->v_rdev > > is invalid and dev_refthread() below accesses random memory. > > > > Might be, the easiest fix is to call dev_refthread() before the td != > > NULL block, but leave dsw == NULL check where it is now. > > > > Instead I made the bare minimum to ensure that modified fields which are > accessed here are always protected with proc lock and sess lock, which > eliminates the need for proctree lock in problematic cases. In effect > there are no games with relocking vnodes. This could work. What I want to know is what methodology was used to ensure that added locking for other places is enough. The proctree locking is 'natural', since session/group membership relates to the process tree structure and owning the sx guarantees that the tree is stable. Your locking can work, but needs an argumentation why it is complete. Also, you should add some note to proc.h to indicate in the locking annotations that reading of e.g. pg_session is safe when only process lock is owned. > > I would commit this patch separately. > > Note this establishes a process lock -> vnode interlock order which > seems fishy, but apparently does not result in lors. > > diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c > index fe8e9ef..0a2a6bb 100644 > --- a/sys/fs/devfs/devfs_vnops.c > +++ b/sys/fs/devfs/devfs_vnops.c > @@ -586,12 +586,12 @@ devfs_close(struct vop_close_args *ap) > if (td != NULL) { > p = td->td_proc; > PROC_LOCK(p); > - if (vp == p->p_session->s_ttyvp) { > + if (vp != p->p_session->s_ttyvp) { > PROC_UNLOCK(p); > + } else { > oldvp = NULL; > - sx_xlock(&proctree_lock); > + SESS_LOCK(p->p_session); > if (vp == p->p_session->s_ttyvp) { > - SESS_LOCK(p->p_session); > VI_LOCK(vp); > if (count_dev(dev) == 2 && > (vp->v_iflag & VI_DOOMED) == 0) { > @@ -600,13 +600,12 @@ devfs_close(struct vop_close_args *ap) > oldvp = vp; > } > VI_UNLOCK(vp); > - SESS_UNLOCK(p->p_session); > } > - sx_xunlock(&proctree_lock); > + SESS_UNLOCK(p->p_session); > + PROC_UNLOCK(p); > if (oldvp != NULL) > vrele(oldvp); > - } else > - PROC_UNLOCK(p); > + } > } > /* > * We do not want to really close the device if it > diff --git a/sys/kern/tty.c b/sys/kern/tty.c > index d9d0cce..5ef5578 100644 > --- a/sys/kern/tty.c > +++ b/sys/kern/tty.c > @@ -1637,8 +1637,13 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, > return (EPERM); > } > > + PROC_LOCK(p); > + SESS_LOCK(p->p_session); > + > if (tp->t_session != NULL && tp->t_session == p->p_session) { > /* This is already our controlling TTY. */ > + SESS_UNLOCK(p->p_session); > + PROC_UNLOCK(p); > sx_xunlock(&proctree_lock); > return (0); > } > @@ -1657,6 +1662,8 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, > * TTYs of which the session leader has been > * killed or the TTY revoked. > */ > + SESS_UNLOCK(p->p_session); > + PROC_UNLOCK(p); > sx_xunlock(&proctree_lock); > return (EPERM); > } > @@ -1665,14 +1672,13 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, > tp->t_session = p->p_session; > tp->t_session->s_ttyp = tp; > tp->t_sessioncnt++; > - sx_xunlock(&proctree_lock); > > /* Assign foreground process group. */ > tp->t_pgrp = p->p_pgrp; > - PROC_LOCK(p); > p->p_flag |= P_CONTROLT; > + SESS_UNLOCK(p->p_session); > PROC_UNLOCK(p); > - > + sx_xunlock(&proctree_lock); > return (0); > } > case TIOCSPGRP: { > diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c > index 582b41a..dca619c 100644 > --- a/sys/kern/tty_tty.c > +++ b/sys/kern/tty_tty.c > @@ -65,9 +65,8 @@ ctty_clone(void *arg, struct ucred *cred, char *name, int namelen, > if (strcmp(name, "tty")) > return; > p = curproc; > - sx_sunlock(&clone_drain_lock); > - sx_slock(&proctree_lock); > - sx_slock(&clone_drain_lock); > + PROC_LOCK(p); > + SESS_LOCK(p->p_session); > dev_lock(); > if (!(p->p_flag & P_CONTROLT)) > *dev = ctty; > @@ -81,7 +80,8 @@ ctty_clone(void *arg, struct ucred *cred, char *name, int namelen, > *dev = p->p_session->s_ttyvp->v_rdev; > dev_refl(*dev); > dev_unlock(); > - sx_sunlock(&proctree_lock); > + SESS_UNLOCK(p->p_session); > + PROC_UNLOCK(p); > } > > static void > > > diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c > > > index 85cda01..bbdcbf5 100644 > > > --- a/sys/kern/kern_descrip.c > > > +++ b/sys/kern/kern_descrip.c > > > @@ -3271,6 +3271,7 @@ kern_proc_filedesc_out(struct proc *p, struct sbuf *sb, ssize_t maxlen) > > > FILEDESC_SUNLOCK(fdp); > > > fddrop(fdp); > > > fail: > > > + sx_sunlock(&p->p_imagelock); > > IMO it would be less confusing to unlock the p_imagelock at the caller' > > location. At the kern_proc_filedesc_out(), the p_imagelock slocked state > > must be asserted. > > > > Moved. > > > Same for ofiledesc(). > > > > This is the top level func which also has the relevant pget call. > > > > diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c > > > index 9ce6d34..27fd764 100644 > > > --- a/sys/kern/kern_exit.c > > > +++ b/sys/kern/kern_exit.c > > > @@ -213,6 +213,7 @@ exit1(struct thread *td, int rv) > > > /* > > > * MUST abort all other threads before proceeding past here. > > > */ > > > + sx_xlock(&p->p_imagelock); > > > PROC_LOCK(p); > > > /* > > > * First check if some other thread or external request got > > > @@ -279,6 +280,7 @@ exit1(struct thread *td, int rv) > > > * decided to wait again after we told them we are exiting. > > > */ > > > p->p_flag |= P_WEXIT; > > > + sx_xunlock(&p->p_imagelock); > > I do not understand why p_imagelock is released so early in the exit1(). > > > > Since the process catched with p_imagelock must not be exiting, a > lock/unlock sequence paired with setting P_WEXIT gives us a guarantee > that nothing will start inspeting it. > > Past P_WEXIT there are next to no guarantees for stability of most > fields of the proc anyway, and soon after proctree lock is taken and we > have to drop imagelock by that time to avoid a lor. So there is a guarantee that after P_WEXIT is set, pget() in the kern.proc.XXX would always fail due to P_NOTWEXIT flag being always present ? > > > > wakeup(&p->p_stype); > > > > > > /* > > > diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c > > > index 27c6f40..ac6b441 100644 > > > --- a/sys/kern/kern_proc.c > > > +++ b/sys/kern/kern_proc.c > > > @@ -230,6 +230,7 @@ proc_init(void *mem, int size, int flags) > > > mtx_init(&p->p_statmtx, "pstatl", NULL, MTX_SPIN | MTX_NEW); > > > mtx_init(&p->p_itimmtx, "pitiml", NULL, MTX_SPIN | MTX_NEW); > > > mtx_init(&p->p_profmtx, "pprofl", NULL, MTX_SPIN | MTX_NEW); > > > + sx_init_flags(&p->p_imagelock, "process imagelock", SX_NEW); > > > cv_init(&p->p_pwait, "ppwait"); > > > cv_init(&p->p_dbgwait, "dbgwait"); > > > TAILQ_INIT(&p->p_threads); /* all threads in proc */ > > > @@ -278,16 +279,20 @@ inferior(struct proc *p) > > > } > > > > > > struct proc * > > > -pfind_locked(pid_t pid) > > > +pfind_locked(pid_t pid, int lockimage) > > > { > > > struct proc *p; > > > > > > sx_assert(&allproc_lock, SX_LOCKED); > > > LIST_FOREACH(p, PIDHASH(pid), p_hash) { > > > if (p->p_pid == pid) { > > > + if (lockimage) > > > + sx_slock(&p->p_imagelock); > > Probably makes sense to explicitely add imagelock name into the > > witness' order_lists[] array. > > > > Added after allprison. > > As a cosmetic matter I'm pondering a pair like pimage_lock/unlock or > similar to wrap relevant pget and unlock of p_imagelock. > > Note that in this patch I moved exit's imagelock to after > singlethreading is in effect. > > diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c > index d3bac30..118a7d9 100644 > --- a/sys/fs/nfsclient/nfs_clport.c > +++ b/sys/fs/nfsclient/nfs_clport.c > @@ -1188,7 +1188,7 @@ nfscl_procdoesntexist(u_int8_t *own) > tl.cval[2] = *own++; > tl.cval[3] = *own++; > pid = tl.lval; > - p = pfind_locked(pid); > + p = pfind_locked(pid, 0); > if (p == NULL) > return (1); > if (p->p_stats == NULL) { > diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c > index 0675128..2ad09aa 100644 > --- a/sys/kern/imgact_elf.c > +++ b/sys/kern/imgact_elf.c > @@ -1887,6 +1887,7 @@ note_procstat_files(void *arg, struct sbuf *sb, size_t *sizep) > sb = sbuf_new(NULL, NULL, 128, SBUF_FIXEDLEN); > sbuf_set_drain(sb, sbuf_drain_count, &size); > sbuf_bcat(sb, &structsize, sizeof(structsize)); > + sx_slock(&p->p_imagelock); > PROC_LOCK(p); > kern_proc_filedesc_out(p, sb, -1); > sbuf_finish(sb); > @@ -1895,6 +1896,7 @@ note_procstat_files(void *arg, struct sbuf *sb, size_t *sizep) > } else { > structsize = sizeof(struct kinfo_file); > sbuf_bcat(sb, &structsize, sizeof(structsize)); > + sx_slock(&p->p_imagelock); > PROC_LOCK(p); > kern_proc_filedesc_out(p, sb, -1); > } > diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c > index 37539c4..9364dcb 100644 > --- a/sys/kern/init_main.c > +++ b/sys/kern/init_main.c > @@ -480,6 +480,7 @@ proc0_init(void *dummy __unused) > p->p_flag2 = 0; > p->p_state = PRS_NORMAL; > knlist_init_mtx(&p->p_klist, &p->p_mtx); > + sx_init_flags(&p->p_imagelock, "process imagelock", SX_NEW); > STAILQ_INIT(&p->p_ktr); > p->p_nice = NZERO; > /* pid_max cannot be greater than PID_MAX */ > diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c > index 85cda01..f0f4665 100644 > --- a/sys/kern/kern_descrip.c > +++ b/sys/kern/kern_descrip.c > @@ -3292,13 +3292,14 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER_ARGS) > > sbuf_new_for_sysctl(&sb, NULL, FILEDESC_SBUF_SIZE, req); > sbuf_clear_flags(&sb, SBUF_INCLUDENUL); > - error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p); > + error = pget((pid_t)name[0], PGET_LOCK, &p); > if (error != 0) { > sbuf_delete(&sb); > return (error); > } > maxlen = req->oldptr != NULL ? req->oldlen : -1; > error = kern_proc_filedesc_out(p, &sb, maxlen); > + sx_sunlock(&p->p_imagelock); > error2 = sbuf_finish(&sb); > sbuf_delete(&sb); > return (error != 0 ? error : error2); > @@ -3359,7 +3360,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) > struct proc *p; > > name = (int *)arg1; > - error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p); > + error = pget((pid_t)name[0], PGET_LOCK, &p); > if (error != 0) > return (error); > fdp = fdhold(p); > @@ -3391,6 +3392,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) > } > FILEDESC_SUNLOCK(fdp); > fddrop(fdp); > + sx_sunlock(&p->p_imagelock); > free(kif, M_TEMP); > free(okif, M_TEMP); > return (0); > diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c > index 859b2e3..0d9aac1 100644 > --- a/sys/kern/kern_exec.c > +++ b/sys/kern/kern_exec.c > @@ -381,6 +381,7 @@ do_execve(td, args, mac_p) > * that might allow a local user to illicitly obtain elevated > * privileges. > */ > + sx_xlock(&p->p_imagelock); > PROC_LOCK(p); > KASSERT((p->p_flag & P_INEXEC) == 0, > ("%s(): process already has P_INEXEC flag", __func__)); > @@ -907,6 +908,7 @@ exec_fail: > SDT_PROBE(proc, kernel, , exec__failure, error, 0, 0, 0, 0); > > done2: > + sx_xunlock(&p->p_imagelock); > #ifdef MAC > mac_execve_exit(imgp); > mac_execve_interpreter_exit(interpvplabel); > diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c > index 9ce6d34..127629d 100644 > --- a/sys/kern/kern_exit.c > +++ b/sys/kern/kern_exit.c > @@ -290,6 +290,15 @@ exit1(struct thread *td, int rv) > > p->p_xstat = rv; /* Let event handler change exit status */ > PROC_UNLOCK(p); > + > + /* > + * The lock/unlock pair gives us a guarantee nobody pins the process > + * with p_imagelock. While the process is still reachable, consumers > + * are supposed to check for P_WEXIT flag set earlier. > + */ > + sx_xlock(&p->p_imagelock); > + sx_xunlock(&p->p_imagelock); > + > /* Drain the limit callout while we don't have the proc locked */ > callout_drain(&p->p_limco); > > diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c > index 27c6f40..ac6b441 100644 > --- a/sys/kern/kern_proc.c > +++ b/sys/kern/kern_proc.c > @@ -230,6 +230,7 @@ proc_init(void *mem, int size, int flags) > mtx_init(&p->p_statmtx, "pstatl", NULL, MTX_SPIN | MTX_NEW); > mtx_init(&p->p_itimmtx, "pitiml", NULL, MTX_SPIN | MTX_NEW); > mtx_init(&p->p_profmtx, "pprofl", NULL, MTX_SPIN | MTX_NEW); > + sx_init_flags(&p->p_imagelock, "process imagelock", SX_NEW); > cv_init(&p->p_pwait, "ppwait"); > cv_init(&p->p_dbgwait, "dbgwait"); > TAILQ_INIT(&p->p_threads); /* all threads in proc */ > @@ -278,16 +279,20 @@ inferior(struct proc *p) > } > > struct proc * > -pfind_locked(pid_t pid) > +pfind_locked(pid_t pid, int lockimage) > { > struct proc *p; > > sx_assert(&allproc_lock, SX_LOCKED); > LIST_FOREACH(p, PIDHASH(pid), p_hash) { > if (p->p_pid == pid) { > + if (lockimage) > + sx_slock(&p->p_imagelock); > PROC_LOCK(p); > if (p->p_state == PRS_NEW) { > PROC_UNLOCK(p); > + if (lockimage) > + sx_sunlock(&p->p_imagelock); > p = NULL; > } > break; > @@ -308,7 +313,7 @@ pfind(pid_t pid) > struct proc *p; > > sx_slock(&allproc_lock); > - p = pfind_locked(pid); > + p = pfind_locked(pid, 0); > sx_sunlock(&allproc_lock); > return (p); > } > @@ -364,11 +369,17 @@ int > pget(pid_t pid, int flags, struct proc **pp) > { > struct proc *p; > - int error; > + int error, lockimage; > + > + lockimage = ((flags & PGET_IMAGELOCK) != 0); > + if (lockimage) { > + MPASS((flags & PGET_NOTWEXIT) != 0); > + MPASS((flags & PGET_HOLD) == 0); > + } > > sx_slock(&allproc_lock); > if (pid <= PID_MAX) { > - p = pfind_locked(pid); > + p = pfind_locked(pid, lockimage); > if (p == NULL && (flags & PGET_NOTWEXIT) == 0) > p = zpfind_locked(pid); > } else if ((flags & PGET_NOTID) == 0) { > @@ -413,6 +424,8 @@ pget(pid_t pid, int flags, struct proc **pp) > return (0); > errout: > PROC_UNLOCK(p); > + if (lockimage) > + sx_sunlock(&p->p_imagelock); > return (error); > } > > diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c > index 1280807..a423c80 100644 > --- a/sys/kern/subr_witness.c > +++ b/sys/kern/subr_witness.c > @@ -475,6 +475,7 @@ static struct witness_order_list_entry order_lists[] = { > { "proctree", &lock_class_sx }, > { "allproc", &lock_class_sx }, > { "allprison", &lock_class_sx }, > + { "process imagelock", &lock_class_sx }, > { NULL, NULL }, > /* > * Various mutexes > diff --git a/sys/sys/proc.h b/sys/sys/proc.h > index e6c83b4..5df817a 100644 > --- a/sys/sys/proc.h > +++ b/sys/sys/proc.h > @@ -522,6 +522,7 @@ struct proc { > (if I am reaper). */ > LIST_ENTRY(proc) p_reapsibling; /* (e) List of siblings - descendants of > the same reaper. */ > + struct sx p_imagelock; /* Lock blocking exec/exit. */ > struct mtx p_mtx; /* (n) Lock for this struct. */ > struct mtx p_statmtx; /* Lock for the stats */ > struct mtx p_itimmtx; /* Lock for the virt/prof timers */ > @@ -886,7 +887,7 @@ extern struct proc *initproc, *pageproc; /* Process slots for init, pager. */ > extern struct uma_zone *proc_zone; > > struct proc *pfind(pid_t); /* Find process by id. */ > -struct proc *pfind_locked(pid_t pid); > +struct proc *pfind_locked(pid_t pid, int lockimage); > struct pgrp *pgfind(pid_t); /* Find process group by id. */ > struct proc *zpfind(pid_t); /* Find zombie process by id. */ > > @@ -900,8 +901,10 @@ struct proc *zpfind(pid_t); /* Find zombie process by id. */ > #define PGET_NOTWEXIT 0x00010 /* Check that the process is not in P_WEXIT. */ > #define PGET_NOTINEXEC 0x00020 /* Check that the process is not in P_INEXEC. */ > #define PGET_NOTID 0x00040 /* Do not assume tid if pid > PID_MAX. */ > +#define PGET_IMAGELOCK 0x00080 /* Prevent execs and exits. */ > > #define PGET_WANTREAD (PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT) > +#define PGET_LOCK (PGET_CANDEBUG | PGET_NOTWEXIT | PGET_IMAGELOCK) > > int pget(pid_t pid, int flags, struct proc **pp); > > -- > Mateusz Guzik From owner-svn-src-all@freebsd.org Tue Jul 7 09:25:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74256AE3E; Tue, 7 Jul 2015 09:25:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 5FF7818A2; Tue, 7 Jul 2015 09:25:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t679PrSu071250; Tue, 7 Jul 2015 09:25:53 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t679Pq3K071248; Tue, 7 Jul 2015 09:25:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201507070925.t679Pq3K071248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 7 Jul 2015 09:25:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285240 - in head/lib/libc: amd64/sys i386/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 09:25:53 -0000 Author: trasz Date: Tue Jul 7 09:25:51 2015 New Revision: 285240 URL: https://svnweb.freebsd.org/changeset/base/285240 Log: Remove reboot.S (part of libc). It's not needed and was actually broken - returning 0 from reboot(2) resulted in SIGBUS. MFC after: 1 month Sponsored by: The FreeBSD Foundation Deleted: head/lib/libc/amd64/sys/reboot.S head/lib/libc/i386/sys/reboot.S Modified: head/lib/libc/amd64/sys/Makefile.inc head/lib/libc/i386/sys/Makefile.inc Modified: head/lib/libc/amd64/sys/Makefile.inc ============================================================================== --- head/lib/libc/amd64/sys/Makefile.inc Tue Jul 7 07:42:08 2015 (r285239) +++ head/lib/libc/amd64/sys/Makefile.inc Tue Jul 7 09:25:51 2015 (r285240) @@ -5,7 +5,7 @@ SRCS+= amd64_get_fsbase.c amd64_get_gsba amd64_set_gsbase.c __vdso_gettc.c MDASM= vfork.S brk.S cerror.S exect.S getcontext.S pipe.S ptrace.S \ - reboot.S sbrk.S setlogin.S sigreturn.S + sbrk.S setlogin.S sigreturn.S # Don't generate default code for these syscalls: NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o Modified: head/lib/libc/i386/sys/Makefile.inc ============================================================================== --- head/lib/libc/i386/sys/Makefile.inc Tue Jul 7 07:42:08 2015 (r285239) +++ head/lib/libc/i386/sys/Makefile.inc Tue Jul 7 09:25:51 2015 (r285240) @@ -9,7 +9,7 @@ SRCS+= i386_get_fsbase.c i386_get_gsbase __vdso_gettc.c MDASM= Ovfork.S brk.S cerror.S exect.S getcontext.S pipe.S ptrace.S \ - reboot.S sbrk.S setlogin.S sigreturn.S syscall.S + sbrk.S setlogin.S sigreturn.S syscall.S # Don't generate default code for these syscalls: NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o From owner-svn-src-all@freebsd.org Tue Jul 7 13:15:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33D39995D9F; Tue, 7 Jul 2015 13:15:17 +0000 (UTC) (envelope-from achim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 2445C13E4; Tue, 7 Jul 2015 13:15:17 +0000 (UTC) (envelope-from achim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67DFHla082790; Tue, 7 Jul 2015 13:15:17 GMT (envelope-from achim@FreeBSD.org) Received: (from achim@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67DFGr0082789; Tue, 7 Jul 2015 13:15:16 GMT (envelope-from achim@FreeBSD.org) Message-Id: <201507071315.t67DFGr0082789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: achim set sender to achim@FreeBSD.org using -f From: Achim Leubner Date: Tue, 7 Jul 2015 13:15:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r285241 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 13:15:17 -0000 Author: achim Date: Tue Jul 7 13:15:16 2015 New Revision: 285241 URL: https://svnweb.freebsd.org/changeset/base/285241 Log: Added self to commit pms project changes Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Tue Jul 7 09:25:51 2015 (r285240) +++ svnadmin/conf/sizelimit.conf Tue Jul 7 13:15:16 2015 (r285241) @@ -19,6 +19,7 @@ #kan #lulf # adrian +achim bapt brooks # cy From owner-svn-src-all@freebsd.org Tue Jul 7 14:04:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96BFB995A92; Tue, 7 Jul 2015 14:04:47 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [IPv6:2607:f8b0:4001:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 62FA41AD3; Tue, 7 Jul 2015 14:04:47 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by igcsj18 with SMTP id sj18so262229921igc.1; Tue, 07 Jul 2015 07:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=pQAt+JP2R9dbH9oZKeexXPKVWhP23QydWcY5zJXnFig=; b=X7q8aLO1ww/cXfNEDBXwkiwyRzljq+dNF2Vhp0chMfylzfQwPDoSD8xz4EjGjdCeRY xxl+hAonPYe6ckR5PLWk3ixWQp3JR2+R281fkr0NS8bsoZxTB1d5pXwFFMhBU3vpr6Te t3gNZQWzbAt3ir1DJm9r/U3EMiVxXfsMPan5KmIEmsvYc0XEQHp1wWDbjYKscw+YlABv q+Pf1HIIUJt21sBuETDjPwj5Uv936KIHQemUCvfyGsCtvaGB0kkP609JgKX0iguVI6Pv 9w1hPi6GzSXHms7SSkg6rShf7T+Y8A8q5+y4KFi3uhKjJ+KdkDhqh6AwiO98yInEOIai 0b0w== MIME-Version: 1.0 X-Received: by 10.42.132.6 with SMTP id b6mr43003749ict.8.1436277886663; Tue, 07 Jul 2015 07:04:46 -0700 (PDT) Sender: chmeeedalf@gmail.com Received: by 10.36.69.80 with HTTP; Tue, 7 Jul 2015 07:04:46 -0700 (PDT) In-Reply-To: <20150707174511.I1878@besplex.bde.org> References: <201507070237.t672bToa061000@repo.freebsd.org> <20150707174511.I1878@besplex.bde.org> Date: Tue, 7 Jul 2015 07:04:46 -0700 X-Google-Sender-Auth: KHAVZt46yE70ZemAFXC2cQv5Cjo Message-ID: Subject: Re: svn commit: r285227 - head/sys/powerpc/powerpc From: Justin Hibbits To: Bruce Evans Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 14:04:47 -0000 On Tue, Jul 7, 2015 at 1:40 AM, Bruce Evans wrote: > On Tue, 7 Jul 2015, Justin Hibbits wrote: > >> Log: >> style(9) cleanups. >> >> Don't use PRIxPTR, these registers are 32-bits, cast to u_long instead. >> >> Pointed out by: bde > > > Thanks. > ... > > Several bad examples of PRI* remain. I'll clean these up as I work in the files. - Justin From owner-svn-src-all@freebsd.org Tue Jul 7 15:22:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24BB7995BD2; Tue, 7 Jul 2015 15:22:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 EF1E111EF; Tue, 7 Jul 2015 15:22:29 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67FMT6L046124; Tue, 7 Jul 2015 15:22:29 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67FMTDP046123; Tue, 7 Jul 2015 15:22:29 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201507071522.t67FMTDP046123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 7 Jul 2015 15:22:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285243 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 15:22:30 -0000 Author: pfg Date: Tue Jul 7 15:22:29 2015 New Revision: 285243 URL: https://svnweb.freebsd.org/changeset/base/285243 Log: Relocate sched_random() within the SMP section. Place sched_random nearer to where it's first used: moving the code nearer to where it is used makes the code easier to read and we can reduce the initial "#ifdef SMP" island. Reword a little the comment and clean some whitespaces while here. Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Tue Jul 7 13:17:02 2015 (r285242) +++ head/sys/kern/sched_ule.c Tue Jul 7 15:22:29 2015 (r285243) @@ -356,26 +356,6 @@ SDT_PROBE_DEFINE(sched, , , remain__cpu) SDT_PROBE_DEFINE2(sched, , , surrender, "struct thread *", "struct proc *"); -#ifdef SMP -/* - * We need some randomness. Implement the classic Linear Congruential - * generator X_{n+1}=(aX_n+c) mod m. These values are optimized for - * m = 2^32, a = 69069 and c = 5. We only return the upper 16 bits - * of the random state (in the low bits of our answer) to return - * the maximum randomness. - */ -static uint32_t -sched_random(void) -{ - uint32_t *rndptr; - - rndptr = DPCPU_PTR(randomval); - *rndptr = *rndptr * 69069 + 5; - - return (*rndptr >> 16); -} -#endif - /* * Print the threads waiting on a run-queue. */ @@ -625,6 +605,24 @@ tdq_setlowpri(struct tdq *tdq, struct th } #ifdef SMP +/* + * We need some randomness. Implement a classic Linear Congruential + * Generator X_{n+1}=(aX_n+c) mod m. These values are optimized for + * m = 2^32, a = 69069 and c = 5. We only return the upper 16 bits + * of the random state (in the low bits of our answer) to keep + * the maximum randomness. + */ +static uint32_t +sched_random(void) +{ + uint32_t *rndptr; + + rndptr = DPCPU_PTR(randomval); + *rndptr = *rndptr * 69069 + 5; + + return (*rndptr >> 16); +} + struct cpu_search { cpuset_t cs_mask; u_int cs_prefer; From owner-svn-src-all@freebsd.org Tue Jul 7 15:56:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B00FE996453; Tue, 7 Jul 2015 15:56:52 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 85BA011AF; Tue, 7 Jul 2015 15:56:52 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67FuqRU061904; Tue, 7 Jul 2015 15:56:52 GMT (envelope-from takawata@FreeBSD.org) Received: (from takawata@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67FupnF061902; Tue, 7 Jul 2015 15:56:51 GMT (envelope-from takawata@FreeBSD.org) Message-Id: <201507071556.t67FupnF061902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: takawata set sender to takawata@FreeBSD.org using -f From: Takanori Watanabe Date: Tue, 7 Jul 2015 15:56:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285244 - in head/sys/netgraph/bluetooth: l2cap socket X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 15:56:52 -0000 Author: takawata Date: Tue Jul 7 15:56:51 2015 New Revision: 285244 URL: https://svnweb.freebsd.org/changeset/base/285244 Log: Fix rfcomm_sppd regression I could reproduced. To reproduce it, Two machine running FreeBSD and run rfcomm_sppd -c 3 -S rfcomm_sppd -a ${PEER} -c 3 on each side. Modified: head/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c head/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c Modified: head/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c ============================================================================== --- head/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c Tue Jul 7 15:22:29 2015 (r285243) +++ head/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c Tue Jul 7 15:56:51 2015 (r285244) @@ -398,7 +398,7 @@ ng_l2cap_l2ca_con_ind(ng_l2cap_chan_p ch ip->lcid = ch->scid; ip->psm = ch->psm; ip->ident = ch->ident; - + ip->linktype = ch->con->linktype; NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0); } Modified: head/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c ============================================================================== --- head/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c Tue Jul 7 15:22:29 2015 (r285243) +++ head/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c Tue Jul 7 15:56:51 2015 (r285244) @@ -1339,6 +1339,8 @@ ng_btsocket_rfcomm_session_create(ng_bts l2sa.l2cap_family = AF_BLUETOOTH; l2sa.l2cap_psm = (dst == NULL)? htole16(NG_L2CAP_PSM_RFCOMM) : 0; bcopy(src, &l2sa.l2cap_bdaddr, sizeof(l2sa.l2cap_bdaddr)); + l2sa.l2cap_cid = 0; + l2sa.l2cap_bdaddr_type = BDADDR_BREDR; error = sobind(s->l2so, (struct sockaddr *) &l2sa, td); if (error != 0) @@ -1360,6 +1362,8 @@ ng_btsocket_rfcomm_session_create(ng_bts l2sa.l2cap_family = AF_BLUETOOTH; l2sa.l2cap_psm = htole16(NG_L2CAP_PSM_RFCOMM); bcopy(dst, &l2sa.l2cap_bdaddr, sizeof(l2sa.l2cap_bdaddr)); + l2sa.l2cap_cid = 0; + l2sa.l2cap_bdaddr_type = BDADDR_BREDR; error = soconnect(s->l2so, (struct sockaddr *) &l2sa, td); if (error != 0) From owner-svn-src-all@freebsd.org Tue Jul 7 18:06:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5547D3C41A; Tue, 7 Jul 2015 18:06:30 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 16E3C1C1A; Tue, 7 Jul 2015 18:06:29 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t67I6TO1013648 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 7 Jul 2015 11:06:29 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t67I6SYV013647; Tue, 7 Jul 2015 11:06:28 -0700 (PDT) (envelope-from jmg) Date: Tue, 7 Jul 2015 11:06:28 -0700 From: John-Mark Gurney To: Bruce Evans Cc: Ian Lepore , Neel Natu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285217 - head/usr.sbin/bhyve Message-ID: <20150707180627.GD8523@funkthat.com> References: <201507061933.t66JXTtJ050058@repo.freebsd.org> <1436213492.1334.64.camel@freebsd.org> <20150707122407.O1017@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150707122407.O1017@besplex.bde.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Tue, 07 Jul 2015 11:06:29 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 18:06:30 -0000 Bruce Evans wrote this message on Tue, Jul 07, 2015 at 16:11 +1000: > - tty_init_console() doesn't set CLOCAL in the lock state device. So > without fixation, bugs like the one in reset(1) break serial consoles. Here's a patch to fix that: Index: tty.c =================================================================== --- tty.c (revision 284880) +++ tty.c (working copy) @@ -858,6 +858,8 @@ tty_init_console(struct tty *tp, speed_t s) { struct termios *ti = &tp->t_termios_init_in; struct termios *to = &tp->t_termios_init_out; + struct termios *lti = &tp->t_termios_lock_in; + struct termios *lto = &tp->t_termios_lock_out; if (s != 0) { ti->c_ispeed = ti->c_ospeed = s; @@ -866,6 +868,8 @@ tty_init_console(struct tty *tp, speed_t s) ti->c_cflag |= CLOCAL; to->c_cflag |= CLOCAL; + lti->c_cflag |= CLOCAL; + lto->c_cflag |= CLOCAL; } /* I've tested that this fixes the issue (on a machine that doesn't have the bhyve fix yet)... To me this seems a very good way to start it, as it still allows the sysadmin to change the lock device on the console after boot if they so choose... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@freebsd.org Tue Jul 7 18:32:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D662B9945CE; Tue, 7 Jul 2015 18:32:24 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 BA95B11BC; Tue, 7 Jul 2015 18:32:24 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67IWOUY040416; Tue, 7 Jul 2015 18:32:24 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67IWOeb040415; Tue, 7 Jul 2015 18:32:24 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201507071832.t67IWOeb040415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 7 Jul 2015 18:32:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285245 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 18:32:24 -0000 Author: loos Date: Tue Jul 7 18:32:23 2015 New Revision: 285245 URL: https://svnweb.freebsd.org/changeset/base/285245 Log: Add the GMAC entries to sun7i (A20) DTS. While here make EMAC disabled unless explicitly enabled. Modified: head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi Modified: head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi Tue Jul 7 15:56:51 2015 (r285244) +++ head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi Tue Jul 7 18:32:23 2015 (r285245) @@ -141,6 +141,20 @@ reg = <0x01c0b000 0x1000>; interrupts = <55>; interrupt-parent = <&GIC>; + status = "disabled"; + }; + + gmac@01c50000 { + compatible = "allwinner,sun7i-a20-gmac"; + reg = <0x01c50000 0x10000>; + interrupts = <85>; + interrupt-parent = <&GIC>; + snps,pbl = <2>; + snps,fixed-burst; + snps,force_sf_dma_mode; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; }; }; }; From owner-svn-src-all@freebsd.org Tue Jul 7 18:44:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43AAD99492E; Tue, 7 Jul 2015 18:44:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 17F651B20; Tue, 7 Jul 2015 18:44:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67IiS4n045524; Tue, 7 Jul 2015 18:44:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67IiSwY045523; Tue, 7 Jul 2015 18:44:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201507071844.t67IiSwY045523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 7 Jul 2015 18:44:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285246 - head/sys/boot/efi/libefi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 18:44:29 -0000 Author: emaste Date: Tue Jul 7 18:44:27 2015 New Revision: 285246 URL: https://svnweb.freebsd.org/changeset/base/285246 Log: Avoid creating invalid UEFI device path The UEFI loader on the 10.1 release install disk (disc1) modifies an existing EFI_DEVICE_PATH_PROTOCOL instance in an apparent attempt to truncate the device path. In doing so it creates an invalid device path. Perform the equivalent action without modification of structures allocated by firmware. PR: 197641 MFC After: 1 week Submitted by: Chris Ruffin Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Tue Jul 7 18:32:23 2015 (r285245) +++ head/sys/boot/efi/libefi/efipart.c Tue Jul 7 18:44:27 2015 (r285246) @@ -63,13 +63,14 @@ static int efipart_init(void) { EFI_BLOCK_IO *blkio; - EFI_DEVICE_PATH *devpath, *node; + EFI_DEVICE_PATH *devpath, *devpathcpy, *tmpdevpath, *node; EFI_HANDLE *hin, *hout, *aliases, handle; EFI_STATUS status; UINTN sz; CHAR16 *path; u_int n, nin, nout; int err; + size_t devpathlen; sz = 0; hin = NULL; @@ -98,9 +99,15 @@ efipart_init(void) if (EFI_ERROR(status)) { continue; } + node = devpath; - while (!IsDevicePathEnd(NextDevicePathNode(node))) + devpathlen = DevicePathNodeLength(node); + while (!IsDevicePathEnd(NextDevicePathNode(node))) { node = NextDevicePathNode(node); + devpathlen += DevicePathNodeLength(node); + } + devpathlen += DevicePathNodeLength(NextDevicePathNode(node)); + status = BS->HandleProtocol(hin[n], &blkio_guid, (void**)&blkio); if (EFI_ERROR(status)) @@ -117,10 +124,16 @@ efipart_init(void) */ if (DevicePathType(node) == MEDIA_DEVICE_PATH && DevicePathSubType(node) == MEDIA_CDROM_DP) { - node->Type = END_DEVICE_PATH_TYPE; - node->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; - status = BS->LocateDevicePath(&blkio_guid, &devpath, + devpathcpy = malloc(devpathlen); + memcpy(devpathcpy, devpath, devpathlen); + node = devpathcpy; + while (!IsDevicePathEnd(NextDevicePathNode(node))) + node = NextDevicePathNode(node); + SetDevicePathEndNode(node); + tmpdevpath = devpathcpy; + status = BS->LocateDevicePath(&blkio_guid, &tmpdevpath, &handle); + free(devpathcpy); if (EFI_ERROR(status)) continue; hout[nout] = handle; From owner-svn-src-all@freebsd.org Tue Jul 7 18:45:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC620994986; Tue, 7 Jul 2015 18:45:34 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 AFE741D18; Tue, 7 Jul 2015 18:45:34 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67IjYg5045775; Tue, 7 Jul 2015 18:45:34 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67IjXte045772; Tue, 7 Jul 2015 18:45:33 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201507071845.t67IjXte045772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Tue, 7 Jul 2015 18:45:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285247 - head/sys/opencrypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 18:45:35 -0000 Author: jmg Date: Tue Jul 7 18:45:32 2015 New Revision: 285247 URL: https://svnweb.freebsd.org/changeset/base/285247 Log: we may get here w/ non-sleepable locks held, so switch to _NOWAIT when doing this memory allocation... Reviewed by: ae Modified: head/sys/opencrypto/criov.c head/sys/opencrypto/cryptodev.h head/sys/opencrypto/cryptosoft.c Modified: head/sys/opencrypto/criov.c ============================================================================== --- head/sys/opencrypto/criov.c Tue Jul 7 18:44:27 2015 (r285246) +++ head/sys/opencrypto/criov.c Tue Jul 7 18:45:32 2015 (r285247) @@ -193,7 +193,7 @@ crypto_apply(int flags, caddr_t buf, int return (error); } -void +int crypto_mbuftoiov(struct mbuf *mbuf, struct iovec **iovptr, int *cnt, int *allocated) { @@ -216,7 +216,9 @@ crypto_mbuftoiov(struct mbuf *mbuf, stru while ((mtmp = mtmp->m_next) != NULL) j++; iov = malloc(sizeof *iov * (i + j), M_CRYPTO_DATA, - M_WAITOK); + M_NOWAIT); + if (iov == NULL) + return ENOMEM; *allocated = 1; *cnt = i + j; memcpy(iov, *iovptr, sizeof *iov * i); @@ -235,4 +237,5 @@ crypto_mbuftoiov(struct mbuf *mbuf, stru *iovptr = iov; *cnt = i; + return 0; } Modified: head/sys/opencrypto/cryptodev.h ============================================================================== --- head/sys/opencrypto/cryptodev.h Tue Jul 7 18:44:27 2015 (r285246) +++ head/sys/opencrypto/cryptodev.h Tue Jul 7 18:45:32 2015 (r285247) @@ -465,7 +465,7 @@ extern int cuio_apply(struct uio *uio, i struct mbuf; struct iovec; -extern void crypto_mbuftoiov(struct mbuf *mbuf, struct iovec **iovptr, +extern int crypto_mbuftoiov(struct mbuf *mbuf, struct iovec **iovptr, int *cnt, int *allocated); extern void crypto_copyback(int flags, caddr_t buf, int off, int size, Modified: head/sys/opencrypto/cryptosoft.c ============================================================================== --- head/sys/opencrypto/cryptosoft.c Tue Jul 7 18:44:27 2015 (r285246) +++ head/sys/opencrypto/cryptosoft.c Tue Jul 7 18:45:32 2015 (r285247) @@ -147,8 +147,10 @@ swcr_encdec(struct cryptodesc *crd, stru iovalloc = 0; uio = &uiolcl; if ((flags & CRYPTO_F_IMBUF) != 0) { - crypto_mbuftoiov((struct mbuf *)buf, &iov, &iovcnt, + error = crypto_mbuftoiov((struct mbuf *)buf, &iov, &iovcnt, &iovalloc); + if (error) + return (error); uio->uio_iov = iov; uio->uio_iovcnt = iovcnt; } else if ((flags & CRYPTO_F_IOV) != 0) From owner-svn-src-all@freebsd.org Tue Jul 7 18:46:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8B2D9949D5; Tue, 7 Jul 2015 18:46:42 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 C8D081EAB; Tue, 7 Jul 2015 18:46:42 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67IkgLQ045972; Tue, 7 Jul 2015 18:46:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67IkglY045971; Tue, 7 Jul 2015 18:46:42 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201507071846.t67IkglY045971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 7 Jul 2015 18:46:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285248 - head/usr.bin/clang/lldb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 18:46:42 -0000 Author: emaste Date: Tue Jul 7 18:46:41 2015 New Revision: 285248 URL: https://svnweb.freebsd.org/changeset/base/285248 Log: lldb: use .PATH to find man page instead of symlinking it MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/clang/lldb/Makefile Modified: head/usr.bin/clang/lldb/Makefile ============================================================================== --- head/usr.bin/clang/lldb/Makefile Tue Jul 7 18:45:32 2015 (r285247) +++ head/usr.bin/clang/lldb/Makefile Tue Jul 7 18:46:41 2015 (r285248) @@ -13,8 +13,8 @@ SRCDIR= tools/lldb/tools/driver SRCS= Driver.cpp \ Platform.cpp -lldb.1: - ln -fs ${LLDB_SRCS}/docs/lldb.1 ${.TARGET} +# Man page directory +.PATH: ${LLDB_SRCS}/docs LIBADD= edit panel ncursesw execinfo z From owner-svn-src-all@freebsd.org Tue Jul 7 18:52:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04ED1994BB0; Tue, 7 Jul 2015 18:52:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 E89EE155A; Tue, 7 Jul 2015 18:52:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67IqN1Z050407; Tue, 7 Jul 2015 18:52:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67IqNdj050406; Tue, 7 Jul 2015 18:52:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507071852.t67IqNdj050406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 7 Jul 2015 18:52:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285249 - stable/10/sys/geom/eli X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 18:52:24 -0000 Author: gjb Date: Tue Jul 7 18:52:22 2015 New Revision: 285249 URL: https://svnweb.freebsd.org/changeset/base/285249 Log: MFC r273489 (cperciva): Populate the GELI passphrase cache with the kern.geom.eli.passphrase variable (if any) provided in the boot environment. Unset it from the kernel environment after doing this, so that the passphrase is no longer present in kernel memory once we enter userland. This will make it possible to provide a GELI passphrase via the boot loader. PR: 200448 Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/geom/eli/g_eli.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/eli/g_eli.c ============================================================================== --- stable/10/sys/geom/eli/g_eli.c Tue Jul 7 18:46:41 2015 (r285248) +++ stable/10/sys/geom/eli/g_eli.c Tue Jul 7 18:52:22 2015 (r285249) @@ -99,6 +99,25 @@ SYSCTL_UINT(_kern_geom_eli, OID_AUTO, bo &g_eli_boot_passcache, 0, "Passphrases are cached during boot process for possible reuse"); static void +fetch_loader_passphrase(void * dummy) +{ + char * env_passphrase; + + KASSERT(dynamic_kenv, ("need dynamic kenv")); + + if ((env_passphrase = kern_getenv("kern.geom.eli.passphrase")) != NULL) { + /* Extract passphrase from the environment. */ + strlcpy(cached_passphrase, env_passphrase, + sizeof(cached_passphrase)); + freeenv(env_passphrase); + + /* Wipe the passphrase from the environment. */ + kern_unsetenv("kern.geom.eli.passphrase"); + } +} +SYSINIT(geli_fetch_loader_passphrase, SI_SUB_KMEM + 1, SI_ORDER_ANY, + fetch_loader_passphrase, NULL); +static void zero_boot_passcache(void * dummy) { From owner-svn-src-all@freebsd.org Tue Jul 7 19:01:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3C2F994E7B; Tue, 7 Jul 2015 19:01:56 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 7ED3B1D41; Tue, 7 Jul 2015 19:01:56 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67J1u95055519; Tue, 7 Jul 2015 19:01:56 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67J1t3w055514; Tue, 7 Jul 2015 19:01:55 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201507071901.t67J1t3w055514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 7 Jul 2015 19:01:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285250 - in head/sys: boot/fdt/dts/arm modules/dtb/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 19:01:56 -0000 Author: loos Date: Tue Jul 7 19:01:54 2015 New Revision: 285250 URL: https://svnweb.freebsd.org/changeset/base/285250 Log: Add the Banana Pi DTS. The Banana Pi support is in progress and this is intended to help the early adopters. Added: head/sys/boot/fdt/dts/arm/bananapi.dts (contents, props changed) Modified: head/sys/modules/dtb/allwinner/Makefile Added: head/sys/boot/fdt/dts/arm/bananapi.dts ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/bananapi.dts Tue Jul 7 19:01:54 2015 (r285250) @@ -0,0 +1,79 @@ +/*- + * Copyright (c) 2013 Ganbold Tsagaankhuu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/include/ "sun7i-a20.dtsi" + +/ { + model = "BananaPi"; + + memory { + device_type = "memory"; + reg = < 0x40000000 0x40000000 >; /* 1GB RAM */ + }; + + aliases { + soc = &SOC; + UART0 = &UART0; + }; + + SOC: a20 { + + usb1: usb@01c14000 { + status = "okay"; + }; + + usb2: usb@01c1c000 { + status = "okay"; + }; + + UART0: serial@01c28000 { + status = "okay"; + }; + + mmc0: mmc@01c0f000 { + status = "okay"; + }; + + gmac@01c50000 { + phy-type = "rgmii-bpi"; + status = "okay"; + }; + + ahci: sata@01c18000 { + status = "okay"; + }; + }; + + chosen { + bootargs = "-v"; + stdin = "UART0"; + stdout = "UART0"; + }; +}; Modified: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- head/sys/modules/dtb/allwinner/Makefile Tue Jul 7 18:52:22 2015 (r285249) +++ head/sys/modules/dtb/allwinner/Makefile Tue Jul 7 19:01:54 2015 (r285250) @@ -1,6 +1,7 @@ # $FreeBSD$ # All the dts files for allwinner systems we support. DTS= \ + bananapi.dts \ cubieboard.dts \ cubieboard2.dts From owner-svn-src-all@freebsd.org Tue Jul 7 19:24:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B62F9953C0; Tue, 7 Jul 2015 19:24:00 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 3B0F81D80; Tue, 7 Jul 2015 19:24:00 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67JO0jh065788; Tue, 7 Jul 2015 19:24:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67JO0DZ065787; Tue, 7 Jul 2015 19:24:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201507071924.t67JO0DZ065787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 7 Jul 2015 19:24:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285251 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 19:24:00 -0000 Author: trasz Date: Tue Jul 7 19:23:59 2015 New Revision: 285251 URL: https://svnweb.freebsd.org/changeset/base/285251 Log: Fix markup. MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/sys/open.2 Modified: head/lib/libc/sys/open.2 ============================================================================== --- head/lib/libc/sys/open.2 Tue Jul 7 19:01:54 2015 (r285250) +++ head/lib/libc/sys/open.2 Tue Jul 7 19:23:59 2015 (r285251) @@ -427,7 +427,7 @@ of .Dv O_RDWR and .Dv O_EXEC . -.It Bq Eq EBADF +.It Bq Er EBADF The .Fa path argument does not specify an absolute path and the @@ -436,7 +436,7 @@ argument is neither .Dv AT_FDCWD nor a valid file descriptor open for searching. -.It Bq Eq ENOTDIR +.It Bq Er ENOTDIR The .Fa path argument is not an absolute path and @@ -444,7 +444,7 @@ argument is not an absolute path and is neither .Dv AT_FDCWD nor a file descriptor associated with a directory. -.It Bq Eq ENOTDIR +.It Bq Er ENOTDIR .Dv O_DIRECTORY is specified and the file is not a directory. .El From owner-svn-src-all@freebsd.org Tue Jul 7 19:29:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB258995472; Tue, 7 Jul 2015 19:29:19 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 CBAF41FB5; Tue, 7 Jul 2015 19:29:19 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67JTJZE066510; Tue, 7 Jul 2015 19:29:19 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67JTJIp066509; Tue, 7 Jul 2015 19:29:19 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201507071929.t67JTJIp066509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 7 Jul 2015 19:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285252 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 19:29:20 -0000 Author: markj Date: Tue Jul 7 19:29:18 2015 New Revision: 285252 URL: https://svnweb.freebsd.org/changeset/base/285252 Log: Fix an incorrect assertion in witness. The number of available lock list entries for a thread is LOCK_CHILDCOUNT, and each entry can record up to LOCK_NCHILDREN locks. When iterating over the locks held by a thread, a bound on the loop index is therefore given by LOCK_CHILDCOUNT * LOCK_NCHILDREN; WITNESS_COUNT is an unrelated constant. Reviewed by: jhb MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D2974 Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Tue Jul 7 19:23:59 2015 (r285251) +++ head/sys/kern/subr_witness.c Tue Jul 7 19:29:18 2015 (r285252) @@ -1221,7 +1221,7 @@ witness_checkorder(struct lock_object *l for (j = 0, lle = lock_list; lle != NULL; lle = lle->ll_next) { for (i = lle->ll_count - 1; i >= 0; i--, j++) { - MPASS(j < witness_count); + MPASS(j < LOCK_CHILDCOUNT * LOCK_NCHILDREN); lock1 = &lle->ll_children[i]; /* From owner-svn-src-all@freebsd.org Tue Jul 7 20:15:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77083995F4D; Tue, 7 Jul 2015 20:15:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 5D32E1B7C; Tue, 7 Jul 2015 20:15:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67KFAkT090563; Tue, 7 Jul 2015 20:15:10 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67KFAh7090560; Tue, 7 Jul 2015 20:15:10 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201507072015.t67KFAh7090560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Tue, 7 Jul 2015 20:15:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285253 - in head: etc usr.bin/quota X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 20:15:11 -0000 Author: hrs Date: Tue Jul 7 20:15:09 2015 New Revision: 285253 URL: https://svnweb.freebsd.org/changeset/base/285253 Log: - Add IPv6 support in quota(1). While rpc.rquotad has supported PF_INET6 for a long time, quota(1) utility supported only PF_INET. - Clean up confusing changes in f_mntfromname. - Add an entry for rquotad with rpc/udp6 to inetd.conf. PR: 194084 Modified: head/etc/inetd.conf head/usr.bin/quota/quota.c Modified: head/etc/inetd.conf ============================================================================== --- head/etc/inetd.conf Tue Jul 7 19:29:18 2015 (r285252) +++ head/etc/inetd.conf Tue Jul 7 20:15:09 2015 (r285253) @@ -68,6 +68,7 @@ #walld/1 dgram rpc/udp wait root /usr/libexec/rpc.rwalld rpc.rwalld #pcnfsd/1-2 dgram rpc/udp wait root /usr/local/libexec/rpc.pcnfsd rpc.pcnfsd #rquotad/1 dgram rpc/udp wait root /usr/libexec/rpc.rquotad rpc.rquotad +#rquotad/1 dgram rpc/udp6 wait root /usr/libexec/rpc.rquotad rpc.rquotad #sprayd/1 dgram rpc/udp wait root /usr/libexec/rpc.sprayd rpc.sprayd # # example entry for the optional pop3 server Modified: head/usr.bin/quota/quota.c ============================================================================== --- head/usr.bin/quota/quota.c Tue Jul 7 19:29:18 2015 (r285252) +++ head/usr.bin/quota/quota.c Tue Jul 7 20:15:09 2015 (r285253) @@ -570,7 +570,7 @@ getnfsquota(struct statfs *fst, struct q struct getquota_rslt gq_rslt; struct dqblk *dqp = &qup->dqblk; struct timeval tv; - char *cp; + char *cp, host[NI_MAXHOST]; if (fst->f_flags & MNT_LOCAL) return (0); @@ -584,33 +584,29 @@ getnfsquota(struct statfs *fst, struct q /* * must be some form of "hostname:/path" */ - cp = strchr(fst->f_mntfromname, ':'); + cp = fst->f_mntfromname; + do { + cp = strrchr(cp, ':'); + } while (cp != NULL && *(cp + 1) != '/'); if (cp == NULL) { warnx("cannot find hostname for %s", fst->f_mntfromname); return (0); } + memset(host, 0, sizeof(host)); + memcpy(host, fst->f_mntfromname, cp - fst->f_mntfromname); + host[sizeof(host) - 1] = '\0'; - *cp = '\0'; - if (*(cp+1) != '/') { - *cp = ':'; - return (0); - } - /* Avoid attempting the RPC for special amd(8) filesystems. */ if (strncmp(fst->f_mntfromname, "pid", 3) == 0 && - strchr(fst->f_mntfromname, '@') != NULL) { - *cp = ':'; + strchr(fst->f_mntfromname, '@') != NULL) return (0); - } gq_args.gqa_pathp = cp + 1; gq_args.gqa_uid = id; - if (callaurpc(fst->f_mntfromname, RQUOTAPROG, RQUOTAVERS, + if (callaurpc(host, RQUOTAPROG, RQUOTAVERS, RQUOTAPROC_GETQUOTA, (xdrproc_t)xdr_getquota_args, (char *)&gq_args, - (xdrproc_t)xdr_getquota_rslt, (char *)&gq_rslt) != 0) { - *cp = ':'; + (xdrproc_t)xdr_getquota_rslt, (char *)&gq_rslt) != 0) return (0); - } switch (gq_rslt.status) { case Q_NOQUOTA: @@ -643,13 +639,12 @@ getnfsquota(struct statfs *fst, struct q tv.tv_sec + gq_rslt.getquota_rslt_u.gqr_rquota.rq_btimeleft; dqp->dqb_itime = tv.tv_sec + gq_rslt.getquota_rslt_u.gqr_rquota.rq_ftimeleft; - *cp = ':'; return (1); default: warnx("bad rpc result, host: %s", fst->f_mntfromname); break; } - *cp = ':'; + return (0); } @@ -657,26 +652,17 @@ static int callaurpc(char *host, int prognum, int versnum, int procnum, xdrproc_t inproc, char *in, xdrproc_t outproc, char *out) { - struct sockaddr_in server_addr; enum clnt_stat clnt_stat; - struct hostent *hp; struct timeval timeout, tottimeout; CLIENT *client = NULL; - int sock = RPC_ANYSOCK; - - if ((hp = gethostbyname(host)) == NULL) - return ((int) RPC_UNKNOWNHOST); + + client = clnt_create(host, prognum, versnum, "udp"); + if (client == NULL) + return ((int)rpc_createerr.cf_stat); timeout.tv_usec = 0; timeout.tv_sec = 6; - bcopy(hp->h_addr, &server_addr.sin_addr, - MIN(hp->h_length,(int)sizeof(server_addr.sin_addr))); - server_addr.sin_family = AF_INET; - server_addr.sin_port = 0; - - if ((client = clntudp_create(&server_addr, prognum, - versnum, timeout, &sock)) == NULL) - return ((int) rpc_createerr.cf_stat); + CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT, (char *)(void *)&timeout); client->cl_auth = authunix_create_default(); tottimeout.tv_sec = 25; From owner-svn-src-all@freebsd.org Tue Jul 7 20:31:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E540995246; Tue, 7 Jul 2015 20:31:10 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 632EE12EF; Tue, 7 Jul 2015 20:31:10 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67KV9lA098453; Tue, 7 Jul 2015 20:31:09 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67KV9TN098452; Tue, 7 Jul 2015 20:31:09 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201507072031.t67KV9TN098452@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Tue, 7 Jul 2015 20:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285254 - head/sys/crypto/aesni X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 20:31:10 -0000 Author: jmg Date: Tue Jul 7 20:31:09 2015 New Revision: 285254 URL: https://svnweb.freebsd.org/changeset/base/285254 Log: unroll the loop slightly... This improves performance enough to justify, especially for CBC performance where we can't pipeline.. I don't happen to have my measurements handy though... Sponsored by: Netflix, Inc. Modified: head/sys/crypto/aesni/aesencdec.h Modified: head/sys/crypto/aesni/aesencdec.h ============================================================================== --- head/sys/crypto/aesni/aesencdec.h Tue Jul 7 20:15:09 2015 (r285253) +++ head/sys/crypto/aesni/aesencdec.h Tue Jul 7 20:31:09 2015 (r285254) @@ -1,5 +1,6 @@ /*- * Copyright 2013 John-Mark Gurney + * Copyright 2015 Netflix, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,6 +28,9 @@ * */ +#ifndef _AESENCDEC_H_ +#define _AESENCDEC_H_ + #include #include @@ -105,6 +109,7 @@ aesni_dec8(int rounds, const __m128i *ke out[7] = _mm_aesdeclast_si128(h, keysched[i + 1]); } +/* rounds is passed in as rounds - 1 */ static inline __m128i aesni_enc(int rounds, const __m128i *keysched, const __m128i from) { @@ -112,11 +117,13 @@ aesni_enc(int rounds, const __m128i *key int i; tmp = from ^ keysched[0]; - - for (i = 0; i < rounds; i++) + for (i = 1; i < rounds; i += 2) { + tmp = _mm_aesenc_si128(tmp, keysched[i]); tmp = _mm_aesenc_si128(tmp, keysched[i + 1]); + } - return _mm_aesenclast_si128(tmp, keysched[i + 1]); + tmp = _mm_aesenc_si128(tmp, keysched[rounds]); + return _mm_aesenclast_si128(tmp, keysched[rounds + 1]); } static inline __m128i @@ -127,8 +134,13 @@ aesni_dec(int rounds, const __m128i *key tmp = from ^ keysched[0]; - for (i = 0; i < rounds; i++) + for (i = 1; i < rounds; i += 2) { + tmp = _mm_aesdec_si128(tmp, keysched[i]); tmp = _mm_aesdec_si128(tmp, keysched[i + 1]); + } - return _mm_aesdeclast_si128(tmp, keysched[i + 1]); + tmp = _mm_aesdec_si128(tmp, keysched[rounds]); + return _mm_aesdeclast_si128(tmp, keysched[rounds + 1]); } + +#endif /* _AESENCDEC_H_ */ From owner-svn-src-all@freebsd.org Tue Jul 7 20:36:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F95399531B; Tue, 7 Jul 2015 20:36:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 36A15186F; Tue, 7 Jul 2015 20:36:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67KanQ3000527; Tue, 7 Jul 2015 20:36:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67KanGb000524; Tue, 7 Jul 2015 20:36:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507072036.t67KanGb000524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 7 Jul 2015 20:36:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285255 - stable/10/sys/geom/eli X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 20:36:50 -0000 Author: gjb Date: Tue Jul 7 20:36:48 2015 New Revision: 285255 URL: https://svnweb.freebsd.org/changeset/base/285255 Log: Revert r285249, pending further investigation on how the build broke. Approved by: re (implicit) Pointyhat: gjb (self) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/geom/eli/g_eli.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/eli/g_eli.c ============================================================================== --- stable/10/sys/geom/eli/g_eli.c Tue Jul 7 20:31:09 2015 (r285254) +++ stable/10/sys/geom/eli/g_eli.c Tue Jul 7 20:36:48 2015 (r285255) @@ -99,25 +99,6 @@ SYSCTL_UINT(_kern_geom_eli, OID_AUTO, bo &g_eli_boot_passcache, 0, "Passphrases are cached during boot process for possible reuse"); static void -fetch_loader_passphrase(void * dummy) -{ - char * env_passphrase; - - KASSERT(dynamic_kenv, ("need dynamic kenv")); - - if ((env_passphrase = kern_getenv("kern.geom.eli.passphrase")) != NULL) { - /* Extract passphrase from the environment. */ - strlcpy(cached_passphrase, env_passphrase, - sizeof(cached_passphrase)); - freeenv(env_passphrase); - - /* Wipe the passphrase from the environment. */ - kern_unsetenv("kern.geom.eli.passphrase"); - } -} -SYSINIT(geli_fetch_loader_passphrase, SI_SUB_KMEM + 1, SI_ORDER_ANY, - fetch_loader_passphrase, NULL); -static void zero_boot_passcache(void * dummy) { From owner-svn-src-all@freebsd.org Tue Jul 7 21:05:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47C0C99589C; Tue, 7 Jul 2015 21:05:22 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 281631670; Tue, 7 Jul 2015 21:05:22 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67L5LNL015228; Tue, 7 Jul 2015 21:05:21 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67L5Lwh015226; Tue, 7 Jul 2015 21:05:21 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507072105.t67L5Lwh015226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 7 Jul 2015 21:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285256 - in head/usr.sbin/pw: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 21:05:22 -0000 Author: bapt Date: Tue Jul 7 21:05:20 2015 New Revision: 285256 URL: https://svnweb.freebsd.org/changeset/base/285256 Log: pw: fail if an invalid entry is found while parsing master.passwd and group PR: 198554 Reported by: diaran MFC after: 2 days Modified: head/usr.sbin/pw/pw_vpw.c head/usr.sbin/pw/tests/pw_useradd.sh Modified: head/usr.sbin/pw/pw_vpw.c ============================================================================== --- head/usr.sbin/pw/pw_vpw.c Tue Jul 7 20:36:48 2015 (r285255) +++ head/usr.sbin/pw/pw_vpw.c Tue Jul 7 21:05:20 2015 (r285256) @@ -38,6 +38,7 @@ static const char rcsid[] = #include #include #include +#include #include "pwupd.h" @@ -80,6 +81,9 @@ vnextpwent(char const *nam, uid_t uid, i if (line[linelen - 1 ] == '\n') line[linelen - 1] = '\0'; pw = pw_scan(line, PWSCAN_MASTER); + if (pw == NULL) + errx(EXIT_FAILURE, "Invalid user entry in '%s':" + " '%s'", getpwpath(_MASTERPASSWD), line); if (uid != (uid_t)-1) { if (uid == pw->pw_uid) break; @@ -160,6 +164,9 @@ vnextgrent(char const *nam, gid_t gid, i if (line[linelen - 1 ] == '\n') line[linelen - 1] = '\0'; gr = gr_scan(line); + if (gr == NULL) + errx(EXIT_FAILURE, "Invalid group entry in '%s':" + " '%s'", getgrpath(_GROUP), line); if (gid != (gid_t)-1) { if (gid == gr->gr_gid) break; Modified: head/usr.sbin/pw/tests/pw_useradd.sh ============================================================================== --- head/usr.sbin/pw/tests/pw_useradd.sh Tue Jul 7 20:36:48 2015 (r285255) +++ head/usr.sbin/pw/tests/pw_useradd.sh Tue Jul 7 21:05:20 2015 (r285256) @@ -207,6 +207,30 @@ user_add_expiration_body() { atf_check -s exit:0 ${PW} userdel foo } +atf_test_case user_add_invalid_user_entry +user_add_invalid_user_entry_body() { + touch ${HOME}/master.passwd + touch ${HOME}/group + + pwd_mkdb -p -d ${HOME} ${HOME}/master.passwd || \ + atf_fail "generate passwd from master.passwd" + atf_check -s exit:0 ${PW} useradd foo + echo "foo1:*:1002" >> ${HOME}/master.passwd + atf_check -s exit:1 -e match:"Invalid user entry" ${PW} useradd foo2 +} + +atf_test_case user_add_invalid_group_entry +user_add_invalid_group_entry_body() { + touch ${HOME}/master.passwd + touch ${HOME}/group + + pwd_mkdb -p -d ${HOME} ${HOME}/master.passwd || \ + atf_fail "generate passwd from master.passwd" + atf_check -s exit:0 ${PW} useradd foo + echo 'foo1:*:1002' >> group + atf_check -s exit:1 -e match:"Invalid group entry" ${PW} useradd foo2 +} + atf_init_test_cases() { atf_add_test_case user_add atf_add_test_case user_add_noupdate @@ -225,4 +249,6 @@ atf_init_test_cases() { atf_add_test_case user_add_password_expiration_date_relative atf_add_test_case user_add_name_too_long atf_add_test_case user_add_expiration + atf_add_test_case user_add_invalid_user_entry + atf_add_test_case user_add_invalid_group_entry } From owner-svn-src-all@freebsd.org Tue Jul 7 21:43:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C950995E8A; Tue, 7 Jul 2015 21:43:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 7BD0E1A15; Tue, 7 Jul 2015 21:43:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67LhOBX035141; Tue, 7 Jul 2015 21:43:24 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67LhOop035140; Tue, 7 Jul 2015 21:43:24 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201507072143.t67LhOop035140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 7 Jul 2015 21:43:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285257 - in stable: 8/contrib/bind9/lib/dns 9/contrib/bind9/lib/dns X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 21:43:24 -0000 Author: delphij Date: Tue Jul 7 21:43:23 2015 New Revision: 285257 URL: https://svnweb.freebsd.org/changeset/base/285257 Log: Fix BIND resolver remote denial of service when validating. Security: CVE-2015-4620 Security: FreeBSD-SA-15:11.bind Modified: stable/9/contrib/bind9/lib/dns/validator.c Changes in other areas also in this revision: Modified: stable/8/contrib/bind9/lib/dns/validator.c Modified: stable/9/contrib/bind9/lib/dns/validator.c ============================================================================== --- stable/9/contrib/bind9/lib/dns/validator.c Tue Jul 7 21:05:20 2015 (r285256) +++ stable/9/contrib/bind9/lib/dns/validator.c Tue Jul 7 21:43:23 2015 (r285257) @@ -1420,7 +1420,6 @@ compute_keytag(dns_rdata_t *rdata, dns_r */ static isc_boolean_t isselfsigned(dns_validator_t *val) { - dns_fixedname_t fixed; dns_rdataset_t *rdataset, *sigrdataset; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_t sigrdata = DNS_RDATA_INIT; @@ -1476,8 +1475,7 @@ isselfsigned(dns_validator_t *val) { result = dns_dnssec_verify3(name, rdataset, dstkey, ISC_TRUE, val->view->maxbits, - mctx, &sigrdata, - dns_fixedname_name(&fixed)); + mctx, &sigrdata, NULL); dst_key_free(&dstkey); if (result != ISC_R_SUCCESS) continue; From owner-svn-src-all@freebsd.org Tue Jul 7 21:43:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65139995E98; Tue, 7 Jul 2015 21:43:25 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 544061A16; Tue, 7 Jul 2015 21:43:25 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67LhPam035147; Tue, 7 Jul 2015 21:43:25 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67LhPib035146; Tue, 7 Jul 2015 21:43:25 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201507072143.t67LhPib035146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 7 Jul 2015 21:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r285257 - in stable: 8/contrib/bind9/lib/dns 9/contrib/bind9/lib/dns X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 21:43:25 -0000 Author: delphij Date: Tue Jul 7 21:43:23 2015 New Revision: 285257 URL: https://svnweb.freebsd.org/changeset/base/285257 Log: Fix BIND resolver remote denial of service when validating. Security: CVE-2015-4620 Security: FreeBSD-SA-15:11.bind Modified: stable/8/contrib/bind9/lib/dns/validator.c Changes in other areas also in this revision: Modified: stable/9/contrib/bind9/lib/dns/validator.c Modified: stable/8/contrib/bind9/lib/dns/validator.c ============================================================================== --- stable/8/contrib/bind9/lib/dns/validator.c Tue Jul 7 21:05:20 2015 (r285256) +++ stable/8/contrib/bind9/lib/dns/validator.c Tue Jul 7 21:43:23 2015 (r285257) @@ -1406,7 +1406,6 @@ compute_keytag(dns_rdata_t *rdata, dns_r */ static isc_boolean_t isselfsigned(dns_validator_t *val) { - dns_fixedname_t fixed; dns_rdataset_t *rdataset, *sigrdataset; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_t sigrdata = DNS_RDATA_INIT; @@ -1461,7 +1460,7 @@ isselfsigned(dns_validator_t *val) { result = dns_dnssec_verify2(name, rdataset, dstkey, ISC_TRUE, mctx, &sigrdata, - dns_fixedname_name(&fixed)); + NULL); dst_key_free(&dstkey); if (result != ISC_R_SUCCESS) continue; From owner-svn-src-all@freebsd.org Tue Jul 7 21:44:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11D1D995F2F; Tue, 7 Jul 2015 21:44:05 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 00D871CAE; Tue, 7 Jul 2015 21:44:05 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67Li4lc035341; Tue, 7 Jul 2015 21:44:04 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67Li2KC035322; Tue, 7 Jul 2015 21:44:02 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201507072144.t67Li2KC035322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 7 Jul 2015 21:44:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r285258 - in releng: 8.4 8.4/contrib/bind9/lib/dns 8.4/sys/conf 9.3 9.3/contrib/bind9/lib/dns 9.3/sys/conf X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 21:44:05 -0000 Author: delphij Date: Tue Jul 7 21:44:01 2015 New Revision: 285258 URL: https://svnweb.freebsd.org/changeset/base/285258 Log: Fix BIND resolver remote denial of service when validating. Security: CVE-2015-4620 Security: FreeBSD-SA-15:11.bind Approved by: so Modified: releng/8.4/UPDATING releng/8.4/contrib/bind9/lib/dns/validator.c releng/8.4/sys/conf/newvers.sh releng/9.3/UPDATING releng/9.3/contrib/bind9/lib/dns/validator.c releng/9.3/sys/conf/newvers.sh Modified: releng/8.4/UPDATING ============================================================================== --- releng/8.4/UPDATING Tue Jul 7 21:43:23 2015 (r285257) +++ releng/8.4/UPDATING Tue Jul 7 21:44:01 2015 (r285258) @@ -15,6 +15,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20150707: p33 FreeBSD-SA-15:11.bind + Fix BIND resolver remote denial of service when validating. + 20150630: p32 FreeBSD-EN-15:08.sendmail [revised] Improvements to sendmail TLS/DH interoperability. [EN-15:08] Modified: releng/8.4/contrib/bind9/lib/dns/validator.c ============================================================================== --- releng/8.4/contrib/bind9/lib/dns/validator.c Tue Jul 7 21:43:23 2015 (r285257) +++ releng/8.4/contrib/bind9/lib/dns/validator.c Tue Jul 7 21:44:01 2015 (r285258) @@ -1841,7 +1841,6 @@ compute_keytag(dns_rdata_t *rdata, dns_r */ static isc_boolean_t isselfsigned(dns_validator_t *val) { - dns_fixedname_t fixed; dns_rdataset_t *rdataset, *sigrdataset; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_t sigrdata = DNS_RDATA_INIT; @@ -1892,7 +1891,7 @@ isselfsigned(dns_validator_t *val) { result = dns_dnssec_verify2(name, rdataset, dstkey, ISC_TRUE, mctx, &sigrdata, - dns_fixedname_name(&fixed)); + NULL); dst_key_free(&dstkey); if (result != ISC_R_SUCCESS) continue; Modified: releng/8.4/sys/conf/newvers.sh ============================================================================== --- releng/8.4/sys/conf/newvers.sh Tue Jul 7 21:43:23 2015 (r285257) +++ releng/8.4/sys/conf/newvers.sh Tue Jul 7 21:44:01 2015 (r285258) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.4" -BRANCH="RELEASE-p32" +BRANCH="RELEASE-p33" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/9.3/UPDATING ============================================================================== --- releng/9.3/UPDATING Tue Jul 7 21:43:23 2015 (r285257) +++ releng/9.3/UPDATING Tue Jul 7 21:44:01 2015 (r285258) @@ -11,6 +11,9 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20150707: p19 FreeBSD-SA-15:11.bind + Fix BIND resolver remote denial of service when validating. + 20150630: p18 FreeBSD-EN-15:08.sendmail [revised] FreeBSD-EN-15:09.xlocale Modified: releng/9.3/contrib/bind9/lib/dns/validator.c ============================================================================== --- releng/9.3/contrib/bind9/lib/dns/validator.c Tue Jul 7 21:43:23 2015 (r285257) +++ releng/9.3/contrib/bind9/lib/dns/validator.c Tue Jul 7 21:44:01 2015 (r285258) @@ -1406,7 +1406,6 @@ compute_keytag(dns_rdata_t *rdata, dns_r */ static isc_boolean_t isselfsigned(dns_validator_t *val) { - dns_fixedname_t fixed; dns_rdataset_t *rdataset, *sigrdataset; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_t sigrdata = DNS_RDATA_INIT; @@ -1462,8 +1461,7 @@ isselfsigned(dns_validator_t *val) { result = dns_dnssec_verify3(name, rdataset, dstkey, ISC_TRUE, val->view->maxbits, - mctx, &sigrdata, - dns_fixedname_name(&fixed)); + mctx, &sigrdata, NULL); dst_key_free(&dstkey); if (result != ISC_R_SUCCESS) continue; Modified: releng/9.3/sys/conf/newvers.sh ============================================================================== --- releng/9.3/sys/conf/newvers.sh Tue Jul 7 21:43:23 2015 (r285257) +++ releng/9.3/sys/conf/newvers.sh Tue Jul 7 21:44:01 2015 (r285258) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="RELEASE-p18" +BRANCH="RELEASE-p19" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Tue Jul 7 23:37:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC31899644D; Tue, 7 Jul 2015 23:37:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 DBC6A114E; Tue, 7 Jul 2015 23:37:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67NbHCF095924; Tue, 7 Jul 2015 23:37:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67NbH1o095923; Tue, 7 Jul 2015 23:37:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507072337.t67NbH1o095923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 7 Jul 2015 23:37:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r285259 - in stable: 8/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 23:37:18 -0000 Author: gjb Date: Tue Jul 7 23:37:16 2015 New Revision: 285259 URL: https://svnweb.freebsd.org/changeset/base/285259 Log: Document SA-15:11.bind. Sponsored by: The FreeBSD Foundation Modified: stable/8/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/9/release/doc/share/xml/security.xml Modified: stable/8/release/doc/share/xml/security.xml ============================================================================== --- stable/8/release/doc/share/xml/security.xml Tue Jul 7 21:44:01 2015 (r285258) +++ stable/8/release/doc/share/xml/security.xml Tue Jul 7 23:37:16 2015 (r285259) @@ -260,6 +260,13 @@ 16 June 2015 Multiple vulnerabilities + + + FreeBSD-SA-15:11.bind + 7 July 2015 + Resolver remote denial of service + From owner-svn-src-all@freebsd.org Tue Jul 7 23:37:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7304996452; Tue, 7 Jul 2015 23:37:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 B6DF3114F; Tue, 7 Jul 2015 23:37:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67NbIvH095931; Tue, 7 Jul 2015 23:37:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67NbIDc095930; Tue, 7 Jul 2015 23:37:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507072337.t67NbIDc095930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 7 Jul 2015 23:37:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285259 - in stable: 8/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 23:37:18 -0000 Author: gjb Date: Tue Jul 7 23:37:16 2015 New Revision: 285259 URL: https://svnweb.freebsd.org/changeset/base/285259 Log: Document SA-15:11.bind. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/8/release/doc/share/xml/security.xml Modified: stable/9/release/doc/share/xml/security.xml ============================================================================== --- stable/9/release/doc/share/xml/security.xml Tue Jul 7 21:44:01 2015 (r285258) +++ stable/9/release/doc/share/xml/security.xml Tue Jul 7 23:37:16 2015 (r285259) @@ -155,6 +155,13 @@ 16 June 2015 Multiple vulnerabilities + + + FreeBSD-SA-15:11.bind + 7 July 2015 + Resolver remote denial of service + From owner-svn-src-all@freebsd.org Tue Jul 7 23:41:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4ED969965DF; Tue, 7 Jul 2015 23:41:26 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 3F0E018D1; Tue, 7 Jul 2015 23:41:26 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67NfQHv099266; Tue, 7 Jul 2015 23:41:26 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67NfQNW099265; Tue, 7 Jul 2015 23:41:26 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201507072341.t67NfQNW099265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 7 Jul 2015 23:41:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285260 - head/sbin/mount_nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 23:41:26 -0000 Author: rmacklem Date: Tue Jul 7 23:41:25 2015 New Revision: 285260 URL: https://svnweb.freebsd.org/changeset/base/285260 Log: Since the case where secflavor < 0 indicates the security flavor is to be negotiated, it could be a Kerberized mount. As such, filling in the "principal" argument using the canonized host name makes sense. If it is negotiated as AUTH_SYS, the "principal" argument is meaningless but harmless. Requested by: masato@itc.naist.jp Tested by: masato@itc.naist.jp PR: 201073 MFC after: 1 month Modified: head/sbin/mount_nfs/mount_nfs.c Modified: head/sbin/mount_nfs/mount_nfs.c ============================================================================== --- head/sbin/mount_nfs/mount_nfs.c Tue Jul 7 23:37:16 2015 (r285259) +++ head/sbin/mount_nfs/mount_nfs.c Tue Jul 7 23:41:25 2015 (r285260) @@ -591,8 +591,8 @@ getnfsargs(char *spec, struct iovec **io * For a Kerberized nfs mount where the "principal" * argument has not been set, add it here. */ - if (got_principal == 0 && secflavor >= 0 && - secflavor != AUTH_SYS && ai_nfs->ai_canonname != NULL) { + if (got_principal == 0 && secflavor != AUTH_SYS && + ai_nfs->ai_canonname != NULL) { snprintf(pname, sizeof (pname), "nfs@%s", ai_nfs->ai_canonname); build_iovec(iov, iovlen, "principal", pname, From owner-svn-src-all@freebsd.org Wed Jul 8 00:51:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 791C3921A; Wed, 8 Jul 2015 00:51:54 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 61E0518B3; Wed, 8 Jul 2015 00:51:54 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t680psWx037814; Wed, 8 Jul 2015 00:51:54 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t680psVG037813; Wed, 8 Jul 2015 00:51:54 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201507080051.t680psVG037813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 8 Jul 2015 00:51:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285261 - head/usr.sbin/jail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 00:51:54 -0000 Author: hrs Date: Wed Jul 8 00:51:53 2015 New Revision: 285261 URL: https://svnweb.freebsd.org/changeset/base/285261 Log: Fix offset calculation in variable substitution in jail.conf. The following did not work correctly: A="A_${B}_C_${D}" B="BBBBB" D="DDDD_${E}_FFFFF" E="EEEEE" PR: 189139 Reviewed by: jamie Differential Revision: https://reviews.freebsd.org/D3018 Modified: head/usr.sbin/jail/config.c Modified: head/usr.sbin/jail/config.c ============================================================================== --- head/usr.sbin/jail/config.c Tue Jul 7 23:41:25 2015 (r285260) +++ head/usr.sbin/jail/config.c Wed Jul 8 00:51:53 2015 (r285261) @@ -130,9 +130,8 @@ load_config(void) struct cfjail *j, *tj, *wj; struct cfparam *p, *vp, *tp; struct cfstring *s, *vs, *ns; - struct cfvar *v; + struct cfvar *v, *vv; char *ep; - size_t varoff; int did_self, jseq, pgen; if (!strcmp(cfname, "-")) { @@ -191,7 +190,6 @@ load_config(void) p->gen = ++pgen; find_vars: TAILQ_FOREACH(s, &p->val, tq) { - varoff = 0; while ((v = STAILQ_FIRST(&s->vars))) { TAILQ_FOREACH(vp, &j->params, tq) if (!strcmp(vp->name, v->name)) @@ -233,11 +231,13 @@ load_config(void) goto bad_var; } s->s = erealloc(s->s, s->len + vs->len + 1); - memmove(s->s + v->pos + varoff + vs->len, - s->s + v->pos + varoff, - s->len - (v->pos + varoff) + 1); - memcpy(s->s + v->pos + varoff, vs->s, vs->len); - varoff += vs->len; + memmove(s->s + v->pos + vs->len, + s->s + v->pos, + s->len - v->pos + 1); + memcpy(s->s + v->pos, vs->s, vs->len); + vv = v; + while ((vv = STAILQ_NEXT(vv, tq))) + vv->pos += vs->len; s->len += vs->len; while ((vs = TAILQ_NEXT(vs, tq))) { ns = emalloc(sizeof(struct cfstring)); From owner-svn-src-all@freebsd.org Wed Jul 8 03:20:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D524995CBB; Wed, 8 Jul 2015 03:20:29 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 0D4D116EF; Wed, 8 Jul 2015 03:20:29 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t683KS8U015079; Wed, 8 Jul 2015 03:20:28 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t683KS0T015078; Wed, 8 Jul 2015 03:20:28 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201507080320.t683KS0T015078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 8 Jul 2015 03:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285262 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 03:20:29 -0000 Author: cem Date: Wed Jul 8 03:20:28 2015 New Revision: 285262 URL: https://svnweb.freebsd.org/changeset/base/285262 Log: Add myself to committers-src.dot Approved by: markj (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed Jul 8 00:51:53 2015 (r285261) +++ head/share/misc/committers-src.dot Wed Jul 8 03:20:28 2015 (r285262) @@ -131,6 +131,7 @@ bruno [label="Bruno Ducrot\nbruno@FreeBS bryanv [label="Bryan Venteicher\nbryanv@FreeBSD.org\n2012/11/03"] bschmidt [label="Bernhard Schmidt\nbschmidt@FreeBSD.org\n2010/02/06"] bz [label="Bjoern A. Zeeb\nbz@FreeBSD.org\n2004/07/27"] +cem [label="Conrad Meyer\ncem@FreeBSD.org\n2015/07/05"] cognet [label="Olivier Houchard\ncognet@FreeBSD.org\n2002/10/09"] cokane [label="Coleman Kane\ncokane@FreeBSD.org\n2000/06/19"] cperciva [label="Colin Percival\ncperciva@FreeBSD.org\n2004/01/20"] @@ -577,6 +578,8 @@ marcel -> marius marcel -> nwhitehorn marcel -> sjg +markj -> cem + markm -> jasone markm -> sheldonh From owner-svn-src-all@freebsd.org Wed Jul 8 04:37:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8BE9996962; Wed, 8 Jul 2015 04:37:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 76D05121C; Wed, 8 Jul 2015 04:37:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 1740AD62C0A; Wed, 8 Jul 2015 14:37:10 +1000 (AEST) Date: Wed, 8 Jul 2015 14:37:09 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John-Mark Gurney cc: Bruce Evans , Ian Lepore , Neel Natu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285217 - head/usr.sbin/bhyve In-Reply-To: <20150707180627.GD8523@funkthat.com> Message-ID: <20150708125051.D1092@besplex.bde.org> References: <201507061933.t66JXTtJ050058@repo.freebsd.org> <1436213492.1334.64.camel@freebsd.org> <20150707122407.O1017@besplex.bde.org> <20150707180627.GD8523@funkthat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=XMDNMlVE c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=cFPdcFN4uJ3_VdDpQDwA:9 a=87jCtm53kozK21s1:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 04:37:22 -0000 On Tue, 7 Jul 2015, John-Mark Gurney wrote: > Bruce Evans wrote this message on Tue, Jul 07, 2015 at 16:11 +1000: >> - tty_init_console() doesn't set CLOCAL in the lock state device. So >> without fixation, bugs like the one in reset(1) break serial consoles. > > Here's a patch to fix that: > Index: tty.c > =================================================================== > --- tty.c (revision 284880) > +++ tty.c (working copy) > @@ -858,6 +858,8 @@ tty_init_console(struct tty *tp, speed_t s) > { > struct termios *ti = &tp->t_termios_init_in; > struct termios *to = &tp->t_termios_init_out; > + struct termios *lti = &tp->t_termios_lock_in; > + struct termios *lto = &tp->t_termios_lock_out; > > if (s != 0) { > ti->c_ispeed = ti->c_ospeed = s; > @@ -866,6 +868,8 @@ tty_init_console(struct tty *tp, speed_t s) > > ti->c_cflag |= CLOCAL; > to->c_cflag |= CLOCAL; > + lti->c_cflag |= CLOCAL; > + lto->c_cflag |= CLOCAL; > } > > /* > > I've tested that this fixes the issue (on a machine that doesn't have > the bhyve fix yet)... I have used (some version) the enclosed more complete fix for about 5 years. > To me this seems a very good way to start it, as it still allows the > sysadmin to change the lock device on the console after boot if they > so choose... Of course I agree with this, since I designed it to work like that in 1994. (Actually, I copied most of the locking semantics from Linux, and added initial state devices to give more control.) The commit message for this seems to be have lost in the merge from FreeBSD-1. Here it is from the FreeBSD-1 version (sio 1.46 in FreeBD-1 is part of 1.51 in FreeBSD-2). X RCS file: /home/ncvs/src1/sys/i386/isa/sio.c,v X Working file: sio.c X head: 1.56 X ---------------------------- X revision 1.46 X date: 1994/05/30 03:13:36; author: ache; state: Exp; lines: +416 -436 X From Ache: X Better kernel printout for multiport cards X X From Bde: X o Get decls of tk_nin, etc. from "dkstat.h" (a stupid place). X o Mallocate sio structs as well as tty structs. X o FAKE_DCD() is now handled by setting CLOCAL in the initial X and lock states. X o Removed ifdefs for COM_BIDIR. It is now standard. Callin X devices now act identically (except for bug fixes) to the X old standard devices if the callout devices are not used. X o New magic minors for initial and lock devices. Better macros X to handle magic minors. "ls -l /dev" should show something X like this: X crw------- 1 uucp wheel 28, 0 May 26 01:18 /dev/ttyd0 X crw------- 1 uucp wheel 28, 1 May 21 11:25 /dev/ttyd1 X crw-r--r-- 1 root wheel 28, 32 May 15 19:36 /dev/ttyid0 X crw-r--r-- 1 root wheel 28, 33 May 15 19:36 /dev/ttyid1 X crw-r--r-- 1 root wheel 28, 64 May 15 19:36 /dev/ttyld0 X crw-r--r-- 1 root wheel 28, 65 May 15 19:36 /dev/ttyld1 X crw------- 1 uucp wheel 28,128 May 26 14:48 /dev/cua00 X crw------- 1 uucp wheel 28,129 May 26 18:57 /dev/cua01 X crw-r--r-- 1 root wheel 28,160 May 15 18:58 /dev/cuai00 X crw-r--r-- 1 root wheel 28,161 May 15 19:35 /dev/cuai01 X crw-r--r-- 1 root wheel 28,192 May 15 18:56 /dev/cual00 X crw-r--r-- 1 root wheel 28,193 May 15 19:35 /dev/cual01 X The initial and lock devices are controlled using commands like X this: X stty t_termios_init_in; Y Y t->c_cflag = TTYDEF_CFLAG; Y ! t->c_iflag = TTYDEF_IFLAG; Y ! t->c_lflag = TTYDEF_LFLAG; Y ! t->c_oflag = TTYDEF_OFLAG; Y t->c_ispeed = TTYDEF_SPEED; Y t->c_ospeed = TTYDEF_SPEED; Y --- 1047,1062 ---- Y struct termios *t = &tp->t_termios_init_in; Y Y + /* Y + * Default to raw mode. The defaults in are Y + * really getty's defaults for login terminals, so they must not Y + * all be used here. It is most important to have echo flags off Y + * initially to prevent echo wars before the echo flags can be Y + * turned off. Y + */ Y t->c_cflag = TTYDEF_CFLAG; Y ! t->c_iflag = IGNBRK; Y ! t->c_lflag = 0; Y ! t->c_oflag = 0; Y ! Y t->c_ispeed = TTYDEF_SPEED; Y t->c_ospeed = TTYDEF_SPEED; This fixes the defaults for non-consoles. Using this requires unbreaking console drivers that don't call tty init_console(). These drivers currently get the console defaults less the speed and CLOCAL settings on the initial state devices. I.e., they get the default speed of 9600 (good for 1980's hardware), the wrong initial state for CLOCAL (off), and other wrong settings shared with drivers that do call tty init_console(). After fixing tty_init_console() (but not calling it), they are also missing the fixes for CLOCAL and HUPCL. After fixing the above (which is always called), but still not calling tty init_console(), the above gives a very broken initial state for c[ilo]flag on consoles. I think nothing much except the single user shell would notice the wrong initial state. Init is clueless about terminals. It wants to just open the console device and have it work for shells. The above unbroken defaults are partly to support similarly clueless programs that want to just open a (non-console serial) device and have it work in raw mode. E.g., cat >/dev/cuad0 should work if the line speeds match and the other side understands raw mode. It is partly to handle the echo war. If ECHO defaults to on, then it gives a race after open to turn it off in programs that don't want it. Y *************** Y *** 833,849 **** Y } Y Y void Y ! tty_init_console(struct tty *tp, speed_t s) Y { Y ! struct termios *ti = &tp->t_termios_init_in; Y ! struct termios *to = &tp->t_termios_init_out; The patch also fixes style bugs like these initializations in declarations. Y Y ! if (s != 0) { Y ! ti->c_ispeed = ti->c_ospeed = s; Y ! to->c_ispeed = to->c_ospeed = s; Y ! } Y Y ! ti->c_cflag |= CLOCAL; Y ! to->c_cflag |= CLOCAL; Y } Y Y --- 1066,1115 ---- Y } Y Y + /* Y + * There is no getty for the single-user shell, so we must do its job and Y + * change the default flags to ones suitable for logins. Also, if requested Y + * to, then change the speed to whatever it actually is and lock this, and Y + * unconditionally set CLOCAL and lock this, and unconditionally clear Y + * HUPCL and lock this. Y + * Y + * Callers must tell us their speed and have us lock it iff they have a Y + * speed that matters. Y + * Y + * These settings of CLOCAL and HUPCL are normally backwards for logins, Y + * but CLOCAL is enforced so that the console cannot block endlessly when Y + * a naive application like syslogd(8) attempts to write to it using a Y + * simple open/write/close sequence, and ~HUPCL is enforced to avoid hanging Y + * up on close in such a sequence (when the console is not held open by Y + * another thread). Output is normally discarded instead of blocking. Y + * Most ad hoc writes to the console use wall(8)'s ttymsg() and that is Y + * remarkably deficent in terminal handling (it has none, but depends on Y + * O_NONBLOCK). Not hanging up is a smaller feature. It matters mainly Y + * when the other side of the connection is naive and is not using CLOCAL Y + * so the connection gets broken by our hangup. However, if the other side Y + * is sophisicated then it might prefer to get signaled on all transitions Y + * of carrier. This can be supported by changing the initial state device Y + * after booting. We should be more careful about raising and lowering Y + * carrier before we are ready and finished, respectively, so that handshakes Y + * based on carrier work. Y + */ Attempt to prevent this being broken again by documenting the function. Document some of the bugs in syslogd() etc. Give hints about deficiencies in carrier handling. I recently reduced some old races for closing devices. The correct timing for handling carrier drop is unclear. Many devices or drivers have buffered i/o and/or delays delivering notifications of carrier drop, so the tty layer may see carrier drop before receiving all the data. Careful senders will delay dropping carrier for long after sending their data -- long enough to handle the timing and bugs in all supported receivers. Most senders aren't careful, so receivers should probably delay acting on carrier drop although POSIX might specify no delay. syslogd() (ttymsg()) is an example of a non-careful sender. The CLOCAL/HUPCL settings for reduce its problems with races on carrier changes by ignoring carrier changes. But problems still occur. CRTSCTS should probably be locked off like HUPCL, although this may cause data to be discarded instead of waited for endlessly. Y void Y ! tty_init_console(struct tty *tp, speed_t speed) Y { Y ! struct termios *tinit, *tlock; Y Y ! tinit = &tp->t_termios_init_in; Y ! tlock= &tp->t_termios_lock_in; Y ! if (speed != 0) { Y ! tinit->c_ispeed = tinit->c_ospeed = speed; Y ! tlock->c_ispeed = tlock->c_ospeed = speed; Y ! } speed == 0 unfortunately still has to be special, since many console drivers don't know their speed and/or don't tell us. They get the default of 9600 and work iff that is their speed. Y ! tinit->c_cflag = (TTYDEF_CFLAG | CLOCAL) & ~HUPCL; Y ! tlock->c_cflag = CLOCAL | HUPCL; Y ! tinit->c_iflag = TTYDEF_IFLAG; Y ! tinit->c_lflag = TTYDEF_LFLAG; Y ! tinit->c_oflag = TTYDEF_OFLAG; Set all the flags explicitly, since all except c_cflag are 0 initially and setting them all is clearer. Y Y ! tp->t_termios_init_out = *tinit; Y ! tp->t_termios_lock_out = *tlock; Copying the whole structs is easier. It is a design principle that their default initial and lock states are as identical as possible. In fact, they are identical. This should often be changed by userland according to userland config files. Note that initial and lock state devices are almost completlely broken in -current. The synchronization between them is completely broken. This reduces them to not much more than places to hold different initial and lock settings. The hack that forces CLOCAL on for callout devices does little more than setting CLOCAL in the callout device's initial state. Y } Y Bruce From owner-svn-src-all@freebsd.org Wed Jul 8 09:54:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4FD599628E; Wed, 8 Jul 2015 09:54:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 85E491FBD; Wed, 8 Jul 2015 09:54:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t689sI6q011406; Wed, 8 Jul 2015 09:54:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t689sIMo011405; Wed, 8 Jul 2015 09:54:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507080954.t689sIMo011405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 8 Jul 2015 09:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285263 - stable/10/sys/geom/eli X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 09:54:18 -0000 Author: gjb Date: Wed Jul 8 09:54:17 2015 New Revision: 285263 URL: https://svnweb.freebsd.org/changeset/base/285263 Log: MFC r273489 (cperciva): Populate the GELI passphrase cache with the kern.geom.eli.passphrase variable (if any) provided in the boot environment. Unset it from the kernel environment after doing this, so that the passphrase is no longer present in kernel memory once we enter userland. This will make it possible to provide a GELI passphrase via the boot loader. Note: head and stable/10 differ as a result of r273174, which renames the getenv(), setenv(), and unsetenv() functions with kern_getenv(), kern_setenv(), and kern_unsetenv(), which was reverted in the relevant parts of this change in 10-STABLE. PR: 200448 Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/geom/eli/g_eli.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/eli/g_eli.c ============================================================================== --- stable/10/sys/geom/eli/g_eli.c Wed Jul 8 03:20:28 2015 (r285262) +++ stable/10/sys/geom/eli/g_eli.c Wed Jul 8 09:54:17 2015 (r285263) @@ -99,6 +99,25 @@ SYSCTL_UINT(_kern_geom_eli, OID_AUTO, bo &g_eli_boot_passcache, 0, "Passphrases are cached during boot process for possible reuse"); static void +fetch_loader_passphrase(void * dummy) +{ + char * env_passphrase; + + KASSERT(dynamic_kenv, ("need dynamic kenv")); + + if ((env_passphrase = getenv("kern.geom.eli.passphrase")) != NULL) { + /* Extract passphrase from the environment. */ + strlcpy(cached_passphrase, env_passphrase, + sizeof(cached_passphrase)); + freeenv(env_passphrase); + + /* Wipe the passphrase from the environment. */ + unsetenv("kern.geom.eli.passphrase"); + } +} +SYSINIT(geli_fetch_loader_passphrase, SI_SUB_KMEM + 1, SI_ORDER_ANY, + fetch_loader_passphrase, NULL); +static void zero_boot_passcache(void * dummy) { From owner-svn-src-all@freebsd.org Wed Jul 8 11:00:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B1BD995066; Wed, 8 Jul 2015 11:00:50 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-la0-x230.google.com (mail-la0-x230.google.com [IPv6:2a00:1450:4010:c03::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 111221FDE; Wed, 8 Jul 2015 11:00:50 +0000 (UTC) (envelope-from cochard@gmail.com) Received: by lagx9 with SMTP id x9so222646655lag.1; Wed, 08 Jul 2015 04:00:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=YL2IUtj7wHC0FHPodHCslVg0O9tTX2oO+yj7CW7siCo=; b=l6DYutf+AWl22vyvZlmfFyovlD5XQJTAohFQM1sKzNPa4lwsIgyuuExky2siywzTuC 2CvJf3hX9YYGnxT8qpu4Rk85cmGqq8rsjd5zqTSPhYbQW7tSLHwSBexBIMqudYFE9NiO Oa+NlK+jGyinrvcH0fWSW2AlmqnV4kx0rpXTMSBn+pQdmYtFMsqkYmfLeOgFlE3laznS 0RGsWA61CIVKzvz3w8+Vf3usaoVOpqavYLjLOWM5UTrBHcMbUvqEveUaWiGOWFD2toxc JFN03dNv++5W0CTkw1XRnnXA7lelf7qVNp9m0fndd73oS6kMuSxbOmdFMldfz4Tlv7om m4Ag== X-Received: by 10.112.210.9 with SMTP id mq9mr8846526lbc.4.1436353247936; Wed, 08 Jul 2015 04:00:47 -0700 (PDT) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.152.135.173 with HTTP; Wed, 8 Jul 2015 04:00:28 -0700 (PDT) In-Reply-To: <201507021810.t62IAgCc003272@repo.freebsd.org> References: <201507021810.t62IAgCc003272@repo.freebsd.org> From: =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= Date: Wed, 8 Jul 2015 13:00:28 +0200 X-Google-Sender-Auth: cRlq4mpnlk4MLRu1TBkugSwxSHE Message-ID: Subject: Re: svn commit: r285051 - head/sys/netinet To: =?UTF-8?Q?Ermal_Lu=C3=A7i?= Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 11:00:50 -0000 On Thu, Jul 2, 2015 at 8:10 PM, Ermal Lu=C3=A7i wrote: > Author: eri > Date: Thu Jul 2 18:10:41 2015 > New Revision: 285051 > URL: https://svnweb.freebsd.org/changeset/base/285051 > > Log: > Avoid doing multiple route lookups for the same destination IP during > forwarding > > ip_forward() does a route lookup for testing this packet can be sent to > a known destination, > it also can do another route lookup if it detects that an ICMP redirect > is needed, > it forgets all of this and handovers to ip_output() to do the same > lookup yet again. > > This optimisation just does one route lookup during the forwarding path > and handovers that to be considered by ip_output(). > > =E2=80=8BThanks, This bring good improvement regarding simple forwarding (value in paquet-per-second, smallest size, on a Netgate RCC-VE 4860): x r285046.pps.forwarding (IPSEC compiled but not used) + r285051.pps.forwarding (IPSEC compiled but not used) +--------------------------------------------------------------------------= + | += | |xxx xx + +++= | ||_M_A__| = | | |_A|= | +--------------------------------------------------------------------------= + N Min Max Median Avg Stddev x 5 397733 406951 399300 401613.8 4324.9755 + 5 478095 482079 480869 480543.6 1666.0282 Difference at 95.0% confidence 78929.8 +/- 4779.72 19.6532% +/- 1.19013% (Student's t, pooled s =3D 3277.27) But how this patch reduce fastforwarding performance in the same time? x r285046.pps.fastforwarding (IPSEC compiled but not used) + r285051.pps.fastforwarding (IPSEC compiled but not used) +--------------------------------------------------------------------------= + | + + + + x x + x x x= | | |__________________A_______M__________| = | ||_________M______A________________| = | +--------------------------------------------------------------------------= + N Min Max Median Avg Stddev x 5 742683 754709 750940 749015.6 4944.9059 + 5 736459 747593 738197 740112.4 4511.1611 Difference at 95.0% confidence -8903.2 +/- 6902.82 -1.18865% +/- 0.921585% (Student's t, pooled s =3D 4733) Regards, Olivier =E2=80=8B From owner-svn-src-all@freebsd.org Wed Jul 8 12:07:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8636699668A; Wed, 8 Jul 2015 12:07:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 5A8CF1888; Wed, 8 Jul 2015 12:07:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68C7pMx075531; Wed, 8 Jul 2015 12:07:51 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68C7p86075530; Wed, 8 Jul 2015 12:07:51 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507081207.t68C7p86075530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 8 Jul 2015 12:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285264 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 12:07:52 -0000 Author: gjb Date: Wed Jul 8 12:07:50 2015 New Revision: 285264 URL: https://svnweb.freebsd.org/changeset/base/285264 Log: Document r283961, pw(8) '-R' option. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Jul 8 09:54:17 2015 (r285263) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Jul 8 12:07:50 2015 (r285264) @@ -342,6 +342,10 @@ receiving the SIGINFO signal has been fixed. + The &man.pw.8; utility has been updated + with a new flag, -R, that sets the root + directory within which the utility will operate. + The &man.lockstat.1; utility has been updated with several improvements: From owner-svn-src-all@freebsd.org Wed Jul 8 12:08:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7FDF9966E4; Wed, 8 Jul 2015 12:08:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 BB21219F6; Wed, 8 Jul 2015 12:08:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68C8sF2075706; Wed, 8 Jul 2015 12:08:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68C8swD075705; Wed, 8 Jul 2015 12:08:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507081208.t68C8swD075705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 8 Jul 2015 12:08:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285265 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 12:08:54 -0000 Author: gjb Date: Wed Jul 8 12:08:53 2015 New Revision: 285265 URL: https://svnweb.freebsd.org/changeset/base/285265 Log: Document r285092, pw(8) '-R' option. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Jul 8 12:07:50 2015 (r285264) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Jul 8 12:08:53 2015 (r285265) @@ -218,6 +218,10 @@ &man.chmod.1;, and &man.chown.8; utilities now affect symbolic links when the -R flag is specified, as documented in &man.symlink.7;. + + The &man.pw.8; utility has been updated + with a new flag, -R, that sets the root + directory within which the utility will operate. From owner-svn-src-all@freebsd.org Wed Jul 8 12:08:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69B0A9966F7; Wed, 8 Jul 2015 12:08:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 49AC019F9; Wed, 8 Jul 2015 12:08:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68C8uGr075752; Wed, 8 Jul 2015 12:08:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68C8uhp075751; Wed, 8 Jul 2015 12:08:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507081208.t68C8uhp075751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 8 Jul 2015 12:08:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285266 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 12:08:57 -0000 Author: gjb Date: Wed Jul 8 12:08:55 2015 New Revision: 285266 URL: https://svnweb.freebsd.org/changeset/base/285266 Log: Document r285206, unbound updated to 1.5.3. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Jul 8 12:08:53 2015 (r285265) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Jul 8 12:08:55 2015 (r285266) @@ -242,6 +242,9 @@ The &man.file.1; utility has been updated to version 5.23. + + The &man.unbound.8; utility has been + updated to version 1.5.3. From owner-svn-src-all@freebsd.org Wed Jul 8 12:08:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B738A996723; Wed, 8 Jul 2015 12:08:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 9B34F1A35; Wed, 8 Jul 2015 12:08:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68C8xHe075806; Wed, 8 Jul 2015 12:08:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68C8xAC075804; Wed, 8 Jul 2015 12:08:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507081208.t68C8xAC075804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 8 Jul 2015 12:08:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285267 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 12:08:59 -0000 Author: gjb Date: Wed Jul 8 12:08:58 2015 New Revision: 285267 URL: https://svnweb.freebsd.org/changeset/base/285267 Log: Document r285236, TSO and checksum offloading support in hv_netvsc(4). Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Jul 8 12:08:55 2015 (r285266) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Jul 8 12:08:58 2015 (r285267) @@ -426,6 +426,10 @@ fixes. + + The + &man.hv.netvsc.4; driver has been updated to support checksum + offloading and TSO. From owner-svn-src-all@freebsd.org Wed Jul 8 12:42:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 401C0996DFE; Wed, 8 Jul 2015 12:42:45 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 17D0610AC; Wed, 8 Jul 2015 12:42:45 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68CgiR8094269; Wed, 8 Jul 2015 12:42:44 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68Cgil5094268; Wed, 8 Jul 2015 12:42:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507081242.t68Cgil5094268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 8 Jul 2015 12:42:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285268 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 12:42:45 -0000 Author: andrew Date: Wed Jul 8 12:42:44 2015 New Revision: 285268 URL: https://svnweb.freebsd.org/changeset/base/285268 Log: Send the correct signal when vm_fault fails. While here also set the code and address fields. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Wed Jul 8 12:08:58 2015 (r285267) +++ head/sys/arm64/arm64/trap.c Wed Jul 8 12:42:44 2015 (r285268) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -79,13 +80,14 @@ void do_el0_error(struct trapframe *); int (*dtrace_invop_jump_addr)(struct trapframe *); static __inline void -call_trapsignal(struct thread *td, int sig, u_long code) +call_trapsignal(struct thread *td, int sig, int code, void *addr) { ksiginfo_t ksi; ksiginfo_init_trap(&ksi); ksi.ksi_signo = sig; - ksi.ksi_code = (int)code; + ksi.ksi_code = code; + ksi.ksi_addr = addr; trapsignal(td, &ksi); } @@ -151,7 +153,7 @@ data_abort(struct trapframe *frame, uint vm_prot_t ftype; vm_offset_t va; uint64_t far; - int error, sig; + int error, sig, ucode; td = curthread; pcb = td->td_pcb; @@ -204,13 +206,14 @@ data_abort(struct trapframe *frame, uint error = vm_fault(map, va, ftype, VM_FAULT_NORMAL); } - if (error != 0) { + if (error != KERN_SUCCESS) { if (lower) { - if (error == ENOMEM) - sig = SIGKILL; + sig = SIGSEGV; + if (error == KERN_PROTECTION_FAILURE) + ucode = SEGV_ACCERR; else - sig = SIGSEGV; - call_trapsignal(td, sig, 0); + ucode = SEGV_MAPERR; + call_trapsignal(td, sig, ucode, (void *)far); } else { if (td->td_intr_nesting_level == 0 && pcb->pcb_onfault != 0) { From owner-svn-src-all@freebsd.org Wed Jul 8 13:19:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E9609954FC; Wed, 8 Jul 2015 13:19:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 561C11309; Wed, 8 Jul 2015 13:19:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68DJE90009894; Wed, 8 Jul 2015 13:19:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68DJEYM009891; Wed, 8 Jul 2015 13:19:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201507081319.t68DJEYM009891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 8 Jul 2015 13:19:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285269 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 13:19:15 -0000 Author: kib Date: Wed Jul 8 13:19:13 2015 New Revision: 285269 URL: https://svnweb.freebsd.org/changeset/base/285269 Log: Handle copyout for the fcntl(F_OGETLK) using oflock structure. Otherwise, kernel overwrites a word past the destination. Submitted by: walter@pelissero.de PR: 196718 MFC after: 1 week Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Jul 8 12:42:44 2015 (r285268) +++ head/sys/kern/kern_descrip.c Wed Jul 8 13:19:13 2015 (r285269) @@ -404,9 +404,10 @@ kern_fcntl_freebsd(struct thread *td, in struct flock fl; struct __oflock ofl; intptr_t arg1; - int error; + int error, newcmd; error = 0; + newcmd = cmd; switch (cmd) { case F_OGETLK: case F_OSETLK: @@ -424,13 +425,13 @@ kern_fcntl_freebsd(struct thread *td, in switch (cmd) { case F_OGETLK: - cmd = F_GETLK; + newcmd = F_GETLK; break; case F_OSETLK: - cmd = F_SETLK; + newcmd = F_SETLK; break; case F_OSETLKW: - cmd = F_SETLKW; + newcmd = F_SETLKW; break; } arg1 = (intptr_t)&fl; @@ -448,7 +449,7 @@ kern_fcntl_freebsd(struct thread *td, in } if (error) return (error); - error = kern_fcntl(td, fd, cmd, arg1); + error = kern_fcntl(td, fd, newcmd, arg1); if (error) return (error); if (cmd == F_OGETLK) { From owner-svn-src-all@freebsd.org Wed Jul 8 13:53:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB7FA995D49; Wed, 8 Jul 2015 13:53:00 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 A0B961A44; Wed, 8 Jul 2015 13:53:00 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68Dr050028389; Wed, 8 Jul 2015 13:53:00 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68Dr0up028388; Wed, 8 Jul 2015 13:53:00 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201507081353.t68Dr0up028388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Wed, 8 Jul 2015 13:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285270 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 13:53:00 -0000 Author: zbb Date: Wed Jul 8 13:52:59 2015 New Revision: 285270 URL: https://svnweb.freebsd.org/changeset/base/285270 Log: Add memory barrier to bus_dmamap_sync() On platforms which are fully IO-coherent, the map might be null. We need to guarantee that all data is observable after the sync operation is called. Add a memory barrier to ensure that on ARM. Reviewed by: andrew, kib Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3012 Modified: head/sys/sys/bus_dma.h Modified: head/sys/sys/bus_dma.h ============================================================================== --- head/sys/sys/bus_dma.h Wed Jul 8 13:19:13 2015 (r285269) +++ head/sys/sys/bus_dma.h Wed Jul 8 13:52:59 2015 (r285270) @@ -282,13 +282,25 @@ int bus_dmamem_alloc(bus_dma_tag_t dmat, void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map); /* - * Perform a synchronization operation on the given map. + * Perform a synchronization operation on the given map. If the map + * is NULL we have a fully IO-coherent system. On every ARM architecture + * there must be a memory barrier placed to ensure that all data + * accesses are visible before going any further. */ void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t); +#if defined(__arm__) + #define __BUS_DMAMAP_SYNC_DEFAULT mb(); +#elif defined(__aarch64__) + #define __BUS_DMAMAP_SYNC_DEFAULT dmb(sy); +#else + #define __BUS_DMAMAP_SYNC_DEFAULT {} +#endif #define bus_dmamap_sync(dmat, dmamap, op) \ do { \ if ((dmamap) != NULL) \ _bus_dmamap_sync(dmat, dmamap, op); \ + else \ + __BUS_DMAMAP_SYNC_DEFAULT \ } while (0) /* From owner-svn-src-all@freebsd.org Wed Jul 8 13:58:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89C7B995DFE; Wed, 8 Jul 2015 13:58:54 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 5786B1CAE; Wed, 8 Jul 2015 13:58:54 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from bender (bender.sec.cl.cam.ac.uk [IPv6:2001:630:212:2a8:4e72:b9ff:fe93:61bf]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 2BD7FD7907; Wed, 8 Jul 2015 13:58:24 +0000 (UTC) Date: Wed, 8 Jul 2015 14:58:23 +0100 From: Andrew Turner To: Zbigniew Bodek Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285270 - head/sys/sys Message-ID: <20150708145823.50ae6395@bender> In-Reply-To: <201507081353.t68Dr0up028388@repo.freebsd.org> References: <201507081353.t68Dr0up028388@repo.freebsd.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 13:58:54 -0000 On Wed, 8 Jul 2015 13:53:00 +0000 (UTC) Zbigniew Bodek wrote: > Author: zbb > Date: Wed Jul 8 13:52:59 2015 > New Revision: 285270 > URL: https://svnweb.freebsd.org/changeset/base/285270 > > Log: > Add memory barrier to bus_dmamap_sync() > > On platforms which are fully IO-coherent, the map might be null. > We need to guarantee that all data is observable after the > sync operation is called. Add a memory barrier to ensure that on > ARM. > Reviewed by: andrew, kib > Obtained from: Semihalf > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D3012 > > Modified: > head/sys/sys/bus_dma.h > > Modified: head/sys/sys/bus_dma.h > ============================================================================== > --- head/sys/sys/bus_dma.h Wed Jul 8 13:19:13 2015 > (r285269) +++ head/sys/sys/bus_dma.h Wed Jul 8 13:52:59 > 2015 (r285270) @@ -282,13 +282,25 @@ int > bus_dmamem_alloc(bus_dma_tag_t dmat, void > bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map); > /* > - * Perform a synchronization operation on the given map. > + * Perform a synchronization operation on the given map. If the map > + * is NULL we have a fully IO-coherent system. On every ARM > architecture > + * there must be a memory barrier placed to ensure that all data > + * accesses are visible before going any further. > */ > void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t); > +#if defined(__arm__) > + #define __BUS_DMAMAP_SYNC_DEFAULT mb(); Should this be a dmb or dsb? mb() is implemented as the former on ARMv7, and as the equivalent using mcr on ARMv6. Only on ARMv4 and ARMv5 is it a dsb. Andrew From owner-svn-src-all@freebsd.org Wed Jul 8 14:07:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CE50995FAE; Wed, 8 Jul 2015 14:07:08 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 F14BA108E; Wed, 8 Jul 2015 14:07:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68E77Gi033766; Wed, 8 Jul 2015 14:07:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68E777r033765; Wed, 8 Jul 2015 14:07:07 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507081407.t68E777r033765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 8 Jul 2015 14:07:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285271 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 14:07:08 -0000 Author: andrew Date: Wed Jul 8 14:07:06 2015 New Revision: 285271 URL: https://svnweb.freebsd.org/changeset/base/285271 Log: Add an implementation of savectx that doesn't just call panic. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/swtch.S Modified: head/sys/arm64/arm64/swtch.S ============================================================================== --- head/sys/arm64/arm64/swtch.S Wed Jul 8 13:52:59 2015 (r285270) +++ head/sys/arm64/arm64/swtch.S Wed Jul 8 14:07:06 2015 (r285271) @@ -246,10 +246,31 @@ ENTRY(fork_trampoline) END(fork_trampoline) ENTRY(savectx) - adr x0, .Lsavectx_panic_str - bl panic + /* Store the callee-saved registers */ + stp x8, x9, [x0, #PCB_REGS + 8 * 8] + stp x10, x11, [x0, #PCB_REGS + 10 * 8] + stp x12, x13, [x0, #PCB_REGS + 12 * 8] + stp x14, x15, [x0, #PCB_REGS + 14 * 8] + stp x16, x17, [x0, #PCB_REGS + 16 * 8] + stp x18, x19, [x0, #PCB_REGS + 18 * 8] + stp x20, x21, [x0, #PCB_REGS + 20 * 8] + stp x22, x23, [x0, #PCB_REGS + 22 * 8] + stp x24, x25, [x0, #PCB_REGS + 24 * 8] + stp x26, x27, [x0, #PCB_REGS + 26 * 8] + stp x28, x29, [x0, #PCB_REGS + 28 * 8] + str x30, [x0, #PCB_REGS + 30 * 8] + /* And the old stack pointer */ + mov x5, sp + mrs x6, tpidr_el0 + stp x5, x6, [x0, #PCB_SP] + + /* Store the VFP registers */ +#ifdef VFP + mov x29, lr + bl vfp_save_state + mov lr, x29 +#endif + ret -.Lsavectx_panic_str: - .asciz "savectx" END(savectx) From owner-svn-src-all@freebsd.org Wed Jul 8 14:30:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 710E39965D2; Wed, 8 Jul 2015 14:30:47 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com [IPv6:2607:f8b0:4001:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 36A08123D; Wed, 8 Jul 2015 14:30:47 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igrv9 with SMTP id v9so168371267igr.1; Wed, 08 Jul 2015 07:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=phJe2GIeiaiDO4+nnNxS6As8G5XgS6OkCay6xZYJjqc=; b=Jpij9rRaXo5SP+aCtyuWnC9ZBzKjrrlpFTlq48syielkAX1GKZOfmMtGDF3dCMMwyi zve2xPbexVDzzCLBtGOfMf3DuOhK7qOmsGz5idkafGBKcHoZX+V5glfPZg+iYXL6HdW7 Pv4TlkiUJ1sa/5ZdNytiiNQjzLTheszhAn83fwOZ/AYihntl5a16xvL83yDgBpV4Ao7Y kQRgpHBSKQ9ulo4/ryyUqpH7x2xePz48dfeUTMwtE6vSsTGFOC/FBuvoRrmDW3yOalCT 4vln1pdbr/ag5YASgB3IRettvzmWWd/PqefsCSLwPtYNfWYPmPDJQ/6+MBmqXhgHM9KL BwWg== MIME-Version: 1.0 X-Received: by 10.50.171.232 with SMTP id ax8mr19925850igc.32.1436365846576; Wed, 08 Jul 2015 07:30:46 -0700 (PDT) Received: by 10.36.38.133 with HTTP; Wed, 8 Jul 2015 07:30:46 -0700 (PDT) In-Reply-To: <201507081353.t68Dr0up028388@repo.freebsd.org> References: <201507081353.t68Dr0up028388@repo.freebsd.org> Date: Wed, 8 Jul 2015 07:30:46 -0700 Message-ID: Subject: Re: svn commit: r285270 - head/sys/sys From: Adrian Chadd To: Zbigniew Bodek Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 14:30:47 -0000 Why is this implemented in sys/sys/bus_dma.h, rather than in a machdep header? -a On 8 July 2015 at 06:53, Zbigniew Bodek wrote: > Author: zbb > Date: Wed Jul 8 13:52:59 2015 > New Revision: 285270 > URL: https://svnweb.freebsd.org/changeset/base/285270 > > Log: > Add memory barrier to bus_dmamap_sync() > > On platforms which are fully IO-coherent, the map might be null. > We need to guarantee that all data is observable after the > sync operation is called. Add a memory barrier to ensure that on ARM. > > Reviewed by: andrew, kib > Obtained from: Semihalf > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D3012 > > Modified: > head/sys/sys/bus_dma.h > > Modified: head/sys/sys/bus_dma.h > ============================================================================== > --- head/sys/sys/bus_dma.h Wed Jul 8 13:19:13 2015 (r285269) > +++ head/sys/sys/bus_dma.h Wed Jul 8 13:52:59 2015 (r285270) > @@ -282,13 +282,25 @@ int bus_dmamem_alloc(bus_dma_tag_t dmat, > void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map); > > /* > - * Perform a synchronization operation on the given map. > + * Perform a synchronization operation on the given map. If the map > + * is NULL we have a fully IO-coherent system. On every ARM architecture > + * there must be a memory barrier placed to ensure that all data > + * accesses are visible before going any further. > */ > void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t); > +#if defined(__arm__) > + #define __BUS_DMAMAP_SYNC_DEFAULT mb(); > +#elif defined(__aarch64__) > + #define __BUS_DMAMAP_SYNC_DEFAULT dmb(sy); > +#else > + #define __BUS_DMAMAP_SYNC_DEFAULT {} > +#endif > #define bus_dmamap_sync(dmat, dmamap, op) \ > do { \ > if ((dmamap) != NULL) \ > _bus_dmamap_sync(dmat, dmamap, op); \ > + else \ > + __BUS_DMAMAP_SYNC_DEFAULT \ > } while (0) > > /* > From owner-svn-src-all@freebsd.org Wed Jul 8 14:36:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8D639966FF for ; Wed, 8 Jul 2015 14:36:16 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D91A160C for ; Wed, 8 Jul 2015 14:36:16 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: by wifm2 with SMTP id m2so91606514wif.1 for ; Wed, 08 Jul 2015 07:36:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=jsneosZf5cX0ZthTgY0BDFsoK4MEjamjLrVRgmLmP7w=; b=UV80z2qwE6QzgzcH3qbPAs8o53LRTGDD+/LV5bKXAGF75qSoN5jPzTXGk4d+/EeEPC 2MIe3gHr8fgDmTyJSZneObHOib5JaHkFc5C8GdOMhXS0cRBEk7XQJTLIkoVkFFDwtoKs IJLv1sck4szZfrODOUJm/0+CXOyeUObZHqJQBH7OwzuumRxVTPALGTTBxxbGxksTcmlW kKwUwIos8YKgc7Wx4B2N4AYSmUxp869G6cn1nMcDgIkZplIuodmQ/I8An6nr4Qu1kgia OovuQuIxOAsxODCg7MFvOLfKwIs59xYXR2/hhFdIkbFyPx/8EyQ6ikar5fOoxkq7d/dK n90Q== X-Gm-Message-State: ALoCoQnhemGLwI84dVFaGL/aoK5rUkJWyyW+73m+yFkXJ/6/o9yLuopujW2yHoA8VoC/jfy4dMoQ X-Received: by 10.194.59.98 with SMTP id y2mr20687134wjq.42.1436366169518; Wed, 08 Jul 2015 07:36:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.75.12 with HTTP; Wed, 8 Jul 2015 07:35:50 -0700 (PDT) In-Reply-To: References: <201507081353.t68Dr0up028388@repo.freebsd.org> From: Zbigniew Bodek Date: Wed, 8 Jul 2015 16:35:50 +0200 Message-ID: Subject: Re: svn commit: r285270 - head/sys/sys To: Adrian Chadd Cc: Zbigniew Bodek , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 14:36:16 -0000 Because machdep header includes this file (not the other way). Best regards zbb 2015-07-08 16:30 GMT+02:00 Adrian Chadd : > Why is this implemented in sys/sys/bus_dma.h, rather than in a machdep header? > > > -a > > > On 8 July 2015 at 06:53, Zbigniew Bodek wrote: >> Author: zbb >> Date: Wed Jul 8 13:52:59 2015 >> New Revision: 285270 >> URL: https://svnweb.freebsd.org/changeset/base/285270 >> >> Log: >> Add memory barrier to bus_dmamap_sync() >> >> On platforms which are fully IO-coherent, the map might be null. >> We need to guarantee that all data is observable after the >> sync operation is called. Add a memory barrier to ensure that on ARM. >> >> Reviewed by: andrew, kib >> Obtained from: Semihalf >> Sponsored by: The FreeBSD Foundation >> Differential Revision: https://reviews.freebsd.org/D3012 >> >> Modified: >> head/sys/sys/bus_dma.h >> >> Modified: head/sys/sys/bus_dma.h >> ============================================================================== >> --- head/sys/sys/bus_dma.h Wed Jul 8 13:19:13 2015 (r285269) >> +++ head/sys/sys/bus_dma.h Wed Jul 8 13:52:59 2015 (r285270) >> @@ -282,13 +282,25 @@ int bus_dmamem_alloc(bus_dma_tag_t dmat, >> void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map); >> >> /* >> - * Perform a synchronization operation on the given map. >> + * Perform a synchronization operation on the given map. If the map >> + * is NULL we have a fully IO-coherent system. On every ARM architecture >> + * there must be a memory barrier placed to ensure that all data >> + * accesses are visible before going any further. >> */ >> void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t); >> +#if defined(__arm__) >> + #define __BUS_DMAMAP_SYNC_DEFAULT mb(); >> +#elif defined(__aarch64__) >> + #define __BUS_DMAMAP_SYNC_DEFAULT dmb(sy); >> +#else >> + #define __BUS_DMAMAP_SYNC_DEFAULT {} >> +#endif >> #define bus_dmamap_sync(dmat, dmamap, op) \ >> do { \ >> if ((dmamap) != NULL) \ >> _bus_dmamap_sync(dmat, dmamap, op); \ >> + else \ >> + __BUS_DMAMAP_SYNC_DEFAULT \ >> } while (0) >> >> /* >> > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Wed Jul 8 14:42:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B3E7996880 for ; Wed, 8 Jul 2015 14:42:37 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3.ore.mailhop.org (erouter6.ore.mailhop.org [54.187.213.119]) by mx1.freebsd.org (Postfix) with SMTP id 676181B96 for ; Wed, 8 Jul 2015 14:42:36 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound3.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Wed, 8 Jul 2015 14:41:17 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t68EgRQs036639; Wed, 8 Jul 2015 08:42:27 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1436366547.1334.81.camel@freebsd.org> Subject: Re: svn commit: r285270 - head/sys/sys From: Ian Lepore To: Adrian Chadd Cc: Zbigniew Bodek , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Wed, 08 Jul 2015 08:42:27 -0600 In-Reply-To: References: <201507081353.t68Dr0up028388@repo.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 14:42:37 -0000 On Wed, 2015-07-08 at 07:30 -0700, Adrian Chadd wrote: > Why is this implemented in sys/sys/bus_dma.h, rather than in a machdep header? > > Indeed, this stuff is a mess that really needs to be cleaned up. The pre-existing assumption that MI functions don't need to be called, just because one of the parameters of that function has some value that has a special meaning on one platform, is purely x86-MD code in an MI header file. This change just complicates the existing mess. > -a > > > On 8 July 2015 at 06:53, Zbigniew Bodek wrote: > > Author: zbb > > Date: Wed Jul 8 13:52:59 2015 > > New Revision: 285270 > > URL: https://svnweb.freebsd.org/changeset/base/285270 > > > > Log: > > Add memory barrier to bus_dmamap_sync() > > > > On platforms which are fully IO-coherent, the map might be null. > > We need to guarantee that all data is observable after the > > sync operation is called. Add a memory barrier to ensure that on ARM. > > > > Reviewed by: andrew, kib > > Obtained from: Semihalf > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D3012 > > > > Modified: > > head/sys/sys/bus_dma.h > > > > Modified: head/sys/sys/bus_dma.h > > ============================================================================== > > --- head/sys/sys/bus_dma.h Wed Jul 8 13:19:13 2015 (r285269) > > +++ head/sys/sys/bus_dma.h Wed Jul 8 13:52:59 2015 (r285270) > > @@ -282,13 +282,25 @@ int bus_dmamem_alloc(bus_dma_tag_t dmat, > > void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map); > > > > /* > > - * Perform a synchronization operation on the given map. > > + * Perform a synchronization operation on the given map. If the map > > + * is NULL we have a fully IO-coherent system. On every ARM architecture > > + * there must be a memory barrier placed to ensure that all data > > + * accesses are visible before going any further. > > */ > > void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t); > > +#if defined(__arm__) > > + #define __BUS_DMAMAP_SYNC_DEFAULT mb(); > > +#elif defined(__aarch64__) > > + #define __BUS_DMAMAP_SYNC_DEFAULT dmb(sy); > > +#else > > + #define __BUS_DMAMAP_SYNC_DEFAULT {} > > +#endif > > #define bus_dmamap_sync(dmat, dmamap, op) \ > > do { \ > > if ((dmamap) != NULL) \ > > _bus_dmamap_sync(dmat, dmamap, op); \ > > + else \ > > + __BUS_DMAMAP_SYNC_DEFAULT \ > > } while (0) > > > > /* > > > From owner-svn-src-all@freebsd.org Wed Jul 8 14:47:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D86569968FC; Wed, 8 Jul 2015 14:47:43 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ie0-x22a.google.com (mail-ie0-x22a.google.com [IPv6:2607:f8b0:4001:c03::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2CED1EA2; Wed, 8 Jul 2015 14:47:43 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iecuq6 with SMTP id uq6so157005932iec.2; Wed, 08 Jul 2015 07:47:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=rs4c+09tGdhfcnZsKSfnWU/MsA5Sot2oh72DeMOuTrk=; b=Ud1E7AoqdEJIQ1V15Njm2BLHuIMpUuFwHsE5d2ORxmfbU1D/FTZ4Kbp0WWA146qCUT XQG8er2voEuMDeetjvQeuJcNjh2nx0RstV0S4OMDKVsXjw9gNLH3N8Oo2dB9v/gwGIm6 Lxw5wiaNEsZlWhhQLuVvS8Xc3+Ku1zbBHfqc06zT0yPyRCfLJ5fyiTtbtem9rT8wpz/o iJuvwsRVx56kIt5LuNSdAwNiuzXi52tf5a0tzcZMVdL9qChKpnRwqlaYjvK2CN9kfEKE 1LMCjeQaDVimrz06tKgukvvCm/eplh8i+2R6qJUadVfg/GJd3SA4Cj+cCn0MucsU/sVe PpzA== MIME-Version: 1.0 X-Received: by 10.50.171.232 with SMTP id ax8mr20074529igc.32.1436366862850; Wed, 08 Jul 2015 07:47:42 -0700 (PDT) Received: by 10.36.38.133 with HTTP; Wed, 8 Jul 2015 07:47:42 -0700 (PDT) In-Reply-To: <1436366547.1334.81.camel@freebsd.org> References: <201507081353.t68Dr0up028388@repo.freebsd.org> <1436366547.1334.81.camel@freebsd.org> Date: Wed, 8 Jul 2015 07:47:42 -0700 Message-ID: Subject: Re: svn commit: r285270 - head/sys/sys From: Adrian Chadd To: Ian Lepore Cc: Zbigniew Bodek , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 14:47:44 -0000 On 8 July 2015 at 07:42, Ian Lepore wrote: > On Wed, 2015-07-08 at 07:30 -0700, Adrian Chadd wrote: >> Why is this implemented in sys/sys/bus_dma.h, rather than in a machdep header? >> >> > > Indeed, this stuff is a mess that really needs to be cleaned up. The > pre-existing assumption that MI functions don't need to be called, just > because one of the parameters of that function has some value that has a > special meaning on one platform, is purely x86-MD code in an MI header > file. This change just complicates the existing mess. +1 (So who's going to do it? I'm already taken.) -a >> -a >> >> >> On 8 July 2015 at 06:53, Zbigniew Bodek wrote: >> > Author: zbb >> > Date: Wed Jul 8 13:52:59 2015 >> > New Revision: 285270 >> > URL: https://svnweb.freebsd.org/changeset/base/285270 >> > >> > Log: >> > Add memory barrier to bus_dmamap_sync() >> > >> > On platforms which are fully IO-coherent, the map might be null. >> > We need to guarantee that all data is observable after the >> > sync operation is called. Add a memory barrier to ensure that on ARM. >> > >> > Reviewed by: andrew, kib >> > Obtained from: Semihalf >> > Sponsored by: The FreeBSD Foundation >> > Differential Revision: https://reviews.freebsd.org/D3012 >> > >> > Modified: >> > head/sys/sys/bus_dma.h >> > >> > Modified: head/sys/sys/bus_dma.h >> > ============================================================================== >> > --- head/sys/sys/bus_dma.h Wed Jul 8 13:19:13 2015 (r285269) >> > +++ head/sys/sys/bus_dma.h Wed Jul 8 13:52:59 2015 (r285270) >> > @@ -282,13 +282,25 @@ int bus_dmamem_alloc(bus_dma_tag_t dmat, >> > void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map); >> > >> > /* >> > - * Perform a synchronization operation on the given map. >> > + * Perform a synchronization operation on the given map. If the map >> > + * is NULL we have a fully IO-coherent system. On every ARM architecture >> > + * there must be a memory barrier placed to ensure that all data >> > + * accesses are visible before going any further. >> > */ >> > void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t); >> > +#if defined(__arm__) >> > + #define __BUS_DMAMAP_SYNC_DEFAULT mb(); >> > +#elif defined(__aarch64__) >> > + #define __BUS_DMAMAP_SYNC_DEFAULT dmb(sy); >> > +#else >> > + #define __BUS_DMAMAP_SYNC_DEFAULT {} >> > +#endif >> > #define bus_dmamap_sync(dmat, dmamap, op) \ >> > do { \ >> > if ((dmamap) != NULL) \ >> > _bus_dmamap_sync(dmat, dmamap, op); \ >> > + else \ >> > + __BUS_DMAMAP_SYNC_DEFAULT \ >> > } while (0) >> > >> > /* >> > >> > > From owner-svn-src-all@freebsd.org Wed Jul 8 15:33:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44F57996FDE; Wed, 8 Jul 2015 15:33:00 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 353C016A4; Wed, 8 Jul 2015 15:33:00 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68FX0wr077434; Wed, 8 Jul 2015 15:33:00 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68FX0Yb077433; Wed, 8 Jul 2015 15:33:00 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507081533.t68FX0Yb077433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 8 Jul 2015 15:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285272 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 15:33:00 -0000 Author: andrew Date: Wed Jul 8 15:32:59 2015 New Revision: 285272 URL: https://svnweb.freebsd.org/changeset/base/285272 Log: Add support for ipi_all_but_self on arm64. Obtained from: ABT Systems Ltd Sponsored by: The freeBSD Foundation Modified: head/sys/arm64/arm64/intr_machdep.c Modified: head/sys/arm64/arm64/intr_machdep.c ============================================================================== --- head/sys/arm64/arm64/intr_machdep.c Wed Jul 8 14:07:06 2015 (r285271) +++ head/sys/arm64/arm64/intr_machdep.c Wed Jul 8 15:32:59 2015 (r285272) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -473,9 +474,16 @@ arm_init_secondary(void) void ipi_all_but_self(u_int ipi) { + cpuset_t other_cpus; - /* ARM64TODO: We should support this */ - panic("ipi_all_but_self"); + other_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &other_cpus); + + /* ARM64TODO: This will be fixed with arm_intrng */ + ipi += 16; + + CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); + PIC_IPI_SEND(root_pic, other_cpus, ipi); } void From owner-svn-src-all@freebsd.org Wed Jul 8 15:42:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58352996225 for ; Wed, 8 Jul 2015 15:42:04 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F12101E35 for ; Wed, 8 Jul 2015 15:42:03 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: by wibdq8 with SMTP id dq8so216761420wib.1 for ; Wed, 08 Jul 2015 08:42:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=csYl4zT2FiXMsQcRpu8cOqjUuWDAVg5vwnZMACAfyKw=; b=B4h+xtrMnzQrMOPfelOBmObPz86IlHhvx11G/6kADSn0yAe/MK1NnqMCD0AyZYWZiX pVRfJCZ9m5qG2VDRgydDHPmM1DavVrXQosUpdY6SCWSkVvpew4Op5/qiaWxZfZXxKaF7 9H5dSwji+QoXVMwj/B4+TSJxkfDDwp+rhL6ZwMk5wjbqEW4dm3yssO4ugLKRQmHRRDTb q5u0yFAUEL6MJgjzkIfPhrbAnywkOWsddPNgBqP5+TrmOa9kVA6M5jt/egT3oH3YjJII 6I1mWaduKDVc4mgP0JPh9xFRMM9qh2xwjVRq/P4qTqdTRPwBao9AuXkTD0g3Kt0UtwNf 9zjg== X-Gm-Message-State: ALoCoQnHcIv+/H1RovkH7P14dUAGo3YXxPiM4Cf0T6viOYDeyCAXLif/lIcrI9SSc3esN+aoPX3u X-Received: by 10.194.59.98 with SMTP id y2mr21274756wjq.42.1436370121848; Wed, 08 Jul 2015 08:42:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.75.12 with HTTP; Wed, 8 Jul 2015 08:41:42 -0700 (PDT) In-Reply-To: <201507081533.t68FX0Yb077433@repo.freebsd.org> References: <201507081533.t68FX0Yb077433@repo.freebsd.org> From: Zbigniew Bodek Date: Wed, 8 Jul 2015 17:41:42 +0200 Message-ID: Subject: Re: svn commit: r285272 - head/sys/arm64/arm64 To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 15:42:04 -0000 2015-07-08 17:33 GMT+02:00 Andrew Turner : > Author: andrew > Date: Wed Jul 8 15:32:59 2015 > New Revision: 285272 > URL: https://svnweb.freebsd.org/changeset/base/285272 > > Log: > Add support for ipi_all_but_self on arm64. > > Obtained from: ABT Systems Ltd > Sponsored by: The freeBSD Foundation > > Modified: > head/sys/arm64/arm64/intr_machdep.c > > Modified: head/sys/arm64/arm64/intr_machdep.c > ============================================================================== > --- head/sys/arm64/arm64/intr_machdep.c Wed Jul 8 14:07:06 2015 (r285271) > +++ head/sys/arm64/arm64/intr_machdep.c Wed Jul 8 15:32:59 2015 (r285272) > @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > > #include > #include > @@ -473,9 +474,16 @@ arm_init_secondary(void) > void > ipi_all_but_self(u_int ipi) > { > + cpuset_t other_cpus; > > - /* ARM64TODO: We should support this */ > - panic("ipi_all_but_self"); > + other_cpus = all_cpus; > + CPU_CLR(PCPU_GET(cpuid), &other_cpus); > + > + /* ARM64TODO: This will be fixed with arm_intrng */ > + ipi += 16; BTW. Can you explain why we need += 16 here? We think this is wrong and we will probably try to upstream patches that i.a. remove this. Best regards zbb > + > + CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); > + PIC_IPI_SEND(root_pic, other_cpus, ipi); > } > > void > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Wed Jul 8 16:16:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BC06996709; Wed, 8 Jul 2015 16:16:46 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 4B5371C82; Wed, 8 Jul 2015 16:16:46 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68GGk4M097775; Wed, 8 Jul 2015 16:16:46 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68GGiA3097766; Wed, 8 Jul 2015 16:16:44 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201507081616.t68GGiA3097766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Wed, 8 Jul 2015 16:16:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285273 - in head: share/man/man9 usr.sbin/iovctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 16:16:46 -0000 Author: pkelsey Date: Wed Jul 8 16:16:44 2015 New Revision: 285273 URL: https://svnweb.freebsd.org/changeset/base/285273 Log: Replace use of .Po Pc with the preferred .Pq for single line enclosures in iovctl.conf(5), iovctl(8), pci(9), and pci_iov_schema(9). Differential Revision: https://reviews.freebsd.org/D3000 Reviewed by: wblock Approved by: jmallett (mentor) Modified: head/share/man/man9/pci.9 head/share/man/man9/pci_iov_schema.9 head/usr.sbin/iovctl/iovctl.8 head/usr.sbin/iovctl/iovctl.conf.5 Modified: head/share/man/man9/pci.9 ============================================================================== --- head/share/man/man9/pci.9 Wed Jul 8 15:32:59 2015 (r285272) +++ head/share/man/man9/pci.9 Wed Jul 8 16:16:44 2015 (r285273) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 28, 2015 +.Dd July 8, 2015 .Dt PCI 9 .Os .Sh NAME @@ -445,7 +445,7 @@ The function is used to advertise that the given device .Pq and associated device driver supports PCI Single-Root I/O Virtualization -.Po SR-IOV Pc . +.Pq SR-IOV . A driver that supports SR-IOV must implement the .Xr PCI_IOV_INIT 9 , .Xr PCI_IOV_ADD_VF 9 Modified: head/share/man/man9/pci_iov_schema.9 ============================================================================== --- head/share/man/man9/pci_iov_schema.9 Wed Jul 8 15:32:59 2015 (r285272) +++ head/share/man/man9/pci_iov_schema.9 Wed Jul 8 16:16:44 2015 (r285273) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 18, 2015 +.Dd July 8, 2015 .Dt PCI_IOV_SCHEMA 9 .Os .Sh NAME @@ -227,7 +227,7 @@ type. Values of type .Vt uint32_t are unsigned integers in the range 0 to -.Po 2**32 - 1 Pc , +.Pq 2**32 - 1 , inclusive. .Pp The @@ -241,7 +241,7 @@ type. Values of type .Vt uint64_t are unsigned integers in the range 0 to -.Po 2**64 - 1 Pc , +.Pq 2**64 - 1 , inclusive. .Pp The Modified: head/usr.sbin/iovctl/iovctl.8 ============================================================================== --- head/usr.sbin/iovctl/iovctl.8 Wed Jul 8 15:32:59 2015 (r285272) +++ head/usr.sbin/iovctl/iovctl.8 Wed Jul 8 16:16:44 2015 (r285273) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 21, 2014 +.Dd July 8, 2015 .Dt IOVCTL 8 .Os .Sh NAME @@ -49,7 +49,7 @@ The utility creates or destroys PCI Single-Root I/O Virtualization .Pq SR-IOV Virtual Functions -.Po VFs Pc . +.Pq VFs . When invoked with the .Fl C flag, Modified: head/usr.sbin/iovctl/iovctl.conf.5 ============================================================================== --- head/usr.sbin/iovctl/iovctl.conf.5 Wed Jul 8 15:32:59 2015 (r285272) +++ head/usr.sbin/iovctl/iovctl.conf.5 Wed Jul 8 16:16:44 2015 (r285273) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 5, 2015 +.Dd July 8, 2015 .Dt IOVCTL.CONF 5 .Os .Sh NAME @@ -77,7 +77,7 @@ The second section type is the VF sectio This section has the key "VF-" followed by a VF index. VF indices start at 0 and always increment by 1. Valid VF indices are in the range of 0 to -.Po num_vfs - 1 Pc . +.Pq num_vfs - 1 . The VF index must be given as a decimal integer with no leading zeros. This section defines configuration parameters that apply to a single VF. .Pp @@ -108,11 +108,11 @@ Accepts any integer in the range 0 to 25 Accepts any integer in the range 0 to 65535, inclusive. .It uint32_t Accepts any integer in the range 0 to -.Po 2**32 - 1 Pc , +.Pq 2**32 - 1 , inclusive. .It uint64_t Accepts any integer in the range 0 to -.Po 2**64 - 1 Pc , +.Pq 2**64 - 1 , inclusive. .El .Sh OPTIONS From owner-svn-src-all@freebsd.org Wed Jul 8 16:18:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BB11996785; Wed, 8 Jul 2015 16:18:29 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 6BEBD1F07; Wed, 8 Jul 2015 16:18:29 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68GITQq098051; Wed, 8 Jul 2015 16:18:29 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68GITKN098050; Wed, 8 Jul 2015 16:18:29 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507081618.t68GITKN098050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 8 Jul 2015 16:18:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285274 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 16:18:29 -0000 Author: andrew Date: Wed Jul 8 16:18:28 2015 New Revision: 285274 URL: https://svnweb.freebsd.org/changeset/base/285274 Log: Correctly set __WCHAR_MIN, there is no __UINT_MIN, it's 0. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/include/_types.h Modified: head/sys/arm64/include/_types.h ============================================================================== --- head/sys/arm64/include/_types.h Wed Jul 8 16:16:44 2015 (r285273) +++ head/sys/arm64/include/_types.h Wed Jul 8 16:18:28 2015 (r285274) @@ -94,7 +94,7 @@ typedef __uint64_t __vm_pindex_t; typedef __uint64_t __vm_size_t; typedef unsigned int ___wchar_t; -#define __WCHAR_MIN __UINT_MIN /* min value for a wchar_t */ +#define __WCHAR_MIN 0 /* min value for a wchar_t */ #define __WCHAR_MAX __UINT_MAX /* max value for a wchar_t */ /* From owner-svn-src-all@freebsd.org Wed Jul 8 16:19:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63ED89967D7; Wed, 8 Jul 2015 16:19:37 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 51AF210CC; Wed, 8 Jul 2015 16:19:37 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68GJbbY098255; Wed, 8 Jul 2015 16:19:37 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68GJXxu098232; Wed, 8 Jul 2015 16:19:33 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201507081619.t68GJXxu098232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Wed, 8 Jul 2015 16:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285275 - in head: contrib/tcpdump contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 16:19:37 -0000 Author: pkelsey Date: Wed Jul 8 16:19:32 2015 New Revision: 285275 URL: https://svnweb.freebsd.org/changeset/base/285275 Log: MFV r285191: tcpdump 4.7.4. Also, the changes made in r272451 and r272653 that were lost in the merge of 4.6.2 (r276788) have been restored. PR: 199568 Differential Revision: https://reviews.freebsd.org/D3007 Reviewed by: brooks, hiren Approved by: jmallett (mentor) MFC after: 1 month Added: head/contrib/tcpdump/print-ftp.c - copied unchanged from r285191, vendor/tcpdump/dist/print-ftp.c head/contrib/tcpdump/print-geneve.c - copied unchanged from r285191, vendor/tcpdump/dist/print-geneve.c head/contrib/tcpdump/print-http.c - copied unchanged from r285191, vendor/tcpdump/dist/print-http.c head/contrib/tcpdump/print-rtsp.c - copied unchanged from r285191, vendor/tcpdump/dist/print-rtsp.c head/contrib/tcpdump/print-smtp.c - copied unchanged from r285191, vendor/tcpdump/dist/print-smtp.c Deleted: head/contrib/tcpdump/bootp.h Modified: head/contrib/tcpdump/CHANGES head/contrib/tcpdump/CREDITS head/contrib/tcpdump/INSTALL.txt head/contrib/tcpdump/Makefile.in head/contrib/tcpdump/VERSION head/contrib/tcpdump/addrtoname.c head/contrib/tcpdump/addrtoname.h head/contrib/tcpdump/config.guess head/contrib/tcpdump/config.h.in head/contrib/tcpdump/config.sub head/contrib/tcpdump/configure head/contrib/tcpdump/configure.in head/contrib/tcpdump/extract.h head/contrib/tcpdump/interface.h head/contrib/tcpdump/ip.h head/contrib/tcpdump/machdep.c head/contrib/tcpdump/missing/strsep.c head/contrib/tcpdump/mkdep head/contrib/tcpdump/netdissect.h head/contrib/tcpdump/openflow.h head/contrib/tcpdump/oui.c head/contrib/tcpdump/oui.h head/contrib/tcpdump/print-ahcp.c head/contrib/tcpdump/print-aodv.c head/contrib/tcpdump/print-arcnet.c head/contrib/tcpdump/print-arp.c head/contrib/tcpdump/print-ascii.c head/contrib/tcpdump/print-atm.c head/contrib/tcpdump/print-babel.c head/contrib/tcpdump/print-bgp.c head/contrib/tcpdump/print-bootp.c head/contrib/tcpdump/print-cdp.c head/contrib/tcpdump/print-cfm.c head/contrib/tcpdump/print-chdlc.c head/contrib/tcpdump/print-cnfp.c head/contrib/tcpdump/print-dccp.c head/contrib/tcpdump/print-decnet.c head/contrib/tcpdump/print-eigrp.c head/contrib/tcpdump/print-enc.c head/contrib/tcpdump/print-ether.c head/contrib/tcpdump/print-forces.c head/contrib/tcpdump/print-fr.c head/contrib/tcpdump/print-geonet.c head/contrib/tcpdump/print-gre.c head/contrib/tcpdump/print-icmp.c head/contrib/tcpdump/print-icmp6.c head/contrib/tcpdump/print-ip.c head/contrib/tcpdump/print-ip6.c head/contrib/tcpdump/print-ipnet.c head/contrib/tcpdump/print-isoclns.c head/contrib/tcpdump/print-juniper.c head/contrib/tcpdump/print-ldp.c head/contrib/tcpdump/print-lldp.c head/contrib/tcpdump/print-lmp.c head/contrib/tcpdump/print-lspping.c head/contrib/tcpdump/print-lwapp.c head/contrib/tcpdump/print-mobility.c head/contrib/tcpdump/print-mpcp.c head/contrib/tcpdump/print-mpls.c head/contrib/tcpdump/print-nflog.c head/contrib/tcpdump/print-null.c head/contrib/tcpdump/print-olsr.c head/contrib/tcpdump/print-openflow-1.0.c head/contrib/tcpdump/print-openflow.c head/contrib/tcpdump/print-ospf.c head/contrib/tcpdump/print-pflog.c head/contrib/tcpdump/print-pim.c head/contrib/tcpdump/print-ppi.c head/contrib/tcpdump/print-ppp.c head/contrib/tcpdump/print-radius.c head/contrib/tcpdump/print-rpki-rtr.c head/contrib/tcpdump/print-rsvp.c head/contrib/tcpdump/print-sflow.c head/contrib/tcpdump/print-sip.c head/contrib/tcpdump/print-sl.c head/contrib/tcpdump/print-sll.c head/contrib/tcpdump/print-slow.c head/contrib/tcpdump/print-smb.c head/contrib/tcpdump/print-tcp.c head/contrib/tcpdump/print-telnet.c head/contrib/tcpdump/print-udp.c head/contrib/tcpdump/print-vxlan.c head/contrib/tcpdump/print-wb.c head/contrib/tcpdump/print-zeromq.c head/contrib/tcpdump/tcp.h head/contrib/tcpdump/tcpdump.1.in head/contrib/tcpdump/tcpdump.c head/contrib/tcpdump/udp.h head/contrib/tcpdump/util.c head/usr.sbin/tcpdump/tcpdump/Makefile head/usr.sbin/tcpdump/tcpdump/config.h head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Directory Properties: head/contrib/tcpdump/ (props changed) Modified: head/contrib/tcpdump/CHANGES ============================================================================== --- head/contrib/tcpdump/CHANGES Wed Jul 8 16:18:28 2015 (r285274) +++ head/contrib/tcpdump/CHANGES Wed Jul 8 16:19:32 2015 (r285275) @@ -1,4 +1,35 @@ +Friday April 10, 2015 guy@alum.mit.edu + Summary for 4.7.4 tcpdump release + RPKI to Router Protocol: Fix Segmentation Faults and other problems + RPKI to Router Protocol: print strings with fn_printn() + wb: fix some bounds checks + +Wednesday March 11, 2015 mcr@sandelman.ca + Summary for 4.7.3 tcpdump release + Capsicum fixes for FreeBSD 10 + +Tuesday March 10, 2015 mcr@sandelman.ca + Summary for 4.7.2 tcpdump release + DCCP: update Packet Types with RFC4340/IANA names + fixes for CVE-2015-0261: IPv6 mobility header check issue + fixes for CVE-2015-2153, 2154, 2155: kday packets + +Friday Nov. 12, 2014 guy@alum.mit.edu + Summary for 4.7.0 tcpdump release + changes to hex printing of CDP packets + Fix PPI printing + Radius: update Packet Type Codes and Attribute Types with RFC/IANA names + Add a routine to print "text protocols", and add FTP/HTTP/SMTP/RTSP support. + improvements to telnet printer, even if not -v + omit length for bcp, print-tcp uses it + formatting fixes for a bunch of protocols + new bounds checks for a number of protocols + split netflow 1,6, and 6 dissector up. + added geneve dissector + CVE-2014-9140 PPP dissector fixed. + Tuesday Sep. 2, 2014 mcr@sandelman.ca + Summary for 4.6.2 tcpdump release fix out-of-source-tree builds: find libpcap that is out of source better configure check for libsmi Modified: head/contrib/tcpdump/CREDITS ============================================================================== --- head/contrib/tcpdump/CREDITS Wed Jul 8 16:18:28 2015 (r285274) +++ head/contrib/tcpdump/CREDITS Wed Jul 8 16:19:32 2015 (r285275) @@ -2,7 +2,7 @@ This file lists people who have contribu The current maintainers: Bill Fenner - Denis Ovsienko + Denis Ovsienko Fulvio Risso Guy Harris Hannes Gredler @@ -85,6 +85,7 @@ Additional people who have contributed p Harry Raaymakers Heinz-Ado Arnolds Hendrik Scholz + Herwin Weststrate Ian McDonald Ilpo Järvinen Jacek Tobiasz @@ -95,6 +96,7 @@ Additional people who have contributed p Jefferson Ogata Jeffrey Hutzelman Jesper Peterson + Jesse Gross Jim Hutchins João Medeiros Joerg Mayer Modified: head/contrib/tcpdump/INSTALL.txt ============================================================================== --- head/contrib/tcpdump/INSTALL.txt Wed Jul 8 16:18:28 2015 (r285274) +++ head/contrib/tcpdump/INSTALL.txt Wed Jul 8 16:19:32 2015 (r285275) @@ -52,7 +52,6 @@ appletalk.h - AppleTalk definitions atime.awk - TCP ack awk script atm.h - ATM traffic type definitions atmuni31.h - ATM Q.2931 definitions -bootp.h - BOOTP definitions bpf_dump.c - BPF program printing routines, in case libpcap doesn't have them chdlc.h - Cisco HDLC definitions Modified: head/contrib/tcpdump/Makefile.in ============================================================================== --- head/contrib/tcpdump/Makefile.in Wed Jul 8 16:18:28 2015 (r285274) +++ head/contrib/tcpdump/Makefile.in Wed Jul 8 16:19:32 2015 (r285275) @@ -124,13 +124,17 @@ LIBNETDISSECT_SRC=\ print-fddi.c \ print-forces.c \ print-fr.c \ + print-ftp.c \ + print-geneve.c \ print-geonet.c \ print-gre.c \ print-hsrp.c \ + print-http.c \ print-icmp.c \ print-igmp.c \ print-igrp.c \ print-ip.c \ + print-ip6.c \ print-ipcomp.c \ print-ipfc.c \ print-ipnet.c \ @@ -178,6 +182,7 @@ LIBNETDISSECT_SRC=\ print-rpki-rtr.c \ print-rrcp.c \ print-rsvp.c \ + print-rtsp.c \ print-rx.c \ print-sctp.c \ print-sflow.c \ @@ -185,6 +190,7 @@ LIBNETDISSECT_SRC=\ print-sl.c \ print-sll.c \ print-slow.c \ + print-smtp.c \ print-snmp.c \ print-stp.c \ print-sunatm.c \ @@ -231,7 +237,6 @@ HDR = \ appletalk.h \ atm.h \ atmuni31.h \ - bootp.h \ chdlc.h \ cpack.h \ ether.h \ @@ -241,7 +246,6 @@ HDR = \ gmpls.h \ gmt2local.h \ interface.h \ - interface.h \ ip.h \ ip6.h \ ipproto.h \ @@ -330,7 +334,6 @@ EXTRA_DIST = \ print-dhcp6.c \ print-frag6.c \ print-icmp6.c \ - print-ip6.c \ print-ip6opts.c \ print-mobility.c \ print-ospf6.c \ Modified: head/contrib/tcpdump/VERSION ============================================================================== --- head/contrib/tcpdump/VERSION Wed Jul 8 16:18:28 2015 (r285274) +++ head/contrib/tcpdump/VERSION Wed Jul 8 16:19:32 2015 (r285275) @@ -1 +1 @@ -4.6.2 +4.7.4 Modified: head/contrib/tcpdump/addrtoname.c ============================================================================== --- head/contrib/tcpdump/addrtoname.c Wed Jul 8 16:18:28 2015 (r285274) +++ head/contrib/tcpdump/addrtoname.c Wed Jul 8 16:19:32 2015 (r285275) @@ -576,7 +576,7 @@ linkaddr_string(netdissect_options *ndo, return (etheraddr_string(ndo, ep)); if (type == LINKADDR_FRELAY) - return (q922_string(ep)); + return (q922_string(ndo, ep, len)); tp = lookup_bytestring(ep, len); if (tp->e_name) @@ -1236,3 +1236,15 @@ newh6namemem(void) return (p); } #endif /* INET6 */ + +/* Represent TCI part of the 802.1Q 4-octet tag as text. */ +const char * +ieee8021q_tci_string(const uint16_t tci) +{ + static char buf[128]; + snprintf(buf, sizeof(buf), "vlan %u, p %u%s", + tci & 0xfff, + tci >> 13, + (tci & 0x1000) ? ", DEI" : ""); + return buf; +} Modified: head/contrib/tcpdump/addrtoname.h ============================================================================== --- head/contrib/tcpdump/addrtoname.h Wed Jul 8 16:18:28 2015 (r285274) +++ head/contrib/tcpdump/addrtoname.h Wed Jul 8 16:19:32 2015 (r285275) @@ -51,6 +51,7 @@ extern struct hnamemem *newhnamemem(void #ifdef INET6 extern struct h6namemem *newh6namemem(void); #endif +extern const char * ieee8021q_tci_string(const uint16_t); #define ipaddr_string(ndo, p) getname(ndo, (const u_char *)(p)) #ifdef INET6 Modified: head/contrib/tcpdump/config.guess ============================================================================== --- head/contrib/tcpdump/config.guess Wed Jul 8 16:18:28 2015 (r285274) +++ head/contrib/tcpdump/config.guess Wed Jul 8 16:19:32 2015 (r285275) @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2015-02-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -22,19 +20,17 @@ timestamp='2012-02-10' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches to . + me=`echo "$0" | sed -e 's,.*/,,'` @@ -54,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -153,20 +168,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) + arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ @@ -182,6 +204,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -198,7 +227,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` @@ -302,7 +335,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -560,8 +593,9 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi @@ -801,10 +835,13 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -852,21 +889,21 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -879,59 +916,54 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -950,54 +982,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1201,6 +1242,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1227,19 +1271,31 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1256,7 +1312,7 @@ EOF NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1330,157 +1386,6 @@ EOF exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 < header file. */ +#undef HAVE_CAP_NG_H /* Define to 1 if you have the `cap_rights_limit' function. */ #undef HAVE_CAP_RIGHTS_LIMIT @@ -55,6 +55,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the `cap-ng' library (-lcap-ng). */ +#undef HAVE_LIBCAP_NG + /* Define to 1 if you have the `crypto' library (-lcrypto). */ #undef HAVE_LIBCRYPTO @@ -136,6 +139,9 @@ /* Define to 1 if you have the `pcap_set_datalink' function. */ #undef HAVE_PCAP_SET_DATALINK +/* Define to 1 if you have the `pcap_set_immediate_mode' function. */ +#undef HAVE_PCAP_SET_IMMEDIATE_MODE + /* Define to 1 if you have the `pcap_set_tstamp_precision' function. */ #undef HAVE_PCAP_SET_TSTAMP_PRECISION @@ -211,6 +217,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* Define to 1 if the system has the type `uintptr_t'. */ +#undef HAVE_UINTPTR_T + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H @@ -382,3 +391,7 @@ /* Define to the type of an unsigned integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ #undef uint8_t + +/* Define to the type of an unsigned integer type wide enough to hold a + pointer, if such a type exists, and if the system does not define it. */ +#undef uintptr_t Modified: head/contrib/tcpdump/config.sub ============================================================================== --- head/contrib/tcpdump/config.sub Wed Jul 8 16:18:28 2015 (r285274) +++ head/contrib/tcpdump/config.sub Wed Jul 8 16:19:32 2015 (r285275) @@ -1,24 +1,18 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. - -timestamp='2012-04-18' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# Copyright 1992-2015 Free Software Foundation, Inc. + +timestamp='2015-02-22' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . @@ -26,11 +20,12 @@ timestamp='2012-04-18' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -73,9 +68,7 @@ Report bugs and patches to Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EA1E996952; Wed, 8 Jul 2015 16:21:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 814EF16AB; Wed, 8 Jul 2015 16:21:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68GLBmW001910; Wed, 8 Jul 2015 16:21:11 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68GLBcd001909; Wed, 8 Jul 2015 16:21:11 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201507081621.t68GLBcd001909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 8 Jul 2015 16:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285277 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 16:21:11 -0000 Author: pfg Date: Wed Jul 8 16:21:10 2015 New Revision: 285277 URL: https://svnweb.freebsd.org/changeset/base/285277 Log: Use the __sentinel attribute. Start using the gcc sentinel attribute, which can be used to mark varargs function that need a NULL pointer to mark argument termination, like execl(3). Relnotes: yes Modified: head/include/unistd.h Modified: head/include/unistd.h ============================================================================== --- head/include/unistd.h Wed Jul 8 16:20:20 2015 (r285276) +++ head/include/unistd.h Wed Jul 8 16:21:10 2015 (r285277) @@ -327,9 +327,9 @@ int close(int); void closefrom(int); int dup(int); int dup2(int, int); -int execl(const char *, const char *, ...); +int execl(const char *, const char *, ...) __sentinel; int execle(const char *, const char *, ...); -int execlp(const char *, const char *, ...); +int execlp(const char *, const char *, ...) __sentinel; int execv(const char *, char * const *); int execve(const char *, char * const *, char * const *); int execvp(const char *, char * const *); From owner-svn-src-all@freebsd.org Wed Jul 8 16:35:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 103EE996B5C; Wed, 8 Jul 2015 16:35:25 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 0091B1076; Wed, 8 Jul 2015 16:35:25 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68GZO5H008058; Wed, 8 Jul 2015 16:35:24 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68GZOGP008057; Wed, 8 Jul 2015 16:35:24 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201507081635.t68GZOGP008057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 8 Jul 2015 16:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285278 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 16:35:25 -0000 Author: pfg Date: Wed Jul 8 16:35:24 2015 New Revision: 285278 URL: https://svnweb.freebsd.org/changeset/base/285278 Log: cosmetic: whitespaces-tab before EOL Obtained from: cpi-llvm project Modified: head/lib/libthr/thread/thr_create.c Modified: head/lib/libthr/thread/thr_create.c ============================================================================== --- head/lib/libthr/thread/thr_create.c Wed Jul 8 16:21:10 2015 (r285277) +++ head/lib/libthr/thread/thr_create.c Wed Jul 8 16:35:24 2015 (r285278) @@ -165,7 +165,7 @@ _pthread_create(pthread_t * thread, cons param.flags |= THR_SYSTEM_SCOPE; if (new_thread->attr.sched_inherit == PTHREAD_INHERIT_SCHED) param.rtp = NULL; - else { + else { sched_param.sched_priority = new_thread->attr.prio; _schedparam_to_rtp(new_thread->attr.sched_policy, &sched_param, &rtp); From owner-svn-src-all@freebsd.org Wed Jul 8 16:37:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B87E2996BB4; Wed, 8 Jul 2015 16:37:49 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 8F0241286; Wed, 8 Jul 2015 16:37:49 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68Gbnmv008414; Wed, 8 Jul 2015 16:37:49 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68GbntX008411; Wed, 8 Jul 2015 16:37:49 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201507081637.t68GbntX008411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 8 Jul 2015 16:37:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285279 - head/usr.sbin/jail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 16:37:49 -0000 Author: hrs Date: Wed Jul 8 16:37:48 2015 New Revision: 285279 URL: https://svnweb.freebsd.org/changeset/base/285279 Log: Implement PF_IMMUTABLE flag and apply it to "name" and "jid" in jail.conf parameters. This flag disallows redefinition of the parameter. "name" and/or "jid" are automatically defined in jail.conf by using the jail names at the front of jail parameter definitions. However, one could override them by using a variable with the same name like $name = "foo". This confused the parser and could end up with SIGSEGV. Note that this change also affects a case when all of parameters are defined in the command line arguments, not in jail.conf. Specifically, "jail -c name=j1 name=j2" no longer works. This should be harmless. PR: 196574 Reviewed by: jamie Differential Revision: https://reviews.freebsd.org/D3017 Modified: head/usr.sbin/jail/config.c head/usr.sbin/jail/jailp.h Modified: head/usr.sbin/jail/config.c ============================================================================== --- head/usr.sbin/jail/config.c Wed Jul 8 16:35:24 2015 (r285278) +++ head/usr.sbin/jail/config.c Wed Jul 8 16:37:48 2015 (r285279) @@ -111,8 +111,8 @@ static const struct ipspec intparams[] = #ifdef INET6 [KP_IP6_ADDR] = {"ip6.addr", 0}, #endif - [KP_JID] = {"jid", 0}, - [KP_NAME] = {"name", 0}, + [KP_JID] = {"jid", PF_IMMUTABLE}, + [KP_NAME] = {"name", PF_IMMUTABLE}, [KP_PATH] = {"path", 0}, [KP_PERSIST] = {"persist", 0}, [KP_SECURELEVEL] = {"securelevel", 0}, @@ -362,6 +362,11 @@ add_param(struct cfjail *j, const struct break; if (dp != NULL) { /* Found it - append or replace. */ + if (dp->flags & PF_IMMUTABLE) { + jail_warnx(j, "cannot redefine variable \"%s\".", + dp->name); + return; + } if (strcmp(dp->name, name)) { free(dp->name); dp->name = estrdup(name); Modified: head/usr.sbin/jail/jailp.h ============================================================================== --- head/usr.sbin/jail/jailp.h Wed Jul 8 16:35:24 2015 (r285278) +++ head/usr.sbin/jail/jailp.h Wed Jul 8 16:37:48 2015 (r285279) @@ -51,6 +51,7 @@ #define PF_INT 0x20 /* Integer parameter */ #define PF_CONV 0x40 /* Parameter duplicated in converted form */ #define PF_REV 0x80 /* Run commands in reverse order on stopping */ +#define PF_IMMUTABLE 0x100 /* Immutable parameter */ #define JF_START 0x0001 /* -c */ #define JF_SET 0x0002 /* -m */ From owner-svn-src-all@freebsd.org Wed Jul 8 16:41:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94DE8996D06; Wed, 8 Jul 2015 16:41:26 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 84FEB198E; Wed, 8 Jul 2015 16:41:26 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68GfQUo012499; Wed, 8 Jul 2015 16:41:26 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68GfQ0i012498; Wed, 8 Jul 2015 16:41:26 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201507081641.t68GfQ0i012498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Wed, 8 Jul 2015 16:41:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285280 - head/release/picobsd/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 16:41:26 -0000 Author: luigi Date: Wed Jul 8 16:41:25 2015 New Revision: 285280 URL: https://svnweb.freebsd.org/changeset/base/285280 Log: trap some errors when building picobsd Modified: head/release/picobsd/build/picobsd Modified: head/release/picobsd/build/picobsd ============================================================================== --- head/release/picobsd/build/picobsd Wed Jul 8 16:37:48 2015 (r285279) +++ head/release/picobsd/build/picobsd Wed Jul 8 16:41:25 2015 (r285280) @@ -725,10 +725,10 @@ populate_mfs_tree() { # /stand/crunch is our main binary, we extract its libs find_progs ${dst}/stand/crunch if [ -n "${u_libs}" ] ; then - mkdir -p ${dst}/lib && cp -p ${u_libs} ${dst}/lib + mkdir -p ${dst}/lib && (cp -p ${u_libs} ${dst}/lib || log "copy libs ${u_libs} failed" ) mkdir -p ${dst}/libexec create_includes_and_libraries2 libexec/rtld-elf - find_progs ld-elf.so.1 && cp -p ${u_progs} ${dst}/libexec + find_progs ld-elf.so.1 && ( cp -p ${u_progs} ${dst}/libexec || log "copy ${u_progs} failed" ) fi [ -n "${copy_files}" ] && do_copyfiles ${dst} copy_files @@ -959,6 +959,7 @@ set_build_parameters() { export WITH_GNUCXX=yes export WITHOUT_CLANG=yes export WITHOUT_ICONV=yes + export WITHOUT_TESTS=yes # XXX why change machine_arch ? #-- export MACHINE_ARCH=`uname -m` MACHINE=`uname -m` From owner-svn-src-all@freebsd.org Wed Jul 8 16:42:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31A96996D58; Wed, 8 Jul 2015 16:42:29 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 220FC1B96; Wed, 8 Jul 2015 16:42:29 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68GgTc5012693; Wed, 8 Jul 2015 16:42:29 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68GgSsv012692; Wed, 8 Jul 2015 16:42:28 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201507081642.t68GgSsv012692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Wed, 8 Jul 2015 16:42:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285281 - head/release/picobsd/floppy.tree/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 16:42:29 -0000 Author: luigi Date: Wed Jul 8 16:42:28 2015 New Revision: 285281 URL: https://svnweb.freebsd.org/changeset/base/285281 Log: add an extra tty for picobsd builds Modified: head/release/picobsd/floppy.tree/etc/ttys Modified: head/release/picobsd/floppy.tree/etc/ttys ============================================================================== --- head/release/picobsd/floppy.tree/etc/ttys Wed Jul 8 16:41:25 2015 (r285280) +++ head/release/picobsd/floppy.tree/etc/ttys Wed Jul 8 16:42:28 2015 (r285281) @@ -33,3 +33,4 @@ ttyp7 none network secure ttyp8 none network secure ttyp9 none network secure ttyu0 "/usr/libexec/getty 3wire" dialup on secure +ttyu1 "/usr/libexec/getty 3wire" dialup on secure From owner-svn-src-all@freebsd.org Wed Jul 8 17:46:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FBED996D28; Wed, 8 Jul 2015 17:46:01 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 EDAEE1AC3; Wed, 8 Jul 2015 17:46:00 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68Hk0cK044282; Wed, 8 Jul 2015 17:46:00 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68Hk0To044278; Wed, 8 Jul 2015 17:46:00 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201507081746.t68Hk0To044278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 8 Jul 2015 17:46:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285282 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 17:46:01 -0000 Author: alc Date: Wed Jul 8 17:45:59 2015 New Revision: 285282 URL: https://svnweb.freebsd.org/changeset/base/285282 Log: The intention of r254304 was to scan the active queue continuously. However, I've observed the active queue scan stopping when there are frequent free page shortages and the inactive queue is steadily refilled by other mechanisms, such as the sequential access heuristic in vm_fault() or madvise(2). To remedy this problem, record the time of the last active queue scan, and always scan a number of pages proportional to the time since the last scan, regardless of whether that last scan was a timeout-triggered ("pass == 0") or free-page-shortage-triggered ("pass > 0") scan. Also, on a timeout-triggered scan, allow a full scan of the active queue when the system is short of inactive pages. Reviewed by: kib MFC after: 6 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_page.h head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Wed Jul 8 16:42:28 2015 (r285281) +++ head/sys/vm/vm_page.h Wed Jul 8 17:45:59 2015 (r285282) @@ -227,6 +227,7 @@ struct vm_domain { long vmd_segs; /* bitmask of the segments */ boolean_t vmd_oom; int vmd_pass; /* local pagedaemon pass */ + int vmd_last_active_scan; struct vm_page vmd_marker; /* marker for pagedaemon private use */ }; Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Wed Jul 8 16:42:28 2015 (r285281) +++ head/sys/vm/vm_pageout.c Wed Jul 8 17:45:59 2015 (r285282) @@ -1028,9 +1028,10 @@ vm_pageout_scan(struct vm_domain *vmd, i vm_page_t m, next; struct vm_pagequeue *pq; vm_object_t object; + long min_scan; int act_delta, addl_page_shortage, deficit, maxscan, page_shortage; int vnodes_skipped = 0; - int maxlaunder; + int maxlaunder, scan_tick, scanned; boolean_t queues_locked; /* @@ -1351,34 +1352,37 @@ relock_queues: * If we're just idle polling attempt to visit every * active page within 'update_period' seconds. */ - if (pass == 0 && vm_pageout_update_period != 0) { - maxscan /= vm_pageout_update_period; - page_shortage = maxscan; - } + scan_tick = ticks; + if (vm_pageout_update_period != 0) { + min_scan = pq->pq_cnt; + min_scan *= scan_tick - vmd->vmd_last_active_scan; + min_scan /= hz * vm_pageout_update_period; + } else + min_scan = 0; + if (min_scan > 0 || (page_shortage > 0 && maxscan > 0)) + vmd->vmd_last_active_scan = scan_tick; /* - * Scan the active queue for things we can deactivate. We nominally - * track the per-page activity counter and use it to locate - * deactivation candidates. - */ - m = TAILQ_FIRST(&pq->pq_pl); - while (m != NULL && maxscan-- > 0 && page_shortage > 0) { + * Scan the active queue for pages that can be deactivated. Update + * the per-page activity counter and use it to identify deactivation + * candidates. + */ + for (m = TAILQ_FIRST(&pq->pq_pl), scanned = 0; m != NULL && (scanned < + min_scan || (page_shortage > 0 && scanned < maxscan)); m = next, + scanned++) { KASSERT(m->queue == PQ_ACTIVE, ("vm_pageout_scan: page %p isn't active", m)); next = TAILQ_NEXT(m, plinks.q); - if ((m->flags & PG_MARKER) != 0) { - m = next; + if ((m->flags & PG_MARKER) != 0) continue; - } KASSERT((m->flags & PG_FICTITIOUS) == 0, ("Fictitious page %p cannot be in active queue", m)); KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("Unmanaged page %p cannot be in active queue", m)); if (!vm_pageout_page_lock(m, &next)) { vm_page_unlock(m); - m = next; continue; } @@ -1430,7 +1434,6 @@ relock_queues: } else vm_page_requeue_locked(m); vm_page_unlock(m); - m = next; } vm_pagequeue_unlock(pq); #if !defined(NO_SWAPPING) @@ -1620,6 +1623,7 @@ vm_pageout_worker(void *arg) */ KASSERT(domain->vmd_segs != 0, ("domain without segments")); + domain->vmd_last_active_scan = ticks; vm_pageout_init_marker(&domain->vmd_marker, PQ_INACTIVE); /* From owner-svn-src-all@freebsd.org Wed Jul 8 17:51:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 035F1996F59; Wed, 8 Jul 2015 17:51:37 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com [IPv6:2a00:1450:4010:c03::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B8A41FB7; Wed, 8 Jul 2015 17:51:36 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by lagc2 with SMTP id c2so227611556lag.3; Wed, 08 Jul 2015 10:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gPEC55qpA2enBy8MTzKFsSnWxZ5gQLMZdnPQqHJNSiI=; b=MAc3DIGtR6vk+/s2kv3kuyo6rhhGoX1hLax8LN+tXR25bq1tiI3aMrXyMgRTXjs9lL FxNPvmAs+glfPX476w1bwYqWWJhJytGo0li/cHmTxnw4s5pav1dNJjOTyWGmUbFXzIIZ Z/dmhuOTyyOEktVOxLcZgZlbLBmcGEvM+PODGMj5TqJsVhaUy6nFBTxFwL0ZBxBST9UP A31cdu/DUrhnu20BGBBB+Zc7c0U4CsR5tcuVHa+k7sKYXeZwJLru1iAsBGpg4vUHvBxj miihwLavKi0t4sfLaWuksd5pbVO+adYDLVPWr/aRfBeBdeOR8DOBefehOV4V4JMFRZ2x 2ovw== MIME-Version: 1.0 X-Received: by 10.112.137.164 with SMTP id qj4mr10616308lbb.105.1436377894522; Wed, 08 Jul 2015 10:51:34 -0700 (PDT) Received: by 10.112.42.162 with HTTP; Wed, 8 Jul 2015 10:51:34 -0700 (PDT) In-Reply-To: References: <201507081353.t68Dr0up028388@repo.freebsd.org> <1436366547.1334.81.camel@freebsd.org> Date: Wed, 8 Jul 2015 12:51:34 -0500 Message-ID: Subject: Re: svn commit: r285270 - head/sys/sys From: Jason Harmening To: Adrian Chadd Cc: Ian Lepore , Zbigniew Bodek , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 17:51:37 -0000 +2 This has always bugged me. I'll do it if no one else gets to it first. If the new pmap KPI makes it in, I'll be messing with a bunch of the MD busdma code anyway. On Wed, Jul 8, 2015 at 9:47 AM, Adrian Chadd wrote: > On 8 July 2015 at 07:42, Ian Lepore wrote: > > On Wed, 2015-07-08 at 07:30 -0700, Adrian Chadd wrote: > >> Why is this implemented in sys/sys/bus_dma.h, rather than in a machdep > header? > >> > >> > > > > Indeed, this stuff is a mess that really needs to be cleaned up. The > > pre-existing assumption that MI functions don't need to be called, just > > because one of the parameters of that function has some value that has a > > special meaning on one platform, is purely x86-MD code in an MI header > > file. This change just complicates the existing mess. > > +1 > > (So who's going to do it? I'm already taken.) > > > > -a > > >> -a > >> > >> > >> On 8 July 2015 at 06:53, Zbigniew Bodek wrote: > >> > Author: zbb > >> > Date: Wed Jul 8 13:52:59 2015 > >> > New Revision: 285270 > >> > URL: https://svnweb.freebsd.org/changeset/base/285270 > >> > > >> > Log: > >> > Add memory barrier to bus_dmamap_sync() > >> > > >> > On platforms which are fully IO-coherent, the map might be null. > >> > We need to guarantee that all data is observable after the > >> > sync operation is called. Add a memory barrier to ensure that on > ARM. > >> > > >> > Reviewed by: andrew, kib > >> > Obtained from: Semihalf > >> > Sponsored by: The FreeBSD Foundation > >> > Differential Revision: https://reviews.freebsd.org/D3012 > >> > > >> > Modified: > >> > head/sys/sys/bus_dma.h > >> > > >> > Modified: head/sys/sys/bus_dma.h > >> > > ============================================================================== > >> > --- head/sys/sys/bus_dma.h Wed Jul 8 13:19:13 2015 > (r285269) > >> > +++ head/sys/sys/bus_dma.h Wed Jul 8 13:52:59 2015 > (r285270) > >> > @@ -282,13 +282,25 @@ int bus_dmamem_alloc(bus_dma_tag_t dmat, > >> > void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t > map); > >> > > >> > /* > >> > - * Perform a synchronization operation on the given map. > >> > + * Perform a synchronization operation on the given map. If the map > >> > + * is NULL we have a fully IO-coherent system. On every ARM > architecture > >> > + * there must be a memory barrier placed to ensure that all data > >> > + * accesses are visible before going any further. > >> > */ > >> > void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t); > >> > +#if defined(__arm__) > >> > + #define __BUS_DMAMAP_SYNC_DEFAULT mb(); > >> > +#elif defined(__aarch64__) > >> > + #define __BUS_DMAMAP_SYNC_DEFAULT dmb(sy); > >> > +#else > >> > + #define __BUS_DMAMAP_SYNC_DEFAULT {} > >> > +#endif > >> > #define bus_dmamap_sync(dmat, dmamap, op) \ > >> > do { \ > >> > if ((dmamap) != NULL) \ > >> > _bus_dmamap_sync(dmat, dmamap, op); \ > >> > + else \ > >> > + __BUS_DMAMAP_SYNC_DEFAULT \ > >> > } while (0) > >> > > >> > /* > >> > > >> > > > > > > From owner-svn-src-all@freebsd.org Wed Jul 8 18:12:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C9C1995484; Wed, 8 Jul 2015 18:12:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 E3C581EAF; Wed, 8 Jul 2015 18:12:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68ICRYh058956; Wed, 8 Jul 2015 18:12:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68ICPkC058944; Wed, 8 Jul 2015 18:12:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201507081812.t68ICPkC058944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 8 Jul 2015 18:12:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285283 - in head/sys: amd64/include arm/include arm64/include i386/include mips/include powerpc/include sparc64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 18:12:28 -0000 Author: kib Date: Wed Jul 8 18:12:24 2015 New Revision: 285283 URL: https://svnweb.freebsd.org/changeset/base/285283 Log: Add the atomic_thread_fence() family of functions with intent to provide a semantic defined by the C11 fences with corresponding memory_order. atomic_thread_fence_acq() gives r | r, w, where r and w are read and write accesses, and | denotes the fence itself. atomic_thread_fence_rel() is r, w | w. atomic_thread_fence_acq_rel() is the combination of the acquire and release in single operation. Note that reads after the acq+rel fence could be made visible before writes preceeding the fence. atomic_thread_fence_seq_cst() orders all accesses before/after the fence, and the fence itself is globally ordered against other sequentially consistent atomic operations. Reviewed by: alc Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sys/amd64/include/atomic.h head/sys/arm/include/atomic.h head/sys/arm64/include/atomic.h head/sys/i386/include/atomic.h head/sys/mips/include/atomic.h head/sys/powerpc/include/atomic.h head/sys/sparc64/include/atomic.h Modified: head/sys/amd64/include/atomic.h ============================================================================== --- head/sys/amd64/include/atomic.h Wed Jul 8 17:45:59 2015 (r285282) +++ head/sys/amd64/include/atomic.h Wed Jul 8 18:12:24 2015 (r285283) @@ -84,6 +84,10 @@ u_int atomic_fetchadd_int(volatile u_int u_long atomic_fetchadd_long(volatile u_long *p, u_long v); int atomic_testandset_int(volatile u_int *p, u_int v); int atomic_testandset_long(volatile u_long *p, u_int v); +void atomic_thread_fence_acq(void); +void atomic_thread_fence_acq_rel(void); +void atomic_thread_fence_rel(void); +void atomic_thread_fence_seq_cst(void); #define ATOMIC_LOAD(TYPE) \ u_##TYPE atomic_load_acq_##TYPE(volatile u_##TYPE *p) @@ -328,6 +332,34 @@ atomic_store_rel_##TYPE(volatile u_##TYP } \ struct __hack +static __inline void +atomic_thread_fence_acq(void) +{ + + __compiler_membar(); +} + +static __inline void +atomic_thread_fence_rel(void) +{ + + __compiler_membar(); +} + +static __inline void +atomic_thread_fence_acq_rel(void) +{ + + __compiler_membar(); +} + +static __inline void +atomic_thread_fence_seq_cst(void) +{ + + __storeload_barrier(); +} + #endif /* KLD_MODULE || !__GNUCLIKE_ASM */ ATOMIC_ASM(set, char, "orb %b1,%0", "iq", v); Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Wed Jul 8 17:45:59 2015 (r285282) +++ head/sys/arm/include/atomic.h Wed Jul 8 18:12:24 2015 (r285283) @@ -1103,6 +1103,34 @@ atomic_store_long(volatile u_long *dst, *dst = src; } +static __inline void +atomic_thread_fence_acq(void) +{ + + dmb(); +} + +static __inline void +atomic_thread_fence_rel(void) +{ + + dmb(); +} + +static __inline void +atomic_thread_fence_acq_rel(void) +{ + + dmb(); +} + +static __inline void +atomic_thread_fence_seq_cst(void) +{ + + dmb(); +} + #define atomic_clear_ptr atomic_clear_32 #define atomic_set_ptr atomic_set_32 #define atomic_cmpset_ptr atomic_cmpset_32 Modified: head/sys/arm64/include/atomic.h ============================================================================== --- head/sys/arm64/include/atomic.h Wed Jul 8 17:45:59 2015 (r285282) +++ head/sys/arm64/include/atomic.h Wed Jul 8 18:12:24 2015 (r285283) @@ -728,6 +728,34 @@ atomic_subtract_rel_64(volatile uint64_t ); } +static __inline void +atomic_thread_fence_acq(void) +{ + + dmb(ld); +} + +static __inline void +atomic_thread_fence_rel(void) +{ + + dmb(sy); +} + +static __inline void +atomic_thread_fence_acq_rel(void) +{ + + dmb(sy); +} + +static __inline void +atomic_thread_fence_seq_cst(void) +{ + + dmb(sy); +} + #define atomic_add_rel_long atomic_add_rel_64 #define atomic_clear_rel_long atomic_clear_rel_64 #define atomic_cmpset_rel_long atomic_cmpset_rel_64 Modified: head/sys/i386/include/atomic.h ============================================================================== --- head/sys/i386/include/atomic.h Wed Jul 8 17:45:59 2015 (r285282) +++ head/sys/i386/include/atomic.h Wed Jul 8 18:12:24 2015 (r285283) @@ -86,6 +86,10 @@ void atomic_##NAME##_barr_##TYPE(volatil int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src); u_int atomic_fetchadd_int(volatile u_int *p, u_int v); int atomic_testandset_int(volatile u_int *p, u_int v); +void atomic_thread_fence_acq(void); +void atomic_thread_fence_acq_rel(void); +void atomic_thread_fence_rel(void); +void atomic_thread_fence_seq_cst(void); #define ATOMIC_LOAD(TYPE) \ u_##TYPE atomic_load_acq_##TYPE(volatile u_##TYPE *p) @@ -310,6 +314,34 @@ atomic_store_rel_##TYPE(volatile u_##TYP } \ struct __hack +static __inline void +atomic_thread_fence_acq(void) +{ + + __compiler_membar(); +} + +static __inline void +atomic_thread_fence_rel(void) +{ + + __compiler_membar(); +} + +static __inline void +atomic_thread_fence_acq_rel(void) +{ + + __compiler_membar(); +} + +static __inline void +atomic_thread_fence_seq_cst(void) +{ + + __storeload_barrier(); +} + #ifdef _KERNEL #ifdef WANT_FUNCTIONS Modified: head/sys/mips/include/atomic.h ============================================================================== --- head/sys/mips/include/atomic.h Wed Jul 8 17:45:59 2015 (r285282) +++ head/sys/mips/include/atomic.h Wed Jul 8 18:12:24 2015 (r285283) @@ -496,6 +496,34 @@ atomic_fetchadd_64(__volatile uint64_t * } #endif +static __inline void +atomic_thread_fence_acq(void) +{ + + mips_sync(); +} + +static __inline void +atomic_thread_fence_rel(void) +{ + + mips_sync(); +} + +static __inline void +atomic_thread_fence_acq_rel(void) +{ + + mips_sync(); +} + +static __inline void +atomic_thread_fence_seq_cst(void) +{ + + mips_sync(); +} + /* Operations on chars. */ #define atomic_set_char atomic_set_8 #define atomic_set_acq_char atomic_set_acq_8 Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Wed Jul 8 17:45:59 2015 (r285282) +++ head/sys/powerpc/include/atomic.h Wed Jul 8 18:12:24 2015 (r285283) @@ -730,4 +730,45 @@ atomic_swap_64(volatile u_long *p, u_lon #undef __ATOMIC_REL #undef __ATOMIC_ACQ +static __inline void +atomic_thread_fence_acq(void) +{ + + /* See above comment about lwsync being broken on Book-E. */ +#ifdef __powerpc64__ + __asm __volatile("lwsync" : : : "memory"); +#else + __asm __volatile("sync" : : : "memory"); +#endif +} + +static __inline void +atomic_thread_fence_rel(void) +{ + +#ifdef __powerpc64__ + __asm __volatile("lwsync" : : : "memory"); +#else + __asm __volatile("sync" : : : "memory"); +#endif +} + +static __inline void +atomic_thread_fence_acq_rel(void) +{ + +#ifdef __powerpc64__ + __asm __volatile("lwsync" : : : "memory"); +#else + __asm __volatile("sync" : : : "memory"); +#endif +} + +static __inline void +atomic_thread_fence_seq_cst(void) +{ + + __asm __volatile("sync" : : : "memory"); +} + #endif /* ! _MACHINE_ATOMIC_H_ */ Modified: head/sys/sparc64/include/atomic.h ============================================================================== --- head/sys/sparc64/include/atomic.h Wed Jul 8 17:45:59 2015 (r285282) +++ head/sys/sparc64/include/atomic.h Wed Jul 8 18:12:24 2015 (r285283) @@ -279,6 +279,35 @@ atomic_store_rel_ ## name(volatile ptype atomic_st_rel((p), (v), sz); \ } +static __inline void +atomic_thread_fence_acq(void) +{ + + __compiler_membar(); +} + +static __inline void +atomic_thread_fence_rel(void) +{ + + __compiler_membar(); +} + +static __inline void +atomic_thread_fence_acq_rel(void) +{ + + __compiler_membar(); +} + +static __inline void +atomic_thread_fence_seq_cst(void) +{ + + membar(LoadLoad | LoadStore | StoreStore | StoreLoad); +} + + ATOMIC_GEN(int, u_int *, u_int, u_int, 32); ATOMIC_GEN(32, uint32_t *, uint32_t, uint32_t, 32); From owner-svn-src-all@freebsd.org Wed Jul 8 18:29:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F9F09957C8; Wed, 8 Jul 2015 18:29:03 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (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 4D864164D; Wed, 8 Jul 2015 18:29:03 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id C27F7D2C48; Wed, 8 Jul 2015 11:29:01 -0700 (PDT) Date: Wed, 8 Jul 2015 11:29:01 -0700 From: hiren panchasara To: Alan Cox Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285282 - head/sys/vm Message-ID: <20150708182901.GJ51988@strugglingcoder.info> References: <201507081746.t68Hk0To044278@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="451BZW+OUuJBCAYj" Content-Disposition: inline In-Reply-To: <201507081746.t68Hk0To044278@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 18:29:03 -0000 --451BZW+OUuJBCAYj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 07/08/15 at 05:46P, Alan Cox wrote: > Author: alc > Date: Wed Jul 8 17:45:59 2015 > New Revision: 285282 > URL: https://svnweb.freebsd.org/changeset/base/285282 >=20 > Log: > The intention of r254304 was to scan the active queue continuously. > However, I've observed the active queue scan stopping when there are > frequent free page shortages and the inactive queue is steadily refilled > by other mechanisms, such as the sequential access heuristic in vm_faul= t() > or madvise(2).=20 What would be the actual downside/effect of this scenario? i.e. What goes wrong when active queue scan stops and what would I see/observe on a system when the problem is going on - is what I want to understand. > To remedy this problem, record the time of the last active > queue scan, and always scan a number of pages proportional to the time > since the last scan, regardless of whether that last scan was a > timeout-triggered ("pass =3D=3D 0") or free-page-shortage-triggered ("p= ass > > 0") scan. > =20 > Also, on a timeout-triggered scan, allow a full scan of the active queue > when the system is short of inactive pages. > =20 > Reviewed by: kib > MFC after: 6 weeks > Sponsored by: EMC / Isilon Storage Division [skip] Thanks in advance. Cheers, Hiren --451BZW+OUuJBCAYj Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVnWvtXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lNHYH+waL0+YG6SEy6g11jr2F3R2Y s4fxLWMlyY05g3Sdvluy3AWRBu0vMT/shQY//WfzrreaxpYXEfsL4428YYrtQ5m2 S8d50vNB6URdTaYTUleRCrzcg5/bzhb6yKPdI/9WWh7xzlBzUxv/+N3wh5KDRUD7 yiIRKoKCcVucDew0XClp/PDzsNjqQyRpHgDfYLv6fuCJh4e0ljowPgLu/3DC7xDy r/Z+Zf6SDzo6vwWXky3DSCXQuPR72HkX8jo8FDli44FrXFmXYaLKWCorLQSIVwGW pEeAe5XJkKh3M6LMCX5IFPrKIdeIeLBiWueciSCdUrwQFLC0keFGHx59sKzrIJg= =zQoP -----END PGP SIGNATURE----- --451BZW+OUuJBCAYj-- From owner-svn-src-all@freebsd.org Wed Jul 8 18:36:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D1F6995BE9; Wed, 8 Jul 2015 18:36:38 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 39EE31434; Wed, 8 Jul 2015 18:36:38 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68Iacn7069564; Wed, 8 Jul 2015 18:36:38 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68IacJu069563; Wed, 8 Jul 2015 18:36:38 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201507081836.t68IacJu069563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Wed, 8 Jul 2015 18:36:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285284 - head/lib/liblzma X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 18:36:38 -0000 Author: luigi Date: Wed Jul 8 18:36:37 2015 New Revision: 285284 URL: https://svnweb.freebsd.org/changeset/base/285284 Log: only enable immintrin when clang is used. The base gcc does not support it. Reviewed by: delphij Modified: head/lib/liblzma/config.h Modified: head/lib/liblzma/config.h ============================================================================== --- head/lib/liblzma/config.h Wed Jul 8 18:12:24 2015 (r285283) +++ head/lib/liblzma/config.h Wed Jul 8 18:36:37 2015 (r285284) @@ -150,7 +150,8 @@ #define HAVE_ICONV 1 /* Define to 1 if you have the header file. */ -#if defined(__FreeBSD__) && defined(__amd64__) +/* FreeBSD - only with clang because the base gcc does not support it */ +#if defined(__clang__) && defined(__FreeBSD__) && defined(__amd64__) #define HAVE_IMMINTRIN_H 1 #endif From owner-svn-src-all@freebsd.org Wed Jul 8 18:37:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4D8A995C17; Wed, 8 Jul 2015 18:37:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 7B4AE15CF; Wed, 8 Jul 2015 18:37:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68Ib9r3069694; Wed, 8 Jul 2015 18:37:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68Ib9ta069693; Wed, 8 Jul 2015 18:37:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201507081837.t68Ib9ta069693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 8 Jul 2015 18:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285285 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 18:37:09 -0000 Author: kib Date: Wed Jul 8 18:37:08 2015 New Revision: 285285 URL: https://svnweb.freebsd.org/changeset/base/285285 Log: Use atomic_fence_fence_rel() to ensure ordering in the seq_write_begin(), instead of the load_rmb/rbm_load functions. The update does not need to be atomic due to the write lock owned. Similarly, in seq_write_end(), update of *seqp needs not be atomic. Only store must be atomic with release. For seq_read(), the natural operation is the load acquire of the sequence value, express this directly with atomic_load_acq_int() instead of using custom partial fence implementation atomic_load_rmb_int(). In seq_consistent, use atomic_thread_fence_acq() which provides the desired semantic of ordering reads before fence before the re-reading of *seqp, instead of custom atomic_rmb_load_int(). Reviewed by: alc, bde Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sys/sys/seq.h Modified: head/sys/sys/seq.h ============================================================================== --- head/sys/sys/seq.h Wed Jul 8 18:36:37 2015 (r285284) +++ head/sys/sys/seq.h Wed Jul 8 18:37:08 2015 (r285285) @@ -69,35 +69,6 @@ typedef uint32_t seq_t; #include -/* - * Stuff below is going away when we gain suitable memory barriers. - * - * atomic_load_acq_int at least on amd64 provides a full memory barrier, - * in a way which affects performance. - * - * Hack below covers all architectures and avoids most of the penalty at least - * on amd64 but still has unnecessary cost. - */ -static __inline int -atomic_load_rmb_int(volatile const u_int *p) -{ - volatile u_int v; - - v = *p; - atomic_load_acq_int(&v); - return (v); -} - -static __inline int -atomic_rmb_load_int(volatile const u_int *p) -{ - volatile u_int v = 0; - - atomic_load_acq_int(&v); - v = *p; - return (v); -} - static __inline bool seq_in_modify(seq_t seqp) { @@ -110,14 +81,15 @@ seq_write_begin(seq_t *seqp) { MPASS(!seq_in_modify(*seqp)); - atomic_add_acq_int(seqp, 1); + *seqp += 1; + atomic_thread_fence_rel(); } static __inline void seq_write_end(seq_t *seqp) { - atomic_add_rel_int(seqp, 1); + atomic_store_rel_int(seqp, *seqp + 1); MPASS(!seq_in_modify(*seqp)); } @@ -127,7 +99,7 @@ seq_read(const seq_t *seqp) seq_t ret; for (;;) { - ret = atomic_load_rmb_int(seqp); + ret = atomic_load_acq_int(__DECONST(seq_t *, seqp)); if (seq_in_modify(ret)) { cpu_spinwait(); continue; @@ -142,7 +114,8 @@ static __inline seq_t seq_consistent(const seq_t *seqp, seq_t oldseq) { - return (atomic_rmb_load_int(seqp) == oldseq); + atomic_thread_fence_acq(); + return (*seqp == oldseq); } static __inline seq_t From owner-svn-src-all@freebsd.org Wed Jul 8 18:42:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4ABE3995E44; Wed, 8 Jul 2015 18:42:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 3AD941D11; Wed, 8 Jul 2015 18:42:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68Ig91o074115; Wed, 8 Jul 2015 18:42:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68Ig9EO074114; Wed, 8 Jul 2015 18:42:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201507081842.t68Ig9EO074114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 8 Jul 2015 18:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285286 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 18:42:09 -0000 Author: kib Date: Wed Jul 8 18:42:08 2015 New Revision: 285286 URL: https://svnweb.freebsd.org/changeset/base/285286 Log: Reimplement the ordering requirements for the timehands updates, and for timehands consumers, by using fences. Ensure that the timehands->th_generation reset to zero is visible before the data update is visible [*]. tc_setget() allowed data update writes to become visible before generation (but not on TSO architectures). Remove tc_setgen(), tc_getgen() helpers, use atomics inline [**]. Noted by: alc [*] Requested by: bde [**] Reviewed by: alc, bde Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Wed Jul 8 18:37:08 2015 (r285285) +++ head/sys/kern/kern_tc.c Wed Jul 8 18:42:08 2015 (r285286) @@ -189,33 +189,6 @@ tc_delta(struct timehands *th) tc->tc_counter_mask); } -static inline u_int -tc_getgen(struct timehands *th) -{ - -#ifdef SMP - return (atomic_load_acq_int(&th->th_generation)); -#else - u_int gen; - - gen = th->th_generation; - __compiler_membar(); - return (gen); -#endif -} - -static inline void -tc_setgen(struct timehands *th, u_int newgen) -{ - -#ifdef SMP - atomic_store_rel_int(&th->th_generation, newgen); -#else - __compiler_membar(); - th->th_generation = newgen; -#endif -} - /* * Functions for reading the time. We have to loop until we are sure that * the timehands that we operated on was not updated under our feet. See @@ -231,10 +204,11 @@ fbclock_binuptime(struct bintime *bt) do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); *bt = th->th_offset; bintime_addx(bt, th->th_scale * tc_delta(th)); - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } void @@ -289,9 +263,10 @@ fbclock_getbinuptime(struct bintime *bt) do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); *bt = th->th_offset; - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } void @@ -302,9 +277,10 @@ fbclock_getnanouptime(struct timespec *t do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); bintime2timespec(&th->th_offset, tsp); - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } void @@ -315,9 +291,10 @@ fbclock_getmicrouptime(struct timeval *t do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); bintime2timeval(&th->th_offset, tvp); - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } void @@ -328,9 +305,10 @@ fbclock_getbintime(struct bintime *bt) do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); *bt = th->th_offset; - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); bintime_add(bt, &boottimebin); } @@ -342,9 +320,10 @@ fbclock_getnanotime(struct timespec *tsp do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); *tsp = th->th_nanotime; - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } void @@ -355,9 +334,10 @@ fbclock_getmicrotime(struct timeval *tvp do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); *tvp = th->th_microtime; - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } #else /* !FFCLOCK */ void @@ -368,10 +348,11 @@ binuptime(struct bintime *bt) do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); *bt = th->th_offset; bintime_addx(bt, th->th_scale * tc_delta(th)); - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } void @@ -426,9 +407,10 @@ getbinuptime(struct bintime *bt) do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); *bt = th->th_offset; - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } void @@ -439,9 +421,10 @@ getnanouptime(struct timespec *tsp) do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); bintime2timespec(&th->th_offset, tsp); - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } void @@ -452,9 +435,10 @@ getmicrouptime(struct timeval *tvp) do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); bintime2timeval(&th->th_offset, tvp); - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } void @@ -465,9 +449,10 @@ getbintime(struct bintime *bt) do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); *bt = th->th_offset; - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); bintime_add(bt, &boottimebin); } @@ -479,9 +464,10 @@ getnanotime(struct timespec *tsp) do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); *tsp = th->th_nanotime; - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } void @@ -492,9 +478,10 @@ getmicrotime(struct timeval *tvp) do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); *tvp = th->th_microtime; - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } #endif /* FFCLOCK */ @@ -907,11 +894,12 @@ ffclock_read_counter(ffcounter *ffcount) */ do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); ffth = fftimehands; delta = tc_delta(th); *ffcount = ffth->tick_ffcount; - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); *ffcount += delta; } @@ -1015,9 +1003,10 @@ dtrace_getnanotime(struct timespec *tsp) do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); *tsp = th->th_nanotime; - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); } /* @@ -1055,7 +1044,7 @@ sysclock_getsnapshot(struct sysclock_sna do { th = timehands; - gen = tc_getgen(th); + gen = atomic_load_acq_int(&th->th_generation); fbi->th_scale = th->th_scale; fbi->tick_time = th->th_offset; #ifdef FFCLOCK @@ -1069,7 +1058,8 @@ sysclock_getsnapshot(struct sysclock_sna #endif if (!fast) delta = tc_delta(th); - } while (gen == 0 || gen != tc_getgen(th)); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); clock_snap->delta = delta; clock_snap->sysclock_active = sysclock_active; @@ -1280,14 +1270,19 @@ tc_windup(void) time_t t; /* - * Make the next timehands a copy of the current one, but do not - * overwrite the generation or next pointer. While we update - * the contents, the generation must be zero. + * Make the next timehands a copy of the current one, but do + * not overwrite the generation or next pointer. While we + * update the contents, the generation must be zero. We need + * to ensure that the zero generation is visible before the + * data updates become visible, which requires release fence. + * For similar reasons, re-reading of the generation after the + * data is read should use acquire fence. */ tho = timehands; th = tho->th_next; ogen = th->th_generation; - tc_setgen(th, 0); + th->th_generation = 0; + atomic_thread_fence_rel(); bcopy(tho, th, offsetof(struct timehands, th_generation)); /* @@ -1404,7 +1399,7 @@ tc_windup(void) */ if (++ogen == 0) ogen = 1; - tc_setgen(th, ogen); + atomic_store_rel_int(&th->th_generation, ogen); /* Go live with the new struct timehands. */ #ifdef FFCLOCK @@ -1678,13 +1673,14 @@ pps_capture(struct pps_state *pps) KASSERT(pps != NULL, ("NULL pps pointer in pps_capture")); th = timehands; - pps->capgen = tc_getgen(th); + pps->capgen = atomic_load_acq_int(&th->th_generation); pps->capth = th; #ifdef FFCLOCK pps->capffth = fftimehands; #endif pps->capcount = th->th_counter->tc_get_timecount(th->th_counter); - if (pps->capgen != tc_getgen(th)) + atomic_thread_fence_acq(); + if (pps->capgen != th->th_generation) pps->capgen = 0; } @@ -1704,7 +1700,8 @@ pps_event(struct pps_state *pps, int eve KASSERT(pps != NULL, ("NULL pps pointer in pps_event")); /* If the timecounter was wound up underneath us, bail out. */ - if (pps->capgen == 0 || pps->capgen != tc_getgen(pps->capth)) + if (pps->capgen == 0 || pps->capgen != + atomic_load_acq_int(&pps->capth->th_generation)) return; /* Things would be easier with arrays. */ @@ -1754,7 +1751,8 @@ pps_event(struct pps_state *pps, int eve bintime2timespec(&bt, &ts); /* If the timecounter was wound up underneath us, bail out. */ - if (pps->capgen != tc_getgen(pps->capth)) + atomic_thread_fence_acq(); + if (pps->capgen != pps->capth->th_generation) return; *pcount = pps->capcount; From owner-svn-src-all@freebsd.org Wed Jul 8 18:46:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 962ED995F96; Wed, 8 Jul 2015 18:46:45 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 86B3C1191; Wed, 8 Jul 2015 18:46:45 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68IkjKq075550; Wed, 8 Jul 2015 18:46:45 GMT (envelope-from markm@FreeBSD.org) Received: (from markm@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68IkjN0075548; Wed, 8 Jul 2015 18:46:45 GMT (envelope-from markm@FreeBSD.org) Message-Id: <201507081846.t68IkjN0075548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markm set sender to markm@FreeBSD.org using -f From: Mark Murray Date: Wed, 8 Jul 2015 18:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285288 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 18:46:45 -0000 Author: markm Date: Wed Jul 8 18:46:44 2015 New Revision: 285288 URL: https://svnweb.freebsd.org/changeset/base/285288 Log: Address review. Differential Revision: https://reviews.freebsd.org/D2924 Modified: head/etc/rc.d/random Modified: head/etc/rc.d/random ============================================================================== --- head/etc/rc.d/random Wed Jul 8 18:43:55 2015 (r285287) +++ head/etc/rc.d/random Wed Jul 8 18:46:44 2015 (r285288) @@ -67,7 +67,7 @@ random_start() esac case ${entropy_file:=/entropy} in - [Nn][Oo] | '') + [Nn][Oo]) ;; *) feed_dev_random "${entropy_file}" /var/db/entropy-file @@ -76,7 +76,7 @@ random_start() esac case ${entropy_boot_file:=/boot/entropy} in - [Nn][Oo] | '') + [Nn][Oo]) ;; *) save_dev_random "${entropy_boot_file}" @@ -92,7 +92,7 @@ random_stop() # can be reseeded # case ${entropy_file:=/entropy} in - [Nn][Oo] | '') + [Nn][Oo]) ;; *) echo -n 'Writing entropy file:' @@ -124,7 +124,7 @@ random_stop() ;; esac case ${entropy_boot_file:=/boot/entropy} in - [Nn][Oo] | '') + [Nn][Oo]) ;; *) echo -n 'Writing early boot entropy file:' From owner-svn-src-all@freebsd.org Wed Jul 8 19:15:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 982999964EE; Wed, 8 Jul 2015 19:15:30 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 7B5AC14EB; Wed, 8 Jul 2015 19:15:30 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68JFUaF090615; Wed, 8 Jul 2015 19:15:30 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68JFToj090611; Wed, 8 Jul 2015 19:15:29 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201507081915.t68JFToj090611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Wed, 8 Jul 2015 19:15:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285289 - head/sys/crypto/aesni X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 19:15:30 -0000 Author: jmg Date: Wed Jul 8 19:15:29 2015 New Revision: 285289 URL: https://svnweb.freebsd.org/changeset/base/285289 Log: address an issue where consumers, like IPsec, can reuse the same session in multiple threads w/o locking.. There was a single fpu context shared per session, if multiple threads were using the session, and both migrated away, they could corrupt each other's fpu context... This patch adds a per cpu context and a lock to protect it... It also tries to better address unloading of the aesni module... The pause will be removed once the OpenCrypto Framework provides a better method for draining callers into _newsession... I first discovered the fpu context sharing issue w/ a flood ping over an IPsec tunnel between two bhyve machines... The patch in D3015 was used to verify that this fix does fix the issue... Reviewed by: gnn, kib (both earlier versions) Differential Revision: https://reviews.freebsd.org/D3016 Modified: head/sys/crypto/aesni/aesni.c head/sys/crypto/aesni/aesni.h Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Wed Jul 8 18:46:44 2015 (r285288) +++ head/sys/crypto/aesni/aesni.c Wed Jul 8 19:15:29 2015 (r285289) @@ -45,17 +45,35 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +static struct mtx_padalign *ctx_mtx; +static struct fpu_kern_ctx **ctx_fpu; + struct aesni_softc { + int dieing; int32_t cid; uint32_t sid; TAILQ_HEAD(aesni_sessions_head, aesni_session) sessions; struct rwlock lock; }; +#define AQUIRE_CTX(i, ctx) \ + do { \ + (i) = PCPU_GET(cpuid); \ + mtx_lock(&ctx_mtx[(i)]); \ + (ctx) = ctx_fpu[(i)]; \ + } while (0) +#define RELEASE_CTX(i, ctx) \ + do { \ + mtx_unlock(&ctx_mtx[(i)]); \ + (i) = -1; \ + (ctx) = NULL; \ + } while (0) + static int aesni_newsession(device_t, uint32_t *sidp, struct cryptoini *cri); static int aesni_freesession(device_t, uint64_t tid); static void aesni_freesession_locked(struct aesni_softc *sc, @@ -95,14 +113,36 @@ aesni_probe(device_t dev) return (0); } +static void +aensi_cleanctx(void) +{ + int i; + + /* XXX - no way to return driverid */ + CPU_FOREACH(i) { + if (ctx_fpu[i] != NULL) { + mtx_destroy(&ctx_mtx[i]); + fpu_kern_free_ctx(ctx_fpu[i]); + } + ctx_fpu[i] = NULL; + } + free(ctx_mtx, M_AESNI); + ctx_mtx = NULL; + free(ctx_fpu, M_AESNI); + ctx_fpu = NULL; +} + static int aesni_attach(device_t dev) { struct aesni_softc *sc; + int i; sc = device_get_softc(dev); + sc->dieing = 0; TAILQ_INIT(&sc->sessions); sc->sid = 1; + sc->cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE | CRYPTOCAP_F_SYNC); if (sc->cid < 0) { @@ -110,6 +150,16 @@ aesni_attach(device_t dev) return (ENOMEM); } + ctx_mtx = malloc(sizeof *ctx_mtx * (mp_maxid + 1), M_AESNI, + M_WAITOK|M_ZERO); + ctx_fpu = malloc(sizeof *ctx_fpu * (mp_maxid + 1), M_AESNI, + M_WAITOK|M_ZERO); + + CPU_FOREACH(i) { + ctx_fpu[i] = fpu_kern_alloc_ctx(0); + mtx_init(&ctx_mtx[i], "anifpumtx", NULL, MTX_DEF|MTX_NEW); + } + rw_init(&sc->lock, "aesni_lock"); crypto_register(sc->cid, CRYPTO_AES_CBC, 0, 0); crypto_register(sc->cid, CRYPTO_AES_ICM, 0, 0); @@ -128,6 +178,7 @@ aesni_detach(device_t dev) struct aesni_session *ses; sc = device_get_softc(dev); + rw_wlock(&sc->lock); TAILQ_FOREACH(ses, &sc->sessions, next) { if (ses->used) { @@ -137,14 +188,21 @@ aesni_detach(device_t dev) return (EBUSY); } } + sc->dieing = 1; while ((ses = TAILQ_FIRST(&sc->sessions)) != NULL) { TAILQ_REMOVE(&sc->sessions, ses, next); - fpu_kern_free_ctx(ses->fpu_ctx); free(ses, M_AESNI); } rw_wunlock(&sc->lock); - rw_destroy(&sc->lock); crypto_unregister_all(sc->cid); + + /* XXX - wait for anyone in _newsession to leave */ + pause("aniwait", 1); + + rw_destroy(&sc->lock); + + aensi_cleanctx(); + return (0); } @@ -162,6 +220,9 @@ aesni_newsession(device_t dev, uint32_t } sc = device_get_softc(dev); + if (sc->dieing) + return (EINVAL); + ses = NULL; encini = NULL; for (; cri != NULL; cri = cri->cri_next) { @@ -195,6 +256,10 @@ aesni_newsession(device_t dev, uint32_t } rw_wlock(&sc->lock); + if (sc->dieing) { + rw_wunlock(&sc->lock); + return (EINVAL); + } /* * Free sessions goes first, so if first session is used, we need to * allocate one. @@ -206,12 +271,6 @@ aesni_newsession(device_t dev, uint32_t rw_wunlock(&sc->lock); return (ENOMEM); } - ses->fpu_ctx = fpu_kern_alloc_ctx(FPU_KERN_NOWAIT); - if (ses->fpu_ctx == NULL) { - free(ses, M_AESNI); - rw_wunlock(&sc->lock); - return (ENOMEM); - } ses->id = sc->sid++; } else { TAILQ_REMOVE(&sc->sessions, ses, next); @@ -237,15 +296,14 @@ aesni_newsession(device_t dev, uint32_t static void aesni_freesession_locked(struct aesni_softc *sc, struct aesni_session *ses) { - struct fpu_kern_ctx *ctx; uint32_t sid; + rw_assert(&sc->lock, RA_WLOCKED); + sid = ses->id; TAILQ_REMOVE(&sc->sessions, ses, next); - ctx = ses->fpu_ctx; *ses = (struct aesni_session){}; ses->id = sid; - ses->fpu_ctx = ctx; TAILQ_INSERT_HEAD(&sc->sessions, ses, next); } @@ -429,17 +487,27 @@ MODULE_DEPEND(aesni, crypto, 1, 1, 1); static int aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini) { - struct thread *td; + struct fpu_kern_ctx *ctx; int error; + int kt, ctxidx; + + kt = is_fpu_kern_thread(0); + if (!kt) { + AQUIRE_CTX(ctxidx, ctx); + error = fpu_kern_enter(curthread, ctx, + FPU_KERN_NORMAL | FPU_KERN_KTHR); + if (error != 0) + goto out; + } - td = curthread; - error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL | - FPU_KERN_KTHR); - if (error != 0) - return (error); error = aesni_cipher_setup_common(ses, encini->cri_key, encini->cri_klen); - fpu_kern_leave(td, ses->fpu_ctx); + + if (!kt) { + fpu_kern_leave(curthread, ctx); +out: + RELEASE_CTX(ctxidx, ctx); + } return (error); } @@ -450,12 +518,13 @@ static int aesni_cipher_process(struct aesni_session *ses, struct cryptodesc *enccrd, struct cryptodesc *authcrd, struct cryptop *crp) { + struct fpu_kern_ctx *ctx; uint8_t iv[AES_BLOCK_LEN]; uint8_t tag[GMAC_DIGEST_LEN]; - struct thread *td; uint8_t *buf, *authbuf; int error, allocated, authallocated; int ivlen, encflag; + int kt, ctxidx; encflag = (enccrd->crd_flags & CRD_F_ENCRYPT) == CRD_F_ENCRYPT; @@ -478,11 +547,14 @@ aesni_cipher_process(struct aesni_sessio } } - td = curthread; - error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL | - FPU_KERN_KTHR); - if (error != 0) - goto out1; + kt = is_fpu_kern_thread(0); + if (!kt) { + AQUIRE_CTX(ctxidx, ctx); + error = fpu_kern_enter(curthread, ctx, + FPU_KERN_NORMAL|FPU_KERN_KTHR); + if (error != 0) + goto out2; + } if ((enccrd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) { error = aesni_cipher_setup_common(ses, enccrd->crd_key, @@ -578,7 +650,12 @@ aesni_cipher_process(struct aesni_sessio } out: - fpu_kern_leave(td, ses->fpu_ctx); + if (!kt) { + fpu_kern_leave(curthread, ctx); +out2: + RELEASE_CTX(ctxidx, ctx); + } + out1: if (allocated) { bzero(buf, enccrd->crd_len); Modified: head/sys/crypto/aesni/aesni.h ============================================================================== --- head/sys/crypto/aesni/aesni.h Wed Jul 8 18:46:44 2015 (r285288) +++ head/sys/crypto/aesni/aesni.h Wed Jul 8 19:15:29 2015 (r285289) @@ -64,7 +64,6 @@ struct aesni_session { int used; uint32_t id; TAILQ_ENTRY(aesni_session) next; - struct fpu_kern_ctx *fpu_ctx; }; /* From owner-svn-src-all@freebsd.org Wed Jul 8 19:26:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9448D9967BC; Wed, 8 Jul 2015 19:26:37 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 7DD30127E; Wed, 8 Jul 2015 19:26:37 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68JQbJG095649; Wed, 8 Jul 2015 19:26:37 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68JQai3095647; Wed, 8 Jul 2015 19:26:36 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201507081926.t68JQai3095647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Wed, 8 Jul 2015 19:26:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285290 - in head/sys: amd64/amd64 i386/isa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 19:26:37 -0000 Author: jmg Date: Wed Jul 8 19:26:36 2015 New Revision: 285290 URL: https://svnweb.freebsd.org/changeset/base/285290 Log: Now that aesni won't reuse fpu contexts (D3016), add seatbelts to the fpu code to prevent other reuse of the contexts in the future... Differential Revision: https://reviews.freebsd.org/D3015 Reviewed by: kib, gnn Modified: head/sys/amd64/amd64/fpu.c head/sys/i386/isa/npx.c Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Wed Jul 8 19:15:29 2015 (r285289) +++ head/sys/amd64/amd64/fpu.c Wed Jul 8 19:26:36 2015 (r285290) @@ -916,6 +916,7 @@ static MALLOC_DEFINE(M_FPUKERN_CTX, "fpu #define FPU_KERN_CTX_FPUINITDONE 0x01 #define FPU_KERN_CTX_DUMMY 0x02 /* avoided save for the kern thread */ +#define FPU_KERN_CTX_INUSE 0x04 struct fpu_kern_ctx { struct savefpu *prev; @@ -940,6 +941,7 @@ void fpu_kern_free_ctx(struct fpu_kern_ctx *ctx) { + KASSERT((ctx->flags & FPU_KERN_CTX_INUSE) == 0, ("free'ing inuse ctx")); /* XXXKIB clear the memory ? */ free(ctx, M_FPUKERN_CTX); } @@ -959,14 +961,16 @@ fpu_kern_enter(struct thread *td, struct { struct pcb *pcb; + KASSERT((ctx->flags & FPU_KERN_CTX_INUSE) == 0, ("using inuse ctx")); + if ((flags & FPU_KERN_KTHR) != 0 && is_fpu_kern_thread(0)) { - ctx->flags = FPU_KERN_CTX_DUMMY; + ctx->flags = FPU_KERN_CTX_DUMMY | FPU_KERN_CTX_INUSE; return (0); } pcb = td->td_pcb; KASSERT(!PCB_USER_FPU(pcb) || pcb->pcb_save == get_pcb_user_save_pcb(pcb), ("mangled pcb_save")); - ctx->flags = 0; + ctx->flags = FPU_KERN_CTX_INUSE; if ((pcb->pcb_flags & PCB_FPUINITDONE) != 0) ctx->flags |= FPU_KERN_CTX_FPUINITDONE; fpuexit(td); @@ -982,6 +986,10 @@ fpu_kern_leave(struct thread *td, struct { struct pcb *pcb; + KASSERT((ctx->flags & FPU_KERN_CTX_INUSE) != 0, + ("leaving not inuse ctx")); + ctx->flags &= ~FPU_KERN_CTX_INUSE; + if (is_fpu_kern_thread(0) && (ctx->flags & FPU_KERN_CTX_DUMMY) != 0) return (0); KASSERT((ctx->flags & FPU_KERN_CTX_DUMMY) == 0, ("dummy ctx")); Modified: head/sys/i386/isa/npx.c ============================================================================== --- head/sys/i386/isa/npx.c Wed Jul 8 19:15:29 2015 (r285289) +++ head/sys/i386/isa/npx.c Wed Jul 8 19:26:36 2015 (r285290) @@ -1359,6 +1359,7 @@ static MALLOC_DEFINE(M_FPUKERN_CTX, "fpu #define FPU_KERN_CTX_NPXINITDONE 0x01 #define FPU_KERN_CTX_DUMMY 0x02 +#define FPU_KERN_CTX_INUSE 0x04 struct fpu_kern_ctx { union savefpu *prev; @@ -1383,6 +1384,7 @@ void fpu_kern_free_ctx(struct fpu_kern_ctx *ctx) { + KASSERT((ctx->flags & FPU_KERN_CTX_INUSE) == 0, ("free'ing inuse ctx")); /* XXXKIB clear the memory ? */ free(ctx, M_FPUKERN_CTX); } @@ -1402,14 +1404,16 @@ fpu_kern_enter(struct thread *td, struct { struct pcb *pcb; + KASSERT((ctx->flags & FPU_KERN_CTX_INUSE) == 0, ("using inuse ctx")); + if ((flags & FPU_KERN_KTHR) != 0 && is_fpu_kern_thread(0)) { - ctx->flags = FPU_KERN_CTX_DUMMY; + ctx->flags = FPU_KERN_CTX_DUMMY | FPU_KERN_CTX_INUSE; return (0); } pcb = td->td_pcb; KASSERT(!PCB_USER_FPU(pcb) || pcb->pcb_save == get_pcb_user_save_pcb(pcb), ("mangled pcb_save")); - ctx->flags = 0; + ctx->flags = FPU_KERN_CTX_INUSE; if ((pcb->pcb_flags & PCB_NPXINITDONE) != 0) ctx->flags |= FPU_KERN_CTX_NPXINITDONE; npxexit(td); @@ -1425,6 +1429,10 @@ fpu_kern_leave(struct thread *td, struct { struct pcb *pcb; + KASSERT((ctx->flags & FPU_KERN_CTX_INUSE) != 0, + ("leaving not inuse ctx")); + ctx->flags &= ~FPU_KERN_CTX_INUSE; + if (is_fpu_kern_thread(0) && (ctx->flags & FPU_KERN_CTX_DUMMY) != 0) return (0); pcb = td->td_pcb; From owner-svn-src-all@freebsd.org Wed Jul 8 19:47:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBBB5996C4D; Wed, 8 Jul 2015 19:47:09 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BC3F818E1; Wed, 8 Jul 2015 19:47:09 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t68Jl88b030517 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Jul 2015 12:47:08 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t68Jl8Nu030516; Wed, 8 Jul 2015 12:47:08 -0700 (PDT) (envelope-from jmg) Date: Wed, 8 Jul 2015 12:47:08 -0700 From: John-Mark Gurney To: Zbigniew Bodek Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285270 - head/sys/sys Message-ID: <20150708194708.GQ8523@funkthat.com> References: <201507081353.t68Dr0up028388@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201507081353.t68Dr0up028388@repo.freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Wed, 08 Jul 2015 12:47:09 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 19:47:10 -0000 Zbigniew Bodek wrote this message on Wed, Jul 08, 2015 at 13:53 +0000: > +#if defined(__arm__) > + #define __BUS_DMAMAP_SYNC_DEFAULT mb(); > +#elif defined(__aarch64__) > + #define __BUS_DMAMAP_SYNC_DEFAULT dmb(sy); These shouldn't have ; after them... > +#else > + #define __BUS_DMAMAP_SYNC_DEFAULT {} The correct spelling of this should probably be: do { } while (0) > +#endif > #define bus_dmamap_sync(dmat, dmamap, op) \ > do { \ > if ((dmamap) != NULL) \ > _bus_dmamap_sync(dmat, dmamap, op); \ > + else \ > + __BUS_DMAMAP_SYNC_DEFAULT \ And then this can be properly written w/ a ; at the end... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@freebsd.org Wed Jul 8 20:39:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52D3F997461; Wed, 8 Jul 2015 20:39:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B2D9930EA; Wed, 8 Jul 2015 20:39:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA29526; Wed, 08 Jul 2015 23:39:02 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ZCw7S-0008QX-6p; Wed, 08 Jul 2015 23:39:02 +0300 Message-ID: <559D8A15.1060902@FreeBSD.org> Date: Wed, 08 Jul 2015 23:37:41 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Mark Murray , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r285288 - head/etc/rc.d References: <201507081846.t68IkjN0075548@repo.freebsd.org> In-Reply-To: <201507081846.t68IkjN0075548@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 20:39:07 -0000 On 08/07/2015 21:46, Mark Murray wrote: > Author: markm > Date: Wed Jul 8 18:46:44 2015 > New Revision: 285288 > URL: https://svnweb.freebsd.org/changeset/base/285288 > > Log: > Address review. This commit message sucks... > Differential Revision: https://reviews.freebsd.org/D2924 > -- Andriy Gapon From owner-svn-src-all@freebsd.org Wed Jul 8 20:40:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 932459974D3; Wed, 8 Jul 2015 20:40:04 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from gromit.grondar.org (grandfather.grondar.org [IPv6:2a01:348:0:15:5d59:5c20:0:2]) (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 599663352; Wed, 8 Jul 2015 20:40:04 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from graveyard.grondar.org ([88.96.155.33] helo=gronkulator.grondar.org) by gromit.grondar.org with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1ZCw8P-0005OG-PZ; Wed, 08 Jul 2015 21:40:01 +0100 Subject: Re: svn commit: r285288 - head/etc/rc.d Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Content-Type: text/plain; charset=us-ascii From: Mark R V Murray In-Reply-To: <559D8A15.1060902@FreeBSD.org> Date: Wed, 8 Jul 2015 21:39:55 +0100 Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Content-Transfer-Encoding: 7bit Message-Id: <4E58FEC1-7080-4712-8954-FEE31758332D@FreeBSD.org> References: <201507081846.t68IkjN0075548@repo.freebsd.org> <559D8A15.1060902@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.2102) X-SA-Score: -1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 20:40:04 -0000 Apologies! M > On 8 Jul 2015, at 21:37, Andriy Gapon wrote: > > On 08/07/2015 21:46, Mark Murray wrote: >> Author: markm >> Date: Wed Jul 8 18:46:44 2015 >> New Revision: 285288 >> URL: https://svnweb.freebsd.org/changeset/base/285288 >> >> Log: >> Address review. > > This commit message sucks... > >> Differential Revision: https://reviews.freebsd.org/D2924 >> > > -- > Andriy Gapon > -- Mark R V Murray From owner-svn-src-all@freebsd.org Wed Jul 8 21:06:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E172D997A3F; Wed, 8 Jul 2015 21:06:21 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 D044E1944; Wed, 8 Jul 2015 21:06:21 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68L6LKI046322; Wed, 8 Jul 2015 21:06:21 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68L6K4Q046317; Wed, 8 Jul 2015 21:06:20 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507082106.t68L6K4Q046317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 8 Jul 2015 21:06:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285291 - stable/10/usr.bin/calendar X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 21:06:22 -0000 Author: bapt Date: Wed Jul 8 21:06:19 2015 New Revision: 285291 URL: https://svnweb.freebsd.org/changeset/base/285291 Log: MFC: r279597 (and 259152,259219 as dependency) Make calendar(1) usable again. rework the calendar parser so that it is compatible with documented format: Support includes surrounded by '"' or '<' '>' Print warnings about bad syntax Correctly navigate through include directories to find calendar files Correctly support multiple includes While here: MFC: 262011 (by eadler) calendar(1): don't segfault in invalid input When the user supplies an invalid number of days provide a useful error message instead of segfaulting. Approved by: re (gjb) Deleted: stable/10/usr.bin/calendar/calcpp.c Modified: stable/10/usr.bin/calendar/Makefile stable/10/usr.bin/calendar/calendar.c stable/10/usr.bin/calendar/calendar.h stable/10/usr.bin/calendar/io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/calendar/Makefile ============================================================================== --- stable/10/usr.bin/calendar/Makefile Wed Jul 8 19:26:36 2015 (r285290) +++ stable/10/usr.bin/calendar/Makefile Wed Jul 8 21:06:19 2015 (r285291) @@ -5,7 +5,7 @@ PROG= calendar SRCS= calendar.c locale.c events.c dates.c parsedata.c io.c day.c \ - ostern.c paskha.c pom.c sunpos.c calcpp.c + ostern.c paskha.c pom.c sunpos.c DPADD= ${LIBM} LDADD= -lm INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ Modified: stable/10/usr.bin/calendar/calendar.c ============================================================================== --- stable/10/usr.bin/calendar/calendar.c Wed Jul 8 19:26:36 2015 (r285290) +++ stable/10/usr.bin/calendar/calendar.c Wed Jul 8 21:06:19 2015 (r285291) @@ -96,10 +96,14 @@ main(int argc, char *argv[]) case 'A': /* days after current date */ f_dayAfter = atoi(optarg); + if (f_dayAfter < 0) + errx(1, "number of days must be positive"); break; case 'B': /* days before current date */ f_dayBefore = atoi(optarg); + if (f_dayBefore < 0) + errx(1, "number of days must be positive"); break; case 'D': /* debug output of sun and moon info */ Modified: stable/10/usr.bin/calendar/calendar.h ============================================================================== --- stable/10/usr.bin/calendar/calendar.h Wed Jul 8 19:26:36 2015 (r285290) +++ stable/10/usr.bin/calendar/calendar.h Wed Jul 8 21:06:19 2015 (r285291) @@ -168,10 +168,6 @@ void closecal(FILE *); FILE *opencalin(void); FILE *opencalout(void); -/* calcpp.c */ -void initcpp(void); -FILE *fincludegets(char *buf, int size, FILE *fp); - /* ostern.c / paskha.c */ int paskha(int); int easter(int); Modified: stable/10/usr.bin/calendar/io.c ============================================================================== --- stable/10/usr.bin/calendar/io.c Wed Jul 8 19:26:36 2015 (r285290) +++ stable/10/usr.bin/calendar/io.c Wed Jul 8 21:06:19 2015 (r285291) @@ -51,14 +51,23 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#define _WITH_GETLINE #include #include #include +#include #include #include "pathnames.h" #include "calendar.h" +enum { + T_OK = 0, + T_ERR, + T_PROCESS, +}; + const char *calendarFile = "calendar"; /* default calendar file */ static const char *calendarHomes[] = {".calendar", _PATH_INCLUDE}; /* HOME */ static const char *calendarNoMail = "nomail";/* don't sent mail if file exist */ @@ -68,6 +77,147 @@ static char path[MAXPATHLEN]; struct fixs neaster, npaskha, ncny, nfullmoon, nnewmoon; struct fixs nmarequinox, nsepequinox, njunsolstice, ndecsolstice; +static int cal_parse(FILE *in, FILE *out); + +static StringList *definitions = NULL; +static struct event *events[MAXCOUNT]; +static char *extradata[MAXCOUNT]; + +static void +trimlr(char **buf) +{ + char *walk = *buf; + + while (isspace(*walk)) + walk++; + while (isspace(walk[strlen(walk) -1])) + walk[strlen(walk) -1] = '\0'; + + *buf = walk; +} + +static FILE * +cal_fopen(const char *file) +{ + FILE *fp; + char *home = getenv("HOME"); + unsigned int i; + + if (home == NULL || *home == '\0') { + warnx("Cannot get home directory"); + return (NULL); + } + + if (chdir(home) != 0) { + warnx("Cannot enter home directory"); + return (NULL); + } + + for (i = 0; i < sizeof(calendarHomes)/sizeof(calendarHomes[0]) ; i++) { + if (chdir(calendarHomes[i]) != 0) + continue; + + if ((fp = fopen(file, "r")) != NULL) + return (fp); + } + + warnx("can't open calendar file \"%s\"", file); + + return (NULL); +} + +static int +token(char *line, FILE *out, bool *skip) +{ + char *walk, c, a; + + if (strncmp(line, "endif", 5) == 0) { + *skip = false; + return (T_OK); + } + + if (*skip) + return (T_OK); + + if (strncmp(line, "include", 7) == 0) { + walk = line + 7; + + trimlr(&walk); + + if (*walk == '\0') { + warnx("Expecting arguments after #include"); + return (T_ERR); + } + + if (*walk != '<' && *walk != '\"') { + warnx("Excecting '<' or '\"' after #include"); + return (T_ERR); + } + + a = *walk; + walk++; + c = walk[strlen(walk) - 1]; + + switch(c) { + case '>': + if (a != '<') { + warnx("Unterminated include expecting '\"'"); + return (T_ERR); + } + break; + case '\"': + if (a != '\"') { + warnx("Unterminated include expecting '>'"); + return (T_ERR); + } + break; + default: + warnx("Unterminated include expecting '%c'", + a == '<' ? '>' : '\"' ); + return (T_ERR); + } + walk[strlen(walk) - 1] = '\0'; + + if (cal_parse(cal_fopen(walk), out)) + return (T_ERR); + + return (T_OK); + } + + if (strncmp(line, "define", 6) == 0) { + if (definitions == NULL) + definitions = sl_init(); + walk = line + 6; + trimlr(&walk); + + if (*walk == '\0') { + warnx("Expecting arguments after #define"); + return (T_ERR); + } + + sl_add(definitions, strdup(walk)); + return (T_OK); + } + + if (strncmp(line, "ifndef", 6) == 0) { + walk = line + 6; + trimlr(&walk); + + if (*walk == '\0') { + warnx("Expecting arguments after #ifndef"); + return (T_ERR); + } + + if (definitions != NULL && sl_find(definitions, walk) != NULL) + *skip = true; + + return (T_OK); + } + + return (T_PROCESS); + +} + #define REPLACE(string, slen, struct_) \ if (strncasecmp(buf, (string), (slen)) == 0 && buf[(slen)]) { \ if (struct_.name != NULL) \ @@ -77,30 +227,25 @@ struct fixs nmarequinox, nsepequinox, nj struct_.len = strlen(buf + (slen)); \ continue; \ } -void -cal(void) +static int +cal_parse(FILE *in, FILE *out) { - char *pp, p; - FILE *fpin; - FILE *fpout; - int l; - int count, i; + char *line = NULL; + char *buf; + size_t linecap = 0; + ssize_t linelen; + ssize_t l; + static int d_first = -1; + static int count = 0; + int i; int month[MAXCOUNT]; int day[MAXCOUNT]; int year[MAXCOUNT]; - char **extradata; /* strings of 20 length */ - int flags; - static int d_first = -1; - char buf[2048 + 1]; - struct event *events[MAXCOUNT]; - struct tm tm; + bool skip = false; char dbuf[80]; - - initcpp(); - extradata = (char **)calloc(MAXCOUNT, sizeof(char *)); - for (i = 0; i < MAXCOUNT; i++) { - extradata[i] = (char *)calloc(1, 20); - } + char *pp, p; + struct tm tm; + int flags; /* Unused */ tm.tm_sec = 0; @@ -108,20 +253,32 @@ cal(void) tm.tm_hour = 0; tm.tm_wday = 0; - count = 0; - if ((fpin = opencalin()) == NULL) { - free(extradata); - return; - } - if ((fpout = opencalout()) == NULL) { - fclose(fpin); - free(extradata); - return; - } - while ((fpin = fincludegets(buf, sizeof(buf), fpin)) != NULL) { - if (*buf == '\0') + if (in == NULL) + return (1); + + while ((linelen = getline(&line, &linecap, in)) > 0) { + if (linelen == 0) + continue; + + if (*line == '#') { + switch (token(line+1, out, &skip)) { + case T_ERR: + free(line); + return (1); + case T_OK: + continue; + case T_PROCESS: + break; + default: + break; + } + } + + if (skip) continue; - for (l = strlen(buf); + + buf = line; + for (l = linelen; l > 0 && isspace((unsigned char)buf[l - 1]); l--) ; @@ -208,16 +365,41 @@ cal(void) } } + free(line); + fclose(in); + + return (0); +} + +void +cal(void) +{ + FILE *fpin; + FILE *fpout; + int i; + + for (i = 0; i < MAXCOUNT; i++) + extradata[i] = (char *)calloc(1, 20); + + + if ((fpin = opencalin()) == NULL) + return; + + if ((fpout = opencalout()) == NULL) { + fclose(fpin); + return; + } + + if (cal_parse(fpin, fpout)) + return; + event_print_all(fpout); closecal(fpout); - free(extradata); } FILE * opencalin(void) { - size_t i; - int found; struct stat sbuf; FILE *fpin; @@ -231,22 +413,7 @@ opencalin(void) if ((fpin = fopen(calendarFile, "r")) == NULL) return (NULL); } else { - char *home = getenv("HOME"); - if (home == NULL || *home == '\0') - errx(1, "cannot get home directory"); - if (chdir(home) != 0) - errx(1, "cannot enter home directory"); - for (found = i = 0; i < sizeof(calendarHomes) / - sizeof(calendarHomes[0]); i++) - if (chdir(calendarHomes[i]) == 0 && - (fpin = fopen(calendarFile, "r")) != NULL) { - found = 1; - break; - } - if (!found) - errx(1, - "can't open calendar file \"%s\": %s (%d)", - calendarFile, strerror(errno), errno); + fpin = cal_fopen(calendarFile); } } return (fpin); From owner-svn-src-all@freebsd.org Wed Jul 8 21:09:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8744A997A87 for ; Wed, 8 Jul 2015 21:09:10 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm17-vm1.bullet.mail.bf1.yahoo.com (nm17-vm1.bullet.mail.bf1.yahoo.com [98.139.213.55]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39C541ADE for ; Wed, 8 Jul 2015 21:09:10 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1436389742; bh=D7CiobeubChONepb94NyQWrANyDj6gtp08hbHp0pXUA=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=ibsruXRx4hbcIY37S94PdnZSYI7lT0tHusDQr+pS6Vp4psgzRSH52YpT7U+3yLgs2GfIYd8hCZqCNrWKmDElZbAtv6ceZspsZrO2u2Y2Xtn4qbDoSMhgNBR4m7AsDHRpx8oTAaKr+Ak7W2jvPoevTZCXVerSdPfSCwwgXkOAFgdiOJDhB6axd58smWVnI6Sfb/iByaPPVkpsYusrPfGojbIqQvMm48v2qrPHVY/Sy+t5jVYPADVRn1UvOk5xsa5jSS8Y/iP4hNg5sRIMmTUnZEhp9BxJ/8720ZKTJ6hqNst+zPX2d67OYqx96yOc+MAuFszr1DYchl7OtcGC1vSGlw== Received: from [98.139.214.32] by nm17.bullet.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 21:09:02 -0000 Received: from [98.139.213.9] by tm15.bullet.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 21:09:02 -0000 Received: from [127.0.0.1] by smtp109.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 21:09:02 -0000 X-Yahoo-Newman-Id: 680688.52114.bm@smtp109.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: cqVveDEVM1kEOkfhcoih6PZjnvSJyCxaFZAvy25ALxp6LP_ nzEkE9rQs6FnoEoa0bhvQSNpg2dE3oE4F8whH1w51NAV_7XaNE1QqmLAkXCj C4D5bepEptkJUDAJiFBZAAbirtLWRlvhEtdmwvjtzlEcyvgbtwjJ5uRlMfA1 Xe2JfrRXs7G5gNvglrjFkPU1bD86AXyF83WIqzI8F05_udwc3pMG_kqUATGh GzQHhtq9ePD5qIiZr5nt.TWBgYjCAELwCFfivt7rFSS_zVgl2.FjMJvMaujX kQ9YsHEAF2nELRNRCfS8LzOlgIL7fx_utEcTUuZImLenYMrxfKwsT7r8qfNd 5d8TG2.DpcexZ6gBsNLeEb22h0jZeLJPH9tZKSkE.WbJYsYzeGeI10hGRvku z6P6Bvk3MDW_lDjdwXl_ZkH1VyHlAGUVx3QFLv3wbuvxtOde_NlAycXR3vnA eYRO4JmUuoMSfl6ZSWOmIP_7osd340byJ3YStn65xN.f0PAZt95VjY5mk.FL _myxJlmqAL03cxGNyarVE8.qSq5qaeS9H X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <559D9172.9040305@FreeBSD.org> Date: Wed, 08 Jul 2015 16:09:06 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285284 - head/lib/liblzma References: <201507081836.t68IacJu069563@repo.freebsd.org> In-Reply-To: <201507081836.t68IacJu069563@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 21:09:10 -0000 On 07/08/15 13:36, Luigi Rizzo wrote: > Author: luigi > Date: Wed Jul 8 18:36:37 2015 > New Revision: 285284 > URL: https://svnweb.freebsd.org/changeset/base/285284 > > Log: > only enable immintrin when clang is used. The base gcc does not support it. > > Reviewed by: delphij > > Modified: > head/lib/liblzma/config.h > > Modified: head/lib/liblzma/config.h > ============================================================================== > --- head/lib/liblzma/config.h Wed Jul 8 18:12:24 2015 (r285283) > +++ head/lib/liblzma/config.h Wed Jul 8 18:36:37 2015 (r285284) > @@ -150,7 +150,8 @@ > #define HAVE_ICONV 1 > > /* Define to 1 if you have the header file. */ > -#if defined(__FreeBSD__) && defined(__amd64__) > +/* FreeBSD - only with clang because the base gcc does not support it */ > +#if defined(__clang__) && defined(__FreeBSD__) && defined(__amd64__) > #define HAVE_IMMINTRIN_H 1 > #endif > > FWIW, gcc 4.3+ does have it so this may some undesired (but hidden) effect when building with an external gcc. Pedro. From owner-svn-src-all@freebsd.org Wed Jul 8 21:32:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D89C3997E46; Wed, 8 Jul 2015 21:32:58 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 C21BC1A17; Wed, 8 Jul 2015 21:32:58 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68LWwcO060951; Wed, 8 Jul 2015 21:32:58 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68LWwhs060950; Wed, 8 Jul 2015 21:32:58 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201507082132.t68LWwhs060950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Wed, 8 Jul 2015 21:32:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r285292 - vendor/tcpdump/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 21:32:58 -0000 Author: pkelsey Date: Wed Jul 8 21:32:57 2015 New Revision: 285292 URL: https://svnweb.freebsd.org/changeset/base/285292 Log: Merge upstream fix to eliminate build-breaking gcc warnings of no importance. commit: cab33b7a0acba7d2268a23c4383be6167106e549 Update ND_TTEST2 to fix issue 443 Add IS_NOT_NEGATIVE macro. Avoid these warnings: - comparison of unsigned expression >= 0 is always true [-Wtype-limits], - comparison is always true due to limited range of data type [-Wtype-limits]. Approved by: jmallett (mentor) Modified: vendor/tcpdump/dist/netdissect.h Modified: vendor/tcpdump/dist/netdissect.h ============================================================================== --- vendor/tcpdump/dist/netdissect.h Wed Jul 8 21:06:19 2015 (r285291) +++ vendor/tcpdump/dist/netdissect.h Wed Jul 8 21:32:57 2015 (r285292) @@ -270,8 +270,11 @@ struct netdissect_options { * * http://www.kb.cert.org/vuls/id/162289 */ + +#define IS_NOT_NEGATIVE(x) (((x) > 0) || ((x) == 0)) + #define ND_TTEST2(var, l) \ - ((l) >= 0 && \ + (IS_NOT_NEGATIVE(l) && \ ((uintptr_t)ndo->ndo_snapend - (l) <= (uintptr_t)ndo->ndo_snapend && \ (uintptr_t)&(var) <= (uintptr_t)ndo->ndo_snapend - (l))) From owner-svn-src-all@freebsd.org Wed Jul 8 22:04:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 340059964C5; Wed, 8 Jul 2015 22:04:39 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com [IPv6:2607:f8b0:4001:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0001D1EE4; Wed, 8 Jul 2015 22:04:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igrv9 with SMTP id v9so178906633igr.1; Wed, 08 Jul 2015 15:04:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HeYWx4jhzc6hjwutBGfDygJxcKovOZY5A0gzKLymSF4=; b=VlLGWuVBIAEO2NRCzEkqBNP+FupzDp0b9310EJEIsx5LLph+r/gXAS/PlyuTDyyv+f i9EXpgUQZ/3VLHsWVAlQ1aevnM1LwqCONo+Ue/F8kaMJrANh6qTdYfrIrxl+qUN9DorT PYUXYDolJmBR4sSUYKiaI0ThHpa5hvwI8omdii/8fnTc47m/KZDS6TE4dz4/m8lBIDbO 2sxobr+e7hTNfW0f+fC23Em/ArOJlrxUNzFCGRS2i2V9Ywx3ad3Emi63gFrLvUaEQVNJ Xe2jw+aO8Zy0aFbvSjXjltxcVnKuZyXKXjwYLp9u11/ymgPbFY8EY5gwTZ8WyiDKILxL vkWw== MIME-Version: 1.0 X-Received: by 10.107.155.74 with SMTP id d71mr20918496ioe.29.1436393078300; Wed, 08 Jul 2015 15:04:38 -0700 (PDT) Received: by 10.36.38.133 with HTTP; Wed, 8 Jul 2015 15:04:38 -0700 (PDT) In-Reply-To: <559D9172.9040305@FreeBSD.org> References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> Date: Wed, 8 Jul 2015 15:04:38 -0700 Message-ID: Subject: Re: svn commit: r285284 - head/lib/liblzma From: Adrian Chadd To: Pedro Giffuni Cc: Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:04:39 -0000 Is there a blessed way to see whether the compiler we're using is an external compiler, or an internal one? eg, the version check isn't enough - it's just a number. how do I know if it's freebsd clang versus upstream clang? (Or in my instance, freebsd-gcc versus upstream-gcc.) -a On 8 July 2015 at 14:09, Pedro Giffuni wrote: > > > On 07/08/15 13:36, Luigi Rizzo wrote: >> >> Author: luigi >> Date: Wed Jul 8 18:36:37 2015 >> New Revision: 285284 >> URL: https://svnweb.freebsd.org/changeset/base/285284 >> >> Log: >> only enable immintrin when clang is used. The base gcc does not support >> it. >> Reviewed by: delphij >> >> Modified: >> head/lib/liblzma/config.h >> >> Modified: head/lib/liblzma/config.h >> >> ============================================================================== >> --- head/lib/liblzma/config.h Wed Jul 8 18:12:24 2015 (r285283) >> +++ head/lib/liblzma/config.h Wed Jul 8 18:36:37 2015 (r285284) >> @@ -150,7 +150,8 @@ >> #define HAVE_ICONV 1 >> /* Define to 1 if you have the header file. */ >> -#if defined(__FreeBSD__) && defined(__amd64__) >> +/* FreeBSD - only with clang because the base gcc does not support it */ >> +#if defined(__clang__) && defined(__FreeBSD__) && defined(__amd64__) >> #define HAVE_IMMINTRIN_H 1 >> #endif >> > > FWIW, gcc 4.3+ does have it so this may some undesired (but hidden) > effect when building with an external gcc. > > Pedro. > From owner-svn-src-all@freebsd.org Wed Jul 8 22:09:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D9FE9965ED; Wed, 8 Jul 2015 22:09:48 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 5E2403312; Wed, 8 Jul 2015 22:09:48 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68M9mkl077631; Wed, 8 Jul 2015 22:09:48 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68M9mIi077630; Wed, 8 Jul 2015 22:09:48 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201507082209.t68M9mIi077630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Wed, 8 Jul 2015 22:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285293 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:09:48 -0000 Author: zbb Date: Wed Jul 8 22:09:47 2015 New Revision: 285293 URL: https://svnweb.freebsd.org/changeset/base/285293 Log: Style cleanups after r285270 There should be no semicolons in added macro definitions. Define empty macro as "do {} while (0)". Pointed out by: jmg Modified: head/sys/sys/bus_dma.h Modified: head/sys/sys/bus_dma.h ============================================================================== --- head/sys/sys/bus_dma.h Wed Jul 8 21:32:57 2015 (r285292) +++ head/sys/sys/bus_dma.h Wed Jul 8 22:09:47 2015 (r285293) @@ -289,18 +289,18 @@ void bus_dmamem_free(bus_dma_tag_t dmat, */ void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t); #if defined(__arm__) - #define __BUS_DMAMAP_SYNC_DEFAULT mb(); + #define __BUS_DMAMAP_SYNC_DEFAULT mb() #elif defined(__aarch64__) - #define __BUS_DMAMAP_SYNC_DEFAULT dmb(sy); + #define __BUS_DMAMAP_SYNC_DEFAULT dmb(sy) #else - #define __BUS_DMAMAP_SYNC_DEFAULT {} + #define __BUS_DMAMAP_SYNC_DEFAULT do {} while (0) #endif #define bus_dmamap_sync(dmat, dmamap, op) \ do { \ if ((dmamap) != NULL) \ _bus_dmamap_sync(dmat, dmamap, op); \ else \ - __BUS_DMAMAP_SYNC_DEFAULT \ + __BUS_DMAMAP_SYNC_DEFAULT; \ } while (0) /* From owner-svn-src-all@freebsd.org Wed Jul 8 22:12:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9EF0996720; Wed, 8 Jul 2015 22:12:06 +0000 (UTC) (envelope-from zbodek@gmail.com) Received: from mail-la0-x236.google.com (mail-la0-x236.google.com [IPv6:2a00:1450:4010:c03::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3015D364D; Wed, 8 Jul 2015 22:12:06 +0000 (UTC) (envelope-from zbodek@gmail.com) Received: by lagx9 with SMTP id x9so234502313lag.1; Wed, 08 Jul 2015 15:12:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=mJr9buF2G0G46+Kx3zciUZ0zszKnpBEafMX0ARwkZpI=; b=z7k3uGbkEAEfgJ7VF+DW+Uo/YpNFHGEdPVE0pnwVqe/oiPh/c5fhsuWoQrBnpy/TW4 Npxbm0EtWUFIn7I9V/YdkdnOn2jtnvHy36WjZTNSD41Enrgx/VNLxLkZtFES+1f0qDa5 BlsByov73thinbRtrlFmjZKhLzpuceJbhPAogrL+IxAzKwGEjs85tDyxwvM2Yl//3cUU cRGrvhq++3rU1RPrn2LtycJ/mrzgMjoeXTLGBxak5VSk3dW/by3pKw3y1ByQToLfiWhS kek8YhwMOS6txRw1dPZ3Lp6F76fQOoTkY2ZrIyGIq/gjnHT99I1sr3miCeOV/qT6n2lX O98w== X-Received: by 10.112.201.199 with SMTP id kc7mr11733586lbc.25.1436393524314; Wed, 08 Jul 2015 15:12:04 -0700 (PDT) MIME-Version: 1.0 Sender: zbodek@gmail.com Received: by 10.112.55.42 with HTTP; Wed, 8 Jul 2015 15:11:44 -0700 (PDT) In-Reply-To: <20150708194708.GQ8523@funkthat.com> References: <201507081353.t68Dr0up028388@repo.freebsd.org> <20150708194708.GQ8523@funkthat.com> From: Zbigniew Bodek Date: Thu, 9 Jul 2015 00:11:44 +0200 X-Google-Sender-Auth: Z1uBzh4oLqFcX8JLKXTQy8xADHo Message-ID: Subject: Re: svn commit: r285270 - head/sys/sys To: John-Mark Gurney Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:12:06 -0000 Hello, You are absolutely right. Especially semicolons... I must have missed this somehow. Thanks. Fixed in r285293. Best regards zbb 2015-07-08 21:47 GMT+02:00 John-Mark Gurney : > Zbigniew Bodek wrote this message on Wed, Jul 08, 2015 at 13:53 +0000: >> +#if defined(__arm__) >> + #define __BUS_DMAMAP_SYNC_DEFAULT mb(); >> +#elif defined(__aarch64__) >> + #define __BUS_DMAMAP_SYNC_DEFAULT dmb(sy); > > These shouldn't have ; after them... > >> +#else >> + #define __BUS_DMAMAP_SYNC_DEFAULT {} > > The correct spelling of this should probably be: > do { } while (0) > >> +#endif >> #define bus_dmamap_sync(dmat, dmamap, op) \ >> do { \ >> if ((dmamap) != NULL) \ >> _bus_dmamap_sync(dmat, dmamap, op); \ >> + else \ >> + __BUS_DMAMAP_SYNC_DEFAULT \ > > And then this can be properly written w/ a ; at the end... > > -- > John-Mark Gurney Voice: +1 415 225 5579 > > "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@freebsd.org Wed Jul 8 22:18:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0FE6996784; Wed, 8 Jul 2015 22:18:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EB3F3801; Wed, 8 Jul 2015 22:18:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::f8cf:5020:3455:425f] (unknown [IPv6:2001:7b8:3a7:0:f8cf:5020:3455:425f]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id F00162F493; Thu, 9 Jul 2015 00:18:27 +0200 (CEST) Subject: Re: svn commit: r285284 - head/lib/liblzma Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Content-Type: multipart/signed; boundary="Apple-Mail=_286F7370-89E1-4A22-8537-3AC60F4CE59F"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5 (4db5779) From: Dimitry Andric In-Reply-To: Date: Thu, 9 Jul 2015 00:18:21 +0200 Cc: Pedro Giffuni , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> To: Adrian Chadd X-Mailer: Apple Mail (2.2102) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:18:31 -0000 --Apple-Mail=_286F7370-89E1-4A22-8537-3AC60F4CE59F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Check whether the path starts with /usr/bin, maybe? Normally, you would check for the existence of a random header in a configure script. But from within a C source file, it's not that easy. That said, immintrin.h is available for all usable versions of clang, and should be available in all versions of gcc >=3D 4.4 (at least, if I read gcc's commit history correctly). And gcc in base is definitely not 4.4. :-) -Dimitry > On 09 Jul 2015, at 00:04, Adrian Chadd wrote: >=20 > Is there a blessed way to see whether the compiler we're using is an > external compiler, or an internal one? >=20 > eg, the version check isn't enough - it's just a number. how do I know > if it's freebsd clang versus upstream clang? > (Or in my instance, freebsd-gcc versus upstream-gcc.) >=20 >=20 > -a >=20 >=20 > On 8 July 2015 at 14:09, Pedro Giffuni wrote: >>=20 >>=20 >> On 07/08/15 13:36, Luigi Rizzo wrote: >>>=20 >>> Author: luigi >>> Date: Wed Jul 8 18:36:37 2015 >>> New Revision: 285284 >>> URL: https://svnweb.freebsd.org/changeset/base/285284 >>>=20 >>> Log: >>> only enable immintrin when clang is used. The base gcc does not = support >>> it. >>> Reviewed by: delphij >>>=20 >>> Modified: >>> head/lib/liblzma/config.h >>>=20 >>> Modified: head/lib/liblzma/config.h >>>=20 >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/lib/liblzma/config.h Wed Jul 8 18:12:24 2015 = (r285283) >>> +++ head/lib/liblzma/config.h Wed Jul 8 18:36:37 2015 = (r285284) >>> @@ -150,7 +150,8 @@ >>> #define HAVE_ICONV 1 >>> /* Define to 1 if you have the header file. */ >>> -#if defined(__FreeBSD__) && defined(__amd64__) >>> +/* FreeBSD - only with clang because the base gcc does not support = it */ >>> +#if defined(__clang__) && defined(__FreeBSD__) && = defined(__amd64__) >>> #define HAVE_IMMINTRIN_H 1 >>> #endif >>>=20 >>=20 >> FWIW, gcc 4.3+ does have it so this may some undesired (but hidden) >> effect when building with an external gcc. >>=20 >> Pedro. >>=20 >=20 --Apple-Mail=_286F7370-89E1-4A22-8537-3AC60F4CE59F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.28 iEYEARECAAYFAlWdobMACgkQsF6jCi4glqMbUwCeMAmafMmHyWL7OAoGDtidLBpa CaIAnitMnvu7gJM2WECH0aqy0H32OwUd =+Sxq -----END PGP SIGNATURE----- --Apple-Mail=_286F7370-89E1-4A22-8537-3AC60F4CE59F-- From owner-svn-src-all@freebsd.org Wed Jul 8 22:21:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 372499968FC; Wed, 8 Jul 2015 22:21:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 2798A3C5D; Wed, 8 Jul 2015 22:21:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68MLQYg086454; Wed, 8 Jul 2015 22:21:26 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68MLQaF086453; Wed, 8 Jul 2015 22:21:26 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201507082221.t68MLQaF086453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 8 Jul 2015 22:21:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285294 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:21:26 -0000 Author: mjg Date: Wed Jul 8 22:21:25 2015 New Revision: 285294 URL: https://svnweb.freebsd.org/changeset/base/285294 Log: seq: use seq_consistent_nomb in seq_consistent Constify seqp argument for seq_consistent_nomb. No functional changes. Modified: head/sys/sys/seq.h Modified: head/sys/sys/seq.h ============================================================================== --- head/sys/sys/seq.h Wed Jul 8 22:09:47 2015 (r285293) +++ head/sys/sys/seq.h Wed Jul 8 22:21:25 2015 (r285294) @@ -111,18 +111,18 @@ seq_read(const seq_t *seqp) } static __inline seq_t -seq_consistent(const seq_t *seqp, seq_t oldseq) +seq_consistent_nomb(const seq_t *seqp, seq_t oldseq) { - atomic_thread_fence_acq(); return (*seqp == oldseq); } static __inline seq_t -seq_consistent_nomb(seq_t *seqp, seq_t oldseq) +seq_consistent(const seq_t *seqp, seq_t oldseq) { - return (*seqp == oldseq); + atomic_thread_fence_acq(); + return (seq_consistent_nomb(seqp, oldseq)); } #endif /* _KERNEL */ From owner-svn-src-all@freebsd.org Wed Jul 8 22:24:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74F79996954; Wed, 8 Jul 2015 22:24:56 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 65326102C; Wed, 8 Jul 2015 22:24:56 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68MOuIE087649; Wed, 8 Jul 2015 22:24:56 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68MOuxP087648; Wed, 8 Jul 2015 22:24:56 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507082224.t68MOuxP087648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 8 Jul 2015 22:24:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285295 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:24:56 -0000 Author: bapt Date: Wed Jul 8 22:24:55 2015 New Revision: 285295 URL: https://svnweb.freebsd.org/changeset/base/285295 Log: Fix typo which breaks build of manpages when WITHOUT_MANCOMPRESS is set PR: 201153 Reported by: Andriy Voskoboinyk Modified: head/share/mk/bsd.man.mk Modified: head/share/mk/bsd.man.mk ============================================================================== --- head/share/mk/bsd.man.mk Wed Jul 8 22:21:25 2015 (r285294) +++ head/share/mk/bsd.man.mk Wed Jul 8 22:24:55 2015 (r285295) @@ -186,7 +186,7 @@ _maninstall: ${MAN} .endif .endfor .else -.for _page _sect ${.ALLSRC:C/\.([^.]*)$/.\1 \1/} +.for _page _sect in ${.ALLSRC:C/\.([^.]*)$/.\1 \1/} @d=${DESTDIR}${MANDIR}${_sect}${MANSUBDIR}; \ ${ECHO} ${MINSTALL} ${_page} $${d}; \ ${MINSTALL} $${page} $${d}; From owner-svn-src-all@freebsd.org Wed Jul 8 22:26:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D811996988 for ; Wed, 8 Jul 2015 22:26:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm9-vm0.bullet.mail.bf1.yahoo.com (nm9-vm0.bullet.mail.bf1.yahoo.com [98.139.213.154]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE7ED11BA for ; Wed, 8 Jul 2015 22:26:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1436394408; bh=QUaabOKjY69lYRrT2Yt67nGK+dirWC+ZwWhKm3bu4Ig=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=MLK878XZ/b6lViKzi1IVSSqanfDz79gp+RUxJ+n+xCmd+oD+Fq6E6jD/2OivjtbVRTdw05Y+YBkzzjLIZ2Hm9vdoY5JMBIiaQVLgkcDeUYTU5BgIYDWwnr59+uwwLhk/L4Q6I7QKWc3mILqH4SXQsj+JvafFFi78zyDKhJJVthbJ6MstD0y/zxGWmzR+2X87pVano37j33nNQjVIYv0jDbzx3GveFo3vPLxfDT5fn5zC5NmLroYU/SYVq3Ki9hCpoIqkRCG2+0n9kO6YF6TrJV2LvFyx4qHeWnLn8qLa5QArAFLxp86DVtGvmaSooBgwg3HL4wXpBXsxQTC8Dkya+w== Received: from [98.139.170.180] by nm9.bullet.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 22:26:48 -0000 Received: from [98.139.211.204] by tm23.bullet.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 22:26:48 -0000 Received: from [127.0.0.1] by smtp213.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 22:26:48 -0000 X-Yahoo-Newman-Id: 704.20136.bm@smtp213.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: QuBflpAVM1kc5P6MMpWsGmM0_I7LFMHQ.TDBnrQdBlTiRMR x7z7Tpvo.8_fHBWOhPO4Wfd5Fz3JWxdf0hWgNaGJj2It_lAz8vxERMDX9Ig3 a9OClsftiHPQ8wdh1zDdyyLcSJY0kxb4.YaYmorpqrw1QHSf2d3Ss18bcCR4 bluMMoHByOxCjqn20NPGYg9H2bRa3c7c3gsTWxr6JQih7S82Sk0E9QASpwzW 7elJf7j3be4eNLy2b1mZSwz.QSgP17zC6vGmg9flvwjCHo2hbPBu41z36aNO qhBlnHED91iT20vkALVHrVA5bOEkB0gzbFtd3UnHbQqqnHkhiNH80rNexk68 zY0clWZbltCbvFaWLR6AfZZmL85wbK_TPc3q2ewS3y.e_pT4uhNGf1C3p6vI BpmfL0vtQ3Ss1.vEOO7lMZK.n1QuEg2VQnTN0yXOSuKkwjG.ePFloIf9Bk8U VqUuc_Xj6DRolRlpXNOZ3kwe.3TZSHIPI6pZWQL1qsNaG6DSd.MZes0R4F9O TMW69LXREWN.N2bfTT7zuMGewSMYuXygz X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <559DA3AB.8060802@FreeBSD.org> Date: Wed, 08 Jul 2015 17:26:51 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Dimitry Andric , Adrian Chadd CC: Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r285284 - head/lib/liblzma References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:26:56 -0000 On 07/08/15 17:18, Dimitry Andric wrote: > Check whether the path starts with /usr/bin, maybe? Normally, you would > check for the existence of a random header in a configure script. But > from within a C source file, it's not that easy. > > That said, immintrin.h is available for all usable versions of clang, > and should be available in all versions of gcc >= 4.4 (at least, if I > read gcc's commit history correctly). And gcc in base is definitely not > 4.4. :-) Ahh yes, it's probably gcc 4.4 (I stopped following their changes long ago). Our internal gcc carries a couple of headers that were introduced in gcc 4.3 before the license change. Pedro. > -Dimitry > >> On 09 Jul 2015, at 00:04, Adrian Chadd wrote: >> >> Is there a blessed way to see whether the compiler we're using is an >> external compiler, or an internal one? >> >> eg, the version check isn't enough - it's just a number. how do I know >> if it's freebsd clang versus upstream clang? >> (Or in my instance, freebsd-gcc versus upstream-gcc.) >> >> >> -a >> >> >> On 8 July 2015 at 14:09, Pedro Giffuni wrote: >>> >>> On 07/08/15 13:36, Luigi Rizzo wrote: >>>> Author: luigi >>>> Date: Wed Jul 8 18:36:37 2015 >>>> New Revision: 285284 >>>> URL: https://svnweb.freebsd.org/changeset/base/285284 >>>> >>>> Log: >>>> only enable immintrin when clang is used. The base gcc does not support >>>> it. >>>> Reviewed by: delphij >>>> >>>> Modified: >>>> head/lib/liblzma/config.h >>>> >>>> Modified: head/lib/liblzma/config.h >>>> >>>> ============================================================================== >>>> --- head/lib/liblzma/config.h Wed Jul 8 18:12:24 2015 (r285283) >>>> +++ head/lib/liblzma/config.h Wed Jul 8 18:36:37 2015 (r285284) >>>> @@ -150,7 +150,8 @@ >>>> #define HAVE_ICONV 1 >>>> /* Define to 1 if you have the header file. */ >>>> -#if defined(__FreeBSD__) && defined(__amd64__) >>>> +/* FreeBSD - only with clang because the base gcc does not support it */ >>>> +#if defined(__clang__) && defined(__FreeBSD__) && defined(__amd64__) >>>> #define HAVE_IMMINTRIN_H 1 >>>> #endif >>>> >>> FWIW, gcc 4.3+ does have it so this may some undesired (but hidden) >>> effect when building with an external gcc. >>> >>> Pedro. >>> From owner-svn-src-all@freebsd.org Wed Jul 8 22:28:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E99DE9969F4; Wed, 8 Jul 2015 22:28:17 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com [IPv6:2607:f8b0:4001:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDED415AE; Wed, 8 Jul 2015 22:28:17 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igau2 with SMTP id u2so75336006iga.0; Wed, 08 Jul 2015 15:28:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FBh2qqWmIog4B5pvWlVTwjcdidJczTnKKjEXuyrPzCI=; b=XuVPgVk3NG4jo1NCoesDdfp7rgJbTbvZkpdBMh4iY7PV3fIjPwseSAnoOtIqZjFg2I 28wuCLHTTfn5VSWBPgcxNlZi/KPpXnlu9ZTheJqQD7rjwbTjuUHZBYt3XeMg+ky0PM9Q 5B/8qblNWvKdy5rukM1efV57MAiWaP1loPcMSe1ykOm9l5CsrKWSgVCX4MvAaraXGxhj upTin3g6r1+6APSeLI9FBbGPg8YM18APssltKgFNI0hFeWD8ofOTuiL6xS4FDnmAk9oB lBl2GxTKoMvqOpmZ6/dLiIOcscJJ9HyM1Xvp7ENpHSUbv8JhyjYb/U64kBhg6PTXdq6P enkw== MIME-Version: 1.0 X-Received: by 10.50.171.232 with SMTP id ax8mr23518000igc.32.1436394497235; Wed, 08 Jul 2015 15:28:17 -0700 (PDT) Received: by 10.36.38.133 with HTTP; Wed, 8 Jul 2015 15:28:17 -0700 (PDT) In-Reply-To: <559DA2AE.2090202@FreeBSD.org> References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> <559DA2AE.2090202@FreeBSD.org> Date: Wed, 8 Jul 2015 15:28:17 -0700 Message-ID: Subject: Re: svn commit: r285284 - head/lib/liblzma From: Adrian Chadd To: Pedro Giffuni Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:28:18 -0000 hi, ok. would it be possible to add a blessed way to say "this is the freebsd modified compiler in-tree" ? I'd like to see / play around with more external-toolchain driven building and using it for port bringups. Thanks, -adrian On 8 July 2015 at 15:22, Pedro Giffuni wrote: > > > On 07/08/15 17:04, Adrian Chadd wrote: >> >> Is there a blessed way to see whether the compiler we're using is an >> external compiler, or an internal one? > > > No blessed way: you still have to determine the version of > the external compiler for most purposes anyways. > The internal compiler (even clang) always reports itself > as gcc 4.2. > >> eg, the version check isn't enough - it's just a number. how do I know >> if it's freebsd clang versus upstream clang? >> (Or in my instance, freebsd-gcc versus upstream-gcc.) > > > If the compiler reports itself as gcc >= 4.3 it is surely an > external compiler. The tricky part is that our internal gcc > supports some gcc 4.3 flags and Apple extensions > (blocks), but those are not causing a problem AFAICT. > > Pedro. > > >> >> -a >> >> >> On 8 July 2015 at 14:09, Pedro Giffuni wrote: >>> >>> >>> On 07/08/15 13:36, Luigi Rizzo wrote: >>>> >>>> Author: luigi >>>> Date: Wed Jul 8 18:36:37 2015 >>>> New Revision: 285284 >>>> URL: https://svnweb.freebsd.org/changeset/base/285284 >>>> >>>> Log: >>>> only enable immintrin when clang is used. The base gcc does not >>>> support >>>> it. >>>> Reviewed by: delphij >>>> >>>> Modified: >>>> head/lib/liblzma/config.h >>>> >>>> Modified: head/lib/liblzma/config.h >>>> >>>> >>>> ============================================================================== >>>> --- head/lib/liblzma/config.h Wed Jul 8 18:12:24 2015 >>>> (r285283) >>>> +++ head/lib/liblzma/config.h Wed Jul 8 18:36:37 2015 >>>> (r285284) >>>> @@ -150,7 +150,8 @@ >>>> #define HAVE_ICONV 1 >>>> /* Define to 1 if you have the header file. */ >>>> -#if defined(__FreeBSD__) && defined(__amd64__) >>>> +/* FreeBSD - only with clang because the base gcc does not support it >>>> */ >>>> +#if defined(__clang__) && defined(__FreeBSD__) && defined(__amd64__) >>>> #define HAVE_IMMINTRIN_H 1 >>>> #endif >>>> >>> FWIW, gcc 4.3+ does have it so this may some undesired (but hidden) >>> effect when building with an external gcc. >>> >>> Pedro. >>> > From owner-svn-src-all@freebsd.org Wed Jul 8 22:28:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1316F996A41 for ; Wed, 8 Jul 2015 22:28:57 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm43-vm10.bullet.mail.bf1.yahoo.com (nm43-vm10.bullet.mail.bf1.yahoo.com [216.109.114.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B48C0189E for ; Wed, 8 Jul 2015 22:28:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1436394154; bh=drA0bI2Hae8LrIRRRBiNAusivhRIWAECrxpk+gh8nBg=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=tfoXUhacJT/FTKGehsbIMLPQ6HWsXquKNA2VzbxNBnDo3r9XK7J9LeJAeuHqEEK56ZIk2m6ve8y3Dvr9YHlF98wAkgMmMeCvORh3M9i9Y3/ku8WYlRtSQoj2JoFJAU8/GcmJlPwnPfl0xH/zJyCR/sLR9LyJN2II3Plw4wQ6r3tMakh+n3DWwOYEiECQEUlioXYNvLGvJVwnV8Kzh3wc4Oo6V2gXJqwVt35jvwiN5s0F+9hzewzrj+TujKwn3jNK+TxJ1LJH09we0PIjuu6z8LE53U3Gvhn1uReu7vgNoWxOBzL5hdJFT30h5ZIYcBXm9rq3gB94T1FSu9WWwxzJ6w== Received: from [98.139.215.141] by nm43.bullet.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 22:22:34 -0000 Received: from [98.139.211.194] by tm12.bullet.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 22:22:34 -0000 Received: from [127.0.0.1] by smtp203.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 22:22:34 -0000 X-Yahoo-Newman-Id: 566386.20309.bm@smtp203.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: H_UQFYEVM1nY3JfvmKpZgbqjDVaH0VBNFSqPmpb1vfOwKB_ l8dX.f3AUl1MhylXRIDgoQkHtb62YTVFkKEGq9O6Q9InoMymj9jV9qkGyzuN QDifKswvgW47PVQNn44nC5PXJQQQ7jOyTvwQ7v3VySMQ1kjCW79nSS0IAVQL KoS_85991P6JCjvhgav_Ts1X8pO3dRYBVOVsAlGorGVhXSLxZ6RojaEFMrS8 oyjEigNXdt3Q6aV9atiwcR274e2zEVxVOqNaI6Xd9ZErqyKOlLUJBAp2DkXk O.UQNk_.Tb_bC2vqWU59_DT.96kPVZKCj5CyzZtiR.I86wcki5.1uExcP1Kk Kzo9k3G7v6mtGgqS001uHmHnUedONgilQV85aBa06_2ZBo3.NnNSDH.gdVIq C_sI_pusEZlcnHGL2gCy.pxaKxaiF0h2NIg0SHFq7MwIfHkah97P9BNol6tO 8Ie3KxWL1BKMJQVlYeXzXpOdxKobZ6PE3UxYeapwL3mSk4lrWnLlnvM4A8dB 9iSap0A8DtSoTa70MWRV6C.7NBdcuK6UY X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <559DA2AE.2090202@FreeBSD.org> Date: Wed, 08 Jul 2015 17:22:38 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Adrian Chadd CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r285284 - head/lib/liblzma References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:28:57 -0000 On 07/08/15 17:04, Adrian Chadd wrote: > Is there a blessed way to see whether the compiler we're using is an > external compiler, or an internal one? No blessed way: you still have to determine the version of the external compiler for most purposes anyways. The internal compiler (even clang) always reports itself as gcc 4.2. > eg, the version check isn't enough - it's just a number. how do I know > if it's freebsd clang versus upstream clang? > (Or in my instance, freebsd-gcc versus upstream-gcc.) If the compiler reports itself as gcc >= 4.3 it is surely an external compiler. The tricky part is that our internal gcc supports some gcc 4.3 flags and Apple extensions (blocks), but those are not causing a problem AFAICT. Pedro. > > -a > > > On 8 July 2015 at 14:09, Pedro Giffuni wrote: >> >> On 07/08/15 13:36, Luigi Rizzo wrote: >>> Author: luigi >>> Date: Wed Jul 8 18:36:37 2015 >>> New Revision: 285284 >>> URL: https://svnweb.freebsd.org/changeset/base/285284 >>> >>> Log: >>> only enable immintrin when clang is used. The base gcc does not support >>> it. >>> Reviewed by: delphij >>> >>> Modified: >>> head/lib/liblzma/config.h >>> >>> Modified: head/lib/liblzma/config.h >>> >>> ============================================================================== >>> --- head/lib/liblzma/config.h Wed Jul 8 18:12:24 2015 (r285283) >>> +++ head/lib/liblzma/config.h Wed Jul 8 18:36:37 2015 (r285284) >>> @@ -150,7 +150,8 @@ >>> #define HAVE_ICONV 1 >>> /* Define to 1 if you have the header file. */ >>> -#if defined(__FreeBSD__) && defined(__amd64__) >>> +/* FreeBSD - only with clang because the base gcc does not support it */ >>> +#if defined(__clang__) && defined(__FreeBSD__) && defined(__amd64__) >>> #define HAVE_IMMINTRIN_H 1 >>> #endif >>> >> FWIW, gcc 4.3+ does have it so this may some undesired (but hidden) >> effect when building with an external gcc. >> >> Pedro. >> From owner-svn-src-all@freebsd.org Wed Jul 8 22:32:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A849996B5F for ; Wed, 8 Jul 2015 22:32:04 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A7081C0E for ; Wed, 8 Jul 2015 22:32:03 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by pdrg1 with SMTP id g1so21338356pdr.2 for ; Wed, 08 Jul 2015 15:32:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=lD7TGnlSMvdYL9FgLkpabXTGlRW1Iaok2bn1AY0E7gg=; b=fuWlePUSfX84FwNs/CJrIOpyk+9rjSe1uqfDJPMqpw/XgAjrIoxxUaKNeOMCwZtie+ GZee5tmrcSTkkDKnl+DvxylMhKvpKyQ3RTvXpvWlbqtRGLfeGzgukyvzRRmwLcp198To tdFy8LPpTYycmnHUNKLPyqlr4zOhidwjtmJlGIm2LSMU+TRZ2Rdlo/f52qekboJwVkCg WWYugkiHztpRNq9moT69RFfT5r/oq8FC+Z2mQZOC2lTQK5igyN7SqQuZlmWRAcY28oqR qYHFsdoHu3tYdCcg6NyLP2FMT2ApgoYykE1YkQvOOTSBtJ+pEPQf1SwAbm3gWGbo+vfA GisQ== X-Gm-Message-State: ALoCoQn7M5tsQPxhIsFVuqMT5cbHJD/HTyvzJob+A68jnJpKs2fPJM1IkmG5eeUEK2xx5HP7fduD X-Received: by 10.70.100.168 with SMTP id ez8mr24578812pdb.129.1436394722785; Wed, 08 Jul 2015 15:32:02 -0700 (PDT) Received: from [10.64.26.63] ([69.53.236.236]) by smtp.gmail.com with ESMTPSA id r4sm3623466pap.8.2015.07.08.15.32.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 08 Jul 2015 15:32:01 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r285284 - head/lib/liblzma Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Content-Type: multipart/signed; boundary="Apple-Mail=_3FF6BEFB-3861-411F-BB9F-D766CCE92F69"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5 From: Warner Losh In-Reply-To: Date: Wed, 8 Jul 2015 16:31:58 -0600 Cc: Pedro Giffuni , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <95059F59-AE24-42A3-A43B-5B08903B68E2@bsdimp.com> References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> To: Adrian Chadd X-Mailer: Apple Mail (2.2102) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:32:04 -0000 --Apple-Mail=_3FF6BEFB-3861-411F-BB9F-D766CCE92F69 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Not in this context, no. Nor should you want to in this context (inside = the compiling module). Generally in Makefiles it would be a bad idea too, but there=E2=80=99s = sometimes you need to know. But there=E2=80=99s currently not any such instances in the tree. Warner > On Jul 8, 2015, at 4:04 PM, Adrian Chadd = wrote: >=20 > Is there a blessed way to see whether the compiler we're using is an > external compiler, or an internal one? >=20 > eg, the version check isn't enough - it's just a number. how do I know > if it's freebsd clang versus upstream clang? > (Or in my instance, freebsd-gcc versus upstream-gcc.) >=20 >=20 > -a >=20 >=20 > On 8 July 2015 at 14:09, Pedro Giffuni wrote: >>=20 >>=20 >> On 07/08/15 13:36, Luigi Rizzo wrote: >>>=20 >>> Author: luigi >>> Date: Wed Jul 8 18:36:37 2015 >>> New Revision: 285284 >>> URL: https://svnweb.freebsd.org/changeset/base/285284 >>>=20 >>> Log: >>> only enable immintrin when clang is used. The base gcc does not = support >>> it. >>> Reviewed by: delphij >>>=20 >>> Modified: >>> head/lib/liblzma/config.h >>>=20 >>> Modified: head/lib/liblzma/config.h >>>=20 >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/lib/liblzma/config.h Wed Jul 8 18:12:24 2015 = (r285283) >>> +++ head/lib/liblzma/config.h Wed Jul 8 18:36:37 2015 = (r285284) >>> @@ -150,7 +150,8 @@ >>> #define HAVE_ICONV 1 >>> /* Define to 1 if you have the header file. */ >>> -#if defined(__FreeBSD__) && defined(__amd64__) >>> +/* FreeBSD - only with clang because the base gcc does not support = it */ >>> +#if defined(__clang__) && defined(__FreeBSD__) && = defined(__amd64__) >>> #define HAVE_IMMINTRIN_H 1 >>> #endif >>>=20 >>=20 >> FWIW, gcc 4.3+ does have it so this may some undesired (but hidden) >> effect when building with an external gcc. >>=20 >> Pedro. >>=20 >=20 --Apple-Mail=_3FF6BEFB-3861-411F-BB9F-D766CCE92F69 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVnaTeAAoJEGwc0Sh9sBEAL18QAJLSYP+nWC34q6dYxJ6Nh+r6 ziy1atDiTdKcQgf5ldqO+LSfmf2FP1+bzjpwtZEFtUbqwUCOL/3GK1WWmgTWlp3A 07BXlud3/9YeC4o71b86uUWerjGbHLqYWjBaMJTNsQqM3uYC4jYukcpTnGTKCAOv nRtc0HJr8iYgL5zT6MxjdLxm0eq5gNxMGPaZvc9xqQQsW8QQEFigxSaOo4ZzqoQl 3sSw4yzOOPQaFJ5ES8RSDki7NzBx2WwXaMy2RGeXXZ9P48M55RLdVzlFIAupYXgv 6vCCEWS8IX9OyZZE6T2B+8Hghawukc9qBbzt0IsIDDwEd1XYfJFy8sXnPdAX+2Wt J5ivNpM0SRL9fBa/627Iwz0bKa2BDqWbdAbMO0SAATVb1Rnx6jy3Bn5KB6AMdLlW liMlvqPC2yPzVD0czqIK/dSkT8DnzlFb5HpQSf6id1eqWS9EjdPDtwq309y+1hDS uFQ2ofAQcKF+aQwCoS6c2T0AmuVgZc4nbPbhU7v1Xr/fv4S5V14MfXluGAwjWFlW tfdwy/7oQZ5ZqScrmthiyYSSQU7Wx+fDsikCaDaa34v9v7SMk2SfcqNwglRoNlnN izUasKHbfuh39JE6zD0hBtveuL1uDYY3g8c8A17FCL1FJdcm6HvjD7VcAk3TuOiL CoW3ZGxTr+zzrLcCk67f =5JOb -----END PGP SIGNATURE----- --Apple-Mail=_3FF6BEFB-3861-411F-BB9F-D766CCE92F69-- From owner-svn-src-all@freebsd.org Wed Jul 8 22:37:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AFC3996C13; Wed, 8 Jul 2015 22:37:09 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com [IPv6:2607:f8b0:4001:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 246EF1DD5; Wed, 8 Jul 2015 22:37:09 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igrv9 with SMTP id v9so211043486igr.1; Wed, 08 Jul 2015 15:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/U2lfRXH5mwtUQ/9kJ5kg+cKGm86AT3KAuw1GqIVaGA=; b=rnSKS14YNJhWkrxT6yUXudqULwmQuuyj+UZ3VVUjTmFqkeByE5eZ82ATPvycPeuCxH Clx9GMyEJmbWGOsPZlXsdGFf0kcAotOd3QZTph28x0LrAd4IXWOj2qCGxtPp5Grdhhqa J0duxLwquMt3zbgzuei2rnqbKjyNptupkTYFJ0AWblQwRJT/1bYWqOKBCUs6H7fDlNk+ o3ydAblrs5NpseNf6nBESUQD49C5UHxdpVZZ3/Hhoxikz/bsO6zFlH8LZCVbz29pRzrz czfeiAMpp+Zex3UluAJVMbAnCv+0EZdmy+Ep83N+dq7vNa508gQdOACll0wIdwyGe8uy iWTA== MIME-Version: 1.0 X-Received: by 10.107.155.74 with SMTP id d71mr21100247ioe.29.1436395028695; Wed, 08 Jul 2015 15:37:08 -0700 (PDT) Received: by 10.36.38.133 with HTTP; Wed, 8 Jul 2015 15:37:08 -0700 (PDT) In-Reply-To: <1F6CFFCA-3901-4F18-AF30-EC621E5A4E06@bsdimp.com> References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> <559DA2AE.2090202@FreeBSD.org> <1F6CFFCA-3901-4F18-AF30-EC621E5A4E06@bsdimp.com> Date: Wed, 8 Jul 2015 15:37:08 -0700 Message-ID: Subject: Re: svn commit: r285284 - head/lib/liblzma From: Adrian Chadd To: Warner Losh Cc: Pedro Giffuni , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:37:09 -0000 On 8 July 2015 at 15:34, Warner Losh wrote: > I doubt it would ever be useful. > For gcc, just test for 4.2.1. > For clang, what specific feature do you need to test for? > > Do you have a specific use case in mind? > > This strikes me as a really bad idea absent some use case that has a real example behind it. Well, vendors have in the past shipped modified compilers for systems they're doing bring-up on. So if there are differences between the in-tree compiler for a given clang version and the vendor supplied modified one, I'd like to know. I know it's going to be a while until another CPU family with a not-yet-upstream compiler comes out.. -a > Warner > >> On Jul 8, 2015, at 4:28 PM, Adrian Chadd wrote: >> >> hi, >> >> ok. would it be possible to add a blessed way to say "this is the >> freebsd modified compiler in-tree" ? >> >> I'd like to see / play around with more external-toolchain driven >> building and using it for port bringups. >> >> Thanks, >> >> >> -adrian >> >> >> On 8 July 2015 at 15:22, Pedro Giffuni wrote: >>> >>> >>> On 07/08/15 17:04, Adrian Chadd wrote: >>>> >>>> Is there a blessed way to see whether the compiler we're using is an >>>> external compiler, or an internal one? >>> >>> >>> No blessed way: you still have to determine the version of >>> the external compiler for most purposes anyways. >>> The internal compiler (even clang) always reports itself >>> as gcc 4.2. >>> >>>> eg, the version check isn't enough - it's just a number. how do I know >>>> if it's freebsd clang versus upstream clang? >>>> (Or in my instance, freebsd-gcc versus upstream-gcc.) >>> >>> >>> If the compiler reports itself as gcc >= 4.3 it is surely an >>> external compiler. The tricky part is that our internal gcc >>> supports some gcc 4.3 flags and Apple extensions >>> (blocks), but those are not causing a problem AFAICT. >>> >>> Pedro. >>> >>> >>>> >>>> -a >>>> >>>> >>>> On 8 July 2015 at 14:09, Pedro Giffuni wrote: >>>>> >>>>> >>>>> On 07/08/15 13:36, Luigi Rizzo wrote: >>>>>> >>>>>> Author: luigi >>>>>> Date: Wed Jul 8 18:36:37 2015 >>>>>> New Revision: 285284 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/285284 >>>>>> >>>>>> Log: >>>>>> only enable immintrin when clang is used. The base gcc does not >>>>>> support >>>>>> it. >>>>>> Reviewed by: delphij >>>>>> >>>>>> Modified: >>>>>> head/lib/liblzma/config.h >>>>>> >>>>>> Modified: head/lib/liblzma/config.h >>>>>> >>>>>> >>>>>> ============================================================================== >>>>>> --- head/lib/liblzma/config.h Wed Jul 8 18:12:24 2015 >>>>>> (r285283) >>>>>> +++ head/lib/liblzma/config.h Wed Jul 8 18:36:37 2015 >>>>>> (r285284) >>>>>> @@ -150,7 +150,8 @@ >>>>>> #define HAVE_ICONV 1 >>>>>> /* Define to 1 if you have the header file. */ >>>>>> -#if defined(__FreeBSD__) && defined(__amd64__) >>>>>> +/* FreeBSD - only with clang because the base gcc does not support it >>>>>> */ >>>>>> +#if defined(__clang__) && defined(__FreeBSD__) && defined(__amd64__) >>>>>> #define HAVE_IMMINTRIN_H 1 >>>>>> #endif >>>>>> >>>>> FWIW, gcc 4.3+ does have it so this may some undesired (but hidden) >>>>> effect when building with an external gcc. >>>>> >>>>> Pedro. >>>>> >>> >> > From owner-svn-src-all@freebsd.org Wed Jul 8 22:42:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC33F996D55 for ; Wed, 8 Jul 2015 22:42:38 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm48.bullet.mail.bf1.yahoo.com (nm48.bullet.mail.bf1.yahoo.com [216.109.114.64]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9288A324B for ; Wed, 8 Jul 2015 22:42:38 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1436394987; bh=gfPMxlZk5ejJkLYHWRIEm/LS6XptS82V37EmWAbdxLo=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=Omuk1yrZ0OUb7QNTsedMCsJ4Xh/pSjwQo7ViB3KXyhX/QygKJgTHhGrpu5yN89MQ9eDakaXvvM4x1I0gOM+k00i3+x319lGkoDgRv7RFO2IbqZBikOSlQlMyJBT1ZBwnvXym5bCjDVm9G4a5TceSKSdguQfdKdr7hhK1hIEqoEoLwVMOiJI3sMtAWStC/MdeYeYY1dqUf77zeG6dRGS0eWVy/+/2XjBAuGTmS8DPE2pnG1pey+kwATSiScyoR537L5EtQPSG+geL1d5XALksZDG9vQqc/LFj6ENBSUFpkAnFBqvf2U1tHabS7i2yWado6pgLYJULtTL02Psnh+ZJnw== Received: from [98.139.215.143] by nm48.bullet.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 22:36:27 -0000 Received: from [98.139.211.202] by tm14.bullet.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 22:36:27 -0000 Received: from [127.0.0.1] by smtp211.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 22:36:27 -0000 X-Yahoo-Newman-Id: 249383.26147.bm@smtp211.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: DD8JYLUVM1lbPw3OFDwyd0DodlyfhUI7ptLzPoXgSx9pO_g j6hcJ88AyncTtzU_0wrkEjEl_XP6ZwaI5cqcaDEBykrgzM7ehG2FLcJn89Jm 7PkdI0WlmcKk2DftXAPOKFlitR5mDd5q1d6XFhj5_nqyz1zdbgXil0ej1i6W aXRTYyTdhqPl75UAS.YIdLaLr9eZhs2RC67XSARxAFJXgfpQPhUyDACgTaGz 5.6domnCwhWxim421JGljVk0lJQ.17HXo03uQ6T2yIKP2uu04Ja9vbCR6qx5 w.TeGi59fXq_xWA7DI4dB_eSBMBUjqafE8G43JPlWYkh6AMvx4hItKCcxZKA 6wkZnBcQNklG5XOY5qPnYSHEZ9_Bvzq7d_rVPtIJzbtL6tmgtb2tv6qsZtGs SfXdqrNLH2m_gZlS9mE7ohV2tVKa7cUaKQaaq_2bSV_vWnaPU.p9y4Q6aqVg r2Ge.NtUZjg_payXTqeanU7gNyiic_yPdLq3usIC5zRAUd1guUVQ8p.H5V.s iJFXeUPznUFhaBPlX_Q8WvpSAjbQOl7Mt X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <559DA5F0.4090302@FreeBSD.org> Date: Wed, 08 Jul 2015 17:36:32 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Adrian Chadd CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r285284 - head/lib/liblzma References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> <559DA2AE.2090202@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:42:39 -0000 On 07/08/15 17:28, Adrian Chadd wrote: > hi, > > ok. would it be possible to add a blessed way to say "this is the > freebsd modified compiler in-tree" ? Exactly why do you want this? We don't really have many differences with the vendor versions. Look at sys/sys/cdefs.h for examples on how we figure out which features or attributes are available. I have been exercising those in the libc headers extensively :). Pedro. > I'd like to see / play around with more external-toolchain driven > building and using it for port bringups. > > Thanks, > > > -adrian > > > On 8 July 2015 at 15:22, Pedro Giffuni wrote: >> >> On 07/08/15 17:04, Adrian Chadd wrote: >>> Is there a blessed way to see whether the compiler we're using is an >>> external compiler, or an internal one? >> >> No blessed way: you still have to determine the version of >> the external compiler for most purposes anyways. >> The internal compiler (even clang) always reports itself >> as gcc 4.2. >> >>> eg, the version check isn't enough - it's just a number. how do I know >>> if it's freebsd clang versus upstream clang? >>> (Or in my instance, freebsd-gcc versus upstream-gcc.) >> >> If the compiler reports itself as gcc >= 4.3 it is surely an >> external compiler. The tricky part is that our internal gcc >> supports some gcc 4.3 flags and Apple extensions >> (blocks), but those are not causing a problem AFAICT. >> >> Pedro. >> >> >>> -a >>> >>> >>> On 8 July 2015 at 14:09, Pedro Giffuni wrote: >>>> >>>> On 07/08/15 13:36, Luigi Rizzo wrote: >>>>> Author: luigi >>>>> Date: Wed Jul 8 18:36:37 2015 >>>>> New Revision: 285284 >>>>> URL: https://svnweb.freebsd.org/changeset/base/285284 >>>>> >>>>> Log: >>>>> only enable immintrin when clang is used. The base gcc does not >>>>> support >>>>> it. >>>>> Reviewed by: delphij >>>>> >>>>> Modified: >>>>> head/lib/liblzma/config.h >>>>> >>>>> Modified: head/lib/liblzma/config.h >>>>> >>>>> >>>>> ============================================================================== >>>>> --- head/lib/liblzma/config.h Wed Jul 8 18:12:24 2015 >>>>> (r285283) >>>>> +++ head/lib/liblzma/config.h Wed Jul 8 18:36:37 2015 >>>>> (r285284) >>>>> @@ -150,7 +150,8 @@ >>>>> #define HAVE_ICONV 1 >>>>> /* Define to 1 if you have the header file. */ >>>>> -#if defined(__FreeBSD__) && defined(__amd64__) >>>>> +/* FreeBSD - only with clang because the base gcc does not support it >>>>> */ >>>>> +#if defined(__clang__) && defined(__FreeBSD__) && defined(__amd64__) >>>>> #define HAVE_IMMINTRIN_H 1 >>>>> #endif >>>>> >>>> FWIW, gcc 4.3+ does have it so this may some undesired (but hidden) >>>> effect when building with an external gcc. >>>> >>>> Pedro. >>>> From owner-svn-src-all@freebsd.org Wed Jul 8 22:43:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E24C996DBB for ; Wed, 8 Jul 2015 22:43:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B353233FD for ; Wed, 8 Jul 2015 22:43:04 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by pddu5 with SMTP id u5so65649456pdd.3 for ; Wed, 08 Jul 2015 15:42:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=fROjGjClX+qYiSpOPWM7tdI3ExGrfpMAd+gDE5gJ9QE=; b=asyyY+sxYHaKOCsFakKEkn4gNS4ljCaemPNKOdPU+o0J9wmhZIDvlqsYJx/Ri5FMko 2k4X/4zAVbiXhhMclNJRnjYOdOsun1Py7RIyQnFjPQe3p/C4YqEk1Ylmya2dpfITPfyJ 28qtIWEXyLKk2rcZRmvOZpjvk6T2p1XB2ywsn7HPR2SLDpi1WVUxB7CtPueXzDmIQgCD aq/g16+Zsywm3YtS9LlN0CZeUk++NIDe4NC/iSV6Gntti/HH7o1HjbegHmTqSH3zJeMZ YUyhjUBluKVZuR05C14cYn0wVDltACQABikRmbxq/Yt9oImQIwPft+UgqiptmwyFUyZ3 bJBw== X-Gm-Message-State: ALoCoQkC/MpsTrao/p2ncBfZOzsmuKVatoIFGZSsWxwmzQqciiSPCo7+/GSL7t2YQFNx5wHV2bAH X-Received: by 10.70.134.163 with SMTP id pl3mr24663387pdb.142.1436395377921; Wed, 08 Jul 2015 15:42:57 -0700 (PDT) Received: from [10.64.26.63] ([69.53.236.236]) by smtp.gmail.com with ESMTPSA id ug1sm3613939pbc.39.2015.07.08.15.42.56 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 08 Jul 2015 15:42:57 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r285284 - head/lib/liblzma Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FF7CDB04-F949-42A5-B190-06AC79AB2385"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5 From: Warner Losh In-Reply-To: Date: Wed, 8 Jul 2015 16:42:54 -0600 Cc: Pedro Giffuni , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <4199933E-38A3-447F-9485-BC4AFC6B370D@bsdimp.com> References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> <559DA2AE.2090202@FreeBSD.org> <1F6CFFCA-3901-4F18-AF30-EC621E5A4E06@bsdimp.com> To: Adrian Chadd X-Mailer: Apple Mail (2.2102) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:43:05 -0000 --Apple-Mail=_FF7CDB04-F949-42A5-B190-06AC79AB2385 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 >=20 > On Jul 8, 2015, at 4:37 PM, Adrian Chadd = wrote: >=20 > On 8 July 2015 at 15:34, Warner Losh wrote: >> I doubt it would ever be useful. >> For gcc, just test for 4.2.1. >> For clang, what specific feature do you need to test for? >>=20 >> Do you have a specific use case in mind? >>=20 >> This strikes me as a really bad idea absent some use case that has a = real example behind it. >=20 > Well, vendors have in the past shipped modified compilers for systems > they're doing bring-up on. So if there are differences between the > in-tree compiler for a given clang version and the vendor supplied > modified one, I'd like to know. >=20 > I know it's going to be a while until another CPU family with a > not-yet-upstream compiler comes out.. I=E2=80=99m having trouble understanding when this would be generally = useful. If we have a situation where the exact same clang version as we have in = the tree is also the version of the compiler a vendor released and there=E2=80=99s = some substantial difference between the two such that you need conditional code to make = it work on both, that might be one scenario. But such a scenario hasn=E2=80=99t = come up in the past very often, and generally it has been resolved with an ifdef = __arch__ sort of thing because the in-tree compiler didn=E2=80=99t support that CPU well = enough to use, while the out of tree one did. Warner > -a >=20 >> Warner >>=20 >>> On Jul 8, 2015, at 4:28 PM, Adrian Chadd = wrote: >>>=20 >>> hi, >>>=20 >>> ok. would it be possible to add a blessed way to say "this is the >>> freebsd modified compiler in-tree" ? >>>=20 >>> I'd like to see / play around with more external-toolchain driven >>> building and using it for port bringups. >>>=20 >>> Thanks, >>>=20 >>>=20 >>> -adrian >>>=20 >>>=20 >>> On 8 July 2015 at 15:22, Pedro Giffuni wrote: >>>>=20 >>>>=20 >>>> On 07/08/15 17:04, Adrian Chadd wrote: >>>>>=20 >>>>> Is there a blessed way to see whether the compiler we're using is = an >>>>> external compiler, or an internal one? >>>>=20 >>>>=20 >>>> No blessed way: you still have to determine the version of >>>> the external compiler for most purposes anyways. >>>> The internal compiler (even clang) always reports itself >>>> as gcc 4.2. >>>>=20 >>>>> eg, the version check isn't enough - it's just a number. how do I = know >>>>> if it's freebsd clang versus upstream clang? >>>>> (Or in my instance, freebsd-gcc versus upstream-gcc.) >>>>=20 >>>>=20 >>>> If the compiler reports itself as gcc >=3D 4.3 it is surely an >>>> external compiler. The tricky part is that our internal gcc >>>> supports some gcc 4.3 flags and Apple extensions >>>> (blocks), but those are not causing a problem AFAICT. >>>>=20 >>>> Pedro. >>>>=20 >>>>=20 >>>>>=20 >>>>> -a >>>>>=20 >>>>>=20 >>>>> On 8 July 2015 at 14:09, Pedro Giffuni wrote: >>>>>>=20 >>>>>>=20 >>>>>> On 07/08/15 13:36, Luigi Rizzo wrote: >>>>>>>=20 >>>>>>> Author: luigi >>>>>>> Date: Wed Jul 8 18:36:37 2015 >>>>>>> New Revision: 285284 >>>>>>> URL: https://svnweb.freebsd.org/changeset/base/285284 >>>>>>>=20 >>>>>>> Log: >>>>>>> only enable immintrin when clang is used. The base gcc does = not >>>>>>> support >>>>>>> it. >>>>>>> Reviewed by: delphij >>>>>>>=20 >>>>>>> Modified: >>>>>>> head/lib/liblzma/config.h >>>>>>>=20 >>>>>>> Modified: head/lib/liblzma/config.h >>>>>>>=20 >>>>>>>=20 >>>>>>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>>>>>> --- head/lib/liblzma/config.h Wed Jul 8 18:12:24 2015 >>>>>>> (r285283) >>>>>>> +++ head/lib/liblzma/config.h Wed Jul 8 18:36:37 2015 >>>>>>> (r285284) >>>>>>> @@ -150,7 +150,8 @@ >>>>>>> #define HAVE_ICONV 1 >>>>>>> /* Define to 1 if you have the header file. */ >>>>>>> -#if defined(__FreeBSD__) && defined(__amd64__) >>>>>>> +/* FreeBSD - only with clang because the base gcc does not = support it >>>>>>> */ >>>>>>> +#if defined(__clang__) && defined(__FreeBSD__) && = defined(__amd64__) >>>>>>> #define HAVE_IMMINTRIN_H 1 >>>>>>> #endif >>>>>>>=20 >>>>>> FWIW, gcc 4.3+ does have it so this may some undesired (but = hidden) >>>>>> effect when building with an external gcc. >>>>>>=20 >>>>>> Pedro. >>>>>>=20 >>>>=20 >>>=20 >>=20 --Apple-Mail=_FF7CDB04-F949-42A5-B190-06AC79AB2385 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVnaduAAoJEGwc0Sh9sBEAQmAP/1BSRgrTwpGDDNGpIX5WjyKY AsL+fq6fUcykblZerZIyHc9BS2jczpfcnsCxGdceefz7Dn9ccTzcCcyAb8h5LxdY O6+JOCW8smJtzft1e4KkyKA3BVqJ7rcbGzYXt/pdlOARzJhD694ptRYBGxl2Gbq7 G9Crxlsc4K0uhzChcCQte6zfqtqeic2O8lsFSzh09u+36qZfvcnkmzjJ2/qLaQke ZDVG3hdNUMlfMCuOap7w9G01j1Fhm2nTOztgTIMIUsiRZLFBLaP/vMmtuwvgWAWC 3c168tLc1/xz0IRqHKZWgx0IRnSBHTN45F/1L+Law2ux8USebBsN1HZ8km8aS9TP zWDXa9IS38w71WJytzGCd/gRe+TUxS7lOtCmRFGX3/uHMgnSDiWZ1OcJ0Czg3pUs 2sJOj2EsCY5rYg2EtR5VygMjpNODCIwuDKm69mpHPor8ZWK5owCHfyM7HzyMQ7CU be5RytCcLkPdiUUG3DmFCsu3/rXH+HUpc+JXjUaky0pZHPk1klHfWZ5p54bu08vN KaIlpHdA4JujE0rYcgqtwe4oPOkIVrSriF2jC1tj6Bsm75YDMjCLvRG0TQzI3quh T6nrmCSRKpoF1z+t8v1HuHy/5P7gNrAEd/qbK6O7WRJq0h0YV7MpSrDBL6AKQkMf CxB+lHatLtxg4Q3H9gCp =P/u+ -----END PGP SIGNATURE----- --Apple-Mail=_FF7CDB04-F949-42A5-B190-06AC79AB2385-- From owner-svn-src-all@freebsd.org Wed Jul 8 22:46:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A817996DF5; Wed, 8 Jul 2015 22:46:46 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 4946C3519; Wed, 8 Jul 2015 22:46:46 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68MkkDL097954; Wed, 8 Jul 2015 22:46:46 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68Mkkq6097953; Wed, 8 Jul 2015 22:46:46 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201507082246.t68Mkkq6097953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Wed, 8 Jul 2015 22:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285296 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:46:46 -0000 Author: jmg Date: Wed Jul 8 22:46:45 2015 New Revision: 285296 URL: https://svnweb.freebsd.org/changeset/base/285296 Log: yet more documentation improvements... Many changes were made to the OCF w/o documentation... Document the new (8+ year old) device_t way of handling things, that _unregister_all will leave no threads in newsession, the _SYNC flag, the requirement that a flag be specified... Other minor changes like breaking up a wall of text into paragraphs... Modified: head/share/man/man9/crypto.9 Modified: head/share/man/man9/crypto.9 ============================================================================== --- head/share/man/man9/crypto.9 Wed Jul 8 22:24:55 2015 (r285295) +++ head/share/man/man9/crypto.9 Wed Jul 8 22:46:45 2015 (r285296) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 2, 2015 +.Dd July 8, 2015 .Dt CRYPTO 9 .Os .Sh NAME @@ -26,7 +26,7 @@ .Sh SYNOPSIS .In opencrypto/cryptodev.h .Ft int32_t -.Fn crypto_get_driverid uint8_t +.Fn crypto_get_driverid device_t int .Ft int .Fn crypto_register uint32_t int uint16_t uint32_t "int \*[lp]*\*[rp]\*[lp]void *, uint32_t *, struct cryptoini *\*[rp]" "int \*[lp]*\*[rp]\*[lp]void *, uint64_t\*[rp]" "int \*[lp]*\*[rp]\*[lp]void *, struct cryptop *\*[rp]" "void *" .Ft int @@ -312,7 +312,10 @@ Do callback immediately instead of doing .It Dv CRYPTO_F_DONE Operation completed. .It Dv CRYPTO_F_CBIFSYNC -Do callback immediately if operation is synchronous. +Do callback immediately if operation is synchronous (that the driver +specified the +.Dv CRYPTOCAP_F_SYNC +flag). .El .It Va crp_buf Points to the input buffer. @@ -495,12 +498,22 @@ and routines are used by drivers that provide support for cryptographic primitives to register and unregister with the kernel crypto services framework. +.Pp Drivers must first use the .Fn crypto_get_driverid function to acquire a driver identifier, specifying the -.Fa cc_flags -as an argument (normally 0, but software-only drivers should specify -.Dv CRYPTOCAP_F_SOFTWARE ) . +.Fa flags +as an argument. +One of +.Dv CRYPTOCAP_F_SOFTWARE +or +.Dv CRYPTOCAP_F_HARDWARE +must be specified. +The +.Dv CRYPTOCAP_F_SYNC +may also be specified, and should be specified if the driver does all of +it's operations synchronously. +.Pp For each algorithm the driver supports, it must then call .Fn crypto_register . The first two arguments are the driver and algorithm identifiers. @@ -514,6 +527,7 @@ driver-provided functions that the frame cryptographic context with the driver, free already established context, and ask for a request to be processed (encrypt, decrypt, etc.); and an opaque parameter to pass when calling each of these routines. +.Pp .Fn crypto_unregister is called by drivers that wish to withdraw support for an algorithm. The two arguments are the driver and algorithm identifiers, respectively. @@ -528,28 +542,33 @@ that driver, and any existing sessions w drivers). The same will be done if all algorithms associated with a driver are unregistered one by one. +After a call to +.Fn crypto_unregister_all +there will be no threads in either the newsession or freesession function +of the driver. .Pp -The calling convention for the three driver-supplied routines is: +The calling convention for the three driver-supplied routines are: .Pp .Bl -item -compact .It .Ft int -.Fn \*[lp]*newsession\*[rp] "void *" "uint32_t *" "struct cryptoini *" ; +.Fn \*[lp]*newsession\*[rp] "device_t" "uint32_t *" "struct cryptoini *" ; .It .Ft int -.Fn \*[lp]*freesession\*[rp] "void *" "uint64_t" ; +.Fn \*[lp]*freesession\*[rp] "device_t" "uint64_t" ; .It .Ft int -.Fn \*[lp]*process\*[rp] "void *" "struct cryptop *" ; +.Fn \*[lp]*process\*[rp] "device_t" "struct cryptop *" "int" ; .It .Ft int -.Fn \*[lp]*kprocess\*[rp] "void *" "struct cryptkop *" ; +.Fn \*[lp]*kprocess\*[rp] "device_t" "struct cryptkop *" "int" ; .El .Pp On invocation, the first argument to -all routines is an opaque data value supplied when the algorithm -is registered with -.Fn crypto_register . +all routines is the +.Fa device_t +that was provided to +.Fn crypto_get_driverid . The second argument to .Fn newsession contains the driver identifier obtained via @@ -570,9 +589,8 @@ registers, memory, etc.). The .Fn process routine is invoked with a request to perform crypto processing. -This routine must not block, but should queue the request and return -immediately. -Upon processing the request, the callback routine should be invoked. +This routine must not block or sleep, but should queue the request and return +immediately or process the request to completion. In case of an unrecoverable error, the error indication must be placed in the .Va crp_etype field of the @@ -580,7 +598,7 @@ field of the structure. When the request is completed, or an error is detected, the .Fn process -routine should invoke +routine must invoke .Fn crypto_done . Session migration may be performed, as mentioned previously. .Pp From owner-svn-src-all@freebsd.org Wed Jul 8 22:48:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20C39996E59; Wed, 8 Jul 2015 22:48:42 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 10A7C3667; Wed, 8 Jul 2015 22:48:42 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68Mmf7R098262; Wed, 8 Jul 2015 22:48:41 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68Mmfjc098261; Wed, 8 Jul 2015 22:48:41 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201507082248.t68Mmfjc098261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Wed, 8 Jul 2015 22:48:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285297 - head/sys/crypto/aesni X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:48:42 -0000 Author: jmg Date: Wed Jul 8 22:48:41 2015 New Revision: 285297 URL: https://svnweb.freebsd.org/changeset/base/285297 Log: upon further examination, it turns out that _unregister_all already provides the guarantee that no threads will be in the _newsession code.. This is provided by the CRYPTODRIVER lock... This makes the pause unneeded... Modified: head/sys/crypto/aesni/aesni.c Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Wed Jul 8 22:46:45 2015 (r285296) +++ head/sys/crypto/aesni/aesni.c Wed Jul 8 22:48:41 2015 (r285297) @@ -196,9 +196,6 @@ aesni_detach(device_t dev) rw_wunlock(&sc->lock); crypto_unregister_all(sc->cid); - /* XXX - wait for anyone in _newsession to leave */ - pause("aniwait", 1); - rw_destroy(&sc->lock); aensi_cleanctx(); From owner-svn-src-all@freebsd.org Wed Jul 8 22:57:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEB8E99708E for ; Wed, 8 Jul 2015 22:57:04 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A9DE83B27 for ; Wed, 8 Jul 2015 22:57:04 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by pacgz10 with SMTP id gz10so65500351pac.3 for ; Wed, 08 Jul 2015 15:56:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=yNydDeg2Zfab8Y4517CG1UbJ+QR2ldoO0u6BWtsbG4g=; b=hkynGVit+tq7fyRimPcmUGhfCOgimmdCDeUVtZAL40G1/KTJhcdc0Me+J0LjVz8IPM ATsQyhg+b3KdX261iBhbtwTjtDYxLVG3xiax5zuOrv7hoEJ+zTLnf67sf6BCnps4X628 cvOPaNmuK4tqTv2hzqnfcWXPjxCXZ7fwnDsJC+9SDT/gkkETLTPMSewy7Y4F1UR9y8Fr CCyvrb4c/6HshleOhbt6RPtN/REIXCAHc/RknGaRr6Azv0U5dHYe1lbOWD4Ii3fDYmqN 5Nnrh1F00WtqlVfn1+C+ns4KHdZT9BWZ2UhJu38uqbNK1qqgNxT+/Lk2PNwyKMpAC1Iv 8O9Q== X-Gm-Message-State: ALoCoQlxfQaSUvbyg701weCGtHZuLJOzqAw7ySbBZfTiN2gpdT/k4r5u9QIpN+QxSrF3QbBvpGJ8 X-Received: by 10.66.145.74 with SMTP id ss10mr25067946pab.28.1436394874486; Wed, 08 Jul 2015 15:34:34 -0700 (PDT) Received: from [10.64.26.63] ([69.53.236.236]) by smtp.gmail.com with ESMTPSA id k9sm3608281pdp.60.2015.07.08.15.34.32 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 08 Jul 2015 15:34:33 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r285284 - head/lib/liblzma Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Content-Type: multipart/signed; boundary="Apple-Mail=_F9AD8F9D-4C77-437A-B3CB-F29CB1CD24A4"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5 From: Warner Losh In-Reply-To: Date: Wed, 8 Jul 2015 16:34:31 -0600 Cc: Pedro Giffuni , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <1F6CFFCA-3901-4F18-AF30-EC621E5A4E06@bsdimp.com> References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> <559DA2AE.2090202@FreeBSD.org> To: Adrian Chadd X-Mailer: Apple Mail (2.2102) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:57:05 -0000 --Apple-Mail=_F9AD8F9D-4C77-437A-B3CB-F29CB1CD24A4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii I doubt it would ever be useful. For gcc, just test for 4.2.1. For clang, what specific feature do you need to test for? Do you have a specific use case in mind? This strikes me as a really bad idea absent some use case that has a = real example behind it. Warner > On Jul 8, 2015, at 4:28 PM, Adrian Chadd = wrote: >=20 > hi, >=20 > ok. would it be possible to add a blessed way to say "this is the > freebsd modified compiler in-tree" ? >=20 > I'd like to see / play around with more external-toolchain driven > building and using it for port bringups. >=20 > Thanks, >=20 >=20 > -adrian >=20 >=20 > On 8 July 2015 at 15:22, Pedro Giffuni wrote: >>=20 >>=20 >> On 07/08/15 17:04, Adrian Chadd wrote: >>>=20 >>> Is there a blessed way to see whether the compiler we're using is an >>> external compiler, or an internal one? >>=20 >>=20 >> No blessed way: you still have to determine the version of >> the external compiler for most purposes anyways. >> The internal compiler (even clang) always reports itself >> as gcc 4.2. >>=20 >>> eg, the version check isn't enough - it's just a number. how do I = know >>> if it's freebsd clang versus upstream clang? >>> (Or in my instance, freebsd-gcc versus upstream-gcc.) >>=20 >>=20 >> If the compiler reports itself as gcc >=3D 4.3 it is surely an >> external compiler. The tricky part is that our internal gcc >> supports some gcc 4.3 flags and Apple extensions >> (blocks), but those are not causing a problem AFAICT. >>=20 >> Pedro. >>=20 >>=20 >>>=20 >>> -a >>>=20 >>>=20 >>> On 8 July 2015 at 14:09, Pedro Giffuni wrote: >>>>=20 >>>>=20 >>>> On 07/08/15 13:36, Luigi Rizzo wrote: >>>>>=20 >>>>> Author: luigi >>>>> Date: Wed Jul 8 18:36:37 2015 >>>>> New Revision: 285284 >>>>> URL: https://svnweb.freebsd.org/changeset/base/285284 >>>>>=20 >>>>> Log: >>>>> only enable immintrin when clang is used. The base gcc does not >>>>> support >>>>> it. >>>>> Reviewed by: delphij >>>>>=20 >>>>> Modified: >>>>> head/lib/liblzma/config.h >>>>>=20 >>>>> Modified: head/lib/liblzma/config.h >>>>>=20 >>>>>=20 >>>>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>>>> --- head/lib/liblzma/config.h Wed Jul 8 18:12:24 2015 >>>>> (r285283) >>>>> +++ head/lib/liblzma/config.h Wed Jul 8 18:36:37 2015 >>>>> (r285284) >>>>> @@ -150,7 +150,8 @@ >>>>> #define HAVE_ICONV 1 >>>>> /* Define to 1 if you have the header file. */ >>>>> -#if defined(__FreeBSD__) && defined(__amd64__) >>>>> +/* FreeBSD - only with clang because the base gcc does not = support it >>>>> */ >>>>> +#if defined(__clang__) && defined(__FreeBSD__) && = defined(__amd64__) >>>>> #define HAVE_IMMINTRIN_H 1 >>>>> #endif >>>>>=20 >>>> FWIW, gcc 4.3+ does have it so this may some undesired (but hidden) >>>> effect when building with an external gcc. >>>>=20 >>>> Pedro. >>>>=20 >>=20 >=20 --Apple-Mail=_F9AD8F9D-4C77-437A-B3CB-F29CB1CD24A4 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVnaV3AAoJEGwc0Sh9sBEAb2kQAOEg5QjkRG0yC3ggt5SgQ+us E9POokF1qOfyT7duO/OhFWiZX3vi4gP1aYTibdzP6MyqvQ1LA4vmQ3J0E6CF6VzK irpZGEyKNz1ZS1CpSjWAr2GyNn5lZ8mVsZibxF06+Z9E83f5pkqnxhy8QK2QRoTv yOVxhuAX2LGp+JB+kfVXaOQge3CUv/3+SyUzOA3MpGrrKVQ+UhZU7ZMD9qbLXU+4 fSqK9nXwUJP2+nXuw95ZLbKN5DOuLd2cSZQi+1Fgukdj3dZZv6Ll249641G3I0Vc Eltzi5IzuY3X33vm5Q8OTmTW8Dk9xd8i31C0dNNYkIcWvDyAlFdu6mPccFjbgB/L mrzDwNU7eICWny7Lm8pisCTmadEimhZMwgRgXctsGjGfJOXT9SBHW4ANwZzjBrmf 2bB74PcyXcws8bL6KJuq4cIDxjNoqU6prZ1nhhLUK4jlX1GqDyR6eANz80VIbvcf YalHOIGMv6kBg6+mfWs+t/DW1Q1XQiDlF6lG5ErK1nEhvq6dIT6HexwRxCAcgPzS jf4jqzfHtYvArtU1SWyqXHiloIxVi282+Ei15aYiRfq4fSUuItNz/EK1EEgpj0Mi Yx4+ZiKDx3nmcO9O96cOI+cKf1rduyztaX0e3+mnLDCTQbwJEUIcmtMGuUfzGLJ0 btWVlTqyltTBpSQEyDv6 =mxVg -----END PGP SIGNATURE----- --Apple-Mail=_F9AD8F9D-4C77-437A-B3CB-F29CB1CD24A4-- From owner-svn-src-all@freebsd.org Wed Jul 8 23:27:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D507997364; Wed, 8 Jul 2015 23:27:31 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 322B01630; Wed, 8 Jul 2015 23:27:30 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t68NRUwh032946 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Jul 2015 16:27:30 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t68NRUHA032945; Wed, 8 Jul 2015 16:27:30 -0700 (PDT) (envelope-from jmg) Date: Wed, 8 Jul 2015 16:27:30 -0700 From: John-Mark Gurney To: Pedro Giffuni Cc: Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285284 - head/lib/liblzma Message-ID: <20150708232729.GX8523@funkthat.com> References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <559D9172.9040305@FreeBSD.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Wed, 08 Jul 2015 16:27:30 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 23:27:31 -0000 Pedro Giffuni wrote this message on Wed, Jul 08, 2015 at 16:09 -0500: > On 07/08/15 13:36, Luigi Rizzo wrote: > > Author: luigi > > Date: Wed Jul 8 18:36:37 2015 > > New Revision: 285284 > > URL: https://svnweb.freebsd.org/changeset/base/285284 > > > > Log: > > only enable immintrin when clang is used. The base gcc does not support it. > > > > Reviewed by: delphij > > > > Modified: > > head/lib/liblzma/config.h > > > > Modified: head/lib/liblzma/config.h > > ============================================================================== > > --- head/lib/liblzma/config.h Wed Jul 8 18:12:24 2015 (r285283) > > +++ head/lib/liblzma/config.h Wed Jul 8 18:36:37 2015 (r285284) > > @@ -150,7 +150,8 @@ > > #define HAVE_ICONV 1 > > > > /* Define to 1 if you have the header file. */ > > -#if defined(__FreeBSD__) && defined(__amd64__) > > +/* FreeBSD - only with clang because the base gcc does not support it */ > > +#if defined(__clang__) && defined(__FreeBSD__) && defined(__amd64__) > > #define HAVE_IMMINTRIN_H 1 > > #endif > > > > > FWIW, gcc 4.3+ does have it so this may some undesired (but hidden) > effect when building with an external gcc. Looking at the header, immintrin.h, it looks like it's just a catch all for various intrinsic headers... And looking at the lzma code, the immintrin.h include could be replaced w/ an emmintrin.h and things would be fine... Though I don't see sse2 being enabled when compiling the library... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@freebsd.org Wed Jul 8 23:50:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AA19997689; Wed, 8 Jul 2015 23:50:05 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 112741035; Wed, 8 Jul 2015 23:50:05 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68No4dr028475; Wed, 8 Jul 2015 23:50:04 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68No40j028474; Wed, 8 Jul 2015 23:50:04 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201507082350.t68No40j028474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 8 Jul 2015 23:50:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285298 - stable/10/sys/boot/arm/uboot X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 23:50:05 -0000 Author: loos Date: Wed Jul 8 23:50:04 2015 New Revision: 285298 URL: https://svnweb.freebsd.org/changeset/base/285298 Log: MFC r285138: Install loader.rc with ARM u-boot loader (ubldr). loader.rc is the responsible to read and process loader.conf variables. This fix the issue of loader.conf being silently ignored. Approved by: re (gjb) Modified: stable/10/sys/boot/arm/uboot/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/arm/uboot/Makefile ============================================================================== --- stable/10/sys/boot/arm/uboot/Makefile Wed Jul 8 22:48:41 2015 (r285297) +++ stable/10/sys/boot/arm/uboot/Makefile Wed Jul 8 23:50:04 2015 (r285298) @@ -149,10 +149,9 @@ CLEANFILES+= ldscript.abs ldscript.pie u .PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" -# Put sample loader.rc and menu.rc on disk but don't enable them -# by default. +# Install loader.rc. FILES+= loader.rc -FILESNAME_loader.rc= loader.rc.sample +# Put sample menu.rc on disk but don't enable it by default. FILES+= menu.rc FILESNAME_menu.rc= menu.rc.sample .endif From owner-svn-src-all@freebsd.org Wed Jul 8 23:57:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D79D3997940; Wed, 8 Jul 2015 23:57:59 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 C7B61155A; Wed, 8 Jul 2015 23:57:59 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68NvxMi033087; Wed, 8 Jul 2015 23:57:59 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68Nvx7g033086; Wed, 8 Jul 2015 23:57:59 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201507082357.t68Nvx7g033086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Wed, 8 Jul 2015 23:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285299 - head/contrib/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 23:57:59 -0000 Author: pkelsey Date: Wed Jul 8 23:57:58 2015 New Revision: 285299 URL: https://svnweb.freebsd.org/changeset/base/285299 Log: MFV r285292: Merge upstream fix to eliminate build-breaking gcc warnings of no importance. commit: cab33b7a0acba7d2268a23c4383be6167106e549 Update ND_TTEST2 to fix issue 443 Add IS_NOT_NEGATIVE macro. Avoid these warnings: - comparison of unsigned expression >= 0 is always true [-Wtype-limits], - comparison is always true due to limited range of data type [-Wtype-limits]. Reviewed by: adrian Approved by: jmallett (mentor) MFC after: 1 month Modified: head/contrib/tcpdump/netdissect.h Directory Properties: head/contrib/tcpdump/ (props changed) Modified: head/contrib/tcpdump/netdissect.h ============================================================================== --- head/contrib/tcpdump/netdissect.h Wed Jul 8 23:50:04 2015 (r285298) +++ head/contrib/tcpdump/netdissect.h Wed Jul 8 23:57:58 2015 (r285299) @@ -270,8 +270,11 @@ struct netdissect_options { * * http://www.kb.cert.org/vuls/id/162289 */ + +#define IS_NOT_NEGATIVE(x) (((x) > 0) || ((x) == 0)) + #define ND_TTEST2(var, l) \ - ((l) >= 0 && \ + (IS_NOT_NEGATIVE(l) && \ ((uintptr_t)ndo->ndo_snapend - (l) <= (uintptr_t)ndo->ndo_snapend && \ (uintptr_t)&(var) <= (uintptr_t)ndo->ndo_snapend - (l))) From owner-svn-src-all@freebsd.org Thu Jul 9 00:00:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D067C99799A; Thu, 9 Jul 2015 00:00:06 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com [IPv6:2607:f8b0:400d:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8615C1886; Thu, 9 Jul 2015 00:00:06 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by qkhu186 with SMTP id u186so175594534qkh.0; Wed, 08 Jul 2015 17:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; bh=lWb1i2qWmRFQegRaNbIM/t/Zseez+90sseGWivurGT4=; b=0LkrykaDCBCGmrliBC9Xv1x5SJlHzYeH7TLV5j6YTXCXQe/gZxhv1xe0ludVtpRikR rRapisg43Q0GGm4N5QPSwm1IAdYTYx4w7TLik9YeSp2OS7fZ76kc3UPQUsKlyu9E0UAQ ezidga4Ip2BQ6lq++xqVNWHXjWASyhJdqpvZG/AaAbXnFv1CWt1xUoRfFel2lHngrE9M 3pMTI6f95y3qG7uLL92fS4JcE49AjLDpwxyq3lIqKPtTJzAwn46vOONXaGaNHLt6MnpD jUAWgowBJ5v5RABx1Pnsq2DP/r5VejtJuOthQfGkaMeXDmFBQdOQnfJVDhvVnqGAjbq9 lvzw== X-Received: by 10.55.27.70 with SMTP id b67mr20763622qkb.86.1436400005514; Wed, 08 Jul 2015 17:00:05 -0700 (PDT) Received: from kan ([2601:18f:0:1570:226:18ff:fe00:232e]) by smtp.gmail.com with ESMTPSA id 188sm2378262qhh.48.2015.07.08.17.00.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jul 2015 17:00:04 -0700 (PDT) Date: Wed, 8 Jul 2015 19:59:59 -0400 From: Alexander Kabaev To: Adrian Chadd Cc: Pedro Giffuni , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r285284 - head/lib/liblzma Message-ID: <20150708195959.6f1c8ab1@kan> In-Reply-To: References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> <559DA2AE.2090202@FreeBSD.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/VYdFKqwSoQCXq.D7kdS4T5H"; protocol="application/pgp-signature" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 00:00:07 -0000 --Sig_/VYdFKqwSoQCXq.D7kdS4T5H Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 8 Jul 2015 15:28:17 -0700 Adrian Chadd wrote: > hi, >=20 > ok. would it be possible to add a blessed way to say "this is the > freebsd modified compiler in-tree" ? >=20 > I'd like to see / play around with more external-toolchain driven > building and using it for port bringups. >=20 > Thanks, >=20 >=20 > -adrian >=20 IIRC, FreeBSD's internal GCC defines __FreeBSD_cc_version, while stock one does not. --=20 Alexander Kabaev --Sig_/VYdFKqwSoQCXq.D7kdS4T5H Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJVnbl/XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDNUY3RDk5NTk5QjY0MUUxM0M1MTU2OTEw NzEzMjI5OTkyNzkyRTdFAAoJEAcTIpmSeS5+CJ4QANXcCjO8oGH0tXTHVR/rHtQ4 06yjbfaQHCaWUAsfqcxWFDpBEI3GHhGTzRpy6l8wbLccVej4myn70LLoHZEbmRDw FlRQEUsOuATgEEeIzfennuV2W0ejAcAqpnmEXFHqk7fe60FrU0MVMwfXdXJgphyk pSL4cb+oo6RbIXrFflaI7qhxqDkinLlkiPPt26GlLjaudPK2fMWrl6ryxlkItA7f vZcmgwCePHWlQzZVHXCzhqmOVY5b9gyyMbJZitU5+DwdOvR37FK0OwivBI+7ssEZ J74nObh2KLIvXEBRNfUnvDNu2Tyzu0UmWiqmLDDQOAYjpW4tEnUT60CBK8ZCxtRy urZwTwpYLKAm6QR4Kb6AqIDPnfc1XGFtEDJa2T4Ofp2+ScTxMCAdt2jjbqfpfjox XapcMjcSzOFIAlp/yS09TCoUM/7lX1Unt44/9uYlPagMoBv7hJRlOj1yAmxMPIg5 JywFTfyIEL5kqEXjzGCp7NiNgIMdZI3HgzC4ojpD0AQIOI4Qlh20NX7UbPyRB3WP qLoeDdDvADC40tmgh5vZimP0e6UTtLTAIitW75x+x9bZ4JICM7+6uzFWOl5aagkm Zr0aMKrxrxA8kcsi/akGf6pE/QmBLbPn/rpeBKQhZIASKFLZ4KABE5hqmddh/HHy aIUhaw2ktPG2d5Ac2qUr =h+nV -----END PGP SIGNATURE----- --Sig_/VYdFKqwSoQCXq.D7kdS4T5H-- From owner-svn-src-all@freebsd.org Thu Jul 9 02:53:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3ED40997619; Thu, 9 Jul 2015 02:53:35 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qg0-x232.google.com (mail-qg0-x232.google.com [IPv6:2607:f8b0:400d:c04::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EEE5A1FE6; Thu, 9 Jul 2015 02:53:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qgef3 with SMTP id f3so59842619qge.0; Wed, 08 Jul 2015 19:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GUen2g+9eVEEXkzEJpQWM9HZKlE7azhRjX34zDvFOGw=; b=xLh4QDaoFG3Asq3R97HPPJAzEAmDM9hJfMbVzNwQw3WBrLdedkPhb/jtFetRgoui/2 M+nB8hGkpGCEuwaN8FUTuHfLxcg06on/xlRR1rIP9MJQIk7L28Tq4TdtohNzeOL7d9Sr ZJ5TvcBP7zTyL6wQb4H53cE2MMIDO9oy+4gf8PqIpVh8mkhmf8VElHXQgAj0y7v08ECu vskKRDzd/D4nPN74JqxMBFm37tqqTPOyXtzspOXdmz++dz42N4liCKnEoicfWzhXzlND zFDhUIwHFb2ztZiKv1NR3YFzfuQfpCzp2kFuvs3/mqGBcL+Q3ImPL1q/aBbLLfDTT47g puQw== MIME-Version: 1.0 X-Received: by 10.140.90.99 with SMTP id w90mr21098014qgd.57.1436410414054; Wed, 08 Jul 2015 19:53:34 -0700 (PDT) Received: by 10.140.98.73 with HTTP; Wed, 8 Jul 2015 19:53:33 -0700 (PDT) In-Reply-To: References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> Date: Wed, 8 Jul 2015 19:53:33 -0700 Message-ID: Subject: Re: svn commit: r285284 - head/lib/liblzma From: NGie Cooper To: Dimitry Andric Cc: Adrian Chadd , Pedro Giffuni , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 02:53:35 -0000 On Wed, Jul 8, 2015 at 3:18 PM, Dimitry Andric wrote: > Check whether the path starts with /usr/bin, maybe? Normally, you would > check for the existence of a random header in a configure script. But > from within a C source file, it's not that easy. > > That said, immintrin.h is available for all usable versions of clang, > and should be available in all versions of gcc >= 4.4 (at least, if I > read gcc's commit history correctly). And gcc in base is definitely not > 4.4. :-) $ cat ~/has_immintrin.c #include #if __has_include() #error "I have immintrin.h" #else #error "I don't have immintrin.h" #endif $ clang -c ~/has_immintrin.c /home/ngie/has_immintrin.c:4:2: error: "I have immintrin.h" #error "I have immintrin.h" ^ 1 error generated. $ gcc -c ~/has_immintrin.c /home/ngie/has_immintrin.c:6:2: error: #error "I don't have immintrin.h" Sadly this macro wasn't added until gcc 5.x: https://gcc.gnu.org/gcc-5/changes.html Cheers, -NGie From owner-svn-src-all@freebsd.org Thu Jul 9 04:58:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F91D98C96D; Thu, 9 Jul 2015 04:58:57 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 354F9199C; Thu, 9 Jul 2015 04:58:57 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t694wuWL088005; Thu, 9 Jul 2015 04:58:56 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t694wud4088004; Thu, 9 Jul 2015 04:58:56 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507090458.t694wud4088004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Thu, 9 Jul 2015 04:58:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285300 - stable/10/lib/libsm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 04:58:57 -0000 Author: gshapiro Date: Thu Jul 9 04:58:56 2015 New Revision: 285300 URL: https://svnweb.freebsd.org/changeset/base/285300 Log: MFC: libsm/path.c is about to disappear in the merge of sendmail 8.15.2. It is an empty file now so it is safe to remove before the merge. Approved by: re (gjb) Modified: stable/10/lib/libsm/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libsm/Makefile ============================================================================== --- stable/10/lib/libsm/Makefile Wed Jul 8 23:57:58 2015 (r285299) +++ stable/10/lib/libsm/Makefile Thu Jul 9 04:58:56 2015 (r285300) @@ -29,7 +29,7 @@ SRCS+= assert.c debug.c errstring.c exc. smstdio.c snprintf.c sscanf.c stdio.c strio.c ungetc.c \ vasprintf.c vfprintf.c vfscanf.c vprintf.c vsnprintf.c \ wbuf.c wsetup.c string.c stringf.c \ - xtrap.c strto.c test.c path.c strcasecmp.c strrevcmp.c \ + xtrap.c strto.c test.c strcasecmp.c strrevcmp.c \ signal.c clock.c config.c sem.c shm.c mbdb.c strexit.c cf.c ldap.c \ niprop.c mpeix.c memstat.c util.c inet6_ntop.c CLEANFILES+=sm_os.h From owner-svn-src-all@freebsd.org Thu Jul 9 05:00:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 047E498CB16; Thu, 9 Jul 2015 05:00:21 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 E87411B37; Thu, 9 Jul 2015 05:00:20 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6950KQW090996; Thu, 9 Jul 2015 05:00:20 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6950KTU090995; Thu, 9 Jul 2015 05:00:20 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507090500.t6950KTU090995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Thu, 9 Jul 2015 05:00:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285301 - stable/10/usr.sbin/sendmail X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 05:00:21 -0000 Author: gshapiro Date: Thu Jul 9 05:00:19 2015 New Revision: 285301 URL: https://svnweb.freebsd.org/changeset/base/285301 Log: By default, sendmail 8.15 uses uncompressed IPv6 addresses. Keep current FreeBSD 10 and earlier behavior of using compressed IPv6 addresses in configuration, maps, rulesets, etc. (FreeBSD 11 and later will use the new default of uncompressed IPv6 addresses.) Approved by: re (gjb) Modified: stable/10/usr.sbin/sendmail/Makefile Modified: stable/10/usr.sbin/sendmail/Makefile ============================================================================== --- stable/10/usr.sbin/sendmail/Makefile Thu Jul 9 04:58:56 2015 (r285300) +++ stable/10/usr.sbin/sendmail/Makefile Thu Jul 9 05:00:19 2015 (r285301) @@ -40,7 +40,7 @@ CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/in CFLAGS+= ${DBMDEF} ${NIS} -DTCPWRAPPERS ${MAPS} .if ${MK_INET6_SUPPORT} != "no" -CFLAGS+= -DNETINET6 +CFLAGS+= -DNETINET6 -DIPV6_FULL=0 .endif WARNS?= 1 From owner-svn-src-all@freebsd.org Thu Jul 9 05:02:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DD4F98CB88; Thu, 9 Jul 2015 05:02:14 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 7D6D31E7B; Thu, 9 Jul 2015 05:02:14 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6952EtH092358; Thu, 9 Jul 2015 05:02:14 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6952E0k092357; Thu, 9 Jul 2015 05:02:14 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507090502.t6952E0k092357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Thu, 9 Jul 2015 05:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285302 - stable/10/usr.sbin/sendmail X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 05:02:14 -0000 Author: gshapiro Date: Thu Jul 9 05:02:13 2015 New Revision: 285302 URL: https://svnweb.freebsd.org/changeset/base/285302 Log: MFC: Temporarily disable WARNS while addressing a non-issue with the upstream code Approved by: re (gjb) Modified: stable/10/usr.sbin/sendmail/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sendmail/Makefile ============================================================================== --- stable/10/usr.sbin/sendmail/Makefile Thu Jul 9 05:00:19 2015 (r285301) +++ stable/10/usr.sbin/sendmail/Makefile Thu Jul 9 05:02:13 2015 (r285302) @@ -43,7 +43,7 @@ CFLAGS+= ${DBMDEF} ${NIS} -DTCPWRAPPERS CFLAGS+= -DNETINET6 -DIPV6_FULL=0 .endif -WARNS?= 1 +WARNS?= 0 DPADD= ${LIBUTIL} ${LIBWRAP} LDADD= -lutil -lwrap From owner-svn-src-all@freebsd.org Thu Jul 9 05:23:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CEA398CEC9; Thu, 9 Jul 2015 05:23:22 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 891E6188B; Thu, 9 Jul 2015 05:23:22 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t695NMZ7003378; Thu, 9 Jul 2015 05:23:22 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t695NIKH003359; Thu, 9 Jul 2015 05:23:18 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507090523.t695NIKH003359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Thu, 9 Jul 2015 05:23:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285303 - in stable/10/contrib/sendmail: . cf cf/cf cf/feature cf/hack cf/m4 contrib doc/op editmap include/sendmail include/sm libmilter libmilter/docs libsm libsmdb makemap src X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 05:23:22 -0000 Author: gshapiro Date: Thu Jul 9 05:23:17 2015 New Revision: 285303 URL: https://svnweb.freebsd.org/changeset/base/285303 Log: MFC: Merge sendmail 8.15.2 Approved by: re (gjb) Added: stable/10/contrib/sendmail/cf/feature/bcc.m4 - copied unchanged from r285229, head/contrib/sendmail/cf/feature/bcc.m4 stable/10/contrib/sendmail/cf/feature/nopercenthack.m4 - copied unchanged from r285229, head/contrib/sendmail/cf/feature/nopercenthack.m4 stable/10/contrib/sendmail/cf/feature/prefixmod.m4 - copied unchanged from r285229, head/contrib/sendmail/cf/feature/prefixmod.m4 stable/10/contrib/sendmail/cf/feature/tls_session_features.m4 - copied unchanged from r285229, head/contrib/sendmail/cf/feature/tls_session_features.m4 stable/10/contrib/sendmail/cf/hack/xconnect.m4 - copied unchanged from r285229, head/contrib/sendmail/cf/hack/xconnect.m4 stable/10/contrib/sendmail/contrib/AuthRealm.p0 - copied unchanged from r285229, head/contrib/sendmail/contrib/AuthRealm.p0 Deleted: stable/10/contrib/sendmail/libsm/path.c Modified: stable/10/contrib/sendmail/CACerts stable/10/contrib/sendmail/FAQ stable/10/contrib/sendmail/INSTALL stable/10/contrib/sendmail/KNOWNBUGS stable/10/contrib/sendmail/PGPKEYS stable/10/contrib/sendmail/README stable/10/contrib/sendmail/RELEASE_NOTES stable/10/contrib/sendmail/cf/README stable/10/contrib/sendmail/cf/cf/Makefile stable/10/contrib/sendmail/cf/cf/submit.cf stable/10/contrib/sendmail/cf/cf/submit.mc stable/10/contrib/sendmail/cf/feature/block_bad_helo.m4 stable/10/contrib/sendmail/cf/feature/ldap_routing.m4 stable/10/contrib/sendmail/cf/m4/cfhead.m4 stable/10/contrib/sendmail/cf/m4/proto.m4 stable/10/contrib/sendmail/cf/m4/version.m4 stable/10/contrib/sendmail/doc/op/op.me stable/10/contrib/sendmail/editmap/editmap.c stable/10/contrib/sendmail/include/sendmail/sendmail.h stable/10/contrib/sendmail/include/sm/bdb.h stable/10/contrib/sendmail/include/sm/cdefs.h stable/10/contrib/sendmail/include/sm/conf.h stable/10/contrib/sendmail/include/sm/errstring.h stable/10/contrib/sendmail/include/sm/fdset.h stable/10/contrib/sendmail/libmilter/docs/smfi_setsymlist.html stable/10/contrib/sendmail/libmilter/engine.c stable/10/contrib/sendmail/libmilter/handler.c stable/10/contrib/sendmail/libmilter/listener.c stable/10/contrib/sendmail/libmilter/signal.c stable/10/contrib/sendmail/libmilter/smfi.c stable/10/contrib/sendmail/libmilter/worker.c stable/10/contrib/sendmail/libsm/Makefile.m4 stable/10/contrib/sendmail/libsm/errstring.c stable/10/contrib/sendmail/libsm/local.h stable/10/contrib/sendmail/libsm/mbdb.c stable/10/contrib/sendmail/libsm/refill.c stable/10/contrib/sendmail/libsm/stdio.c stable/10/contrib/sendmail/libsm/vfprintf.c stable/10/contrib/sendmail/libsmdb/smdb.c stable/10/contrib/sendmail/makemap/makemap.c stable/10/contrib/sendmail/src/README stable/10/contrib/sendmail/src/TRACEFLAGS stable/10/contrib/sendmail/src/TUNING stable/10/contrib/sendmail/src/bf.c stable/10/contrib/sendmail/src/collect.c stable/10/contrib/sendmail/src/conf.c stable/10/contrib/sendmail/src/daemon.c stable/10/contrib/sendmail/src/deliver.c stable/10/contrib/sendmail/src/envelope.c stable/10/contrib/sendmail/src/err.c stable/10/contrib/sendmail/src/headers.c stable/10/contrib/sendmail/src/main.c stable/10/contrib/sendmail/src/map.c stable/10/contrib/sendmail/src/mci.c stable/10/contrib/sendmail/src/milter.c stable/10/contrib/sendmail/src/parseaddr.c stable/10/contrib/sendmail/src/queue.c stable/10/contrib/sendmail/src/readcf.c stable/10/contrib/sendmail/src/recipient.c stable/10/contrib/sendmail/src/savemail.c stable/10/contrib/sendmail/src/sendmail.8 stable/10/contrib/sendmail/src/sendmail.h stable/10/contrib/sendmail/src/sfsasl.c stable/10/contrib/sendmail/src/sm_resolve.c stable/10/contrib/sendmail/src/srvrsmtp.c stable/10/contrib/sendmail/src/tls.c stable/10/contrib/sendmail/src/usersmtp.c stable/10/contrib/sendmail/src/util.c stable/10/contrib/sendmail/src/version.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/sendmail/CACerts ============================================================================== --- stable/10/contrib/sendmail/CACerts Thu Jul 9 05:02:13 2015 (r285302) +++ stable/10/contrib/sendmail/CACerts Thu Jul 9 05:23:17 2015 (r285303) @@ -10,6 +10,102 @@ Certificate: Data: Version: 3 (0x2) Serial Number: + 92:91:67:de:e0:ef:2c:e4 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + Validity + Not Before: Mar 2 19:15:29 2015 GMT + Not After : Mar 1 19:15:29 2018 GMT + Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b9:1a:a1:56:ce:cb:16:af:4f:96:ba:2a:70:31: + 70:d3:86:6c:7a:46:26:47:42:3f:de:49:57:3e:08: + 1e:10:25:bf:06:8f:ca:fd:f4:5e:6a:01:7d:31:4d: + 50:88:18:43:71:66:65:42:9c:90:97:0d:95:f2:14: + ef:d7:5e:77:ef:7d:b5:49:3f:02:bb:83:20:f7:e6: + fc:9a:cd:13:df:60:41:28:8e:39:07:a6:a4:40:98: + 15:1e:46:b6:04:2e:f9:ab:32:d1:8b:fe:52:81:f1: + d2:e1:c3:cf:bf:ab:40:a7:f0:e4:e5:a2:82:37:30: + 8c:10:7d:aa:a8:7c:7e:76:cc:5f:1a:24:d0:8c:94: + f6:f2:7f:4a:be:2f:38:67:c0:06:e6:9e:51:ad:55: + d0:cb:26:71:cf:f4:af:7d:5a:41:81:16:fb:26:ec: + f0:35:01:6e:db:f9:e9:00:d7:d0:89:7b:cf:88:16: + 8b:1c:8f:77:1f:5d:ef:70:04:28:76:c5:1b:c6:23: + 8d:49:6b:f0:b8:21:56:d6:7d:68:6c:be:21:e3:e6: + e3:1d:6f:a5:ea:dc:83:e4:27:b3:6f:5f:1b:3d:33: + a1:d5:d3:f0:73:1a:12:eb:d9:95:00:71:59:16:b4: + e4:60:38:b2:2e:7f:b7:d4:c5:e9:3f:74:e4:48:38: + 29:89 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + B1:69:DB:5E:9B:CE:1A:B4:1D:B2:6A:FC:5A:22:97:B6:24:14:6F:32 + X509v3 Authority Key Identifier: + keyid:B1:69:DB:5E:9B:CE:1A:B4:1D:B2:6A:FC:5A:22:97:B6:24:14:6F:32 + DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + serial:92:91:67:DE:E0:EF:2C:E4 + + X509v3 Basic Constraints: + CA:TRUE + X509v3 Subject Alternative Name: + email:ca+ca-rsa2015@esmtp.org + X509v3 Issuer Alternative Name: + email:ca+ca-rsa2015@esmtp.org + Signature Algorithm: sha1WithRSAEncryption + 0a:ce:07:39:77:08:c5:3a:00:04:e8:a0:3b:f7:d2:4c:79:02: + 23:0b:da:c0:55:39:82:71:0a:0c:83:e2:de:f2:3b:fe:23:bc: + 9b:13:34:d1:29:0a:16:3f:01:7d:9f:fb:4b:aa:12:dc:3b:7e: + b9:27:7b:ec:0c:3f:c0:d9:f5:d8:a8:a1:9c:1c:3a:2f:40:df: + 27:1a:1a:a0:74:00:19:b7:82:0e:f9:45:86:bf:32:da:0e:72: + 0a:4c:2c:39:21:63:c3:1f:61:6e:e2:4d:ba:7a:26:1a:15:ce: + b1:f6:1a:59:04:70:ed:e8:72:05:4c:fc:84:c6:a5:f4:e2:4a: + 40:e4:42:70:87:9a:a7:02:26:3a:47:34:09:e0:7b:88:ca:fb: + 99:d9:9b:bb:0c:52:8a:93:d5:59:30:0b:55:42:b4:bb:d2:b1: + 49:55:81:a4:70:a0:49:19:f2:4f:61:94:af:e9:d7:62:68:65: + 97:67:00:26:b8:9b:b2:2c:d0:2c:83:7d:3e:b3:31:73:b9:55: + 49:53:fa:a3:ad:1b:02:67:08:9e:ce:9e:eb:9f:47:0d:6c:95: + e9:6c:30:92:c1:94:67:ad:d9:e3:b9:61:ea:a9:72:98:81:3a: + 62:80:70:20:9a:3e:c4:1f:6f:bd:b4:00:ec:b1:fe:71:da:91: + 15:89:f7:8f +-----BEGIN CERTIFICATE----- +MIIFJzCCBA+gAwIBAgIJAJKRZ97g7yzkMA0GCSqGSIb3DQEBBQUAMIGlMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTERMA8GA1UEBwwIQmVya2VsZXkx +FDASBgNVBAoMC0VuZG1haWwgT3JnMQwwCgYDVQQLDANNVEExIjAgBgNVBAMMGUNs +YXVzIEFzc21hbm4gQ0EgUlNBIDIwMTUxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz +YTIwMTVAZXNtdHAub3JnMB4XDTE1MDMwMjE5MTUyOVoXDTE4MDMwMTE5MTUyOVow +gaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMREwDwYDVQQHDAhC +ZXJrZWxleTEUMBIGA1UECgwLRW5kbWFpbCBPcmcxDDAKBgNVBAsMA01UQTEiMCAG +A1UEAwwZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxNTEmMCQGCSqGSIb3DQEJARYX +Y2ErY2EtcnNhMjAxNUBlc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQC5GqFWzssWr0+WuipwMXDThmx6RiZHQj/eSVc+CB4QJb8Gj8r99F5q +AX0xTVCIGENxZmVCnJCXDZXyFO/XXnfvfbVJPwK7gyD35vyazRPfYEEojjkHpqRA +mBUeRrYELvmrMtGL/lKB8dLhw8+/q0Cn8OTlooI3MIwQfaqofH52zF8aJNCMlPby +f0q+LzhnwAbmnlGtVdDLJnHP9K99WkGBFvsm7PA1AW7b+ekA19CJe8+IFoscj3cf +Xe9wBCh2xRvGI41Ja/C4IVbWfWhsviHj5uMdb6Xq3IPkJ7NvXxs9M6HV0/BzGhLr +2ZUAcVkWtORgOLIuf7fUxek/dORIOCmJAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU +sWnbXpvOGrQdsmr8WiKXtiQUbzIwgdoGA1UdIwSB0jCBz4AUsWnbXpvOGrQdsmr8 +WiKXtiQUbzKhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9y +bmlhMREwDwYDVQQHDAhCZXJrZWxleTEUMBIGA1UECgwLRW5kbWFpbCBPcmcxDDAK +BgNVBAsMA01UQTEiMCAGA1UEAwwZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxNTEm +MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAxNUBlc210cC5vcmeCCQCSkWfe4O8s +5DAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMTVAZXNtdHAu +b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMTVAZXNtdHAub3JnMA0GCSqGSIb3 +DQEBBQUAA4IBAQAKzgc5dwjFOgAE6KA799JMeQIjC9rAVTmCcQoMg+Le8jv+I7yb +EzTRKQoWPwF9n/tLqhLcO365J3vsDD/A2fXYqKGcHDovQN8nGhqgdAAZt4IO+UWG +vzLaDnIKTCw5IWPDH2Fu4k26eiYaFc6x9hpZBHDt6HIFTPyExqX04kpA5EJwh5qn +AiY6RzQJ4HuIyvuZ2Zu7DFKKk9VZMAtVQrS70rFJVYGkcKBJGfJPYZSv6ddiaGWX +ZwAmuJuyLNAsg30+szFzuVVJU/qjrRsCZwiezp7rn0cNbJXpbDCSwZRnrdnjuWHq +qXKYgTpigHAgmj7EH2+9tADssf5x2pEVifeP +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: f1:41:b3:3d:ba:bd:33:49 Signature Algorithm: sha1WithRSAEncryption Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org Modified: stable/10/contrib/sendmail/FAQ ============================================================================== --- stable/10/contrib/sendmail/FAQ Thu Jul 9 05:02:13 2015 (r285302) +++ stable/10/contrib/sendmail/FAQ Thu Jul 9 05:23:17 2015 (r285303) @@ -1,8 +1,4 @@ The FAQ is no longer maintained with the sendmail release. It is available at http://www.sendmail.org/faq/ . -A plain-text version of the questions only, with URLs referring to -the answers, is posted to comp.mail.sendmail on the 10th and 25th -of each month. - -$Revision: 8.24 $, Last updated $Date: 1999-02-07 03:21:03 $ +$Revision: 8.25 $, Last updated $Date: 2014-01-27 12:49:52 $ Modified: stable/10/contrib/sendmail/INSTALL ============================================================================== --- stable/10/contrib/sendmail/INSTALL Thu Jul 9 05:02:13 2015 (r285302) +++ stable/10/contrib/sendmail/INSTALL Thu Jul 9 05:23:17 2015 (r285303) @@ -28,8 +28,9 @@ sendmail/SECURITY for more installation /etc/mail/submit.cf. This can be done in the cf/cf by using "sh ./Build install-cf". - Please read sendmail/SECURITY before continuing; you have to create a - new user smmsp and a new group smmsp for the default installation. + Please read sendmail/SECURITY before continuing; you may have to create + a new user smmsp and a new group smmsp for the default installation + if you are updating from a really old version. Then install the sendmail binary built in step 3 by cd-ing back to sendmail/ and running "sh ./Build install". Modified: stable/10/contrib/sendmail/KNOWNBUGS ============================================================================== --- stable/10/contrib/sendmail/KNOWNBUGS Thu Jul 9 05:02:13 2015 (r285302) +++ stable/10/contrib/sendmail/KNOWNBUGS Thu Jul 9 05:23:17 2015 (r285303) @@ -62,9 +62,9 @@ This list is not guaranteed to be comple libmilter and hence the communication fails. This can be avoided by increasing the constant MILTER_CHUNK_SIZE in include/libmilter/mfdef.h and recompiling sendmail, libmilter, and - all (statically linked) milters (or by using an undocumented compile - time option: _FFR_MAXDATASIZE; you have to read the source code in - order to use this properly). + all (statically linked) milters (or by using undocumented compile + time options: _FFR_MAXDATASIZE/_FFR_MDS_NEGOTIATE; you have to + read the source code in order to use these properly). * Sender addresses whose domain part cause a temporary A record lookup failure but have a valid MX record will be temporarily rejected in @@ -102,6 +102,11 @@ Kresolve sequence dnsmx canon Header addresses that have the \231 character (and possibly others in the range \201 - \237) behave in odd and usually unexpected ways. +* AuthRealm for Cyrus SASL may not work as expected. The man page + and the actual usage for sasl_server_new() seem to differ. + Feedback for the "correct" usage is welcome, a patch to match + the description of the man page is in contrib/AuthRealm.p0. + * accept() problem on SVR4. Apparently, the sendmail daemon loop (doing accept()s on the network) @@ -252,7 +257,7 @@ Kresolve sequence dnsmx canon * Race condition for delivery to set-user-ID files - Sendmail will deliver to a fail if the file is owned by the DefaultUser + Sendmail will deliver to a file if the file is owned by the DefaultUser or has the set-user-ID bit set. Unfortunately, some systems clear that bit when a file is modified. Sendmail compensates by resetting the file mode back to it's original settings. Unfortunately, there's still a Modified: stable/10/contrib/sendmail/PGPKEYS ============================================================================== --- stable/10/contrib/sendmail/PGPKEYS Thu Jul 9 05:02:13 2015 (r285302) +++ stable/10/contrib/sendmail/PGPKEYS Thu Jul 9 05:23:17 2015 (r285303) @@ -141,6 +141,185 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0= =SR28 -----END PGP PUBLIC KEY BLOCK----- + +pub 2048R/0xAAF5B5DE05BDCC53 2015-01-02 +fingerprint: 30BC A747 05FA 4154 5573 1D7B AAF5 B5DE 05BD CC53 +uid Sendmail Signing Key/2015 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1 + +mQENBFSl4rQBCADRCzgFSJkzyoOHw9/9L/+G3mzA1fWR7TgCE0WxGX7PDzyLDaUS +a4XpCDtadjXyr7c5YPo1T7ybxUH39yvUgEHBiPQDssik+bbpOiHL7V0sUDAYfKSq +YC8/MG42Oj/zd+0WUhnI+RckFYPBNDQ+sZC6ErLDxCYDZMYhG4vhJOGqAKpglNTb +w4Fdx4LNmL3e4t3z4IEtnzAqeGVxIZm8MGGFhKkb8ufpgh8Jiz4Q6cOis0ZD9K6f +LvMPRJXSBy9jBtmS2oI2e9Q5LLhmzd1PVyA8jwAlK0QfJLmlRrgRUfHFKhkf+EuW +tTi592OYCZ9bw7QVSiGVQUK+7VACfM+FQR81ABEBAAG0MVNlbmRtYWlsIFNpZ25p +bmcgS2V5LzIwMTUgPHNlbmRtYWlsQFNlbmRtYWlsLk9SRz6JATgEEwECACIFAlSl +4rQCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEKr1td4FvcxTTPMH/29J +kNmt6EGNo/eLQySB8HTenfJjZaQxwPRhq22kWgr/7WP1BR2411bopyNk4IZ0rcDr +tnyeJj4UWKJljVuXyTDQPtU8uUlgiOT8QiHEbge7MOzxrn0cy6KIOgKq+vtuxa28 +McaxjENR7XVIDFkesQ7P/yLkcCjlE6jaD4r9OIKpqEVMPs1WUFff+rsgTo7mdcgR +QowQOgYqNil5awQ5Y2Gol71hZ6oRcpqMwSd6w4dEEx2U8rF8oqJuoxeUTgNCSv0n +iFtewLznocmxlrxe1mQAeLfRmUAG4LSL6p5wx1lRjJA3gtyWRjY0404jGxkATLG4 +AtK2OkHj8MbrWLP7PKyJARwEEAECAAYFAlSl5AQACgkQYd4R7OJ2OnPHXAf/Y6Rk +rROF45+SgbsEIiDXQBcBOoO1GKe0nFTc1jfAKUHAQ94fqcDxNeFRA9fNIA2d7XNI +0Lw6W7X3RcEkF58xytIe/Y+EXDmOt/BUbpch9KIz6J9pqBhPdyHvG+ZeyA3A+TGT +ZGnnnAxNFtCjt2IID9lzZSLuWhH8+DNC2Vp15NngDTa1VIk17n5iIvi7r3V5cdIE +MblKLGm+ZaiTeccVLjwMKIUSgrLP87+yF/aaZH2kotuI7f3tD1ycN0sVZJxcFS+c +GFw7uvOarDBSm0Q/FgfhDUOJLy4w5SqVmgPEIAeogz94q0JXxSSr1XWQBD8X9XwF +f3+dPXmgMHXLGRWclYkBHAQQAQIABgUCVKXkPAAKCRA9aLJdUgfK08cnB/96BV+v +xyBx35TPg8eI/WIskdQAIpCQsm6FoO1ejbMzfWn9bImCewOp1UMlowdfQC52Hdp8 +EXnuwCpJ3rtnZctRld5dNM/clbZ+r3lr78wX7hqPUajlvxe+TMpyZbJirLn1f5Ba +yoysE4oICfzJivPfixZd7oFVr9EkftbatYenl0rgf/0lJTKRDIqNGezeeyfxaKdX +qd545wqis7PrrXDOrEq815aosG09KQBhIoPgti2us1R95nSm9z6dVCY/nSDOxL+a +Vyq/XD5KSUqbZVocY+fbR3dNX5haTvawuG0GPvl+YvYb2lW4hhi7Q4aUL7Dd4c9c +vk5+WAvfJwHtbxrgiQEcBBABAgAGBQJUpeREAAoJEI5a6fvO7vQ7OWUH/2NNxhlI +JEtvD+Nj2oPGgVQJrlFI1pbzyMCtD+6iy8Lfnp2DK+qKPMjBw96LUqcXC32VFPQr +17iyZDv26MSb/acmdIfTPpPTwJ6zEmMI8mXradeuoiWxeVHSg7n+D3u0xtikmb9Y +uRKv0yx43fcL70bqV5DzyXQte0chfRnOiwMrImWdgDekkmxE9udbtgK24rifNVGa +TBB6eHJAsFVu5Y38hsZLe10bCKyUCqT6Qywfy3RCMpXYeo6fXOk0fKatG2oi3CZp +LI+AnjmAJ0t2oMkrwUxogkK3LkShJT/aJYIR24eZm0GdzwRHZxXKClGFvdJslIea +TKHSXNK41eEIfreJARwEEAECAAYFAlSl5EgACgkQOaTHfal4hLAXfwf+M0YmlHd4 +1sfvckYhOYf99n1BGnfQx5RJn+X+EBjGyOfPKMBPQuZIlwAI20T+cFnR3WmgrmlO +IBG8qVcSDoValzNPcr0V3WGDrT75fYhf5iYj2ZsZDBUqE1VF3dAVUw40x2c1n+98 +7lbq3NtolSPYk07h5rhEhmkjdNcixv/exVCTGVwaT4X9ZHY8heETmF5tsCtPavpr +i/DjcDQQQ0sQ8um1eX41j2bhrN4MERUC5oadvSULaA2QUoWgCrzVG8zx715Au77N +jLtfA31hJI0GP/dpSREaYlqA0nwVDR5tz1TyTNwPN1ylxjQmjKXtJwx3jUtlT9Zh +qxRf+ngYHpWArokBHAQQAQIABgUCVKXkTAAKCRBgTfvyhUEKvl11B/9aYJBEEQZp +JWAT6HPmQK//i2x4y1euQfaHsjqJALvvPrgiTp/ZE3o6dKHhs+SbawsB57RtootN +maQr7x2drvBojWhJJdaouAh345qOfZYb0bD9klkr6W+Mjl5T0xWIKFEyIZn0Tcbr +8ekHgSIx2trL8LduSJou2bdPMh46PORzEpuQQ4IAyV0uRyBdNFOPwTy2OdXs51fr +M7lp1hJp84+y2a6z3vz3VCs2A9LzlnXKZ6bXljpd5dQfrmrSNXltPKA3jVLkWi8+ +rh9f1rAGsj1e6N1aVF2uJ1Y3u+U0XQ/dwa1vDF3y4KVObxYM9eNGbF4J8lGkUy2a +gZ1s1X8QzEDUiJwEEAECAAYFAlSl5FAACgkQEolum6d/JCmUSQP+KEz6xSvPSbFP +Hip4JiX1Wbvd+t3TyL0u9Fv/POwUrFIHVpTkCwOz6jsBH3TdGGiYOP5F8k/US2jU +3WB0J1mK5Rn3GwLhUGNTEeuaJZCuKE+j3qwMFmDqC/2IxEvlWtrIbTqkgf7cRv/O +O7VNv+EL0axtsrOcwZlUWe6Lc4571oaInAQQAQIABgUCVKXkUwAKCRDYqvDK9rMH +KX7xBACUFTBRCmboY/GRTHMZW1DGfcO2vMxwnYKqWomuzi/YonDCWtoTpeMDaAhY +NnIchC1mlYteIE94/+ZsoYsZeaR3fe7CN6h/deBu4tW/dQ+TW1ZPF6EuVhoviKgz +rd3rb+gcS0f0PgSPyg5LGtoMGMD9/gx1NJOTFec83jmBI95Gb4icBBABAgAGBQJU +peRXAAoJEJdDARhwk7hBAUED/0oyeD2Z4wMQ6IQEprOAWbR+vIRzaThemmCGobRw +UlM44nUXqKSM1+naLEVz/JzBuKWG00zTz6Su3NesWoFzDDUGYcIJggbOm39Pc+V8 +eXV86An64/v3P6gypJc+q9P+FFGGO884wFmYN634Mi4SDBVFUzffcghueAFcxtzt +0mH5iJwEEAECAAYFAlSl5FoACgkQHnuzyK+VliVGdwP/fmdK9MdWIzPD/6eYm6JZ +zbksaGWiqpwgp9IEr/OhSmGkXuwUsP35PFJ8FsJbEV5x/y6pP3UNp6EFRN/116ue +jp5vVM7nnj2K3V8f85J4dXCRbv+kek+Ufo1Qzm5kgvRuBxX1sXpxFX6yBM0Y6WuV +gszdbTVNlS04q6bnPFE9L4uInAQQAQIABgUCVKXkXgAKCRBwoCRNHvmSUZ/7A/9W +yQJrrdrs2SuYtoxov/pL/TVMejbnxsF8Y0dRtM/KiquP57PMQSmLqy4fTRzAMHBv +XK1aKfewTVfGKLcHIzfMfv2XcPpWfwcyMeZKtcSr25lWl9GJZP221rCok76XYwqk +BPPp0pjSwdy0Qq4sd3N3ESZmqAMWJ7ouMmlQ7VWReYicBBABAgAGBQJUpeRhAAoJ +EMjV7SmV9hdxLv0EALX3yjI2KDNG1mo5ctCSYlIlhXHQ6csHuUK9lzj9R1gVEzDU +0dEZH0+a5UXh5xf8nyTDLytUe8PxTtPit3AOP6TvTJlANULh/3MKS6317RwUe2e0 +OitWbhQAOYfpYAkSdXZACzPacxrefkxmSM3Pq+SYoumZTI2N6AvVu8MeCS0GiJwE +EAECAAYFAlSl5GQACgkQIYPhsTlvB4mWJgP/XAlvlBityADJkdN+3mp/OtdYzw04 ++dBdNtmLqWUiMZg6rPPHUQi7dfBKi95FFe2U8hxSRk8oLzSzmh/M/CP72mxKh4pi +PbmEkmKHYlNdyfCCNqXdjkBXFAKXAes/4DaBlZwvLjPtrupEaW2eYdU8cSrdeGuv +1PMLRPxRr3nPCb+InAQQAQIABgUCVKXkaAAKCRCJaWK4Z4wKA3ZVA/4iYD+xrYv0 +8I+0GZJRdEL5f7T97a7Vtf5xSxUhHDww4xC9gs8LzEGWZXoNaZEVl4j+63EnCIbY +o4g+c4m81D5NWFqeJWhWpcyvejo9hfGM3ZK/XbiF+ZTzznU5YJclGaZ7t8TY8gcx +GSWxUzxBJQcSEzAKKi286ielMAXocNx10oicBBABAgAGBQJUpeRrAAoJEDgi20fM +N08tDkwD/2F5j5irsDw+MQyLKpfPv3GRJ5J3ebOPpLQkQ5T34+qeIw4LkcXW9OJA +ohW47JLb7R8zwAlUoqmmNXtxTM0r0FlTYGPOVEnSEkMqqa3KR68B3jWAGXXdqig9 +yBxYRleawQ4ltnegBn8q7gC4MwnIAZxzK+Y8cM0Rk/FjC9+NhwrviJwEEAECAAYF +AlSl5G8ACgkQnBy94uNcVjUfvgQAlQijnoE3de1CanB0JqIN+h+XOLOpalFti+B7 +Swc2ZlnlQ9mofYPK5UHlbsiC7/TilD6xm4YEFKim9sOIMi8FNka8+EH+/d1DmS4M +qVPDssxTG6VOzn7tYOuC9qIw15IpfbHW2bk/YIImwP9nViKCMLIGw+ZgK+uiRQx9 +fT8O1NqInAQQAQIABgUCVKXkcgAKCRBvUpPYo5umVYKeA/9n63K1nF3DNY3Hckvz +tN8OrPmyCIOh+7t4sc5NHhTK0+BQTv+cgG6ig7K2cdI6VBAovs/c/u7+RrcMhp7l +45AVnycfKcNaMHKFyMHDk9FZgpRG/bv1zwDxdh+scUc3IekqkSiQ2wTjDQ5Q/BMK +L5zfOSnTOoltWjpVgsjdM75Ol4icBBABAgAGBQJUpeR2AAoJEO9YlmTUMuGd8R0D +/3mhriMu/cp3DXHnlDykqLJI1q5K4xCHOWwFYZ8DxW116AVjluJYYW1HmWcJrjK3 +cwuN3FUcsIjafanIJWCsdeZaPAyFEfUBEW0YXIIpBXRw2N7jNtrd5X6Zjptd+zW+ +4dUzvT1pqVtdPHjova3fcGLSmcdZYbddotaGi7xi7kXviJwEEAECAAYFAlSl5HoA +CgkQwZwdJRLTRh0iwwP/Y/pwp9ttAMuQUz6oH71BTkUrzu9LiI7vhrYxEquFdzCO +dE4jBNB3LGfwzjhJRtjmQ/gVhjXWWrDYnOXt3gNxb9KzmTHmSDu65cBxX54Un0pZ ++MXjjWOT2l8+GA1lXeICIoZjJL88/zEZAiaH67ch2LEix1fOaJmXJzUSmP1pR3KI +nAQQAQIABgUCVKXkfgAKCRDAKcpAFvTM6XVwA/9Eb+Dwn2lmEFFo64gj8ocpWzP8 +/sD86PP5KkZ+b/HQnGB3lsQTwsGytDvJfutLDa05sS/HWZ9wXPltX/G3omp/A1G5 +qEKzVSe0vEWedpf9wn82Ll6hzaiS5qX7r0+FpyUjY8arNrze5S4Q6Q2kjl8YduXl +wG877igRHkGpAtApxYhGBBARAgAGBQJUpeSHAAoJEBj1A4AkwngCRCMAnjHfd5db +KK6DJxrWVnEbyXs/QJGKAJsErKkiUX55B8k/P3cyzyXIaOujBYicBBABAgAGBQJU +peSOAAoJEHxLZ22gDhVjCDQD/j7DE5wyhpjHrtf0hsQcaQoVHWZb2JTLZUMRAQyj +zKMTSs0GslamlxLZmyV1HqkB+41zuJeBQtRV4gjqa5DQmWDRC2mHl7o9A40v4SDa +O1jmfU5hfJSMecucPyEcfaAG4BIMvBo6TL484uHBi45SN4Ik3f2wc6D1XOluD1vB +gIwpiJwEEAECAAYFAlSl5JMACgkQ1uCh/k++Kt2s6gP/RNcMKtx4u61vz+Aji/Fa +H9q03JxQaRgmN1q2AvZQ/NTWTXU7Y5GnH4kW/8rOoUQiR+agJsvTt4ciM+y33pZ/ +ZZLkAuo0uKelEHhdQhtRbSktKBHSgDWbiqaJJIxazeLpxcSgaoM6RW/7aIFdMtEl +ALAzTACYlTN/nKWWICn8GnGIRgQQEQIABgUCVKXkmAAKCRAh+cW892qb9aWOAKCg +aznvUX8PIvKPzoHld39xWlJ+FgCg76wrEc1h9IiIgUoqH5NWVCxcHneInAQQAQIA +BgUCVKXkngAKCRC92o/WP+p9/ancA/0Z4JHZT7NRBMr47zQvSwE4eLpSE5QDGXi7 +RNmOUgZxrxsFWRZLJCVupXDBQVZEhOBRZYqXPw1eDglOU952oj5OjaHsYnSEu7jz +VUwlp2BxZQ3mnepdUcQz1A3k2cPZ0I6KFP9hP88GU+77nubB7IqRH/Q3QKMgO0eW +yd5kYugyYYkBHAQQAQIABgUCVKXkpwAKCRC9J20ub8+ohR46CADMEvAns+L+BkVN +d9INsiR1rONrNRPT6w4dnBeTLaykkuMjc6+7s+UuXm6AMAelI28pG+fJyt/lZAGx +QLS9zFgREge0lVbOZVeAYeC1YyFsrJE4Lr2quq3fajj23tnsHmCv16znMHrh/E1m +Udm4145NprijrZn+PsjuVWYV+pxiLpLM0YBdGNwCEMi/KCQ1fcaiAZZWSqLmHIe0 +ubWDdqq8/5JRQ22SEnqP2FT/lfOmKTxMNmE0uEr4+C4fG2nd38BvzpHu9eN/4Nwx +IwzK5DhbAj+I57+VDncgkNGe1q4QY/5LaZQh/nHIcmX1ln23f9Lxkr6EYYZ1ptq+ +A8buvD+XiQEcBBABAgAGBQJUp+zrAAoJEBCQryClqlvm6AgIAKAR8HY4G9AD2jDb +ouS4Al4QICagwQ0Y7Rc2/fHyPQEAP714EimakPFVFDbSD6SW569Qtdxr+ggH4wFI +bzd21pCgIUC6nVoDotIjplMdYkNfq8AODpxn3HTBnNQ7e609xnWxFo/+httKoWok +fEP9qZk4MJq7lE75iX+wohjLwoF6v0tCB8CrBFJcfKrDvXQSGvKiaEp4g0sEfyXv +gL6X0xKMflupofdnFLJliV0WqGhBOGUghPdLsA02E3e1utj6WABmudMytRxWB8is +SWGaywaEKLSdCgi+XlQVypKeWNMbZZZcftVZ91r4iNTAkw4cv5Wea+YnngfurGCq +J/jUq7aJAiIEEgEKAAwFAlSn7r4FgweGH4AACgkQZhs61tgqu9C9Aw/+JMTXzwni +NPwBxkbcNWbnWODVEElmDloHNpr3z+ryF1XNgbiOY8dn7uwRnPoeCDhIDwvNkK+x +h4xmjH0970v1ltbzcZv0wnK6UeHQssqN9NGsXM9rbodYRIam4yxbwd1ddOC9QZFM +ToRVWiqCzGOVYL50a24OYKClGjm4ncRznXJrNwYMEjxQ3j5FOkXIn0096z3szWCY +6yDpPzOsl2TPwdjMKZWoMEDh/SvY3AxAXo1XqDCj2/+C8dDwO7kn+QAl3fUGmkI6 +dUHCAJm/WtSyvINdphzhZ1ZdkPhqDUKcR0JTX03QJ6bnu5vmmOncWm2NA7rP74fq +KE9XzT808xP0GBwR1co7Eq+/751j2TA33JSlt/hIgi5aEWc4laCingJ02yaW8tUS +DCoVNITaXcF/B47hjBgovQk8TOTsQ0nkSYvOoh05OYBmzl17G57QuPx1stRJ29QA +VLGem1v1mXAuNdHH0kNE+/Rv0A2vGqauLx9ba84RfbXMM4SJw8CjhX6OxhAM8xoU +tO6T56XZS8qLtWLkNQNZNdNlAo6tYk/cTrjdX1M63nYjoVbuc0nic6Wp+dQk/DEb +wsiIpFoisvMK6EH49v70/c9Gtg6rk5z2yBHMZsjo2Y0TheTKwKIUEz0MuTncH8jD +yB/NtQkrbiBdEqRJUoKKUtS0B4cUYTUyd+SJAhwEEAEKAAYFAlSn8agACgkQ8Ar2 +6sJF0gs2yA//cgc+g1wPRFzJeQGv5UFR3TCAMtS+/bzY3UU/eG2Jmbv2qwPbn+kx +RH5dYlZ72VHXEggBaEweCBrBWsweX5dGEMNDLNlI9ArAjjhBAZFFUQKj55EzIZpp +YTbvgxOD2ENKU2HfeQYCGFYZr3L2DXQ1k0U7VnaElBQV3o88CMi7bIsQq2aWk+c6 +Cy15UVr0niVLm95EUZM4yYm2gOGJXUeaGIExSBtiwuzvAiDEGaqfPGAi1ePkNmLJ +3UzYfgiQumSh1kDVlQkCc8UQiF6ckEma618cmmaHs5vZvHsTX5O2/qPkLpXunA/7 +5yM/Jde8a5VbNGWyZ4rmstlWR5rPd7r3uP85miHn7Arait3aGo8RQeAHzOdTvMqS +n3oCotQlOvBhOo7qA8oYQVlU0+77gOfZZeEXDZG13lU95ptFhdsGstIQH67jPQ6z +TpVnd28ip92ysrwvxPhOzO74yKcYoKtzwLctcvptlKTkrFMHP3wJwqbaSfJGK4JE +rjT8WnnWyHY465nTDN9AKkoH4WQNozniWX8OkF3CpPj7ow8roFXlPOxXH4QsaQu3 +Kk31APn/A925d4xyYuWYHZ7A/FzsHafFHPMoG3iwZyuFhfl1UXVvEd8w9mEcxXoh +2iCy87TdpesG0GDzSmWwEYEPkg20BD2+vdc0EekALDjAGM+lfBxN67KIRgQQEQIA +BgUCVKgM0gAKCRAJp6JK0eWCB94UAJ98O6S6r1hFnCLrbU3GeqrA4DCtBQCfcza/ +WoVLc3/+bOf1jzjJ/eJ20IyJAiIEEwEKAAwFAlSoCRMFgweGH4AACgkQhS2G+DXA +JIrWURAAvgl1LkqB9pRPViK1U+xa3b5zt0O/fLbov59aLhA4uPJ10BgaKptflLim +aE2EsS4Mnk0DQgGEBjlywJ5Ft3aMk3vbRz7lDE3zQ3oWa7+N4fcG7WWsAxmh0NtX +Ak7orN6rQcyGgWgpF7wOau79i4VO7oLHKeS7QNs7X59CW+k64TAJabxi74PRoVMz +843qWPjsuFIYM7n/nF0vdECwhSE8zUgcYG2n5CdA0Lq7XRE+II11VOT2XEXFMyR/ +Qh2m7l+jy12MEzHQfGC1HYBo/Zi/MRIN53Rd2LLJWQdMxz/BDiuSxZhKVeCRe7gT +Mc2k3VrmfViBoaUE0zqMbx0j29XUbNQNU3afE8MOBkmyd6AQjoswBEsgU9uyCJYD +Jq3V1stwSVBm9G7X/l8GFlPawLg/uM9gTYb2JYUYPlphTAwVcL469rKQNMhPj2ww +zT7NzjwFb9XrmyiIrqH5z2ieG+LRjajOPVPwBsqZ3gOA+z9QkU1lRYEJOTlEYCkv +8oA6ZeFm31S4JoeogbCDaMiqDszkFtYGBUgGEbnHoCgXi7aINSb17VZ8LTzpD4V9 +vGdFVuE3vJf2POMERP+buLV8OiG38cBJXb+JVSC+pkpm+32nY0UR5ccDPwAC3cGq +SbI6ftKlQeaYp3UEncFUaB8NNZings3jzRexPjzUzo0vhRkkIs2InAQQAQIABgUC +VKg5iQAKCRBfHshviAyeVbEVBACL9Vve0dF0UqO+DN4PzrTOx2JzRw7ujhcrZ6I/ +TCXjANGLWUheylRWhvxMojvbhZEg2835+9l6tpD7BVnrfkBE+LYIKFTusye+WYre +dAaHFpuN6XfmsXmhXaSodhH9gKS+oftYX61qUmiE7L98nvINNBMnFVkptCQVDl8o +GWiMRYhGBBMRAgAGBQJUqBAmAAoJEMSxB5iFeWojCtoAoLa2/SUyfC5EiKdvEbap +49v6XPyxAJ9mPvhe75aTOU7uWoa+c0wn6fXIcrkBDQRUpeK0AQgA7ctg3cJD4eTw +j4sQ94AtSYjwT+Yp7r2s6h4cHUge6AMZy9ixtyg87JnviRFob2zeo2JFDAwtl7Zs +GHo+py/mJwfQKmUsXUmQqgHJFXDiiux+4+dYOXZyVYKP5bTV0JVlKjRjSWNnh7Bv +yZNUZlrLz5ZKF1NAYKJAw4fx3TFbC4K3hvDwHQW3croPQYq0wNq6as956LHYjUOB +Q5K0uy4TXY2EcIyAy253UX9MAFgacuP1jf3ITEVZpcebzl+gcaB54gXqOfmgQQP5 +PmQDyb96ZxFsKa5UfsS3Kh0PeERa5TDlgiw55O55pUSGKKfYfOXvqpJ/ZKYl+ado +wgsmbq09UwARAQABiQEfBBgBAgAJBQJUpeK0AhsMAAoJEKr1td4FvcxTNO0IAJ2b +V48mulcdCS8G3t8qRHlEXGbxgYBQRa500M9fdgRyIWBxubP7r6/nLFDGiIpdUVmT +g9F3r1JsyK6Q7+VUp9XLirj/gT1kwxXT/UHHIQO8ObtPbfFtqISaBjaklTOUPCud ++nOpzRIfct6CZM0xAVIoqm4kaRFaWefxRiyeosDQ7tCD4lDRwxNJE2deE1WmOeN1 +YCJHa8QaewJXtUvqMq6pRmTlzSn+5/w3gV3XVF+CHjGD/COeSm7CGazLmlypN4n8 +ib9eRg0K2rAqKfUbn+aFwmqSBhBcw/UhOoXnteNQvd9KNdKiHERJEI3qZ2rLAlYf +uYT6oSAR9rPSpsZpyTI= +=Jib4 +-----END PGP PUBLIC KEY BLOCK----- + + Type Bits KeyID Created Expires Algorithm Use pub 2048 E2763A73 2014-01-02 ------- RSA Sign & Encrypt fingerprint: 49F6 A8BE 8473 3949 5191 6F3B 61DE 11EC E276 3A73 @@ -2613,4 +2792,3 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.46 $, Last updated $Date: 2014-01-18 00:20:24 $ Modified: stable/10/contrib/sendmail/README ============================================================================== --- stable/10/contrib/sendmail/README Thu Jul 9 05:02:13 2015 (r285302) +++ stable/10/contrib/sendmail/README Thu Jul 9 05:23:17 2015 (r285303) @@ -211,29 +211,11 @@ There are other files you should read. +--------------+ There are several related RFCs that you may wish to read -- they are -available via anonymous FTP to several sites. For a list of the -primary repositories see: - - http://www.isi.edu/in-notes/rfc-retrieval.txt - -They are also online at: +available from several sites, see + http://www.rfc-editor.org/ http://www.ietf.org/ -They can also be retrieved via electronic mail by sending -email to one of: - - mail-server@nisc.sri.com - Put "send rfcNNN" in message body - nis-info@nis.nsf.net - Put "send RFCnnn.TXT-1" in message body - sendrfc@jvnc.net - Put "RFCnnn" as Subject: line - -For further instructions see: - - http://www.isi.edu/in-notes/rfc-editor/rfc-info - Important RFCs for electronic mail are: RFC821 SMTP protocol Modified: stable/10/contrib/sendmail/RELEASE_NOTES ============================================================================== --- stable/10/contrib/sendmail/RELEASE_NOTES Thu Jul 9 05:02:13 2015 (r285302) +++ stable/10/contrib/sendmail/RELEASE_NOTES Thu Jul 9 05:23:17 2015 (r285303) @@ -5,6 +5,165 @@ This listing shows the version of the se of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.15.2/8.15.2 2015/07/03 + If FEATURE(`nopercenthack') is used then some bogus input triggered + a recursion which was caught and logged as + SYSERR: rewrite: excessive recursion (max 50) ... + Fix based on patch from Ondrej Holas. + DHParameters now by default uses an included 2048 bit prime. + The value 'none' previously caused a log entry claiming + there was an error "cannot read or set DH parameters". + Also note that this option applies to the server side only. + The U= mailer field didn't accept group names containing hyphens, + underbars, or periods. Based on patch from David Gwynne + of the University of Queensland. + CONFIG: Allow connections from IPv6:0:0:0:0:0:0:0:1 to relay again. + Patch from Lars-Johan Liman of Netnod Internet Exchange. + CONFIG: New option UseCompressedIPv6Addresses to select between + compressed and uncompressed IPv6 addresses. The default + value depends on the compile-time option IPV6_FULL: + For 1 the default is False, for 0 it is True, thus + preserving the current behaviour. Based on patch from + John Beck of Oracle. + CONFIG: Account for IPv6 localhost addresses in + FEATURE(`block_bad_helo'). Suggested by Andrey Chernov + from FreeBSD and Robert Scheck from the Fedora Project. + CONFIG: Account for IPv6 localhost addresses in check_mail ruleset. + LIBMILTER: Deal with more invalid protocol data to avoid potential + crashes. Problem noted by Dimitri Kirchner. + LIBMILTER: Allow a milter to specify an empty macro list ("", not + NULL) in smfi_setsymlist() so no macro is sent for the + selected stage. + MAKEMAP: A change to check TrustedUser in fewer cases which was + made in 2013 caused a potential regression when makemap + was run as root (which should not be done anyway). + Note: sendmail often contains options "For Future Releases" + (prefix _FFR_) which might be enabled in a subsequent + version or might simply be removed as they turned out not + to be really useful. These features are usually not + documented but if they are, then the required (FFR) + options are listed in + - doc/op/op.* for rulesets and macros, + - cf/README for mc/cf options. + +8.15.1/8.15.1 2014/12/06 + SECURITY: Properly set the close-on-exec flag for file descriptors + (except stdin, stdout, and stderr) before executing mailers. + If header rewriting fails due to a temporary map lookup failure, + queue the mail for later retry instead of sending it + without rewriting the header. Note: this is done + while the mail is being sent and hence the transaction + is aborted, which only works for SMTP/LMTP mailers + hence the handling of temporary map failures is + suppressed for other mailers. SMTP/LMTP servers may + complain about aborted transactions when this problem + occurs. + See also "DNS Lookups" in sendmail/TUNING. + Incompatible Change: Use uncompressed IPv6 addresses by default, + i.e., they will not contain "::". For example, + instead of ::1 it will be 0:0:0:0:0:0:0:1. This + permits a zero subnet to have a more specific match, + such as different map entries for IPv6:0:0 vs IPv6:0. + This change requires that configuration data + (including maps, files, classes, custom ruleset, + etc) must use the same format, so make certain such + configuration data is updated before using 8.15. + As a very simple check search for patterns like + 'IPv6:[0-9a-fA-F:]*::' and 'IPv6::'. If necessary, + the prior format can be retained by compiling with: + APPENDDEF(`conf_sendmail_ENVDEF', `-DIPV6_FULL=0') + in your devtools/Site/site.config.m4 file. + If debugging is turned on (-d0.14) also print the OpenSSL + versions, both build time and run time + (provided STARTTLS is compiled in). + If a connection to the MTA is dropped by the client before its + hostname can be validated, treat it as "may be forged", + so that the unvalidated hostname is not passed to a + milter in xxfi_connect(). + Add a timeout for communication with socket map servers + which can be specified using the -d option. + Add a compile time option HESIOD_ALLOW_NUMERIC_LOGIN to allow + numeric logins even if HESIOD is enabled. + The new option CertFingerprintAlgorithm specifies the finger- + print algorithm (digest) to use for the presented cert. + If the option is not set, md5 is used and the macro + {cert_md5} contains the cert fingerprint. + However, if the option is set, the specified algorithm + (e.g., sha1) is used and the macro {cert_fp} contains + the cert fingerprint. + That is, as long as the option is not set, the behaviour + does not change, but otherwise, {cert_md5} is superseded + by {cert_fp} even if you set CertFingerprintAlgorithm + to md5. + The options ServerSSLOptions and ClientSSLOptions can be used + to set SSL options for the server and client side + respectively. See SSL_CTX_set_options(3) for a list. + Note: this change turns on SSL_OP_NO_SSLv2 and + SSL_OP_NO_TICKET for the client. See doc/op/op.me + for details. + The option CipherList sets the list of ciphers for STARTTLS. + See ciphers(1) for possible values. + Do not log "STARTTLS: internal error: tls_verify_cb: ssl == NULL" + if a CRLFfile is in use (and LogLevel is 14 or higher.) + Store a more specific TLS protocol version in ${tls_version} + instead of a generic one, e.g., TLSv1 instead of + TLSv1/SSLv3. + Properly set {client_port} value on little endian machines. + Patch from Kelsey Cummings of Sonic.net. + Per RFC 3848, indicate in the Received: header whether SSL or + SMTP AUTH was negotiated by setting the protocol clause + to ESMTPS, ESMTPA, or ESMTPSA instead of ESMTP. + If the 'C' flag is listed as TLSSrvOptions the requirement for the + TLS server to have a cert is removed. This only works + under very specific circumstances and should only be used + if the consequences are understood, e.g., clients + may not work with a server using this. + The options ClientCertFile, ClientKeyFile, ServerCertFile, and + ServerKeyFile can take a second file name, which must be + separated from the first with a comma (note: do not use + any spaces) to set up a second cert/key pair. This can + be used to have certs of different types, e.g., RSA + and DSA. + A new map type "arpa" is available to reverse an IP (IPv4 or IPv6) + address. It returns the string for the PTR lookup, but + without trailing {ip6,in-addr}.arpa. + New operation mode 'C' just checks the configuration file, e.g., + sendmail -C new.cf -bC + will perform a basic syntax/consistency check of new.cf. + The mailer flag 'I' is deprecated and will be removed in a + future version. + Allow local (not just TCP) socket connections to the server, e.g., + O DaemonPortOptions=Family=local, Addr=/var/mta/server.sock + can be used. + If the new option MaxQueueAge is set to a value greater than zero, + entries in the queue will be retried during a queue run + only if the individual retry time has been reached which + is doubled for each attempt. The maximum retry time is + limited by the specified value. + New DontBlameSendmail option GroupReadableDefaultAuthInfoFile + to relax requirement for DefaultAuthInfo file. + Reset timeout after receiving a message to appropriate value if + STARTTLS is in use. Based on patch by Kelsey Cummings + of Sonic.net. + Report correct error messages from the LDAP library for a range of + small negative return values covering those used by OpenLDAP. + Fix compilation with Berkeley DB 5.0 and 6.0. Patch from + Allan E Johannesen of Worcester Polytechnic Institute. + CONFIG: FEATURE(`nopercenthack') takes one parameter: reject or + nospecial which describes whether to disallow "%" in the + local part of an address. + DEVTOOLS: Fix regression in auto-detection of libraries when only + shared libraries are available. Problem reported by + Bryan Costales. + LIBMILTER: Mark communication socket as close-on-exec in case + a user's filter starts other applications. + Based on patch from Paul Howarth. + Portability: + SunOS 5.12 has changed the API for sigwait(2) to conform + with XPG7. Based on patch from Roger Faulkner of Oracle. + Deleted Files: + libsm/path.c + 8.14.9/8.14.9 2014/05/21 SECURITY: Properly set the close-on-exec flag for file descriptors (except stdin, stdout, and stderr) before executing mailers. @@ -681,7 +840,7 @@ summary of the changes in that release. LIBMILTER: The "hostname" argument of the xxfi_connect() callback previously was the equivalent of {client_ptr}. However, this did not match the documentation of the function, hence - it has been changed to {client_name}. See doc/op/op.* + it has been changed to {client_name}. See doc/op/op.me about these macros. 8.13.7/8.13.7 2006/06/14 @@ -3509,11 +3668,11 @@ summary of the changes in that release. Add new STARTTLS related options CACERTPath, CACERTFile, ClientCertFile, ClientKeyFile, DHParameters, RandFile, ServerCertFile, and ServerKeyFile. These are documented in - cf/README and doc/op/op.*. + cf/README and doc/op/op.me. New STARTTLS related macros: ${cert_issuer}, ${cert_subject}, ${tls_version}, ${cipher}, ${cipher_bits}, ${verify}, ${server_name}, and ${server_addr}. These are documented - in cf/README and doc/op/op.*. + in cf/README and doc/op/op.me. Add support for the Entropy Gathering Daemon (EGD) for better random data. New DontBlameSendmail option InsufficientEntropy for systems which Modified: stable/10/contrib/sendmail/cf/README ============================================================================== --- stable/10/contrib/sendmail/cf/README Thu Jul 9 05:02:13 2015 (r285302) +++ stable/10/contrib/sendmail/cf/README Thu Jul 9 05:23:17 2015 (r285303) @@ -158,6 +158,26 @@ FEATURE(`local_procmail'). ******************************************************************* +Note: +Some rulesets, features, and options are only useful if the sendmail +binary has been compiled with the appropriate options, e.g., the +ruleset tls_server is only invoked if sendmail has been compiled +with STARTTLS. This is usually obvious from the context and hence +not further specified here. +There are also so called "For Future Releases" (FFR) compile time +options which might be included in a subsequent version or might +simply be removed as they turned out not to be really useful. +These are generally not documented but if they are, then the required +compile time options are listed in doc/op/op.* for rulesets and +macros, and for mc/cf specific options they are usually listed here. +In addition to compile time options for the sendmail binary, there +can also be FFRs for mc/cf which in general can be enabled when the +configuration file is generated by defining them at the top of your +.mc file: + +define(`_FFR_NAME_HERE', 1) + + +----------------------------+ | A BRIEF INTRODUCTION TO M4 | +----------------------------+ @@ -397,6 +417,10 @@ SMTP_MAILER_CHARSET [undefined] If defin that ARRIVE from an address that resolves to one of the SMTP mailers and which are converted to MIME will be labeled with this character set. +RELAY_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data + that ARRIVE from an address that resolves to the + relay mailers and which are converted to MIME will + be labeled with this character set. SMTP_MAILER_LL [990] The maximum line length for SMTP mailers (except the relay mailer). RELAY_MAILER_LL [2040] The maximum line length for the relay mailer. @@ -743,6 +767,16 @@ nouucp Don't route UUCP addresses. Thi 2. don't remove "!" from OperatorChars if `reject' is given as parameter. +nopercenthack Don't treat % as routing character. This feature takes one + parameter: + `reject': reject addresses which have % in the local + part unless it originates from a system + that is allowed to relay. + `nospecial': don't do anything special with %. + Warnings: 1. See the notice in the anti-spam section. + 2. Don't remove % from OperatorChars if `reject' is + given as parameter. + nocanonify Don't pass addresses to $[ ... $] for canonification by default, i.e., host/domain names are considered canonical, except for unqualified names, which must not be used in this @@ -1441,7 +1475,7 @@ msp Defines config file for Message Sub by default. If you have a machine with IPv6 only, change it to - FEATURE(`msp', `[IPv6:::1]') + FEATURE(`msp', `[IPv6:0:0:0:0:0:0:0:1]') If you want to continue using '[localhost]', (the behavior up to 8.12.6), use @@ -1499,8 +1533,12 @@ block_bad_helo Reject messages from SMTP - connections from IP addresses in class $={R}. Currently access_db lookups can not be used to (selectively) disable this test, moreover, + FEATURE(`delay_checks') - is required. + + is required. Note, the block_bad_helo feature automatically + adds the IPv6 and IPv4 localhost IP addresses to $={w} (local + host names) and $={R} (relay permitted). require_rdns Reject mail from connecting SMTP clients without proper rDNS (reverse DNS), functional gethostbyaddr() resolution. @@ -2442,17 +2480,19 @@ should only be used for sites which have that they provide a gateway for. Use this FEATURE with caution as it can allow spammers to relay through your server if not setup properly. -NOTICE: It is possible to relay mail through a system which the anti-relay -rules do not prevent: the case of a system that does use FEATURE(`nouucp', -`nospecial') (system A) and relays local messages to a mail hub (e.g., via -LOCAL_RELAY or LUSER_RELAY) (system B). If system B doesn't use -FEATURE(`nouucp') at all, addresses of the form - would be relayed to . -System A doesn't recognize `!' as an address separator and therefore -forwards it to the mail hub which in turns relays it because it came from -a trusted local host. So if a mailserver allows UUCP (bang-format) -addresses, all systems from which it allows relaying should do the same -or reject those addresses. +NOTICE: It is possible to relay mail through a system which the +anti-relay rules do not prevent: the case of a system that does use +FEATURE(`nouucp', `nospecial') / FEATURE(`nopercenthack', `nospecial') +(system A) and relays local messages to a mail hub (e.g., via +LOCAL_RELAY or LUSER_RELAY) (system B). If system B doesn't use the +same feature (nouucp / nopercenthack) at all, addresses of the form + / +would be relayed to . +System A doesn't recognize `!' / `%' as an address separator and +therefore forwards it to the mail hub which in turns relays it +because it came from a trusted local host. So if a mailserver +allows UUCP (bang-format) / %-hack addresses, all systems from which +it allows relaying should do the same or reject those addresses. As of 8.9, sendmail will refuse mail if the MAIL FROM: parameter has an unresolvable domain (i.e., one that DNS, your local name service, @@ -3160,17 +3200,49 @@ TLS_Clt:laptop.example.com PERM+VER TLS_Rcpt:darth@endmail.org ENCR:112+CN:smtp.endmail.org -Disabling STARTTLS And Setting SMTP Server Features ---------------------------------------------------- +TLS Options per Session +----------------------- By default STARTTLS is used whenever possible. However, there are -some broken MTAs that don't properly implement STARTTLS. To be able -to send to (or receive from) those MTAs, the ruleset try_tls -(srv_features) can be used that work together with the access map. -Entries for the access map must be tagged with Try_TLS (Srv_Features) -and refer to the hostname or IP address of the connecting system. -A default case can be specified by using just the tag. For example, -the following entries in the access map: +MTAs with STARTTLS interoperability issues. To be able to send to +(or receive from) those MTAs several features are available: + +1) Various TLS options be be set per IP/domain. +2) STARTTLS can be turned off for specific IP addresses/domains. + +About 1): the rulesets tls_srv_features and tls_clt_features can +be used to return a (semicolon separated) list of TLS related +options: + +- Options: compare {Server,Client}SSLOptions. +- CipherList: same as the global option. +- CertFile, KeyFile: {Server,Client}{Cert,Key}File + +If FEATURE(`tls_session_features') is used, then default rulesets +are activated which look up entries in the access map with the tags +TLS_Srv_features and TLS_Clt_features, respectively. +For example, these entries: + + TLS_Srv_features:10.0.2.4 CipherList=MEDIUM+aRSA; + TLS_Clt_features:10.1.0.1 Options=SSL_OP_NO_TLSv1_2; CipherList=ALL:-EXPORT + +specify a cipherlist with MEDIUM strength ciphers that use RSA +certificates only for the client with the IP address 10.0.2.4, +and turn off TLSv1.2 when connecting to the server with the IP +address 10.1.0.1 as well as setting a specific cipherlist. +If FEATURE(`tls_session_features') is not used the user can provide +their own rulesets which must return the appropriate data. +If the rulesets are not defined or do not return a value, the +default TLS options are not modified. +(These rulesets require the sendmail binary to be built with +_FFR_TLS_SE_OPTS enabled.) + +About 2): the ruleset try_tls (srv_features) can be used that work +together with the access map. Entries for the access map must be +tagged with Try_TLS (Srv_Features) and refer to the hostname or IP +address of the connecting system. A default case can be specified +by using just the tag. For example, the following entries in the +access map: Try_TLS:broken.server NO Srv_Features:my.domain v @@ -3756,6 +3828,12 @@ confSINGLE_THREAD_DELIVERY SingleThread cached but otherwise idle connection to a host will prevent other sendmails from connecting to the other host. +confUSE_COMPRESSED_IPV6_ADDRESSES + UseCompressedIPv6Addresses + [undefined] If set, use the compressed + form of IPv6 addresses, such as + IPV6:::1, instead of the uncompressed + form, such as IPv6:0:0:0:0:0:0:0:1. confUSE_ERRORS_TO* UseErrorsTo [False] Use the Errors-To: header to deliver error messages. This should not be necessary because of general @@ -3990,6 +4068,13 @@ confWORK_TIME_FACTOR RetryFactor [90000] confQUEUE_SORT_ORDER QueueSortOrder [Priority] Queue sort algorithm: Priority, Host, Filename, Random, Modification, or Time. +confMAX_QUEUE_AGE MaxQueueAge [undefined] If set to a value greater + than zero, entries in the queue + will be retried during a queue run + only if the individual retry time + has been reached which is doubled + for each attempt. The maximum retry + time is limited by the specified value. confMIN_QUEUE_AGE MinQueueAge [0] The minimum amount of time a job must sit in the queue between queue runs. This allows you to set the @@ -4208,7 +4293,7 @@ confAUTH_MECHANISMS AuthMechanisms [GSSA confAUTH_REALM AuthRealm [undefined] The authentication realm that is passed to the Cyrus SASL library. If no realm is specified, - $j is used. + $j is used. See KNOWNBUGS. confDEF_AUTH_INFO DefaultAuthInfo [undefined] Name of file that contains authentication information for outgoing connections. This file must @@ -4241,6 +4326,14 @@ confTLS_SRV_OPTIONS TLSSrvOptions If thi verification is performed, i.e., the server doesn't ask for a certificate. +confSERVER_SSL_OPTIONS ServerSSLOptions [undefined] SSL related + options for server side. See + SSL_CTX_set_options(3) for a list. +confCLIENT_SSL_OPTIONS ClientSSLOptions [undefined] SSL related + options for client side. See + SSL_CTX_set_options(3) for a list. +confCIPHER_LIST CipherList [undefined] Cipher list for TLS. + See ciphers(1) for possible values. confLDAP_DEFAULT_SPEC LDAPDefaultSpec [undefined] Default map specification for LDAP maps. The value should only contain LDAP @@ -4250,10 +4343,11 @@ confLDAP_DEFAULT_SPEC LDAPDefaultSpec [u maps unless they are specified in the individual map specification ('K' command). -confCACERT_PATH CACertPath [undefined] Path to directory - with certs of CAs. -confCACERT CACertFile [undefined] File containing one CA - cert. +confCACERT_PATH CACertPath [undefined] Path to directory with + certificates of CAs which must contain + their hashes as filenames or links. +confCACERT CACertFile [undefined] File containing at least + one CA certificate. confSERVER_CERT ServerCertFile [undefined] File containing the cert of the server, i.e., this cert is used when sendmail acts as @@ -4281,6 +4375,10 @@ confRAND_FILE RandFile [undefined] File requires this option if the compile flag HASURANDOM is not set (see sendmail/README). +confCERT_FINGERPRINT_ALGORITHM CertFingerprintAlgorithm + [undefined] The fingerprint algorithm + (digest) to use for the presented + cert. confNICE_QUEUE_RUN NiceQueueRun [undefined] If set, the priority of queue runners is set the given value (nice(3)). Modified: stable/10/contrib/sendmail/cf/cf/Makefile ============================================================================== --- stable/10/contrib/sendmail/cf/cf/Makefile Thu Jul 9 05:02:13 2015 (r285302) +++ stable/10/contrib/sendmail/cf/cf/Makefile Thu Jul 9 05:23:17 2015 (r285303) @@ -100,6 +100,7 @@ M4FILES=\ ${CFDIR}/feature/access_db.m4 \ ${CFDIR}/feature/allmasquerade.m4 \ ${CFDIR}/feature/always_add_domain.m4 \ + ${CFDIR}/feature/bcc.m4 \ ${CFDIR}/feature/bestmx_is_local.m4 \ ${CFDIR}/feature/bitdomain.m4 \ ${CFDIR}/feature/blacklist_recipients.m4 \ @@ -118,9 +119,11 @@ M4FILES=\ ${CFDIR}/feature/masquerade_envelope.m4 \ ${CFDIR}/feature/no_default_msa.m4 \ ${CFDIR}/feature/nocanonify.m4 \ + ${CFDIR}/feature/nopercenthack.m4 \ ${CFDIR}/feature/notsticky.m4 \ ${CFDIR}/feature/nouucp.m4 \ ${CFDIR}/feature/nullclient.m4 \ + ${CFDIR}/feature/prefixmod.m4 \ ${CFDIR}/feature/promiscuous_relay.m4 \ ${CFDIR}/feature/redirect.m4 \ ${CFDIR}/feature/ratecontrol.m4 \ @@ -131,12 +134,14 @@ M4FILES=\ ${CFDIR}/feature/relay_mail_from.m4 \ ${CFDIR}/feature/smrsh.m4 \ ${CFDIR}/feature/stickyhost.m4 \ + ${CFDIR}/feature/tls_session_features.m4 \ ${CFDIR}/feature/use_ct_file.m4 \ ${CFDIR}/feature/use_cw_file.m4 \ ${CFDIR}/feature/uucpdomain.m4 \ ${CFDIR}/feature/virtuser_entire_domain.m4 \ ${CFDIR}/feature/virtusertable.m4 \ ${CFDIR}/hack/cssubdomain.m4 \ + ${CFDIR}/hack/xconnect.m4 \ ${CFDIR}/m4/cf.m4 \ ${CFDIR}/m4/cfhead.m4 \ ${CFDIR}/m4/proto.m4 \ Modified: stable/10/contrib/sendmail/cf/cf/submit.cf ============================================================================== --- stable/10/contrib/sendmail/cf/cf/submit.cf Thu Jul 9 05:02:13 2015 (r285302) +++ stable/10/contrib/sendmail/cf/cf/submit.cf Thu Jul 9 05:23:17 2015 (r285303) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@lab.smi.sendmail.com on Tue May 20 12:12:52 PDT 2014 -##### in /home/ca/sm8.git/sendmail/OpenSource/sendmail-8.14.9/cf/cf +##### built by ca@sandman.dev-lab.sendmail.com on Thu Jul 2 05:24:31 PDT 2015 +##### in /x/ca/smi.git/sendmail/OpenSource/sendmail-8.15.2/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.14.9/Submit +DZ8.15.2/Submit ############### @@ -202,6 +202,9 @@ O ConnectionCacheTimeout=5m # use Errors-To: header? O UseErrorsTo=False +# use compressed IPv6 address format? +#O UseCompressedIPv6Addresses + # log level O LogLevel=9 @@ -251,6 +254,9 @@ O PrivacyOptions=goaway,noetrn,restrictq # minimum time in queue before retry #O MinQueueAge=30m +# maximum time in queue before retry (if > 0; only for exponential delay) +#O MaxQueueAge + # how many jobs can you process in the queue? #O MaxQueueRunSize=0 @@ -501,6 +507,12 @@ O PidFile=/var/spool/clientmqueue/sm-cli # SMTP STARTTLS server options #O TLSSrvOptions +# SSL cipherlist +#O CipherList +# server side SSL options +#O ServerSSLOptions +# client side SSL options +#O ClientSSLOptions # Input mail filters #O InputMailFilters @@ -524,6 +536,8 @@ O PidFile=/var/spool/clientmqueue/sm-cli #O DHParameters # Random data source (required for systems without /dev/urandom under OpenSSL) #O RandFile +# fingerprint algorithm (digest) to use for the presented cert +#O CertFingerprintAlgorithm # Maximum number of "useless" commands before slowing down #O MaxNOOPCommands=20 @@ -531,6 +545,8 @@ O PidFile=/var/spool/clientmqueue/sm-cli # Name to use for EHLO (defaults to $j) #O HeloName + + ############################ # QUEUE GROUP DEFINITIONS # ############################ @@ -645,6 +661,7 @@ R$- . $- :: $+ $@ $>Canonify2 $3 < @ $1 # if we have % signs, take the rightmost one R$* % $* $1 @ $2 First make them all @s. R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last. + R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish # else we must be a local name @@ -781,6 +798,7 @@ R$* $=O $* < @ *LOCAL* > $@ $>Parse0 $>canonify $1 $2 $3 ...@*LOCAL* -> ... R$* < @ *LOCAL* > $: $1 + # # Parse1 -- the bottom half of ruleset 0. # @@ -818,6 +836,8 @@ R$* < @$* > $* $#esmtp $@ $2 $: $1 < @ R$=L $#local $: @ $1 special local names R$+ $#local $: $1 regular local names + + ########################################################################### ### Ruleset 5 -- special rewriting after aliases have been expanded ### ########################################################################### @@ -1027,6 +1047,10 @@ R$* $| $* $: $2 R<@> < $* @ localhost > $: < ? $&{client_name} > < $1 @ localhost > R<@> < $* @ [127.0.0.1] > $: < ? $&{client_name} > < $1 @ [127.0.0.1] > +R<@> < $* @ [IPv6:0:0:0:0:0:0:0:1] > + $: < ? $&{client_name} > < $1 @ [IPv6:0:0:0:0:0:0:0:1] > +R<@> < $* @ [IPv6:::1] > + $: < ? $&{client_name} > < $1 @ [IPv6:::1] > R<@> < $* @ localhost.$m > $: < ? $&{client_name} > < $1 @ localhost.$m > R<@> < $* @ localhost.UUCP > @@ -1141,6 +1165,7 @@ R$* $: $&{client_addr} R$@ $@ RELAY originated locally R0 $@ RELAY originated locally R127.0.0.1 $@ RELAY originated locally +RIPv6:0:0:0:0:0:0:0:1 $@ RELAY originated locally RIPv6:::1 $@ RELAY originated locally R$=R $* $@ RELAY relayable IP address R$* $: [ $1 ] put brackets around it... @@ -1245,6 +1270,8 @@ STLS_connection RSOFTWARE $#error $@ 4.7.0 $: "403 TLS handshake." + + ###################################################################### ### RelayTLS: allow relaying based on TLS authentication ### @@ -1442,7 +1469,7 @@ Mrelay, P=[IPC], F=mDFMuXa8k, S=EnvFrom ### submit.mc ### # divert(-1) # # *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jul 9 05:25:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46FF298CF32; Thu, 9 Jul 2015 05:25:49 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 3258A19DF; Thu, 9 Jul 2015 05:25:49 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t695Pnix003911; Thu, 9 Jul 2015 05:25:49 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t695PmBp003904; Thu, 9 Jul 2015 05:25:48 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507090525.t695PmBp003904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Thu, 9 Jul 2015 05:25:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285304 - stable/10/etc/sendmail X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 05:25:49 -0000 Author: gshapiro Date: Thu Jul 9 05:25:47 2015 New Revision: 285304 URL: https://svnweb.freebsd.org/changeset/base/285304 Log: MFC: Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.15.2/cf tree. Approved by: re (gjb) Modified: stable/10/etc/sendmail/freebsd.mc stable/10/etc/sendmail/freebsd.submit.mc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/sendmail/freebsd.mc ============================================================================== --- stable/10/etc/sendmail/freebsd.mc Thu Jul 9 05:23:17 2015 (r285303) +++ stable/10/etc/sendmail/freebsd.mc Thu Jul 9 05:25:47 2015 (r285304) @@ -42,7 +42,6 @@ divert(-1) # /usr/share/sendmail/cf/README or # /usr/src/contrib/sendmail/cf/README # -# # NOTE: If you enable RunAsUser, make sure that you adjust the permissions # and owner of the SSL certificates and keys in /etc/mail/certs to be usable # by that user. Modified: stable/10/etc/sendmail/freebsd.submit.mc ============================================================================== --- stable/10/etc/sendmail/freebsd.submit.mc Thu Jul 9 05:23:17 2015 (r285303) +++ stable/10/etc/sendmail/freebsd.submit.mc Thu Jul 9 05:25:47 2015 (r285304) @@ -7,7 +7,6 @@ divert(-1) # forth in the LICENSE file which can be found at the top level of # the sendmail distribution. # -# # # This is the FreeBSD configuration for a set-group-ID sm-msp sendmail From owner-svn-src-all@freebsd.org Thu Jul 9 05:27:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C01098CF71; Thu, 9 Jul 2015 05:27:31 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 2BA541B1E; Thu, 9 Jul 2015 05:27:31 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t695RVUj004256; Thu, 9 Jul 2015 05:27:31 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t695RVkO004255; Thu, 9 Jul 2015 05:27:31 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507090527.t695RVkO004255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Thu, 9 Jul 2015 05:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285305 - stable/10/contrib/sendmail X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 05:27:31 -0000 Author: gshapiro Date: Thu Jul 9 05:27:30 2015 New Revision: 285305 URL: https://svnweb.freebsd.org/changeset/base/285305 Log: MFC: Update for sendmail 8.15.2 import Approved by: re (gjb) Modified: stable/10/contrib/sendmail/FREEBSD-upgrade Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- stable/10/contrib/sendmail/FREEBSD-upgrade Thu Jul 9 05:25:47 2015 (r285304) +++ stable/10/contrib/sendmail/FREEBSD-upgrade Thu Jul 9 05:27:30 2015 (r285305) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.14.9 +sendmail 8.15.2 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -97,4 +97,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -21-May-2014 +08-July-2015 From owner-svn-src-all@freebsd.org Thu Jul 9 05:46:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99DDF9952C2; Thu, 9 Jul 2015 05:46:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 8968F114E; Thu, 9 Jul 2015 05:46:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t695kcwe014593; Thu, 9 Jul 2015 05:46:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t695kcMm014592; Thu, 9 Jul 2015 05:46:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507090546.t695kcMm014592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 9 Jul 2015 05:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285306 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 05:46:38 -0000 Author: gjb Date: Thu Jul 9 05:46:37 2015 New Revision: 285306 URL: https://svnweb.freebsd.org/changeset/base/285306 Log: Document r285305, sendmail update to 8.15.2. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jul 9 05:27:30 2015 (r285305) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jul 9 05:46:37 2015 (r285306) @@ -245,6 +245,9 @@ The &man.unbound.8; utility has been updated to version 1.5.3. + + The sendmail + utility has been updated to version 8.15.2. From owner-svn-src-all@freebsd.org Thu Jul 9 07:20:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28D94996444; Thu, 9 Jul 2015 07:20:22 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 167A21CB4; Thu, 9 Jul 2015 07:20:22 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t697KMeF064465; Thu, 9 Jul 2015 07:20:22 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t697KFKC064426; Thu, 9 Jul 2015 07:20:15 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201507090720.t697KFKC064426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 9 Jul 2015 07:20:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285307 - in head/sys: compat/cloudabi compat/cloudabi64 conf contrib/cloudabi kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 07:20:22 -0000 Author: ed Date: Thu Jul 9 07:20:15 2015 New Revision: 285307 URL: https://svnweb.freebsd.org/changeset/base/285307 Log: Import the CloudABI datatypes and create a system call table. CloudABI is a pure capability-based runtime environment for UNIX. It works similar to Capsicum, except that processes already run in capabilities mode on startup. All functionality that conflicts with this model has been omitted, making it a compact binary interface that can be supported by other operating systems without too much effort. CloudABI is 'secure by default'; the idea is that it should be safe to run arbitrary third-party binaries without requiring any explicit hardware virtualization (Bhyve) or namespace virtualization (Jails). The rights of an application are purely determined by the set of file descriptors that you grant it on startup. The datatypes and constants used by CloudABI's C library (cloudlibc) are defined in separate files called syscalldefs_mi.h (pointer size independent) and syscalldefs_md.h (pointer size dependent). We import these files in sys/contrib/cloudabi and wrap around them in cloudabi*_syscalldefs.h. We then add stubs for all of the system calls in sys/compat/cloudabi or sys/compat/cloudabi64, depending on whether the system call depends on the pointer size. We only have nine system calls that depend on the pointer size. If we ever want to support 32-bit binaries, we can simply add sys/compat/cloudabi32 and implement these nine system calls again. The next step is to send in code reviews for the individual system call implementations, but also add a sysentvec, to allow CloudABI executabled to be started through execve(). More information about CloudABI: - GitHub: https://github.com/NuxiNL/cloudlibc - Talk at BSDCan: https://www.youtube.com/watch?v=SVdF84x1EdA Differential Revision: https://reviews.freebsd.org/D2848 Reviewed by: emaste, brooks Obtained from: https://github.com/NuxiNL/freebsd Added: head/sys/compat/cloudabi/ head/sys/compat/cloudabi/cloudabi_clock.c (contents, props changed) head/sys/compat/cloudabi/cloudabi_fd.c (contents, props changed) head/sys/compat/cloudabi/cloudabi_file.c (contents, props changed) head/sys/compat/cloudabi/cloudabi_futex.c (contents, props changed) head/sys/compat/cloudabi/cloudabi_mem.c (contents, props changed) head/sys/compat/cloudabi/cloudabi_proc.c (contents, props changed) head/sys/compat/cloudabi/cloudabi_proto.h (contents, props changed) head/sys/compat/cloudabi/cloudabi_random.c (contents, props changed) head/sys/compat/cloudabi/cloudabi_sock.c (contents, props changed) head/sys/compat/cloudabi/cloudabi_syscalldefs.h (contents, props changed) head/sys/compat/cloudabi/cloudabi_thread.c (contents, props changed) head/sys/compat/cloudabi64/ head/sys/compat/cloudabi64/Makefile (contents, props changed) head/sys/compat/cloudabi64/cloudabi64_fd.c (contents, props changed) head/sys/compat/cloudabi64/cloudabi64_poll.c (contents, props changed) head/sys/compat/cloudabi64/cloudabi64_sock.c (contents, props changed) head/sys/compat/cloudabi64/cloudabi64_syscalldefs.h (contents, props changed) head/sys/compat/cloudabi64/cloudabi64_thread.c (contents, props changed) head/sys/compat/cloudabi64/syscalls.conf (contents, props changed) head/sys/compat/cloudabi64/syscalls.master (contents, props changed) head/sys/contrib/cloudabi/ head/sys/contrib/cloudabi/syscalldefs_md.h (contents, props changed) head/sys/contrib/cloudabi/syscalldefs_mi.h (contents, props changed) Modified: head/sys/conf/files head/sys/conf/options head/sys/kern/makesyscalls.sh Added: head/sys/compat/cloudabi/cloudabi_clock.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi/cloudabi_clock.c Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +int +cloudabi_sys_clock_res_get(struct thread *td, + struct cloudabi_sys_clock_res_get_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_clock_time_get(struct thread *td, + struct cloudabi_sys_clock_time_get_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} Added: head/sys/compat/cloudabi/cloudabi_fd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi/cloudabi_fd.c Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,115 @@ +/*- + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +int +cloudabi_sys_fd_close(struct thread *td, struct cloudabi_sys_fd_close_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_fd_create1(struct thread *td, + struct cloudabi_sys_fd_create1_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_fd_create2(struct thread *td, + struct cloudabi_sys_fd_create2_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_fd_datasync(struct thread *td, + struct cloudabi_sys_fd_datasync_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_fd_dup(struct thread *td, struct cloudabi_sys_fd_dup_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_fd_replace(struct thread *td, + struct cloudabi_sys_fd_replace_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_fd_seek(struct thread *td, struct cloudabi_sys_fd_seek_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_fd_stat_get(struct thread *td, + struct cloudabi_sys_fd_stat_get_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_fd_stat_put(struct thread *td, + struct cloudabi_sys_fd_stat_put_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_fd_sync(struct thread *td, struct cloudabi_sys_fd_sync_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} Added: head/sys/compat/cloudabi/cloudabi_file.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi/cloudabi_file.c Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,155 @@ +/*- + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +int +cloudabi_sys_file_advise(struct thread *td, + struct cloudabi_sys_file_advise_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_file_allocate(struct thread *td, + struct cloudabi_sys_file_allocate_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_file_create(struct thread *td, + struct cloudabi_sys_file_create_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_file_link(struct thread *td, + struct cloudabi_sys_file_link_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_file_open(struct thread *td, + struct cloudabi_sys_file_open_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_file_readdir(struct thread *td, + struct cloudabi_sys_file_readdir_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_file_readlink(struct thread *td, + struct cloudabi_sys_file_readlink_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_file_rename(struct thread *td, + struct cloudabi_sys_file_rename_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_file_stat_fget(struct thread *td, + struct cloudabi_sys_file_stat_fget_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_file_stat_fput(struct thread *td, + struct cloudabi_sys_file_stat_fput_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_file_stat_get(struct thread *td, + struct cloudabi_sys_file_stat_get_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_file_stat_put(struct thread *td, + struct cloudabi_sys_file_stat_put_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_file_symlink(struct thread *td, + struct cloudabi_sys_file_symlink_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_file_unlink(struct thread *td, + struct cloudabi_sys_file_unlink_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} Added: head/sys/compat/cloudabi/cloudabi_futex.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi/cloudabi_futex.c Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +int +cloudabi_sys_condvar_signal(struct thread *td, + struct cloudabi_sys_condvar_signal_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_lock_unlock(struct thread *td, + struct cloudabi_sys_lock_unlock_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} Added: head/sys/compat/cloudabi/cloudabi_mem.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi/cloudabi_mem.c Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,89 @@ +/*- + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +int +cloudabi_sys_mem_advise(struct thread *td, + struct cloudabi_sys_mem_advise_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_mem_lock(struct thread *td, struct cloudabi_sys_mem_lock_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_mem_map(struct thread *td, struct cloudabi_sys_mem_map_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_mem_protect(struct thread *td, + struct cloudabi_sys_mem_protect_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_mem_sync(struct thread *td, struct cloudabi_sys_mem_sync_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_mem_unlock(struct thread *td, + struct cloudabi_sys_mem_unlock_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_mem_unmap(struct thread *td, + struct cloudabi_sys_mem_unmap_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} Added: head/sys/compat/cloudabi/cloudabi_proc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi/cloudabi_proc.c Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,65 @@ +/*- + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +int +cloudabi_sys_proc_exec(struct thread *td, + struct cloudabi_sys_proc_exec_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_proc_exit(struct thread *td, + struct cloudabi_sys_proc_exit_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_proc_fork(struct thread *td, + struct cloudabi_sys_proc_fork_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_proc_raise(struct thread *td, + struct cloudabi_sys_proc_raise_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} Added: head/sys/compat/cloudabi/cloudabi_proto.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi/cloudabi_proto.h Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * This should provide all prototypes for the machine-independent system + * calls. Unfortunately, we don't have a separate system call table for + * those, so rely on the system call table from COMPAT_CLOUDABI64. + */ +#include +#include Added: head/sys/compat/cloudabi/cloudabi_random.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi/cloudabi_random.c Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +int +cloudabi_sys_random_get(struct thread *td, + struct cloudabi_sys_random_get_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} Added: head/sys/compat/cloudabi/cloudabi_sock.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi/cloudabi_sock.c Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,83 @@ +/*- + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +int +cloudabi_sys_sock_accept(struct thread *td, + struct cloudabi_sys_sock_accept_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_sock_bind(struct thread *td, + struct cloudabi_sys_sock_bind_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_sock_connect(struct thread *td, + struct cloudabi_sys_sock_connect_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_sock_listen(struct thread *td, + struct cloudabi_sys_sock_listen_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_sock_shutdown(struct thread *td, + struct cloudabi_sys_sock_shutdown_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_sock_stat_get(struct thread *td, + struct cloudabi_sys_sock_stat_get_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} Added: head/sys/compat/cloudabi/cloudabi_syscalldefs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi/cloudabi_syscalldefs.h Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _CLOUDABI_SYSCALLDEFS_H_ +#define _CLOUDABI_SYSCALLDEFS_H_ + +#include + +#define alignas _Alignas +#define alignof _Alignof +#define static_assert _Static_assert + +/* Import machine-independent CloudABI definitions. */ +#include + +#endif Added: head/sys/compat/cloudabi/cloudabi_thread.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi/cloudabi_thread.c Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +int +cloudabi_sys_thread_exit(struct thread *td, + struct cloudabi_sys_thread_exit_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi_sys_thread_yield(struct thread *td, + struct cloudabi_sys_thread_yield_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} Added: head/sys/compat/cloudabi64/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi64/Makefile Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +all: + @echo "make sysent only" + +sysent: cloudabi64_sysent.c cloudabi64_syscall.h cloudabi64_proto.h \ + cloudabi64_syscalls.c cloudabi64_systrace_args.c + +cloudabi64_sysent.c cloudabi64_syscall.h cloudabi64_proto.h \ + cloudabi64_syscalls.c cloudabi64_systrace_args.c: \ + ../../kern/makesyscalls.sh syscalls.master syscalls.conf + sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf Added: head/sys/compat/cloudabi64/cloudabi64_fd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi64/cloudabi64_fd.c Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +int +cloudabi64_sys_fd_pread(struct thread *td, + struct cloudabi64_sys_fd_pread_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi64_sys_fd_pwrite(struct thread *td, + struct cloudabi64_sys_fd_pwrite_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi64_sys_fd_read(struct thread *td, + struct cloudabi64_sys_fd_read_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi64_sys_fd_write(struct thread *td, + struct cloudabi64_sys_fd_write_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} Added: head/sys/compat/cloudabi64/cloudabi64_poll.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi64/cloudabi64_poll.c Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +int +cloudabi64_sys_poll(struct thread *td, struct cloudabi64_sys_poll_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} Added: head/sys/compat/cloudabi64/cloudabi64_sock.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi64/cloudabi64_sock.c Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +int +cloudabi64_sys_sock_recv(struct thread *td, + struct cloudabi64_sys_sock_recv_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} + +int +cloudabi64_sys_sock_send(struct thread *td, + struct cloudabi64_sys_sock_send_args *uap) +{ + + /* Not implemented. */ + return (ENOSYS); +} Added: head/sys/compat/cloudabi64/cloudabi64_syscalldefs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi64/cloudabi64_syscalldefs.h Thu Jul 9 07:20:15 2015 (r285307) @@ -0,0 +1,45 @@ +/*- + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _CLOUDABI64_SYSCALLDEFS_H_ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jul 9 07:21:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD0B499647B; Thu, 9 Jul 2015 07:21:35 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 C76931F7B; Thu, 9 Jul 2015 07:21:35 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t697LZ4f065867; Thu, 9 Jul 2015 07:21:35 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t697LY1E065859; Thu, 9 Jul 2015 07:21:34 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201507090721.t697LY1E065859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 9 Jul 2015 07:21:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285308 - head/sys/compat/cloudabi64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 07:21:36 -0000 Author: ed Date: Thu Jul 9 07:21:33 2015 New Revision: 285308 URL: https://svnweb.freebsd.org/changeset/base/285308 Log: Generate CloudABI system call table with proper $FreeBSD$ tags. Added: head/sys/compat/cloudabi64/cloudabi64_proto.h (contents, props changed) head/sys/compat/cloudabi64/cloudabi64_syscall.h (contents, props changed) head/sys/compat/cloudabi64/cloudabi64_syscalls.c (contents, props changed) head/sys/compat/cloudabi64/cloudabi64_sysent.c (contents, props changed) head/sys/compat/cloudabi64/cloudabi64_systrace_args.c (contents, props changed) Added: head/sys/compat/cloudabi64/cloudabi64_proto.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi64/cloudabi64_proto.h Thu Jul 9 07:21:33 2015 (r285308) @@ -0,0 +1,453 @@ +/* + * System call prototypes. + * + * DO NOT EDIT-- this file is automatically generated. + * $FreeBSD$ + * created from FreeBSD: head/sys/compat/cloudabi64/syscalls.master 285307 2015-07-09 07:20:15Z ed + */ + +#ifndef _CLOUDABI64_SYSPROTO_H_ +#define _CLOUDABI64_SYSPROTO_H_ + +#include +#include +#include +#include +#include +#include +#include + +#include + +struct proc; + +struct thread; + +#define PAD_(t) (sizeof(register_t) <= sizeof(t) ? \ + 0 : sizeof(register_t) - sizeof(t)) + +#if BYTE_ORDER == LITTLE_ENDIAN +#define PADL_(t) 0 +#define PADR_(t) PAD_(t) +#else +#define PADL_(t) PAD_(t) +#define PADR_(t) 0 +#endif + +struct cloudabi_sys_clock_res_get_args { + char clock_id_l_[PADL_(cloudabi_clockid_t)]; cloudabi_clockid_t clock_id; char clock_id_r_[PADR_(cloudabi_clockid_t)]; +}; +struct cloudabi_sys_clock_time_get_args { + char clock_id_l_[PADL_(cloudabi_clockid_t)]; cloudabi_clockid_t clock_id; char clock_id_r_[PADR_(cloudabi_clockid_t)]; + char precision_l_[PADL_(cloudabi_timestamp_t)]; cloudabi_timestamp_t precision; char precision_r_[PADR_(cloudabi_timestamp_t)]; +}; +struct cloudabi_sys_condvar_signal_args { + char condvar_l_[PADL_(cloudabi_condvar_t *)]; cloudabi_condvar_t * condvar; char condvar_r_[PADR_(cloudabi_condvar_t *)]; + char nwaiters_l_[PADL_(cloudabi_nthreads_t)]; cloudabi_nthreads_t nwaiters; char nwaiters_r_[PADR_(cloudabi_nthreads_t)]; +}; +struct cloudabi_sys_fd_close_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; +}; +struct cloudabi_sys_fd_create1_args { + char type_l_[PADL_(cloudabi_filetype_t)]; cloudabi_filetype_t type; char type_r_[PADR_(cloudabi_filetype_t)]; +}; +struct cloudabi_sys_fd_create2_args { + char type_l_[PADL_(cloudabi_filetype_t)]; cloudabi_filetype_t type; char type_r_[PADR_(cloudabi_filetype_t)]; +}; +struct cloudabi_sys_fd_datasync_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; +}; +struct cloudabi_sys_fd_dup_args { + char from_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t from; char from_r_[PADR_(cloudabi_fd_t)]; +}; +struct cloudabi64_sys_fd_pread_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char iov_l_[PADL_(const cloudabi64_iovec_t *)]; const cloudabi64_iovec_t * iov; char iov_r_[PADR_(const cloudabi64_iovec_t *)]; + char iovcnt_l_[PADL_(cloudabi64_size_t)]; cloudabi64_size_t iovcnt; char iovcnt_r_[PADR_(cloudabi64_size_t)]; + char offset_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t offset; char offset_r_[PADR_(cloudabi_filesize_t)]; +}; +struct cloudabi64_sys_fd_pwrite_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char iov_l_[PADL_(const cloudabi64_ciovec_t *)]; const cloudabi64_ciovec_t * iov; char iov_r_[PADR_(const cloudabi64_ciovec_t *)]; + char iovcnt_l_[PADL_(cloudabi64_size_t)]; cloudabi64_size_t iovcnt; char iovcnt_r_[PADR_(cloudabi64_size_t)]; + char offset_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t offset; char offset_r_[PADR_(cloudabi_filesize_t)]; +}; +struct cloudabi64_sys_fd_read_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char iov_l_[PADL_(const cloudabi64_iovec_t *)]; const cloudabi64_iovec_t * iov; char iov_r_[PADR_(const cloudabi64_iovec_t *)]; + char iovcnt_l_[PADL_(cloudabi64_size_t)]; cloudabi64_size_t iovcnt; char iovcnt_r_[PADR_(cloudabi64_size_t)]; +}; +struct cloudabi_sys_fd_replace_args { + char from_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t from; char from_r_[PADR_(cloudabi_fd_t)]; + char to_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t to; char to_r_[PADR_(cloudabi_fd_t)]; +}; +struct cloudabi_sys_fd_seek_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char offset_l_[PADL_(cloudabi_filedelta_t)]; cloudabi_filedelta_t offset; char offset_r_[PADR_(cloudabi_filedelta_t)]; + char whence_l_[PADL_(cloudabi_whence_t)]; cloudabi_whence_t whence; char whence_r_[PADR_(cloudabi_whence_t)]; +}; +struct cloudabi_sys_fd_stat_get_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char buf_l_[PADL_(cloudabi_fdstat_t *)]; cloudabi_fdstat_t * buf; char buf_r_[PADR_(cloudabi_fdstat_t *)]; +}; +struct cloudabi_sys_fd_stat_put_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char buf_l_[PADL_(const cloudabi_fdstat_t *)]; const cloudabi_fdstat_t * buf; char buf_r_[PADR_(const cloudabi_fdstat_t *)]; + char flags_l_[PADL_(cloudabi_fdsflags_t)]; cloudabi_fdsflags_t flags; char flags_r_[PADR_(cloudabi_fdsflags_t)]; +}; +struct cloudabi_sys_fd_sync_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; +}; +struct cloudabi64_sys_fd_write_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char iov_l_[PADL_(const cloudabi64_ciovec_t *)]; const cloudabi64_ciovec_t * iov; char iov_r_[PADR_(const cloudabi64_ciovec_t *)]; + char iovcnt_l_[PADL_(cloudabi64_size_t)]; cloudabi64_size_t iovcnt; char iovcnt_r_[PADR_(cloudabi64_size_t)]; +}; +struct cloudabi_sys_file_advise_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char offset_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t offset; char offset_r_[PADR_(cloudabi_filesize_t)]; + char len_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t len; char len_r_[PADR_(cloudabi_filesize_t)]; + char advice_l_[PADL_(cloudabi_advice_t)]; cloudabi_advice_t advice; char advice_r_[PADR_(cloudabi_advice_t)]; +}; +struct cloudabi_sys_file_allocate_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char offset_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t offset; char offset_r_[PADR_(cloudabi_filesize_t)]; + char len_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t len; char len_r_[PADR_(cloudabi_filesize_t)]; +}; +struct cloudabi_sys_file_create_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char type_l_[PADL_(cloudabi_filetype_t)]; cloudabi_filetype_t type; char type_r_[PADR_(cloudabi_filetype_t)]; +}; +struct cloudabi_sys_file_link_args { + char fd1_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t fd1; char fd1_r_[PADR_(cloudabi_lookup_t)]; + char path1_l_[PADL_(const char *)]; const char * path1; char path1_r_[PADR_(const char *)]; + char path1len_l_[PADL_(size_t)]; size_t path1len; char path1len_r_[PADR_(size_t)]; + char fd2_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd2; char fd2_r_[PADR_(cloudabi_fd_t)]; + char path2_l_[PADL_(const char *)]; const char * path2; char path2_r_[PADR_(const char *)]; + char path2len_l_[PADL_(size_t)]; size_t path2len; char path2len_r_[PADR_(size_t)]; +}; +struct cloudabi_sys_file_open_args { + char fd_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t fd; char fd_r_[PADR_(cloudabi_lookup_t)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char oflags_l_[PADL_(cloudabi_oflags_t)]; cloudabi_oflags_t oflags; char oflags_r_[PADR_(cloudabi_oflags_t)]; + char fds_l_[PADL_(const cloudabi_fdstat_t *)]; const cloudabi_fdstat_t * fds; char fds_r_[PADR_(const cloudabi_fdstat_t *)]; +}; +struct cloudabi_sys_file_readdir_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; + char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; + char cookie_l_[PADL_(cloudabi_dircookie_t)]; cloudabi_dircookie_t cookie; char cookie_r_[PADR_(cloudabi_dircookie_t)]; +}; +struct cloudabi_sys_file_readlink_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; + char bufsize_l_[PADL_(size_t)]; size_t bufsize; char bufsize_r_[PADR_(size_t)]; +}; +struct cloudabi_sys_file_rename_args { + char oldfd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t oldfd; char oldfd_r_[PADR_(cloudabi_fd_t)]; + char old_l_[PADL_(const char *)]; const char * old; char old_r_[PADR_(const char *)]; + char oldlen_l_[PADL_(size_t)]; size_t oldlen; char oldlen_r_[PADR_(size_t)]; + char newfd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t newfd; char newfd_r_[PADR_(cloudabi_fd_t)]; + char new_l_[PADL_(const char *)]; const char * new; char new_r_[PADR_(const char *)]; + char newlen_l_[PADL_(size_t)]; size_t newlen; char newlen_r_[PADR_(size_t)]; +}; +struct cloudabi_sys_file_stat_fget_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char buf_l_[PADL_(cloudabi_filestat_t *)]; cloudabi_filestat_t * buf; char buf_r_[PADR_(cloudabi_filestat_t *)]; +}; +struct cloudabi_sys_file_stat_fput_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char buf_l_[PADL_(const cloudabi_filestat_t *)]; const cloudabi_filestat_t * buf; char buf_r_[PADR_(const cloudabi_filestat_t *)]; + char flags_l_[PADL_(cloudabi_fsflags_t)]; cloudabi_fsflags_t flags; char flags_r_[PADR_(cloudabi_fsflags_t)]; +}; +struct cloudabi_sys_file_stat_get_args { + char fd_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t fd; char fd_r_[PADR_(cloudabi_lookup_t)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char buf_l_[PADL_(cloudabi_filestat_t *)]; cloudabi_filestat_t * buf; char buf_r_[PADR_(cloudabi_filestat_t *)]; +}; +struct cloudabi_sys_file_stat_put_args { + char fd_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t fd; char fd_r_[PADR_(cloudabi_lookup_t)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char buf_l_[PADL_(const cloudabi_filestat_t *)]; const cloudabi_filestat_t * buf; char buf_r_[PADR_(const cloudabi_filestat_t *)]; + char flags_l_[PADL_(cloudabi_fsflags_t)]; cloudabi_fsflags_t flags; char flags_r_[PADR_(cloudabi_fsflags_t)]; +}; +struct cloudabi_sys_file_symlink_args { + char path1_l_[PADL_(const char *)]; const char * path1; char path1_r_[PADR_(const char *)]; + char path1len_l_[PADL_(size_t)]; size_t path1len; char path1len_r_[PADR_(size_t)]; + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char path2_l_[PADL_(const char *)]; const char * path2; char path2_r_[PADR_(const char *)]; + char path2len_l_[PADL_(size_t)]; size_t path2len; char path2len_r_[PADR_(size_t)]; +}; +struct cloudabi_sys_file_unlink_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; + char flag_l_[PADL_(cloudabi_ulflags_t)]; cloudabi_ulflags_t flag; char flag_r_[PADR_(cloudabi_ulflags_t)]; +}; +struct cloudabi_sys_lock_unlock_args { + char lock_l_[PADL_(cloudabi_lock_t *)]; cloudabi_lock_t * lock; char lock_r_[PADR_(cloudabi_lock_t *)]; +}; +struct cloudabi_sys_mem_advise_args { + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; + char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char advice_l_[PADL_(cloudabi_advice_t)]; cloudabi_advice_t advice; char advice_r_[PADR_(cloudabi_advice_t)]; +}; +struct cloudabi_sys_mem_lock_args { + char addr_l_[PADL_(const void *)]; const void * addr; char addr_r_[PADR_(const void *)]; + char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; +}; +struct cloudabi_sys_mem_map_args { + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; + char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char prot_l_[PADL_(cloudabi_mprot_t)]; cloudabi_mprot_t prot; char prot_r_[PADR_(cloudabi_mprot_t)]; + char flags_l_[PADL_(cloudabi_mflags_t)]; cloudabi_mflags_t flags; char flags_r_[PADR_(cloudabi_mflags_t)]; + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char off_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t off; char off_r_[PADR_(cloudabi_filesize_t)]; +}; +struct cloudabi_sys_mem_protect_args { + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; + char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char prot_l_[PADL_(cloudabi_mprot_t)]; cloudabi_mprot_t prot; char prot_r_[PADR_(cloudabi_mprot_t)]; +}; +struct cloudabi_sys_mem_sync_args { + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; + char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char flags_l_[PADL_(cloudabi_msflags_t)]; cloudabi_msflags_t flags; char flags_r_[PADR_(cloudabi_msflags_t)]; +}; +struct cloudabi_sys_mem_unlock_args { + char addr_l_[PADL_(const void *)]; const void * addr; char addr_r_[PADR_(const void *)]; + char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; +}; +struct cloudabi_sys_mem_unmap_args { + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; + char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; +}; +struct cloudabi64_sys_poll_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char in_l_[PADL_(const cloudabi64_subscription_t *)]; const cloudabi64_subscription_t * in; char in_r_[PADR_(const cloudabi64_subscription_t *)]; + char nin_l_[PADL_(cloudabi64_size_t)]; cloudabi64_size_t nin; char nin_r_[PADR_(cloudabi64_size_t)]; + char out_l_[PADL_(cloudabi64_event_t *)]; cloudabi64_event_t * out; char out_r_[PADR_(cloudabi64_event_t *)]; + char nout_l_[PADL_(cloudabi64_size_t)]; cloudabi64_size_t nout; char nout_r_[PADR_(cloudabi64_size_t)]; +}; +struct cloudabi_sys_proc_exec_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char data_l_[PADL_(const void *)]; const void * data; char data_r_[PADR_(const void *)]; + char datalen_l_[PADL_(size_t)]; size_t datalen; char datalen_r_[PADR_(size_t)]; + char fds_l_[PADL_(const cloudabi_fd_t *)]; const cloudabi_fd_t * fds; char fds_r_[PADR_(const cloudabi_fd_t *)]; + char fdslen_l_[PADL_(size_t)]; size_t fdslen; char fdslen_r_[PADR_(size_t)]; +}; +struct cloudabi_sys_proc_exit_args { + char rval_l_[PADL_(cloudabi_exitcode_t)]; cloudabi_exitcode_t rval; char rval_r_[PADR_(cloudabi_exitcode_t)]; +}; +struct cloudabi_sys_proc_fork_args { + register_t dummy; +}; +struct cloudabi_sys_proc_raise_args { + char sig_l_[PADL_(cloudabi_signal_t)]; cloudabi_signal_t sig; char sig_r_[PADR_(cloudabi_signal_t)]; +}; +struct cloudabi_sys_random_get_args { + char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; + char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; +}; +struct cloudabi_sys_sock_accept_args { + char s_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t s; char s_r_[PADR_(cloudabi_fd_t)]; + char buf_l_[PADL_(cloudabi_sockstat_t *)]; cloudabi_sockstat_t * buf; char buf_r_[PADR_(cloudabi_sockstat_t *)]; +}; +struct cloudabi_sys_sock_bind_args { + char s_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t s; char s_r_[PADR_(cloudabi_fd_t)]; + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; +}; +struct cloudabi_sys_sock_connect_args { + char s_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t s; char s_r_[PADR_(cloudabi_fd_t)]; + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)]; +}; +struct cloudabi_sys_sock_listen_args { + char s_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t s; char s_r_[PADR_(cloudabi_fd_t)]; + char backlog_l_[PADL_(cloudabi_backlog_t)]; cloudabi_backlog_t backlog; char backlog_r_[PADR_(cloudabi_backlog_t)]; +}; +struct cloudabi64_sys_sock_recv_args { + char s_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t s; char s_r_[PADR_(cloudabi_fd_t)]; + char in_l_[PADL_(const cloudabi64_recv_in_t *)]; const cloudabi64_recv_in_t * in; char in_r_[PADR_(const cloudabi64_recv_in_t *)]; + char out_l_[PADL_(cloudabi64_recv_out_t *)]; cloudabi64_recv_out_t * out; char out_r_[PADR_(cloudabi64_recv_out_t *)]; +}; +struct cloudabi64_sys_sock_send_args { + char s_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t s; char s_r_[PADR_(cloudabi_fd_t)]; + char in_l_[PADL_(const cloudabi64_send_in_t *)]; const cloudabi64_send_in_t * in; char in_r_[PADR_(const cloudabi64_send_in_t *)]; + char out_l_[PADL_(cloudabi64_send_out_t *)]; cloudabi64_send_out_t * out; char out_r_[PADR_(cloudabi64_send_out_t *)]; +}; +struct cloudabi_sys_sock_shutdown_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char how_l_[PADL_(cloudabi_sdflags_t)]; cloudabi_sdflags_t how; char how_r_[PADR_(cloudabi_sdflags_t)]; +}; +struct cloudabi_sys_sock_stat_get_args { + char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; + char buf_l_[PADL_(cloudabi_sockstat_t *)]; cloudabi_sockstat_t * buf; char buf_r_[PADR_(cloudabi_sockstat_t *)]; + char flags_l_[PADL_(cloudabi_ssflags_t)]; cloudabi_ssflags_t flags; char flags_r_[PADR_(cloudabi_ssflags_t)]; +}; +struct cloudabi64_sys_thread_create_args { + char attr_l_[PADL_(cloudabi64_threadattr_t *)]; cloudabi64_threadattr_t * attr; char attr_r_[PADR_(cloudabi64_threadattr_t *)]; +}; +struct cloudabi_sys_thread_exit_args { + char lock_l_[PADL_(cloudabi_lock_t *)]; cloudabi_lock_t * lock; char lock_r_[PADR_(cloudabi_lock_t *)]; +}; +struct cloudabi64_sys_thread_tcb_set_args { + char tcb_l_[PADL_(void *)]; void * tcb; char tcb_r_[PADR_(void *)]; +}; +struct cloudabi_sys_thread_yield_args { + register_t dummy; +}; +int cloudabi_sys_clock_res_get(struct thread *, struct cloudabi_sys_clock_res_get_args *); +int cloudabi_sys_clock_time_get(struct thread *, struct cloudabi_sys_clock_time_get_args *); +int cloudabi_sys_condvar_signal(struct thread *, struct cloudabi_sys_condvar_signal_args *); +int cloudabi_sys_fd_close(struct thread *, struct cloudabi_sys_fd_close_args *); +int cloudabi_sys_fd_create1(struct thread *, struct cloudabi_sys_fd_create1_args *); +int cloudabi_sys_fd_create2(struct thread *, struct cloudabi_sys_fd_create2_args *); +int cloudabi_sys_fd_datasync(struct thread *, struct cloudabi_sys_fd_datasync_args *); +int cloudabi_sys_fd_dup(struct thread *, struct cloudabi_sys_fd_dup_args *); +int cloudabi64_sys_fd_pread(struct thread *, struct cloudabi64_sys_fd_pread_args *); +int cloudabi64_sys_fd_pwrite(struct thread *, struct cloudabi64_sys_fd_pwrite_args *); +int cloudabi64_sys_fd_read(struct thread *, struct cloudabi64_sys_fd_read_args *); +int cloudabi_sys_fd_replace(struct thread *, struct cloudabi_sys_fd_replace_args *); +int cloudabi_sys_fd_seek(struct thread *, struct cloudabi_sys_fd_seek_args *); +int cloudabi_sys_fd_stat_get(struct thread *, struct cloudabi_sys_fd_stat_get_args *); +int cloudabi_sys_fd_stat_put(struct thread *, struct cloudabi_sys_fd_stat_put_args *); +int cloudabi_sys_fd_sync(struct thread *, struct cloudabi_sys_fd_sync_args *); +int cloudabi64_sys_fd_write(struct thread *, struct cloudabi64_sys_fd_write_args *); +int cloudabi_sys_file_advise(struct thread *, struct cloudabi_sys_file_advise_args *); +int cloudabi_sys_file_allocate(struct thread *, struct cloudabi_sys_file_allocate_args *); +int cloudabi_sys_file_create(struct thread *, struct cloudabi_sys_file_create_args *); +int cloudabi_sys_file_link(struct thread *, struct cloudabi_sys_file_link_args *); +int cloudabi_sys_file_open(struct thread *, struct cloudabi_sys_file_open_args *); +int cloudabi_sys_file_readdir(struct thread *, struct cloudabi_sys_file_readdir_args *); +int cloudabi_sys_file_readlink(struct thread *, struct cloudabi_sys_file_readlink_args *); +int cloudabi_sys_file_rename(struct thread *, struct cloudabi_sys_file_rename_args *); +int cloudabi_sys_file_stat_fget(struct thread *, struct cloudabi_sys_file_stat_fget_args *); +int cloudabi_sys_file_stat_fput(struct thread *, struct cloudabi_sys_file_stat_fput_args *); +int cloudabi_sys_file_stat_get(struct thread *, struct cloudabi_sys_file_stat_get_args *); +int cloudabi_sys_file_stat_put(struct thread *, struct cloudabi_sys_file_stat_put_args *); +int cloudabi_sys_file_symlink(struct thread *, struct cloudabi_sys_file_symlink_args *); +int cloudabi_sys_file_unlink(struct thread *, struct cloudabi_sys_file_unlink_args *); +int cloudabi_sys_lock_unlock(struct thread *, struct cloudabi_sys_lock_unlock_args *); +int cloudabi_sys_mem_advise(struct thread *, struct cloudabi_sys_mem_advise_args *); +int cloudabi_sys_mem_lock(struct thread *, struct cloudabi_sys_mem_lock_args *); +int cloudabi_sys_mem_map(struct thread *, struct cloudabi_sys_mem_map_args *); +int cloudabi_sys_mem_protect(struct thread *, struct cloudabi_sys_mem_protect_args *); +int cloudabi_sys_mem_sync(struct thread *, struct cloudabi_sys_mem_sync_args *); +int cloudabi_sys_mem_unlock(struct thread *, struct cloudabi_sys_mem_unlock_args *); +int cloudabi_sys_mem_unmap(struct thread *, struct cloudabi_sys_mem_unmap_args *); +int cloudabi64_sys_poll(struct thread *, struct cloudabi64_sys_poll_args *); +int cloudabi_sys_proc_exec(struct thread *, struct cloudabi_sys_proc_exec_args *); +int cloudabi_sys_proc_exit(struct thread *, struct cloudabi_sys_proc_exit_args *); +int cloudabi_sys_proc_fork(struct thread *, struct cloudabi_sys_proc_fork_args *); +int cloudabi_sys_proc_raise(struct thread *, struct cloudabi_sys_proc_raise_args *); +int cloudabi_sys_random_get(struct thread *, struct cloudabi_sys_random_get_args *); +int cloudabi_sys_sock_accept(struct thread *, struct cloudabi_sys_sock_accept_args *); +int cloudabi_sys_sock_bind(struct thread *, struct cloudabi_sys_sock_bind_args *); +int cloudabi_sys_sock_connect(struct thread *, struct cloudabi_sys_sock_connect_args *); +int cloudabi_sys_sock_listen(struct thread *, struct cloudabi_sys_sock_listen_args *); +int cloudabi64_sys_sock_recv(struct thread *, struct cloudabi64_sys_sock_recv_args *); +int cloudabi64_sys_sock_send(struct thread *, struct cloudabi64_sys_sock_send_args *); +int cloudabi_sys_sock_shutdown(struct thread *, struct cloudabi_sys_sock_shutdown_args *); +int cloudabi_sys_sock_stat_get(struct thread *, struct cloudabi_sys_sock_stat_get_args *); +int cloudabi64_sys_thread_create(struct thread *, struct cloudabi64_sys_thread_create_args *); +int cloudabi_sys_thread_exit(struct thread *, struct cloudabi_sys_thread_exit_args *); +int cloudabi64_sys_thread_tcb_set(struct thread *, struct cloudabi64_sys_thread_tcb_set_args *); +int cloudabi_sys_thread_yield(struct thread *, struct cloudabi_sys_thread_yield_args *); + +#ifdef COMPAT_43 + + +#endif /* COMPAT_43 */ + + +#ifdef COMPAT_FREEBSD4 + + +#endif /* COMPAT_FREEBSD4 */ + + +#ifdef COMPAT_FREEBSD6 + + +#endif /* COMPAT_FREEBSD6 */ + + +#ifdef COMPAT_FREEBSD7 + + +#endif /* COMPAT_FREEBSD7 */ + +#define CLOUDABI64_SYS_AUE_cloudabi_sys_clock_res_get AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_clock_time_get AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_condvar_signal AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_fd_close AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_fd_create1 AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_fd_create2 AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_fd_datasync AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_fd_dup AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi64_sys_fd_pread AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi64_sys_fd_pwrite AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi64_sys_fd_read AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_fd_replace AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_fd_seek AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_fd_stat_get AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_fd_stat_put AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_fd_sync AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi64_sys_fd_write AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_file_advise AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_file_allocate AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_file_create AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_file_link AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_file_open AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_file_readdir AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_file_readlink AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_file_rename AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_file_stat_fget AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_file_stat_fput AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_file_stat_get AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_file_stat_put AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_file_symlink AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_file_unlink AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_lock_unlock AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_mem_advise AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_mem_lock AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_mem_map AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_mem_protect AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_mem_sync AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_mem_unlock AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_mem_unmap AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi64_sys_poll AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_proc_exec AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_proc_exit AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_proc_fork AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_proc_raise AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_random_get AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_sock_accept AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_sock_bind AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_sock_connect AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_sock_listen AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi64_sys_sock_recv AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi64_sys_sock_send AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_sock_shutdown AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_sock_stat_get AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi64_sys_thread_create AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_thread_exit AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi64_sys_thread_tcb_set AUE_NULL +#define CLOUDABI64_SYS_AUE_cloudabi_sys_thread_yield AUE_NULL + +#undef PAD_ +#undef PADL_ +#undef PADR_ + +#endif /* !_CLOUDABI64_SYSPROTO_H_ */ Added: head/sys/compat/cloudabi64/cloudabi64_syscall.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi64/cloudabi64_syscall.h Thu Jul 9 07:21:33 2015 (r285308) @@ -0,0 +1,66 @@ +/* + * System call numbers. + * + * DO NOT EDIT-- this file is automatically generated. + * $FreeBSD$ + * created from FreeBSD: head/sys/compat/cloudabi64/syscalls.master 285307 2015-07-09 07:20:15Z ed + */ + +#define CLOUDABI64_SYS_cloudabi_sys_clock_res_get 0 +#define CLOUDABI64_SYS_cloudabi_sys_clock_time_get 1 +#define CLOUDABI64_SYS_cloudabi_sys_condvar_signal 2 +#define CLOUDABI64_SYS_cloudabi_sys_fd_close 3 +#define CLOUDABI64_SYS_cloudabi_sys_fd_create1 4 +#define CLOUDABI64_SYS_cloudabi_sys_fd_create2 5 +#define CLOUDABI64_SYS_cloudabi_sys_fd_datasync 6 +#define CLOUDABI64_SYS_cloudabi_sys_fd_dup 7 +#define CLOUDABI64_SYS_cloudabi64_sys_fd_pread 8 +#define CLOUDABI64_SYS_cloudabi64_sys_fd_pwrite 9 +#define CLOUDABI64_SYS_cloudabi64_sys_fd_read 10 +#define CLOUDABI64_SYS_cloudabi_sys_fd_replace 11 +#define CLOUDABI64_SYS_cloudabi_sys_fd_seek 12 +#define CLOUDABI64_SYS_cloudabi_sys_fd_stat_get 13 +#define CLOUDABI64_SYS_cloudabi_sys_fd_stat_put 14 +#define CLOUDABI64_SYS_cloudabi_sys_fd_sync 15 +#define CLOUDABI64_SYS_cloudabi64_sys_fd_write 16 +#define CLOUDABI64_SYS_cloudabi_sys_file_advise 17 +#define CLOUDABI64_SYS_cloudabi_sys_file_allocate 18 +#define CLOUDABI64_SYS_cloudabi_sys_file_create 19 +#define CLOUDABI64_SYS_cloudabi_sys_file_link 20 +#define CLOUDABI64_SYS_cloudabi_sys_file_open 21 +#define CLOUDABI64_SYS_cloudabi_sys_file_readdir 22 +#define CLOUDABI64_SYS_cloudabi_sys_file_readlink 23 +#define CLOUDABI64_SYS_cloudabi_sys_file_rename 24 +#define CLOUDABI64_SYS_cloudabi_sys_file_stat_fget 25 +#define CLOUDABI64_SYS_cloudabi_sys_file_stat_fput 26 +#define CLOUDABI64_SYS_cloudabi_sys_file_stat_get 27 +#define CLOUDABI64_SYS_cloudabi_sys_file_stat_put 28 +#define CLOUDABI64_SYS_cloudabi_sys_file_symlink 29 +#define CLOUDABI64_SYS_cloudabi_sys_file_unlink 30 +#define CLOUDABI64_SYS_cloudabi_sys_lock_unlock 31 +#define CLOUDABI64_SYS_cloudabi_sys_mem_advise 32 +#define CLOUDABI64_SYS_cloudabi_sys_mem_lock 33 +#define CLOUDABI64_SYS_cloudabi_sys_mem_map 34 +#define CLOUDABI64_SYS_cloudabi_sys_mem_protect 35 +#define CLOUDABI64_SYS_cloudabi_sys_mem_sync 36 +#define CLOUDABI64_SYS_cloudabi_sys_mem_unlock 37 +#define CLOUDABI64_SYS_cloudabi_sys_mem_unmap 38 +#define CLOUDABI64_SYS_cloudabi64_sys_poll 39 +#define CLOUDABI64_SYS_cloudabi_sys_proc_exec 40 +#define CLOUDABI64_SYS_cloudabi_sys_proc_exit 41 +#define CLOUDABI64_SYS_cloudabi_sys_proc_fork 42 +#define CLOUDABI64_SYS_cloudabi_sys_proc_raise 43 +#define CLOUDABI64_SYS_cloudabi_sys_random_get 44 +#define CLOUDABI64_SYS_cloudabi_sys_sock_accept 45 +#define CLOUDABI64_SYS_cloudabi_sys_sock_bind 46 +#define CLOUDABI64_SYS_cloudabi_sys_sock_connect 47 +#define CLOUDABI64_SYS_cloudabi_sys_sock_listen 48 +#define CLOUDABI64_SYS_cloudabi64_sys_sock_recv 49 +#define CLOUDABI64_SYS_cloudabi64_sys_sock_send 50 +#define CLOUDABI64_SYS_cloudabi_sys_sock_shutdown 51 +#define CLOUDABI64_SYS_cloudabi_sys_sock_stat_get 52 +#define CLOUDABI64_SYS_cloudabi64_sys_thread_create 53 +#define CLOUDABI64_SYS_cloudabi_sys_thread_exit 54 +#define CLOUDABI64_SYS_cloudabi64_sys_thread_tcb_set 55 +#define CLOUDABI64_SYS_cloudabi_sys_thread_yield 56 +#define CLOUDABI64_SYS_MAXSYSCALL 57 Added: head/sys/compat/cloudabi64/cloudabi64_syscalls.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi64/cloudabi64_syscalls.c Thu Jul 9 07:21:33 2015 (r285308) @@ -0,0 +1,67 @@ +/* + * System call names. + * + * DO NOT EDIT-- this file is automatically generated. + * $FreeBSD$ + * created from FreeBSD: head/sys/compat/cloudabi64/syscalls.master 285307 2015-07-09 07:20:15Z ed + */ + +const char *cloudabi64_syscallnames[] = { + "cloudabi_sys_clock_res_get", /* 0 = cloudabi_sys_clock_res_get */ + "cloudabi_sys_clock_time_get", /* 1 = cloudabi_sys_clock_time_get */ + "cloudabi_sys_condvar_signal", /* 2 = cloudabi_sys_condvar_signal */ + "cloudabi_sys_fd_close", /* 3 = cloudabi_sys_fd_close */ + "cloudabi_sys_fd_create1", /* 4 = cloudabi_sys_fd_create1 */ + "cloudabi_sys_fd_create2", /* 5 = cloudabi_sys_fd_create2 */ + "cloudabi_sys_fd_datasync", /* 6 = cloudabi_sys_fd_datasync */ + "cloudabi_sys_fd_dup", /* 7 = cloudabi_sys_fd_dup */ + "cloudabi64_sys_fd_pread", /* 8 = cloudabi64_sys_fd_pread */ + "cloudabi64_sys_fd_pwrite", /* 9 = cloudabi64_sys_fd_pwrite */ + "cloudabi64_sys_fd_read", /* 10 = cloudabi64_sys_fd_read */ + "cloudabi_sys_fd_replace", /* 11 = cloudabi_sys_fd_replace */ + "cloudabi_sys_fd_seek", /* 12 = cloudabi_sys_fd_seek */ + "cloudabi_sys_fd_stat_get", /* 13 = cloudabi_sys_fd_stat_get */ + "cloudabi_sys_fd_stat_put", /* 14 = cloudabi_sys_fd_stat_put */ + "cloudabi_sys_fd_sync", /* 15 = cloudabi_sys_fd_sync */ + "cloudabi64_sys_fd_write", /* 16 = cloudabi64_sys_fd_write */ + "cloudabi_sys_file_advise", /* 17 = cloudabi_sys_file_advise */ + "cloudabi_sys_file_allocate", /* 18 = cloudabi_sys_file_allocate */ + "cloudabi_sys_file_create", /* 19 = cloudabi_sys_file_create */ + "cloudabi_sys_file_link", /* 20 = cloudabi_sys_file_link */ + "cloudabi_sys_file_open", /* 21 = cloudabi_sys_file_open */ + "cloudabi_sys_file_readdir", /* 22 = cloudabi_sys_file_readdir */ + "cloudabi_sys_file_readlink", /* 23 = cloudabi_sys_file_readlink */ + "cloudabi_sys_file_rename", /* 24 = cloudabi_sys_file_rename */ + "cloudabi_sys_file_stat_fget", /* 25 = cloudabi_sys_file_stat_fget */ + "cloudabi_sys_file_stat_fput", /* 26 = cloudabi_sys_file_stat_fput */ + "cloudabi_sys_file_stat_get", /* 27 = cloudabi_sys_file_stat_get */ + "cloudabi_sys_file_stat_put", /* 28 = cloudabi_sys_file_stat_put */ + "cloudabi_sys_file_symlink", /* 29 = cloudabi_sys_file_symlink */ + "cloudabi_sys_file_unlink", /* 30 = cloudabi_sys_file_unlink */ + "cloudabi_sys_lock_unlock", /* 31 = cloudabi_sys_lock_unlock */ + "cloudabi_sys_mem_advise", /* 32 = cloudabi_sys_mem_advise */ + "cloudabi_sys_mem_lock", /* 33 = cloudabi_sys_mem_lock */ + "cloudabi_sys_mem_map", /* 34 = cloudabi_sys_mem_map */ + "cloudabi_sys_mem_protect", /* 35 = cloudabi_sys_mem_protect */ + "cloudabi_sys_mem_sync", /* 36 = cloudabi_sys_mem_sync */ + "cloudabi_sys_mem_unlock", /* 37 = cloudabi_sys_mem_unlock */ + "cloudabi_sys_mem_unmap", /* 38 = cloudabi_sys_mem_unmap */ + "cloudabi64_sys_poll", /* 39 = cloudabi64_sys_poll */ + "cloudabi_sys_proc_exec", /* 40 = cloudabi_sys_proc_exec */ + "cloudabi_sys_proc_exit", /* 41 = cloudabi_sys_proc_exit */ + "cloudabi_sys_proc_fork", /* 42 = cloudabi_sys_proc_fork */ + "cloudabi_sys_proc_raise", /* 43 = cloudabi_sys_proc_raise */ + "cloudabi_sys_random_get", /* 44 = cloudabi_sys_random_get */ + "cloudabi_sys_sock_accept", /* 45 = cloudabi_sys_sock_accept */ + "cloudabi_sys_sock_bind", /* 46 = cloudabi_sys_sock_bind */ + "cloudabi_sys_sock_connect", /* 47 = cloudabi_sys_sock_connect */ + "cloudabi_sys_sock_listen", /* 48 = cloudabi_sys_sock_listen */ + "cloudabi64_sys_sock_recv", /* 49 = cloudabi64_sys_sock_recv */ + "cloudabi64_sys_sock_send", /* 50 = cloudabi64_sys_sock_send */ + "cloudabi_sys_sock_shutdown", /* 51 = cloudabi_sys_sock_shutdown */ + "cloudabi_sys_sock_stat_get", /* 52 = cloudabi_sys_sock_stat_get */ + "cloudabi64_sys_thread_create", /* 53 = cloudabi64_sys_thread_create */ + "cloudabi_sys_thread_exit", /* 54 = cloudabi_sys_thread_exit */ + "cloudabi64_sys_thread_tcb_set", /* 55 = cloudabi64_sys_thread_tcb_set */ + "cloudabi_sys_thread_yield", /* 56 = cloudabi_sys_thread_yield */ +}; Added: head/sys/compat/cloudabi64/cloudabi64_sysent.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi64/cloudabi64_sysent.c Thu Jul 9 07:21:33 2015 (r285308) @@ -0,0 +1,75 @@ +/* + * System call switch table. + * + * DO NOT EDIT-- this file is automatically generated. + * $FreeBSD$ + * created from FreeBSD: head/sys/compat/cloudabi64/syscalls.master 285307 2015-07-09 07:20:15Z ed + */ + +#include +#include +#include +#include + +#define AS(name) (sizeof(struct name) / sizeof(register_t)) + +/* The casts are bogus but will do for now. */ +struct sysent cloudabi64_sysent[] = { + { AS(cloudabi_sys_clock_res_get_args), (sy_call_t *)cloudabi_sys_clock_res_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 0 = cloudabi_sys_clock_res_get */ + { AS(cloudabi_sys_clock_time_get_args), (sy_call_t *)cloudabi_sys_clock_time_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 1 = cloudabi_sys_clock_time_get */ + { AS(cloudabi_sys_condvar_signal_args), (sy_call_t *)cloudabi_sys_condvar_signal, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 2 = cloudabi_sys_condvar_signal */ + { AS(cloudabi_sys_fd_close_args), (sy_call_t *)cloudabi_sys_fd_close, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 3 = cloudabi_sys_fd_close */ + { AS(cloudabi_sys_fd_create1_args), (sy_call_t *)cloudabi_sys_fd_create1, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 4 = cloudabi_sys_fd_create1 */ + { AS(cloudabi_sys_fd_create2_args), (sy_call_t *)cloudabi_sys_fd_create2, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 5 = cloudabi_sys_fd_create2 */ + { AS(cloudabi_sys_fd_datasync_args), (sy_call_t *)cloudabi_sys_fd_datasync, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 6 = cloudabi_sys_fd_datasync */ + { AS(cloudabi_sys_fd_dup_args), (sy_call_t *)cloudabi_sys_fd_dup, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 7 = cloudabi_sys_fd_dup */ + { AS(cloudabi64_sys_fd_pread_args), (sy_call_t *)cloudabi64_sys_fd_pread, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 8 = cloudabi64_sys_fd_pread */ + { AS(cloudabi64_sys_fd_pwrite_args), (sy_call_t *)cloudabi64_sys_fd_pwrite, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 9 = cloudabi64_sys_fd_pwrite */ + { AS(cloudabi64_sys_fd_read_args), (sy_call_t *)cloudabi64_sys_fd_read, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 10 = cloudabi64_sys_fd_read */ + { AS(cloudabi_sys_fd_replace_args), (sy_call_t *)cloudabi_sys_fd_replace, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 11 = cloudabi_sys_fd_replace */ + { AS(cloudabi_sys_fd_seek_args), (sy_call_t *)cloudabi_sys_fd_seek, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 12 = cloudabi_sys_fd_seek */ + { AS(cloudabi_sys_fd_stat_get_args), (sy_call_t *)cloudabi_sys_fd_stat_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 13 = cloudabi_sys_fd_stat_get */ + { AS(cloudabi_sys_fd_stat_put_args), (sy_call_t *)cloudabi_sys_fd_stat_put, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 14 = cloudabi_sys_fd_stat_put */ + { AS(cloudabi_sys_fd_sync_args), (sy_call_t *)cloudabi_sys_fd_sync, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 15 = cloudabi_sys_fd_sync */ + { AS(cloudabi64_sys_fd_write_args), (sy_call_t *)cloudabi64_sys_fd_write, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 16 = cloudabi64_sys_fd_write */ + { AS(cloudabi_sys_file_advise_args), (sy_call_t *)cloudabi_sys_file_advise, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 17 = cloudabi_sys_file_advise */ + { AS(cloudabi_sys_file_allocate_args), (sy_call_t *)cloudabi_sys_file_allocate, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 18 = cloudabi_sys_file_allocate */ + { AS(cloudabi_sys_file_create_args), (sy_call_t *)cloudabi_sys_file_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 19 = cloudabi_sys_file_create */ + { AS(cloudabi_sys_file_link_args), (sy_call_t *)cloudabi_sys_file_link, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 20 = cloudabi_sys_file_link */ + { AS(cloudabi_sys_file_open_args), (sy_call_t *)cloudabi_sys_file_open, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 21 = cloudabi_sys_file_open */ + { AS(cloudabi_sys_file_readdir_args), (sy_call_t *)cloudabi_sys_file_readdir, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 22 = cloudabi_sys_file_readdir */ + { AS(cloudabi_sys_file_readlink_args), (sy_call_t *)cloudabi_sys_file_readlink, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 23 = cloudabi_sys_file_readlink */ + { AS(cloudabi_sys_file_rename_args), (sy_call_t *)cloudabi_sys_file_rename, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 24 = cloudabi_sys_file_rename */ + { AS(cloudabi_sys_file_stat_fget_args), (sy_call_t *)cloudabi_sys_file_stat_fget, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 25 = cloudabi_sys_file_stat_fget */ + { AS(cloudabi_sys_file_stat_fput_args), (sy_call_t *)cloudabi_sys_file_stat_fput, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 26 = cloudabi_sys_file_stat_fput */ + { AS(cloudabi_sys_file_stat_get_args), (sy_call_t *)cloudabi_sys_file_stat_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 27 = cloudabi_sys_file_stat_get */ + { AS(cloudabi_sys_file_stat_put_args), (sy_call_t *)cloudabi_sys_file_stat_put, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 28 = cloudabi_sys_file_stat_put */ + { AS(cloudabi_sys_file_symlink_args), (sy_call_t *)cloudabi_sys_file_symlink, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 29 = cloudabi_sys_file_symlink */ + { AS(cloudabi_sys_file_unlink_args), (sy_call_t *)cloudabi_sys_file_unlink, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 30 = cloudabi_sys_file_unlink */ + { AS(cloudabi_sys_lock_unlock_args), (sy_call_t *)cloudabi_sys_lock_unlock, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 31 = cloudabi_sys_lock_unlock */ + { AS(cloudabi_sys_mem_advise_args), (sy_call_t *)cloudabi_sys_mem_advise, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 32 = cloudabi_sys_mem_advise */ + { AS(cloudabi_sys_mem_lock_args), (sy_call_t *)cloudabi_sys_mem_lock, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 33 = cloudabi_sys_mem_lock */ + { AS(cloudabi_sys_mem_map_args), (sy_call_t *)cloudabi_sys_mem_map, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 34 = cloudabi_sys_mem_map */ + { AS(cloudabi_sys_mem_protect_args), (sy_call_t *)cloudabi_sys_mem_protect, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 35 = cloudabi_sys_mem_protect */ + { AS(cloudabi_sys_mem_sync_args), (sy_call_t *)cloudabi_sys_mem_sync, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 36 = cloudabi_sys_mem_sync */ + { AS(cloudabi_sys_mem_unlock_args), (sy_call_t *)cloudabi_sys_mem_unlock, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 37 = cloudabi_sys_mem_unlock */ + { AS(cloudabi_sys_mem_unmap_args), (sy_call_t *)cloudabi_sys_mem_unmap, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 38 = cloudabi_sys_mem_unmap */ + { AS(cloudabi64_sys_poll_args), (sy_call_t *)cloudabi64_sys_poll, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 39 = cloudabi64_sys_poll */ + { AS(cloudabi_sys_proc_exec_args), (sy_call_t *)cloudabi_sys_proc_exec, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 40 = cloudabi_sys_proc_exec */ + { AS(cloudabi_sys_proc_exit_args), (sy_call_t *)cloudabi_sys_proc_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 41 = cloudabi_sys_proc_exit */ + { 0, (sy_call_t *)cloudabi_sys_proc_fork, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 42 = cloudabi_sys_proc_fork */ + { AS(cloudabi_sys_proc_raise_args), (sy_call_t *)cloudabi_sys_proc_raise, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 43 = cloudabi_sys_proc_raise */ + { AS(cloudabi_sys_random_get_args), (sy_call_t *)cloudabi_sys_random_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 44 = cloudabi_sys_random_get */ + { AS(cloudabi_sys_sock_accept_args), (sy_call_t *)cloudabi_sys_sock_accept, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 45 = cloudabi_sys_sock_accept */ + { AS(cloudabi_sys_sock_bind_args), (sy_call_t *)cloudabi_sys_sock_bind, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 46 = cloudabi_sys_sock_bind */ + { AS(cloudabi_sys_sock_connect_args), (sy_call_t *)cloudabi_sys_sock_connect, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 47 = cloudabi_sys_sock_connect */ + { AS(cloudabi_sys_sock_listen_args), (sy_call_t *)cloudabi_sys_sock_listen, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 48 = cloudabi_sys_sock_listen */ + { AS(cloudabi64_sys_sock_recv_args), (sy_call_t *)cloudabi64_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 49 = cloudabi64_sys_sock_recv */ + { AS(cloudabi64_sys_sock_send_args), (sy_call_t *)cloudabi64_sys_sock_send, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 50 = cloudabi64_sys_sock_send */ + { AS(cloudabi_sys_sock_shutdown_args), (sy_call_t *)cloudabi_sys_sock_shutdown, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 51 = cloudabi_sys_sock_shutdown */ + { AS(cloudabi_sys_sock_stat_get_args), (sy_call_t *)cloudabi_sys_sock_stat_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 52 = cloudabi_sys_sock_stat_get */ + { AS(cloudabi64_sys_thread_create_args), (sy_call_t *)cloudabi64_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 53 = cloudabi64_sys_thread_create */ + { AS(cloudabi_sys_thread_exit_args), (sy_call_t *)cloudabi_sys_thread_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 54 = cloudabi_sys_thread_exit */ + { AS(cloudabi64_sys_thread_tcb_set_args), (sy_call_t *)cloudabi64_sys_thread_tcb_set, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 55 = cloudabi64_sys_thread_tcb_set */ + { 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 56 = cloudabi_sys_thread_yield */ +}; Added: head/sys/compat/cloudabi64/cloudabi64_systrace_args.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/cloudabi64/cloudabi64_systrace_args.c Thu Jul 9 07:21:33 2015 (r285308) @@ -0,0 +1,1678 @@ +/* + * System call argument to DTrace register array converstion. + * + * DO NOT EDIT-- this file is automatically generated. + * $FreeBSD$ + * This file is part of the DTrace syscall provider. + */ + +static void +systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) +{ + int64_t *iarg = (int64_t *) uarg; + switch (sysnum) { + /* cloudabi_sys_clock_res_get */ + case 0: { + struct cloudabi_sys_clock_res_get_args *p = params; + iarg[0] = p->clock_id; /* cloudabi_clockid_t */ + *n_args = 1; + break; + } + /* cloudabi_sys_clock_time_get */ + case 1: { + struct cloudabi_sys_clock_time_get_args *p = params; + iarg[0] = p->clock_id; /* cloudabi_clockid_t */ + iarg[1] = p->precision; /* cloudabi_timestamp_t */ + *n_args = 2; + break; + } + /* cloudabi_sys_condvar_signal */ + case 2: { + struct cloudabi_sys_condvar_signal_args *p = params; + uarg[0] = (intptr_t) p->condvar; /* cloudabi_condvar_t * */ + iarg[1] = p->nwaiters; /* cloudabi_nthreads_t */ + *n_args = 2; + break; + } + /* cloudabi_sys_fd_close */ + case 3: { + struct cloudabi_sys_fd_close_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + *n_args = 1; + break; + } + /* cloudabi_sys_fd_create1 */ + case 4: { + struct cloudabi_sys_fd_create1_args *p = params; + iarg[0] = p->type; /* cloudabi_filetype_t */ + *n_args = 1; + break; + } + /* cloudabi_sys_fd_create2 */ + case 5: { + struct cloudabi_sys_fd_create2_args *p = params; + iarg[0] = p->type; /* cloudabi_filetype_t */ + *n_args = 1; + break; + } + /* cloudabi_sys_fd_datasync */ + case 6: { + struct cloudabi_sys_fd_datasync_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + *n_args = 1; + break; + } + /* cloudabi_sys_fd_dup */ + case 7: { + struct cloudabi_sys_fd_dup_args *p = params; + iarg[0] = p->from; /* cloudabi_fd_t */ + *n_args = 1; + break; + } + /* cloudabi64_sys_fd_pread */ + case 8: { + struct cloudabi64_sys_fd_pread_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + uarg[1] = (intptr_t) p->iov; /* const cloudabi64_iovec_t * */ + iarg[2] = p->iovcnt; /* cloudabi64_size_t */ + iarg[3] = p->offset; /* cloudabi_filesize_t */ + *n_args = 4; + break; + } + /* cloudabi64_sys_fd_pwrite */ + case 9: { + struct cloudabi64_sys_fd_pwrite_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + uarg[1] = (intptr_t) p->iov; /* const cloudabi64_ciovec_t * */ + iarg[2] = p->iovcnt; /* cloudabi64_size_t */ + iarg[3] = p->offset; /* cloudabi_filesize_t */ + *n_args = 4; + break; + } + /* cloudabi64_sys_fd_read */ + case 10: { + struct cloudabi64_sys_fd_read_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + uarg[1] = (intptr_t) p->iov; /* const cloudabi64_iovec_t * */ + iarg[2] = p->iovcnt; /* cloudabi64_size_t */ + *n_args = 3; + break; + } + /* cloudabi_sys_fd_replace */ + case 11: { + struct cloudabi_sys_fd_replace_args *p = params; + iarg[0] = p->from; /* cloudabi_fd_t */ + iarg[1] = p->to; /* cloudabi_fd_t */ + *n_args = 2; + break; + } + /* cloudabi_sys_fd_seek */ + case 12: { + struct cloudabi_sys_fd_seek_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + iarg[1] = p->offset; /* cloudabi_filedelta_t */ + iarg[2] = p->whence; /* cloudabi_whence_t */ + *n_args = 3; + break; + } + /* cloudabi_sys_fd_stat_get */ + case 13: { + struct cloudabi_sys_fd_stat_get_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + uarg[1] = (intptr_t) p->buf; /* cloudabi_fdstat_t * */ + *n_args = 2; + break; + } + /* cloudabi_sys_fd_stat_put */ + case 14: { + struct cloudabi_sys_fd_stat_put_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + uarg[1] = (intptr_t) p->buf; /* const cloudabi_fdstat_t * */ + iarg[2] = p->flags; /* cloudabi_fdsflags_t */ + *n_args = 3; + break; + } + /* cloudabi_sys_fd_sync */ + case 15: { + struct cloudabi_sys_fd_sync_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + *n_args = 1; + break; + } + /* cloudabi64_sys_fd_write */ + case 16: { + struct cloudabi64_sys_fd_write_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + uarg[1] = (intptr_t) p->iov; /* const cloudabi64_ciovec_t * */ + iarg[2] = p->iovcnt; /* cloudabi64_size_t */ + *n_args = 3; + break; + } + /* cloudabi_sys_file_advise */ + case 17: { + struct cloudabi_sys_file_advise_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + iarg[1] = p->offset; /* cloudabi_filesize_t */ + iarg[2] = p->len; /* cloudabi_filesize_t */ + iarg[3] = p->advice; /* cloudabi_advice_t */ + *n_args = 4; + break; + } + /* cloudabi_sys_file_allocate */ + case 18: { + struct cloudabi_sys_file_allocate_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + iarg[1] = p->offset; /* cloudabi_filesize_t */ + iarg[2] = p->len; /* cloudabi_filesize_t */ + *n_args = 3; + break; + } + /* cloudabi_sys_file_create */ + case 19: { + struct cloudabi_sys_file_create_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + uarg[1] = (intptr_t) p->path; /* const char * */ + uarg[2] = p->pathlen; /* size_t */ + iarg[3] = p->type; /* cloudabi_filetype_t */ + *n_args = 4; + break; + } + /* cloudabi_sys_file_link */ + case 20: { + struct cloudabi_sys_file_link_args *p = params; + iarg[0] = p->fd1; /* cloudabi_lookup_t */ + uarg[1] = (intptr_t) p->path1; /* const char * */ + uarg[2] = p->path1len; /* size_t */ + iarg[3] = p->fd2; /* cloudabi_fd_t */ + uarg[4] = (intptr_t) p->path2; /* const char * */ + uarg[5] = p->path2len; /* size_t */ + *n_args = 6; + break; + } + /* cloudabi_sys_file_open */ + case 21: { + struct cloudabi_sys_file_open_args *p = params; + iarg[0] = p->fd; /* cloudabi_lookup_t */ + uarg[1] = (intptr_t) p->path; /* const char * */ + uarg[2] = p->pathlen; /* size_t */ + iarg[3] = p->oflags; /* cloudabi_oflags_t */ + uarg[4] = (intptr_t) p->fds; /* const cloudabi_fdstat_t * */ + *n_args = 5; + break; + } + /* cloudabi_sys_file_readdir */ + case 22: { + struct cloudabi_sys_file_readdir_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + uarg[1] = (intptr_t) p->buf; /* void * */ + uarg[2] = p->nbyte; /* size_t */ + iarg[3] = p->cookie; /* cloudabi_dircookie_t */ + *n_args = 4; + break; + } + /* cloudabi_sys_file_readlink */ + case 23: { + struct cloudabi_sys_file_readlink_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + uarg[1] = (intptr_t) p->path; /* const char * */ + uarg[2] = p->pathlen; /* size_t */ + uarg[3] = (intptr_t) p->buf; /* void * */ + uarg[4] = p->bufsize; /* size_t */ + *n_args = 5; + break; + } + /* cloudabi_sys_file_rename */ + case 24: { + struct cloudabi_sys_file_rename_args *p = params; + iarg[0] = p->oldfd; /* cloudabi_fd_t */ + uarg[1] = (intptr_t) p->old; /* const char * */ + uarg[2] = p->oldlen; /* size_t */ + iarg[3] = p->newfd; /* cloudabi_fd_t */ + uarg[4] = (intptr_t) p->new; /* const char * */ + uarg[5] = p->newlen; /* size_t */ + *n_args = 6; + break; + } + /* cloudabi_sys_file_stat_fget */ + case 25: { + struct cloudabi_sys_file_stat_fget_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + uarg[1] = (intptr_t) p->buf; /* cloudabi_filestat_t * */ + *n_args = 2; + break; + } + /* cloudabi_sys_file_stat_fput */ + case 26: { + struct cloudabi_sys_file_stat_fput_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + uarg[1] = (intptr_t) p->buf; /* const cloudabi_filestat_t * */ + iarg[2] = p->flags; /* cloudabi_fsflags_t */ + *n_args = 3; + break; + } + /* cloudabi_sys_file_stat_get */ + case 27: { + struct cloudabi_sys_file_stat_get_args *p = params; + iarg[0] = p->fd; /* cloudabi_lookup_t */ + uarg[1] = (intptr_t) p->path; /* const char * */ + uarg[2] = p->pathlen; /* size_t */ + uarg[3] = (intptr_t) p->buf; /* cloudabi_filestat_t * */ + *n_args = 4; + break; + } + /* cloudabi_sys_file_stat_put */ + case 28: { + struct cloudabi_sys_file_stat_put_args *p = params; + iarg[0] = p->fd; /* cloudabi_lookup_t */ + uarg[1] = (intptr_t) p->path; /* const char * */ + uarg[2] = p->pathlen; /* size_t */ + uarg[3] = (intptr_t) p->buf; /* const cloudabi_filestat_t * */ + iarg[4] = p->flags; /* cloudabi_fsflags_t */ + *n_args = 5; + break; + } + /* cloudabi_sys_file_symlink */ + case 29: { + struct cloudabi_sys_file_symlink_args *p = params; + uarg[0] = (intptr_t) p->path1; /* const char * */ + uarg[1] = p->path1len; /* size_t */ + iarg[2] = p->fd; /* cloudabi_fd_t */ + uarg[3] = (intptr_t) p->path2; /* const char * */ + uarg[4] = p->path2len; /* size_t */ + *n_args = 5; + break; + } + /* cloudabi_sys_file_unlink */ + case 30: { + struct cloudabi_sys_file_unlink_args *p = params; + iarg[0] = p->fd; /* cloudabi_fd_t */ + uarg[1] = (intptr_t) p->path; /* const char * */ + uarg[2] = p->pathlen; /* size_t */ + iarg[3] = p->flag; /* cloudabi_ulflags_t */ + *n_args = 4; + break; + } + /* cloudabi_sys_lock_unlock */ + case 31: { + struct cloudabi_sys_lock_unlock_args *p = params; + uarg[0] = (intptr_t) p->lock; /* cloudabi_lock_t * */ + *n_args = 1; + break; + } + /* cloudabi_sys_mem_advise */ + case 32: { + struct cloudabi_sys_mem_advise_args *p = params; + uarg[0] = (intptr_t) p->addr; /* void * */ + uarg[1] = p->len; /* size_t */ + iarg[2] = p->advice; /* cloudabi_advice_t */ + *n_args = 3; + break; + } + /* cloudabi_sys_mem_lock */ + case 33: { + struct cloudabi_sys_mem_lock_args *p = params; + uarg[0] = (intptr_t) p->addr; /* const void * */ + uarg[1] = p->len; /* size_t */ + *n_args = 2; + break; + } + /* cloudabi_sys_mem_map */ + case 34: { + struct cloudabi_sys_mem_map_args *p = params; + uarg[0] = (intptr_t) p->addr; /* void * */ + uarg[1] = p->len; /* size_t */ + iarg[2] = p->prot; /* cloudabi_mprot_t */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jul 9 07:31:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 890E5996795; Thu, 9 Jul 2015 07:31:41 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 7902614E6; Thu, 9 Jul 2015 07:31:41 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t697VffX073056; Thu, 9 Jul 2015 07:31:41 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t697VfRm073055; Thu, 9 Jul 2015 07:31:41 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201507090731.t697VfRm073055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 9 Jul 2015 07:31:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285309 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 07:31:41 -0000 Author: ed Date: Thu Jul 9 07:31:40 2015 New Revision: 285309 URL: https://svnweb.freebsd.org/changeset/base/285309 Log: Add forward declaration of struct thread. This structure is used in some of the functions in this header, but we don't depend on any header that pulls it i. Modified: head/sys/sys/cpuset.h Modified: head/sys/sys/cpuset.h ============================================================================== --- head/sys/sys/cpuset.h Thu Jul 9 07:21:33 2015 (r285308) +++ head/sys/sys/cpuset.h Thu Jul 9 07:31:40 2015 (r285309) @@ -116,6 +116,7 @@ struct cpuset { extern cpuset_t *cpuset_root; struct prison; struct proc; +struct thread; struct cpuset *cpuset_thread0(void); struct cpuset *cpuset_ref(struct cpuset *); From owner-svn-src-all@freebsd.org Thu Jul 9 08:43:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED28A995751; Thu, 9 Jul 2015 08:43:54 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A669512FE; Thu, 9 Jul 2015 08:43:54 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from [192.168.0.7] (cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61]) (authenticated bits=0) by theravensnest.org (8.15.1/8.15.1) with ESMTPSA id t698hk4o097981 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 9 Jul 2015 08:43:51 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61] claimed to be [192.168.0.7] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r285284 - head/lib/liblzma From: David Chisnall In-Reply-To: Date: Thu, 9 Jul 2015 09:44:03 +0100 Cc: Dimitry Andric , Adrian Chadd , Pedro Giffuni , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> To: NGie Cooper X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 08:43:55 -0000 On 9 Jul 2015, at 03:53, NGie Cooper wrote: >=20 > $ cat ~/has_immintrin.c > #include >=20 > #if __has_include() > #error "I have immintrin.h" > #else > #error "I don't have immintrin.h" > #endif > $ clang -c ~/has_immintrin.c > /home/ngie/has_immintrin.c:4:2: error: "I have immintrin.h" > #error "I have immintrin.h" > ^ > 1 error generated. > $ gcc -c ~/has_immintrin.c > /home/ngie/has_immintrin.c:6:2: error: #error "I don't have = immintrin.h" >=20 > Sadly this macro wasn't added until gcc 5.x: > https://gcc.gnu.org/gcc-5/changes.html cdefs.h defines __has_include(x) to 0 if the compiler does not provide = __has_include(), so this will also work with gcc in base (always = claiming not to have immintrin.h). David From owner-svn-src-all@freebsd.org Thu Jul 9 09:19:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFEA499617B; Thu, 9 Jul 2015 09:19:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qg0-x229.google.com (mail-qg0-x229.google.com [IPv6:2607:f8b0:400d:c04::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A7BEE1897; Thu, 9 Jul 2015 09:19:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qgeg89 with SMTP id g89so112508135qge.3; Thu, 09 Jul 2015 02:19:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IQiUk0hhrkH/jRDDrdJs/ZLEqi0Hwwh2nCsdm5WLlhw=; b=XSOYjFbWLPVgkydolZwrrz5UQx0vNjjPmieEo2n+cfDaOclce+z/JVyVHasvnXa/tv 3etWQLMrQX6/aov9mlXFOH72NbNC2EgZ0YLFDewIUP8jQAcCVFl/o/half/0a+6XmEXV 9XOEvLgdqf57a8bpYSHuz/5dWKYsIrU7a5C5+bwS1DB8egaacsT4I0Nds7NXjJSmg8iI A/WQki7WU6FertJThZPJNsEX9Jb83d8D1nR1BObZx9QzW/E9WkgAkGGuXZnHWB/KBKLQ 0jk9J+DbIggz2Nl7srTbdm/1LPzm18NOKzNE/GkGdW4k04FNbLgpG8P3c7FaA1YMD3uY h6rw== MIME-Version: 1.0 X-Received: by 10.55.53.193 with SMTP id c184mr22055217qka.62.1436433559731; Thu, 09 Jul 2015 02:19:19 -0700 (PDT) Received: by 10.140.98.73 with HTTP; Thu, 9 Jul 2015 02:19:19 -0700 (PDT) In-Reply-To: References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> Date: Thu, 9 Jul 2015 02:19:19 -0700 Message-ID: Subject: Re: svn commit: r285284 - head/lib/liblzma From: NGie Cooper To: David Chisnall Cc: Dimitry Andric , Adrian Chadd , Pedro Giffuni , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 09:19:21 -0000 On Thu, Jul 9, 2015 at 1:44 AM, David Chisnall wrote: > On 9 Jul 2015, at 03:53, NGie Cooper wrote: >> >> $ cat ~/has_immintrin.c >> #include >> >> #if __has_include() >> #error "I have immintrin.h" >> #else >> #error "I don't have immintrin.h" >> #endif >> $ clang -c ~/has_immintrin.c >> /home/ngie/has_immintrin.c:4:2: error: "I have immintrin.h" >> #error "I have immintrin.h" >> ^ >> 1 error generated. >> $ gcc -c ~/has_immintrin.c >> /home/ngie/has_immintrin.c:6:2: error: #error "I don't have immintrin.h" >> >> Sadly this macro wasn't added until gcc 5.x: >> https://gcc.gnu.org/gcc-5/changes.html > > cdefs.h defines __has_include(x) to 0 if the compiler does not provide __has_include(), so this will also work with gcc in base (always claiming not to have immintrin.h). Yes, but this case will fail for gcc 4.3 ~ 4.4 through 5.x if you use my recommended method... From owner-svn-src-all@freebsd.org Thu Jul 9 09:22:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 993C899634D; Thu, 9 Jul 2015 09:22:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 69ED41D4D; Thu, 9 Jul 2015 09:22:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t699MMfU029431; Thu, 9 Jul 2015 09:22:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t699MMa9029429; Thu, 9 Jul 2015 09:22:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201507090922.t699MMa9029429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 9 Jul 2015 09:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285310 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 09:22:22 -0000 Author: kib Date: Thu Jul 9 09:22:21 2015 New Revision: 285310 URL: https://svnweb.freebsd.org/changeset/base/285310 Log: Cover a race between doselwakeup() and selfdfree(). If doselwakeup() loop finds the selfd entry and clears its sf_si pointer, which is handled by selfdfree() in parallel, NULL sf_si makes selfdfree() free the memory. The result is the race and accesses to the freed memory. Refcount the selfd ownership. One reference is for the sf_link linkage, which is unconditionally dereferenced by selfdfree(). Another reference is for sf_threads, both selfdfree() and doselwakeup() race to deref it, the winner unlinks and than frees the selfd entry. Reported by: Larry Rosenman Tested by: Larry Rosenman , pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/sys_generic.c Modified: head/sys/kern/sys_generic.c ============================================================================== --- head/sys/kern/sys_generic.c Thu Jul 9 07:31:40 2015 (r285309) +++ head/sys/kern/sys_generic.c Thu Jul 9 09:22:21 2015 (r285310) @@ -153,6 +153,7 @@ struct selfd { struct mtx *sf_mtx; /* Pointer to selinfo mtx. */ struct seltd *sf_td; /* (k) owning seltd. */ void *sf_cookie; /* (k) fd or pollfd. */ + u_int sf_refs; }; static uma_zone_t selfd_zone; @@ -1685,11 +1686,14 @@ selfdfree(struct seltd *stp, struct self STAILQ_REMOVE(&stp->st_selq, sfp, selfd, sf_link); if (sfp->sf_si != NULL) { mtx_lock(sfp->sf_mtx); - if (sfp->sf_si != NULL) + if (sfp->sf_si != NULL) { TAILQ_REMOVE(&sfp->sf_si->si_tdlist, sfp, sf_threads); + refcount_release(&sfp->sf_refs); + } mtx_unlock(sfp->sf_mtx); } - uma_zfree(selfd_zone, sfp); + if (refcount_release(&sfp->sf_refs)) + uma_zfree(selfd_zone, sfp); } /* Drain the waiters tied to all the selfd belonging the specified selinfo. */ @@ -1745,6 +1749,7 @@ selrecord(selector, sip) */ sfp->sf_si = sip; sfp->sf_mtx = mtxp; + refcount_init(&sfp->sf_refs, 2); STAILQ_INSERT_TAIL(&stp->st_selq, sfp, sf_link); /* * Now that we've locked the sip, check for initialization. @@ -1809,6 +1814,8 @@ doselwakeup(sip, pri) stp->st_flags |= SELTD_PENDING; cv_broadcastpri(&stp->st_wait, pri); mtx_unlock(&stp->st_mtx); + if (refcount_release(&sfp->sf_refs)) + uma_zfree(selfd_zone, sfp); } mtx_unlock(sip->si_mtx); } From owner-svn-src-all@freebsd.org Thu Jul 9 09:23:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6A4C996387; Thu, 9 Jul 2015 09:23:32 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 848391E9D; Thu, 9 Jul 2015 09:23:31 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from [192.168.0.7] (cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61]) (authenticated bits=0) by theravensnest.org (8.15.1/8.15.1) with ESMTPSA id t699NSJX098260 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 9 Jul 2015 09:23:29 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61] claimed to be [192.168.0.7] Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r285284 - head/lib/liblzma From: David Chisnall In-Reply-To: Date: Thu, 9 Jul 2015 10:23:44 +0100 Cc: Dimitry Andric , Adrian Chadd , Pedro Giffuni , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <01236D45-1D17-4899-9D13-D7E5A32B68E5@FreeBSD.org> References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> To: NGie Cooper X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 09:23:32 -0000 On 9 Jul 2015, at 10:19, NGie Cooper wrote: >=20 > Yes, but this case will fail for gcc 4.3 ~ 4.4 through 5.x if you use > my recommended method... I think that=E2=80=99s probably fine. We basically have four cases that = we care about: - People who are using clang because it=E2=80=99s the system compiler = [works] - People who are using new clang from ports / svn because it=E2=80=99s = new and shiny [works] - People who are using gcc from base because it=E2=80=99s the system = compiler [works] - People who are using new gcc from ports / svn because it=E2=80=99s new = and shiny [works] The only people it doesn=E2=80=99t work for are the ones building = FreeBSD using an out-of-tree old GCC. There probably aren=E2=80=99t too = many of those=E2=80=A6 David From owner-svn-src-all@freebsd.org Thu Jul 9 09:47:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6A2B996859; Thu, 9 Jul 2015 09:47:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x22e.google.com (mail-qk0-x22e.google.com [IPv6:2607:f8b0:400d:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 96FA61C80; Thu, 9 Jul 2015 09:47:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkeo142 with SMTP id o142so182220456qke.1; Thu, 09 Jul 2015 02:47:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=7+NpXUg0CeFRkx4WrI02uKkDDk7pZuvltQRGKJ4qBEQ=; b=xGmpkatjLiKAV/NlZ6qp1b1iRO4wYqt6dh585zmLXE93hcTST2wde1ZSDwSQg3P1Py r7P3hohSy6b0MHH56GwPZcGGyW1CV3GSbs44ZwVI/EHYIf3x60XwekkdkmXGlL9Qm7ze xdwOpTRFx4TxZ6S+B8qtYGDCF8yiArlHhqtPn0wjTcxArUgw9AUXYVwyjwETiIx+sslH o6RpjdcII+JKbD2Kzu4owIVtlppDSeuwXAr6gVn3wNJb+KiZoWmBkPeVgOxgnMfcZ7K1 9+lK9LDjyPDZe1jmM84l3E0CHmYFiRojPY3qdsLpYBDaQybRPUtcpLMqg+oSfLYVJDl3 amhA== MIME-Version: 1.0 X-Received: by 10.140.237.70 with SMTP id i67mr18856303qhc.44.1436435239624; Thu, 09 Jul 2015 02:47:19 -0700 (PDT) Received: by 10.140.98.73 with HTTP; Thu, 9 Jul 2015 02:47:19 -0700 (PDT) In-Reply-To: <01236D45-1D17-4899-9D13-D7E5A32B68E5@FreeBSD.org> References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> <01236D45-1D17-4899-9D13-D7E5A32B68E5@FreeBSD.org> Date: Thu, 9 Jul 2015 02:47:19 -0700 Message-ID: Subject: Re: svn commit: r285284 - head/lib/liblzma From: NGie Cooper To: David Chisnall Cc: Dimitry Andric , Adrian Chadd , Pedro Giffuni , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 09:47:21 -0000 On Thu, Jul 9, 2015 at 2:23 AM, David Chisnall wrote= : > On 9 Jul 2015, at 10:19, NGie Cooper wrote: >> >> Yes, but this case will fail for gcc 4.3 ~ 4.4 through 5.x if you use >> my recommended method... > > I think that=E2=80=99s probably fine. We basically have four cases that = we care about: > > - People who are using clang because it=E2=80=99s the system compiler [wo= rks] > - People who are using new clang from ports / svn because it=E2=80=99s ne= w and shiny [works] > - People who are using gcc from base because it=E2=80=99s the system comp= iler [works] > - People who are using new gcc from ports / svn because it=E2=80=99s new = and shiny [works] > > The only people it doesn=E2=80=99t work for are the ones building FreeBSD= using an out-of-tree old GCC. There probably aren=E2=80=99t too many of t= hose=E2=80=A6 Item 4. needs to be full understood when working with some features as it could result in undefined behavior. From owner-svn-src-all@freebsd.org Thu Jul 9 10:11:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92327996E28; Thu, 9 Jul 2015 10:11:38 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B9A11D2A; Thu, 9 Jul 2015 10:11:38 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by wiga1 with SMTP id a1so308440001wig.0; Thu, 09 Jul 2015 03:11:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=lWy3GksPNAsnQcX7MgdvU3jpSFB9O4VwhwcVQxOrSds=; b=JbCn6owo+CaKOITs+E64u/u5xPi80/RAtG80F78wptDQskNj4rdidfVJAUlDUhtbXi ydskWzbGvMLiHeOjwnGP2sya0vZgeohaMcRGPDoAMV5I40u+YqFM26F0v3CCXFYTBQNP ekFJtxuHPeYnxdZBo4P1EMxXwNZFzHGB7JAGoMODl026ePqZryRcPkPnO59KlXeDAuQb xGWjFKtWsLBisaVTlHKe1eN4uiy+dQsmR9x90XoikhHd/d2mEzvs6tDSG9mLlHraPEVU 5GSXy2GgHHl1WMyn/gH+L58RVxL1tX3qn9+cKfCptfOs3R1DVy22tbLXsw/1F9O/oDLe a/NQ== X-Received: by 10.180.72.145 with SMTP id d17mr122551079wiv.69.1436436696571; Thu, 09 Jul 2015 03:11:36 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id q4sm7989234wju.14.2015.07.09.03.11.34 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 09 Jul 2015 03:11:35 -0700 (PDT) Date: Thu, 9 Jul 2015 12:11:32 +0200 From: Mateusz Guzik To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285310 - head/sys/kern Message-ID: <20150709101131.GA1718@dft-labs.eu> References: <201507090922.t699MMa9029429@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201507090922.t699MMa9029429@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 10:11:38 -0000 On Thu, Jul 09, 2015 at 09:22:22AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Thu Jul 9 09:22:21 2015 > New Revision: 285310 > URL: https://svnweb.freebsd.org/changeset/base/285310 > > Log: > Cover a race between doselwakeup() and selfdfree(). If doselwakeup() > loop finds the selfd entry and clears its sf_si pointer, which is > handled by selfdfree() in parallel, NULL sf_si makes selfdfree() free > the memory. The result is the race and accesses to the freed memory. > > Refcount the selfd ownership. One reference is for the sf_link > linkage, which is unconditionally dereferenced by selfdfree(). > Another reference is for sf_threads, both selfdfree() and > doselwakeup() race to deref it, the winner unlinks and than frees the > selfd entry. > > MFC after: 2 weeks Looks like my bug introduced as a result of r273549 + r273555. It was not MFCed, so this change does not need a MFC either. With the lock taken unconditionally there is no window where sf_si NULL is visible to selfdfree while doselwakeup still uses the sfp. afair the motivation for the change was some minor contention shown by lock profiling during buildworld/buildkernel, as sf_si comes from a mtx pool. So just in case, I vote for leaving stuff as it is, I'm just noting there is no need to MFC. > > Modified: > head/sys/kern/sys_generic.c > > Modified: head/sys/kern/sys_generic.c > ============================================================================== > --- head/sys/kern/sys_generic.c Thu Jul 9 07:31:40 2015 (r285309) > +++ head/sys/kern/sys_generic.c Thu Jul 9 09:22:21 2015 (r285310) > @@ -153,6 +153,7 @@ struct selfd { > struct mtx *sf_mtx; /* Pointer to selinfo mtx. */ > struct seltd *sf_td; /* (k) owning seltd. */ > void *sf_cookie; /* (k) fd or pollfd. */ > + u_int sf_refs; > }; > > static uma_zone_t selfd_zone; > @@ -1685,11 +1686,14 @@ selfdfree(struct seltd *stp, struct self > STAILQ_REMOVE(&stp->st_selq, sfp, selfd, sf_link); > if (sfp->sf_si != NULL) { > mtx_lock(sfp->sf_mtx); > - if (sfp->sf_si != NULL) > + if (sfp->sf_si != NULL) { > TAILQ_REMOVE(&sfp->sf_si->si_tdlist, sfp, sf_threads); > + refcount_release(&sfp->sf_refs); > + } > mtx_unlock(sfp->sf_mtx); > } > - uma_zfree(selfd_zone, sfp); > + if (refcount_release(&sfp->sf_refs)) > + uma_zfree(selfd_zone, sfp); > } > > /* Drain the waiters tied to all the selfd belonging the specified selinfo. */ > @@ -1745,6 +1749,7 @@ selrecord(selector, sip) > */ > sfp->sf_si = sip; > sfp->sf_mtx = mtxp; > + refcount_init(&sfp->sf_refs, 2); > STAILQ_INSERT_TAIL(&stp->st_selq, sfp, sf_link); > /* > * Now that we've locked the sip, check for initialization. > @@ -1809,6 +1814,8 @@ doselwakeup(sip, pri) > stp->st_flags |= SELTD_PENDING; > cv_broadcastpri(&stp->st_wait, pri); > mtx_unlock(&stp->st_mtx); > + if (refcount_release(&sfp->sf_refs)) > + uma_zfree(selfd_zone, sfp); > } > mtx_unlock(sip->si_mtx); > } > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Mateusz Guzik From owner-svn-src-all@freebsd.org Thu Jul 9 11:32:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F823997C3D; Thu, 9 Jul 2015 11:32:31 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 4F41B112A; Thu, 9 Jul 2015 11:32:31 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69BWVPx094072; Thu, 9 Jul 2015 11:32:31 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69BWU3Z094067; Thu, 9 Jul 2015 11:32:30 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201507091132.t69BWU3Z094067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Thu, 9 Jul 2015 11:32:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285311 - in head/sys/arm64: arm64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 11:32:31 -0000 Author: zbb Date: Thu Jul 9 11:32:29 2015 New Revision: 285311 URL: https://svnweb.freebsd.org/changeset/base/285311 Log: Rework CPU identification on ARM64 This commit reworks the code responsible for identification of the CPUs during runtime. It is necessary to provide a way for workarounds and erratums to be applied only for certain HW versions. The copy of MIDR is now stored in pcpu to provide a fast and convenient way for assambly code to read it (pcpu is used quite often so there is a chance it's inside the cache). The MIDR is also better way of identification than using user-friendly cpu_desc structure, because it can be compiled into comparision of single u32 with only one access to the memory - this is crucial for some erratums which are called from performance-critical places. Changes in cpu_identify makes this function safe to be called on non-boot CPUs. New function CPU_MATCH was implemented which returns boolean value based on mathing masked MIDR with chip identification. Example of usage: printf("is thunder: %d\n", CPU_MATCH(CPU_IMPL_MASK | CPU_PART_MASK, CPU_IMPL_CAVIUM, CPU_PART_THUNDER, 0, 0)); printf("is generic: %d\n", CPU_MATCH(CPU_IMPL_MASK | CPU_PART_MASK, CPU_IMPL_ARM, CPU_PART_FOUNDATION, 0, 0)); Reviewed by: andrew Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3030 Modified: head/sys/arm64/arm64/identcpu.c head/sys/arm64/include/cpu.h head/sys/arm64/include/pcpu.h Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Thu Jul 9 09:22:21 2015 (r285310) +++ head/sys/arm64/arm64/identcpu.c Thu Jul 9 11:32:29 2015 (r285311) @@ -48,7 +48,7 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, /* * Per-CPU affinity as provided in MPIDR_EL1 * Indexed by CPU number in logical order selected by the system. - * Relevant fields can be extracetd using CPU_AFFn macros, + * Relevant fields can be extracted using CPU_AFFn macros, * Aff3.Aff2.Aff1.Aff0 construct a unique CPU address in the system. * * Fields used by us: @@ -57,28 +57,6 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, */ uint64_t __cpu_affinity[MAXCPU]; -#define CPU_IMPL_ARM 0x41 -#define CPU_IMPL_BROADCOM 0x42 -#define CPU_IMPL_CAVIUM 0x43 -#define CPU_IMPL_DEC 0x44 -#define CPU_IMPL_INFINEON 0x49 -#define CPU_IMPL_FREESCALE 0x4D -#define CPU_IMPL_NVIDIA 0x4E -#define CPU_IMPL_APM 0x50 -#define CPU_IMPL_QUALCOMM 0x51 -#define CPU_IMPL_MARVELL 0x56 -#define CPU_IMPL_INTEL 0x69 - -#define CPU_PART_THUNDER 0x0A1 -#define CPU_PART_FOUNDATION 0xD00 -#define CPU_PART_CORTEX_A53 0xD03 -#define CPU_PART_CORTEX_A57 0xD07 - -#define CPU_IMPL(midr) (((midr) >> 24) & 0xff) -#define CPU_PART(midr) (((midr) >> 4) & 0xfff) -#define CPU_VAR(midr) (((midr) >> 20) & 0xf) -#define CPU_REV(midr) (((midr) >> 0) & 0xf) - struct cpu_desc { u_int cpu_impl; u_int cpu_part_num; @@ -112,14 +90,14 @@ struct cpu_implementers { */ /* ARM Ltd. */ static const struct cpu_parts cpu_parts_arm[] = { - { 0xD00, "Foundation-Model" }, - { 0xD03, "Cortex-A53" }, - { 0xD07, "Cortex-A57" }, + { CPU_PART_FOUNDATION, "Foundation-Model" }, + { CPU_PART_CORTEX_A53, "Cortex-A53" }, + { CPU_PART_CORTEX_A57, "Cortex-A57" }, CPU_PART_NONE, }; /* Cavium */ static const struct cpu_parts cpu_parts_cavium[] = { - { 0x0A1, "Thunder" }, + { CPU_PART_THUNDER, "Thunder" }, CPU_PART_NONE, }; @@ -162,6 +140,12 @@ identify_cpu(void) cpu = PCPU_GET(cpuid); midr = get_midr(); + /* + * Store midr to pcpu to allow fast reading + * from EL0, EL1 and assembly code. + */ + PCPU_SET(midr, midr); + impl_id = CPU_IMPL(midr); for (i = 0; i < nitems(cpu_implementers); i++) { if (impl_id == cpu_implementers[i].impl_id || @@ -183,15 +167,21 @@ identify_cpu(void) } } - printf("CPU: %s %s r%dp%d\n", cpu_desc[cpu].cpu_impl_name, - cpu_desc[cpu].cpu_part_name, CPU_VAR(midr), CPU_REV(midr)); + cpu_desc[cpu].cpu_revision = CPU_REV(midr); + cpu_desc[cpu].cpu_variant = CPU_VAR(midr); - /* - * Save affinity for the boot CPU. - * (CPU0 in the internal system enumeration. - */ + /* Save affinity for current CPU */ mpidr = get_mpidr(); - CPU_AFFINITY(0) = mpidr & CPU_AFF_MASK; + CPU_AFFINITY(cpu) = mpidr & CPU_AFF_MASK; + + /* Print details for boot CPU or if we want verbose output */ + if (cpu == 0 || bootverbose) { + printf("CPU(%d): %s %s r%dp%d\n", cpu, + cpu_desc[cpu].cpu_impl_name, + cpu_desc[cpu].cpu_part_name, + cpu_desc[cpu].cpu_variant, + cpu_desc[cpu].cpu_revision); + } if (bootverbose) printf("CPU%u affinity: %u.%u.%u.%u\n", 0, CPU_AFF0(mpidr), Modified: head/sys/arm64/include/cpu.h ============================================================================== --- head/sys/arm64/include/cpu.h Thu Jul 9 09:22:21 2015 (r285310) +++ head/sys/arm64/include/cpu.h Thu Jul 9 11:32:29 2015 (r285311) @@ -60,6 +60,43 @@ #ifdef _KERNEL +#define CPU_IMPL_ARM 0x41 +#define CPU_IMPL_BROADCOM 0x42 +#define CPU_IMPL_CAVIUM 0x43 +#define CPU_IMPL_DEC 0x44 +#define CPU_IMPL_INFINEON 0x49 +#define CPU_IMPL_FREESCALE 0x4D +#define CPU_IMPL_NVIDIA 0x4E +#define CPU_IMPL_APM 0x50 +#define CPU_IMPL_QUALCOMM 0x51 +#define CPU_IMPL_MARVELL 0x56 +#define CPU_IMPL_INTEL 0x69 + +#define CPU_PART_THUNDER 0x0A1 +#define CPU_PART_FOUNDATION 0xD00 +#define CPU_PART_CORTEX_A53 0xD03 +#define CPU_PART_CORTEX_A57 0xD07 + +#define CPU_IMPL(midr) (((midr) >> 24) & 0xff) +#define CPU_PART(midr) (((midr) >> 4) & 0xfff) +#define CPU_VAR(midr) (((midr) >> 20) & 0xf) +#define CPU_REV(midr) (((midr) >> 0) & 0xf) + +#define CPU_IMPL_TO_MIDR(val) (((val) & 0xff) << 24) +#define CPU_PART_TO_MIDR(val) (((val) & 0xfff) << 4) +#define CPU_VAR_TO_MIDR(val) (((val) & 0xf) << 20) +#define CPU_REV_TO_MIDR(val) (((val) & 0xf) << 0) + +#define CPU_IMPL_MASK (0xff << 24) +#define CPU_PART_MASK (0xfff << 4) +#define CPU_VAR_MASK (0xf << 20) +#define CPU_REV_MASK (0xf << 0) + +#define CPU_MATCH(mask, impl, part, var, rev) \ + (((mask) & PCPU_GET(midr)) == (CPU_IMPL_TO_MIDR((impl)) | \ + CPU_PART_TO_MIDR((part)) | CPU_VAR_TO_MIDR((var)) | \ + CPU_REV_TO_MIDR((rev)))) + extern char btext[]; extern char etext[]; Modified: head/sys/arm64/include/pcpu.h ============================================================================== --- head/sys/arm64/include/pcpu.h Thu Jul 9 09:22:21 2015 (r285310) +++ head/sys/arm64/include/pcpu.h Thu Jul 9 11:32:29 2015 (r285311) @@ -36,8 +36,9 @@ #define ALT_STACK_SIZE 128 #define PCPU_MD_FIELDS \ - u_int pc_acpi_id; /* ACPI CPU id */ \ - char __pad[125] + u_int pc_acpi_id; /* ACPI CPU id */ \ + u_int pc_midr; /* stored MIDR value */ \ + char __pad[121] #ifdef _KERNEL From owner-svn-src-all@freebsd.org Thu Jul 9 12:04:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72DB3997542; Thu, 9 Jul 2015 12:04:46 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 567CA142B; Thu, 9 Jul 2015 12:04:46 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69C4kYQ009665; Thu, 9 Jul 2015 12:04:46 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69C4k41009664; Thu, 9 Jul 2015 12:04:46 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201507091204.t69C4k41009664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 9 Jul 2015 12:04:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285312 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 12:04:46 -0000 Author: ed Date: Thu Jul 9 12:04:45 2015 New Revision: 285312 URL: https://svnweb.freebsd.org/changeset/base/285312 Log: Don't clobber td->td_retval[0] in proc_reap(). While writing tests for CloudABI, I noticed that close() on process descriptors returns the process ID of the child process. This is interesting, as close() is only allowed to return 0 or -1. It turns out that we clobber td->td_retval[0] in proc_reap(), so that wait*() properly returns the process ID. Change proc_reap() to leave td->td_retval[0] alone. Set the return value in kern_wait6() instead, by keeping track of the PID before we (potentially) reap the process. Differential Revision: https://reviews.freebsd.org/D3032 Reviewed by: kib Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Thu Jul 9 11:32:29 2015 (r285311) +++ head/sys/kern/kern_exit.c Thu Jul 9 12:04:45 2015 (r285312) @@ -839,7 +839,6 @@ proc_reap(struct thread *td, struct proc q = td->td_proc; PROC_SUNLOCK(p); - td->td_retval[0] = p->p_pid; if (status) *status = p->p_xstat; /* convert to int */ if (options & WNOWAIT) { @@ -1153,6 +1152,7 @@ kern_wait6(struct thread *td, idtype_t i int options, struct __wrusage *wrusage, siginfo_t *siginfo) { struct proc *p, *q; + pid_t pid; int error, nfound, ret; AUDIT_ARG_VALUE((int)idtype); /* XXX - This is likely wrong! */ @@ -1191,14 +1191,17 @@ loop: nfound = 0; sx_xlock(&proctree_lock); LIST_FOREACH(p, &q->p_children, p_sibling) { + pid = p->p_pid; ret = proc_to_reap(td, p, idtype, id, status, options, wrusage, siginfo, 0); if (ret == 0) continue; else if (ret == 1) nfound++; - else + else { + td->td_retval[0] = pid; return (0); + } PROC_LOCK(p); PROC_SLOCK(p); @@ -1212,7 +1215,6 @@ loop: if ((options & WNOWAIT) == 0) p->p_flag |= P_WAITED; sx_xunlock(&proctree_lock); - td->td_retval[0] = p->p_pid; if (status != NULL) *status = W_STOPCODE(p->p_xstat); @@ -1231,6 +1233,7 @@ loop: p->p_pid, W_STOPCODE(p->p_xstat), p->p_xstat, p->p_xthread != NULL ? p->p_xthread->td_tid : -1); PROC_UNLOCK(p); + td->td_retval[0] = pid; return (0); } if ((options & WUNTRACED) != 0 && @@ -1241,7 +1244,6 @@ loop: if ((options & WNOWAIT) == 0) p->p_flag |= P_WAITED; sx_xunlock(&proctree_lock); - td->td_retval[0] = p->p_pid; if (status != NULL) *status = W_STOPCODE(p->p_xstat); @@ -1256,13 +1258,13 @@ loop: } PROC_UNLOCK(p); + td->td_retval[0] = pid; return (0); } PROC_SUNLOCK(p); if ((options & WCONTINUED) != 0 && (p->p_flag & P_CONTINUED) != 0) { sx_xunlock(&proctree_lock); - td->td_retval[0] = p->p_pid; if ((options & WNOWAIT) == 0) { p->p_flag &= ~P_CONTINUED; PROC_LOCK(q); @@ -1277,6 +1279,7 @@ loop: siginfo->si_status = SIGCONT; siginfo->si_code = CLD_CONTINUED; } + td->td_retval[0] = pid; return (0); } PROC_UNLOCK(p); From owner-svn-src-all@freebsd.org Thu Jul 9 12:51:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD84D997C89; Thu, 9 Jul 2015 12:51:51 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 941CD1AB7; Thu, 9 Jul 2015 12:51:51 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69CppnD033200; Thu, 9 Jul 2015 12:51:51 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69CppZY033198; Thu, 9 Jul 2015 12:51:51 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507091251.t69CppZY033198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 9 Jul 2015 12:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285313 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 12:51:51 -0000 Author: andrew Date: Thu Jul 9 12:51:50 2015 New Revision: 285313 URL: https://svnweb.freebsd.org/changeset/base/285313 Log: Clean up the types used in on arm64. As some ports include this file without first including the headers needed for uint32_t and the like use the __foo type. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/include/pcb.h head/sys/arm64/include/ucontext.h Modified: head/sys/arm64/include/pcb.h ============================================================================== --- head/sys/arm64/include/pcb.h Thu Jul 9 12:04:45 2015 (r285312) +++ head/sys/arm64/include/pcb.h Thu Jul 9 12:51:50 2015 (r285313) @@ -49,7 +49,7 @@ struct pcb { __uint128_t pcb_vfp[32]; uint32_t pcb_fpcr; uint32_t pcb_fpsr; - u_int pcb_fpflags; + int pcb_fpflags; #define PCB_FP_STARTED 0x01 u_int pcb_vfpcpu; /* Last cpu this thread ran VFP code */ }; Modified: head/sys/arm64/include/ucontext.h ============================================================================== --- head/sys/arm64/include/ucontext.h Thu Jul 9 12:04:45 2015 (r285312) +++ head/sys/arm64/include/ucontext.h Thu Jul 9 12:51:50 2015 (r285313) @@ -34,29 +34,29 @@ #define _MACHINE_UCONTEXT_H_ struct gpregs { - unsigned long long gp_x[30]; - unsigned long long gp_lr; - unsigned long long gp_sp; - unsigned long long gp_elr; - uint32_t gp_spsr; - u_int gp_pad; + __register_t gp_x[30]; + __register_t gp_lr; + __register_t gp_sp; + __register_t gp_elr; + __uint32_t gp_spsr; + int gp_pad; }; struct fpregs { __uint128_t fp_q[32]; - uint32_t fp_sr; - uint32_t fp_cr; - u_int fp_flags; - u_int fp_pad; + __uint32_t fp_sr; + __uint32_t fp_cr; + int fp_flags; + int fp_pad; }; struct __mcontext { struct gpregs mc_gpregs; struct fpregs mc_fpregs; - u_int mc_flags; + int mc_flags; #define _MC_FP_VALID 0x1 /* Set when mc_fpregs has valid data */ - u_int mc_pad; /* Padding */ - uint64_t mc_spare[8]; /* Space for expansion, set to zero */ + int mc_pad; /* Padding */ + __uint64_t mc_spare[8]; /* Space for expansion, set to zero */ }; typedef struct __mcontext mcontext_t; From owner-svn-src-all@freebsd.org Thu Jul 9 12:56:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD89F997CCF; Thu, 9 Jul 2015 12:56:10 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 B73111CB9; Thu, 9 Jul 2015 12:56:10 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69CuAJo034327; Thu, 9 Jul 2015 12:56:10 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69CuAcJ034326; Thu, 9 Jul 2015 12:56:10 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507091256.t69CuAcJ034326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 9 Jul 2015 12:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285314 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 12:56:10 -0000 Author: andrew Date: Thu Jul 9 12:56:09 2015 New Revision: 285314 URL: https://svnweb.freebsd.org/changeset/base/285314 Log: Add the definition of the shareable bits in the pagetables Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/include/pte.h Modified: head/sys/arm64/include/pte.h ============================================================================== --- head/sys/arm64/include/pte.h Thu Jul 9 12:51:50 2015 (r285313) +++ head/sys/arm64/include/pte.h Thu Jul 9 12:56:09 2015 (r285314) @@ -49,6 +49,10 @@ typedef uint64_t pt_entry_t; /* page ta #define ATTR_nG (1 << 11) #define ATTR_AF (1 << 10) #define ATTR_SH(x) ((x) << 8) +#define ATTR_SH_MASK ATTR_SH(3) +#define ATTR_SH_NS 0 /* Non-shareable */ +#define ATTR_SH_OS 2 /* Outer-shareable */ +#define ATTR_SH_IS 3 /* Inner-shareable */ #define ATTR_AP_RW_BIT (1 << 7) #define ATTR_AP(x) ((x) << 6) #define ATTR_AP_MASK ATTR_AP(3) From owner-svn-src-all@freebsd.org Thu Jul 9 13:07:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BDC0997E20; Thu, 9 Jul 2015 13:07:13 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 213D81269; Thu, 9 Jul 2015 13:07:13 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69D7CLd039373; Thu, 9 Jul 2015 13:07:12 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69D7C7c039371; Thu, 9 Jul 2015 13:07:12 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507091307.t69D7C7c039371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 9 Jul 2015 13:07:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285315 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 13:07:13 -0000 Author: andrew Date: Thu Jul 9 13:07:12 2015 New Revision: 285315 URL: https://svnweb.freebsd.org/changeset/base/285315 Log: Add logging of synchronous exceptions. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Thu Jul 9 12:56:09 2015 (r285314) +++ head/sys/arm64/arm64/trap.c Thu Jul 9 13:07:12 2015 (r285315) @@ -258,6 +258,10 @@ do_el1h_sync(struct trapframe *frame) (exception == EXCP_DATA_ABORT && ((esr & ISS_DATA_ISV) == 0)), ("Invalid instruction length in exception")); + CTR4(KTR_TRAP, + "do_el1_sync: curthread: %p, esr %lx, elr: %lx, frame: %p", + curthread, esr, frame->tf_elr, frame); + switch(exception) { case EXCP_FP_SIMD: case EXCP_TRAP_FP: @@ -301,6 +305,10 @@ do_el0_sync(struct trapframe *frame) esr = READ_SPECIALREG(esr_el1); exception = ESR_ELx_EXCEPTION(esr); + CTR4(KTR_TRAP, + "do_el0_sync: curthread: %p, esr %lx, elr: %lx, frame: %p", + curthread, esr, frame->tf_elr, frame); + switch(exception) { case EXCP_FP_SIMD: case EXCP_TRAP_FP: From owner-svn-src-all@freebsd.org Thu Jul 9 13:23:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AABE99606D; Thu, 9 Jul 2015 13:23:32 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 7952D1C8B; Thu, 9 Jul 2015 13:23:32 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69DNWdw048566; Thu, 9 Jul 2015 13:23:32 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69DNUHg048559; Thu, 9 Jul 2015 13:23:30 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507091323.t69DNUHg048559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 9 Jul 2015 13:23:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285316 - in head/sys: arm64/arm64 arm64/conf arm64/include conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 13:23:32 -0000 Author: andrew Date: Thu Jul 9 13:23:29 2015 New Revision: 285316 URL: https://svnweb.freebsd.org/changeset/base/285316 Log: Add support for SMP. This uses the FDT data to find the CPUs to start on, and psci to start them. I expect ACPI support to be added later. This has been tested on qemu with 2 cpus as that is the current value of MAXCPUS. This is expected to be increased in the future as FreeBSD has been tested on 48 cores on the Cavium ThunderX hardware. Partially based on a patch from Robin Randhawa from ARM. Approved by: ABT Systems Ltd Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3024 Added: head/sys/arm64/arm64/mp_machdep.c (contents, props changed) Modified: head/sys/arm64/arm64/locore.S head/sys/arm64/arm64/machdep.c head/sys/arm64/arm64/swtch.S head/sys/arm64/conf/GENERIC head/sys/arm64/include/smp.h head/sys/conf/files.arm64 Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Thu Jul 9 13:07:12 2015 (r285315) +++ head/sys/arm64/arm64/locore.S Thu Jul 9 13:23:29 2015 (r285316) @@ -72,6 +72,8 @@ _start: msr sctlr_el1, x2 isb + /* Set the context id */ + msr contextidr_el1, xzr /* Get the virt -> phys offset */ bl get_virt_delta @@ -146,6 +148,46 @@ virtdone: .Lend: .quad _end +#ifdef SMP +/* + * mpentry(unsigned long) + * + * Called by a core when it is being brought online. + * The data in x0 is passed straight to init_secondary. + */ +ENTRY(mpentry) + /* Disable interrupts */ + msr daifset, #2 + + /* Drop to EL1 */ + bl drop_to_el1 + + /* Set the context id */ + msr contextidr_el1, x1 + + /* Load the kernel page table */ + adr x26, pagetable_l1_ttbr1 + /* Load the identity page table */ + adr x27, pagetable_l1_ttbr0 + + /* Enable the mmu */ + bl start_mmu + + /* Jump to the virtual address space */ + ldr x15, =mp_virtdone + br x15 + +mp_virtdone: + ldr x4, =secondary_stacks + mov x5, #(PAGE_SIZE * KSTACK_PAGES) + sub x1, x0, #1 + mul x5, x1, x5 + add sp, x4, x5 + + b init_secondary +END(mpentry) +#endif + /* * If we are started in EL2, configure the required hypervisor * registers and drop to EL1. Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Thu Jul 9 13:07:12 2015 (r285315) +++ head/sys/arm64/arm64/machdep.c Thu Jul 9 13:23:29 2015 (r285316) @@ -119,6 +119,13 @@ cpu_startup(void *dummy) SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); +int +cpu_idle_wakeup(int cpu) +{ + + return (0); +} + void bzero(void *buf, size_t len) { Added: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/arm64/mp_machdep.c Thu Jul 9 13:23:29 2015 (r285316) @@ -0,0 +1,433 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include "opt_platform.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#ifdef VFP +#include +#endif + +#ifdef FDT +#include +#include +#endif + +#include + +boolean_t ofw_cpu_reg(phandle_t node, u_int, cell_t *); + +extern struct pcpu __pcpu[]; + +static enum { + CPUS_UNKNOWN, +#ifdef FDT + CPUS_FDT, +#endif +} cpu_enum_method; + +static device_identify_t arm64_cpu_identify; +static device_probe_t arm64_cpu_probe; +static device_attach_t arm64_cpu_attach; + +static int ipi_handler(void *arg); + +struct mtx ap_boot_mtx; +struct pcb stoppcbs[MAXCPU]; + +#ifdef INVARIANTS +static uint32_t cpu_reg[MAXCPU][2]; +#endif +static device_t cpu_list[MAXCPU]; + +void mpentry(unsigned long cpuid); +void init_secondary(uint64_t); + +uint8_t secondary_stacks[MAXCPU - 1][PAGE_SIZE * KSTACK_PAGES] __aligned(16); + +/* # of Applications processors */ +volatile int mp_naps; +/* Set to 1 once we're ready to let the APs out of the pen. */ +volatile int aps_ready = 0; + +/* Temporary variables for init_secondary() */ +void *dpcpu[MAXCPU - 1]; + +static device_method_t arm64_cpu_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, arm64_cpu_identify), + DEVMETHOD(device_probe, arm64_cpu_probe), + DEVMETHOD(device_attach, arm64_cpu_attach), + + DEVMETHOD_END +}; + +static devclass_t arm64_cpu_devclass; +static driver_t arm64_cpu_driver = { + "arm64_cpu", + arm64_cpu_methods, + 0 +}; + +DRIVER_MODULE(arm64_cpu, cpu, arm64_cpu_driver, arm64_cpu_devclass, 0, 0); + +static void +arm64_cpu_identify(driver_t *driver, device_t parent) +{ + + if (device_find_child(parent, "arm64_cpu", -1) != NULL) + return; + if (BUS_ADD_CHILD(parent, 0, "arm64_cpu", -1) == NULL) + device_printf(parent, "add child failed\n"); +} + +static int +arm64_cpu_probe(device_t dev) +{ + u_int cpuid; + + cpuid = device_get_unit(dev); + if (cpuid >= MAXCPU || cpuid > mp_maxid) + return (EINVAL); + + return (0); +} + +static int +arm64_cpu_attach(device_t dev) +{ + const uint32_t *reg; + size_t reg_size; + u_int cpuid; + int i; + + cpuid = device_get_unit(dev); + + if (cpuid >= MAXCPU || cpuid > mp_maxid) + return (EINVAL); + KASSERT(cpu_list[cpuid] == NULL, ("Already have cpu %u", cpuid)); + + reg = cpu_get_cpuid(dev, ®_size); + if (reg == NULL) + return (EINVAL); + + device_printf(dev, "Found register:"); + for (i = 0; i < reg_size; i++) + printf(" %x", reg[i]); + printf("\n"); + + /* Set the device to start it later */ + cpu_list[cpuid] = dev; + + return (0); +} + +static void +release_aps(void *dummy __unused) +{ + int i; + + /* Setup the IPI handler */ + for (i = 0; i < COUNT_IPI; i++) + arm_setup_ipihandler(ipi_handler, i); + + atomic_store_rel_int(&aps_ready, 1); + /* Wake up the other CPUs */ + __asm __volatile("sev"); + + printf("Release APs\n"); + + for (i = 0; i < 2000; i++) { + if (smp_started) + return; + DELAY(1000); + } + + printf("AP's not started\n"); +} +SYSINIT(start_aps, SI_SUB_SMP, SI_ORDER_FIRST, release_aps, NULL); + +void +init_secondary(uint64_t cpu) +{ + struct pcpu *pcpup; + int i; + + pcpup = &__pcpu[cpu]; + /* + * Set the pcpu pointer with a backup in tpidr_el1 to be + * loaded when entering the kernel from userland. + */ + __asm __volatile( + "mov x18, %0 \n" + "msr tpidr_el1, %0" :: "r"(pcpup)); + + /* + * pcpu_init() updates queue, so it should not be executed in parallel + * on several cores + */ + while(mp_naps < (cpu - 1)) + ; + + /* Signal our startup to BSP */ + atomic_add_rel_32(&mp_naps, 1); + + /* Spin until the BSP releases the APs */ + while (!aps_ready) + __asm __volatile("wfe"); + + /* Initialize curthread */ + KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); + pcpup->pc_curthread = pcpup->pc_idlethread; + pcpup->pc_curpcb = pcpup->pc_idlethread->td_pcb; + + for (i = 0; i < COUNT_IPI; i++) + arm_unmask_ipi(i); + + /* Start per-CPU event timers. */ + cpu_initclocks_ap(); + +#ifdef VFP + vfp_init(); +#endif + + /* Configure the interrupt controller */ + arm_init_secondary(); + + /* Enable interrupts */ + intr_enable(); + + mtx_lock_spin(&ap_boot_mtx); + + atomic_add_rel_32(&smp_cpus, 1); + + if (smp_cpus == mp_ncpus) { + /* enable IPI's, tlb shootdown, freezes etc */ + atomic_store_rel_int(&smp_started, 1); + } + + mtx_unlock_spin(&ap_boot_mtx); + + /* Enter the scheduler */ + sched_throw(NULL); + + panic("scheduler returned us to init_secondary"); + /* NOTREACHED */ +} + +static int +ipi_handler(void *arg) +{ + u_int cpu, ipi; + + arg = (void *)((uintptr_t)arg & ~(1 << 16)); + KASSERT((uintptr_t)arg < COUNT_IPI, + ("Invalid IPI %ju", (uintptr_t)arg)); + + cpu = PCPU_GET(cpuid); + ipi = (uintptr_t)arg; + + switch(ipi) { + case IPI_AST: + CTR0(KTR_SMP, "IPI_AST"); + break; + case IPI_PREEMPT: + CTR1(KTR_SMP, "%s: IPI_PREEMPT", __func__); + sched_preempt(curthread); + break; + case IPI_RENDEZVOUS: + CTR0(KTR_SMP, "IPI_RENDEZVOUS"); + smp_rendezvous_action(); + break; + case IPI_STOP: + case IPI_STOP_HARD: + CTR0(KTR_SMP, (ipi == IPI_STOP) ? "IPI_STOP" : "IPI_STOP_HARD"); + savectx(&stoppcbs[cpu]); + + /* Indicate we are stopped */ + CPU_SET_ATOMIC(cpu, &stopped_cpus); + + /* Wait for restart */ + while (!CPU_ISSET(cpu, &started_cpus)) + cpu_spinwait(); + + CPU_CLR_ATOMIC(cpu, &started_cpus); + CPU_CLR_ATOMIC(cpu, &stopped_cpus); + CTR0(KTR_SMP, "IPI_STOP (restart)"); + break; + case IPI_HARDCLOCK: + CTR1(KTR_SMP, "%s: IPI_HARDCLOCK", __func__); + hardclockintr(); + break; + default: + panic("Unknown IPI %#0x on cpu %d", ipi, curcpu); + } + + return (FILTER_HANDLED); +} + +struct cpu_group * +cpu_topo(void) +{ + + return (smp_topo_none()); +} + +/* Determine if we running MP machine */ +int +cpu_mp_probe(void) +{ + + /* ARM64TODO: Read the u bit of mpidr_el1 to determine this */ + return (1); +} + +#ifdef FDT +static boolean_t +cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) +{ + uint64_t target_cpu; + struct pcpu *pcpup; + vm_paddr_t pa; + int err; + + /* Check we are able to start this cpu */ + if (id > mp_maxid) + return (0); + + KASSERT(id < MAXCPU, ("Too mant CPUs")); + + KASSERT(addr_size == 1 || addr_size == 2, ("Invalid register size")); +#ifdef INVARIANTS + cpu_reg[id][0] = reg[0]; + if (addr_size == 2) + cpu_reg[id][1] = reg[1]; +#endif + + /* We are already running on cpu 0 */ + if (id == 0) + return (1); + + CPU_SET(id, &all_cpus); + + pcpup = &__pcpu[id]; + pcpu_init(pcpup, id, sizeof(struct pcpu)); + + dpcpu[id - 1] = (void *)kmem_malloc(kernel_arena, DPCPU_SIZE, + M_WAITOK | M_ZERO); + dpcpu_init(dpcpu[id - 1], id); + + target_cpu = reg[0]; + if (addr_size == 2) { + target_cpu <<= 32; + target_cpu |= reg[1]; + } + + printf("Starting CPU %u (%lx)\n", id, target_cpu); + pa = pmap_extract(kernel_pmap, (vm_offset_t)mpentry); + + err = psci_cpu_on(target_cpu, pa, id); + if (err != PSCI_RETVAL_SUCCESS) + printf("Failed to start CPU %u\n", id); + + return (1); +} +#endif + +/* Initialize and fire up non-boot processors */ +void +cpu_mp_start(void) +{ + + mtx_init(&ap_boot_mtx, "ap boot", NULL, MTX_SPIN); + + CPU_SET(0, &all_cpus); + + switch(cpu_enum_method) { +#ifdef FDT + case CPUS_FDT: + ofw_cpu_early_foreach(cpu_init_fdt, true); + break; +#endif + case CPUS_UNKNOWN: + break; + } +} + +/* Introduce rest of cores to the world */ +void +cpu_mp_announce(void) +{ +} + +void +cpu_mp_setmaxid(void) +{ +#ifdef FDT + int cores; + + cores = ofw_cpu_early_foreach(NULL, false); + if (cores > 0) { + cores = MIN(cores, MAXCPU); + if (bootverbose) + printf("Found %d CPUs in the device tree\n", cores); + mp_ncpus = cores; + mp_maxid = cores - 1; + cpu_enum_method = CPUS_FDT; + return; + } +#endif + + if (bootverbose) + printf("No CPU data, limiting to 1 core\n"); + mp_ncpus = 1; + mp_maxid = 0; +} Modified: head/sys/arm64/arm64/swtch.S ============================================================================== --- head/sys/arm64/arm64/swtch.S Thu Jul 9 13:07:12 2015 (r285315) +++ head/sys/arm64/arm64/swtch.S Thu Jul 9 13:23:29 2015 (r285316) @@ -30,6 +30,7 @@ */ #include "assym.s" +#include "opt_sched.h" #include @@ -39,10 +40,6 @@ __FBSDID("$FreeBSD$"); * void cpu_throw(struct thread *old, struct thread *new) */ ENTRY(cpu_throw) -#ifdef SMP -#error cpu_throw needs to be ported to support SMP -#endif - #ifdef VFP /* Backup the new thread pointer around a call to C code */ mov x19, x1 @@ -100,10 +97,6 @@ END(cpu_throw) * x3 to x7, x16 and x17 are caller saved */ ENTRY(cpu_switch) -#ifdef SMP -#error cpu_switch needs to be ported to support SMP -#endif - /* Store the new curthread */ str x1, [x18, #PC_CURTHREAD] /* And the new pcb */ @@ -167,7 +160,15 @@ ENTRY(cpu_switch) /* Release the old thread */ str x2, [x0, #TD_LOCK] #if defined(SCHED_ULE) && defined(SMP) -#error We may need to wait for the lock here + /* Read the value in blocked_lock */ + ldr x0, =_C_LABEL(blocked_lock) + ldr x1, [x0] + /* Load curthread */ + ldr x2, [x18, #PC_CURTHREAD] +1: + ldr x3, [x2, #TD_LOCK] + cmp x3, x1 + b.eq 1b #endif /* Restore the registers */ Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Thu Jul 9 13:07:12 2015 (r285315) +++ head/sys/arm64/conf/GENERIC Thu Jul 9 13:23:29 2015 (r285316) @@ -69,6 +69,7 @@ options VFP # Floating-point support options RACCT # Resource accounting framework options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default options RCTL # Resource limits +options SMP # Debugging support. Always need this: options KDB # Enable kernel debugger support. Modified: head/sys/arm64/include/smp.h ============================================================================== --- head/sys/arm64/include/smp.h Thu Jul 9 13:07:12 2015 (r285315) +++ head/sys/arm64/include/smp.h Thu Jul 9 13:23:29 2015 (r285316) @@ -1 +1,55 @@ -/* $FreeBSD$ */ +/*- + * Copyright (c) 2014 Andrew Turner + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_SMP_H_ +#define _MACHINE_SMP_H_ + +#include + +enum { + IPI_AST, + IPI_PREEMPT, + IPI_RENDEZVOUS, + IPI_STOP, + IPI_STOP_HARD, + IPI_HARDCLOCK, + COUNT_IPI, +}; + +void ipi_all_but_self(u_int ipi); +void ipi_cpu(int cpu, u_int ipi); +void ipi_selected(cpuset_t cpus, u_int ipi); + +/* global data in mp_machdep.c */ +extern struct pcb stoppcbs[]; + +#endif /* !_MACHINE_SMP_H_ */ Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Thu Jul 9 13:07:12 2015 (r285315) +++ head/sys/conf/files.arm64 Thu Jul 9 13:23:29 2015 (r285316) @@ -35,6 +35,7 @@ arm64/arm64/locore.S standard no-obj arm64/arm64/machdep.c standard arm64/arm64/mem.c standard arm64/arm64/minidump_machdep.c standard +arm64/arm64/mp_machdep.c optional smp arm64/arm64/nexus.c standard arm64/arm64/pic_if.m standard arm64/arm64/pmap.c standard From owner-svn-src-all@freebsd.org Thu Jul 9 13:30:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B324996206; Thu, 9 Jul 2015 13:30:38 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 1E9221EDE; Thu, 9 Jul 2015 13:30:38 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69DUb9c050073; Thu, 9 Jul 2015 13:30:37 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69DUb83050072; Thu, 9 Jul 2015 13:30:37 GMT (envelope-from des@FreeBSD.org) Message-Id: <201507091330.t69DUb83050072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Thu, 9 Jul 2015 13:30:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285317 - stable/10/lib/libc/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 13:30:38 -0000 Author: des Date: Thu Jul 9 13:30:37 2015 New Revision: 285317 URL: https://svnweb.freebsd.org/changeset/base/285317 Log: MFH (r275020): partial fix for getgrouplist() in group_compat case PR: 190055 Approved by: re (marius) Modified: stable/10/lib/libc/net/nsdispatch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/nsdispatch.c ============================================================================== --- stable/10/lib/libc/net/nsdispatch.c Thu Jul 9 13:23:29 2015 (r285316) +++ stable/10/lib/libc/net/nsdispatch.c Thu Jul 9 13:30:37 2015 (r285317) @@ -132,14 +132,17 @@ static void *nss_cache_cycle_preventio #endif /* - * When this is set to 1, nsdispatch won't use nsswitch.conf - * but will consult the 'defaults' source list only. - * NOTE: nested fallbacks (when nsdispatch calls fallback functions, - * which in turn calls nsdispatch, which should call fallback - * function) are not supported + * We keep track of nsdispatch() nesting depth in dispatch_depth. When a + * fallback method is invoked from nsdispatch(), we temporarily set + * fallback_depth to the current dispatch depth plus one. Subsequent + * calls at that exact depth will run in fallback mode (restricted to the + * same source as the call that was handled by the fallback method), while + * calls below that depth will be handled normally, allowing fallback + * methods to perform arbitrary lookups. */ struct fb_state { - int fb_dispatch; + int dispatch_depth; + int fallback_depth; }; static void fb_endstate(void *); NSS_TLS_HANDLING(fb); @@ -616,6 +619,7 @@ _nsdispatch(void *retval, const ns_dtab void *mdata; int isthreaded, serrno, i, result, srclistsize; struct fb_state *st; + int saved_depth; #ifdef NS_CACHING nss_cache_data cache_data; @@ -647,7 +651,8 @@ _nsdispatch(void *retval, const ns_dtab result = NS_UNAVAIL; goto fin; } - if (st->fb_dispatch == 0) { + ++st->dispatch_depth; + if (st->dispatch_depth > st->fallback_depth) { dbt = vector_search(&database, _nsmap, _nsmapsize, sizeof(*_nsmap), string_compare); fb_method = nss_method_lookup(NSSRC_FALLBACK, database, @@ -716,12 +721,13 @@ _nsdispatch(void *retval, const ns_dtab break; } else { if (fb_method != NULL) { - st->fb_dispatch = 1; + saved_depth = st->fallback_depth; + st->fallback_depth = st->dispatch_depth + 1; va_start(ap, defaults); result = fb_method(retval, (void *)srclist[i].name, ap); va_end(ap); - st->fb_dispatch = 0; + st->fallback_depth = saved_depth; } else nss_log(LOG_DEBUG, "%s, %s, %s, not found, " "and no fallback provided", @@ -753,6 +759,7 @@ _nsdispatch(void *retval, const ns_dtab if (isthreaded) (void)_pthread_rwlock_unlock(&nss_lock); + --st->dispatch_depth; fin: errno = serrno; return (result); From owner-svn-src-all@freebsd.org Thu Jul 9 14:14:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EFFB996A6E; Thu, 9 Jul 2015 14:14:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 237B11C65; Thu, 9 Jul 2015 14:14:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69EElYm073283; Thu, 9 Jul 2015 14:14:47 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69EEj4k073268; Thu, 9 Jul 2015 14:14:45 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507091414.t69EEj4k073268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 9 Jul 2015 14:14:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285318 - in head/usr.sbin/pw: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 14:14:47 -0000 Author: bapt Date: Thu Jul 9 14:14:44 2015 New Revision: 285318 URL: https://svnweb.freebsd.org/changeset/base/285318 Log: Do not try to set password on group if the group is added as a consequence of of creating a user (regression from r285136) Reported by: Fabian Keil Modified: head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pwupd.h head/usr.sbin/pw/tests/pw_useradd.sh Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Thu Jul 9 13:30:37 2015 (r285317) +++ head/usr.sbin/pw/pw.c Thu Jul 9 14:14:44 2015 (r285318) @@ -215,6 +215,7 @@ main(int argc, char *argv[]) if (mode == -1 || which == -1) cmdhelp(mode, which); + conf.which = which; /* * We know which mode we're in and what we're about to do, so now * let's dispatch the remaining command line args in a genric way. Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Thu Jul 9 13:30:37 2015 (r285317) +++ head/usr.sbin/pw/pw_group.c Thu Jul 9 14:14:44 2015 (r285318) @@ -200,7 +200,7 @@ pw_group(int mode, char *name, long id, * software. */ - if (conf.fd != -1) + if (conf.which == W_GROUP && conf.fd != -1) set_passwd(grp, mode == M_UPDATE); if (((arg = getarg(args, 'M')) != NULL || Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Thu Jul 9 13:30:37 2015 (r285317) +++ head/usr.sbin/pw/pwupd.h Thu Jul 9 14:14:44 2015 (r285318) @@ -86,6 +86,7 @@ struct pwconf { char *newname; char *config; int fd; + int which; bool dryrun; bool pretty; bool v7; Modified: head/usr.sbin/pw/tests/pw_useradd.sh ============================================================================== --- head/usr.sbin/pw/tests/pw_useradd.sh Thu Jul 9 13:30:37 2015 (r285317) +++ head/usr.sbin/pw/tests/pw_useradd.sh Thu Jul 9 14:14:44 2015 (r285318) @@ -231,6 +231,15 @@ user_add_invalid_group_entry_body() { atf_check -s exit:1 -e match:"Invalid group entry" ${PW} useradd foo2 } +atf_test_case user_add_password_from_h +user_add_password_from_h_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd test -h 0 <<-EOF + $(echo test) + EOF +} + atf_init_test_cases() { atf_add_test_case user_add atf_add_test_case user_add_noupdate @@ -251,4 +260,5 @@ atf_init_test_cases() { atf_add_test_case user_add_expiration atf_add_test_case user_add_invalid_user_entry atf_add_test_case user_add_invalid_group_entry + atf_add_test_case user_add_password_from_h } From owner-svn-src-all@freebsd.org Thu Jul 9 15:06:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA8EC9974CA; Thu, 9 Jul 2015 15:06:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 9149C149D; Thu, 9 Jul 2015 15:06:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69F6P1v098044; Thu, 9 Jul 2015 15:06:25 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69F6Pli098043; Thu, 9 Jul 2015 15:06:25 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201507091506.t69F6Pli098043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 9 Jul 2015 15:06:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285319 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 15:06:25 -0000 Author: mjg Date: Thu Jul 9 15:06:24 2015 New Revision: 285319 URL: https://svnweb.freebsd.org/changeset/base/285319 Log: vfs: plug a use-after-free of fd_rdir in namei fd_rdir vnode was stored in ni_rootdir without refing it in any way, after which the filedsc lock was being dropped. The vnode could have been freed by mountcheckdirs or another thread doing chroot. VREF the vnode while the lock is held. Reviewed by: kib MFC after: 1 week Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Thu Jul 9 14:14:44 2015 (r285318) +++ head/sys/kern/vfs_lookup.c Thu Jul 9 15:06:24 2015 (r285319) @@ -210,6 +210,7 @@ namei(struct nameidata *ndp) */ FILEDESC_SLOCK(fdp); ndp->ni_rootdir = fdp->fd_rdir; + VREF(ndp->ni_rootdir); ndp->ni_topdir = fdp->fd_jdir; /* @@ -260,6 +261,7 @@ namei(struct nameidata *ndp) } } if (error) { + vrele(ndp->ni_rootdir); namei_cleanup_cnp(cnp); return (error); } @@ -286,6 +288,7 @@ namei(struct nameidata *ndp) if (KTRPOINT(curthread, KTR_CAPFAIL)) ktrcapfail(CAPFAIL_LOOKUP, NULL, NULL); #endif + vrele(ndp->ni_rootdir); namei_cleanup_cnp(cnp); return (ENOTCAPABLE); } @@ -299,6 +302,7 @@ namei(struct nameidata *ndp) ndp->ni_startdir = dp; error = lookup(ndp); if (error) { + vrele(ndp->ni_rootdir); namei_cleanup_cnp(cnp); SDT_PROBE(vfs, namei, lookup, return, error, NULL, 0, 0, 0); @@ -308,6 +312,7 @@ namei(struct nameidata *ndp) * If not a symbolic link, we're done. */ if ((cnp->cn_flags & ISSYMLINK) == 0) { + vrele(ndp->ni_rootdir); if ((cnp->cn_flags & (SAVENAME | SAVESTART)) == 0) { namei_cleanup_cnp(cnp); } else @@ -371,6 +376,7 @@ namei(struct nameidata *ndp) vput(ndp->ni_vp); dp = ndp->ni_dvp; } + vrele(ndp->ni_rootdir); namei_cleanup_cnp(cnp); vput(ndp->ni_vp); ndp->ni_vp = NULL; From owner-svn-src-all@freebsd.org Thu Jul 9 15:06:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 416AA99750B; Thu, 9 Jul 2015 15:06:59 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 258D51629; Thu, 9 Jul 2015 15:06:59 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69F6xhm098158; Thu, 9 Jul 2015 15:06:59 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69F6xLX098157; Thu, 9 Jul 2015 15:06:59 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201507091506.t69F6xLX098157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 9 Jul 2015 15:06:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285320 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 15:06:59 -0000 Author: mjg Date: Thu Jul 9 15:06:58 2015 New Revision: 285320 URL: https://svnweb.freebsd.org/changeset/base/285320 Log: vfs: avoid spurious vref/vrele for absolute lookups namei used to vref fd_cdir, which was immediatley vrele'd on entry to the loop. Check for absolute lookup and vref the right vnode the first time. Reviewed by: kib Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Thu Jul 9 15:06:24 2015 (r285319) +++ head/sys/kern/vfs_lookup.c Thu Jul 9 15:06:58 2015 (r285320) @@ -109,6 +109,27 @@ namei_cleanup_cnp(struct componentname * #endif } +static int +namei_handle_root(struct nameidata *ndp, struct vnode **dpp) +{ + struct componentname *cnp = &ndp->ni_cnd; + + if (ndp->ni_strictrelative != 0) { +#ifdef KTRACE + if (KTRPOINT(curthread, KTR_CAPFAIL)) + ktrcapfail(CAPFAIL_LOOKUP, NULL, NULL); +#endif + return (ENOTCAPABLE); + } + while (*(cnp->cn_nameptr) == '/') { + cnp->cn_nameptr++; + ndp->ni_pathlen--; + } + *dpp = ndp->ni_rootdir; + VREF(*dpp); + return (0); +} + /* * Convert a pathname into a pointer to a locked vnode. * @@ -222,7 +243,18 @@ namei(struct nameidata *ndp) AUDIT_ARG_UPATH2(td, ndp->ni_dirfd, cnp->cn_pnbuf); dp = NULL; - if (cnp->cn_pnbuf[0] != '/') { + cnp->cn_nameptr = cnp->cn_pnbuf; + if (cnp->cn_pnbuf[0] == '/') { + error = namei_handle_root(ndp, &dp); + FILEDESC_SUNLOCK(fdp); + if (error != 0) { + vrele(ndp->ni_rootdir); + if (ndp->ni_startdir != NULL) + vrele(ndp->ni_startdir); + namei_cleanup_cnp(cnp); + return (error); + } + } else { if (ndp->ni_startdir != NULL) { dp = ndp->ni_startdir; error = 0; @@ -276,29 +308,6 @@ namei(struct nameidata *ndp) SDT_PROBE(vfs, namei, lookup, entry, dp, cnp->cn_pnbuf, cnp->cn_flags, 0, 0); for (;;) { - /* - * Check if root directory should replace current directory. - * Done at start of translation and after symbolic link. - */ - cnp->cn_nameptr = cnp->cn_pnbuf; - if (*(cnp->cn_nameptr) == '/') { - vrele(dp); - if (ndp->ni_strictrelative != 0) { -#ifdef KTRACE - if (KTRPOINT(curthread, KTR_CAPFAIL)) - ktrcapfail(CAPFAIL_LOOKUP, NULL, NULL); -#endif - vrele(ndp->ni_rootdir); - namei_cleanup_cnp(cnp); - return (ENOTCAPABLE); - } - while (*(cnp->cn_nameptr) == '/') { - cnp->cn_nameptr++; - ndp->ni_pathlen--; - } - dp = ndp->ni_rootdir; - VREF(dp); - } ndp->ni_startdir = dp; error = lookup(ndp); if (error) { @@ -375,6 +384,19 @@ namei(struct nameidata *ndp) ndp->ni_pathlen += linklen; vput(ndp->ni_vp); dp = ndp->ni_dvp; + /* + * Check if root directory should replace current directory. + */ + cnp->cn_nameptr = cnp->cn_pnbuf; + if (*(cnp->cn_nameptr) == '/') { + vrele(dp); + error = namei_handle_root(ndp, &dp); + if (error != 0) { + vrele(ndp->ni_rootdir); + namei_cleanup_cnp(cnp); + return (error); + } + } } vrele(ndp->ni_rootdir); namei_cleanup_cnp(cnp); From owner-svn-src-all@freebsd.org Thu Jul 9 15:19:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 253C2997780; Thu, 9 Jul 2015 15:19:46 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 084591D0A; Thu, 9 Jul 2015 15:19:46 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69FJjBo003535; Thu, 9 Jul 2015 15:19:45 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69FJjC4003534; Thu, 9 Jul 2015 15:19:45 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201507091519.t69FJjC4003534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 9 Jul 2015 15:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285321 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 15:19:46 -0000 Author: mjg Date: Thu Jul 9 15:19:45 2015 New Revision: 285321 URL: https://svnweb.freebsd.org/changeset/base/285321 Log: fd: prepare do_dup for being exported - rename it to kern_dup. - prefix flags with FD - assert that correct flags were passed Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Jul 9 15:06:58 2015 (r285320) +++ head/sys/kern/kern_descrip.c Thu Jul 9 15:19:45 2015 (r285321) @@ -102,7 +102,7 @@ static uma_zone_t filedesc0_zone; static int closefp(struct filedesc *fdp, int fd, struct file *fp, struct thread *td, int holdleaders); -static int do_dup(struct thread *td, int flags, int old, int new); +static int kern_dup(struct thread *td, int flags, int old, int new); static int fd_first_free(struct filedesc *fdp, int low, int size); static int fd_last_used(struct filedesc *fdp, int size); static void fdgrowtable(struct filedesc *fdp, int nfd); @@ -111,10 +111,10 @@ static void fdunused(struct filedesc *fd static void fdused(struct filedesc *fdp, int fd); static int getmaxfd(struct thread *td); -/* Flags for do_dup() */ -#define DUP_FIXED 0x1 /* Force fixed allocation. */ -#define DUP_FCNTL 0x2 /* fcntl()-style errors. */ -#define DUP_CLOEXEC 0x4 /* Atomically set FD_CLOEXEC. */ +/* Flags for kern_dup() */ +#define FDDUP_FIXED 0x1 /* Force fixed allocation. */ +#define FDDUP_FCNTL 0x2 /* fcntl()-style errors. */ +#define FDDUP_CLOEXEC 0x4 /* Atomically set FD_CLOEXEC. */ /* * Each process has: @@ -361,7 +361,7 @@ int sys_dup2(struct thread *td, struct dup2_args *uap) { - return (do_dup(td, DUP_FIXED, (int)uap->from, (int)uap->to)); + return (kern_dup(td, FDDUP_FIXED, (int)uap->from, (int)uap->to)); } /* @@ -377,7 +377,7 @@ int sys_dup(struct thread *td, struct dup_args *uap) { - return (do_dup(td, 0, (int)uap->fd, 0)); + return (kern_dup(td, 0, (int)uap->fd, 0)); } /* @@ -487,22 +487,22 @@ kern_fcntl(struct thread *td, int fd, in switch (cmd) { case F_DUPFD: tmp = arg; - error = do_dup(td, DUP_FCNTL, fd, tmp); + error = kern_dup(td, FDDUP_FCNTL, fd, tmp); break; case F_DUPFD_CLOEXEC: tmp = arg; - error = do_dup(td, DUP_FCNTL | DUP_CLOEXEC, fd, tmp); + error = kern_dup(td, FDDUP_FCNTL | FDDUP_CLOEXEC, fd, tmp); break; case F_DUP2FD: tmp = arg; - error = do_dup(td, DUP_FIXED, fd, tmp); + error = kern_dup(td, FDDUP_FIXED, fd, tmp); break; case F_DUP2FD_CLOEXEC: tmp = arg; - error = do_dup(td, DUP_FIXED | DUP_CLOEXEC, fd, tmp); + error = kern_dup(td, FDDUP_FIXED | FDDUP_CLOEXEC, fd, tmp); break; case F_GETFD: @@ -795,7 +795,7 @@ getmaxfd(struct thread *td) * Common code for dup, dup2, fcntl(F_DUPFD) and fcntl(F_DUP2FD). */ static int -do_dup(struct thread *td, int flags, int old, int new) +kern_dup(struct thread *td, int flags, int old, int new) { struct filedesc *fdp; struct filedescent *oldfde, *newfde; @@ -807,6 +807,8 @@ do_dup(struct thread *td, int flags, int p = td->td_proc; fdp = p->p_fd; + MPASS((flags & ~(FDDUP_FIXED | FDDUP_FCNTL | FDDUP_CLOEXEC)) == 0); + /* * Verify we have a valid descriptor to dup from and possibly to * dup to. Unlike dup() and dup2(), fcntl()'s F_DUPFD should @@ -815,10 +817,10 @@ do_dup(struct thread *td, int flags, int if (old < 0) return (EBADF); if (new < 0) - return (flags & DUP_FCNTL ? EINVAL : EBADF); + return (flags & FDDUP_FCNTL ? EINVAL : EBADF); maxfd = getmaxfd(td); if (new >= maxfd) - return (flags & DUP_FCNTL ? EINVAL : EBADF); + return (flags & FDDUP_FCNTL ? EINVAL : EBADF); FILEDESC_XLOCK(fdp); if (fget_locked(fdp, old) == NULL) { @@ -826,9 +828,9 @@ do_dup(struct thread *td, int flags, int return (EBADF); } oldfde = &fdp->fd_ofiles[old]; - if (flags & DUP_FIXED && old == new) { + if (flags & FDDUP_FIXED && old == new) { td->td_retval[0] = new; - if (flags & DUP_CLOEXEC) + if (flags & FDDUP_CLOEXEC) fdp->fd_ofiles[new].fde_flags |= UF_EXCLOSE; FILEDESC_XUNLOCK(fdp); return (0); @@ -841,7 +843,7 @@ do_dup(struct thread *td, int flags, int * table is large enough to hold it, and grab it. Otherwise, just * allocate a new descriptor the usual way. */ - if (flags & DUP_FIXED) { + if (flags & FDDUP_FIXED) { if (new >= fdp->fd_nfiles) { /* * The resource limits are here instead of e.g. @@ -892,7 +894,7 @@ do_dup(struct thread *td, int flags, int filecaps_free(&newfde->fde_caps); memcpy(newfde, oldfde, fde_change_size); filecaps_copy(&oldfde->fde_caps, &newfde->fde_caps); - if ((flags & DUP_CLOEXEC) != 0) + if ((flags & FDDUP_CLOEXEC) != 0) newfde->fde_flags = oldfde->fde_flags | UF_EXCLOSE; else newfde->fde_flags = oldfde->fde_flags & ~UF_EXCLOSE; @@ -1988,7 +1990,7 @@ retry: if (fdp->fd_holdleaderscount > 0 && (p->p_leader->p_flag & P_ADVLOCK) != 0) { /* - * close() or do_dup() has cleared a reference + * close() or kern_dup() has cleared a reference * in a shared file descriptor table. */ fdp->fd_holdleaderswakeup = 1; @@ -2215,7 +2217,7 @@ fdcheckstd(struct thread *td) save = td->td_retval[0]; if (devnull != -1) { - error = do_dup(td, DUP_FIXED, devnull, i); + error = kern_dup(td, FDDUP_FIXED, devnull, i); } else { error = kern_openat(td, AT_FDCWD, "/dev/null", UIO_SYSSPACE, O_RDWR, 0); From owner-svn-src-all@freebsd.org Thu Jul 9 15:56:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 120EE996310; Thu, 9 Jul 2015 15:56:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 01B031630; Thu, 9 Jul 2015 15:56:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69FuqKW025354; Thu, 9 Jul 2015 15:56:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69Fuq0x025353; Thu, 9 Jul 2015 15:56:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507091556.t69Fuq0x025353@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 9 Jul 2015 15:56:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285322 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 15:56:53 -0000 Author: gjb Date: Thu Jul 9 15:56:51 2015 New Revision: 285322 URL: https://svnweb.freebsd.org/changeset/base/285322 Log: MFC r276383, r276400: r276383: Delay dropping to the mountroot prompt for 10 seconds in case the root device is not yet ready. r276400: Use the correct loader.conf(5) entry for deferring the mountroot prompt. Approved by: re (marius) Reminded by: hrs Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Thu Jul 9 15:19:45 2015 (r285321) +++ stable/10/release/Makefile Thu Jul 9 15:56:51 2015 (r285322) @@ -198,6 +198,7 @@ disc1: packagesystem ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf + echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf cp ${.CURDIR}/rc.local ${.TARGET}/etc touch ${.TARGET} @@ -222,6 +223,7 @@ bootonly: packagesystem ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf + echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf cp ${.CURDIR}/rc.local ${.TARGET}/etc dvd: packagesystem @@ -240,6 +242,7 @@ dvd: packagesystem ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf + echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf cp ${.CURDIR}/rc.local ${.TARGET}/etc touch ${.TARGET} From owner-svn-src-all@freebsd.org Thu Jul 9 16:07:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 227FB9966F4; Thu, 9 Jul 2015 16:07:04 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 05BA2128E; Thu, 9 Jul 2015 16:07:04 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69G736T031620; Thu, 9 Jul 2015 16:07:03 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69G72nt031613; Thu, 9 Jul 2015 16:07:02 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201507091607.t69G72nt031613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 9 Jul 2015 16:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285323 - in head/sys: compat/cloudabi kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 16:07:04 -0000 Author: ed Date: Thu Jul 9 16:07:01 2015 New Revision: 285323 URL: https://svnweb.freebsd.org/changeset/base/285323 Log: Add implementations for some of the CloudABI file descriptor system calls. All of the CloudABI system calls that operate on file descriptors of an arbitrary type are prefixed with fd_. This change adds wrappers for most of these system calls around their FreeBSD equivalents. The dup2() system call present on CloudABI deviates from POSIX, in the sense that it can only be used to replace existing file descriptor. It cannot be used to create new ones. The reason for this is that this is inherently thread-unsafe. Furthermore, there is no need on CloudABI to use fixed file descriptor numbers. File descriptors 0, 1 and 2 have no special meaning. This change exposes the kern_dup() through and puts the FDDUP_* flags in . It then adds a new flag, FDDUP_MUSTREPLACE to force that file descriptors are replaced -- not allocated. Differential Revision: https://reviews.freebsd.org/D3035 Reviewed by: mjg Modified: head/sys/compat/cloudabi/cloudabi_fd.c head/sys/kern/kern_descrip.c head/sys/sys/filedesc.h head/sys/sys/syscallsubr.h Modified: head/sys/compat/cloudabi/cloudabi_fd.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_fd.c Thu Jul 9 15:56:51 2015 (r285322) +++ head/sys/compat/cloudabi/cloudabi_fd.c Thu Jul 9 16:07:01 2015 (r285323) @@ -26,14 +26,20 @@ #include __FBSDID("$FreeBSD$"); +#include +#include +#include +#include +#include +#include + #include int cloudabi_sys_fd_close(struct thread *td, struct cloudabi_sys_fd_close_args *uap) { - /* Not implemented. */ - return (ENOSYS); + return (kern_close(td, uap->fd)); } int @@ -58,34 +64,67 @@ int cloudabi_sys_fd_datasync(struct thread *td, struct cloudabi_sys_fd_datasync_args *uap) { + struct fsync_args fsync_args = { + .fd = uap->fd + }; - /* Not implemented. */ - return (ENOSYS); + /* Call into fsync(), as FreeBSD lacks fdatasync(). */ + return (sys_fsync(td, &fsync_args)); } int cloudabi_sys_fd_dup(struct thread *td, struct cloudabi_sys_fd_dup_args *uap) { - /* Not implemented. */ - return (ENOSYS); + return (kern_dup(td, 0, uap->from, 0)); } int cloudabi_sys_fd_replace(struct thread *td, struct cloudabi_sys_fd_replace_args *uap) { + int error; - /* Not implemented. */ - return (ENOSYS); + /* + * CloudABI's equivalent to dup2(). CloudABI processes should + * not depend on hardcoded file descriptor layouts, but simply + * use the file descriptor numbers that are allocated by the + * kernel. Duplicating file descriptors to arbitrary numbers + * should not be done. + * + * Invoke kern_dup() with FDDUP_MUSTREPLACE, so that we return + * EBADF when duplicating to a nonexistent file descriptor. Also + * clear the return value, as this system call yields no return + * value. + */ + error = kern_dup(td, FDDUP_MUSTREPLACE, uap->from, uap->to); + td->td_retval[0] = 0; + return (error); } int cloudabi_sys_fd_seek(struct thread *td, struct cloudabi_sys_fd_seek_args *uap) { + struct lseek_args lseek_args = { + .fd = uap->fd, + .offset = uap->offset + }; + + switch (uap->whence) { + case CLOUDABI_WHENCE_CUR: + lseek_args.whence = SEEK_CUR; + break; + case CLOUDABI_WHENCE_END: + lseek_args.whence = SEEK_END; + break; + case CLOUDABI_WHENCE_SET: + lseek_args.whence = SEEK_SET; + break; + default: + return (EINVAL); + } - /* Not implemented. */ - return (ENOSYS); + return (sys_lseek(td, &lseek_args)); } int @@ -109,7 +148,9 @@ cloudabi_sys_fd_stat_put(struct thread * int cloudabi_sys_fd_sync(struct thread *td, struct cloudabi_sys_fd_sync_args *uap) { + struct fsync_args fsync_args = { + .fd = uap->fd + }; - /* Not implemented. */ - return (ENOSYS); + return (sys_fsync(td, &fsync_args)); } Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Jul 9 15:56:51 2015 (r285322) +++ head/sys/kern/kern_descrip.c Thu Jul 9 16:07:01 2015 (r285323) @@ -102,7 +102,6 @@ static uma_zone_t filedesc0_zone; static int closefp(struct filedesc *fdp, int fd, struct file *fp, struct thread *td, int holdleaders); -static int kern_dup(struct thread *td, int flags, int old, int new); static int fd_first_free(struct filedesc *fdp, int low, int size); static int fd_last_used(struct filedesc *fdp, int size); static void fdgrowtable(struct filedesc *fdp, int nfd); @@ -111,11 +110,6 @@ static void fdunused(struct filedesc *fd static void fdused(struct filedesc *fdp, int fd); static int getmaxfd(struct thread *td); -/* Flags for kern_dup() */ -#define FDDUP_FIXED 0x1 /* Force fixed allocation. */ -#define FDDUP_FCNTL 0x2 /* fcntl()-style errors. */ -#define FDDUP_CLOEXEC 0x4 /* Atomically set FD_CLOEXEC. */ - /* * Each process has: * @@ -794,7 +788,7 @@ getmaxfd(struct thread *td) /* * Common code for dup, dup2, fcntl(F_DUPFD) and fcntl(F_DUP2FD). */ -static int +int kern_dup(struct thread *td, int flags, int old, int new) { struct filedesc *fdp; @@ -807,7 +801,10 @@ kern_dup(struct thread *td, int flags, i p = td->td_proc; fdp = p->p_fd; - MPASS((flags & ~(FDDUP_FIXED | FDDUP_FCNTL | FDDUP_CLOEXEC)) == 0); + MPASS((flags & ~(FDDUP_FIXED | FDDUP_FCNTL | FDDUP_CLOEXEC | + FDDUP_MUSTREPLACE)) == 0); + MPASS((flags & (FDDUP_FIXED | FDDUP_MUSTREPLACE)) != + (FDDUP_FIXED | FDDUP_MUSTREPLACE)); /* * Verify we have a valid descriptor to dup from and possibly to @@ -828,7 +825,7 @@ kern_dup(struct thread *td, int flags, i return (EBADF); } oldfde = &fdp->fd_ofiles[old]; - if (flags & FDDUP_FIXED && old == new) { + if (flags & (FDDUP_FIXED | FDDUP_MUSTREPLACE) && old == new) { td->td_retval[0] = new; if (flags & FDDUP_CLOEXEC) fdp->fd_ofiles[new].fde_flags |= UF_EXCLOSE; @@ -843,7 +840,16 @@ kern_dup(struct thread *td, int flags, i * table is large enough to hold it, and grab it. Otherwise, just * allocate a new descriptor the usual way. */ - if (flags & FDDUP_FIXED) { + if (flags & FDDUP_MUSTREPLACE) { + /* Target file descriptor must exist. */ + if (new >= fdp->fd_nfiles || + fdp->fd_ofiles[new].fde_file == NULL) { + FILEDESC_XUNLOCK(fdp); + fdrop(fp, td); + return (EBADF); + } + newfde = &fdp->fd_ofiles[new]; + } else if (flags & FDDUP_FIXED) { if (new >= fdp->fd_nfiles) { /* * The resource limits are here instead of e.g. Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Thu Jul 9 15:56:51 2015 (r285322) +++ head/sys/sys/filedesc.h Thu Jul 9 16:07:01 2015 (r285323) @@ -134,6 +134,12 @@ struct filedesc_to_leader { SX_NOTRECURSED) #define FILEDESC_UNLOCK_ASSERT(fdp) sx_assert(&(fdp)->fd_sx, SX_UNLOCKED) +/* Flags for kern_dup(). */ +#define FDDUP_FIXED 0x1 /* Force fixed allocation. */ +#define FDDUP_FCNTL 0x2 /* fcntl()-style errors. */ +#define FDDUP_CLOEXEC 0x4 /* Atomically set FD_CLOEXEC. */ +#define FDDUP_MUSTREPLACE 0x8 /* Target must exist. */ + struct thread; void filecaps_init(struct filecaps *fcaps); Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Thu Jul 9 15:56:51 2015 (r285322) +++ head/sys/sys/syscallsubr.h Thu Jul 9 16:07:01 2015 (r285323) @@ -85,6 +85,7 @@ int kern_clock_settime(struct thread *td int kern_close(struct thread *td, int fd); int kern_connectat(struct thread *td, int dirfd, int fd, struct sockaddr *sa); +int kern_dup(struct thread *td, int flags, int old, int new); int kern_execve(struct thread *td, struct image_args *args, struct mac *mac_p); int kern_fchmodat(struct thread *td, int fd, char *path, From owner-svn-src-all@freebsd.org Thu Jul 9 16:13:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 897EE996940; Thu, 9 Jul 2015 16:13:06 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 76C851981; Thu, 9 Jul 2015 16:13:06 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69GD6Oh036027; Thu, 9 Jul 2015 16:13:06 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69GD6RZ036026; Thu, 9 Jul 2015 16:13:06 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201507091613.t69GD6RZ036026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Thu, 9 Jul 2015 16:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285324 - head/lib/libmd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 16:13:06 -0000 Author: jmg Date: Thu Jul 9 16:13:05 2015 New Revision: 285324 URL: https://svnweb.freebsd.org/changeset/base/285324 Log: increase buffer size to significantly increase performance... see: https://docs.freebsd.org/cgi/mid.cgi?20150513080342.GE37063@funkthat.com for benchmarks... Modified: head/lib/libmd/mdXhl.c Modified: head/lib/libmd/mdXhl.c ============================================================================== --- head/lib/libmd/mdXhl.c Thu Jul 9 16:07:01 2015 (r285323) +++ head/lib/libmd/mdXhl.c Thu Jul 9 16:13:05 2015 (r285324) @@ -49,7 +49,7 @@ MDXFile(const char *filename, char *buf) char * MDXFileChunk(const char *filename, char *buf, off_t ofs, off_t len) { - unsigned char buffer[BUFSIZ]; + unsigned char buffer[16*1024]; MDX_CTX ctx; struct stat stbuf; int f, i, e; From owner-svn-src-all@freebsd.org Thu Jul 9 16:28:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 161A7996C95; Thu, 9 Jul 2015 16:28:37 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 063E0105B; Thu, 9 Jul 2015 16:28:37 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69GSade041688; Thu, 9 Jul 2015 16:28:36 GMT (envelope-from eri@FreeBSD.org) Received: (from eri@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69GSaFX041687; Thu, 9 Jul 2015 16:28:36 GMT (envelope-from eri@FreeBSD.org) Message-Id: <201507091628.t69GSaFX041687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eri set sender to eri@FreeBSD.org using -f From: Ermal Luçi Date: Thu, 9 Jul 2015 16:28:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285325 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 16:28:37 -0000 Author: eri Date: Thu Jul 9 16:28:36 2015 New Revision: 285325 URL: https://svnweb.freebsd.org/changeset/base/285325 Log: Correct issue presented in r285051, apparently neither clang nor gcc complain about this. But clang intis the var to NULL correctly while gcc on at least mips does not. Correct the undefined behavior by initializing the variable properly. PR: 201371 Differential Revision: https://reviews.freebsd.org/D3036 Reviewed by: gnn Approved by: gnn(mentor) Modified: head/sys/netinet/ip_input.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Thu Jul 9 16:13:05 2015 (r285324) +++ head/sys/netinet/ip_input.c Thu Jul 9 16:28:36 2015 (r285325) @@ -941,7 +941,8 @@ ip_forward(struct mbuf *m, int srcrt) if (ro.ro_rt != NULL) { ia = ifatoia(ro.ro_rt->rt_ifa); ifa_ref(&ia->ia_ifa); - } + } else + ia = NULL; #ifndef IPSEC /* * 'ia' may be NULL if there is no route for this destination. From owner-svn-src-all@freebsd.org Thu Jul 9 16:33:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19E5A996E7A; Thu, 9 Jul 2015 16:33:00 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 EF59B1890; Thu, 9 Jul 2015 16:32:59 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69GWxtN046036; Thu, 9 Jul 2015 16:32:59 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69GWxSo046035; Thu, 9 Jul 2015 16:32:59 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201507091632.t69GWxSo046035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 9 Jul 2015 16:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285326 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 16:33:00 -0000 Author: mjg Date: Thu Jul 9 16:32:58 2015 New Revision: 285326 URL: https://svnweb.freebsd.org/changeset/base/285326 Log: vfs: simplify error handling in namei The logic is reorganised so that there is one exit point prior to the lookup loop. This is an intermediate step to making audit logging functions use found vnode instead of translating ni_dirfd on their own. ni_startdir validation is removed. The only in-tree consumer is nfs which already makes sure it is a directory. Reviewed by: kib Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Thu Jul 9 16:28:36 2015 (r285325) +++ head/sys/kern/vfs_lookup.c Thu Jul 9 16:32:58 2015 (r285326) @@ -158,7 +158,7 @@ namei(struct nameidata *ndp) struct vnode *dp; /* the directory we are searching */ struct iovec aiov; /* uio for reading symbolic links */ struct uio auio; - int error, linklen; + int error, linklen, startdir_used; struct componentname *cnp = &ndp->ni_cnd; struct thread *td = cnp->cn_thread; struct proc *p = td->td_proc; @@ -169,6 +169,8 @@ namei(struct nameidata *ndp) ("namei: nameiop contaminated with flags")); KASSERT((cnp->cn_flags & OPMASK) == 0, ("namei: flags contaminated with nameiops")); + MPASS(ndp->ni_startdir == NULL || ndp->ni_startdir->v_type == VDIR || + ndp->ni_startdir->v_type == VBAD); if (!lookup_shared) cnp->cn_flags &= ~LOCKSHARED; fdp = p->p_fd; @@ -242,23 +244,19 @@ namei(struct nameidata *ndp) if (cnp->cn_flags & AUDITVNODE2) AUDIT_ARG_UPATH2(td, ndp->ni_dirfd, cnp->cn_pnbuf); + startdir_used = 0; dp = NULL; cnp->cn_nameptr = cnp->cn_pnbuf; if (cnp->cn_pnbuf[0] == '/') { error = namei_handle_root(ndp, &dp); - FILEDESC_SUNLOCK(fdp); - if (error != 0) { - vrele(ndp->ni_rootdir); - if (ndp->ni_startdir != NULL) - vrele(ndp->ni_startdir); - namei_cleanup_cnp(cnp); - return (error); - } } else { if (ndp->ni_startdir != NULL) { dp = ndp->ni_startdir; - error = 0; - } else if (ndp->ni_dirfd != AT_FDCWD) { + startdir_used = 1; + } else if (ndp->ni_dirfd == AT_FDCWD) { + dp = fdp->fd_cdir; + VREF(dp); + } else { cap_rights_t rights; rights = ndp->ni_rightsneeded; @@ -285,25 +283,18 @@ namei(struct nameidata *ndp) } #endif } - if (error != 0 || dp != NULL) { - FILEDESC_SUNLOCK(fdp); - if (error == 0 && dp->v_type != VDIR) { - vrele(dp); - error = ENOTDIR; - } - } - if (error) { - vrele(ndp->ni_rootdir); - namei_cleanup_cnp(cnp); - return (error); - } + if (error == 0 && dp->v_type != VDIR) + error = ENOTDIR; } - if (dp == NULL) { - dp = fdp->fd_cdir; - VREF(dp); - FILEDESC_SUNLOCK(fdp); - if (ndp->ni_startdir != NULL) - vrele(ndp->ni_startdir); + FILEDESC_SUNLOCK(fdp); + if (ndp->ni_startdir != NULL && !startdir_used) + vrele(ndp->ni_startdir); + if (error != 0) { + if (dp != NULL) + vrele(dp); + vrele(ndp->ni_rootdir); + namei_cleanup_cnp(cnp); + return (error); } SDT_PROBE(vfs, namei, lookup, entry, dp, cnp->cn_pnbuf, cnp->cn_flags, 0, 0); From owner-svn-src-all@freebsd.org Thu Jul 9 16:41:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4720B997143; Thu, 9 Jul 2015 16:41:40 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 34B8C1E0C; Thu, 9 Jul 2015 16:41:40 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69GfeI6050319; Thu, 9 Jul 2015 16:41:40 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69GfZPj050275; Thu, 9 Jul 2015 16:41:35 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201507091641.t69GfZPj050275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 9 Jul 2015 16:41:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r285327 - in vendor-crypto/openssl/dist: . crypto crypto/bio crypto/evp crypto/pkcs12 crypto/threads crypto/x509 doc/crypto ssl X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 16:41:40 -0000 Author: jkim Date: Thu Jul 9 16:41:34 2015 New Revision: 285327 URL: https://svnweb.freebsd.org/changeset/base/285327 Log: Import OpenSSL 1.0.1p. Added: vendor-crypto/openssl/dist/crypto/x509/verify_extra_test.c (contents, props changed) Modified: vendor-crypto/openssl/dist/CHANGES vendor-crypto/openssl/dist/FREEBSD-upgrade vendor-crypto/openssl/dist/Makefile vendor-crypto/openssl/dist/Makefile.org vendor-crypto/openssl/dist/NEWS vendor-crypto/openssl/dist/README vendor-crypto/openssl/dist/crypto/bio/bio.h vendor-crypto/openssl/dist/crypto/evp/e_aes.c vendor-crypto/openssl/dist/crypto/opensslconf.h vendor-crypto/openssl/dist/crypto/opensslconf.h.in vendor-crypto/openssl/dist/crypto/opensslv.h vendor-crypto/openssl/dist/crypto/pkcs12/p12_kiss.c vendor-crypto/openssl/dist/crypto/threads/mttest.c vendor-crypto/openssl/dist/crypto/threads/pthread2.sh vendor-crypto/openssl/dist/crypto/x509/Makefile vendor-crypto/openssl/dist/crypto/x509/x509_vfy.c vendor-crypto/openssl/dist/doc/crypto/X509_NAME_get_index_by_NID.pod vendor-crypto/openssl/dist/doc/crypto/X509_STORE_CTX_new.pod vendor-crypto/openssl/dist/doc/crypto/X509_verify_cert.pod vendor-crypto/openssl/dist/ssl/s3_clnt.c vendor-crypto/openssl/dist/ssl/s3_srvr.c Modified: vendor-crypto/openssl/dist/CHANGES ============================================================================== --- vendor-crypto/openssl/dist/CHANGES Thu Jul 9 16:32:58 2015 (r285326) +++ vendor-crypto/openssl/dist/CHANGES Thu Jul 9 16:41:34 2015 (r285327) @@ -2,6 +2,21 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1o and 1.0.1p [9 Jul 2015] + + *) Alternate chains certificate forgery + + During certificate verfification, OpenSSL will attempt to find an + alternative certificate chain if the first attempt to build such a chain + fails. An error in the implementation of this logic can mean that an + attacker could cause certain checks on untrusted certificates to be + bypassed, such as the CA flag, enabling them to use a valid leaf + certificate to act as a CA and "issue" an invalid certificate. + + This issue was reported to OpenSSL by Adam Langley/David Benjamin + (Google/BoringSSL). + [Matt Caswell] + Changes between 1.0.1n and 1.0.1o [12 Jun 2015] *) Fix HMAC ABI incompatibility. The previous version introduced an ABI Modified: vendor-crypto/openssl/dist/FREEBSD-upgrade ============================================================================== --- vendor-crypto/openssl/dist/FREEBSD-upgrade Thu Jul 9 16:32:58 2015 (r285326) +++ vendor-crypto/openssl/dist/FREEBSD-upgrade Thu Jul 9 16:41:34 2015 (r285327) @@ -11,8 +11,8 @@ First, read http://wiki.freebsd.org/Subv # Xlist setenv XLIST /FreeBSD/work/openssl/svn-FREEBSD-files/FREEBSD-Xlist setenv FSVN "svn+ssh://svn.freebsd.org/base" -setenv OSSLVER 1.0.1o -# OSSLTAG format: v1_0_1o +setenv OSSLVER 1.0.1p +# OSSLTAG format: v1_0_1p ###setenv OSSLTAG v`echo ${OSSLVER} | tr . _` Modified: vendor-crypto/openssl/dist/Makefile ============================================================================== --- vendor-crypto/openssl/dist/Makefile Thu Jul 9 16:32:58 2015 (r285326) +++ vendor-crypto/openssl/dist/Makefile Thu Jul 9 16:41:34 2015 (r285327) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1o +VERSION=1.0.1p MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 @@ -270,6 +270,7 @@ reflect: @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) sub_all: build_all + build_all: build_libs build_apps build_tests build_tools build_libs: build_libcrypto build_libssl openssl.pc @@ -279,15 +280,15 @@ build_libssl: build_ssl libssl.pc build_crypto: @dir=crypto; target=all; $(BUILD_ONE_CMD) -build_ssl: +build_ssl: build_crypto @dir=ssl; target=all; $(BUILD_ONE_CMD) -build_engines: +build_engines: build_crypto @dir=engines; target=all; $(BUILD_ONE_CMD) -build_apps: +build_apps: build_libs @dir=apps; target=all; $(BUILD_ONE_CMD) -build_tests: +build_tests: build_libs @dir=test; target=all; $(BUILD_ONE_CMD) -build_tools: +build_tools: build_libs @dir=tools; target=all; $(BUILD_ONE_CMD) all_testapps: build_libs build_testapps Modified: vendor-crypto/openssl/dist/Makefile.org ============================================================================== --- vendor-crypto/openssl/dist/Makefile.org Thu Jul 9 16:32:58 2015 (r285326) +++ vendor-crypto/openssl/dist/Makefile.org Thu Jul 9 16:41:34 2015 (r285327) @@ -268,6 +268,7 @@ reflect: @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) sub_all: build_all + build_all: build_libs build_apps build_tests build_tools build_libs: build_libcrypto build_libssl openssl.pc @@ -277,15 +278,15 @@ build_libssl: build_ssl libssl.pc build_crypto: @dir=crypto; target=all; $(BUILD_ONE_CMD) -build_ssl: +build_ssl: build_crypto @dir=ssl; target=all; $(BUILD_ONE_CMD) -build_engines: +build_engines: build_crypto @dir=engines; target=all; $(BUILD_ONE_CMD) -build_apps: +build_apps: build_libs @dir=apps; target=all; $(BUILD_ONE_CMD) -build_tests: +build_tests: build_libs @dir=test; target=all; $(BUILD_ONE_CMD) -build_tools: +build_tools: build_libs @dir=tools; target=all; $(BUILD_ONE_CMD) all_testapps: build_libs build_testapps Modified: vendor-crypto/openssl/dist/NEWS ============================================================================== --- vendor-crypto/openssl/dist/NEWS Thu Jul 9 16:32:58 2015 (r285326) +++ vendor-crypto/openssl/dist/NEWS Thu Jul 9 16:41:34 2015 (r285327) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1o and OpenSSL 1.0.1p [9 Jul 2015] + + o Alternate chains certificate forgery (CVE-2015-1793) + Major changes between OpenSSL 1.0.1n and OpenSSL 1.0.1o [12 Jun 2015] o Fix HMAC ABI incompatibility Modified: vendor-crypto/openssl/dist/README ============================================================================== --- vendor-crypto/openssl/dist/README Thu Jul 9 16:32:58 2015 (r285326) +++ vendor-crypto/openssl/dist/README Thu Jul 9 16:41:34 2015 (r285327) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1o 12 Jun 2015 + OpenSSL 1.0.1p 9 Jul 2015 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: vendor-crypto/openssl/dist/crypto/bio/bio.h ============================================================================== --- vendor-crypto/openssl/dist/crypto/bio/bio.h Thu Jul 9 16:32:58 2015 (r285326) +++ vendor-crypto/openssl/dist/crypto/bio/bio.h Thu Jul 9 16:41:34 2015 (r285327) @@ -290,7 +290,7 @@ void BIO_clear_flags(BIO *b, int flags); * BIO_CB_RETURN flag indicates if it is after the call */ # define BIO_CB_RETURN 0x80 -# define BIO_CB_return(a) ((a)|BIO_CB_RETURN)) +# define BIO_CB_return(a) ((a)|BIO_CB_RETURN) # define BIO_cb_pre(a) (!((a)&BIO_CB_RETURN)) # define BIO_cb_post(a) ((a)&BIO_CB_RETURN) Modified: vendor-crypto/openssl/dist/crypto/evp/e_aes.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/evp/e_aes.c Thu Jul 9 16:32:58 2015 (r285326) +++ vendor-crypto/openssl/dist/crypto/evp/e_aes.c Thu Jul 9 16:41:34 2015 (r285327) @@ -1146,7 +1146,7 @@ static int aes_ccm_ctrl(EVP_CIPHER_CTX * case EVP_CTRL_CCM_SET_TAG: if ((arg & 1) || arg < 4 || arg > 16) return 0; - if ((c->encrypt && ptr) || (!c->encrypt && !ptr)) + if (c->encrypt && ptr) return 0; if (ptr) { cctx->tag_set = 1; Modified: vendor-crypto/openssl/dist/crypto/opensslconf.h ============================================================================== --- vendor-crypto/openssl/dist/crypto/opensslconf.h Thu Jul 9 16:32:58 2015 (r285326) +++ vendor-crypto/openssl/dist/crypto/opensslconf.h Thu Jul 9 16:41:34 2015 (r285327) @@ -185,7 +185,7 @@ extern "C" { #endif #if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! +#error YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! #endif /* Unroll the inner loop, this sometimes helps, sometimes hinders. Modified: vendor-crypto/openssl/dist/crypto/opensslconf.h.in ============================================================================== --- vendor-crypto/openssl/dist/crypto/opensslconf.h.in Thu Jul 9 16:32:58 2015 (r285326) +++ vendor-crypto/openssl/dist/crypto/opensslconf.h.in Thu Jul 9 16:41:34 2015 (r285327) @@ -101,7 +101,7 @@ #endif #if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! +#error YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! #endif /* Unroll the inner loop, this sometimes helps, sometimes hinders. Modified: vendor-crypto/openssl/dist/crypto/opensslv.h ============================================================================== --- vendor-crypto/openssl/dist/crypto/opensslv.h Thu Jul 9 16:32:58 2015 (r285326) +++ vendor-crypto/openssl/dist/crypto/opensslv.h Thu Jul 9 16:41:34 2015 (r285327) @@ -30,11 +30,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x100010ffL +# define OPENSSL_VERSION_NUMBER 0x1000110fL # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1o-fips 12 Jun 2015" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1p-fips 9 Jul 2015" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1o 12 Jun 2015" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1p 9 Jul 2015" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: vendor-crypto/openssl/dist/crypto/pkcs12/p12_kiss.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/pkcs12/p12_kiss.c Thu Jul 9 16:32:58 2015 (r285326) +++ vendor-crypto/openssl/dist/crypto/pkcs12/p12_kiss.c Thu Jul 9 16:41:34 2015 (r285327) @@ -135,10 +135,12 @@ int PKCS12_parse(PKCS12 *p12, const char while ((x = sk_X509_pop(ocerts))) { if (pkey && *pkey && cert && !*cert) { + ERR_set_mark(); if (X509_check_private_key(x, *pkey)) { *cert = x; x = NULL; } + ERR_pop_to_mark(); } if (ca && x) { Modified: vendor-crypto/openssl/dist/crypto/threads/mttest.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/threads/mttest.c Thu Jul 9 16:32:58 2015 (r285326) +++ vendor-crypto/openssl/dist/crypto/threads/mttest.c Thu Jul 9 16:41:34 2015 (r285327) @@ -56,7 +56,6 @@ * [including the GNU Public Licence.] */ -#include #include #include #include @@ -86,17 +85,11 @@ #include #include #include -#include "../../e_os.h" #include #include #include #include -#ifdef OPENSSL_NO_FP_API -# define APPS_WIN16 -# include "../buffer/bss_file.c" -#endif - #ifdef OPENSSL_SYS_NETWARE # define TEST_SERVER_CERT "/openssl/apps/server.pem" # define TEST_CLIENT_CERT "/openssl/apps/client.pem" @@ -107,23 +100,23 @@ #define MAX_THREAD_NUMBER 100 -int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *xs); +int verify_callback(int ok, X509_STORE_CTX *xs); void thread_setup(void); void thread_cleanup(void); void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx); -void irix_locking_callback(int mode, int type, char *file, int line); -void solaris_locking_callback(int mode, int type, char *file, int line); -void win32_locking_callback(int mode, int type, char *file, int line); -void pthreads_locking_callback(int mode, int type, char *file, int line); -void netware_locking_callback(int mode, int type, char *file, int line); +void irix_locking_callback(int mode, int type, const char *file, int line); +void solaris_locking_callback(int mode, int type, const char *file, int line); +void win32_locking_callback(int mode, int type, const char *file, int line); +void pthreads_locking_callback(int mode, int type, const char *file, int line); +void netware_locking_callback(int mode, int type, const char *file, int line); void beos_locking_callback(int mode, int type, const char *file, int line); -unsigned long irix_thread_id(void); -unsigned long solaris_thread_id(void); -unsigned long pthreads_thread_id(void); -unsigned long netware_thread_id(void); -unsigned long beos_thread_id(void); +void irix_thread_id(CRYPTO_THREADID *tid); +void solaris_thread_id(CRYPTO_THREADID *tid); +void pthreads_thread_id(CRYPTO_THREADID *tid); +void netware_thread_id(CRYPTO_THREADID *tid); +void beos_thread_id(CRYPTO_THREADID *tid); #if defined(OPENSSL_SYS_NETWARE) static MPKMutex *lock_cs; @@ -149,39 +142,39 @@ static const char rnd_seed[] = "string to make the random number generator think it has entropy"; int doit(char *ctx[4]); -static void print_stats(FILE *fp, SSL_CTX *ctx) +static void print_stats(BIO *bio, SSL_CTX *ctx) { - fprintf(fp, "%4ld items in the session cache\n", - SSL_CTX_sess_number(ctx)); - fprintf(fp, "%4d client connects (SSL_connect())\n", - SSL_CTX_sess_connect(ctx)); - fprintf(fp, "%4d client connects that finished\n", - SSL_CTX_sess_connect_good(ctx)); - fprintf(fp, "%4d server connects (SSL_accept())\n", - SSL_CTX_sess_accept(ctx)); - fprintf(fp, "%4d server connects that finished\n", - SSL_CTX_sess_accept_good(ctx)); - fprintf(fp, "%4d session cache hits\n", SSL_CTX_sess_hits(ctx)); - fprintf(fp, "%4d session cache misses\n", SSL_CTX_sess_misses(ctx)); - fprintf(fp, "%4d session cache timeouts\n", SSL_CTX_sess_timeouts(ctx)); + BIO_printf(bio, "%4ld items in the session cache\n", + SSL_CTX_sess_number(ctx)); + BIO_printf(bio, "%4d client connects (SSL_connect())\n", + SSL_CTX_sess_connect(ctx)); + BIO_printf(bio, "%4d client connects that finished\n", + SSL_CTX_sess_connect_good(ctx)); + BIO_printf(bio, "%4d server connects (SSL_accept())\n", + SSL_CTX_sess_accept(ctx)); + BIO_printf(bio, "%4d server connects that finished\n", + SSL_CTX_sess_accept_good(ctx)); + BIO_printf(bio, "%4d session cache hits\n", SSL_CTX_sess_hits(ctx)); + BIO_printf(bio, "%4d session cache misses\n", SSL_CTX_sess_misses(ctx)); + BIO_printf(bio, "%4d session cache timeouts\n", SSL_CTX_sess_timeouts(ctx)); } static void sv_usage(void) { - fprintf(stderr, "usage: ssltest [args ...]\n"); - fprintf(stderr, "\n"); - fprintf(stderr, " -server_auth - check server certificate\n"); - fprintf(stderr, " -client_auth - do client authentication\n"); - fprintf(stderr, " -v - more output\n"); - fprintf(stderr, " -CApath arg - PEM format directory of CA's\n"); - fprintf(stderr, " -CAfile arg - PEM format file of CA's\n"); - fprintf(stderr, " -threads arg - number of threads\n"); - fprintf(stderr, " -loops arg - number of 'connections', per thread\n"); - fprintf(stderr, " -reconnect - reuse session-id's\n"); - fprintf(stderr, " -stats - server session-id cache stats\n"); - fprintf(stderr, " -cert arg - server certificate/key\n"); - fprintf(stderr, " -ccert arg - client certificate/key\n"); - fprintf(stderr, " -ssl3 - just SSLv3n\n"); + BIO_printf(bio_err, "usage: ssltest [args ...]\n"); + BIO_printf(bio_err, "\n"); + BIO_printf(bio_err, " -server_auth - check server certificate\n"); + BIO_printf(bio_err, " -client_auth - do client authentication\n"); + BIO_printf(bio_err, " -v - more output\n"); + BIO_printf(bio_err, " -CApath arg - PEM format directory of CA's\n"); + BIO_printf(bio_err, " -CAfile arg - PEM format file of CA's\n"); + BIO_printf(bio_err, " -threads arg - number of threads\n"); + BIO_printf(bio_err, " -loops arg - number of 'connections', per thread\n"); + BIO_printf(bio_err, " -reconnect - reuse session-id's\n"); + BIO_printf(bio_err, " -stats - server session-id cache stats\n"); + BIO_printf(bio_err, " -cert arg - server certificate/key\n"); + BIO_printf(bio_err, " -ccert arg - client certificate/key\n"); + BIO_printf(bio_err, " -ssl3 - just SSLv3n\n"); } int main(int argc, char *argv[]) @@ -195,14 +188,14 @@ int main(int argc, char *argv[]) SSL_CTX *c_ctx = NULL; char *scert = TEST_SERVER_CERT; char *ccert = TEST_CLIENT_CERT; - SSL_METHOD *ssl_method = SSLv23_method(); + const SSL_METHOD *ssl_method = SSLv23_method(); RAND_seed(rnd_seed, sizeof rnd_seed); if (bio_err == NULL) - bio_err = BIO_new_fp(stderr, BIO_NOCLOSE); + bio_err = BIO_new_fd(2, BIO_NOCLOSE); if (bio_stdout == NULL) - bio_stdout = BIO_new_fp(stdout, BIO_NOCLOSE); + bio_stdout = BIO_new_fd(1, BIO_NOCLOSE); argc--; argv++; @@ -250,7 +243,7 @@ int main(int argc, char *argv[]) if (number_of_loops == 0) number_of_loops = 1; } else { - fprintf(stderr, "unknown option %s\n", *argv); + BIO_printf(bio_err, "unknown option %s\n", *argv); badop = 1; break; } @@ -284,9 +277,12 @@ int main(int argc, char *argv[]) SSL_SESS_CACHE_SERVER); if (!SSL_CTX_use_certificate_file(s_ctx, scert, SSL_FILETYPE_PEM)) { + BIO_printf(bio_err, "SSL_CTX_use_certificate_file (%s)\n", scert); ERR_print_errors(bio_err); + goto end; } else if (!SSL_CTX_use_RSAPrivateKey_file(s_ctx, scert, SSL_FILETYPE_PEM)) { + BIO_printf(bio_err, "SSL_CTX_use_RSAPrivateKey_file (%s)\n", scert); ERR_print_errors(bio_err); goto end; } @@ -300,19 +296,19 @@ int main(int argc, char *argv[]) (!SSL_CTX_set_default_verify_paths(s_ctx)) || (!SSL_CTX_load_verify_locations(c_ctx, CAfile, CApath)) || (!SSL_CTX_set_default_verify_paths(c_ctx))) { - fprintf(stderr, "SSL_load_verify_locations\n"); + BIO_printf(bio_err, "SSL_load_verify_locations\n"); ERR_print_errors(bio_err); goto end; } if (client_auth) { - fprintf(stderr, "client authentication\n"); + BIO_printf(bio_err, "client authentication\n"); SSL_CTX_set_verify(s_ctx, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, verify_callback); } if (server_auth) { - fprintf(stderr, "server authentication\n"); + BIO_printf(bio_err, "server authentication\n"); SSL_CTX_set_verify(c_ctx, SSL_VERIFY_PEER, verify_callback); } @@ -322,24 +318,24 @@ int main(int argc, char *argv[]) end: if (c_ctx != NULL) { - fprintf(stderr, "Client SSL_CTX stats then free it\n"); - print_stats(stderr, c_ctx); + BIO_printf(bio_err, "Client SSL_CTX stats then free it\n"); + print_stats(bio_err, c_ctx); SSL_CTX_free(c_ctx); } if (s_ctx != NULL) { - fprintf(stderr, "Server SSL_CTX stats then free it\n"); - print_stats(stderr, s_ctx); + BIO_printf(bio_err, "Server SSL_CTX stats then free it\n"); + print_stats(bio_err, s_ctx); if (cache_stats) { - fprintf(stderr, "-----\n"); - lh_stats(SSL_CTX_sessions(s_ctx), stderr); - fprintf(stderr, "-----\n"); - /*- lh_node_stats(SSL_CTX_sessions(s_ctx),stderr); - fprintf(stderr,"-----\n"); */ - lh_node_usage_stats(SSL_CTX_sessions(s_ctx), stderr); - fprintf(stderr, "-----\n"); + BIO_printf(bio_err, "-----\n"); + lh_SSL_SESSION_stats_bio(SSL_CTX_sessions(s_ctx), bio_err); + BIO_printf(bio_err, "-----\n"); + /*- lh_SSL_SESSION_node_stats_bio(SSL_CTX_sessions(s_ctx),bio_err); + BIO_printf(bio_err,"-----\n"); */ + lh_SSL_SESSION_node_usage_stats_bio(SSL_CTX_sessions(s_ctx), bio_err); + BIO_printf(bio_err, "-----\n"); } SSL_CTX_free(s_ctx); - fprintf(stderr, "done free\n"); + BIO_printf(bio_err, "done free\n"); } exit(ret); return (0); @@ -355,6 +351,7 @@ int ndoit(SSL_CTX *ssl_ctx[2]) int i; int ret; char *ctx[4]; + CRYPTO_THREADID thread_id; ctx[0] = (char *)ssl_ctx[0]; ctx[1] = (char *)ssl_ctx[1]; @@ -367,22 +364,24 @@ int ndoit(SSL_CTX *ssl_ctx[2]) ctx[3] = NULL; } - fprintf(stdout, "started thread %lu\n", CRYPTO_thread_id()); + CRYPTO_THREADID_current(&thread_id); + BIO_printf(bio_stdout, "started thread %lu\n", + CRYPTO_THREADID_hash(&thread_id)); for (i = 0; i < number_of_loops; i++) { -/*- fprintf(stderr,"%4d %2d ctx->ref (%3d,%3d)\n", - CRYPTO_thread_id(),i, - ssl_ctx[0]->references, - ssl_ctx[1]->references); */ +/*- BIO_printf(bio_err,"%4d %2d ctx->ref (%3d,%3d)\n", + CRYPTO_THREADID_hash(&thread_id),i, + ssl_ctx[0]->references, + ssl_ctx[1]->references); */ /* pthread_delay_np(&tm); */ ret = doit(ctx); if (ret != 0) { - fprintf(stdout, "error[%d] %lu - %d\n", - i, CRYPTO_thread_id(), ret); + BIO_printf(bio_stdout, "error[%d] %lu - %d\n", + i, CRYPTO_THREADID_hash(&thread_id), ret); return (ret); } } - fprintf(stdout, "DONE %lu\n", CRYPTO_thread_id()); + BIO_printf(bio_stdout, "DONE %lu\n", CRYPTO_THREADID_hash(&thread_id)); if (reconnect) { SSL_free((SSL *)ctx[2]); SSL_free((SSL *)ctx[3]); @@ -467,26 +466,26 @@ int doit(char *ctx[4]) if (do_server && verbose) { if (SSL_in_init(s_ssl)) - printf("server waiting in SSL_accept - %s\n", - SSL_state_string_long(s_ssl)); + BIO_printf(bio_stdout, "server waiting in SSL_accept - %s\n", + SSL_state_string_long(s_ssl)); else if (s_write) - printf("server:SSL_write()\n"); + BIO_printf(bio_stdout, "server:SSL_write()\n"); else - printf("server:SSL_read()\n"); + BIO_printf(bio_stdout, "server:SSL_read()\n"); } if (do_client && verbose) { if (SSL_in_init(c_ssl)) - printf("client waiting in SSL_connect - %s\n", - SSL_state_string_long(c_ssl)); + BIO_printf(bio_stdout, "client waiting in SSL_connect - %s\n", + SSL_state_string_long(c_ssl)); else if (c_write) - printf("client:SSL_write()\n"); + BIO_printf(bio_stdout, "client:SSL_write()\n"); else - printf("client:SSL_read()\n"); + BIO_printf(bio_stdout, "client:SSL_read()\n"); } if (!do_client && !do_server) { - fprintf(stdout, "ERROR IN STARTUP\n"); + BIO_printf(bio_stdout, "ERROR IN STARTUP\n"); break; } if (do_client && !(done & C_DONE)) { @@ -501,12 +500,12 @@ int doit(char *ctx[4]) if (BIO_should_write(c_bio)) c_w = 1; } else { - fprintf(stderr, "ERROR in CLIENT\n"); + BIO_printf(bio_err, "ERROR in CLIENT\n"); ERR_print_errors_fp(stderr); return (1); } } else if (i == 0) { - fprintf(stderr, "SSL CLIENT STARTUP FAILED\n"); + BIO_printf(bio_err, "SSL CLIENT STARTUP FAILED\n"); return (1); } else { /* ok */ @@ -523,19 +522,19 @@ int doit(char *ctx[4]) if (BIO_should_write(c_bio)) c_w = 1; } else { - fprintf(stderr, "ERROR in CLIENT\n"); + BIO_printf(bio_err, "ERROR in CLIENT\n"); ERR_print_errors_fp(stderr); return (1); } } else if (i == 0) { - fprintf(stderr, "SSL CLIENT STARTUP FAILED\n"); + BIO_printf(bio_err, "SSL CLIENT STARTUP FAILED\n"); return (1); } else { done |= C_DONE; #ifdef undef - fprintf(stdout, "CLIENT:from server:"); - fwrite(cbuf, 1, i, stdout); - fflush(stdout); + BIO_printf(bio_stdout, "CLIENT:from server:"); + BIO_write(bio_stdout, cbuf, i); + BIO_flush(bio_stdout); #endif } } @@ -553,20 +552,20 @@ int doit(char *ctx[4]) if (BIO_should_write(s_bio)) s_w = 1; } else { - fprintf(stderr, "ERROR in SERVER\n"); + BIO_printf(bio_err, "ERROR in SERVER\n"); ERR_print_errors_fp(stderr); return (1); } } else if (i == 0) { - fprintf(stderr, "SSL SERVER STARTUP FAILED\n"); + BIO_printf(bio_err, "SSL SERVER STARTUP FAILED\n"); return (1); } else { s_write = 1; s_w = 1; #ifdef undef - fprintf(stdout, "SERVER:from client:"); - fwrite(sbuf, 1, i, stdout); - fflush(stdout); + BIO_printf(bio_stdout, "SERVER:from client:"); + BIO_write(bio_stdout, sbuf, i); + BIO_flush(bio_stdout); #endif } } else { @@ -580,12 +579,12 @@ int doit(char *ctx[4]) if (BIO_should_write(s_bio)) s_w = 1; } else { - fprintf(stderr, "ERROR in SERVER\n"); + BIO_printf(bio_err, "ERROR in SERVER\n"); ERR_print_errors_fp(stderr); return (1); } } else if (i == 0) { - fprintf(stderr, "SSL SERVER STARTUP FAILED\n"); + BIO_printf(bio_err, "SSL SERVER STARTUP FAILED\n"); return (1); } else { s_write = 0; @@ -606,7 +605,7 @@ int doit(char *ctx[4]) SSL_set_shutdown(s_ssl, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); #ifdef undef - fprintf(stdout, "DONE\n"); + BIO_printf(bio_stdout, "DONE\n"); #endif err: /* @@ -640,7 +639,7 @@ int doit(char *ctx[4]) return (0); } -int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx) +int verify_callback(int ok, X509_STORE_CTX *ctx) { char *s, buf[256]; @@ -649,9 +648,9 @@ int MS_CALLBACK verify_callback(int ok, buf, 256); if (s != NULL) { if (ok) - fprintf(stderr, "depth=%d %s\n", ctx->error_depth, buf); + BIO_printf(bio_err, "depth=%d %s\n", ctx->error_depth, buf); else - fprintf(stderr, "depth=%d error=%d %s\n", + BIO_printf(bio_err, "depth=%d error=%d %s\n", ctx->error_depth, ctx->error, buf); } } @@ -688,7 +687,7 @@ void thread_cleanup(void) OPENSSL_free(lock_cs); } -void win32_locking_callback(int mode, int type, char *file, int line) +void win32_locking_callback(int mode, int type, const char *file, int line) { if (mode & CRYPTO_LOCK) { WaitForSingleObject(lock_cs[type], INFINITE); @@ -717,7 +716,7 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX (void *)ssl_ctx, 0L, &(thread_id[i])); } - printf("reaping\n"); + BIO_printf(bio_stdout, "reaping\n"); for (i = 0; i < thread_number; i += 50) { int j; @@ -727,7 +726,7 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX (CONST HANDLE *) & (thread_handle[i]), TRUE, INFINITE) == WAIT_FAILED) { - fprintf(stderr, "WaitForMultipleObjects failed:%d\n", + BIO_printf(bio_err, "WaitForMultipleObjects failed:%d\n", GetLastError()); exit(1); } @@ -743,7 +742,7 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX ret = (ret + end.wSecond - start.wSecond); ret += (end.wMilliseconds - start.wMilliseconds) / 1000.0; - printf("win32 threads done - %.3f seconds\n", ret); + BIO_printf(bio_stdout, "win32 threads done - %.3f seconds\n", ret); } #endif /* OPENSSL_SYS_WIN32 */ @@ -768,8 +767,8 @@ void thread_setup(void) mutex_init(&(lock_cs[i]), USYNC_THREAD, NULL); } - CRYPTO_set_id_callback((unsigned long (*)())solaris_thread_id); - CRYPTO_set_locking_callback((void (*)())solaris_locking_callback); + CRYPTO_set_id_callback(solaris_thread_id); + CRYPTO_set_locking_callback(solaris_locking_callback); } void thread_cleanup(void) @@ -778,34 +777,34 @@ void thread_cleanup(void) CRYPTO_set_locking_callback(NULL); - fprintf(stderr, "cleanup\n"); + BIO_printf(bio_err, "cleanup\n"); for (i = 0; i < CRYPTO_num_locks(); i++) { /* rwlock_destroy(&(lock_cs[i])); */ mutex_destroy(&(lock_cs[i])); - fprintf(stderr, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); + BIO_printf(bio_err, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); } OPENSSL_free(lock_cs); OPENSSL_free(lock_count); - fprintf(stderr, "done cleanup\n"); + BIO_printf(bio_err, "done cleanup\n"); } -void solaris_locking_callback(int mode, int type, char *file, int line) +void solaris_locking_callback(int mode, int type, const char *file, int line) { # ifdef undef - fprintf(stderr, "thread=%4d mode=%s lock=%s %s:%d\n", - CRYPTO_thread_id(), - (mode & CRYPTO_LOCK) ? "l" : "u", - (type & CRYPTO_READ) ? "r" : "w", file, line); + BIO_printf(bio_err, "thread=%4d mode=%s lock=%s %s:%d\n", + CRYPTO_thread_id(), + (mode & CRYPTO_LOCK) ? "l" : "u", + (type & CRYPTO_READ) ? "r" : "w", file, line); # endif /*- if (CRYPTO_LOCK_SSL_CERT == type) - fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", - CRYPTO_thread_id(), - mode,file,line); + BIO_printf(bio_err,"(t,m,f,l) %ld %d %s %d\n", + CRYPTO_thread_id(), + mode,file,line); */ if (mode & CRYPTO_LOCK) { /*- @@ -837,21 +836,22 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX (void *(*)())ndoit, (void *)ssl_ctx, 0L, &(thread_ctx[i])); } - printf("reaping\n"); + BIO_printf(bio_stdout, "reaping\n"); for (i = 0; i < thread_number; i++) { thr_join(thread_ctx[i], NULL, NULL); } - printf("solaris threads done (%d,%d)\n", - s_ctx->references, c_ctx->references); +#if 0 /* We can't currently find out the reference amount */ + BIO_printf(bio_stdout, "solaris threads done (%d,%d)\n", + s_ctx->references, c_ctx->references); +#else + BIO_printf(bio_stdout, "solaris threads done\n"); +#endif } -unsigned long solaris_thread_id(void) +void solaris_thread_id(CRYPTO_THREADID *tid) { - unsigned long ret; - - ret = (unsigned long)thr_self(); - return (ret); + CRYPTO_THREADID_set_numeric((unsigned long)thr_self()); } #endif /* SOLARIS */ @@ -880,8 +880,8 @@ void thread_setup(void) lock_cs[i] = usnewsema(arena, 1); } - CRYPTO_set_id_callback((unsigned long (*)())irix_thread_id); - CRYPTO_set_locking_callback((void (*)())irix_locking_callback); + CRYPTO_set_id_callback(irix_thread_id); + CRYPTO_set_locking_callback(irix_locking_callback); } void thread_cleanup(void) @@ -899,13 +899,13 @@ void thread_cleanup(void) OPENSSL_free(lock_cs); } -void irix_locking_callback(int mode, int type, char *file, int line) +void irix_locking_callback(int mode, int type, const char *file, int line) { if (mode & CRYPTO_LOCK) { - printf("lock %d\n", type); + BIO_printf(bio_stdout, "lock %d\n", type); uspsema(lock_cs[type]); } else { - printf("unlock %d\n", type); + BIO_printf(bio_stdout, "unlock %d\n", type); usvsema(lock_cs[type]); } } @@ -924,21 +924,22 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX PR_SADDR | PR_SFDS, (void *)ssl_ctx); } - printf("reaping\n"); + BIO_printf(bio_stdout, "reaping\n"); for (i = 0; i < thread_number; i++) { wait(NULL); } - printf("irix threads done (%d,%d)\n", - s_ctx->references, c_ctx->references); +#if 0 /* We can't currently find out the reference amount */ + BIO_printf(bio_stdout, "irix threads done (%d,%d)\n", + s_ctx->references, c_ctx->references); +#else + BIO_printf(bio_stdout, "irix threads done\n"); +#endif } unsigned long irix_thread_id(void) { - unsigned long ret; - - ret = (unsigned long)getpid(); - return (ret); + CRYPTO_THREADID_set_numeric((unsigned long)getpid()); } #endif /* IRIX */ @@ -958,8 +959,8 @@ void thread_setup(void) pthread_mutex_init(&(lock_cs[i]), NULL); } - CRYPTO_set_id_callback((unsigned long (*)())pthreads_thread_id); - CRYPTO_set_locking_callback((void (*)())pthreads_locking_callback); + CRYPTO_THREADID_set_callback(pthreads_thread_id); + CRYPTO_set_locking_callback(pthreads_locking_callback); } void thread_cleanup(void) @@ -967,30 +968,30 @@ void thread_cleanup(void) int i; CRYPTO_set_locking_callback(NULL); - fprintf(stderr, "cleanup\n"); + BIO_printf(bio_err, "cleanup\n"); for (i = 0; i < CRYPTO_num_locks(); i++) { pthread_mutex_destroy(&(lock_cs[i])); - fprintf(stderr, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); + BIO_printf(bio_err, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); } OPENSSL_free(lock_cs); OPENSSL_free(lock_count); - fprintf(stderr, "done cleanup\n"); + BIO_printf(bio_err, "done cleanup\n"); } -void pthreads_locking_callback(int mode, int type, char *file, int line) +void pthreads_locking_callback(int mode, int type, const char *file, int line) { # ifdef undef - fprintf(stderr, "thread=%4d mode=%s lock=%s %s:%d\n", - CRYPTO_thread_id(), - (mode & CRYPTO_LOCK) ? "l" : "u", - (type & CRYPTO_READ) ? "r" : "w", file, line); + BIO_printf(bio_err, "thread=%4d mode=%s lock=%s %s:%d\n", + CRYPTO_thread_id(), + (mode & CRYPTO_LOCK) ? "l" : "u", + (type & CRYPTO_READ) ? "r" : "w", file, line); # endif /*- if (CRYPTO_LOCK_SSL_CERT == type) - fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", - CRYPTO_thread_id(), - mode,file,line); + BIO_printf(bio_err,"(t,m,f,l) %ld %d %s %d\n", + CRYPTO_thread_id(), + mode,file,line); */ if (mode & CRYPTO_LOCK) { pthread_mutex_lock(&(lock_cs[type])); @@ -1017,21 +1018,22 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX (void *(*)())ndoit, (void *)ssl_ctx); } - printf("reaping\n"); + BIO_printf(bio_stdout, "reaping\n"); for (i = 0; i < thread_number; i++) { pthread_join(thread_ctx[i], NULL); } - printf("pthreads threads done (%d,%d)\n", - s_ctx->references, c_ctx->references); +#if 0 /* We can't currently find out the reference amount */ + BIO_printf(bio_stdout, "pthreads threads done (%d,%d)\n", + s_ctx->references, c_ctx->references); +#else + BIO_printf(bio_stdout, "pthreads threads done\n"); +#endif } -unsigned long pthreads_thread_id(void) +void pthreads_thread_id(CRYPTO_THREADID *tid) { - unsigned long ret; - - ret = (unsigned long)pthread_self(); - return (ret); + CRYPTO_THREADID_set_numeric(tid, (unsigned long)pthread_self()); } #endif /* PTHREADS */ @@ -1051,8 +1053,8 @@ void thread_setup(void) ThreadSem = MPKSemaphoreAlloc("OpenSSL mttest semaphore", 0); - CRYPTO_set_id_callback((unsigned long (*)())netware_thread_id); - CRYPTO_set_locking_callback((void (*)())netware_locking_callback); + CRYPTO_set_id_callback(netware_thread_id); + CRYPTO_set_locking_callback(netware_locking_callback); } void thread_cleanup(void) @@ -1061,21 +1063,21 @@ void thread_cleanup(void) CRYPTO_set_locking_callback(NULL); - fprintf(stdout, "thread_cleanup\n"); + BIO_printf(bio_stdout, "thread_cleanup\n"); for (i = 0; i < CRYPTO_num_locks(); i++) { MPKMutexFree(lock_cs[i]); - fprintf(stdout, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); + BIO_printf(bio_stdout, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); } OPENSSL_free(lock_cs); OPENSSL_free(lock_count); MPKSemaphoreFree(ThreadSem); - fprintf(stdout, "done cleanup\n"); + BIO_printf(bio_stdout, "done cleanup\n"); } -void netware_locking_callback(int mode, int type, char *file, int line) +void netware_locking_callback(int mode, int type, const char *file, int line) { if (mode & CRYPTO_LOCK) { MPKMutexLock(lock_cs[type]); @@ -1097,22 +1099,23 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX ThreadSwitchWithDelay(); } - printf("reaping\n"); + BIO_printf(bio_stdout, "reaping\n"); /* loop until all threads have signaled the semaphore */ for (i = 0; i < thread_number; i++) { MPKSemaphoreWait(ThreadSem); } - printf("netware threads done (%d,%d)\n", - s_ctx->references, c_ctx->references); +#if 0 /* We can't currently find out the reference amount */ + BIO_printf(bio_stdout, "netware threads done (%d,%d)\n", + s_ctx->references, c_ctx->references); +#else + BIO_printf(bio_stdout, "netware threads done\n"); +#endif } unsigned long netware_thread_id(void) { - unsigned long ret; - - ret = (unsigned long)GetThreadID(); - return (ret); + CRYPTO_THREADID_set_numeric((unsigned long)GetThreadID()); } #endif /* NETWARE */ @@ -1144,24 +1147,24 @@ void thread_cleanup(void) int i; CRYPTO_set_locking_callback(NULL); - fprintf(stderr, "cleanup\n"); + BIO_printf(bio_err, "cleanup\n"); for (i = 0; i < CRYPTO_num_locks(); i++) { delete lock_cs[i]; - fprintf(stderr, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); + BIO_printf(bio_err, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); } OPENSSL_free(lock_cs); OPENSSL_free(lock_count); - fprintf(stderr, "done cleanup\n"); + BIO_printf(bio_err, "done cleanup\n"); } void beos_locking_callback(int mode, int type, const char *file, int line) { # if 0 - fprintf(stderr, "thread=%4d mode=%s lock=%s %s:%d\n", - CRYPTO_thread_id(), - (mode & CRYPTO_LOCK) ? "l" : "u", - (type & CRYPTO_READ) ? "r" : "w", file, line); + BIO_printf(bio_err, "thread=%4d mode=%s lock=%s %s:%d\n", + CRYPTO_thread_id(), + (mode & CRYPTO_LOCK) ? "l" : "u", + (type & CRYPTO_READ) ? "r" : "w", file, line); # endif if (mode & CRYPTO_LOCK) { lock_cs[type]->Lock(); @@ -1187,14 +1190,14 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX resume_thread(thread_ctx[i]); } - printf("waiting...\n"); + BIO_printf(bio_stdout, "waiting...\n"); for (i = 0; i < thread_number; i++) { status_t result; wait_for_thread(thread_ctx[i], &result); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jul 9 16:43:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF0699971AF; Thu, 9 Jul 2015 16:43:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 C5C2D3101; Thu, 9 Jul 2015 16:43:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69GhAXP051160; Thu, 9 Jul 2015 16:43:10 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69GhAY9051159; Thu, 9 Jul 2015 16:43:10 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201507091643.t69GhAY9051159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 9 Jul 2015 16:43:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r285328 - vendor-crypto/openssl/1.0.1p X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 16:43:11 -0000 Author: jkim Date: Thu Jul 9 16:43:10 2015 New Revision: 285328 URL: https://svnweb.freebsd.org/changeset/base/285328 Log: Tag OpenSSL 1.0.1p. Added: vendor-crypto/openssl/1.0.1p/ - copied from r285327, vendor-crypto/openssl/dist/ From owner-svn-src-all@freebsd.org Thu Jul 9 17:07:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA1C999767B; Thu, 9 Jul 2015 17:07:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 A5CA43BDD; Thu, 9 Jul 2015 17:07:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69H7pVE061630; Thu, 9 Jul 2015 17:07:51 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69H7kHk061594; Thu, 9 Jul 2015 17:07:46 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201507091707.t69H7kHk061594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 9 Jul 2015 17:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285329 - in head: crypto/openssl crypto/openssl/crypto crypto/openssl/crypto/bio crypto/openssl/crypto/evp crypto/openssl/crypto/pkcs12 crypto/openssl/crypto/threads crypto/openssl/cry... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 17:07:51 -0000 Author: jkim Date: Thu Jul 9 17:07:45 2015 New Revision: 285329 URL: https://svnweb.freebsd.org/changeset/base/285329 Log: Merge OpenSSL 1.0.1p. Added: head/crypto/openssl/crypto/x509/verify_extra_test.c - copied unchanged from r285327, vendor-crypto/openssl/dist/crypto/x509/verify_extra_test.c Modified: head/crypto/openssl/CHANGES head/crypto/openssl/Makefile head/crypto/openssl/Makefile.org head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/crypto/bio/bio.h head/crypto/openssl/crypto/evp/e_aes.c head/crypto/openssl/crypto/opensslconf.h head/crypto/openssl/crypto/opensslconf.h.in head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/pkcs12/p12_kiss.c head/crypto/openssl/crypto/threads/mttest.c head/crypto/openssl/crypto/threads/pthread2.sh head/crypto/openssl/crypto/x509/Makefile head/crypto/openssl/crypto/x509/x509_vfy.c head/crypto/openssl/doc/crypto/X509_NAME_get_index_by_NID.pod head/crypto/openssl/doc/crypto/X509_STORE_CTX_new.pod head/crypto/openssl/doc/crypto/X509_verify_cert.pod head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_srvr.c head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_add1_signer.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_psk_identity.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/c_rehash.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Thu Jul 9 16:43:10 2015 (r285328) +++ head/crypto/openssl/CHANGES Thu Jul 9 17:07:45 2015 (r285329) @@ -2,6 +2,21 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1o and 1.0.1p [9 Jul 2015] + + *) Alternate chains certificate forgery + + During certificate verfification, OpenSSL will attempt to find an + alternative certificate chain if the first attempt to build such a chain + fails. An error in the implementation of this logic can mean that an + attacker could cause certain checks on untrusted certificates to be + bypassed, such as the CA flag, enabling them to use a valid leaf + certificate to act as a CA and "issue" an invalid certificate. + + This issue was reported to OpenSSL by Adam Langley/David Benjamin + (Google/BoringSSL). + [Matt Caswell] + Changes between 1.0.1n and 1.0.1o [12 Jun 2015] *) Fix HMAC ABI incompatibility. The previous version introduced an ABI Modified: head/crypto/openssl/Makefile ============================================================================== --- head/crypto/openssl/Makefile Thu Jul 9 16:43:10 2015 (r285328) +++ head/crypto/openssl/Makefile Thu Jul 9 17:07:45 2015 (r285329) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1o +VERSION=1.0.1p MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 @@ -270,6 +270,7 @@ reflect: @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) sub_all: build_all + build_all: build_libs build_apps build_tests build_tools build_libs: build_libcrypto build_libssl openssl.pc @@ -279,15 +280,15 @@ build_libssl: build_ssl libssl.pc build_crypto: @dir=crypto; target=all; $(BUILD_ONE_CMD) -build_ssl: +build_ssl: build_crypto @dir=ssl; target=all; $(BUILD_ONE_CMD) -build_engines: +build_engines: build_crypto @dir=engines; target=all; $(BUILD_ONE_CMD) -build_apps: +build_apps: build_libs @dir=apps; target=all; $(BUILD_ONE_CMD) -build_tests: +build_tests: build_libs @dir=test; target=all; $(BUILD_ONE_CMD) -build_tools: +build_tools: build_libs @dir=tools; target=all; $(BUILD_ONE_CMD) all_testapps: build_libs build_testapps Modified: head/crypto/openssl/Makefile.org ============================================================================== --- head/crypto/openssl/Makefile.org Thu Jul 9 16:43:10 2015 (r285328) +++ head/crypto/openssl/Makefile.org Thu Jul 9 17:07:45 2015 (r285329) @@ -268,6 +268,7 @@ reflect: @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) sub_all: build_all + build_all: build_libs build_apps build_tests build_tools build_libs: build_libcrypto build_libssl openssl.pc @@ -277,15 +278,15 @@ build_libssl: build_ssl libssl.pc build_crypto: @dir=crypto; target=all; $(BUILD_ONE_CMD) -build_ssl: +build_ssl: build_crypto @dir=ssl; target=all; $(BUILD_ONE_CMD) -build_engines: +build_engines: build_crypto @dir=engines; target=all; $(BUILD_ONE_CMD) -build_apps: +build_apps: build_libs @dir=apps; target=all; $(BUILD_ONE_CMD) -build_tests: +build_tests: build_libs @dir=test; target=all; $(BUILD_ONE_CMD) -build_tools: +build_tools: build_libs @dir=tools; target=all; $(BUILD_ONE_CMD) all_testapps: build_libs build_testapps Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Thu Jul 9 16:43:10 2015 (r285328) +++ head/crypto/openssl/NEWS Thu Jul 9 17:07:45 2015 (r285329) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1o and OpenSSL 1.0.1p [9 Jul 2015] + + o Alternate chains certificate forgery (CVE-2015-1793) + Major changes between OpenSSL 1.0.1n and OpenSSL 1.0.1o [12 Jun 2015] o Fix HMAC ABI incompatibility Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Thu Jul 9 16:43:10 2015 (r285328) +++ head/crypto/openssl/README Thu Jul 9 17:07:45 2015 (r285329) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1o 12 Jun 2015 + OpenSSL 1.0.1p 9 Jul 2015 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/crypto/bio/bio.h ============================================================================== --- head/crypto/openssl/crypto/bio/bio.h Thu Jul 9 16:43:10 2015 (r285328) +++ head/crypto/openssl/crypto/bio/bio.h Thu Jul 9 17:07:45 2015 (r285329) @@ -290,7 +290,7 @@ void BIO_clear_flags(BIO *b, int flags); * BIO_CB_RETURN flag indicates if it is after the call */ # define BIO_CB_RETURN 0x80 -# define BIO_CB_return(a) ((a)|BIO_CB_RETURN)) +# define BIO_CB_return(a) ((a)|BIO_CB_RETURN) # define BIO_cb_pre(a) (!((a)&BIO_CB_RETURN)) # define BIO_cb_post(a) ((a)&BIO_CB_RETURN) Modified: head/crypto/openssl/crypto/evp/e_aes.c ============================================================================== --- head/crypto/openssl/crypto/evp/e_aes.c Thu Jul 9 16:43:10 2015 (r285328) +++ head/crypto/openssl/crypto/evp/e_aes.c Thu Jul 9 17:07:45 2015 (r285329) @@ -1146,7 +1146,7 @@ static int aes_ccm_ctrl(EVP_CIPHER_CTX * case EVP_CTRL_CCM_SET_TAG: if ((arg & 1) || arg < 4 || arg > 16) return 0; - if ((c->encrypt && ptr) || (!c->encrypt && !ptr)) + if (c->encrypt && ptr) return 0; if (ptr) { cctx->tag_set = 1; Modified: head/crypto/openssl/crypto/opensslconf.h ============================================================================== --- head/crypto/openssl/crypto/opensslconf.h Thu Jul 9 16:43:10 2015 (r285328) +++ head/crypto/openssl/crypto/opensslconf.h Thu Jul 9 17:07:45 2015 (r285329) @@ -185,7 +185,7 @@ extern "C" { #endif #if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! +#error YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! #endif /* Unroll the inner loop, this sometimes helps, sometimes hinders. Modified: head/crypto/openssl/crypto/opensslconf.h.in ============================================================================== --- head/crypto/openssl/crypto/opensslconf.h.in Thu Jul 9 16:43:10 2015 (r285328) +++ head/crypto/openssl/crypto/opensslconf.h.in Thu Jul 9 17:07:45 2015 (r285329) @@ -101,7 +101,7 @@ #endif #if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! +#error YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! #endif /* Unroll the inner loop, this sometimes helps, sometimes hinders. Modified: head/crypto/openssl/crypto/opensslv.h ============================================================================== --- head/crypto/openssl/crypto/opensslv.h Thu Jul 9 16:43:10 2015 (r285328) +++ head/crypto/openssl/crypto/opensslv.h Thu Jul 9 17:07:45 2015 (r285329) @@ -30,11 +30,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x100010ffL +# define OPENSSL_VERSION_NUMBER 0x1000110fL # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1o-fips 12 Jun 2015" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1p-fips 9 Jul 2015" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1o-freebsd 12 Jun 2015" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1p-freebsd 9 Jul 2015" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: head/crypto/openssl/crypto/pkcs12/p12_kiss.c ============================================================================== --- head/crypto/openssl/crypto/pkcs12/p12_kiss.c Thu Jul 9 16:43:10 2015 (r285328) +++ head/crypto/openssl/crypto/pkcs12/p12_kiss.c Thu Jul 9 17:07:45 2015 (r285329) @@ -135,10 +135,12 @@ int PKCS12_parse(PKCS12 *p12, const char while ((x = sk_X509_pop(ocerts))) { if (pkey && *pkey && cert && !*cert) { + ERR_set_mark(); if (X509_check_private_key(x, *pkey)) { *cert = x; x = NULL; } + ERR_pop_to_mark(); } if (ca && x) { Modified: head/crypto/openssl/crypto/threads/mttest.c ============================================================================== --- head/crypto/openssl/crypto/threads/mttest.c Thu Jul 9 16:43:10 2015 (r285328) +++ head/crypto/openssl/crypto/threads/mttest.c Thu Jul 9 17:07:45 2015 (r285329) @@ -56,7 +56,6 @@ * [including the GNU Public Licence.] */ -#include #include #include #include @@ -86,17 +85,11 @@ #include #include #include -#include "../../e_os.h" #include #include #include #include -#ifdef OPENSSL_NO_FP_API -# define APPS_WIN16 -# include "../buffer/bss_file.c" -#endif - #ifdef OPENSSL_SYS_NETWARE # define TEST_SERVER_CERT "/openssl/apps/server.pem" # define TEST_CLIENT_CERT "/openssl/apps/client.pem" @@ -107,23 +100,23 @@ #define MAX_THREAD_NUMBER 100 -int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *xs); +int verify_callback(int ok, X509_STORE_CTX *xs); void thread_setup(void); void thread_cleanup(void); void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx); -void irix_locking_callback(int mode, int type, char *file, int line); -void solaris_locking_callback(int mode, int type, char *file, int line); -void win32_locking_callback(int mode, int type, char *file, int line); -void pthreads_locking_callback(int mode, int type, char *file, int line); -void netware_locking_callback(int mode, int type, char *file, int line); +void irix_locking_callback(int mode, int type, const char *file, int line); +void solaris_locking_callback(int mode, int type, const char *file, int line); +void win32_locking_callback(int mode, int type, const char *file, int line); +void pthreads_locking_callback(int mode, int type, const char *file, int line); +void netware_locking_callback(int mode, int type, const char *file, int line); void beos_locking_callback(int mode, int type, const char *file, int line); -unsigned long irix_thread_id(void); -unsigned long solaris_thread_id(void); -unsigned long pthreads_thread_id(void); -unsigned long netware_thread_id(void); -unsigned long beos_thread_id(void); +void irix_thread_id(CRYPTO_THREADID *tid); +void solaris_thread_id(CRYPTO_THREADID *tid); +void pthreads_thread_id(CRYPTO_THREADID *tid); +void netware_thread_id(CRYPTO_THREADID *tid); +void beos_thread_id(CRYPTO_THREADID *tid); #if defined(OPENSSL_SYS_NETWARE) static MPKMutex *lock_cs; @@ -149,39 +142,39 @@ static const char rnd_seed[] = "string to make the random number generator think it has entropy"; int doit(char *ctx[4]); -static void print_stats(FILE *fp, SSL_CTX *ctx) +static void print_stats(BIO *bio, SSL_CTX *ctx) { - fprintf(fp, "%4ld items in the session cache\n", - SSL_CTX_sess_number(ctx)); - fprintf(fp, "%4d client connects (SSL_connect())\n", - SSL_CTX_sess_connect(ctx)); - fprintf(fp, "%4d client connects that finished\n", - SSL_CTX_sess_connect_good(ctx)); - fprintf(fp, "%4d server connects (SSL_accept())\n", - SSL_CTX_sess_accept(ctx)); - fprintf(fp, "%4d server connects that finished\n", - SSL_CTX_sess_accept_good(ctx)); - fprintf(fp, "%4d session cache hits\n", SSL_CTX_sess_hits(ctx)); - fprintf(fp, "%4d session cache misses\n", SSL_CTX_sess_misses(ctx)); - fprintf(fp, "%4d session cache timeouts\n", SSL_CTX_sess_timeouts(ctx)); + BIO_printf(bio, "%4ld items in the session cache\n", + SSL_CTX_sess_number(ctx)); + BIO_printf(bio, "%4d client connects (SSL_connect())\n", + SSL_CTX_sess_connect(ctx)); + BIO_printf(bio, "%4d client connects that finished\n", + SSL_CTX_sess_connect_good(ctx)); + BIO_printf(bio, "%4d server connects (SSL_accept())\n", + SSL_CTX_sess_accept(ctx)); + BIO_printf(bio, "%4d server connects that finished\n", + SSL_CTX_sess_accept_good(ctx)); + BIO_printf(bio, "%4d session cache hits\n", SSL_CTX_sess_hits(ctx)); + BIO_printf(bio, "%4d session cache misses\n", SSL_CTX_sess_misses(ctx)); + BIO_printf(bio, "%4d session cache timeouts\n", SSL_CTX_sess_timeouts(ctx)); } static void sv_usage(void) { - fprintf(stderr, "usage: ssltest [args ...]\n"); - fprintf(stderr, "\n"); - fprintf(stderr, " -server_auth - check server certificate\n"); - fprintf(stderr, " -client_auth - do client authentication\n"); - fprintf(stderr, " -v - more output\n"); - fprintf(stderr, " -CApath arg - PEM format directory of CA's\n"); - fprintf(stderr, " -CAfile arg - PEM format file of CA's\n"); - fprintf(stderr, " -threads arg - number of threads\n"); - fprintf(stderr, " -loops arg - number of 'connections', per thread\n"); - fprintf(stderr, " -reconnect - reuse session-id's\n"); - fprintf(stderr, " -stats - server session-id cache stats\n"); - fprintf(stderr, " -cert arg - server certificate/key\n"); - fprintf(stderr, " -ccert arg - client certificate/key\n"); - fprintf(stderr, " -ssl3 - just SSLv3n\n"); + BIO_printf(bio_err, "usage: ssltest [args ...]\n"); + BIO_printf(bio_err, "\n"); + BIO_printf(bio_err, " -server_auth - check server certificate\n"); + BIO_printf(bio_err, " -client_auth - do client authentication\n"); + BIO_printf(bio_err, " -v - more output\n"); + BIO_printf(bio_err, " -CApath arg - PEM format directory of CA's\n"); + BIO_printf(bio_err, " -CAfile arg - PEM format file of CA's\n"); + BIO_printf(bio_err, " -threads arg - number of threads\n"); + BIO_printf(bio_err, " -loops arg - number of 'connections', per thread\n"); + BIO_printf(bio_err, " -reconnect - reuse session-id's\n"); + BIO_printf(bio_err, " -stats - server session-id cache stats\n"); + BIO_printf(bio_err, " -cert arg - server certificate/key\n"); + BIO_printf(bio_err, " -ccert arg - client certificate/key\n"); + BIO_printf(bio_err, " -ssl3 - just SSLv3n\n"); } int main(int argc, char *argv[]) @@ -195,14 +188,14 @@ int main(int argc, char *argv[]) SSL_CTX *c_ctx = NULL; char *scert = TEST_SERVER_CERT; char *ccert = TEST_CLIENT_CERT; - SSL_METHOD *ssl_method = SSLv23_method(); + const SSL_METHOD *ssl_method = SSLv23_method(); RAND_seed(rnd_seed, sizeof rnd_seed); if (bio_err == NULL) - bio_err = BIO_new_fp(stderr, BIO_NOCLOSE); + bio_err = BIO_new_fd(2, BIO_NOCLOSE); if (bio_stdout == NULL) - bio_stdout = BIO_new_fp(stdout, BIO_NOCLOSE); + bio_stdout = BIO_new_fd(1, BIO_NOCLOSE); argc--; argv++; @@ -250,7 +243,7 @@ int main(int argc, char *argv[]) if (number_of_loops == 0) number_of_loops = 1; } else { - fprintf(stderr, "unknown option %s\n", *argv); + BIO_printf(bio_err, "unknown option %s\n", *argv); badop = 1; break; } @@ -284,9 +277,12 @@ int main(int argc, char *argv[]) SSL_SESS_CACHE_SERVER); if (!SSL_CTX_use_certificate_file(s_ctx, scert, SSL_FILETYPE_PEM)) { + BIO_printf(bio_err, "SSL_CTX_use_certificate_file (%s)\n", scert); ERR_print_errors(bio_err); + goto end; } else if (!SSL_CTX_use_RSAPrivateKey_file(s_ctx, scert, SSL_FILETYPE_PEM)) { + BIO_printf(bio_err, "SSL_CTX_use_RSAPrivateKey_file (%s)\n", scert); ERR_print_errors(bio_err); goto end; } @@ -300,19 +296,19 @@ int main(int argc, char *argv[]) (!SSL_CTX_set_default_verify_paths(s_ctx)) || (!SSL_CTX_load_verify_locations(c_ctx, CAfile, CApath)) || (!SSL_CTX_set_default_verify_paths(c_ctx))) { - fprintf(stderr, "SSL_load_verify_locations\n"); + BIO_printf(bio_err, "SSL_load_verify_locations\n"); ERR_print_errors(bio_err); goto end; } if (client_auth) { - fprintf(stderr, "client authentication\n"); + BIO_printf(bio_err, "client authentication\n"); SSL_CTX_set_verify(s_ctx, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, verify_callback); } if (server_auth) { - fprintf(stderr, "server authentication\n"); + BIO_printf(bio_err, "server authentication\n"); SSL_CTX_set_verify(c_ctx, SSL_VERIFY_PEER, verify_callback); } @@ -322,24 +318,24 @@ int main(int argc, char *argv[]) end: if (c_ctx != NULL) { - fprintf(stderr, "Client SSL_CTX stats then free it\n"); - print_stats(stderr, c_ctx); + BIO_printf(bio_err, "Client SSL_CTX stats then free it\n"); + print_stats(bio_err, c_ctx); SSL_CTX_free(c_ctx); } if (s_ctx != NULL) { - fprintf(stderr, "Server SSL_CTX stats then free it\n"); - print_stats(stderr, s_ctx); + BIO_printf(bio_err, "Server SSL_CTX stats then free it\n"); + print_stats(bio_err, s_ctx); if (cache_stats) { - fprintf(stderr, "-----\n"); - lh_stats(SSL_CTX_sessions(s_ctx), stderr); - fprintf(stderr, "-----\n"); - /*- lh_node_stats(SSL_CTX_sessions(s_ctx),stderr); - fprintf(stderr,"-----\n"); */ - lh_node_usage_stats(SSL_CTX_sessions(s_ctx), stderr); - fprintf(stderr, "-----\n"); + BIO_printf(bio_err, "-----\n"); + lh_SSL_SESSION_stats_bio(SSL_CTX_sessions(s_ctx), bio_err); + BIO_printf(bio_err, "-----\n"); + /*- lh_SSL_SESSION_node_stats_bio(SSL_CTX_sessions(s_ctx),bio_err); + BIO_printf(bio_err,"-----\n"); */ + lh_SSL_SESSION_node_usage_stats_bio(SSL_CTX_sessions(s_ctx), bio_err); + BIO_printf(bio_err, "-----\n"); } SSL_CTX_free(s_ctx); - fprintf(stderr, "done free\n"); + BIO_printf(bio_err, "done free\n"); } exit(ret); return (0); @@ -355,6 +351,7 @@ int ndoit(SSL_CTX *ssl_ctx[2]) int i; int ret; char *ctx[4]; + CRYPTO_THREADID thread_id; ctx[0] = (char *)ssl_ctx[0]; ctx[1] = (char *)ssl_ctx[1]; @@ -367,22 +364,24 @@ int ndoit(SSL_CTX *ssl_ctx[2]) ctx[3] = NULL; } - fprintf(stdout, "started thread %lu\n", CRYPTO_thread_id()); + CRYPTO_THREADID_current(&thread_id); + BIO_printf(bio_stdout, "started thread %lu\n", + CRYPTO_THREADID_hash(&thread_id)); for (i = 0; i < number_of_loops; i++) { -/*- fprintf(stderr,"%4d %2d ctx->ref (%3d,%3d)\n", - CRYPTO_thread_id(),i, - ssl_ctx[0]->references, - ssl_ctx[1]->references); */ +/*- BIO_printf(bio_err,"%4d %2d ctx->ref (%3d,%3d)\n", + CRYPTO_THREADID_hash(&thread_id),i, + ssl_ctx[0]->references, + ssl_ctx[1]->references); */ /* pthread_delay_np(&tm); */ ret = doit(ctx); if (ret != 0) { - fprintf(stdout, "error[%d] %lu - %d\n", - i, CRYPTO_thread_id(), ret); + BIO_printf(bio_stdout, "error[%d] %lu - %d\n", + i, CRYPTO_THREADID_hash(&thread_id), ret); return (ret); } } - fprintf(stdout, "DONE %lu\n", CRYPTO_thread_id()); + BIO_printf(bio_stdout, "DONE %lu\n", CRYPTO_THREADID_hash(&thread_id)); if (reconnect) { SSL_free((SSL *)ctx[2]); SSL_free((SSL *)ctx[3]); @@ -467,26 +466,26 @@ int doit(char *ctx[4]) if (do_server && verbose) { if (SSL_in_init(s_ssl)) - printf("server waiting in SSL_accept - %s\n", - SSL_state_string_long(s_ssl)); + BIO_printf(bio_stdout, "server waiting in SSL_accept - %s\n", + SSL_state_string_long(s_ssl)); else if (s_write) - printf("server:SSL_write()\n"); + BIO_printf(bio_stdout, "server:SSL_write()\n"); else - printf("server:SSL_read()\n"); + BIO_printf(bio_stdout, "server:SSL_read()\n"); } if (do_client && verbose) { if (SSL_in_init(c_ssl)) - printf("client waiting in SSL_connect - %s\n", - SSL_state_string_long(c_ssl)); + BIO_printf(bio_stdout, "client waiting in SSL_connect - %s\n", + SSL_state_string_long(c_ssl)); else if (c_write) - printf("client:SSL_write()\n"); + BIO_printf(bio_stdout, "client:SSL_write()\n"); else - printf("client:SSL_read()\n"); + BIO_printf(bio_stdout, "client:SSL_read()\n"); } if (!do_client && !do_server) { - fprintf(stdout, "ERROR IN STARTUP\n"); + BIO_printf(bio_stdout, "ERROR IN STARTUP\n"); break; } if (do_client && !(done & C_DONE)) { @@ -501,12 +500,12 @@ int doit(char *ctx[4]) if (BIO_should_write(c_bio)) c_w = 1; } else { - fprintf(stderr, "ERROR in CLIENT\n"); + BIO_printf(bio_err, "ERROR in CLIENT\n"); ERR_print_errors_fp(stderr); return (1); } } else if (i == 0) { - fprintf(stderr, "SSL CLIENT STARTUP FAILED\n"); + BIO_printf(bio_err, "SSL CLIENT STARTUP FAILED\n"); return (1); } else { /* ok */ @@ -523,19 +522,19 @@ int doit(char *ctx[4]) if (BIO_should_write(c_bio)) c_w = 1; } else { - fprintf(stderr, "ERROR in CLIENT\n"); + BIO_printf(bio_err, "ERROR in CLIENT\n"); ERR_print_errors_fp(stderr); return (1); } } else if (i == 0) { - fprintf(stderr, "SSL CLIENT STARTUP FAILED\n"); + BIO_printf(bio_err, "SSL CLIENT STARTUP FAILED\n"); return (1); } else { done |= C_DONE; #ifdef undef - fprintf(stdout, "CLIENT:from server:"); - fwrite(cbuf, 1, i, stdout); - fflush(stdout); + BIO_printf(bio_stdout, "CLIENT:from server:"); + BIO_write(bio_stdout, cbuf, i); + BIO_flush(bio_stdout); #endif } } @@ -553,20 +552,20 @@ int doit(char *ctx[4]) if (BIO_should_write(s_bio)) s_w = 1; } else { - fprintf(stderr, "ERROR in SERVER\n"); + BIO_printf(bio_err, "ERROR in SERVER\n"); ERR_print_errors_fp(stderr); return (1); } } else if (i == 0) { - fprintf(stderr, "SSL SERVER STARTUP FAILED\n"); + BIO_printf(bio_err, "SSL SERVER STARTUP FAILED\n"); return (1); } else { s_write = 1; s_w = 1; #ifdef undef - fprintf(stdout, "SERVER:from client:"); - fwrite(sbuf, 1, i, stdout); - fflush(stdout); + BIO_printf(bio_stdout, "SERVER:from client:"); + BIO_write(bio_stdout, sbuf, i); + BIO_flush(bio_stdout); #endif } } else { @@ -580,12 +579,12 @@ int doit(char *ctx[4]) if (BIO_should_write(s_bio)) s_w = 1; } else { - fprintf(stderr, "ERROR in SERVER\n"); + BIO_printf(bio_err, "ERROR in SERVER\n"); ERR_print_errors_fp(stderr); return (1); } } else if (i == 0) { - fprintf(stderr, "SSL SERVER STARTUP FAILED\n"); + BIO_printf(bio_err, "SSL SERVER STARTUP FAILED\n"); return (1); } else { s_write = 0; @@ -606,7 +605,7 @@ int doit(char *ctx[4]) SSL_set_shutdown(s_ssl, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); #ifdef undef - fprintf(stdout, "DONE\n"); + BIO_printf(bio_stdout, "DONE\n"); #endif err: /* @@ -640,7 +639,7 @@ int doit(char *ctx[4]) return (0); } -int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx) +int verify_callback(int ok, X509_STORE_CTX *ctx) { char *s, buf[256]; @@ -649,9 +648,9 @@ int MS_CALLBACK verify_callback(int ok, buf, 256); if (s != NULL) { if (ok) - fprintf(stderr, "depth=%d %s\n", ctx->error_depth, buf); + BIO_printf(bio_err, "depth=%d %s\n", ctx->error_depth, buf); else - fprintf(stderr, "depth=%d error=%d %s\n", + BIO_printf(bio_err, "depth=%d error=%d %s\n", ctx->error_depth, ctx->error, buf); } } @@ -688,7 +687,7 @@ void thread_cleanup(void) OPENSSL_free(lock_cs); } -void win32_locking_callback(int mode, int type, char *file, int line) +void win32_locking_callback(int mode, int type, const char *file, int line) { if (mode & CRYPTO_LOCK) { WaitForSingleObject(lock_cs[type], INFINITE); @@ -717,7 +716,7 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX (void *)ssl_ctx, 0L, &(thread_id[i])); } - printf("reaping\n"); + BIO_printf(bio_stdout, "reaping\n"); for (i = 0; i < thread_number; i += 50) { int j; @@ -727,7 +726,7 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX (CONST HANDLE *) & (thread_handle[i]), TRUE, INFINITE) == WAIT_FAILED) { - fprintf(stderr, "WaitForMultipleObjects failed:%d\n", + BIO_printf(bio_err, "WaitForMultipleObjects failed:%d\n", GetLastError()); exit(1); } @@ -743,7 +742,7 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX ret = (ret + end.wSecond - start.wSecond); ret += (end.wMilliseconds - start.wMilliseconds) / 1000.0; - printf("win32 threads done - %.3f seconds\n", ret); + BIO_printf(bio_stdout, "win32 threads done - %.3f seconds\n", ret); } #endif /* OPENSSL_SYS_WIN32 */ @@ -768,8 +767,8 @@ void thread_setup(void) mutex_init(&(lock_cs[i]), USYNC_THREAD, NULL); } - CRYPTO_set_id_callback((unsigned long (*)())solaris_thread_id); - CRYPTO_set_locking_callback((void (*)())solaris_locking_callback); + CRYPTO_set_id_callback(solaris_thread_id); + CRYPTO_set_locking_callback(solaris_locking_callback); } void thread_cleanup(void) @@ -778,34 +777,34 @@ void thread_cleanup(void) CRYPTO_set_locking_callback(NULL); - fprintf(stderr, "cleanup\n"); + BIO_printf(bio_err, "cleanup\n"); for (i = 0; i < CRYPTO_num_locks(); i++) { /* rwlock_destroy(&(lock_cs[i])); */ mutex_destroy(&(lock_cs[i])); - fprintf(stderr, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); + BIO_printf(bio_err, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); } OPENSSL_free(lock_cs); OPENSSL_free(lock_count); - fprintf(stderr, "done cleanup\n"); + BIO_printf(bio_err, "done cleanup\n"); } -void solaris_locking_callback(int mode, int type, char *file, int line) +void solaris_locking_callback(int mode, int type, const char *file, int line) { # ifdef undef - fprintf(stderr, "thread=%4d mode=%s lock=%s %s:%d\n", - CRYPTO_thread_id(), - (mode & CRYPTO_LOCK) ? "l" : "u", - (type & CRYPTO_READ) ? "r" : "w", file, line); + BIO_printf(bio_err, "thread=%4d mode=%s lock=%s %s:%d\n", + CRYPTO_thread_id(), + (mode & CRYPTO_LOCK) ? "l" : "u", + (type & CRYPTO_READ) ? "r" : "w", file, line); # endif /*- if (CRYPTO_LOCK_SSL_CERT == type) - fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", - CRYPTO_thread_id(), - mode,file,line); + BIO_printf(bio_err,"(t,m,f,l) %ld %d %s %d\n", + CRYPTO_thread_id(), + mode,file,line); */ if (mode & CRYPTO_LOCK) { /*- @@ -837,21 +836,22 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX (void *(*)())ndoit, (void *)ssl_ctx, 0L, &(thread_ctx[i])); } - printf("reaping\n"); + BIO_printf(bio_stdout, "reaping\n"); for (i = 0; i < thread_number; i++) { thr_join(thread_ctx[i], NULL, NULL); } - printf("solaris threads done (%d,%d)\n", - s_ctx->references, c_ctx->references); +#if 0 /* We can't currently find out the reference amount */ + BIO_printf(bio_stdout, "solaris threads done (%d,%d)\n", + s_ctx->references, c_ctx->references); +#else + BIO_printf(bio_stdout, "solaris threads done\n"); +#endif } -unsigned long solaris_thread_id(void) +void solaris_thread_id(CRYPTO_THREADID *tid) { - unsigned long ret; - - ret = (unsigned long)thr_self(); - return (ret); + CRYPTO_THREADID_set_numeric((unsigned long)thr_self()); } #endif /* SOLARIS */ @@ -880,8 +880,8 @@ void thread_setup(void) lock_cs[i] = usnewsema(arena, 1); } - CRYPTO_set_id_callback((unsigned long (*)())irix_thread_id); - CRYPTO_set_locking_callback((void (*)())irix_locking_callback); + CRYPTO_set_id_callback(irix_thread_id); + CRYPTO_set_locking_callback(irix_locking_callback); } void thread_cleanup(void) @@ -899,13 +899,13 @@ void thread_cleanup(void) OPENSSL_free(lock_cs); } -void irix_locking_callback(int mode, int type, char *file, int line) +void irix_locking_callback(int mode, int type, const char *file, int line) { if (mode & CRYPTO_LOCK) { - printf("lock %d\n", type); + BIO_printf(bio_stdout, "lock %d\n", type); uspsema(lock_cs[type]); } else { - printf("unlock %d\n", type); + BIO_printf(bio_stdout, "unlock %d\n", type); usvsema(lock_cs[type]); } } @@ -924,21 +924,22 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX PR_SADDR | PR_SFDS, (void *)ssl_ctx); } - printf("reaping\n"); + BIO_printf(bio_stdout, "reaping\n"); for (i = 0; i < thread_number; i++) { wait(NULL); } - printf("irix threads done (%d,%d)\n", - s_ctx->references, c_ctx->references); +#if 0 /* We can't currently find out the reference amount */ + BIO_printf(bio_stdout, "irix threads done (%d,%d)\n", + s_ctx->references, c_ctx->references); +#else + BIO_printf(bio_stdout, "irix threads done\n"); +#endif } unsigned long irix_thread_id(void) { - unsigned long ret; - - ret = (unsigned long)getpid(); - return (ret); + CRYPTO_THREADID_set_numeric((unsigned long)getpid()); } #endif /* IRIX */ @@ -958,8 +959,8 @@ void thread_setup(void) pthread_mutex_init(&(lock_cs[i]), NULL); } - CRYPTO_set_id_callback((unsigned long (*)())pthreads_thread_id); - CRYPTO_set_locking_callback((void (*)())pthreads_locking_callback); + CRYPTO_THREADID_set_callback(pthreads_thread_id); + CRYPTO_set_locking_callback(pthreads_locking_callback); } void thread_cleanup(void) @@ -967,30 +968,30 @@ void thread_cleanup(void) int i; CRYPTO_set_locking_callback(NULL); - fprintf(stderr, "cleanup\n"); + BIO_printf(bio_err, "cleanup\n"); for (i = 0; i < CRYPTO_num_locks(); i++) { pthread_mutex_destroy(&(lock_cs[i])); - fprintf(stderr, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); + BIO_printf(bio_err, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); } OPENSSL_free(lock_cs); OPENSSL_free(lock_count); - fprintf(stderr, "done cleanup\n"); + BIO_printf(bio_err, "done cleanup\n"); } -void pthreads_locking_callback(int mode, int type, char *file, int line) +void pthreads_locking_callback(int mode, int type, const char *file, int line) { # ifdef undef - fprintf(stderr, "thread=%4d mode=%s lock=%s %s:%d\n", - CRYPTO_thread_id(), - (mode & CRYPTO_LOCK) ? "l" : "u", - (type & CRYPTO_READ) ? "r" : "w", file, line); + BIO_printf(bio_err, "thread=%4d mode=%s lock=%s %s:%d\n", + CRYPTO_thread_id(), + (mode & CRYPTO_LOCK) ? "l" : "u", + (type & CRYPTO_READ) ? "r" : "w", file, line); # endif /*- if (CRYPTO_LOCK_SSL_CERT == type) - fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", - CRYPTO_thread_id(), - mode,file,line); + BIO_printf(bio_err,"(t,m,f,l) %ld %d %s %d\n", + CRYPTO_thread_id(), + mode,file,line); */ if (mode & CRYPTO_LOCK) { pthread_mutex_lock(&(lock_cs[type])); @@ -1017,21 +1018,22 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX (void *(*)())ndoit, (void *)ssl_ctx); } - printf("reaping\n"); + BIO_printf(bio_stdout, "reaping\n"); for (i = 0; i < thread_number; i++) { pthread_join(thread_ctx[i], NULL); } - printf("pthreads threads done (%d,%d)\n", - s_ctx->references, c_ctx->references); +#if 0 /* We can't currently find out the reference amount */ + BIO_printf(bio_stdout, "pthreads threads done (%d,%d)\n", + s_ctx->references, c_ctx->references); +#else + BIO_printf(bio_stdout, "pthreads threads done\n"); +#endif } -unsigned long pthreads_thread_id(void) +void pthreads_thread_id(CRYPTO_THREADID *tid) { - unsigned long ret; - - ret = (unsigned long)pthread_self(); - return (ret); + CRYPTO_THREADID_set_numeric(tid, (unsigned long)pthread_self()); } #endif /* PTHREADS */ @@ -1051,8 +1053,8 @@ void thread_setup(void) ThreadSem = MPKSemaphoreAlloc("OpenSSL mttest semaphore", 0); - CRYPTO_set_id_callback((unsigned long (*)())netware_thread_id); - CRYPTO_set_locking_callback((void (*)())netware_locking_callback); + CRYPTO_set_id_callback(netware_thread_id); + CRYPTO_set_locking_callback(netware_locking_callback); } void thread_cleanup(void) @@ -1061,21 +1063,21 @@ void thread_cleanup(void) CRYPTO_set_locking_callback(NULL); - fprintf(stdout, "thread_cleanup\n"); + BIO_printf(bio_stdout, "thread_cleanup\n"); for (i = 0; i < CRYPTO_num_locks(); i++) { MPKMutexFree(lock_cs[i]); - fprintf(stdout, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); + BIO_printf(bio_stdout, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); } OPENSSL_free(lock_cs); OPENSSL_free(lock_count); MPKSemaphoreFree(ThreadSem); - fprintf(stdout, "done cleanup\n"); + BIO_printf(bio_stdout, "done cleanup\n"); } -void netware_locking_callback(int mode, int type, char *file, int line) +void netware_locking_callback(int mode, int type, const char *file, int line) { if (mode & CRYPTO_LOCK) { MPKMutexLock(lock_cs[type]); @@ -1097,22 +1099,23 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX ThreadSwitchWithDelay(); } - printf("reaping\n"); + BIO_printf(bio_stdout, "reaping\n"); /* loop until all threads have signaled the semaphore */ for (i = 0; i < thread_number; i++) { MPKSemaphoreWait(ThreadSem); } - printf("netware threads done (%d,%d)\n", - s_ctx->references, c_ctx->references); +#if 0 /* We can't currently find out the reference amount */ + BIO_printf(bio_stdout, "netware threads done (%d,%d)\n", + s_ctx->references, c_ctx->references); +#else + BIO_printf(bio_stdout, "netware threads done\n"); +#endif } unsigned long netware_thread_id(void) { - unsigned long ret; - - ret = (unsigned long)GetThreadID(); - return (ret); + CRYPTO_THREADID_set_numeric((unsigned long)GetThreadID()); } #endif /* NETWARE */ @@ -1144,24 +1147,24 @@ void thread_cleanup(void) int i; CRYPTO_set_locking_callback(NULL); - fprintf(stderr, "cleanup\n"); + BIO_printf(bio_err, "cleanup\n"); for (i = 0; i < CRYPTO_num_locks(); i++) { delete lock_cs[i]; - fprintf(stderr, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); + BIO_printf(bio_err, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); } OPENSSL_free(lock_cs); OPENSSL_free(lock_count); - fprintf(stderr, "done cleanup\n"); + BIO_printf(bio_err, "done cleanup\n"); } void beos_locking_callback(int mode, int type, const char *file, int line) { # if 0 - fprintf(stderr, "thread=%4d mode=%s lock=%s %s:%d\n", - CRYPTO_thread_id(), - (mode & CRYPTO_LOCK) ? "l" : "u", - (type & CRYPTO_READ) ? "r" : "w", file, line); + BIO_printf(bio_err, "thread=%4d mode=%s lock=%s %s:%d\n", + CRYPTO_thread_id(), + (mode & CRYPTO_LOCK) ? "l" : "u", + (type & CRYPTO_READ) ? "r" : "w", file, line); # endif if (mode & CRYPTO_LOCK) { lock_cs[type]->Lock(); @@ -1187,14 +1190,14 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX resume_thread(thread_ctx[i]); } - printf("waiting...\n"); + BIO_printf(bio_stdout, "waiting...\n"); for (i = 0; i < thread_number; i++) { status_t result; wait_for_thread(thread_ctx[i], &result); } - printf("beos threads done (%d,%d)\n", - s_ctx->references, c_ctx->references); + BIO_printf(bio_stdout, "beos threads done (%d,%d)\n", + s_ctx->references, c_ctx->references); } unsigned long beos_thread_id(void) Modified: head/crypto/openssl/crypto/threads/pthread2.sh ============================================================================== --- head/crypto/openssl/crypto/threads/pthread2.sh Thu Jul 9 16:43:10 2015 (r285328) +++ head/crypto/openssl/crypto/threads/pthread2.sh Thu Jul 9 17:07:45 2015 (r285329) @@ -3,5 +3,4 @@ # build using pthreads where it's already built into the system *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jul 9 17:11:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 986A899785A; Thu, 9 Jul 2015 17:11:26 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E23B11AC; Thu, 9 Jul 2015 17:11:26 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igoe12 with SMTP id e12so18498483igo.1; Thu, 09 Jul 2015 10:11:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qO5zyKaqJUspbUSLXPYtEV7LKd6BmiEevaLoYkjKujU=; b=VdG8UOhIslRANi6QEZYzIic6QPdRoowY2oNkIR+X2mrCpJu2mg/PYlWpOem7qoa/1l 1PyhG9SlIMs0bGpQnD3aOLA+6vdYTvhFmx1BbeJl76kf7NZUBqOAyxU7Ul0ja893PII9 ICUXOR6n/lsMJw8eFVFwHHUT10MTGqav95oJ05Hi88k4td2nS1QYf8VdChwzLI+XBVDr MSt0XxN1qgiv2TPcxpPETtM5pwphDrTkuTD9Ztm3h2kWrf2lhSNxvrF6z9/pBQdJe11V ez8Lb0DIwS5d7GVI5S5bJU16Js6YKIgSoToMOd1Z9ar+JIj/20Pbsj8s1N2XCQl0c8rC caIA== MIME-Version: 1.0 X-Received: by 10.50.111.167 with SMTP id ij7mr97288028igb.49.1436461885666; Thu, 09 Jul 2015 10:11:25 -0700 (PDT) Received: by 10.36.38.133 with HTTP; Thu, 9 Jul 2015 10:11:25 -0700 (PDT) In-Reply-To: <201507090720.t697KFKC064426@repo.freebsd.org> References: <201507090720.t697KFKC064426@repo.freebsd.org> Date: Thu, 9 Jul 2015 10:11:25 -0700 Message-ID: Subject: Re: svn commit: r285307 - in head/sys: compat/cloudabi compat/cloudabi64 conf contrib/cloudabi kern From: Adrian Chadd To: Ed Schouten Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 17:11:26 -0000 Hi, So this isn't at all included in a system by default? Or is it disable-able? All I see in options is COMPAT_CLOUDABI64. -adrian On 9 July 2015 at 00:20, Ed Schouten wrote: > Author: ed > Date: Thu Jul 9 07:20:15 2015 > New Revision: 285307 > URL: https://svnweb.freebsd.org/changeset/base/285307 > > Log: > Import the CloudABI datatypes and create a system call table. > > CloudABI is a pure capability-based runtime environment for UNIX. It > works similar to Capsicum, except that processes already run in > capabilities mode on startup. All functionality that conflicts with this > model has been omitted, making it a compact binary interface that can be > supported by other operating systems without too much effort. > > CloudABI is 'secure by default'; the idea is that it should be safe to > run arbitrary third-party binaries without requiring any explicit > hardware virtualization (Bhyve) or namespace virtualization (Jails). The > rights of an application are purely determined by the set of file > descriptors that you grant it on startup. > > The datatypes and constants used by CloudABI's C library (cloudlibc) are > defined in separate files called syscalldefs_mi.h (pointer size > independent) and syscalldefs_md.h (pointer size dependent). We import > these files in sys/contrib/cloudabi and wrap around them in > cloudabi*_syscalldefs.h. > > We then add stubs for all of the system calls in sys/compat/cloudabi or > sys/compat/cloudabi64, depending on whether the system call depends on > the pointer size. We only have nine system calls that depend on the > pointer size. If we ever want to support 32-bit binaries, we can simply > add sys/compat/cloudabi32 and implement these nine system calls again. > > The next step is to send in code reviews for the individual system call > implementations, but also add a sysentvec, to allow CloudABI executabled > to be started through execve(). > > More information about CloudABI: > - GitHub: https://github.com/NuxiNL/cloudlibc > - Talk at BSDCan: https://www.youtube.com/watch?v=SVdF84x1EdA > > Differential Revision: https://reviews.freebsd.org/D2848 > Reviewed by: emaste, brooks > Obtained from: https://github.com/NuxiNL/freebsd > > Added: > head/sys/compat/cloudabi/ > head/sys/compat/cloudabi/cloudabi_clock.c (contents, props changed) > head/sys/compat/cloudabi/cloudabi_fd.c (contents, props changed) > head/sys/compat/cloudabi/cloudabi_file.c (contents, props changed) > head/sys/compat/cloudabi/cloudabi_futex.c (contents, props changed) > head/sys/compat/cloudabi/cloudabi_mem.c (contents, props changed) > head/sys/compat/cloudabi/cloudabi_proc.c (contents, props changed) > head/sys/compat/cloudabi/cloudabi_proto.h (contents, props changed) > head/sys/compat/cloudabi/cloudabi_random.c (contents, props changed) > head/sys/compat/cloudabi/cloudabi_sock.c (contents, props changed) > head/sys/compat/cloudabi/cloudabi_syscalldefs.h (contents, props changed) > head/sys/compat/cloudabi/cloudabi_thread.c (contents, props changed) > head/sys/compat/cloudabi64/ > head/sys/compat/cloudabi64/Makefile (contents, props changed) > head/sys/compat/cloudabi64/cloudabi64_fd.c (contents, props changed) > head/sys/compat/cloudabi64/cloudabi64_poll.c (contents, props changed) > head/sys/compat/cloudabi64/cloudabi64_sock.c (contents, props changed) > head/sys/compat/cloudabi64/cloudabi64_syscalldefs.h (contents, props changed) > head/sys/compat/cloudabi64/cloudabi64_thread.c (contents, props changed) > head/sys/compat/cloudabi64/syscalls.conf (contents, props changed) > head/sys/compat/cloudabi64/syscalls.master (contents, props changed) > head/sys/contrib/cloudabi/ > head/sys/contrib/cloudabi/syscalldefs_md.h (contents, props changed) > head/sys/contrib/cloudabi/syscalldefs_mi.h (contents, props changed) > Modified: > head/sys/conf/files > head/sys/conf/options > head/sys/kern/makesyscalls.sh > > Added: head/sys/compat/cloudabi/cloudabi_clock.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi/cloudabi_clock.c Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,47 @@ > +/*- > + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > + > +int > +cloudabi_sys_clock_res_get(struct thread *td, > + struct cloudabi_sys_clock_res_get_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_clock_time_get(struct thread *td, > + struct cloudabi_sys_clock_time_get_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > > Added: head/sys/compat/cloudabi/cloudabi_fd.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi/cloudabi_fd.c Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,115 @@ > +/*- > + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > + > +int > +cloudabi_sys_fd_close(struct thread *td, struct cloudabi_sys_fd_close_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_fd_create1(struct thread *td, > + struct cloudabi_sys_fd_create1_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_fd_create2(struct thread *td, > + struct cloudabi_sys_fd_create2_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_fd_datasync(struct thread *td, > + struct cloudabi_sys_fd_datasync_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_fd_dup(struct thread *td, struct cloudabi_sys_fd_dup_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_fd_replace(struct thread *td, > + struct cloudabi_sys_fd_replace_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_fd_seek(struct thread *td, struct cloudabi_sys_fd_seek_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_fd_stat_get(struct thread *td, > + struct cloudabi_sys_fd_stat_get_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_fd_stat_put(struct thread *td, > + struct cloudabi_sys_fd_stat_put_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_fd_sync(struct thread *td, struct cloudabi_sys_fd_sync_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > > Added: head/sys/compat/cloudabi/cloudabi_file.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi/cloudabi_file.c Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,155 @@ > +/*- > + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > + > +int > +cloudabi_sys_file_advise(struct thread *td, > + struct cloudabi_sys_file_advise_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_file_allocate(struct thread *td, > + struct cloudabi_sys_file_allocate_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_file_create(struct thread *td, > + struct cloudabi_sys_file_create_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_file_link(struct thread *td, > + struct cloudabi_sys_file_link_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_file_open(struct thread *td, > + struct cloudabi_sys_file_open_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_file_readdir(struct thread *td, > + struct cloudabi_sys_file_readdir_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_file_readlink(struct thread *td, > + struct cloudabi_sys_file_readlink_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_file_rename(struct thread *td, > + struct cloudabi_sys_file_rename_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_file_stat_fget(struct thread *td, > + struct cloudabi_sys_file_stat_fget_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_file_stat_fput(struct thread *td, > + struct cloudabi_sys_file_stat_fput_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_file_stat_get(struct thread *td, > + struct cloudabi_sys_file_stat_get_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_file_stat_put(struct thread *td, > + struct cloudabi_sys_file_stat_put_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_file_symlink(struct thread *td, > + struct cloudabi_sys_file_symlink_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_file_unlink(struct thread *td, > + struct cloudabi_sys_file_unlink_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > > Added: head/sys/compat/cloudabi/cloudabi_futex.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi/cloudabi_futex.c Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,47 @@ > +/*- > + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > + > +int > +cloudabi_sys_condvar_signal(struct thread *td, > + struct cloudabi_sys_condvar_signal_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_lock_unlock(struct thread *td, > + struct cloudabi_sys_lock_unlock_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > > Added: head/sys/compat/cloudabi/cloudabi_mem.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi/cloudabi_mem.c Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,89 @@ > +/*- > + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > + > +int > +cloudabi_sys_mem_advise(struct thread *td, > + struct cloudabi_sys_mem_advise_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_mem_lock(struct thread *td, struct cloudabi_sys_mem_lock_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_mem_map(struct thread *td, struct cloudabi_sys_mem_map_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_mem_protect(struct thread *td, > + struct cloudabi_sys_mem_protect_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_mem_sync(struct thread *td, struct cloudabi_sys_mem_sync_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_mem_unlock(struct thread *td, > + struct cloudabi_sys_mem_unlock_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_mem_unmap(struct thread *td, > + struct cloudabi_sys_mem_unmap_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > > Added: head/sys/compat/cloudabi/cloudabi_proc.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi/cloudabi_proc.c Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,65 @@ > +/*- > + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > + > +int > +cloudabi_sys_proc_exec(struct thread *td, > + struct cloudabi_sys_proc_exec_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_proc_exit(struct thread *td, > + struct cloudabi_sys_proc_exit_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_proc_fork(struct thread *td, > + struct cloudabi_sys_proc_fork_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_proc_raise(struct thread *td, > + struct cloudabi_sys_proc_raise_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > > Added: head/sys/compat/cloudabi/cloudabi_proto.h > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi/cloudabi_proto.h Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,34 @@ > +/*- > + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +/* > + * This should provide all prototypes for the machine-independent system > + * calls. Unfortunately, we don't have a separate system call table for > + * those, so rely on the system call table from COMPAT_CLOUDABI64. > + */ > +#include > +#include > > Added: head/sys/compat/cloudabi/cloudabi_random.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi/cloudabi_random.c Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,38 @@ > +/*- > + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > + > +int > +cloudabi_sys_random_get(struct thread *td, > + struct cloudabi_sys_random_get_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > > Added: head/sys/compat/cloudabi/cloudabi_sock.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi/cloudabi_sock.c Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,83 @@ > +/*- > + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > + > +int > +cloudabi_sys_sock_accept(struct thread *td, > + struct cloudabi_sys_sock_accept_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_sock_bind(struct thread *td, > + struct cloudabi_sys_sock_bind_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_sock_connect(struct thread *td, > + struct cloudabi_sys_sock_connect_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_sock_listen(struct thread *td, > + struct cloudabi_sys_sock_listen_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_sock_shutdown(struct thread *td, > + struct cloudabi_sys_sock_shutdown_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_sock_stat_get(struct thread *td, > + struct cloudabi_sys_sock_stat_get_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > > Added: head/sys/compat/cloudabi/cloudabi_syscalldefs.h > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi/cloudabi_syscalldefs.h Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,40 @@ > +/*- > + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#ifndef _CLOUDABI_SYSCALLDEFS_H_ > +#define _CLOUDABI_SYSCALLDEFS_H_ > + > +#include > + > +#define alignas _Alignas > +#define alignof _Alignof > +#define static_assert _Static_assert > + > +/* Import machine-independent CloudABI definitions. */ > +#include > + > +#endif > > Added: head/sys/compat/cloudabi/cloudabi_thread.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi/cloudabi_thread.c Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,47 @@ > +/*- > + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > + > +int > +cloudabi_sys_thread_exit(struct thread *td, > + struct cloudabi_sys_thread_exit_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi_sys_thread_yield(struct thread *td, > + struct cloudabi_sys_thread_yield_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > > Added: head/sys/compat/cloudabi64/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi64/Makefile Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,12 @@ > +# $FreeBSD$ > + > +all: > + @echo "make sysent only" > + > +sysent: cloudabi64_sysent.c cloudabi64_syscall.h cloudabi64_proto.h \ > + cloudabi64_syscalls.c cloudabi64_systrace_args.c > + > +cloudabi64_sysent.c cloudabi64_syscall.h cloudabi64_proto.h \ > + cloudabi64_syscalls.c cloudabi64_systrace_args.c: \ > + ../../kern/makesyscalls.sh syscalls.master syscalls.conf > + sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf > > Added: head/sys/compat/cloudabi64/cloudabi64_fd.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi64/cloudabi64_fd.c Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,66 @@ > +/*- > + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > + > +int > +cloudabi64_sys_fd_pread(struct thread *td, > + struct cloudabi64_sys_fd_pread_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi64_sys_fd_pwrite(struct thread *td, > + struct cloudabi64_sys_fd_pwrite_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi64_sys_fd_read(struct thread *td, > + struct cloudabi64_sys_fd_read_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi64_sys_fd_write(struct thread *td, > + struct cloudabi64_sys_fd_write_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > > Added: head/sys/compat/cloudabi64/cloudabi64_poll.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi64/cloudabi64_poll.c Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,38 @@ > +/*- > + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > + > +int > +cloudabi64_sys_poll(struct thread *td, struct cloudabi64_sys_poll_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > > Added: head/sys/compat/cloudabi64/cloudabi64_sock.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi64/cloudabi64_sock.c Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,48 @@ > +/*- > + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > + > +int > +cloudabi64_sys_sock_recv(struct thread *td, > + struct cloudabi64_sys_sock_recv_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > + > +int > +cloudabi64_sys_sock_send(struct thread *td, > + struct cloudabi64_sys_sock_send_args *uap) > +{ > + > + /* Not implemented. */ > + return (ENOSYS); > +} > > Added: head/sys/compat/cloudabi64/cloudabi64_syscalldefs.h > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/compat/cloudabi64/cloudabi64_syscalldefs.h Thu Jul 9 07:20:15 2015 (r285307) > @@ -0,0 +1,45 @@ > +/*- > + * Copyright (c) 2015 Nuxi, https://nuxi.nl/ > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#ifndef _CLOUDABI64_SYSCALLDEFS_H_ > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-all@freebsd.org Thu Jul 9 17:17:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11108997970; Thu, 9 Jul 2015 17:17:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 EFDF219AA; Thu, 9 Jul 2015 17:17:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69HHSSw066604; Thu, 9 Jul 2015 17:17:28 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69HHNpB066535; Thu, 9 Jul 2015 17:17:23 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201507091717.t69HHNpB066535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 9 Jul 2015 17:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285330 - in stable/10: crypto/openssl crypto/openssl/crypto crypto/openssl/crypto/bio crypto/openssl/crypto/evp crypto/openssl/crypto/pkcs12 crypto/openssl/crypto/threads crypto/openss... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 17:17:29 -0000 Author: jkim Date: Thu Jul 9 17:17:22 2015 New Revision: 285330 URL: https://svnweb.freebsd.org/changeset/base/285330 Log: MFC: r285329 Merge OpenSSL 1.0.1p. Approved by: re (gjb) Relnotes: yes Added: stable/10/crypto/openssl/crypto/x509/verify_extra_test.c - copied unchanged from r285329, head/crypto/openssl/crypto/x509/verify_extra_test.c Modified: stable/10/crypto/openssl/CHANGES stable/10/crypto/openssl/Makefile stable/10/crypto/openssl/Makefile.org stable/10/crypto/openssl/NEWS stable/10/crypto/openssl/README stable/10/crypto/openssl/crypto/bio/bio.h stable/10/crypto/openssl/crypto/evp/e_aes.c stable/10/crypto/openssl/crypto/opensslconf.h stable/10/crypto/openssl/crypto/opensslconf.h.in stable/10/crypto/openssl/crypto/opensslv.h stable/10/crypto/openssl/crypto/pkcs12/p12_kiss.c stable/10/crypto/openssl/crypto/threads/mttest.c stable/10/crypto/openssl/crypto/threads/pthread2.sh stable/10/crypto/openssl/crypto/x509/Makefile stable/10/crypto/openssl/crypto/x509/x509_vfy.c stable/10/crypto/openssl/doc/crypto/X509_NAME_get_index_by_NID.pod stable/10/crypto/openssl/doc/crypto/X509_STORE_CTX_new.pod stable/10/crypto/openssl/doc/crypto/X509_verify_cert.pod stable/10/crypto/openssl/ssl/s3_clnt.c stable/10/crypto/openssl/ssl/s3_srvr.c stable/10/secure/lib/libcrypto/Makefile.inc stable/10/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/10/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/10/secure/lib/libcrypto/man/BIO_ctrl.3 stable/10/secure/lib/libcrypto/man/BIO_f_base64.3 stable/10/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/10/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/10/secure/lib/libcrypto/man/BIO_f_md.3 stable/10/secure/lib/libcrypto/man/BIO_f_null.3 stable/10/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/10/secure/lib/libcrypto/man/BIO_find_type.3 stable/10/secure/lib/libcrypto/man/BIO_new.3 stable/10/secure/lib/libcrypto/man/BIO_new_CMS.3 stable/10/secure/lib/libcrypto/man/BIO_push.3 stable/10/secure/lib/libcrypto/man/BIO_read.3 stable/10/secure/lib/libcrypto/man/BIO_s_accept.3 stable/10/secure/lib/libcrypto/man/BIO_s_bio.3 stable/10/secure/lib/libcrypto/man/BIO_s_connect.3 stable/10/secure/lib/libcrypto/man/BIO_s_fd.3 stable/10/secure/lib/libcrypto/man/BIO_s_file.3 stable/10/secure/lib/libcrypto/man/BIO_s_mem.3 stable/10/secure/lib/libcrypto/man/BIO_s_null.3 stable/10/secure/lib/libcrypto/man/BIO_s_socket.3 stable/10/secure/lib/libcrypto/man/BIO_set_callback.3 stable/10/secure/lib/libcrypto/man/BIO_should_retry.3 stable/10/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/10/secure/lib/libcrypto/man/BN_CTX_new.3 stable/10/secure/lib/libcrypto/man/BN_CTX_start.3 stable/10/secure/lib/libcrypto/man/BN_add.3 stable/10/secure/lib/libcrypto/man/BN_add_word.3 stable/10/secure/lib/libcrypto/man/BN_bn2bin.3 stable/10/secure/lib/libcrypto/man/BN_cmp.3 stable/10/secure/lib/libcrypto/man/BN_copy.3 stable/10/secure/lib/libcrypto/man/BN_generate_prime.3 stable/10/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/10/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/10/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/10/secure/lib/libcrypto/man/BN_new.3 stable/10/secure/lib/libcrypto/man/BN_num_bytes.3 stable/10/secure/lib/libcrypto/man/BN_rand.3 stable/10/secure/lib/libcrypto/man/BN_set_bit.3 stable/10/secure/lib/libcrypto/man/BN_swap.3 stable/10/secure/lib/libcrypto/man/BN_zero.3 stable/10/secure/lib/libcrypto/man/CMS_add0_cert.3 stable/10/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 stable/10/secure/lib/libcrypto/man/CMS_add1_signer.3 stable/10/secure/lib/libcrypto/man/CMS_compress.3 stable/10/secure/lib/libcrypto/man/CMS_decrypt.3 stable/10/secure/lib/libcrypto/man/CMS_encrypt.3 stable/10/secure/lib/libcrypto/man/CMS_final.3 stable/10/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 stable/10/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 stable/10/secure/lib/libcrypto/man/CMS_get0_type.3 stable/10/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 stable/10/secure/lib/libcrypto/man/CMS_sign.3 stable/10/secure/lib/libcrypto/man/CMS_sign_receipt.3 stable/10/secure/lib/libcrypto/man/CMS_uncompress.3 stable/10/secure/lib/libcrypto/man/CMS_verify.3 stable/10/secure/lib/libcrypto/man/CMS_verify_receipt.3 stable/10/secure/lib/libcrypto/man/CONF_modules_free.3 stable/10/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/10/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/10/secure/lib/libcrypto/man/DH_generate_key.3 stable/10/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/10/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/DH_new.3 stable/10/secure/lib/libcrypto/man/DH_set_method.3 stable/10/secure/lib/libcrypto/man/DH_size.3 stable/10/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/10/secure/lib/libcrypto/man/DSA_do_sign.3 stable/10/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/10/secure/lib/libcrypto/man/DSA_generate_key.3 stable/10/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/10/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/DSA_new.3 stable/10/secure/lib/libcrypto/man/DSA_set_method.3 stable/10/secure/lib/libcrypto/man/DSA_sign.3 stable/10/secure/lib/libcrypto/man/DSA_size.3 stable/10/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/10/secure/lib/libcrypto/man/ERR_clear_error.3 stable/10/secure/lib/libcrypto/man/ERR_error_string.3 stable/10/secure/lib/libcrypto/man/ERR_get_error.3 stable/10/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/10/secure/lib/libcrypto/man/ERR_load_strings.3 stable/10/secure/lib/libcrypto/man/ERR_print_errors.3 stable/10/secure/lib/libcrypto/man/ERR_put_error.3 stable/10/secure/lib/libcrypto/man/ERR_remove_state.3 stable/10/secure/lib/libcrypto/man/ERR_set_mark.3 stable/10/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/10/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/10/secure/lib/libcrypto/man/EVP_DigestSignInit.3 stable/10/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 stable/10/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/10/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_derive.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_sign.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_verify.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 stable/10/secure/lib/libcrypto/man/EVP_SealInit.3 stable/10/secure/lib/libcrypto/man/EVP_SignInit.3 stable/10/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/10/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/10/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/10/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/10/secure/lib/libcrypto/man/OPENSSL_config.3 stable/10/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/10/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/10/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/10/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 stable/10/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 stable/10/secure/lib/libcrypto/man/PKCS12_create.3 stable/10/secure/lib/libcrypto/man/PKCS12_parse.3 stable/10/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/10/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/10/secure/lib/libcrypto/man/PKCS7_sign.3 stable/10/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 stable/10/secure/lib/libcrypto/man/PKCS7_verify.3 stable/10/secure/lib/libcrypto/man/RAND_add.3 stable/10/secure/lib/libcrypto/man/RAND_bytes.3 stable/10/secure/lib/libcrypto/man/RAND_cleanup.3 stable/10/secure/lib/libcrypto/man/RAND_egd.3 stable/10/secure/lib/libcrypto/man/RAND_load_file.3 stable/10/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/10/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/10/secure/lib/libcrypto/man/RSA_check_key.3 stable/10/secure/lib/libcrypto/man/RSA_generate_key.3 stable/10/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/RSA_new.3 stable/10/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/10/secure/lib/libcrypto/man/RSA_print.3 stable/10/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/10/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/10/secure/lib/libcrypto/man/RSA_set_method.3 stable/10/secure/lib/libcrypto/man/RSA_sign.3 stable/10/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/10/secure/lib/libcrypto/man/RSA_size.3 stable/10/secure/lib/libcrypto/man/SMIME_read_CMS.3 stable/10/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/10/secure/lib/libcrypto/man/SMIME_write_CMS.3 stable/10/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/10/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/10/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/10/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/10/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 stable/10/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 stable/10/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 stable/10/secure/lib/libcrypto/man/X509_new.3 stable/10/secure/lib/libcrypto/man/X509_verify_cert.3 stable/10/secure/lib/libcrypto/man/bio.3 stable/10/secure/lib/libcrypto/man/blowfish.3 stable/10/secure/lib/libcrypto/man/bn.3 stable/10/secure/lib/libcrypto/man/bn_internal.3 stable/10/secure/lib/libcrypto/man/buffer.3 stable/10/secure/lib/libcrypto/man/crypto.3 stable/10/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/10/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 stable/10/secure/lib/libcrypto/man/d2i_DHparams.3 stable/10/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/10/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 stable/10/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/10/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/10/secure/lib/libcrypto/man/d2i_X509.3 stable/10/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/10/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/10/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/10/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/10/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/10/secure/lib/libcrypto/man/des.3 stable/10/secure/lib/libcrypto/man/dh.3 stable/10/secure/lib/libcrypto/man/dsa.3 stable/10/secure/lib/libcrypto/man/ecdsa.3 stable/10/secure/lib/libcrypto/man/engine.3 stable/10/secure/lib/libcrypto/man/err.3 stable/10/secure/lib/libcrypto/man/evp.3 stable/10/secure/lib/libcrypto/man/hmac.3 stable/10/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 stable/10/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 stable/10/secure/lib/libcrypto/man/lh_stats.3 stable/10/secure/lib/libcrypto/man/lhash.3 stable/10/secure/lib/libcrypto/man/md5.3 stable/10/secure/lib/libcrypto/man/mdc2.3 stable/10/secure/lib/libcrypto/man/pem.3 stable/10/secure/lib/libcrypto/man/rand.3 stable/10/secure/lib/libcrypto/man/rc4.3 stable/10/secure/lib/libcrypto/man/ripemd.3 stable/10/secure/lib/libcrypto/man/rsa.3 stable/10/secure/lib/libcrypto/man/sha.3 stable/10/secure/lib/libcrypto/man/threads.3 stable/10/secure/lib/libcrypto/man/ui.3 stable/10/secure/lib/libcrypto/man/ui_compat.3 stable/10/secure/lib/libcrypto/man/x509.3 stable/10/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/10/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/10/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/10/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/10/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/10/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/10/secure/lib/libssl/man/SSL_CTX_free.3 stable/10/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/10/secure/lib/libssl/man/SSL_CTX_new.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/10/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/10/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 stable/10/secure/lib/libssl/man/SSL_SESSION_free.3 stable/10/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/10/secure/lib/libssl/man/SSL_accept.3 stable/10/secure/lib/libssl/man/SSL_alert_type_string.3 stable/10/secure/lib/libssl/man/SSL_clear.3 stable/10/secure/lib/libssl/man/SSL_connect.3 stable/10/secure/lib/libssl/man/SSL_do_handshake.3 stable/10/secure/lib/libssl/man/SSL_free.3 stable/10/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/10/secure/lib/libssl/man/SSL_get_ciphers.3 stable/10/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/10/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/10/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/10/secure/lib/libssl/man/SSL_get_error.3 stable/10/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/10/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_get_fd.3 stable/10/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/10/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/10/secure/lib/libssl/man/SSL_get_psk_identity.3 stable/10/secure/lib/libssl/man/SSL_get_rbio.3 stable/10/secure/lib/libssl/man/SSL_get_session.3 stable/10/secure/lib/libssl/man/SSL_get_verify_result.3 stable/10/secure/lib/libssl/man/SSL_get_version.3 stable/10/secure/lib/libssl/man/SSL_library_init.3 stable/10/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/10/secure/lib/libssl/man/SSL_new.3 stable/10/secure/lib/libssl/man/SSL_pending.3 stable/10/secure/lib/libssl/man/SSL_read.3 stable/10/secure/lib/libssl/man/SSL_rstate_string.3 stable/10/secure/lib/libssl/man/SSL_session_reused.3 stable/10/secure/lib/libssl/man/SSL_set_bio.3 stable/10/secure/lib/libssl/man/SSL_set_connect_state.3 stable/10/secure/lib/libssl/man/SSL_set_fd.3 stable/10/secure/lib/libssl/man/SSL_set_session.3 stable/10/secure/lib/libssl/man/SSL_set_shutdown.3 stable/10/secure/lib/libssl/man/SSL_set_verify_result.3 stable/10/secure/lib/libssl/man/SSL_shutdown.3 stable/10/secure/lib/libssl/man/SSL_state_string.3 stable/10/secure/lib/libssl/man/SSL_want.3 stable/10/secure/lib/libssl/man/SSL_write.3 stable/10/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/10/secure/lib/libssl/man/ssl.3 stable/10/secure/usr.bin/openssl/man/CA.pl.1 stable/10/secure/usr.bin/openssl/man/asn1parse.1 stable/10/secure/usr.bin/openssl/man/c_rehash.1 stable/10/secure/usr.bin/openssl/man/ca.1 stable/10/secure/usr.bin/openssl/man/ciphers.1 stable/10/secure/usr.bin/openssl/man/cms.1 stable/10/secure/usr.bin/openssl/man/crl.1 stable/10/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/10/secure/usr.bin/openssl/man/dgst.1 stable/10/secure/usr.bin/openssl/man/dhparam.1 stable/10/secure/usr.bin/openssl/man/dsa.1 stable/10/secure/usr.bin/openssl/man/dsaparam.1 stable/10/secure/usr.bin/openssl/man/ec.1 stable/10/secure/usr.bin/openssl/man/ecparam.1 stable/10/secure/usr.bin/openssl/man/enc.1 stable/10/secure/usr.bin/openssl/man/errstr.1 stable/10/secure/usr.bin/openssl/man/gendsa.1 stable/10/secure/usr.bin/openssl/man/genpkey.1 stable/10/secure/usr.bin/openssl/man/genrsa.1 stable/10/secure/usr.bin/openssl/man/nseq.1 stable/10/secure/usr.bin/openssl/man/ocsp.1 stable/10/secure/usr.bin/openssl/man/openssl.1 stable/10/secure/usr.bin/openssl/man/passwd.1 stable/10/secure/usr.bin/openssl/man/pkcs12.1 stable/10/secure/usr.bin/openssl/man/pkcs7.1 stable/10/secure/usr.bin/openssl/man/pkcs8.1 stable/10/secure/usr.bin/openssl/man/pkey.1 stable/10/secure/usr.bin/openssl/man/pkeyparam.1 stable/10/secure/usr.bin/openssl/man/pkeyutl.1 stable/10/secure/usr.bin/openssl/man/rand.1 stable/10/secure/usr.bin/openssl/man/req.1 stable/10/secure/usr.bin/openssl/man/rsa.1 stable/10/secure/usr.bin/openssl/man/rsautl.1 stable/10/secure/usr.bin/openssl/man/s_client.1 stable/10/secure/usr.bin/openssl/man/s_server.1 stable/10/secure/usr.bin/openssl/man/s_time.1 stable/10/secure/usr.bin/openssl/man/sess_id.1 stable/10/secure/usr.bin/openssl/man/smime.1 stable/10/secure/usr.bin/openssl/man/speed.1 stable/10/secure/usr.bin/openssl/man/spkac.1 stable/10/secure/usr.bin/openssl/man/ts.1 stable/10/secure/usr.bin/openssl/man/tsget.1 stable/10/secure/usr.bin/openssl/man/verify.1 stable/10/secure/usr.bin/openssl/man/version.1 stable/10/secure/usr.bin/openssl/man/x509.1 stable/10/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/crypto/openssl/CHANGES ============================================================================== --- stable/10/crypto/openssl/CHANGES Thu Jul 9 17:07:45 2015 (r285329) +++ stable/10/crypto/openssl/CHANGES Thu Jul 9 17:17:22 2015 (r285330) @@ -2,6 +2,21 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1o and 1.0.1p [9 Jul 2015] + + *) Alternate chains certificate forgery + + During certificate verfification, OpenSSL will attempt to find an + alternative certificate chain if the first attempt to build such a chain + fails. An error in the implementation of this logic can mean that an + attacker could cause certain checks on untrusted certificates to be + bypassed, such as the CA flag, enabling them to use a valid leaf + certificate to act as a CA and "issue" an invalid certificate. + + This issue was reported to OpenSSL by Adam Langley/David Benjamin + (Google/BoringSSL). + [Matt Caswell] + Changes between 1.0.1n and 1.0.1o [12 Jun 2015] *) Fix HMAC ABI incompatibility. The previous version introduced an ABI Modified: stable/10/crypto/openssl/Makefile ============================================================================== --- stable/10/crypto/openssl/Makefile Thu Jul 9 17:07:45 2015 (r285329) +++ stable/10/crypto/openssl/Makefile Thu Jul 9 17:17:22 2015 (r285330) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1o +VERSION=1.0.1p MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 @@ -270,6 +270,7 @@ reflect: @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) sub_all: build_all + build_all: build_libs build_apps build_tests build_tools build_libs: build_libcrypto build_libssl openssl.pc @@ -279,15 +280,15 @@ build_libssl: build_ssl libssl.pc build_crypto: @dir=crypto; target=all; $(BUILD_ONE_CMD) -build_ssl: +build_ssl: build_crypto @dir=ssl; target=all; $(BUILD_ONE_CMD) -build_engines: +build_engines: build_crypto @dir=engines; target=all; $(BUILD_ONE_CMD) -build_apps: +build_apps: build_libs @dir=apps; target=all; $(BUILD_ONE_CMD) -build_tests: +build_tests: build_libs @dir=test; target=all; $(BUILD_ONE_CMD) -build_tools: +build_tools: build_libs @dir=tools; target=all; $(BUILD_ONE_CMD) all_testapps: build_libs build_testapps Modified: stable/10/crypto/openssl/Makefile.org ============================================================================== --- stable/10/crypto/openssl/Makefile.org Thu Jul 9 17:07:45 2015 (r285329) +++ stable/10/crypto/openssl/Makefile.org Thu Jul 9 17:17:22 2015 (r285330) @@ -268,6 +268,7 @@ reflect: @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) sub_all: build_all + build_all: build_libs build_apps build_tests build_tools build_libs: build_libcrypto build_libssl openssl.pc @@ -277,15 +278,15 @@ build_libssl: build_ssl libssl.pc build_crypto: @dir=crypto; target=all; $(BUILD_ONE_CMD) -build_ssl: +build_ssl: build_crypto @dir=ssl; target=all; $(BUILD_ONE_CMD) -build_engines: +build_engines: build_crypto @dir=engines; target=all; $(BUILD_ONE_CMD) -build_apps: +build_apps: build_libs @dir=apps; target=all; $(BUILD_ONE_CMD) -build_tests: +build_tests: build_libs @dir=test; target=all; $(BUILD_ONE_CMD) -build_tools: +build_tools: build_libs @dir=tools; target=all; $(BUILD_ONE_CMD) all_testapps: build_libs build_testapps Modified: stable/10/crypto/openssl/NEWS ============================================================================== --- stable/10/crypto/openssl/NEWS Thu Jul 9 17:07:45 2015 (r285329) +++ stable/10/crypto/openssl/NEWS Thu Jul 9 17:17:22 2015 (r285330) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1o and OpenSSL 1.0.1p [9 Jul 2015] + + o Alternate chains certificate forgery (CVE-2015-1793) + Major changes between OpenSSL 1.0.1n and OpenSSL 1.0.1o [12 Jun 2015] o Fix HMAC ABI incompatibility Modified: stable/10/crypto/openssl/README ============================================================================== --- stable/10/crypto/openssl/README Thu Jul 9 17:07:45 2015 (r285329) +++ stable/10/crypto/openssl/README Thu Jul 9 17:17:22 2015 (r285330) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1o 12 Jun 2015 + OpenSSL 1.0.1p 9 Jul 2015 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: stable/10/crypto/openssl/crypto/bio/bio.h ============================================================================== --- stable/10/crypto/openssl/crypto/bio/bio.h Thu Jul 9 17:07:45 2015 (r285329) +++ stable/10/crypto/openssl/crypto/bio/bio.h Thu Jul 9 17:17:22 2015 (r285330) @@ -290,7 +290,7 @@ void BIO_clear_flags(BIO *b, int flags); * BIO_CB_RETURN flag indicates if it is after the call */ # define BIO_CB_RETURN 0x80 -# define BIO_CB_return(a) ((a)|BIO_CB_RETURN)) +# define BIO_CB_return(a) ((a)|BIO_CB_RETURN) # define BIO_cb_pre(a) (!((a)&BIO_CB_RETURN)) # define BIO_cb_post(a) ((a)&BIO_CB_RETURN) Modified: stable/10/crypto/openssl/crypto/evp/e_aes.c ============================================================================== --- stable/10/crypto/openssl/crypto/evp/e_aes.c Thu Jul 9 17:07:45 2015 (r285329) +++ stable/10/crypto/openssl/crypto/evp/e_aes.c Thu Jul 9 17:17:22 2015 (r285330) @@ -1146,7 +1146,7 @@ static int aes_ccm_ctrl(EVP_CIPHER_CTX * case EVP_CTRL_CCM_SET_TAG: if ((arg & 1) || arg < 4 || arg > 16) return 0; - if ((c->encrypt && ptr) || (!c->encrypt && !ptr)) + if (c->encrypt && ptr) return 0; if (ptr) { cctx->tag_set = 1; Modified: stable/10/crypto/openssl/crypto/opensslconf.h ============================================================================== --- stable/10/crypto/openssl/crypto/opensslconf.h Thu Jul 9 17:07:45 2015 (r285329) +++ stable/10/crypto/openssl/crypto/opensslconf.h Thu Jul 9 17:17:22 2015 (r285330) @@ -185,7 +185,7 @@ extern "C" { #endif #if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! +#error YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! #endif /* Unroll the inner loop, this sometimes helps, sometimes hinders. Modified: stable/10/crypto/openssl/crypto/opensslconf.h.in ============================================================================== --- stable/10/crypto/openssl/crypto/opensslconf.h.in Thu Jul 9 17:07:45 2015 (r285329) +++ stable/10/crypto/openssl/crypto/opensslconf.h.in Thu Jul 9 17:17:22 2015 (r285330) @@ -101,7 +101,7 @@ #endif #if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! +#error YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! #endif /* Unroll the inner loop, this sometimes helps, sometimes hinders. Modified: stable/10/crypto/openssl/crypto/opensslv.h ============================================================================== --- stable/10/crypto/openssl/crypto/opensslv.h Thu Jul 9 17:07:45 2015 (r285329) +++ stable/10/crypto/openssl/crypto/opensslv.h Thu Jul 9 17:17:22 2015 (r285330) @@ -30,11 +30,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x100010ffL +# define OPENSSL_VERSION_NUMBER 0x1000110fL # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1o-fips 12 Jun 2015" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1p-fips 9 Jul 2015" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1o-freebsd 12 Jun 2015" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1p-freebsd 9 Jul 2015" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: stable/10/crypto/openssl/crypto/pkcs12/p12_kiss.c ============================================================================== --- stable/10/crypto/openssl/crypto/pkcs12/p12_kiss.c Thu Jul 9 17:07:45 2015 (r285329) +++ stable/10/crypto/openssl/crypto/pkcs12/p12_kiss.c Thu Jul 9 17:17:22 2015 (r285330) @@ -135,10 +135,12 @@ int PKCS12_parse(PKCS12 *p12, const char while ((x = sk_X509_pop(ocerts))) { if (pkey && *pkey && cert && !*cert) { + ERR_set_mark(); if (X509_check_private_key(x, *pkey)) { *cert = x; x = NULL; } + ERR_pop_to_mark(); } if (ca && x) { Modified: stable/10/crypto/openssl/crypto/threads/mttest.c ============================================================================== --- stable/10/crypto/openssl/crypto/threads/mttest.c Thu Jul 9 17:07:45 2015 (r285329) +++ stable/10/crypto/openssl/crypto/threads/mttest.c Thu Jul 9 17:17:22 2015 (r285330) @@ -56,7 +56,6 @@ * [including the GNU Public Licence.] */ -#include #include #include #include @@ -86,17 +85,11 @@ #include #include #include -#include "../../e_os.h" #include #include #include #include -#ifdef OPENSSL_NO_FP_API -# define APPS_WIN16 -# include "../buffer/bss_file.c" -#endif - #ifdef OPENSSL_SYS_NETWARE # define TEST_SERVER_CERT "/openssl/apps/server.pem" # define TEST_CLIENT_CERT "/openssl/apps/client.pem" @@ -107,23 +100,23 @@ #define MAX_THREAD_NUMBER 100 -int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *xs); +int verify_callback(int ok, X509_STORE_CTX *xs); void thread_setup(void); void thread_cleanup(void); void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx); -void irix_locking_callback(int mode, int type, char *file, int line); -void solaris_locking_callback(int mode, int type, char *file, int line); -void win32_locking_callback(int mode, int type, char *file, int line); -void pthreads_locking_callback(int mode, int type, char *file, int line); -void netware_locking_callback(int mode, int type, char *file, int line); +void irix_locking_callback(int mode, int type, const char *file, int line); +void solaris_locking_callback(int mode, int type, const char *file, int line); +void win32_locking_callback(int mode, int type, const char *file, int line); +void pthreads_locking_callback(int mode, int type, const char *file, int line); +void netware_locking_callback(int mode, int type, const char *file, int line); void beos_locking_callback(int mode, int type, const char *file, int line); -unsigned long irix_thread_id(void); -unsigned long solaris_thread_id(void); -unsigned long pthreads_thread_id(void); -unsigned long netware_thread_id(void); -unsigned long beos_thread_id(void); +void irix_thread_id(CRYPTO_THREADID *tid); +void solaris_thread_id(CRYPTO_THREADID *tid); +void pthreads_thread_id(CRYPTO_THREADID *tid); +void netware_thread_id(CRYPTO_THREADID *tid); +void beos_thread_id(CRYPTO_THREADID *tid); #if defined(OPENSSL_SYS_NETWARE) static MPKMutex *lock_cs; @@ -149,39 +142,39 @@ static const char rnd_seed[] = "string to make the random number generator think it has entropy"; int doit(char *ctx[4]); -static void print_stats(FILE *fp, SSL_CTX *ctx) +static void print_stats(BIO *bio, SSL_CTX *ctx) { - fprintf(fp, "%4ld items in the session cache\n", - SSL_CTX_sess_number(ctx)); - fprintf(fp, "%4d client connects (SSL_connect())\n", - SSL_CTX_sess_connect(ctx)); - fprintf(fp, "%4d client connects that finished\n", - SSL_CTX_sess_connect_good(ctx)); - fprintf(fp, "%4d server connects (SSL_accept())\n", - SSL_CTX_sess_accept(ctx)); - fprintf(fp, "%4d server connects that finished\n", - SSL_CTX_sess_accept_good(ctx)); - fprintf(fp, "%4d session cache hits\n", SSL_CTX_sess_hits(ctx)); - fprintf(fp, "%4d session cache misses\n", SSL_CTX_sess_misses(ctx)); - fprintf(fp, "%4d session cache timeouts\n", SSL_CTX_sess_timeouts(ctx)); + BIO_printf(bio, "%4ld items in the session cache\n", + SSL_CTX_sess_number(ctx)); + BIO_printf(bio, "%4d client connects (SSL_connect())\n", + SSL_CTX_sess_connect(ctx)); + BIO_printf(bio, "%4d client connects that finished\n", + SSL_CTX_sess_connect_good(ctx)); + BIO_printf(bio, "%4d server connects (SSL_accept())\n", + SSL_CTX_sess_accept(ctx)); + BIO_printf(bio, "%4d server connects that finished\n", + SSL_CTX_sess_accept_good(ctx)); + BIO_printf(bio, "%4d session cache hits\n", SSL_CTX_sess_hits(ctx)); + BIO_printf(bio, "%4d session cache misses\n", SSL_CTX_sess_misses(ctx)); + BIO_printf(bio, "%4d session cache timeouts\n", SSL_CTX_sess_timeouts(ctx)); } static void sv_usage(void) { - fprintf(stderr, "usage: ssltest [args ...]\n"); - fprintf(stderr, "\n"); - fprintf(stderr, " -server_auth - check server certificate\n"); - fprintf(stderr, " -client_auth - do client authentication\n"); - fprintf(stderr, " -v - more output\n"); - fprintf(stderr, " -CApath arg - PEM format directory of CA's\n"); - fprintf(stderr, " -CAfile arg - PEM format file of CA's\n"); - fprintf(stderr, " -threads arg - number of threads\n"); - fprintf(stderr, " -loops arg - number of 'connections', per thread\n"); - fprintf(stderr, " -reconnect - reuse session-id's\n"); - fprintf(stderr, " -stats - server session-id cache stats\n"); - fprintf(stderr, " -cert arg - server certificate/key\n"); - fprintf(stderr, " -ccert arg - client certificate/key\n"); - fprintf(stderr, " -ssl3 - just SSLv3n\n"); + BIO_printf(bio_err, "usage: ssltest [args ...]\n"); + BIO_printf(bio_err, "\n"); + BIO_printf(bio_err, " -server_auth - check server certificate\n"); + BIO_printf(bio_err, " -client_auth - do client authentication\n"); + BIO_printf(bio_err, " -v - more output\n"); + BIO_printf(bio_err, " -CApath arg - PEM format directory of CA's\n"); + BIO_printf(bio_err, " -CAfile arg - PEM format file of CA's\n"); + BIO_printf(bio_err, " -threads arg - number of threads\n"); + BIO_printf(bio_err, " -loops arg - number of 'connections', per thread\n"); + BIO_printf(bio_err, " -reconnect - reuse session-id's\n"); + BIO_printf(bio_err, " -stats - server session-id cache stats\n"); + BIO_printf(bio_err, " -cert arg - server certificate/key\n"); + BIO_printf(bio_err, " -ccert arg - client certificate/key\n"); + BIO_printf(bio_err, " -ssl3 - just SSLv3n\n"); } int main(int argc, char *argv[]) @@ -195,14 +188,14 @@ int main(int argc, char *argv[]) SSL_CTX *c_ctx = NULL; char *scert = TEST_SERVER_CERT; char *ccert = TEST_CLIENT_CERT; - SSL_METHOD *ssl_method = SSLv23_method(); + const SSL_METHOD *ssl_method = SSLv23_method(); RAND_seed(rnd_seed, sizeof rnd_seed); if (bio_err == NULL) - bio_err = BIO_new_fp(stderr, BIO_NOCLOSE); + bio_err = BIO_new_fd(2, BIO_NOCLOSE); if (bio_stdout == NULL) - bio_stdout = BIO_new_fp(stdout, BIO_NOCLOSE); + bio_stdout = BIO_new_fd(1, BIO_NOCLOSE); argc--; argv++; @@ -250,7 +243,7 @@ int main(int argc, char *argv[]) if (number_of_loops == 0) number_of_loops = 1; } else { - fprintf(stderr, "unknown option %s\n", *argv); + BIO_printf(bio_err, "unknown option %s\n", *argv); badop = 1; break; } @@ -284,9 +277,12 @@ int main(int argc, char *argv[]) SSL_SESS_CACHE_SERVER); if (!SSL_CTX_use_certificate_file(s_ctx, scert, SSL_FILETYPE_PEM)) { + BIO_printf(bio_err, "SSL_CTX_use_certificate_file (%s)\n", scert); ERR_print_errors(bio_err); + goto end; } else if (!SSL_CTX_use_RSAPrivateKey_file(s_ctx, scert, SSL_FILETYPE_PEM)) { + BIO_printf(bio_err, "SSL_CTX_use_RSAPrivateKey_file (%s)\n", scert); ERR_print_errors(bio_err); goto end; } @@ -300,19 +296,19 @@ int main(int argc, char *argv[]) (!SSL_CTX_set_default_verify_paths(s_ctx)) || (!SSL_CTX_load_verify_locations(c_ctx, CAfile, CApath)) || (!SSL_CTX_set_default_verify_paths(c_ctx))) { - fprintf(stderr, "SSL_load_verify_locations\n"); + BIO_printf(bio_err, "SSL_load_verify_locations\n"); ERR_print_errors(bio_err); goto end; } if (client_auth) { - fprintf(stderr, "client authentication\n"); + BIO_printf(bio_err, "client authentication\n"); SSL_CTX_set_verify(s_ctx, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, verify_callback); } if (server_auth) { - fprintf(stderr, "server authentication\n"); + BIO_printf(bio_err, "server authentication\n"); SSL_CTX_set_verify(c_ctx, SSL_VERIFY_PEER, verify_callback); } @@ -322,24 +318,24 @@ int main(int argc, char *argv[]) end: if (c_ctx != NULL) { - fprintf(stderr, "Client SSL_CTX stats then free it\n"); - print_stats(stderr, c_ctx); + BIO_printf(bio_err, "Client SSL_CTX stats then free it\n"); + print_stats(bio_err, c_ctx); SSL_CTX_free(c_ctx); } if (s_ctx != NULL) { - fprintf(stderr, "Server SSL_CTX stats then free it\n"); - print_stats(stderr, s_ctx); + BIO_printf(bio_err, "Server SSL_CTX stats then free it\n"); + print_stats(bio_err, s_ctx); if (cache_stats) { - fprintf(stderr, "-----\n"); - lh_stats(SSL_CTX_sessions(s_ctx), stderr); - fprintf(stderr, "-----\n"); - /*- lh_node_stats(SSL_CTX_sessions(s_ctx),stderr); - fprintf(stderr,"-----\n"); */ - lh_node_usage_stats(SSL_CTX_sessions(s_ctx), stderr); - fprintf(stderr, "-----\n"); + BIO_printf(bio_err, "-----\n"); + lh_SSL_SESSION_stats_bio(SSL_CTX_sessions(s_ctx), bio_err); + BIO_printf(bio_err, "-----\n"); + /*- lh_SSL_SESSION_node_stats_bio(SSL_CTX_sessions(s_ctx),bio_err); + BIO_printf(bio_err,"-----\n"); */ + lh_SSL_SESSION_node_usage_stats_bio(SSL_CTX_sessions(s_ctx), bio_err); + BIO_printf(bio_err, "-----\n"); } SSL_CTX_free(s_ctx); - fprintf(stderr, "done free\n"); + BIO_printf(bio_err, "done free\n"); } exit(ret); return (0); @@ -355,6 +351,7 @@ int ndoit(SSL_CTX *ssl_ctx[2]) int i; int ret; char *ctx[4]; + CRYPTO_THREADID thread_id; ctx[0] = (char *)ssl_ctx[0]; ctx[1] = (char *)ssl_ctx[1]; @@ -367,22 +364,24 @@ int ndoit(SSL_CTX *ssl_ctx[2]) ctx[3] = NULL; } - fprintf(stdout, "started thread %lu\n", CRYPTO_thread_id()); + CRYPTO_THREADID_current(&thread_id); + BIO_printf(bio_stdout, "started thread %lu\n", + CRYPTO_THREADID_hash(&thread_id)); for (i = 0; i < number_of_loops; i++) { -/*- fprintf(stderr,"%4d %2d ctx->ref (%3d,%3d)\n", - CRYPTO_thread_id(),i, - ssl_ctx[0]->references, - ssl_ctx[1]->references); */ +/*- BIO_printf(bio_err,"%4d %2d ctx->ref (%3d,%3d)\n", + CRYPTO_THREADID_hash(&thread_id),i, + ssl_ctx[0]->references, + ssl_ctx[1]->references); */ /* pthread_delay_np(&tm); */ ret = doit(ctx); if (ret != 0) { - fprintf(stdout, "error[%d] %lu - %d\n", - i, CRYPTO_thread_id(), ret); + BIO_printf(bio_stdout, "error[%d] %lu - %d\n", + i, CRYPTO_THREADID_hash(&thread_id), ret); return (ret); } } - fprintf(stdout, "DONE %lu\n", CRYPTO_thread_id()); + BIO_printf(bio_stdout, "DONE %lu\n", CRYPTO_THREADID_hash(&thread_id)); if (reconnect) { SSL_free((SSL *)ctx[2]); SSL_free((SSL *)ctx[3]); @@ -467,26 +466,26 @@ int doit(char *ctx[4]) if (do_server && verbose) { if (SSL_in_init(s_ssl)) - printf("server waiting in SSL_accept - %s\n", - SSL_state_string_long(s_ssl)); + BIO_printf(bio_stdout, "server waiting in SSL_accept - %s\n", + SSL_state_string_long(s_ssl)); else if (s_write) - printf("server:SSL_write()\n"); + BIO_printf(bio_stdout, "server:SSL_write()\n"); else - printf("server:SSL_read()\n"); + BIO_printf(bio_stdout, "server:SSL_read()\n"); } if (do_client && verbose) { if (SSL_in_init(c_ssl)) - printf("client waiting in SSL_connect - %s\n", - SSL_state_string_long(c_ssl)); + BIO_printf(bio_stdout, "client waiting in SSL_connect - %s\n", + SSL_state_string_long(c_ssl)); else if (c_write) - printf("client:SSL_write()\n"); + BIO_printf(bio_stdout, "client:SSL_write()\n"); else - printf("client:SSL_read()\n"); + BIO_printf(bio_stdout, "client:SSL_read()\n"); } if (!do_client && !do_server) { - fprintf(stdout, "ERROR IN STARTUP\n"); + BIO_printf(bio_stdout, "ERROR IN STARTUP\n"); break; } if (do_client && !(done & C_DONE)) { @@ -501,12 +500,12 @@ int doit(char *ctx[4]) if (BIO_should_write(c_bio)) c_w = 1; } else { - fprintf(stderr, "ERROR in CLIENT\n"); + BIO_printf(bio_err, "ERROR in CLIENT\n"); ERR_print_errors_fp(stderr); return (1); } } else if (i == 0) { - fprintf(stderr, "SSL CLIENT STARTUP FAILED\n"); + BIO_printf(bio_err, "SSL CLIENT STARTUP FAILED\n"); return (1); } else { /* ok */ @@ -523,19 +522,19 @@ int doit(char *ctx[4]) if (BIO_should_write(c_bio)) c_w = 1; } else { - fprintf(stderr, "ERROR in CLIENT\n"); + BIO_printf(bio_err, "ERROR in CLIENT\n"); ERR_print_errors_fp(stderr); return (1); } } else if (i == 0) { - fprintf(stderr, "SSL CLIENT STARTUP FAILED\n"); + BIO_printf(bio_err, "SSL CLIENT STARTUP FAILED\n"); return (1); } else { done |= C_DONE; #ifdef undef - fprintf(stdout, "CLIENT:from server:"); - fwrite(cbuf, 1, i, stdout); - fflush(stdout); + BIO_printf(bio_stdout, "CLIENT:from server:"); + BIO_write(bio_stdout, cbuf, i); + BIO_flush(bio_stdout); #endif } } @@ -553,20 +552,20 @@ int doit(char *ctx[4]) if (BIO_should_write(s_bio)) s_w = 1; } else { - fprintf(stderr, "ERROR in SERVER\n"); + BIO_printf(bio_err, "ERROR in SERVER\n"); ERR_print_errors_fp(stderr); return (1); } } else if (i == 0) { - fprintf(stderr, "SSL SERVER STARTUP FAILED\n"); + BIO_printf(bio_err, "SSL SERVER STARTUP FAILED\n"); return (1); } else { s_write = 1; s_w = 1; #ifdef undef - fprintf(stdout, "SERVER:from client:"); - fwrite(sbuf, 1, i, stdout); - fflush(stdout); + BIO_printf(bio_stdout, "SERVER:from client:"); + BIO_write(bio_stdout, sbuf, i); + BIO_flush(bio_stdout); #endif } } else { @@ -580,12 +579,12 @@ int doit(char *ctx[4]) if (BIO_should_write(s_bio)) s_w = 1; } else { - fprintf(stderr, "ERROR in SERVER\n"); + BIO_printf(bio_err, "ERROR in SERVER\n"); ERR_print_errors_fp(stderr); return (1); } } else if (i == 0) { - fprintf(stderr, "SSL SERVER STARTUP FAILED\n"); + BIO_printf(bio_err, "SSL SERVER STARTUP FAILED\n"); return (1); } else { s_write = 0; @@ -606,7 +605,7 @@ int doit(char *ctx[4]) SSL_set_shutdown(s_ssl, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); #ifdef undef - fprintf(stdout, "DONE\n"); + BIO_printf(bio_stdout, "DONE\n"); #endif err: /* @@ -640,7 +639,7 @@ int doit(char *ctx[4]) return (0); } -int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx) +int verify_callback(int ok, X509_STORE_CTX *ctx) { char *s, buf[256]; @@ -649,9 +648,9 @@ int MS_CALLBACK verify_callback(int ok, buf, 256); if (s != NULL) { if (ok) - fprintf(stderr, "depth=%d %s\n", ctx->error_depth, buf); + BIO_printf(bio_err, "depth=%d %s\n", ctx->error_depth, buf); else - fprintf(stderr, "depth=%d error=%d %s\n", + BIO_printf(bio_err, "depth=%d error=%d %s\n", ctx->error_depth, ctx->error, buf); } } @@ -688,7 +687,7 @@ void thread_cleanup(void) OPENSSL_free(lock_cs); } -void win32_locking_callback(int mode, int type, char *file, int line) +void win32_locking_callback(int mode, int type, const char *file, int line) { if (mode & CRYPTO_LOCK) { WaitForSingleObject(lock_cs[type], INFINITE); @@ -717,7 +716,7 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX (void *)ssl_ctx, 0L, &(thread_id[i])); } - printf("reaping\n"); + BIO_printf(bio_stdout, "reaping\n"); for (i = 0; i < thread_number; i += 50) { int j; @@ -727,7 +726,7 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX (CONST HANDLE *) & (thread_handle[i]), TRUE, INFINITE) == WAIT_FAILED) { - fprintf(stderr, "WaitForMultipleObjects failed:%d\n", + BIO_printf(bio_err, "WaitForMultipleObjects failed:%d\n", GetLastError()); exit(1); } @@ -743,7 +742,7 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX ret = (ret + end.wSecond - start.wSecond); ret += (end.wMilliseconds - start.wMilliseconds) / 1000.0; - printf("win32 threads done - %.3f seconds\n", ret); + BIO_printf(bio_stdout, "win32 threads done - %.3f seconds\n", ret); } #endif /* OPENSSL_SYS_WIN32 */ @@ -768,8 +767,8 @@ void thread_setup(void) mutex_init(&(lock_cs[i]), USYNC_THREAD, NULL); } - CRYPTO_set_id_callback((unsigned long (*)())solaris_thread_id); - CRYPTO_set_locking_callback((void (*)())solaris_locking_callback); + CRYPTO_set_id_callback(solaris_thread_id); + CRYPTO_set_locking_callback(solaris_locking_callback); } void thread_cleanup(void) @@ -778,34 +777,34 @@ void thread_cleanup(void) CRYPTO_set_locking_callback(NULL); - fprintf(stderr, "cleanup\n"); + BIO_printf(bio_err, "cleanup\n"); for (i = 0; i < CRYPTO_num_locks(); i++) { /* rwlock_destroy(&(lock_cs[i])); */ mutex_destroy(&(lock_cs[i])); - fprintf(stderr, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); + BIO_printf(bio_err, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); } OPENSSL_free(lock_cs); OPENSSL_free(lock_count); - fprintf(stderr, "done cleanup\n"); + BIO_printf(bio_err, "done cleanup\n"); } -void solaris_locking_callback(int mode, int type, char *file, int line) +void solaris_locking_callback(int mode, int type, const char *file, int line) { # ifdef undef - fprintf(stderr, "thread=%4d mode=%s lock=%s %s:%d\n", - CRYPTO_thread_id(), - (mode & CRYPTO_LOCK) ? "l" : "u", - (type & CRYPTO_READ) ? "r" : "w", file, line); + BIO_printf(bio_err, "thread=%4d mode=%s lock=%s %s:%d\n", + CRYPTO_thread_id(), + (mode & CRYPTO_LOCK) ? "l" : "u", + (type & CRYPTO_READ) ? "r" : "w", file, line); # endif /*- if (CRYPTO_LOCK_SSL_CERT == type) - fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", - CRYPTO_thread_id(), - mode,file,line); + BIO_printf(bio_err,"(t,m,f,l) %ld %d %s %d\n", + CRYPTO_thread_id(), + mode,file,line); */ if (mode & CRYPTO_LOCK) { /*- @@ -837,21 +836,22 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX (void *(*)())ndoit, (void *)ssl_ctx, 0L, &(thread_ctx[i])); } - printf("reaping\n"); + BIO_printf(bio_stdout, "reaping\n"); for (i = 0; i < thread_number; i++) { thr_join(thread_ctx[i], NULL, NULL); } - printf("solaris threads done (%d,%d)\n", - s_ctx->references, c_ctx->references); +#if 0 /* We can't currently find out the reference amount */ + BIO_printf(bio_stdout, "solaris threads done (%d,%d)\n", + s_ctx->references, c_ctx->references); +#else + BIO_printf(bio_stdout, "solaris threads done\n"); +#endif } -unsigned long solaris_thread_id(void) +void solaris_thread_id(CRYPTO_THREADID *tid) { - unsigned long ret; - - ret = (unsigned long)thr_self(); - return (ret); + CRYPTO_THREADID_set_numeric((unsigned long)thr_self()); } #endif /* SOLARIS */ @@ -880,8 +880,8 @@ void thread_setup(void) lock_cs[i] = usnewsema(arena, 1); } - CRYPTO_set_id_callback((unsigned long (*)())irix_thread_id); - CRYPTO_set_locking_callback((void (*)())irix_locking_callback); + CRYPTO_set_id_callback(irix_thread_id); + CRYPTO_set_locking_callback(irix_locking_callback); } void thread_cleanup(void) @@ -899,13 +899,13 @@ void thread_cleanup(void) OPENSSL_free(lock_cs); } -void irix_locking_callback(int mode, int type, char *file, int line) +void irix_locking_callback(int mode, int type, const char *file, int line) { if (mode & CRYPTO_LOCK) { - printf("lock %d\n", type); + BIO_printf(bio_stdout, "lock %d\n", type); uspsema(lock_cs[type]); } else { - printf("unlock %d\n", type); + BIO_printf(bio_stdout, "unlock %d\n", type); usvsema(lock_cs[type]); } } @@ -924,21 +924,22 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX PR_SADDR | PR_SFDS, (void *)ssl_ctx); } - printf("reaping\n"); + BIO_printf(bio_stdout, "reaping\n"); for (i = 0; i < thread_number; i++) { wait(NULL); } - printf("irix threads done (%d,%d)\n", - s_ctx->references, c_ctx->references); +#if 0 /* We can't currently find out the reference amount */ + BIO_printf(bio_stdout, "irix threads done (%d,%d)\n", + s_ctx->references, c_ctx->references); +#else + BIO_printf(bio_stdout, "irix threads done\n"); +#endif } unsigned long irix_thread_id(void) { - unsigned long ret; - - ret = (unsigned long)getpid(); - return (ret); + CRYPTO_THREADID_set_numeric((unsigned long)getpid()); } #endif /* IRIX */ @@ -958,8 +959,8 @@ void thread_setup(void) pthread_mutex_init(&(lock_cs[i]), NULL); } - CRYPTO_set_id_callback((unsigned long (*)())pthreads_thread_id); - CRYPTO_set_locking_callback((void (*)())pthreads_locking_callback); + CRYPTO_THREADID_set_callback(pthreads_thread_id); + CRYPTO_set_locking_callback(pthreads_locking_callback); } void thread_cleanup(void) @@ -967,30 +968,30 @@ void thread_cleanup(void) int i; CRYPTO_set_locking_callback(NULL); - fprintf(stderr, "cleanup\n"); + BIO_printf(bio_err, "cleanup\n"); for (i = 0; i < CRYPTO_num_locks(); i++) { pthread_mutex_destroy(&(lock_cs[i])); - fprintf(stderr, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); + BIO_printf(bio_err, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); } OPENSSL_free(lock_cs); OPENSSL_free(lock_count); - fprintf(stderr, "done cleanup\n"); + BIO_printf(bio_err, "done cleanup\n"); } -void pthreads_locking_callback(int mode, int type, char *file, int line) +void pthreads_locking_callback(int mode, int type, const char *file, int line) { # ifdef undef - fprintf(stderr, "thread=%4d mode=%s lock=%s %s:%d\n", - CRYPTO_thread_id(), - (mode & CRYPTO_LOCK) ? "l" : "u", - (type & CRYPTO_READ) ? "r" : "w", file, line); + BIO_printf(bio_err, "thread=%4d mode=%s lock=%s %s:%d\n", + CRYPTO_thread_id(), + (mode & CRYPTO_LOCK) ? "l" : "u", + (type & CRYPTO_READ) ? "r" : "w", file, line); # endif /*- if (CRYPTO_LOCK_SSL_CERT == type) - fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", - CRYPTO_thread_id(), - mode,file,line); + BIO_printf(bio_err,"(t,m,f,l) %ld %d %s %d\n", + CRYPTO_thread_id(), + mode,file,line); */ if (mode & CRYPTO_LOCK) { pthread_mutex_lock(&(lock_cs[type])); @@ -1017,21 +1018,22 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX (void *(*)())ndoit, (void *)ssl_ctx); } - printf("reaping\n"); + BIO_printf(bio_stdout, "reaping\n"); for (i = 0; i < thread_number; i++) { pthread_join(thread_ctx[i], NULL); } - printf("pthreads threads done (%d,%d)\n", - s_ctx->references, c_ctx->references); +#if 0 /* We can't currently find out the reference amount */ + BIO_printf(bio_stdout, "pthreads threads done (%d,%d)\n", + s_ctx->references, c_ctx->references); +#else + BIO_printf(bio_stdout, "pthreads threads done\n"); +#endif } -unsigned long pthreads_thread_id(void) +void pthreads_thread_id(CRYPTO_THREADID *tid) { - unsigned long ret; - - ret = (unsigned long)pthread_self(); - return (ret); + CRYPTO_THREADID_set_numeric(tid, (unsigned long)pthread_self()); } #endif /* PTHREADS */ @@ -1051,8 +1053,8 @@ void thread_setup(void) ThreadSem = MPKSemaphoreAlloc("OpenSSL mttest semaphore", 0); - CRYPTO_set_id_callback((unsigned long (*)())netware_thread_id); - CRYPTO_set_locking_callback((void (*)())netware_locking_callback); + CRYPTO_set_id_callback(netware_thread_id); + CRYPTO_set_locking_callback(netware_locking_callback); } void thread_cleanup(void) @@ -1061,21 +1063,21 @@ void thread_cleanup(void) CRYPTO_set_locking_callback(NULL); - fprintf(stdout, "thread_cleanup\n"); + BIO_printf(bio_stdout, "thread_cleanup\n"); for (i = 0; i < CRYPTO_num_locks(); i++) { MPKMutexFree(lock_cs[i]); - fprintf(stdout, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); + BIO_printf(bio_stdout, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); } OPENSSL_free(lock_cs); OPENSSL_free(lock_count); MPKSemaphoreFree(ThreadSem); - fprintf(stdout, "done cleanup\n"); + BIO_printf(bio_stdout, "done cleanup\n"); } -void netware_locking_callback(int mode, int type, char *file, int line) +void netware_locking_callback(int mode, int type, const char *file, int line) { if (mode & CRYPTO_LOCK) { MPKMutexLock(lock_cs[type]); @@ -1097,22 +1099,23 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX ThreadSwitchWithDelay(); } - printf("reaping\n"); + BIO_printf(bio_stdout, "reaping\n"); /* loop until all threads have signaled the semaphore */ for (i = 0; i < thread_number; i++) { MPKSemaphoreWait(ThreadSem); } - printf("netware threads done (%d,%d)\n", - s_ctx->references, c_ctx->references); +#if 0 /* We can't currently find out the reference amount */ + BIO_printf(bio_stdout, "netware threads done (%d,%d)\n", + s_ctx->references, c_ctx->references); +#else + BIO_printf(bio_stdout, "netware threads done\n"); +#endif } unsigned long netware_thread_id(void) { - unsigned long ret; - - ret = (unsigned long)GetThreadID(); - return (ret); + CRYPTO_THREADID_set_numeric((unsigned long)GetThreadID()); } #endif /* NETWARE */ @@ -1144,24 +1147,24 @@ void thread_cleanup(void) int i; CRYPTO_set_locking_callback(NULL); - fprintf(stderr, "cleanup\n"); + BIO_printf(bio_err, "cleanup\n"); for (i = 0; i < CRYPTO_num_locks(); i++) { delete lock_cs[i]; - fprintf(stderr, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); + BIO_printf(bio_err, "%8ld:%s\n", lock_count[i], CRYPTO_get_lock_name(i)); } OPENSSL_free(lock_cs); OPENSSL_free(lock_count); - fprintf(stderr, "done cleanup\n"); + BIO_printf(bio_err, "done cleanup\n"); } void beos_locking_callback(int mode, int type, const char *file, int line) { # if 0 - fprintf(stderr, "thread=%4d mode=%s lock=%s %s:%d\n", - CRYPTO_thread_id(), - (mode & CRYPTO_LOCK) ? "l" : "u", - (type & CRYPTO_READ) ? "r" : "w", file, line); + BIO_printf(bio_err, "thread=%4d mode=%s lock=%s %s:%d\n", + CRYPTO_thread_id(), + (mode & CRYPTO_LOCK) ? "l" : "u", + (type & CRYPTO_READ) ? "r" : "w", file, line); # endif if (mode & CRYPTO_LOCK) { lock_cs[type]->Lock(); @@ -1187,14 +1190,14 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX resume_thread(thread_ctx[i]); } - printf("waiting...\n"); + BIO_printf(bio_stdout, "waiting...\n"); for (i = 0; i < thread_number; i++) { status_t result; wait_for_thread(thread_ctx[i], &result); } - printf("beos threads done (%d,%d)\n", - s_ctx->references, c_ctx->references); + BIO_printf(bio_stdout, "beos threads done (%d,%d)\n", + s_ctx->references, c_ctx->references); } unsigned long beos_thread_id(void) Modified: stable/10/crypto/openssl/crypto/threads/pthread2.sh ============================================================================== --- stable/10/crypto/openssl/crypto/threads/pthread2.sh Thu Jul 9 17:07:45 2015 (r285329) +++ stable/10/crypto/openssl/crypto/threads/pthread2.sh Thu Jul 9 17:17:22 2015 (r285330) @@ -3,5 +3,4 @@ # build using pthreads where it's already built into the system *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jul 9 17:17:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7986F997967; Thu, 9 Jul 2015 17:17:27 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 4EDCC19A5; Thu, 9 Jul 2015 17:17:27 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69HHRGs066586; Thu, 9 Jul 2015 17:17:27 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69HHRQj066585; Thu, 9 Jul 2015 17:17:27 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201507091717.t69HHRQj066585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 9 Jul 2015 17:17:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285331 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 17:17:27 -0000 Author: mjg Date: Thu Jul 9 17:17:26 2015 New Revision: 285331 URL: https://svnweb.freebsd.org/changeset/base/285331 Log: vfs: cosmetic changes to namei and namei_handle_root - don't initialize cnp during declaration - don't test error/!error, compare to 0 instead Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Thu Jul 9 17:17:22 2015 (r285330) +++ head/sys/kern/vfs_lookup.c Thu Jul 9 17:17:26 2015 (r285331) @@ -112,8 +112,9 @@ namei_cleanup_cnp(struct componentname * static int namei_handle_root(struct nameidata *ndp, struct vnode **dpp) { - struct componentname *cnp = &ndp->ni_cnd; + struct componentname *cnp; + cnp = &ndp->ni_cnd; if (ndp->ni_strictrelative != 0) { #ifdef KTRACE if (KTRPOINT(curthread, KTR_CAPFAIL)) @@ -194,7 +195,7 @@ namei(struct nameidata *ndp) /* * Don't allow empty pathnames. */ - if (!error && *cnp->cn_pnbuf == '\0') + if (error == 0 && *cnp->cn_pnbuf == '\0') error = ENOENT; #ifdef CAPABILITY_MODE @@ -215,7 +216,7 @@ namei(struct nameidata *ndp) } } #endif - if (error) { + if (error != 0) { namei_cleanup_cnp(cnp); ndp->ni_vp = NULL; return (error); @@ -301,7 +302,7 @@ namei(struct nameidata *ndp) for (;;) { ndp->ni_startdir = dp; error = lookup(ndp); - if (error) { + if (error != 0) { vrele(ndp->ni_rootdir); namei_cleanup_cnp(cnp); SDT_PROBE(vfs, namei, lookup, return, error, NULL, 0, @@ -330,7 +331,7 @@ namei(struct nameidata *ndp) if ((cnp->cn_flags & NOMACCHECK) == 0) { error = mac_vnode_check_readlink(td->td_ucred, ndp->ni_vp); - if (error) + if (error != 0) break; } #endif @@ -348,7 +349,7 @@ namei(struct nameidata *ndp) auio.uio_td = td; auio.uio_resid = MAXPATHLEN; error = VOP_READLINK(ndp->ni_vp, &auio, cnp->cn_cred); - if (error) { + if (error != 0) { if (ndp->ni_pathlen > 1) uma_zfree(namei_zone, cp); break; From owner-svn-src-all@freebsd.org Thu Jul 9 17:24:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8343E997BDA; Thu, 9 Jul 2015 17:24:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 731BF11AB; Thu, 9 Jul 2015 17:24:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69HOtAU071339; Thu, 9 Jul 2015 17:24:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69HOtU2071338; Thu, 9 Jul 2015 17:24:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507091724.t69HOtU2071338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 9 Jul 2015 17:24:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285332 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 17:24:55 -0000 Author: gjb Date: Thu Jul 9 17:24:54 2015 New Revision: 285332 URL: https://svnweb.freebsd.org/changeset/base/285332 Log: Document r285329, OpenSSL update to 1.0.1p. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jul 9 17:17:26 2015 (r285331) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jul 9 17:24:54 2015 (r285332) @@ -468,9 +468,6 @@ bmake has been updated to version 20150606. - OpenSSL has - been updated to version 1.0.1o. - The &man.acpi.4; subsystem has been updated to version 20150515. @@ -492,6 +489,9 @@ old behavior, set the m4 option confUSE_COMPRESSED_IPV6_ADDRESSES or the cf option UseCompressedIPv6Addresses. + + OpenSSL has + been updated to version 1.0.1p. From owner-svn-src-all@freebsd.org Thu Jul 9 17:25:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42252997BFB; Thu, 9 Jul 2015 17:25:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 3107512D9; Thu, 9 Jul 2015 17:25:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69HP3Cn071443; Thu, 9 Jul 2015 17:25:03 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69HP37S071442; Thu, 9 Jul 2015 17:25:03 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507091725.t69HP37S071442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 9 Jul 2015 17:25:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285333 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 17:25:03 -0000 Author: gjb Date: Thu Jul 9 17:25:02 2015 New Revision: 285333 URL: https://svnweb.freebsd.org/changeset/base/285333 Log: Document r285330, OpenSSL update to 1.0.1p. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jul 9 17:24:54 2015 (r285332) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jul 9 17:25:02 2015 (r285333) @@ -234,9 +234,6 @@ &man.resolvconf.8; utility has been updated to version 3.7.0. - OpenSSL has - been updated to version 1.0.1o. - The &man.acpi.4; subsystem has been updated to version 20150515. @@ -248,6 +245,9 @@ The sendmail utility has been updated to version 8.15.2. + + OpenSSL has + been updated to version 1.0.1p. From owner-svn-src-all@freebsd.org Thu Jul 9 17:26:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE96B997C54; Thu, 9 Jul 2015 17:26:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 9EB9F15E2; Thu, 9 Jul 2015 17:26:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69HQvOh071766; Thu, 9 Jul 2015 17:26:57 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69HQvgx071765; Thu, 9 Jul 2015 17:26:57 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507091726.t69HQvgx071765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 9 Jul 2015 17:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285334 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 17:26:57 -0000 Author: andrew Date: Thu Jul 9 17:26:56 2015 New Revision: 285334 URL: https://svnweb.freebsd.org/changeset/base/285334 Log: Clear the carry bit on the saved program state register when asked to clear the return value, it's used to indicate an error. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/machdep.c Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Thu Jul 9 17:25:02 2015 (r285333) +++ head/sys/arm64/arm64/machdep.c Thu Jul 9 17:26:56 2015 (r285334) @@ -266,10 +266,13 @@ get_mcontext(struct thread *td, mcontext { struct trapframe *tf = td->td_frame; - if (clear_ret & GET_MC_CLEAR_RET) + if (clear_ret & GET_MC_CLEAR_RET) { mcp->mc_gpregs.gp_x[0] = 0; - else + mcp->mc_gpregs.gp_spsr = tf->tf_spsr & ~PSR_C; + } else { mcp->mc_gpregs.gp_x[0] = tf->tf_x[0]; + mcp->mc_gpregs.gp_spsr = tf->tf_spsr; + } memcpy(&mcp->mc_gpregs.gp_x[1], &tf->tf_x[1], sizeof(mcp->mc_gpregs.gp_x[1]) * (nitems(mcp->mc_gpregs.gp_x) - 1)); @@ -277,7 +280,6 @@ get_mcontext(struct thread *td, mcontext mcp->mc_gpregs.gp_sp = tf->tf_sp; mcp->mc_gpregs.gp_lr = tf->tf_lr; mcp->mc_gpregs.gp_elr = tf->tf_elr; - mcp->mc_gpregs.gp_spsr = tf->tf_spsr; return (0); } From owner-svn-src-all@freebsd.org Thu Jul 9 17:42:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D874997712 for ; Thu, 9 Jul 2015 17:42:39 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D03891D06 for ; Thu, 9 Jul 2015 17:42:38 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by oibp128 with SMTP id p128so33304758oib.3 for ; Thu, 09 Jul 2015 10:42:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=KdSOjLwiZDzmbgriu1DaD0ymRqgHrX40Lx0gkLuKq+Y=; b=ANYM7NVlozQSDZR11N+6DwdcfEL5nPbpd0stuwBUHm8excjIYbNnuc+u0mqWWMjIEn 5/bfjF0ymkyR9KCVGbAIt4BRUBFrc3auzym+i+TRi17QDOJVXlAQ4WPyuOGGI5qPBa+q DI2XOGZHx0yE3YARZmchbQQLySFNtlc1KOnWHKpPRnNbGKRIz/9fCK0XDfAwovErIYGI 2HMrifWVtVYIMnJAHj0cQP6I56kxL5UWsd9lU8bTxxYdYb7Xh7y+QVU/Tb26geqvG0CP xowxzmTnD4YvMjo3efw1dxAhfDvssLjXfeJA8NWL0FYiltvNpsWNQOwIbn5baPcBJYAJ E3vg== X-Gm-Message-State: ALoCoQklAfEJrW0+5YaBkfr6buEaBfmZKAUHU2vDJf106p4SMNJ0QEobUg6Ip9Z+ypr42qSHOH/w MIME-Version: 1.0 X-Received: by 10.182.148.65 with SMTP id tq1mr1670534obb.12.1436463439710; Thu, 09 Jul 2015 10:37:19 -0700 (PDT) Received: by 10.76.56.51 with HTTP; Thu, 9 Jul 2015 10:37:19 -0700 (PDT) X-Originating-IP: [84.27.222.46] In-Reply-To: References: <201507090720.t697KFKC064426@repo.freebsd.org> Date: Thu, 9 Jul 2015 19:37:19 +0200 Message-ID: Subject: Re: svn commit: r285307 - in head/sys: compat/cloudabi compat/cloudabi64 conf contrib/cloudabi kern From: Ed Schouten To: Adrian Chadd Cc: Ed Schouten , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 17:42:39 -0000 Hi Adrian, 2015-07-09 19:11 GMT+02:00 Adrian Chadd : > So this isn't at all included in a system by default? Or is it disable-able? > > All I see in options is COMPAT_CLOUDABI64. Even though a kernel configuration with COMPAT_CLOUDABI64 passes the build on all architectures right now, it doesn't do anything yet. Almost all of the system calls still need their implementations and I still haven't added the CPU-specific sysentvec (so that the kernel can actually load CloudABI executables and execute them). My plan was to send out a code review in the very nearby future to add the amd64-specific sysentvec and at the same time add it to sys/amd64/conf/NOTES, so that it is at least part of LINT builds. Around that time I'm also going to add kernel module Makefiles. To answer your question: it hasn't been added to any configuration file, so as long as you don't add COMPAT_CLOUDABI64 to your kernel configuration file explicitly, it won't get built. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK/VAT number: 62051717 From owner-svn-src-all@freebsd.org Thu Jul 9 17:45:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D21699977E5; Thu, 9 Jul 2015 17:45:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 C16E61F31; Thu, 9 Jul 2015 17:45:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69Hj9Eo081640; Thu, 9 Jul 2015 17:45:09 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69Hj9xB081639; Thu, 9 Jul 2015 17:45:09 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507091745.t69Hj9xB081639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 9 Jul 2015 17:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285335 - stable/10/release/doc/share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 17:45:09 -0000 Author: gjb Date: Thu Jul 9 17:45:08 2015 New Revision: 285335 URL: https://svnweb.freebsd.org/changeset/base/285335 Log: Document SA-15:12. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/security.xml Modified: stable/10/release/doc/share/xml/security.xml ============================================================================== --- stable/10/release/doc/share/xml/security.xml Thu Jul 9 17:26:56 2015 (r285334) +++ stable/10/release/doc/share/xml/security.xml Thu Jul 9 17:45:08 2015 (r285335) @@ -116,6 +116,15 @@ 16 June 2015 Multiple vulnerabilities + + + FreeBSD-SA-15:12.openssl + 9 July 2015 + OpenSSL alternate chains certificate forgery + vulnerability (Note: This does not affect + &os; 10.1-RELEASE) + From owner-svn-src-all@freebsd.org Thu Jul 9 18:16:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87DEA997ED1; Thu, 9 Jul 2015 18:16:37 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 76BD01498; Thu, 9 Jul 2015 18:16:37 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69IGbYf097296; Thu, 9 Jul 2015 18:16:37 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69IGawf097288; Thu, 9 Jul 2015 18:16:36 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201507091816.t69IGawf097288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Thu, 9 Jul 2015 18:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285336 - in head/sys: netipsec opencrypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 18:16:37 -0000 Author: gnn Date: Thu Jul 9 18:16:35 2015 New Revision: 285336 URL: https://svnweb.freebsd.org/changeset/base/285336 Log: Add support for AES modes to IPSec. These modes work both in software only mode and with hardware support on systems that have AESNI instructions. Differential Revision: D2936 Reviewed by: jmg, eri, cognet Sponsored by: Rubicon Communications (Netgate) Modified: head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/opencrypto/cryptodev.h head/sys/opencrypto/xform.c Modified: head/sys/netipsec/xform_ah.c ============================================================================== --- head/sys/netipsec/xform_ah.c Thu Jul 9 17:45:08 2015 (r285335) +++ head/sys/netipsec/xform_ah.c Thu Jul 9 18:16:35 2015 (r285336) @@ -82,11 +82,11 @@ (((sav)->flags & SADB_X_EXT_OLD) ? \ sizeof (struct ah) : sizeof (struct ah) + sizeof (u_int32_t)) /* - * Return authenticator size in bytes. The old protocol is known - * to use a fixed 16-byte authenticator. The new algorithm use 12-byte - * authenticator. + * Return authenticator size in bytes, based on a field in the + * algorithm descriptor. */ -#define AUTHSIZE(sav) ah_authsize(sav) +#define AUTHSIZE(sav) \ + ((sav->flags & SADB_X_EXT_OLD) ? 16 : (sav)->tdb_authalgxform->hashsize) VNET_DEFINE(int, ah_enable) = 1; /* control flow of packets with AH */ VNET_DEFINE(int, ah_cleartos) = 1; /* clear ip_tos when doing AH calc */ @@ -112,27 +112,6 @@ static unsigned char ipseczeroes[256]; / static int ah_input_cb(struct cryptop*); static int ah_output_cb(struct cryptop*); -static int -ah_authsize(struct secasvar *sav) -{ - - IPSEC_ASSERT(sav != NULL, ("%s: sav == NULL", __func__)); - - if (sav->flags & SADB_X_EXT_OLD) - return 16; - - switch (sav->alg_auth) { - case SADB_X_AALG_SHA2_256: - return 16; - case SADB_X_AALG_SHA2_384: - return 24; - case SADB_X_AALG_SHA2_512: - return 32; - default: - return AH_HMAC_HASHLEN; - } - /* NOTREACHED */ -} /* * NB: this is public for use by the PF_KEY support. */ @@ -160,6 +139,12 @@ ah_algorithm_lookup(int alg) return &auth_hash_hmac_sha2_384; case SADB_X_AALG_SHA2_512: return &auth_hash_hmac_sha2_512; + case SADB_X_AALG_AES128GMAC: + return &auth_hash_nist_gmac_aes_128; + case SADB_X_AALG_AES192GMAC: + return &auth_hash_nist_gmac_aes_192; + case SADB_X_AALG_AES256GMAC: + return &auth_hash_nist_gmac_aes_256; } return NULL; } Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Thu Jul 9 17:45:08 2015 (r285335) +++ head/sys/netipsec/xform_esp.c Thu Jul 9 18:16:35 2015 (r285336) @@ -121,6 +121,12 @@ esp_algorithm_lookup(int alg) return &enc_xform_null; case SADB_X_EALG_CAMELLIACBC: return &enc_xform_camellia; + case SADB_X_EALG_AESCTR: + return &enc_xform_aes_icm; + case SADB_X_EALG_AESGCM16: + return &enc_xform_aes_nist_gcm; + case SADB_X_EALG_AESGMAC: + return &enc_xform_aes_nist_gmac; } return NULL; } @@ -198,7 +204,7 @@ esp_init(struct secasvar *sav, struct xf * the ESP header will be processed incorrectly. The * compromise is to force it to zero here. */ - sav->ivlen = (txform == &enc_xform_null ? 0 : txform->blocksize); + sav->ivlen = (txform == &enc_xform_null ? 0 : txform->ivsize); sav->iv = (caddr_t) malloc(sav->ivlen, M_XDATA, M_WAITOK); key_randomfill(sav->iv, sav->ivlen); /*XXX*/ @@ -215,11 +221,45 @@ esp_init(struct secasvar *sav, struct xf sav->tdb_xform = xsp; sav->tdb_encalgxform = txform; + /* + * Whenever AES-GCM is used for encryption, one + * of the AES authentication algorithms is chosen + * as well, based on the key size. + */ + if (sav->alg_enc == SADB_X_EALG_AESGCM16) { + switch (keylen) { + case AES_128_HMAC_KEY_LEN: + sav->alg_auth = SADB_X_AALG_AES128GMAC; + sav->tdb_authalgxform = &auth_hash_nist_gmac_aes_128; + break; + case AES_192_HMAC_KEY_LEN: + sav->alg_auth = SADB_X_AALG_AES192GMAC; + sav->tdb_authalgxform = &auth_hash_nist_gmac_aes_192; + break; + case AES_256_HMAC_KEY_LEN: + sav->alg_auth = SADB_X_AALG_AES256GMAC; + sav->tdb_authalgxform = &auth_hash_nist_gmac_aes_256; + break; + default: + DPRINTF(("%s: invalid key length %u" + "for algorithm %s\n", __func__, + keylen, txform->name)); + return EINVAL; + } + bzero(&cria, sizeof(cria)); + cria.cri_alg = sav->tdb_authalgxform->type; + cria.cri_klen = _KEYBITS(sav->key_enc) + 4; + cria.cri_key = sav->key_enc->key_data; + } + /* Initialize crypto session. */ bzero(&crie, sizeof (crie)); crie.cri_alg = sav->tdb_encalgxform->type; crie.cri_klen = _KEYBITS(sav->key_enc); crie.cri_key = sav->key_enc->key_data; + if (sav->alg_enc == SADB_X_EALG_AESGCM16) + arc4rand(crie.cri_iv, sav->ivlen, 0); + /* XXX Rounds ? */ if (sav->tdb_authalgxform && sav->tdb_encalgxform) { @@ -289,7 +329,6 @@ esp_input(struct mbuf *m, struct secasva m_freem(m); return EINVAL; } - /* XXX don't pullup, just copy header */ IP6_EXTHDR_GET(esp, struct newesp *, m, skip, sizeof (struct newesp)); @@ -302,18 +341,7 @@ esp_input(struct mbuf *m, struct secasva else hlen = sizeof (struct newesp) + sav->ivlen; /* Authenticator hash size */ - if (esph != NULL) { - switch (esph->type) { - case CRYPTO_SHA2_256_HMAC: - case CRYPTO_SHA2_384_HMAC: - case CRYPTO_SHA2_512_HMAC: - alen = esph->hashsize/2; - break; - default: - alen = AH_HMAC_HASHLEN; - break; - } - } + alen = esph ? esph->hashsize : 0; /* * Verify payload length is multiple of encryption algorithm @@ -325,13 +353,15 @@ esp_input(struct mbuf *m, struct secasva */ plen = m->m_pkthdr.len - (skip + hlen + alen); if ((plen & (espx->blocksize - 1)) || (plen <= 0)) { - DPRINTF(("%s: payload of %d octets not a multiple of %d octets," - " SA %s/%08lx\n", __func__, - plen, espx->blocksize, ipsec_address(&sav->sah->saidx.dst, - buf, sizeof(buf)), (u_long) ntohl(sav->spi))); - ESPSTAT_INC(esps_badilen); - m_freem(m); - return EINVAL; + if (!espx || sav->alg_enc != SADB_X_EALG_AESGCM16) { + DPRINTF(("%s: payload of %d octets not a multiple of %d octets," + " SA %s/%08lx\n", __func__, + plen, espx->blocksize, ipsec_address(&sav->sah->saidx.dst, + buf, sizeof(buf)), (u_long) ntohl(sav->spi))); + ESPSTAT_INC(esps_badilen); + m_freem(m); + return EINVAL; + } } /* @@ -377,12 +407,20 @@ esp_input(struct mbuf *m, struct secasva /* Authentication descriptor */ crda->crd_skip = skip; - crda->crd_len = m->m_pkthdr.len - (skip + alen); + if (espx && espx->type == CRYPTO_AES_NIST_GCM_16) + crda->crd_len = hlen - sav->ivlen; + else + crda->crd_len = m->m_pkthdr.len - (skip + alen); crda->crd_inject = m->m_pkthdr.len - alen; crda->crd_alg = esph->type; - crda->crd_key = sav->key_auth->key_data; - crda->crd_klen = _KEYBITS(sav->key_auth); + if (espx && (espx->type == CRYPTO_AES_NIST_GCM_16)) { + crda->crd_key = sav->key_enc->key_data; + crda->crd_klen = _KEYBITS(sav->key_enc); + } else { + crda->crd_key = sav->key_auth->key_data; + crda->crd_klen = _KEYBITS(sav->key_auth); + } /* Copy the authenticator */ m_copydata(m, m->m_pkthdr.len - alen, alen, @@ -420,6 +458,9 @@ esp_input(struct mbuf *m, struct secasva crde->crd_alg = espx->type; crde->crd_key = sav->key_enc->key_data; crde->crd_klen = _KEYBITS(sav->key_enc); + if (espx && (espx->type == CRYPTO_AES_NIST_GCM_16)) + crde->crd_flags |= CRD_F_IV_EXPLICIT; + /* XXX Rounds ? */ return (crypto_dispatch(crp)); @@ -489,16 +530,7 @@ esp_input_cb(struct cryptop *crp) /* If authentication was performed, check now. */ if (esph != NULL) { - switch (esph->type) { - case CRYPTO_SHA2_256_HMAC: - case CRYPTO_SHA2_384_HMAC: - case CRYPTO_SHA2_512_HMAC: - alen = esph->hashsize/2; - break; - default: - alen = AH_HMAC_HASHLEN; - break; - } + alen = esph->hashsize; AHSTAT_INC(ahs_hist[sav->alg_auth]); /* Copy the authenticator from the packet */ m_copydata(m, m->m_pkthdr.len - alen, alen, aalg); @@ -663,22 +695,13 @@ esp_output(struct mbuf *m, struct ipsecr * NB: The null encoding transform has a blocksize of 4 * so that headers are properly aligned. */ - blks = espx->blocksize; /* IV blocksize */ + blks = espx->ivsize; /* IV blocksize */ /* XXX clamp padding length a la KAME??? */ padding = ((blks - ((rlen + 2) % blks)) % blks) + 2; if (esph) - switch (esph->type) { - case CRYPTO_SHA2_256_HMAC: - case CRYPTO_SHA2_384_HMAC: - case CRYPTO_SHA2_512_HMAC: - alen = esph->hashsize/2; - break; - default: - alen = AH_HMAC_HASHLEN; - break; - } + alen = esph->hashsize; else alen = 0; @@ -706,6 +729,8 @@ esp_output(struct mbuf *m, struct ipsecr error = EPFNOSUPPORT; goto bad; } + DPRINTF(("%s: skip %d hlen %d rlen %d padding %d alen %d blksd %d\n", + __func__, skip, hlen, rlen, padding, alen, blks)); if (skip + hlen + rlen + padding + alen > maxpacketsize) { DPRINTF(("%s: packet in SA %s/%08lx got too big " "(len %u, max len %u)\n", __func__, @@ -820,6 +845,8 @@ esp_output(struct mbuf *m, struct ipsecr crde->crd_alg = espx->type; crde->crd_key = sav->key_enc->key_data; crde->crd_klen = _KEYBITS(sav->key_enc); + if (espx->type == CRYPTO_AES_NIST_GCM_16) + crde->crd_flags |= CRD_F_IV_EXPLICIT; /* XXX Rounds ? */ } else crda = crp->crp_desc; @@ -854,13 +881,22 @@ esp_output(struct mbuf *m, struct ipsecr if (esph) { /* Authentication descriptor. */ crda->crd_skip = skip; - crda->crd_len = m->m_pkthdr.len - (skip + alen); + if (espx && espx->type == CRYPTO_AES_NIST_GCM_16) + crda->crd_len = hlen - sav->ivlen; + else + crda->crd_len = m->m_pkthdr.len - (skip + alen); crda->crd_inject = m->m_pkthdr.len - alen; /* Authentication operation. */ crda->crd_alg = esph->type; - crda->crd_key = sav->key_auth->key_data; - crda->crd_klen = _KEYBITS(sav->key_auth); + if (espx && espx->type == CRYPTO_AES_NIST_GCM_16) { + crda->crd_key = sav->key_enc->key_data; + crda->crd_klen = _KEYBITS(sav->key_enc); + } else { + crda->crd_key = sav->key_auth->key_data; + crda->crd_klen = _KEYBITS(sav->key_auth); + } + } return crypto_dispatch(crp); @@ -953,6 +989,11 @@ esp_output_cb(struct cryptop *crp) case CRYPTO_SHA2_512_HMAC: alen = esph->hashsize/2; break; + case CRYPTO_AES_128_GMAC: + case CRYPTO_AES_192_GMAC: + case CRYPTO_AES_256_GMAC: + alen = esph->hashsize; + break; default: alen = AH_HMAC_HASHLEN; break; Modified: head/sys/opencrypto/cryptodev.h ============================================================================== --- head/sys/opencrypto/cryptodev.h Thu Jul 9 17:45:08 2015 (r285335) +++ head/sys/opencrypto/cryptodev.h Thu Jul 9 18:16:35 2015 (r285336) @@ -78,6 +78,7 @@ #define SHA2_512_HASH_LEN 64 #define MD5_KPDK_HASH_LEN 16 #define SHA1_KPDK_HASH_LEN 20 +#define AES_HASH_LEN 16 /* Maximum hash algorithm result length */ #define HASH_MAX_LEN SHA2_512_HASH_LEN /* Keep this updated */ @@ -86,28 +87,74 @@ #define MD5_HMAC_BLOCK_LEN 64 #define SHA1_HMAC_BLOCK_LEN 64 #define RIPEMD160_HMAC_BLOCK_LEN 64 -#define SHA2_256_HMAC_BLOCK_LEN 64 -#define SHA2_384_HMAC_BLOCK_LEN 128 -#define SHA2_512_HMAC_BLOCK_LEN 128 +#define SHA2_256_HMAC_BLOCK_LEN 64 +#define SHA2_384_HMAC_BLOCK_LEN 128 +#define SHA2_512_HMAC_BLOCK_LEN 128 /* Maximum HMAC block length */ -#define HMAC_MAX_BLOCK_LEN SHA2_512_HMAC_BLOCK_LEN /* Keep this updated */ +#define HMAC_MAX_BLOCK_LEN SHA2_512_HMAC_BLOCK_LEN /* Keep this updated */ #define HMAC_IPAD_VAL 0x36 #define HMAC_OPAD_VAL 0x5C +/* HMAC Key Length */ +#define NULL_HMAC_KEY_LEN 0 +#define MD5_HMAC_KEY_LEN 16 +#define SHA1_HMAC_KEY_LEN 20 +#define RIPEMD160_HMAC_KEY_LEN 20 +#define SHA2_256_HMAC_KEY_LEN 32 +#define SHA2_384_HMAC_KEY_LEN 48 +#define SHA2_512_HMAC_KEY_LEN 64 +#define AES_128_HMAC_KEY_LEN 16 +#define AES_192_HMAC_KEY_LEN 24 +#define AES_256_HMAC_KEY_LEN 32 /* Encryption algorithm block sizes */ -#define NULL_BLOCK_LEN 4 -#define DES_BLOCK_LEN 8 -#define DES3_BLOCK_LEN 8 -#define BLOWFISH_BLOCK_LEN 8 -#define SKIPJACK_BLOCK_LEN 8 -#define CAST128_BLOCK_LEN 8 -#define RIJNDAEL128_BLOCK_LEN 16 -#define AES_BLOCK_LEN RIJNDAEL128_BLOCK_LEN -#define CAMELLIA_BLOCK_LEN 16 -#define EALG_MAX_BLOCK_LEN AES_BLOCK_LEN /* Keep this updated */ +#define NULL_BLOCK_LEN 4 +#define DES_BLOCK_LEN 8 +#define DES3_BLOCK_LEN 8 +#define BLOWFISH_BLOCK_LEN 8 +#define SKIPJACK_BLOCK_LEN 8 +#define CAST128_BLOCK_LEN 8 +#define RIJNDAEL128_BLOCK_LEN 16 +#define AES_BLOCK_LEN 16 +#define AES_MIN_BLOCK_LEN 1 +#define ARC4_BLOCK_LEN 1 +#define CAMELLIA_BLOCK_LEN 16 +#define EALG_MAX_BLOCK_LEN AES_BLOCK_LEN /* Keep this updated */ + +/* IV Lengths */ + +#define ARC4_IV_LEN 1 +#define AES_IV_LEN 12 +#define AES_XTS_IV_LEN 8 +#define AES_XTS_ALPHA 0x87 /* GF(2^128) generator polynomial */ + +#define AES_CTR_NONCE_SIZE 4 + +/* Min and Max Encryption Key Sizes */ +#define NULL_MIN_KEY 0 +#define NULL_MAX_KEY 256 /* 2048 bits, max key */ +#define DES_MIN_KEY 8 +#define DES_MAX_KEY DES_MIN_KEY +#define TRIPLE_DES_MIN_KEY 24 +#define TRIPLE_DES_MAX_KEY TRIPLE_DES_MIN_KEY +#define BLOWFISH_MIN_KEY 5 +#define BLOWFISH_MAX_KEY 56 /* 448 bits, max key */ +#define CAST_MIN_KEY 5 +#define CAST_MAX_KEY 16 +#define SKIPJACK_MIN_KEY 10 +#define SKIPJACK_MAX_KEY SKIPJACK_MIN_KEY +#define RIJNDAEL_MIN_KEY 16 +#define RIJNDAEL_MAX_KEY 32 +#define AES_MIN_KEY 16 +#define AES_MAX_KEY 32 +#define AES_XTS_MIN_KEY 32 +#define AES_XTS_MAX_KEY 64 +#define ARC4_MIN_KEY 1 +#define ARC4_MAX_KEY 32 +#define CAMELLIA_MIN_KEY 8 +#define CAMELLIA_MAX_KEY 32 /* Maximum hash algorithm result length */ -#define AALG_MAX_RESULT_LEN 64 /* Keep this updated */ +#define AALG_MAX_RESULT_LEN 64 /* Keep this updated */ #define CRYPTO_ALGORITHM_MIN 1 #define CRYPTO_DES_CBC 1 @@ -141,7 +188,7 @@ #define CRYPTO_AES_256_NIST_GMAC 28 /* auth side */ #define CRYPTO_ALGORITHM_MAX 28 /* Keep updated - see below */ -#define CRYPTO_ALGO_VALID(x) ((x) >= CRYPTO_ALGORITHM_MIN && \ +#define CRYPTO_ALGO_VALID(x) ((x) >= CRYPTO_ALGORITHM_MIN && \ (x) <= CRYPTO_ALGORITHM_MAX) /* Algorithm flags */ Modified: head/sys/opencrypto/xform.c ============================================================================== --- head/sys/opencrypto/xform.c Thu Jul 9 17:45:08 2015 (r285335) +++ head/sys/opencrypto/xform.c Thu Jul 9 18:16:35 2015 (r285336) @@ -154,7 +154,7 @@ MALLOC_DEFINE(M_XDATA, "xform", "xform d struct enc_xform enc_xform_null = { CRYPTO_NULL_CBC, "NULL", /* NB: blocksize of 4 is to generate a properly aligned ESP header */ - NULL_BLOCK_LEN, NULL_BLOCK_LEN, 0, 256, /* 2048 bits, max key */ + NULL_BLOCK_LEN, NULL_BLOCK_LEN, NULL_MIN_KEY, NULL_MAX_KEY, null_encrypt, null_decrypt, null_setkey, @@ -164,7 +164,7 @@ struct enc_xform enc_xform_null = { struct enc_xform enc_xform_des = { CRYPTO_DES_CBC, "DES", - DES_BLOCK_LEN, DES_BLOCK_LEN, 8, 8, + DES_BLOCK_LEN, DES_BLOCK_LEN, DES_MIN_KEY, DES_MAX_KEY, des1_encrypt, des1_decrypt, des1_setkey, @@ -174,7 +174,8 @@ struct enc_xform enc_xform_des = { struct enc_xform enc_xform_3des = { CRYPTO_3DES_CBC, "3DES", - DES3_BLOCK_LEN, DES3_BLOCK_LEN, 24, 24, + DES3_BLOCK_LEN, DES3_BLOCK_LEN, TRIPLE_DES_MIN_KEY, + TRIPLE_DES_MAX_KEY, des3_encrypt, des3_decrypt, des3_setkey, @@ -184,7 +185,8 @@ struct enc_xform enc_xform_3des = { struct enc_xform enc_xform_blf = { CRYPTO_BLF_CBC, "Blowfish", - BLOWFISH_BLOCK_LEN, BLOWFISH_BLOCK_LEN, 5, 56 /* 448 bits, max key */, + BLOWFISH_BLOCK_LEN, BLOWFISH_BLOCK_LEN, BLOWFISH_MIN_KEY, + BLOWFISH_MAX_KEY, blf_encrypt, blf_decrypt, blf_setkey, @@ -194,7 +196,7 @@ struct enc_xform enc_xform_blf = { struct enc_xform enc_xform_cast5 = { CRYPTO_CAST_CBC, "CAST-128", - CAST128_BLOCK_LEN, CAST128_BLOCK_LEN, 5, 16, + CAST128_BLOCK_LEN, CAST128_BLOCK_LEN, CAST_MIN_KEY, CAST_MAX_KEY, cast5_encrypt, cast5_decrypt, cast5_setkey, @@ -204,7 +206,8 @@ struct enc_xform enc_xform_cast5 = { struct enc_xform enc_xform_skipjack = { CRYPTO_SKIPJACK_CBC, "Skipjack", - SKIPJACK_BLOCK_LEN, SKIPJACK_BLOCK_LEN, 10, 10, + SKIPJACK_BLOCK_LEN, SKIPJACK_BLOCK_LEN, SKIPJACK_MIN_KEY, + SKIPJACK_MAX_KEY, skipjack_encrypt, skipjack_decrypt, skipjack_setkey, skipjack_zerokey, @@ -213,7 +216,8 @@ struct enc_xform enc_xform_skipjack = { struct enc_xform enc_xform_rijndael128 = { CRYPTO_RIJNDAEL128_CBC, "Rijndael-128/AES", - RIJNDAEL128_BLOCK_LEN, RIJNDAEL128_BLOCK_LEN, 16, 32, + RIJNDAEL128_BLOCK_LEN, RIJNDAEL128_BLOCK_LEN, RIJNDAEL_MIN_KEY, + RIJNDAEL_MAX_KEY, rijndael128_encrypt, rijndael128_decrypt, rijndael128_setkey, @@ -223,7 +227,7 @@ struct enc_xform enc_xform_rijndael128 = struct enc_xform enc_xform_aes_icm = { CRYPTO_AES_ICM, "AES-ICM", - RIJNDAEL128_BLOCK_LEN, RIJNDAEL128_BLOCK_LEN, 16, 32, + RIJNDAEL128_BLOCK_LEN, RIJNDAEL128_BLOCK_LEN, AES_MIN_KEY, AES_MAX_KEY, aes_icm_crypt, aes_icm_crypt, aes_icm_setkey, @@ -233,7 +237,7 @@ struct enc_xform enc_xform_aes_icm = { struct enc_xform enc_xform_aes_nist_gcm = { CRYPTO_AES_NIST_GCM_16, "AES-GCM", - 1, 12, 16, 32, + AES_MIN_BLOCK_LEN, AES_IV_LEN, AES_MIN_KEY, AES_MAX_KEY, aes_icm_crypt, aes_icm_crypt, aes_icm_setkey, @@ -243,7 +247,7 @@ struct enc_xform enc_xform_aes_nist_gcm struct enc_xform enc_xform_aes_nist_gmac = { CRYPTO_AES_NIST_GMAC, "AES-GMAC", - 1, 12, 16, 32, + AES_MIN_BLOCK_LEN, AES_IV_LEN, AES_MIN_KEY, AES_MAX_KEY, NULL, NULL, NULL, @@ -253,7 +257,7 @@ struct enc_xform enc_xform_aes_nist_gmac struct enc_xform enc_xform_aes_xts = { CRYPTO_AES_XTS, "AES-XTS", - RIJNDAEL128_BLOCK_LEN, 8, 32, 64, + AES_MIN_BLOCK_LEN, AES_XTS_IV_LEN, AES_XTS_MIN_KEY, AES_XTS_MAX_KEY, aes_xts_encrypt, aes_xts_decrypt, aes_xts_setkey, @@ -263,7 +267,7 @@ struct enc_xform enc_xform_aes_xts = { struct enc_xform enc_xform_arc4 = { CRYPTO_ARC4, "ARC4", - 1, 1, 1, 32, + ARC4_BLOCK_LEN, ARC4_IV_LEN, ARC4_MIN_KEY, ARC4_MAX_KEY, NULL, NULL, NULL, @@ -273,7 +277,8 @@ struct enc_xform enc_xform_arc4 = { struct enc_xform enc_xform_camellia = { CRYPTO_CAMELLIA_CBC, "Camellia", - CAMELLIA_BLOCK_LEN, CAMELLIA_BLOCK_LEN, 8, 32, + CAMELLIA_BLOCK_LEN, CAMELLIA_BLOCK_LEN, CAMELLIA_MIN_KEY, + CAMELLIA_MAX_KEY, cml_encrypt, cml_decrypt, cml_setkey, @@ -284,67 +289,72 @@ struct enc_xform enc_xform_camellia = { /* Authentication instances */ struct auth_hash auth_hash_null = { /* NB: context isn't used */ CRYPTO_NULL_HMAC, "NULL-HMAC", - 0, NULL_HASH_LEN, sizeof(int), NULL_HMAC_BLOCK_LEN, + NULL_HMAC_KEY_LEN, NULL_HASH_LEN, sizeof(int), NULL_HMAC_BLOCK_LEN, null_init, null_reinit, null_reinit, null_update, null_final }; struct auth_hash auth_hash_hmac_md5 = { CRYPTO_MD5_HMAC, "HMAC-MD5", - 16, MD5_HASH_LEN, sizeof(MD5_CTX), MD5_HMAC_BLOCK_LEN, + MD5_HMAC_KEY_LEN, MD5_HASH_LEN, sizeof(MD5_CTX), MD5_HMAC_BLOCK_LEN, (void (*) (void *)) MD5Init, NULL, NULL, MD5Update_int, (void (*) (u_int8_t *, void *)) MD5Final }; struct auth_hash auth_hash_hmac_sha1 = { CRYPTO_SHA1_HMAC, "HMAC-SHA1", - 20, SHA1_HASH_LEN, sizeof(SHA1_CTX), SHA1_HMAC_BLOCK_LEN, + SHA1_HMAC_KEY_LEN, SHA1_HASH_LEN, sizeof(SHA1_CTX), SHA1_HMAC_BLOCK_LEN, SHA1Init_int, NULL, NULL, SHA1Update_int, SHA1Final_int }; struct auth_hash auth_hash_hmac_ripemd_160 = { CRYPTO_RIPEMD160_HMAC, "HMAC-RIPEMD-160", - 20, RIPEMD160_HASH_LEN, sizeof(RMD160_CTX), RIPEMD160_HMAC_BLOCK_LEN, + RIPEMD160_HMAC_KEY_LEN, RIPEMD160_HASH_LEN, sizeof(RMD160_CTX), + RIPEMD160_HMAC_BLOCK_LEN, (void (*)(void *)) RMD160Init, NULL, NULL, RMD160Update_int, (void (*)(u_int8_t *, void *)) RMD160Final }; struct auth_hash auth_hash_key_md5 = { CRYPTO_MD5_KPDK, "Keyed MD5", - 0, MD5_KPDK_HASH_LEN, sizeof(MD5_CTX), 0, + NULL_HMAC_KEY_LEN, MD5_KPDK_HASH_LEN, sizeof(MD5_CTX), 0, (void (*)(void *)) MD5Init, NULL, NULL, MD5Update_int, (void (*)(u_int8_t *, void *)) MD5Final }; struct auth_hash auth_hash_key_sha1 = { CRYPTO_SHA1_KPDK, "Keyed SHA1", - 0, SHA1_KPDK_HASH_LEN, sizeof(SHA1_CTX), 0, + NULL_HMAC_KEY_LEN, SHA1_KPDK_HASH_LEN, sizeof(SHA1_CTX), 0, SHA1Init_int, NULL, NULL, SHA1Update_int, SHA1Final_int }; struct auth_hash auth_hash_hmac_sha2_256 = { CRYPTO_SHA2_256_HMAC, "HMAC-SHA2-256", - 32, SHA2_256_HASH_LEN, sizeof(SHA256_CTX), SHA2_256_HMAC_BLOCK_LEN, + SHA2_256_HMAC_KEY_LEN, SHA2_256_HASH_LEN, sizeof(SHA256_CTX), + SHA2_256_HMAC_BLOCK_LEN, (void (*)(void *)) SHA256_Init, NULL, NULL, SHA256Update_int, (void (*)(u_int8_t *, void *)) SHA256_Final }; struct auth_hash auth_hash_hmac_sha2_384 = { CRYPTO_SHA2_384_HMAC, "HMAC-SHA2-384", - 48, SHA2_384_HASH_LEN, sizeof(SHA384_CTX), SHA2_384_HMAC_BLOCK_LEN, + SHA2_384_HMAC_KEY_LEN, SHA2_384_HASH_LEN, sizeof(SHA384_CTX), + SHA2_384_HMAC_BLOCK_LEN, (void (*)(void *)) SHA384_Init, NULL, NULL, SHA384Update_int, (void (*)(u_int8_t *, void *)) SHA384_Final }; struct auth_hash auth_hash_hmac_sha2_512 = { CRYPTO_SHA2_512_HMAC, "HMAC-SHA2-512", - 64, SHA2_512_HASH_LEN, sizeof(SHA512_CTX), SHA2_512_HMAC_BLOCK_LEN, + SHA2_512_HMAC_KEY_LEN, SHA2_512_HASH_LEN, sizeof(SHA512_CTX), + SHA2_512_HMAC_BLOCK_LEN, (void (*)(void *)) SHA512_Init, NULL, NULL, SHA512Update_int, (void (*)(u_int8_t *, void *)) SHA512_Final }; struct auth_hash auth_hash_nist_gmac_aes_128 = { CRYPTO_AES_128_NIST_GMAC, "GMAC-AES-128", - 16, 16, sizeof(struct aes_gmac_ctx), GMAC_BLOCK_LEN, + AES_128_HMAC_KEY_LEN, AES_HASH_LEN, sizeof(struct aes_gmac_ctx), + GMAC_BLOCK_LEN, (void (*)(void *)) AES_GMAC_Init, (void (*)(void *, const u_int8_t *, u_int16_t)) AES_GMAC_Setkey, (void (*)(void *, const u_int8_t *, u_int16_t)) AES_GMAC_Reinit, @@ -354,7 +364,8 @@ struct auth_hash auth_hash_nist_gmac_aes struct auth_hash auth_hash_nist_gmac_aes_192 = { CRYPTO_AES_192_NIST_GMAC, "GMAC-AES-192", - 24, 16, sizeof(struct aes_gmac_ctx), GMAC_BLOCK_LEN, + AES_192_HMAC_KEY_LEN, AES_HASH_LEN, sizeof(struct aes_gmac_ctx), + GMAC_BLOCK_LEN, (void (*)(void *)) AES_GMAC_Init, (void (*)(void *, const u_int8_t *, u_int16_t)) AES_GMAC_Setkey, (void (*)(void *, const u_int8_t *, u_int16_t)) AES_GMAC_Reinit, @@ -364,7 +375,8 @@ struct auth_hash auth_hash_nist_gmac_aes struct auth_hash auth_hash_nist_gmac_aes_256 = { CRYPTO_AES_256_NIST_GMAC, "GMAC-AES-256", - 32, 16, sizeof(struct aes_gmac_ctx), GMAC_BLOCK_LEN, + AES_256_HMAC_KEY_LEN, AES_HASH_LEN, sizeof(struct aes_gmac_ctx), + GMAC_BLOCK_LEN, (void (*)(void *)) AES_GMAC_Init, (void (*)(void *, const u_int8_t *, u_int16_t)) AES_GMAC_Setkey, (void (*)(void *, const u_int8_t *, u_int16_t)) AES_GMAC_Reinit, From owner-svn-src-all@freebsd.org Thu Jul 9 20:30:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2B40997B21; Thu, 9 Jul 2015 20:30:07 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [192.203.228.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CAEFA1DC5; Thu, 9 Jul 2015 20:30:07 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 77950329; Thu, 9 Jul 2015 13:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1436473799; bh=oE9f9TIoI4dzuHo13GDcGbsvmOM0nniophGQR4C1Lqk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=A3CA2yN2NbDABviQaengspdJvMDFwJKJW9xPIrls2NIjycUFriSWarItgCc3RCbxz 5SoyHGm6Ocy60ZqXyUVnLnivO2CYV2TcTlJ7q7vPi65mFSmBovCHlBzbDapB74S/vk S16/gqgKu1TONGyXrVIiaYrY4GS0ErvbHuC5td5Y= From: Peter Wemm To: svn-src-head@freebsd.org Cc: Mariusz Zaborski , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r285139 - in head: lib/libnv sys/conf sys/contrib/libnv sys/kern sys/sys Date: Thu, 09 Jul 2015 13:29:54 -0700 Message-ID: <12132227.txsMvZmjyr@overcee.wemm.org> User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-Reply-To: <201507041633.t64GXcmT097180@repo.freebsd.org> References: <201507041633.t64GXcmT097180@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2677546.9iqvG1Dq7O"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 20:30:08 -0000 --nextPart2677546.9iqvG1Dq7O Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Saturday, July 04, 2015 04:33:38 PM Mariusz Zaborski wrote: > Author: oshogbo > Date: Sat Jul 4 16:33:37 2015 > New Revision: 285139 > URL: https://svnweb.freebsd.org/changeset/base/285139 >=20 > Log: > Move the nvlist source and private includes from sys/kern to sepera= te > directory sys/contrib/libnv. >=20 > The goal of this operation is to NOT install header files which sho= uldn't > be used outside the nvlist library. > head/sys/contrib/libnv/nvlist.c > - copied, changed from r285128, head/sys/kern/subr_nvlist.c You have broken kernel builds for the freebsd.org cluster. By renaming= =20 "subr_nvlist.o" to "nvlist.o" you now cause: make[2]: ".../Makefile" line 3143: warning: duplicate script for target= =20 "nvpair.o" ignored make[2]: ".../Makefile" line 1260: warning: using previous script for=20= "nvpair.o" defined here .... linking kernel.debug nvpair.o: In function `illumos_nvlist_add_nvlist': /usr/src/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c:1136: mult= iple=20 definition of `illumos_nvlist_add_nvlist' nvpair.o:/usr/src/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c:1= 136:=20 first defined here nvpair.o: In function `illumos_nvlist_add_nvpair': /usr/src/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c:1971: mult= iple=20 definition of `illumos_nvlist_add_nvpair' nvpair.o:/usr/src/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c:1= 971:=20 first defined here .... I'm going to attempt to revert this for the freebsd.org cluster because= I need=20 it to compile for openssl. =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart2677546.9iqvG1Dq7O Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJVntnCAAoJEDXWlwnsgJ4EVIYH/15ToDhJy9XvtxWokjbDlQCL ZXhkn5vjD4Zbp2YILHbNx0EFRvkD8HV8YVJiiW9IR1rlRJufhadN3jObQObSUhAk qpY6gKNZ1BaVeiNtfMPVyKVOGGHnUivys7ynTqtZ+lS8e2Lb7yNL2KuSTU223B0Q bOro1yjDmp6l2uDyRWwC+kzLWW4uQY3WAezXs9JbZsJ9dB0LzOrheRNCfX3EkcAX ZtBAUq1lK5gAFBTzPtiwPF774ezTtFyCKzrszy9FPlL8mDpd+E/Kgxs7aifFYyi/ jKdCw/Tbkq4HXpeabgJpQMuouZCX6X3V7/XzNRu1QoSvZNoQtJdECrqBNQbTxhA= =SEqD -----END PGP SIGNATURE----- --nextPart2677546.9iqvG1Dq7O-- From owner-svn-src-all@freebsd.org Thu Jul 9 20:32:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D808997C5B; Thu, 9 Jul 2015 20:32:00 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A71FA1117; Thu, 9 Jul 2015 20:31:59 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wgov12 with SMTP id v12so48456112wgo.1; Thu, 09 Jul 2015 13:31:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=fPiesXA6PT8HbeYXKvRu8/4WXc4S9AF2oZy8JJko344=; b=FJbqqsILQEAQl+gMKtnRhTxTpRyvywMZryontJJABmLXLyr6s1dlKc6iWqUJ7DGRzg NWYWk+4ZgbNJHXXFMzEE55N4QIwCDrk8yxu6LzXOqsdbdoSbbDL5JUknHNAqjxjfh/Zc 7Yl3eHsEpq9E/qadE6ieljqtMvoFQ/cNesGW6CDCv8ikimnnpJ/ePXO5cujZoG5LEHDb i4UUaHzodYlBEwiE4IlAOQT4+3/oJYDyeh9HF6dDpMgd+rwrWsUVyvAbs5hzd7mNvRbn KUDMf1ZRedO/087fb+mpM8TMFJMrLSrFgKxbXUe7D9WHKSo6k+t9amyLJtnx3dlJw7E5 N1bg== X-Received: by 10.180.24.65 with SMTP id s1mr83261125wif.66.1436473918132; Thu, 09 Jul 2015 13:31:58 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id ho10sm10422816wjb.39.2015.07.09.13.31.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2015 13:31:57 -0700 (PDT) Sender: Baptiste Daroussin Date: Thu, 9 Jul 2015 22:31:55 +0200 From: Baptiste Daroussin To: Peter Wemm Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mariusz Zaborski Subject: Re: svn commit: r285139 - in head: lib/libnv sys/conf sys/contrib/libnv sys/kern sys/sys Message-ID: <20150709203154.GB72952@ivaldir.etoilebsd.net> References: <201507041633.t64GXcmT097180@repo.freebsd.org> <12132227.txsMvZmjyr@overcee.wemm.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qcHopEYAB45HaUaB" Content-Disposition: inline In-Reply-To: <12132227.txsMvZmjyr@overcee.wemm.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 20:32:00 -0000 --qcHopEYAB45HaUaB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 09, 2015 at 01:29:54PM -0700, Peter Wemm wrote: > On Saturday, July 04, 2015 04:33:38 PM Mariusz Zaborski wrote: > > Author: oshogbo > > Date: Sat Jul 4 16:33:37 2015 > > New Revision: 285139 > > URL: https://svnweb.freebsd.org/changeset/base/285139 > >=20 > > Log: > > Move the nvlist source and private includes from sys/kern to seperate > > directory sys/contrib/libnv. > >=20 > > The goal of this operation is to NOT install header files which shoul= dn't > > be used outside the nvlist library. >=20 > > head/sys/contrib/libnv/nvlist.c > > - copied, changed from r285128, head/sys/kern/subr_nvlist.c >=20 > You have broken kernel builds for the freebsd.org cluster. By renaming= =20 > "subr_nvlist.o" to "nvlist.o" you now cause: >=20 > make[2]: ".../Makefile" line 3143: warning: duplicate script for target= =20 > "nvpair.o" ignored > make[2]: ".../Makefile" line 1260: warning: using previous script for=20 > "nvpair.o" defined here >=20 > .... >=20 > linking kernel.debug > nvpair.o: In function `illumos_nvlist_add_nvlist': > /usr/src/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c:1136: multip= le=20 > definition of `illumos_nvlist_add_nvlist' > nvpair.o:/usr/src/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c:113= 6:=20 > first defined here > nvpair.o: In function `illumos_nvlist_add_nvpair': > /usr/src/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c:1971: multip= le=20 > definition of `illumos_nvlist_add_nvpair' > nvpair.o:/usr/src/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c:197= 1:=20 > first defined here > .... >=20 > I'm going to attempt to revert this for the freebsd.org cluster because I= need=20 > it to compile for openssl. >=20 You probably want to specify that this happens when zfs is built in the ker= nel not as a module. Best regards, Bapt --qcHopEYAB45HaUaB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlWe2joACgkQ8kTtMUmk6Ez2iQCdE3uKI2toK7ElTqCO/Ebg7YVz IAwAoKwK2+NFwuUKGIl73UKwAq4eWBc+ =DBtL -----END PGP SIGNATURE----- --qcHopEYAB45HaUaB-- From owner-svn-src-all@freebsd.org Thu Jul 9 20:33:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E81B3997D88; Thu, 9 Jul 2015 20:33:22 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [IPv6:2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "thebighonker.lerctr.org", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6316412B4; Thu, 9 Jul 2015 20:33:22 +0000 (UTC) (envelope-from ler@lerctr.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date:Content-Transfer-Encoding:Content-Type:MIME-Version; bh=8m9JVPyxzAOTjyKENt0HZUnrdUFeplfAQjy6Wh5RRnY=; b=iFPGzN/ncA/WBcXpssqHjR+IJCGT3B2C49WvNPlWKH9KlyaPF7ynr7VpDdZsvvwN4dAZbGoafRrS1xHICo8mMLbAnogKceoaiD98dqxxmUwELAw9+V1rn8ciPsSe3a+Qr4UkqTEJkvE2+q6CfzwQOlNT9YhA1JYmJwwQyuB7rFc=; Received: from thebighonker.lerctr.org ([2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]:41368 helo=webmail.lerctr.org) by thebighonker.lerctr.org with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1ZDIVV-0001FB-9N; Thu, 09 Jul 2015 15:33:21 -0500 Received: from proxy.lucent.com ([135.245.49.14]) by webmail.lerctr.org with HTTP (HTTP/1.1 POST); Thu, 09 Jul 2015 15:33:20 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 09 Jul 2015 15:33:20 -0500 From: Larry Rosenman To: Baptiste Daroussin Cc: Peter Wemm , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mariusz Zaborski , owner-svn-src-all@freebsd.org Subject: Re: svn commit: r285139 - in head: lib/libnv sys/conf sys/contrib/libnv sys/kern sys/sys In-Reply-To: <20150709203154.GB72952@ivaldir.etoilebsd.net> References: <201507041633.t64GXcmT097180@repo.freebsd.org> <12132227.txsMvZmjyr@overcee.wemm.org> <20150709203154.GB72952@ivaldir.etoilebsd.net> Message-ID: <2c517ae466390360541ba3e169b19ded@thebighonker.lerctr.org> X-Sender: ler@lerctr.org User-Agent: Roundcube Webmail/1.1.2 X-Spam-Score: -1.0 (-) X-LERCTR-Spam-Score: -1.0 (-) X-Spam-Report: SpamScore (-1.0/5.0) ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 X-LERCTR-Spam-Report: SpamScore (-1.0/5.0) ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 20:33:23 -0000 On 2015-07-09 15:31, Baptiste Daroussin wrote: > On Thu, Jul 09, 2015 at 01:29:54PM -0700, Peter Wemm wrote: >> On Saturday, July 04, 2015 04:33:38 PM Mariusz Zaborski wrote: >> > Author: oshogbo >> > Date: Sat Jul 4 16:33:37 2015 >> > New Revision: 285139 >> > URL: https://svnweb.freebsd.org/changeset/base/285139 >> > >> > Log: >> > Move the nvlist source and private includes from sys/kern to seperate >> > directory sys/contrib/libnv. >> > >> > The goal of this operation is to NOT install header files which shouldn't >> > be used outside the nvlist library. >> >> > head/sys/contrib/libnv/nvlist.c >> > - copied, changed from r285128, head/sys/kern/subr_nvlist.c >> >> You have broken kernel builds for the freebsd.org cluster. By >> renaming >> "subr_nvlist.o" to "nvlist.o" you now cause: >> >> make[2]: ".../Makefile" line 3143: warning: duplicate script for >> target >> "nvpair.o" ignored >> make[2]: ".../Makefile" line 1260: warning: using previous script for >> "nvpair.o" defined here >> >> .... >> >> linking kernel.debug >> nvpair.o: In function `illumos_nvlist_add_nvlist': >> /usr/src/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c:1136: >> multiple >> definition of `illumos_nvlist_add_nvlist' >> nvpair.o:/usr/src/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c:1136: >> first defined here >> nvpair.o: In function `illumos_nvlist_add_nvpair': >> /usr/src/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c:1971: >> multiple >> definition of `illumos_nvlist_add_nvpair' >> nvpair.o:/usr/src/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c:1971: >> first defined here >> .... >> >> I'm going to attempt to revert this for the freebsd.org cluster >> because I need >> it to compile for openssl. >> > You probably want to specify that this happens when zfs is built in the > kernel > not as a module. > > Best regards, > Bapt https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201356 has a patch -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 108 Turvey Cove, Hutto, TX 78634-5688 From owner-svn-src-all@freebsd.org Thu Jul 9 20:54:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D9C1997251; Thu, 9 Jul 2015 20:54:40 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 3400A10B2; Thu, 9 Jul 2015 20:54:40 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69Kseb9080910; Thu, 9 Jul 2015 20:54:40 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69KsdPQ080908; Thu, 9 Jul 2015 20:54:39 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507092054.t69KsdPQ080908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 9 Jul 2015 20:54:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285337 - in head/sys: conf libkern/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 20:54:40 -0000 Author: andrew Date: Thu Jul 9 20:54:38 2015 New Revision: 285337 URL: https://svnweb.freebsd.org/changeset/base/285337 Log: Add support for __aeabi_memclr4, clang 3.7 calls it. Sponsored by: ABT Systems Ltd Added: head/sys/libkern/arm/memclr.S (contents, props changed) Modified: head/sys/conf/files.arm Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Thu Jul 9 18:16:35 2015 (r285336) +++ head/sys/conf/files.arm Thu Jul 9 20:54:38 2015 (r285337) @@ -108,6 +108,7 @@ libkern/arm/divsi3.S standard libkern/arm/ffs.S standard libkern/arm/ldivmod.S standard libkern/arm/ldivmod_helper.c standard +libkern/arm/memclr.S standard libkern/arm/memcpy.S standard libkern/arm/memset.S standard libkern/arm/muldi3.c standard Added: head/sys/libkern/arm/memclr.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/libkern/arm/memclr.S Thu Jul 9 20:54:38 2015 (r285337) @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2015 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * This implements + * void __aeabi_memclr4(void *dest, size_t len) + * by calling: + * void bzero(dest, len) + */ +ENTRY_NP(__aeabi_memclr4) + b bzero +END(__aeabi_memclr4) + From owner-svn-src-all@freebsd.org Thu Jul 9 21:02:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A725997409; Thu, 9 Jul 2015 21:02:43 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 3EFD51941; Thu, 9 Jul 2015 21:02:43 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69L2hG2085766; Thu, 9 Jul 2015 21:02:43 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69L2f6M085758; Thu, 9 Jul 2015 21:02:41 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507092102.t69L2f6M085758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 9 Jul 2015 21:02:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285338 - head/sys/libkern/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 21:02:43 -0000 Author: andrew Date: Thu Jul 9 21:02:40 2015 New Revision: 285338 URL: https://svnweb.freebsd.org/changeset/base/285338 Log: Remove checks for __ARM_EABI__, we only build for EABI now. Sponsored by: ABT Systems Ltd Modified: head/sys/libkern/arm/aeabi_unwind.c head/sys/libkern/arm/divsi3.S head/sys/libkern/arm/ldivmod.S head/sys/libkern/arm/ldivmod_helper.c head/sys/libkern/arm/memcpy.S head/sys/libkern/arm/memset.S Modified: head/sys/libkern/arm/aeabi_unwind.c ============================================================================== --- head/sys/libkern/arm/aeabi_unwind.c Thu Jul 9 20:54:38 2015 (r285337) +++ head/sys/libkern/arm/aeabi_unwind.c Thu Jul 9 21:02:40 2015 (r285338) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #define panic(x) (void)0 #endif -#ifdef __ARM_EABI__ /* We need to provide these functions never call them */ void __aeabi_unwind_cpp_pr0(void); void __aeabi_unwind_cpp_pr1(void); @@ -58,5 +57,3 @@ __aeabi_unwind_cpp_pr2(void) { panic("__aeabi_unwind_cpp_pr2"); } -#endif - Modified: head/sys/libkern/arm/divsi3.S ============================================================================== --- head/sys/libkern/arm/divsi3.S Thu Jul 9 20:54:38 2015 (r285337) +++ head/sys/libkern/arm/divsi3.S Thu Jul 9 21:02:40 2015 (r285338) @@ -52,10 +52,8 @@ ENTRY_NP(__modsi3) END(__modsi3) ENTRY_NP(__udivsi3) -#ifdef __ARM_EABI__ EENTRY_NP(__aeabi_uidiv) EENTRY_NP(__aeabi_uidivmod) -#endif .L_udivide: /* r0 = r0 / r1; r1 = r0 % r1 */ eor r0, r1, r0 eor r1, r0, r1 @@ -76,17 +74,13 @@ EENTRY_NP(__aeabi_uidivmod) mov r0, r1 mov r1, #0 RET -#ifdef __ARM_EABI__ EEND(__aeabi_uidiv) EEND(__aeabi_uidivmod) -#endif END(__udivsi3) ENTRY_NP(__divsi3) -#ifdef __ARM_EABI__ EENTRY_NP(__aeabi_idiv) EENTRY_NP(__aeabi_idivmod) -#endif .L_divide: /* r0 = r0 / r1; r1 = r0 % r1 */ eor r0, r1, r0 eor r1, r0, r1 @@ -400,9 +394,7 @@ EENTRY_NP(__aeabi_idivmod) addhs r3, r3, r2 mov r0, r3 RET -#ifdef __ARM_EABI__ EEND(__aeabi_idiv) EEND(__aeabi_idivmod) -#endif END(__divsi3) Modified: head/sys/libkern/arm/ldivmod.S ============================================================================== --- head/sys/libkern/arm/ldivmod.S Thu Jul 9 20:54:38 2015 (r285337) +++ head/sys/libkern/arm/ldivmod.S Thu Jul 9 21:02:40 2015 (r285338) @@ -28,8 +28,6 @@ #include __FBSDID("$FreeBSD$"); -#ifdef __ARM_EABI__ - /* * These calculate: * q = n / m @@ -64,6 +62,3 @@ ENTRY_NP(__aeabi_uldivmod) ldmfd sp!, {r2, r3} /* Load the remainder */ RET END(__aeabi_uldivmod) - -#endif - Modified: head/sys/libkern/arm/ldivmod_helper.c ============================================================================== --- head/sys/libkern/arm/ldivmod_helper.c Thu Jul 9 20:54:38 2015 (r285337) +++ head/sys/libkern/arm/ldivmod_helper.c Thu Jul 9 21:02:40 2015 (r285338) @@ -28,7 +28,6 @@ #include __FBSDID("$FreeBSD$"); -#ifdef __ARM_EABI__ #include /* @@ -48,6 +47,3 @@ __kern_ldivmod(long long n, long long m, return q; } - -#endif - Modified: head/sys/libkern/arm/memcpy.S ============================================================================== --- head/sys/libkern/arm/memcpy.S Thu Jul 9 20:54:38 2015 (r285337) +++ head/sys/libkern/arm/memcpy.S Thu Jul 9 21:02:40 2015 (r285338) @@ -28,8 +28,6 @@ #include __FBSDID("$FreeBSD$"); -#ifdef __ARM_EABI__ - ENTRY_NP(__aeabi_memcpy) EENTRY_NP(__aeabi_memcpy4) EENTRY_NP(__aeabi_memcpy8) @@ -37,6 +35,3 @@ EENTRY_NP(__aeabi_memcpy8) EEND(__aeabi_memcpy8) EEND(__aeabi_memcpy4) END(__aeabi_memcpy) - -#endif - Modified: head/sys/libkern/arm/memset.S ============================================================================== --- head/sys/libkern/arm/memset.S Thu Jul 9 20:54:38 2015 (r285337) +++ head/sys/libkern/arm/memset.S Thu Jul 9 21:02:40 2015 (r285338) @@ -28,8 +28,6 @@ #include __FBSDID("$FreeBSD$"); -#ifdef __ARM_EABI__ - /* * This implements * void __aeabi_memset(void *dest, size_t len, int c) @@ -44,6 +42,3 @@ ENTRY_NP(__aeabi_memset) mov r1, r3 b memset END(__aeabi_memset) - -#endif - From owner-svn-src-all@freebsd.org Thu Jul 9 21:05:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72359997457; Thu, 9 Jul 2015 21:05:49 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from smtp.hungerhost.com (smtp.hungerhost.com [216.38.53.177]) (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 4B70F1ACB; Thu, 9 Jul 2015 21:05:48 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from pool-108-54-164-204.nycmny.fios.verizon.net ([108.54.164.204]:63053 helo=[192.168.1.19]) by vps.hungerhost.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.85) (envelope-from ) id 1ZDJ0t-0000uB-SY; Thu, 09 Jul 2015 17:05:47 -0400 From: "George Neville-Neil" To: "George V. Neville-Neil" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285336 - in head/sys: netipsec opencrypto Date: Thu, 09 Jul 2015 17:05:37 -0400 Message-ID: In-Reply-To: <201507091816.t69IGawf097288@repo.freebsd.org> References: <201507091816.t69IGawf097288@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Mailer: MailMate (1.9.1r5084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 21:05:49 -0000 Should have also pointed out that the original version of this patch comes from pfsense and Ermal (eri@). Best, George On 9 Jul 2015, at 14:16, George V. Neville-Neil wrote: > Author: gnn > Date: Thu Jul 9 18:16:35 2015 > New Revision: 285336 > URL: https://svnweb.freebsd.org/changeset/base/285336 > > Log: > Add support for AES modes to IPSec. These modes work both in software > only > mode and with hardware support on systems that have AESNI > instructions. > > Differential Revision: D2936 > Reviewed by: jmg, eri, cognet > Sponsored by: Rubicon Communications (Netgate) > > Modified: > head/sys/netipsec/xform_ah.c > head/sys/netipsec/xform_esp.c > head/sys/opencrypto/cryptodev.h > head/sys/opencrypto/xform.c > > Modified: head/sys/netipsec/xform_ah.c > ============================================================================== > --- head/sys/netipsec/xform_ah.c Thu Jul 9 17:45:08 2015 (r285335) > +++ head/sys/netipsec/xform_ah.c Thu Jul 9 18:16:35 2015 (r285336) > @@ -82,11 +82,11 @@ > (((sav)->flags & SADB_X_EXT_OLD) ? \ > sizeof (struct ah) : sizeof (struct ah) + sizeof (u_int32_t)) > /* > - * Return authenticator size in bytes. The old protocol is known > - * to use a fixed 16-byte authenticator. The new algorithm use > 12-byte > - * authenticator. > + * Return authenticator size in bytes, based on a field in the > + * algorithm descriptor. > */ > -#define AUTHSIZE(sav) ah_authsize(sav) > +#define AUTHSIZE(sav) \ > + ((sav->flags & SADB_X_EXT_OLD) ? 16 : > (sav)->tdb_authalgxform->hashsize) > > VNET_DEFINE(int, ah_enable) = 1; /* control flow of packets with AH */ > VNET_DEFINE(int, ah_cleartos) = 1; /* clear ip_tos when doing AH calc > */ > @@ -112,27 +112,6 @@ static unsigned char ipseczeroes[256]; / > static int ah_input_cb(struct cryptop*); > static int ah_output_cb(struct cryptop*); > > -static int > -ah_authsize(struct secasvar *sav) > -{ > - > - IPSEC_ASSERT(sav != NULL, ("%s: sav == NULL", __func__)); > - > - if (sav->flags & SADB_X_EXT_OLD) > - return 16; > - > - switch (sav->alg_auth) { > - case SADB_X_AALG_SHA2_256: > - return 16; > - case SADB_X_AALG_SHA2_384: > - return 24; > - case SADB_X_AALG_SHA2_512: > - return 32; > - default: > - return AH_HMAC_HASHLEN; > - } > - /* NOTREACHED */ > -} > /* > * NB: this is public for use by the PF_KEY support. > */ > @@ -160,6 +139,12 @@ ah_algorithm_lookup(int alg) > return &auth_hash_hmac_sha2_384; > case SADB_X_AALG_SHA2_512: > return &auth_hash_hmac_sha2_512; > + case SADB_X_AALG_AES128GMAC: > + return &auth_hash_nist_gmac_aes_128; > + case SADB_X_AALG_AES192GMAC: > + return &auth_hash_nist_gmac_aes_192; > + case SADB_X_AALG_AES256GMAC: > + return &auth_hash_nist_gmac_aes_256; > } > return NULL; > } > > Modified: head/sys/netipsec/xform_esp.c > ============================================================================== > --- head/sys/netipsec/xform_esp.c Thu Jul 9 17:45:08 2015 (r285335) > +++ head/sys/netipsec/xform_esp.c Thu Jul 9 18:16:35 2015 (r285336) > @@ -121,6 +121,12 @@ esp_algorithm_lookup(int alg) > return &enc_xform_null; > case SADB_X_EALG_CAMELLIACBC: > return &enc_xform_camellia; > + case SADB_X_EALG_AESCTR: > + return &enc_xform_aes_icm; > + case SADB_X_EALG_AESGCM16: > + return &enc_xform_aes_nist_gcm; > + case SADB_X_EALG_AESGMAC: > + return &enc_xform_aes_nist_gmac; > } > return NULL; > } > @@ -198,7 +204,7 @@ esp_init(struct secasvar *sav, struct xf > * the ESP header will be processed incorrectly. The > * compromise is to force it to zero here. > */ > - sav->ivlen = (txform == &enc_xform_null ? 0 : txform->blocksize); > + sav->ivlen = (txform == &enc_xform_null ? 0 : txform->ivsize); > sav->iv = (caddr_t) malloc(sav->ivlen, M_XDATA, M_WAITOK); > key_randomfill(sav->iv, sav->ivlen); /*XXX*/ > > @@ -215,11 +221,45 @@ esp_init(struct secasvar *sav, struct xf > sav->tdb_xform = xsp; > sav->tdb_encalgxform = txform; > > + /* > + * Whenever AES-GCM is used for encryption, one > + * of the AES authentication algorithms is chosen > + * as well, based on the key size. > + */ > + if (sav->alg_enc == SADB_X_EALG_AESGCM16) { > + switch (keylen) { > + case AES_128_HMAC_KEY_LEN: > + sav->alg_auth = SADB_X_AALG_AES128GMAC; > + sav->tdb_authalgxform = &auth_hash_nist_gmac_aes_128; > + break; > + case AES_192_HMAC_KEY_LEN: > + sav->alg_auth = SADB_X_AALG_AES192GMAC; > + sav->tdb_authalgxform = &auth_hash_nist_gmac_aes_192; > + break; > + case AES_256_HMAC_KEY_LEN: > + sav->alg_auth = SADB_X_AALG_AES256GMAC; > + sav->tdb_authalgxform = &auth_hash_nist_gmac_aes_256; > + break; > + default: > + DPRINTF(("%s: invalid key length %u" > + "for algorithm %s\n", __func__, > + keylen, txform->name)); > + return EINVAL; > + } > + bzero(&cria, sizeof(cria)); > + cria.cri_alg = sav->tdb_authalgxform->type; > + cria.cri_klen = _KEYBITS(sav->key_enc) + 4; > + cria.cri_key = sav->key_enc->key_data; > + } > + > /* Initialize crypto session. */ > bzero(&crie, sizeof (crie)); > crie.cri_alg = sav->tdb_encalgxform->type; > crie.cri_klen = _KEYBITS(sav->key_enc); > crie.cri_key = sav->key_enc->key_data; > + if (sav->alg_enc == SADB_X_EALG_AESGCM16) > + arc4rand(crie.cri_iv, sav->ivlen, 0); > + > /* XXX Rounds ? */ > > if (sav->tdb_authalgxform && sav->tdb_encalgxform) { > @@ -289,7 +329,6 @@ esp_input(struct mbuf *m, struct secasva > m_freem(m); > return EINVAL; > } > - > /* XXX don't pullup, just copy header */ > IP6_EXTHDR_GET(esp, struct newesp *, m, skip, sizeof (struct > newesp)); > > @@ -302,18 +341,7 @@ esp_input(struct mbuf *m, struct secasva > else > hlen = sizeof (struct newesp) + sav->ivlen; > /* Authenticator hash size */ > - if (esph != NULL) { > - switch (esph->type) { > - case CRYPTO_SHA2_256_HMAC: > - case CRYPTO_SHA2_384_HMAC: > - case CRYPTO_SHA2_512_HMAC: > - alen = esph->hashsize/2; > - break; > - default: > - alen = AH_HMAC_HASHLEN; > - break; > - } > - } > + alen = esph ? esph->hashsize : 0; > > /* > * Verify payload length is multiple of encryption algorithm > @@ -325,13 +353,15 @@ esp_input(struct mbuf *m, struct secasva > */ > plen = m->m_pkthdr.len - (skip + hlen + alen); > if ((plen & (espx->blocksize - 1)) || (plen <= 0)) { > - DPRINTF(("%s: payload of %d octets not a multiple of %d octets," > - " SA %s/%08lx\n", __func__, > - plen, espx->blocksize, ipsec_address(&sav->sah->saidx.dst, > - buf, sizeof(buf)), (u_long) ntohl(sav->spi))); > - ESPSTAT_INC(esps_badilen); > - m_freem(m); > - return EINVAL; > + if (!espx || sav->alg_enc != SADB_X_EALG_AESGCM16) { > + DPRINTF(("%s: payload of %d octets not a multiple of %d octets," > + " SA %s/%08lx\n", __func__, > + plen, espx->blocksize, ipsec_address(&sav->sah->saidx.dst, > + buf, sizeof(buf)), (u_long) ntohl(sav->spi))); > + ESPSTAT_INC(esps_badilen); > + m_freem(m); > + return EINVAL; > + } > } > > /* > @@ -377,12 +407,20 @@ esp_input(struct mbuf *m, struct secasva > > /* Authentication descriptor */ > crda->crd_skip = skip; > - crda->crd_len = m->m_pkthdr.len - (skip + alen); > + if (espx && espx->type == CRYPTO_AES_NIST_GCM_16) > + crda->crd_len = hlen - sav->ivlen; > + else > + crda->crd_len = m->m_pkthdr.len - (skip + alen); > crda->crd_inject = m->m_pkthdr.len - alen; > > crda->crd_alg = esph->type; > - crda->crd_key = sav->key_auth->key_data; > - crda->crd_klen = _KEYBITS(sav->key_auth); > + if (espx && (espx->type == CRYPTO_AES_NIST_GCM_16)) { > + crda->crd_key = sav->key_enc->key_data; > + crda->crd_klen = _KEYBITS(sav->key_enc); > + } else { > + crda->crd_key = sav->key_auth->key_data; > + crda->crd_klen = _KEYBITS(sav->key_auth); > + } > > /* Copy the authenticator */ > m_copydata(m, m->m_pkthdr.len - alen, alen, > @@ -420,6 +458,9 @@ esp_input(struct mbuf *m, struct secasva > crde->crd_alg = espx->type; > crde->crd_key = sav->key_enc->key_data; > crde->crd_klen = _KEYBITS(sav->key_enc); > + if (espx && (espx->type == CRYPTO_AES_NIST_GCM_16)) > + crde->crd_flags |= CRD_F_IV_EXPLICIT; > + > /* XXX Rounds ? */ > > return (crypto_dispatch(crp)); > @@ -489,16 +530,7 @@ esp_input_cb(struct cryptop *crp) > > /* If authentication was performed, check now. */ > if (esph != NULL) { > - switch (esph->type) { > - case CRYPTO_SHA2_256_HMAC: > - case CRYPTO_SHA2_384_HMAC: > - case CRYPTO_SHA2_512_HMAC: > - alen = esph->hashsize/2; > - break; > - default: > - alen = AH_HMAC_HASHLEN; > - break; > - } > + alen = esph->hashsize; > AHSTAT_INC(ahs_hist[sav->alg_auth]); > /* Copy the authenticator from the packet */ > m_copydata(m, m->m_pkthdr.len - alen, alen, aalg); > @@ -663,22 +695,13 @@ esp_output(struct mbuf *m, struct ipsecr > * NB: The null encoding transform has a blocksize of 4 > * so that headers are properly aligned. > */ > - blks = espx->blocksize; /* IV blocksize */ > + blks = espx->ivsize; /* IV blocksize */ > > /* XXX clamp padding length a la KAME??? */ > padding = ((blks - ((rlen + 2) % blks)) % blks) + 2; > > if (esph) > - switch (esph->type) { > - case CRYPTO_SHA2_256_HMAC: > - case CRYPTO_SHA2_384_HMAC: > - case CRYPTO_SHA2_512_HMAC: > - alen = esph->hashsize/2; > - break; > - default: > - alen = AH_HMAC_HASHLEN; > - break; > - } > + alen = esph->hashsize; > else > alen = 0; > > @@ -706,6 +729,8 @@ esp_output(struct mbuf *m, struct ipsecr > error = EPFNOSUPPORT; > goto bad; > } > + DPRINTF(("%s: skip %d hlen %d rlen %d padding %d alen %d blksd > %d\n", > + __func__, skip, hlen, rlen, padding, alen, blks)); > if (skip + hlen + rlen + padding + alen > maxpacketsize) { > DPRINTF(("%s: packet in SA %s/%08lx got too big " > "(len %u, max len %u)\n", __func__, > @@ -820,6 +845,8 @@ esp_output(struct mbuf *m, struct ipsecr > crde->crd_alg = espx->type; > crde->crd_key = sav->key_enc->key_data; > crde->crd_klen = _KEYBITS(sav->key_enc); > + if (espx->type == CRYPTO_AES_NIST_GCM_16) > + crde->crd_flags |= CRD_F_IV_EXPLICIT; > /* XXX Rounds ? */ > } else > crda = crp->crp_desc; > @@ -854,13 +881,22 @@ esp_output(struct mbuf *m, struct ipsecr > if (esph) { > /* Authentication descriptor. */ > crda->crd_skip = skip; > - crda->crd_len = m->m_pkthdr.len - (skip + alen); > + if (espx && espx->type == CRYPTO_AES_NIST_GCM_16) > + crda->crd_len = hlen - sav->ivlen; > + else > + crda->crd_len = m->m_pkthdr.len - (skip + alen); > crda->crd_inject = m->m_pkthdr.len - alen; > > /* Authentication operation. */ > crda->crd_alg = esph->type; > - crda->crd_key = sav->key_auth->key_data; > - crda->crd_klen = _KEYBITS(sav->key_auth); > + if (espx && espx->type == CRYPTO_AES_NIST_GCM_16) { > + crda->crd_key = sav->key_enc->key_data; > + crda->crd_klen = _KEYBITS(sav->key_enc); > + } else { > + crda->crd_key = sav->key_auth->key_data; > + crda->crd_klen = _KEYBITS(sav->key_auth); > + } > + > } > > return crypto_dispatch(crp); > @@ -953,6 +989,11 @@ esp_output_cb(struct cryptop *crp) > case CRYPTO_SHA2_512_HMAC: > alen = esph->hashsize/2; > break; > + case CRYPTO_AES_128_GMAC: > + case CRYPTO_AES_192_GMAC: > + case CRYPTO_AES_256_GMAC: > + alen = esph->hashsize; > + break; > default: > alen = AH_HMAC_HASHLEN; > break; > > Modified: head/sys/opencrypto/cryptodev.h > ============================================================================== > --- head/sys/opencrypto/cryptodev.h Thu Jul 9 17:45:08 2015 (r285335) > +++ head/sys/opencrypto/cryptodev.h Thu Jul 9 18:16:35 2015 (r285336) > @@ -78,6 +78,7 @@ > #define SHA2_512_HASH_LEN 64 > #define MD5_KPDK_HASH_LEN 16 > #define SHA1_KPDK_HASH_LEN 20 > +#define AES_HASH_LEN 16 > /* Maximum hash algorithm result length */ > #define HASH_MAX_LEN SHA2_512_HASH_LEN /* Keep this updated */ > > @@ -86,28 +87,74 @@ > #define MD5_HMAC_BLOCK_LEN 64 > #define SHA1_HMAC_BLOCK_LEN 64 > #define RIPEMD160_HMAC_BLOCK_LEN 64 > -#define SHA2_256_HMAC_BLOCK_LEN 64 > -#define SHA2_384_HMAC_BLOCK_LEN 128 > -#define SHA2_512_HMAC_BLOCK_LEN 128 > +#define SHA2_256_HMAC_BLOCK_LEN 64 > +#define SHA2_384_HMAC_BLOCK_LEN 128 > +#define SHA2_512_HMAC_BLOCK_LEN 128 > /* Maximum HMAC block length */ > -#define HMAC_MAX_BLOCK_LEN SHA2_512_HMAC_BLOCK_LEN /* Keep this > updated */ > +#define HMAC_MAX_BLOCK_LEN SHA2_512_HMAC_BLOCK_LEN /* Keep this > updated */ > #define HMAC_IPAD_VAL 0x36 > #define HMAC_OPAD_VAL 0x5C > +/* HMAC Key Length */ > +#define NULL_HMAC_KEY_LEN 0 > +#define MD5_HMAC_KEY_LEN 16 > +#define SHA1_HMAC_KEY_LEN 20 > +#define RIPEMD160_HMAC_KEY_LEN 20 > +#define SHA2_256_HMAC_KEY_LEN 32 > +#define SHA2_384_HMAC_KEY_LEN 48 > +#define SHA2_512_HMAC_KEY_LEN 64 > +#define AES_128_HMAC_KEY_LEN 16 > +#define AES_192_HMAC_KEY_LEN 24 > +#define AES_256_HMAC_KEY_LEN 32 > > /* Encryption algorithm block sizes */ > -#define NULL_BLOCK_LEN 4 > -#define DES_BLOCK_LEN 8 > -#define DES3_BLOCK_LEN 8 > -#define BLOWFISH_BLOCK_LEN 8 > -#define SKIPJACK_BLOCK_LEN 8 > -#define CAST128_BLOCK_LEN 8 > -#define RIJNDAEL128_BLOCK_LEN 16 > -#define AES_BLOCK_LEN RIJNDAEL128_BLOCK_LEN > -#define CAMELLIA_BLOCK_LEN 16 > -#define EALG_MAX_BLOCK_LEN AES_BLOCK_LEN /* Keep this updated */ > +#define NULL_BLOCK_LEN 4 > +#define DES_BLOCK_LEN 8 > +#define DES3_BLOCK_LEN 8 > +#define BLOWFISH_BLOCK_LEN 8 > +#define SKIPJACK_BLOCK_LEN 8 > +#define CAST128_BLOCK_LEN 8 > +#define RIJNDAEL128_BLOCK_LEN 16 > +#define AES_BLOCK_LEN 16 > +#define AES_MIN_BLOCK_LEN 1 > +#define ARC4_BLOCK_LEN 1 > +#define CAMELLIA_BLOCK_LEN 16 > +#define EALG_MAX_BLOCK_LEN AES_BLOCK_LEN /* Keep this updated */ > + > +/* IV Lengths */ > + > +#define ARC4_IV_LEN 1 > +#define AES_IV_LEN 12 > +#define AES_XTS_IV_LEN 8 > +#define AES_XTS_ALPHA 0x87 /* GF(2^128) generator polynomial */ > + > +#define AES_CTR_NONCE_SIZE 4 > + > +/* Min and Max Encryption Key Sizes */ > +#define NULL_MIN_KEY 0 > +#define NULL_MAX_KEY 256 /* 2048 bits, max key */ > +#define DES_MIN_KEY 8 > +#define DES_MAX_KEY DES_MIN_KEY > +#define TRIPLE_DES_MIN_KEY 24 > +#define TRIPLE_DES_MAX_KEY TRIPLE_DES_MIN_KEY > +#define BLOWFISH_MIN_KEY 5 > +#define BLOWFISH_MAX_KEY 56 /* 448 bits, max key */ > +#define CAST_MIN_KEY 5 > +#define CAST_MAX_KEY 16 > +#define SKIPJACK_MIN_KEY 10 > +#define SKIPJACK_MAX_KEY SKIPJACK_MIN_KEY > +#define RIJNDAEL_MIN_KEY 16 > +#define RIJNDAEL_MAX_KEY 32 > +#define AES_MIN_KEY 16 > +#define AES_MAX_KEY 32 > +#define AES_XTS_MIN_KEY 32 > +#define AES_XTS_MAX_KEY 64 > +#define ARC4_MIN_KEY 1 > +#define ARC4_MAX_KEY 32 > +#define CAMELLIA_MIN_KEY 8 > +#define CAMELLIA_MAX_KEY 32 > > /* Maximum hash algorithm result length */ > -#define AALG_MAX_RESULT_LEN 64 /* Keep this updated */ > +#define AALG_MAX_RESULT_LEN 64 /* Keep this updated */ > > #define CRYPTO_ALGORITHM_MIN 1 > #define CRYPTO_DES_CBC 1 > @@ -141,7 +188,7 @@ > #define CRYPTO_AES_256_NIST_GMAC 28 /* auth side */ > #define CRYPTO_ALGORITHM_MAX 28 /* Keep updated - see below */ > > -#define CRYPTO_ALGO_VALID(x) ((x) >= CRYPTO_ALGORITHM_MIN && \ > +#define CRYPTO_ALGO_VALID(x) ((x) >= CRYPTO_ALGORITHM_MIN && \ > (x) <= CRYPTO_ALGORITHM_MAX) > > /* Algorithm flags */ > > Modified: head/sys/opencrypto/xform.c > ============================================================================== > --- head/sys/opencrypto/xform.c Thu Jul 9 17:45:08 2015 (r285335) > +++ head/sys/opencrypto/xform.c Thu Jul 9 18:16:35 2015 (r285336) > @@ -154,7 +154,7 @@ MALLOC_DEFINE(M_XDATA, "xform", "xform d > struct enc_xform enc_xform_null = { > CRYPTO_NULL_CBC, "NULL", > /* NB: blocksize of 4 is to generate a properly aligned ESP header */ > - NULL_BLOCK_LEN, NULL_BLOCK_LEN, 0, 256, /* 2048 bits, max key */ > + NULL_BLOCK_LEN, NULL_BLOCK_LEN, NULL_MIN_KEY, NULL_MAX_KEY, > null_encrypt, > null_decrypt, > null_setkey, > @@ -164,7 +164,7 @@ struct enc_xform enc_xform_null = { > > struct enc_xform enc_xform_des = { > CRYPTO_DES_CBC, "DES", > - DES_BLOCK_LEN, DES_BLOCK_LEN, 8, 8, > + DES_BLOCK_LEN, DES_BLOCK_LEN, DES_MIN_KEY, DES_MAX_KEY, > des1_encrypt, > des1_decrypt, > des1_setkey, > @@ -174,7 +174,8 @@ struct enc_xform enc_xform_des = { > > struct enc_xform enc_xform_3des = { > CRYPTO_3DES_CBC, "3DES", > - DES3_BLOCK_LEN, DES3_BLOCK_LEN, 24, 24, > + DES3_BLOCK_LEN, DES3_BLOCK_LEN, TRIPLE_DES_MIN_KEY, > + TRIPLE_DES_MAX_KEY, > des3_encrypt, > des3_decrypt, > des3_setkey, > @@ -184,7 +185,8 @@ struct enc_xform enc_xform_3des = { > > struct enc_xform enc_xform_blf = { > CRYPTO_BLF_CBC, "Blowfish", > - BLOWFISH_BLOCK_LEN, BLOWFISH_BLOCK_LEN, 5, 56 /* 448 bits, max key > */, > + BLOWFISH_BLOCK_LEN, BLOWFISH_BLOCK_LEN, BLOWFISH_MIN_KEY, > + BLOWFISH_MAX_KEY, > blf_encrypt, > blf_decrypt, > blf_setkey, > @@ -194,7 +196,7 @@ struct enc_xform enc_xform_blf = { > > struct enc_xform enc_xform_cast5 = { > CRYPTO_CAST_CBC, "CAST-128", > - CAST128_BLOCK_LEN, CAST128_BLOCK_LEN, 5, 16, > + CAST128_BLOCK_LEN, CAST128_BLOCK_LEN, CAST_MIN_KEY, CAST_MAX_KEY, > cast5_encrypt, > cast5_decrypt, > cast5_setkey, > @@ -204,7 +206,8 @@ struct enc_xform enc_xform_cast5 = { > > struct enc_xform enc_xform_skipjack = { > CRYPTO_SKIPJACK_CBC, "Skipjack", > - SKIPJACK_BLOCK_LEN, SKIPJACK_BLOCK_LEN, 10, 10, > + SKIPJACK_BLOCK_LEN, SKIPJACK_BLOCK_LEN, SKIPJACK_MIN_KEY, > + SKIPJACK_MAX_KEY, > skipjack_encrypt, > skipjack_decrypt, skipjack_setkey, > skipjack_zerokey, > @@ -213,7 +216,8 @@ struct enc_xform enc_xform_skipjack = { > > struct enc_xform enc_xform_rijndael128 = { > CRYPTO_RIJNDAEL128_CBC, "Rijndael-128/AES", > - RIJNDAEL128_BLOCK_LEN, RIJNDAEL128_BLOCK_LEN, 16, 32, > + RIJNDAEL128_BLOCK_LEN, RIJNDAEL128_BLOCK_LEN, RIJNDAEL_MIN_KEY, > + RIJNDAEL_MAX_KEY, > rijndael128_encrypt, > rijndael128_decrypt, > rijndael128_setkey, > @@ -223,7 +227,7 @@ struct enc_xform enc_xform_rijndael128 = > > struct enc_xform enc_xform_aes_icm = { > CRYPTO_AES_ICM, "AES-ICM", > - RIJNDAEL128_BLOCK_LEN, RIJNDAEL128_BLOCK_LEN, 16, 32, > + RIJNDAEL128_BLOCK_LEN, RIJNDAEL128_BLOCK_LEN, AES_MIN_KEY, > AES_MAX_KEY, > aes_icm_crypt, > aes_icm_crypt, > aes_icm_setkey, > @@ -233,7 +237,7 @@ struct enc_xform enc_xform_aes_icm = { > > struct enc_xform enc_xform_aes_nist_gcm = { > CRYPTO_AES_NIST_GCM_16, "AES-GCM", > - 1, 12, 16, 32, > + AES_MIN_BLOCK_LEN, AES_IV_LEN, AES_MIN_KEY, AES_MAX_KEY, > aes_icm_crypt, > aes_icm_crypt, > aes_icm_setkey, > @@ -243,7 +247,7 @@ struct enc_xform enc_xform_aes_nist_gcm > > struct enc_xform enc_xform_aes_nist_gmac = { > CRYPTO_AES_NIST_GMAC, "AES-GMAC", > - 1, 12, 16, 32, > + AES_MIN_BLOCK_LEN, AES_IV_LEN, AES_MIN_KEY, AES_MAX_KEY, > NULL, > NULL, > NULL, > @@ -253,7 +257,7 @@ struct enc_xform enc_xform_aes_nist_gmac > > struct enc_xform enc_xform_aes_xts = { > CRYPTO_AES_XTS, "AES-XTS", > - RIJNDAEL128_BLOCK_LEN, 8, 32, 64, > + AES_MIN_BLOCK_LEN, AES_XTS_IV_LEN, AES_XTS_MIN_KEY, AES_XTS_MAX_KEY, > aes_xts_encrypt, > aes_xts_decrypt, > aes_xts_setkey, > @@ -263,7 +267,7 @@ struct enc_xform enc_xform_aes_xts = { > > struct enc_xform enc_xform_arc4 = { > CRYPTO_ARC4, "ARC4", > - 1, 1, 1, 32, > + ARC4_BLOCK_LEN, ARC4_IV_LEN, ARC4_MIN_KEY, ARC4_MAX_KEY, > NULL, > NULL, > NULL, > @@ -273,7 +277,8 @@ struct enc_xform enc_xform_arc4 = { > > struct enc_xform enc_xform_camellia = { > CRYPTO_CAMELLIA_CBC, "Camellia", > - CAMELLIA_BLOCK_LEN, CAMELLIA_BLOCK_LEN, 8, 32, > + CAMELLIA_BLOCK_LEN, CAMELLIA_BLOCK_LEN, CAMELLIA_MIN_KEY, > + CAMELLIA_MAX_KEY, > cml_encrypt, > cml_decrypt, > cml_setkey, > @@ -284,67 +289,72 @@ struct enc_xform enc_xform_camellia = { > /* Authentication instances */ > struct auth_hash auth_hash_null = { /* NB: context isn't used */ > CRYPTO_NULL_HMAC, "NULL-HMAC", > - 0, NULL_HASH_LEN, sizeof(int), NULL_HMAC_BLOCK_LEN, > + NULL_HMAC_KEY_LEN, NULL_HASH_LEN, sizeof(int), NULL_HMAC_BLOCK_LEN, > null_init, null_reinit, null_reinit, null_update, null_final > }; > > struct auth_hash auth_hash_hmac_md5 = { > CRYPTO_MD5_HMAC, "HMAC-MD5", > - 16, MD5_HASH_LEN, sizeof(MD5_CTX), MD5_HMAC_BLOCK_LEN, > + MD5_HMAC_KEY_LEN, MD5_HASH_LEN, sizeof(MD5_CTX), MD5_HMAC_BLOCK_LEN, > (void (*) (void *)) MD5Init, NULL, NULL, MD5Update_int, > (void (*) (u_int8_t *, void *)) MD5Final > }; > > struct auth_hash auth_hash_hmac_sha1 = { > CRYPTO_SHA1_HMAC, "HMAC-SHA1", > - 20, SHA1_HASH_LEN, sizeof(SHA1_CTX), SHA1_HMAC_BLOCK_LEN, > + SHA1_HMAC_KEY_LEN, SHA1_HASH_LEN, sizeof(SHA1_CTX), > SHA1_HMAC_BLOCK_LEN, > SHA1Init_int, NULL, NULL, SHA1Update_int, SHA1Final_int > }; > > struct auth_hash auth_hash_hmac_ripemd_160 = { > CRYPTO_RIPEMD160_HMAC, "HMAC-RIPEMD-160", > - 20, RIPEMD160_HASH_LEN, sizeof(RMD160_CTX), > RIPEMD160_HMAC_BLOCK_LEN, > + RIPEMD160_HMAC_KEY_LEN, RIPEMD160_HASH_LEN, sizeof(RMD160_CTX), > + RIPEMD160_HMAC_BLOCK_LEN, > (void (*)(void *)) RMD160Init, NULL, NULL, RMD160Update_int, > (void (*)(u_int8_t *, void *)) RMD160Final > }; > > struct auth_hash auth_hash_key_md5 = { > CRYPTO_MD5_KPDK, "Keyed MD5", > - 0, MD5_KPDK_HASH_LEN, sizeof(MD5_CTX), 0, > + NULL_HMAC_KEY_LEN, MD5_KPDK_HASH_LEN, sizeof(MD5_CTX), 0, > (void (*)(void *)) MD5Init, NULL, NULL, MD5Update_int, > (void (*)(u_int8_t *, void *)) MD5Final > }; > > struct auth_hash auth_hash_key_sha1 = { > CRYPTO_SHA1_KPDK, "Keyed SHA1", > - 0, SHA1_KPDK_HASH_LEN, sizeof(SHA1_CTX), 0, > + NULL_HMAC_KEY_LEN, SHA1_KPDK_HASH_LEN, sizeof(SHA1_CTX), 0, > SHA1Init_int, NULL, NULL, SHA1Update_int, SHA1Final_int > }; > > struct auth_hash auth_hash_hmac_sha2_256 = { > CRYPTO_SHA2_256_HMAC, "HMAC-SHA2-256", > - 32, SHA2_256_HASH_LEN, sizeof(SHA256_CTX), SHA2_256_HMAC_BLOCK_LEN, > + SHA2_256_HMAC_KEY_LEN, SHA2_256_HASH_LEN, sizeof(SHA256_CTX), > + SHA2_256_HMAC_BLOCK_LEN, > (void (*)(void *)) SHA256_Init, NULL, NULL, SHA256Update_int, > (void (*)(u_int8_t *, void *)) SHA256_Final > }; > > struct auth_hash auth_hash_hmac_sha2_384 = { > CRYPTO_SHA2_384_HMAC, "HMAC-SHA2-384", > - 48, SHA2_384_HASH_LEN, sizeof(SHA384_CTX), SHA2_384_HMAC_BLOCK_LEN, > + SHA2_384_HMAC_KEY_LEN, SHA2_384_HASH_LEN, sizeof(SHA384_CTX), > + SHA2_384_HMAC_BLOCK_LEN, > (void (*)(void *)) SHA384_Init, NULL, NULL, SHA384Update_int, > (void (*)(u_int8_t *, void *)) SHA384_Final > }; > > struct auth_hash auth_hash_hmac_sha2_512 = { > CRYPTO_SHA2_512_HMAC, "HMAC-SHA2-512", > - 64, SHA2_512_HASH_LEN, sizeof(SHA512_CTX), SHA2_512_HMAC_BLOCK_LEN, > + SHA2_512_HMAC_KEY_LEN, SHA2_512_HASH_LEN, sizeof(SHA512_CTX), > + SHA2_512_HMAC_BLOCK_LEN, > (void (*)(void *)) SHA512_Init, NULL, NULL, SHA512Update_int, > (void (*)(u_int8_t *, void *)) SHA512_Final > }; > > struct auth_hash auth_hash_nist_gmac_aes_128 = { > CRYPTO_AES_128_NIST_GMAC, "GMAC-AES-128", > - 16, 16, sizeof(struct aes_gmac_ctx), GMAC_BLOCK_LEN, > + AES_128_HMAC_KEY_LEN, AES_HASH_LEN, sizeof(struct aes_gmac_ctx), > + GMAC_BLOCK_LEN, > (void (*)(void *)) AES_GMAC_Init, > (void (*)(void *, const u_int8_t *, u_int16_t)) AES_GMAC_Setkey, > (void (*)(void *, const u_int8_t *, u_int16_t)) AES_GMAC_Reinit, > @@ -354,7 +364,8 @@ struct auth_hash auth_hash_nist_gmac_aes > > struct auth_hash auth_hash_nist_gmac_aes_192 = { > CRYPTO_AES_192_NIST_GMAC, "GMAC-AES-192", > - 24, 16, sizeof(struct aes_gmac_ctx), GMAC_BLOCK_LEN, > + AES_192_HMAC_KEY_LEN, AES_HASH_LEN, sizeof(struct aes_gmac_ctx), > + GMAC_BLOCK_LEN, > (void (*)(void *)) AES_GMAC_Init, > (void (*)(void *, const u_int8_t *, u_int16_t)) AES_GMAC_Setkey, > (void (*)(void *, const u_int8_t *, u_int16_t)) AES_GMAC_Reinit, > @@ -364,7 +375,8 @@ struct auth_hash auth_hash_nist_gmac_aes > > struct auth_hash auth_hash_nist_gmac_aes_256 = { > CRYPTO_AES_256_NIST_GMAC, "GMAC-AES-256", > - 32, 16, sizeof(struct aes_gmac_ctx), GMAC_BLOCK_LEN, > + AES_256_HMAC_KEY_LEN, AES_HASH_LEN, sizeof(struct aes_gmac_ctx), > + GMAC_BLOCK_LEN, > (void (*)(void *)) AES_GMAC_Init, > (void (*)(void *, const u_int8_t *, u_int16_t)) AES_GMAC_Setkey, > (void (*)(void *, const u_int8_t *, u_int16_t)) AES_GMAC_Reinit, From owner-svn-src-all@freebsd.org Thu Jul 9 21:53:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7F5D9A0FD0; Thu, 9 Jul 2015 21:53:42 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 B673769AD2; Thu, 9 Jul 2015 21:53:42 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69LrgMW010810; Thu, 9 Jul 2015 21:53:42 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69LrfkG010802; Thu, 9 Jul 2015 21:53:41 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201507092153.t69LrfkG010802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 9 Jul 2015 21:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285339 - in head: cddl/lib/libnvpair sys/cddl/contrib/opensolaris/common/nvpair sys/conf sys/modules/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 21:53:43 -0000 Author: oshogbo Date: Thu Jul 9 21:53:40 2015 New Revision: 285339 URL: https://svnweb.freebsd.org/changeset/base/285339 Log: Rename zfs nvpair files to not colidate with our nvlist. PR: 201356 Approved by: pjd (mentor) Added: head/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_fnvpair.c - copied unchanged from r285336, head/sys/cddl/contrib/opensolaris/common/nvpair/fnvpair.c head/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c - copied unchanged from r285336, head/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c head/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair_alloc_fixed.c - copied unchanged from r285336, head/sys/cddl/contrib/opensolaris/common/nvpair/nvpair_alloc_fixed.c Deleted: head/sys/cddl/contrib/opensolaris/common/nvpair/fnvpair.c head/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c head/sys/cddl/contrib/opensolaris/common/nvpair/nvpair_alloc_fixed.c Modified: head/cddl/lib/libnvpair/Makefile head/sys/conf/files head/sys/modules/zfs/Makefile Modified: head/cddl/lib/libnvpair/Makefile ============================================================================== --- head/cddl/lib/libnvpair/Makefile Thu Jul 9 21:02:40 2015 (r285338) +++ head/cddl/lib/libnvpair/Makefile Thu Jul 9 21:53:40 2015 (r285339) @@ -7,10 +7,10 @@ LIB= nvpair SRCS= libnvpair.c \ nvpair_alloc_system.c \ - nvpair_alloc_fixed.c \ - nvpair.c \ nvpair_json.c \ - fnvpair.c + opensolaris_fnvpair.c \ + opensolaris_nvpair.c \ + opensolaris_nvpair_alloc_fixed.c WARNS?= 0 CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include Copied: head/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_fnvpair.c (from r285336, head/sys/cddl/contrib/opensolaris/common/nvpair/fnvpair.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_fnvpair.c Thu Jul 9 21:53:40 2015 (r285339, copy of r285336, head/sys/cddl/contrib/opensolaris/common/nvpair/fnvpair.c) @@ -0,0 +1,512 @@ + +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +#include +#ifndef _KERNEL +#include +#else +#include +#include +#include +#include +#endif + +/* + * "Force" nvlist wrapper. + * + * These functions wrap the nvlist_* functions with assertions that assume + * the operation is successful. This allows the caller's code to be much + * more readable, especially for the fnvlist_lookup_* and fnvpair_value_* + * functions, which can return the requested value (rather than filling in + * a pointer). + * + * These functions use NV_UNIQUE_NAME, encoding NV_ENCODE_NATIVE, and allocate + * with KM_SLEEP. + * + * More wrappers should be added as needed -- for example + * nvlist_lookup_*_array and nvpair_value_*_array. + */ + +nvlist_t * +fnvlist_alloc(void) +{ + nvlist_t *nvl; + VERIFY0(nvlist_alloc(&nvl, NV_UNIQUE_NAME, KM_SLEEP)); + return (nvl); +} + +void +fnvlist_free(nvlist_t *nvl) +{ + nvlist_free(nvl); +} + +size_t +fnvlist_size(nvlist_t *nvl) +{ + size_t size; + VERIFY0(nvlist_size(nvl, &size, NV_ENCODE_NATIVE)); + return (size); +} + +/* + * Returns allocated buffer of size *sizep. Caller must free the buffer with + * fnvlist_pack_free(). + */ +char * +fnvlist_pack(nvlist_t *nvl, size_t *sizep) +{ + char *packed = 0; + VERIFY3U(nvlist_pack(nvl, &packed, sizep, NV_ENCODE_NATIVE, + KM_SLEEP), ==, 0); + return (packed); +} + +/*ARGSUSED*/ +void +fnvlist_pack_free(char *pack, size_t size) +{ +#ifdef _KERNEL + kmem_free(pack, size); +#else + free(pack); +#endif +} + +nvlist_t * +fnvlist_unpack(char *buf, size_t buflen) +{ + nvlist_t *rv; + VERIFY0(nvlist_unpack(buf, buflen, &rv, KM_SLEEP)); + return (rv); +} + +nvlist_t * +fnvlist_dup(nvlist_t *nvl) +{ + nvlist_t *rv; + VERIFY0(nvlist_dup(nvl, &rv, KM_SLEEP)); + return (rv); +} + +void +fnvlist_merge(nvlist_t *dst, nvlist_t *src) +{ + VERIFY0(nvlist_merge(dst, src, KM_SLEEP)); +} + +size_t +fnvlist_num_pairs(nvlist_t *nvl) +{ + size_t count = 0; + nvpair_t *pair; + + for (pair = nvlist_next_nvpair(nvl, 0); pair != NULL; + pair = nvlist_next_nvpair(nvl, pair)) + count++; + return (count); +} + +void +fnvlist_add_boolean(nvlist_t *nvl, const char *name) +{ + VERIFY0(nvlist_add_boolean(nvl, name)); +} + +void +fnvlist_add_boolean_value(nvlist_t *nvl, const char *name, boolean_t val) +{ + VERIFY0(nvlist_add_boolean_value(nvl, name, val)); +} + +void +fnvlist_add_byte(nvlist_t *nvl, const char *name, uchar_t val) +{ + VERIFY0(nvlist_add_byte(nvl, name, val)); +} + +void +fnvlist_add_int8(nvlist_t *nvl, const char *name, int8_t val) +{ + VERIFY0(nvlist_add_int8(nvl, name, val)); +} + +void +fnvlist_add_uint8(nvlist_t *nvl, const char *name, uint8_t val) +{ + VERIFY0(nvlist_add_uint8(nvl, name, val)); +} + +void +fnvlist_add_int16(nvlist_t *nvl, const char *name, int16_t val) +{ + VERIFY0(nvlist_add_int16(nvl, name, val)); +} + +void +fnvlist_add_uint16(nvlist_t *nvl, const char *name, uint16_t val) +{ + VERIFY0(nvlist_add_uint16(nvl, name, val)); +} + +void +fnvlist_add_int32(nvlist_t *nvl, const char *name, int32_t val) +{ + VERIFY0(nvlist_add_int32(nvl, name, val)); +} + +void +fnvlist_add_uint32(nvlist_t *nvl, const char *name, uint32_t val) +{ + VERIFY0(nvlist_add_uint32(nvl, name, val)); +} + +void +fnvlist_add_int64(nvlist_t *nvl, const char *name, int64_t val) +{ + VERIFY0(nvlist_add_int64(nvl, name, val)); +} + +void +fnvlist_add_uint64(nvlist_t *nvl, const char *name, uint64_t val) +{ + VERIFY0(nvlist_add_uint64(nvl, name, val)); +} + +void +fnvlist_add_string(nvlist_t *nvl, const char *name, const char *val) +{ + VERIFY0(nvlist_add_string(nvl, name, val)); +} + +void +fnvlist_add_nvlist(nvlist_t *nvl, const char *name, nvlist_t *val) +{ + VERIFY0(nvlist_add_nvlist(nvl, name, val)); +} + +void +fnvlist_add_nvpair(nvlist_t *nvl, nvpair_t *pair) +{ + VERIFY0(nvlist_add_nvpair(nvl, pair)); +} + +void +fnvlist_add_boolean_array(nvlist_t *nvl, const char *name, + boolean_t *val, uint_t n) +{ + VERIFY0(nvlist_add_boolean_array(nvl, name, val, n)); +} + +void +fnvlist_add_byte_array(nvlist_t *nvl, const char *name, uchar_t *val, uint_t n) +{ + VERIFY0(nvlist_add_byte_array(nvl, name, val, n)); +} + +void +fnvlist_add_int8_array(nvlist_t *nvl, const char *name, int8_t *val, uint_t n) +{ + VERIFY0(nvlist_add_int8_array(nvl, name, val, n)); +} + +void +fnvlist_add_uint8_array(nvlist_t *nvl, const char *name, uint8_t *val, uint_t n) +{ + VERIFY0(nvlist_add_uint8_array(nvl, name, val, n)); +} + +void +fnvlist_add_int16_array(nvlist_t *nvl, const char *name, int16_t *val, uint_t n) +{ + VERIFY0(nvlist_add_int16_array(nvl, name, val, n)); +} + +void +fnvlist_add_uint16_array(nvlist_t *nvl, const char *name, + uint16_t *val, uint_t n) +{ + VERIFY0(nvlist_add_uint16_array(nvl, name, val, n)); +} + +void +fnvlist_add_int32_array(nvlist_t *nvl, const char *name, int32_t *val, uint_t n) +{ + VERIFY0(nvlist_add_int32_array(nvl, name, val, n)); +} + +void +fnvlist_add_uint32_array(nvlist_t *nvl, const char *name, + uint32_t *val, uint_t n) +{ + VERIFY0(nvlist_add_uint32_array(nvl, name, val, n)); +} + +void +fnvlist_add_int64_array(nvlist_t *nvl, const char *name, int64_t *val, uint_t n) +{ + VERIFY0(nvlist_add_int64_array(nvl, name, val, n)); +} + +void +fnvlist_add_uint64_array(nvlist_t *nvl, const char *name, + uint64_t *val, uint_t n) +{ + VERIFY0(nvlist_add_uint64_array(nvl, name, val, n)); +} + +void +fnvlist_add_string_array(nvlist_t *nvl, const char *name, + char * const *val, uint_t n) +{ + VERIFY0(nvlist_add_string_array(nvl, name, val, n)); +} + +void +fnvlist_add_nvlist_array(nvlist_t *nvl, const char *name, + nvlist_t **val, uint_t n) +{ + VERIFY0(nvlist_add_nvlist_array(nvl, name, val, n)); +} + +void +fnvlist_remove(nvlist_t *nvl, const char *name) +{ + VERIFY0(nvlist_remove_all(nvl, name)); +} + +void +fnvlist_remove_nvpair(nvlist_t *nvl, nvpair_t *pair) +{ + VERIFY0(nvlist_remove_nvpair(nvl, pair)); +} + +nvpair_t * +fnvlist_lookup_nvpair(nvlist_t *nvl, const char *name) +{ + nvpair_t *rv; + VERIFY0(nvlist_lookup_nvpair(nvl, name, &rv)); + return (rv); +} + +/* returns B_TRUE if the entry exists */ +boolean_t +fnvlist_lookup_boolean(nvlist_t *nvl, const char *name) +{ + return (nvlist_lookup_boolean(nvl, name) == 0); +} + +boolean_t +fnvlist_lookup_boolean_value(nvlist_t *nvl, const char *name) +{ + boolean_t rv; + VERIFY0(nvlist_lookup_boolean_value(nvl, name, &rv)); + return (rv); +} + +uchar_t +fnvlist_lookup_byte(nvlist_t *nvl, const char *name) +{ + uchar_t rv; + VERIFY0(nvlist_lookup_byte(nvl, name, &rv)); + return (rv); +} + +int8_t +fnvlist_lookup_int8(nvlist_t *nvl, const char *name) +{ + int8_t rv; + VERIFY0(nvlist_lookup_int8(nvl, name, &rv)); + return (rv); +} + +int16_t +fnvlist_lookup_int16(nvlist_t *nvl, const char *name) +{ + int16_t rv; + VERIFY0(nvlist_lookup_int16(nvl, name, &rv)); + return (rv); +} + +int32_t +fnvlist_lookup_int32(nvlist_t *nvl, const char *name) +{ + int32_t rv; + VERIFY0(nvlist_lookup_int32(nvl, name, &rv)); + return (rv); +} + +int64_t +fnvlist_lookup_int64(nvlist_t *nvl, const char *name) +{ + int64_t rv; + VERIFY0(nvlist_lookup_int64(nvl, name, &rv)); + return (rv); +} + +uint8_t +fnvlist_lookup_uint8_t(nvlist_t *nvl, const char *name) +{ + uint8_t rv; + VERIFY0(nvlist_lookup_uint8(nvl, name, &rv)); + return (rv); +} + +uint16_t +fnvlist_lookup_uint16(nvlist_t *nvl, const char *name) +{ + uint16_t rv; + VERIFY0(nvlist_lookup_uint16(nvl, name, &rv)); + return (rv); +} + +uint32_t +fnvlist_lookup_uint32(nvlist_t *nvl, const char *name) +{ + uint32_t rv; + VERIFY0(nvlist_lookup_uint32(nvl, name, &rv)); + return (rv); +} + +uint64_t +fnvlist_lookup_uint64(nvlist_t *nvl, const char *name) +{ + uint64_t rv; + VERIFY0(nvlist_lookup_uint64(nvl, name, &rv)); + return (rv); +} + +char * +fnvlist_lookup_string(nvlist_t *nvl, const char *name) +{ + char *rv; + VERIFY0(nvlist_lookup_string(nvl, name, &rv)); + return (rv); +} + +nvlist_t * +fnvlist_lookup_nvlist(nvlist_t *nvl, const char *name) +{ + nvlist_t *rv; + VERIFY0(nvlist_lookup_nvlist(nvl, name, &rv)); + return (rv); +} + +boolean_t +fnvpair_value_boolean_value(nvpair_t *nvp) +{ + boolean_t rv; + VERIFY0(nvpair_value_boolean_value(nvp, &rv)); + return (rv); +} + +uchar_t +fnvpair_value_byte(nvpair_t *nvp) +{ + uchar_t rv; + VERIFY0(nvpair_value_byte(nvp, &rv)); + return (rv); +} + +int8_t +fnvpair_value_int8(nvpair_t *nvp) +{ + int8_t rv; + VERIFY0(nvpair_value_int8(nvp, &rv)); + return (rv); +} + +int16_t +fnvpair_value_int16(nvpair_t *nvp) +{ + int16_t rv; + VERIFY0(nvpair_value_int16(nvp, &rv)); + return (rv); +} + +int32_t +fnvpair_value_int32(nvpair_t *nvp) +{ + int32_t rv; + VERIFY0(nvpair_value_int32(nvp, &rv)); + return (rv); +} + +int64_t +fnvpair_value_int64(nvpair_t *nvp) +{ + int64_t rv; + VERIFY0(nvpair_value_int64(nvp, &rv)); + return (rv); +} + +uint8_t +fnvpair_value_uint8_t(nvpair_t *nvp) +{ + uint8_t rv; + VERIFY0(nvpair_value_uint8(nvp, &rv)); + return (rv); +} + +uint16_t +fnvpair_value_uint16(nvpair_t *nvp) +{ + uint16_t rv; + VERIFY0(nvpair_value_uint16(nvp, &rv)); + return (rv); +} + +uint32_t +fnvpair_value_uint32(nvpair_t *nvp) +{ + uint32_t rv; + VERIFY0(nvpair_value_uint32(nvp, &rv)); + return (rv); +} + +uint64_t +fnvpair_value_uint64(nvpair_t *nvp) +{ + uint64_t rv; + VERIFY0(nvpair_value_uint64(nvp, &rv)); + return (rv); +} + +char * +fnvpair_value_string(nvpair_t *nvp) +{ + char *rv; + VERIFY0(nvpair_value_string(nvp, &rv)); + return (rv); +} + +nvlist_t * +fnvpair_value_nvlist(nvpair_t *nvp) +{ + nvlist_t *rv; + VERIFY0(nvpair_value_nvlist(nvp, &rv)); + return (rv); +} Copied: head/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c (from r285336, head/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c Thu Jul 9 21:53:40 2015 (r285339, copy of r285336, head/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c) @@ -0,0 +1,3298 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + */ + +#include +#include +#include +#include +#include + +#if defined(_KERNEL) && !defined(_BOOT) +#include +#include +#else +#include +#include +#include +#include +#endif + +#ifndef offsetof +#define offsetof(s, m) ((size_t)(&(((s *)0)->m))) +#endif +#define skip_whitespace(p) while ((*(p) == ' ') || (*(p) == '\t')) p++ + +/* + * nvpair.c - Provides kernel & userland interfaces for manipulating + * name-value pairs. + * + * Overview Diagram + * + * +--------------+ + * | nvlist_t | + * |--------------| + * | nvl_version | + * | nvl_nvflag | + * | nvl_priv -+-+ + * | nvl_flag | | + * | nvl_pad | | + * +--------------+ | + * V + * +--------------+ last i_nvp in list + * | nvpriv_t | +---------------------> + * |--------------| | + * +--+- nvp_list | | +------------+ + * | | nvp_last -+--+ + nv_alloc_t | + * | | nvp_curr | |------------| + * | | nvp_nva -+----> | nva_ops | + * | | nvp_stat | | nva_arg | + * | +--------------+ +------------+ + * | + * +-------+ + * V + * +---------------------+ +-------------------+ + * | i_nvp_t | +-->| i_nvp_t | +--> + * |---------------------| | |-------------------| | + * | nvi_next -+--+ | nvi_next -+--+ + * | nvi_prev (NULL) | <----+ nvi_prev | + * | . . . . . . . . . . | | . . . . . . . . . | + * | nvp (nvpair_t) | | nvp (nvpair_t) | + * | - nvp_size | | - nvp_size | + * | - nvp_name_sz | | - nvp_name_sz | + * | - nvp_value_elem | | - nvp_value_elem | + * | - nvp_type | | - nvp_type | + * | - data ... | | - data ... | + * +---------------------+ +-------------------+ + * + * + * + * +---------------------+ +---------------------+ + * | i_nvp_t | +--> +-->| i_nvp_t (last) | + * |---------------------| | | |---------------------| + * | nvi_next -+--+ ... --+ | nvi_next (NULL) | + * <-+- nvi_prev |<-- ... <----+ nvi_prev | + * | . . . . . . . . . | | . . . . . . . . . | + * | nvp (nvpair_t) | | nvp (nvpair_t) | + * | - nvp_size | | - nvp_size | + * | - nvp_name_sz | | - nvp_name_sz | + * | - nvp_value_elem | | - nvp_value_elem | + * | - DATA_TYPE_NVLIST | | - nvp_type | + * | - data (embedded) | | - data ... | + * | nvlist name | +---------------------+ + * | +--------------+ | + * | | nvlist_t | | + * | |--------------| | + * | | nvl_version | | + * | | nvl_nvflag | | + * | | nvl_priv --+---+----> + * | | nvl_flag | | + * | | nvl_pad | | + * | +--------------+ | + * +---------------------+ + * + * + * N.B. nvpair_t may be aligned on 4 byte boundary, so +4 will + * allow value to be aligned on 8 byte boundary + * + * name_len is the length of the name string including the null terminator + * so it must be >= 1 + */ +#define NVP_SIZE_CALC(name_len, data_len) \ + (NV_ALIGN((sizeof (nvpair_t)) + name_len) + NV_ALIGN(data_len)) + +static int i_get_value_size(data_type_t type, const void *data, uint_t nelem); +static int nvlist_add_common(nvlist_t *nvl, const char *name, data_type_t type, + uint_t nelem, const void *data); + +#define NV_STAT_EMBEDDED 0x1 +#define EMBEDDED_NVL(nvp) ((nvlist_t *)(void *)NVP_VALUE(nvp)) +#define EMBEDDED_NVL_ARRAY(nvp) ((nvlist_t **)(void *)NVP_VALUE(nvp)) + +#define NVP_VALOFF(nvp) (NV_ALIGN(sizeof (nvpair_t) + (nvp)->nvp_name_sz)) +#define NVPAIR2I_NVP(nvp) \ + ((i_nvp_t *)((size_t)(nvp) - offsetof(i_nvp_t, nvi_nvp))) + + +int +nv_alloc_init(nv_alloc_t *nva, const nv_alloc_ops_t *nvo, /* args */ ...) +{ + va_list valist; + int err = 0; + + nva->nva_ops = nvo; + nva->nva_arg = NULL; + + va_start(valist, nvo); + if (nva->nva_ops->nv_ao_init != NULL) + err = nva->nva_ops->nv_ao_init(nva, valist); + va_end(valist); + + return (err); +} + +void +nv_alloc_reset(nv_alloc_t *nva) +{ + if (nva->nva_ops->nv_ao_reset != NULL) + nva->nva_ops->nv_ao_reset(nva); +} + +void +nv_alloc_fini(nv_alloc_t *nva) +{ + if (nva->nva_ops->nv_ao_fini != NULL) + nva->nva_ops->nv_ao_fini(nva); +} + +nv_alloc_t * +nvlist_lookup_nv_alloc(nvlist_t *nvl) +{ + nvpriv_t *priv; + + if (nvl == NULL || + (priv = (nvpriv_t *)(uintptr_t)nvl->nvl_priv) == NULL) + return (NULL); + + return (priv->nvp_nva); +} + +static void * +nv_mem_zalloc(nvpriv_t *nvp, size_t size) +{ + nv_alloc_t *nva = nvp->nvp_nva; + void *buf; + + if ((buf = nva->nva_ops->nv_ao_alloc(nva, size)) != NULL) + bzero(buf, size); + + return (buf); +} + +static void +nv_mem_free(nvpriv_t *nvp, void *buf, size_t size) +{ + nv_alloc_t *nva = nvp->nvp_nva; + + nva->nva_ops->nv_ao_free(nva, buf, size); +} + +static void +nv_priv_init(nvpriv_t *priv, nv_alloc_t *nva, uint32_t stat) +{ + bzero(priv, sizeof (nvpriv_t)); + + priv->nvp_nva = nva; + priv->nvp_stat = stat; +} + +static nvpriv_t * +nv_priv_alloc(nv_alloc_t *nva) +{ + nvpriv_t *priv; + + /* + * nv_mem_alloc() cannot called here because it needs the priv + * argument. + */ + if ((priv = nva->nva_ops->nv_ao_alloc(nva, sizeof (nvpriv_t))) == NULL) + return (NULL); + + nv_priv_init(priv, nva, 0); + + return (priv); +} + +/* + * Embedded lists need their own nvpriv_t's. We create a new + * nvpriv_t using the parameters and allocator from the parent + * list's nvpriv_t. + */ +static nvpriv_t * +nv_priv_alloc_embedded(nvpriv_t *priv) +{ + nvpriv_t *emb_priv; + + if ((emb_priv = nv_mem_zalloc(priv, sizeof (nvpriv_t))) == NULL) + return (NULL); + + nv_priv_init(emb_priv, priv->nvp_nva, NV_STAT_EMBEDDED); + + return (emb_priv); +} + +static void +nvlist_init(nvlist_t *nvl, uint32_t nvflag, nvpriv_t *priv) +{ + nvl->nvl_version = NV_VERSION; + nvl->nvl_nvflag = nvflag & (NV_UNIQUE_NAME|NV_UNIQUE_NAME_TYPE); + nvl->nvl_priv = (uint64_t)(uintptr_t)priv; + nvl->nvl_flag = 0; + nvl->nvl_pad = 0; +} + +uint_t +nvlist_nvflag(nvlist_t *nvl) +{ + return (nvl->nvl_nvflag); +} + +/* + * nvlist_alloc - Allocate nvlist. + */ +/*ARGSUSED1*/ +int +nvlist_alloc(nvlist_t **nvlp, uint_t nvflag, int kmflag) +{ +#if defined(_KERNEL) && !defined(_BOOT) + return (nvlist_xalloc(nvlp, nvflag, + (kmflag == KM_SLEEP ? nv_alloc_sleep : nv_alloc_nosleep))); +#else + return (nvlist_xalloc(nvlp, nvflag, nv_alloc_nosleep)); +#endif +} + +int +nvlist_xalloc(nvlist_t **nvlp, uint_t nvflag, nv_alloc_t *nva) +{ + nvpriv_t *priv; + + if (nvlp == NULL || nva == NULL) + return (EINVAL); + + if ((priv = nv_priv_alloc(nva)) == NULL) + return (ENOMEM); + + if ((*nvlp = nv_mem_zalloc(priv, + NV_ALIGN(sizeof (nvlist_t)))) == NULL) { + nv_mem_free(priv, priv, sizeof (nvpriv_t)); + return (ENOMEM); + } + + nvlist_init(*nvlp, nvflag, priv); + + return (0); +} + +/* + * nvp_buf_alloc - Allocate i_nvp_t for storing a new nv pair. + */ +static nvpair_t * +nvp_buf_alloc(nvlist_t *nvl, size_t len) +{ + nvpriv_t *priv = (nvpriv_t *)(uintptr_t)nvl->nvl_priv; + i_nvp_t *buf; + nvpair_t *nvp; + size_t nvsize; + + /* + * Allocate the buffer + */ + nvsize = len + offsetof(i_nvp_t, nvi_nvp); + + if ((buf = nv_mem_zalloc(priv, nvsize)) == NULL) + return (NULL); + + nvp = &buf->nvi_nvp; + nvp->nvp_size = len; + + return (nvp); +} + +/* + * nvp_buf_free - de-Allocate an i_nvp_t. + */ +static void +nvp_buf_free(nvlist_t *nvl, nvpair_t *nvp) +{ + nvpriv_t *priv = (nvpriv_t *)(uintptr_t)nvl->nvl_priv; + size_t nvsize = nvp->nvp_size + offsetof(i_nvp_t, nvi_nvp); + + nv_mem_free(priv, NVPAIR2I_NVP(nvp), nvsize); +} + +/* + * nvp_buf_link - link a new nv pair into the nvlist. + */ +static void +nvp_buf_link(nvlist_t *nvl, nvpair_t *nvp) +{ + nvpriv_t *priv = (nvpriv_t *)(uintptr_t)nvl->nvl_priv; + i_nvp_t *curr = NVPAIR2I_NVP(nvp); + + /* Put element at end of nvlist */ + if (priv->nvp_list == NULL) { + priv->nvp_list = priv->nvp_last = curr; + } else { + curr->nvi_prev = priv->nvp_last; + priv->nvp_last->nvi_next = curr; + priv->nvp_last = curr; + } +} + +/* + * nvp_buf_unlink - unlink an removed nvpair out of the nvlist. + */ +static void +nvp_buf_unlink(nvlist_t *nvl, nvpair_t *nvp) +{ + nvpriv_t *priv = (nvpriv_t *)(uintptr_t)nvl->nvl_priv; + i_nvp_t *curr = NVPAIR2I_NVP(nvp); + + /* + * protect nvlist_next_nvpair() against walking on freed memory. + */ + if (priv->nvp_curr == curr) + priv->nvp_curr = curr->nvi_next; + + if (curr == priv->nvp_list) + priv->nvp_list = curr->nvi_next; + else + curr->nvi_prev->nvi_next = curr->nvi_next; + + if (curr == priv->nvp_last) + priv->nvp_last = curr->nvi_prev; + else + curr->nvi_next->nvi_prev = curr->nvi_prev; +} + +/* + * take a nvpair type and number of elements and make sure the are valid + */ +static int +i_validate_type_nelem(data_type_t type, uint_t nelem) +{ + switch (type) { + case DATA_TYPE_BOOLEAN: + if (nelem != 0) + return (EINVAL); + break; + case DATA_TYPE_BOOLEAN_VALUE: + case DATA_TYPE_BYTE: + case DATA_TYPE_INT8: + case DATA_TYPE_UINT8: + case DATA_TYPE_INT16: + case DATA_TYPE_UINT16: + case DATA_TYPE_INT32: + case DATA_TYPE_UINT32: + case DATA_TYPE_INT64: + case DATA_TYPE_UINT64: + case DATA_TYPE_STRING: + case DATA_TYPE_HRTIME: + case DATA_TYPE_NVLIST: +#if !defined(_KERNEL) + case DATA_TYPE_DOUBLE: +#endif + if (nelem != 1) + return (EINVAL); + break; + case DATA_TYPE_BOOLEAN_ARRAY: + case DATA_TYPE_BYTE_ARRAY: + case DATA_TYPE_INT8_ARRAY: + case DATA_TYPE_UINT8_ARRAY: + case DATA_TYPE_INT16_ARRAY: + case DATA_TYPE_UINT16_ARRAY: + case DATA_TYPE_INT32_ARRAY: + case DATA_TYPE_UINT32_ARRAY: + case DATA_TYPE_INT64_ARRAY: + case DATA_TYPE_UINT64_ARRAY: + case DATA_TYPE_STRING_ARRAY: + case DATA_TYPE_NVLIST_ARRAY: + /* we allow arrays with 0 elements */ + break; + default: + return (EINVAL); + } + return (0); +} + +/* + * Verify nvp_name_sz and check the name string length. + */ +static int +i_validate_nvpair_name(nvpair_t *nvp) +{ + if ((nvp->nvp_name_sz <= 0) || + (nvp->nvp_size < NVP_SIZE_CALC(nvp->nvp_name_sz, 0))) + return (EFAULT); + + /* verify the name string, make sure its terminated */ + if (NVP_NAME(nvp)[nvp->nvp_name_sz - 1] != '\0') + return (EFAULT); + + return (strlen(NVP_NAME(nvp)) == nvp->nvp_name_sz - 1 ? 0 : EFAULT); +} + +static int +i_validate_nvpair_value(data_type_t type, uint_t nelem, const void *data) +{ + switch (type) { + case DATA_TYPE_BOOLEAN_VALUE: + if (*(boolean_t *)data != B_TRUE && + *(boolean_t *)data != B_FALSE) + return (EINVAL); + break; + case DATA_TYPE_BOOLEAN_ARRAY: { + int i; + + for (i = 0; i < nelem; i++) + if (((boolean_t *)data)[i] != B_TRUE && + ((boolean_t *)data)[i] != B_FALSE) + return (EINVAL); + break; + } + default: + break; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jul 9 21:58:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBB163059; Thu, 9 Jul 2015 21:58:20 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: from mail-la0-x233.google.com (mail-la0-x233.google.com [IPv6:2a00:1450:4010:c03::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 54BC669CDF; Thu, 9 Jul 2015 21:58:20 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: by lagc2 with SMTP id c2so251534218lag.3; Thu, 09 Jul 2015 14:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=aJiIhrI6M5X/KijT8166Hpms+R8hhbVswylXCid2E8A=; b=P5z7jwJ+2ULfCujE614KtFjNAyHKJctNTy8I8YuKgc+WDJWi9ouV8H5OPH0NUc6trI z3y/d5vHUETpbJ5ZBy66rJw6zm7ZANwJHXpE1Bf/Ngi3TKsgdIxwxH8WEq59KIPt5ye7 Pea0VUMfC2W4KPd388aRF8PfzJEf1s13rdL61VtE31g1oXUvid8scJLbuy6upDHpZx0m 25fJz+L9oHD7C186v6aIobwc+HZ+D4Wi+7QhCHcB61Qf7fS96/3NtgbuuEmuTnWeFIlp iaS1Fr+Ms1L1RwTlB2nzqxVN/9lzlnmkI8NvBTvGa+BzOk9LtY5mbcaTH6SQkCquvYPa tyYQ== X-Received: by 10.112.156.70 with SMTP id wc6mr16568426lbb.97.1436479098116; Thu, 09 Jul 2015 14:58:18 -0700 (PDT) Received: from jarvis.local (89-75-96-100.dynamic.chello.pl. [89.75.96.100]) by smtp.gmail.com with ESMTPSA id t1sm1844742lbb.25.2015.07.09.14.58.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2015 14:58:16 -0700 (PDT) Sender: Mariusz Zaborski Date: Fri, 10 Jul 2015 00:05:31 +0200 From: Mariusz Zaborski To: Peter Wemm Cc: svn-src-head@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r285139 - in head: lib/libnv sys/conf sys/contrib/libnv sys/kern sys/sys Message-ID: <20150709220530.GA96451@jarvis.local> References: <201507041633.t64GXcmT097180@repo.freebsd.org> <12132227.txsMvZmjyr@overcee.wemm.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: <12132227.txsMvZmjyr@overcee.wemm.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 21:58:20 -0000 --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 09, 2015 at 01:29:54PM -0700, Peter Wemm wrote: > You have broken kernel builds for the freebsd.org cluster. By renaming= =20 > "subr_nvlist.o" to "nvlist.o" you now cause: >=20 Please check if everything is working after 285339. Sorry for troubles. Cheers, Mariusz --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJVnvAiXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBQ0I3NjA5RUE2Q0JEMTM5QUE5NUU2Mjg1 NDFFNzc1RTk2N0Y4OUNGAAoJEFQed16Wf4nPyG8P/jK6BaL5a3PODnGOXrJllv9S kQMK7/SuY+XiZ3Mv9k9ZIS7tfbzottC5nLWA83//4Ld1/Zf1fYoNe9nJXQLcrXBL n0SeDbBt34RsCeuzAOaCvnh4+JQIcZs5DSxssSKbUngLvR6oioLYXGh3JjSCYzbK XE5sjuE0+QSmUa5QDq6FE7wkK5nl9MnlXSU8LR+K0DjFyJHuns7u6EyrJJL1xlOa YTQLlv+1WBK0UxUnrpBpvZAr90SLiJabd/YvT4u1j1Jg3ONFltOQM3HrRLU1Wzrp qztMsWh28plc1jWL7Rg+WNTz4XCKhQixly0JVuRuwcnYHCKDkeQ3i1mdSTScsnGa hKafreJFa2QbjtqAveB+wFURUoDKTTbph1ovPRqbRdM2zZNf23js7iEInN6YLEgb yhOQTrWZpn1mw4041avSBgEdoQRj/RBzBj6ME5zLkPywt02E0fWBeSVnpQJTxL9I hf3/yCuQV2YVNgheqpSnHRk4VX4GHPPTHAcP9xWlgRDUHDqjNGKEnjL35o7pLxiJ LoVNFswxnI1fSBjiie72CT9WIetGnFyGMOsp+BiBCH57rjMa4BtoY7JtTuPOeL7c RghZ++LTl4HfSttjdbMXau0mHxKiRPxuceIs+v5WwPSDrqGO3nYwN2woHPk2qm8J ftlL9K0O416hkFEEdvrs =k+C2 -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5-- From owner-svn-src-all@freebsd.org Thu Jul 9 22:13:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DD2B3481; Thu, 9 Jul 2015 22:13:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 0F0757D1; Thu, 9 Jul 2015 22:13:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69MDNRw020879; Thu, 9 Jul 2015 22:13:23 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69MDNDH020878; Thu, 9 Jul 2015 22:13:23 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201507092213.t69MDNDH020878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 9 Jul 2015 22:13:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285340 - head/sys/dev/cxgb/ulp/iw_cxgb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 22:13:24 -0000 Author: dim Date: Thu Jul 9 22:13:23 2015 New Revision: 285340 URL: https://svnweb.freebsd.org/changeset/base/285340 Log: Fix swapped copyin(9) arguments in cxgb's iwch_arm_cq() function. Detected by clang 3.7.0 with the warning: sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c:309:18: error: variable 'rptr' is uninitialized when used here [-Werror,-Wuninitialized] chp->cq.rptr = rptr; ^~~~ MFC after: 1 week Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Thu Jul 9 21:53:40 2015 (r285339) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Thu Jul 9 22:13:23 2015 (r285340) @@ -303,7 +303,7 @@ iwch_arm_cq(struct ib_cq *ibcq, enum ib_ else cq_op = CQ_ARM_AN; if (chp->user_rptr_addr) { - if (copyin(&rptr, chp->user_rptr_addr, 4)) + if (copyin(chp->user_rptr_addr, &rptr, sizeof(rptr))) return (-EFAULT); mtx_lock(&chp->lock); chp->cq.rptr = rptr; From owner-svn-src-all@freebsd.org Thu Jul 9 22:26:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E92735C1; Thu, 9 Jul 2015 22:26:22 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 37509BDD; Thu, 9 Jul 2015 22:26:22 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id C3A8B382; Thu, 9 Jul 2015 15:26:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1436480781; bh=h570T6EB9IjHEloKvAM8BNF7RcOBCpJU5qSyyBt0V4o=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=NpTpGykNuboVnMRxZyckkIWZ3KDjribjhNJovVmutF15KAgNfo/YcGTwRdIsIndbg lMzg6ZGPszPYNaYF/L/Nk5BSjeWkoDPckHvvI6dH078LAH1hvZ/dlMk3H33ZCA89Lh ZXMslPVusz7wqg0sc9dhMtWdwNl560YHjS9FIKI0= From: Peter Wemm To: svn-src-all@freebsd.org Cc: "George V. Neville-Neil" , src-committers@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285336 - in head/sys: netipsec opencrypto Date: Thu, 09 Jul 2015 15:26:16 -0700 Message-ID: <15342729.MI2b1tqqeb@overcee.wemm.org> User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-Reply-To: <201507091816.t69IGawf097288@repo.freebsd.org> References: <201507091816.t69IGawf097288@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart8714517.QeEQxtmWbV"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 22:26:22 -0000 --nextPart8714517.QeEQxtmWbV Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Thursday, July 09, 2015 06:16:36 PM George V. Neville-Neil wrote: > Author: gnn > Date: Thu Jul 9 18:16:35 2015 > New Revision: 285336 > URL: https://svnweb.freebsd.org/changeset/base/285336 >=20 > Log: > Add support for AES modes to IPSec. These modes work both in softw= are > only mode and with hardware support on systems that have AESNI > instructions. >=20 > Differential Revision:=09D2936 > Reviewed by:=09jmg, eri, cognet > Sponsored by:=09Rubicon Communications (Netgate) >=20 > Modified: > head/sys/netipsec/xform_ah.c > head/sys/netipsec/xform_esp.c > @@ -953,6 +989,11 @@ esp_output_cb(struct cryptop *crp) > =09=09=09case CRYPTO_SHA2_512_HMAC: > =09=09=09=09alen =3D esph->hashsize/2; > =09=09=09=09break; > +=09=09=09case CRYPTO_AES_128_GMAC: > +=09=09=09case CRYPTO_AES_192_GMAC: > +=09=09=09case CRYPTO_AES_256_GMAC: > +=09=09=09=09alen =3D esph->hashsize; > +=09=09=09=09break; > =09=09=09default: > =09=09=09=09alen =3D AH_HMAC_HASHLEN; > =09=09=09=09break; This introduces a LINT compile failure: /usr/src/sys/netipsec/xform_esp.c:992:9: error: use of undeclared ident= ifier=20 'CRYPTO_AES_128_GMAC' case CRYPTO_AES_128_GMAC: ^ /usr/src/sys/netipsec/xform_esp.c:993:9: error: use of undeclared ident= ifier=20 'CRYPTO_AES_192_GMAC' case CRYPTO_AES_192_GMAC: ^ /usr/src/sys/netipsec/xform_esp.c:994:9: error: use of undeclared ident= ifier=20 'CRYPTO_AES_256_GMAC' case CRYPTO_AES_256_GMAC: ^ 3 errors generated. =2D-- xform_esp.o --- =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart8714517.QeEQxtmWbV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJVnvUIAAoJEDXWlwnsgJ4EyQ0H/Rj3A61gyAlr0patyEJm70ur eOFtW4uEmDPW6uUOyu4nKU9Y3MFtoc952BpdH7fysd3wd7rjzW4sFbDQxDjVd3Xh 1kdjUidpOXmTp4F2fJE3DxU8ogvQ8aU6yl6jtm8J1fiHftLGolIFFys65i59Do1H 6/ppZ+xiP5TH1TgeYzGKG7u+e4g6pepGbBiBU5jvqK1UoU0Q1hD/rBpxS3adb+0y 8NLlpE4MM/X3+Ems/+su88AepH2Vqu54OFpYPigsaFaRExVsj366W97h8Hye9M4G F7sm4rH5oxB8m6yJyL5omSDkoh9T9UIWFm21LZDdJqONb/ZE7NG6WNhVdCh5aW0= =gkb3 -----END PGP SIGNATURE----- --nextPart8714517.QeEQxtmWbV-- From owner-svn-src-all@freebsd.org Thu Jul 9 22:44:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4D6E38DA; Thu, 9 Jul 2015 22:44:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 8F14214DE; Thu, 9 Jul 2015 22:44:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69MiTaX035885; Thu, 9 Jul 2015 22:44:29 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69MiTfc035884; Thu, 9 Jul 2015 22:44:29 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507092244.t69MiTfc035884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 9 Jul 2015 22:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285341 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 22:44:29 -0000 Author: gjb Date: Thu Jul 9 22:44:28 2015 New Revision: 285341 URL: https://svnweb.freebsd.org/changeset/base/285341 Log: Remove duplicate file(1) update entry. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jul 9 22:13:23 2015 (r285340) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jul 9 22:44:28 2015 (r285341) @@ -227,9 +227,6 @@ Contributed Software - file has been - updated to version 5.22. - The &man.resolvconf.8; utility has been updated to version 3.7.0. From owner-svn-src-all@freebsd.org Thu Jul 9 22:55:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E13E839E5; Thu, 9 Jul 2015 22:55:44 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 B7ECC1BD3; Thu, 9 Jul 2015 22:55:44 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69Mtiu2041404; Thu, 9 Jul 2015 22:55:44 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69MtiG8041402; Thu, 9 Jul 2015 22:55:44 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201507092255.t69MtiG8041402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Thu, 9 Jul 2015 22:55:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285343 - stable/9/lib/libjail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 22:55:45 -0000 Author: jamie Date: Thu Jul 9 22:55:43 2015 New Revision: 285343 URL: https://svnweb.freebsd.org/changeset/base/285343 Log: MFC r241197: Fix some memory allocation errors: * jail_setv will leak a parameter name if jailparam_import fails. * jailparam_all loses the jailparam pointer on realloc error (a clear freshman mistake). * If jailparam_init fails, the caller doesn't need to jailparam_free the buffer. That's not really clear, so set things to NULL allowing jailparam_free to work without error (though it's still not required). Modified: stable/9/lib/libjail/jail.c Directory Properties: stable/9/lib/libjail/ (props changed) Modified: stable/9/lib/libjail/jail.c ============================================================================== --- stable/9/lib/libjail/jail.c Thu Jul 9 22:46:28 2015 (r285342) +++ stable/9/lib/libjail/jail.c Thu Jul 9 22:55:43 2015 (r285343) @@ -85,19 +85,22 @@ jail_setv(int flags, ...) (void)va_arg(tap, char *); va_end(tap); jp = alloca(njp * sizeof(struct jailparam)); - for (njp = 0; (name = va_arg(ap, char *)) != NULL; njp++) { + for (njp = 0; (name = va_arg(ap, char *)) != NULL;) { value = va_arg(ap, char *); - if (jailparam_init(jp + njp, name) < 0 || - jailparam_import(jp + njp, value) < 0) { - jailparam_free(jp, njp); - va_end(ap); - return (-1); - } + if (jailparam_init(jp + njp, name) < 0) + goto error; + if (jailparam_import(jp + njp++, value) < 0) + goto error; } va_end(ap); jid = jailparam_set(jp, njp, flags); jailparam_free(jp, njp); return (jid); + + error: + jailparam_free(jp, njp); + va_end(ap); + return (-1); } /* @@ -195,7 +198,7 @@ jail_getv(int flags, ...) int jailparam_all(struct jailparam **jpp) { - struct jailparam *jp; + struct jailparam *jp, *tjp; size_t mlen1, mlen2, buflen; int njp, nlist; int mib1[CTL_MAXNAME], mib2[CTL_MAXNAME - 2]; @@ -242,11 +245,10 @@ jailparam_all(struct jailparam **jpp) /* Add the parameter to the list */ if (njp >= nlist) { nlist *= 2; - jp = realloc(jp, nlist * sizeof(*jp)); - if (jp == NULL) { - jailparam_free(jp, njp); - return (-1); - } + tjp = realloc(jp, nlist * sizeof(*jp)); + if (tjp == NULL) + goto error; + jp = tjp; } if (jailparam_init(jp + njp, buf + sizeof(SJPARAM)) < 0) goto error; @@ -277,6 +279,8 @@ jailparam_init(struct jailparam *jp, con } if (jailparam_type(jp) < 0) { jailparam_free(jp, 1); + jp->jp_name = NULL; + jp->jp_value = NULL; return (-1); } return (0); From owner-svn-src-all@freebsd.org Thu Jul 9 23:10:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EABAD3B57; Thu, 9 Jul 2015 23:10:00 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 DAC3FB; Thu, 9 Jul 2015 23:10:00 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69NA08d047317; Thu, 9 Jul 2015 23:10:00 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69NA0Sg047306; Thu, 9 Jul 2015 23:10:00 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201507092310.t69NA0Sg047306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Thu, 9 Jul 2015 23:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285344 - stable/9/usr.sbin/jls X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 23:10:01 -0000 Author: jamie Date: Thu Jul 9 23:09:59 2015 New Revision: 285344 URL: https://svnweb.freebsd.org/changeset/base/285344 Log: MFC r279081: Allow parameters listed on the command line to override the -v option, instead of crashing. MFC r279083: Fix the logic for skipping parameters (with -s) that have "jailsys" parents (such as host.hostname); these were being skipped all the time. That it went this long without anyone noticing is a sign that this feature isn't actually used by anyone, but it's there so it might as well work. MFC r279123: Allow for parameters added with the JP_OPT flag to not exist. That's why the flag exists in the first place. Modified: stable/9/usr.sbin/jls/jls.8 stable/9/usr.sbin/jls/jls.c Directory Properties: stable/9/usr.sbin/jls/ (props changed) Modified: stable/9/usr.sbin/jls/jls.8 ============================================================================== --- stable/9/usr.sbin/jls/jls.8 Thu Jul 9 22:55:43 2015 (r285343) +++ stable/9/usr.sbin/jls/jls.8 Thu Jul 9 23:09:59 2015 (r285344) @@ -92,7 +92,8 @@ skipping read-only and unused parameters Implies .Fl nq . .It Fl v -Print a multiple-line summary per jail, with the following parameters: +Extend the standard display with a multiple-line summary per jail, +containing the following parameters: jail identifier (jid), hostname (host.hostname), path (path), jail name (name), jail state (dying), cpuset ID (cpuset), IP address(es) (ip4.addr and ip6.addr). Modified: stable/9/usr.sbin/jls/jls.c ============================================================================== --- stable/9/usr.sbin/jls/jls.c Thu Jul 9 22:55:43 2015 (r285343) +++ stable/9/usr.sbin/jls/jls.c Thu Jul 9 23:09:59 2015 (r285344) @@ -78,7 +78,7 @@ static void quoted_print(char *str); int main(int argc, char **argv) { - char *dot, *ep, *jname; + char *dot, *ep, *jname, *pname; int c, i, jflags, jid, lastjid, pflags, spc; jname = NULL; @@ -166,20 +166,23 @@ main(int argc, char **argv) JP_USER); add_param("path", NULL, (size_t)0, NULL, JP_USER); } - } else + } else { + pflags &= ~PRINT_VERBOSE; while (optind < argc) add_param(argv[optind++], NULL, (size_t)0, NULL, JP_USER); + } if (pflags & PRINT_SKIP) { /* Check for parameters with jailsys parents. */ for (i = 0; i < nparams; i++) { if ((params[i].jp_flags & JP_USER) && (dot = strchr(params[i].jp_name, '.'))) { - *dot = 0; - param_parent[i] = add_param(params[i].jp_name, + pname = alloca((dot - params[i].jp_name) + 1); + strlcpy(pname, params[i].jp_name, + (dot - params[i].jp_name) + 1); + param_parent[i] = add_param(pname, NULL, (size_t)0, NULL, JP_OPT); - *dot = '.'; } } } @@ -291,10 +294,8 @@ add_param(const char *name, void *value, param->jp_flags |= flags; return param - params; } - if (jailparam_init(param, name) < 0) - errx(1, "%s", jail_errmsg); - param->jp_flags = flags; - if ((value != NULL ? jailparam_import_raw(param, value, valuelen) + if (jailparam_init(param, name) < 0 || + (value != NULL ? jailparam_import_raw(param, value, valuelen) : jailparam_import(param, value)) < 0) { if (flags & JP_OPT) { nparams--; @@ -302,6 +303,7 @@ add_param(const char *name, void *value, } errx(1, "%s", jail_errmsg); } + param->jp_flags = flags; return param - params; } From owner-svn-src-all@freebsd.org Thu Jul 9 23:40:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E88903FE2; Thu, 9 Jul 2015 23:40:30 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 D8F74147; Thu, 9 Jul 2015 23:40:30 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t69NeUQS062659; Thu, 9 Jul 2015 23:40:30 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t69NeUnl062655; Thu, 9 Jul 2015 23:40:30 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201507092340.t69NeUnl062655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Thu, 9 Jul 2015 23:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285345 - stable/9/usr.sbin/jail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 23:40:31 -0000 Author: jamie Date: Thu Jul 9 23:40:29 2015 New Revision: 285345 URL: https://svnweb.freebsd.org/changeset/base/285345 Log: MFC r241196: Move properly to the next parameter when jailparam_init fails (i.e. on an unknown parameter), to avoid freeing bogus pointers. MFC r256256 (partial): - Fix a minor bug in jail(8) which prevented it from returning false when jail -r failed. Modified: stable/9/usr.sbin/jail/config.c stable/9/usr.sbin/jail/jail.c Directory Properties: stable/9/usr.sbin/jail/ (props changed) Modified: stable/9/usr.sbin/jail/config.c ============================================================================== --- stable/9/usr.sbin/jail/config.c Thu Jul 9 23:09:59 2015 (r285344) +++ stable/9/usr.sbin/jail/config.c Thu Jul 9 23:40:29 2015 (r285345) @@ -688,6 +688,7 @@ import_params(struct cfjail *j) if (jailparam_init(jp, p->name) < 0) { error = -1; jail_warnx(j, "%s", jail_errmsg); + jp++; continue; } if (TAILQ_EMPTY(&p->val)) Modified: stable/9/usr.sbin/jail/jail.c ============================================================================== --- stable/9/usr.sbin/jail/jail.c Thu Jul 9 23:09:59 2015 (r285344) +++ stable/9/usr.sbin/jail/jail.c Thu Jul 9 23:40:29 2015 (r285345) @@ -470,10 +470,12 @@ main(int argc, char **argv) if (dep_check(j)) continue; if (j->jid < 0) { - if (!(j->flags & (JF_DEPEND | JF_WILD)) - && verbose >= 0) - jail_quoted_warnx(j, - "not found", NULL); + if (!(j->flags & (JF_DEPEND|JF_WILD))) { + if (verbose >= 0) + jail_quoted_warnx(j, + "not found", NULL); + failed(j); + } goto jail_remove_done; } j->comparam = stopcommands; From owner-svn-src-all@freebsd.org Thu Jul 9 23:43:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 606F3328A; Thu, 9 Jul 2015 23:43:35 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (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 13BE975B; Thu, 9 Jul 2015 23:43:34 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.15.0.59/8.15.0.59) with SMTP id t69NA6uf030270; Thu, 9 Jul 2015 18:13:57 -0500 Received: from mh2.mail.rice.edu (mh2.mail.rice.edu [128.42.201.21]) by pp2.rice.edu with ESMTP id 1vg4gt1ue1-1; Thu, 09 Jul 2015 18:13:57 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh2.mail.rice.edu, auth channel Received: from [10.87.78.176] (unknown [10.87.78.176]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh2.mail.rice.edu (Postfix) with ESMTPSA id 8DDFC500122; Thu, 9 Jul 2015 18:13:57 -0500 (CDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r285282 - head/sys/vm From: Alan Cox In-Reply-To: <20150708182901.GJ51988@strugglingcoder.info> Date: Thu, 9 Jul 2015 18:13:57 -0500 Cc: Alan Cox , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201507081746.t68Hk0To044278@repo.freebsd.org> <20150708182901.GJ51988@strugglingcoder.info> To: hiren panchasara X-Mailer: Apple Mail (2.1878.6) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=1 compositescore=0.9 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0.9 spamscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1506180000 definitions=main-1507090332 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 23:43:35 -0000 On Jul 8, 2015, at 1:29 PM, hiren panchasara wrote: > On 07/08/15 at 05:46P, Alan Cox wrote: >> Author: alc >> Date: Wed Jul 8 17:45:59 2015 >> New Revision: 285282 >> URL: https://svnweb.freebsd.org/changeset/base/285282 >>=20 >> Log: >> The intention of r254304 was to scan the active queue continuously. >> However, I've observed the active queue scan stopping when there are >> frequent free page shortages and the inactive queue is steadily = refilled >> by other mechanisms, such as the sequential access heuristic in = vm_fault() >> or madvise(2).=20 >=20 > What would be the actual downside/effect of this scenario? i.e. What = goes > wrong when active queue scan stops and what would I see/observe on a > system when the problem is going on - is what I want to understand. >=20 Basically, pages that haven=92t been used recently get stuck in the = active queue. Consequently, they are never reclaimed and repurposed to = hold newly accessed data. Instead, more recently used pages from the = inactive queue are reclaimed. Effectively, this reduces the amount of = physical memory that is available for caching file data, and so the = system (likely) performs more I/O operations than it would have with the = stuck pages problem corrected. >> To remedy this problem, record the time of the last active >> queue scan, and always scan a number of pages proportional to the = time >> since the last scan, regardless of whether that last scan was a >> timeout-triggered ("pass =3D=3D 0") or free-page-shortage-triggered = ("pass > >> 0") scan. >>=20 >> Also, on a timeout-triggered scan, allow a full scan of the active = queue >> when the system is short of inactive pages. >>=20 >> Reviewed by: kib >> MFC after: 6 weeks >> Sponsored by: EMC / Isilon Storage Division >=20 > [skip] >=20 > Thanks in advance. > Cheers, > Hiren From owner-svn-src-all@freebsd.org Fri Jul 10 00:01:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDB48373A; Fri, 10 Jul 2015 00:01:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 8024FE26; Fri, 10 Jul 2015 00:01:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6A01YjZ076518; Fri, 10 Jul 2015 00:01:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6A01YJJ076516; Fri, 10 Jul 2015 00:01:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507100001.t6A01YJJ076516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 10 Jul 2015 00:01:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285346 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 00:01:36 -0000 Author: gjb Date: Fri Jul 10 00:01:33 2015 New Revision: 285346 URL: https://svnweb.freebsd.org/changeset/base/285346 Log: Update stable/10 to BETA1 in preparation for 10.2-BETA1 builds. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/conf/newvers.sh Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Thu Jul 9 23:40:29 2015 (r285345) +++ stable/10/sys/conf/newvers.sh Fri Jul 10 00:01:33 2015 (r285346) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.2" -BRANCH="PRERELEASE" +BRANCH="BETA1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Fri Jul 10 02:23:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC19B3E91; Fri, 10 Jul 2015 02:23:51 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 BCC5FE66; Fri, 10 Jul 2015 02:23:51 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6A2NpYA046748; Fri, 10 Jul 2015 02:23:51 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6A2Npde046747; Fri, 10 Jul 2015 02:23:51 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201507100223.t6A2Npde046747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Fri, 10 Jul 2015 02:23:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285347 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 02:23:51 -0000 Author: gnn Date: Fri Jul 10 02:23:50 2015 New Revision: 285347 URL: https://svnweb.freebsd.org/changeset/base/285347 Log: Summary: Fix LINT build. The names of the new AES modes were not correctly used under the REGRESSION kernel option. Modified: head/sys/netipsec/xform_esp.c Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Fri Jul 10 00:01:33 2015 (r285346) +++ head/sys/netipsec/xform_esp.c Fri Jul 10 02:23:50 2015 (r285347) @@ -989,9 +989,9 @@ esp_output_cb(struct cryptop *crp) case CRYPTO_SHA2_512_HMAC: alen = esph->hashsize/2; break; - case CRYPTO_AES_128_GMAC: - case CRYPTO_AES_192_GMAC: - case CRYPTO_AES_256_GMAC: + case CRYPTO_AES_128_NIST_GMAC: + case CRYPTO_AES_192_NIST_GMAC: + case CRYPTO_AES_256_NIST_GMAC: alen = esph->hashsize; break; default: From owner-svn-src-all@freebsd.org Fri Jul 10 02:27:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D0053F4C; Fri, 10 Jul 2015 02:27:54 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from smtp.hungerhost.com (smtp.hungerhost.com [216.38.53.177]) (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 7478310EC; Fri, 10 Jul 2015 02:27:54 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from pool-108-54-164-204.nycmny.fios.verizon.net ([108.54.164.204]:49747 helo=[192.168.1.16]) by vps.hungerhost.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.85) (envelope-from ) id 1ZDO2Z-0005XU-Bv; Thu, 09 Jul 2015 22:27:51 -0400 From: "George Neville-Neil" To: "Peter Wemm" Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285336 - in head/sys: netipsec opencrypto Date: Thu, 09 Jul 2015 22:27:40 -0400 Message-ID: In-Reply-To: <15342729.MI2b1tqqeb@overcee.wemm.org> References: <201507091816.t69IGawf097288@repo.freebsd.org> <15342729.MI2b1tqqeb@overcee.wemm.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_MailMate_E4AAF0D0-6D10-4223-AEFE-371759A562B3_="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Mailer: MailMate (1.9.1r5084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - freebsd.org X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 02:27:54 -0000 This is an OpenPGP/MIME signed message (RFC 3156 and 4880). --=_MailMate_E4AAF0D0-6D10-4223-AEFE-371759A562B3_= Content-Type: text/plain On 9 Jul 2015, at 18:26, Peter Wemm wrote: > On Thursday, July 09, 2015 06:16:36 PM George V. Neville-Neil wrote: >> Author: gnn >> Date: Thu Jul 9 18:16:35 2015 >> New Revision: 285336 >> URL: https://svnweb.freebsd.org/changeset/base/285336 >> >> Log: >> Add support for AES modes to IPSec. These modes work both in software >> only mode and with hardware support on systems that have AESNI >> instructions. >> >> Differential Revision: D2936 >> Reviewed by: jmg, eri, cognet >> Sponsored by: Rubicon Communications (Netgate) >> >> Modified: >> head/sys/netipsec/xform_ah.c >> head/sys/netipsec/xform_esp.c > >> @@ -953,6 +989,11 @@ esp_output_cb(struct cryptop *crp) >> case CRYPTO_SHA2_512_HMAC: >> alen = esph->hashsize/2; >> break; >> + case CRYPTO_AES_128_GMAC: >> + case CRYPTO_AES_192_GMAC: >> + case CRYPTO_AES_256_GMAC: >> + alen = esph->hashsize; >> + break; >> default: >> alen = AH_HMAC_HASHLEN; >> break; > > This introduces a LINT compile failure: > > /usr/src/sys/netipsec/xform_esp.c:992:9: error: use of undeclared identifier > 'CRYPTO_AES_128_GMAC' > case CRYPTO_AES_128_GMAC: > ^ > /usr/src/sys/netipsec/xform_esp.c:993:9: error: use of undeclared identifier > 'CRYPTO_AES_192_GMAC' > case CRYPTO_AES_192_GMAC: > ^ > /usr/src/sys/netipsec/xform_esp.c:994:9: error: use of undeclared identifier > 'CRYPTO_AES_256_GMAC' > case CRYPTO_AES_256_GMAC: > ^ > 3 errors generated. > --- xform_esp.o --- > Apologies, fixed in 285347. BTW The LINT conf in amd64 is ignored. Why? Best, George --=_MailMate_E4AAF0D0-6D10-4223-AEFE-371759A562B3_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAlWfLZwACgkQYdh2wUQKM9LGAwCgw/bjdr417DbaTVE/K18WZDPl irMAnR9aEO714KNo8NMJ3nKd4CKIgB+w =fE+B -----END PGP SIGNATURE----- --=_MailMate_E4AAF0D0-6D10-4223-AEFE-371759A562B3_=-- From owner-svn-src-all@freebsd.org Fri Jul 10 02:45:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 569AF9952E4 for ; Fri, 10 Jul 2015 02:45:31 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 22A1B1C51 for ; Fri, 10 Jul 2015 02:45:30 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by pdbqm3 with SMTP id qm3so31859644pdb.0 for ; Thu, 09 Jul 2015 19:45:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=bMv3Blii/XKASb5DDSuKJ2oXGj8FyXAy4D+SJcE3F7k=; b=C/3a9hFGBmw47yenO2GqK0nTQxMvtgIX2+ydduwgzPbwaQe2PDOzwx4+W9tvblr8CI NtDrs2oqeCGj0uCcB1mD9jEzGmmrXAJoeA9XIft5j9pWIwFgbTw70ZA/GXUA9dXUFz95 79kSEMYKDCm0tWoRvnoEk/TDO/TCoWGsUmEtb9EuphmaIgYmD++DzZSQhkPVNl6Cl+Rr 1NflbldM46MSdSj8ZIQkg4mbWOTxkEHm+mhS79VnJlfj1erXthn83IcfYj8c20RntuJq dgrGgKGai4YkBWnj2HUO4jkRPw4j8C/rKk/CtI5+U38E4gSh3Lbq1Z4oRDV+kH7QQ6+L zphA== X-Gm-Message-State: ALoCoQn21bgf2mCMxKfACel4HWwRveytd4OOdwcC8Mvh6FNxmwFUpWZmE8rNlEx/43U0VIKgEOc7 X-Received: by 10.68.238.39 with SMTP id vh7mr37703429pbc.12.1436496323873; Thu, 09 Jul 2015 19:45:23 -0700 (PDT) Received: from [10.64.26.138] ([69.53.236.236]) by smtp.gmail.com with ESMTPSA id pq3sm7203239pbb.24.2015.07.09.19.45.22 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 Jul 2015 19:45:22 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r285336 - in head/sys: netipsec opencrypto Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Content-Type: multipart/signed; boundary="Apple-Mail=_072917BF-D448-46F0-9753-F031D8F38D96"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5 From: Warner Losh In-Reply-To: Date: Thu, 9 Jul 2015 20:45:22 -0600 Cc: Peter Wemm , svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201507091816.t69IGawf097288@repo.freebsd.org> <15342729.MI2b1tqqeb@overcee.wemm.org> To: George Neville-Neil X-Mailer: Apple Mail (2.2102) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 02:45:31 -0000 --Apple-Mail=_072917BF-D448-46F0-9753-F031D8F38D96 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jul 9, 2015, at 8:27 PM, George Neville-Neil = wrote: >=20 >=20 >=20 > On 9 Jul 2015, at 18:26, Peter Wemm wrote: >=20 >> On Thursday, July 09, 2015 06:16:36 PM George V. Neville-Neil wrote: >>> Author: gnn >>> Date: Thu Jul 9 18:16:35 2015 >>> New Revision: 285336 >>> URL: https://svnweb.freebsd.org/changeset/base/285336 >>>=20 >>> Log: >>> Add support for AES modes to IPSec. These modes work both in = software >>> only mode and with hardware support on systems that have AESNI >>> instructions. >>>=20 >>> Differential Revision: D2936 >>> Reviewed by: jmg, eri, cognet >>> Sponsored by: Rubicon Communications (Netgate) >>>=20 >>> Modified: >>> head/sys/netipsec/xform_ah.c >>> head/sys/netipsec/xform_esp.c >>=20 >>> @@ -953,6 +989,11 @@ esp_output_cb(struct cryptop *crp) >>> case CRYPTO_SHA2_512_HMAC: >>> alen =3D esph->hashsize/2; >>> break; >>> + case CRYPTO_AES_128_GMAC: >>> + case CRYPTO_AES_192_GMAC: >>> + case CRYPTO_AES_256_GMAC: >>> + alen =3D esph->hashsize; >>> + break; >>> default: >>> alen =3D AH_HMAC_HASHLEN; >>> break; >>=20 >> This introduces a LINT compile failure: >>=20 >> /usr/src/sys/netipsec/xform_esp.c:992:9: error: use of undeclared = identifier >> 'CRYPTO_AES_128_GMAC' >> case CRYPTO_AES_128_GMAC: >> ^ >> /usr/src/sys/netipsec/xform_esp.c:993:9: error: use of undeclared = identifier >> 'CRYPTO_AES_192_GMAC' >> case CRYPTO_AES_192_GMAC: >> ^ >> /usr/src/sys/netipsec/xform_esp.c:994:9: error: use of undeclared = identifier >> 'CRYPTO_AES_256_GMAC' >> case CRYPTO_AES_256_GMAC: >> ^ >> 3 errors generated. >> --- xform_esp.o --- >>=20 >=20 > Apologies, fixed in 285347. BTW The LINT conf in amd64 is ignored. = Why? What do you mean? Warner --Apple-Mail=_072917BF-D448-46F0-9753-F031D8F38D96 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVnzHCAAoJEGwc0Sh9sBEA7xsP/0RZHvusodBpr9ox2/qGOSBR Qi7Iha63+SuHqbfcU0ArO9GW31UggEqiDYUSMhek5cbT8WrdS08OAW4sCZzZIMoE GvyWzH9uzhq64OVDQG5OO8fPlQdq04EpjfBh+1xvcILJF8fky1DxamvUuI9mQJ99 QSssSODRrgxhNO3V2GgndzT8N7L/7r/Pt/k6/FqV2Klsd0gKT7+K2stwW9WcvzFx 2V5d0PgT0uXqKz0zKhMeGN7fhy6562uCSlxi+Ph32/BAJ3qgHZAOp/W3IZXuNlQP LtvEDDcnp4uEqjMu6sEC4xdUpqKUWnG1dNUjDmsoznY5eO5BPbjXi2cGjr391ceg 1gMyWzzzbMIyQ47KQHMi2hri4Ri+oECB8/FfrcfJmRffaow7+O5HOADG6biuDCfH Nd/kjcGi6OM0o7W0W3sK3jwBZpfW6esFKfW+aro94aBXStXxEgUS9EXKQYRbtKU9 WaG2paGamczKp6tefvUhnA+OaFNTjFEmYeO5X2WZhglm+2PY7YID7gdDWR5JZsBU EXdtJbBVTYB13esu4vHw5XyfUQrrMh2tynMbH80BXtexV3cCDVwbQ6oG7tacmGxk eNcj4aS6XJc/GON6pLh1s/HRPnWNmPcXt/Ks8+YL0U6yMeqhLwVvKe/8ITH83TrB 1qPwO1kyd0Qbww5dKhVC =P1pG -----END PGP SIGNATURE----- --Apple-Mail=_072917BF-D448-46F0-9753-F031D8F38D96-- From owner-svn-src-all@freebsd.org Fri Jul 10 03:08:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA1BF995742; Fri, 10 Jul 2015 03:08:52 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: from mail-yk0-x229.google.com (mail-yk0-x229.google.com [IPv6:2607:f8b0:4002:c07::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78845E72; Fri, 10 Jul 2015 03:08:52 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: by ykey15 with SMTP id y15so56604144yke.3; Thu, 09 Jul 2015 20:08:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=tdXGd8pL/BOZg2h1tV4beI0xFfYL4oJ1rpPzaHLxMck=; b=JopqpsVoKo+lZ6hIVUgdtXARZKSxebgZx+z8XOabpGNbeSwfEN95OuXK/Fgw6VzMRR 7VRY0HyNbzYOJyooXxF+7HO7ZOA9NMItMPdmtgORQK0sIRAmjWVxqKiQpt1XkBFtIfc8 wSVHgaKKAemhTzjQcRaXya9uliR9+UsUikSAx9wf1YodkvrTFCSRtT60sVaWcC6uoN+k dHgn8Hy67ZsKbdi7lWrHy83MiAjug9VChEMAF0BUBbtPZw8wtQPVKrpHM7WfLviJIgDN geIhxdR9K9NLl6icYKAuCXNgeQux1yWxkQTfSscvuyc+pvM3R4ziHKYEVW0RzYNIChW0 ySaw== MIME-Version: 1.0 X-Received: by 10.170.206.139 with SMTP id x133mr21174791yke.126.1436497731554; Thu, 09 Jul 2015 20:08:51 -0700 (PDT) Sender: pkelsey@gmail.com Received: by 10.129.138.68 with HTTP; Thu, 9 Jul 2015 20:08:51 -0700 (PDT) In-Reply-To: References: <201507091816.t69IGawf097288@repo.freebsd.org> <15342729.MI2b1tqqeb@overcee.wemm.org> Date: Thu, 9 Jul 2015 23:08:51 -0400 X-Google-Sender-Auth: HiEUXcpSONEdwAPUCoitV263_aU Message-ID: Subject: Re: svn commit: r285336 - in head/sys: netipsec opencrypto From: Patrick Kelsey To: Warner Losh Cc: George Neville-Neil , Peter Wemm , svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 03:08:52 -0000 On Thu, Jul 9, 2015 at 10:45 PM, Warner Losh wrote: > > > On Jul 9, 2015, at 8:27 PM, George Neville-Neil wrote: > > > > > > > > On 9 Jul 2015, at 18:26, Peter Wemm wrote: > > > >> On Thursday, July 09, 2015 06:16:36 PM George V. Neville-Neil wrote: > >>> Author: gnn > >>> Date: Thu Jul 9 18:16:35 2015 > >>> New Revision: 285336 > >>> URL: https://svnweb.freebsd.org/changeset/base/285336 > >>> > >>> Log: > >>> Add support for AES modes to IPSec. These modes work both in software > >>> only mode and with hardware support on systems that have AESNI > >>> instructions. > >>> > >>> Differential Revision: D2936 > >>> Reviewed by: jmg, eri, cognet > >>> Sponsored by: Rubicon Communications (Netgate) > >>> > >>> Modified: > >>> head/sys/netipsec/xform_ah.c > >>> head/sys/netipsec/xform_esp.c > >> > >>> @@ -953,6 +989,11 @@ esp_output_cb(struct cryptop *crp) > >>> case CRYPTO_SHA2_512_HMAC: > >>> alen = esph->hashsize/2; > >>> break; > >>> + case CRYPTO_AES_128_GMAC: > >>> + case CRYPTO_AES_192_GMAC: > >>> + case CRYPTO_AES_256_GMAC: > >>> + alen = esph->hashsize; > >>> + break; > >>> default: > >>> alen = AH_HMAC_HASHLEN; > >>> break; > >> > >> This introduces a LINT compile failure: > >> > >> /usr/src/sys/netipsec/xform_esp.c:992:9: error: use of undeclared > identifier > >> 'CRYPTO_AES_128_GMAC' > >> case CRYPTO_AES_128_GMAC: > >> ^ > >> /usr/src/sys/netipsec/xform_esp.c:993:9: error: use of undeclared > identifier > >> 'CRYPTO_AES_192_GMAC' > >> case CRYPTO_AES_192_GMAC: > >> ^ > >> /usr/src/sys/netipsec/xform_esp.c:994:9: error: use of undeclared > identifier > >> 'CRYPTO_AES_256_GMAC' > >> case CRYPTO_AES_256_GMAC: > >> ^ > >> 3 errors generated. > >> --- xform_esp.o --- > >> > > > > Apologies, fixed in 285347. BTW The LINT conf in amd64 is ignored. Why? > > What do you mean? > > There was some temporary confusion regarding the LINT conf being dynamically generated (and thus properly ignored by svn), now resolved. -Patrick From owner-svn-src-all@freebsd.org Fri Jul 10 05:07:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B82C13A54; Fri, 10 Jul 2015 05:07:19 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 9DCCA1DD8; Fri, 10 Jul 2015 05:07:19 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6A57JHb027042; Fri, 10 Jul 2015 05:07:19 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6A57Jaa027041; Fri, 10 Jul 2015 05:07:19 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201507100507.t6A57Jaa027041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Fri, 10 Jul 2015 05:07:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285348 - head/release/picobsd/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 05:07:19 -0000 Author: luigi Date: Fri Jul 10 05:07:18 2015 New Revision: 285348 URL: https://svnweb.freebsd.org/changeset/base/285348 Log: rev.284898 removed _SHLIBDIRPREFIX so we need to reconstruct its value to properly locate libraries created in the buildworld phase. Modified: head/release/picobsd/build/picobsd Modified: head/release/picobsd/build/picobsd ============================================================================== --- head/release/picobsd/build/picobsd Fri Jul 10 02:23:50 2015 (r285347) +++ head/release/picobsd/build/picobsd Fri Jul 10 05:07:18 2015 (r285348) @@ -532,7 +532,11 @@ do_links() { # rootdir varname # if no argument default to objdir/SHLIBDIRPREFIX for both find_progs() { # programs # logverbose "find_progs: called with $*" - local i=`realpath ${o_objdir:-${_SHLIBDIRPREFIX}/..}` + # rev.284898 removed _SHLIBDIRPREFIX so we need to reconstruct + # its value in i1 + local i1=${_SHLIBDIRPREFIX:-${l_objtree}/${SRC}/tmp} + local i=`realpath ${o_objdir:-${i1}/..}` + # default values for -L and -P local dir="-P $i" local ldir="-L $i" From owner-svn-src-all@freebsd.org Fri Jul 10 05:51:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD7653FA2; Fri, 10 Jul 2015 05:51:42 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 AF39CEFF; Fri, 10 Jul 2015 05:51:42 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6A5pgap050476; Fri, 10 Jul 2015 05:51:42 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6A5paZH050451; Fri, 10 Jul 2015 05:51:36 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201507100551.t6A5paZH050451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Fri, 10 Jul 2015 05:51:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285349 - in head/sys: dev/cxgbe dev/e1000 dev/ixgbe dev/netmap dev/re net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 05:51:43 -0000 Author: luigi Date: Fri Jul 10 05:51:36 2015 New Revision: 285349 URL: https://svnweb.freebsd.org/changeset/base/285349 Log: Sync netmap sources with the version in our private tree. This commit contains large contributions from Giuseppe Lettieri and Stefano Garzarella, is partly supported by grants from Verisign and Cisco, and brings in the following: - fix zerocopy monitor ports and introduce copying monitor ports (the latter are lower performance but give access to all traffic in parallel with the application) - exclusive open mode, useful to implement solutions that recover from crashes of the main netmap client (suggested by Patrick Kelsey) - revised memory allocator in preparation for the 'passthrough mode' (ptnetmap) recently presented at bsdcan. ptnetmap is described in S. Garzarella, G. Lettieri, L. Rizzo; Virtual device passthrough for high speed VM networking, ACM/IEEE ANCS 2015, Oakland (CA) May 2015 http://info.iet.unipi.it/~luigi/research.html - fix rx CRC handing on ixl - add module dependencies for netmap when building drivers as modules - minor simplifications to device-specific routines (*txsync, *rxsync) - general code cleanup (remove unused variables, introduce macros to access rings and remove duplicate code, Applications do not need to be recompiled, unless of course they want to use the new features (monitors and exclusive open). Those willing to try this code on stable/10 can just update the sys/dev/netmap/*, sys/net/netmap* with the version in HEAD and apply the small patches to individual device drivers. MFC after: 1 month Sponsored by: (partly) Verisign, Cisco Modified: head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_netmap.c head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_lem.c head/sys/dev/ixgbe/if_ix.c head/sys/dev/netmap/if_em_netmap.h head/sys/dev/netmap/if_igb_netmap.h head/sys/dev/netmap/if_ixl_netmap.h head/sys/dev/netmap/if_lem_netmap.h head/sys/dev/netmap/if_re_netmap.h head/sys/dev/netmap/if_vtnet_netmap.h head/sys/dev/netmap/ixgbe_netmap.h head/sys/dev/netmap/netmap.c head/sys/dev/netmap/netmap_freebsd.c head/sys/dev/netmap/netmap_generic.c head/sys/dev/netmap/netmap_kern.h head/sys/dev/netmap/netmap_mem2.c head/sys/dev/netmap/netmap_mem2.h head/sys/dev/netmap/netmap_monitor.c head/sys/dev/netmap/netmap_pipe.c head/sys/dev/netmap/netmap_vale.c head/sys/dev/re/if_re.c head/sys/net/netmap.h head/sys/net/netmap_user.h Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Jul 10 05:07:18 2015 (r285348) +++ head/sys/dev/cxgbe/t4_main.c Fri Jul 10 05:51:36 2015 (r285349) @@ -8533,10 +8533,17 @@ static devclass_t cxgbe_devclass, cxl_de DRIVER_MODULE(t4nex, pci, t4_driver, t4_devclass, mod_event, 0); MODULE_VERSION(t4nex, 1); MODULE_DEPEND(t4nex, firmware, 1, 1, 1); +#ifdef DEV_NETMAP +MODULE_DEPEND(t4nex, netmap, 1, 1, 1); +#endif /* DEV_NETMAP */ + DRIVER_MODULE(t5nex, pci, t5_driver, t5_devclass, mod_event, 0); MODULE_VERSION(t5nex, 1); MODULE_DEPEND(t5nex, firmware, 1, 1, 1); +#ifdef DEV_NETMAP +MODULE_DEPEND(t5nex, netmap, 1, 1, 1); +#endif /* DEV_NETMAP */ DRIVER_MODULE(cxgbe, t4nex, cxgbe_driver, cxgbe_devclass, 0, 0); MODULE_VERSION(cxgbe, 1); Modified: head/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- head/sys/dev/cxgbe/t4_netmap.c Fri Jul 10 05:07:18 2015 (r285348) +++ head/sys/dev/cxgbe/t4_netmap.c Fri Jul 10 05:51:36 2015 (r285349) @@ -917,8 +917,6 @@ cxgbe_netmap_txsync(struct netmap_kring kring->nr_hwtail -= kring->nkr_num_slots; } - nm_txsync_finalize(kring); - return (0); } @@ -931,7 +929,7 @@ cxgbe_netmap_rxsync(struct netmap_kring struct port_info *pi = ifp->if_softc; struct adapter *sc = pi->adapter; struct sge_nm_rxq *nm_rxq = &sc->sge.nm_rxq[pi->first_nm_rxq + kring->ring_id]; - u_int const head = nm_rxsync_prologue(kring); + u_int const head = kring->rhead; u_int n; int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; @@ -993,8 +991,6 @@ cxgbe_netmap_rxsync(struct netmap_kring } } - nm_rxsync_finalize(kring); - return (0); } Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Fri Jul 10 05:07:18 2015 (r285348) +++ head/sys/dev/e1000/if_em.c Fri Jul 10 05:51:36 2015 (r285349) @@ -344,6 +344,9 @@ devclass_t em_devclass; DRIVER_MODULE(em, pci, em_driver, em_devclass, 0, 0); MODULE_DEPEND(em, pci, 1, 1, 1); MODULE_DEPEND(em, ether, 1, 1, 1); +#ifdef DEV_NETMAP +MODULE_DEPEND(em, netmap, 1, 1, 1); +#endif /* DEV_NETMAP */ /********************************************************************* * Tunable default values. Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Fri Jul 10 05:07:18 2015 (r285348) +++ head/sys/dev/e1000/if_igb.c Fri Jul 10 05:51:36 2015 (r285349) @@ -322,6 +322,9 @@ static devclass_t igb_devclass; DRIVER_MODULE(igb, pci, igb_driver, igb_devclass, 0, 0); MODULE_DEPEND(igb, pci, 1, 1, 1); MODULE_DEPEND(igb, ether, 1, 1, 1); +#ifdef DEV_NETMAP +MODULE_DEPEND(igb, netmap, 1, 1, 1); +#endif /* DEV_NETMAP */ /********************************************************************* * Tunable default values. Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Fri Jul 10 05:07:18 2015 (r285348) +++ head/sys/dev/e1000/if_lem.c Fri Jul 10 05:51:36 2015 (r285349) @@ -286,6 +286,9 @@ extern devclass_t em_devclass; DRIVER_MODULE(lem, pci, lem_driver, em_devclass, 0, 0); MODULE_DEPEND(lem, pci, 1, 1, 1); MODULE_DEPEND(lem, ether, 1, 1, 1); +#ifdef DEV_NETMAP +MODULE_DEPEND(lem, netmap, 1, 1, 1); +#endif /* DEV_NETMAP */ /********************************************************************* * Tunable default values. Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Fri Jul 10 05:07:18 2015 (r285348) +++ head/sys/dev/ixgbe/if_ix.c Fri Jul 10 05:51:36 2015 (r285349) @@ -246,6 +246,9 @@ DRIVER_MODULE(ix, pci, ix_driver, ix_dev MODULE_DEPEND(ix, pci, 1, 1, 1); MODULE_DEPEND(ix, ether, 1, 1, 1); +#ifdef DEV_NETMAP +MODULE_DEPEND(ix, netmap, 1, 1, 1); +#endif /* DEV_NETMAP */ /* ** TUNEABLE PARAMETERS: Modified: head/sys/dev/netmap/if_em_netmap.h ============================================================================== --- head/sys/dev/netmap/if_em_netmap.h Fri Jul 10 05:07:18 2015 (r285348) +++ head/sys/dev/netmap/if_em_netmap.h Fri Jul 10 05:51:36 2015 (r285349) @@ -198,8 +198,6 @@ em_netmap_txsync(struct netmap_kring *kr } } - nm_txsync_finalize(kring); - return 0; } @@ -217,7 +215,7 @@ em_netmap_rxsync(struct netmap_kring *kr u_int nic_i; /* index into the NIC ring */ u_int n; u_int const lim = kring->nkr_num_slots - 1; - u_int const head = nm_rxsync_prologue(kring); + u_int const head = kring->rhead; int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; /* device-specific */ @@ -303,9 +301,6 @@ em_netmap_rxsync(struct netmap_kring *kr E1000_WRITE_REG(&adapter->hw, E1000_RDT(rxr->me), nic_i); } - /* tell userspace that there might be new packets */ - nm_rxsync_finalize(kring); - return 0; ring_reset: Modified: head/sys/dev/netmap/if_igb_netmap.h ============================================================================== --- head/sys/dev/netmap/if_igb_netmap.h Fri Jul 10 05:07:18 2015 (r285348) +++ head/sys/dev/netmap/if_igb_netmap.h Fri Jul 10 05:51:36 2015 (r285349) @@ -180,8 +180,6 @@ igb_netmap_txsync(struct netmap_kring *k kring->nr_hwtail = nm_prev(netmap_idx_n2k(kring, nic_i), lim); } - nm_txsync_finalize(kring); - return 0; } @@ -199,7 +197,7 @@ igb_netmap_rxsync(struct netmap_kring *k u_int nic_i; /* index into the NIC ring */ u_int n; u_int const lim = kring->nkr_num_slots - 1; - u_int const head = nm_rxsync_prologue(kring); + u_int const head = kring->rhead; int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; /* device-specific */ @@ -283,9 +281,6 @@ igb_netmap_rxsync(struct netmap_kring *k E1000_WRITE_REG(&adapter->hw, E1000_RDT(rxr->me), nic_i); } - /* tell userspace that there might be new packets */ - nm_rxsync_finalize(kring); - return 0; ring_reset: Modified: head/sys/dev/netmap/if_ixl_netmap.h ============================================================================== --- head/sys/dev/netmap/if_ixl_netmap.h Fri Jul 10 05:07:18 2015 (r285348) +++ head/sys/dev/netmap/if_ixl_netmap.h Fri Jul 10 05:51:36 2015 (r285349) @@ -68,9 +68,14 @@ extern int ixl_rx_miss, ixl_rx_miss_bufs * count packets that might be missed due to lost interrupts. */ SYSCTL_DECL(_dev_netmap); -int ixl_rx_miss, ixl_rx_miss_bufs, ixl_crcstrip; +/* + * The xl driver by default strips CRCs and we do not override it. + */ +int ixl_rx_miss, ixl_rx_miss_bufs, ixl_crcstrip = 1; +#if 0 SYSCTL_INT(_dev_netmap, OID_AUTO, ixl_crcstrip, - CTLFLAG_RW, &ixl_crcstrip, 0, "strip CRC on rx frames"); + CTLFLAG_RW, &ixl_crcstrip, 1, "strip CRC on rx frames"); +#endif SYSCTL_INT(_dev_netmap, OID_AUTO, ixl_rx_miss, CTLFLAG_RW, &ixl_rx_miss, 0, "potentially missed rx intr"); SYSCTL_INT(_dev_netmap, OID_AUTO, ixl_rx_miss_bufs, @@ -268,8 +273,6 @@ ixl_netmap_txsync(struct netmap_kring *k kring->nr_hwtail = nm_prev(netmap_idx_n2k(kring, nic_i), lim); } - nm_txsync_finalize(kring); - return 0; } @@ -297,7 +300,7 @@ ixl_netmap_rxsync(struct netmap_kring *k u_int nic_i; /* index into the NIC ring */ u_int n; u_int const lim = kring->nkr_num_slots - 1; - u_int const head = nm_rxsync_prologue(kring); + u_int const head = kring->rhead; int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; /* device-specific */ @@ -408,9 +411,6 @@ ixl_netmap_rxsync(struct netmap_kring *k wr32(vsi->hw, rxr->tail, nic_i); } - /* tell userspace that there might be new packets */ - nm_rxsync_finalize(kring); - return 0; ring_reset: Modified: head/sys/dev/netmap/if_lem_netmap.h ============================================================================== --- head/sys/dev/netmap/if_lem_netmap.h Fri Jul 10 05:07:18 2015 (r285348) +++ head/sys/dev/netmap/if_lem_netmap.h Fri Jul 10 05:51:36 2015 (r285349) @@ -302,8 +302,6 @@ lem_netmap_txsync(struct netmap_kring *k kring->nr_hwtail = nm_prev(netmap_idx_n2k(kring, nic_i), lim); } - nm_txsync_finalize(kring); - return 0; } @@ -321,7 +319,7 @@ lem_netmap_rxsync(struct netmap_kring *k u_int nic_i; /* index into the NIC ring */ u_int n; u_int const lim = kring->nkr_num_slots - 1; - u_int const head = nm_rxsync_prologue(kring); + u_int const head = kring->rhead; int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; /* device-specific */ @@ -466,9 +464,6 @@ lem_netmap_rxsync(struct netmap_kring *k E1000_WRITE_REG(&adapter->hw, E1000_RDT(0), nic_i); } - /* tell userspace that there might be new packets */ - nm_rxsync_finalize(kring); - return 0; ring_reset: Modified: head/sys/dev/netmap/if_re_netmap.h ============================================================================== --- head/sys/dev/netmap/if_re_netmap.h Fri Jul 10 05:07:18 2015 (r285348) +++ head/sys/dev/netmap/if_re_netmap.h Fri Jul 10 05:51:36 2015 (r285349) @@ -159,8 +159,6 @@ re_netmap_txsync(struct netmap_kring *kr } } - nm_txsync_finalize(kring); - return 0; } @@ -178,7 +176,7 @@ re_netmap_rxsync(struct netmap_kring *kr u_int nic_i; /* index into the NIC ring */ u_int n; u_int const lim = kring->nkr_num_slots - 1; - u_int const head = nm_rxsync_prologue(kring); + u_int const head = kring->rhead; int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; /* device-specific */ @@ -273,9 +271,6 @@ re_netmap_rxsync(struct netmap_kring *kr BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); } - /* tell userspace that there might be new packets */ - nm_rxsync_finalize(kring); - return 0; ring_reset: Modified: head/sys/dev/netmap/if_vtnet_netmap.h ============================================================================== --- head/sys/dev/netmap/if_vtnet_netmap.h Fri Jul 10 05:07:18 2015 (r285348) +++ head/sys/dev/netmap/if_vtnet_netmap.h Fri Jul 10 05:51:36 2015 (r285349) @@ -214,9 +214,6 @@ vtnet_netmap_txsync(struct netmap_kring virtqueue_postpone_intr(vq, VQ_POSTPONE_SHORT); } -//out: - nm_txsync_finalize(kring); - return 0; } @@ -278,7 +275,7 @@ vtnet_netmap_rxsync(struct netmap_kring // u_int nic_i; /* index into the NIC ring */ u_int n; u_int const lim = kring->nkr_num_slots - 1; - u_int const head = nm_rxsync_prologue(kring); + u_int const head = kring->rhead; int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; /* device-specific */ @@ -340,9 +337,6 @@ vtnet_netmap_rxsync(struct netmap_kring vtnet_rxq_enable_intr(rxq); } - /* tell userspace that there might be new packets. */ - nm_rxsync_finalize(kring); - ND("[C] h %d c %d t %d hwcur %d hwtail %d", ring->head, ring->cur, ring->tail, kring->nr_hwcur, kring->nr_hwtail); Modified: head/sys/dev/netmap/ixgbe_netmap.h ============================================================================== --- head/sys/dev/netmap/ixgbe_netmap.h Fri Jul 10 05:07:18 2015 (r285348) +++ head/sys/dev/netmap/ixgbe_netmap.h Fri Jul 10 05:51:36 2015 (r285349) @@ -322,8 +322,6 @@ ixgbe_netmap_txsync(struct netmap_kring } } - nm_txsync_finalize(kring); - return 0; } @@ -351,7 +349,7 @@ ixgbe_netmap_rxsync(struct netmap_kring u_int nic_i; /* index into the NIC ring */ u_int n; u_int const lim = kring->nkr_num_slots - 1; - u_int const head = nm_rxsync_prologue(kring); + u_int const head = kring->rhead; int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; /* device-specific */ @@ -458,9 +456,6 @@ ixgbe_netmap_rxsync(struct netmap_kring IXGBE_WRITE_REG(&adapter->hw, IXGBE_RDT(rxr->me), nic_i); } - /* tell userspace that there might be new packets */ - nm_rxsync_finalize(kring); - return 0; ring_reset: Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Fri Jul 10 05:07:18 2015 (r285348) +++ head/sys/dev/netmap/netmap.c Fri Jul 10 05:51:36 2015 (r285349) @@ -293,7 +293,7 @@ ports attached to the switch) * kring->nm_sync() == DEVICE_netmap_rxsync() * 2) device interrupt handler * na->nm_notify() == netmap_notify() - * - tx from host stack + * - rx from host stack * concurrently: * 1) host stack * netmap_transmit() @@ -313,31 +313,113 @@ ports attached to the switch) * * -= SYSTEM DEVICE WITH GENERIC SUPPORT =- * + * na == NA(ifp) == generic_netmap_adapter created in generic_netmap_attach() * - * - * -= VALE PORT =- - * - * - * - * -= NETMAP PIPE =- - * - * - * - * -= SYSTEM DEVICE WITH NATIVE SUPPORT, CONNECTED TO VALE, NO HOST RINGS =- - * - * - * - * -= SYSTEM DEVICE WITH NATIVE SUPPORT, CONNECTED TO VALE, WITH HOST RINGS =- - * - * - * - * -= SYSTEM DEVICE WITH GENERIC SUPPORT, CONNECTED TO VALE, NO HOST RINGS =- - * + * - tx from netmap userspace: + * concurrently: + * 1) ioctl(NIOCTXSYNC)/netmap_poll() in process context + * kring->nm_sync() == generic_netmap_txsync() + * linux: dev_queue_xmit() with NM_MAGIC_PRIORITY_TX + * generic_ndo_start_xmit() + * orig. dev. start_xmit + * FreeBSD: na->if_transmit() == orig. dev if_transmit + * 2) generic_mbuf_destructor() + * na->nm_notify() == netmap_notify() + * - rx from netmap userspace: + * 1) ioctl(NIOCRXSYNC)/netmap_poll() in process context + * kring->nm_sync() == generic_netmap_rxsync() + * mbq_safe_dequeue() + * 2) device driver + * generic_rx_handler() + * mbq_safe_enqueue() + * na->nm_notify() == netmap_notify() + * - rx from host stack: + * concurrently: + * 1) host stack + * linux: generic_ndo_start_xmit() + * netmap_transmit() + * FreeBSD: ifp->if_input() == netmap_transmit + * both: + * na->nm_notify() == netmap_notify() + * 2) ioctl(NIOCRXSYNC)/netmap_poll() in process context + * kring->nm_sync() == netmap_rxsync_from_host_compat + * netmap_rxsync_from_host(na, NULL, NULL) + * - tx to host stack: + * ioctl(NIOCTXSYNC)/netmap_poll() in process context + * kring->nm_sync() == netmap_txsync_to_host_compat + * netmap_txsync_to_host(na) + * NM_SEND_UP() + * FreeBSD: na->if_input() == ??? XXX + * linux: netif_rx() with NM_MAGIC_PRIORITY_RX * * - * -= SYSTEM DEVICE WITH GENERIC SUPPORT, CONNECTED TO VALE, WITH HOST RINGS =- + * -= VALE =- * + * INCOMING: * + * - VALE ports: + * ioctl(NIOCTXSYNC)/netmap_poll() in process context + * kring->nm_sync() == netmap_vp_txsync() + * + * - system device with native support: + * from cable: + * interrupt + * na->nm_notify() == netmap_bwrap_intr_notify(ring_nr != host ring) + * kring->nm_sync() == DEVICE_netmap_rxsync() + * netmap_vp_txsync() + * kring->nm_sync() == DEVICE_netmap_rxsync() + * from host stack: + * netmap_transmit() + * na->nm_notify() == netmap_bwrap_intr_notify(ring_nr == host ring) + * kring->nm_sync() == netmap_rxsync_from_host_compat() + * netmap_vp_txsync() + * + * - system device with generic support: + * from device driver: + * generic_rx_handler() + * na->nm_notify() == netmap_bwrap_intr_notify(ring_nr != host ring) + * kring->nm_sync() == generic_netmap_rxsync() + * netmap_vp_txsync() + * kring->nm_sync() == generic_netmap_rxsync() + * from host stack: + * netmap_transmit() + * na->nm_notify() == netmap_bwrap_intr_notify(ring_nr == host ring) + * kring->nm_sync() == netmap_rxsync_from_host_compat() + * netmap_vp_txsync() + * + * (all cases) --> nm_bdg_flush() + * dest_na->nm_notify() == (see below) + * + * OUTGOING: + * + * - VALE ports: + * concurrently: + * 1) ioctlNIOCRXSYNC)/netmap_poll() in process context + * kring->nm_sync() == netmap_vp_rxsync() + * 2) from nm_bdg_flush() + * na->nm_notify() == netmap_notify() + * + * - system device with native support: + * to cable: + * na->nm_notify() == netmap_bwrap_notify() + * netmap_vp_rxsync() + * kring->nm_sync() == DEVICE_netmap_txsync() + * netmap_vp_rxsync() + * to host stack: + * netmap_vp_rxsync() + * kring->nm_sync() == netmap_txsync_to_host_compat + * netmap_vp_rxsync_locked() + * + * - system device with generic adapter: + * to device driver: + * na->nm_notify() == netmap_bwrap_notify() + * netmap_vp_rxsync() + * kring->nm_sync() == generic_netmap_txsync() + * netmap_vp_rxsync() + * to host stack: + * netmap_vp_rxsync() + * kring->nm_sync() == netmap_txsync_to_host_compat + * netmap_vp_rxsync() * */ @@ -412,15 +494,6 @@ ports attached to the switch) MALLOC_DEFINE(M_NETMAP, "netmap", "Network memory map"); -/* - * The following variables are used by the drivers and replicate - * fields in the global memory pool. They only refer to buffers - * used by physical interfaces. - */ -u_int netmap_total_buffers; -u_int netmap_buf_size; -char *netmap_buffer_base; /* also address of an invalid buffer */ - /* user-controlled variables */ int netmap_verbose; @@ -446,7 +519,6 @@ SYSCTL_INT(_dev_netmap, OID_AUTO, adapti int netmap_flags = 0; /* debug flags */ int netmap_fwd = 0; /* force transparent mode */ -int netmap_mmap_unreg = 0; /* allow mmap of unregistered fds */ /* * netmap_admode selects the netmap mode to use. @@ -464,7 +536,6 @@ int netmap_generic_rings = 1; /* numbe SYSCTL_INT(_dev_netmap, OID_AUTO, flags, CTLFLAG_RW, &netmap_flags, 0 , ""); SYSCTL_INT(_dev_netmap, OID_AUTO, fwd, CTLFLAG_RW, &netmap_fwd, 0 , ""); -SYSCTL_INT(_dev_netmap, OID_AUTO, mmap_unreg, CTLFLAG_RW, &netmap_mmap_unreg, 0, ""); SYSCTL_INT(_dev_netmap, OID_AUTO, admode, CTLFLAG_RW, &netmap_admode, 0 , ""); SYSCTL_INT(_dev_netmap, OID_AUTO, generic_mit, CTLFLAG_RW, &netmap_generic_mit, 0 , ""); SYSCTL_INT(_dev_netmap, OID_AUTO, generic_ringsize, CTLFLAG_RW, &netmap_generic_ringsize, 0 , ""); @@ -472,15 +543,6 @@ SYSCTL_INT(_dev_netmap, OID_AUTO, generi NMG_LOCK_T netmap_global_lock; - -static void -nm_kr_get(struct netmap_kring *kr) -{ - while (NM_ATOMIC_TEST_AND_SET(&kr->nr_busy)) - tsleep(kr, 0, "NM_KR_GET", 4); -} - - /* * mark the ring as stopped, and run through the locks * to make sure other users get to see it. @@ -495,34 +557,14 @@ netmap_disable_ring(struct netmap_kring nm_kr_put(kr); } -/* stop or enable a single tx ring */ -void -netmap_set_txring(struct netmap_adapter *na, u_int ring_id, int stopped) -{ - if (stopped) - netmap_disable_ring(na->tx_rings + ring_id); - else - na->tx_rings[ring_id].nkr_stopped = 0; - /* nofify that the stopped state has changed. This is currently - *only used by bwrap to propagate the state to its own krings. - * (see netmap_bwrap_intr_notify). - */ - na->nm_notify(na, ring_id, NR_TX, NAF_DISABLE_NOTIFY); -} - -/* stop or enable a single rx ring */ +/* stop or enable a single ring */ void -netmap_set_rxring(struct netmap_adapter *na, u_int ring_id, int stopped) +netmap_set_ring(struct netmap_adapter *na, u_int ring_id, enum txrx t, int stopped) { if (stopped) - netmap_disable_ring(na->rx_rings + ring_id); + netmap_disable_ring(NMR(na, t) + ring_id); else - na->rx_rings[ring_id].nkr_stopped = 0; - /* nofify that the stopped state has changed. This is currently - *only used by bwrap to propagate the state to its own krings. - * (see netmap_bwrap_intr_notify). - */ - na->nm_notify(na, ring_id, NR_RX, NAF_DISABLE_NOTIFY); + NMR(na, t)[ring_id].nkr_stopped = 0; } @@ -531,20 +573,15 @@ void netmap_set_all_rings(struct netmap_adapter *na, int stopped) { int i; - u_int ntx, nrx; + enum txrx t; if (!nm_netmap_on(na)) return; - ntx = netmap_real_tx_rings(na); - nrx = netmap_real_rx_rings(na); - - for (i = 0; i < ntx; i++) { - netmap_set_txring(na, i, stopped); - } - - for (i = 0; i < nrx; i++) { - netmap_set_rxring(na, i, stopped); + for_rx_tx(t) { + for (i = 0; i < netmap_real_rings(na, t); i++) { + netmap_set_ring(na, i, t, stopped); + } } } @@ -657,7 +694,8 @@ netmap_update_config(struct netmap_adapt txr = txd = rxr = rxd = 0; if (na->nm_config == NULL || - na->nm_config(na, &txr, &txd, &rxr, &rxd)) { + na->nm_config(na, &txr, &txd, &rxr, &rxd)) + { /* take whatever we had at init time */ txr = na->num_tx_rings; txd = na->num_tx_desc; @@ -738,73 +776,59 @@ netmap_krings_create(struct netmap_adapt { u_int i, len, ndesc; struct netmap_kring *kring; - u_int ntx, nrx; + u_int n[NR_TXRX]; + enum txrx t; /* account for the (possibly fake) host rings */ - ntx = na->num_tx_rings + 1; - nrx = na->num_rx_rings + 1; + n[NR_TX] = na->num_tx_rings + 1; + n[NR_RX] = na->num_rx_rings + 1; - len = (ntx + nrx) * sizeof(struct netmap_kring) + tailroom; + len = (n[NR_TX] + n[NR_RX]) * sizeof(struct netmap_kring) + tailroom; na->tx_rings = malloc((size_t)len, M_DEVBUF, M_NOWAIT | M_ZERO); if (na->tx_rings == NULL) { D("Cannot allocate krings"); return ENOMEM; } - na->rx_rings = na->tx_rings + ntx; + na->rx_rings = na->tx_rings + n[NR_TX]; /* * All fields in krings are 0 except the one initialized below. * but better be explicit on important kring fields. */ - ndesc = na->num_tx_desc; - for (i = 0; i < ntx; i++) { /* Transmit rings */ - kring = &na->tx_rings[i]; - bzero(kring, sizeof(*kring)); - kring->na = na; - kring->ring_id = i; - kring->nkr_num_slots = ndesc; - if (i < na->num_tx_rings) { - kring->nm_sync = na->nm_txsync; - } else if (i == na->num_tx_rings) { - kring->nm_sync = netmap_txsync_to_host_compat; + for_rx_tx(t) { + ndesc = nma_get_ndesc(na, t); + for (i = 0; i < n[t]; i++) { + kring = &NMR(na, t)[i]; + bzero(kring, sizeof(*kring)); + kring->na = na; + kring->ring_id = i; + kring->tx = t; + kring->nkr_num_slots = ndesc; + if (i < nma_get_nrings(na, t)) { + kring->nm_sync = (t == NR_TX ? na->nm_txsync : na->nm_rxsync); + } else if (i == na->num_tx_rings) { + kring->nm_sync = (t == NR_TX ? + netmap_txsync_to_host_compat : + netmap_rxsync_from_host_compat); + } + kring->nm_notify = na->nm_notify; + kring->rhead = kring->rcur = kring->nr_hwcur = 0; + /* + * IMPORTANT: Always keep one slot empty. + */ + kring->rtail = kring->nr_hwtail = (t == NR_TX ? ndesc - 1 : 0); + snprintf(kring->name, sizeof(kring->name) - 1, "%s %s%d", na->name, + nm_txrx2str(t), i); + ND("ktx %s h %d c %d t %d", + kring->name, kring->rhead, kring->rcur, kring->rtail); + mtx_init(&kring->q_lock, (t == NR_TX ? "nm_txq_lock" : "nm_rxq_lock"), NULL, MTX_DEF); + init_waitqueue_head(&kring->si); } - /* - * IMPORTANT: Always keep one slot empty. - */ - kring->rhead = kring->rcur = kring->nr_hwcur = 0; - kring->rtail = kring->nr_hwtail = ndesc - 1; - snprintf(kring->name, sizeof(kring->name) - 1, "%s TX%d", na->name, i); - ND("ktx %s h %d c %d t %d", - kring->name, kring->rhead, kring->rcur, kring->rtail); - mtx_init(&kring->q_lock, "nm_txq_lock", NULL, MTX_DEF); - init_waitqueue_head(&kring->si); - } - - ndesc = na->num_rx_desc; - for (i = 0; i < nrx; i++) { /* Receive rings */ - kring = &na->rx_rings[i]; - bzero(kring, sizeof(*kring)); - kring->na = na; - kring->ring_id = i; - kring->nkr_num_slots = ndesc; - if (i < na->num_rx_rings) { - kring->nm_sync = na->nm_rxsync; - } else if (i == na->num_rx_rings) { - kring->nm_sync = netmap_rxsync_from_host_compat; - } - kring->rhead = kring->rcur = kring->nr_hwcur = 0; - kring->rtail = kring->nr_hwtail = 0; - snprintf(kring->name, sizeof(kring->name) - 1, "%s RX%d", na->name, i); - ND("krx %s h %d c %d t %d", - kring->name, kring->rhead, kring->rcur, kring->rtail); - mtx_init(&kring->q_lock, "nm_rxq_lock", NULL, MTX_DEF); - init_waitqueue_head(&kring->si); + init_waitqueue_head(&na->si[t]); } - init_waitqueue_head(&na->tx_si); - init_waitqueue_head(&na->rx_si); - na->tailroom = na->rx_rings + nrx; + na->tailroom = na->rx_rings + n[NR_RX]; return 0; } @@ -829,6 +853,10 @@ void netmap_krings_delete(struct netmap_adapter *na) { struct netmap_kring *kring = na->tx_rings; + enum txrx t; + + for_rx_tx(t) + netmap_knlist_destroy(&na->si[t]); /* we rely on the krings layout described above */ for ( ; kring != na->tailroom; kring++) { @@ -858,142 +886,35 @@ netmap_hw_krings_delete(struct netmap_ad } -/* create a new netmap_if for a newly registered fd. - * If this is the first registration of the adapter, - * also create the netmap rings and their in-kernel view, - * the netmap krings. - */ -/* call with NMG_LOCK held */ -static struct netmap_if* -netmap_if_new(struct netmap_adapter *na) -{ - struct netmap_if *nifp; - - if (netmap_update_config(na)) { - /* configuration mismatch, report and fail */ - return NULL; - } - - if (na->active_fds) /* already registered */ - goto final; - - /* create and init the krings arrays. - * Depending on the adapter, this may also create - * the netmap rings themselves - */ - if (na->nm_krings_create(na)) - return NULL; - - /* create all missing netmap rings */ - if (netmap_mem_rings_create(na)) - goto cleanup; - -final: - - /* in all cases, create a new netmap if */ - nifp = netmap_mem_if_new(na); - if (nifp == NULL) - goto cleanup; - - return (nifp); - -cleanup: - - if (na->active_fds == 0) { - netmap_mem_rings_delete(na); - na->nm_krings_delete(na); - } - - return NULL; -} - - -/* grab a reference to the memory allocator, if we don't have one already. The - * reference is taken from the netmap_adapter registered with the priv. - */ -/* call with NMG_LOCK held */ -static int -netmap_get_memory_locked(struct netmap_priv_d* p) -{ - struct netmap_mem_d *nmd; - int error = 0; - - if (p->np_na == NULL) { - if (!netmap_mmap_unreg) - return ENODEV; - /* for compatibility with older versions of the API - * we use the global allocator when no interface has been - * registered - */ - nmd = &nm_mem; - } else { - nmd = p->np_na->nm_mem; - } - if (p->np_mref == NULL) { - error = netmap_mem_finalize(nmd, p->np_na); - if (!error) - p->np_mref = nmd; - } else if (p->np_mref != nmd) { - /* a virtual port has been registered, but previous - * syscalls already used the global allocator. - * We cannot continue - */ - error = ENODEV; - } - return error; -} - - -/* call with NMG_LOCK *not* held */ -int -netmap_get_memory(struct netmap_priv_d* p) -{ - int error; - NMG_LOCK(); - error = netmap_get_memory_locked(p); - NMG_UNLOCK(); - return error; -} - - -/* call with NMG_LOCK held */ -static int -netmap_have_memory_locked(struct netmap_priv_d* p) -{ - return p->np_mref != NULL; -} - - -/* call with NMG_LOCK held */ -static void -netmap_drop_memory_locked(struct netmap_priv_d* p) -{ - if (p->np_mref) { - netmap_mem_deref(p->np_mref, p->np_na); - p->np_mref = NULL; - } -} - /* - * Call nm_register(ifp,0) to stop netmap mode on the interface and + * Undo everything that was done in netmap_do_regif(). In particular, + * call nm_register(ifp,0) to stop netmap mode on the interface and * revert to normal operation. - * The second argument is the nifp to work on. In some cases it is - * not attached yet to the netmap_priv_d so we need to pass it as - * a separate argument. */ /* call with NMG_LOCK held */ +static void netmap_unset_ringid(struct netmap_priv_d *); +static void netmap_rel_exclusive(struct netmap_priv_d *); static void -netmap_do_unregif(struct netmap_priv_d *priv, struct netmap_if *nifp) +netmap_do_unregif(struct netmap_priv_d *priv) { struct netmap_adapter *na = priv->np_na; NMG_LOCK_ASSERT(); na->active_fds--; + /* release exclusive use if it was requested on regif */ + netmap_rel_exclusive(priv); if (na->active_fds <= 0) { /* last instance */ if (netmap_verbose) D("deleting last instance for %s", na->name); + +#ifdef WITH_MONITOR + /* walk through all the rings and tell any monitor + * that the port is going to exit netmap mode + */ + netmap_monitor_stop(na); +#endif /* * (TO CHECK) This function is only called * when the last reference to this file descriptor goes @@ -1014,37 +935,33 @@ netmap_do_unregif(struct netmap_priv_d * * XXX The wake up now must happen during *_down(), when * we order all activities to stop. -gl */ - netmap_knlist_destroy(&na->tx_si); - netmap_knlist_destroy(&na->rx_si); - /* delete rings and buffers */ netmap_mem_rings_delete(na); na->nm_krings_delete(na); } + /* possibily decrement counter of tx_si/rx_si users */ + netmap_unset_ringid(priv); /* delete the nifp */ - netmap_mem_if_delete(na, nifp); -} - -/* call with NMG_LOCK held */ -static __inline int -nm_tx_si_user(struct netmap_priv_d *priv) -{ - return (priv->np_na != NULL && - (priv->np_txqlast - priv->np_txqfirst > 1)); + netmap_mem_if_delete(na, priv->np_nifp); + /* drop the allocator */ + netmap_mem_deref(na->nm_mem, na); + /* mark the priv as unregistered */ + priv->np_na = NULL; + priv->np_nifp = NULL; } /* call with NMG_LOCK held */ static __inline int -nm_rx_si_user(struct netmap_priv_d *priv) +nm_si_user(struct netmap_priv_d *priv, enum txrx t) { return (priv->np_na != NULL && - (priv->np_rxqlast - priv->np_rxqfirst > 1)); + (priv->np_qlast[t] - priv->np_qfirst[t] > 1)); } - /* * Destructor of the netmap_priv_d, called when the fd has - * no active open() and mmap(). Also called in error paths. + * no active open() and mmap(). + * Undo all the things done by NIOCREGIF. * * returns 1 if this is the last instance and we can free priv */ @@ -1066,17 +983,8 @@ netmap_dtor_locked(struct netmap_priv_d if (!na) { return 1; //XXX is it correct? } - netmap_do_unregif(priv, priv->np_nifp); - priv->np_nifp = NULL; - netmap_drop_memory_locked(priv); - if (priv->np_na) { - if (nm_tx_si_user(priv)) - na->tx_si_users--; - if (nm_rx_si_user(priv)) - na->rx_si_users--; - netmap_adapter_put(na); - priv->np_na = NULL; - } + netmap_do_unregif(priv); + netmap_adapter_put(na); return 1; } @@ -1148,7 +1056,7 @@ static void netmap_grab_packets(struct netmap_kring *kring, struct mbq *q, int force) { u_int const lim = kring->nkr_num_slots - 1; - u_int const head = kring->ring->head; + u_int const head = kring->rhead; u_int n; struct netmap_adapter *na = kring->na; @@ -1235,7 +1143,6 @@ void netmap_txsync_to_host(struct netmap_adapter *na) { struct netmap_kring *kring = &na->tx_rings[na->num_tx_rings]; - struct netmap_ring *ring = kring->ring; u_int const lim = kring->nkr_num_slots - 1; u_int const head = kring->rhead; struct mbq q; @@ -1246,14 +1153,12 @@ netmap_txsync_to_host(struct netmap_adap * the queue is drained in all cases. */ mbq_init(&q); - ring->cur = head; netmap_grab_packets(kring, &q, 1 /* force */); ND("have %d pkts in queue", mbq_len(&q)); kring->nr_hwcur = head; kring->nr_hwtail = head + lim; if (kring->nr_hwtail > lim) kring->nr_hwtail -= lim + 1; - nm_txsync_finalize(kring); netmap_send_up(na->ifp, &q); } @@ -1281,11 +1186,13 @@ netmap_rxsync_from_host(struct netmap_ad u_int const lim = kring->nkr_num_slots - 1; u_int const head = kring->rhead; int ret = 0; - struct mbq *q = &kring->rx_queue; + struct mbq *q = &kring->rx_queue, fq; (void)pwait; /* disable unused warnings */ (void)td; + mbq_init(&fq); /* fq holds packets to be freed */ + mbq_lock(q); /* First part: import newly received packets */ @@ -1308,7 +1215,7 @@ netmap_rxsync_from_host(struct netmap_ad slot->len = len; slot->flags = kring->nkr_slot_flags; nm_i = nm_next(nm_i, lim); - m_freem(m); + mbq_enqueue(&fq, m); } kring->nr_hwtail = nm_i; } @@ -1323,13 +1230,15 @@ netmap_rxsync_from_host(struct netmap_ad kring->nr_hwcur = head; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Jul 10 06:47:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACCAD997934; Fri, 10 Jul 2015 06:47:15 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 9BA18213; Fri, 10 Jul 2015 06:47:15 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6A6lFfC075327; Fri, 10 Jul 2015 06:47:15 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6A6lFFf075326; Fri, 10 Jul 2015 06:47:15 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201507100647.t6A6lFFf075326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Fri, 10 Jul 2015 06:47:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285350 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 06:47:15 -0000 Author: ed Date: Fri Jul 10 06:47:14 2015 New Revision: 285350 URL: https://svnweb.freebsd.org/changeset/base/285350 Log: Let listen() return EDESTADDRREQ when not bound. We currently return EINVAL when calling listen() on a UNIX socket that has not been bound to a pathname. If my interpretation of POSIX is correct, we should return EDESTADDRREQ: "The socket is not bound to a local address, and the protocol does not support listening on an unbound socket." Return EDESTADDRREQ instead when not bound and not connected. Differential Revision: https://reviews.freebsd.org/D3038 Reviewed by: gnn, network Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Fri Jul 10 05:51:36 2015 (r285349) +++ head/sys/kern/uipc_usrreq.c Fri Jul 10 06:47:14 2015 (r285350) @@ -736,8 +736,10 @@ uipc_listen(struct socket *so, int backl UNP_PCB_LOCK(unp); if (unp->unp_vnode == NULL) { + /* Already connected or not bound to an address. */ + error = unp->unp_conn != NULL ? EINVAL : EDESTADDRREQ; UNP_PCB_UNLOCK(unp); - return (EINVAL); + return (error); } SOCK_LOCK(so); From owner-svn-src-all@freebsd.org Fri Jul 10 07:13:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A10AB997DDE; Fri, 10 Jul 2015 07:13:15 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 88A51DD9; Fri, 10 Jul 2015 07:13:15 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6A7DFMG089217; Fri, 10 Jul 2015 07:13:15 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6A7DFIa089216; Fri, 10 Jul 2015 07:13:15 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201507100713.t6A7DFIa089216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Fri, 10 Jul 2015 07:13:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285351 - head/sys/dev/virtio/network X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 07:13:15 -0000 Author: luigi Date: Fri Jul 10 07:13:14 2015 New Revision: 285351 URL: https://svnweb.freebsd.org/changeset/base/285351 Log: add netmap dependency when compiled as a module Modified: head/sys/dev/virtio/network/if_vtnet.c Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Fri Jul 10 06:47:14 2015 (r285350) +++ head/sys/dev/virtio/network/if_vtnet.c Fri Jul 10 07:13:14 2015 (r285351) @@ -304,6 +304,9 @@ DRIVER_MODULE(vtnet, virtio_pci, vtnet_d vtnet_modevent, 0); MODULE_VERSION(vtnet, 1); MODULE_DEPEND(vtnet, virtio, 1, 1, 1); +#ifdef DEV_NETMAP +MODULE_DEPEND(vtnet, netmap, 1, 1, 1); +#endif /* DEV_NETMAP */ static int vtnet_modevent(module_t mod, int type, void *unused) From owner-svn-src-all@freebsd.org Fri Jul 10 08:36:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D69333DC7; Fri, 10 Jul 2015 08:36:24 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 BBC811176; Fri, 10 Jul 2015 08:36:24 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6A8aOlv029106; Fri, 10 Jul 2015 08:36:24 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6A8aMCl029097; Fri, 10 Jul 2015 08:36:22 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507100836.t6A8aMCl029097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 10 Jul 2015 08:36:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285352 - in head/lib/libc: aarch64 aarch64/gen tests/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 08:36:24 -0000 Author: andrew Date: Fri Jul 10 08:36:22 2015 New Revision: 285352 URL: https://svnweb.freebsd.org/changeset/base/285352 Log: Add support for makecontext. This supports up to 8 arguments as this simplifies the code, these can be passed in registers. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Added: head/lib/libc/aarch64/gen/_ctx_start.S (contents, props changed) head/lib/libc/aarch64/gen/makecontext.c (contents, props changed) Modified: head/lib/libc/aarch64/Symbol.map head/lib/libc/aarch64/gen/Makefile.inc head/lib/libc/tests/sys/Makefile Modified: head/lib/libc/aarch64/Symbol.map ============================================================================== --- head/lib/libc/aarch64/Symbol.map Fri Jul 10 07:13:14 2015 (r285351) +++ head/lib/libc/aarch64/Symbol.map Fri Jul 10 08:36:22 2015 (r285352) @@ -28,6 +28,7 @@ FBSD_1.0 { vfork; brk; sbrk; + makecontext; }; FBSDprivate_1.0 { @@ -35,4 +36,5 @@ FBSDprivate_1.0 { _end; curbrk; minbrk; + __makecontext; }; Modified: head/lib/libc/aarch64/gen/Makefile.inc ============================================================================== --- head/lib/libc/aarch64/gen/Makefile.inc Fri Jul 10 07:13:14 2015 (r285351) +++ head/lib/libc/aarch64/gen/Makefile.inc Fri Jul 10 08:36:22 2015 (r285352) @@ -1,10 +1,12 @@ # $FreeBSD$ -SRCS+= fabs.S \ +SRCS+= _ctx_start.S \ + fabs.S \ flt_rounds.c \ fpgetmask.c \ fpsetmask.c \ ldexp.c \ + makecontext.c \ _setjmp.S \ _set_tp.c \ setjmp.S \ Added: head/lib/libc/aarch64/gen/_ctx_start.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/gen/_ctx_start.S Fri Jul 10 08:36:22 2015 (r285352) @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +ENTRY(_ctx_start) + blr x19 /* Call func from makecontext */ + mov x0, x20 /* Load ucp saved in makecontext */ + bl _C_LABEL(ctx_done) + bl _C_LABEL(abort) +END(_ctx_start) Added: head/lib/libc/aarch64/gen/makecontext.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/gen/makecontext.c Fri Jul 10 08:36:22 2015 (r285352) @@ -0,0 +1,86 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include + +#include +#include +#include +#include + +void _ctx_start(void); + +void +ctx_done(ucontext_t *ucp) +{ + + if (ucp->uc_link == NULL) { + exit(0); + } else { + setcontext((const ucontext_t *)ucp->uc_link); + abort(); + } +} + +__weak_reference(__makecontext, makecontext); + +void +__makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...) +{ + struct gpregs *gp; + va_list ap; + int i; + + /* A valid context is required. */ + if (ucp == NULL) + return; + + if ((argc < 0) || (argc > 8)) + return; + + gp = &ucp->uc_mcontext.mc_gpregs; + + va_start(ap, argc); + /* Pass up to eight arguments in x0-7. */ + for (i = 0; i < argc && i < 8; i++) + gp->gp_x[i] = va_arg(ap, uint64_t); + va_end(ap); + + /* Set the stack */ + gp->gp_sp = STACKALIGN(ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); + /* Arrange for return via the trampoline code. */ + gp->gp_elr = (__register_t)_ctx_start; + gp->gp_x[19] = (__register_t)func; + gp->gp_x[20] = (__register_t)ucp; +} Modified: head/lib/libc/tests/sys/Makefile ============================================================================== --- head/lib/libc/tests/sys/Makefile Fri Jul 10 07:13:14 2015 (r285351) +++ head/lib/libc/tests/sys/Makefile Fri Jul 10 08:36:22 2015 (r285352) @@ -12,9 +12,7 @@ NETBSD_ATF_TESTS_C+= clock_gettime_test NETBSD_ATF_TESTS_C+= connect_test NETBSD_ATF_TESTS_C+= dup_test NETBSD_ATF_TESTS_C+= fsync_test -.if ${MACHINE} != "arm64" # ARM64TODO: Missing makecontext NETBSD_ATF_TESTS_C+= getcontext_test -.endif NETBSD_ATF_TESTS_C+= getgroups_test NETBSD_ATF_TESTS_C+= getitimer_test NETBSD_ATF_TESTS_C+= getlogin_test From owner-svn-src-all@freebsd.org Fri Jul 10 08:54:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1996999604F; Fri, 10 Jul 2015 08:54:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 F41031B1D; Fri, 10 Jul 2015 08:54:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6A8sDMa038573; Fri, 10 Jul 2015 08:54:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6A8sDOa038572; Fri, 10 Jul 2015 08:54:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201507100854.t6A8sDOa038572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 10 Jul 2015 08:54:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285353 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 08:54:14 -0000 Author: kib Date: Fri Jul 10 08:54:12 2015 New Revision: 285353 URL: https://svnweb.freebsd.org/changeset/base/285353 Log: Change the mb() use in the sched_ult tdq_notify() and sched_idletd() to more C11-ish atomic_thread_fence_seq_cst(). Note that on PowerPC, which currently uses lwsync for mb(), the change actually fixes the missed store/load barrier, intended by r271604 [*]. Reviewed by: alc Noted by: alc [*] Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Fri Jul 10 08:36:22 2015 (r285352) +++ head/sys/kern/sched_ule.c Fri Jul 10 08:54:12 2015 (r285353) @@ -1057,7 +1057,7 @@ tdq_notify(struct tdq *tdq, struct threa * globally visible before we read tdq_cpu_idle. Idle thread * accesses both of them without locks, and the order is important. */ - mb(); + atomic_thread_fence_seq_cst(); if (TD_IS_IDLETHREAD(ctd)) { /* @@ -2667,7 +2667,7 @@ sched_idletd(void *dummy) * before cpu_idle() read tdq_load. The order is important * to avoid race with tdq_notify. */ - mb(); + atomic_thread_fence_seq_cst(); cpu_idle(switchcnt * 4 > sched_idlespinthresh); tdq->tdq_cpu_idle = 0; From owner-svn-src-all@freebsd.org Fri Jul 10 09:15:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1830999675F; Fri, 10 Jul 2015 09:15:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 DF9526D1; Fri, 10 Jul 2015 09:15:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6A9F7ge048459; Fri, 10 Jul 2015 09:15:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6A9F7Jv048458; Fri, 10 Jul 2015 09:15:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201507100915.t6A9F7Jv048458@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 10 Jul 2015 09:15:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285354 - head/sys/i386/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 09:15:08 -0000 Author: kib Date: Fri Jul 10 09:15:06 2015 New Revision: 285354 URL: https://svnweb.freebsd.org/changeset/base/285354 Log: Duplicate the copyright from the i386/i386/machdep.c into i386/include/frame.h after a code was moved from machdep.c to frame.h in r284925. Use include guards style similar to other guards. Noted by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/i386/include/frame.h Modified: head/sys/i386/include/frame.h ============================================================================== --- head/sys/i386/include/frame.h Fri Jul 10 08:54:12 2015 (r285353) +++ head/sys/i386/include/frame.h Fri Jul 10 09:15:06 2015 (r285354) @@ -1,14 +1,44 @@ /*- - * This file is in the public domain. + * Copyright (c) 2003 Peter Wemm. + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * William Jolitz. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ */ -/* $FreeBSD$ */ -#include +#ifndef _I386_FRAME_H_ +#define _I386_FRAME_H_ -#ifndef __I386_FRAME_H__ -#define __i386_FRAME_H__ +#include #define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) -#endif +#endif /* _I386_FRAME_H_ */ From owner-svn-src-all@freebsd.org Fri Jul 10 09:20:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB4EF9967E0; Fri, 10 Jul 2015 09:20:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 75EB38D8; Fri, 10 Jul 2015 09:20:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6A9KE7M049181; Fri, 10 Jul 2015 09:20:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6A9KEBQ049180; Fri, 10 Jul 2015 09:20:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201507100920.t6A9KEBQ049180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 10 Jul 2015 09:20:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285355 - head/sys/i386/isa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 09:20:14 -0000 Author: kib Date: Fri Jul 10 09:20:13 2015 New Revision: 285355 URL: https://svnweb.freebsd.org/changeset/base/285355 Log: Convert between abridged (from FXSAVE) and unabridged (from FSAVE) versions of the x87 tags. The conversion is naive, used abridged tag is converted to valid unabridged, without additional checks for zero and special values. Noted by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/i386/isa/npx.c Modified: head/sys/i386/isa/npx.c ============================================================================== --- head/sys/i386/isa/npx.c Fri Jul 10 09:15:06 2015 (r285354) +++ head/sys/i386/isa/npx.c Fri Jul 10 09:20:13 2015 (r285355) @@ -1173,16 +1173,20 @@ npx_fill_fpregs_xmm1(struct savexmm *sv_ /* FPU control/status */ penv_87->en_cw = penv_xmm->en_cw; penv_87->en_sw = penv_xmm->en_sw; - penv_87->en_tw = penv_xmm->en_tw; penv_87->en_fip = penv_xmm->en_fip; penv_87->en_fcs = penv_xmm->en_fcs; penv_87->en_opcode = penv_xmm->en_opcode; penv_87->en_foo = penv_xmm->en_foo; penv_87->en_fos = penv_xmm->en_fos; - /* FPU registers */ - for (i = 0; i < 8; ++i) + /* FPU registers and tags */ + penv_87->en_tw = 0xffff; + for (i = 0; i < 8; ++i) { sv_87->sv_ac[i] = sv_xmm->sv_fp[i].fp_acc; + if ((penv_xmm->en_tw & (1 << i)) != 0) + /* zero and special are set as valid */ + penv_87->en_tw &= ~(3 << i); + } } void @@ -1206,16 +1210,19 @@ npx_set_fpregs_xmm(struct save87 *sv_87, /* FPU control/status */ penv_xmm->en_cw = penv_87->en_cw; penv_xmm->en_sw = penv_87->en_sw; - penv_xmm->en_tw = penv_87->en_tw; penv_xmm->en_fip = penv_87->en_fip; penv_xmm->en_fcs = penv_87->en_fcs; penv_xmm->en_opcode = penv_87->en_opcode; penv_xmm->en_foo = penv_87->en_foo; penv_xmm->en_fos = penv_87->en_fos; - /* FPU registers */ - for (i = 0; i < 8; ++i) + /* FPU registers and tags */ + penv_xmm->en_tw = 0; + for (i = 0; i < 8; ++i) { sv_xmm->sv_fp[i].fp_acc = sv_87->sv_ac[i]; + if ((penv_87->en_tw && (3 << i)) != (3 << i)) + penv_xmm->en_tw |= 1 << i; + } } #endif /* CPU_ENABLE_SSE */ From owner-svn-src-all@freebsd.org Fri Jul 10 11:01:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D54983C1F; Fri, 10 Jul 2015 11:01:32 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 C52701E8; Fri, 10 Jul 2015 11:01:32 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6AB1WnG002166; Fri, 10 Jul 2015 11:01:32 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6AB1VYe002159; Fri, 10 Jul 2015 11:01:31 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201507101101.t6AB1VYe002159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 10 Jul 2015 11:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285356 - in head/sys: compat/cloudabi kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 11:01:33 -0000 Author: mjg Date: Fri Jul 10 11:01:30 2015 New Revision: 285356 URL: https://svnweb.freebsd.org/changeset/base/285356 Log: fd: split kern_dup flags argument into actual flags and a mode Tidy up the code inside to switch on the mode. Modified: head/sys/compat/cloudabi/cloudabi_fd.c head/sys/kern/kern_descrip.c head/sys/sys/filedesc.h head/sys/sys/syscallsubr.h Modified: head/sys/compat/cloudabi/cloudabi_fd.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_fd.c Fri Jul 10 09:20:13 2015 (r285355) +++ head/sys/compat/cloudabi/cloudabi_fd.c Fri Jul 10 11:01:30 2015 (r285356) @@ -97,7 +97,7 @@ cloudabi_sys_fd_replace(struct thread *t * clear the return value, as this system call yields no return * value. */ - error = kern_dup(td, FDDUP_MUSTREPLACE, uap->from, uap->to); + error = kern_dup(td, FDDUP_MUSTREPLACE, 0, uap->from, uap->to); td->td_retval[0] = 0; return (error); } Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Fri Jul 10 09:20:13 2015 (r285355) +++ head/sys/kern/kern_descrip.c Fri Jul 10 11:01:30 2015 (r285356) @@ -355,7 +355,7 @@ int sys_dup2(struct thread *td, struct dup2_args *uap) { - return (kern_dup(td, FDDUP_FIXED, (int)uap->from, (int)uap->to)); + return (kern_dup(td, FDDUP_FIXED, 0, (int)uap->from, (int)uap->to)); } /* @@ -371,7 +371,7 @@ int sys_dup(struct thread *td, struct dup_args *uap) { - return (kern_dup(td, 0, (int)uap->fd, 0)); + return (kern_dup(td, FDDUP_NORMAL, 0, (int)uap->fd, 0)); } /* @@ -481,22 +481,22 @@ kern_fcntl(struct thread *td, int fd, in switch (cmd) { case F_DUPFD: tmp = arg; - error = kern_dup(td, FDDUP_FCNTL, fd, tmp); + error = kern_dup(td, FDDUP_FCNTL, 0, fd, tmp); break; case F_DUPFD_CLOEXEC: tmp = arg; - error = kern_dup(td, FDDUP_FCNTL | FDDUP_CLOEXEC, fd, tmp); + error = kern_dup(td, FDDUP_FCNTL, FDDUP_CLOEXEC, fd, tmp); break; case F_DUP2FD: tmp = arg; - error = kern_dup(td, FDDUP_FIXED, fd, tmp); + error = kern_dup(td, FDDUP_FIXED, 0, fd, tmp); break; case F_DUP2FD_CLOEXEC: tmp = arg; - error = kern_dup(td, FDDUP_FIXED | FDDUP_CLOEXEC, fd, tmp); + error = kern_dup(td, FDDUP_FIXED, FDDUP_CLOEXEC, fd, tmp); break; case F_GETFD: @@ -789,7 +789,7 @@ getmaxfd(struct thread *td) * Common code for dup, dup2, fcntl(F_DUPFD) and fcntl(F_DUP2FD). */ int -kern_dup(struct thread *td, int flags, int old, int new) +kern_dup(struct thread *td, u_int mode, int flags, int old, int new) { struct filedesc *fdp; struct filedescent *oldfde, *newfde; @@ -801,10 +801,8 @@ kern_dup(struct thread *td, int flags, i p = td->td_proc; fdp = p->p_fd; - MPASS((flags & ~(FDDUP_FIXED | FDDUP_FCNTL | FDDUP_CLOEXEC | - FDDUP_MUSTREPLACE)) == 0); - MPASS((flags & (FDDUP_FIXED | FDDUP_MUSTREPLACE)) != - (FDDUP_FIXED | FDDUP_MUSTREPLACE)); + MPASS((flags & ~(FDDUP_CLOEXEC)) == 0); + MPASS(mode < FDDUP_LASTMODE); /* * Verify we have a valid descriptor to dup from and possibly to @@ -825,7 +823,7 @@ kern_dup(struct thread *td, int flags, i return (EBADF); } oldfde = &fdp->fd_ofiles[old]; - if (flags & (FDDUP_FIXED | FDDUP_MUSTREPLACE) && old == new) { + if ((mode == FDDUP_FIXED || mode == FDDUP_MUSTREPLACE) && old == new) { td->td_retval[0] = new; if (flags & FDDUP_CLOEXEC) fdp->fd_ofiles[new].fde_flags |= UF_EXCLOSE; @@ -840,7 +838,17 @@ kern_dup(struct thread *td, int flags, i * table is large enough to hold it, and grab it. Otherwise, just * allocate a new descriptor the usual way. */ - if (flags & FDDUP_MUSTREPLACE) { + switch (mode) { + case FDDUP_NORMAL: + case FDDUP_FCNTL: + if ((error = fdalloc(td, new, &new)) != 0) { + FILEDESC_XUNLOCK(fdp); + fdrop(fp, td); + return (error); + } + newfde = &fdp->fd_ofiles[new]; + break; + case FDDUP_MUSTREPLACE: /* Target file descriptor must exist. */ if (new >= fdp->fd_nfiles || fdp->fd_ofiles[new].fde_file == NULL) { @@ -849,7 +857,8 @@ kern_dup(struct thread *td, int flags, i return (EBADF); } newfde = &fdp->fd_ofiles[new]; - } else if (flags & FDDUP_FIXED) { + break; + case FDDUP_FIXED: if (new >= fdp->fd_nfiles) { /* * The resource limits are here instead of e.g. @@ -877,13 +886,12 @@ kern_dup(struct thread *td, int flags, i newfde = &fdp->fd_ofiles[new]; if (newfde->fde_file == NULL) fdused(fdp, new); - } else { - if ((error = fdalloc(td, new, &new)) != 0) { - FILEDESC_XUNLOCK(fdp); - fdrop(fp, td); - return (error); - } - newfde = &fdp->fd_ofiles[new]; + break; +#ifdef INVARIANTS + default: + newfde = NULL; /* silence the compiler */ + KASSERT(0, ("%s unsupported mode %d", __func__, mode)); +#endif } KASSERT(fp == oldfde->fde_file, ("old fd has been modified")); @@ -2223,7 +2231,7 @@ fdcheckstd(struct thread *td) save = td->td_retval[0]; if (devnull != -1) { - error = kern_dup(td, FDDUP_FIXED, devnull, i); + error = kern_dup(td, FDDUP_FIXED, 0, devnull, i); } else { error = kern_openat(td, AT_FDCWD, "/dev/null", UIO_SYSSPACE, O_RDWR, 0); Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Fri Jul 10 09:20:13 2015 (r285355) +++ head/sys/sys/filedesc.h Fri Jul 10 11:01:30 2015 (r285356) @@ -134,11 +134,17 @@ struct filedesc_to_leader { SX_NOTRECURSED) #define FILEDESC_UNLOCK_ASSERT(fdp) sx_assert(&(fdp)->fd_sx, SX_UNLOCKED) +/* Operation types for kern_dup(). */ +enum { + FDDUP_NORMAL = 0x01, /* dup() behavior. */ + FDDUP_FCNTL, /* fcntl()-style errors. */ + FDDUP_FIXED, /* Force fixed allocation. */ + FDDUP_MUSTREPLACE, /* Target must exist. */ + FDDUP_LASTMODE, +}; + /* Flags for kern_dup(). */ -#define FDDUP_FIXED 0x1 /* Force fixed allocation. */ -#define FDDUP_FCNTL 0x2 /* fcntl()-style errors. */ -#define FDDUP_CLOEXEC 0x4 /* Atomically set FD_CLOEXEC. */ -#define FDDUP_MUSTREPLACE 0x8 /* Target must exist. */ +#define FDDUP_CLOEXEC 0x1 /* Atomically set FD_CLOEXEC. */ struct thread; Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Fri Jul 10 09:20:13 2015 (r285355) +++ head/sys/sys/syscallsubr.h Fri Jul 10 11:01:30 2015 (r285356) @@ -85,7 +85,7 @@ int kern_clock_settime(struct thread *td int kern_close(struct thread *td, int fd); int kern_connectat(struct thread *td, int dirfd, int fd, struct sockaddr *sa); -int kern_dup(struct thread *td, int flags, int old, int new); +int kern_dup(struct thread *td, u_int mode, int flags, int old, int new); int kern_execve(struct thread *td, struct image_args *args, struct mac *mac_p); int kern_fchmodat(struct thread *td, int fd, char *path, From owner-svn-src-all@freebsd.org Fri Jul 10 11:10:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 952B83D0F; Fri, 10 Jul 2015 11:10:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F32DA90F; Fri, 10 Jul 2015 11:10:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t6ABAoiT022768 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 10 Jul 2015 14:10:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t6ABAoiT022768 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t6ABAoVV022767; Fri, 10 Jul 2015 14:10:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 10 Jul 2015 14:10:50 +0300 From: Konstantin Belousov To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285356 - in head/sys: compat/cloudabi kern sys Message-ID: <20150710111050.GU2080@kib.kiev.ua> References: <201507101101.t6AB1VYe002159@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201507101101.t6AB1VYe002159@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 11:10:56 -0000 On Fri, Jul 10, 2015 at 11:01:31AM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Fri Jul 10 11:01:30 2015 > New Revision: 285356 > URL: https://svnweb.freebsd.org/changeset/base/285356 > > Log: > fd: split kern_dup flags argument into actual flags and a mode > > Tidy up the code inside to switch on the mode. > + MPASS(mode < FDDUP_LASTMODE); Since you started the FDDUP_ modes enum from 1, this assert does not fully validate the mode. Am I wrong ? > +/* Operation types for kern_dup(). */ > +enum { > + FDDUP_NORMAL = 0x01, /* dup() behavior. */ > + FDDUP_FCNTL, /* fcntl()-style errors. */ > + FDDUP_FIXED, /* Force fixed allocation. */ > + FDDUP_MUSTREPLACE, /* Target must exist. */ > + FDDUP_LASTMODE, > +}; > + > /* Flags for kern_dup(). */ > -#define FDDUP_FIXED 0x1 /* Force fixed allocation. */ > -#define FDDUP_FCNTL 0x2 /* fcntl()-style errors. */ > -#define FDDUP_CLOEXEC 0x4 /* Atomically set FD_CLOEXEC. */ > -#define FDDUP_MUSTREPLACE 0x8 /* Target must exist. */ > +#define FDDUP_CLOEXEC 0x1 /* Atomically set FD_CLOEXEC. */ Consider using different prefixes for mode/flags ? From owner-svn-src-all@freebsd.org Fri Jul 10 13:41:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8814334C; Fri, 10 Jul 2015 13:41:32 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 628B41026; Fri, 10 Jul 2015 13:41:32 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by wgjx7 with SMTP id x7so249533594wgj.2; Fri, 10 Jul 2015 06:41:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=vaq7AGmGr62Xhy5/9xM4m3hhqvR4qUMVfYeZMizTzAs=; b=DXl14Ygntmm/iOiQ2/eGo36rCZEoX7AuucBtWbZ7Vzm+fvu08pGgaQArUNOdQQ1ThZ Z9CJxSyYTQxYkmXViKQJYGMUORMiL6KTdyiM+XUJx93g8R+Fp//C6jaOQoIrg+QT6T3Y mxza9p2/FNYdYBRHIdSneHUZrm6AysMaQRvJTty7GE8NYEcHsMZgAF+aJJj/HsJqXVmM ahfEdhzDnHiFtajYAMw9cZii3cT39uAq9dOeccJtx8tvI35DqxEYA7UbpkzXAVXNDHE0 IFOyy8ZErAUJWOFoCloAq1Fmp4dBuHzElBX3T3BsJbwBN7htSllSvkE8WY6JJuGX9ZRb nNaA== X-Received: by 10.180.19.69 with SMTP id c5mr6558114wie.13.1436535690791; Fri, 10 Jul 2015 06:41:30 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id az1sm8408292wib.0.2015.07.10.06.41.29 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 10 Jul 2015 06:41:29 -0700 (PDT) Date: Fri, 10 Jul 2015 15:41:27 +0200 From: Mateusz Guzik To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285356 - in head/sys: compat/cloudabi kern sys Message-ID: <20150710134126.GA24433@dft-labs.eu> References: <201507101101.t6AB1VYe002159@repo.freebsd.org> <20150710111050.GU2080@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150710111050.GU2080@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 13:41:32 -0000 On Fri, Jul 10, 2015 at 02:10:50PM +0300, Konstantin Belousov wrote: > On Fri, Jul 10, 2015 at 11:01:31AM +0000, Mateusz Guzik wrote: > > Author: mjg > > Date: Fri Jul 10 11:01:30 2015 > > New Revision: 285356 > > URL: https://svnweb.freebsd.org/changeset/base/285356 > > > > Log: > > fd: split kern_dup flags argument into actual flags and a mode > > > > Tidy up the code inside to switch on the mode. > > > + MPASS(mode < FDDUP_LASTMODE); > Since you started the FDDUP_ modes enum from 1, this assert does not fully > validate the mode. Am I wrong ? > Oops, correct. There is no problem starting with 0, so I'll just change the enum. Thanks. > > +/* Operation types for kern_dup(). */ > > +enum { > > + FDDUP_NORMAL = 0x01, /* dup() behavior. */ > > + FDDUP_FCNTL, /* fcntl()-style errors. */ > > + FDDUP_FIXED, /* Force fixed allocation. */ > > + FDDUP_MUSTREPLACE, /* Target must exist. */ > > + FDDUP_LASTMODE, > > +}; > > + > > /* Flags for kern_dup(). */ > > -#define FDDUP_FIXED 0x1 /* Force fixed allocation. */ > > -#define FDDUP_FCNTL 0x2 /* fcntl()-style errors. */ > > -#define FDDUP_CLOEXEC 0x4 /* Atomically set FD_CLOEXEC. */ > > -#define FDDUP_MUSTREPLACE 0x8 /* Target must exist. */ > > +#define FDDUP_CLOEXEC 0x1 /* Atomically set FD_CLOEXEC. */ > > Consider using different prefixes for mode/flags ? I only came up with FDDUP_FLAG_CLOEXEC which is quite verbose, but may be acceptable. I definitely want to avoid re-using O_CLOEXEC. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Fri Jul 10 13:54:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83EFD34D1; Fri, 10 Jul 2015 13:54:04 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 6802D1626; Fri, 10 Jul 2015 13:54:04 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6ADs470086219; Fri, 10 Jul 2015 13:54:04 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6ADs3hV086216; Fri, 10 Jul 2015 13:54:03 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201507101354.t6ADs3hV086216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 10 Jul 2015 13:54:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285357 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 13:54:04 -0000 Author: mjg Date: Fri Jul 10 13:54:03 2015 New Revision: 285357 URL: https://svnweb.freebsd.org/changeset/base/285357 Log: fd: further cleanup of kern_dup - make mode enum start from 0 so that the assertion covers all cases [1] - rename prefix _CLOEXEC flag with _FLAG - postpone fhold on the old file descriptor, which eliminates the need to fdrop in error cases. - fixup FDDUP_FCNTL check missed in the previous commit This removes 'fp == oldfde->fde_file' assertion which had little value. kern_dup only calls fd-related functions which cannot drop the lock or a whole lot of races would be introduced. Noted by: kib [1] Modified: head/sys/kern/kern_descrip.c head/sys/sys/filedesc.h Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Fri Jul 10 11:01:30 2015 (r285356) +++ head/sys/kern/kern_descrip.c Fri Jul 10 13:54:03 2015 (r285357) @@ -224,7 +224,6 @@ fd_last_used(struct filedesc *fdp, int s return (-1); } -#ifdef INVARIANTS static int fdisused(struct filedesc *fdp, int fd) { @@ -234,7 +233,6 @@ fdisused(struct filedesc *fdp, int fd) return ((fdp->fd_map[NDSLOT(fd)] & NDBIT(fd)) != 0); } -#endif /* * Mark a file descriptor as used. @@ -486,7 +484,7 @@ kern_fcntl(struct thread *td, int fd, in case F_DUPFD_CLOEXEC: tmp = arg; - error = kern_dup(td, FDDUP_FCNTL, FDDUP_CLOEXEC, fd, tmp); + error = kern_dup(td, FDDUP_FCNTL, FDDUP_FLAG_CLOEXEC, fd, tmp); break; case F_DUP2FD: @@ -496,7 +494,7 @@ kern_fcntl(struct thread *td, int fd, in case F_DUP2FD_CLOEXEC: tmp = arg; - error = kern_dup(td, FDDUP_FIXED, FDDUP_CLOEXEC, fd, tmp); + error = kern_dup(td, FDDUP_FIXED, FDDUP_FLAG_CLOEXEC, fd, tmp); break; case F_GETFD: @@ -794,14 +792,13 @@ kern_dup(struct thread *td, u_int mode, struct filedesc *fdp; struct filedescent *oldfde, *newfde; struct proc *p; - struct file *fp; struct file *delfp; int error, maxfd; p = td->td_proc; fdp = p->p_fd; - MPASS((flags & ~(FDDUP_CLOEXEC)) == 0); + MPASS((flags & ~(FDDUP_FLAG_CLOEXEC)) == 0); MPASS(mode < FDDUP_LASTMODE); /* @@ -812,26 +809,23 @@ kern_dup(struct thread *td, u_int mode, if (old < 0) return (EBADF); if (new < 0) - return (flags & FDDUP_FCNTL ? EINVAL : EBADF); + return (mode == FDDUP_FCNTL ? EINVAL : EBADF); maxfd = getmaxfd(td); if (new >= maxfd) - return (flags & FDDUP_FCNTL ? EINVAL : EBADF); + return (mode == FDDUP_FCNTL ? EINVAL : EBADF); FILEDESC_XLOCK(fdp); if (fget_locked(fdp, old) == NULL) { FILEDESC_XUNLOCK(fdp); return (EBADF); } - oldfde = &fdp->fd_ofiles[old]; if ((mode == FDDUP_FIXED || mode == FDDUP_MUSTREPLACE) && old == new) { td->td_retval[0] = new; - if (flags & FDDUP_CLOEXEC) + if (flags & FDDUP_FLAG_CLOEXEC) fdp->fd_ofiles[new].fde_flags |= UF_EXCLOSE; FILEDESC_XUNLOCK(fdp); return (0); } - fp = oldfde->fde_file; - fhold(fp); /* * If the caller specified a file descriptor, make sure the file @@ -843,20 +837,15 @@ kern_dup(struct thread *td, u_int mode, case FDDUP_FCNTL: if ((error = fdalloc(td, new, &new)) != 0) { FILEDESC_XUNLOCK(fdp); - fdrop(fp, td); return (error); } - newfde = &fdp->fd_ofiles[new]; break; case FDDUP_MUSTREPLACE: /* Target file descriptor must exist. */ - if (new >= fdp->fd_nfiles || - fdp->fd_ofiles[new].fde_file == NULL) { + if (fget_locked(fdp, new) == NULL) { FILEDESC_XUNLOCK(fdp); - fdrop(fp, td); return (EBADF); } - newfde = &fdp->fd_ofiles[new]; break; case FDDUP_FIXED: if (new >= fdp->fd_nfiles) { @@ -875,28 +864,24 @@ kern_dup(struct thread *td, u_int mode, PROC_UNLOCK(p); if (error != 0) { FILEDESC_XUNLOCK(fdp); - fdrop(fp, td); return (EMFILE); } } #endif fdgrowtable_exp(fdp, new + 1); - oldfde = &fdp->fd_ofiles[old]; } - newfde = &fdp->fd_ofiles[new]; - if (newfde->fde_file == NULL) + if (!fdisused(fdp, new)) fdused(fdp, new); break; -#ifdef INVARIANTS default: - newfde = NULL; /* silence the compiler */ KASSERT(0, ("%s unsupported mode %d", __func__, mode)); -#endif } - KASSERT(fp == oldfde->fde_file, ("old fd has been modified")); KASSERT(old != new, ("new fd is same as old")); + oldfde = &fdp->fd_ofiles[old]; + fhold(oldfde->fde_file); + newfde = &fdp->fd_ofiles[new]; delfp = newfde->fde_file; /* @@ -908,7 +893,7 @@ kern_dup(struct thread *td, u_int mode, filecaps_free(&newfde->fde_caps); memcpy(newfde, oldfde, fde_change_size); filecaps_copy(&oldfde->fde_caps, &newfde->fde_caps); - if ((flags & FDDUP_CLOEXEC) != 0) + if ((flags & FDDUP_FLAG_CLOEXEC) != 0) newfde->fde_flags = oldfde->fde_flags | UF_EXCLOSE; else newfde->fde_flags = oldfde->fde_flags & ~UF_EXCLOSE; Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Fri Jul 10 11:01:30 2015 (r285356) +++ head/sys/sys/filedesc.h Fri Jul 10 13:54:03 2015 (r285357) @@ -136,7 +136,7 @@ struct filedesc_to_leader { /* Operation types for kern_dup(). */ enum { - FDDUP_NORMAL = 0x01, /* dup() behavior. */ + FDDUP_NORMAL, /* dup() behavior. */ FDDUP_FCNTL, /* fcntl()-style errors. */ FDDUP_FIXED, /* Force fixed allocation. */ FDDUP_MUSTREPLACE, /* Target must exist. */ @@ -144,7 +144,7 @@ enum { }; /* Flags for kern_dup(). */ -#define FDDUP_CLOEXEC 0x1 /* Atomically set FD_CLOEXEC. */ +#define FDDUP_FLAG_CLOEXEC 0x1 /* Atomically set UF_EXCLOSE. */ struct thread; From owner-svn-src-all@freebsd.org Fri Jul 10 14:39:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BB1A3CE8; Fri, 10 Jul 2015 14:39:48 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 225D5E35; Fri, 10 Jul 2015 14:39:48 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6AEdmhD007011; Fri, 10 Jul 2015 14:39:48 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6AEdlTH007009; Fri, 10 Jul 2015 14:39:47 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201507101439.t6AEdlTH007009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Fri, 10 Jul 2015 14:39:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285358 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 14:39:48 -0000 Author: ed Date: Fri Jul 10 14:39:46 2015 New Revision: 285358 URL: https://svnweb.freebsd.org/changeset/base/285358 Log: Add missing const keyword to kern_sigaction()'s 'act' parameter. This structure is not modified by the function. Also add const to sigact_flag_test(), as it is called by kern_sigaction(). Modified: head/sys/kern/kern_sig.c head/sys/sys/syscallsubr.h Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Fri Jul 10 13:54:03 2015 (r285357) +++ head/sys/kern/kern_sig.c Fri Jul 10 14:39:46 2015 (r285358) @@ -628,7 +628,7 @@ sig_ffs(sigset_t *set) } static bool -sigact_flag_test(struct sigaction *act, int flag) +sigact_flag_test(const struct sigaction *act, int flag) { /* @@ -648,11 +648,8 @@ sigact_flag_test(struct sigaction *act, * osigaction */ int -kern_sigaction(td, sig, act, oact, flags) - struct thread *td; - register int sig; - struct sigaction *act, *oact; - int flags; +kern_sigaction(struct thread *td, int sig, const struct sigaction *act, + struct sigaction *oact, int flags) { struct sigacts *ps; struct proc *p = td->td_proc; Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Fri Jul 10 13:54:03 2015 (r285357) +++ head/sys/sys/syscallsubr.h Fri Jul 10 14:39:46 2015 (r285358) @@ -207,7 +207,7 @@ int kern_shmat(struct thread *td, int sh int shmflg); int kern_shmctl(struct thread *td, int shmid, int cmd, void *buf, size_t *bufsz); -int kern_sigaction(struct thread *td, int sig, struct sigaction *act, +int kern_sigaction(struct thread *td, int sig, const struct sigaction *act, struct sigaction *oact, int flags); int kern_sigaltstack(struct thread *td, stack_t *ss, stack_t *oss); int kern_sigprocmask(struct thread *td, int how, From owner-svn-src-all@freebsd.org Fri Jul 10 16:05:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D05299976C3; Fri, 10 Jul 2015 16:05:26 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 BBB9A160E; Fri, 10 Jul 2015 16:05:26 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6AG5QVV053633; Fri, 10 Jul 2015 16:05:26 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6AG5PH6053629; Fri, 10 Jul 2015 16:05:25 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201507101605.t6AG5PH6053629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Fri, 10 Jul 2015 16:05:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285359 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 16:05:26 -0000 Author: luigi Date: Fri Jul 10 16:05:24 2015 New Revision: 285359 URL: https://svnweb.freebsd.org/changeset/base/285359 Log: staticize functions only used in netmap.c (detected by jenkins run with gcc 4.9) Update documentation on the use of netmap_priv_d, rename the refcount and use the same structure in FreeBSD and linux No functional changes. Modified: head/sys/dev/netmap/netmap.c head/sys/dev/netmap/netmap_freebsd.c head/sys/dev/netmap/netmap_kern.h head/sys/dev/netmap/netmap_vale.c Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Fri Jul 10 14:39:46 2015 (r285358) +++ head/sys/dev/netmap/netmap.c Fri Jul 10 16:05:24 2015 (r285359) @@ -726,6 +726,9 @@ netmap_update_config(struct netmap_adapt return 1; } +static void netmap_txsync_to_host(struct netmap_adapter *na); +static int netmap_rxsync_from_host(struct netmap_adapter *na, struct thread *td, void *pwait); + /* kring->nm_sync callback for the host tx ring */ static int netmap_txsync_to_host_compat(struct netmap_kring *kring, int flags) @@ -959,11 +962,12 @@ nm_si_user(struct netmap_priv_d *priv, e } /* - * Destructor of the netmap_priv_d, called when the fd has - * no active open() and mmap(). - * Undo all the things done by NIOCREGIF. + * Destructor of the netmap_priv_d, called when the fd is closed + * Action: undo all the things done by NIOCREGIF, + * On FreeBSD we need to track whether there are active mmap()s, + * and we use np_active_mmaps for that. On linux, the field is always 0. + * Return: 1 if we can free priv, 0 otherwise. * - * returns 1 if this is the last instance and we can free priv */ /* call with NMG_LOCK held */ int @@ -971,17 +975,13 @@ netmap_dtor_locked(struct netmap_priv_d { struct netmap_adapter *na = priv->np_na; -#ifdef __FreeBSD__ - /* - * np_refcount is the number of active mmaps on - * this file descriptor - */ - if (--priv->np_refcount > 0) { + /* number of active mmaps on this fd (FreeBSD only) */ + if (--priv->np_refs > 0) { return 0; } -#endif /* __FreeBSD__ */ + if (!na) { - return 1; //XXX is it correct? + return 1; //XXX is it correct? } netmap_do_unregif(priv); netmap_adapter_put(na); @@ -1139,7 +1139,7 @@ netmap_sw_to_nic(struct netmap_adapter * * can be among multiple user threads erroneously calling * this routine concurrently. */ -void +static void netmap_txsync_to_host(struct netmap_adapter *na) { struct netmap_kring *kring = &na->tx_rings[na->num_tx_rings]; @@ -1177,7 +1177,7 @@ netmap_txsync_to_host(struct netmap_adap * returns the number of packets delivered to tx queues in * transparent mode, or a negative value if error */ -int +static int netmap_rxsync_from_host(struct netmap_adapter *na, struct thread *td, void *pwait) { struct netmap_kring *kring = &na->rx_rings[na->num_rx_rings]; Modified: head/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- head/sys/dev/netmap/netmap_freebsd.c Fri Jul 10 14:39:46 2015 (r285358) +++ head/sys/dev/netmap/netmap_freebsd.c Fri Jul 10 16:05:24 2015 (r285359) @@ -576,7 +576,7 @@ netmap_mmap_single(struct cdev *cdev, vm goto err_unlock; } vmh->priv = priv; - priv->np_refcount++; + priv->np_refs++; NMG_UNLOCK(); obj = cdev_pager_allocate(vmh, OBJT_DEVICE, @@ -593,7 +593,7 @@ netmap_mmap_single(struct cdev *cdev, vm err_deref: NMG_LOCK(); - priv->np_refcount--; + priv->np_refs--; err_unlock: NMG_UNLOCK(); // err: @@ -602,14 +602,14 @@ err_unlock: } /* - * netmap_close() is called on every close(), but we do not need to do - * anything at that moment, since the process may have other open file - * descriptors for /dev/netmap. Instead, we pass netmap_dtor() to + * On FreeBSD the close routine is only called on the last close on + * the device (/dev/netmap) so we cannot do anything useful. + * To track close() on individual file descriptors we pass netmap_dtor() to * devfs_set_cdevpriv() on open(). The FreeBSD kernel will call the destructor * when the last fd pointing to the device is closed. * - * Unfortunately, FreeBSD does not automatically track active mmap()s on an fd, - * so we have to track them by ourselvesi (see above). The result is that + * Note that FreeBSD does not even munmap() on close() so we also have + * to track mmap() ourselves, and postpone the call to * netmap_dtor() is called when the process has no open fds and no active * memory maps on /dev/netmap, as in linux. */ @@ -634,19 +634,15 @@ netmap_open(struct cdev *dev, int oflags (void)devtype; (void)td; - // XXX wait or nowait ? priv = malloc(sizeof(struct netmap_priv_d), M_DEVBUF, M_NOWAIT | M_ZERO); if (priv == NULL) return ENOMEM; - error = devfs_set_cdevpriv(priv, netmap_dtor); - if (error) - return error; - - priv->np_refcount = 1; - - return 0; + if (error) { + free(priv, M_DEVBUF); + } + return error; } /******************** kqueue support ****************/ Modified: head/sys/dev/netmap/netmap_kern.h ============================================================================== --- head/sys/dev/netmap/netmap_kern.h Fri Jul 10 14:39:46 2015 (r285358) +++ head/sys/dev/netmap/netmap_kern.h Fri Jul 10 16:05:24 2015 (r285359) @@ -925,8 +925,6 @@ static __inline void nm_kr_get(struct ne } - - /* * The following functions are used by individual drivers to * support netmap operation. @@ -1079,8 +1077,6 @@ int netmap_krings_create(struct netmap_a * been created using netmap_krings_create */ void netmap_krings_delete(struct netmap_adapter *na); -int netmap_rxsync_from_host(struct netmap_adapter *na, struct thread *td, void *pwait); - /* set the stopped/enabled status of ring * When stopping, they also wait for all current activity on the ring to @@ -1094,14 +1090,10 @@ void netmap_set_all_rings(struct netmap_ void netmap_disable_all_rings(struct ifnet *); void netmap_enable_all_rings(struct ifnet *); -int netmap_rxsync_from_host(struct netmap_adapter *na, struct thread *td, void *pwait); - -int -netmap_do_regif(struct netmap_priv_d *priv, struct netmap_adapter *na, +int netmap_do_regif(struct netmap_priv_d *priv, struct netmap_adapter *na, uint16_t ringid, uint32_t flags); - u_int nm_bound_var(u_int *v, u_int dflt, u_int lo, u_int hi, const char *msg); int netmap_get_na(struct nmreq *nmr, struct netmap_adapter **na, int create); int netmap_get_hw_na(struct ifnet *ifp, struct netmap_adapter **na); @@ -1482,37 +1474,21 @@ PNMB(struct netmap_adapter *na, struct n return ret; } -/* Generic version of NMB, which uses device-specific memory. */ - - - -void netmap_txsync_to_host(struct netmap_adapter *na); - /* - * Structure associated to each thread which registered an interface. - * - * The first 4 fields of this structure are written by NIOCREGIF and - * read by poll() and NIOC?XSYNC. - * - * There is low contention among writers (a correct user program - * should have none) and among writers and readers, so we use a - * single global lock to protect the structure initialization; - * since initialization involves the allocation of memory, - * we reuse the memory allocator lock. - * - * Read access to the structure is lock free. Readers must check that - * np_nifp is not NULL before using the other fields. - * If np_nifp is NULL initialization has not been performed, - * so they should return an error to userspace. - * - * The ref_done field (XXX ?) is used to regulate access to the refcount in the - * memory allocator. The refcount must be incremented at most once for - * each open("/dev/netmap"). The increment is performed by the first - * function that calls netmap_get_memory() (currently called by - * mmap(), NIOCGINFO and NIOCREGIF). - * If the refcount is incremented, it is then decremented when the - * private structure is destroyed. + * Structure associated to each netmap file descriptor. + * It is created on open and left unbound (np_nifp == NULL). + * A successful NIOCREGIF will set np_nifp and the first few fields; + * this is protected by a global lock (NMG_LOCK) due to low contention. + * + * np_refs counts the number of references to the structure: one for the fd, + * plus (on FreeBSD) one for each active mmap which we track ourselves + * (they are not unmapped on close(), unlike linux). + * np_refs is protected by NMG_LOCK. + * + * Read access to the structure is lock free, because ni_nifp once set + * can only go to 0 when nobody is using the entry anymore. Readers + * must check that np_nifp != NULL before using the other fields. */ struct netmap_priv_d { struct netmap_if * volatile np_nifp; /* netmap if descriptor. */ @@ -1523,8 +1499,7 @@ struct netmap_priv_d { np_qlast[NR_TXRX]; /* range of tx/rx rings to scan */ uint16_t np_txpoll; /* XXX and also np_rxpoll ? */ - /* np_refcount is only used on FreeBSD */ - int np_refcount; /* use with NMG_LOCK held */ + int np_refs; /* use with NMG_LOCK held */ /* pointers to the selinfo to be used for selrecord. * Either the local or the global one depending on the Modified: head/sys/dev/netmap/netmap_vale.c ============================================================================== --- head/sys/dev/netmap/netmap_vale.c Fri Jul 10 14:39:46 2015 (r285358) +++ head/sys/dev/netmap/netmap_vale.c Fri Jul 10 16:05:24 2015 (r285359) @@ -1931,7 +1931,6 @@ netmap_bwrap_intr_notify(struct netmap_k struct netmap_adapter *na = kring->na; struct netmap_bwrap_adapter *bna = na->na_private; struct netmap_kring *bkring; - struct netmap_ring *ring; struct netmap_vp_adapter *vpna = &bna->up; u_int ring_nr = kring->ring_id; int error = 0; @@ -1943,7 +1942,6 @@ netmap_bwrap_intr_notify(struct netmap_k return 0; bkring = &vpna->up.tx_rings[ring_nr]; - ring = kring->ring; /* == kbkring->ring */ /* make sure the ring is not disabled */ if (nm_kr_tryget(kring)) From owner-svn-src-all@freebsd.org Fri Jul 10 18:10:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E5033CA0; Fri, 10 Jul 2015 18:10:42 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 03513A2D; Fri, 10 Jul 2015 18:10:42 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6AIAf50013802; Fri, 10 Jul 2015 18:10:41 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6AIAfNE013800; Fri, 10 Jul 2015 18:10:41 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201507101810.t6AIAfNE013800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Fri, 10 Jul 2015 18:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285360 - head/sys/netpfil/ipfw/test X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 18:10:42 -0000 Author: luigi Date: Fri Jul 10 18:10:40 2015 New Revision: 285360 URL: https://svnweb.freebsd.org/changeset/base/285360 Log: add code to compute fairness indexes; cleanups to remove compile warnings. Modified: head/sys/netpfil/ipfw/test/dn_test.h head/sys/netpfil/ipfw/test/main.c Modified: head/sys/netpfil/ipfw/test/dn_test.h ============================================================================== --- head/sys/netpfil/ipfw/test/dn_test.h Fri Jul 10 16:05:24 2015 (r285359) +++ head/sys/netpfil/ipfw/test/dn_test.h Fri Jul 10 18:10:40 2015 (r285360) @@ -30,9 +30,13 @@ extern int debug; #ifndef offsetof -#define offsetof(t,m) (int)((&((t *)0L)->m)) +#define offsetof(t,m) (int)(intptr_t)((&((t *)0L)->m)) #endif +#if defined(__APPLE__) // XXX osx +typedef unsigned int u_int; +#endif /* osx */ + #include /* prevent include of other system headers */ @@ -85,6 +89,11 @@ struct dn_flow { uint64_t tot_bytes; uint32_t flow_id; struct list_head h; /* used by the generator */ + + /* bytes served by the flow since the last backlog time */ + uint64_t bytes; + /* bytes served by the system at the last backlog time */ + uint64_t sch_bytes; }; struct dn_link { @@ -103,7 +112,7 @@ struct mbuf { void *cfg; /* config args */ }; -#define MALLOC_DECLARE(x) +#define MALLOC_DECLARE(x) extern volatile int __dummy__ ## x #define KASSERT(x, y) do { if (!(x)) printf y ; exit(0); } while (0) struct ipfw_flow_id { }; Modified: head/sys/netpfil/ipfw/test/main.c ============================================================================== --- head/sys/netpfil/ipfw/test/main.c Fri Jul 10 16:05:24 2015 (r285359) +++ head/sys/netpfil/ipfw/test/main.c Fri Jul 10 18:10:40 2015 (r285360) @@ -75,6 +75,9 @@ struct cfg_s { #define BACKLOG 30 uint32_t llmask; struct list_head ll[BACKLOG + 10]; + + double *q_wfi; /* (byte) Worst-case Fair Index of the flows */ + double wfi; /* (byte) Worst-case Fair Index of the system */ }; /* FI2Q and Q2FI converts from flow_id to dn_queue and back. @@ -145,6 +148,39 @@ dequeue(struct cfg_s *c) return m; } +static void +gnet_stats_enq(struct cfg_s *c, struct mbuf *mb) +{ + struct dn_sch_inst *si = c->si; + struct dn_queue *_q = FI2Q(c, mb->flow_id); + + if (_q->ni.length == 1) { + _q->ni.bytes = 0; + _q->ni.sch_bytes = si->ni.bytes; + } +} + +static void +gnet_stats_deq(struct cfg_s *c, struct mbuf *mb) +{ + struct dn_sch_inst *si = c->si; + struct dn_queue *_q = FI2Q(c, mb->flow_id); + int len = mb->m_pkthdr.len; + + _q->ni.bytes += len; + si->ni.bytes += len; + + if (_q->ni.length == 0) { + double bytes = (double)_q->ni.bytes; + double sch_bytes = (double)si->ni.bytes - _q->ni.sch_bytes; + double weight = (double)_q->fs->fs.par[0] / c->wsum; + double wfi = sch_bytes * weight - bytes; + + if (c->q_wfi[mb->flow_id] < wfi) + c->q_wfi[mb->flow_id] = wfi; + } +} + static int mainloop(struct cfg_s *c) { @@ -164,6 +200,7 @@ mainloop(struct cfg_s *c) } else { ND("enqueue ok"); c->pending++; + gnet_stats_enq(c, m); } } if (c->can_dequeue) { @@ -172,6 +209,7 @@ mainloop(struct cfg_s *c) c->pending--; drop(c, m); c->drop--; /* compensate */ + gnet_stats_deq(c, m); } } } @@ -187,7 +225,8 @@ dump(struct cfg_s *c) for (i=0; i < c->flows; i++) { q = FI2Q(c, i); - DX(1, "queue %4d tot %10lld", i, q->ni.tot_bytes); + DX(1, "queue %4d tot %10llu", i, + (unsigned long long)q->ni.tot_bytes); } DX(1, "done %d loops\n", c->loops); return 0; @@ -373,6 +412,9 @@ init(struct cfg_s *c) extern moduledata_t *_g_dn_wf2qp; extern moduledata_t *_g_dn_rr; extern moduledata_t *_g_dn_qfq; +#ifdef WITH_QFQP + extern moduledata_t *_g_dn_qfqp; +#endif #ifdef WITH_KPS extern moduledata_t *_g_dn_kps; #endif @@ -384,6 +426,11 @@ init(struct cfg_s *c) mod = _g_dn_fifo; else if (!strcmp(av[1], "qfq")) mod = _g_dn_qfq; +#ifdef WITH_QFQP + else if (!strcmp(av[1], "qfq+") || + !strcmp(av[1], "qfqp") ) + mod = _g_dn_qfqp; +#endif #ifdef WITH_KPS else if (!strcmp(av[1], "kps")) mod = _g_dn_kps; @@ -447,10 +494,11 @@ init(struct cfg_s *c) } /* allocate queues, flowsets and one scheduler */ c->q = calloc(c->flows, c->q_len); + c->q_wfi = (double *)calloc(c->flows, sizeof(double)); c->fs = calloc(c->flowsets, sizeof(struct dn_fsk)); c->si = calloc(1, c->si_len); c->sched = calloc(c->flows, c->schk_len); - if (c->q == NULL || c->fs == NULL) { + if (c->q == NULL || c->fs == NULL || !c->q_wfi) { D("error allocating memory for flows"); exit(1); } @@ -520,11 +568,13 @@ main(int ac, char *av[]) ll *= 1000; /* convert to nanoseconds */ ll /= c._enqueue; sprintf(msg, "1::%d", c.flows); - D("%-8s n %d %d time %d.%06d %8.3f qlen %d %d flows %s drops %d", - c.name, c._enqueue, c.loops, - (int)c.time.tv_sec, (int)c.time.tv_usec, ll, - c.th_min, c.th_max, - c.fs_config ? c.fs_config : msg, c.drop); + for (i = 0; i < c.flows; i++) { + if (c.wfi < c.q_wfi[i]) + c.wfi = c.q_wfi[i]; + } + D("sched=%-12s\ttime=%d.%03d sec (%.0f nsec)\twfi=%.02f\tflow=%-16s", + c.name, (int)c.time.tv_sec, (int)c.time.tv_usec / 1000, ll, c.wfi, + c.fs_config ? c.fs_config : msg); dump(&c); DX(1, "done ac %d av %p", ac, av); for (i=0; i < ac; i++) From owner-svn-src-all@freebsd.org Fri Jul 10 18:18:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B43A43E8F; Fri, 10 Jul 2015 18:18:23 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: from mail-yk0-x233.google.com (mail-yk0-x233.google.com [IPv6:2607:f8b0:4002:c07::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DE1BFA8; Fri, 10 Jul 2015 18:18:23 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: by ykeo3 with SMTP id o3so149149150yke.0; Fri, 10 Jul 2015 11:18:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=sKsClogOMocmSskQFmrvH+K4vSnaduUH0q3Y05vDAVE=; b=BHec2xZNxX3M7wwlvCDNxpibzXARzcSXfAGJ1zFjoUS4oGB8yfBcAe/mATsklNbyh7 TKsFoEYA9Rwvtbhbaqg9T4nU1Mrp0pLYftJvwV/GgDuJFT/E1mx4yP15W3hAOZeg7F2d Gyk7I7KyXnBivuj1BtWqQSbyzdfMquwN8mZq10trY9N+IwCHoSVpWULYI4IVGCRiu+vF p+P56etk5/YlsfOfoftch6hCyfREVLjf2y6QZ7wAJl6j16ANDyWfV2S5lfj8ecnXgx6M TYFbDRN4+xdoY3Z2zxWzaKvQprZVzDtUsI98FwnS1ew6/9MhuIxBA6sDdBFjf9m0mSza iRBw== MIME-Version: 1.0 X-Received: by 10.129.36.14 with SMTP id k14mr24358657ywk.64.1436552302421; Fri, 10 Jul 2015 11:18:22 -0700 (PDT) Sender: pkelsey@gmail.com Received: by 10.129.138.68 with HTTP; Fri, 10 Jul 2015 11:18:22 -0700 (PDT) In-Reply-To: <201507100551.t6A5paZH050451@repo.freebsd.org> References: <201507100551.t6A5paZH050451@repo.freebsd.org> Date: Fri, 10 Jul 2015 14:18:22 -0400 X-Google-Sender-Auth: VHree1V7k-ZwFoPn3Nsqrpa9nys Message-ID: Subject: Re: svn commit: r285349 - in head/sys: dev/cxgbe dev/e1000 dev/ixgbe dev/netmap dev/re net From: Patrick Kelsey To: Luigi Rizzo Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 18:18:23 -0000 Thanks for the update, Luigi! For the record, the exclusive open was Juli Mallett's idea for the solutions you mention - I was just the first +1. -Patrick On Fri, Jul 10, 2015 at 1:51 AM, Luigi Rizzo wrote: > Author: luigi > Date: Fri Jul 10 05:51:36 2015 > New Revision: 285349 > URL: https://svnweb.freebsd.org/changeset/base/285349 > > Log: > Sync netmap sources with the version in our private tree. > This commit contains large contributions from Giuseppe Lettieri and > Stefano Garzarella, is partly supported by grants from Verisign and > Cisco, > and brings in the following: > > - fix zerocopy monitor ports and introduce copying monitor ports > (the latter are lower performance but give access to all traffic > in parallel with the application) > > - exclusive open mode, useful to implement solutions that recover > from crashes of the main netmap client (suggested by Patrick Kelsey) > > - revised memory allocator in preparation for the 'passthrough mode' > (ptnetmap) recently presented at bsdcan. ptnetmap is described in > S. Garzarella, G. Lettieri, L. Rizzo; > Virtual device passthrough for high speed VM networking, > ACM/IEEE ANCS 2015, Oakland (CA) May 2015 > http://info.iet.unipi.it/~luigi/research.html > > - fix rx CRC handing on ixl > > - add module dependencies for netmap when building drivers as modules > > - minor simplifications to device-specific routines (*txsync, *rxsync) > > - general code cleanup (remove unused variables, introduce macros > to access rings and remove duplicate code, > > Applications do not need to be recompiled, unless of course > they want to use the new features (monitors and exclusive open). > > Those willing to try this code on stable/10 can just update the > sys/dev/netmap/*, sys/net/netmap* with the version in HEAD > and apply the small patches to individual device drivers. > > MFC after: 1 month > Sponsored by: (partly) Verisign, Cisco > > Modified: > head/sys/dev/cxgbe/t4_main.c > head/sys/dev/cxgbe/t4_netmap.c > head/sys/dev/e1000/if_em.c > head/sys/dev/e1000/if_igb.c > head/sys/dev/e1000/if_lem.c > head/sys/dev/ixgbe/if_ix.c > head/sys/dev/netmap/if_em_netmap.h > head/sys/dev/netmap/if_igb_netmap.h > head/sys/dev/netmap/if_ixl_netmap.h > head/sys/dev/netmap/if_lem_netmap.h > head/sys/dev/netmap/if_re_netmap.h > head/sys/dev/netmap/if_vtnet_netmap.h > head/sys/dev/netmap/ixgbe_netmap.h > head/sys/dev/netmap/netmap.c > head/sys/dev/netmap/netmap_freebsd.c > head/sys/dev/netmap/netmap_generic.c > head/sys/dev/netmap/netmap_kern.h > head/sys/dev/netmap/netmap_mem2.c > head/sys/dev/netmap/netmap_mem2.h > head/sys/dev/netmap/netmap_monitor.c > head/sys/dev/netmap/netmap_pipe.c > head/sys/dev/netmap/netmap_vale.c > head/sys/dev/re/if_re.c > head/sys/net/netmap.h > head/sys/net/netmap_user.h > > Modified: head/sys/dev/cxgbe/t4_main.c > > ============================================================================== > --- head/sys/dev/cxgbe/t4_main.c Fri Jul 10 05:07:18 2015 > (r285348) > +++ head/sys/dev/cxgbe/t4_main.c Fri Jul 10 05:51:36 2015 > (r285349) > @@ -8533,10 +8533,17 @@ static devclass_t cxgbe_devclass, cxl_de > DRIVER_MODULE(t4nex, pci, t4_driver, t4_devclass, mod_event, 0); > MODULE_VERSION(t4nex, 1); > MODULE_DEPEND(t4nex, firmware, 1, 1, 1); > +#ifdef DEV_NETMAP > +MODULE_DEPEND(t4nex, netmap, 1, 1, 1); > +#endif /* DEV_NETMAP */ > + > > DRIVER_MODULE(t5nex, pci, t5_driver, t5_devclass, mod_event, 0); > MODULE_VERSION(t5nex, 1); > MODULE_DEPEND(t5nex, firmware, 1, 1, 1); > +#ifdef DEV_NETMAP > +MODULE_DEPEND(t5nex, netmap, 1, 1, 1); > +#endif /* DEV_NETMAP */ > > DRIVER_MODULE(cxgbe, t4nex, cxgbe_driver, cxgbe_devclass, 0, 0); > MODULE_VERSION(cxgbe, 1); > > Modified: head/sys/dev/cxgbe/t4_netmap.c > > ============================================================================== > --- head/sys/dev/cxgbe/t4_netmap.c Fri Jul 10 05:07:18 2015 > (r285348) > +++ head/sys/dev/cxgbe/t4_netmap.c Fri Jul 10 05:51:36 2015 > (r285349) > @@ -917,8 +917,6 @@ cxgbe_netmap_txsync(struct netmap_kring > kring->nr_hwtail -= kring->nkr_num_slots; > } > > - nm_txsync_finalize(kring); > - > return (0); > } > > @@ -931,7 +929,7 @@ cxgbe_netmap_rxsync(struct netmap_kring > struct port_info *pi = ifp->if_softc; > struct adapter *sc = pi->adapter; > struct sge_nm_rxq *nm_rxq = &sc->sge.nm_rxq[pi->first_nm_rxq + > kring->ring_id]; > - u_int const head = nm_rxsync_prologue(kring); > + u_int const head = kring->rhead; > u_int n; > int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & > NKR_PENDINTR; > > @@ -993,8 +991,6 @@ cxgbe_netmap_rxsync(struct netmap_kring > } > } > > - nm_rxsync_finalize(kring); > - > return (0); > } > > > Modified: head/sys/dev/e1000/if_em.c > > ============================================================================== > --- head/sys/dev/e1000/if_em.c Fri Jul 10 05:07:18 2015 (r285348) > +++ head/sys/dev/e1000/if_em.c Fri Jul 10 05:51:36 2015 (r285349) > @@ -344,6 +344,9 @@ devclass_t em_devclass; > DRIVER_MODULE(em, pci, em_driver, em_devclass, 0, 0); > MODULE_DEPEND(em, pci, 1, 1, 1); > MODULE_DEPEND(em, ether, 1, 1, 1); > +#ifdef DEV_NETMAP > +MODULE_DEPEND(em, netmap, 1, 1, 1); > +#endif /* DEV_NETMAP */ > > /********************************************************************* > * Tunable default values. > > Modified: head/sys/dev/e1000/if_igb.c > > ============================================================================== > --- head/sys/dev/e1000/if_igb.c Fri Jul 10 05:07:18 2015 (r285348) > +++ head/sys/dev/e1000/if_igb.c Fri Jul 10 05:51:36 2015 (r285349) > @@ -322,6 +322,9 @@ static devclass_t igb_devclass; > DRIVER_MODULE(igb, pci, igb_driver, igb_devclass, 0, 0); > MODULE_DEPEND(igb, pci, 1, 1, 1); > MODULE_DEPEND(igb, ether, 1, 1, 1); > +#ifdef DEV_NETMAP > +MODULE_DEPEND(igb, netmap, 1, 1, 1); > +#endif /* DEV_NETMAP */ > > /********************************************************************* > * Tunable default values. > > Modified: head/sys/dev/e1000/if_lem.c > > ============================================================================== > --- head/sys/dev/e1000/if_lem.c Fri Jul 10 05:07:18 2015 (r285348) > +++ head/sys/dev/e1000/if_lem.c Fri Jul 10 05:51:36 2015 (r285349) > @@ -286,6 +286,9 @@ extern devclass_t em_devclass; > DRIVER_MODULE(lem, pci, lem_driver, em_devclass, 0, 0); > MODULE_DEPEND(lem, pci, 1, 1, 1); > MODULE_DEPEND(lem, ether, 1, 1, 1); > +#ifdef DEV_NETMAP > +MODULE_DEPEND(lem, netmap, 1, 1, 1); > +#endif /* DEV_NETMAP */ > > /********************************************************************* > * Tunable default values. > > Modified: head/sys/dev/ixgbe/if_ix.c > > ============================================================================== > --- head/sys/dev/ixgbe/if_ix.c Fri Jul 10 05:07:18 2015 (r285348) > +++ head/sys/dev/ixgbe/if_ix.c Fri Jul 10 05:51:36 2015 (r285349) > @@ -246,6 +246,9 @@ DRIVER_MODULE(ix, pci, ix_driver, ix_dev > > MODULE_DEPEND(ix, pci, 1, 1, 1); > MODULE_DEPEND(ix, ether, 1, 1, 1); > +#ifdef DEV_NETMAP > +MODULE_DEPEND(ix, netmap, 1, 1, 1); > +#endif /* DEV_NETMAP */ > > /* > ** TUNEABLE PARAMETERS: > > Modified: head/sys/dev/netmap/if_em_netmap.h > > ============================================================================== > --- head/sys/dev/netmap/if_em_netmap.h Fri Jul 10 05:07:18 2015 > (r285348) > +++ head/sys/dev/netmap/if_em_netmap.h Fri Jul 10 05:51:36 2015 > (r285349) > @@ -198,8 +198,6 @@ em_netmap_txsync(struct netmap_kring *kr > } > } > > - nm_txsync_finalize(kring); > - > return 0; > } > > @@ -217,7 +215,7 @@ em_netmap_rxsync(struct netmap_kring *kr > u_int nic_i; /* index into the NIC ring */ > u_int n; > u_int const lim = kring->nkr_num_slots - 1; > - u_int const head = nm_rxsync_prologue(kring); > + u_int const head = kring->rhead; > int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & > NKR_PENDINTR; > > /* device-specific */ > @@ -303,9 +301,6 @@ em_netmap_rxsync(struct netmap_kring *kr > E1000_WRITE_REG(&adapter->hw, E1000_RDT(rxr->me), nic_i); > } > > - /* tell userspace that there might be new packets */ > - nm_rxsync_finalize(kring); > - > return 0; > > ring_reset: > > Modified: head/sys/dev/netmap/if_igb_netmap.h > > ============================================================================== > --- head/sys/dev/netmap/if_igb_netmap.h Fri Jul 10 05:07:18 2015 > (r285348) > +++ head/sys/dev/netmap/if_igb_netmap.h Fri Jul 10 05:51:36 2015 > (r285349) > @@ -180,8 +180,6 @@ igb_netmap_txsync(struct netmap_kring *k > kring->nr_hwtail = nm_prev(netmap_idx_n2k(kring, nic_i), > lim); > } > > - nm_txsync_finalize(kring); > - > return 0; > } > > @@ -199,7 +197,7 @@ igb_netmap_rxsync(struct netmap_kring *k > u_int nic_i; /* index into the NIC ring */ > u_int n; > u_int const lim = kring->nkr_num_slots - 1; > - u_int const head = nm_rxsync_prologue(kring); > + u_int const head = kring->rhead; > int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & > NKR_PENDINTR; > > /* device-specific */ > @@ -283,9 +281,6 @@ igb_netmap_rxsync(struct netmap_kring *k > E1000_WRITE_REG(&adapter->hw, E1000_RDT(rxr->me), nic_i); > } > > - /* tell userspace that there might be new packets */ > - nm_rxsync_finalize(kring); > - > return 0; > > ring_reset: > > Modified: head/sys/dev/netmap/if_ixl_netmap.h > > ============================================================================== > --- head/sys/dev/netmap/if_ixl_netmap.h Fri Jul 10 05:07:18 2015 > (r285348) > +++ head/sys/dev/netmap/if_ixl_netmap.h Fri Jul 10 05:51:36 2015 > (r285349) > @@ -68,9 +68,14 @@ extern int ixl_rx_miss, ixl_rx_miss_bufs > * count packets that might be missed due to lost interrupts. > */ > SYSCTL_DECL(_dev_netmap); > -int ixl_rx_miss, ixl_rx_miss_bufs, ixl_crcstrip; > +/* > + * The xl driver by default strips CRCs and we do not override it. > + */ > +int ixl_rx_miss, ixl_rx_miss_bufs, ixl_crcstrip = 1; > +#if 0 > SYSCTL_INT(_dev_netmap, OID_AUTO, ixl_crcstrip, > - CTLFLAG_RW, &ixl_crcstrip, 0, "strip CRC on rx frames"); > + CTLFLAG_RW, &ixl_crcstrip, 1, "strip CRC on rx frames"); > +#endif > SYSCTL_INT(_dev_netmap, OID_AUTO, ixl_rx_miss, > CTLFLAG_RW, &ixl_rx_miss, 0, "potentially missed rx intr"); > SYSCTL_INT(_dev_netmap, OID_AUTO, ixl_rx_miss_bufs, > @@ -268,8 +273,6 @@ ixl_netmap_txsync(struct netmap_kring *k > kring->nr_hwtail = nm_prev(netmap_idx_n2k(kring, nic_i), > lim); > } > > - nm_txsync_finalize(kring); > - > return 0; > } > > @@ -297,7 +300,7 @@ ixl_netmap_rxsync(struct netmap_kring *k > u_int nic_i; /* index into the NIC ring */ > u_int n; > u_int const lim = kring->nkr_num_slots - 1; > - u_int const head = nm_rxsync_prologue(kring); > + u_int const head = kring->rhead; > int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & > NKR_PENDINTR; > > /* device-specific */ > @@ -408,9 +411,6 @@ ixl_netmap_rxsync(struct netmap_kring *k > wr32(vsi->hw, rxr->tail, nic_i); > } > > - /* tell userspace that there might be new packets */ > - nm_rxsync_finalize(kring); > - > return 0; > > ring_reset: > > Modified: head/sys/dev/netmap/if_lem_netmap.h > > ============================================================================== > --- head/sys/dev/netmap/if_lem_netmap.h Fri Jul 10 05:07:18 2015 > (r285348) > +++ head/sys/dev/netmap/if_lem_netmap.h Fri Jul 10 05:51:36 2015 > (r285349) > @@ -302,8 +302,6 @@ lem_netmap_txsync(struct netmap_kring *k > kring->nr_hwtail = nm_prev(netmap_idx_n2k(kring, nic_i), > lim); > } > > - nm_txsync_finalize(kring); > - > return 0; > } > > @@ -321,7 +319,7 @@ lem_netmap_rxsync(struct netmap_kring *k > u_int nic_i; /* index into the NIC ring */ > u_int n; > u_int const lim = kring->nkr_num_slots - 1; > - u_int const head = nm_rxsync_prologue(kring); > + u_int const head = kring->rhead; > int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & > NKR_PENDINTR; > > /* device-specific */ > @@ -466,9 +464,6 @@ lem_netmap_rxsync(struct netmap_kring *k > E1000_WRITE_REG(&adapter->hw, E1000_RDT(0), nic_i); > } > > - /* tell userspace that there might be new packets */ > - nm_rxsync_finalize(kring); > - > return 0; > > ring_reset: > > Modified: head/sys/dev/netmap/if_re_netmap.h > > ============================================================================== > --- head/sys/dev/netmap/if_re_netmap.h Fri Jul 10 05:07:18 2015 > (r285348) > +++ head/sys/dev/netmap/if_re_netmap.h Fri Jul 10 05:51:36 2015 > (r285349) > @@ -159,8 +159,6 @@ re_netmap_txsync(struct netmap_kring *kr > } > } > > - nm_txsync_finalize(kring); > - > return 0; > } > > @@ -178,7 +176,7 @@ re_netmap_rxsync(struct netmap_kring *kr > u_int nic_i; /* index into the NIC ring */ > u_int n; > u_int const lim = kring->nkr_num_slots - 1; > - u_int const head = nm_rxsync_prologue(kring); > + u_int const head = kring->rhead; > int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & > NKR_PENDINTR; > > /* device-specific */ > @@ -273,9 +271,6 @@ re_netmap_rxsync(struct netmap_kring *kr > BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); > } > > - /* tell userspace that there might be new packets */ > - nm_rxsync_finalize(kring); > - > return 0; > > ring_reset: > > Modified: head/sys/dev/netmap/if_vtnet_netmap.h > > ============================================================================== > --- head/sys/dev/netmap/if_vtnet_netmap.h Fri Jul 10 05:07:18 2015 > (r285348) > +++ head/sys/dev/netmap/if_vtnet_netmap.h Fri Jul 10 05:51:36 2015 > (r285349) > @@ -214,9 +214,6 @@ vtnet_netmap_txsync(struct netmap_kring > virtqueue_postpone_intr(vq, VQ_POSTPONE_SHORT); > } > > -//out: > - nm_txsync_finalize(kring); > - > return 0; > } > > @@ -278,7 +275,7 @@ vtnet_netmap_rxsync(struct netmap_kring > // u_int nic_i; /* index into the NIC ring */ > u_int n; > u_int const lim = kring->nkr_num_slots - 1; > - u_int const head = nm_rxsync_prologue(kring); > + u_int const head = kring->rhead; > int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & > NKR_PENDINTR; > > /* device-specific */ > @@ -340,9 +337,6 @@ vtnet_netmap_rxsync(struct netmap_kring > vtnet_rxq_enable_intr(rxq); > } > > - /* tell userspace that there might be new packets. */ > - nm_rxsync_finalize(kring); > - > ND("[C] h %d c %d t %d hwcur %d hwtail %d", > ring->head, ring->cur, ring->tail, > kring->nr_hwcur, kring->nr_hwtail); > > Modified: head/sys/dev/netmap/ixgbe_netmap.h > > ============================================================================== > --- head/sys/dev/netmap/ixgbe_netmap.h Fri Jul 10 05:07:18 2015 > (r285348) > +++ head/sys/dev/netmap/ixgbe_netmap.h Fri Jul 10 05:51:36 2015 > (r285349) > @@ -322,8 +322,6 @@ ixgbe_netmap_txsync(struct netmap_kring > } > } > > - nm_txsync_finalize(kring); > - > return 0; > } > > @@ -351,7 +349,7 @@ ixgbe_netmap_rxsync(struct netmap_kring > u_int nic_i; /* index into the NIC ring */ > u_int n; > u_int const lim = kring->nkr_num_slots - 1; > - u_int const head = nm_rxsync_prologue(kring); > + u_int const head = kring->rhead; > int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & > NKR_PENDINTR; > > /* device-specific */ > @@ -458,9 +456,6 @@ ixgbe_netmap_rxsync(struct netmap_kring > IXGBE_WRITE_REG(&adapter->hw, IXGBE_RDT(rxr->me), nic_i); > } > > - /* tell userspace that there might be new packets */ > - nm_rxsync_finalize(kring); > - > return 0; > > ring_reset: > > Modified: head/sys/dev/netmap/netmap.c > > ============================================================================== > --- head/sys/dev/netmap/netmap.c Fri Jul 10 05:07:18 2015 > (r285348) > +++ head/sys/dev/netmap/netmap.c Fri Jul 10 05:51:36 2015 > (r285349) > @@ -293,7 +293,7 @@ ports attached to the switch) > * kring->nm_sync() == DEVICE_netmap_rxsync() > * 2) device interrupt handler > * na->nm_notify() == netmap_notify() > - * - tx from host stack > + * - rx from host stack > * concurrently: > * 1) host stack > * netmap_transmit() > @@ -313,31 +313,113 @@ ports attached to the switch) > * > * -= SYSTEM DEVICE WITH GENERIC SUPPORT =- > * > + * na == NA(ifp) == generic_netmap_adapter created in > generic_netmap_attach() > * > - * > - * -= VALE PORT =- > - * > - * > - * > - * -= NETMAP PIPE =- > - * > - * > - * > - * -= SYSTEM DEVICE WITH NATIVE SUPPORT, CONNECTED TO VALE, NO HOST > RINGS =- > - * > - * > - * > - * -= SYSTEM DEVICE WITH NATIVE SUPPORT, CONNECTED TO VALE, WITH HOST > RINGS =- > - * > - * > - * > - * -= SYSTEM DEVICE WITH GENERIC SUPPORT, CONNECTED TO VALE, NO HOST > RINGS =- > - * > + * - tx from netmap userspace: > + * concurrently: > + * 1) ioctl(NIOCTXSYNC)/netmap_poll() in process context > + * kring->nm_sync() == generic_netmap_txsync() > + * linux: dev_queue_xmit() with NM_MAGIC_PRIORITY_TX > + * generic_ndo_start_xmit() > + * orig. dev. start_xmit > + * FreeBSD: na->if_transmit() == orig. dev if_transmit > + * 2) generic_mbuf_destructor() > + * na->nm_notify() == netmap_notify() > + * - rx from netmap userspace: > + * 1) ioctl(NIOCRXSYNC)/netmap_poll() in process context > + * kring->nm_sync() == generic_netmap_rxsync() > + * mbq_safe_dequeue() > + * 2) device driver > + * generic_rx_handler() > + * mbq_safe_enqueue() > + * na->nm_notify() == netmap_notify() > + * - rx from host stack: > + * concurrently: > + * 1) host stack > + * linux: generic_ndo_start_xmit() > + * netmap_transmit() > + * FreeBSD: ifp->if_input() == netmap_transmit > + * both: > + * na->nm_notify() == netmap_notify() > + * 2) ioctl(NIOCRXSYNC)/netmap_poll() in process context > + * kring->nm_sync() == netmap_rxsync_from_host_compat > + * netmap_rxsync_from_host(na, NULL, NULL) > + * - tx to host stack: > + * ioctl(NIOCTXSYNC)/netmap_poll() in process context > + * kring->nm_sync() == netmap_txsync_to_host_compat > + * netmap_txsync_to_host(na) > + * NM_SEND_UP() > + * FreeBSD: na->if_input() == ??? XXX > + * linux: netif_rx() with NM_MAGIC_PRIORITY_RX > * > * > - * -= SYSTEM DEVICE WITH GENERIC SUPPORT, CONNECTED TO VALE, WITH HOST > RINGS =- > + * -= VALE =- > * > + * INCOMING: > * > + * - VALE ports: > + * ioctl(NIOCTXSYNC)/netmap_poll() in process context > + * kring->nm_sync() == netmap_vp_txsync() > + * > + * - system device with native support: > + * from cable: > + * interrupt > + * na->nm_notify() == netmap_bwrap_intr_notify(ring_nr != > host ring) > + * kring->nm_sync() == DEVICE_netmap_rxsync() > + * netmap_vp_txsync() > + * kring->nm_sync() == DEVICE_netmap_rxsync() > + * from host stack: > + * netmap_transmit() > + * na->nm_notify() == netmap_bwrap_intr_notify(ring_nr == > host ring) > + * kring->nm_sync() == > netmap_rxsync_from_host_compat() > + * netmap_vp_txsync() > + * > + * - system device with generic support: > + * from device driver: > + * generic_rx_handler() > + * na->nm_notify() == netmap_bwrap_intr_notify(ring_nr != > host ring) > + * kring->nm_sync() == generic_netmap_rxsync() > + * netmap_vp_txsync() > + * kring->nm_sync() == generic_netmap_rxsync() > + * from host stack: > + * netmap_transmit() > + * na->nm_notify() == netmap_bwrap_intr_notify(ring_nr == > host ring) > + * kring->nm_sync() == > netmap_rxsync_from_host_compat() > + * netmap_vp_txsync() > + * > + * (all cases) --> nm_bdg_flush() > + * dest_na->nm_notify() == (see below) > + * > + * OUTGOING: > + * > + * - VALE ports: > + * concurrently: > + * 1) ioctlNIOCRXSYNC)/netmap_poll() in process context > + * kring->nm_sync() == netmap_vp_rxsync() > + * 2) from nm_bdg_flush() > + * na->nm_notify() == netmap_notify() > + * > + * - system device with native support: > + * to cable: > + * na->nm_notify() == netmap_bwrap_notify() > + * netmap_vp_rxsync() > + * kring->nm_sync() == DEVICE_netmap_txsync() > + * netmap_vp_rxsync() > + * to host stack: > + * netmap_vp_rxsync() > + * kring->nm_sync() == netmap_txsync_to_host_compat > + * netmap_vp_rxsync_locked() > + * > + * - system device with generic adapter: > + * to device driver: > + * na->nm_notify() == netmap_bwrap_notify() > + * netmap_vp_rxsync() > + * kring->nm_sync() == generic_netmap_txsync() > + * netmap_vp_rxsync() > + * to host stack: > + * netmap_vp_rxsync() > + * kring->nm_sync() == netmap_txsync_to_host_compat > + * netmap_vp_rxsync() > * > */ > > @@ -412,15 +494,6 @@ ports attached to the switch) > > MALLOC_DEFINE(M_NETMAP, "netmap", "Network memory map"); > > -/* > - * The following variables are used by the drivers and replicate > - * fields in the global memory pool. They only refer to buffers > - * used by physical interfaces. > - */ > -u_int netmap_total_buffers; > -u_int netmap_buf_size; > -char *netmap_buffer_base; /* also address of an invalid buffer */ > - > /* user-controlled variables */ > int netmap_verbose; > > @@ -446,7 +519,6 @@ SYSCTL_INT(_dev_netmap, OID_AUTO, adapti > > int netmap_flags = 0; /* debug flags */ > int netmap_fwd = 0; /* force transparent mode */ > -int netmap_mmap_unreg = 0; /* allow mmap of unregistered fds */ > > /* > * netmap_admode selects the netmap mode to use. > @@ -464,7 +536,6 @@ int netmap_generic_rings = 1; /* numbe > > SYSCTL_INT(_dev_netmap, OID_AUTO, flags, CTLFLAG_RW, &netmap_flags, 0 , > ""); > SYSCTL_INT(_dev_netmap, OID_AUTO, fwd, CTLFLAG_RW, &netmap_fwd, 0 , ""); > -SYSCTL_INT(_dev_netmap, OID_AUTO, mmap_unreg, CTLFLAG_RW, > &netmap_mmap_unreg, 0, ""); > SYSCTL_INT(_dev_netmap, OID_AUTO, admode, CTLFLAG_RW, &netmap_admode, 0 , > ""); > SYSCTL_INT(_dev_netmap, OID_AUTO, generic_mit, CTLFLAG_RW, > &netmap_generic_mit, 0 , ""); > SYSCTL_INT(_dev_netmap, OID_AUTO, generic_ringsize, CTLFLAG_RW, > &netmap_generic_ringsize, 0 , ""); > @@ -472,15 +543,6 @@ SYSCTL_INT(_dev_netmap, OID_AUTO, generi > > NMG_LOCK_T netmap_global_lock; > > - > -static void > -nm_kr_get(struct netmap_kring *kr) > -{ > - while (NM_ATOMIC_TEST_AND_SET(&kr->nr_busy)) > - tsleep(kr, 0, "NM_KR_GET", 4); > -} > - > - > /* > * mark the ring as stopped, and run through the locks > * to make sure other users get to see it. > @@ -495,34 +557,14 @@ netmap_disable_ring(struct netmap_kring > nm_kr_put(kr); > } > > -/* stop or enable a single tx ring */ > -void > -netmap_set_txring(struct netmap_adapter *na, u_int ring_id, int stopped) > -{ > - if (stopped) > - netmap_disable_ring(na->tx_rings + ring_id); > - else > - na->tx_rings[ring_id].nkr_stopped = 0; > - /* nofify that the stopped state has changed. This is currently > - *only used by bwrap to propagate the state to its own krings. > - * (see netmap_bwrap_intr_notify). > - */ > - na->nm_notify(na, ring_id, NR_TX, NAF_DISABLE_NOTIFY); > -} > - > -/* stop or enable a single rx ring */ > +/* stop or enable a single ring */ > void > -netmap_set_rxring(struct netmap_adapter *na, u_int ring_id, int stopped) > +netmap_set_ring(struct netmap_adapter *na, u_int ring_id, enum txrx t, > int stopped) > { > if (stopped) > - netmap_disable_ring(na->rx_rings + ring_id); > + netmap_disable_ring(NMR(na, t) + ring_id); > else > - na->rx_rings[ring_id].nkr_stopped = 0; > - /* nofify that the stopped state has changed. This is currently > - *only used by bwrap to propagate the state to its own krings. > - * (see netmap_bwrap_intr_notify). > - */ > - na->nm_notify(na, ring_id, NR_RX, NAF_DISABLE_NOTIFY); > + NMR(na, t)[ring_id].nkr_stopped = 0; > } > > > @@ -531,20 +573,15 @@ void > netmap_set_all_rings(struct netmap_adapter *na, int stopped) > { > int i; > - u_int ntx, nrx; > + enum txrx t; > > if (!nm_netmap_on(na)) > return; > > - ntx = netmap_real_tx_rings(na); > - nrx = netmap_real_rx_rings(na); > - > - for (i = 0; i < ntx; i++) { > - netmap_set_txring(na, i, stopped); > - } > - > - for (i = 0; i < nrx; i++) { > - netmap_set_rxring(na, i, stopped); > + for_rx_tx(t) { > + for (i = 0; i < netmap_real_rings(na, t); i++) { > + netmap_set_ring(na, i, t, stopped); > + } > } > } > > @@ -657,7 +694,8 @@ netmap_update_config(struct netmap_adapt > > txr = txd = rxr = rxd = 0; > if (na->nm_config == NULL || > - na->nm_config(na, &txr, &txd, &rxr, &rxd)) { > + na->nm_config(na, &txr, &txd, &rxr, &rxd)) > + { > /* take whatever we had at init time */ > txr = na->num_tx_rings; > txd = na->num_tx_desc; > @@ -738,73 +776,59 @@ netmap_krings_create(struct netmap_adapt > { > u_int i, len, ndesc; > struct netmap_kring *kring; > - u_int ntx, nrx; > + u_int n[NR_TXRX]; > + enum txrx t; > > /* account for the (possibly fake) host rings */ > - ntx = na->num_tx_rings + 1; > - nrx = na->num_rx_rings + 1; > + n[NR_TX] = na->num_tx_rings + 1; > + n[NR_RX] = na->num_rx_rings + 1; > > - len = (ntx + nrx) * sizeof(struct netmap_kring) + tailroom; > + len = (n[NR_TX] + n[NR_RX]) * sizeof(struct netmap_kring) + > tailroom; > > na->tx_rings = malloc((size_t)len, M_DEVBUF, M_NOWAIT | M_ZERO); > if (na->tx_rings == NULL) { > D("Cannot allocate krings"); > return ENOMEM; > } > - na->rx_rings = na->tx_rings + ntx; > + na->rx_rings = na->tx_rings + n[NR_TX]; > > /* > * All fields in krings are 0 except the one initialized below. > * but better be explicit on important kring fields. > */ > - ndesc = na->num_tx_desc; > - for (i = 0; i < ntx; i++) { /* Transmit rings */ > - kring = &na->tx_rings[i]; > - bzero(kring, sizeof(*kring)); > - kring->na = na; > - kring->ring_id = i; > - kring->nkr_num_slots = ndesc; > - if (i < na->num_tx_rings) { > - kring->nm_sync = na->nm_txsync; > - } else if (i == na->num_tx_rings) { > - kring->nm_sync = netmap_txsync_to_host_compat; > + for_rx_tx(t) { > + ndesc = nma_get_ndesc(na, t); > + for (i = 0; i < n[t]; i++) { > + kring = &NMR(na, t)[i]; > + bzero(kring, sizeof(*kring)); > + kring->na = na; > + kring->ring_id = i; > + kring->tx = t; > + kring->nkr_num_slots = ndesc; > + if (i < nma_get_nrings(na, t)) { > + kring->nm_sync = (t == NR_TX ? > na->nm_txsync : na->nm_rxsync); > + } else if (i == na->num_tx_rings) { > + kring->nm_sync = (t == NR_TX ? > + > netmap_txsync_to_host_compat : > + > netmap_rxsync_from_host_compat); > + } > + kring->nm_notify = na->nm_notify; > + kring->rhead = kring->rcur = kring->nr_hwcur = 0; > + /* > + * IMPORTANT: Always keep one slot empty. > + */ > + kring->rtail = kring->nr_hwtail = (t == NR_TX ? > ndesc - 1 : 0); > + snprintf(kring->name, sizeof(kring->name) - 1, "%s > %s%d", na->name, > + nm_txrx2str(t), i); > + ND("ktx %s h %d c %d t %d", > + kring->name, kring->rhead, kring->rcur, > kring->rtail); > + mtx_init(&kring->q_lock, (t == NR_TX ? > "nm_txq_lock" : "nm_rxq_lock"), NULL, MTX_DEF); > + init_waitqueue_head(&kring->si); > } > - /* > - * IMPORTANT: Always keep one slot empty. > - */ > - kring->rhead = kring->rcur = kring->nr_hwcur = 0; > - kring->rtail = kring->nr_hwtail = ndesc - 1; > - snprintf(kring->name, sizeof(kring->name) - 1, "%s TX%d", > na->name, i); > - ND("ktx %s h %d c %d t %d", > - kring->name, kring->rhead, kring->rcur, > kring->rtail); > - mtx_init(&kring->q_lock, "nm_txq_lock", NULL, MTX_DEF); > - init_waitqueue_head(&kring->si); > - } > - > - ndesc = na->num_rx_desc; > - for (i = 0; i < nrx; i++) { /* Receive rings */ > - kring = &na->rx_rings[i]; > - bzero(kring, sizeof(*kring)); > - kring->na = na; > - kring->ring_id = i; > - kring->nkr_num_slots = ndesc; > - if (i < na->num_rx_rings) { > - kring->nm_sync = na->nm_rxsync; > - } else if (i == na->num_rx_rings) { > - kring->nm_sync = netmap_rxsync_from_host_compat; > - } > - kring->rhead = kring->rcur = kring->nr_hwcur = 0; > - kring->rtail = kring->nr_hwtail = 0; > - snprintf(kring->name, sizeof(kring->name) - 1, "%s RX%d", > na->name, i); > - ND("krx %s h %d c %d t %d", > - kring->name, kring->rhead, kring->rcur, > kring->rtail); > - mtx_init(&kring->q_lock, "nm_rxq_lock", NULL, MTX_DEF); > - init_waitqueue_head(&kring->si); > + init_waitqueue_head(&na->si[t]); > } > - init_waitqueue_head(&na->tx_si); > - init_waitqueue_head(&na->rx_si); > > - na->tailroom = na->rx_rings + nrx; > + na->tailroom = na->rx_rings + n[NR_RX]; > > return 0; > } > @@ -829,6 +853,10 @@ void > netmap_krings_delete(struct netmap_adapter *na) > { > struct netmap_kring *kring = na->tx_rings; > + enum txrx t; > + > + for_rx_tx(t) > + netmap_knlist_destroy(&na->si[t]); > > /* we rely on the krings layout described above */ > for ( ; kring != na->tailroom; kring++) { > @@ -858,142 +886,35 @@ netmap_hw_krings_delete(struct netmap_ad > } > > > -/* create a new netmap_if for a newly registered fd. > - * If this is the first registration of the adapter, > - * also create the netmap rings and their in-kernel view, > - * the netmap krings. > - */ > -/* call with NMG_LOCK held */ > -static struct netmap_if* > -netmap_if_new(struct netmap_adapter *na) > -{ > - struct netmap_if *nifp; > - > - if (netmap_update_config(na)) { > - /* configuration mismatch, report and fail */ > - return NULL; > - } > - > - if (na->active_fds) /* already registered */ > - goto final; > - > - /* create and init the krings arrays. > - * Depending on the adapter, this may also create > - * the netmap rings themselves > - */ > - if (na->nm_krings_create(na)) > - return NULL; > - > - /* create all missing netmap rings */ > - if (netmap_mem_rings_create(na)) > - goto cleanup; > - > -final: > - > - /* in all cases, create a new netmap if */ > - nifp = netmap_mem_if_new(na); > - if (nifp == NULL) > - goto cleanup; > - > - return (nifp); > - > -cleanup: > - > - if (na->active_fds == 0) { > - netmap_mem_rings_delete(na); > - na->nm_krings_delete(na); > - } > - > - return NULL; > -} > - > - > -/* grab a reference to the memory allocator, if we don't have one > already. The > - * reference is taken from the netmap_adapter registered with the priv. > - */ > -/* call with NMG_LOCK held */ > -static int > -netmap_get_memory_locked(struct netmap_priv_d* p) > -{ > - struct netmap_mem_d *nmd; > - int error = 0; > - > - if (p->np_na == NULL) { > - if (!netmap_mmap_unreg) > - return ENODEV; > - /* for compatibility with older versions of the API > - * we use the global allocator when no interface has been > - * registered > - */ > - nmd = &nm_mem; > - } else { > - nmd = p->np_na->nm_mem; > - } > - if (p->np_mref == NULL) { > - error = netmap_mem_finalize(nmd, p->np_na); > - if (!error) > - p->np_mref = nmd; > - } else if (p->np_mref != nmd) { > - /* a virtual port has been registered, but previous > - * syscalls already used the global allocator. > - * We cannot continue > - */ > - error = ENODEV; > - } > - return error; > -} > - > - > -/* call with NMG_LOCK *not* held */ > -int > -netmap_get_memory(struct netmap_priv_d* p) > -{ > - int error; > - NMG_LOCK(); > - error = netmap_get_memory_locked(p); > - NMG_UNLOCK(); > - return error; > -} > - > - > -/* call with NMG_LOCK held */ > -static int > -netmap_have_memory_locked(struct netmap_priv_d* p) > -{ > - return p->np_mref != NULL; > -} > - > - > -/* call with NMG_LOCK held */ > -static void > -netmap_drop_memory_locked(struct netmap_priv_d* p) > -{ > - if (p->np_mref) { > - netmap_mem_deref(p->np_mref, p->np_na); > - p->np_mref = NULL; > - } > -} > - > > /* > - * Call nm_register(ifp,0) to stop netmap mode on the interface and > + * Undo everything that was done in netmap_do_regif(). In particular, > + * call nm_register(ifp,0) to stop netmap mode on the interface and > * revert to normal operation. > - * The second argument is the nifp to work on. In some cases it is > - * not attached yet to the netmap_priv_d so we need to pass it as > - * a separate argument. > */ > /* call with NMG_LOCK held */ > +static void netmap_unset_ringid(struct netmap_priv_d *); > +static void netmap_rel_exclusive(struct netmap_priv_d *); > static void > -netmap_do_unregif(struct netmap_priv_d *priv, struct netmap_if *nifp) > +netmap_do_unregif(struct netmap_priv_d *priv) > { > struct netmap_adapter *na = priv->np_na; > > NMG_LOCK_ASSERT(); > na->active_fds--; > + /* release exclusive use if it was requested on regif */ > + netmap_rel_exclusive(priv); > if (na->active_fds <= 0) { /* last instance */ > > if (netmap_verbose) > D("deleting last instance for %s", na->name); > + > +#ifdef WITH_MONITOR > + /* walk through all the rings and tell any monitor > + * that the port is going to exit netmap mode > + */ > + netmap_monitor_stop(na); > +#endif > /* > * (TO CHECK) This function is only called > * when the last reference to this file descriptor goes > @@ -1014,37 +935,33 @@ netmap_do_unregif(struct netmap_priv_d * > * XXX The wake up now must happen during *_down(), when > * we order all activities to stop. -gl > */ > - netmap_knlist_destroy(&na->tx_si); > - netmap_knlist_destroy(&na->rx_si); > - > /* delete rings and buffers */ > netmap_mem_rings_delete(na); > na->nm_krings_delete(na); > } > + /* possibily decrement counter of tx_si/rx_si users */ > + netmap_unset_ringid(priv); > /* delete the nifp */ > - netmap_mem_if_delete(na, nifp); > -} > - > -/* call with NMG_LOCK held */ > -static __inline int > -nm_tx_si_user(struct netmap_priv_d *priv) > -{ > - return (priv->np_na != NULL && > - (priv->np_txqlast - priv->np_txqfirst > 1)); > + netmap_mem_if_delete(na, priv->np_nifp); > + /* drop the allocator */ > + netmap_mem_deref(na->nm_mem, na); > + /* mark the priv as unregistered */ > + priv->np_na = NULL; > + priv->np_nifp = NULL; > } > > /* call with NMG_LOCK held */ > static __inline int > -nm_rx_si_user(struct netmap_priv_d *priv) > +nm_si_user(struct netmap_priv_d *priv, enum txrx t) > { > return (priv->np_na != NULL && > - (priv->np_rxqlast - priv->np_rxqfirst > 1)); > + (priv->np_qlast[t] - priv->np_qfirst[t] > 1)); > } > > - > /* > * Destructor of the netmap_priv_d, called when the fd has > - * no active open() and mmap(). Also called in error paths. > + * no active open() and mmap(). > + * Undo all the things done by NIOCREGIF. > * > * returns 1 if this is the last instance and we can free priv > */ > @@ -1066,17 +983,8 @@ netmap_dtor_locked(struct netmap_priv_d > if (!na) { > return 1; //XXX is it correct? > } > - netmap_do_unregif(priv, priv->np_nifp); > - priv->np_nifp = NULL; > - netmap_drop_memory_locked(priv); > - if (priv->np_na) { > - if (nm_tx_si_user(priv)) > - na->tx_si_users--; > - if (nm_rx_si_user(priv)) > - na->rx_si_users--; > - netmap_adapter_put(na); > - priv->np_na = NULL; > - } > + netmap_do_unregif(priv); > + netmap_adapter_put(na); > return 1; > } > > @@ -1148,7 +1056,7 @@ static void > netmap_grab_packets(struct netmap_kring *kring, struct mbq *q, int force) > { > u_int const lim = kring->nkr_num_slots - 1; > - u_int const head = kring->ring->head; > + u_int const head = kring->rhead; > u_int n; > struct netmap_adapter *na = kring->na; > > @@ -1235,7 +1143,6 @@ void > netmap_txsync_to_host(struct netmap_adapter *na) > { > struct netmap_kring *kring = &na->tx_rings[na->num_tx_rings]; > - struct netmap_ring *ring = kring->ring; > u_int const lim = kring->nkr_num_slots - 1; > u_int const head = kring->rhead; > struct mbq q; > @@ -1246,14 +1153,12 @@ netmap_txsync_to_host(struct netmap_adap > * the queue is drained in all cases. > */ > mbq_init(&q); > - ring->cur = head; > netmap_grab_packets(kring, &q, 1 /* force */); > ND("have %d pkts in queue", mbq_len(&q)); > kring->nr_hwcur = head; > kring->nr_hwtail = head + lim; > if (kring->nr_hwtail > lim) > kring->nr_hwtail -= lim + 1; > - nm_txsync_finalize(kring); > > netmap_send_up(na->ifp, &q); > } > @@ -1281,11 +1186,13 @@ netmap_rxsync_from_host(struct netmap_ad > u_int const lim = kring->nkr_num_slots - 1; > u_int const head = kring->rhead; > int ret = 0; > - struct mbq *q = &kring->rx_queue; > + struct mbq *q = &kring->rx_queue, fq; > > (void)pwait; /* disable unused warnings */ > (void)td; > > + mbq_init(&fq); /* fq holds packets to be freed */ > + > mbq_lock(q); > > /* First part: import newly received packets */ > @@ -1308,7 +1215,7 @@ netmap_rxsync_from_host(struct netmap_ad > slot->len = len; > slot->flags = kring->nkr_slot_flags; > nm_i = nm_next(nm_i, lim); > - m_freem(m); > + mbq_enqueue(&fq, m); > } > kring->nr_hwtail = nm_i; > } > @@ -1323,13 +1230,15 @@ netmap_rxsync_from_host(struct netmap_ad > kring->nr_hwcur = head; > } > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Fri Jul 10 18:49:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E2228FE8; Fri, 10 Jul 2015 18:49:18 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (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 361211CB; Fri, 10 Jul 2015 18:49:17 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id 2481BD1D82; Fri, 10 Jul 2015 11:49:17 -0700 (PDT) Date: Fri, 10 Jul 2015 11:49:17 -0700 From: hiren panchasara To: Alan Cox Cc: Alan Cox , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285282 - head/sys/vm Message-ID: <20150710184917.GI87473@strugglingcoder.info> References: <201507081746.t68Hk0To044278@repo.freebsd.org> <20150708182901.GJ51988@strugglingcoder.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ev7mvGV+3JQuI2Eo" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 18:49:18 -0000 --ev7mvGV+3JQuI2Eo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 07/09/15 at 06:13P, Alan Cox wrote: >=20 > On Jul 8, 2015, at 1:29 PM, hiren panchasara wrote: >=20 > > On 07/08/15 at 05:46P, Alan Cox wrote: > >> Author: alc > >> Date: Wed Jul 8 17:45:59 2015 > >> New Revision: 285282 > >> URL: https://svnweb.freebsd.org/changeset/base/285282 > >>=20 > >> Log: > >> The intention of r254304 was to scan the active queue continuously. > >> However, I've observed the active queue scan stopping when there are > >> frequent free page shortages and the inactive queue is steadily refil= led > >> by other mechanisms, such as the sequential access heuristic in vm_fa= ult() > >> or madvise(2).=20 > >=20 > > What would be the actual downside/effect of this scenario? i.e. What go= es > > wrong when active queue scan stops and what would I see/observe on a > > system when the problem is going on - is what I want to understand. > >=20 >=20 >=20 > Basically, pages that haven?t been used recently get stuck in the active = queue. Consequently, they are never reclaimed and repurposed to hold newly= accessed data. Instead, more recently used pages from the inactive queue = are reclaimed. Effectively, this reduces the amount of physical memory tha= t is available for caching file data, and so the system (likely) performs m= ore I/O operations than it would have with the stuck pages problem correcte= d. > Thanks. So it seems now there is an enforced number of min pages that *must* be scanned which is proportional to the time of last scan. Cheers, Hiren >=20 > >> To remedy this problem, record the time of the last active > >> queue scan, and always scan a number of pages proportional to the time > >> since the last scan, regardless of whether that last scan was a > >> timeout-triggered ("pass =3D=3D 0") or free-page-shortage-triggered (= "pass > > >> 0") scan. > >>=20 > >> Also, on a timeout-triggered scan, allow a full scan of the active qu= eue > >> when the system is short of inactive pages. > >>=20 > >> Reviewed by: kib > >> MFC after: 6 weeks > >> Sponsored by: EMC / Isilon Storage Division > >=20 > > [skip] > >=20 > > Thanks in advance. > > Cheers, > > Hiren >=20 >=20 --ev7mvGV+3JQuI2Eo Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVoBOsXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lbXMIAJHYVah3TXApocr/nl+j2+oa mFUj9nJKY2nj4OT0HM7xYq0DJymp//3/NlCNcqSU0cSFzq9WyE2vYHgcpv4kQOmi N1rYeLWQKWHOpWwJ9NptnG1TJ0V1iHSpY5X60vpXP8pKivfaPgnBtv58U+Xi3UKu G5R1n4FkAIAgqQAqgfQQLg9Qf3HIGpE0CilmFo95pC28fbivClMOKuXsiEhHAt3O zP1Cdmbom6Xa9Kw2+SYtM9AtgDVG/54jnTNfHHu6CbFrIONkCkyivZKN0h4Sy0Ay TZtJxfV99dap2xfUvgFOa8hKHJs6nKjDSNJZedRfaFsvte/h1AjeXts+/gUf4Bg= =AYZb -----END PGP SIGNATURE----- --ev7mvGV+3JQuI2Eo-- From owner-svn-src-all@freebsd.org Fri Jul 10 18:55:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3237997132; Fri, 10 Jul 2015 18:55:03 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (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 8E502856; Fri, 10 Jul 2015 18:55:03 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.15.0.59/8.15.0.59) with SMTP id t6AIsN7o008141; Fri, 10 Jul 2015 13:55:00 -0500 Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by pp2.rice.edu with ESMTP id 1vg4gt28c2-1; Fri, 10 Jul 2015 13:55:00 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh1.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh1.mail.rice.edu (Postfix) with ESMTPSA id 4DC6346023E; Fri, 10 Jul 2015 13:55:00 -0500 (CDT) Message-ID: <55A01503.20408@rice.edu> Date: Fri, 10 Jul 2015 13:54:59 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: hiren panchasara CC: Alan Cox , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285282 - head/sys/vm References: <201507081746.t68Hk0To044278@repo.freebsd.org> <20150708182901.GJ51988@strugglingcoder.info> <20150710184917.GI87473@strugglingcoder.info> In-Reply-To: <20150710184917.GI87473@strugglingcoder.info> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=1 compositescore=0.9 suspectscore=10 malwarescore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0.9 spamscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1506180000 definitions=main-1507100265 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 18:55:04 -0000 On 07/10/2015 13:49, hiren panchasara wrote: > On 07/09/15 at 06:13P, Alan Cox wrote: >> On Jul 8, 2015, at 1:29 PM, hiren panchasara wrote: >> >>> On 07/08/15 at 05:46P, Alan Cox wrote: >>>> Author: alc >>>> Date: Wed Jul 8 17:45:59 2015 >>>> New Revision: 285282 >>>> URL: https://svnweb.freebsd.org/changeset/base/285282 >>>> >>>> Log: >>>> The intention of r254304 was to scan the active queue continuously. >>>> However, I've observed the active queue scan stopping when there are >>>> frequent free page shortages and the inactive queue is steadily refilled >>>> by other mechanisms, such as the sequential access heuristic in vm_fault() >>>> or madvise(2). >>> What would be the actual downside/effect of this scenario? i.e. What goes >>> wrong when active queue scan stops and what would I see/observe on a >>> system when the problem is going on - is what I want to understand. >>> >> >> Basically, pages that haven?t been used recently get stuck in the active queue. Consequently, they are never reclaimed and repurposed to hold newly accessed data. Instead, more recently used pages from the inactive queue are reclaimed. Effectively, this reduces the amount of physical memory that is available for caching file data, and so the system (likely) performs more I/O operations than it would have with the stuck pages problem corrected. >> > Thanks. So it seems now there is an enforced number of min pages that > *must* be scanned which is proportional to the time of last scan. That is correct. >>>> To remedy this problem, record the time of the last active >>>> queue scan, and always scan a number of pages proportional to the time >>>> since the last scan, regardless of whether that last scan was a >>>> timeout-triggered ("pass == 0") or free-page-shortage-triggered ("pass > >>>> 0") scan. >>>> >>>> Also, on a timeout-triggered scan, allow a full scan of the active queue >>>> when the system is short of inactive pages. >>>> >>>> Reviewed by: kib >>>> MFC after: 6 weeks >>>> Sponsored by: EMC / Isilon Storage Division >>> [skip] >>> >>> Thanks in advance. >>> Cheers, >>> Hiren >> From owner-svn-src-all@freebsd.org Fri Jul 10 19:18:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC0E99975A8; Fri, 10 Jul 2015 19:18:50 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 B0828166D; Fri, 10 Jul 2015 19:18:50 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6AJIorH047452; Fri, 10 Jul 2015 19:18:50 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6AJIoVk047451; Fri, 10 Jul 2015 19:18:50 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201507101918.t6AJIoVk047451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Fri, 10 Jul 2015 19:18:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285361 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 19:18:50 -0000 Author: luigi Date: Fri Jul 10 19:18:49 2015 New Revision: 285361 URL: https://svnweb.freebsd.org/changeset/base/285361 Log: one more warning suppression when compiling the test code in userspace. Modified: head/sys/netpfil/ipfw/dn_heap.c Modified: head/sys/netpfil/ipfw/dn_heap.c ============================================================================== --- head/sys/netpfil/ipfw/dn_heap.c Fri Jul 10 18:10:40 2015 (r285360) +++ head/sys/netpfil/ipfw/dn_heap.c Fri Jul 10 19:18:49 2015 (r285361) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include "dn_heap.h" #define log(x, arg...) fprintf(stderr, ## arg) #define panic(x...) fprintf(stderr, ## x), exit(1) -#define MALLOC_DEFINE(a, b, c) +#define MALLOC_DEFINE(a, b, c) volatile int __dummy__ ## a __attribute__((__unused__)) static void *my_malloc(int s) { return malloc(s); } static void my_free(void *p) { free(p); } #define malloc(s, t, w) my_malloc(s) From owner-svn-src-all@freebsd.org Fri Jul 10 19:24:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E30A997706; Fri, 10 Jul 2015 19:24:38 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 CC63F1DFE; Fri, 10 Jul 2015 19:24:37 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6AJOb5R051771; Fri, 10 Jul 2015 19:24:37 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6AJObbg051770; Fri, 10 Jul 2015 19:24:37 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201507101924.t6AJObbg051770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Fri, 10 Jul 2015 19:24:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285362 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 19:24:38 -0000 Author: luigi Date: Fri Jul 10 19:24:36 2015 New Revision: 285362 URL: https://svnweb.freebsd.org/changeset/base/285362 Log: assorted algorithmic fixes from Paolo Valente (one of my qfq coauthors): - use 1ULL to avoid shift truncations - recompute the sum of weight dynamically to provide better fairness - fix an erroneous constant in the computation of the slot - preserve timestamp correctness when the old timestamp is stale. Modified: head/sys/netpfil/ipfw/dn_sched_qfq.c Modified: head/sys/netpfil/ipfw/dn_sched_qfq.c ============================================================================== --- head/sys/netpfil/ipfw/dn_sched_qfq.c Fri Jul 10 19:18:49 2015 (r285361) +++ head/sys/netpfil/ipfw/dn_sched_qfq.c Fri Jul 10 19:24:36 2015 (r285362) @@ -172,8 +172,6 @@ for the scheduler: bitmaps and bucket li #define QFQ_MAX_WEIGHT (1<i_wsum) -#define IWSUM ((1<inv_w, cl->lmax); cl->grp = &q->groups[i]; q->wsum += w; + q->iwsum = ONE_FP / q->wsum; /* XXX note theory */ // XXX cl->S = q->V; ? - // XXX compute q->i_wsum return 0; } @@ -325,6 +324,8 @@ qfq_free_queue(struct dn_queue *_q) struct qfq_class *cl = (struct qfq_class *)_q; if (cl->inv_w) { q->wsum -= ONE_FP/cl->inv_w; + if (q->wsum != 0) + q->iwsum = ONE_FP / q->wsum; cl->inv_w = 0; /* reset weight to avoid run twice */ } return 0; @@ -408,7 +409,8 @@ qfq_make_eligible(struct qfq_sched *q, u old_vslot = old_V >> QFQ_MIN_SLOT_SHIFT; if (vslot != old_vslot) { - mask = (2UL << (__fls(vslot ^ old_vslot))) - 1; + /* should be 1ULL not 2ULL */ + mask = (1ULL << (__fls(vslot ^ old_vslot))) - 1; qfq_move_groups(q, mask, IR, ER); qfq_move_groups(q, mask, IB, EB); } @@ -557,7 +559,7 @@ qfq_dequeue(struct dn_sch_inst *si) } NO(q->queued--;) old_V = q->V; - q->V += (uint64_t)m->m_pkthdr.len * IWSUM; + q->V += (uint64_t)m->m_pkthdr.len * q->iwsum; ND("m is %p F 0x%llx V now 0x%llx", m, cl->F, q->V); if (qfq_update_class(q, grp, cl)) { @@ -612,7 +614,7 @@ qfq_update_start(struct qfq_sched *q, st int slot_shift = cl->grp->slot_shift; roundedF = qfq_round_down(cl->F, slot_shift); - limit = qfq_round_down(q->V, slot_shift) + (1UL << slot_shift); + limit = qfq_round_down(q->V, slot_shift) + (1ULL << slot_shift); if (!qfq_gt(cl->F, q->V) || qfq_gt(roundedF, limit)) { /* timestamp was stale */ @@ -620,7 +622,11 @@ qfq_update_start(struct qfq_sched *q, st if (mask) { struct qfq_group *next = qfq_ffs(q, mask); if (qfq_gt(roundedF, next->F)) { - cl->S = next->F; + /* from pv 71261956973ba9e0637848a5adb4a5819b4bae83 */ + if (qfq_gt(limit, next->F)) + cl->S = next->F; + else /* preserve timestamp correctness */ + cl->S = limit; return; } } From owner-svn-src-all@freebsd.org Fri Jul 10 19:27:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70FE6997775; Fri, 10 Jul 2015 19:27:20 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 5ABFA1F8; Fri, 10 Jul 2015 19:27:20 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6AJRJxr052174; Fri, 10 Jul 2015 19:27:19 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6AJRJW5052173; Fri, 10 Jul 2015 19:27:19 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201507101927.t6AJRJW5052173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Fri, 10 Jul 2015 19:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285363 - head/sys/geom/eli X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 19:27:20 -0000 Author: pjd Date: Fri Jul 10 19:27:19 2015 New Revision: 285363 URL: https://svnweb.freebsd.org/changeset/base/285363 Log: Spoil even can happen for some time now even on providers opened exclusively (on the media change event). Update GELI to handle that situation. PR: 201185 Submitted by: Matthew D. Fuller Modified: head/sys/geom/eli/g_eli.c Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Fri Jul 10 19:24:36 2015 (r285362) +++ head/sys/geom/eli/g_eli.c Fri Jul 10 19:27:19 2015 (r285363) @@ -730,10 +730,10 @@ g_eli_create(struct gctl_req *req, struc sc = malloc(sizeof(*sc), M_ELI, M_WAITOK | M_ZERO); gp->start = g_eli_start; /* - * Spoiling cannot happen actually, because we keep provider open for - * writing all the time or provider is read-only. + * Spoiling can happen even though we have the provider open + * exclusively, e.g. through media change events. */ - gp->spoiled = g_eli_orphan_spoil_assert; + gp->spoiled = g_eli_orphan; gp->orphan = g_eli_orphan; gp->dumpconf = g_eli_dumpconf; /* From owner-svn-src-all@freebsd.org Fri Jul 10 22:10:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F6A0997390; Fri, 10 Jul 2015 22:10:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 1288E939; Fri, 10 Jul 2015 22:10:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6AMA1ti032121; Fri, 10 Jul 2015 22:10:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6AMA1v9032093; Fri, 10 Jul 2015 22:10:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507102210.t6AMA1v9032093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 10 Jul 2015 22:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285365 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 22:10:02 -0000 Author: gjb Date: Fri Jul 10 22:10:00 2015 New Revision: 285365 URL: https://svnweb.freebsd.org/changeset/base/285365 Log: Fix two remaining issues with the arm UFS mount issue: - Add the GEOM_PART_GPT option and enable MSDOSFS in the GUMSTIX kernel. [1] - Add GEOM_LABEL to the PANDABOARD kernel, that should have been included included in r285132. I confused the kernel configuration used for the WANDBOARD and PANDABOARD, which the former uses the IMX6 kernel configuration, along with the CUBOX-HUMMINGBOARD. This is a direct commit to stable/10, as was r285132. [1] I do not actually have the GUMSTIX board, but I suspect it will fail to boot in the same way as the others have been. Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/arm/conf/GUMSTIX stable/10/sys/arm/conf/PANDABOARD Modified: stable/10/sys/arm/conf/GUMSTIX ============================================================================== --- stable/10/sys/arm/conf/GUMSTIX Fri Jul 10 21:17:49 2015 (r285364) +++ stable/10/sys/arm/conf/GUMSTIX Fri Jul 10 22:10:00 2015 (r285365) @@ -47,11 +47,12 @@ options UFS_DIRHASH # Improve performa options NFSCL # New Network Filesystem Client #options NFSD # New Network Filesystem Server options NFS_ROOT # NFS usable as /, requires NFSCL +options GEOM_PART_GPT # GUID Partition Tables options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme options GEOM_LABEL # Provides labelization options TMPFS # Efficient memory filesystem -#options MSDOSFS # MSDOS Filesystem +options MSDOSFS # MSDOS Filesystem #options CD9660 # ISO 9660 Filesystem #options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework Modified: stable/10/sys/arm/conf/PANDABOARD ============================================================================== --- stable/10/sys/arm/conf/PANDABOARD Fri Jul 10 21:17:49 2015 (r285364) +++ stable/10/sys/arm/conf/PANDABOARD Fri Jul 10 22:10:00 2015 (r285365) @@ -52,6 +52,7 @@ options TMPFS # Efficient memory file options GEOM_PART_GPT # GUID Partition Tables options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme +options GEOM_LABEL # Provides labelization options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support From owner-svn-src-all@freebsd.org Sat Jul 11 03:12:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0BA199680B; Sat, 11 Jul 2015 03:12:35 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 8E12914AF; Sat, 11 Jul 2015 03:12:35 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B3CZB7081284; Sat, 11 Jul 2015 03:12:35 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B3CZBv081280; Sat, 11 Jul 2015 03:12:35 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201507110312.t6B3CZBv081280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Sat, 11 Jul 2015 03:12:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285366 - in head: lib/libmd sys/crypto/sha2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 03:12:35 -0000 Author: jmg Date: Sat Jul 11 03:12:34 2015 New Revision: 285366 URL: https://svnweb.freebsd.org/changeset/base/285366 Log: Complete the move that was started w/ r263218.. For some reason I didn't delete the files, so that means we need to bring the changes in r282726 to the correct files.. make tinderbox completed with this patch... Deleted: head/lib/libmd/sha256.h head/lib/libmd/sha256c.c Modified: head/sys/crypto/sha2/sha256.h head/sys/crypto/sha2/sha256c.c Modified: head/sys/crypto/sha2/sha256.h ============================================================================== --- head/sys/crypto/sha2/sha256.h Fri Jul 10 22:10:00 2015 (r285365) +++ head/sys/crypto/sha2/sha256.h Sat Jul 11 03:12:34 2015 (r285366) @@ -40,6 +40,38 @@ typedef struct SHA256Context { } SHA256_CTX; __BEGIN_DECLS + +/* Ensure libmd symbols do not clash with libcrypto */ + +#ifndef SHA256_Init +#define SHA256_Init _libmd_SHA256_Init +#endif +#ifndef SHA256_Update +#define SHA256_Update _libmd_SHA256_Update +#endif +#ifndef SHA256_Final +#define SHA256_Final _libmd_SHA256_Final +#endif +#ifndef SHA256_End +#define SHA256_End _libmd_SHA256_End +#endif +#ifndef SHA256_File +#define SHA256_File _libmd_SHA256_File +#endif +#ifndef SHA256_FileChunk +#define SHA256_FileChunk _libmd_SHA256_FileChunk +#endif +#ifndef SHA256_Data +#define SHA256_Data _libmd_SHA256_Data +#endif + +#ifndef SHA256_Transform +#define SHA256_Transform _libmd_SHA256_Transform +#endif +#ifndef SHA256_version +#define SHA256_version _libmd_SHA256_version +#endif + void SHA256_Init(SHA256_CTX *); void SHA256_Update(SHA256_CTX *, const void *, size_t); void SHA256_Final(unsigned char [32], SHA256_CTX *); Modified: head/sys/crypto/sha2/sha256c.c ============================================================================== --- head/sys/crypto/sha2/sha256c.c Fri Jul 10 22:10:00 2015 (r285365) +++ head/sys/crypto/sha2/sha256c.c Sat Jul 11 03:12:34 2015 (r285366) @@ -299,3 +299,18 @@ SHA256_Final(unsigned char digest[32], S /* Clear the context state */ memset((void *)ctx, 0, sizeof(*ctx)); } + +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ +#undef SHA256_Init +__weak_reference(_libmd_SHA256_Init, SHA256_Init); +#undef SHA256_Update +__weak_reference(_libmd_SHA256_Update, SHA256_Update); +#undef SHA256_Final +__weak_reference(_libmd_SHA256_Final, SHA256_Final); +#undef SHA256_Transform +__weak_reference(_libmd_SHA256_Transform, SHA256_Transform); +#endif From owner-svn-src-all@freebsd.org Sat Jul 11 03:28:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1FFB996991; Sat, 11 Jul 2015 03:28:44 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 D5FB11A83; Sat, 11 Jul 2015 03:28:44 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B3Si0m086839; Sat, 11 Jul 2015 03:28:44 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B3SiCD086838; Sat, 11 Jul 2015 03:28:44 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110328.t6B3SiCD086838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 03:28:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285367 - stable/9/lib/libsm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 03:28:45 -0000 Author: gshapiro Date: Sat Jul 11 03:28:43 2015 New Revision: 285367 URL: https://svnweb.freebsd.org/changeset/base/285367 Log: MFC: libsm/path.c is about to disappear in the merge of sendmail 8.15.2. It is an empty file now so it is safe to remove before the merge. Modified: stable/9/lib/libsm/Makefile Directory Properties: stable/9/lib/libsm/ (props changed) Modified: stable/9/lib/libsm/Makefile ============================================================================== --- stable/9/lib/libsm/Makefile Sat Jul 11 03:12:34 2015 (r285366) +++ stable/9/lib/libsm/Makefile Sat Jul 11 03:28:43 2015 (r285367) @@ -29,7 +29,7 @@ SRCS+= assert.c debug.c errstring.c exc. smstdio.c snprintf.c sscanf.c stdio.c strio.c ungetc.c \ vasprintf.c vfprintf.c vfscanf.c vprintf.c vsnprintf.c \ wbuf.c wsetup.c string.c stringf.c \ - xtrap.c strto.c test.c path.c strcasecmp.c strrevcmp.c \ + xtrap.c strto.c test.c strcasecmp.c strrevcmp.c \ signal.c clock.c config.c sem.c shm.c mbdb.c strexit.c cf.c ldap.c \ niprop.c mpeix.c memstat.c util.c inet6_ntop.c CLEANFILES+=sm_os.h From owner-svn-src-all@freebsd.org Sat Jul 11 03:29:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C8929969DF; Sat, 11 Jul 2015 03:29:05 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 5C28E1BE0; Sat, 11 Jul 2015 03:29:05 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B3T5XV086997; Sat, 11 Jul 2015 03:29:05 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B3T5dE086995; Sat, 11 Jul 2015 03:29:05 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110329.t6B3T5dE086995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 03:29:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r285368 - stable/8/lib/libsm X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 03:29:05 -0000 Author: gshapiro Date: Sat Jul 11 03:29:04 2015 New Revision: 285368 URL: https://svnweb.freebsd.org/changeset/base/285368 Log: MFC: libsm/path.c is about to disappear in the merge of sendmail 8.15.2. It is an empty file now so it is safe to remove before the merge. Modified: stable/8/lib/libsm/Makefile Directory Properties: stable/8/lib/libsm/ (props changed) Modified: stable/8/lib/libsm/Makefile ============================================================================== --- stable/8/lib/libsm/Makefile Sat Jul 11 03:28:43 2015 (r285367) +++ stable/8/lib/libsm/Makefile Sat Jul 11 03:29:04 2015 (r285368) @@ -27,7 +27,7 @@ SRCS+= assert.c debug.c errstring.c exc. smstdio.c snprintf.c sscanf.c stdio.c strio.c ungetc.c \ vasprintf.c vfprintf.c vfscanf.c vprintf.c vsnprintf.c \ wbuf.c wsetup.c string.c stringf.c \ - xtrap.c strto.c test.c path.c strcasecmp.c strrevcmp.c \ + xtrap.c strto.c test.c strcasecmp.c strrevcmp.c \ signal.c clock.c config.c sem.c shm.c mbdb.c strexit.c cf.c ldap.c \ niprop.c mpeix.c memstat.c util.c inet6_ntop.c CLEANFILES+=sm_os.h From owner-svn-src-all@freebsd.org Sat Jul 11 03:32:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21BEF996B5B; Sat, 11 Jul 2015 03:32:14 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 10B4C1F25; Sat, 11 Jul 2015 03:32:14 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B3WDPZ091049; Sat, 11 Jul 2015 03:32:13 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B3WDwg091048; Sat, 11 Jul 2015 03:32:13 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110332.t6B3WDwg091048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 03:32:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285369 - stable/9/usr.sbin/sendmail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 03:32:14 -0000 Author: gshapiro Date: Sat Jul 11 03:32:13 2015 New Revision: 285369 URL: https://svnweb.freebsd.org/changeset/base/285369 Log: By default, sendmail 8.15 uses uncompressed IPv6 addresses. Keep current FreeBSD 10 and earlier behavior of using compressed IPv6 addresses in configuration, maps, rulesets, etc. (FreeBSD 11 and later will use the new default of uncompressed IPv6 addresses.) Modified: stable/9/usr.sbin/sendmail/Makefile Modified: stable/9/usr.sbin/sendmail/Makefile ============================================================================== --- stable/9/usr.sbin/sendmail/Makefile Sat Jul 11 03:29:04 2015 (r285368) +++ stable/9/usr.sbin/sendmail/Makefile Sat Jul 11 03:32:13 2015 (r285369) @@ -40,7 +40,7 @@ CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/in CFLAGS+= ${DBMDEF} ${NIS} -DTCPWRAPPERS ${MAPS} .if ${MK_INET6_SUPPORT} != "no" -CFLAGS+= -DNETINET6 +CFLAGS+= -DNETINET6 -DIPV6_FULL=0 .endif WARNS?= 1 From owner-svn-src-all@freebsd.org Sat Jul 11 03:32:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EA3B996B9F; Sat, 11 Jul 2015 03:32:23 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 8A773BD; Sat, 11 Jul 2015 03:32:23 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B3WNBC091116; Sat, 11 Jul 2015 03:32:23 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B3WNdd091115; Sat, 11 Jul 2015 03:32:23 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110332.t6B3WNdd091115@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 03:32:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r285370 - stable/8/usr.sbin/sendmail X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 03:32:23 -0000 Author: gshapiro Date: Sat Jul 11 03:32:22 2015 New Revision: 285370 URL: https://svnweb.freebsd.org/changeset/base/285370 Log: By default, sendmail 8.15 uses uncompressed IPv6 addresses. Keep current FreeBSD 10 and earlier behavior of using compressed IPv6 addresses in configuration, maps, rulesets, etc. (FreeBSD 11 and later will use the new default of uncompressed IPv6 addresses.) Modified: stable/8/usr.sbin/sendmail/Makefile Modified: stable/8/usr.sbin/sendmail/Makefile ============================================================================== --- stable/8/usr.sbin/sendmail/Makefile Sat Jul 11 03:32:13 2015 (r285369) +++ stable/8/usr.sbin/sendmail/Makefile Sat Jul 11 03:32:22 2015 (r285370) @@ -40,7 +40,7 @@ CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/in CFLAGS+= ${DBMDEF} ${NIS} -DTCPWRAPPERS ${MAPS} .if ${MK_INET6_SUPPORT} != "no" -CFLAGS+= -DNETINET6 +CFLAGS+= -DNETINET6 -DIPV6_FULL=0 .endif DPADD= ${LIBUTIL} ${LIBWRAP} From owner-svn-src-all@freebsd.org Sat Jul 11 03:34:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77979996C57; Sat, 11 Jul 2015 03:34:42 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 6735D25A; Sat, 11 Jul 2015 03:34:42 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B3YgCx091495; Sat, 11 Jul 2015 03:34:42 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B3Ygvu091494; Sat, 11 Jul 2015 03:34:42 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110334.t6B3Ygvu091494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 03:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285371 - stable/9/usr.sbin/sendmail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 03:34:42 -0000 Author: gshapiro Date: Sat Jul 11 03:34:41 2015 New Revision: 285371 URL: https://svnweb.freebsd.org/changeset/base/285371 Log: MFC: Temporarily disable WARNS while addressing a non-issue with the upstream code Modified: stable/9/usr.sbin/sendmail/Makefile Directory Properties: stable/9/usr.sbin/sendmail/ (props changed) Modified: stable/9/usr.sbin/sendmail/Makefile ============================================================================== --- stable/9/usr.sbin/sendmail/Makefile Sat Jul 11 03:32:22 2015 (r285370) +++ stable/9/usr.sbin/sendmail/Makefile Sat Jul 11 03:34:41 2015 (r285371) @@ -43,7 +43,7 @@ CFLAGS+= ${DBMDEF} ${NIS} -DTCPWRAPPERS CFLAGS+= -DNETINET6 -DIPV6_FULL=0 .endif -WARNS?= 1 +WARNS?= 0 DPADD= ${LIBUTIL} ${LIBWRAP} LDADD= -lutil -lwrap From owner-svn-src-all@freebsd.org Sat Jul 11 03:34:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E163D996C92; Sat, 11 Jul 2015 03:34:57 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 D0D143CA; Sat, 11 Jul 2015 03:34:57 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B3YvKj091580; Sat, 11 Jul 2015 03:34:57 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B3YvT6091578; Sat, 11 Jul 2015 03:34:57 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110334.t6B3YvT6091578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 03:34:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r285372 - stable/8/usr.sbin/sendmail X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 03:34:58 -0000 Author: gshapiro Date: Sat Jul 11 03:34:57 2015 New Revision: 285372 URL: https://svnweb.freebsd.org/changeset/base/285372 Log: MFC: Temporarily disable WARNS while addressing a non-issue with the upstream code Modified: stable/8/usr.sbin/sendmail/Makefile Directory Properties: stable/8/usr.sbin/sendmail/ (props changed) Modified: stable/8/usr.sbin/sendmail/Makefile ============================================================================== --- stable/8/usr.sbin/sendmail/Makefile Sat Jul 11 03:34:41 2015 (r285371) +++ stable/8/usr.sbin/sendmail/Makefile Sat Jul 11 03:34:57 2015 (r285372) @@ -45,6 +45,7 @@ CFLAGS+= -DNETINET6 -DIPV6_FULL=0 DPADD= ${LIBUTIL} ${LIBWRAP} LDADD= -lutil -lwrap +WARNS?= 0 LIBSMDIR= ${.OBJDIR}/../../lib/libsm LIBSM= ${LIBSMDIR}/libsm.a From owner-svn-src-all@freebsd.org Sat Jul 11 03:42:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77C91996ED7; Sat, 11 Jul 2015 03:42:06 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 64173AA5; Sat, 11 Jul 2015 03:42:06 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B3g6hP096072; Sat, 11 Jul 2015 03:42:06 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B3g2b4096052; Sat, 11 Jul 2015 03:42:02 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110342.t6B3g2b4096052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 03:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285373 - in stable/9/contrib/sendmail: . cf cf/cf cf/feature cf/hack cf/m4 contrib doc/op editmap include/sendmail include/sm libmilter libmilter/docs libsm libsmdb makemap src X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 03:42:06 -0000 Author: gshapiro Date: Sat Jul 11 03:42:01 2015 New Revision: 285373 URL: https://svnweb.freebsd.org/changeset/base/285373 Log: MFC: Merge sendmail 8.15.2 Added: stable/9/contrib/sendmail/cf/feature/bcc.m4 - copied unchanged from r285229, head/contrib/sendmail/cf/feature/bcc.m4 stable/9/contrib/sendmail/cf/feature/nopercenthack.m4 - copied unchanged from r285229, head/contrib/sendmail/cf/feature/nopercenthack.m4 stable/9/contrib/sendmail/cf/feature/prefixmod.m4 - copied unchanged from r285229, head/contrib/sendmail/cf/feature/prefixmod.m4 stable/9/contrib/sendmail/cf/feature/tls_session_features.m4 - copied unchanged from r285229, head/contrib/sendmail/cf/feature/tls_session_features.m4 stable/9/contrib/sendmail/cf/hack/xconnect.m4 - copied unchanged from r285229, head/contrib/sendmail/cf/hack/xconnect.m4 stable/9/contrib/sendmail/contrib/AuthRealm.p0 - copied unchanged from r285229, head/contrib/sendmail/contrib/AuthRealm.p0 Deleted: stable/9/contrib/sendmail/libsm/path.c Modified: stable/9/contrib/sendmail/CACerts stable/9/contrib/sendmail/FAQ stable/9/contrib/sendmail/INSTALL stable/9/contrib/sendmail/KNOWNBUGS stable/9/contrib/sendmail/PGPKEYS stable/9/contrib/sendmail/README stable/9/contrib/sendmail/RELEASE_NOTES stable/9/contrib/sendmail/cf/README stable/9/contrib/sendmail/cf/cf/Makefile stable/9/contrib/sendmail/cf/cf/submit.cf stable/9/contrib/sendmail/cf/cf/submit.mc stable/9/contrib/sendmail/cf/feature/block_bad_helo.m4 stable/9/contrib/sendmail/cf/feature/ldap_routing.m4 stable/9/contrib/sendmail/cf/m4/cfhead.m4 stable/9/contrib/sendmail/cf/m4/proto.m4 stable/9/contrib/sendmail/cf/m4/version.m4 stable/9/contrib/sendmail/doc/op/op.me stable/9/contrib/sendmail/editmap/editmap.c stable/9/contrib/sendmail/include/sendmail/sendmail.h stable/9/contrib/sendmail/include/sm/bdb.h stable/9/contrib/sendmail/include/sm/cdefs.h stable/9/contrib/sendmail/include/sm/conf.h stable/9/contrib/sendmail/include/sm/errstring.h stable/9/contrib/sendmail/include/sm/fdset.h stable/9/contrib/sendmail/libmilter/docs/smfi_setsymlist.html stable/9/contrib/sendmail/libmilter/engine.c stable/9/contrib/sendmail/libmilter/handler.c stable/9/contrib/sendmail/libmilter/listener.c stable/9/contrib/sendmail/libmilter/signal.c stable/9/contrib/sendmail/libmilter/smfi.c stable/9/contrib/sendmail/libmilter/worker.c stable/9/contrib/sendmail/libsm/Makefile.m4 stable/9/contrib/sendmail/libsm/errstring.c stable/9/contrib/sendmail/libsm/local.h stable/9/contrib/sendmail/libsm/mbdb.c stable/9/contrib/sendmail/libsm/refill.c stable/9/contrib/sendmail/libsm/stdio.c stable/9/contrib/sendmail/libsm/vfprintf.c stable/9/contrib/sendmail/libsmdb/smdb.c stable/9/contrib/sendmail/makemap/makemap.c stable/9/contrib/sendmail/src/README stable/9/contrib/sendmail/src/TRACEFLAGS stable/9/contrib/sendmail/src/TUNING stable/9/contrib/sendmail/src/bf.c stable/9/contrib/sendmail/src/collect.c stable/9/contrib/sendmail/src/conf.c stable/9/contrib/sendmail/src/daemon.c stable/9/contrib/sendmail/src/deliver.c stable/9/contrib/sendmail/src/envelope.c stable/9/contrib/sendmail/src/err.c stable/9/contrib/sendmail/src/headers.c stable/9/contrib/sendmail/src/main.c stable/9/contrib/sendmail/src/map.c stable/9/contrib/sendmail/src/mci.c stable/9/contrib/sendmail/src/milter.c stable/9/contrib/sendmail/src/parseaddr.c stable/9/contrib/sendmail/src/queue.c stable/9/contrib/sendmail/src/readcf.c stable/9/contrib/sendmail/src/recipient.c stable/9/contrib/sendmail/src/savemail.c stable/9/contrib/sendmail/src/sendmail.8 stable/9/contrib/sendmail/src/sendmail.h stable/9/contrib/sendmail/src/sfsasl.c stable/9/contrib/sendmail/src/sm_resolve.c stable/9/contrib/sendmail/src/srvrsmtp.c stable/9/contrib/sendmail/src/tls.c stable/9/contrib/sendmail/src/usersmtp.c stable/9/contrib/sendmail/src/util.c stable/9/contrib/sendmail/src/version.c Directory Properties: stable/9/contrib/sendmail/ (props changed) Modified: stable/9/contrib/sendmail/CACerts ============================================================================== --- stable/9/contrib/sendmail/CACerts Sat Jul 11 03:34:57 2015 (r285372) +++ stable/9/contrib/sendmail/CACerts Sat Jul 11 03:42:01 2015 (r285373) @@ -10,6 +10,102 @@ Certificate: Data: Version: 3 (0x2) Serial Number: + 92:91:67:de:e0:ef:2c:e4 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + Validity + Not Before: Mar 2 19:15:29 2015 GMT + Not After : Mar 1 19:15:29 2018 GMT + Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b9:1a:a1:56:ce:cb:16:af:4f:96:ba:2a:70:31: + 70:d3:86:6c:7a:46:26:47:42:3f:de:49:57:3e:08: + 1e:10:25:bf:06:8f:ca:fd:f4:5e:6a:01:7d:31:4d: + 50:88:18:43:71:66:65:42:9c:90:97:0d:95:f2:14: + ef:d7:5e:77:ef:7d:b5:49:3f:02:bb:83:20:f7:e6: + fc:9a:cd:13:df:60:41:28:8e:39:07:a6:a4:40:98: + 15:1e:46:b6:04:2e:f9:ab:32:d1:8b:fe:52:81:f1: + d2:e1:c3:cf:bf:ab:40:a7:f0:e4:e5:a2:82:37:30: + 8c:10:7d:aa:a8:7c:7e:76:cc:5f:1a:24:d0:8c:94: + f6:f2:7f:4a:be:2f:38:67:c0:06:e6:9e:51:ad:55: + d0:cb:26:71:cf:f4:af:7d:5a:41:81:16:fb:26:ec: + f0:35:01:6e:db:f9:e9:00:d7:d0:89:7b:cf:88:16: + 8b:1c:8f:77:1f:5d:ef:70:04:28:76:c5:1b:c6:23: + 8d:49:6b:f0:b8:21:56:d6:7d:68:6c:be:21:e3:e6: + e3:1d:6f:a5:ea:dc:83:e4:27:b3:6f:5f:1b:3d:33: + a1:d5:d3:f0:73:1a:12:eb:d9:95:00:71:59:16:b4: + e4:60:38:b2:2e:7f:b7:d4:c5:e9:3f:74:e4:48:38: + 29:89 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + B1:69:DB:5E:9B:CE:1A:B4:1D:B2:6A:FC:5A:22:97:B6:24:14:6F:32 + X509v3 Authority Key Identifier: + keyid:B1:69:DB:5E:9B:CE:1A:B4:1D:B2:6A:FC:5A:22:97:B6:24:14:6F:32 + DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + serial:92:91:67:DE:E0:EF:2C:E4 + + X509v3 Basic Constraints: + CA:TRUE + X509v3 Subject Alternative Name: + email:ca+ca-rsa2015@esmtp.org + X509v3 Issuer Alternative Name: + email:ca+ca-rsa2015@esmtp.org + Signature Algorithm: sha1WithRSAEncryption + 0a:ce:07:39:77:08:c5:3a:00:04:e8:a0:3b:f7:d2:4c:79:02: + 23:0b:da:c0:55:39:82:71:0a:0c:83:e2:de:f2:3b:fe:23:bc: + 9b:13:34:d1:29:0a:16:3f:01:7d:9f:fb:4b:aa:12:dc:3b:7e: + b9:27:7b:ec:0c:3f:c0:d9:f5:d8:a8:a1:9c:1c:3a:2f:40:df: + 27:1a:1a:a0:74:00:19:b7:82:0e:f9:45:86:bf:32:da:0e:72: + 0a:4c:2c:39:21:63:c3:1f:61:6e:e2:4d:ba:7a:26:1a:15:ce: + b1:f6:1a:59:04:70:ed:e8:72:05:4c:fc:84:c6:a5:f4:e2:4a: + 40:e4:42:70:87:9a:a7:02:26:3a:47:34:09:e0:7b:88:ca:fb: + 99:d9:9b:bb:0c:52:8a:93:d5:59:30:0b:55:42:b4:bb:d2:b1: + 49:55:81:a4:70:a0:49:19:f2:4f:61:94:af:e9:d7:62:68:65: + 97:67:00:26:b8:9b:b2:2c:d0:2c:83:7d:3e:b3:31:73:b9:55: + 49:53:fa:a3:ad:1b:02:67:08:9e:ce:9e:eb:9f:47:0d:6c:95: + e9:6c:30:92:c1:94:67:ad:d9:e3:b9:61:ea:a9:72:98:81:3a: + 62:80:70:20:9a:3e:c4:1f:6f:bd:b4:00:ec:b1:fe:71:da:91: + 15:89:f7:8f +-----BEGIN CERTIFICATE----- +MIIFJzCCBA+gAwIBAgIJAJKRZ97g7yzkMA0GCSqGSIb3DQEBBQUAMIGlMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTERMA8GA1UEBwwIQmVya2VsZXkx +FDASBgNVBAoMC0VuZG1haWwgT3JnMQwwCgYDVQQLDANNVEExIjAgBgNVBAMMGUNs +YXVzIEFzc21hbm4gQ0EgUlNBIDIwMTUxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz +YTIwMTVAZXNtdHAub3JnMB4XDTE1MDMwMjE5MTUyOVoXDTE4MDMwMTE5MTUyOVow +gaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMREwDwYDVQQHDAhC +ZXJrZWxleTEUMBIGA1UECgwLRW5kbWFpbCBPcmcxDDAKBgNVBAsMA01UQTEiMCAG +A1UEAwwZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxNTEmMCQGCSqGSIb3DQEJARYX +Y2ErY2EtcnNhMjAxNUBlc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQC5GqFWzssWr0+WuipwMXDThmx6RiZHQj/eSVc+CB4QJb8Gj8r99F5q +AX0xTVCIGENxZmVCnJCXDZXyFO/XXnfvfbVJPwK7gyD35vyazRPfYEEojjkHpqRA +mBUeRrYELvmrMtGL/lKB8dLhw8+/q0Cn8OTlooI3MIwQfaqofH52zF8aJNCMlPby +f0q+LzhnwAbmnlGtVdDLJnHP9K99WkGBFvsm7PA1AW7b+ekA19CJe8+IFoscj3cf +Xe9wBCh2xRvGI41Ja/C4IVbWfWhsviHj5uMdb6Xq3IPkJ7NvXxs9M6HV0/BzGhLr +2ZUAcVkWtORgOLIuf7fUxek/dORIOCmJAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU +sWnbXpvOGrQdsmr8WiKXtiQUbzIwgdoGA1UdIwSB0jCBz4AUsWnbXpvOGrQdsmr8 +WiKXtiQUbzKhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9y +bmlhMREwDwYDVQQHDAhCZXJrZWxleTEUMBIGA1UECgwLRW5kbWFpbCBPcmcxDDAK +BgNVBAsMA01UQTEiMCAGA1UEAwwZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxNTEm +MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAxNUBlc210cC5vcmeCCQCSkWfe4O8s +5DAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMTVAZXNtdHAu +b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMTVAZXNtdHAub3JnMA0GCSqGSIb3 +DQEBBQUAA4IBAQAKzgc5dwjFOgAE6KA799JMeQIjC9rAVTmCcQoMg+Le8jv+I7yb +EzTRKQoWPwF9n/tLqhLcO365J3vsDD/A2fXYqKGcHDovQN8nGhqgdAAZt4IO+UWG +vzLaDnIKTCw5IWPDH2Fu4k26eiYaFc6x9hpZBHDt6HIFTPyExqX04kpA5EJwh5qn +AiY6RzQJ4HuIyvuZ2Zu7DFKKk9VZMAtVQrS70rFJVYGkcKBJGfJPYZSv6ddiaGWX +ZwAmuJuyLNAsg30+szFzuVVJU/qjrRsCZwiezp7rn0cNbJXpbDCSwZRnrdnjuWHq +qXKYgTpigHAgmj7EH2+9tADssf5x2pEVifeP +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: f1:41:b3:3d:ba:bd:33:49 Signature Algorithm: sha1WithRSAEncryption Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org Modified: stable/9/contrib/sendmail/FAQ ============================================================================== --- stable/9/contrib/sendmail/FAQ Sat Jul 11 03:34:57 2015 (r285372) +++ stable/9/contrib/sendmail/FAQ Sat Jul 11 03:42:01 2015 (r285373) @@ -1,8 +1,4 @@ The FAQ is no longer maintained with the sendmail release. It is available at http://www.sendmail.org/faq/ . -A plain-text version of the questions only, with URLs referring to -the answers, is posted to comp.mail.sendmail on the 10th and 25th -of each month. - -$Revision: 8.24 $, Last updated $Date: 1999-02-07 03:21:03 $ +$Revision: 8.25 $, Last updated $Date: 2014-01-27 12:49:52 $ Modified: stable/9/contrib/sendmail/INSTALL ============================================================================== --- stable/9/contrib/sendmail/INSTALL Sat Jul 11 03:34:57 2015 (r285372) +++ stable/9/contrib/sendmail/INSTALL Sat Jul 11 03:42:01 2015 (r285373) @@ -28,8 +28,9 @@ sendmail/SECURITY for more installation /etc/mail/submit.cf. This can be done in the cf/cf by using "sh ./Build install-cf". - Please read sendmail/SECURITY before continuing; you have to create a - new user smmsp and a new group smmsp for the default installation. + Please read sendmail/SECURITY before continuing; you may have to create + a new user smmsp and a new group smmsp for the default installation + if you are updating from a really old version. Then install the sendmail binary built in step 3 by cd-ing back to sendmail/ and running "sh ./Build install". Modified: stable/9/contrib/sendmail/KNOWNBUGS ============================================================================== --- stable/9/contrib/sendmail/KNOWNBUGS Sat Jul 11 03:34:57 2015 (r285372) +++ stable/9/contrib/sendmail/KNOWNBUGS Sat Jul 11 03:42:01 2015 (r285373) @@ -62,9 +62,9 @@ This list is not guaranteed to be comple libmilter and hence the communication fails. This can be avoided by increasing the constant MILTER_CHUNK_SIZE in include/libmilter/mfdef.h and recompiling sendmail, libmilter, and - all (statically linked) milters (or by using an undocumented compile - time option: _FFR_MAXDATASIZE; you have to read the source code in - order to use this properly). + all (statically linked) milters (or by using undocumented compile + time options: _FFR_MAXDATASIZE/_FFR_MDS_NEGOTIATE; you have to + read the source code in order to use these properly). * Sender addresses whose domain part cause a temporary A record lookup failure but have a valid MX record will be temporarily rejected in @@ -102,6 +102,11 @@ Kresolve sequence dnsmx canon Header addresses that have the \231 character (and possibly others in the range \201 - \237) behave in odd and usually unexpected ways. +* AuthRealm for Cyrus SASL may not work as expected. The man page + and the actual usage for sasl_server_new() seem to differ. + Feedback for the "correct" usage is welcome, a patch to match + the description of the man page is in contrib/AuthRealm.p0. + * accept() problem on SVR4. Apparently, the sendmail daemon loop (doing accept()s on the network) @@ -252,7 +257,7 @@ Kresolve sequence dnsmx canon * Race condition for delivery to set-user-ID files - Sendmail will deliver to a fail if the file is owned by the DefaultUser + Sendmail will deliver to a file if the file is owned by the DefaultUser or has the set-user-ID bit set. Unfortunately, some systems clear that bit when a file is modified. Sendmail compensates by resetting the file mode back to it's original settings. Unfortunately, there's still a Modified: stable/9/contrib/sendmail/PGPKEYS ============================================================================== --- stable/9/contrib/sendmail/PGPKEYS Sat Jul 11 03:34:57 2015 (r285372) +++ stable/9/contrib/sendmail/PGPKEYS Sat Jul 11 03:42:01 2015 (r285373) @@ -141,6 +141,185 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0= =SR28 -----END PGP PUBLIC KEY BLOCK----- + +pub 2048R/0xAAF5B5DE05BDCC53 2015-01-02 +fingerprint: 30BC A747 05FA 4154 5573 1D7B AAF5 B5DE 05BD CC53 +uid Sendmail Signing Key/2015 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1 + +mQENBFSl4rQBCADRCzgFSJkzyoOHw9/9L/+G3mzA1fWR7TgCE0WxGX7PDzyLDaUS +a4XpCDtadjXyr7c5YPo1T7ybxUH39yvUgEHBiPQDssik+bbpOiHL7V0sUDAYfKSq +YC8/MG42Oj/zd+0WUhnI+RckFYPBNDQ+sZC6ErLDxCYDZMYhG4vhJOGqAKpglNTb +w4Fdx4LNmL3e4t3z4IEtnzAqeGVxIZm8MGGFhKkb8ufpgh8Jiz4Q6cOis0ZD9K6f +LvMPRJXSBy9jBtmS2oI2e9Q5LLhmzd1PVyA8jwAlK0QfJLmlRrgRUfHFKhkf+EuW +tTi592OYCZ9bw7QVSiGVQUK+7VACfM+FQR81ABEBAAG0MVNlbmRtYWlsIFNpZ25p +bmcgS2V5LzIwMTUgPHNlbmRtYWlsQFNlbmRtYWlsLk9SRz6JATgEEwECACIFAlSl +4rQCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEKr1td4FvcxTTPMH/29J +kNmt6EGNo/eLQySB8HTenfJjZaQxwPRhq22kWgr/7WP1BR2411bopyNk4IZ0rcDr +tnyeJj4UWKJljVuXyTDQPtU8uUlgiOT8QiHEbge7MOzxrn0cy6KIOgKq+vtuxa28 +McaxjENR7XVIDFkesQ7P/yLkcCjlE6jaD4r9OIKpqEVMPs1WUFff+rsgTo7mdcgR +QowQOgYqNil5awQ5Y2Gol71hZ6oRcpqMwSd6w4dEEx2U8rF8oqJuoxeUTgNCSv0n +iFtewLznocmxlrxe1mQAeLfRmUAG4LSL6p5wx1lRjJA3gtyWRjY0404jGxkATLG4 +AtK2OkHj8MbrWLP7PKyJARwEEAECAAYFAlSl5AQACgkQYd4R7OJ2OnPHXAf/Y6Rk +rROF45+SgbsEIiDXQBcBOoO1GKe0nFTc1jfAKUHAQ94fqcDxNeFRA9fNIA2d7XNI +0Lw6W7X3RcEkF58xytIe/Y+EXDmOt/BUbpch9KIz6J9pqBhPdyHvG+ZeyA3A+TGT +ZGnnnAxNFtCjt2IID9lzZSLuWhH8+DNC2Vp15NngDTa1VIk17n5iIvi7r3V5cdIE +MblKLGm+ZaiTeccVLjwMKIUSgrLP87+yF/aaZH2kotuI7f3tD1ycN0sVZJxcFS+c +GFw7uvOarDBSm0Q/FgfhDUOJLy4w5SqVmgPEIAeogz94q0JXxSSr1XWQBD8X9XwF +f3+dPXmgMHXLGRWclYkBHAQQAQIABgUCVKXkPAAKCRA9aLJdUgfK08cnB/96BV+v +xyBx35TPg8eI/WIskdQAIpCQsm6FoO1ejbMzfWn9bImCewOp1UMlowdfQC52Hdp8 +EXnuwCpJ3rtnZctRld5dNM/clbZ+r3lr78wX7hqPUajlvxe+TMpyZbJirLn1f5Ba +yoysE4oICfzJivPfixZd7oFVr9EkftbatYenl0rgf/0lJTKRDIqNGezeeyfxaKdX +qd545wqis7PrrXDOrEq815aosG09KQBhIoPgti2us1R95nSm9z6dVCY/nSDOxL+a +Vyq/XD5KSUqbZVocY+fbR3dNX5haTvawuG0GPvl+YvYb2lW4hhi7Q4aUL7Dd4c9c +vk5+WAvfJwHtbxrgiQEcBBABAgAGBQJUpeREAAoJEI5a6fvO7vQ7OWUH/2NNxhlI +JEtvD+Nj2oPGgVQJrlFI1pbzyMCtD+6iy8Lfnp2DK+qKPMjBw96LUqcXC32VFPQr +17iyZDv26MSb/acmdIfTPpPTwJ6zEmMI8mXradeuoiWxeVHSg7n+D3u0xtikmb9Y +uRKv0yx43fcL70bqV5DzyXQte0chfRnOiwMrImWdgDekkmxE9udbtgK24rifNVGa +TBB6eHJAsFVu5Y38hsZLe10bCKyUCqT6Qywfy3RCMpXYeo6fXOk0fKatG2oi3CZp +LI+AnjmAJ0t2oMkrwUxogkK3LkShJT/aJYIR24eZm0GdzwRHZxXKClGFvdJslIea +TKHSXNK41eEIfreJARwEEAECAAYFAlSl5EgACgkQOaTHfal4hLAXfwf+M0YmlHd4 +1sfvckYhOYf99n1BGnfQx5RJn+X+EBjGyOfPKMBPQuZIlwAI20T+cFnR3WmgrmlO +IBG8qVcSDoValzNPcr0V3WGDrT75fYhf5iYj2ZsZDBUqE1VF3dAVUw40x2c1n+98 +7lbq3NtolSPYk07h5rhEhmkjdNcixv/exVCTGVwaT4X9ZHY8heETmF5tsCtPavpr +i/DjcDQQQ0sQ8um1eX41j2bhrN4MERUC5oadvSULaA2QUoWgCrzVG8zx715Au77N +jLtfA31hJI0GP/dpSREaYlqA0nwVDR5tz1TyTNwPN1ylxjQmjKXtJwx3jUtlT9Zh +qxRf+ngYHpWArokBHAQQAQIABgUCVKXkTAAKCRBgTfvyhUEKvl11B/9aYJBEEQZp +JWAT6HPmQK//i2x4y1euQfaHsjqJALvvPrgiTp/ZE3o6dKHhs+SbawsB57RtootN +maQr7x2drvBojWhJJdaouAh345qOfZYb0bD9klkr6W+Mjl5T0xWIKFEyIZn0Tcbr +8ekHgSIx2trL8LduSJou2bdPMh46PORzEpuQQ4IAyV0uRyBdNFOPwTy2OdXs51fr +M7lp1hJp84+y2a6z3vz3VCs2A9LzlnXKZ6bXljpd5dQfrmrSNXltPKA3jVLkWi8+ +rh9f1rAGsj1e6N1aVF2uJ1Y3u+U0XQ/dwa1vDF3y4KVObxYM9eNGbF4J8lGkUy2a +gZ1s1X8QzEDUiJwEEAECAAYFAlSl5FAACgkQEolum6d/JCmUSQP+KEz6xSvPSbFP +Hip4JiX1Wbvd+t3TyL0u9Fv/POwUrFIHVpTkCwOz6jsBH3TdGGiYOP5F8k/US2jU +3WB0J1mK5Rn3GwLhUGNTEeuaJZCuKE+j3qwMFmDqC/2IxEvlWtrIbTqkgf7cRv/O +O7VNv+EL0axtsrOcwZlUWe6Lc4571oaInAQQAQIABgUCVKXkUwAKCRDYqvDK9rMH +KX7xBACUFTBRCmboY/GRTHMZW1DGfcO2vMxwnYKqWomuzi/YonDCWtoTpeMDaAhY +NnIchC1mlYteIE94/+ZsoYsZeaR3fe7CN6h/deBu4tW/dQ+TW1ZPF6EuVhoviKgz +rd3rb+gcS0f0PgSPyg5LGtoMGMD9/gx1NJOTFec83jmBI95Gb4icBBABAgAGBQJU +peRXAAoJEJdDARhwk7hBAUED/0oyeD2Z4wMQ6IQEprOAWbR+vIRzaThemmCGobRw +UlM44nUXqKSM1+naLEVz/JzBuKWG00zTz6Su3NesWoFzDDUGYcIJggbOm39Pc+V8 +eXV86An64/v3P6gypJc+q9P+FFGGO884wFmYN634Mi4SDBVFUzffcghueAFcxtzt +0mH5iJwEEAECAAYFAlSl5FoACgkQHnuzyK+VliVGdwP/fmdK9MdWIzPD/6eYm6JZ +zbksaGWiqpwgp9IEr/OhSmGkXuwUsP35PFJ8FsJbEV5x/y6pP3UNp6EFRN/116ue +jp5vVM7nnj2K3V8f85J4dXCRbv+kek+Ufo1Qzm5kgvRuBxX1sXpxFX6yBM0Y6WuV +gszdbTVNlS04q6bnPFE9L4uInAQQAQIABgUCVKXkXgAKCRBwoCRNHvmSUZ/7A/9W +yQJrrdrs2SuYtoxov/pL/TVMejbnxsF8Y0dRtM/KiquP57PMQSmLqy4fTRzAMHBv +XK1aKfewTVfGKLcHIzfMfv2XcPpWfwcyMeZKtcSr25lWl9GJZP221rCok76XYwqk +BPPp0pjSwdy0Qq4sd3N3ESZmqAMWJ7ouMmlQ7VWReYicBBABAgAGBQJUpeRhAAoJ +EMjV7SmV9hdxLv0EALX3yjI2KDNG1mo5ctCSYlIlhXHQ6csHuUK9lzj9R1gVEzDU +0dEZH0+a5UXh5xf8nyTDLytUe8PxTtPit3AOP6TvTJlANULh/3MKS6317RwUe2e0 +OitWbhQAOYfpYAkSdXZACzPacxrefkxmSM3Pq+SYoumZTI2N6AvVu8MeCS0GiJwE +EAECAAYFAlSl5GQACgkQIYPhsTlvB4mWJgP/XAlvlBityADJkdN+3mp/OtdYzw04 ++dBdNtmLqWUiMZg6rPPHUQi7dfBKi95FFe2U8hxSRk8oLzSzmh/M/CP72mxKh4pi +PbmEkmKHYlNdyfCCNqXdjkBXFAKXAes/4DaBlZwvLjPtrupEaW2eYdU8cSrdeGuv +1PMLRPxRr3nPCb+InAQQAQIABgUCVKXkaAAKCRCJaWK4Z4wKA3ZVA/4iYD+xrYv0 +8I+0GZJRdEL5f7T97a7Vtf5xSxUhHDww4xC9gs8LzEGWZXoNaZEVl4j+63EnCIbY +o4g+c4m81D5NWFqeJWhWpcyvejo9hfGM3ZK/XbiF+ZTzznU5YJclGaZ7t8TY8gcx +GSWxUzxBJQcSEzAKKi286ielMAXocNx10oicBBABAgAGBQJUpeRrAAoJEDgi20fM +N08tDkwD/2F5j5irsDw+MQyLKpfPv3GRJ5J3ebOPpLQkQ5T34+qeIw4LkcXW9OJA +ohW47JLb7R8zwAlUoqmmNXtxTM0r0FlTYGPOVEnSEkMqqa3KR68B3jWAGXXdqig9 +yBxYRleawQ4ltnegBn8q7gC4MwnIAZxzK+Y8cM0Rk/FjC9+NhwrviJwEEAECAAYF +AlSl5G8ACgkQnBy94uNcVjUfvgQAlQijnoE3de1CanB0JqIN+h+XOLOpalFti+B7 +Swc2ZlnlQ9mofYPK5UHlbsiC7/TilD6xm4YEFKim9sOIMi8FNka8+EH+/d1DmS4M +qVPDssxTG6VOzn7tYOuC9qIw15IpfbHW2bk/YIImwP9nViKCMLIGw+ZgK+uiRQx9 +fT8O1NqInAQQAQIABgUCVKXkcgAKCRBvUpPYo5umVYKeA/9n63K1nF3DNY3Hckvz +tN8OrPmyCIOh+7t4sc5NHhTK0+BQTv+cgG6ig7K2cdI6VBAovs/c/u7+RrcMhp7l +45AVnycfKcNaMHKFyMHDk9FZgpRG/bv1zwDxdh+scUc3IekqkSiQ2wTjDQ5Q/BMK +L5zfOSnTOoltWjpVgsjdM75Ol4icBBABAgAGBQJUpeR2AAoJEO9YlmTUMuGd8R0D +/3mhriMu/cp3DXHnlDykqLJI1q5K4xCHOWwFYZ8DxW116AVjluJYYW1HmWcJrjK3 +cwuN3FUcsIjafanIJWCsdeZaPAyFEfUBEW0YXIIpBXRw2N7jNtrd5X6Zjptd+zW+ +4dUzvT1pqVtdPHjova3fcGLSmcdZYbddotaGi7xi7kXviJwEEAECAAYFAlSl5HoA +CgkQwZwdJRLTRh0iwwP/Y/pwp9ttAMuQUz6oH71BTkUrzu9LiI7vhrYxEquFdzCO +dE4jBNB3LGfwzjhJRtjmQ/gVhjXWWrDYnOXt3gNxb9KzmTHmSDu65cBxX54Un0pZ ++MXjjWOT2l8+GA1lXeICIoZjJL88/zEZAiaH67ch2LEix1fOaJmXJzUSmP1pR3KI +nAQQAQIABgUCVKXkfgAKCRDAKcpAFvTM6XVwA/9Eb+Dwn2lmEFFo64gj8ocpWzP8 +/sD86PP5KkZ+b/HQnGB3lsQTwsGytDvJfutLDa05sS/HWZ9wXPltX/G3omp/A1G5 +qEKzVSe0vEWedpf9wn82Ll6hzaiS5qX7r0+FpyUjY8arNrze5S4Q6Q2kjl8YduXl +wG877igRHkGpAtApxYhGBBARAgAGBQJUpeSHAAoJEBj1A4AkwngCRCMAnjHfd5db +KK6DJxrWVnEbyXs/QJGKAJsErKkiUX55B8k/P3cyzyXIaOujBYicBBABAgAGBQJU +peSOAAoJEHxLZ22gDhVjCDQD/j7DE5wyhpjHrtf0hsQcaQoVHWZb2JTLZUMRAQyj +zKMTSs0GslamlxLZmyV1HqkB+41zuJeBQtRV4gjqa5DQmWDRC2mHl7o9A40v4SDa +O1jmfU5hfJSMecucPyEcfaAG4BIMvBo6TL484uHBi45SN4Ik3f2wc6D1XOluD1vB +gIwpiJwEEAECAAYFAlSl5JMACgkQ1uCh/k++Kt2s6gP/RNcMKtx4u61vz+Aji/Fa +H9q03JxQaRgmN1q2AvZQ/NTWTXU7Y5GnH4kW/8rOoUQiR+agJsvTt4ciM+y33pZ/ +ZZLkAuo0uKelEHhdQhtRbSktKBHSgDWbiqaJJIxazeLpxcSgaoM6RW/7aIFdMtEl +ALAzTACYlTN/nKWWICn8GnGIRgQQEQIABgUCVKXkmAAKCRAh+cW892qb9aWOAKCg +aznvUX8PIvKPzoHld39xWlJ+FgCg76wrEc1h9IiIgUoqH5NWVCxcHneInAQQAQIA +BgUCVKXkngAKCRC92o/WP+p9/ancA/0Z4JHZT7NRBMr47zQvSwE4eLpSE5QDGXi7 +RNmOUgZxrxsFWRZLJCVupXDBQVZEhOBRZYqXPw1eDglOU952oj5OjaHsYnSEu7jz +VUwlp2BxZQ3mnepdUcQz1A3k2cPZ0I6KFP9hP88GU+77nubB7IqRH/Q3QKMgO0eW +yd5kYugyYYkBHAQQAQIABgUCVKXkpwAKCRC9J20ub8+ohR46CADMEvAns+L+BkVN +d9INsiR1rONrNRPT6w4dnBeTLaykkuMjc6+7s+UuXm6AMAelI28pG+fJyt/lZAGx +QLS9zFgREge0lVbOZVeAYeC1YyFsrJE4Lr2quq3fajj23tnsHmCv16znMHrh/E1m +Udm4145NprijrZn+PsjuVWYV+pxiLpLM0YBdGNwCEMi/KCQ1fcaiAZZWSqLmHIe0 +ubWDdqq8/5JRQ22SEnqP2FT/lfOmKTxMNmE0uEr4+C4fG2nd38BvzpHu9eN/4Nwx +IwzK5DhbAj+I57+VDncgkNGe1q4QY/5LaZQh/nHIcmX1ln23f9Lxkr6EYYZ1ptq+ +A8buvD+XiQEcBBABAgAGBQJUp+zrAAoJEBCQryClqlvm6AgIAKAR8HY4G9AD2jDb +ouS4Al4QICagwQ0Y7Rc2/fHyPQEAP714EimakPFVFDbSD6SW569Qtdxr+ggH4wFI +bzd21pCgIUC6nVoDotIjplMdYkNfq8AODpxn3HTBnNQ7e609xnWxFo/+httKoWok +fEP9qZk4MJq7lE75iX+wohjLwoF6v0tCB8CrBFJcfKrDvXQSGvKiaEp4g0sEfyXv +gL6X0xKMflupofdnFLJliV0WqGhBOGUghPdLsA02E3e1utj6WABmudMytRxWB8is +SWGaywaEKLSdCgi+XlQVypKeWNMbZZZcftVZ91r4iNTAkw4cv5Wea+YnngfurGCq +J/jUq7aJAiIEEgEKAAwFAlSn7r4FgweGH4AACgkQZhs61tgqu9C9Aw/+JMTXzwni +NPwBxkbcNWbnWODVEElmDloHNpr3z+ryF1XNgbiOY8dn7uwRnPoeCDhIDwvNkK+x +h4xmjH0970v1ltbzcZv0wnK6UeHQssqN9NGsXM9rbodYRIam4yxbwd1ddOC9QZFM +ToRVWiqCzGOVYL50a24OYKClGjm4ncRznXJrNwYMEjxQ3j5FOkXIn0096z3szWCY +6yDpPzOsl2TPwdjMKZWoMEDh/SvY3AxAXo1XqDCj2/+C8dDwO7kn+QAl3fUGmkI6 +dUHCAJm/WtSyvINdphzhZ1ZdkPhqDUKcR0JTX03QJ6bnu5vmmOncWm2NA7rP74fq +KE9XzT808xP0GBwR1co7Eq+/751j2TA33JSlt/hIgi5aEWc4laCingJ02yaW8tUS +DCoVNITaXcF/B47hjBgovQk8TOTsQ0nkSYvOoh05OYBmzl17G57QuPx1stRJ29QA +VLGem1v1mXAuNdHH0kNE+/Rv0A2vGqauLx9ba84RfbXMM4SJw8CjhX6OxhAM8xoU +tO6T56XZS8qLtWLkNQNZNdNlAo6tYk/cTrjdX1M63nYjoVbuc0nic6Wp+dQk/DEb +wsiIpFoisvMK6EH49v70/c9Gtg6rk5z2yBHMZsjo2Y0TheTKwKIUEz0MuTncH8jD +yB/NtQkrbiBdEqRJUoKKUtS0B4cUYTUyd+SJAhwEEAEKAAYFAlSn8agACgkQ8Ar2 +6sJF0gs2yA//cgc+g1wPRFzJeQGv5UFR3TCAMtS+/bzY3UU/eG2Jmbv2qwPbn+kx +RH5dYlZ72VHXEggBaEweCBrBWsweX5dGEMNDLNlI9ArAjjhBAZFFUQKj55EzIZpp +YTbvgxOD2ENKU2HfeQYCGFYZr3L2DXQ1k0U7VnaElBQV3o88CMi7bIsQq2aWk+c6 +Cy15UVr0niVLm95EUZM4yYm2gOGJXUeaGIExSBtiwuzvAiDEGaqfPGAi1ePkNmLJ +3UzYfgiQumSh1kDVlQkCc8UQiF6ckEma618cmmaHs5vZvHsTX5O2/qPkLpXunA/7 +5yM/Jde8a5VbNGWyZ4rmstlWR5rPd7r3uP85miHn7Arait3aGo8RQeAHzOdTvMqS +n3oCotQlOvBhOo7qA8oYQVlU0+77gOfZZeEXDZG13lU95ptFhdsGstIQH67jPQ6z +TpVnd28ip92ysrwvxPhOzO74yKcYoKtzwLctcvptlKTkrFMHP3wJwqbaSfJGK4JE +rjT8WnnWyHY465nTDN9AKkoH4WQNozniWX8OkF3CpPj7ow8roFXlPOxXH4QsaQu3 +Kk31APn/A925d4xyYuWYHZ7A/FzsHafFHPMoG3iwZyuFhfl1UXVvEd8w9mEcxXoh +2iCy87TdpesG0GDzSmWwEYEPkg20BD2+vdc0EekALDjAGM+lfBxN67KIRgQQEQIA +BgUCVKgM0gAKCRAJp6JK0eWCB94UAJ98O6S6r1hFnCLrbU3GeqrA4DCtBQCfcza/ +WoVLc3/+bOf1jzjJ/eJ20IyJAiIEEwEKAAwFAlSoCRMFgweGH4AACgkQhS2G+DXA +JIrWURAAvgl1LkqB9pRPViK1U+xa3b5zt0O/fLbov59aLhA4uPJ10BgaKptflLim +aE2EsS4Mnk0DQgGEBjlywJ5Ft3aMk3vbRz7lDE3zQ3oWa7+N4fcG7WWsAxmh0NtX +Ak7orN6rQcyGgWgpF7wOau79i4VO7oLHKeS7QNs7X59CW+k64TAJabxi74PRoVMz +843qWPjsuFIYM7n/nF0vdECwhSE8zUgcYG2n5CdA0Lq7XRE+II11VOT2XEXFMyR/ +Qh2m7l+jy12MEzHQfGC1HYBo/Zi/MRIN53Rd2LLJWQdMxz/BDiuSxZhKVeCRe7gT +Mc2k3VrmfViBoaUE0zqMbx0j29XUbNQNU3afE8MOBkmyd6AQjoswBEsgU9uyCJYD +Jq3V1stwSVBm9G7X/l8GFlPawLg/uM9gTYb2JYUYPlphTAwVcL469rKQNMhPj2ww +zT7NzjwFb9XrmyiIrqH5z2ieG+LRjajOPVPwBsqZ3gOA+z9QkU1lRYEJOTlEYCkv +8oA6ZeFm31S4JoeogbCDaMiqDszkFtYGBUgGEbnHoCgXi7aINSb17VZ8LTzpD4V9 +vGdFVuE3vJf2POMERP+buLV8OiG38cBJXb+JVSC+pkpm+32nY0UR5ccDPwAC3cGq +SbI6ftKlQeaYp3UEncFUaB8NNZings3jzRexPjzUzo0vhRkkIs2InAQQAQIABgUC +VKg5iQAKCRBfHshviAyeVbEVBACL9Vve0dF0UqO+DN4PzrTOx2JzRw7ujhcrZ6I/ +TCXjANGLWUheylRWhvxMojvbhZEg2835+9l6tpD7BVnrfkBE+LYIKFTusye+WYre +dAaHFpuN6XfmsXmhXaSodhH9gKS+oftYX61qUmiE7L98nvINNBMnFVkptCQVDl8o +GWiMRYhGBBMRAgAGBQJUqBAmAAoJEMSxB5iFeWojCtoAoLa2/SUyfC5EiKdvEbap +49v6XPyxAJ9mPvhe75aTOU7uWoa+c0wn6fXIcrkBDQRUpeK0AQgA7ctg3cJD4eTw +j4sQ94AtSYjwT+Yp7r2s6h4cHUge6AMZy9ixtyg87JnviRFob2zeo2JFDAwtl7Zs +GHo+py/mJwfQKmUsXUmQqgHJFXDiiux+4+dYOXZyVYKP5bTV0JVlKjRjSWNnh7Bv +yZNUZlrLz5ZKF1NAYKJAw4fx3TFbC4K3hvDwHQW3croPQYq0wNq6as956LHYjUOB +Q5K0uy4TXY2EcIyAy253UX9MAFgacuP1jf3ITEVZpcebzl+gcaB54gXqOfmgQQP5 +PmQDyb96ZxFsKa5UfsS3Kh0PeERa5TDlgiw55O55pUSGKKfYfOXvqpJ/ZKYl+ado +wgsmbq09UwARAQABiQEfBBgBAgAJBQJUpeK0AhsMAAoJEKr1td4FvcxTNO0IAJ2b +V48mulcdCS8G3t8qRHlEXGbxgYBQRa500M9fdgRyIWBxubP7r6/nLFDGiIpdUVmT +g9F3r1JsyK6Q7+VUp9XLirj/gT1kwxXT/UHHIQO8ObtPbfFtqISaBjaklTOUPCud ++nOpzRIfct6CZM0xAVIoqm4kaRFaWefxRiyeosDQ7tCD4lDRwxNJE2deE1WmOeN1 +YCJHa8QaewJXtUvqMq6pRmTlzSn+5/w3gV3XVF+CHjGD/COeSm7CGazLmlypN4n8 +ib9eRg0K2rAqKfUbn+aFwmqSBhBcw/UhOoXnteNQvd9KNdKiHERJEI3qZ2rLAlYf +uYT6oSAR9rPSpsZpyTI= +=Jib4 +-----END PGP PUBLIC KEY BLOCK----- + + Type Bits KeyID Created Expires Algorithm Use pub 2048 E2763A73 2014-01-02 ------- RSA Sign & Encrypt fingerprint: 49F6 A8BE 8473 3949 5191 6F3B 61DE 11EC E276 3A73 @@ -2613,4 +2792,3 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.46 $, Last updated $Date: 2014-01-18 00:20:24 $ Modified: stable/9/contrib/sendmail/README ============================================================================== --- stable/9/contrib/sendmail/README Sat Jul 11 03:34:57 2015 (r285372) +++ stable/9/contrib/sendmail/README Sat Jul 11 03:42:01 2015 (r285373) @@ -211,29 +211,11 @@ There are other files you should read. +--------------+ There are several related RFCs that you may wish to read -- they are -available via anonymous FTP to several sites. For a list of the -primary repositories see: - - http://www.isi.edu/in-notes/rfc-retrieval.txt - -They are also online at: +available from several sites, see + http://www.rfc-editor.org/ http://www.ietf.org/ -They can also be retrieved via electronic mail by sending -email to one of: - - mail-server@nisc.sri.com - Put "send rfcNNN" in message body - nis-info@nis.nsf.net - Put "send RFCnnn.TXT-1" in message body - sendrfc@jvnc.net - Put "RFCnnn" as Subject: line - -For further instructions see: - - http://www.isi.edu/in-notes/rfc-editor/rfc-info - Important RFCs for electronic mail are: RFC821 SMTP protocol Modified: stable/9/contrib/sendmail/RELEASE_NOTES ============================================================================== --- stable/9/contrib/sendmail/RELEASE_NOTES Sat Jul 11 03:34:57 2015 (r285372) +++ stable/9/contrib/sendmail/RELEASE_NOTES Sat Jul 11 03:42:01 2015 (r285373) @@ -5,6 +5,165 @@ This listing shows the version of the se of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.15.2/8.15.2 2015/07/03 + If FEATURE(`nopercenthack') is used then some bogus input triggered + a recursion which was caught and logged as + SYSERR: rewrite: excessive recursion (max 50) ... + Fix based on patch from Ondrej Holas. + DHParameters now by default uses an included 2048 bit prime. + The value 'none' previously caused a log entry claiming + there was an error "cannot read or set DH parameters". + Also note that this option applies to the server side only. + The U= mailer field didn't accept group names containing hyphens, + underbars, or periods. Based on patch from David Gwynne + of the University of Queensland. + CONFIG: Allow connections from IPv6:0:0:0:0:0:0:0:1 to relay again. + Patch from Lars-Johan Liman of Netnod Internet Exchange. + CONFIG: New option UseCompressedIPv6Addresses to select between + compressed and uncompressed IPv6 addresses. The default + value depends on the compile-time option IPV6_FULL: + For 1 the default is False, for 0 it is True, thus + preserving the current behaviour. Based on patch from + John Beck of Oracle. + CONFIG: Account for IPv6 localhost addresses in + FEATURE(`block_bad_helo'). Suggested by Andrey Chernov + from FreeBSD and Robert Scheck from the Fedora Project. + CONFIG: Account for IPv6 localhost addresses in check_mail ruleset. + LIBMILTER: Deal with more invalid protocol data to avoid potential + crashes. Problem noted by Dimitri Kirchner. + LIBMILTER: Allow a milter to specify an empty macro list ("", not + NULL) in smfi_setsymlist() so no macro is sent for the + selected stage. + MAKEMAP: A change to check TrustedUser in fewer cases which was + made in 2013 caused a potential regression when makemap + was run as root (which should not be done anyway). + Note: sendmail often contains options "For Future Releases" + (prefix _FFR_) which might be enabled in a subsequent + version or might simply be removed as they turned out not + to be really useful. These features are usually not + documented but if they are, then the required (FFR) + options are listed in + - doc/op/op.* for rulesets and macros, + - cf/README for mc/cf options. + +8.15.1/8.15.1 2014/12/06 + SECURITY: Properly set the close-on-exec flag for file descriptors + (except stdin, stdout, and stderr) before executing mailers. + If header rewriting fails due to a temporary map lookup failure, + queue the mail for later retry instead of sending it + without rewriting the header. Note: this is done + while the mail is being sent and hence the transaction + is aborted, which only works for SMTP/LMTP mailers + hence the handling of temporary map failures is + suppressed for other mailers. SMTP/LMTP servers may + complain about aborted transactions when this problem + occurs. + See also "DNS Lookups" in sendmail/TUNING. + Incompatible Change: Use uncompressed IPv6 addresses by default, + i.e., they will not contain "::". For example, + instead of ::1 it will be 0:0:0:0:0:0:0:1. This + permits a zero subnet to have a more specific match, + such as different map entries for IPv6:0:0 vs IPv6:0. + This change requires that configuration data + (including maps, files, classes, custom ruleset, + etc) must use the same format, so make certain such + configuration data is updated before using 8.15. + As a very simple check search for patterns like + 'IPv6:[0-9a-fA-F:]*::' and 'IPv6::'. If necessary, + the prior format can be retained by compiling with: + APPENDDEF(`conf_sendmail_ENVDEF', `-DIPV6_FULL=0') + in your devtools/Site/site.config.m4 file. + If debugging is turned on (-d0.14) also print the OpenSSL + versions, both build time and run time + (provided STARTTLS is compiled in). + If a connection to the MTA is dropped by the client before its + hostname can be validated, treat it as "may be forged", + so that the unvalidated hostname is not passed to a + milter in xxfi_connect(). + Add a timeout for communication with socket map servers + which can be specified using the -d option. + Add a compile time option HESIOD_ALLOW_NUMERIC_LOGIN to allow + numeric logins even if HESIOD is enabled. + The new option CertFingerprintAlgorithm specifies the finger- + print algorithm (digest) to use for the presented cert. + If the option is not set, md5 is used and the macro + {cert_md5} contains the cert fingerprint. + However, if the option is set, the specified algorithm + (e.g., sha1) is used and the macro {cert_fp} contains + the cert fingerprint. + That is, as long as the option is not set, the behaviour + does not change, but otherwise, {cert_md5} is superseded + by {cert_fp} even if you set CertFingerprintAlgorithm + to md5. + The options ServerSSLOptions and ClientSSLOptions can be used + to set SSL options for the server and client side + respectively. See SSL_CTX_set_options(3) for a list. + Note: this change turns on SSL_OP_NO_SSLv2 and + SSL_OP_NO_TICKET for the client. See doc/op/op.me + for details. + The option CipherList sets the list of ciphers for STARTTLS. + See ciphers(1) for possible values. + Do not log "STARTTLS: internal error: tls_verify_cb: ssl == NULL" + if a CRLFfile is in use (and LogLevel is 14 or higher.) + Store a more specific TLS protocol version in ${tls_version} + instead of a generic one, e.g., TLSv1 instead of + TLSv1/SSLv3. + Properly set {client_port} value on little endian machines. + Patch from Kelsey Cummings of Sonic.net. + Per RFC 3848, indicate in the Received: header whether SSL or + SMTP AUTH was negotiated by setting the protocol clause + to ESMTPS, ESMTPA, or ESMTPSA instead of ESMTP. + If the 'C' flag is listed as TLSSrvOptions the requirement for the + TLS server to have a cert is removed. This only works + under very specific circumstances and should only be used + if the consequences are understood, e.g., clients + may not work with a server using this. + The options ClientCertFile, ClientKeyFile, ServerCertFile, and + ServerKeyFile can take a second file name, which must be + separated from the first with a comma (note: do not use + any spaces) to set up a second cert/key pair. This can + be used to have certs of different types, e.g., RSA + and DSA. + A new map type "arpa" is available to reverse an IP (IPv4 or IPv6) + address. It returns the string for the PTR lookup, but + without trailing {ip6,in-addr}.arpa. + New operation mode 'C' just checks the configuration file, e.g., + sendmail -C new.cf -bC + will perform a basic syntax/consistency check of new.cf. + The mailer flag 'I' is deprecated and will be removed in a + future version. + Allow local (not just TCP) socket connections to the server, e.g., + O DaemonPortOptions=Family=local, Addr=/var/mta/server.sock + can be used. + If the new option MaxQueueAge is set to a value greater than zero, + entries in the queue will be retried during a queue run + only if the individual retry time has been reached which + is doubled for each attempt. The maximum retry time is + limited by the specified value. + New DontBlameSendmail option GroupReadableDefaultAuthInfoFile + to relax requirement for DefaultAuthInfo file. + Reset timeout after receiving a message to appropriate value if + STARTTLS is in use. Based on patch by Kelsey Cummings + of Sonic.net. + Report correct error messages from the LDAP library for a range of + small negative return values covering those used by OpenLDAP. + Fix compilation with Berkeley DB 5.0 and 6.0. Patch from + Allan E Johannesen of Worcester Polytechnic Institute. + CONFIG: FEATURE(`nopercenthack') takes one parameter: reject or + nospecial which describes whether to disallow "%" in the + local part of an address. + DEVTOOLS: Fix regression in auto-detection of libraries when only + shared libraries are available. Problem reported by + Bryan Costales. + LIBMILTER: Mark communication socket as close-on-exec in case + a user's filter starts other applications. + Based on patch from Paul Howarth. + Portability: + SunOS 5.12 has changed the API for sigwait(2) to conform + with XPG7. Based on patch from Roger Faulkner of Oracle. + Deleted Files: + libsm/path.c + 8.14.9/8.14.9 2014/05/21 SECURITY: Properly set the close-on-exec flag for file descriptors (except stdin, stdout, and stderr) before executing mailers. @@ -681,7 +840,7 @@ summary of the changes in that release. LIBMILTER: The "hostname" argument of the xxfi_connect() callback previously was the equivalent of {client_ptr}. However, this did not match the documentation of the function, hence - it has been changed to {client_name}. See doc/op/op.* + it has been changed to {client_name}. See doc/op/op.me about these macros. 8.13.7/8.13.7 2006/06/14 @@ -3509,11 +3668,11 @@ summary of the changes in that release. Add new STARTTLS related options CACERTPath, CACERTFile, ClientCertFile, ClientKeyFile, DHParameters, RandFile, ServerCertFile, and ServerKeyFile. These are documented in - cf/README and doc/op/op.*. + cf/README and doc/op/op.me. New STARTTLS related macros: ${cert_issuer}, ${cert_subject}, ${tls_version}, ${cipher}, ${cipher_bits}, ${verify}, ${server_name}, and ${server_addr}. These are documented - in cf/README and doc/op/op.*. + in cf/README and doc/op/op.me. Add support for the Entropy Gathering Daemon (EGD) for better random data. New DontBlameSendmail option InsufficientEntropy for systems which Modified: stable/9/contrib/sendmail/cf/README ============================================================================== --- stable/9/contrib/sendmail/cf/README Sat Jul 11 03:34:57 2015 (r285372) +++ stable/9/contrib/sendmail/cf/README Sat Jul 11 03:42:01 2015 (r285373) @@ -158,6 +158,26 @@ FEATURE(`local_procmail'). ******************************************************************* +Note: +Some rulesets, features, and options are only useful if the sendmail +binary has been compiled with the appropriate options, e.g., the +ruleset tls_server is only invoked if sendmail has been compiled +with STARTTLS. This is usually obvious from the context and hence +not further specified here. +There are also so called "For Future Releases" (FFR) compile time +options which might be included in a subsequent version or might +simply be removed as they turned out not to be really useful. +These are generally not documented but if they are, then the required +compile time options are listed in doc/op/op.* for rulesets and +macros, and for mc/cf specific options they are usually listed here. +In addition to compile time options for the sendmail binary, there +can also be FFRs for mc/cf which in general can be enabled when the +configuration file is generated by defining them at the top of your +.mc file: + +define(`_FFR_NAME_HERE', 1) + + +----------------------------+ | A BRIEF INTRODUCTION TO M4 | +----------------------------+ @@ -397,6 +417,10 @@ SMTP_MAILER_CHARSET [undefined] If defin that ARRIVE from an address that resolves to one of the SMTP mailers and which are converted to MIME will be labeled with this character set. +RELAY_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data + that ARRIVE from an address that resolves to the + relay mailers and which are converted to MIME will + be labeled with this character set. SMTP_MAILER_LL [990] The maximum line length for SMTP mailers (except the relay mailer). RELAY_MAILER_LL [2040] The maximum line length for the relay mailer. @@ -743,6 +767,16 @@ nouucp Don't route UUCP addresses. Thi 2. don't remove "!" from OperatorChars if `reject' is given as parameter. +nopercenthack Don't treat % as routing character. This feature takes one + parameter: + `reject': reject addresses which have % in the local + part unless it originates from a system + that is allowed to relay. + `nospecial': don't do anything special with %. + Warnings: 1. See the notice in the anti-spam section. + 2. Don't remove % from OperatorChars if `reject' is + given as parameter. + nocanonify Don't pass addresses to $[ ... $] for canonification by default, i.e., host/domain names are considered canonical, except for unqualified names, which must not be used in this @@ -1441,7 +1475,7 @@ msp Defines config file for Message Sub by default. If you have a machine with IPv6 only, change it to - FEATURE(`msp', `[IPv6:::1]') + FEATURE(`msp', `[IPv6:0:0:0:0:0:0:0:1]') If you want to continue using '[localhost]', (the behavior up to 8.12.6), use @@ -1499,8 +1533,12 @@ block_bad_helo Reject messages from SMTP - connections from IP addresses in class $={R}. Currently access_db lookups can not be used to (selectively) disable this test, moreover, + FEATURE(`delay_checks') - is required. + + is required. Note, the block_bad_helo feature automatically + adds the IPv6 and IPv4 localhost IP addresses to $={w} (local + host names) and $={R} (relay permitted). require_rdns Reject mail from connecting SMTP clients without proper rDNS (reverse DNS), functional gethostbyaddr() resolution. @@ -2442,17 +2480,19 @@ should only be used for sites which have that they provide a gateway for. Use this FEATURE with caution as it can allow spammers to relay through your server if not setup properly. -NOTICE: It is possible to relay mail through a system which the anti-relay -rules do not prevent: the case of a system that does use FEATURE(`nouucp', -`nospecial') (system A) and relays local messages to a mail hub (e.g., via -LOCAL_RELAY or LUSER_RELAY) (system B). If system B doesn't use -FEATURE(`nouucp') at all, addresses of the form - would be relayed to . -System A doesn't recognize `!' as an address separator and therefore -forwards it to the mail hub which in turns relays it because it came from -a trusted local host. So if a mailserver allows UUCP (bang-format) -addresses, all systems from which it allows relaying should do the same -or reject those addresses. +NOTICE: It is possible to relay mail through a system which the +anti-relay rules do not prevent: the case of a system that does use +FEATURE(`nouucp', `nospecial') / FEATURE(`nopercenthack', `nospecial') +(system A) and relays local messages to a mail hub (e.g., via +LOCAL_RELAY or LUSER_RELAY) (system B). If system B doesn't use the +same feature (nouucp / nopercenthack) at all, addresses of the form + / +would be relayed to . +System A doesn't recognize `!' / `%' as an address separator and +therefore forwards it to the mail hub which in turns relays it +because it came from a trusted local host. So if a mailserver +allows UUCP (bang-format) / %-hack addresses, all systems from which +it allows relaying should do the same or reject those addresses. As of 8.9, sendmail will refuse mail if the MAIL FROM: parameter has an unresolvable domain (i.e., one that DNS, your local name service, @@ -3160,17 +3200,49 @@ TLS_Clt:laptop.example.com PERM+VER TLS_Rcpt:darth@endmail.org ENCR:112+CN:smtp.endmail.org -Disabling STARTTLS And Setting SMTP Server Features ---------------------------------------------------- +TLS Options per Session +----------------------- By default STARTTLS is used whenever possible. However, there are -some broken MTAs that don't properly implement STARTTLS. To be able -to send to (or receive from) those MTAs, the ruleset try_tls -(srv_features) can be used that work together with the access map. -Entries for the access map must be tagged with Try_TLS (Srv_Features) -and refer to the hostname or IP address of the connecting system. -A default case can be specified by using just the tag. For example, -the following entries in the access map: +MTAs with STARTTLS interoperability issues. To be able to send to +(or receive from) those MTAs several features are available: + +1) Various TLS options be be set per IP/domain. +2) STARTTLS can be turned off for specific IP addresses/domains. + +About 1): the rulesets tls_srv_features and tls_clt_features can +be used to return a (semicolon separated) list of TLS related +options: + +- Options: compare {Server,Client}SSLOptions. +- CipherList: same as the global option. +- CertFile, KeyFile: {Server,Client}{Cert,Key}File + +If FEATURE(`tls_session_features') is used, then default rulesets +are activated which look up entries in the access map with the tags +TLS_Srv_features and TLS_Clt_features, respectively. +For example, these entries: + + TLS_Srv_features:10.0.2.4 CipherList=MEDIUM+aRSA; + TLS_Clt_features:10.1.0.1 Options=SSL_OP_NO_TLSv1_2; CipherList=ALL:-EXPORT + +specify a cipherlist with MEDIUM strength ciphers that use RSA +certificates only for the client with the IP address 10.0.2.4, +and turn off TLSv1.2 when connecting to the server with the IP +address 10.1.0.1 as well as setting a specific cipherlist. +If FEATURE(`tls_session_features') is not used the user can provide +their own rulesets which must return the appropriate data. +If the rulesets are not defined or do not return a value, the +default TLS options are not modified. +(These rulesets require the sendmail binary to be built with +_FFR_TLS_SE_OPTS enabled.) + +About 2): the ruleset try_tls (srv_features) can be used that work +together with the access map. Entries for the access map must be +tagged with Try_TLS (Srv_Features) and refer to the hostname or IP +address of the connecting system. A default case can be specified +by using just the tag. For example, the following entries in the +access map: Try_TLS:broken.server NO Srv_Features:my.domain v @@ -3756,6 +3828,12 @@ confSINGLE_THREAD_DELIVERY SingleThread cached but otherwise idle connection to a host will prevent other sendmails from connecting to the other host. +confUSE_COMPRESSED_IPV6_ADDRESSES + UseCompressedIPv6Addresses + [undefined] If set, use the compressed + form of IPv6 addresses, such as + IPV6:::1, instead of the uncompressed + form, such as IPv6:0:0:0:0:0:0:0:1. confUSE_ERRORS_TO* UseErrorsTo [False] Use the Errors-To: header to deliver error messages. This should not be necessary because of general @@ -3990,6 +4068,13 @@ confWORK_TIME_FACTOR RetryFactor [90000] confQUEUE_SORT_ORDER QueueSortOrder [Priority] Queue sort algorithm: Priority, Host, Filename, Random, Modification, or Time. +confMAX_QUEUE_AGE MaxQueueAge [undefined] If set to a value greater + than zero, entries in the queue + will be retried during a queue run + only if the individual retry time + has been reached which is doubled + for each attempt. The maximum retry + time is limited by the specified value. confMIN_QUEUE_AGE MinQueueAge [0] The minimum amount of time a job must sit in the queue between queue runs. This allows you to set the @@ -4208,7 +4293,7 @@ confAUTH_MECHANISMS AuthMechanisms [GSSA confAUTH_REALM AuthRealm [undefined] The authentication realm that is passed to the Cyrus SASL library. If no realm is specified, - $j is used. + $j is used. See KNOWNBUGS. confDEF_AUTH_INFO DefaultAuthInfo [undefined] Name of file that contains authentication information for outgoing connections. This file must @@ -4241,6 +4326,14 @@ confTLS_SRV_OPTIONS TLSSrvOptions If thi verification is performed, i.e., the server doesn't ask for a certificate. +confSERVER_SSL_OPTIONS ServerSSLOptions [undefined] SSL related + options for server side. See + SSL_CTX_set_options(3) for a list. +confCLIENT_SSL_OPTIONS ClientSSLOptions [undefined] SSL related + options for client side. See + SSL_CTX_set_options(3) for a list. +confCIPHER_LIST CipherList [undefined] Cipher list for TLS. + See ciphers(1) for possible values. confLDAP_DEFAULT_SPEC LDAPDefaultSpec [undefined] Default map specification for LDAP maps. The value should only contain LDAP @@ -4250,10 +4343,11 @@ confLDAP_DEFAULT_SPEC LDAPDefaultSpec [u maps unless they are specified in the individual map specification ('K' command). -confCACERT_PATH CACertPath [undefined] Path to directory - with certs of CAs. -confCACERT CACertFile [undefined] File containing one CA - cert. +confCACERT_PATH CACertPath [undefined] Path to directory with + certificates of CAs which must contain + their hashes as filenames or links. +confCACERT CACertFile [undefined] File containing at least + one CA certificate. confSERVER_CERT ServerCertFile [undefined] File containing the cert of the server, i.e., this cert is used when sendmail acts as @@ -4281,6 +4375,10 @@ confRAND_FILE RandFile [undefined] File requires this option if the compile flag HASURANDOM is not set (see sendmail/README). +confCERT_FINGERPRINT_ALGORITHM CertFingerprintAlgorithm + [undefined] The fingerprint algorithm + (digest) to use for the presented + cert. confNICE_QUEUE_RUN NiceQueueRun [undefined] If set, the priority of queue runners is set the given value (nice(3)). Modified: stable/9/contrib/sendmail/cf/cf/Makefile ============================================================================== --- stable/9/contrib/sendmail/cf/cf/Makefile Sat Jul 11 03:34:57 2015 (r285372) +++ stable/9/contrib/sendmail/cf/cf/Makefile Sat Jul 11 03:42:01 2015 (r285373) @@ -100,6 +100,7 @@ M4FILES=\ ${CFDIR}/feature/access_db.m4 \ ${CFDIR}/feature/allmasquerade.m4 \ ${CFDIR}/feature/always_add_domain.m4 \ + ${CFDIR}/feature/bcc.m4 \ ${CFDIR}/feature/bestmx_is_local.m4 \ ${CFDIR}/feature/bitdomain.m4 \ ${CFDIR}/feature/blacklist_recipients.m4 \ @@ -118,9 +119,11 @@ M4FILES=\ ${CFDIR}/feature/masquerade_envelope.m4 \ ${CFDIR}/feature/no_default_msa.m4 \ ${CFDIR}/feature/nocanonify.m4 \ + ${CFDIR}/feature/nopercenthack.m4 \ ${CFDIR}/feature/notsticky.m4 \ ${CFDIR}/feature/nouucp.m4 \ ${CFDIR}/feature/nullclient.m4 \ + ${CFDIR}/feature/prefixmod.m4 \ ${CFDIR}/feature/promiscuous_relay.m4 \ ${CFDIR}/feature/redirect.m4 \ ${CFDIR}/feature/ratecontrol.m4 \ @@ -131,12 +134,14 @@ M4FILES=\ ${CFDIR}/feature/relay_mail_from.m4 \ ${CFDIR}/feature/smrsh.m4 \ ${CFDIR}/feature/stickyhost.m4 \ + ${CFDIR}/feature/tls_session_features.m4 \ ${CFDIR}/feature/use_ct_file.m4 \ ${CFDIR}/feature/use_cw_file.m4 \ ${CFDIR}/feature/uucpdomain.m4 \ ${CFDIR}/feature/virtuser_entire_domain.m4 \ ${CFDIR}/feature/virtusertable.m4 \ ${CFDIR}/hack/cssubdomain.m4 \ + ${CFDIR}/hack/xconnect.m4 \ ${CFDIR}/m4/cf.m4 \ ${CFDIR}/m4/cfhead.m4 \ ${CFDIR}/m4/proto.m4 \ Modified: stable/9/contrib/sendmail/cf/cf/submit.cf ============================================================================== --- stable/9/contrib/sendmail/cf/cf/submit.cf Sat Jul 11 03:34:57 2015 (r285372) +++ stable/9/contrib/sendmail/cf/cf/submit.cf Sat Jul 11 03:42:01 2015 (r285373) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@lab.smi.sendmail.com on Tue May 20 12:12:52 PDT 2014 -##### in /home/ca/sm8.git/sendmail/OpenSource/sendmail-8.14.9/cf/cf +##### built by ca@sandman.dev-lab.sendmail.com on Thu Jul 2 05:24:31 PDT 2015 +##### in /x/ca/smi.git/sendmail/OpenSource/sendmail-8.15.2/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.14.9/Submit +DZ8.15.2/Submit ############### @@ -202,6 +202,9 @@ O ConnectionCacheTimeout=5m # use Errors-To: header? O UseErrorsTo=False +# use compressed IPv6 address format? +#O UseCompressedIPv6Addresses + # log level O LogLevel=9 @@ -251,6 +254,9 @@ O PrivacyOptions=goaway,noetrn,restrictq # minimum time in queue before retry #O MinQueueAge=30m +# maximum time in queue before retry (if > 0; only for exponential delay) +#O MaxQueueAge + # how many jobs can you process in the queue? #O MaxQueueRunSize=0 @@ -501,6 +507,12 @@ O PidFile=/var/spool/clientmqueue/sm-cli # SMTP STARTTLS server options #O TLSSrvOptions +# SSL cipherlist +#O CipherList +# server side SSL options +#O ServerSSLOptions +# client side SSL options +#O ClientSSLOptions # Input mail filters #O InputMailFilters @@ -524,6 +536,8 @@ O PidFile=/var/spool/clientmqueue/sm-cli #O DHParameters # Random data source (required for systems without /dev/urandom under OpenSSL) #O RandFile +# fingerprint algorithm (digest) to use for the presented cert +#O CertFingerprintAlgorithm # Maximum number of "useless" commands before slowing down #O MaxNOOPCommands=20 @@ -531,6 +545,8 @@ O PidFile=/var/spool/clientmqueue/sm-cli # Name to use for EHLO (defaults to $j) #O HeloName + + ############################ # QUEUE GROUP DEFINITIONS # ############################ @@ -645,6 +661,7 @@ R$- . $- :: $+ $@ $>Canonify2 $3 < @ $1 # if we have % signs, take the rightmost one R$* % $* $1 @ $2 First make them all @s. R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last. + R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish # else we must be a local name @@ -781,6 +798,7 @@ R$* $=O $* < @ *LOCAL* > $@ $>Parse0 $>canonify $1 $2 $3 ...@*LOCAL* -> ... R$* < @ *LOCAL* > $: $1 + # # Parse1 -- the bottom half of ruleset 0. # @@ -818,6 +836,8 @@ R$* < @$* > $* $#esmtp $@ $2 $: $1 < @ R$=L $#local $: @ $1 special local names R$+ $#local $: $1 regular local names + + ########################################################################### ### Ruleset 5 -- special rewriting after aliases have been expanded ### ########################################################################### @@ -1027,6 +1047,10 @@ R$* $| $* $: $2 R<@> < $* @ localhost > $: < ? $&{client_name} > < $1 @ localhost > R<@> < $* @ [127.0.0.1] > $: < ? $&{client_name} > < $1 @ [127.0.0.1] > +R<@> < $* @ [IPv6:0:0:0:0:0:0:0:1] > + $: < ? $&{client_name} > < $1 @ [IPv6:0:0:0:0:0:0:0:1] > +R<@> < $* @ [IPv6:::1] > + $: < ? $&{client_name} > < $1 @ [IPv6:::1] > R<@> < $* @ localhost.$m > $: < ? $&{client_name} > < $1 @ localhost.$m > R<@> < $* @ localhost.UUCP > @@ -1141,6 +1165,7 @@ R$* $: $&{client_addr} R$@ $@ RELAY originated locally R0 $@ RELAY originated locally R127.0.0.1 $@ RELAY originated locally +RIPv6:0:0:0:0:0:0:0:1 $@ RELAY originated locally RIPv6:::1 $@ RELAY originated locally R$=R $* $@ RELAY relayable IP address R$* $: [ $1 ] put brackets around it... @@ -1245,6 +1270,8 @@ STLS_connection RSOFTWARE $#error $@ 4.7.0 $: "403 TLS handshake." + + ###################################################################### ### RelayTLS: allow relaying based on TLS authentication ### @@ -1442,7 +1469,7 @@ Mrelay, P=[IPC], F=mDFMuXa8k, S=EnvFrom ### submit.mc ### # divert(-1) # # *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jul 11 03:46:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5402996F87; Sat, 11 Jul 2015 03:46:41 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 AAA6FC3B; Sat, 11 Jul 2015 03:46:41 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B3kfH4096756; Sat, 11 Jul 2015 03:46:41 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B3kbM7096740; Sat, 11 Jul 2015 03:46:37 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110346.t6B3kbM7096740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 03:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r285374 - in stable/8/contrib/sendmail: . cf cf/cf cf/feature cf/hack cf/m4 contrib doc/op editmap include/sendmail include/sm libmilter libmilter/docs libsm libsmdb makemap src X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 03:46:42 -0000 Author: gshapiro Date: Sat Jul 11 03:46:36 2015 New Revision: 285374 URL: https://svnweb.freebsd.org/changeset/base/285374 Log: MFC: Merge sendmail 8.15.2 Added: stable/8/contrib/sendmail/cf/feature/bcc.m4 - copied unchanged from r285229, head/contrib/sendmail/cf/feature/bcc.m4 stable/8/contrib/sendmail/cf/feature/nopercenthack.m4 - copied unchanged from r285229, head/contrib/sendmail/cf/feature/nopercenthack.m4 stable/8/contrib/sendmail/cf/feature/prefixmod.m4 - copied unchanged from r285229, head/contrib/sendmail/cf/feature/prefixmod.m4 stable/8/contrib/sendmail/cf/feature/tls_session_features.m4 - copied unchanged from r285229, head/contrib/sendmail/cf/feature/tls_session_features.m4 stable/8/contrib/sendmail/cf/hack/xconnect.m4 - copied unchanged from r285229, head/contrib/sendmail/cf/hack/xconnect.m4 stable/8/contrib/sendmail/contrib/AuthRealm.p0 - copied unchanged from r285229, head/contrib/sendmail/contrib/AuthRealm.p0 Deleted: stable/8/contrib/sendmail/libsm/path.c Modified: stable/8/contrib/sendmail/CACerts stable/8/contrib/sendmail/FAQ stable/8/contrib/sendmail/INSTALL stable/8/contrib/sendmail/KNOWNBUGS stable/8/contrib/sendmail/PGPKEYS stable/8/contrib/sendmail/README stable/8/contrib/sendmail/RELEASE_NOTES stable/8/contrib/sendmail/cf/README stable/8/contrib/sendmail/cf/cf/Makefile stable/8/contrib/sendmail/cf/cf/submit.cf stable/8/contrib/sendmail/cf/cf/submit.mc stable/8/contrib/sendmail/cf/feature/block_bad_helo.m4 stable/8/contrib/sendmail/cf/feature/ldap_routing.m4 stable/8/contrib/sendmail/cf/m4/cfhead.m4 stable/8/contrib/sendmail/cf/m4/proto.m4 stable/8/contrib/sendmail/cf/m4/version.m4 stable/8/contrib/sendmail/doc/op/op.me stable/8/contrib/sendmail/editmap/editmap.c stable/8/contrib/sendmail/include/sendmail/sendmail.h stable/8/contrib/sendmail/include/sm/bdb.h stable/8/contrib/sendmail/include/sm/cdefs.h stable/8/contrib/sendmail/include/sm/conf.h stable/8/contrib/sendmail/include/sm/errstring.h stable/8/contrib/sendmail/include/sm/fdset.h stable/8/contrib/sendmail/libmilter/docs/smfi_setsymlist.html stable/8/contrib/sendmail/libmilter/engine.c stable/8/contrib/sendmail/libmilter/handler.c stable/8/contrib/sendmail/libmilter/listener.c stable/8/contrib/sendmail/libmilter/signal.c stable/8/contrib/sendmail/libmilter/smfi.c stable/8/contrib/sendmail/libmilter/worker.c stable/8/contrib/sendmail/libsm/Makefile.m4 stable/8/contrib/sendmail/libsm/errstring.c stable/8/contrib/sendmail/libsm/local.h stable/8/contrib/sendmail/libsm/mbdb.c stable/8/contrib/sendmail/libsm/refill.c stable/8/contrib/sendmail/libsm/stdio.c stable/8/contrib/sendmail/libsm/vfprintf.c stable/8/contrib/sendmail/libsmdb/smdb.c stable/8/contrib/sendmail/makemap/makemap.c stable/8/contrib/sendmail/src/README stable/8/contrib/sendmail/src/TRACEFLAGS stable/8/contrib/sendmail/src/TUNING stable/8/contrib/sendmail/src/bf.c stable/8/contrib/sendmail/src/collect.c stable/8/contrib/sendmail/src/conf.c stable/8/contrib/sendmail/src/daemon.c stable/8/contrib/sendmail/src/deliver.c stable/8/contrib/sendmail/src/envelope.c stable/8/contrib/sendmail/src/err.c stable/8/contrib/sendmail/src/headers.c stable/8/contrib/sendmail/src/main.c stable/8/contrib/sendmail/src/map.c stable/8/contrib/sendmail/src/mci.c stable/8/contrib/sendmail/src/milter.c stable/8/contrib/sendmail/src/parseaddr.c stable/8/contrib/sendmail/src/queue.c stable/8/contrib/sendmail/src/readcf.c stable/8/contrib/sendmail/src/recipient.c stable/8/contrib/sendmail/src/savemail.c stable/8/contrib/sendmail/src/sendmail.8 stable/8/contrib/sendmail/src/sendmail.h stable/8/contrib/sendmail/src/sfsasl.c stable/8/contrib/sendmail/src/sm_resolve.c stable/8/contrib/sendmail/src/srvrsmtp.c stable/8/contrib/sendmail/src/tls.c stable/8/contrib/sendmail/src/usersmtp.c stable/8/contrib/sendmail/src/util.c stable/8/contrib/sendmail/src/version.c Directory Properties: stable/8/contrib/sendmail/ (props changed) Modified: stable/8/contrib/sendmail/CACerts ============================================================================== --- stable/8/contrib/sendmail/CACerts Sat Jul 11 03:42:01 2015 (r285373) +++ stable/8/contrib/sendmail/CACerts Sat Jul 11 03:46:36 2015 (r285374) @@ -10,6 +10,102 @@ Certificate: Data: Version: 3 (0x2) Serial Number: + 92:91:67:de:e0:ef:2c:e4 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + Validity + Not Before: Mar 2 19:15:29 2015 GMT + Not After : Mar 1 19:15:29 2018 GMT + Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b9:1a:a1:56:ce:cb:16:af:4f:96:ba:2a:70:31: + 70:d3:86:6c:7a:46:26:47:42:3f:de:49:57:3e:08: + 1e:10:25:bf:06:8f:ca:fd:f4:5e:6a:01:7d:31:4d: + 50:88:18:43:71:66:65:42:9c:90:97:0d:95:f2:14: + ef:d7:5e:77:ef:7d:b5:49:3f:02:bb:83:20:f7:e6: + fc:9a:cd:13:df:60:41:28:8e:39:07:a6:a4:40:98: + 15:1e:46:b6:04:2e:f9:ab:32:d1:8b:fe:52:81:f1: + d2:e1:c3:cf:bf:ab:40:a7:f0:e4:e5:a2:82:37:30: + 8c:10:7d:aa:a8:7c:7e:76:cc:5f:1a:24:d0:8c:94: + f6:f2:7f:4a:be:2f:38:67:c0:06:e6:9e:51:ad:55: + d0:cb:26:71:cf:f4:af:7d:5a:41:81:16:fb:26:ec: + f0:35:01:6e:db:f9:e9:00:d7:d0:89:7b:cf:88:16: + 8b:1c:8f:77:1f:5d:ef:70:04:28:76:c5:1b:c6:23: + 8d:49:6b:f0:b8:21:56:d6:7d:68:6c:be:21:e3:e6: + e3:1d:6f:a5:ea:dc:83:e4:27:b3:6f:5f:1b:3d:33: + a1:d5:d3:f0:73:1a:12:eb:d9:95:00:71:59:16:b4: + e4:60:38:b2:2e:7f:b7:d4:c5:e9:3f:74:e4:48:38: + 29:89 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + B1:69:DB:5E:9B:CE:1A:B4:1D:B2:6A:FC:5A:22:97:B6:24:14:6F:32 + X509v3 Authority Key Identifier: + keyid:B1:69:DB:5E:9B:CE:1A:B4:1D:B2:6A:FC:5A:22:97:B6:24:14:6F:32 + DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2015/emailAddress=ca+ca-rsa2015@esmtp.org + serial:92:91:67:DE:E0:EF:2C:E4 + + X509v3 Basic Constraints: + CA:TRUE + X509v3 Subject Alternative Name: + email:ca+ca-rsa2015@esmtp.org + X509v3 Issuer Alternative Name: + email:ca+ca-rsa2015@esmtp.org + Signature Algorithm: sha1WithRSAEncryption + 0a:ce:07:39:77:08:c5:3a:00:04:e8:a0:3b:f7:d2:4c:79:02: + 23:0b:da:c0:55:39:82:71:0a:0c:83:e2:de:f2:3b:fe:23:bc: + 9b:13:34:d1:29:0a:16:3f:01:7d:9f:fb:4b:aa:12:dc:3b:7e: + b9:27:7b:ec:0c:3f:c0:d9:f5:d8:a8:a1:9c:1c:3a:2f:40:df: + 27:1a:1a:a0:74:00:19:b7:82:0e:f9:45:86:bf:32:da:0e:72: + 0a:4c:2c:39:21:63:c3:1f:61:6e:e2:4d:ba:7a:26:1a:15:ce: + b1:f6:1a:59:04:70:ed:e8:72:05:4c:fc:84:c6:a5:f4:e2:4a: + 40:e4:42:70:87:9a:a7:02:26:3a:47:34:09:e0:7b:88:ca:fb: + 99:d9:9b:bb:0c:52:8a:93:d5:59:30:0b:55:42:b4:bb:d2:b1: + 49:55:81:a4:70:a0:49:19:f2:4f:61:94:af:e9:d7:62:68:65: + 97:67:00:26:b8:9b:b2:2c:d0:2c:83:7d:3e:b3:31:73:b9:55: + 49:53:fa:a3:ad:1b:02:67:08:9e:ce:9e:eb:9f:47:0d:6c:95: + e9:6c:30:92:c1:94:67:ad:d9:e3:b9:61:ea:a9:72:98:81:3a: + 62:80:70:20:9a:3e:c4:1f:6f:bd:b4:00:ec:b1:fe:71:da:91: + 15:89:f7:8f +-----BEGIN CERTIFICATE----- +MIIFJzCCBA+gAwIBAgIJAJKRZ97g7yzkMA0GCSqGSIb3DQEBBQUAMIGlMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTERMA8GA1UEBwwIQmVya2VsZXkx +FDASBgNVBAoMC0VuZG1haWwgT3JnMQwwCgYDVQQLDANNVEExIjAgBgNVBAMMGUNs +YXVzIEFzc21hbm4gQ0EgUlNBIDIwMTUxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz +YTIwMTVAZXNtdHAub3JnMB4XDTE1MDMwMjE5MTUyOVoXDTE4MDMwMTE5MTUyOVow +gaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMREwDwYDVQQHDAhC +ZXJrZWxleTEUMBIGA1UECgwLRW5kbWFpbCBPcmcxDDAKBgNVBAsMA01UQTEiMCAG +A1UEAwwZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxNTEmMCQGCSqGSIb3DQEJARYX +Y2ErY2EtcnNhMjAxNUBlc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQC5GqFWzssWr0+WuipwMXDThmx6RiZHQj/eSVc+CB4QJb8Gj8r99F5q +AX0xTVCIGENxZmVCnJCXDZXyFO/XXnfvfbVJPwK7gyD35vyazRPfYEEojjkHpqRA +mBUeRrYELvmrMtGL/lKB8dLhw8+/q0Cn8OTlooI3MIwQfaqofH52zF8aJNCMlPby +f0q+LzhnwAbmnlGtVdDLJnHP9K99WkGBFvsm7PA1AW7b+ekA19CJe8+IFoscj3cf +Xe9wBCh2xRvGI41Ja/C4IVbWfWhsviHj5uMdb6Xq3IPkJ7NvXxs9M6HV0/BzGhLr +2ZUAcVkWtORgOLIuf7fUxek/dORIOCmJAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU +sWnbXpvOGrQdsmr8WiKXtiQUbzIwgdoGA1UdIwSB0jCBz4AUsWnbXpvOGrQdsmr8 +WiKXtiQUbzKhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9y +bmlhMREwDwYDVQQHDAhCZXJrZWxleTEUMBIGA1UECgwLRW5kbWFpbCBPcmcxDDAK +BgNVBAsMA01UQTEiMCAGA1UEAwwZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAxNTEm +MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAxNUBlc210cC5vcmeCCQCSkWfe4O8s +5DAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMTVAZXNtdHAu +b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMTVAZXNtdHAub3JnMA0GCSqGSIb3 +DQEBBQUAA4IBAQAKzgc5dwjFOgAE6KA799JMeQIjC9rAVTmCcQoMg+Le8jv+I7yb +EzTRKQoWPwF9n/tLqhLcO365J3vsDD/A2fXYqKGcHDovQN8nGhqgdAAZt4IO+UWG +vzLaDnIKTCw5IWPDH2Fu4k26eiYaFc6x9hpZBHDt6HIFTPyExqX04kpA5EJwh5qn +AiY6RzQJ4HuIyvuZ2Zu7DFKKk9VZMAtVQrS70rFJVYGkcKBJGfJPYZSv6ddiaGWX +ZwAmuJuyLNAsg30+szFzuVVJU/qjrRsCZwiezp7rn0cNbJXpbDCSwZRnrdnjuWHq +qXKYgTpigHAgmj7EH2+9tADssf5x2pEVifeP +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: f1:41:b3:3d:ba:bd:33:49 Signature Algorithm: sha1WithRSAEncryption Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2012/emailAddress=ca+ca-rsa2012@esmtp.org Modified: stable/8/contrib/sendmail/FAQ ============================================================================== --- stable/8/contrib/sendmail/FAQ Sat Jul 11 03:42:01 2015 (r285373) +++ stable/8/contrib/sendmail/FAQ Sat Jul 11 03:46:36 2015 (r285374) @@ -1,8 +1,4 @@ The FAQ is no longer maintained with the sendmail release. It is available at http://www.sendmail.org/faq/ . -A plain-text version of the questions only, with URLs referring to -the answers, is posted to comp.mail.sendmail on the 10th and 25th -of each month. - -$Revision: 8.24 $, Last updated $Date: 1999-02-07 03:21:03 $ +$Revision: 8.25 $, Last updated $Date: 2014-01-27 12:49:52 $ Modified: stable/8/contrib/sendmail/INSTALL ============================================================================== --- stable/8/contrib/sendmail/INSTALL Sat Jul 11 03:42:01 2015 (r285373) +++ stable/8/contrib/sendmail/INSTALL Sat Jul 11 03:46:36 2015 (r285374) @@ -28,8 +28,9 @@ sendmail/SECURITY for more installation /etc/mail/submit.cf. This can be done in the cf/cf by using "sh ./Build install-cf". - Please read sendmail/SECURITY before continuing; you have to create a - new user smmsp and a new group smmsp for the default installation. + Please read sendmail/SECURITY before continuing; you may have to create + a new user smmsp and a new group smmsp for the default installation + if you are updating from a really old version. Then install the sendmail binary built in step 3 by cd-ing back to sendmail/ and running "sh ./Build install". Modified: stable/8/contrib/sendmail/KNOWNBUGS ============================================================================== --- stable/8/contrib/sendmail/KNOWNBUGS Sat Jul 11 03:42:01 2015 (r285373) +++ stable/8/contrib/sendmail/KNOWNBUGS Sat Jul 11 03:46:36 2015 (r285374) @@ -62,9 +62,9 @@ This list is not guaranteed to be comple libmilter and hence the communication fails. This can be avoided by increasing the constant MILTER_CHUNK_SIZE in include/libmilter/mfdef.h and recompiling sendmail, libmilter, and - all (statically linked) milters (or by using an undocumented compile - time option: _FFR_MAXDATASIZE; you have to read the source code in - order to use this properly). + all (statically linked) milters (or by using undocumented compile + time options: _FFR_MAXDATASIZE/_FFR_MDS_NEGOTIATE; you have to + read the source code in order to use these properly). * Sender addresses whose domain part cause a temporary A record lookup failure but have a valid MX record will be temporarily rejected in @@ -102,6 +102,11 @@ Kresolve sequence dnsmx canon Header addresses that have the \231 character (and possibly others in the range \201 - \237) behave in odd and usually unexpected ways. +* AuthRealm for Cyrus SASL may not work as expected. The man page + and the actual usage for sasl_server_new() seem to differ. + Feedback for the "correct" usage is welcome, a patch to match + the description of the man page is in contrib/AuthRealm.p0. + * accept() problem on SVR4. Apparently, the sendmail daemon loop (doing accept()s on the network) @@ -252,7 +257,7 @@ Kresolve sequence dnsmx canon * Race condition for delivery to set-user-ID files - Sendmail will deliver to a fail if the file is owned by the DefaultUser + Sendmail will deliver to a file if the file is owned by the DefaultUser or has the set-user-ID bit set. Unfortunately, some systems clear that bit when a file is modified. Sendmail compensates by resetting the file mode back to it's original settings. Unfortunately, there's still a Modified: stable/8/contrib/sendmail/PGPKEYS ============================================================================== --- stable/8/contrib/sendmail/PGPKEYS Sat Jul 11 03:42:01 2015 (r285373) +++ stable/8/contrib/sendmail/PGPKEYS Sat Jul 11 03:46:36 2015 (r285374) @@ -141,6 +141,185 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0= =SR28 -----END PGP PUBLIC KEY BLOCK----- + +pub 2048R/0xAAF5B5DE05BDCC53 2015-01-02 +fingerprint: 30BC A747 05FA 4154 5573 1D7B AAF5 B5DE 05BD CC53 +uid Sendmail Signing Key/2015 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1 + +mQENBFSl4rQBCADRCzgFSJkzyoOHw9/9L/+G3mzA1fWR7TgCE0WxGX7PDzyLDaUS +a4XpCDtadjXyr7c5YPo1T7ybxUH39yvUgEHBiPQDssik+bbpOiHL7V0sUDAYfKSq +YC8/MG42Oj/zd+0WUhnI+RckFYPBNDQ+sZC6ErLDxCYDZMYhG4vhJOGqAKpglNTb +w4Fdx4LNmL3e4t3z4IEtnzAqeGVxIZm8MGGFhKkb8ufpgh8Jiz4Q6cOis0ZD9K6f +LvMPRJXSBy9jBtmS2oI2e9Q5LLhmzd1PVyA8jwAlK0QfJLmlRrgRUfHFKhkf+EuW +tTi592OYCZ9bw7QVSiGVQUK+7VACfM+FQR81ABEBAAG0MVNlbmRtYWlsIFNpZ25p +bmcgS2V5LzIwMTUgPHNlbmRtYWlsQFNlbmRtYWlsLk9SRz6JATgEEwECACIFAlSl +4rQCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEKr1td4FvcxTTPMH/29J +kNmt6EGNo/eLQySB8HTenfJjZaQxwPRhq22kWgr/7WP1BR2411bopyNk4IZ0rcDr +tnyeJj4UWKJljVuXyTDQPtU8uUlgiOT8QiHEbge7MOzxrn0cy6KIOgKq+vtuxa28 +McaxjENR7XVIDFkesQ7P/yLkcCjlE6jaD4r9OIKpqEVMPs1WUFff+rsgTo7mdcgR +QowQOgYqNil5awQ5Y2Gol71hZ6oRcpqMwSd6w4dEEx2U8rF8oqJuoxeUTgNCSv0n +iFtewLznocmxlrxe1mQAeLfRmUAG4LSL6p5wx1lRjJA3gtyWRjY0404jGxkATLG4 +AtK2OkHj8MbrWLP7PKyJARwEEAECAAYFAlSl5AQACgkQYd4R7OJ2OnPHXAf/Y6Rk +rROF45+SgbsEIiDXQBcBOoO1GKe0nFTc1jfAKUHAQ94fqcDxNeFRA9fNIA2d7XNI +0Lw6W7X3RcEkF58xytIe/Y+EXDmOt/BUbpch9KIz6J9pqBhPdyHvG+ZeyA3A+TGT +ZGnnnAxNFtCjt2IID9lzZSLuWhH8+DNC2Vp15NngDTa1VIk17n5iIvi7r3V5cdIE +MblKLGm+ZaiTeccVLjwMKIUSgrLP87+yF/aaZH2kotuI7f3tD1ycN0sVZJxcFS+c +GFw7uvOarDBSm0Q/FgfhDUOJLy4w5SqVmgPEIAeogz94q0JXxSSr1XWQBD8X9XwF +f3+dPXmgMHXLGRWclYkBHAQQAQIABgUCVKXkPAAKCRA9aLJdUgfK08cnB/96BV+v +xyBx35TPg8eI/WIskdQAIpCQsm6FoO1ejbMzfWn9bImCewOp1UMlowdfQC52Hdp8 +EXnuwCpJ3rtnZctRld5dNM/clbZ+r3lr78wX7hqPUajlvxe+TMpyZbJirLn1f5Ba +yoysE4oICfzJivPfixZd7oFVr9EkftbatYenl0rgf/0lJTKRDIqNGezeeyfxaKdX +qd545wqis7PrrXDOrEq815aosG09KQBhIoPgti2us1R95nSm9z6dVCY/nSDOxL+a +Vyq/XD5KSUqbZVocY+fbR3dNX5haTvawuG0GPvl+YvYb2lW4hhi7Q4aUL7Dd4c9c +vk5+WAvfJwHtbxrgiQEcBBABAgAGBQJUpeREAAoJEI5a6fvO7vQ7OWUH/2NNxhlI +JEtvD+Nj2oPGgVQJrlFI1pbzyMCtD+6iy8Lfnp2DK+qKPMjBw96LUqcXC32VFPQr +17iyZDv26MSb/acmdIfTPpPTwJ6zEmMI8mXradeuoiWxeVHSg7n+D3u0xtikmb9Y +uRKv0yx43fcL70bqV5DzyXQte0chfRnOiwMrImWdgDekkmxE9udbtgK24rifNVGa +TBB6eHJAsFVu5Y38hsZLe10bCKyUCqT6Qywfy3RCMpXYeo6fXOk0fKatG2oi3CZp +LI+AnjmAJ0t2oMkrwUxogkK3LkShJT/aJYIR24eZm0GdzwRHZxXKClGFvdJslIea +TKHSXNK41eEIfreJARwEEAECAAYFAlSl5EgACgkQOaTHfal4hLAXfwf+M0YmlHd4 +1sfvckYhOYf99n1BGnfQx5RJn+X+EBjGyOfPKMBPQuZIlwAI20T+cFnR3WmgrmlO +IBG8qVcSDoValzNPcr0V3WGDrT75fYhf5iYj2ZsZDBUqE1VF3dAVUw40x2c1n+98 +7lbq3NtolSPYk07h5rhEhmkjdNcixv/exVCTGVwaT4X9ZHY8heETmF5tsCtPavpr +i/DjcDQQQ0sQ8um1eX41j2bhrN4MERUC5oadvSULaA2QUoWgCrzVG8zx715Au77N +jLtfA31hJI0GP/dpSREaYlqA0nwVDR5tz1TyTNwPN1ylxjQmjKXtJwx3jUtlT9Zh +qxRf+ngYHpWArokBHAQQAQIABgUCVKXkTAAKCRBgTfvyhUEKvl11B/9aYJBEEQZp +JWAT6HPmQK//i2x4y1euQfaHsjqJALvvPrgiTp/ZE3o6dKHhs+SbawsB57RtootN +maQr7x2drvBojWhJJdaouAh345qOfZYb0bD9klkr6W+Mjl5T0xWIKFEyIZn0Tcbr +8ekHgSIx2trL8LduSJou2bdPMh46PORzEpuQQ4IAyV0uRyBdNFOPwTy2OdXs51fr +M7lp1hJp84+y2a6z3vz3VCs2A9LzlnXKZ6bXljpd5dQfrmrSNXltPKA3jVLkWi8+ +rh9f1rAGsj1e6N1aVF2uJ1Y3u+U0XQ/dwa1vDF3y4KVObxYM9eNGbF4J8lGkUy2a +gZ1s1X8QzEDUiJwEEAECAAYFAlSl5FAACgkQEolum6d/JCmUSQP+KEz6xSvPSbFP +Hip4JiX1Wbvd+t3TyL0u9Fv/POwUrFIHVpTkCwOz6jsBH3TdGGiYOP5F8k/US2jU +3WB0J1mK5Rn3GwLhUGNTEeuaJZCuKE+j3qwMFmDqC/2IxEvlWtrIbTqkgf7cRv/O +O7VNv+EL0axtsrOcwZlUWe6Lc4571oaInAQQAQIABgUCVKXkUwAKCRDYqvDK9rMH +KX7xBACUFTBRCmboY/GRTHMZW1DGfcO2vMxwnYKqWomuzi/YonDCWtoTpeMDaAhY +NnIchC1mlYteIE94/+ZsoYsZeaR3fe7CN6h/deBu4tW/dQ+TW1ZPF6EuVhoviKgz +rd3rb+gcS0f0PgSPyg5LGtoMGMD9/gx1NJOTFec83jmBI95Gb4icBBABAgAGBQJU +peRXAAoJEJdDARhwk7hBAUED/0oyeD2Z4wMQ6IQEprOAWbR+vIRzaThemmCGobRw +UlM44nUXqKSM1+naLEVz/JzBuKWG00zTz6Su3NesWoFzDDUGYcIJggbOm39Pc+V8 +eXV86An64/v3P6gypJc+q9P+FFGGO884wFmYN634Mi4SDBVFUzffcghueAFcxtzt +0mH5iJwEEAECAAYFAlSl5FoACgkQHnuzyK+VliVGdwP/fmdK9MdWIzPD/6eYm6JZ +zbksaGWiqpwgp9IEr/OhSmGkXuwUsP35PFJ8FsJbEV5x/y6pP3UNp6EFRN/116ue +jp5vVM7nnj2K3V8f85J4dXCRbv+kek+Ufo1Qzm5kgvRuBxX1sXpxFX6yBM0Y6WuV +gszdbTVNlS04q6bnPFE9L4uInAQQAQIABgUCVKXkXgAKCRBwoCRNHvmSUZ/7A/9W +yQJrrdrs2SuYtoxov/pL/TVMejbnxsF8Y0dRtM/KiquP57PMQSmLqy4fTRzAMHBv +XK1aKfewTVfGKLcHIzfMfv2XcPpWfwcyMeZKtcSr25lWl9GJZP221rCok76XYwqk +BPPp0pjSwdy0Qq4sd3N3ESZmqAMWJ7ouMmlQ7VWReYicBBABAgAGBQJUpeRhAAoJ +EMjV7SmV9hdxLv0EALX3yjI2KDNG1mo5ctCSYlIlhXHQ6csHuUK9lzj9R1gVEzDU +0dEZH0+a5UXh5xf8nyTDLytUe8PxTtPit3AOP6TvTJlANULh/3MKS6317RwUe2e0 +OitWbhQAOYfpYAkSdXZACzPacxrefkxmSM3Pq+SYoumZTI2N6AvVu8MeCS0GiJwE +EAECAAYFAlSl5GQACgkQIYPhsTlvB4mWJgP/XAlvlBityADJkdN+3mp/OtdYzw04 ++dBdNtmLqWUiMZg6rPPHUQi7dfBKi95FFe2U8hxSRk8oLzSzmh/M/CP72mxKh4pi +PbmEkmKHYlNdyfCCNqXdjkBXFAKXAes/4DaBlZwvLjPtrupEaW2eYdU8cSrdeGuv +1PMLRPxRr3nPCb+InAQQAQIABgUCVKXkaAAKCRCJaWK4Z4wKA3ZVA/4iYD+xrYv0 +8I+0GZJRdEL5f7T97a7Vtf5xSxUhHDww4xC9gs8LzEGWZXoNaZEVl4j+63EnCIbY +o4g+c4m81D5NWFqeJWhWpcyvejo9hfGM3ZK/XbiF+ZTzznU5YJclGaZ7t8TY8gcx +GSWxUzxBJQcSEzAKKi286ielMAXocNx10oicBBABAgAGBQJUpeRrAAoJEDgi20fM +N08tDkwD/2F5j5irsDw+MQyLKpfPv3GRJ5J3ebOPpLQkQ5T34+qeIw4LkcXW9OJA +ohW47JLb7R8zwAlUoqmmNXtxTM0r0FlTYGPOVEnSEkMqqa3KR68B3jWAGXXdqig9 +yBxYRleawQ4ltnegBn8q7gC4MwnIAZxzK+Y8cM0Rk/FjC9+NhwrviJwEEAECAAYF +AlSl5G8ACgkQnBy94uNcVjUfvgQAlQijnoE3de1CanB0JqIN+h+XOLOpalFti+B7 +Swc2ZlnlQ9mofYPK5UHlbsiC7/TilD6xm4YEFKim9sOIMi8FNka8+EH+/d1DmS4M +qVPDssxTG6VOzn7tYOuC9qIw15IpfbHW2bk/YIImwP9nViKCMLIGw+ZgK+uiRQx9 +fT8O1NqInAQQAQIABgUCVKXkcgAKCRBvUpPYo5umVYKeA/9n63K1nF3DNY3Hckvz +tN8OrPmyCIOh+7t4sc5NHhTK0+BQTv+cgG6ig7K2cdI6VBAovs/c/u7+RrcMhp7l +45AVnycfKcNaMHKFyMHDk9FZgpRG/bv1zwDxdh+scUc3IekqkSiQ2wTjDQ5Q/BMK +L5zfOSnTOoltWjpVgsjdM75Ol4icBBABAgAGBQJUpeR2AAoJEO9YlmTUMuGd8R0D +/3mhriMu/cp3DXHnlDykqLJI1q5K4xCHOWwFYZ8DxW116AVjluJYYW1HmWcJrjK3 +cwuN3FUcsIjafanIJWCsdeZaPAyFEfUBEW0YXIIpBXRw2N7jNtrd5X6Zjptd+zW+ +4dUzvT1pqVtdPHjova3fcGLSmcdZYbddotaGi7xi7kXviJwEEAECAAYFAlSl5HoA +CgkQwZwdJRLTRh0iwwP/Y/pwp9ttAMuQUz6oH71BTkUrzu9LiI7vhrYxEquFdzCO +dE4jBNB3LGfwzjhJRtjmQ/gVhjXWWrDYnOXt3gNxb9KzmTHmSDu65cBxX54Un0pZ ++MXjjWOT2l8+GA1lXeICIoZjJL88/zEZAiaH67ch2LEix1fOaJmXJzUSmP1pR3KI +nAQQAQIABgUCVKXkfgAKCRDAKcpAFvTM6XVwA/9Eb+Dwn2lmEFFo64gj8ocpWzP8 +/sD86PP5KkZ+b/HQnGB3lsQTwsGytDvJfutLDa05sS/HWZ9wXPltX/G3omp/A1G5 +qEKzVSe0vEWedpf9wn82Ll6hzaiS5qX7r0+FpyUjY8arNrze5S4Q6Q2kjl8YduXl +wG877igRHkGpAtApxYhGBBARAgAGBQJUpeSHAAoJEBj1A4AkwngCRCMAnjHfd5db +KK6DJxrWVnEbyXs/QJGKAJsErKkiUX55B8k/P3cyzyXIaOujBYicBBABAgAGBQJU +peSOAAoJEHxLZ22gDhVjCDQD/j7DE5wyhpjHrtf0hsQcaQoVHWZb2JTLZUMRAQyj +zKMTSs0GslamlxLZmyV1HqkB+41zuJeBQtRV4gjqa5DQmWDRC2mHl7o9A40v4SDa +O1jmfU5hfJSMecucPyEcfaAG4BIMvBo6TL484uHBi45SN4Ik3f2wc6D1XOluD1vB +gIwpiJwEEAECAAYFAlSl5JMACgkQ1uCh/k++Kt2s6gP/RNcMKtx4u61vz+Aji/Fa +H9q03JxQaRgmN1q2AvZQ/NTWTXU7Y5GnH4kW/8rOoUQiR+agJsvTt4ciM+y33pZ/ +ZZLkAuo0uKelEHhdQhtRbSktKBHSgDWbiqaJJIxazeLpxcSgaoM6RW/7aIFdMtEl +ALAzTACYlTN/nKWWICn8GnGIRgQQEQIABgUCVKXkmAAKCRAh+cW892qb9aWOAKCg +aznvUX8PIvKPzoHld39xWlJ+FgCg76wrEc1h9IiIgUoqH5NWVCxcHneInAQQAQIA +BgUCVKXkngAKCRC92o/WP+p9/ancA/0Z4JHZT7NRBMr47zQvSwE4eLpSE5QDGXi7 +RNmOUgZxrxsFWRZLJCVupXDBQVZEhOBRZYqXPw1eDglOU952oj5OjaHsYnSEu7jz +VUwlp2BxZQ3mnepdUcQz1A3k2cPZ0I6KFP9hP88GU+77nubB7IqRH/Q3QKMgO0eW +yd5kYugyYYkBHAQQAQIABgUCVKXkpwAKCRC9J20ub8+ohR46CADMEvAns+L+BkVN +d9INsiR1rONrNRPT6w4dnBeTLaykkuMjc6+7s+UuXm6AMAelI28pG+fJyt/lZAGx +QLS9zFgREge0lVbOZVeAYeC1YyFsrJE4Lr2quq3fajj23tnsHmCv16znMHrh/E1m +Udm4145NprijrZn+PsjuVWYV+pxiLpLM0YBdGNwCEMi/KCQ1fcaiAZZWSqLmHIe0 +ubWDdqq8/5JRQ22SEnqP2FT/lfOmKTxMNmE0uEr4+C4fG2nd38BvzpHu9eN/4Nwx +IwzK5DhbAj+I57+VDncgkNGe1q4QY/5LaZQh/nHIcmX1ln23f9Lxkr6EYYZ1ptq+ +A8buvD+XiQEcBBABAgAGBQJUp+zrAAoJEBCQryClqlvm6AgIAKAR8HY4G9AD2jDb +ouS4Al4QICagwQ0Y7Rc2/fHyPQEAP714EimakPFVFDbSD6SW569Qtdxr+ggH4wFI +bzd21pCgIUC6nVoDotIjplMdYkNfq8AODpxn3HTBnNQ7e609xnWxFo/+httKoWok +fEP9qZk4MJq7lE75iX+wohjLwoF6v0tCB8CrBFJcfKrDvXQSGvKiaEp4g0sEfyXv +gL6X0xKMflupofdnFLJliV0WqGhBOGUghPdLsA02E3e1utj6WABmudMytRxWB8is +SWGaywaEKLSdCgi+XlQVypKeWNMbZZZcftVZ91r4iNTAkw4cv5Wea+YnngfurGCq +J/jUq7aJAiIEEgEKAAwFAlSn7r4FgweGH4AACgkQZhs61tgqu9C9Aw/+JMTXzwni +NPwBxkbcNWbnWODVEElmDloHNpr3z+ryF1XNgbiOY8dn7uwRnPoeCDhIDwvNkK+x +h4xmjH0970v1ltbzcZv0wnK6UeHQssqN9NGsXM9rbodYRIam4yxbwd1ddOC9QZFM +ToRVWiqCzGOVYL50a24OYKClGjm4ncRznXJrNwYMEjxQ3j5FOkXIn0096z3szWCY +6yDpPzOsl2TPwdjMKZWoMEDh/SvY3AxAXo1XqDCj2/+C8dDwO7kn+QAl3fUGmkI6 +dUHCAJm/WtSyvINdphzhZ1ZdkPhqDUKcR0JTX03QJ6bnu5vmmOncWm2NA7rP74fq +KE9XzT808xP0GBwR1co7Eq+/751j2TA33JSlt/hIgi5aEWc4laCingJ02yaW8tUS +DCoVNITaXcF/B47hjBgovQk8TOTsQ0nkSYvOoh05OYBmzl17G57QuPx1stRJ29QA +VLGem1v1mXAuNdHH0kNE+/Rv0A2vGqauLx9ba84RfbXMM4SJw8CjhX6OxhAM8xoU +tO6T56XZS8qLtWLkNQNZNdNlAo6tYk/cTrjdX1M63nYjoVbuc0nic6Wp+dQk/DEb +wsiIpFoisvMK6EH49v70/c9Gtg6rk5z2yBHMZsjo2Y0TheTKwKIUEz0MuTncH8jD +yB/NtQkrbiBdEqRJUoKKUtS0B4cUYTUyd+SJAhwEEAEKAAYFAlSn8agACgkQ8Ar2 +6sJF0gs2yA//cgc+g1wPRFzJeQGv5UFR3TCAMtS+/bzY3UU/eG2Jmbv2qwPbn+kx +RH5dYlZ72VHXEggBaEweCBrBWsweX5dGEMNDLNlI9ArAjjhBAZFFUQKj55EzIZpp +YTbvgxOD2ENKU2HfeQYCGFYZr3L2DXQ1k0U7VnaElBQV3o88CMi7bIsQq2aWk+c6 +Cy15UVr0niVLm95EUZM4yYm2gOGJXUeaGIExSBtiwuzvAiDEGaqfPGAi1ePkNmLJ +3UzYfgiQumSh1kDVlQkCc8UQiF6ckEma618cmmaHs5vZvHsTX5O2/qPkLpXunA/7 +5yM/Jde8a5VbNGWyZ4rmstlWR5rPd7r3uP85miHn7Arait3aGo8RQeAHzOdTvMqS +n3oCotQlOvBhOo7qA8oYQVlU0+77gOfZZeEXDZG13lU95ptFhdsGstIQH67jPQ6z +TpVnd28ip92ysrwvxPhOzO74yKcYoKtzwLctcvptlKTkrFMHP3wJwqbaSfJGK4JE +rjT8WnnWyHY465nTDN9AKkoH4WQNozniWX8OkF3CpPj7ow8roFXlPOxXH4QsaQu3 +Kk31APn/A925d4xyYuWYHZ7A/FzsHafFHPMoG3iwZyuFhfl1UXVvEd8w9mEcxXoh +2iCy87TdpesG0GDzSmWwEYEPkg20BD2+vdc0EekALDjAGM+lfBxN67KIRgQQEQIA +BgUCVKgM0gAKCRAJp6JK0eWCB94UAJ98O6S6r1hFnCLrbU3GeqrA4DCtBQCfcza/ +WoVLc3/+bOf1jzjJ/eJ20IyJAiIEEwEKAAwFAlSoCRMFgweGH4AACgkQhS2G+DXA +JIrWURAAvgl1LkqB9pRPViK1U+xa3b5zt0O/fLbov59aLhA4uPJ10BgaKptflLim +aE2EsS4Mnk0DQgGEBjlywJ5Ft3aMk3vbRz7lDE3zQ3oWa7+N4fcG7WWsAxmh0NtX +Ak7orN6rQcyGgWgpF7wOau79i4VO7oLHKeS7QNs7X59CW+k64TAJabxi74PRoVMz +843qWPjsuFIYM7n/nF0vdECwhSE8zUgcYG2n5CdA0Lq7XRE+II11VOT2XEXFMyR/ +Qh2m7l+jy12MEzHQfGC1HYBo/Zi/MRIN53Rd2LLJWQdMxz/BDiuSxZhKVeCRe7gT +Mc2k3VrmfViBoaUE0zqMbx0j29XUbNQNU3afE8MOBkmyd6AQjoswBEsgU9uyCJYD +Jq3V1stwSVBm9G7X/l8GFlPawLg/uM9gTYb2JYUYPlphTAwVcL469rKQNMhPj2ww +zT7NzjwFb9XrmyiIrqH5z2ieG+LRjajOPVPwBsqZ3gOA+z9QkU1lRYEJOTlEYCkv +8oA6ZeFm31S4JoeogbCDaMiqDszkFtYGBUgGEbnHoCgXi7aINSb17VZ8LTzpD4V9 +vGdFVuE3vJf2POMERP+buLV8OiG38cBJXb+JVSC+pkpm+32nY0UR5ccDPwAC3cGq +SbI6ftKlQeaYp3UEncFUaB8NNZings3jzRexPjzUzo0vhRkkIs2InAQQAQIABgUC +VKg5iQAKCRBfHshviAyeVbEVBACL9Vve0dF0UqO+DN4PzrTOx2JzRw7ujhcrZ6I/ +TCXjANGLWUheylRWhvxMojvbhZEg2835+9l6tpD7BVnrfkBE+LYIKFTusye+WYre +dAaHFpuN6XfmsXmhXaSodhH9gKS+oftYX61qUmiE7L98nvINNBMnFVkptCQVDl8o +GWiMRYhGBBMRAgAGBQJUqBAmAAoJEMSxB5iFeWojCtoAoLa2/SUyfC5EiKdvEbap +49v6XPyxAJ9mPvhe75aTOU7uWoa+c0wn6fXIcrkBDQRUpeK0AQgA7ctg3cJD4eTw +j4sQ94AtSYjwT+Yp7r2s6h4cHUge6AMZy9ixtyg87JnviRFob2zeo2JFDAwtl7Zs +GHo+py/mJwfQKmUsXUmQqgHJFXDiiux+4+dYOXZyVYKP5bTV0JVlKjRjSWNnh7Bv +yZNUZlrLz5ZKF1NAYKJAw4fx3TFbC4K3hvDwHQW3croPQYq0wNq6as956LHYjUOB +Q5K0uy4TXY2EcIyAy253UX9MAFgacuP1jf3ITEVZpcebzl+gcaB54gXqOfmgQQP5 +PmQDyb96ZxFsKa5UfsS3Kh0PeERa5TDlgiw55O55pUSGKKfYfOXvqpJ/ZKYl+ado +wgsmbq09UwARAQABiQEfBBgBAgAJBQJUpeK0AhsMAAoJEKr1td4FvcxTNO0IAJ2b +V48mulcdCS8G3t8qRHlEXGbxgYBQRa500M9fdgRyIWBxubP7r6/nLFDGiIpdUVmT +g9F3r1JsyK6Q7+VUp9XLirj/gT1kwxXT/UHHIQO8ObtPbfFtqISaBjaklTOUPCud ++nOpzRIfct6CZM0xAVIoqm4kaRFaWefxRiyeosDQ7tCD4lDRwxNJE2deE1WmOeN1 +YCJHa8QaewJXtUvqMq6pRmTlzSn+5/w3gV3XVF+CHjGD/COeSm7CGazLmlypN4n8 +ib9eRg0K2rAqKfUbn+aFwmqSBhBcw/UhOoXnteNQvd9KNdKiHERJEI3qZ2rLAlYf +uYT6oSAR9rPSpsZpyTI= +=Jib4 +-----END PGP PUBLIC KEY BLOCK----- + + Type Bits KeyID Created Expires Algorithm Use pub 2048 E2763A73 2014-01-02 ------- RSA Sign & Encrypt fingerprint: 49F6 A8BE 8473 3949 5191 6F3B 61DE 11EC E276 3A73 @@ -2613,4 +2792,3 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJ =nES8 -----END PGP PUBLIC KEY BLOCK----- -$Revision: 8.46 $, Last updated $Date: 2014-01-18 00:20:24 $ Modified: stable/8/contrib/sendmail/README ============================================================================== --- stable/8/contrib/sendmail/README Sat Jul 11 03:42:01 2015 (r285373) +++ stable/8/contrib/sendmail/README Sat Jul 11 03:46:36 2015 (r285374) @@ -211,29 +211,11 @@ There are other files you should read. +--------------+ There are several related RFCs that you may wish to read -- they are -available via anonymous FTP to several sites. For a list of the -primary repositories see: - - http://www.isi.edu/in-notes/rfc-retrieval.txt - -They are also online at: +available from several sites, see + http://www.rfc-editor.org/ http://www.ietf.org/ -They can also be retrieved via electronic mail by sending -email to one of: - - mail-server@nisc.sri.com - Put "send rfcNNN" in message body - nis-info@nis.nsf.net - Put "send RFCnnn.TXT-1" in message body - sendrfc@jvnc.net - Put "RFCnnn" as Subject: line - -For further instructions see: - - http://www.isi.edu/in-notes/rfc-editor/rfc-info - Important RFCs for electronic mail are: RFC821 SMTP protocol Modified: stable/8/contrib/sendmail/RELEASE_NOTES ============================================================================== --- stable/8/contrib/sendmail/RELEASE_NOTES Sat Jul 11 03:42:01 2015 (r285373) +++ stable/8/contrib/sendmail/RELEASE_NOTES Sat Jul 11 03:46:36 2015 (r285374) @@ -5,6 +5,165 @@ This listing shows the version of the se of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.15.2/8.15.2 2015/07/03 + If FEATURE(`nopercenthack') is used then some bogus input triggered + a recursion which was caught and logged as + SYSERR: rewrite: excessive recursion (max 50) ... + Fix based on patch from Ondrej Holas. + DHParameters now by default uses an included 2048 bit prime. + The value 'none' previously caused a log entry claiming + there was an error "cannot read or set DH parameters". + Also note that this option applies to the server side only. + The U= mailer field didn't accept group names containing hyphens, + underbars, or periods. Based on patch from David Gwynne + of the University of Queensland. + CONFIG: Allow connections from IPv6:0:0:0:0:0:0:0:1 to relay again. + Patch from Lars-Johan Liman of Netnod Internet Exchange. + CONFIG: New option UseCompressedIPv6Addresses to select between + compressed and uncompressed IPv6 addresses. The default + value depends on the compile-time option IPV6_FULL: + For 1 the default is False, for 0 it is True, thus + preserving the current behaviour. Based on patch from + John Beck of Oracle. + CONFIG: Account for IPv6 localhost addresses in + FEATURE(`block_bad_helo'). Suggested by Andrey Chernov + from FreeBSD and Robert Scheck from the Fedora Project. + CONFIG: Account for IPv6 localhost addresses in check_mail ruleset. + LIBMILTER: Deal with more invalid protocol data to avoid potential + crashes. Problem noted by Dimitri Kirchner. + LIBMILTER: Allow a milter to specify an empty macro list ("", not + NULL) in smfi_setsymlist() so no macro is sent for the + selected stage. + MAKEMAP: A change to check TrustedUser in fewer cases which was + made in 2013 caused a potential regression when makemap + was run as root (which should not be done anyway). + Note: sendmail often contains options "For Future Releases" + (prefix _FFR_) which might be enabled in a subsequent + version or might simply be removed as they turned out not + to be really useful. These features are usually not + documented but if they are, then the required (FFR) + options are listed in + - doc/op/op.* for rulesets and macros, + - cf/README for mc/cf options. + +8.15.1/8.15.1 2014/12/06 + SECURITY: Properly set the close-on-exec flag for file descriptors + (except stdin, stdout, and stderr) before executing mailers. + If header rewriting fails due to a temporary map lookup failure, + queue the mail for later retry instead of sending it + without rewriting the header. Note: this is done + while the mail is being sent and hence the transaction + is aborted, which only works for SMTP/LMTP mailers + hence the handling of temporary map failures is + suppressed for other mailers. SMTP/LMTP servers may + complain about aborted transactions when this problem + occurs. + See also "DNS Lookups" in sendmail/TUNING. + Incompatible Change: Use uncompressed IPv6 addresses by default, + i.e., they will not contain "::". For example, + instead of ::1 it will be 0:0:0:0:0:0:0:1. This + permits a zero subnet to have a more specific match, + such as different map entries for IPv6:0:0 vs IPv6:0. + This change requires that configuration data + (including maps, files, classes, custom ruleset, + etc) must use the same format, so make certain such + configuration data is updated before using 8.15. + As a very simple check search for patterns like + 'IPv6:[0-9a-fA-F:]*::' and 'IPv6::'. If necessary, + the prior format can be retained by compiling with: + APPENDDEF(`conf_sendmail_ENVDEF', `-DIPV6_FULL=0') + in your devtools/Site/site.config.m4 file. + If debugging is turned on (-d0.14) also print the OpenSSL + versions, both build time and run time + (provided STARTTLS is compiled in). + If a connection to the MTA is dropped by the client before its + hostname can be validated, treat it as "may be forged", + so that the unvalidated hostname is not passed to a + milter in xxfi_connect(). + Add a timeout for communication with socket map servers + which can be specified using the -d option. + Add a compile time option HESIOD_ALLOW_NUMERIC_LOGIN to allow + numeric logins even if HESIOD is enabled. + The new option CertFingerprintAlgorithm specifies the finger- + print algorithm (digest) to use for the presented cert. + If the option is not set, md5 is used and the macro + {cert_md5} contains the cert fingerprint. + However, if the option is set, the specified algorithm + (e.g., sha1) is used and the macro {cert_fp} contains + the cert fingerprint. + That is, as long as the option is not set, the behaviour + does not change, but otherwise, {cert_md5} is superseded + by {cert_fp} even if you set CertFingerprintAlgorithm + to md5. + The options ServerSSLOptions and ClientSSLOptions can be used + to set SSL options for the server and client side + respectively. See SSL_CTX_set_options(3) for a list. + Note: this change turns on SSL_OP_NO_SSLv2 and + SSL_OP_NO_TICKET for the client. See doc/op/op.me + for details. + The option CipherList sets the list of ciphers for STARTTLS. + See ciphers(1) for possible values. + Do not log "STARTTLS: internal error: tls_verify_cb: ssl == NULL" + if a CRLFfile is in use (and LogLevel is 14 or higher.) + Store a more specific TLS protocol version in ${tls_version} + instead of a generic one, e.g., TLSv1 instead of + TLSv1/SSLv3. + Properly set {client_port} value on little endian machines. + Patch from Kelsey Cummings of Sonic.net. + Per RFC 3848, indicate in the Received: header whether SSL or + SMTP AUTH was negotiated by setting the protocol clause + to ESMTPS, ESMTPA, or ESMTPSA instead of ESMTP. + If the 'C' flag is listed as TLSSrvOptions the requirement for the + TLS server to have a cert is removed. This only works + under very specific circumstances and should only be used + if the consequences are understood, e.g., clients + may not work with a server using this. + The options ClientCertFile, ClientKeyFile, ServerCertFile, and + ServerKeyFile can take a second file name, which must be + separated from the first with a comma (note: do not use + any spaces) to set up a second cert/key pair. This can + be used to have certs of different types, e.g., RSA + and DSA. + A new map type "arpa" is available to reverse an IP (IPv4 or IPv6) + address. It returns the string for the PTR lookup, but + without trailing {ip6,in-addr}.arpa. + New operation mode 'C' just checks the configuration file, e.g., + sendmail -C new.cf -bC + will perform a basic syntax/consistency check of new.cf. + The mailer flag 'I' is deprecated and will be removed in a + future version. + Allow local (not just TCP) socket connections to the server, e.g., + O DaemonPortOptions=Family=local, Addr=/var/mta/server.sock + can be used. + If the new option MaxQueueAge is set to a value greater than zero, + entries in the queue will be retried during a queue run + only if the individual retry time has been reached which + is doubled for each attempt. The maximum retry time is + limited by the specified value. + New DontBlameSendmail option GroupReadableDefaultAuthInfoFile + to relax requirement for DefaultAuthInfo file. + Reset timeout after receiving a message to appropriate value if + STARTTLS is in use. Based on patch by Kelsey Cummings + of Sonic.net. + Report correct error messages from the LDAP library for a range of + small negative return values covering those used by OpenLDAP. + Fix compilation with Berkeley DB 5.0 and 6.0. Patch from + Allan E Johannesen of Worcester Polytechnic Institute. + CONFIG: FEATURE(`nopercenthack') takes one parameter: reject or + nospecial which describes whether to disallow "%" in the + local part of an address. + DEVTOOLS: Fix regression in auto-detection of libraries when only + shared libraries are available. Problem reported by + Bryan Costales. + LIBMILTER: Mark communication socket as close-on-exec in case + a user's filter starts other applications. + Based on patch from Paul Howarth. + Portability: + SunOS 5.12 has changed the API for sigwait(2) to conform + with XPG7. Based on patch from Roger Faulkner of Oracle. + Deleted Files: + libsm/path.c + 8.14.9/8.14.9 2014/05/21 SECURITY: Properly set the close-on-exec flag for file descriptors (except stdin, stdout, and stderr) before executing mailers. @@ -681,7 +840,7 @@ summary of the changes in that release. LIBMILTER: The "hostname" argument of the xxfi_connect() callback previously was the equivalent of {client_ptr}. However, this did not match the documentation of the function, hence - it has been changed to {client_name}. See doc/op/op.* + it has been changed to {client_name}. See doc/op/op.me about these macros. 8.13.7/8.13.7 2006/06/14 @@ -3509,11 +3668,11 @@ summary of the changes in that release. Add new STARTTLS related options CACERTPath, CACERTFile, ClientCertFile, ClientKeyFile, DHParameters, RandFile, ServerCertFile, and ServerKeyFile. These are documented in - cf/README and doc/op/op.*. + cf/README and doc/op/op.me. New STARTTLS related macros: ${cert_issuer}, ${cert_subject}, ${tls_version}, ${cipher}, ${cipher_bits}, ${verify}, ${server_name}, and ${server_addr}. These are documented - in cf/README and doc/op/op.*. + in cf/README and doc/op/op.me. Add support for the Entropy Gathering Daemon (EGD) for better random data. New DontBlameSendmail option InsufficientEntropy for systems which Modified: stable/8/contrib/sendmail/cf/README ============================================================================== --- stable/8/contrib/sendmail/cf/README Sat Jul 11 03:42:01 2015 (r285373) +++ stable/8/contrib/sendmail/cf/README Sat Jul 11 03:46:36 2015 (r285374) @@ -158,6 +158,26 @@ FEATURE(`local_procmail'). ******************************************************************* +Note: +Some rulesets, features, and options are only useful if the sendmail +binary has been compiled with the appropriate options, e.g., the +ruleset tls_server is only invoked if sendmail has been compiled +with STARTTLS. This is usually obvious from the context and hence +not further specified here. +There are also so called "For Future Releases" (FFR) compile time +options which might be included in a subsequent version or might +simply be removed as they turned out not to be really useful. +These are generally not documented but if they are, then the required +compile time options are listed in doc/op/op.* for rulesets and +macros, and for mc/cf specific options they are usually listed here. +In addition to compile time options for the sendmail binary, there +can also be FFRs for mc/cf which in general can be enabled when the +configuration file is generated by defining them at the top of your +.mc file: + +define(`_FFR_NAME_HERE', 1) + + +----------------------------+ | A BRIEF INTRODUCTION TO M4 | +----------------------------+ @@ -397,6 +417,10 @@ SMTP_MAILER_CHARSET [undefined] If defin that ARRIVE from an address that resolves to one of the SMTP mailers and which are converted to MIME will be labeled with this character set. +RELAY_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data + that ARRIVE from an address that resolves to the + relay mailers and which are converted to MIME will + be labeled with this character set. SMTP_MAILER_LL [990] The maximum line length for SMTP mailers (except the relay mailer). RELAY_MAILER_LL [2040] The maximum line length for the relay mailer. @@ -743,6 +767,16 @@ nouucp Don't route UUCP addresses. Thi 2. don't remove "!" from OperatorChars if `reject' is given as parameter. +nopercenthack Don't treat % as routing character. This feature takes one + parameter: + `reject': reject addresses which have % in the local + part unless it originates from a system + that is allowed to relay. + `nospecial': don't do anything special with %. + Warnings: 1. See the notice in the anti-spam section. + 2. Don't remove % from OperatorChars if `reject' is + given as parameter. + nocanonify Don't pass addresses to $[ ... $] for canonification by default, i.e., host/domain names are considered canonical, except for unqualified names, which must not be used in this @@ -1441,7 +1475,7 @@ msp Defines config file for Message Sub by default. If you have a machine with IPv6 only, change it to - FEATURE(`msp', `[IPv6:::1]') + FEATURE(`msp', `[IPv6:0:0:0:0:0:0:0:1]') If you want to continue using '[localhost]', (the behavior up to 8.12.6), use @@ -1499,8 +1533,12 @@ block_bad_helo Reject messages from SMTP - connections from IP addresses in class $={R}. Currently access_db lookups can not be used to (selectively) disable this test, moreover, + FEATURE(`delay_checks') - is required. + + is required. Note, the block_bad_helo feature automatically + adds the IPv6 and IPv4 localhost IP addresses to $={w} (local + host names) and $={R} (relay permitted). require_rdns Reject mail from connecting SMTP clients without proper rDNS (reverse DNS), functional gethostbyaddr() resolution. @@ -2442,17 +2480,19 @@ should only be used for sites which have that they provide a gateway for. Use this FEATURE with caution as it can allow spammers to relay through your server if not setup properly. -NOTICE: It is possible to relay mail through a system which the anti-relay -rules do not prevent: the case of a system that does use FEATURE(`nouucp', -`nospecial') (system A) and relays local messages to a mail hub (e.g., via -LOCAL_RELAY or LUSER_RELAY) (system B). If system B doesn't use -FEATURE(`nouucp') at all, addresses of the form - would be relayed to . -System A doesn't recognize `!' as an address separator and therefore -forwards it to the mail hub which in turns relays it because it came from -a trusted local host. So if a mailserver allows UUCP (bang-format) -addresses, all systems from which it allows relaying should do the same -or reject those addresses. +NOTICE: It is possible to relay mail through a system which the +anti-relay rules do not prevent: the case of a system that does use +FEATURE(`nouucp', `nospecial') / FEATURE(`nopercenthack', `nospecial') +(system A) and relays local messages to a mail hub (e.g., via +LOCAL_RELAY or LUSER_RELAY) (system B). If system B doesn't use the +same feature (nouucp / nopercenthack) at all, addresses of the form + / +would be relayed to . +System A doesn't recognize `!' / `%' as an address separator and +therefore forwards it to the mail hub which in turns relays it +because it came from a trusted local host. So if a mailserver +allows UUCP (bang-format) / %-hack addresses, all systems from which +it allows relaying should do the same or reject those addresses. As of 8.9, sendmail will refuse mail if the MAIL FROM: parameter has an unresolvable domain (i.e., one that DNS, your local name service, @@ -3160,17 +3200,49 @@ TLS_Clt:laptop.example.com PERM+VER TLS_Rcpt:darth@endmail.org ENCR:112+CN:smtp.endmail.org -Disabling STARTTLS And Setting SMTP Server Features ---------------------------------------------------- +TLS Options per Session +----------------------- By default STARTTLS is used whenever possible. However, there are -some broken MTAs that don't properly implement STARTTLS. To be able -to send to (or receive from) those MTAs, the ruleset try_tls -(srv_features) can be used that work together with the access map. -Entries for the access map must be tagged with Try_TLS (Srv_Features) -and refer to the hostname or IP address of the connecting system. -A default case can be specified by using just the tag. For example, -the following entries in the access map: +MTAs with STARTTLS interoperability issues. To be able to send to +(or receive from) those MTAs several features are available: + +1) Various TLS options be be set per IP/domain. +2) STARTTLS can be turned off for specific IP addresses/domains. + +About 1): the rulesets tls_srv_features and tls_clt_features can +be used to return a (semicolon separated) list of TLS related +options: + +- Options: compare {Server,Client}SSLOptions. +- CipherList: same as the global option. +- CertFile, KeyFile: {Server,Client}{Cert,Key}File + +If FEATURE(`tls_session_features') is used, then default rulesets +are activated which look up entries in the access map with the tags +TLS_Srv_features and TLS_Clt_features, respectively. +For example, these entries: + + TLS_Srv_features:10.0.2.4 CipherList=MEDIUM+aRSA; + TLS_Clt_features:10.1.0.1 Options=SSL_OP_NO_TLSv1_2; CipherList=ALL:-EXPORT + +specify a cipherlist with MEDIUM strength ciphers that use RSA +certificates only for the client with the IP address 10.0.2.4, +and turn off TLSv1.2 when connecting to the server with the IP +address 10.1.0.1 as well as setting a specific cipherlist. +If FEATURE(`tls_session_features') is not used the user can provide +their own rulesets which must return the appropriate data. +If the rulesets are not defined or do not return a value, the +default TLS options are not modified. +(These rulesets require the sendmail binary to be built with +_FFR_TLS_SE_OPTS enabled.) + +About 2): the ruleset try_tls (srv_features) can be used that work +together with the access map. Entries for the access map must be +tagged with Try_TLS (Srv_Features) and refer to the hostname or IP +address of the connecting system. A default case can be specified +by using just the tag. For example, the following entries in the +access map: Try_TLS:broken.server NO Srv_Features:my.domain v @@ -3756,6 +3828,12 @@ confSINGLE_THREAD_DELIVERY SingleThread cached but otherwise idle connection to a host will prevent other sendmails from connecting to the other host. +confUSE_COMPRESSED_IPV6_ADDRESSES + UseCompressedIPv6Addresses + [undefined] If set, use the compressed + form of IPv6 addresses, such as + IPV6:::1, instead of the uncompressed + form, such as IPv6:0:0:0:0:0:0:0:1. confUSE_ERRORS_TO* UseErrorsTo [False] Use the Errors-To: header to deliver error messages. This should not be necessary because of general @@ -3990,6 +4068,13 @@ confWORK_TIME_FACTOR RetryFactor [90000] confQUEUE_SORT_ORDER QueueSortOrder [Priority] Queue sort algorithm: Priority, Host, Filename, Random, Modification, or Time. +confMAX_QUEUE_AGE MaxQueueAge [undefined] If set to a value greater + than zero, entries in the queue + will be retried during a queue run + only if the individual retry time + has been reached which is doubled + for each attempt. The maximum retry + time is limited by the specified value. confMIN_QUEUE_AGE MinQueueAge [0] The minimum amount of time a job must sit in the queue between queue runs. This allows you to set the @@ -4208,7 +4293,7 @@ confAUTH_MECHANISMS AuthMechanisms [GSSA confAUTH_REALM AuthRealm [undefined] The authentication realm that is passed to the Cyrus SASL library. If no realm is specified, - $j is used. + $j is used. See KNOWNBUGS. confDEF_AUTH_INFO DefaultAuthInfo [undefined] Name of file that contains authentication information for outgoing connections. This file must @@ -4241,6 +4326,14 @@ confTLS_SRV_OPTIONS TLSSrvOptions If thi verification is performed, i.e., the server doesn't ask for a certificate. +confSERVER_SSL_OPTIONS ServerSSLOptions [undefined] SSL related + options for server side. See + SSL_CTX_set_options(3) for a list. +confCLIENT_SSL_OPTIONS ClientSSLOptions [undefined] SSL related + options for client side. See + SSL_CTX_set_options(3) for a list. +confCIPHER_LIST CipherList [undefined] Cipher list for TLS. + See ciphers(1) for possible values. confLDAP_DEFAULT_SPEC LDAPDefaultSpec [undefined] Default map specification for LDAP maps. The value should only contain LDAP @@ -4250,10 +4343,11 @@ confLDAP_DEFAULT_SPEC LDAPDefaultSpec [u maps unless they are specified in the individual map specification ('K' command). -confCACERT_PATH CACertPath [undefined] Path to directory - with certs of CAs. -confCACERT CACertFile [undefined] File containing one CA - cert. +confCACERT_PATH CACertPath [undefined] Path to directory with + certificates of CAs which must contain + their hashes as filenames or links. +confCACERT CACertFile [undefined] File containing at least + one CA certificate. confSERVER_CERT ServerCertFile [undefined] File containing the cert of the server, i.e., this cert is used when sendmail acts as @@ -4281,6 +4375,10 @@ confRAND_FILE RandFile [undefined] File requires this option if the compile flag HASURANDOM is not set (see sendmail/README). +confCERT_FINGERPRINT_ALGORITHM CertFingerprintAlgorithm + [undefined] The fingerprint algorithm + (digest) to use for the presented + cert. confNICE_QUEUE_RUN NiceQueueRun [undefined] If set, the priority of queue runners is set the given value (nice(3)). Modified: stable/8/contrib/sendmail/cf/cf/Makefile ============================================================================== --- stable/8/contrib/sendmail/cf/cf/Makefile Sat Jul 11 03:42:01 2015 (r285373) +++ stable/8/contrib/sendmail/cf/cf/Makefile Sat Jul 11 03:46:36 2015 (r285374) @@ -100,6 +100,7 @@ M4FILES=\ ${CFDIR}/feature/access_db.m4 \ ${CFDIR}/feature/allmasquerade.m4 \ ${CFDIR}/feature/always_add_domain.m4 \ + ${CFDIR}/feature/bcc.m4 \ ${CFDIR}/feature/bestmx_is_local.m4 \ ${CFDIR}/feature/bitdomain.m4 \ ${CFDIR}/feature/blacklist_recipients.m4 \ @@ -118,9 +119,11 @@ M4FILES=\ ${CFDIR}/feature/masquerade_envelope.m4 \ ${CFDIR}/feature/no_default_msa.m4 \ ${CFDIR}/feature/nocanonify.m4 \ + ${CFDIR}/feature/nopercenthack.m4 \ ${CFDIR}/feature/notsticky.m4 \ ${CFDIR}/feature/nouucp.m4 \ ${CFDIR}/feature/nullclient.m4 \ + ${CFDIR}/feature/prefixmod.m4 \ ${CFDIR}/feature/promiscuous_relay.m4 \ ${CFDIR}/feature/redirect.m4 \ ${CFDIR}/feature/ratecontrol.m4 \ @@ -131,12 +134,14 @@ M4FILES=\ ${CFDIR}/feature/relay_mail_from.m4 \ ${CFDIR}/feature/smrsh.m4 \ ${CFDIR}/feature/stickyhost.m4 \ + ${CFDIR}/feature/tls_session_features.m4 \ ${CFDIR}/feature/use_ct_file.m4 \ ${CFDIR}/feature/use_cw_file.m4 \ ${CFDIR}/feature/uucpdomain.m4 \ ${CFDIR}/feature/virtuser_entire_domain.m4 \ ${CFDIR}/feature/virtusertable.m4 \ ${CFDIR}/hack/cssubdomain.m4 \ + ${CFDIR}/hack/xconnect.m4 \ ${CFDIR}/m4/cf.m4 \ ${CFDIR}/m4/cfhead.m4 \ ${CFDIR}/m4/proto.m4 \ Modified: stable/8/contrib/sendmail/cf/cf/submit.cf ============================================================================== --- stable/8/contrib/sendmail/cf/cf/submit.cf Sat Jul 11 03:42:01 2015 (r285373) +++ stable/8/contrib/sendmail/cf/cf/submit.cf Sat Jul 11 03:46:36 2015 (r285374) @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@lab.smi.sendmail.com on Tue May 20 12:12:52 PDT 2014 -##### in /home/ca/sm8.git/sendmail/OpenSource/sendmail-8.14.9/cf/cf +##### built by ca@sandman.dev-lab.sendmail.com on Thu Jul 2 05:24:31 PDT 2015 +##### in /x/ca/smi.git/sendmail/OpenSource/sendmail-8.15.2/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1] # Configuration version number -DZ8.14.9/Submit +DZ8.15.2/Submit ############### @@ -202,6 +202,9 @@ O ConnectionCacheTimeout=5m # use Errors-To: header? O UseErrorsTo=False +# use compressed IPv6 address format? +#O UseCompressedIPv6Addresses + # log level O LogLevel=9 @@ -251,6 +254,9 @@ O PrivacyOptions=goaway,noetrn,restrictq # minimum time in queue before retry #O MinQueueAge=30m +# maximum time in queue before retry (if > 0; only for exponential delay) +#O MaxQueueAge + # how many jobs can you process in the queue? #O MaxQueueRunSize=0 @@ -501,6 +507,12 @@ O PidFile=/var/spool/clientmqueue/sm-cli # SMTP STARTTLS server options #O TLSSrvOptions +# SSL cipherlist +#O CipherList +# server side SSL options +#O ServerSSLOptions +# client side SSL options +#O ClientSSLOptions # Input mail filters #O InputMailFilters @@ -524,6 +536,8 @@ O PidFile=/var/spool/clientmqueue/sm-cli #O DHParameters # Random data source (required for systems without /dev/urandom under OpenSSL) #O RandFile +# fingerprint algorithm (digest) to use for the presented cert +#O CertFingerprintAlgorithm # Maximum number of "useless" commands before slowing down #O MaxNOOPCommands=20 @@ -531,6 +545,8 @@ O PidFile=/var/spool/clientmqueue/sm-cli # Name to use for EHLO (defaults to $j) #O HeloName + + ############################ # QUEUE GROUP DEFINITIONS # ############################ @@ -645,6 +661,7 @@ R$- . $- :: $+ $@ $>Canonify2 $3 < @ $1 # if we have % signs, take the rightmost one R$* % $* $1 @ $2 First make them all @s. R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last. + R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish # else we must be a local name @@ -781,6 +798,7 @@ R$* $=O $* < @ *LOCAL* > $@ $>Parse0 $>canonify $1 $2 $3 ...@*LOCAL* -> ... R$* < @ *LOCAL* > $: $1 + # # Parse1 -- the bottom half of ruleset 0. # @@ -818,6 +836,8 @@ R$* < @$* > $* $#esmtp $@ $2 $: $1 < @ R$=L $#local $: @ $1 special local names R$+ $#local $: $1 regular local names + + ########################################################################### ### Ruleset 5 -- special rewriting after aliases have been expanded ### ########################################################################### @@ -1027,6 +1047,10 @@ R$* $| $* $: $2 R<@> < $* @ localhost > $: < ? $&{client_name} > < $1 @ localhost > R<@> < $* @ [127.0.0.1] > $: < ? $&{client_name} > < $1 @ [127.0.0.1] > +R<@> < $* @ [IPv6:0:0:0:0:0:0:0:1] > + $: < ? $&{client_name} > < $1 @ [IPv6:0:0:0:0:0:0:0:1] > +R<@> < $* @ [IPv6:::1] > + $: < ? $&{client_name} > < $1 @ [IPv6:::1] > R<@> < $* @ localhost.$m > $: < ? $&{client_name} > < $1 @ localhost.$m > R<@> < $* @ localhost.UUCP > @@ -1141,6 +1165,7 @@ R$* $: $&{client_addr} R$@ $@ RELAY originated locally R0 $@ RELAY originated locally R127.0.0.1 $@ RELAY originated locally +RIPv6:0:0:0:0:0:0:0:1 $@ RELAY originated locally RIPv6:::1 $@ RELAY originated locally R$=R $* $@ RELAY relayable IP address R$* $: [ $1 ] put brackets around it... @@ -1245,6 +1270,8 @@ STLS_connection RSOFTWARE $#error $@ 4.7.0 $: "403 TLS handshake." + + ###################################################################### ### RelayTLS: allow relaying based on TLS authentication ### @@ -1442,7 +1469,7 @@ Mrelay, P=[IPC], F=mDFMuXa8k, S=EnvFrom ### submit.mc ### # divert(-1) # # *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jul 11 03:50:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65B5199705A; Sat, 11 Jul 2015 03:50:07 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 55650DBB; Sat, 11 Jul 2015 03:50:07 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B3o7Lu097845; Sat, 11 Jul 2015 03:50:07 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B3o7WB097844; Sat, 11 Jul 2015 03:50:07 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110350.t6B3o7WB097844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 03:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285375 - stable/9/etc/sendmail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 03:50:07 -0000 Author: gshapiro Date: Sat Jul 11 03:50:06 2015 New Revision: 285375 URL: https://svnweb.freebsd.org/changeset/base/285375 Log: MFC: Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.15.2/cf tree. Modified: stable/9/etc/sendmail/freebsd.submit.mc Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/sendmail/freebsd.submit.mc ============================================================================== --- stable/9/etc/sendmail/freebsd.submit.mc Sat Jul 11 03:46:36 2015 (r285374) +++ stable/9/etc/sendmail/freebsd.submit.mc Sat Jul 11 03:50:06 2015 (r285375) @@ -7,7 +7,6 @@ divert(-1) # forth in the LICENSE file which can be found at the top level of # the sendmail distribution. # -# # # This is the FreeBSD configuration for a set-group-ID sm-msp sendmail From owner-svn-src-all@freebsd.org Sat Jul 11 03:50:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80BA3997091; Sat, 11 Jul 2015 03:50:18 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 6FB1BF00; Sat, 11 Jul 2015 03:50:18 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B3oIX3097908; Sat, 11 Jul 2015 03:50:18 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B3oIej097907; Sat, 11 Jul 2015 03:50:18 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110350.t6B3oIej097907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 03:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r285376 - stable/8/etc/sendmail X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 03:50:18 -0000 Author: gshapiro Date: Sat Jul 11 03:50:17 2015 New Revision: 285376 URL: https://svnweb.freebsd.org/changeset/base/285376 Log: MFC: Minor changes to force commit these files so new freebsd*.cf files are built to use the new sendmail-8.15.2/cf tree. Modified: stable/8/etc/sendmail/freebsd.submit.mc Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/sendmail/freebsd.submit.mc ============================================================================== --- stable/8/etc/sendmail/freebsd.submit.mc Sat Jul 11 03:50:06 2015 (r285375) +++ stable/8/etc/sendmail/freebsd.submit.mc Sat Jul 11 03:50:17 2015 (r285376) @@ -7,7 +7,6 @@ divert(-1) # forth in the LICENSE file which can be found at the top level of # the sendmail distribution. # -# # # This is the FreeBSD configuration for a set-group-ID sm-msp sendmail From owner-svn-src-all@freebsd.org Sat Jul 11 03:52:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2E4A9971C8; Sat, 11 Jul 2015 03:52:56 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 DDDF61213; Sat, 11 Jul 2015 03:52:56 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B3quti001468; Sat, 11 Jul 2015 03:52:56 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B3quJf001467; Sat, 11 Jul 2015 03:52:56 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110352.t6B3quJf001467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 03:52:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285377 - stable/9/contrib/sendmail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 03:52:57 -0000 Author: gshapiro Date: Sat Jul 11 03:52:55 2015 New Revision: 285377 URL: https://svnweb.freebsd.org/changeset/base/285377 Log: MFC: Update for sendmail 8.15.2 import Modified: stable/9/contrib/sendmail/FREEBSD-upgrade Directory Properties: stable/9/contrib/sendmail/ (props changed) Modified: stable/9/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- stable/9/contrib/sendmail/FREEBSD-upgrade Sat Jul 11 03:50:17 2015 (r285376) +++ stable/9/contrib/sendmail/FREEBSD-upgrade Sat Jul 11 03:52:55 2015 (r285377) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.14.9 +sendmail 8.15.2 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -97,4 +97,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -21-May-2014 +10-July-2015 From owner-svn-src-all@freebsd.org Sat Jul 11 03:53:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B28BB997208; Sat, 11 Jul 2015 03:53:04 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 A1D82145B; Sat, 11 Jul 2015 03:53:04 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B3r4Wj001553; Sat, 11 Jul 2015 03:53:04 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B3r4jr001552; Sat, 11 Jul 2015 03:53:04 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110353.t6B3r4jr001552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 03:53:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r285378 - stable/8/contrib/sendmail X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 03:53:04 -0000 Author: gshapiro Date: Sat Jul 11 03:53:03 2015 New Revision: 285378 URL: https://svnweb.freebsd.org/changeset/base/285378 Log: MFC: Update for sendmail 8.15.2 import Modified: stable/8/contrib/sendmail/FREEBSD-upgrade Directory Properties: stable/8/contrib/sendmail/ (props changed) Modified: stable/8/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- stable/8/contrib/sendmail/FREEBSD-upgrade Sat Jul 11 03:52:55 2015 (r285377) +++ stable/8/contrib/sendmail/FREEBSD-upgrade Sat Jul 11 03:53:03 2015 (r285378) @@ -1,6 +1,6 @@ $FreeBSD$ -sendmail 8.14.9 +sendmail 8.15.2 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following directories were renamed: @@ -97,4 +97,4 @@ infrastructure in FreeBSD: usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -21-May-2014 +10-July-2015 From owner-svn-src-all@freebsd.org Sat Jul 11 03:57:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD73B997295; Sat, 11 Jul 2015 03:57:12 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 BCEAC1657; Sat, 11 Jul 2015 03:57:12 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B3vCsj002175; Sat, 11 Jul 2015 03:57:12 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B3vC2g002174; Sat, 11 Jul 2015 03:57:12 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110357.t6B3vC2g002174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 03:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285379 - stable/9/etc/sendmail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 03:57:12 -0000 Author: gshapiro Date: Sat Jul 11 03:57:11 2015 New Revision: 285379 URL: https://svnweb.freebsd.org/changeset/base/285379 Log: Previous MFC to trigger new .cf builds didn't catch freebsd.mc. Modified: stable/9/etc/sendmail/freebsd.mc Modified: stable/9/etc/sendmail/freebsd.mc ============================================================================== --- stable/9/etc/sendmail/freebsd.mc Sat Jul 11 03:53:03 2015 (r285378) +++ stable/9/etc/sendmail/freebsd.mc Sat Jul 11 03:57:11 2015 (r285379) @@ -33,6 +33,7 @@ divert(-1) # SUCH DAMAGE. # + # # This is a generic configuration file for FreeBSD 6.X and later systems. # If you want to customize it, copy it to a name appropriate for your From owner-svn-src-all@freebsd.org Sat Jul 11 03:57:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D2909972DB; Sat, 11 Jul 2015 03:57:37 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 67F891924; Sat, 11 Jul 2015 03:57:37 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B3vbuE002280; Sat, 11 Jul 2015 03:57:37 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B3vbj4002279; Sat, 11 Jul 2015 03:57:37 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110357.t6B3vbj4002279@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 03:57:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r285380 - stable/8/etc/sendmail X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 03:57:37 -0000 Author: gshapiro Date: Sat Jul 11 03:57:36 2015 New Revision: 285380 URL: https://svnweb.freebsd.org/changeset/base/285380 Log: Previous MFC to trigger new .cf builds didn't catch freebsd.mc. Modified: stable/8/etc/sendmail/freebsd.mc Modified: stable/8/etc/sendmail/freebsd.mc ============================================================================== --- stable/8/etc/sendmail/freebsd.mc Sat Jul 11 03:57:11 2015 (r285379) +++ stable/8/etc/sendmail/freebsd.mc Sat Jul 11 03:57:36 2015 (r285380) @@ -33,6 +33,7 @@ divert(-1) # SUCH DAMAGE. # + # # This is a generic configuration file for FreeBSD 6.X and later systems. # If you want to customize it, copy it to a name appropriate for your From owner-svn-src-all@freebsd.org Sat Jul 11 04:20:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94F97997804; Sat, 11 Jul 2015 04:20:57 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 6AB2D9FC; Sat, 11 Jul 2015 04:20:57 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B4Kvnn018696; Sat, 11 Jul 2015 04:20:57 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B4KvnP018695; Sat, 11 Jul 2015 04:20:57 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201507110420.t6B4KvnP018695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Sat, 11 Jul 2015 04:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285381 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 04:20:57 -0000 Author: jmg Date: Sat Jul 11 04:20:56 2015 New Revision: 285381 URL: https://svnweb.freebsd.org/changeset/base/285381 Log: some additional improvements to the documentation... Sponsored by: Netflix, Inc. Modified: head/share/man/man9/crypto.9 Modified: head/share/man/man9/crypto.9 ============================================================================== --- head/share/man/man9/crypto.9 Sat Jul 11 03:57:36 2015 (r285380) +++ head/share/man/man9/crypto.9 Sat Jul 11 04:20:56 2015 (r285381) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2015 +.Dd July 10, 2015 .Dt CRYPTO 9 .Os .Sh NAME @@ -40,6 +40,8 @@ .Ft void .Fn crypto_kdone "struct cryptkop *" .Ft int +.Fn crypto_find_driver "const char *" +.Ft int .Fn crypto_newsession "uint64_t *" "struct cryptoini *" int .Ft int .Fn crypto_freesession uint64_t @@ -157,15 +159,28 @@ was a fatal error in verifying the argum For session initialization and teardown there is no callback mechanism used. .Pp The +.Fn crypto_find_driver +function may be called to return the specific id of the provided name. +If the specified driver could not be found, the returned id is -1. +.Pp +The .Fn crypto_newsession routine is called by consumers of cryptographic services (such as the .Xr ipsec 4 stack) that wish to establish a new session with the framework. -On success, the first argument will contain the Session Identifier (SID). The second argument contains all the necessary information for the driver to establish the session. -The third argument indicates whether a -hardware driver (1) should be used or not (0). +The third argument is either a specific driver id, or one or both +of +.Dv CRYPTOCAP_F_HARDWARE , +to select hardware devices, +or +.Dv CRYPTOCAP_F_SOFTWARE , +to select software devices. +If both are specified, a hardware device will be returned +before a software device will be. +On success, the value pointed to by the first argument will be the +Session IDentifier (SID). The various fields in the .Vt cryptoini structure are: From owner-svn-src-all@freebsd.org Sat Jul 11 04:48:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B378D997CDB; Sat, 11 Jul 2015 04:48:45 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from thyme.infocus-llc.com (thyme.infocus-llc.com [199.15.120.10]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84646159E; Sat, 11 Jul 2015 04:48:45 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from draco.over-yonder.net (c-75-65-60-66.hsd1.ms.comcast.net [75.65.60.66]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by thyme.infocus-llc.com (Postfix) with ESMTPSA id 355A537B643; Fri, 10 Jul 2015 23:48:44 -0500 (CDT) Received: by draco.over-yonder.net (Postfix, from userid 100) id 3mSzK74RFDz2tD; Fri, 10 Jul 2015 23:48:43 -0500 (CDT) Date: Fri, 10 Jul 2015 23:48:43 -0500 From: "Matthew D. Fuller" To: "George V. Neville-Neil" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285336 - in head/sys: netipsec opencrypto Message-ID: <20150711044843.GG96394@over-yonder.net> References: <201507091816.t69IGawf097288@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201507091816.t69IGawf097288@repo.freebsd.org> X-Editor: vi X-OS: FreeBSD User-Agent: Mutt/1.5.23-fullermd.4 (2014-03-12) X-Virus-Scanned: clamav-milter 0.98.7 at thyme.infocus-llc.com X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 04:48:45 -0000 On Thu, Jul 09, 2015 at 06:16:36PM +0000 I heard the voice of George V. Neville-Neil, and lo! it spake thus: > New Revision: 285336 > URL: https://svnweb.freebsd.org/changeset/base/285336 > > Log: > Add support for AES modes to IPSec. These modes work both in software only > mode and with hardware support on systems that have AESNI instructions. With (apparently) this change, I can trigger a panic at will by running % geli onetime -e AES-XTS -d /dev/ada0s1 My best guess is that it comes from > -#define RIJNDAEL128_BLOCK_LEN 16 > +#define AES_MIN_BLOCK_LEN 1 > - RIJNDAEL128_BLOCK_LEN, 8, 32, 64, > + AES_MIN_BLOCK_LEN, AES_XTS_IV_LEN, AES_XTS_MIN_KEY, AES_XTS_MAX_KEY, changing that first arg from 16 to 1. It seems to be avoided with the following patch: ------8K-------- Index: sys/opencrypto/xform.c =================================================================== --- sys/opencrypto/xform.c (revision 285365) +++ sys/opencrypto/xform.c (working copy) @@ -257,7 +257,7 @@ struct enc_xform enc_xform_aes_xts = { CRYPTO_AES_XTS, "AES-XTS", - AES_MIN_BLOCK_LEN, AES_XTS_IV_LEN, AES_XTS_MIN_KEY, AES_XTS_MAX_KEY, + AES_BLOCK_LEN, AES_XTS_IV_LEN, AES_XTS_MIN_KEY, AES_XTS_MAX_KEY, aes_xts_encrypt, aes_xts_decrypt, aes_xts_setkey, ------8K-------- at least in a little testing here. If that's the actual fix, some of the other MIN_BLOCK_LEN changes in GCM and GMAC are probably suspect too. (I also wonder why AES-ICM is still using the RIJNDAEL128 #defines; shouldn't it be using the AES's too? But that's cosmtic...) -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream. From owner-svn-src-all@freebsd.org Sat Jul 11 04:54:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38DB9997ECA; Sat, 11 Jul 2015 04:54:47 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 281AA1B2C; Sat, 11 Jul 2015 04:54:47 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B4slvk035292; Sat, 11 Jul 2015 04:54:47 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B4slTH035291; Sat, 11 Jul 2015 04:54:47 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110454.t6B4slTH035291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 04:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285382 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 04:54:47 -0000 Author: gshapiro Date: Sat Jul 11 04:54:46 2015 New Revision: 285382 URL: https://svnweb.freebsd.org/changeset/base/285382 Log: Note merge of sendmail 8.15.2 Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jul 11 04:20:56 2015 (r285381) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jul 11 04:54:46 2015 (r285382) @@ -119,7 +119,8 @@ Contributed Software -   + The sendmail + utility has been updated to version 8.15.2. From owner-svn-src-all@freebsd.org Sat Jul 11 04:55:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3928D997F02; Sat, 11 Jul 2015 04:55:02 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 285C31C83; Sat, 11 Jul 2015 04:55:02 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B4t25k035434; Sat, 11 Jul 2015 04:55:02 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B4t2kj035433; Sat, 11 Jul 2015 04:55:02 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201507110455.t6B4t2kj035433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 11 Jul 2015 04:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r285383 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 04:55:02 -0000 Author: gshapiro Date: Sat Jul 11 04:55:01 2015 New Revision: 285383 URL: https://svnweb.freebsd.org/changeset/base/285383 Log: Note merge of sendmail 8.15.2 Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jul 11 04:54:46 2015 (r285382) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jul 11 04:55:01 2015 (r285383) @@ -1173,8 +1173,8 @@ OpenSSL has been updated to version 0.9.8q. - sendmail has - been updated to version 8.14.9. + sendmail has + been updated to version 8.15.2. The timezone database has been updated to the tzdata2010o From owner-svn-src-all@freebsd.org Sat Jul 11 07:57:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20C0A998DBD; Sat, 11 Jul 2015 07:57:07 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F1B34AA; Sat, 11 Jul 2015 07:57:06 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t6B7v5jk069736 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Jul 2015 00:57:05 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t6B7v52S069735; Sat, 11 Jul 2015 00:57:05 -0700 (PDT) (envelope-from jmg) Date: Sat, 11 Jul 2015 00:57:05 -0700 From: John-Mark Gurney To: "Matthew D. Fuller" Cc: "George V. Neville-Neil" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285336 - in head/sys: netipsec opencrypto Message-ID: <20150711075705.GC8523@funkthat.com> References: <201507091816.t69IGawf097288@repo.freebsd.org> <20150711044843.GG96394@over-yonder.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150711044843.GG96394@over-yonder.net> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sat, 11 Jul 2015 00:57:05 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 07:57:07 -0000 Matthew D. Fuller wrote this message on Fri, Jul 10, 2015 at 23:48 -0500: > On Thu, Jul 09, 2015 at 06:16:36PM +0000 I heard the voice of > George V. Neville-Neil, and lo! it spake thus: > > New Revision: 285336 > > URL: https://svnweb.freebsd.org/changeset/base/285336 > > > > Log: > > Add support for AES modes to IPSec. These modes work both in software only > > mode and with hardware support on systems that have AESNI instructions. > > With (apparently) this change, I can trigger a panic at will by > running > > % geli onetime -e AES-XTS -d /dev/ada0s1 > > My best guess is that it comes from > > > -#define RIJNDAEL128_BLOCK_LEN 16 > > +#define AES_MIN_BLOCK_LEN 1 > > > - RIJNDAEL128_BLOCK_LEN, 8, 32, 64, > > + AES_MIN_BLOCK_LEN, AES_XTS_IV_LEN, AES_XTS_MIN_KEY, AES_XTS_MAX_KEY, > > changing that first arg from 16 to 1. It seems to be avoided with the > following patch: > > ------8K-------- > > Index: sys/opencrypto/xform.c > =================================================================== > --- sys/opencrypto/xform.c (revision 285365) > +++ sys/opencrypto/xform.c (working copy) > @@ -257,7 +257,7 @@ > > struct enc_xform enc_xform_aes_xts = { > CRYPTO_AES_XTS, "AES-XTS", > - AES_MIN_BLOCK_LEN, AES_XTS_IV_LEN, AES_XTS_MIN_KEY, AES_XTS_MAX_KEY, > + AES_BLOCK_LEN, AES_XTS_IV_LEN, AES_XTS_MIN_KEY, AES_XTS_MAX_KEY, > aes_xts_encrypt, > aes_xts_decrypt, > aes_xts_setkey, > > ------8K-------- > > at least in a little testing here. If that's the actual fix, some of > the other MIN_BLOCK_LEN changes in GCM and GMAC are probably suspect > too. > > > (I also wonder why AES-ICM is still using the RIJNDAEL128 #defines; > shouldn't it be using the AES's too? But that's cosmtic...) Our XTS though should be a block size of 1, doesn't implement cipher text stealing, so still must be 16... I assumed that the values of all the defines did not change... That is clearly not the case... gnn, can you please make sure that the tables in xform.c match before your change? If you think there needs to be a value changed, please run it by me.. Thanks. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@freebsd.org Sat Jul 11 08:04:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 584DA9970E4; Sat, 11 Jul 2015 08:04:40 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 36B0177E; Sat, 11 Jul 2015 08:04:40 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t6B84dXm069831 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Jul 2015 01:04:39 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t6B84d32069830; Sat, 11 Jul 2015 01:04:39 -0700 (PDT) (envelope-from jmg) Date: Sat, 11 Jul 2015 01:04:39 -0700 From: John-Mark Gurney To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285366 - in head: lib/libmd sys/crypto/sha2 Message-ID: <20150711080439.GD8523@funkthat.com> References: <201507110312.t6B3CZBv081280@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201507110312.t6B3CZBv081280@repo.freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sat, 11 Jul 2015 01:04:39 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 08:04:40 -0000 John-Mark Gurney wrote this message on Sat, Jul 11, 2015 at 03:12 +0000: > Author: jmg > Date: Sat Jul 11 03:12:34 2015 > New Revision: 285366 > URL: https://svnweb.freebsd.org/changeset/base/285366 > > Log: > Complete the move that was started w/ r263218.. For some reason I > didn't delete the files, so that means we need to bring the changes in > r282726 to the correct files.. > > make tinderbox completed with this patch... This change breaks upgrading from 10-stable... I'm not sure why it does, since r282736 was suppose to address this issue, but it clearly it doesn't... If someone w/ build clue could help me out w/ this change, I'd appreciate it... I have a tree ready to back this out if requested, but I'm going to be busy most of the day tomorrow, so feel free to back it out if necessary... Thanks. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@freebsd.org Sat Jul 11 11:21:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 267D399847F; Sat, 11 Jul 2015 11:21:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 F08171B39; Sat, 11 Jul 2015 11:21:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BBLvLl022900; Sat, 11 Jul 2015 11:21:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BBLvaF022898; Sat, 11 Jul 2015 11:21:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201507111121.t6BBLvaF022898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 11 Jul 2015 11:21:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285384 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 11:21:58 -0000 Author: kib Date: Sat Jul 11 11:21:56 2015 New Revision: 285384 URL: https://svnweb.freebsd.org/changeset/base/285384 Log: Do not allow creation of the dirty buffers for the dead buffer objects, i.e. for buffer objects which vnode was reclaimed. Buffer cache cannot write such buffers. Return the error and discard the buffer immediately on write attempt. BO_DIRTY now always set during vnode reclamation, since it is used not only for the INVARIANTS checks. Do allow placement of the clean buffers on dead bufobj list, otherwise filesystems cannot use bufcache at all after the devvp reclaim. Reported and tested by: trasz Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/vfs_bio.c head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sat Jul 11 04:55:01 2015 (r285383) +++ head/sys/kern/vfs_bio.c Sat Jul 11 11:21:56 2015 (r285384) @@ -1205,6 +1205,12 @@ bufwrite(struct buf *bp) int vp_md; CTR3(KTR_BUF, "bufwrite(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); + if ((bp->b_bufobj->bo_flag & BO_DEAD) != 0) { + bp->b_flags |= B_INVAL | B_RELBUF; + bp->b_flags &= ~B_CACHE; + brelse(bp); + return (ENXIO); + } if (bp->b_flags & B_INVAL) { brelse(bp); return (0); Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sat Jul 11 04:55:01 2015 (r285383) +++ head/sys/kern/vfs_subr.c Sat Jul 11 11:21:56 2015 (r285384) @@ -1584,7 +1584,8 @@ buf_vlist_add(struct buf *bp, struct buf int error; ASSERT_BO_WLOCKED(bo); - KASSERT((bo->bo_flag & BO_DEAD) == 0, ("dead bo %p", bo)); + KASSERT((xflags & BX_VNDIRTY) == 0 || (bo->bo_flag & BO_DEAD) == 0, + ("dead bo %p", bo)); KASSERT((bp->b_xflags & (BX_VNDIRTY|BX_VNCLEAN)) == 0, ("buf_vlist_add: Buf %p has existing xflags %d", bp, bp->b_xflags)); bp->b_xflags |= xflags; @@ -2841,7 +2842,7 @@ vgonel(struct vnode *vp) while (vinvalbuf(vp, 0, 0, 0) != 0) ; } -#ifdef INVARIANTS + BO_LOCK(&vp->v_bufobj); KASSERT(TAILQ_EMPTY(&vp->v_bufobj.bo_dirty.bv_hd) && vp->v_bufobj.bo_dirty.bv_cnt == 0 && @@ -2850,7 +2851,6 @@ vgonel(struct vnode *vp) ("vp %p bufobj not invalidated", vp)); vp->v_bufobj.bo_flag |= BO_DEAD; BO_UNLOCK(&vp->v_bufobj); -#endif /* * Reclaim the vnode. From owner-svn-src-all@freebsd.org Sat Jul 11 13:07:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DD433D77; Sat, 11 Jul 2015 13:07:27 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 4E1811A6B; Sat, 11 Jul 2015 13:07:27 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BD7R8W074483; Sat, 11 Jul 2015 13:07:27 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BD7RiM074482; Sat, 11 Jul 2015 13:07:27 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201507111307.t6BD7RiM074482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 11 Jul 2015 13:07:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285385 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 13:07:27 -0000 Author: jilles Date: Sat Jul 11 13:07:26 2015 New Revision: 285385 URL: https://svnweb.freebsd.org/changeset/base/285385 Log: sh(1): libedit has supported multibyte encodings for a while. Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Sat Jul 11 11:21:56 2015 (r285384) +++ head/bin/sh/sh.1 Sat Jul 11 13:07:26 2015 (r285385) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd April 18, 2015 +.Dd July 11, 2015 .Dt SH 1 .Os .Sh NAME @@ -2846,6 +2846,4 @@ The utility does not recognize multibyte characters other than UTF-8. Splitting using .Va IFS -and the line editing library -.Xr editline 3 -do not recognize multibyte characters. +does not recognize multibyte characters. From owner-svn-src-all@freebsd.org Sat Jul 11 13:07:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84F613DA1; Sat, 11 Jul 2015 13:07:51 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 755B21BD3; Sat, 11 Jul 2015 13:07:51 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BD7ppY074579; Sat, 11 Jul 2015 13:07:51 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BD7pgp074578; Sat, 11 Jul 2015 13:07:51 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507111307.t6BD7pgp074578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Jul 2015 13:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285386 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 13:07:51 -0000 Author: bapt Date: Sat Jul 11 13:07:50 2015 New Revision: 285386 URL: https://svnweb.freebsd.org/changeset/base/285386 Log: Since sh(1) now supports mulitbyte (only UTF-8) clarify the related BUGS section in wordexp(3) manual page Discussed with: jilles Modified: head/lib/libc/gen/wordexp.3 Modified: head/lib/libc/gen/wordexp.3 ============================================================================== --- head/lib/libc/gen/wordexp.3 Sat Jul 11 13:07:26 2015 (r285385) +++ head/lib/libc/gen/wordexp.3 Sat Jul 11 13:07:50 2015 (r285386) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 29, 2004 +.Dd July 07, 2015 .Dt WORDEXP 3 .Os .Sh NAME @@ -202,5 +202,5 @@ but it does not use the same parser so i .Pp The current .Fn wordexp -implementation does not recognize multibyte characters, since the -shell (which it invokes to perform expansions) does not. +implementation does not recognize multibyte characters other than UTF-8, since +the shell (which it invokes to perform expansions) does not. From owner-svn-src-all@freebsd.org Sat Jul 11 13:47:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2101A99812E; Sat, 11 Jul 2015 13:47:18 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-la0-x22c.google.com (mail-la0-x22c.google.com [IPv6:2a00:1450:4010:c03::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98B221EB8; Sat, 11 Jul 2015 13:47:17 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by labgy5 with SMTP id gy5so127083905lab.2; Sat, 11 Jul 2015 06:47:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=oeZDdA5+OMgQ4I4reLfgHvwjIFR6MIUsnadq+RjrecA=; b=Gy+zDc7I4WtWPsfNlPereDqJ+e717fMAsttsDbGdqe5gs13KRDfsw86IYJWtWegwrn v0Stlv7hLHSDeBYAzb1fF0XH1SHc03iBC4NJfxzMvZ4yWo5PobEzJed4XUaay/D6Dx6x Xnf9WJkiygAQ3bKkx6DxiAM6jkiOIHo2eJoR+sTY+3YNOym7XGBcqBcmH9+By2Jrk5z4 2cgWjcUIibewFU3pxzp2TffJ+S5ppQqHmIln279fgfni/sIvHI3bdGNdTnuAMTiy+ERO g3cJcfowY0LcfnAj3uenzXE5gZ8B1CyzFOK1et3rP3ZN6MH9oCqOI9Zv4LmXLgErayOI ZbYQ== X-Received: by 10.152.5.65 with SMTP id q1mr24246821laq.110.1436622435773; Sat, 11 Jul 2015 06:47:15 -0700 (PDT) Received: from brick ([46.229.149.194]) by smtp.gmail.com with ESMTPSA id pw1sm3094354lac.17.2015.07.11.06.47.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Jul 2015 06:47:14 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Sat, 11 Jul 2015 15:47:12 +0200 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285384 - head/sys/kern Message-ID: <20150711134712.GA1142@brick> Mail-Followup-To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201507111121.t6BBLvaF022898@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201507111121.t6BBLvaF022898@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 13:47:18 -0000 On 0711T1121, Konstantin Belousov wrote: > Author: kib > Date: Sat Jul 11 11:21:56 2015 > New Revision: 285384 > URL: https://svnweb.freebsd.org/changeset/base/285384 > > Log: > Do not allow creation of the dirty buffers for the dead buffer > objects, i.e. for buffer objects which vnode was reclaimed. Buffer > cache cannot write such buffers. Return the error and discard the > buffer immediately on write attempt. > > BO_DIRTY now always set during vnode reclamation, since it is used not > only for the INVARIANTS checks. Do allow placement of the clean > buffers on dead bufobj list, otherwise filesystems cannot use bufcache > at all after the devvp reclaim. Note that it also fixes the "dead bo" panic that happens eg after yanking a mounted flash drive. From owner-svn-src-all@freebsd.org Sat Jul 11 14:16:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C07B19987B9; Sat, 11 Jul 2015 14:16:43 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-yk0-x22f.google.com (mail-yk0-x22f.google.com [IPv6:2607:f8b0:4002:c07::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C7172D30; Sat, 11 Jul 2015 14:16:43 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: by ykax123 with SMTP id x123so36307109yka.1; Sat, 11 Jul 2015 07:16:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=+EaKDjIt8Uitd0doqgwjFiogboNzKywocGSUBTdeKRw=; b=WLt20/9DcDxw1I8IhRJ1PfxTTHFgpRbFitBBtXWiLtLxKWjmqMse/Tb0celjw+YLZU q13TyPJFfllLZXW+QOQI21phnNjiqknPvqNcXFPvpxOdUV5QFWejVMlfk/HYxd4CWZlD cl4oYXd6qnNJVIgVdDRcJBV9kpA9sbXJAmlOiWDJl7BYLdnlTF8MuJ+eal3FqYwtwSdr cUTTb77xLgoxGa9SjNy38j+ijB3eFMGPpCEu07JYM0/5U7QnbStsSuz+JgBns6qH9FvT XNzcNzdrMCHS+4DKtMESl5T1z+KBgAt24QGiQMqkcdHH1dkPHY93tK5P6Yog/axp8Lrs B27A== MIME-Version: 1.0 X-Received: by 10.170.36.197 with SMTP id 188mr14866463yke.10.1436624202121; Sat, 11 Jul 2015 07:16:42 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.37.11.70 with HTTP; Sat, 11 Jul 2015 07:16:42 -0700 (PDT) In-Reply-To: <20150711080439.GD8523@funkthat.com> References: <201507110312.t6B3CZBv081280@repo.freebsd.org> <20150711080439.GD8523@funkthat.com> Date: Sat, 11 Jul 2015 10:16:42 -0400 X-Google-Sender-Auth: IjBQg-b5l58ki7EMaMr0Zx2xx5E Message-ID: Subject: Re: svn commit: r285366 - in head: lib/libmd sys/crypto/sha2 From: Craig Rodrigues To: John-Mark Gurney Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 14:16:43 -0000 On Sat, Jul 11, 2015 at 4:04 AM, John-Mark Gurney wrote: > > This change breaks upgrading from 10-stable... I'm not sure why it > In my FreeBSD 10.1-RELEASE VM, I am seeing this: --- xinstall --- cc -O2 -pipe -I/builds/FreeBSD_HEAD/usr.bin/xinstall/../../contrib/mtree -I/builds/FreeBSD_HEAD/usr.bin/xinstall/../../lib/libnetbsd -I/builds/FreeBSD_HEAD/usr.bin/xinstall/../../lib/libmd -std=gnu99 -Qunused-arguments -I/builds/FreeBSD_HEAD/obj/builds/FreeBSD_HEAD/tmp/legacy/usr/include -static -L/builds/FreeBSD_HEAD/obj/builds/FreeBSD_HEAD/tmp/legacy/usr/lib -o xinstall xinstall.o getid.o -lmd -legacy xinstall.o: In function `install': /builds/FreeBSD_HEAD/usr.bin/xinstall/xinstall.c:(.text+0x133c): undefined reference to `_libmd_SHA256_File' /builds/FreeBSD_HEAD/usr.bin/xinstall/xinstall.c:(.text+0x1631): undefined reference to `_libmd_SHA256_End' /builds/FreeBSD_HEAD/usr.bin/xinstall/xinstall.c:(.text+0x186c): undefined reference to `_libmd_SHA256_File' xinstall.o: In function `compare': /builds/FreeBSD_HEAD/usr.bin/xinstall/xinstall.c:(.text+0x2706): undefined reference to `_libmd_SHA256_End' cc: error: linker command failed with exit code 1 (use -v to see invocation) *** [xinstall] Error code 1 In the build tree, I see the following libmd.a files created under the obj tree: ./world32/builds/FreeBSD_HEAD/lib/libmd/libmd.a ./tmp/builds/FreeBSD_HEAD/lib/libmd/libmd.a ./tmp/legacy/usr/lib/libmd.a ./lib/libmd/libmd.a If I look for the _libmd_SHA256_File or _libmd_SHA512_File symbols in each library, I see: # for l in $(find . -name "libmd.a") ; do printf "$l\n=======\n"; nm $l | egrep 'SHA256_File|SHA512_File' done ./world32/builds/FreeBSD_HEAD/lib/libmd/libmd.a ======= 00000090 W SHA512_File 000000d0 W SHA512_FileChunk 00000090 T _libmd_SHA512_File 000000d0 T _libmd_SHA512_FileChunk 00000090 W SHA256_File 000000d0 W SHA256_FileChunk 00000090 T _libmd_SHA256_File 000000d0 T _libmd_SHA256_FileChunk ./tmp/builds/FreeBSD_HEAD/lib/libmd/libmd.a ======= 0000000000000080 W SHA512_File 0000000000000090 W SHA512_FileChunk 0000000000000080 T _libmd_SHA512_File 0000000000000090 T _libmd_SHA512_FileChunk U _libmd_SHA256_FileChunk ./tmp/legacy/usr/lib/libmd.a ======= 0000000000000080 W SHA512_File 0000000000000090 W SHA512_FileChunk 0000000000000080 T _libmd_SHA512_File 0000000000000090 T _libmd_SHA512_FileChunk U _libmd_SHA256_FileChunk ./lib/libmd/libmd.a ======= 00000000000000b0 W SHA512_File 00000000000000c0 W SHA512_FileChunk 00000000000000b0 T _libmd_SHA512_File 00000000000000c0 T _libmd_SHA512_FileChunk 00000000000000a0 W SHA256_File 00000000000000b0 W SHA256_FileChunk 00000000000000a0 T _libmd_SHA256_File 00000000000000b0 T _libmd_SHA256_FileChunk So it looks like _libmd_SHA256_File is not defined in the legacy library used during the bootstrap. -- Craig From owner-svn-src-all@freebsd.org Sat Jul 11 14:29:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A8079989F3; Sat, 11 Jul 2015 14:29:24 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 76A1211CE; Sat, 11 Jul 2015 14:29:23 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t6BETKCH074275 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Jul 2015 07:29:20 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t6BETKnr074274; Sat, 11 Jul 2015 07:29:20 -0700 (PDT) (envelope-from jmg) Date: Sat, 11 Jul 2015 07:29:20 -0700 From: John-Mark Gurney To: Craig Rodrigues Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r285366 - in head: lib/libmd sys/crypto/sha2 Message-ID: <20150711142920.GE8523@funkthat.com> References: <201507110312.t6B3CZBv081280@repo.freebsd.org> <20150711080439.GD8523@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sat, 11 Jul 2015 07:29:20 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 14:29:24 -0000 Craig Rodrigues wrote this message on Sat, Jul 11, 2015 at 10:16 -0400: > On Sat, Jul 11, 2015 at 4:04 AM, John-Mark Gurney wrote: > > > This change breaks upgrading from 10-stable... I'm not sure why it > > In my FreeBSD 10.1-RELEASE VM, I am seeing this: > > --- xinstall --- > cc -O2 -pipe -I/builds/FreeBSD_HEAD/usr.bin/xinstall/../../contrib/mtree > -I/builds/FreeBSD_HEAD/usr.bin/xinstall/../../lib/libnetbsd > -I/builds/FreeBSD_HEAD/usr.bin/xinstall/../../lib/libmd -std=gnu99 > -Qunused-arguments > -I/builds/FreeBSD_HEAD/obj/builds/FreeBSD_HEAD/tmp/legacy/usr/include > -static -L/builds/FreeBSD_HEAD/obj/builds/FreeBSD_HEAD/tmp/legacy/usr/lib > -o xinstall xinstall.o getid.o -lmd -legacy > xinstall.o: In function `install': > /builds/FreeBSD_HEAD/usr.bin/xinstall/xinstall.c:(.text+0x133c): > undefined reference to `_libmd_SHA256_File' > /builds/FreeBSD_HEAD/usr.bin/xinstall/xinstall.c:(.text+0x1631): > undefined reference to `_libmd_SHA256_End' > /builds/FreeBSD_HEAD/usr.bin/xinstall/xinstall.c:(.text+0x186c): > undefined reference to `_libmd_SHA256_File' > xinstall.o: In function `compare': > /builds/FreeBSD_HEAD/usr.bin/xinstall/xinstall.c:(.text+0x2706): > undefined reference to `_libmd_SHA256_End' > cc: error: linker command failed with exit code 1 (use -v to see invocation) > *** [xinstall] Error code 1 > > In the build tree, I see the following libmd.a files created under the obj tree: > > ./world32/builds/FreeBSD_HEAD/lib/libmd/libmd.a > ./tmp/builds/FreeBSD_HEAD/lib/libmd/libmd.a > ./tmp/legacy/usr/lib/libmd.a > ./lib/libmd/libmd.a > > If I look for the _libmd_SHA256_File or _libmd_SHA512_File symbols in > each library, I see: > > # for l in $(find . -name "libmd.a") ; do printf "$l\n=======\n"; > nm $l | egrep 'SHA256_File|SHA512_File' > done > > ./world32/builds/FreeBSD_HEAD/lib/libmd/libmd.a > ======= > 00000090 W SHA512_File > 000000d0 W SHA512_FileChunk > 00000090 T _libmd_SHA512_File > 000000d0 T _libmd_SHA512_FileChunk > 00000090 W SHA256_File > 000000d0 W SHA256_FileChunk > 00000090 T _libmd_SHA256_File > 000000d0 T _libmd_SHA256_FileChunk > > ./tmp/builds/FreeBSD_HEAD/lib/libmd/libmd.a > ======= > 0000000000000080 W SHA512_File > 0000000000000090 W SHA512_FileChunk > 0000000000000080 T _libmd_SHA512_File > 0000000000000090 T _libmd_SHA512_FileChunk > U _libmd_SHA256_FileChunk > > ./tmp/legacy/usr/lib/libmd.a > ======= > 0000000000000080 W SHA512_File > 0000000000000090 W SHA512_FileChunk > 0000000000000080 T _libmd_SHA512_File > 0000000000000090 T _libmd_SHA512_FileChunk > U _libmd_SHA256_FileChunk > > ./lib/libmd/libmd.a > ======= > 00000000000000b0 W SHA512_File > 00000000000000c0 W SHA512_FileChunk > 00000000000000b0 T _libmd_SHA512_File > 00000000000000c0 T _libmd_SHA512_FileChunk > 00000000000000a0 W SHA256_File > 00000000000000b0 W SHA256_FileChunk > 00000000000000a0 T _libmd_SHA256_File > 00000000000000b0 T _libmd_SHA256_FileChunk > > > So it looks like _libmd_SHA256_File is not defined in the legacy > library used during the bootstrap. The closest I can see is that sha256hl.c (from mdXhl.c) is including "sha256.h" with double quotes, and getting the wrong header file.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@freebsd.org Sat Jul 11 14:33:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5914B998AF6; Sat, 11 Jul 2015 14:33:11 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-yk0-x232.google.com (mail-yk0-x232.google.com [IPv6:2607:f8b0:4002:c07::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 190591695; Sat, 11 Jul 2015 14:33:11 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: by ykax123 with SMTP id x123so36498245yka.1; Sat, 11 Jul 2015 07:33:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=fZ9EC+gn28HqpEq1RldxVKhaLmUNfqgSA5AKjFmE1KA=; b=YV79arizanU+ZSc9cY29tXDBjarG5vgBMtGGaHnGxLxX64HUPg7k4zI/prds65Ce51 U5HEkK8Maem+HHeQwmE2Wv6c4aY2yqqi3iQW7dcrIUaSoHCybXSDl2XXI0sgZJ0zRbUV 75qZv/wQLhOw9Nkb0HGguj0SruXCR6vsvsiDetwrAFQNpDScyf1AtYjWTjprFtv7g9EL kJvI8lhD8SwqKFDDFjO9MOOoG6bE/OEsKcwdlG9G9QSE9kU/txAXJb+wuC2+e0dIGQnL Ay9lEFILAL+8YfB+8aigWQasLG02wx0jyGkOi/OAtyHt+FtNCstVtW0W5lBrVyAaPMeV +nRg== MIME-Version: 1.0 X-Received: by 10.170.36.197 with SMTP id 188mr14932539yke.10.1436625190136; Sat, 11 Jul 2015 07:33:10 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.37.11.70 with HTTP; Sat, 11 Jul 2015 07:33:10 -0700 (PDT) In-Reply-To: <20150711142920.GE8523@funkthat.com> References: <201507110312.t6B3CZBv081280@repo.freebsd.org> <20150711080439.GD8523@funkthat.com> <20150711142920.GE8523@funkthat.com> Date: Sat, 11 Jul 2015 10:33:10 -0400 X-Google-Sender-Auth: T8amKnlMxdli-rKi0BwY3LKe8p4 Message-ID: Subject: Re: svn commit: r285366 - in head: lib/libmd sys/crypto/sha2 From: Craig Rodrigues To: John-Mark Gurney Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 14:33:11 -0000 On Sat, Jul 11, 2015 at 10:29 AM, John-Mark Gurney wrote: > Craig Rodrigues wrote this message on Sat, Jul 11, 2015 at 10:16 -0400: > > > So it looks like _libmd_SHA256_File is not defined in the legacy > > library used during the bootstrap. > > The closest I can see is that sha256hl.c (from mdXhl.c) is including > "sha256.h" with double quotes, and getting the wrong header file.. > > Yes, I think you are right. If I go to src/lib/libmd, and type: make -V CFLAGS I see: -O2 -pipe -I/builds/FreeBSD_HEAD/lib/libmd -DWEAK_REFS -std=gnu99 -Qunused-arguments -fstack-protector -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses After your change, there is no sha256.h file in the src/lib/libmd directory, so the bootstrap stage is picking up sha256.h from /usr/include , which causes problems. -- Craig From owner-svn-src-all@freebsd.org Sat Jul 11 15:21:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C29749983E5; Sat, 11 Jul 2015 15:21:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 AF0C81C28; Sat, 11 Jul 2015 15:21:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BFLiCK040438; Sat, 11 Jul 2015 15:21:44 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BFLcrv039934; Sat, 11 Jul 2015 15:21:38 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201507111521.t6BFLcrv039934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 11 Jul 2015 15:21:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285387 - in head: lib/libc/sys share/man/man4 sys/conf sys/kern sys/sys sys/vm usr.bin usr.bin/numactl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 15:21:44 -0000 Author: adrian Date: Sat Jul 11 15:21:37 2015 New Revision: 285387 URL: https://svnweb.freebsd.org/changeset/base/285387 Log: Add an initial NUMA affinity/policy configuration for threads and processes. This is based on work done by jeff@ and jhb@, as well as the numa.diff patch that has been circulating when someone asks for first-touch NUMA on -10 or -11. * Introduce a simple set of VM policy and iterator types. * tie the policy types into the vm_phys path for now, mirroring how the initial first-touch allocation work was enabled. * add syscalls to control changing thread and process defaults. * add a global NUMA VM domain policy. * implement a simple cascade policy order - if a thread policy exists, use it; if a process policy exists, use it; use the default policy. * processes inherit policies from their parent processes, threads inherit policies from their parent threads. * add a simple tool (numactl) to query and modify default thread/process policities. * add documentation for the new syscalls, for numa and for numactl. * re-enable first touch NUMA again by default, as now policies can be set in a variety of methods. This is only relevant for very specific workloads. This doesn't pretend to be a final NUMA solution. The previous defaults in -HEAD (with MAXMEMDOM set) can be achieved by 'sysctl vm.default_policy=rr'. This is only relevant if MAXMEMDOM is set to something other than 1. Ie, if you're using GENERIC or a modified kernel with non-NUMA, then this is a glorified no-op for you. Thank you to Norse Corp for giving me access to rather large (for FreeBSD!) NUMA machines in order to develop and verify this. Thank you to Dell for providing me with dual socket sandybridge and westmere v3 hardware to do NUMA development with. Thank you to Scott Long at Netflix for providing me with access to the two-socket, four-domain haswell v3 hardware. Thank you to Peter Holm for running the stress testing suite against the NUMA branch during various stages of development! Tested: * MIPS (regression testing; non-NUMA) * i386 (regression testing; non-NUMA GENERIC) * amd64 (regression testing; non-NUMA GENERIC) * westmere, 2 socket (thankyou norse!) * sandy bridge, 2 socket (thankyou dell!) * ivy bridge, 2 socket (thankyou norse!) * westmere-EX, 4 socket / 1TB RAM (thankyou norse!) * haswell, 2 socket (thankyou norse!) * haswell v3, 2 socket (thankyou dell) * haswell v3, 2x18 core (thankyou scott long / netflix!) * Peter Holm ran a stress test suite on this work and found one issue, but has not been able to verify it (it doesn't look NUMA related, and he only saw it once over many testing runs.) * I've tested bhyve instances running in fixed NUMA domains and cpusets; all seems to work correctly. Verified: * intel-pcm - pcm-numa.x and pcm-memory.x, whilst selecting different NUMA policies for processes under test. Review: This was reviewed through phabricator (https://reviews.freebsd.org/D2559) as well as privately and via emails to freebsd-arch@. The git history with specific attributes is available at https://github.com/erikarn/freebsd/ in the NUMA branch (https://github.com/erikarn/freebsd/compare/local/adrian_numa_policy). This has been reviewed by a number of people (stas, rpaulo, kib, ngie, wblock) but not achieved a clear consensus. My hope is that with further exposure and testing more functionality can be implemented and evaluated. Notes: * The VM doesn't handle unbalanced domains very well, and if you have an overly unbalanced memory setup whilst under high memory pressure, VM page allocation may fail leading to a kernel panic. This was a problem in the past, but it's much more easily triggered now with these tools. * This work only controls the path through vm_phys; it doesn't yet strongly/predictably affect contigmalloc, KVA placement, UMA, etc. So, driver placement of memory isn't really guaranteed in any way. That's next on my plate. Sponsored by: Norse Corp, Inc.; Dell Added: head/lib/libc/sys/numa_getaffinity.2 (contents, props changed) head/share/man/man4/numa.4 (contents, props changed) head/sys/kern/kern_numa.c (contents, props changed) head/sys/sys/_vm_domain.h (contents, props changed) head/sys/sys/numa.h (contents, props changed) head/sys/vm/vm_domain.c (contents, props changed) head/sys/vm/vm_domain.h (contents, props changed) head/usr.bin/numactl/ head/usr.bin/numactl/Makefile (contents, props changed) head/usr.bin/numactl/numactl.1 (contents, props changed) head/usr.bin/numactl/numactl.c (contents, props changed) Modified: head/lib/libc/sys/Makefile.inc head/lib/libc/sys/Symbol.map head/share/man/man4/Makefile head/sys/conf/files head/sys/kern/init_main.c head/sys/kern/init_sysent.c head/sys/kern/kern_exit.c head/sys/kern/kern_fork.c head/sys/kern/kern_thr.c head/sys/kern/kern_thread.c head/sys/sys/proc.h head/sys/vm/vm_phys.c head/sys/vm/vm_phys.h head/usr.bin/Makefile Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Sat Jul 11 13:07:50 2015 (r285386) +++ head/lib/libc/sys/Makefile.inc Sat Jul 11 15:21:37 2015 (r285387) @@ -235,6 +235,7 @@ MAN+= abort2.2 \ nanosleep.2 \ nfssvc.2 \ ntp_adjtime.2 \ + numa_getaffinity.2 \ open.2 \ pathconf.2 \ pdfork.2 \ @@ -395,6 +396,7 @@ MLINKS+=mount.2 nmount.2 \ MLINKS+=mq_receive.2 mq_timedreceive.2 MLINKS+=mq_send.2 mq_timedsend.2 MLINKS+=ntp_adjtime.2 ntp_gettime.2 +MLINKS+=numa_getaffinity.2 numa_setaffinity.2 MLINKS+=open.2 openat.2 MLINKS+=pathconf.2 fpathconf.2 MLINKS+=pathconf.2 lpathconf.2 Modified: head/lib/libc/sys/Symbol.map ============================================================================== --- head/lib/libc/sys/Symbol.map Sat Jul 11 13:07:50 2015 (r285386) +++ head/lib/libc/sys/Symbol.map Sat Jul 11 15:21:37 2015 (r285387) @@ -400,6 +400,8 @@ FBSD_1.4 { futimens; ppoll; utimensat; + numa_setaffinity; + numa_getaffinity; }; FBSDprivate_1.0 { Added: head/lib/libc/sys/numa_getaffinity.2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/numa_getaffinity.2 Sat Jul 11 15:21:37 2015 (r285387) @@ -0,0 +1,197 @@ +.\" Copyright (c) 2008 Christian Brueffer +.\" Copyright (c) 2008 Jeffrey Roberson +.\" Copyright (c) 2015 Adrian Chadd +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 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 +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd May 7, 2015 +.Dt NUMA_GETAFFINITY 2 +.Os +.Sh NAME +.Nm numa_getaffinity , +.Nm numa_setaffinity +.Nd manage NUMA affinity +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/param.h +.In sys/numa.h +.Ft int +.Fn numa_getaffinity "cpuwhich_t which" "id_t id" "struct vm_domain_policy_entry *policy" +.Ft int +.Fn numa_setaffinity "cpuwhich_t which" "id_t id" "const struct vm_domain_policy_entry *policy" +.Sh DESCRIPTION +.Fn numa_getaffinity +and +.Fn numa_setaffinity +allow the manipulation of NUMA policies available to processes and threads. +These functions may manipulate NUMA policies that contain many processes +or affect only a single object. +.Pp +Valid values for the +.Fa which +argument are documented in +.Xr cpuset 2 . +These arguments specify which object set are used. +Only +.Dv CPU_WHICH_TID +and +.Dv CPU_WHICH_PID +can be manipulated. +.Pp +The +.Fa policy +entry contains a vm_domain_policy_entry with the following fields: +.Bd -literal +struct vm_domain_policy_entry { + vm_domain_policy_type_t policy; /* VM policy */ + int domain; /* VM domain, if applicable */ +} +.Ed +.Fa vm_domain_policy_type_t policy +is one these: +.Bl -tag -width VM_POLICY_NONE +.It Dv VM_POLICY_NONE +Reset the domain back to none. +Any parent object NUMA domain policy will apply. +The only valid value for +.Dv domain +is -1. +.It Dv VM_POLICY_ROUND_ROBIN +Select round-robin policy. +Pages will be allocated round-robin from each VM domain in order. +The only valid value for +.Dv domain +is -1. +.It Dv VM_POLICY_FIXED_DOMAIN +Select fixed-domain only policy. +Pages will be allocated from the given +.Dv domain +which must be set to a valid VM domain. +Pages will not be allocated from another domain if +.Dv domain +is out of free pages. +.It Dv VM_POLICY_FIXED_DOMAIN_ROUND_ROBIN +Select fixed-domain only policy. +Pages will be allocated from +.Dv domain +which must be set to a valid VM domain. +If page allocation fails, pages will be round-robin +allocated from another domain if +.Dv domain +is out of free pages. +.It Dv VM_POLICY_FIRST_TOUCH +Select first-touch policy. +Pages will be allocated from the NUMA domain which the thread +is currently scheduled upon. +Pages will not be allocated from another domain if the current domain +is out of free pages. +The only valid value for +.Dv domain +is -1. +.It Dv VM_POLICY_FIRST_TOUCH_ROUND_ROBIN +Select first-touch policy. +Pages will be allocated from the NUMA domain which the thread +is currently scheduled upon. +Pages will be allocated round-robin from another domain if the +current domain is out of free pages. +The only valid value for +.Dv domain +is -1. +.El +.Pp +Note that the VM might assign some pages from other domains. +For example, if an existing page allocation is covered by a superpage +allocation. +.Pp +.Fn numa_getaffinity +retrieves the +NUMA policy from the object specified by +.Fa which +and +.Fa id +and stores it in the space provided by +.Fa policy . +.Pp +.Fn numa_setaffinity +attempts to set the NUMA policy for the object specified by +.Fa which +and +.Fa id +to the policy in +.Fa policy . +.Sh RETURN VALUES +.Rv -std +.Sh ERRORS +.Va errno +can contain these error codes: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa level +or +.Fa which +argument was not a valid value. +.It Bq Er EINVAL +The +.Fa policy +argument specified when calling +.Fn numa_setaffinity +did not contain a valid policy. +.It Bq Er EFAULT +The policy pointer passed was invalid. +.It Bq Er ESRCH +The object specified by the +.Fa id +and +.Fa which +arguments could not be found. +.It Bq Er ERANGE +The +.Fa domain +in the given policy +was out of the range of possible VM domains available. +.It Bq Er EPERM +The calling process did not have the credentials required to complete the +operation. +.El +.Sh SEE ALSO +.Xr cpuset 1 , +.Xr numactl 1 , +.Xr cpuset 2 , +.Xr cpuset_getaffinity 2 , +.Xr cpuset_getid 2 , +.Xr cpuset_setaffinity 2 , +.Xr cpuset_setid 2 , +.Xr pthread_affinity_np 3 , +.Xr pthread_attr_affinity_np 3 , +.Xr numa 4 +.Sh HISTORY +The +.Nm +family of system calls first appeared in +.Fx 11.0 . +.Sh AUTHORS +.An Adrian Chadd Aq Mt adrian@FreeBSD.org Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sat Jul 11 13:07:50 2015 (r285386) +++ head/share/man/man4/Makefile Sat Jul 11 15:21:37 2015 (r285387) @@ -364,6 +364,7 @@ MAN= aac.4 \ nsp.4 \ ${_ntb.4} \ null.4 \ + numa.4 \ ${_nvd.4} \ ${_nvme.4} \ ${_nvram.4} \ Added: head/share/man/man4/numa.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/numa.4 Sat Jul 11 15:21:37 2015 (r285387) @@ -0,0 +1,172 @@ +.\" Copyright (c) 2015 Adrian Chadd +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 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 AUTHORS 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 +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd May 10, 2015 +.Dt NUMA 4 +.Os +.Sh NAME +.Nm NUMA +.Nd Non-Uniform Memory Access +.Sh SYNOPSIS +.Cd options SMP +.Cd options MAXMEMDOM=16 +.Pp +.In sys/numa.h +.In sys/cpuset.h +.In sys/bus.h +.Sh DESCRIPTION +Non-Uniform Memory Access is a computer architecture design which +involves unequal costs between processors, memory and IO devices +in a given system. +.Pp +In a +.Nm +architecture, the latency to access specific memory or IO devices +depends upon which processor the memory or device is attached to. +Accessing memory local to a processor is faster than accessing memory +that is connected to one of the other processors. +.Pp +.Nm +is enabled when the +.Cd MAXMEMDOM +option is used in a kernel configuration +file and is set to a value greater than 1. +.Pp +Thread and process +.Nm +policies are controlled with the +.Xr numa_setaffinity 2 +and +.Xr numa_getaffinity 2 +syscalls. +.Pp +The +.Xr numactl 1 +tool is available for starting processes with a non-default +policy, or to change the policy of an existing thread or process. +.Pp +Systems with non-uniform access to I/O devices may mark those devices +with the local VM domain identifier. +Drivers can find out their local domain information by calling +.Xr bus_get_domain 9 . +.Ss MIB Variables +The operation of +.Nm +is controlled and exposes information with these +.Xr sysctl 8 +MIB variables: +.Pp +.Bl -tag -width indent -compact +.It Va vm.ndomains +The number of VM domains which have been detected. +.Pp +.It Va vm.default_policy +The default VM domain allocation policy. +Defaults to "first-touch-rr". +The valid values are "first-touch", "first-touch-rr", +"rr", where "rr" is a short-hand for "round-robin." +See +.Xr numa_setaffinity 2 +for more information about the available policies. +.Pp +.It Va vm.phys_locality +A table indicating the relative cost of each VM domain to each other. +A value of 10 indicates equal cost. +A value of -1 means the locality map is not available or no +locality information is available. +.Pp +.It Va vm.phys_segs +The map of physical memory, grouped by VM domain. +.El +.Sh IMPLEMENTATION NOTES +The current +.Nm +implementation is VM-focused. +The hardware +.Nm +domains are mapped into a contiguous, non-sparse +VM domain space, starting from 0. +Thus, VM domain information (for example, the domain identifier) is not +necessarily the same as is found in the hardware specific information. +.Pp +The +.Nm +allocation policies are implemented as a policy and iterator in +.Pa sys/vm/vm_domain.c +and +.Pa sys/vm/vm_domain.h . +Policy information is available in both struct thread and struct proc. +Processes inherit +.Nm +policy from parent processes and threads inherit +.Nm +policy from parent threads. +Note that threads do not explicitly inherit their +.Nm +policy from processes. +Instead, if no thread policy is set, the system +will fall back to the process policy. +.Pp +For now, +.Nm +domain policies only influence physical page allocation in +.Pa sys/vm/vm_phys.c . +This is useful for userland memory allocation, but not for kernel +and driver memory allocation. +These features will be implemented in future work. +.Sh SEE ALSO +.Xr numactl 1 , +.Xr numa_getaffinity 2 , +.Xr numa_setaffinity 2 , +.Xr bus_get_domain 9 +.Sh HISTORY +.Nm +first appeared in +.Fx 9.0 +as a first-touch allocation policy with a fail-over to round-robin allocation +and was not configurable. +It was then modified in +.Fx 10.0 +to implement a round-robin allocation policy and was also not configurable. +.Pp +The +.Xr numa_getaffinity 2 +and +.Xr numa_setaffinity 2 +syscalls first appeared in +.Fx 11.0 . +.Pp +The +.Xr numactl 1 +tool first appeared in +.Fx 11.0 . +.Sh AUTHORS +This manual page written by +.An Adrian Chadd Aq Mt adrian@FreeBSD.org . +.Sh NOTES +No statistics are kept to indicate how often +.Nm +allocation policies succeed or fail. Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Jul 11 13:07:50 2015 (r285386) +++ head/sys/conf/files Sat Jul 11 15:21:37 2015 (r285387) @@ -3017,6 +3017,7 @@ kern/kern_module.c standard kern/kern_mtxpool.c standard kern/kern_mutex.c standard kern/kern_ntptime.c standard +kern/kern_numa.c standard kern/kern_osd.c standard kern/kern_physio.c standard kern/kern_pmc.c standard @@ -4043,6 +4044,7 @@ vm/vm_pager.c standard vm/vm_phys.c standard vm/vm_radix.c standard vm/vm_reserv.c standard +vm/vm_domain.c standard vm/vm_unix.c standard vm/vm_zeroidle.c standard vm/vnode_pager.c standard Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Sat Jul 11 13:07:50 2015 (r285386) +++ head/sys/kern/init_main.c Sat Jul 11 15:21:37 2015 (r285387) @@ -87,6 +87,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -496,6 +497,10 @@ proc0_init(void *dummy __unused) td->td_flags = TDF_INMEM; td->td_pflags = TDP_KTHREAD; td->td_cpuset = cpuset_thread0(); + vm_domain_policy_init(&td->td_vm_dom_policy); + vm_domain_policy_set(&td->td_vm_dom_policy, VM_POLICY_NONE, -1); + vm_domain_policy_init(&p->p_vm_dom_policy); + vm_domain_policy_set(&p->p_vm_dom_policy, VM_POLICY_NONE, -1); prison0_init(); p->p_peers = 0; p->p_leader = p; Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Sat Jul 11 13:07:50 2015 (r285386) +++ head/sys/kern/init_sysent.c Sat Jul 11 15:21:37 2015 (r285387) @@ -588,4 +588,6 @@ struct sysent sysent[] = { { AS(ppoll_args), (sy_call_t *)sys_ppoll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 545 = ppoll */ { AS(futimens_args), (sy_call_t *)sys_futimens, AUE_FUTIMES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 546 = futimens */ { AS(utimensat_args), (sy_call_t *)sys_utimensat, AUE_FUTIMESAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 547 = utimensat */ + { AS(numa_getaffinity_args), (sy_call_t *)sys_numa_getaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 548 = numa_getaffinity */ + { AS(numa_setaffinity_args), (sy_call_t *)sys_numa_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 549 = numa_setaffinity */ }; Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Sat Jul 11 13:07:50 2015 (r285386) +++ head/sys/kern/kern_exit.c Sat Jul 11 15:21:37 2015 (r285387) @@ -86,6 +86,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef KDTRACE_HOOKS #include @@ -950,6 +951,11 @@ proc_reap(struct thread *td, struct proc #ifdef MAC mac_proc_destroy(p); #endif + /* + * Free any domain policy that's still hiding around. + */ + vm_domain_policy_cleanup(&p->p_vm_dom_policy); + KASSERT(FIRST_THREAD_IN_PROC(p), ("proc_reap: no residual thread!")); uma_zfree(proc_zone, p); Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Sat Jul 11 13:07:50 2015 (r285386) +++ head/sys/kern/kern_fork.c Sat Jul 11 15:21:37 2015 (r285387) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef KDTRACE_HOOKS #include @@ -405,6 +406,7 @@ do_fork(struct thread *td, int flags, st bcopy(&p1->p_startcopy, &p2->p_startcopy, __rangeof(struct proc, p_startcopy, p_endcopy)); pargs_hold(p2->p_args); + PROC_UNLOCK(p1); bzero(&p2->p_startzero, @@ -497,6 +499,14 @@ do_fork(struct thread *td, int flags, st if (p1->p_flag & P_PROFIL) startprofclock(p2); + /* + * Whilst the proc lock is held, copy the VM domain data out + * using the VM domain method. + */ + vm_domain_policy_init(&p2->p_vm_dom_policy); + vm_domain_policy_localcopy(&p2->p_vm_dom_policy, + &p1->p_vm_dom_policy); + if (flags & RFSIGSHARE) { p2->p_sigacts = sigacts_hold(p1->p_sigacts); } else { Added: head/sys/kern/kern_numa.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/kern/kern_numa.c Sat Jul 11 15:21:37 2015 (r285387) @@ -0,0 +1,170 @@ +/*- + * Copyright (c) 2015, Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 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 ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +int +sys_numa_setaffinity(struct thread *td, struct numa_setaffinity_args *uap) +{ + int error; + struct vm_domain_policy vp; + struct thread *ttd; + struct proc *p; + struct cpuset *set; + + set = NULL; + p = NULL; + + /* + * Copy in just the policy information into the policy + * struct. Userland only supplies vm_domain_policy_entry. + */ + error = copyin(uap->policy, &vp.p, sizeof(vp.p)); + if (error) + goto out; + + /* + * Ensure the seq number is zero - otherwise seq.h + * may get very confused. + */ + vp.seq = 0; + + /* + * Validate policy. + */ + if (vm_domain_policy_validate(&vp) != 0) { + error = EINVAL; + goto out; + } + + /* + * Go find the desired proc/tid for this operation. + */ + error = cpuset_which(uap->which, uap->id, &p, + &ttd, &set); + if (error) + goto out; + + /* Only handle CPU_WHICH_TID and CPU_WHICH_PID */ + /* + * XXX if cpuset_which is called with WHICH_CPUSET and NULL cpuset, + * it'll return ESRCH. We should just return EINVAL. + */ + switch (uap->which) { + case CPU_WHICH_TID: + vm_domain_policy_copy(&ttd->td_vm_dom_policy, &vp); + break; + case CPU_WHICH_PID: + vm_domain_policy_copy(&p->p_vm_dom_policy, &vp); + break; + default: + error = EINVAL; + break; + } + + PROC_UNLOCK(p); +out: + if (set) + cpuset_rel(set); + return (error); +} + +int +sys_numa_getaffinity(struct thread *td, struct numa_getaffinity_args *uap) +{ + int error; + struct vm_domain_policy vp; + struct thread *ttd; + struct proc *p; + struct cpuset *set; + + set = NULL; + p = NULL; + + error = cpuset_which(uap->which, uap->id, &p, + &ttd, &set); + if (error) + goto out; + + /* Only handle CPU_WHICH_TID and CPU_WHICH_PID */ + /* + * XXX if cpuset_which is called with WHICH_CPUSET and NULL cpuset, + * it'll return ESRCH. We should just return EINVAL. + */ + switch (uap->which) { + case CPU_WHICH_TID: + vm_domain_policy_localcopy(&vp, &ttd->td_vm_dom_policy); + break; + case CPU_WHICH_PID: + vm_domain_policy_localcopy(&vp, &p->p_vm_dom_policy); + break; + default: + error = EINVAL; + break; + } + if (p) + PROC_UNLOCK(p); + /* + * Copy out only the vm_domain_policy_entry part. + */ + if (error == 0) + error = copyout(&vp.p, uap->policy, sizeof(vp.p)); +out: + if (set) + cpuset_rel(set); + return (error); +} Modified: head/sys/kern/kern_thr.c ============================================================================== --- head/sys/kern/kern_thr.c Sat Jul 11 13:07:50 2015 (r285386) +++ head/sys/kern/kern_thr.c Sat Jul 11 15:21:37 2015 (r285387) @@ -54,6 +54,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include @@ -254,6 +256,13 @@ create_thread(struct thread *td, mcontex thread_unlock(td); if (P_SHOULDSTOP(p)) newtd->td_flags |= TDF_ASTPENDING | TDF_NEEDSUSPCHK; + + /* + * Copy the existing thread VM policy into the new thread. + */ + vm_domain_policy_localcopy(&newtd->td_vm_dom_policy, + &td->td_vm_dom_policy); + PROC_UNLOCK(p); tidhash_add(newtd); Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Sat Jul 11 13:07:50 2015 (r285386) +++ head/sys/kern/kern_thread.c Sat Jul 11 15:21:37 2015 (r285387) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include SDT_PROVIDER_DECLARE(proc); @@ -351,6 +352,7 @@ thread_alloc(int pages) return (NULL); } cpu_thread_alloc(td); + vm_domain_policy_init(&td->td_vm_dom_policy); return (td); } @@ -380,6 +382,7 @@ thread_free(struct thread *td) cpu_thread_free(td); if (td->td_kstack != 0) vm_thread_dispose(td); + vm_domain_policy_cleanup(&td->td_vm_dom_policy); uma_zfree(thread_zone, td); } Added: head/sys/sys/_vm_domain.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/_vm_domain.h Sat Jul 11 15:21:37 2015 (r285387) @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2015 Adrian Chadd . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGES. + * + * $FreeBSD$ + */ +#ifndef __SYS_VM_DOMAIN_H__ +#define __SYS_VM_DOMAIN_H__ + +#include + +typedef enum { + VM_POLICY_NONE, + VM_POLICY_ROUND_ROBIN, + VM_POLICY_FIXED_DOMAIN, + VM_POLICY_FIXED_DOMAIN_ROUND_ROBIN, + VM_POLICY_FIRST_TOUCH, + VM_POLICY_FIRST_TOUCH_ROUND_ROBIN, + VM_POLICY_MAX +} vm_domain_policy_type_t; + +struct vm_domain_policy_entry { + vm_domain_policy_type_t policy; + int domain; +}; + +struct vm_domain_policy { + seq_t seq; + struct vm_domain_policy_entry p; +}; + +#define VM_DOMAIN_POLICY_STATIC_INITIALISER(vt, vd) \ + { .seq = 0, \ + .p.policy = vt, \ + .p.domain = vd } + +#endif /* __SYS_VM_DOMAIN_H__ */ Added: head/sys/sys/numa.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/numa.h Sat Jul 11 15:21:37 2015 (r285387) @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2015 Adrian Chadd . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * 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 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ +#ifndef __SYS_NUMA_H__ +#define __SYS_NUMA_H__ + +#include + +extern int numa_setaffinity(cpuwhich_t which, id_t id, + struct vm_domain_policy_entry *vd); +extern int numa_getaffinity(cpuwhich_t which, id_t id, + struct vm_domain_policy_entry *vd); + +#endif /* __SYS_NUMA_H__ */ Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sat Jul 11 13:07:50 2015 (r285386) +++ head/sys/sys/proc.h Sat Jul 11 15:21:37 2015 (r285387) @@ -63,6 +63,7 @@ #endif #include #include +#include #include /* Machine-dependent proc substruct. */ /* @@ -217,6 +218,7 @@ struct thread { struct turnstile *td_turnstile; /* (k) Associated turnstile. */ struct rl_q_entry *td_rlqe; /* (k) Associated range lock entry. */ struct umtx_q *td_umtxq; /* (c?) Link for when we're blocked. */ + struct vm_domain_policy td_vm_dom_policy; /* (c) current numa domain policy */ lwpid_t td_tid; /* (b) Thread ID. */ sigqueue_t td_sigqueue; /* (c) Sigs arrived, not delivered. */ #define td_siglist td_sigqueue.sq_signals @@ -606,6 +608,7 @@ struct proc { uint64_t p_prev_runtime; /* (c) Resource usage accounting. */ struct racct *p_racct; /* (b) Resource accounting. */ u_char p_throttled; /* (c) Flag for racct pcpu throttling */ + struct vm_domain_policy p_vm_dom_policy; /* (c) process default VM domain, or -1 */ /* * An orphan is the child that has beed re-parented to the * debugger as a result of attaching to it. Need to keep Added: head/sys/vm/vm_domain.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/vm/vm_domain.c Sat Jul 11 15:21:37 2015 (r285387) @@ -0,0 +1,374 @@ +/*- + * Copyright (c) 2015 Adrian Chadd . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_vm.h" +#include "opt_ddb.h" + +#include +#include +#include +#include +#include +#include +#if MAXMEMDOM > 1 +#include +#endif +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include + +static __inline int +vm_domain_rr_selectdomain(void) +{ +#if MAXMEMDOM > 1 + struct thread *td; + + td = curthread; + + td->td_dom_rr_idx++; + td->td_dom_rr_idx %= vm_ndomains; + return (td->td_dom_rr_idx); +#else + return (0); +#endif +} + +/* + * This implements a very simple set of VM domain memory allocation + * policies and iterators. + */ + +/* + * A VM domain policy represents a desired VM domain policy. + * Iterators implement searching through VM domains in a specific + * order. + */ + +/* + * When setting a policy, the caller must establish their own + * exclusive write protection for the contents of the domain + * policy. + */ +int +vm_domain_policy_init(struct vm_domain_policy *vp) +{ + + bzero(vp, sizeof(*vp)); + vp->p.policy = VM_POLICY_NONE; + vp->p.domain = -1; + return (0); +} + +int +vm_domain_policy_set(struct vm_domain_policy *vp, + vm_domain_policy_type_t vt, int domain) +{ + + seq_write_begin(&vp->seq); + vp->p.policy = vt; + vp->p.domain = domain; + seq_write_end(&vp->seq); + return (0); +} + +/* + * Take a local copy of a policy. + * + * The destination policy isn't write-barriered; this is used + * for doing local copies into something that isn't shared. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jul 11 15:22:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A9F099840E; Sat, 11 Jul 2015 15:22:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 171B81DA2; Sat, 11 Jul 2015 15:22:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BFMGxn042509; Sat, 11 Jul 2015 15:22:16 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BFMC02042486; Sat, 11 Jul 2015 15:22:12 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201507111522.t6BFMC02042486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 11 Jul 2015 15:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285388 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 15:22:17 -0000 Author: adrian Date: Sat Jul 11 15:22:11 2015 New Revision: 285388 URL: https://svnweb.freebsd.org/changeset/base/285388 Log: Regenerate syscalls. Modified: head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/compat/freebsd32/syscalls.master head/sys/kern/syscalls.c head/sys/kern/syscalls.master head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Sat Jul 11 15:21:37 2015 (r285387) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Sat Jul 11 15:22:11 2015 (r285388) @@ -455,4 +455,6 @@ #define FREEBSD32_SYS_freebsd32_ppoll 545 #define FREEBSD32_SYS_freebsd32_futimens 546 #define FREEBSD32_SYS_freebsd32_utimensat 547 -#define FREEBSD32_SYS_MAXSYSCALL 548 +#define FREEBSD32_SYS_numa_getaffinity 548 +#define FREEBSD32_SYS_numa_setaffinity 549 +#define FREEBSD32_SYS_MAXSYSCALL 550 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Sat Jul 11 15:21:37 2015 (r285387) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Sat Jul 11 15:22:11 2015 (r285388) @@ -581,4 +581,6 @@ const char *freebsd32_syscallnames[] = { "freebsd32_ppoll", /* 545 = freebsd32_ppoll */ "freebsd32_futimens", /* 546 = freebsd32_futimens */ "freebsd32_utimensat", /* 547 = freebsd32_utimensat */ + "numa_getaffinity", /* 548 = numa_getaffinity */ + "numa_setaffinity", /* 549 = numa_setaffinity */ }; Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Sat Jul 11 15:21:37 2015 (r285387) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Sat Jul 11 15:22:11 2015 (r285388) @@ -618,4 +618,6 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_ppoll_args), (sy_call_t *)freebsd32_ppoll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 545 = freebsd32_ppoll */ { AS(freebsd32_futimens_args), (sy_call_t *)freebsd32_futimens, AUE_FUTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 546 = freebsd32_futimens */ { AS(freebsd32_utimensat_args), (sy_call_t *)freebsd32_utimensat, AUE_FUTIMESAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 547 = freebsd32_utimensat */ + { AS(numa_getaffinity_args), (sy_call_t *)sys_numa_getaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 548 = numa_getaffinity */ + { AS(numa_setaffinity_args), (sy_call_t *)sys_numa_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 549 = numa_setaffinity */ }; Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Sat Jul 11 15:21:37 2015 (r285387) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Sat Jul 11 15:22:11 2015 (r285388) @@ -3327,6 +3327,24 @@ systrace_args(int sysnum, void *params, *n_args = 4; break; } + /* numa_getaffinity */ + case 548: { + struct numa_getaffinity_args *p = params; + iarg[0] = p->which; /* cpuwhich_t */ + iarg[1] = p->id; /* id_t */ + uarg[2] = (intptr_t) p->policy; /* struct vm_domain_policy * */ + *n_args = 3; + break; + } + /* numa_setaffinity */ + case 549: { + struct numa_setaffinity_args *p = params; + iarg[0] = p->which; /* cpuwhich_t */ + iarg[1] = p->id; /* id_t */ + uarg[2] = (intptr_t) p->policy; /* const struct vm_domain_policy * */ + *n_args = 3; + break; + } default: *n_args = 0; break; @@ -8923,6 +8941,38 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* numa_getaffinity */ + case 548: + switch(ndx) { + case 0: + p = "cpuwhich_t"; + break; + case 1: + p = "id_t"; + break; + case 2: + p = "struct vm_domain_policy *"; + break; + default: + break; + }; + break; + /* numa_setaffinity */ + case 549: + switch(ndx) { + case 0: + p = "cpuwhich_t"; + break; + case 1: + p = "id_t"; + break; + case 2: + p = "const struct vm_domain_policy *"; + break; + default: + break; + }; + break; default: break; }; @@ -10811,6 +10861,16 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* numa_getaffinity */ + case 548: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* numa_setaffinity */ + case 549: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Sat Jul 11 15:21:37 2015 (r285387) +++ head/sys/compat/freebsd32/syscalls.master Sat Jul 11 15:22:11 2015 (r285388) @@ -1074,3 +1074,9 @@ 547 AUE_FUTIMESAT STD { int freebsd32_utimensat(int fd, \ char *path, \ struct timespec *times, int flag); } +548 AUE_NULL NOPROTO { int numa_getaffinity(cpuwhich_t which, \ + id_t id, \ + struct vm_domain_policy *policy); } +549 AUE_NULL NOPROTO { int numa_setaffinity(cpuwhich_t which, \ + id_t id, \ + const struct vm_domain_policy *policy); } Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Sat Jul 11 15:21:37 2015 (r285387) +++ head/sys/kern/syscalls.c Sat Jul 11 15:22:11 2015 (r285388) @@ -555,4 +555,6 @@ const char *syscallnames[] = { "ppoll", /* 545 = ppoll */ "futimens", /* 546 = futimens */ "utimensat", /* 547 = utimensat */ + "numa_getaffinity", /* 548 = numa_getaffinity */ + "numa_setaffinity", /* 549 = numa_setaffinity */ }; Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Sat Jul 11 15:21:37 2015 (r285387) +++ head/sys/kern/syscalls.master Sat Jul 11 15:22:11 2015 (r285388) @@ -988,5 +988,12 @@ 547 AUE_FUTIMESAT STD { int utimensat(int fd, \ char *path, \ struct timespec *times, int flag); } +548 AUE_NULL STD { int numa_getaffinity(cpuwhich_t which, \ + id_t id, \ + struct vm_domain_policy_entry *policy); } +549 AUE_NULL STD { int numa_setaffinity(cpuwhich_t which, \ + id_t id, \ + const struct vm_domain_policy_entry *policy); } + ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Sat Jul 11 15:21:37 2015 (r285387) +++ head/sys/kern/systrace_args.c Sat Jul 11 15:22:11 2015 (r285388) @@ -3337,6 +3337,24 @@ systrace_args(int sysnum, void *params, *n_args = 4; break; } + /* numa_getaffinity */ + case 548: { + struct numa_getaffinity_args *p = params; + iarg[0] = p->which; /* cpuwhich_t */ + iarg[1] = p->id; /* id_t */ + uarg[2] = (intptr_t) p->policy; /* struct vm_domain_policy_entry * */ + *n_args = 3; + break; + } + /* numa_setaffinity */ + case 549: { + struct numa_setaffinity_args *p = params; + iarg[0] = p->which; /* cpuwhich_t */ + iarg[1] = p->id; /* id_t */ + uarg[2] = (intptr_t) p->policy; /* const struct vm_domain_policy_entry * */ + *n_args = 3; + break; + } default: *n_args = 0; break; @@ -8883,6 +8901,38 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* numa_getaffinity */ + case 548: + switch(ndx) { + case 0: + p = "cpuwhich_t"; + break; + case 1: + p = "id_t"; + break; + case 2: + p = "struct vm_domain_policy_entry *"; + break; + default: + break; + }; + break; + /* numa_setaffinity */ + case 549: + switch(ndx) { + case 0: + p = "cpuwhich_t"; + break; + case 1: + p = "id_t"; + break; + case 2: + p = "const struct vm_domain_policy_entry *"; + break; + default: + break; + }; + break; default: break; }; @@ -10806,6 +10856,16 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* numa_getaffinity */ + case 548: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* numa_setaffinity */ + case 549: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Sat Jul 11 15:21:37 2015 (r285387) +++ head/sys/sys/syscall.h Sat Jul 11 15:22:11 2015 (r285388) @@ -465,4 +465,6 @@ #define SYS_ppoll 545 #define SYS_futimens 546 #define SYS_utimensat 547 -#define SYS_MAXSYSCALL 548 +#define SYS_numa_getaffinity 548 +#define SYS_numa_setaffinity 549 +#define SYS_MAXSYSCALL 550 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Sat Jul 11 15:21:37 2015 (r285387) +++ head/sys/sys/syscall.mk Sat Jul 11 15:22:11 2015 (r285388) @@ -412,4 +412,6 @@ MIASM = \ procctl.o \ ppoll.o \ futimens.o \ - utimensat.o + utimensat.o \ + numa_getaffinity.o \ + numa_setaffinity.o Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Sat Jul 11 15:21:37 2015 (r285387) +++ head/sys/sys/sysproto.h Sat Jul 11 15:22:11 2015 (r285388) @@ -1790,6 +1790,16 @@ struct utimensat_args { char times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; +struct numa_getaffinity_args { + char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)]; + char id_l_[PADL_(id_t)]; id_t id; char id_r_[PADR_(id_t)]; + char policy_l_[PADL_(struct vm_domain_policy_entry *)]; struct vm_domain_policy_entry * policy; char policy_r_[PADR_(struct vm_domain_policy_entry *)]; +}; +struct numa_setaffinity_args { + char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)]; + char id_l_[PADL_(id_t)]; id_t id; char id_r_[PADR_(id_t)]; + char policy_l_[PADL_(const struct vm_domain_policy_entry *)]; const struct vm_domain_policy_entry * policy; char policy_r_[PADR_(const struct vm_domain_policy_entry *)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_sys_exit(struct thread *, struct sys_exit_args *); int sys_fork(struct thread *, struct fork_args *); @@ -2178,6 +2188,8 @@ int sys_procctl(struct thread *, struct int sys_ppoll(struct thread *, struct ppoll_args *); int sys_futimens(struct thread *, struct futimens_args *); int sys_utimensat(struct thread *, struct utimensat_args *); +int sys_numa_getaffinity(struct thread *, struct numa_getaffinity_args *); +int sys_numa_setaffinity(struct thread *, struct numa_setaffinity_args *); #ifdef COMPAT_43 @@ -2931,6 +2943,8 @@ int freebsd7_shmctl(struct thread *, str #define SYS_AUE_ppoll AUE_POLL #define SYS_AUE_futimens AUE_FUTIMES #define SYS_AUE_utimensat AUE_FUTIMESAT +#define SYS_AUE_numa_getaffinity AUE_NULL +#define SYS_AUE_numa_setaffinity AUE_NULL #undef PAD_ #undef PADL_ From owner-svn-src-all@freebsd.org Sat Jul 11 16:00:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12BFE998E2E; Sat, 11 Jul 2015 16:00:24 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 714672EA6; Sat, 11 Jul 2015 16:00:22 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id t6BG0AHY007282; Sat, 11 Jul 2015 19:00:11 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Sat, 11 Jul 2015 19:00:10 +0300 (MSK) From: Dmitry Morozovsky To: Adrian Chadd cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285387 - in head: lib/libc/sys share/man/man4 sys/conf sys/kern sys/sys sys/vm usr.bin usr.bin/numactl In-Reply-To: <201507111521.t6BFLcrv039934@repo.freebsd.org> Message-ID: References: <201507111521.t6BFLcrv039934@repo.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Sat, 11 Jul 2015 19:00:11 +0300 (MSK) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 16:00:24 -0000 Adrian, On Sat, 11 Jul 2015, Adrian Chadd wrote: > Author: adrian > Date: Sat Jul 11 15:21:37 2015 > New Revision: 285387 > URL: https://svnweb.freebsd.org/changeset/base/285387 > > Log: > Add an initial NUMA affinity/policy configuration for threads and processes. This is totally awesome. Thank you and all related people/companies a lot. [snip all the rest] -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-all@freebsd.org Sat Jul 11 16:02:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39CD4998F8F; Sat, 11 Jul 2015 16:02:08 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 10D9811D9; Sat, 11 Jul 2015 16:02:08 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BG270L064212; Sat, 11 Jul 2015 16:02:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BG27cf064210; Sat, 11 Jul 2015 16:02:07 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507111602.t6BG27cf064210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 11 Jul 2015 16:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285389 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 16:02:08 -0000 Author: andrew Date: Sat Jul 11 16:02:06 2015 New Revision: 285389 URL: https://svnweb.freebsd.org/changeset/base/285389 Log: Always send a SIGSEGV on a map failure. Use the code to tell the reason for the signal. Sponsored by: ABT Systems Ltd Modified: head/sys/arm/arm/trap-v6.c Modified: head/sys/arm/arm/trap-v6.c ============================================================================== --- head/sys/arm/arm/trap-v6.c Sat Jul 11 15:22:11 2015 (r285388) +++ head/sys/arm/arm/trap-v6.c Sat Jul 11 16:02:06 2015 (r285389) @@ -542,8 +542,8 @@ nogo: return; } - ksig.sig = (rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV; - ksig.code = 0; + ksig.sig = SIGSEGV; + ksig.code = (rv == KERN_PROTECTION_FAILURE) ? SEGV_ACCERR : SEGV_MAPERR; ksig.addr = far; do_trapsignal: From owner-svn-src-all@freebsd.org Sat Jul 11 16:19:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4259699916C; Sat, 11 Jul 2015 16:19:16 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 2454C1996; Sat, 11 Jul 2015 16:19:16 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BGJFXd069799; Sat, 11 Jul 2015 16:19:15 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BGJCm4069792; Sat, 11 Jul 2015 16:19:12 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201507111619.t6BGJCm4069792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 11 Jul 2015 16:19:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285390 - in head/sys: compat/svr4 kern sys ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 16:19:16 -0000 Author: mjg Date: Sat Jul 11 16:19:11 2015 New Revision: 285390 URL: https://svnweb.freebsd.org/changeset/base/285390 Log: Move chdir/chroot-related fdp manipulation to kern_descrip.c Prefix exported functions with pwd_. Deduplicate some code by adding a helper for setting fd_cdir. Reviewed by: kib Modified: head/sys/compat/svr4/svr4_misc.c head/sys/kern/kern_descrip.c head/sys/kern/kern_jail.c head/sys/kern/vfs_syscalls.c head/sys/sys/filedesc.h head/sys/sys/vnode.h head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/compat/svr4/svr4_misc.c ============================================================================== --- head/sys/compat/svr4/svr4_misc.c Sat Jul 11 16:02:06 2015 (r285389) +++ head/sys/compat/svr4/svr4_misc.c Sat Jul 11 16:19:11 2015 (r285390) @@ -643,7 +643,7 @@ svr4_sys_fchroot(td, uap) goto fail; #endif VOP_UNLOCK(vp, 0); - error = change_root(vp, td); + error = pwd_chroot(td, vp); vrele(vp); return (error); fail: Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sat Jul 11 16:02:06 2015 (r285389) +++ head/sys/kern/kern_descrip.c Sat Jul 11 16:19:11 2015 (r285390) @@ -2855,6 +2855,96 @@ dupfdopen(struct thread *td, struct file } /* + * This sysctl determines if we will allow a process to chroot(2) if it + * has a directory open: + * 0: disallowed for all processes. + * 1: allowed for processes that were not already chroot(2)'ed. + * 2: allowed for all processes. + */ + +static int chroot_allow_open_directories = 1; + +SYSCTL_INT(_kern, OID_AUTO, chroot_allow_open_directories, CTLFLAG_RW, + &chroot_allow_open_directories, 0, + "Allow a process to chroot(2) if it has a directory open"); + +/* + * Helper function for raised chroot(2) security function: Refuse if + * any filedescriptors are open directories. + */ +static int +chroot_refuse_vdir_fds(struct filedesc *fdp) +{ + struct vnode *vp; + struct file *fp; + int fd; + + FILEDESC_LOCK_ASSERT(fdp); + + for (fd = 0; fd <= fdp->fd_lastfile; fd++) { + fp = fget_locked(fdp, fd); + if (fp == NULL) + continue; + if (fp->f_type == DTYPE_VNODE) { + vp = fp->f_vnode; + if (vp->v_type == VDIR) + return (EPERM); + } + } + return (0); +} + +/* + * Common routine for kern_chroot() and jail_attach(). The caller is + * responsible for invoking priv_check() and mac_vnode_check_chroot() to + * authorize this operation. + */ +int +pwd_chroot(struct thread *td, struct vnode *vp) +{ + struct filedesc *fdp; + struct vnode *oldvp; + int error; + + fdp = td->td_proc->p_fd; + FILEDESC_XLOCK(fdp); + if (chroot_allow_open_directories == 0 || + (chroot_allow_open_directories == 1 && fdp->fd_rdir != rootvnode)) { + error = chroot_refuse_vdir_fds(fdp); + if (error != 0) { + FILEDESC_XUNLOCK(fdp); + return (error); + } + } + oldvp = fdp->fd_rdir; + VREF(vp); + fdp->fd_rdir = vp; + if (fdp->fd_jdir == NULL) { + VREF(vp); + fdp->fd_jdir = vp; + } + FILEDESC_XUNLOCK(fdp); + vrele(oldvp); + return (0); +} + +void +pwd_chdir(struct thread *td, struct vnode *vp) +{ + struct filedesc *fdp; + struct vnode *oldvp; + + fdp = td->td_proc->p_fd; + FILEDESC_XLOCK(fdp); + VNASSERT(vp->v_usecount > 0, vp, + ("chdir to a vnode with zero usecount")); + oldvp = fdp->fd_cdir; + fdp->fd_cdir = vp; + FILEDESC_XUNLOCK(fdp); + vrele(oldvp); +} + +/* * Scan all active processes and prisons to see if any of them have a current * or root directory of `olddp'. If so, replace them with the new mount point. */ Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Sat Jul 11 16:02:06 2015 (r285389) +++ head/sys/kern/kern_jail.c Sat Jul 11 16:19:11 2015 (r285390) @@ -2432,7 +2432,7 @@ do_jail_attach(struct thread *td, struct goto e_unlock; #endif VOP_UNLOCK(pr->pr_root, 0); - if ((error = change_root(pr->pr_root, td))) + if ((error = pwd_chroot(td, pr->pr_root))) goto e_revert_osd; newcred = crget(); Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Sat Jul 11 16:02:06 2015 (r285389) +++ head/sys/kern/vfs_syscalls.c Sat Jul 11 16:19:11 2015 (r285390) @@ -728,8 +728,7 @@ sys_fchdir(td, uap) int fd; } */ *uap; { - register struct filedesc *fdp = td->td_proc->p_fd; - struct vnode *vp, *tdp, *vpold; + struct vnode *vp, *tdp; struct mount *mp; struct file *fp; cap_rights_t rights; @@ -761,11 +760,7 @@ sys_fchdir(td, uap) return (error); } VOP_UNLOCK(vp, 0); - FILEDESC_XLOCK(fdp); - vpold = fdp->fd_cdir; - fdp->fd_cdir = vp; - FILEDESC_XUNLOCK(fdp); - vrele(vpold); + pwd_chdir(td, vp); return (0); } @@ -791,9 +786,7 @@ sys_chdir(td, uap) int kern_chdir(struct thread *td, char *path, enum uio_seg pathseg) { - register struct filedesc *fdp = td->td_proc->p_fd; struct nameidata nd; - struct vnode *vp; int error; NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | AUDITVNODE1, @@ -807,56 +800,11 @@ kern_chdir(struct thread *td, char *path } VOP_UNLOCK(nd.ni_vp, 0); NDFREE(&nd, NDF_ONLY_PNBUF); - FILEDESC_XLOCK(fdp); - vp = fdp->fd_cdir; - fdp->fd_cdir = nd.ni_vp; - FILEDESC_XUNLOCK(fdp); - vrele(vp); + pwd_chdir(td, nd.ni_vp); return (0); } /* - * Helper function for raised chroot(2) security function: Refuse if - * any filedescriptors are open directories. - */ -static int -chroot_refuse_vdir_fds(fdp) - struct filedesc *fdp; -{ - struct vnode *vp; - struct file *fp; - int fd; - - FILEDESC_LOCK_ASSERT(fdp); - - for (fd = 0; fd <= fdp->fd_lastfile; fd++) { - fp = fget_locked(fdp, fd); - if (fp == NULL) - continue; - if (fp->f_type == DTYPE_VNODE) { - vp = fp->f_vnode; - if (vp->v_type == VDIR) - return (EPERM); - } - } - return (0); -} - -/* - * This sysctl determines if we will allow a process to chroot(2) if it - * has a directory open: - * 0: disallowed for all processes. - * 1: allowed for processes that were not already chroot(2)'ed. - * 2: allowed for all processes. - */ - -static int chroot_allow_open_directories = 1; - -SYSCTL_INT(_kern, OID_AUTO, chroot_allow_open_directories, CTLFLAG_RW, - &chroot_allow_open_directories, 0, - "Allow a process to chroot(2) if it has a directory open"); - -/* * Change notion of root (``/'') directory. */ #ifndef _SYS_SYSPROTO_H_ @@ -891,7 +839,7 @@ sys_chroot(td, uap) goto e_vunlock; #endif VOP_UNLOCK(nd.ni_vp, 0); - error = change_root(nd.ni_vp, td); + error = pwd_chroot(td, nd.ni_vp); vrele(nd.ni_vp); NDFREE(&nd, NDF_ONLY_PNBUF); return (error); @@ -926,42 +874,6 @@ change_dir(vp, td) return (VOP_ACCESS(vp, VEXEC, td->td_ucred, td)); } -/* - * Common routine for kern_chroot() and jail_attach(). The caller is - * responsible for invoking priv_check() and mac_vnode_check_chroot() to - * authorize this operation. - */ -int -change_root(vp, td) - struct vnode *vp; - struct thread *td; -{ - struct filedesc *fdp; - struct vnode *oldvp; - int error; - - fdp = td->td_proc->p_fd; - FILEDESC_XLOCK(fdp); - if (chroot_allow_open_directories == 0 || - (chroot_allow_open_directories == 1 && fdp->fd_rdir != rootvnode)) { - error = chroot_refuse_vdir_fds(fdp); - if (error != 0) { - FILEDESC_XUNLOCK(fdp); - return (error); - } - } - oldvp = fdp->fd_rdir; - fdp->fd_rdir = vp; - VREF(fdp->fd_rdir); - if (!fdp->fd_jdir) { - fdp->fd_jdir = vp; - VREF(fdp->fd_jdir); - } - FILEDESC_XUNLOCK(fdp); - vrele(oldvp); - return (0); -} - static __inline void flags_to_rights(int flags, cap_rights_t *rightsp) { Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Sat Jul 11 16:02:06 2015 (r285389) +++ head/sys/sys/filedesc.h Sat Jul 11 16:19:11 2015 (r285390) @@ -205,6 +205,10 @@ fd_modified(struct filedesc *fdp, int fd return (!seq_consistent(fd_seq(fdp->fd_files, fd), seq)); } +/* cdir/rdir/jdir manipulation functions. */ +void pwd_chdir(struct thread *td, struct vnode *vp); +int pwd_chroot(struct thread *td, struct vnode *vp); + #endif /* _KERNEL */ #endif /* !_SYS_FILEDESC_H_ */ Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Sat Jul 11 16:02:06 2015 (r285389) +++ head/sys/sys/vnode.h Sat Jul 11 16:19:11 2015 (r285390) @@ -616,7 +616,6 @@ void cache_purge(struct vnode *vp); void cache_purge_negative(struct vnode *vp); void cache_purgevfs(struct mount *mp); int change_dir(struct vnode *vp, struct thread *td); -int change_root(struct vnode *vp, struct thread *td); void cvtstat(struct stat *st, struct ostat *ost); void cvtnstat(struct stat *sb, struct nstat *nsb); int getnewvnode(const char *tag, struct mount *mp, struct vop_vector *vops, Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Sat Jul 11 16:02:06 2015 (r285389) +++ head/sys/ufs/ffs/ffs_alloc.c Sat Jul 11 16:19:11 2015 (r285390) @@ -2748,13 +2748,12 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) struct thread *td = curthread; struct fsck_cmd cmd; struct ufsmount *ump; - struct vnode *vp, *vpold, *dvp, *fdvp; + struct vnode *vp, *dvp, *fdvp; struct inode *ip, *dp; struct mount *mp; struct fs *fs; ufs2_daddr_t blkno; long blkcnt, blksize; - struct filedesc *fdp; struct file *fp, *vfp; cap_rights_t rights; int filetype, error; @@ -2968,12 +2967,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) break; } VOP_UNLOCK(vp, 0); - fdp = td->td_proc->p_fd; - FILEDESC_XLOCK(fdp); - vpold = fdp->fd_cdir; - fdp->fd_cdir = vp; - FILEDESC_XUNLOCK(fdp); - vrele(vpold); + pwd_chdir(td, vp); break; case FFS_SET_DOTDOT: From owner-svn-src-all@freebsd.org Sat Jul 11 16:22:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CA76999265; Sat, 11 Jul 2015 16:22:53 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 EFBD31D26; Sat, 11 Jul 2015 16:22:52 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BGMq9M073870; Sat, 11 Jul 2015 16:22:52 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BGMnfk073860; Sat, 11 Jul 2015 16:22:49 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201507111622.t6BGMnfk073860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 11 Jul 2015 16:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285391 - in head/sys: cam/ctl cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys compat/ndis dev/xen/blkback kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 16:22:53 -0000 Author: mjg Date: Sat Jul 11 16:22:48 2015 New Revision: 285391 URL: https://svnweb.freebsd.org/changeset/base/285391 Log: Create a dedicated function for ensuring that cdir and rdir are populated. Previously several places were doing it on its own, partially incorrectly (e.g. without the filedesc locked) or even actively harmful by populating jdir or assigning rootvnode without vrefing it. Reviewed by: kib Modified: head/sys/cam/ctl/ctl_backend_block.c head/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c head/sys/cddl/compat/opensolaris/sys/vnode.h head/sys/compat/ndis/subr_ndis.c head/sys/dev/xen/blkback/blkback.c head/sys/kern/kern_descrip.c head/sys/kern/subr_firmware.c head/sys/sys/filedesc.h Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Sat Jul 11 16:19:11 2015 (r285390) +++ head/sys/cam/ctl/ctl_backend_block.c Sat Jul 11 16:22:48 2015 (r285391) @@ -2123,18 +2123,7 @@ ctl_be_block_open(struct ctl_be_block_so return (1); } - if (!curthread->td_proc->p_fd->fd_cdir) { - curthread->td_proc->p_fd->fd_cdir = rootvnode; - VREF(rootvnode); - } - if (!curthread->td_proc->p_fd->fd_rdir) { - curthread->td_proc->p_fd->fd_rdir = rootvnode; - VREF(rootvnode); - } - if (!curthread->td_proc->p_fd->fd_jdir) { - curthread->td_proc->p_fd->fd_jdir = rootvnode; - VREF(rootvnode); - } + pwd_ensure_dirs(); again: NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, be_lun->dev_path, curthread); Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c Sat Jul 11 16:19:11 2015 (r285390) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c Sat Jul 11 16:22:48 2015 (r285391) @@ -67,21 +67,10 @@ static void * kobj_open_file_vnode(const char *file) { struct thread *td = curthread; - struct filedesc *fd; struct nameidata nd; int error, flags; - fd = td->td_proc->p_fd; - FILEDESC_XLOCK(fd); - if (fd->fd_rdir == NULL) { - fd->fd_rdir = rootvnode; - vref(fd->fd_rdir); - } - if (fd->fd_cdir == NULL) { - fd->fd_cdir = rootvnode; - vref(fd->fd_cdir); - } - FILEDESC_XUNLOCK(fd); + pwd_ensure_dirs(); flags = FREAD | O_NOFOLLOW; NDINIT(&nd, LOOKUP, 0, UIO_SYSSPACE, file, td); Modified: head/sys/cddl/compat/opensolaris/sys/vnode.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/vnode.h Sat Jul 11 16:19:11 2015 (r285390) +++ head/sys/cddl/compat/opensolaris/sys/vnode.h Sat Jul 11 16:22:48 2015 (r285391) @@ -162,7 +162,6 @@ vn_openat(char *pnamep, enum uio_seg seg int fd) { struct thread *td = curthread; - struct filedesc *fdc; struct nameidata nd; int error, operation; @@ -179,17 +178,7 @@ vn_openat(char *pnamep, enum uio_seg seg } ASSERT(umask == 0); - fdc = td->td_proc->p_fd; - FILEDESC_XLOCK(fdc); - if (fdc->fd_rdir == NULL) { - fdc->fd_rdir = rootvnode; - vref(fdc->fd_rdir); - } - if (fdc->fd_cdir == NULL) { - fdc->fd_cdir = rootvnode; - vref(fdc->fd_rdir); - } - FILEDESC_XUNLOCK(fdc); + pwd_ensure_dirs(); if (startvp != NULL) vref(startvp); Modified: head/sys/compat/ndis/subr_ndis.c ============================================================================== --- head/sys/compat/ndis/subr_ndis.c Sat Jul 11 16:19:11 2015 (r285390) +++ head/sys/compat/ndis/subr_ndis.c Sat Jul 11 16:22:48 2015 (r285391) @@ -2817,10 +2817,7 @@ NdisOpenFile(status, filehandle, filelen /* Some threads don't have a current working directory. */ - if (td->td_proc->p_fd->fd_rdir == NULL) - td->td_proc->p_fd->fd_rdir = rootvnode; - if (td->td_proc->p_fd->fd_cdir == NULL) - td->td_proc->p_fd->fd_cdir = rootvnode; + pwd_ensure_dirs(); NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path, td); Modified: head/sys/dev/xen/blkback/blkback.c ============================================================================== --- head/sys/dev/xen/blkback/blkback.c Sat Jul 11 16:19:11 2015 (r285390) +++ head/sys/dev/xen/blkback/blkback.c Sat Jul 11 16:22:48 2015 (r285391) @@ -2692,18 +2692,7 @@ xbb_open_backend(struct xbb_softc *xbb) if ((xbb->flags & XBBF_READ_ONLY) == 0) flags |= FWRITE; - if (!curthread->td_proc->p_fd->fd_cdir) { - curthread->td_proc->p_fd->fd_cdir = rootvnode; - VREF(rootvnode); - } - if (!curthread->td_proc->p_fd->fd_rdir) { - curthread->td_proc->p_fd->fd_rdir = rootvnode; - VREF(rootvnode); - } - if (!curthread->td_proc->p_fd->fd_jdir) { - curthread->td_proc->p_fd->fd_jdir = rootvnode; - VREF(rootvnode); - } + pwd_ensure_dirs(); again: NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, xbb->dev_name, curthread); Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sat Jul 11 16:19:11 2015 (r285390) +++ head/sys/kern/kern_descrip.c Sat Jul 11 16:22:48 2015 (r285391) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -308,6 +309,24 @@ fdfree(struct filedesc *fdp, int fd) #endif } +void +pwd_ensure_dirs(void) +{ + struct filedesc *fdp; + + fdp = curproc->p_fd; + FILEDESC_XLOCK(fdp); + if (fdp->fd_cdir == NULL) { + fdp->fd_cdir = rootvnode; + VREF(rootvnode); + } + if (fdp->fd_rdir == NULL) { + fdp->fd_rdir = rootvnode; + VREF(rootvnode); + } + FILEDESC_XUNLOCK(fdp); +} + /* * System calls on descriptors. */ Modified: head/sys/kern/subr_firmware.c ============================================================================== --- head/sys/kern/subr_firmware.c Sat Jul 11 16:19:11 2015 (r285390) +++ head/sys/kern/subr_firmware.c Sat Jul 11 16:22:48 2015 (r285391) @@ -383,19 +383,8 @@ firmware_put(const struct firmware *p, i static void set_rootvnode(void *arg, int npending) { - struct thread *td = curthread; - struct proc *p = td->td_proc; - FILEDESC_XLOCK(p->p_fd); - if (p->p_fd->fd_cdir == NULL) { - p->p_fd->fd_cdir = rootvnode; - VREF(rootvnode); - } - if (p->p_fd->fd_rdir == NULL) { - p->p_fd->fd_rdir = rootvnode; - VREF(rootvnode); - } - FILEDESC_XUNLOCK(p->p_fd); + pwd_ensure_dirs(); free(arg, M_TEMP); } Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Sat Jul 11 16:19:11 2015 (r285390) +++ head/sys/sys/filedesc.h Sat Jul 11 16:22:48 2015 (r285391) @@ -208,6 +208,7 @@ fd_modified(struct filedesc *fdp, int fd /* cdir/rdir/jdir manipulation functions. */ void pwd_chdir(struct thread *td, struct vnode *vp); int pwd_chroot(struct thread *td, struct vnode *vp); +void pwd_ensure_dirs(void); #endif /* _KERNEL */ From owner-svn-src-all@freebsd.org Sat Jul 11 16:26:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 911D09992D7 for ; Sat, 11 Jul 2015 16:26:43 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 62D3E1EC8 for ; Sat, 11 Jul 2015 16:26:43 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by padck2 with SMTP id ck2so19217601pad.0 for ; Sat, 11 Jul 2015 09:26:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=LqQYmJRYrX5Lxg91SFhUPmP/8Z5eGmTvVhbwWyh0Wwc=; b=Y0HxR4rWuPrbq3omUCO5+TWdFJK2xJEJ3cqQSh4I6aXZDE74IMiqB97BYkmjvHDDGG Q31CE6uzDIo3mO9DMeqV3SEtGJuXuzTXwToCGnLEQVOS6F/Re3UattoNJ8Qm7eKCd1Qz xGb3l4TG1cq9GVWUl/LXbe4uike6OjRScx7ziZRc1wYLs+xI+XM88Ios/r2Uq1flA7SG Sk1teEaa+FEzNSqNwoyPJPbUJLn5e1Um3E9Y4/YJ24XWfjN/oPEBV8uTJTC/avGZih2o MF5Q38BYf9NYR3+nVo6vc6O/cbuewcuRoLWPRXTLOQdrztbi0P3biVBb1YCsexu7oU3v e9Cg== X-Gm-Message-State: ALoCoQl949KSMF3h4hrsGr4lQpPVmMYCO5CPZ1kh+YjY65IhxgcTFLX5KmB20jNmAkrZm9NPEZ9C X-Received: by 10.70.103.70 with SMTP id fu6mr53958914pdb.22.1436631995771; Sat, 11 Jul 2015 09:26:35 -0700 (PDT) Received: from [10.64.26.138] ([69.53.236.236]) by smtp.gmail.com with ESMTPSA id je4sm12989574pbb.17.2015.07.11.09.26.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 11 Jul 2015 09:26:35 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r285366 - in head: lib/libmd sys/crypto/sha2 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Content-Type: multipart/signed; boundary="Apple-Mail=_9DEE4A8F-3E1B-40C5-BAF5-D815EF466111"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5 From: Warner Losh In-Reply-To: Date: Sat, 11 Jul 2015 10:26:37 -0600 Cc: John-Mark Gurney , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <34F75D0D-33F1-4D4F-81E5-A1DA7664868C@bsdimp.com> References: <201507110312.t6B3CZBv081280@repo.freebsd.org> <20150711080439.GD8523@funkthat.com> <20150711142920.GE8523@funkthat.com> To: Craig Rodrigues X-Mailer: Apple Mail (2.2102) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 16:26:43 -0000 --Apple-Mail=_9DEE4A8F-3E1B-40C5-BAF5-D815EF466111 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jul 11, 2015, at 8:33 AM, Craig Rodrigues = wrote: >=20 >=20 >=20 > On Sat, Jul 11, 2015 at 10:29 AM, John-Mark Gurney = wrote: > Craig Rodrigues wrote this message on Sat, Jul 11, 2015 at 10:16 = -0400: >=20 > > So it looks like _libmd_SHA256_File is not defined in the legacy > > library used during the bootstrap. >=20 > The closest I can see is that sha256hl.c (from mdXhl.c) is including > "sha256.h" with double quotes, and getting the wrong header file.. >=20 >=20 > Yes, I think you are right. >=20 > If I go to src/lib/libmd, and type: >=20 > make -V CFLAGS >=20 > I see: >=20 > -O2 -pipe -I/builds/FreeBSD_HEAD/lib/libmd -DWEAK_REFS -std=3Dgnu99 = -Qunused-arguments -fstack-protector -Wno-pointer-sign -Wno-empty-body = -Wno-string-plus-int -Wno-unused-const-variable = -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality = -Wno-unused-function -Wno-enum-conversion -Wno-switch -Wno-switch-enum = -Wno-knr-promoted-parameter -Wno-parentheses >=20 > After your change, there is no sha256.h file in the src/lib/libmd = directory, so the bootstrap stage > is picking up sha256.h from /usr/include , which causes problems. You=E2=80=99d be better off retaining sha256.h as an empty file, or = adding it to the legacy includes. But for some reason those aren=E2=80=99t= appearing on this command line (suggesting this is built after we=E2=80=99= re done with -legacy). If so, an empty file would likely cover many of = the sins here. I think you can add a CFLAGS.sha256hi.c=3D-E to get the intermediate = output of the pre-processor to see exactly where this file is coming = from. Or you can use the .depend file from the build to see where it was = picked up from (which might be easier). Unless you can resolve this quickly, I=E2=80=99d go with the blackout. Warner --Apple-Mail=_9DEE4A8F-3E1B-40C5-BAF5-D815EF466111 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVoUO9AAoJEGwc0Sh9sBEAlz8QAKiRcCiMe6yGhb/2ozXEqnJo zYV3LdrxYWAmxkO/pCjobWUzcaWQRSR9snqZTTIDbO/ACpgnXqKhOpS3OZzfScyZ 6HwQATjoGU+3zAej6ZlOO4ULkdKcM90oFWVyvEfk5mmpUbIn3O6eOEYUJk4LfvsP N8r+3mGykhZ5HRa/M2+l5ixsXWmDWGXWZxU5NHNuPSayho3B0ySvMZDfw9xblSku NL1UbBmjF0/PzreWdQjEf1u8BclO+YwUZx8mc2veHHnvqkwV9F9iu2+ndQeeqKDe JUWMSiTAO9iWNy4UI7iu/KK2dLNsa/e+Pz1Gs+dWTNWbj8EHedi3Cu46WEFbwbcc hvUiE4nmsCW3PHp0/8asUCSg4o64IFhuPAYbglY7gwdVTj7ztMFraACRY6AN1KgP Al8YFcNdOYWBOojbeFp02kPqQZGCQy5krzurqLhojU8IMETWNnwWZv6ynVg38Mkk YPgImCnoUcbJ3WlNCq6cO0dyC+SPHgU2J8JHrQVunTU+pfI2KBHBceSSJpL3lEf8 XTYRKL15m9lAPXkoDNMia7NLFlymsm6orWF+c3+MDPxEOYBLrLTgRUiJLjGiVhiz hvoeFmPKD3Q4y2xG3JgLc5UkMm71045Qi8Jlb4VtAdKJgvkBZsK9CnodLFMjhoAA YZE/JL7GO/AIsNxMAPNc =jgZg -----END PGP SIGNATURE----- --Apple-Mail=_9DEE4A8F-3E1B-40C5-BAF5-D815EF466111-- From owner-svn-src-all@freebsd.org Sat Jul 11 16:28:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4FC399932C; Sat, 11 Jul 2015 16:28:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 8C347202A; Sat, 11 Jul 2015 16:28:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BGSD52074636; Sat, 11 Jul 2015 16:28:13 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BGSDPp074635; Sat, 11 Jul 2015 16:28:13 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201507111628.t6BGSDPp074635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 11 Jul 2015 16:28:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285392 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 16:28:13 -0000 Author: mjg Date: Sat Jul 11 16:28:12 2015 New Revision: 285392 URL: https://svnweb.freebsd.org/changeset/base/285392 Log: vfs: move si_usecount manipulation to dedicated functions Reviewed by: kib Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sat Jul 11 16:22:48 2015 (r285391) +++ head/sys/kern/vfs_subr.c Sat Jul 11 16:28:12 2015 (r285392) @@ -105,6 +105,8 @@ static void v_incr_usecount(struct vnode static void v_decr_usecount(struct vnode *); static void v_decr_useonly(struct vnode *); static void v_upgrade_usecount(struct vnode *); +static void v_incr_devcount(struct vnode *); +static void v_decr_devcount(struct vnode *); static void vnlru_free(int); static void vgonel(struct vnode *); static void vfs_knllock(void *arg); @@ -2082,11 +2084,7 @@ v_incr_usecount(struct vnode *vp) CTR2(KTR_VFS, "%s: vp %p", __func__, vp); vholdl(vp); vp->v_usecount++; - if (vp->v_type == VCHR && vp->v_rdev != NULL) { - dev_lock(); - vp->v_rdev->si_usecount++; - dev_unlock(); - } + v_incr_devcount(vp); } /* @@ -2099,11 +2097,7 @@ v_upgrade_usecount(struct vnode *vp) CTR2(KTR_VFS, "%s: vp %p", __func__, vp); vp->v_usecount++; - if (vp->v_type == VCHR && vp->v_rdev != NULL) { - dev_lock(); - vp->v_rdev->si_usecount++; - dev_unlock(); - } + v_incr_devcount(vp); } /* @@ -2120,11 +2114,7 @@ v_decr_usecount(struct vnode *vp) ("v_decr_usecount: negative usecount")); CTR2(KTR_VFS, "%s: vp %p", __func__, vp); vp->v_usecount--; - if (vp->v_type == VCHR && vp->v_rdev != NULL) { - dev_lock(); - vp->v_rdev->si_usecount--; - dev_unlock(); - } + v_decr_devcount(vp); vdropl(vp); } @@ -2143,6 +2133,36 @@ v_decr_useonly(struct vnode *vp) ("v_decr_useonly: negative usecount")); CTR2(KTR_VFS, "%s: vp %p", __func__, vp); vp->v_usecount--; + v_decr_devcount(vp); +} + +/* + * Increment si_usecount of the associated device, if any. + */ +static void +v_incr_devcount(struct vnode *vp) +{ + +#ifdef INVARIANTS + /* getnewvnode() calls v_incr_usecount() without holding interlock. */ + if (vp->v_type != VNON || vp->v_data != NULL) + ASSERT_VI_LOCKED(vp, __FUNCTION__); +#endif + if (vp->v_type == VCHR && vp->v_rdev != NULL) { + dev_lock(); + vp->v_rdev->si_usecount++; + dev_unlock(); + } +} + +/* + * Decrement si_usecount of the associated device, if any. + */ +static void +v_decr_devcount(struct vnode *vp) +{ + + ASSERT_VI_LOCKED(vp, __FUNCTION__); if (vp->v_type == VCHR && vp->v_rdev != NULL) { dev_lock(); vp->v_rdev->si_usecount--; From owner-svn-src-all@freebsd.org Sat Jul 11 16:28:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B09E799935C; Sat, 11 Jul 2015 16:28:56 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 94E46216A; Sat, 11 Jul 2015 16:28:56 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BGSufO074763; Sat, 11 Jul 2015 16:28:56 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BGSuU2074762; Sat, 11 Jul 2015 16:28:56 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201507111628.t6BGSuU2074762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 11 Jul 2015 16:28:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285393 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 16:28:56 -0000 Author: mjg Date: Sat Jul 11 16:28:55 2015 New Revision: 285393 URL: https://svnweb.freebsd.org/changeset/base/285393 Log: vfs: always clear VI_OWEINACT in consumers bumping v_usecount Previously vputx would detect the condition and clear the flag. With this change it is invalid to have both v_usecount > 0 and the flag set. Assert the condition is met in all revlevant places. Reviewed by: kib Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sat Jul 11 16:28:12 2015 (r285392) +++ head/sys/kern/vfs_subr.c Sat Jul 11 16:28:55 2015 (r285393) @@ -2082,6 +2082,10 @@ v_incr_usecount(struct vnode *vp) { CTR2(KTR_VFS, "%s: vp %p", __func__, vp); + VNASSERT(vp->v_usecount == 0 || (vp->v_iflag & VI_OWEINACT) == 0, vp, + ("vnode with usecount and VI_OWEINACT set")); + if (vp->v_iflag & VI_OWEINACT) + vp->v_iflag &= ~VI_OWEINACT; vholdl(vp); vp->v_usecount++; v_incr_devcount(vp); @@ -2199,6 +2203,8 @@ vget(struct vnode *vp, int flags, struct if (vp->v_iflag & VI_DOOMED && (flags & LK_RETRY) == 0) panic("vget: vn_lock failed to return ENOENT\n"); VI_LOCK(vp); + VNASSERT(vp->v_usecount == 0 || (vp->v_iflag & VI_OWEINACT) == 0, vp, + ("vnode with usecount and VI_OWEINACT set")); /* Upgrade our holdcnt to a usecount. */ v_upgrade_usecount(vp); /* @@ -2318,8 +2324,8 @@ vputx(struct vnode *vp, int func) } break; } - if (vp->v_usecount > 0) - vp->v_iflag &= ~VI_OWEINACT; + VNASSERT(vp->v_usecount == 0 || (vp->v_iflag & VI_OWEINACT) == 0, vp, + ("vnode with usecount and VI_OWEINACT set")); if (error == 0) { if (vp->v_iflag & VI_OWEINACT) vinactive(vp, curthread); From owner-svn-src-all@freebsd.org Sat Jul 11 16:29:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5325D9993AA; Sat, 11 Jul 2015 16:29:29 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100]) (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 27250241D; Sat, 11 Jul 2015 16:29:28 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.15.0.59/8.15.0.59) with SMTP id t6BGT6Hb030643; Sat, 11 Jul 2015 11:29:20 -0500 Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by pp1.rice.edu with ESMTP id 1vjvy383pm-1; Sat, 11 Jul 2015 11:29:20 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id B96D44C05CB; Sat, 11 Jul 2015 11:29:19 -0500 (CDT) Message-ID: <55A1445F.50901@rice.edu> Date: Sat, 11 Jul 2015 11:29:19 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285387 - in head: lib/libc/sys share/man/man4 sys/conf sys/kern sys/sys sys/vm usr.bin usr.bin/numactl References: <201507111521.t6BFLcrv039934@repo.freebsd.org> In-Reply-To: <201507111521.t6BFLcrv039934@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=1 compositescore=0.9 suspectscore=3 malwarescore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0.9 spamscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1506180000 definitions=main-1507110278 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 16:29:29 -0000 On 07/11/2015 10:21, Adrian Chadd wrote: > Author: adrian > Date: Sat Jul 11 15:21:37 2015 > New Revision: 285387 > URL: https://svnweb.freebsd.org/changeset/base/285387 > > Log: > Add an initial NUMA affinity/policy configuration for threads and pro= cesses. > =20 > This is based on work done by jeff@ and jhb@, as well as the numa.dif= f > patch that has been circulating when someone asks for first-touch NUM= A > on -10 or -11. > =20 > * Introduce a simple set of VM policy and iterator types. > * tie the policy types into the vm_phys path for now, mirroring how > the initial first-touch allocation work was enabled. > * add syscalls to control changing thread and process defaults. > * add a global NUMA VM domain policy. > * implement a simple cascade policy order - if a thread policy exists= , use it; > if a process policy exists, use it; use the default policy. > * processes inherit policies from their parent processes, threads inh= erit > policies from their parent threads. > * add a simple tool (numactl) to query and modify default thread/proc= ess > policities. > * add documentation for the new syscalls, for numa and for numactl. > * re-enable first touch NUMA again by default, as now policies can be= > set in a variety of methods. > =20 > This is only relevant for very specific workloads. > =20 > This doesn't pretend to be a final NUMA solution. > =20 > The previous defaults in -HEAD (with MAXMEMDOM set) can be achieved b= y > 'sysctl vm.default_policy=3Drr'. > =20 > This is only relevant if MAXMEMDOM is set to something other than 1. > Ie, if you're using GENERIC or a modified kernel with non-NUMA, then > this is a glorified no-op for you. > =20 > Thank you to Norse Corp for giving me access to rather large > (for FreeBSD!) NUMA machines in order to develop and verify this. > =20 > Thank you to Dell for providing me with dual socket sandybridge > and westmere v3 hardware to do NUMA development with. > =20 > Thank you to Scott Long at Netflix for providing me with access > to the two-socket, four-domain haswell v3 hardware. > =20 > Thank you to Peter Holm for running the stress testing suite > against the NUMA branch during various stages of development! > =20 > Tested: > =20 > * MIPS (regression testing; non-NUMA) > * i386 (regression testing; non-NUMA GENERIC) > * amd64 (regression testing; non-NUMA GENERIC) > * westmere, 2 socket (thankyou norse!) > * sandy bridge, 2 socket (thankyou dell!) > * ivy bridge, 2 socket (thankyou norse!) > * westmere-EX, 4 socket / 1TB RAM (thankyou norse!) > * haswell, 2 socket (thankyou norse!) > * haswell v3, 2 socket (thankyou dell) > * haswell v3, 2x18 core (thankyou scott long / netflix!) > =20 > * Peter Holm ran a stress test suite on this work and found one > issue, but has not been able to verify it (it doesn't look NUMA > related, and he only saw it once over many testing runs.) > =20 > * I've tested bhyve instances running in fixed NUMA domains and cpuse= ts; > all seems to work correctly. > =20 > Verified: > =20 > * intel-pcm - pcm-numa.x and pcm-memory.x, whilst selecting different= > NUMA policies for processes under test. > =20 > Review: > =20 > This was reviewed through phabricator (https://reviews.freebsd.org/D2= 559) > as well as privately and via emails to freebsd-arch@. The git histor= y > with specific attributes is available at https://github.com/erikarn/f= reebsd/ > in the NUMA branch (https://github.com/erikarn/freebsd/compare/local/= adrian_numa_policy). > =20 > This has been reviewed by a number of people (stas, rpaulo, kib, ngie= , > wblock) but not achieved a clear consensus. My hope is that with fur= ther > exposure and testing more functionality can be implemented and evalua= ted. > =20 > Notes: > =20 > * The VM doesn't handle unbalanced domains very well, and if you have= an overly > unbalanced memory setup whilst under high memory pressure, VM page = allocation > may fail leading to a kernel panic. This was a problem in the past= , but it's > much more easily triggered now with these tools. > =20 For the record, no, it doesn't panic. Both the first-touch scheme in 9.x and the round-robin scheme in 10.x fall back to allocating from a different domain until some page is found. Alan From owner-svn-src-all@freebsd.org Sat Jul 11 16:44:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D6199996C1; Sat, 11 Jul 2015 16:44:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 6E7702C59; Sat, 11 Jul 2015 16:44:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BGiTGS084107; Sat, 11 Jul 2015 16:44:29 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BGiTfq084106; Sat, 11 Jul 2015 16:44:29 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201507111644.t6BGiTfq084106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 11 Jul 2015 16:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285394 - head/sys/compat/linprocfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 16:44:29 -0000 Author: mjg Date: Sat Jul 11 16:44:28 2015 New Revision: 285394 URL: https://svnweb.freebsd.org/changeset/base/285394 Log: linprocfs: vref the vnode passed to vn_fullpath Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Sat Jul 11 16:28:55 2015 (r285393) +++ head/sys/compat/linprocfs/linprocfs.c Sat Jul 11 16:44:28 2015 (r285394) @@ -873,10 +873,20 @@ linprocfs_doprocstatus(PFS_FILL_ARGS) static int linprocfs_doproccwd(PFS_FILL_ARGS) { + struct filedesc *fdp; + struct vnode *vp; char *fullpath = "unknown"; char *freepath = NULL; - vn_fullpath(td, p->p_fd->fd_cdir, &fullpath, &freepath); + fdp = p->p_fd; + FILEDESC_SLOCK(fdp); + vp = fdp->fd_cdir; + if (vp != NULL) + VREF(vp); + FILEDESC_SUNLOCK(fdp); + vn_fullpath(td, vp, &fullpath, &freepath); + if (vp != NULL) + vrele(vp); sbuf_printf(sb, "%s", fullpath); if (freepath) free(freepath, M_TEMP); @@ -889,12 +899,20 @@ linprocfs_doproccwd(PFS_FILL_ARGS) static int linprocfs_doprocroot(PFS_FILL_ARGS) { - struct vnode *rvp; + struct filedesc *fdp; + struct vnode *vp; char *fullpath = "unknown"; char *freepath = NULL; - rvp = jailed(p->p_ucred) ? p->p_fd->fd_jdir : p->p_fd->fd_rdir; - vn_fullpath(td, rvp, &fullpath, &freepath); + fdp = p->p_fd; + FILEDESC_SLOCK(fdp); + vp = jailed(p->p_ucred) ? fdp->fd_jdir : fdp->fd_rdir; + if (vp != NULL) + VREF(vp); + FILEDESC_SUNLOCK(fdp); + vn_fullpath(td, vp, &fullpath, &freepath); + if (vp != NULL) + vrele(vp); sbuf_printf(sb, "%s", fullpath); if (freepath) free(freepath, M_TEMP); From owner-svn-src-all@freebsd.org Sat Jul 11 16:58:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93A8F999839; Sat, 11 Jul 2015 16:58:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 848071026; Sat, 11 Jul 2015 16:58:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BGwnTX089546; Sat, 11 Jul 2015 16:58:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BGwmX9089543; Sat, 11 Jul 2015 16:58:48 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507111658.t6BGwmX9089543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Jul 2015 16:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285395 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 16:58:49 -0000 Author: bapt Date: Sat Jul 11 16:58:47 2015 New Revision: 285395 URL: https://svnweb.freebsd.org/changeset/base/285395 Log: Separate usernext/groupnext from the main functions Modified: head/usr.sbin/pw/pw.h head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw.h ============================================================================== --- head/usr.sbin/pw/pw.h Sat Jul 11 16:44:28 2015 (r285394) +++ head/usr.sbin/pw/pw.h Sat Jul 11 16:58:47 2015 (r285395) @@ -83,7 +83,9 @@ struct carg *addarg(struct cargs * _args struct carg *getarg(struct cargs * _args, int ch); int pw_user(int mode, char *name, long id, struct cargs * _args); +int pw_usernext(struct userconf *cnf, bool quiet); int pw_group(int mode, char *name, long id, struct cargs * _args); +int pw_groupnext(struct userconf *cnf, bool quiet); char *pw_checkname(char *name, int gecos); int addnispwent(const char *path, struct passwd *pwd); Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sat Jul 11 16:44:28 2015 (r285394) +++ head/usr.sbin/pw/pw_group.c Sat Jul 11 16:58:47 2015 (r285395) @@ -92,6 +92,18 @@ set_passwd(struct group *grp, bool updat } int +pw_groupnext(struct userconf *cnf, bool quiet) +{ + gid_t next = gr_gidpolicy(cnf, -1); + + if (quiet) + return (next); + printf("%u\n", next); + + return (EXIT_SUCCESS); +} + +int pw_group(int mode, char *name, long id, struct cargs * args) { int rc; @@ -109,21 +121,12 @@ pw_group(int mode, char *name, long id, NULL }; + if (mode == M_NEXT) + return (pw_groupnext(cnf, getarg(args, 'q') != NULL)); + if (mode == M_LOCK || mode == M_UNLOCK) errx(EX_USAGE, "'lock' command is not available for groups"); - /* - * With M_NEXT, we only need to return the - * next gid to stdout - */ - if (mode == M_NEXT) { - gid_t next = gr_gidpolicy(cnf, id); - if (getarg(args, 'q')) - return next; - printf("%u\n", next); - return EXIT_SUCCESS; - } - if (mode == M_PRINT && getarg(args, 'a')) { SETGRENT(); while ((grp = GETGRENT()) != NULL) Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sat Jul 11 16:44:28 2015 (r285394) +++ head/usr.sbin/pw/pw_user.c Sat Jul 11 16:58:47 2015 (r285395) @@ -148,6 +148,20 @@ set_passwd(struct passwd *pwd, bool upda return (1); } +int +pw_usernext(struct userconf *cnf, bool quiet) +{ + uid_t next = pw_uidpolicy(cnf, -1); + + if (quiet) + return (next); + + printf("%u:", next); + pw_groupnext(cnf, quiet); + + return (EXIT_SUCCESS); +} + /*- * -C config configuration file * -q quiet operation @@ -216,19 +230,8 @@ pw_user(int mode, char *name, long id, s cnf = conf.userconf; - /* - * With M_NEXT, we only need to return the - * next uid to stdout - */ if (mode == M_NEXT) - { - uid_t next = pw_uidpolicy(cnf, id); - if (getarg(args, 'q')) - return next; - printf("%u:", next); - pw_group(mode, name, -1, args); - return EXIT_SUCCESS; - } + return (pw_usernext(cnf, getarg(args, 'q') != NULL)); /* * We can do all of the common legwork here @@ -845,11 +848,8 @@ pw_gidpolicy(struct cargs * args, char * addarg(&grpargs, 'g', tmp); } if (conf.dryrun) { - addarg(&grpargs, 'q', NULL); - gid = pw_group(M_NEXT, nam, -1, &grpargs); - } - else - { + gid = pw_groupnext(cnf, true); + } else { pw_group(M_ADD, nam, -1, &grpargs); if ((grp = GETGRNAM(nam)) != NULL) gid = grp->gr_gid; From owner-svn-src-all@freebsd.org Sat Jul 11 17:01:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDA009998A4; Sat, 11 Jul 2015 17:01:10 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 AF03B12F2; Sat, 11 Jul 2015 17:01:10 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BH1Anw091203; Sat, 11 Jul 2015 17:01:10 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BH19jf091195; Sat, 11 Jul 2015 17:01:09 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507111701.t6BH19jf091195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Jul 2015 17:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285396 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 17:01:11 -0000 Author: bapt Date: Sat Jul 11 17:01:08 2015 New Revision: 285396 URL: https://svnweb.freebsd.org/changeset/base/285396 Log: Move the quiet flag into the configuration structure Modified: head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/pwupd.h Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sat Jul 11 16:58:47 2015 (r285395) +++ head/usr.sbin/pw/pw.c Sat Jul 11 17:01:08 2015 (r285396) @@ -314,6 +314,9 @@ main(int argc, char *argv[]) case 'o': conf.checkduplicate = true; break; + case 'q': + conf.quiet = true; + break; default: addarg(&arglist, ch, optarg); break; @@ -334,7 +337,7 @@ main(int argc, char *argv[]) * We should immediately look for the -q 'quiet' switch so that we * don't bother with extraneous errors */ - if (getarg(&arglist, 'q') != NULL) + if (conf.quiet) freopen(_PATH_DEVNULL, "w", stderr); /* Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sat Jul 11 16:58:47 2015 (r285395) +++ head/usr.sbin/pw/pw_group.c Sat Jul 11 17:01:08 2015 (r285396) @@ -122,7 +122,7 @@ pw_group(int mode, char *name, long id, }; if (mode == M_NEXT) - return (pw_groupnext(cnf, getarg(args, 'q') != NULL)); + return (pw_groupnext(cnf, conf.quiet)); if (mode == M_LOCK || mode == M_UNLOCK) errx(EX_USAGE, "'lock' command is not available for groups"); Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sat Jul 11 16:58:47 2015 (r285395) +++ head/usr.sbin/pw/pw_user.c Sat Jul 11 17:01:08 2015 (r285396) @@ -231,7 +231,7 @@ pw_user(int mode, char *name, long id, s cnf = conf.userconf; if (mode == M_NEXT) - return (pw_usernext(cnf, getarg(args, 'q') != NULL)); + return (pw_usernext(cnf, conf.quiet)); /* * We can do all of the common legwork here Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Sat Jul 11 16:58:47 2015 (r285395) +++ head/usr.sbin/pw/pwupd.h Sat Jul 11 17:01:08 2015 (r285396) @@ -87,6 +87,7 @@ struct pwconf { char *config; int fd; int which; + bool quiet; bool dryrun; bool pretty; bool v7; From owner-svn-src-all@freebsd.org Sat Jul 11 17:06:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 036EF999A16; Sat, 11 Jul 2015 17:06:56 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id C35561699; Sat, 11 Jul 2015 17:06:55 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from bender.Home (97e07b11.skybroadband.com [151.224.123.17]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 5EE5ED7907; Sat, 11 Jul 2015 17:06:18 +0000 (UTC) Date: Sat, 11 Jul 2015 18:06:15 +0100 From: Andrew Turner To: John-Mark Gurney Cc: Craig Rodrigues , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r285366 - in head: lib/libmd sys/crypto/sha2 Message-ID: <20150711180615.52a618b7@bender.Home> In-Reply-To: <20150711142920.GE8523@funkthat.com> References: <201507110312.t6B3CZBv081280@repo.freebsd.org> <20150711080439.GD8523@funkthat.com> <20150711142920.GE8523@funkthat.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 17:06:56 -0000 On Sat, 11 Jul 2015 07:29:20 -0700 John-Mark Gurney wrote: ... > The closest I can see is that sha256hl.c (from mdXhl.c) is including > "sha256.h" with double quotes, and getting the wrong header file.. > I concur, the following fixes libmd to use the correct header. Andrew Index: lib/libmd/Makefile =================================================================== --- lib/libmd/Makefile (revision 285383) +++ lib/libmd/Makefile (working copy) @@ -49,6 +49,7 @@ # * macros are used to rename symbols to libcrypt internal names # * no weak aliases are generated CFLAGS+= -I${.CURDIR} -DWEAK_REFS +CFLAGS+= -I${.CURDIR}/../../sys/crypto/sha2 .PATH: ${.CURDIR}/${MACHINE_ARCH} ${.CURDIR}/../../sys/crypto/sha2 .if exists(${MACHINE_ARCH}/sha.S) From owner-svn-src-all@freebsd.org Sat Jul 11 17:33:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BED5F999F3F; Sat, 11 Jul 2015 17:33:51 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 AFACA1B15; Sat, 11 Jul 2015 17:33:51 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BHXpBT009074; Sat, 11 Jul 2015 17:33:51 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BHXpqf009073; Sat, 11 Jul 2015 17:33:51 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201507111733.t6BHXpqf009073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 11 Jul 2015 17:33:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285397 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 17:33:51 -0000 Author: jhibbits Date: Sat Jul 11 17:33:50 2015 New Revision: 285397 URL: https://svnweb.freebsd.org/changeset/base/285397 Log: cpu_number and cpu_swapout are never used, and only defined in powerpc. Modified: head/sys/powerpc/include/cpu.h Modified: head/sys/powerpc/include/cpu.h ============================================================================== --- head/sys/powerpc/include/cpu.h Sat Jul 11 17:01:08 2015 (r285396) +++ head/sys/powerpc/include/cpu.h Sat Jul 11 17:33:50 2015 (r285397) @@ -65,9 +65,6 @@ extern int cpu_features; #define TRAPF_USERMODE(frame) (((frame)->srr1 & PSL_PR) != 0) #define TRAPF_PC(frame) ((frame)->srr0) -#define cpu_swapout(p) -#define cpu_number() 0 - /* * CTL_MACHDEP definitions. */ From owner-svn-src-all@freebsd.org Sat Jul 11 18:09:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BB85998435; Sat, 11 Jul 2015 18:09:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 07EE71ACD; Sat, 11 Jul 2015 18:09:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BI9TEp024707; Sat, 11 Jul 2015 18:09:29 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BI9SFq024703; Sat, 11 Jul 2015 18:09:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507111809.t6BI9SFq024703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Jul 2015 18:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285398 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 18:09:30 -0000 Author: bapt Date: Sat Jul 11 18:09:27 2015 New Revision: 285398 URL: https://svnweb.freebsd.org/changeset/base/285398 Log: Make separate functions to show users and groups Modified: head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/pwupd.h Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sat Jul 11 17:33:50 2015 (r285397) +++ head/usr.sbin/pw/pw.c Sat Jul 11 18:09:27 2015 (r285398) @@ -234,6 +234,9 @@ main(int argc, char *argv[]) conf.config = optarg; config = conf.config; break; + case 'F': + conf.force = true; + break; case 'N': conf.dryrun = true; break; @@ -248,6 +251,9 @@ main(int argc, char *argv[]) case 'Y': nis = true; break; + case 'a': + conf.all = true; + break; case 'g': if (which == 0) { /* for user* */ addarg(&arglist, 'g', optarg); Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sat Jul 11 17:33:50 2015 (r285397) +++ head/usr.sbin/pw/pw_group.c Sat Jul 11 18:09:27 2015 (r285398) @@ -103,6 +103,37 @@ pw_groupnext(struct userconf *cnf, bool return (EXIT_SUCCESS); } +static int +pw_groupshow(const char *name, long id, struct group *fakegroup) +{ + struct group *grp = NULL; + + if (id < 0 && name == NULL && !conf.all) + errx(EX_DATAERR, "groupname or id or '-a' required"); + + if (conf.all) { + SETGRENT(); + while ((grp = GETGRENT()) != NULL) + print_group(grp); + ENDGRENT(); + + return (EXIT_SUCCESS); + } + + grp = (name != NULL) ? GETGRNAM(name) : GETGRGID(id); + if (grp == NULL) { + if (conf.force) { + grp = fakegroup; + } else { + if (name == NULL) + errx(EX_DATAERR, "unknown gid `%ld'", id); + errx(EX_DATAERR, "unknown group `%s'", name); + } + } + + return (print_group(grp)); +} + int pw_group(int mode, char *name, long id, struct cargs * args) { @@ -124,34 +155,22 @@ pw_group(int mode, char *name, long id, if (mode == M_NEXT) return (pw_groupnext(cnf, conf.quiet)); + if (mode == M_PRINT) + return (pw_groupshow(name, id, &fakegroup)); + if (mode == M_LOCK || mode == M_UNLOCK) errx(EX_USAGE, "'lock' command is not available for groups"); - if (mode == M_PRINT && getarg(args, 'a')) { - SETGRENT(); - while ((grp = GETGRENT()) != NULL) - print_group(grp); - ENDGRENT(); - return EXIT_SUCCESS; - } if (id < 0 && name == NULL) errx(EX_DATAERR, "group name or id required"); grp = (name != NULL) ? GETGRNAM(name) : GETGRGID(id); - if (mode == M_UPDATE || mode == M_DELETE || mode == M_PRINT) { + if (mode == M_UPDATE || mode == M_DELETE) { if (name == NULL && grp == NULL) /* Try harder */ grp = GETGRGID(id); if (grp == NULL) { - if (mode == M_PRINT && getarg(args, 'F')) { - char *fmems[1]; - fmems[0] = NULL; - fakegroup.gr_name = name ? name : "nogroup"; - fakegroup.gr_gid = (gid_t) id; - fakegroup.gr_mem = fmems; - return print_group(&fakegroup); - } if (name == NULL) errx(EX_DATAERR, "unknown group `%s'", name); else Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sat Jul 11 17:33:50 2015 (r285397) +++ head/usr.sbin/pw/pw_user.c Sat Jul 11 18:09:27 2015 (r285398) @@ -162,6 +162,36 @@ pw_usernext(struct userconf *cnf, bool q return (EXIT_SUCCESS); } +static int +pw_usershow(char *name, long id, struct passwd *fakeuser) +{ + struct passwd *pwd = NULL; + + if (id < 0 && name == NULL && !conf.all) + errx(EX_DATAERR, "username or id or '-a' required"); + + if (conf.all) { + SETPWENT(); + while ((pwd = GETPWENT()) != NULL) + print_user(pwd); + ENDPWENT(); + return (EXIT_SUCCESS); + } + + pwd = (name != NULL) ? GETPWNAM(pw_checkname(name, 0)) : GETPWUID(id); + if (pwd == NULL) { + if (conf.force) { + pwd = fakeuser; + } else { + if (name == NULL) + errx(EX_NOUSER, "no such uid `%ld'", id); + errx(EX_NOUSER, "no such user `%s'", name); + } + } + + return (print_user(pwd)); +} + /*- * -C config configuration file * -q quiet operation @@ -213,7 +243,7 @@ pw_user(int mode, char *name, long id, s static struct passwd fakeuser = { - NULL, + "nouser", "*", -1, -1, @@ -233,6 +263,9 @@ pw_user(int mode, char *name, long id, s if (mode == M_NEXT) return (pw_usernext(cnf, conf.quiet)); + if (mode == M_PRINT) + return (pw_usershow(name, id, &fakeuser)); + /* * We can do all of the common legwork here */ @@ -377,14 +410,6 @@ pw_user(int mode, char *name, long id, s err(EX_IOERR, "config udpate"); } - if (mode == M_PRINT && getarg(args, 'a')) { - SETPWENT(); - while ((pwd = GETPWENT()) != NULL) - print_user(pwd); - ENDPWENT(); - return EXIT_SUCCESS; - } - if (name != NULL) pwd = GETPWNAM(pw_checkname(name, 0)); @@ -395,17 +420,12 @@ pw_user(int mode, char *name, long id, s * Update, delete & print require that the user exists */ if (mode == M_UPDATE || mode == M_DELETE || - mode == M_PRINT || mode == M_LOCK || mode == M_UNLOCK) { + mode == M_LOCK || mode == M_UNLOCK) { if (name == NULL && pwd == NULL) /* Try harder */ pwd = GETPWUID(id); if (pwd == NULL) { - if (mode == M_PRINT && getarg(args, 'F')) { - fakeuser.pw_name = name ? name : "nouser"; - fakeuser.pw_uid = (uid_t) id; - return print_user(&fakeuser); - } if (name == NULL) errx(EX_NOUSER, "no such uid `%ld'", id); errx(EX_NOUSER, "no such user `%s'", name); @@ -440,8 +460,6 @@ pw_user(int mode, char *name, long id, s } else if (mode == M_DELETE) return (delete_user(cnf, pwd, name, getarg(args, 'r') != NULL, mode)); - else if (mode == M_PRINT) - return print_user(pwd); /* * The rest is edit code Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Sat Jul 11 17:33:50 2015 (r285397) +++ head/usr.sbin/pw/pwupd.h Sat Jul 11 18:09:27 2015 (r285398) @@ -88,6 +88,8 @@ struct pwconf { int fd; int which; bool quiet; + bool force; + bool all; bool dryrun; bool pretty; bool v7; From owner-svn-src-all@freebsd.org Sat Jul 11 18:39:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC4C0998C97; Sat, 11 Jul 2015 18:39:17 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 9D49F1626; Sat, 11 Jul 2015 18:39:17 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BIdHjA039351; Sat, 11 Jul 2015 18:39:17 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BIdHf0039350; Sat, 11 Jul 2015 18:39:17 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201507111839.t6BIdHf0039350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Sat, 11 Jul 2015 18:39:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285399 - head/sys/compat/cloudabi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 18:39:17 -0000 Author: ed Date: Sat Jul 11 18:39:16 2015 New Revision: 285399 URL: https://svnweb.freebsd.org/changeset/base/285399 Log: Add missing function parameter. A function parameter got added in r285356, meaning that the call to kern_dup() needs to be patched up. Modified: head/sys/compat/cloudabi/cloudabi_fd.c Modified: head/sys/compat/cloudabi/cloudabi_fd.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_fd.c Sat Jul 11 18:09:27 2015 (r285398) +++ head/sys/compat/cloudabi/cloudabi_fd.c Sat Jul 11 18:39:16 2015 (r285399) @@ -76,7 +76,7 @@ int cloudabi_sys_fd_dup(struct thread *td, struct cloudabi_sys_fd_dup_args *uap) { - return (kern_dup(td, 0, uap->from, 0)); + return (kern_dup(td, 0, 0, uap->from, 0)); } int From owner-svn-src-all@freebsd.org Sat Jul 11 18:53:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DF87999061; Sat, 11 Jul 2015 18:53:31 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 5EEBB1E2F; Sat, 11 Jul 2015 18:53:31 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BIrVQY048413; Sat, 11 Jul 2015 18:53:31 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BIrVM8048412; Sat, 11 Jul 2015 18:53:31 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201507111853.t6BIrVM8048412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Sat, 11 Jul 2015 18:53:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285400 - head/sys/compat/cloudabi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 18:53:31 -0000 Author: ed Date: Sat Jul 11 18:53:30 2015 New Revision: 285400 URL: https://svnweb.freebsd.org/changeset/base/285400 Log: Use FDDUP_NORMAL instead of hardcoding value 0. Proposed by: mjg Modified: head/sys/compat/cloudabi/cloudabi_fd.c Modified: head/sys/compat/cloudabi/cloudabi_fd.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_fd.c Sat Jul 11 18:39:16 2015 (r285399) +++ head/sys/compat/cloudabi/cloudabi_fd.c Sat Jul 11 18:53:30 2015 (r285400) @@ -76,7 +76,7 @@ int cloudabi_sys_fd_dup(struct thread *td, struct cloudabi_sys_fd_dup_args *uap) { - return (kern_dup(td, 0, 0, uap->from, 0)); + return (kern_dup(td, FDDUP_NORMAL, 0, uap->from, 0)); } int From owner-svn-src-all@freebsd.org Sat Jul 11 19:07:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 023629991CC; Sat, 11 Jul 2015 19:07:50 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 E32C412DF; Sat, 11 Jul 2015 19:07:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BJ7njK054133; Sat, 11 Jul 2015 19:07:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BJ7m5n054129; Sat, 11 Jul 2015 19:07:48 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507111907.t6BJ7m5n054129@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Jul 2015 19:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285401 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 19:07:50 -0000 Author: bapt Date: Sat Jul 11 19:07:47 2015 New Revision: 285401 URL: https://svnweb.freebsd.org/changeset/base/285401 Log: Make a separate groupdel/userdel from the main function Modified: head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/pwupd.h Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sat Jul 11 18:53:30 2015 (r285400) +++ head/usr.sbin/pw/pw.c Sat Jul 11 19:07:47 2015 (r285401) @@ -323,6 +323,9 @@ main(int argc, char *argv[]) case 'q': conf.quiet = true; break; + case 'r': + conf.deletehome = true; + break; default: addarg(&arglist, ch, optarg); break; Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sat Jul 11 18:53:30 2015 (r285400) +++ head/usr.sbin/pw/pw_group.c Sat Jul 11 19:07:47 2015 (r285401) @@ -134,6 +134,29 @@ pw_groupshow(const char *name, long id, return (print_group(grp)); } +static int +pw_groupdel(const char *name, long id) +{ + struct group *grp = NULL; + int rc; + + grp = (name != NULL) ? GETGRNAM(name) : GETGRGID(id); + if (grp == NULL) { + if (name == NULL) + errx(EX_DATAERR, "unknown gid `%ld'", id); + errx(EX_DATAERR, "unknown group `%s'", name); + } + + rc = delgrent(grp); + if (rc == -1) + err(EX_IOERR, "group '%s' not available (NIS?)", name); + else if (rc != 0) + err(EX_IOERR, "group update"); + pw_log(conf.userconf, M_DELETE, W_GROUP, "%s(%ld) removed", name, id); + + return (EXIT_SUCCESS); +} + int pw_group(int mode, char *name, long id, struct cargs * args) { @@ -158,6 +181,9 @@ pw_group(int mode, char *name, long id, if (mode == M_PRINT) return (pw_groupshow(name, id, &fakegroup)); + if (mode == M_DELETE) + return (pw_groupdel(name, id)); + if (mode == M_LOCK || mode == M_UNLOCK) errx(EX_USAGE, "'lock' command is not available for groups"); @@ -166,7 +192,7 @@ pw_group(int mode, char *name, long id, grp = (name != NULL) ? GETGRNAM(name) : GETGRGID(id); - if (mode == M_UPDATE || mode == M_DELETE) { + if (mode == M_UPDATE) { if (name == NULL && grp == NULL) /* Try harder */ grp = GETGRGID(id); @@ -179,22 +205,6 @@ pw_group(int mode, char *name, long id, if (name == NULL) /* Needed later */ name = grp->gr_name; - /* - * Handle deletions now - */ - if (mode == M_DELETE) { - rc = delgrent(grp); - if (rc == -1) - err(EX_IOERR, "group '%s' not available (NIS?)", - name); - else if (rc != 0) { - err(EX_IOERR, "group update"); - } - pw_log(cnf, mode, W_GROUP, "%s(%ld) removed", name, id); - return EXIT_SUCCESS; - } else if (mode == M_PRINT) - return print_group(grp); - if (id > 0) grp->gr_gid = (gid_t) id; Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sat Jul 11 18:53:30 2015 (r285400) +++ head/usr.sbin/pw/pw_user.c Sat Jul 11 19:07:47 2015 (r285401) @@ -51,8 +51,7 @@ static const char rcsid[] = static char locked_str[] = "*LOCKED*"; -static int delete_user(struct userconf *cnf, struct passwd *pwd, - char *name, int delete, int mode); +static int pw_userdel(char *name, long id); static int print_user(struct passwd * pwd); static uid_t pw_uidpolicy(struct userconf * cnf, long id); static uid_t pw_gidpolicy(struct cargs * args, char *nam, gid_t prefer); @@ -266,6 +265,9 @@ pw_user(int mode, char *name, long id, s if (mode == M_PRINT) return (pw_usershow(name, id, &fakeuser)); + if (mode == M_DELETE) + return (pw_userdel(name, id)); + /* * We can do all of the common legwork here */ @@ -417,10 +419,9 @@ pw_user(int mode, char *name, long id, s errx(EX_DATAERR, "user name or id required"); /* - * Update, delete & print require that the user exists + * Update require that the user exists */ - if (mode == M_UPDATE || mode == M_DELETE || - mode == M_LOCK || mode == M_UNLOCK) { + if (mode == M_UPDATE || mode == M_LOCK || mode == M_UNLOCK) { if (name == NULL && pwd == NULL) /* Try harder */ pwd = GETPWUID(id); @@ -457,9 +458,7 @@ pw_user(int mode, char *name, long id, s errx(EX_DATAERR, "user '%s' is not locked", pwd->pw_name); pwd->pw_passwd += sizeof(locked_str)-1; edited = 1; - } else if (mode == M_DELETE) - return (delete_user(cnf, pwd, name, - getarg(args, 'r') != NULL, mode)); + } /* * The rest is edit code @@ -1045,17 +1044,30 @@ pw_password(struct userconf * cnf, struc } static int -delete_user(struct userconf *cnf, struct passwd *pwd, char *name, - int delete, int mode) +pw_userdel(char *name, long id) { + struct passwd *pwd = NULL; char file[MAXPATHLEN]; char home[MAXPATHLEN]; - uid_t uid = pwd->pw_uid; + uid_t uid; struct group *gr, *grp; char grname[LOGNAMESIZE]; int rc; struct stat st; + if (id < 0 && name == NULL) + errx(EX_DATAERR, "username or id required"); + + pwd = (name != NULL) ? GETPWNAM(pw_checkname(name, 0)) : GETPWUID(id); + if (pwd == NULL) { + if (name == NULL) + errx(EX_NOUSER, "no such uid `%ld'", id); + errx(EX_NOUSER, "no such user `%s'", name); + } + uid = pwd->pw_uid; + if (name == NULL) + name = pwd->pw_name; + if (strcmp(pwd->pw_name, "root") == 0) errx(EX_DATAERR, "cannot remove user 'root'"); @@ -1093,10 +1105,11 @@ delete_user(struct userconf *cnf, struct else if (rc != 0) err(EX_IOERR, "passwd update"); - if (cnf->nispasswd && *cnf->nispasswd=='/') { - rc = delnispwent(cnf->nispasswd, name); + if (conf.userconf->nispasswd && *conf.userconf->nispasswd=='/') { + rc = delnispwent(conf.userconf->nispasswd, name); if (rc == -1) - warnx("WARNING: user '%s' does not exist in NIS passwd", pwd->pw_name); + warnx("WARNING: user '%s' does not exist in NIS passwd", + pwd->pw_name); else if (rc != 0) warn("WARNING: NIS passwd update"); /* non-fatal */ @@ -1126,7 +1139,8 @@ delete_user(struct userconf *cnf, struct } ENDGRENT(); - pw_log(cnf, mode, W_USER, "%s(%u) account removed", name, uid); + pw_log(conf.userconf, M_DELETE, W_USER, "%s(%u) account removed", name, + uid); if (!PWALTDIR()) { /* @@ -1143,10 +1157,10 @@ delete_user(struct userconf *cnf, struct /* * Remove home directory and contents */ - if (delete && *home == '/' && getpwuid(uid) == NULL && + if (conf.deletehome && *home == '/' && getpwuid(uid) == NULL && stat(home, &st) != -1) { rm_r(home, uid); - pw_log(cnf, mode, W_USER, "%s(%u) home '%s' %sremoved", + pw_log(conf.userconf, M_DELETE, W_USER, "%s(%u) home '%s' %sremoved", name, uid, home, stat(home, &st) == -1 ? "" : "not completely "); } Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Sat Jul 11 18:53:30 2015 (r285400) +++ head/usr.sbin/pw/pwupd.h Sat Jul 11 19:07:47 2015 (r285401) @@ -94,6 +94,7 @@ struct pwconf { bool pretty; bool v7; bool checkduplicate; + bool deletehome; bool precrypted; struct userconf *userconf; }; From owner-svn-src-all@freebsd.org Sat Jul 11 19:11:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 679349992EE; Sat, 11 Jul 2015 19:11:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 52E421923; Sat, 11 Jul 2015 19:11:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BJBgIX058115; Sat, 11 Jul 2015 19:11:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BJBf3K057341; Sat, 11 Jul 2015 19:11:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201507111911.t6BJBf3K057341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 11 Jul 2015 19:11:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285402 - in stable/10/sys: kern sys ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 19:11:42 -0000 Author: kib Date: Sat Jul 11 19:11:40 2015 New Revision: 285402 URL: https://svnweb.freebsd.org/changeset/base/285402 Log: MFC r284887: Handle errors from background write of the cylinder group blocks. MFC r284927: Simplify code. Approved by: re (gjb) Modified: stable/10/sys/kern/vfs_bio.c stable/10/sys/sys/buf.h stable/10/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_bio.c ============================================================================== --- stable/10/sys/kern/vfs_bio.c Sat Jul 11 19:07:47 2015 (r285401) +++ stable/10/sys/kern/vfs_bio.c Sat Jul 11 19:11:40 2015 (r285402) @@ -1566,6 +1566,12 @@ brelse(struct buf *bp) return; } + if ((bp->b_vflags & (BV_BKGRDINPROG | BV_BKGRDERR)) == BV_BKGRDERR) { + BO_LOCK(bp->b_bufobj); + bp->b_vflags &= ~BV_BKGRDERR; + BO_UNLOCK(bp->b_bufobj); + bdirty(bp); + } if (bp->b_iocmd == BIO_WRITE && (bp->b_ioflags & BIO_ERROR) && bp->b_error == EIO && !(bp->b_flags & B_INVAL)) { /* @@ -1822,7 +1828,11 @@ bqrelse(struct buf *bp) } /* buffers with stale but valid contents */ - if (bp->b_flags & B_DELWRI) { + if ((bp->b_flags & B_DELWRI) != 0 || (bp->b_vflags & (BV_BKGRDINPROG | + BV_BKGRDERR)) == BV_BKGRDERR) { + BO_LOCK(bp->b_bufobj); + bp->b_vflags &= ~BV_BKGRDERR; + BO_UNLOCK(bp->b_bufobj); qindex = QUEUE_DIRTY; } else { if ((bp->b_flags & B_DELWRI) == 0 && @@ -2341,6 +2351,16 @@ restart: continue; } + /* + * Requeue the background write buffer with error. + */ + if ((bp->b_vflags & BV_BKGRDERR) != 0) { + bremfreel(bp); + mtx_unlock(&bqclean); + bqrelse(bp); + continue; + } + KASSERT(bp->b_qindex == qindex, ("getnewbuf: inconsistent queue %d bp %p", qindex, bp)); Modified: stable/10/sys/sys/buf.h ============================================================================== --- stable/10/sys/sys/buf.h Sat Jul 11 19:07:47 2015 (r285401) +++ stable/10/sys/sys/buf.h Sat Jul 11 19:11:40 2015 (r285402) @@ -248,8 +248,9 @@ struct buf { #define BV_SCANNED 0x00000001 /* VOP_FSYNC funcs mark written bufs */ #define BV_BKGRDINPROG 0x00000002 /* Background write in progress */ #define BV_BKGRDWAIT 0x00000004 /* Background write waiting */ +#define BV_BKGRDERR 0x00000008 /* Error from background write */ -#define PRINT_BUF_VFLAGS "\20\3bkgrdwait\2bkgrdinprog\1scanned" +#define PRINT_BUF_VFLAGS "\20\4bkgrderr\3bkgrdwait\2bkgrdinprog\1scanned" #ifdef _KERNEL /* Modified: stable/10/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_vfsops.c Sat Jul 11 19:07:47 2015 (r285401) +++ stable/10/sys/ufs/ffs/ffs_vfsops.c Sat Jul 11 19:11:40 2015 (r285402) @@ -1977,12 +1977,19 @@ ffs_backgroundwritedone(struct buf *bp) BO_LOCK(bufobj); if ((origbp = gbincore(bp->b_bufobj, bp->b_lblkno)) == NULL) panic("backgroundwritedone: lost buffer"); + + /* + * We should mark the cylinder group buffer origbp as + * dirty, to not loose the failed write. + */ + if ((bp->b_ioflags & BIO_ERROR) != 0) + origbp->b_vflags |= BV_BKGRDERR; BO_UNLOCK(bufobj); /* * Process dependencies then return any unfinished ones. */ pbrelvp(bp); - if (!LIST_EMPTY(&bp->b_dep)) + if (!LIST_EMPTY(&bp->b_dep) && (bp->b_ioflags & BIO_ERROR) == 0) buf_complete(bp); #ifdef SOFTUPDATES if (!LIST_EMPTY(&bp->b_dep)) @@ -1994,6 +2001,15 @@ ffs_backgroundwritedone(struct buf *bp) */ bp->b_flags |= B_NOCACHE; bp->b_flags &= ~B_CACHE; + + /* + * Prevent brelse() from trying to keep and re-dirtying bp on + * errors. It causes b_bufobj dereference in + * bdirty()/reassignbuf(), and b_bufobj was cleared in + * pbrelvp() above. + */ + if ((bp->b_ioflags & BIO_ERROR) != 0) + bp->b_flags |= B_INVAL; bufdone(bp); BO_LOCK(bufobj); /* @@ -2055,6 +2071,7 @@ ffs_bufwrite(struct buf *bp) if (bp->b_vflags & BV_BKGRDINPROG) panic("bufwrite: still writing"); } + bp->b_vflags &= ~BV_BKGRDERR; BO_UNLOCK(bp->b_bufobj); /* From owner-svn-src-all@freebsd.org Sat Jul 11 19:14:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 960FC99935B; Sat, 11 Jul 2015 19:14:10 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 86F8B1AB2; Sat, 11 Jul 2015 19:14:10 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BJEAle058754; Sat, 11 Jul 2015 19:14:10 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BJEAVB058753; Sat, 11 Jul 2015 19:14:10 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507111914.t6BJEAVB058753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Jul 2015 19:14:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285403 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 19:14:10 -0000 Author: bapt Date: Sat Jul 11 19:14:09 2015 New Revision: 285403 URL: https://svnweb.freebsd.org/changeset/base/285403 Log: homedir can only be populate during useradd Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sat Jul 11 19:11:40 2015 (r285402) +++ head/usr.sbin/pw/pw_user.c Sat Jul 11 19:14:09 2015 (r285403) @@ -65,7 +65,7 @@ static void rmat(uid_t uid); static void rmopie(char const * name); static void -create_and_populate_homedir(int mode, struct passwd *pwd) +create_and_populate_homedir(struct passwd *pwd) { char *homedir, *dotdir; struct userconf *cnf = conf.userconf; @@ -81,7 +81,7 @@ create_and_populate_homedir(int mode, st copymkdir(homedir ? homedir : pwd->pw_dir, dotdir ? dotdir: cnf->dotdir, cnf->homemode, pwd->pw_uid, pwd->pw_gid); - pw_log(cnf, mode, W_USER, "%s(%u) home %s made", pwd->pw_name, + pw_log(cnf, M_ADD, W_USER, "%s(%u) home %s made", pwd->pw_name, pwd->pw_uid, pwd->pw_dir); } @@ -735,7 +735,7 @@ pw_user(int mode, char *name, long id, s */ if (PWALTDIR() != PWF_ALT && getarg(args, 'm') != NULL && pwd->pw_dir && *pwd->pw_dir == '/' && pwd->pw_dir[1]) - create_and_populate_homedir(mode, pwd); + create_and_populate_homedir(pwd); /* * Finally, send mail to the new user as well, if we are asked to From owner-svn-src-all@freebsd.org Sat Jul 11 19:41:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24DB399983E; Sat, 11 Jul 2015 19:41:32 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 090AE186E; Sat, 11 Jul 2015 19:41:32 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BJfVEG072540; Sat, 11 Jul 2015 19:41:31 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BJfV1a072539; Sat, 11 Jul 2015 19:41:31 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201507111941.t6BJfV1a072539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Sat, 11 Jul 2015 19:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285404 - head/sys/compat/cloudabi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 19:41:32 -0000 Author: ed Date: Sat Jul 11 19:41:31 2015 New Revision: 285404 URL: https://svnweb.freebsd.org/changeset/base/285404 Log: Implement normal and abnormal process termination. CloudABI does not provide an explicit kill() system call, for the reason that there is no access to the global process namespace. Instead, it offers a raise() system call that can at least be used to terminate the process abnormally. CloudABI does not support installing signal handlers. CloudABI's raise() system call should behave as if the default policy is set up. Call into kern_sigaction(SIG_DFL) before calling sys_kill() to force this. Obtained from: https://github.com/NuxiNL/freebsd Modified: head/sys/compat/cloudabi/cloudabi_proc.c Modified: head/sys/compat/cloudabi/cloudabi_proc.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_proc.c Sat Jul 11 19:14:09 2015 (r285403) +++ head/sys/compat/cloudabi/cloudabi_proc.c Sat Jul 11 19:41:31 2015 (r285404) @@ -26,6 +26,11 @@ #include __FBSDID("$FreeBSD$"); +#include +#include +#include +#include + #include int @@ -42,8 +47,8 @@ cloudabi_sys_proc_exit(struct thread *td struct cloudabi_sys_proc_exit_args *uap) { - /* Not implemented. */ - return (ENOSYS); + exit1(td, W_EXITCODE(uap->rval, 0)); + /* NOTREACHED */ } int @@ -59,7 +64,49 @@ int cloudabi_sys_proc_raise(struct thread *td, struct cloudabi_sys_proc_raise_args *uap) { - - /* Not implemented. */ - return (ENOSYS); + static const int signals[] = { + [CLOUDABI_SIGABRT] = SIGABRT, + [CLOUDABI_SIGALRM] = SIGALRM, + [CLOUDABI_SIGBUS] = SIGBUS, + [CLOUDABI_SIGCHLD] = SIGCHLD, + [CLOUDABI_SIGCONT] = SIGCONT, + [CLOUDABI_SIGFPE] = SIGFPE, + [CLOUDABI_SIGHUP] = SIGHUP, + [CLOUDABI_SIGILL] = SIGILL, + [CLOUDABI_SIGINT] = SIGINT, + [CLOUDABI_SIGKILL] = SIGKILL, + [CLOUDABI_SIGPIPE] = SIGPIPE, + [CLOUDABI_SIGQUIT] = SIGQUIT, + [CLOUDABI_SIGSEGV] = SIGSEGV, + [CLOUDABI_SIGSTOP] = SIGSTOP, + [CLOUDABI_SIGSYS] = SIGSYS, + [CLOUDABI_SIGTERM] = SIGTERM, + [CLOUDABI_SIGTRAP] = SIGTRAP, + [CLOUDABI_SIGTSTP] = SIGTSTP, + [CLOUDABI_SIGTTIN] = SIGTTIN, + [CLOUDABI_SIGTTOU] = SIGTTOU, + [CLOUDABI_SIGURG] = SIGURG, + [CLOUDABI_SIGUSR1] = SIGUSR1, + [CLOUDABI_SIGUSR2] = SIGUSR2, + [CLOUDABI_SIGVTALRM] = SIGVTALRM, + [CLOUDABI_SIGXCPU] = SIGXCPU, + [CLOUDABI_SIGXFSZ] = SIGXFSZ, + }; + static const struct sigaction sigdfl = { + .sa_handler = SIG_DFL, + }; + struct kill_args kill_args = { + .pid = td->td_proc->p_pid, + }; + + if (uap->sig >= nitems(signals) || + (uap->sig != 0 && signals[uap->sig] == 0)) { + /* Invalid signal. */ + return (EINVAL); + } + kill_args.signum = signals[uap->sig]; + + /* Restore to default signal action and send signal. */ + kern_sigaction(td, kill_args.signum, &sigdfl, NULL, 0); + return (sys_kill(td, &kill_args)); } From owner-svn-src-all@freebsd.org Sat Jul 11 19:47:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB5DD9998FA; Sat, 11 Jul 2015 19:47:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53BAE1A9D; Sat, 11 Jul 2015 19:47:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t6BJlWSv014775 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 11 Jul 2015 22:47:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t6BJlWSv014775 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t6BJlWBZ014774; Sat, 11 Jul 2015 22:47:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 11 Jul 2015 22:47:32 +0300 From: Konstantin Belousov To: Ed Schouten Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285404 - head/sys/compat/cloudabi Message-ID: <20150711194732.GB2404@kib.kiev.ua> References: <201507111941.t6BJfV1a072539@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201507111941.t6BJfV1a072539@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 19:47:39 -0000 On Sat, Jul 11, 2015 at 07:41:31PM +0000, Ed Schouten wrote: > Author: ed > Date: Sat Jul 11 19:41:31 2015 > New Revision: 285404 > URL: https://svnweb.freebsd.org/changeset/base/285404 > > Log: > Implement normal and abnormal process termination. > > CloudABI does not provide an explicit kill() system call, for the reason > that there is no access to the global process namespace. Instead, it > offers a raise() system call that can at least be used to terminate the > process abnormally. > > CloudABI does not support installing signal handlers. CloudABI's raise() > system call should behave as if the default policy is set up. Call into > kern_sigaction(SIG_DFL) before calling sys_kill() to force this. > > Obtained from: https://github.com/NuxiNL/freebsd > > Modified: > head/sys/compat/cloudabi/cloudabi_proc.c > > Modified: head/sys/compat/cloudabi/cloudabi_proc.c > ============================================================================== > --- head/sys/compat/cloudabi/cloudabi_proc.c Sat Jul 11 19:14:09 2015 (r285403) > +++ head/sys/compat/cloudabi/cloudabi_proc.c Sat Jul 11 19:41:31 2015 (r285404) > @@ -26,6 +26,11 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include > +#include > +#include > +#include > + > #include > > int > @@ -42,8 +47,8 @@ cloudabi_sys_proc_exit(struct thread *td > struct cloudabi_sys_proc_exit_args *uap) > { > > - /* Not implemented. */ > - return (ENOSYS); > + exit1(td, W_EXITCODE(uap->rval, 0)); > + /* NOTREACHED */ > } > > int > @@ -59,7 +64,49 @@ int > cloudabi_sys_proc_raise(struct thread *td, > struct cloudabi_sys_proc_raise_args *uap) > { > - > - /* Not implemented. */ > - return (ENOSYS); > + static const int signals[] = { > + [CLOUDABI_SIGABRT] = SIGABRT, > + [CLOUDABI_SIGALRM] = SIGALRM, > + [CLOUDABI_SIGBUS] = SIGBUS, > + [CLOUDABI_SIGCHLD] = SIGCHLD, > + [CLOUDABI_SIGCONT] = SIGCONT, > + [CLOUDABI_SIGFPE] = SIGFPE, > + [CLOUDABI_SIGHUP] = SIGHUP, > + [CLOUDABI_SIGILL] = SIGILL, > + [CLOUDABI_SIGINT] = SIGINT, > + [CLOUDABI_SIGKILL] = SIGKILL, > + [CLOUDABI_SIGPIPE] = SIGPIPE, > + [CLOUDABI_SIGQUIT] = SIGQUIT, > + [CLOUDABI_SIGSEGV] = SIGSEGV, > + [CLOUDABI_SIGSTOP] = SIGSTOP, > + [CLOUDABI_SIGSYS] = SIGSYS, > + [CLOUDABI_SIGTERM] = SIGTERM, > + [CLOUDABI_SIGTRAP] = SIGTRAP, > + [CLOUDABI_SIGTSTP] = SIGTSTP, > + [CLOUDABI_SIGTTIN] = SIGTTIN, > + [CLOUDABI_SIGTTOU] = SIGTTOU, > + [CLOUDABI_SIGURG] = SIGURG, > + [CLOUDABI_SIGUSR1] = SIGUSR1, > + [CLOUDABI_SIGUSR2] = SIGUSR2, > + [CLOUDABI_SIGVTALRM] = SIGVTALRM, > + [CLOUDABI_SIGXCPU] = SIGXCPU, > + [CLOUDABI_SIGXFSZ] = SIGXFSZ, > + }; > + static const struct sigaction sigdfl = { > + .sa_handler = SIG_DFL, > + }; > + struct kill_args kill_args = { > + .pid = td->td_proc->p_pid, > + }; > + > + if (uap->sig >= nitems(signals) || > + (uap->sig != 0 && signals[uap->sig] == 0)) { > + /* Invalid signal. */ > + return (EINVAL); > + } > + kill_args.signum = signals[uap->sig]; > + > + /* Restore to default signal action and send signal. */ > + kern_sigaction(td, kill_args.signum, &sigdfl, NULL, 0); > + return (sys_kill(td, &kill_args)); > } This is very strange and unmaintanable approach. Also, you cannot handle traps this way. If your ABI does not provide any way to install a signal handler, then you probably should be already fully set up, due to execsigs() performed on each exec(2). From owner-svn-src-all@freebsd.org Sat Jul 11 20:10:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 670EF999C3B; Sat, 11 Jul 2015 20:10:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 429DF11DC; Sat, 11 Jul 2015 20:10:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BKAD9x084557; Sat, 11 Jul 2015 20:10:13 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BKADlU084556; Sat, 11 Jul 2015 20:10:13 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507112010.t6BKADlU084556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Jul 2015 20:10:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285405 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 20:10:13 -0000 Author: bapt Date: Sat Jul 11 20:10:12 2015 New Revision: 285405 URL: https://svnweb.freebsd.org/changeset/base/285405 Log: Isolate pw lock/unlock into a separate function Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sat Jul 11 19:41:31 2015 (r285404) +++ head/usr.sbin/pw/pw_user.c Sat Jul 11 20:10:12 2015 (r285405) @@ -191,6 +191,78 @@ pw_usershow(char *name, long id, struct return (print_user(pwd)); } +static void +perform_chgpwent(const char *name, struct passwd *pwd) +{ + int rc; + + rc = chgpwent(name, pwd); + if (rc == -1) + errx(EX_IOERR, "user '%s' does not exist (NIS?)", pwd->pw_name); + else if (rc != 0) + err(EX_IOERR, "passwd file update"); + + if (conf.userconf->nispasswd && *conf.userconf->nispasswd == '/') { + rc = chgnispwent(conf.userconf->nispasswd, name, pwd); + if (rc == -1) + warn("User '%s' not found in NIS passwd", pwd->pw_name); + else + warn("NIS passwd update"); + /* NOTE: NIS-only update errors are not fatal */ + } +} + +/* + * The M_LOCK and M_UNLOCK functions simply add or remove + * a "*LOCKED*" prefix from in front of the password to + * prevent it decoding correctly, and therefore prevents + * access. Of course, this only prevents access via + * password authentication (not ssh, kerberos or any + * other method that does not use the UNIX password) but + * that is a known limitation. + */ +static int +pw_userlock(char *name, long id, int mode) +{ + struct passwd *pwd = NULL; + char *passtmp = NULL; + bool locked = false; + + if (id < 0 && name == NULL) + errx(EX_DATAERR, "username or id required"); + + pwd = (name != NULL) ? GETPWNAM(pw_checkname(name, 0)) : GETPWUID(id); + if (pwd == NULL) { + if (name == NULL) + errx(EX_NOUSER, "no such uid `%ld'", id); + errx(EX_NOUSER, "no such user `%s'", name); + } + + if (name == NULL) + name = pwd->pw_name; + + if (strncmp(pwd->pw_passwd, locked_str, sizeof(locked_str) -1) == 0) + locked = true; + if (mode == M_LOCK && locked) + errx(EX_DATAERR, "user '%s' is already locked", pwd->pw_name); + if (mode == M_UNLOCK && !locked) + errx(EX_DATAERR, "user '%s' is not locked", pwd->pw_name); + + if (mode == M_LOCK) { + asprintf(&passtmp, "%s%s", locked_str, pwd->pw_passwd); + if (passtmp == NULL) /* disaster */ + errx(EX_UNAVAILABLE, "out of memory"); + pwd->pw_passwd = passtmp; + } else { + pwd->pw_passwd += sizeof(locked_str)-1; + } + + perform_chgpwent(name, pwd); + free(passtmp); + + return (EXIT_SUCCESS); +} + /*- * -C config configuration file * -q quiet operation @@ -228,7 +300,6 @@ pw_user(int mode, char *name, long id, s { int rc, edited = 0; char *p = NULL; - char *passtmp; struct carg *arg; struct passwd *pwd = NULL; struct group *grp; @@ -268,6 +339,9 @@ pw_user(int mode, char *name, long id, s if (mode == M_DELETE) return (pw_userdel(name, id)); + if (mode == M_LOCK || mode == M_UNLOCK) + return (pw_userlock(name, id, mode)); + /* * We can do all of the common legwork here */ @@ -421,7 +495,7 @@ pw_user(int mode, char *name, long id, s /* * Update require that the user exists */ - if (mode == M_UPDATE || mode == M_LOCK || mode == M_UNLOCK) { + if (mode == M_UPDATE) { if (name == NULL && pwd == NULL) /* Try harder */ pwd = GETPWUID(id); @@ -436,31 +510,6 @@ pw_user(int mode, char *name, long id, s name = pwd->pw_name; /* - * The M_LOCK and M_UNLOCK functions simply add or remove - * a "*LOCKED*" prefix from in front of the password to - * prevent it decoding correctly, and therefore prevents - * access. Of course, this only prevents access via - * password authentication (not ssh, kerberos or any - * other method that does not use the UNIX password) but - * that is a known limitation. - */ - - if (mode == M_LOCK) { - if (strncmp(pwd->pw_passwd, locked_str, sizeof(locked_str)-1) == 0) - errx(EX_DATAERR, "user '%s' is already locked", pwd->pw_name); - asprintf(&passtmp, "%s%s", locked_str, pwd->pw_passwd); - if (passtmp == NULL) /* disaster */ - errx(EX_UNAVAILABLE, "out of memory"); - pwd->pw_passwd = passtmp; - edited = 1; - } else if (mode == M_UNLOCK) { - if (strncmp(pwd->pw_passwd, locked_str, sizeof(locked_str)-1) != 0) - errx(EX_DATAERR, "user '%s' is not locked", pwd->pw_name); - pwd->pw_passwd += sizeof(locked_str)-1; - edited = 1; - } - - /* * The rest is edit code */ if (conf.newname != NULL) { @@ -635,23 +684,8 @@ pw_user(int mode, char *name, long id, s warn("NIS passwd update"); /* NOTE: we treat NIS-only update errors as non-fatal */ } - } else if (mode == M_UPDATE || mode == M_LOCK || mode == M_UNLOCK) { - if (edited) { /* Only updated this if required */ - rc = chgpwent(name, pwd); - if (rc == -1) - errx(EX_IOERR, "user '%s' does not exist (NIS?)", pwd->pw_name); - else if (rc != 0) - err(EX_IOERR, "passwd file update"); - if ( cnf->nispasswd && *cnf->nispasswd=='/') { - rc = chgnispwent(cnf->nispasswd, name, pwd); - if (rc == -1) - warn("User '%s' not found in NIS passwd", pwd->pw_name); - else - warn("NIS passwd update"); - /* NOTE: NIS-only update errors are not fatal */ - } - } - } + } else if (mode == M_UPDATE && edited) /* Only updated this if required */ + perform_chgpwent(name, pwd); /* * Ok, user is created or changed - now edit group file From owner-svn-src-all@freebsd.org Sat Jul 11 20:18:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E14C999D6B; Sat, 11 Jul 2015 20:18:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 2EB04187A; Sat, 11 Jul 2015 20:18:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BKIZAL088818; Sat, 11 Jul 2015 20:18:35 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BKIZtZ088817; Sat, 11 Jul 2015 20:18:35 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507112018.t6BKIZtZ088817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Jul 2015 20:18:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285406 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 20:18:35 -0000 Author: bapt Date: Sat Jul 11 20:18:34 2015 New Revision: 285406 URL: https://svnweb.freebsd.org/changeset/base/285406 Log: Remove useless use of goto Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sat Jul 11 20:10:12 2015 (r285405) +++ head/usr.sbin/pw/pw_user.c Sat Jul 11 20:18:34 2015 (r285406) @@ -400,7 +400,7 @@ pw_user(int mode, char *name, long id, s *p = '\0'; if (stat(dbuf, &st) == -1) { if (mkdir(dbuf, _DEF_DIRMODE) == -1) - goto direrr; + err(EX_OSFILE, "mkdir '%s'", dbuf); chown(dbuf, 0, 0); } else if (!S_ISDIR(st.st_mode)) errx(EX_OSFILE, "'%s' (root home parent) is not a directory", dbuf); @@ -408,9 +408,8 @@ pw_user(int mode, char *name, long id, s } } if (stat(dbuf, &st) == -1) { - if (mkdir(dbuf, _DEF_DIRMODE) == -1) { - direrr: err(EX_OSFILE, "mkdir '%s'", dbuf); - } + if (mkdir(dbuf, _DEF_DIRMODE) == -1) + err(EX_OSFILE, "mkdir '%s'", dbuf); chown(dbuf, 0, 0); } } else if (!S_ISDIR(st.st_mode)) From owner-svn-src-all@freebsd.org Sat Jul 11 20:37:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5C6F9970A9 for ; Sat, 11 Jul 2015 20:37:06 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 867611EEE for ; Sat, 11 Jul 2015 20:37:06 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by oihq81 with SMTP id q81so18136560oih.2 for ; Sat, 11 Jul 2015 13:36:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=2G63BWi9TdtjOS5qmTX1WJHh/USWKZfcM7cLDBWOfZs=; b=iKY6/jcmevxQWzp2TyrFOBavERGeIXTxFXMW9/rsFPcDj+J4rJpwgygv51P4JG1Asp NW9k/lPse7i8MXIN6NiNV3tn7PgWhZVeiX81u/XAMQrqHQr+V1Q9429BNjAR61NJUH2L xJYpVLjNO6aLvsSMZ5ODxsT3ojmDBEM7yvB6MOa8dVx4fKEOIRjEK0UEpEVvlVG/eA29 QrFhqC5SI050KVPP8fZekCncrfxxJJmlrSLxgFNs6uHh1n/q93oqy3qXOPygH3LzwOg+ UHrJlNCsQDgIFTVG4FgdpdxNuswWQcfjuZkg40uCU4VKi1I9WXE2oOhR8zhFLNiJ+4qK Pn8Q== X-Gm-Message-State: ALoCoQlZLnH2wOUdjMIGNdZfvJeR+AoygvmnKyAfxD67U8fGVevo9h296V0rYatZU/uHtfr9zVt9 MIME-Version: 1.0 X-Received: by 10.60.50.232 with SMTP id f8mr23858816oeo.55.1436647019509; Sat, 11 Jul 2015 13:36:59 -0700 (PDT) Received: by 10.76.0.46 with HTTP; Sat, 11 Jul 2015 13:36:59 -0700 (PDT) X-Originating-IP: [84.27.222.46] In-Reply-To: <20150711194732.GB2404@kib.kiev.ua> References: <201507111941.t6BJfV1a072539@repo.freebsd.org> <20150711194732.GB2404@kib.kiev.ua> Date: Sat, 11 Jul 2015 22:36:59 +0200 Message-ID: Subject: Re: svn commit: r285404 - head/sys/compat/cloudabi From: Ed Schouten To: Konstantin Belousov Cc: Ed Schouten , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 20:37:06 -0000 Hi Kostik, 2015-07-11 21:47 GMT+02:00 Konstantin Belousov : > This is very strange and unmaintanable approach. Also, you cannot handle > traps this way. Yes. That's a pretty good observation. Some time ago I thought about this and my view is that signals can be grouped in three buckets: Bucket 1: Signals that get generated due to some event (e.g. SIGCHLD, SIGWINCH), Bucket 2: Signals that get generated due to a system call invoked by the thread itself (e.g. SIGPIPE), Bucket 3: Signals that get generated due to an instruction executed by a thread (e.g. SIGSEGV, SIGFPE). My observation is that if you look at these three buckets, you can question whether the POSIX signal interfaces are what you'd want: Bucket 1: These events could also be delivered to the process through polling (e.g., EVFILT_PROCDESC). Bucket 2: The system call could also just fail and return an error (MSG_NOSIGPIPE). I agree that the third bucket is something that you'd want to support, of course. Being able to deal with SIGFPE or letting a virtual machine install a SIGSEGV handler to do all sorts of scary tricks should still be possible. That said, I think that the current API we have for that (sigaction, pthread_sigmask) may not be the best fit. As soon as a single library within a larger program starts using these interfaces, it may easily affect the entire process, not just the local space (e.g., the thread) in which this library operates. This is why I decided to omit POSIX signal handling for now. There should appear an interface that could handle the use cases in bucket 3 once the need arises. The API for this may look identical to POSIX -- or not. As long as a good trade-off is made between compatibility, functionality and modularity. Be sure to get in touch if you happen to have any opinion on this matter. I'd love to hear people out. > If your ABI does not provide any way to install a signal handler, then > you probably should be already fully set up, due to execsigs() performed > on each exec(2). Exactly. The kern_sigaction() is just needed to make sure that if the process is started up with certain signals ignored, that raise() still causes the process to terminate. If there is no way you can influence the signal handling, you'd probably want that functions like abort() can always throw SIGABRT. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK/VAT number: 62051717 From owner-svn-src-all@freebsd.org Sat Jul 11 20:56:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7860499749E; Sat, 11 Jul 2015 20:56:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDD038FD; Sat, 11 Jul 2015 20:56:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t6BKuB8P031057 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 11 Jul 2015 23:56:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t6BKuB8P031057 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t6BKuBWl031056; Sat, 11 Jul 2015 23:56:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 11 Jul 2015 23:56:11 +0300 From: Konstantin Belousov To: Ed Schouten Cc: Ed Schouten , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285404 - head/sys/compat/cloudabi Message-ID: <20150711205611.GC2404@kib.kiev.ua> References: <201507111941.t6BJfV1a072539@repo.freebsd.org> <20150711194732.GB2404@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 20:56:22 -0000 On Sat, Jul 11, 2015 at 10:36:59PM +0200, Ed Schouten wrote: > Hi Kostik, > > 2015-07-11 21:47 GMT+02:00 Konstantin Belousov : > > This is very strange and unmaintanable approach. Also, you cannot handle > > traps this way. > > Yes. That's a pretty good observation. > > Some time ago I thought about this and my view is that signals can be > grouped in three buckets: > > Bucket 1: Signals that get generated due to some event (e.g. SIGCHLD, SIGWINCH), > Bucket 2: Signals that get generated due to a system call invoked by > the thread itself (e.g. SIGPIPE), > Bucket 3: Signals that get generated due to an instruction executed by > a thread (e.g. SIGSEGV, SIGFPE). > > My observation is that if you look at these three buckets, you can > question whether the POSIX signal interfaces are what you'd want: > > Bucket 1: These events could also be delivered to the process through > polling (e.g., EVFILT_PROCDESC). Might be. > Bucket 2: The system call could also just fail and return an error > (MSG_NOSIGPIPE). SIGPIPE exists to ensure that naive programs do something reasonable when their stdout suddenly goes away. Or, transposing the PoV, it allows to write useful and well-behaving programs while ignoring complications. If all programs must be aware of the special error code from write which indicates that nobody listens to the output anymore, it would cause unneeded code copy/pasted all over the src. > > I agree that the third bucket is something that you'd want to support, > of course. Being able to deal with SIGFPE or letting a virtual machine > install a SIGSEGV handler to do all sorts of scary tricks should still > be possible. The third bucket, AKA synchronous signals AKA traps, have the correct interface for passing the traps on kernel<->user boundary. Your complain could be read as desire to have e.g. SEH available. This is ortogonal to the signal interface, which is adequate to implement any desired superstructure on top of it. > > That said, I think that the current API we have for that (sigaction, > pthread_sigmask) may not be the best fit. As soon as a single library > within a larger program starts using these interfaces, it may easily > affect the entire process, not just the local space (e.g., the thread) > in which this library operates. This is what I read as a proposal for top-hamper on top of the raw signal delivery mechanism. I think that high-level languages must do that, and I am happy that C gives me direct access to the trap interceptions for some things that I do. > > This is why I decided to omit POSIX signal handling for now. There > should appear an interface that could handle the use cases in bucket 3 > once the need arises. The API for this may look identical to POSIX -- > or not. As long as a good trade-off is made between compatibility, > functionality and modularity. > > Be sure to get in touch if you happen to have any opinion on this > matter. I'd love to hear people out. > > > If your ABI does not provide any way to install a signal handler, then > > you probably should be already fully set up, due to execsigs() performed > > on each exec(2). > > Exactly. The kern_sigaction() is just needed to make sure that if the > process is started up with certain signals ignored, that raise() still > causes the process to terminate. If there is no way you can influence > the signal handling, you'd probably want that functions like abort() > can always throw SIGABRT. No. The point of my first message is that kern_sigaction + list is the unmaintanable approach. Take a look at the execsigs() again. You should implement a loop over the ps_sigignore sigset similar to the loop over ps_sigcatch in execsigs. Then you do not need to maintain a signal list. Later, when you design an interface to reflect traps to the userspace in your ABI, you would have some table to translate trap identifiers (or whatever) to FreeBSD signals. Right now you do not need them. From owner-svn-src-all@freebsd.org Sat Jul 11 21:09:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC35A997670; Sat, 11 Jul 2015 21:09:44 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 B0C20D17; Sat, 11 Jul 2015 21:09:44 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BL9int013479; Sat, 11 Jul 2015 21:09:44 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BL9ic1013478; Sat, 11 Jul 2015 21:09:44 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201507112109.t6BL9ic1013478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 11 Jul 2015 21:09:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285407 - head/sys/arm/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 21:09:44 -0000 Author: loos Date: Sat Jul 11 21:09:43 2015 New Revision: 285407 URL: https://svnweb.freebsd.org/changeset/base/285407 Log: Return the FDT node of the GPIO controller to gpiobus. It is used by the children of gpiobus. Modified: head/sys/arm/allwinner/a10_gpio.c Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Sat Jul 11 20:18:34 2015 (r285406) +++ head/sys/arm/allwinner/a10_gpio.c Sat Jul 11 21:09:43 2015 (r285407) @@ -493,6 +493,14 @@ a10_gpio_detach(device_t dev) return (EBUSY); } +static phandle_t +a10_gpio_get_node(device_t dev, device_t bus) +{ + + /* We only have one child, the GPIO bus, which needs our own node. */ + return (ofw_bus_get_node(dev)); +} + static device_method_t a10_gpio_methods[] = { /* Device interface */ DEVMETHOD(device_probe, a10_gpio_probe), @@ -510,6 +518,9 @@ static device_method_t a10_gpio_methods[ DEVMETHOD(gpio_pin_set, a10_gpio_pin_set), DEVMETHOD(gpio_pin_toggle, a10_gpio_pin_toggle), + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, a10_gpio_get_node), + DEVMETHOD_END }; From owner-svn-src-all@freebsd.org Sat Jul 11 21:09:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B3AE99769C; Sat, 11 Jul 2015 21:09:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 2A785E48; Sat, 11 Jul 2015 21:09:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BL9qRv013539; Sat, 11 Jul 2015 21:09:52 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BL9pGO013533; Sat, 11 Jul 2015 21:09:51 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507112109.t6BL9pGO013533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Jul 2015 21:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285408 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 21:09:52 -0000 Author: bapt Date: Sat Jul 11 21:09:50 2015 New Revision: 285408 URL: https://svnweb.freebsd.org/changeset/base/285408 Log: check the gecos format early: at the moment the -c option is parsed Modified: head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/pwupd.h Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sat Jul 11 21:09:43 2015 (r285407) +++ head/usr.sbin/pw/pw.c Sat Jul 11 21:09:50 2015 (r285408) @@ -254,6 +254,9 @@ main(int argc, char *argv[]) case 'a': conf.all = true; break; + case 'c': + conf.gecos = pw_checkname(optarg, 1); + break; case 'g': if (which == 0) { /* for user* */ addarg(&arglist, 'g', optarg); Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sat Jul 11 21:09:43 2015 (r285407) +++ head/usr.sbin/pw/pw_user.c Sat Jul 11 21:09:50 2015 (r285408) @@ -650,10 +650,9 @@ pw_user(int mode, char *name, long id, s /* * Shared add/edit code */ - if ((arg = getarg(args, 'c')) != NULL) { - char *gecos = pw_checkname(arg->val, 1); - if (strcmp(pwd->pw_gecos, gecos) != 0) { - pwd->pw_gecos = gecos; + if (conf.gecos != NULL) { + if (strcmp(pwd->pw_gecos, conf.gecos) != 0) { + pwd->pw_gecos = conf.gecos; edited = 1; } } Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Sat Jul 11 21:09:43 2015 (r285407) +++ head/usr.sbin/pw/pwupd.h Sat Jul 11 21:09:50 2015 (r285408) @@ -85,6 +85,7 @@ struct pwconf { char etcpath[MAXPATHLEN]; char *newname; char *config; + char *gecos; int fd; int which; bool quiet; From owner-svn-src-all@freebsd.org Sat Jul 11 21:12:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 224229977CA; Sat, 11 Jul 2015 21:12:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 ECC391193; Sat, 11 Jul 2015 21:12:28 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BLCSoc017548; Sat, 11 Jul 2015 21:12:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BLCSfZ017547; Sat, 11 Jul 2015 21:12:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507112112.t6BLCSfZ017547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Jul 2015 21:12:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285409 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 21:12:29 -0000 Author: bapt Date: Sat Jul 11 21:12:28 2015 New Revision: 285409 URL: https://svnweb.freebsd.org/changeset/base/285409 Log: Remove unused argument from pm_passwd Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sat Jul 11 21:09:50 2015 (r285408) +++ head/usr.sbin/pw/pw_user.c Sat Jul 11 21:12:28 2015 (r285409) @@ -59,7 +59,7 @@ static time_t pw_pwdpolicy(struct user static time_t pw_exppolicy(struct userconf * cnf, struct cargs * args); static char *pw_homepolicy(struct userconf * cnf, struct cargs * args, char const * user); static char *pw_shellpolicy(struct userconf * cnf, struct cargs * args, char *newshell); -static char *pw_password(struct userconf * cnf, struct cargs * args, char const * user); +static char *pw_password(struct userconf * cnf, char const * user); static char *shell_path(char const * path, char *shells[], char *sh); static void rmat(uid_t uid); static void rmopie(char const * name); @@ -608,7 +608,7 @@ pw_user(int mode, char *name, long id, s login_setcryptfmt(lc, "sha512", NULL) == NULL) warn("setting crypt(3) format"); login_close(lc); - pwd->pw_passwd = pw_password(cnf, args, pwd->pw_name); + pwd->pw_passwd = pw_password(cnf, pwd->pw_name); edited = 1; } @@ -640,7 +640,7 @@ pw_user(int mode, char *name, long id, s if (lc == NULL || login_setcryptfmt(lc, "sha512", NULL) == NULL) warn("setting crypt(3) format"); login_close(lc); - pwd->pw_passwd = pw_password(cnf, args, pwd->pw_name); + pwd->pw_passwd = pw_password(cnf, pwd->pw_name); edited = 1; if (pwd->pw_uid == 0 && strcmp(pwd->pw_name, "root") != 0) @@ -1038,7 +1038,7 @@ pw_pwcrypt(char *password) static char * -pw_password(struct userconf * cnf, struct cargs * args, char const * user) +pw_password(struct userconf * cnf, char const * user) { int i, l; char pwbuf[32]; From owner-svn-src-all@freebsd.org Sat Jul 11 21:59:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE596997E8A; Sat, 11 Jul 2015 21:59:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 C361F1B3; Sat, 11 Jul 2015 21:59:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BLxGM8037699; Sat, 11 Jul 2015 21:59:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BLxGGf037697; Sat, 11 Jul 2015 21:59:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201507112159.t6BLxGGf037697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 11 Jul 2015 21:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285410 - stable/10/sys/ofed/include/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 21:59:17 -0000 Author: hselasky Date: Sat Jul 11 21:59:15 2015 New Revision: 285410 URL: https://svnweb.freebsd.org/changeset/base/285410 Log: MFC r285088: Fix broken implementation of "kvasprintf()" function by adding missing kmalloc() call. Make function global instead of static inline to fix compiler warnings about passing variable argument lists to inline functions. Sponsored by: Mellanox Technologies Approved by: re, gjb Modified: stable/10/sys/ofed/include/linux/device.h stable/10/sys/ofed/include/linux/linux_compat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/include/linux/device.h ============================================================================== --- stable/10/sys/ofed/include/linux/device.h Sat Jul 11 21:12:28 2015 (r285409) +++ stable/10/sys/ofed/include/linux/device.h Sat Jul 11 21:59:15 2015 (r285410) @@ -416,21 +416,7 @@ static inline int dev_to_node(struct dev return -1; } -static inline char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap) -{ - unsigned int len; - char *p = NULL; - va_list aq; - - va_copy(aq, ap); - len = vsnprintf(NULL, 0, fmt, aq); - va_end(aq); - - vsnprintf(p, len+1, fmt, ap); - - return p; -} - +char *kvasprintf(gfp_t, const char *, va_list); char *kasprintf(gfp_t, const char *, ...); #endif /* _LINUX_DEVICE_H_ */ Modified: stable/10/sys/ofed/include/linux/linux_compat.c ============================================================================== --- stable/10/sys/ofed/include/linux/linux_compat.c Sat Jul 11 21:12:28 2015 (r285409) +++ stable/10/sys/ofed/include/linux/linux_compat.c Sat Jul 11 21:59:15 2015 (r285410) @@ -691,6 +691,23 @@ vunmap(void *addr) kfree(vmmap); } +char * +kvasprintf(gfp_t gfp, const char *fmt, va_list ap) +{ + unsigned int len; + char *p; + va_list aq; + + va_copy(aq, ap); + len = vsnprintf(NULL, 0, fmt, aq); + va_end(aq); + + p = kmalloc(len + 1, gfp); + if (p != NULL) + vsnprintf(p, len + 1, fmt, ap); + + return (p); +} char * kasprintf(gfp_t gfp, const char *fmt, ...) @@ -702,7 +719,7 @@ kasprintf(gfp_t gfp, const char *fmt, .. p = kvasprintf(gfp, fmt, ap); va_end(ap); - return p; + return (p); } static int From owner-svn-src-all@freebsd.org Sat Jul 11 22:35:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F0F999840A; Sat, 11 Jul 2015 22:35:09 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 048C5122C; Sat, 11 Jul 2015 22:35:09 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BMZ8kE056775; Sat, 11 Jul 2015 22:35:08 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BMZ8xw056772; Sat, 11 Jul 2015 22:35:08 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507112235.t6BMZ8xw056772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Jul 2015 22:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285411 - in head/usr.sbin/pw: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 22:35:09 -0000 Author: bapt Date: Sat Jul 11 22:35:07 2015 New Revision: 285411 URL: https://svnweb.freebsd.org/changeset/base/285411 Log: Rework groupmod modification: Use gr_add(3) when possible to avoid code duplication. Use a simpler logic to delete members of a group Modified: head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/tests/pw_groupmod.sh Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sat Jul 11 21:59:15 2015 (r285410) +++ head/usr.sbin/pw/pw_group.c Sat Jul 11 22:35:07 2015 (r285411) @@ -42,8 +42,7 @@ static const char rcsid[] = static struct passwd *lookup_pwent(const char *user); -static void delete_members(char ***members, int *grmembers, int *i, - struct carg *arg, struct group *grp); +static void delete_members(struct group *grp, char *list); static int print_group(struct group * grp); static gid_t gr_gidpolicy(struct userconf * cnf, long id); @@ -163,7 +162,6 @@ pw_group(int mode, char *name, long id, int rc; struct carg *arg; struct group *grp = NULL; - int grmembers = 0; char **members = NULL; struct userconf *cnf = conf.userconf; @@ -216,13 +214,11 @@ pw_group(int mode, char *name, long id, else if (grp != NULL) /* Exists */ errx(EX_DATAERR, "group name `%s' already exists", name); - extendarray(&members, &grmembers, 200); - members[0] = NULL; grp = &fakegroup; grp->gr_name = pw_checkname(name, 0); grp->gr_passwd = "*"; grp->gr_gid = gr_gidpolicy(cnf, id); - grp->gr_mem = members; + grp->gr_mem = NULL; } /* @@ -238,42 +234,31 @@ pw_group(int mode, char *name, long id, if (((arg = getarg(args, 'M')) != NULL || (arg = getarg(args, 'd')) != NULL || (arg = getarg(args, 'm')) != NULL) && arg->val) { - int i = 0; char *p; struct passwd *pwd; /* Make sure this is not stay NULL with -M "" */ - extendarray(&members, &grmembers, 200); if (arg->ch == 'd') - delete_members(&members, &grmembers, &i, arg, grp); - else if (arg->ch == 'm') { - int k = 0; - - if (grp->gr_mem != NULL) { - while (grp->gr_mem[k] != NULL) { - if (extendarray(&members, &grmembers, i + 2) != -1) - members[i++] = grp->gr_mem[k]; - k++; - } + delete_members(grp, arg->val); + else if (arg->ch == 'M') + grp->gr_mem = NULL; + + for (p = strtok(arg->val, ", \t"); arg->ch != 'd' && p != NULL; + p = strtok(NULL, ", \t")) { + int j; + + /* + * Check for duplicates + */ + pwd = lookup_pwent(p); + for (j = 0; grp->gr_mem != NULL && grp->gr_mem[j] != NULL; j++) { + if (strcmp(grp->gr_mem[j], pwd->pw_name) == 0) + break; } + if (grp->gr_mem != NULL && grp->gr_mem[j] != NULL) + continue; + grp = gr_add(grp, pwd->pw_name); } - - if (arg->ch != 'd') - for (p = strtok(arg->val, ", \t"); p != NULL; p = strtok(NULL, ", \t")) { - int j; - - /* - * Check for duplicates - */ - pwd = lookup_pwent(p); - for (j = 0; j < i && strcmp(members[j], pwd->pw_name) != 0; j++) - ; - if (j == i && extendarray(&members, &grmembers, i + 2) != -1) - members[i++] = newstr(pwd->pw_name); - } - while (i < grmembers) - members[i++] = NULL; - grp->gr_mem = members; } if (conf.dryrun) @@ -328,42 +313,25 @@ lookup_pwent(const char *user) * Delete requested members from a group. */ static void -delete_members(char ***members, int *grmembers, int *i, struct carg *arg, - struct group *grp) +delete_members(struct group *grp, char *list) { - bool matchFound; - char *user; - char *valueCopy; - char *valuePtr; + char *p; int k; - struct passwd *pwd; if (grp->gr_mem == NULL) return; - k = 0; - while (grp->gr_mem[k] != NULL) { - matchFound = false; - if ((valueCopy = strdup(arg->val)) == NULL) - errx(EX_UNAVAILABLE, "out of memory"); - valuePtr = valueCopy; - while ((user = strsep(&valuePtr, ", \t")) != NULL) { - pwd = lookup_pwent(user); - if (strcmp(grp->gr_mem[k], pwd->pw_name) == 0) { - matchFound = true; + for (p = strtok(list, ", \t"); p != NULL; p = strtok(NULL, ", \t")) { + for (k = 0; grp->gr_mem[k] != NULL; k++) { + if (strcmp(grp->gr_mem[k], p) == 0) break; - } } - free(valueCopy); - - if (!matchFound && - extendarray(members, grmembers, *i + 2) != -1) - (*members)[(*i)++] = grp->gr_mem[k]; + if (grp->gr_mem[k] == NULL) /* No match */ + continue; - k++; + for (; grp->gr_mem[k] != NULL; k++) + grp->gr_mem[k] = grp->gr_mem[k+1]; } - - return; } Modified: head/usr.sbin/pw/tests/pw_groupmod.sh ============================================================================== --- head/usr.sbin/pw/tests/pw_groupmod.sh Sat Jul 11 21:59:15 2015 (r285410) +++ head/usr.sbin/pw/tests/pw_groupmod.sh Sat Jul 11 22:35:07 2015 (r285411) @@ -81,6 +81,32 @@ groupmod_rename_body() { grep "^bar:.*" ${HOME}/group } +atf_test_case groupmod_members +groupmod_members_body() { + populate_etc_skel + + for i in user1 user2 user3 user4; do + atf_check -s exit:0 ${PW} useradd $i + done + + atf_check -s exit:0 ${PW} groupadd foo -M "user1, user2" + atf_check -o inline:"foo:*:1005:user1,user2\n" -s exit:0 \ + ${PW} groupshow foo + atf_check -s exit:0 ${PW} groupmod foo -m "user3, user4" + atf_check -o inline:"foo:*:1005:user1,user2,user3,user4\n" -s exit:0 \ + ${PW} groupshow foo + atf_check -s exit:0 ${PW} groupmod foo -M "user1, user4" + atf_check -o inline:"foo:*:1005:user1,user4\n" -s exit:0 \ + ${PW} groupshow foo + # what about duplicates + atf_check -s exit:0 ${PW} groupmod foo -m "user1, user2, user3, user4" + atf_check -o inline:"foo:*:1005:user1,user4,user2,user3\n" -s exit:0 \ + ${PW} groupshow foo + atf_check -s exit:0 ${PW} groupmod foo -d "user1, user3" + atf_check -o inline:"foo:*:1005:user4,user2\n" -s exit:0 \ + ${PW} groupshow foo +} + atf_init_test_cases() { atf_add_test_case groupmod_user atf_add_test_case groupmod_invalid_user @@ -88,4 +114,5 @@ atf_init_test_cases() { atf_add_test_case usermod_bug_185666 atf_add_test_case do_not_duplicate_group_on_gid_change atf_add_test_case groupmod_rename + atf_add_test_case groupmod_members } From owner-svn-src-all@freebsd.org Sat Jul 11 23:07:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A24BF9989D4; Sat, 11 Jul 2015 23:07:19 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 897A41EC6; Sat, 11 Jul 2015 23:07:19 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BN7JeA071651; Sat, 11 Jul 2015 23:07:19 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BN7I07071646; Sat, 11 Jul 2015 23:07:18 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507112307.t6BN7I07071646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Jul 2015 23:07:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285412 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 23:07:19 -0000 Author: bapt Date: Sat Jul 11 23:07:17 2015 New Revision: 285412 URL: https://svnweb.freebsd.org/changeset/base/285412 Log: Replace custom string array with stringlist(3) Deleted: head/usr.sbin/pw/fileupd.c Modified: head/usr.sbin/pw/Makefile head/usr.sbin/pw/pw_conf.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/pwupd.h Modified: head/usr.sbin/pw/Makefile ============================================================================== --- head/usr.sbin/pw/Makefile Sat Jul 11 22:35:07 2015 (r285411) +++ head/usr.sbin/pw/Makefile Sat Jul 11 23:07:17 2015 (r285412) @@ -3,8 +3,7 @@ PROG= pw MAN= pw.conf.5 pw.8 SRCS= pw.c pw_conf.c pw_user.c pw_group.c pw_log.c pw_nis.c pw_vpw.c \ - grupd.c pwupd.c fileupd.c psdate.c \ - bitmap.c cpdir.c rm_r.c + grupd.c pwupd.c psdate.c bitmap.c cpdir.c rm_r.c WARNS?= 3 Modified: head/usr.sbin/pw/pw_conf.c ============================================================================== --- head/usr.sbin/pw/pw_conf.c Sat Jul 11 22:35:07 2015 (r285411) +++ head/usr.sbin/pw/pw_conf.c Sat Jul 11 23:07:17 2015 (r285412) @@ -104,8 +104,7 @@ static struct userconf config = 1000, 32000, /* Allowed range of uids */ 1000, 32000, /* Allowed range of gids */ 0, /* Days until account expires */ - 0, /* Days until password expires */ - 0 /* size of default_group array */ + 0 /* Days until password expires */ }; static char const *comments[_UC_FIELDS] = @@ -234,10 +233,9 @@ read_userconfig(char const * file) buf = NULL; linecap = 0; - config.numgroups = 200; - config.groups = calloc(config.numgroups, sizeof(char *)); + config.groups = sl_init(); if (config.groups == NULL) - err(1, "calloc()"); + err(1, "sl_init()"); if (file == NULL) file = _PATH_PW_CONF; @@ -316,13 +314,8 @@ read_userconfig(char const * file) ? NULL : newstr(q); break; case _UC_EXTRAGROUPS: - for (i = 0; q != NULL; q = strtok(NULL, toks)) { - if (extendarray(&config.groups, &config.numgroups, i + 2) != -1) - config.groups[i++] = newstr(q); - } - if (i > 0) - while (i < config.numgroups) - config.groups[i++] = NULL; + for (i = 0; q != NULL; q = strtok(NULL, toks)) + sl_add(config.groups, newstr(q)); break; case _UC_DEFAULTCLASS: config.default_class = (q == NULL || !boolean_val(q, 1)) @@ -442,10 +435,10 @@ write_userconfig(char const * file) config.default_group : ""); break; case _UC_EXTRAGROUPS: - for (j = 0; j < config.numgroups && - config.groups[j] != NULL; j++) + for (j = 0; config.groups != NULL && + j < (int)config.groups->sl_cur; j++) sbuf_printf(buf, "%s\"%s\"", j ? - "," : "", config.groups[j]); + "," : "", config.groups->sl_str[j]); quote = 0; break; case _UC_DEFAULTCLASS: Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sat Jul 11 22:35:07 2015 (r285411) +++ head/usr.sbin/pw/pw_user.c Sat Jul 11 23:07:17 2015 (r285412) @@ -440,18 +440,13 @@ pw_user(int mode, char *name, long id, s cnf->default_class = pw_checkname(arg->val, 0); if ((arg = getarg(args, 'G')) != NULL && arg->val) { - int i = 0; - for (p = strtok(arg->val, ", \t"); p != NULL; p = strtok(NULL, ", \t")) { if ((grp = GETGRNAM(p)) == NULL) { if (!isdigit((unsigned char)*p) || (grp = GETGRGID((gid_t) atoi(p))) == NULL) errx(EX_NOUSER, "group `%s' does not exist", p); } - if (extendarray(&cnf->groups, &cnf->numgroups, i + 2) != -1) - cnf->groups[i++] = newstr(grp->gr_name); + sl_add(cnf->groups, newstr(grp->gr_name)); } - while (i < cnf->numgroups) - cnf->groups[i++] = NULL; } if ((arg = getarg(args, 'k')) != NULL) { @@ -690,7 +685,8 @@ pw_user(int mode, char *name, long id, s */ if (mode == M_ADD || getarg(args, 'G') != NULL) { - int i, j; + int j; + size_t i; /* First remove the user from all group */ SETGRENT(); while ((grp = GETGRENT()) != NULL) { @@ -709,8 +705,8 @@ pw_user(int mode, char *name, long id, s ENDGRENT(); /* now add to group where needed */ - for (i = 0; cnf->groups[i] != NULL; i++) { - grp = GETGRNAM(cnf->groups[i]); + for (i = 0; i < cnf->groups->sl_cur; i++) { + grp = GETGRNAM(cnf->groups->sl_str[i]); grp = gr_add(grp, pwd->pw_name); /* * grp can only be NULL in 2 cases: @@ -720,7 +716,7 @@ pw_user(int mode, char *name, long id, s */ if (grp == NULL) continue; - chggrent(cnf->groups[i], grp); + chggrent(grp->gr_name, grp); free(grp); } } Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Sat Jul 11 22:35:07 2015 (r285411) +++ head/usr.sbin/pw/pwupd.h Sat Jul 11 23:07:17 2015 (r285412) @@ -36,6 +36,7 @@ #include #include #include +#include #if defined(__FreeBSD__) #define RET_SETGRENT int @@ -58,26 +59,25 @@ struct pwf { }; struct userconf { - int default_password; /* Default password for new users? */ - int reuse_uids; /* Reuse uids? */ - int reuse_gids; /* Reuse gids? */ - char *nispasswd; /* Path to NIS version of the passwd file */ - char *dotdir; /* Where to obtain skeleton files */ - char *newmail; /* Mail to send to new accounts */ - char *logfile; /* Where to log changes */ - char *home; /* Where to create home directory */ - mode_t homemode; /* Home directory permissions */ - char *shelldir; /* Where shells are located */ - char **shells; /* List of shells */ - char *shell_default; /* Default shell */ - char *default_group; /* Default group number */ - char **groups; /* Default (additional) groups */ - char *default_class; /* Default user class */ - uid_t min_uid, max_uid; /* Allowed range of uids */ - gid_t min_gid, max_gid; /* Allowed range of gids */ - int expire_days; /* Days to expiry */ - int password_days; /* Days to password expiry */ - int numgroups; /* (internal) size of default_group array */ + int default_password; /* Default password for new users? */ + int reuse_uids; /* Reuse uids? */ + int reuse_gids; /* Reuse gids? */ + char *nispasswd; /* Path to NIS version of the passwd file */ + char *dotdir; /* Where to obtain skeleton files */ + char *newmail; /* Mail to send to new accounts */ + char *logfile; /* Where to log changes */ + char *home; /* Where to create home directory */ + mode_t homemode; /* Home directory permissions */ + char *shelldir; /* Where shells are located */ + char **shells; /* List of shells */ + char *shell_default; /* Default shell */ + char *default_group; /* Default group number */ + StringList *groups; /* Default (additional) groups */ + char *default_class; /* Default user class */ + uid_t min_uid, max_uid; /* Allowed range of uids */ + gid_t min_gid, max_gid; /* Allowed range of gids */ + int expire_days; /* Days to expiry */ + int password_days; /* Days to password expiry */ }; struct pwconf { @@ -158,7 +158,6 @@ void vendgrent(void); void copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid); void rm_r(char const * dir, uid_t uid); -int extendarray(char ***buf, int *buflen, int needed); __END_DECLS #endif /* !_PWUPD_H */ From owner-svn-src-all@freebsd.org Sat Jul 11 23:17:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46D55998B45; Sat, 11 Jul 2015 23:17:14 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 3278B799; Sat, 11 Jul 2015 23:17:14 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BNHEhH076612; Sat, 11 Jul 2015 23:17:14 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BNHEkO076611; Sat, 11 Jul 2015 23:17:14 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507112317.t6BNHEkO076611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Jul 2015 23:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285413 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 23:17:14 -0000 Author: bapt Date: Sat Jul 11 23:17:13 2015 New Revision: 285413 URL: https://svnweb.freebsd.org/changeset/base/285413 Log: Remove now unused variable Modified: head/usr.sbin/pw/pw_group.c Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sat Jul 11 23:07:17 2015 (r285412) +++ head/usr.sbin/pw/pw_group.c Sat Jul 11 23:17:13 2015 (r285413) @@ -162,7 +162,6 @@ pw_group(int mode, char *name, long id, int rc; struct carg *arg; struct group *grp = NULL; - char **members = NULL; struct userconf *cnf = conf.userconf; static struct group fakegroup = @@ -286,8 +285,6 @@ pw_group(int mode, char *name, long id, pw_log(cnf, mode, W_GROUP, "%s(%u)", grp->gr_name, grp->gr_gid); - free(members); - return EXIT_SUCCESS; } From owner-svn-src-all@freebsd.org Sat Jul 11 23:56:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B896999106; Sat, 11 Jul 2015 23:56:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 F02371484; Sat, 11 Jul 2015 23:56:56 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6BNuux8096189; Sat, 11 Jul 2015 23:56:56 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6BNuuqj096188; Sat, 11 Jul 2015 23:56:56 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507112356.t6BNuuqj096188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Jul 2015 23:56:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285414 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 23:56:57 -0000 Author: bapt Date: Sat Jul 11 23:56:55 2015 New Revision: 285414 URL: https://svnweb.freebsd.org/changeset/base/285414 Log: Fix regression: ensure when try to create the group and the user with the same id if possible and nothing in particular was specified Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sat Jul 11 23:17:13 2015 (r285413) +++ head/usr.sbin/pw/pw_user.c Sat Jul 11 23:56:55 2015 (r285414) @@ -875,7 +875,7 @@ pw_gidpolicy(struct cargs * args, char * gid = grp->gr_gid; /* Already created? Use it anyway... */ } else { struct cargs grpargs; - char tmp[32]; + gid_t grid = -1; LIST_INIT(&grpargs); @@ -888,23 +888,15 @@ pw_gidpolicy(struct cargs * args, char * * user's name dups an existing group, then the group add * function will happily handle that case for us and exit. */ - if (GETGRGID(prefer) == NULL) { - snprintf(tmp, sizeof(tmp), "%u", prefer); - addarg(&grpargs, 'g', tmp); - } + if (GETGRGID(prefer) == NULL) + grid = prefer; if (conf.dryrun) { gid = pw_groupnext(cnf, true); } else { - pw_group(M_ADD, nam, -1, &grpargs); + pw_group(M_ADD, nam, grid, &grpargs); if ((grp = GETGRNAM(nam)) != NULL) gid = grp->gr_gid; } - a_gid = LIST_FIRST(&grpargs); - while (a_gid != NULL) { - struct carg *t = LIST_NEXT(a_gid, list); - LIST_REMOVE(a_gid, list); - a_gid = t; - } } ENDGRENT(); return gid;