From owner-svn-src-stable-12@freebsd.org Sun Sep 20 04:17:33 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 323583FBD27; Sun, 20 Sep 2020 04:17:33 +0000 (UTC) (envelope-from xxjack12xx@gmail.com) Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BvDn76qJnz4154; Sun, 20 Sep 2020 04:17:31 +0000 (UTC) (envelope-from xxjack12xx@gmail.com) Received: by mail-qt1-x844.google.com with SMTP id b2so9366302qtp.8; Sat, 19 Sep 2020 21:17:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kEIV8uD9zw32JGltnrzj4dmyVn7YVsJoePvv4i5yPuA=; b=YArRdV9kk5nEgb5KlYj1yTAfHPlkKrcK8MCBSYYg+ml2fyd1GwSCGq2qKCm7XDqH7+ RlyrW+lkqQK0CM3h+cqCx7ibYiC1lrURfDx5xccGMftZMAC2LoN0dXiwZLqdDqpDDBZZ Zcsp6AfdV7HOnZ+nMaQ923XmqCsBLPWyr6tCKOrXZ66FCekejtVinnl2oigjzUW41zJm UnIZI/+hBQUpAceazO+Bse9e472mlepla+BXkHpBPb7BR1cwTNiI9wC1XlwcwnHxn4ty K841GwusQfsFs6+dKNQfaQvZPl557RxQpmWCdyQwKmef20roPWCqZR5HBNSqsM1AQPKG BP/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kEIV8uD9zw32JGltnrzj4dmyVn7YVsJoePvv4i5yPuA=; b=HO1ww3H1RJUTD7Py8TIgp6XuuiJUa995w4mF8lOnDMGJupFsVb7vzV8meiRj3NGFJQ yS0wcTvgXFvY9Lz0LdUhPvP0hUQsbeFp8O/YsBv3t2HocdipRSgtCVBR0BxqcDQaCx3y jdaZ2m4UkBPTdSQVvFRKMPEzdBYFPoCnbb/4cgTfPscJ8nIoQD3o0OGfiaUvSdwV1v9L 3/eoUBrsFU6VtITZ55LXXIwm5kblotD0dsyoW12LtMTgFh8NfKvMxrUpA14f1hu9bAW5 u1ptYodQMMXE76TIhQA3YBDHEgTEqITWmPBBVLmfeSAEvboii87OwLT08269Ls05iqPT er/A== X-Gm-Message-State: AOAM530/A4Xwo2MrI3/kkDGJ13oWGdI2/dAaDWUHlxoYqdnLpDmUK6N+ RIXZrZ2qqhCyHXuDaN6B64DxVJDwzsYupGqX0TZwvY4zS6OMpw== X-Google-Smtp-Source: ABdhPJy6MCj7nUlIphOSxwSM6OyxF2yg2P3+9fGihNMsmUMmkspvazbFYfwLwY7/IlMvvZoS2MA5tCPxaX9jkZ1hFhQ= X-Received: by 2002:ac8:23a3:: with SMTP id q32mr40674566qtq.361.1600575450787; Sat, 19 Sep 2020 21:17:30 -0700 (PDT) MIME-Version: 1.0 References: <202009161420.08GEKj4d056054@repo.freebsd.org> In-Reply-To: <202009161420.08GEKj4d056054@repo.freebsd.org> From: "Jack L." Date: Sat, 19 Sep 2020 21:16:54 -0700 Message-ID: Subject: Re: svn commit: r365800 - in stable/12/sys: sys vm To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4BvDn76qJnz4154 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=YArRdV9k; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of xxjack12xx@gmail.com designates 2607:f8b0:4864:20::844 as permitted sender) smtp.mailfrom=xxjack12xx@gmail.com X-Spamd-Result: default: False [-3.51 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-0.98)[-0.980]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.03)[-1.032]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::844:from]; NEURAL_HAM_SHORT(-0.50)[-0.500]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-stable,svn-src-stable-12]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Sep 2020 04:17:33 -0000 I'm getting a kernel panic on this revision on 12.2-STABLE after updating to this revision on a Dell system. I have options RACCT disabled in the kernel config. Would that be causing it to panic? Trying to recompile the system with various revisions to make sure this is the problem commit but also want to make sure it isn't because I've disabled RACCT. On Wed, Sep 16, 2020 at 7:20 AM Konstantin Belousov wrote: > > Author: kib > Date: Wed Sep 16 14:20:45 2020 > New Revision: 365800 > URL: https://svnweb.freebsd.org/changeset/base/365800 > > Log: > MFC r365486: > Add kern_mmap_racct_check(), a helper to verify limits in vm_mmap*(). > > Modified: > stable/12/sys/sys/syscallsubr.h > stable/12/sys/vm/vm_mmap.c > Directory Properties: > stable/12/ (props changed) > > Modified: stable/12/sys/sys/syscallsubr.h > ============================================================================== > --- stable/12/sys/sys/syscallsubr.h Wed Sep 16 14:16:09 2020 (r365799) > +++ stable/12/sys/sys/syscallsubr.h Wed Sep 16 14:20:45 2020 (r365800) > @@ -62,6 +62,7 @@ struct sockaddr; > struct stat; > struct thr_param; > struct uio; > +struct vm_map; > > typedef int (*mmap_check_fp_fn)(struct file *, int, int, int); > > @@ -185,6 +186,8 @@ int kern_mmap(struct thread *td, uintptr_t addr, size_ > int kern_mmap_fpcheck(struct thread *td, uintptr_t addr, size_t len, > int prot, int flags, int fd, off_t pos, > mmap_check_fp_fn check_fp_fn); > +int kern_mmap_racct_check(struct thread *td, struct vm_map *map, > + vm_size_t size); > int kern_mprotect(struct thread *td, uintptr_t addr, size_t size, int prot); > int kern_msgctl(struct thread *, int, int, struct msqid_ds *); > int kern_msgrcv(struct thread *, int, void *, size_t, long, int, long *); > > Modified: stable/12/sys/vm/vm_mmap.c > ============================================================================== > --- stable/12/sys/vm/vm_mmap.c Wed Sep 16 14:16:09 2020 (r365799) > +++ stable/12/sys/vm/vm_mmap.c Wed Sep 16 14:20:45 2020 (r365800) > @@ -1457,6 +1457,39 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, vm_size_t siz > return (error); > } > > +int > +kern_mmap_racct_check(struct thread *td, vm_map_t map, vm_size_t size) > +{ > + int error; > + > + RACCT_PROC_LOCK(td->td_proc); > + if (map->size + size > lim_cur(td, RLIMIT_VMEM)) { > + RACCT_PROC_UNLOCK(td->td_proc); > + return (ENOMEM); > + } > + if (racct_set(td->td_proc, RACCT_VMEM, map->size + size)) { > + RACCT_PROC_UNLOCK(td->td_proc); > + return (ENOMEM); > + } > + if (!old_mlock && map->flags & MAP_WIREFUTURE) { > + if (ptoa(pmap_wired_count(map->pmap)) + size > > + lim_cur(td, RLIMIT_MEMLOCK)) { > + racct_set_force(td->td_proc, RACCT_VMEM, map->size); > + RACCT_PROC_UNLOCK(td->td_proc); > + return (ENOMEM); > + } > + error = racct_set(td->td_proc, RACCT_MEMLOCK, > + ptoa(pmap_wired_count(map->pmap)) + size); > + if (error != 0) { > + racct_set_force(td->td_proc, RACCT_VMEM, map->size); > + RACCT_PROC_UNLOCK(td->td_proc); > + return (error); > + } > + } > + RACCT_PROC_UNLOCK(td->td_proc); > + return (0); > +} > + > /* > * Internal version of mmap that maps a specific VM object into an > * map. Called by mmap for MAP_ANON, vm_mmap, shm_mmap, and vn_mmap. > @@ -1466,39 +1499,15 @@ vm_mmap_object(vm_map_t map, vm_offset_t *addr, vm_siz > vm_prot_t maxprot, int flags, vm_object_t object, vm_ooffset_t foff, > boolean_t writecounted, struct thread *td) > { > - boolean_t curmap, fitit; > vm_offset_t max_addr; > int docow, error, findspace, rv; > + bool curmap, fitit; > > curmap = map == &td->td_proc->p_vmspace->vm_map; > if (curmap) { > - RACCT_PROC_LOCK(td->td_proc); > - if (map->size + size > lim_cur(td, RLIMIT_VMEM)) { > - RACCT_PROC_UNLOCK(td->td_proc); > - return (ENOMEM); > - } > - if (racct_set(td->td_proc, RACCT_VMEM, map->size + size)) { > - RACCT_PROC_UNLOCK(td->td_proc); > - return (ENOMEM); > - } > - if (!old_mlock && map->flags & MAP_WIREFUTURE) { > - if (ptoa(pmap_wired_count(map->pmap)) + size > > - lim_cur(td, RLIMIT_MEMLOCK)) { > - racct_set_force(td->td_proc, RACCT_VMEM, > - map->size); > - RACCT_PROC_UNLOCK(td->td_proc); > - return (ENOMEM); > - } > - error = racct_set(td->td_proc, RACCT_MEMLOCK, > - ptoa(pmap_wired_count(map->pmap)) + size); > - if (error != 0) { > - racct_set_force(td->td_proc, RACCT_VMEM, > - map->size); > - RACCT_PROC_UNLOCK(td->td_proc); > - return (error); > - } > - } > - RACCT_PROC_UNLOCK(td->td_proc); > + error = kern_mmap_racct_check(td, map, size); > + if (error != 0) > + return (error); > } > > /* > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-stable-12@freebsd.org Sun Sep 20 05:23:17 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3757A3FCA94; Sun, 20 Sep 2020 05:23:17 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BvGF10cxtz44FP; Sun, 20 Sep 2020 05:23:17 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC7D7180DE; Sun, 20 Sep 2020 05:23:16 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08K5NGTP002046; Sun, 20 Sep 2020 05:23:16 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08K5NG1B002045; Sun, 20 Sep 2020 05:23:16 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202009200523.08K5NG1B002045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sun, 20 Sep 2020 05:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365920 - stable/12/sys/geom/part X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/sys/geom/part X-SVN-Commit-Revision: 365920 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Sep 2020 05:23:17 -0000 Author: eugen Date: Sun Sep 20 05:23:16 2020 New Revision: 365920 URL: https://svnweb.freebsd.org/changeset/base/365920 Log: MFC r365830: make it possible recovering broken GPT after some LBAs cut off If pre-formatted device has GPT and a partition covering last available LBAs and the device is attached using a bridge reducing amount of LBAs, then it could be not enough forcing GEOM to use primary GPT. Also, we should make it possible to recover GPT and this requires either deleting or resizing the partition. This change enables "gpart delete" and "gpart resize" commands on corrupted GPT with following "gpart recover". It still does not allow modifying corrupted GPT without preliminary setting sysctl kern.geom.part.check_integrity=0 Reported by: Alex Korchmar Modified: stable/12/sys/geom/part/g_part.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/geom/part/g_part.c ============================================================================== --- stable/12/sys/geom/part/g_part.c Sat Sep 19 22:48:30 2020 (r365919) +++ stable/12/sys/geom/part/g_part.c Sun Sep 20 05:23:16 2020 (r365920) @@ -1846,7 +1846,8 @@ g_part_ctlreq(struct gctl_req *req, struct g_class *mp table = gpp.gpp_geom->softc; if (table != NULL && table->gpt_corrupt && ctlreq != G_PART_CTL_DESTROY && - ctlreq != G_PART_CTL_RECOVER) { + ctlreq != G_PART_CTL_RECOVER && + geom_part_check_integrity) { gctl_error(req, "%d table '%s' is corrupt", EPERM, gpp.gpp_geom->name); return; From owner-svn-src-stable-12@freebsd.org Sun Sep 20 09:47:29 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 897773DAB3B; Sun, 20 Sep 2020 09:47:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BvN5s36Fhz4KT3; Sun, 20 Sep 2020 09:47:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4AA041B592; Sun, 20 Sep 2020 09:47:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08K9lT9h060433; Sun, 20 Sep 2020 09:47:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08K9lTvb060432; Sun, 20 Sep 2020 09:47:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009200947.08K9lTvb060432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 20 Sep 2020 09:47:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365924 - stable/12/sys/kgssapi X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kgssapi X-SVN-Commit-Revision: 365924 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Sep 2020 09:47:29 -0000 Author: kib Date: Sun Sep 20 09:47:28 2020 New Revision: 365924 URL: https://svnweb.freebsd.org/changeset/base/365924 Log: MFC r365863: State kgssapi dependency on xdr. PR: 249378 Modified: stable/12/sys/kgssapi/gss_impl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kgssapi/gss_impl.c ============================================================================== --- stable/12/sys/kgssapi/gss_impl.c Sun Sep 20 05:57:23 2020 (r365923) +++ stable/12/sys/kgssapi/gss_impl.c Sun Sep 20 09:47:28 2020 (r365924) @@ -342,5 +342,6 @@ static moduledata_t kgssapi_mod = { NULL, }; DECLARE_MODULE(kgssapi, kgssapi_mod, SI_SUB_VFS, SI_ORDER_ANY); +MODULE_DEPEND(kgssapi, xdr, 1, 1, 1); MODULE_DEPEND(kgssapi, krpc, 1, 1, 1); MODULE_VERSION(kgssapi, 1); From owner-svn-src-stable-12@freebsd.org Sun Sep 20 16:49:48 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D86B23E7545; Sun, 20 Sep 2020 16:49:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BvYT85NL2z3XC0; Sun, 20 Sep 2020 16:49:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BF931FD65; Sun, 20 Sep 2020 16:49:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08KGnm7C020810; Sun, 20 Sep 2020 16:49:48 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08KGnmXE020809; Sun, 20 Sep 2020 16:49:48 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202009201649.08KGnmXE020809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 20 Sep 2020 16:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365928 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 365928 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Sep 2020 16:49:48 -0000 Author: markj Date: Sun Sep 20 16:49:48 2020 New Revision: 365928 URL: https://svnweb.freebsd.org/changeset/base/365928 Log: MFC r365841: Increase the default vm.max_user_wired value. Modified: stable/12/sys/vm/vm_pageout.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/vm_pageout.c ============================================================================== --- stable/12/sys/vm/vm_pageout.c Sun Sep 20 16:11:38 2020 (r365927) +++ stable/12/sys/vm/vm_pageout.c Sun Sep 20 16:49:48 2020 (r365928) @@ -2040,7 +2040,7 @@ vm_pageout_init_domain(int domain) static void vm_pageout_init(void) { - u_int freecount; + u_long freecount; int i; /* @@ -2073,8 +2073,13 @@ vm_pageout_init(void) if (vm_pageout_update_period == 0) vm_pageout_update_period = 600; + /* + * Set the maximum number of user-wired virtual pages. Historically the + * main source of such pages was mlock(2) and mlockall(2). Hypervisors + * may also request user-wired memory. + */ if (vm_page_max_user_wired == 0) - vm_page_max_user_wired = freecount / 3; + vm_page_max_user_wired = 4 * freecount / 5; } /* From owner-svn-src-stable-12@freebsd.org Mon Sep 21 00:50:33 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 055A83E0451; Mon, 21 Sep 2020 00:50:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bvm7r6Q0Qz4mFl; Mon, 21 Sep 2020 00:50:32 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF5F1260A5; Mon, 21 Sep 2020 00:50:32 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08L0oWxB047336; Mon, 21 Sep 2020 00:50:32 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08L0oWQl047335; Mon, 21 Sep 2020 00:50:32 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202009210050.08L0oWQl047335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 21 Sep 2020 00:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365934 - stable/12/sys/fs/nfsserver X-SVN-Group: stable-12 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/12/sys/fs/nfsserver X-SVN-Commit-Revision: 365934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2020 00:50:33 -0000 Author: rmacklem Date: Mon Sep 21 00:50:32 2020 New Revision: 365934 URL: https://svnweb.freebsd.org/changeset/base/365934 Log: MFC: r365703 Fix a case where the NFSv4.0 server might crash if delegations are enabled. asomers@ reported a crash on an NFSv4.0 server with a backtrace of: kdb_backtrace vpanic panic nfsrv_docallback nfsrv_checkgetattr nfsrvd_getattr nfsrvd_dorpc nfssvc_program svc_run_internal svc_thread_start fork_exit fork_trampoline where the panic message was "docallb", which indicates that a callback was attempted when the ClientID is unconfirmed. This would not normally occur, but it is possible to have an unconfirmed ClientID structure with delegation structure(s) chained off it if the client were to issue a SetClientID with the same "id" but different "verifier" after acquiring delegations on the previously confirmed ClientID. The bug appears to be that nfsrv_checkgetattr() failed to check for this uncommon case of an unconfirmed ClientID with a delegation structure that no longer refers to a delegation the client knows about. This patch adds a check for this case, handling it as if no delegation exists, which is the case when the above occurs. Although difficult to reproduce, this change should avoid the panic(). PR: 249127 Modified: stable/12/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/12/sys/fs/nfsserver/nfs_nfsdstate.c Mon Sep 21 00:31:06 2020 (r365933) +++ stable/12/sys/fs/nfsserver/nfs_nfsdstate.c Mon Sep 21 00:50:32 2020 (r365934) @@ -5692,8 +5692,14 @@ nfsrv_checkgetattr(struct nfsrv_descript *nd, vnode_t goto out; } clp = stp->ls_clp; - delegfilerev = stp->ls_filerev; + /* If the clientid is not confirmed, ignore the delegation. */ + if (clp->lc_flags & LCL_NEEDSCONFIRM) { + NFSUNLOCKSTATE(); + goto out; + } + + delegfilerev = stp->ls_filerev; /* * If the Write delegation was issued as a part of this Compound RPC * or if we have an Implied Clientid (used in a previous Op in this From owner-svn-src-stable-12@freebsd.org Mon Sep 21 08:16:44 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7BD203EA218; Mon, 21 Sep 2020 08:16:44 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bvy2h2hd6z3fd6; Mon, 21 Sep 2020 08:16:44 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22675B3BD; Mon, 21 Sep 2020 08:16:44 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08L8GhlG024914; Mon, 21 Sep 2020 08:16:43 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08L8Gg1J024907; Mon, 21 Sep 2020 08:16:42 GMT (envelope-from np@FreeBSD.org) Message-Id: <202009210816.08L8Gg1J024907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 21 Sep 2020 08:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365937 - in stable/12/sys: conf dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12/sys: conf dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware X-SVN-Commit-Revision: 365937 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2020 08:16:44 -0000 Author: np Date: Mon Sep 21 08:16:42 2020 New Revision: 365937 URL: https://svnweb.freebsd.org/changeset/base/365937 Log: MFC r365861 and r365872. r365861: cxgbe(4): Update T4/5/6 firmwares to 1.25.0.0. r365872: cxgbe(4): add the firmware binaries instead of the empty files that were added in r365861. Obtained from: Chelsio Communications Sponsored by: Chelsio Communications Added: stable/12/sys/dev/cxgbe/firmware/t4fw-1.25.0.0.bin (contents, props changed) - copied, changed from r365861, head/sys/dev/cxgbe/firmware/t4fw-1.25.0.0.bin stable/12/sys/dev/cxgbe/firmware/t5fw-1.25.0.0.bin (contents, props changed) - copied, changed from r365861, head/sys/dev/cxgbe/firmware/t5fw-1.25.0.0.bin stable/12/sys/dev/cxgbe/firmware/t6fw-1.25.0.0.bin (contents, props changed) - copied, changed from r365861, head/sys/dev/cxgbe/firmware/t6fw-1.25.0.0.bin Deleted: stable/12/sys/dev/cxgbe/firmware/t4fw-1.24.12.0.bin stable/12/sys/dev/cxgbe/firmware/t5fw-1.24.12.0.bin stable/12/sys/dev/cxgbe/firmware/t6fw-1.24.12.0.bin Modified: stable/12/sys/conf/files stable/12/sys/dev/cxgbe/firmware/t4fw_interface.h stable/12/sys/dev/cxgbe/firmware/t6fw_cfg.txt stable/12/sys/dev/cxgbe/firmware/t6fw_cfg_uwire.txt stable/12/sys/modules/cxgbe/t4_firmware/Makefile stable/12/sys/modules/cxgbe/t5_firmware/Makefile stable/12/sys/modules/cxgbe/t6_firmware/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/files ============================================================================== --- stable/12/sys/conf/files Mon Sep 21 03:16:10 2020 (r365936) +++ stable/12/sys/conf/files Mon Sep 21 08:16:42 2020 (r365937) @@ -1476,7 +1476,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.24.12.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.25.0.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1510,7 +1510,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.24.12.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.25.0.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1544,7 +1544,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule \ clean "t6fw.fwo" t6fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.24.12.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.25.0.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t6fw.fw" Copied and modified: stable/12/sys/dev/cxgbe/firmware/t4fw-1.25.0.0.bin (from r365861, head/sys/dev/cxgbe/firmware/t4fw-1.25.0.0.bin) ============================================================================== Binary file (source and/or target). No diff available. Modified: stable/12/sys/dev/cxgbe/firmware/t4fw_interface.h ============================================================================== --- stable/12/sys/dev/cxgbe/firmware/t4fw_interface.h Mon Sep 21 03:16:10 2020 (r365936) +++ stable/12/sys/dev/cxgbe/firmware/t4fw_interface.h Mon Sep 21 08:16:42 2020 (r365937) @@ -4690,6 +4690,7 @@ enum fw_caps_config_crypto { FW_CAPS_CONFIG_CRYPTO_LOOKASIDE = 0x00000001, FW_CAPS_CONFIG_TLSKEYS = 0x00000002, FW_CAPS_CONFIG_IPSEC_INLINE = 0x00000004, + FW_CAPS_CONFIG_TLS_HW = 0x00000008, }; enum fw_caps_config_fcoe { @@ -4838,6 +4839,7 @@ enum fw_params_param_dev { FW_PARAMS_PARAM_DEV_TCB_CACHE_FLUSH = 0x2D, FW_PARAMS_PARAM_DEV_FILTER = 0x2E, FW_PARAMS_PARAM_DEV_CLIP2_CMD = 0x2F, + FW_PARAMS_PARAM_DEV_KTLS_HW = 0x31, }; /* @@ -4874,6 +4876,13 @@ enum fw_params_param_dev_filter{ FW_PARAM_DEV_FILTER_MODE_MASK = 0x01, }; +enum fw_params_param_dev_ktls_hw { + FW_PARAMS_PARAM_DEV_KTLS_HW_DISABLE = 0x00, + FW_PARAMS_PARAM_DEV_KTLS_HW_ENABLE = 0x01, + FW_PARAMS_PARAM_DEV_KTLS_HW_USER_DISABLE = 0x00, + FW_PARAMS_PARAM_DEV_KTLS_HW_USER_ENABLE = 0x01, +}; + enum fw_params_param_dev_fwcache { FW_PARAM_DEV_FWCACHE_FLUSH = 0x00, FW_PARAM_DEV_FWCACHE_FLUSHINV = 0x01, @@ -9638,6 +9647,7 @@ struct fw_debug_cmd { enum fw_diag_cmd_type { FW_DIAG_CMD_TYPE_OFLDIAG = 0, + FW_DIAG_CMD_TYPE_MEM_TEST_DIAG, }; enum fw_diag_cmd_ofldiag_op { @@ -9654,6 +9664,22 @@ enum fw_diag_cmd_ofldiag_status { FW_DIAG_CMD_OFLDIAG_STATUS_PASSED, }; +enum fw_diag_cmd_memdiag_op { + FW_DIAG_CMD_MEMDIAG_TEST_START=1, + FW_DIAG_CMD_MEMDIAG_TEST_STOP, + FW_DIAG_CMD_MEMDIAG_TEST_STATUS, + FW_DIAG_CMD_MEMDIAG_TEST_INIT, +}; + + +enum fw_diag_cmd_memdiag_status { + FW_DIAG_CMD_MEMDIAG_STATUS_NONE, + FW_DIAG_CMD_MEMDIAG_STATUS_RUNNING, + FW_DIAG_CMD_MEMDIAG_STATUS_FAILED, + FW_DIAG_CMD_MEMDIAG_STATUS_PASSED +}; + + struct fw_diag_cmd { __be32 op_type; __be32 len16_pkd; @@ -9664,15 +9690,33 @@ struct fw_diag_cmd { __be16 test_status; __be32 duration; } ofldiag; + struct fw_diag_test_memtest_diag { + __u8 test_op; + __u8 test_status; + __be16 size; /* in KB */ + __be32 duration; /* in seconds */ + } memdiag; } u; }; -#define S_FW_DIAG_CMD_TYPE 0 -#define M_FW_DIAG_CMD_TYPE 0xff -#define V_FW_DIAG_CMD_TYPE(x) ((x) << S_FW_DIAG_CMD_TYPE) -#define G_FW_DIAG_CMD_TYPE(x) \ - (((x) >> S_FW_DIAG_CMD_TYPE) & M_FW_DIAG_CMD_TYPE) +#define S_FW_DIAG_CMD_OPCODE 24 +#define M_FW_DIAG_CMD_OPCODE 0xff +#define V_FW_DIAG_CMD_OPCODE(x) ((x) << S_FW_DIAG_CMD_OPCODE) +#define G_FW_DIAG_CMD_OPCODE(x) \ + (((x) >> S_FW_DIAG_CMD_OPCODE) & M_FW_DIAG_CMD_OPCODE) +#define S_FW_DIAG_CMD_TYPE 0 +#define M_FW_DIAG_CMD_TYPE 0xff +#define V_FW_DIAG_CMD_TYPE(x) ((x) << S_FW_DIAG_CMD_TYPE) +#define G_FW_DIAG_CMD_TYPE(x) \ + (((x) >> S_FW_DIAG_CMD_TYPE) & M_FW_DIAG_CMD_TYPE) + +#define S_FW_DIAG_CMD_LEN16 0 +#define M_FW_DIAG_CMD_LEN16 0xff +#define V_FW_DIAG_CMD_LEN16(x) ((x) << S_FW_DIAG_CMD_LEN16) +#define G_FW_DIAG_CMD_LEN16(x) \ + (((x) >> S_FW_DIAG_CMD_LEN16) & M_FW_DIAG_CMD_LEN16) + struct fw_hma_cmd { __be32 op_pkd; __be32 retval_len16; @@ -9939,18 +9983,18 @@ enum fw_hdr_chip { enum { T4FW_VERSION_MAJOR = 1, - T4FW_VERSION_MINOR = 24, - T4FW_VERSION_MICRO = 12, + T4FW_VERSION_MINOR = 25, + T4FW_VERSION_MICRO = 0, T4FW_VERSION_BUILD = 0, T5FW_VERSION_MAJOR = 1, - T5FW_VERSION_MINOR = 24, - T5FW_VERSION_MICRO = 12, + T5FW_VERSION_MINOR = 25, + T5FW_VERSION_MICRO = 0, T5FW_VERSION_BUILD = 0, T6FW_VERSION_MAJOR = 1, - T6FW_VERSION_MINOR = 24, - T6FW_VERSION_MICRO = 12, + T6FW_VERSION_MINOR = 25, + T6FW_VERSION_MICRO = 0, T6FW_VERSION_BUILD = 0, }; Copied and modified: stable/12/sys/dev/cxgbe/firmware/t5fw-1.25.0.0.bin (from r365861, head/sys/dev/cxgbe/firmware/t5fw-1.25.0.0.bin) ============================================================================== Binary file (source and/or target). No diff available. Copied and modified: stable/12/sys/dev/cxgbe/firmware/t6fw-1.25.0.0.bin (from r365861, head/sys/dev/cxgbe/firmware/t6fw-1.25.0.0.bin) ============================================================================== Binary file (source and/or target). No diff available. Modified: stable/12/sys/dev/cxgbe/firmware/t6fw_cfg.txt ============================================================================== --- stable/12/sys/dev/cxgbe/firmware/t6fw_cfg.txt Mon Sep 21 03:16:10 2020 (r365936) +++ stable/12/sys/dev/cxgbe/firmware/t6fw_cfg.txt Mon Sep 21 08:16:42 2020 (r365937) @@ -41,8 +41,8 @@ # TP OFLD MTUs tp_mtus = 88, 256, 512, 576, 808, 1024, 1280, 1488, 1500, 2002, 2048, 4096, 4352, 8192, 9000, 9600 - # enable TP_OUT_CONFIG.IPIDSPLITMODE and CRXPKTENC - reg[0x7d04] = 0x00010008/0x00010008 + # enable TP_OUT_CONFIG.IPIDSplitMode, CRxPktEnc, and CCplAckMode. + reg[0x7d04] = 0x00012008/0x00012008 # TP_GLOBAL_CONFIG reg[0x7d08] = 0x00000800/0x00000800 # set IssFromCplEnable @@ -272,7 +272,7 @@ [fini] version = 0x1 - checksum = 0x4528a6ac + checksum = 0x13640470 # # $FreeBSD$ # Modified: stable/12/sys/dev/cxgbe/firmware/t6fw_cfg_uwire.txt ============================================================================== --- stable/12/sys/dev/cxgbe/firmware/t6fw_cfg_uwire.txt Mon Sep 21 03:16:10 2020 (r365936) +++ stable/12/sys/dev/cxgbe/firmware/t6fw_cfg_uwire.txt Mon Sep 21 08:16:42 2020 (r365937) @@ -110,7 +110,8 @@ sge_dbq_timer = 3, 2, 1, 5, 7, 9, 12, 16 # enable TP_OUT_CONFIG.IPIDSPLITMODE - reg[0x7d04] = 0x00010000/0x00010000 + # Set TP_OUT_CONFIG.CCplAckMode to get srtt/rttvar + reg[0x7d04] = 0x00012000/0x00012000 reg[0x7dc0] = 0x0e2f8849 # TP_SHIFT_CNT @@ -200,6 +201,9 @@ hma_size = 92 # Size (in MBs) of host memory expected hma_regions = stag,pbl,rq # What all regions to place in host memory + #enable bottleneck-bw congestion control mode + #ofld_flags = 4 + # Some "definitions" to make the rest of this a bit more readable. We support # 4 ports, 3 functions (NIC, FCoE and iSCSI), scaling up to 8 "CPU Queue Sets" # per function per port ... @@ -426,7 +430,7 @@ nserver = 496 # number of server region entries nhash = 12288 # number of hash region entries nhpfilter = 64 # number of high priority filter region entries - protocol = nic_vm, ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, iscsi_t10dif, tlskeys, crypto_lookaside, ipsec_inline, nic_hashfilter + protocol = nic_vm, ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, iscsi_t10dif, tlskeys, crypto_lookaside, ipsec_inline, nic_hashfilter, nic_ktls_ofld tp_l2t = 3072 tp_ddp = 2 tp_ddp_iscsi = 2 @@ -588,7 +592,7 @@ [fini] version = 0x1425001d - checksum = 0x14a022cd + checksum = 0xa1403d73 # Total resources used by above allocations: # Virtual Interfaces: 104 @@ -599,4 +603,4 @@ # Virtual Functions: 64 # # $FreeBSD$ -# \ No newline at end of file +# Modified: stable/12/sys/modules/cxgbe/t4_firmware/Makefile ============================================================================== --- stable/12/sys/modules/cxgbe/t4_firmware/Makefile Mon Sep 21 03:16:10 2020 (r365936) +++ stable/12/sys/modules/cxgbe/t4_firmware/Makefile Mon Sep 21 08:16:42 2020 (r365937) @@ -17,7 +17,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T4FW_VER= 1.24.12.0 +T4FW_VER= 1.25.0.0 FIRMWS+= t4fw-${T4FW_VER}.bin:t4fw:${T4FW_VER} .include Modified: stable/12/sys/modules/cxgbe/t5_firmware/Makefile ============================================================================== --- stable/12/sys/modules/cxgbe/t5_firmware/Makefile Mon Sep 21 03:16:10 2020 (r365936) +++ stable/12/sys/modules/cxgbe/t5_firmware/Makefile Mon Sep 21 08:16:42 2020 (r365937) @@ -17,7 +17,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T5FW_VER= 1.24.12.0 +T5FW_VER= 1.25.0.0 FIRMWS+= t5fw-${T5FW_VER}.bin:t5fw:${T5FW_VER} .include Modified: stable/12/sys/modules/cxgbe/t6_firmware/Makefile ============================================================================== --- stable/12/sys/modules/cxgbe/t6_firmware/Makefile Mon Sep 21 03:16:10 2020 (r365936) +++ stable/12/sys/modules/cxgbe/t6_firmware/Makefile Mon Sep 21 08:16:42 2020 (r365937) @@ -17,7 +17,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T6FW_VER= 1.24.12.0 +T6FW_VER= 1.25.0.0 FIRMWS+= t6fw-${T6FW_VER}.bin:t6fw:${T6FW_VER} .include From owner-svn-src-stable-12@freebsd.org Mon Sep 21 09:50:58 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B26D63EBFFB; Mon, 21 Sep 2020 09:50:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bw07Q4GvXz42Jr; Mon, 21 Sep 2020 09:50:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77053C3D5; Mon, 21 Sep 2020 09:50:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08L9ow3s083575; Mon, 21 Sep 2020 09:50:58 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08L9owpN083573; Mon, 21 Sep 2020 09:50:58 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202009210950.08L9owpN083573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 21 Sep 2020 09:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365942 - in stable/12/sys: arm/allwinner/clkng dev/extres/clk X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/12/sys: arm/allwinner/clkng dev/extres/clk X-SVN-Commit-Revision: 365942 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2020 09:50:58 -0000 Author: avg Date: Mon Sep 21 09:50:57 2020 New Revision: 365942 URL: https://svnweb.freebsd.org/changeset/base/365942 Log: MFC r363887 (by manu), r365395: allwinner: clk: Fix nm clock calculation r363887: Use the right factor when finding the best frequency and compare the absolute value of the result. Submitted by: kibab r365395: aw_clk_nm: fix incorrect use of abs() abs() takes a (signed) int as input. Instead, it was used with unsigned 64-bit integers. So, add and use a new helper function to calculate a difference between two uint64_t-s. Modified: stable/12/sys/arm/allwinner/clkng/aw_clk_nm.c stable/12/sys/dev/extres/clk/clk.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/allwinner/clkng/aw_clk_nm.c ============================================================================== --- stable/12/sys/arm/allwinner/clkng/aw_clk_nm.c Mon Sep 21 09:03:42 2020 (r365941) +++ stable/12/sys/arm/allwinner/clkng/aw_clk_nm.c Mon Sep 21 09:50:57 2020 (r365942) @@ -152,9 +152,10 @@ aw_clk_nm_find_best(struct aw_clk_nm_sc *sc, uint64_t min_n = aw_clk_factor_get_min(&sc->n); for (m = min_m; m <= max_m; ) { - for (n = min_m; n <= max_n; ) { + for (n = min_n; n <= max_n; ) { cur = fparent / n / m; - if (abs(*fout - cur) < abs(*fout - best)) { + if (clk_freq_diff(*fout, cur) < + clk_freq_diff(*fout, best)) { best = cur; *factor_n = n; *factor_m = m; @@ -197,7 +198,8 @@ aw_clk_nm_set_freq(struct clknode *clk, uint64_t fpare clknode_get_freq(p_clk, &fparent); cur = aw_clk_nm_find_best(sc, fparent, fout, &n, &m); - if ((*fout - cur) < (*fout - best)) { + if (clk_freq_diff(*fout, cur) < + clk_freq_diff(*fout, best)) { best = cur; best_parent = p_idx; best_n = n; Modified: stable/12/sys/dev/extres/clk/clk.h ============================================================================== --- stable/12/sys/dev/extres/clk/clk.h Mon Sep 21 09:03:42 2020 (r365941) +++ stable/12/sys/dev/extres/clk/clk.h Mon Sep 21 09:50:57 2020 (r365942) @@ -135,6 +135,12 @@ int clk_get_parent(clk_t clk, clk_t *parent); int clk_set_parent_by_clk(clk_t clk, clk_t parent); const char *clk_get_name(clk_t clk); +static inline uint64_t +clk_freq_diff(uint64_t x, uint64_t y) +{ + return (x >= y ? x - y : y - x); +} + #ifdef FDT int clk_set_assigned(device_t dev, phandle_t node); int clk_get_by_ofw_index(device_t dev, phandle_t node, int idx, clk_t *clk); From owner-svn-src-stable-12@freebsd.org Mon Sep 21 18:18:54 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92E793F869F; Mon, 21 Sep 2020 18:18:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwCPV3MX3z4cVC; Mon, 21 Sep 2020 18:18:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5821312179; Mon, 21 Sep 2020 18:18:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LIIsuS099519; Mon, 21 Sep 2020 18:18:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LIIstk099518; Mon, 21 Sep 2020 18:18:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202009211818.08LIIstk099518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 21 Sep 2020 18:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365959 - stable/12/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 365959 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2020 18:18:54 -0000 Author: hselasky Date: Mon Sep 21 18:18:53 2020 New Revision: 365959 URL: https://svnweb.freebsd.org/changeset/base/365959 Log: MFC r365719: Poll statistics more frequently in mlx5en(4). This makes traffic steering algorithms more accurate. Submitted by: gallatin @ Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Sep 21 18:17:01 2020 (r365958) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Sep 21 18:18:53 2020 (r365959) @@ -1066,7 +1066,7 @@ mlx5e_update_stats(void *arg) queue_work(priv->wq, &priv->update_stats_work); - callout_reset(&priv->watchdog, hz, &mlx5e_update_stats, priv); + callout_reset(&priv->watchdog, hz / 4, &mlx5e_update_stats, priv); } static void From owner-svn-src-stable-12@freebsd.org Mon Sep 21 18:22:00 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 890453F8982; Mon, 21 Sep 2020 18:22:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwCT42TTfz4cdD; Mon, 21 Sep 2020 18:22:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 385A012358; Mon, 21 Sep 2020 18:22:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LIM0bK004695; Mon, 21 Sep 2020 18:22:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LIM0lC004694; Mon, 21 Sep 2020 18:22:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202009211822.08LIM0lC004694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 21 Sep 2020 18:22:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365962 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 365962 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2020 18:22:00 -0000 Author: hselasky Date: Mon Sep 21 18:21:59 2020 New Revision: 365962 URL: https://svnweb.freebsd.org/changeset/base/365962 Log: MFC r365237: Micro optimise _callout_stop_safe() by removing dead code. The CS_DRAIN flag cannot be set at the same time like the async-drain function pointer is set. These are orthogonal features. Assert this at the beginning of the function. Before: if (flags & CS_DRAIN) { /* FALLTHROUGH */ } else if (xxx) { return yyy; } if (drain) { zzz = drain; } After: if (flags & CS_DRAIN) { /* FALLTHROUGH */ } else if (xxx) { return yyy; } else { if (drain) { zzz = drain; } } Reviewed by: markj@ Tested by: callout_test Differential Revision: https://reviews.freebsd.org/D26285 Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: stable/12/sys/kern/kern_timeout.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_timeout.c ============================================================================== --- stable/12/sys/kern/kern_timeout.c Mon Sep 21 18:19:48 2020 (r365961) +++ stable/12/sys/kern/kern_timeout.c Mon Sep 21 18:21:59 2020 (r365962) @@ -1188,6 +1188,9 @@ _callout_stop_safe(struct callout *c, int flags, callo WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c->c_lock, "calling %s", __func__); + KASSERT((flags & CS_DRAIN) == 0 || drain == NULL, + ("Cannot set drain callback and CS_DRAIN flag at the same time")); + /* * Some old subsystems don't hold Giant while running a callout_stop(), * so just discard this check for the moment. @@ -1383,11 +1386,12 @@ again: } CC_UNLOCK(cc); return ((flags & CS_EXECUTING) != 0); - } - CTR3(KTR_CALLOUT, "failed to stop %p func %p arg %p", - c, c->c_func, c->c_arg); - if (drain) { - cc_exec_drain(cc, direct) = drain; + } else { + CTR3(KTR_CALLOUT, "failed to stop %p func %p arg %p", + c, c->c_func, c->c_arg); + if (drain) { + cc_exec_drain(cc, direct) = drain; + } } KASSERT(!sq_locked, ("sleepqueue chain still locked")); cancelled = ((flags & CS_EXECUTING) != 0); From owner-svn-src-stable-12@freebsd.org Mon Sep 21 18:24:29 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03A4C3F897B; Mon, 21 Sep 2020 18:24:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwCWw6Ktmz4csb; Mon, 21 Sep 2020 18:24:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC8891235D; Mon, 21 Sep 2020 18:24:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LIOSxH005607; Mon, 21 Sep 2020 18:24:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LIOSfx005606; Mon, 21 Sep 2020 18:24:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202009211824.08LIOSfx005606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 21 Sep 2020 18:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365963 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 365963 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2020 18:24:29 -0000 Author: hselasky Date: Mon Sep 21 18:24:28 2020 New Revision: 365963 URL: https://svnweb.freebsd.org/changeset/base/365963 Log: MFC r365238: Assert that cc_exec_drain(cc, direct) is NULL before assigning a new value. Suggested by: markj@ Tested by: callout_test Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: stable/12/sys/kern/kern_timeout.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_timeout.c ============================================================================== --- stable/12/sys/kern/kern_timeout.c Mon Sep 21 18:21:59 2020 (r365962) +++ stable/12/sys/kern/kern_timeout.c Mon Sep 21 18:24:28 2020 (r365963) @@ -1382,6 +1382,9 @@ again: CTR3(KTR_CALLOUT, "postponing stop %p func %p arg %p", c, c->c_func, c->c_arg); if (drain) { + KASSERT(cc_exec_drain(cc, direct) == NULL, + ("callout drain function already set to %p", + cc_exec_drain(cc, direct))); cc_exec_drain(cc, direct) = drain; } CC_UNLOCK(cc); @@ -1390,6 +1393,9 @@ again: CTR3(KTR_CALLOUT, "failed to stop %p func %p arg %p", c, c->c_func, c->c_arg); if (drain) { + KASSERT(cc_exec_drain(cc, direct) == NULL, + ("callout drain function already set to %p", + cc_exec_drain(cc, direct))); cc_exec_drain(cc, direct) = drain; } } From owner-svn-src-stable-12@freebsd.org Mon Sep 21 18:27:44 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D76693F8A94; Mon, 21 Sep 2020 18:27:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwCbh5Lskz4dNR; Mon, 21 Sep 2020 18:27:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C4D8127AE; Mon, 21 Sep 2020 18:27:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LIRiGD005813; Mon, 21 Sep 2020 18:27:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LIRi1f005812; Mon, 21 Sep 2020 18:27:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202009211827.08LIRi1f005812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 21 Sep 2020 18:27:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365964 - stable/12/sys/dev/usb X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/usb X-SVN-Commit-Revision: 365964 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2020 18:27:44 -0000 Author: hselasky Date: Mon Sep 21 18:27:44 2020 New Revision: 365964 URL: https://svnweb.freebsd.org/changeset/base/365964 Log: MFC r364932: Allow slow USB devices to be given more time to return their USB descriptors, like Logitech HD Pro Webcam C920. PR: 248926 Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/usb/usb_request.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/usb_request.c ============================================================================== --- stable/12/sys/dev/usb/usb_request.c Mon Sep 21 18:24:28 2020 (r365963) +++ stable/12/sys/dev/usb/usb_request.c Mon Sep 21 18:27:44 2020 (r365964) @@ -721,7 +721,8 @@ done: case USB_ERR_CANCELLED: break; default: - DPRINTF("I/O error - waiting a bit for TT cleanup\n"); + DPRINTF("error=%s - waiting a bit for TT cleanup\n", + usbd_errstr(err)); usb_pause_mtx(mtx, hz / 16); break; } @@ -1010,7 +1011,7 @@ usbd_req_get_desc(struct usb_device *udev, USETW(req.wLength, min_len); err = usbd_do_request_flags(udev, mtx, &req, - desc, 0, NULL, 500 /* ms */); + desc, 0, NULL, 1000 /* ms */); if (err != 0 && err != USB_ERR_TIMEOUT && min_len != max_len) { @@ -1021,7 +1022,7 @@ usbd_req_get_desc(struct usb_device *udev, USETW(req.wLength, max_len); err = usbd_do_request_flags(udev, mtx, &req, - desc, USB_SHORT_XFER_OK, NULL, 500 /* ms */); + desc, USB_SHORT_XFER_OK, NULL, 1000 /* ms */); if (err == 0) { /* verify length */ From owner-svn-src-stable-12@freebsd.org Mon Sep 21 19:25:42 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2BCA93FA010; Mon, 21 Sep 2020 19:25:42 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwDtZ016Fz3T7H; Mon, 21 Sep 2020 19:25:42 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6ED5135A3; Mon, 21 Sep 2020 19:25:41 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LJPfOg043609; Mon, 21 Sep 2020 19:25:41 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LJPfq2043608; Mon, 21 Sep 2020 19:25:41 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202009211925.08LJPfq2043608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 21 Sep 2020 19:25:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365971 - stable/12/sbin/newfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: stable/12/sbin/newfs X-SVN-Commit-Revision: 365971 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2020 19:25:42 -0000 Author: mckusick Date: Mon Sep 21 19:25:41 2020 New Revision: 365971 URL: https://svnweb.freebsd.org/changeset/base/365971 Log: MFC of 365700 Switch to more appropriate libufs interfaces in newfs. Sponsored by: Netflix Modified: stable/12/sbin/newfs/mkfs.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/newfs/mkfs.c ============================================================================== --- stable/12/sbin/newfs/mkfs.c Mon Sep 21 19:03:17 2020 (r365970) +++ stable/12/sbin/newfs/mkfs.c Mon Sep 21 19:25:41 2020 (r365971) @@ -544,8 +544,8 @@ restart: } } } - if (!Nflag && sbput(disk.d_fd, &disk.d_fs, 0) != 0) - err(1, "sbput: %s", disk.d_error); + if (!Nflag && sbwrite(&disk, 0) != 0) + err(1, "sbwrite: %s", disk.d_error); if (Xflag == 1) { printf("** Exiting on Xflag 1\n"); exit(0); @@ -611,8 +611,8 @@ restart: * Reference the summary information so it will also be written. */ sblock.fs_csp = fscs; - if (sbput(disk.d_fd, &disk.d_fs, 0) != 0) - err(1, "sbput: %s", disk.d_error); + if (sbwrite(&disk, 0) != 0) + err(1, "sbwrite: %s", disk.d_error); /* * For UFS1 filesystems with a blocksize of 64K, the first * alternate superblock resides at the location used for @@ -803,11 +803,11 @@ initcg(int cylno, time_t utime) savedactualloc = sblock.fs_sblockactualloc; sblock.fs_sblockactualloc = dbtob(fsbtodb(&sblock, cgsblock(&sblock, cylno))); - if (sbput(disk.d_fd, &disk.d_fs, 0) != 0) - err(1, "sbput: %s", disk.d_error); + if (sbwrite(&disk, 0) != 0) + err(1, "sbwrite: %s", disk.d_error); sblock.fs_sblockactualloc = savedactualloc; - if (cgput(&disk, &acg) != 0) - err(1, "initcg: cgput: %s", disk.d_error); + if (cgwrite(&disk) != 0) + err(1, "initcg: cgwrite: %s", disk.d_error); start = 0; dp1 = (struct ufs1_dinode *)(&iobuf[start]); dp2 = (struct ufs2_dinode *)(&iobuf[start]); @@ -1016,8 +1016,8 @@ goth: for (i = frag; i < sblock.fs_frag; i++) setbit(cg_blksfree(&acg), d + i); } - if (cgput(&disk, &acg) != 0) - err(1, "alloc: cgput: %s", disk.d_error); + if (cgwrite(&disk) != 0) + err(1, "alloc: cgwrite: %s", disk.d_error); return ((ufs2_daddr_t)d); } @@ -1037,8 +1037,8 @@ iput(union dinode *ip, ino_t ino) } acg.cg_cs.cs_nifree--; setbit(cg_inosused(&acg), ino); - if (cgput(&disk, &acg) != 0) - err(1, "iput: cgput: %s", disk.d_error); + if (cgwrite(&disk) != 0) + err(1, "iput: cgwrite: %s", disk.d_error); sblock.fs_cstotal.cs_nifree--; fscs[0].cs_nifree--; if (ino >= (unsigned long)sblock.fs_ipg * sblock.fs_ncg) { From owner-svn-src-stable-12@freebsd.org Mon Sep 21 22:22:06 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B40903FEDA6; Mon, 21 Sep 2020 22:22:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwJp641zKz4221; Mon, 21 Sep 2020 22:22:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D3AF155AA; Mon, 21 Sep 2020 22:22:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LMM6Rf057876; Mon, 21 Sep 2020 22:22:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LMM6Fp057875; Mon, 21 Sep 2020 22:22:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202009212222.08LMM6Fp057875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 21 Sep 2020 22:22:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365979 - stable/12/sys/cddl/compat/opensolaris/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/cddl/compat/opensolaris/kern X-SVN-Commit-Revision: 365979 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2020 22:22:07 -0000 Author: markj Date: Mon Sep 21 22:22:06 2020 New Revision: 365979 URL: https://svnweb.freebsd.org/changeset/base/365979 Log: Mark sysctls added in r365689 as MPSAFE. This is a direct commit to stable/12. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D26507 Modified: stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c Modified: stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c ============================================================================== --- stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c Mon Sep 21 22:21:59 2020 (r365978) +++ stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c Mon Sep 21 22:22:06 2020 (r365979) @@ -184,16 +184,16 @@ kstat_install(kstat_t *ksp) SYSCTL_ADD_PROC(&ksp->ks_sysctl_ctx, SYSCTL_CHILDREN(ksp->ks_sysctl_root), OID_AUTO, ksent->name, - CTLTYPE_STRING | CTLFLAG_RD, ksp, i, - kstat_sysctl_string, "A", ksent->desc); + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + ksp, i, kstat_sysctl_string, "A", ksent->desc); continue; } KASSERT(ksent->data_type == KSTAT_DATA_UINT64, ("data_type=%d", ksent->data_type)); SYSCTL_ADD_PROC(&ksp->ks_sysctl_ctx, SYSCTL_CHILDREN(ksp->ks_sysctl_root), OID_AUTO, ksent->name, - CTLTYPE_U64 | CTLFLAG_RD, ksp, i, - kstat_sysctl, "QU", ksent->desc); + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE, + ksp, i, kstat_sysctl, "QU", ksent->desc); } } From owner-svn-src-stable-12@freebsd.org Mon Sep 21 22:52:58 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 709DE42138C; Mon, 21 Sep 2020 22:52:58 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwKTk2Q0Hz451r; Mon, 21 Sep 2020 22:52:58 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3618815BA2; Mon, 21 Sep 2020 22:52:58 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LMqwuT078011; Mon, 21 Sep 2020 22:52:58 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LMqvbv078009; Mon, 21 Sep 2020 22:52:57 GMT (envelope-from erj@FreeBSD.org) Message-Id: <202009212252.08LMqvbv078009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Mon, 21 Sep 2020 22:52:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365983 - stable/12/sys/dev/e1000 X-SVN-Group: stable-12 X-SVN-Commit-Author: erj X-SVN-Commit-Paths: stable/12/sys/dev/e1000 X-SVN-Commit-Revision: 365983 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2020 22:52:58 -0000 Author: erj Date: Mon Sep 21 22:52:57 2020 New Revision: 365983 URL: https://svnweb.freebsd.org/changeset/base/365983 Log: MFC r365774 and r365776 These two commits fix issues in em(4)/igb(4): - Fix define and includes with RSS option enabled - Properly retain promisc flag in init PR: 249191, 248869 MFC after: 1 day Modified: stable/12/sys/dev/e1000/if_em.c stable/12/sys/dev/e1000/if_em.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/e1000/if_em.c ============================================================================== --- stable/12/sys/dev/e1000/if_em.c Mon Sep 21 22:24:46 2020 (r365982) +++ stable/12/sys/dev/e1000/if_em.c Mon Sep 21 22:52:57 2020 (r365983) @@ -1338,7 +1338,7 @@ em_if_init(if_ctx_t ctx) } /* Don't lose promiscuous settings */ - em_if_set_promisc(ctx, IFF_PROMISC); + em_if_set_promisc(ctx, if_getflags(ifp)); e1000_clear_hw_cntrs_base_generic(&adapter->hw); /* MSI-X configuration for 82574 */ Modified: stable/12/sys/dev/e1000/if_em.h ============================================================================== --- stable/12/sys/dev/e1000/if_em.h Mon Sep 21 22:24:46 2020 (r365982) +++ stable/12/sys/dev/e1000/if_em.h Mon Sep 21 22:52:57 2020 (r365983) @@ -30,6 +30,7 @@ #include "opt_ddb.h" #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_rss.h" #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" @@ -69,6 +70,10 @@ #include #include #include +#ifdef RSS +#include +#include +#endif #include #include From owner-svn-src-stable-12@freebsd.org Tue Sep 22 01:58:20 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A265A425D06; Tue, 22 Sep 2020 01:58:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwPbc4BjDz4JKP; Tue, 22 Sep 2020 01:58:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A3A717C1F; Tue, 22 Sep 2020 01:58:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08M1wKWC090732; Tue, 22 Sep 2020 01:58:20 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08M1wJ14090728; Tue, 22 Sep 2020 01:58:19 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202009220158.08M1wJ14090728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 22 Sep 2020 01:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365986 - in stable: 11/secure/caroot/blacklisted 11/secure/caroot/trusted 12/secure/caroot/blacklisted 12/secure/caroot/trusted X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/secure/caroot/blacklisted 11/secure/caroot/trusted 12/secure/caroot/blacklisted 12/secure/caroot/trusted X-SVN-Commit-Revision: 365986 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 01:58:20 -0000 Author: kevans Date: Tue Sep 22 01:58:18 2020 New Revision: 365986 URL: https://svnweb.freebsd.org/changeset/base/365986 Log: MFC r365896: caroot: update base store Count: - Two (2) removed - Three (3) added Added: stable/12/secure/caroot/blacklisted/EE_Certification_Centre_Root_CA.pem - copied unchanged from r365896, head/secure/caroot/blacklisted/EE_Certification_Centre_Root_CA.pem stable/12/secure/caroot/blacklisted/Taiwan_GRCA.pem - copied unchanged from r365896, head/secure/caroot/blacklisted/Taiwan_GRCA.pem stable/12/secure/caroot/trusted/Trustwave_Global_Certification_Authority.pem - copied unchanged from r365896, head/secure/caroot/trusted/Trustwave_Global_Certification_Authority.pem stable/12/secure/caroot/trusted/Trustwave_Global_ECC_P256_Certification_Authority.pem - copied unchanged from r365896, head/secure/caroot/trusted/Trustwave_Global_ECC_P256_Certification_Authority.pem stable/12/secure/caroot/trusted/Trustwave_Global_ECC_P384_Certification_Authority.pem - copied unchanged from r365896, head/secure/caroot/trusted/Trustwave_Global_ECC_P384_Certification_Authority.pem Deleted: stable/12/secure/caroot/trusted/EE_Certification_Centre_Root_CA.pem stable/12/secure/caroot/trusted/Taiwan_GRCA.pem Modified: Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Added: stable/11/secure/caroot/blacklisted/EE_Certification_Centre_Root_CA.pem - copied unchanged from r365896, head/secure/caroot/blacklisted/EE_Certification_Centre_Root_CA.pem stable/11/secure/caroot/blacklisted/Taiwan_GRCA.pem - copied unchanged from r365896, head/secure/caroot/blacklisted/Taiwan_GRCA.pem stable/11/secure/caroot/trusted/Trustwave_Global_Certification_Authority.pem - copied unchanged from r365896, head/secure/caroot/trusted/Trustwave_Global_Certification_Authority.pem stable/11/secure/caroot/trusted/Trustwave_Global_ECC_P256_Certification_Authority.pem - copied unchanged from r365896, head/secure/caroot/trusted/Trustwave_Global_ECC_P256_Certification_Authority.pem stable/11/secure/caroot/trusted/Trustwave_Global_ECC_P384_Certification_Authority.pem - copied unchanged from r365896, head/secure/caroot/trusted/Trustwave_Global_ECC_P384_Certification_Authority.pem Deleted: stable/11/secure/caroot/trusted/EE_Certification_Centre_Root_CA.pem stable/11/secure/caroot/trusted/Taiwan_GRCA.pem Modified: Directory Properties: stable/11/ (props changed) Copied: stable/12/secure/caroot/blacklisted/EE_Certification_Centre_Root_CA.pem (from r365896, head/secure/caroot/blacklisted/EE_Certification_Centre_Root_CA.pem) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/secure/caroot/blacklisted/EE_Certification_Centre_Root_CA.pem Tue Sep 22 01:58:18 2020 (r365986, copy of r365896, head/secure/caroot/blacklisted/EE_Certification_Centre_Root_CA.pem) @@ -0,0 +1,96 @@ +## +## EE Certification Centre Root CA +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 54:80:f9:a0:73:ed:3f:00:4c:ca:89:d8:e3:71:e6:4a + Signature Algorithm: sha1WithRSAEncryption + Issuer: C = EE, O = AS Sertifitseerimiskeskus, CN = EE Certification Centre Root CA, emailAddress = pki@sk.ee + Validity + Not Before: Oct 30 10:10:30 2010 GMT + Not After : Dec 17 23:59:59 2030 GMT + Subject: C = EE, O = AS Sertifitseerimiskeskus, CN = EE Certification Centre Root CA, emailAddress = pki@sk.ee + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (2048 bit) + Modulus: + 00:c8:20:c0:ec:e0:c5:4b:ab:07:78:95:f3:44:ee: + fb:0b:0c:ff:74:8e:61:bb:b1:62:ea:23:d8:ab:a1: + 65:32:7a:eb:8e:17:4f:96:d8:0a:7b:91:a2:63:6c: + c7:8c:4c:2e:79:bf:a9:05:fc:69:5c:95:8d:62:f9: + b9:70:ed:c3:51:7d:d0:93:e6:6c:eb:30:4b:e1:bc: + 7d:bf:52:9b:ce:6e:7b:65:f2:38:b1:c0:a2:32:ef: + 62:b2:68:e0:61:53:c1:36:95:ff:ec:94:ba:36:ae: + 9c:1c:a7:32:0f:e5:7c:b4:c6:6f:74:fd:7b:18:e8: + ac:57:ed:06:20:4b:32:30:58:5b:fd:cd:a8:e6:a1: + fc:70:bc:8e:92:73:db:97:a7:7c:21:ae:3d:c1:f5: + 48:87:6c:27:bd:9f:25:74:81:55:b0:f7:75:f6:3d: + a4:64:6b:d6:4f:e7:ce:40:ad:0f:dd:32:d3:bc:8a: + 12:53:98:c9:89:fb:10:1d:4d:7e:cd:7e:1f:56:0d: + 21:70:85:f6:20:83:1f:f6:ba:1f:04:8f:ea:77:88: + 35:c4:ff:ea:4e:a1:8b:4d:3f:63:1b:44:c3:44:d4: + 25:76:ca:b7:8d:d7:1e:4a:66:64:cd:5c:c5:9c:83: + e1:c2:08:88:9a:ec:4e:a3:f1:3e:1c:2c:d9:6c:1d: + a1:4b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 12:F2:5A:3E:EA:56:1C:BF:CD:06:AC:F1:F1:25:C9:A9:4B:D4:14:99 + X509v3 Extended Key Usage: + TLS Web Client Authentication, TLS Web Server Authentication, Code Signing, E-mail Protection, Time Stamping, OCSP Signing + Signature Algorithm: sha1WithRSAEncryption + 7b:f6:e4:c0:0d:aa:19:47:b7:4d:57:a3:fe:ad:bb:b1:6a:d5: + 0f:9e:db:e4:63:c5:8e:a1:50:56:93:96:b8:38:c0:24:22:66: + bc:53:14:61:95:bf:d0:c7:2a:96:39:3f:7d:28:b3:10:40:21: + 6a:c4:af:b0:52:77:18:e1:96:d8:56:5d:e3:dd:36:5e:1d:a7: + 50:54:a0:c5:2a:e4:aa:8c:94:8a:4f:9d:35:ff:76:a4:06:13: + 91:a2:a2:7d:00:44:3f:55:d3:82:3c:1a:d5:5b:bc:56:4c:22: + 2e:46:43:8a:24:40:2d:f3:12:b8:3b:70:1a:a4:96:b9:1a:af: + 87:41:1a:6a:18:0d:06:4f:c7:3e:6e:b9:29:4d:0d:49:89:11: + 87:32:5b:e6:4b:04:c8:e4:5c:e6:74:73:94:5d:16:98:13:95: + fe:fb:db:b1:44:e5:3a:70:ac:37:6b:e6:b3:33:72:28:c9:b3: + 57:a0:f6:02:16:88:06:0b:b6:a6:4b:20:28:d4:de:3d:8b:ad: + 37:05:53:74:fe:6e:cc:bc:43:17:71:5e:f9:c5:cc:1a:a9:61: + ee:f7:76:0c:f3:72:f4:72:ad:cf:72:02:36:07:47:cf:ef:19: + 50:89:60:cc:e9:24:95:0f:c2:cb:1d:f2:6f:76:90:c7:cc:75: + c1:96:c5:9d +SHA1 Fingerprint=C9:A8:B9:E7:55:80:5E:58:E3:53:77:A7:25:EB:AF:C3:7B:27:CC:D7 +-----BEGIN CERTIFICATE----- +MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1 +MQswCQYDVQQGEwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1 +czEoMCYGA1UEAwwfRUUgQ2VydGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYG +CSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIwMTAxMDMwMTAxMDMwWhgPMjAzMDEy +MTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlBUyBTZXJ0aWZpdHNl +ZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRyZSBS +b290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUy +euuOF0+W2Ap7kaJjbMeMTC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvO +bntl8jixwKIy72KyaOBhU8E2lf/slLo2rpwcpzIP5Xy0xm90/XsY6KxX7QYgSzIw +WFv9zajmofxwvI6Sc9uXp3whrj3B9UiHbCe9nyV0gVWw93X2PaRka9ZP585ArQ/d +MtO8ihJTmMmJ+xAdTX7Nfh9WDSFwhfYggx/2uh8Ej+p3iDXE/+pOoYtNP2MbRMNE +1CV2yreN1x5KZmTNXMWcg+HCCIia7E6j8T4cLNlsHaFLAgMBAAGjgYowgYcwDwYD +VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLyWj7qVhy/ +zQas8fElyalL1BSZMEUGA1UdJQQ+MDwGCCsGAQUFBwMCBggrBgEFBQcDAQYIKwYB +BQUHAwMGCCsGAQUFBwMEBggrBgEFBQcDCAYIKwYBBQUHAwkwDQYJKoZIhvcNAQEF +BQADggEBAHv25MANqhlHt01Xo/6tu7Fq1Q+e2+RjxY6hUFaTlrg4wCQiZrxTFGGV +v9DHKpY5P30osxBAIWrEr7BSdxjhlthWXePdNl4dp1BUoMUq5KqMlIpPnTX/dqQG +E5Gion0ARD9V04I8GtVbvFZMIi5GQ4okQC3zErg7cBqklrkar4dBGmoYDQZPxz5u +uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIW +iAYLtqZLICjU3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/v +GVCJYMzpJJUPwssd8m92kMfMdcGWxZ0= +-----END CERTIFICATE----- Copied: stable/12/secure/caroot/blacklisted/Taiwan_GRCA.pem (from r365896, head/secure/caroot/blacklisted/Taiwan_GRCA.pem) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/secure/caroot/blacklisted/Taiwan_GRCA.pem Tue Sep 22 01:58:18 2020 (r365986, copy of r365896, head/secure/caroot/blacklisted/Taiwan_GRCA.pem) @@ -0,0 +1,133 @@ +## +## Taiwan GRCA +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 1f:9d:59:5a:d7:2f:c2:06:44:a5:80:08:69:e3:5e:f6 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C = TW, O = Government Root Certification Authority + Validity + Not Before: Dec 5 13:23:33 2002 GMT + Not After : Dec 5 13:23:33 2032 GMT + Subject: C = TW, O = Government Root Certification Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:9a:25:b8:ec:cc:a2:75:a8:7b:f7:ce:5b:59:8a: + c9:d1:86:12:08:54:ec:9c:f2:e7:46:f6:88:f3:7c: + e9:a5:df:4c:47:36:a4:1b:01:1c:7f:1e:57:8a:8d: + c3:c5:d1:21:e3:da:24:3f:48:2b:fb:9f:2e:a1:94: + e7:2c:1c:93:d1:bf:1b:01:87:53:99:ce:a7:f5:0a: + 21:76:77:ff:a9:b7:c6:73:94:4f:46:f7:10:49:37: + fa:a8:59:49:5d:6a:81:07:56:f2:8a:f9:06:d0:f7: + 70:22:4d:b4:b7:41:b9:32:b8:b1:f0:b1:c3:9c:3f: + 70:fd:53:dd:81:aa:d8:63:78:f6:d8:53:6e:a1:ac: + 6a:84:24:72:54:86:c6:d2:b2:ca:1c:0e:79:81:d6: + b5:70:62:08:01:2e:4e:4f:0e:d5:11:af:a9:af:e5: + 9a:bf:dc:cc:87:6d:26:e4:c9:57:a2:fb:96:f9:cc: + e1:3f:53:8c:6c:4c:7e:9b:53:08:0b:6c:17:fb:67: + c8:c2:ad:b1:cd:80:b4:97:dc:76:01:16:15:e9:6a: + d7:a4:e1:78:47:ce:86:d5:fb:31:f3:fa:31:be:34: + aa:28:fb:70:4c:1d:49:c7:af:2c:9d:6d:66:a6:b6: + 8d:64:7e:b5:20:6a:9d:3b:81:b6:8f:40:00:67:4b: + 89:86:b8:cc:65:fe:15:53:e9:04:c1:d6:5f:1d:44: + d7:0a:2f:27:9a:46:7d:a1:0d:75:ad:54:86:15:dc: + 49:3b:f1:96:ce:0f:9b:a0:ec:a3:7a:5d:be:d5:2a: + 75:42:e5:7b:de:a5:b6:aa:af:28:ac:ac:90:ac:38: + b7:d5:68:35:26:7a:dc:f7:3b:f3:fd:45:9b:d1:bb: + 43:78:6e:6f:f1:42:54:6a:98:f0:0d:ad:97:e9:52: + 5e:e9:d5:6a:72:de:6a:f7:1b:60:14:f4:a5:e4:b6: + 71:67:aa:1f:ea:e2:4d:c1:42:40:fe:67:46:17:38: + 2f:47:3f:71:9c:ae:e5:21:ca:61:2d:6d:07:a8:84: + 7c:2d:ee:51:25:f1:63:90:9e:fd:e1:57:88:6b:ef: + 8a:23:6d:b1:e6:bd:3f:ad:d1:3d:96:0b:85:8d:cd: + 6b:27:bb:b7:05:9b:ec:bb:91:a9:0a:07:12:02:97: + 4e:20:90:f0:ff:0d:1e:e2:41:3b:d3:40:3a:e7:8d: + 5d:da:66:e4:02:b0:07:52:98:5c:0e:8e:33:9c:c2: + a6:95:fb:55:19:6e:4c:8e:ae:4b:0f:bd:c1:38:4d: + 5e:8f:84:1d:66:cd:c5:60:96:b4:52:5a:05:89:8e: + 95:7a:98:c1:91:3c:95:23:b2:0e:f4:79:b4:c9:7c: + c1:4a:21 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + CC:CC:EF:CC:29:60:A4:3B:B1:92:B6:3C:FA:32:62:8F:AC:25:15:3B + X509v3 Basic Constraints: + CA:TRUE + setCext-hashedRoot: + 0/0-...0...+......0...g*........"...(6....2.1:.Qe + Signature Algorithm: sha1WithRSAEncryption + 40:80:4a:fa:26:c9:ce:5e:30:dd:4f:86:74:76:58:f5:ae:b3: + 83:33:78:a4:7a:74:17:19:4e:e9:52:b5:b9:e0:0a:74:62:aa: + 68:ca:78:a0:4c:9a:8e:2c:23:2e:d5:6a:12:24:bf:d4:68:d3: + 8a:d0:d8:9c:9f:b4:1f:0c:de:38:7e:57:38:fc:8d:e2:4f:5e: + 0c:9f:ab:3b:d2:ff:75:97:cb:a4:e3:67:08:ff:e5:c0:16:b5: + 48:01:7d:e9:f9:0a:ff:1b:e5:6a:69:bf:78:21:a8:c2:a7:23: + a9:86:ab:76:56:e8:0e:0c:f6:13:dd:2a:66:8a:64:49:3d:1a: + 18:87:90:04:9f:42:52:b7:4f:cb:fe:47:41:76:35:ef:ff:00: + 76:36:45:32:9b:c6:46:85:5d:e2:24:b0:1e:e3:48:96:98:57: + 47:94:55:7a:0f:41:b1:44:24:f3:c1:fe:1a:6b:bf:88:fd:c1: + a6:da:93:60:5e:81:4a:99:20:9c:48:66:19:b5:00:79:54:0f: + b8:2c:2f:4b:bc:a9:5d:5b:60:7f:8c:87:a5:e0:52:63:2a:be: + d8:3b:85:40:15:fe:1e:b6:65:3f:c5:4b:da:7e:b5:7a:35:29: + a3:2e:7a:98:60:22:a3:f4:7d:27:4e:2d:ea:b4:74:3c:e9:0f: + a4:33:0f:10:11:bc:13:01:d6:e5:0e:d3:bf:b5:12:a2:e1:45: + 23:c0:cc:08:6e:61:b7:89:ab:83:e3:24:1e:e6:5d:07:e7:1f: + 20:3e:cf:67:c8:e7:ac:30:6d:27:4b:68:6e:4b:2a:5c:02:08: + 34:db:f8:76:e4:67:a3:26:9c:3f:a2:32:c2:4a:c5:81:18:31: + 10:56:aa:84:ef:2d:0a:ff:b8:1f:77:d2:bf:a5:58:a0:62:e4: + d7:4b:91:75:8d:89:80:98:7e:6d:cb:53:4e:5e:af:f6:b2:97: + 85:97:b9:da:55:06:b9:24:ee:d7:c6:38:1e:63:1b:12:3b:95: + e1:58:ac:f2:df:84:d5:5f:99:2f:0d:55:5b:e6:38:db:2e:3f: + 72:e9:48:85:cb:bb:29:13:8f:1e:38:55:b9:f3:b2:c4:30:99: + 23:4e:5d:f2:48:a1:12:0c:dc:12:90:09:90:54:91:03:3c:47: + e5:d5:c9:65:e0:b7:4b:7d:ec:47:d3:b3:0b:3e:ad:9e:d0:74: + 00:0e:eb:bd:51:ad:c0:de:2c:c0:c3:6a:fe:ef:dc:0b:a7:fa: + 46:df:60:db:9c:a6:59:50:75:23:69:73:93:b2:f9:fc:02:d3: + 47:e6:71:ce:10:02:ee:27:8c:84:ff:ac:45:0d:13:5c:83:32: + e0:25:a5:86:2c:7c:f4:12 +SHA1 Fingerprint=F4:8B:11:BF:DE:AB:BE:94:54:20:71:E6:41:DE:6B:BE:88:2B:40:B9 +-----BEGIN CERTIFICATE----- +MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/ +MQswCQYDVQQGEwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmlj +YXRpb24gQXV0aG9yaXR5MB4XDTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1ow +PzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dvdmVybm1lbnQgUm9vdCBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB +AJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qNw8XR +IePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1q +gQdW8or5BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKy +yhwOeYHWtXBiCAEuTk8O1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAts +F/tnyMKtsc2AtJfcdgEWFelq16TheEfOhtX7MfP6Mb40qij7cEwdScevLJ1tZqa2 +jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wovJ5pGfaENda1UhhXcSTvx +ls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/1Fm9G7Q3hub/FC +VGqY8A2tl+lSXunVanLeavcbYBT0peS2cWeqH+riTcFCQP5nRhc4L0c/cZyu5SHK +YS1tB6iEfC3uUSXxY5Ce/eFXiGvviiNtsea9P63RPZYLhY3Naye7twWb7LuRqQoH +EgKXTiCQ8P8NHuJBO9NAOueNXdpm5AKwB1KYXA6OM5zCppX7VRluTI6uSw+9wThN +Xo+EHWbNxWCWtFJaBYmOlXqYwZE8lSOyDvR5tMl8wUohAgMBAAGjajBoMB0GA1Ud +DgQWBBTMzO/MKWCkO7GStjz6MmKPrCUVOzAMBgNVHRMEBTADAQH/MDkGBGcqBwAE +MTAvMC0CAQAwCQYFKw4DAhoFADAHBgVnKgMAAAQUA5vwIhP/lSg209yewDL7MTqK +UWUwDQYJKoZIhvcNAQEFBQADggIBAECASvomyc5eMN1PhnR2WPWus4MzeKR6dBcZ +TulStbngCnRiqmjKeKBMmo4sIy7VahIkv9Ro04rQ2JyftB8M3jh+Vzj8jeJPXgyf +qzvS/3WXy6TjZwj/5cAWtUgBfen5Cv8b5Wppv3ghqMKnI6mGq3ZW6A4M9hPdKmaK +ZEk9GhiHkASfQlK3T8v+R0F2Ne//AHY2RTKbxkaFXeIksB7jSJaYV0eUVXoPQbFE +JPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlUD7gsL0u8qV1bYH+Mh6XgUmMqvtg7 +hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6QzDxARvBMB1uUO07+1 +EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+HbkZ6Mm +nD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WX +udpVBrkk7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44Vbnz +ssQwmSNOXfJIoRIM3BKQCZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDe +LMDDav7v3Aun+kbfYNucpllQdSNpc5Oy+fwC00fmcc4QAu4njIT/rEUNE1yDMuAl +pYYsfPQS +-----END CERTIFICATE----- Copied: stable/12/secure/caroot/trusted/Trustwave_Global_Certification_Authority.pem (from r365896, head/secure/caroot/trusted/Trustwave_Global_Certification_Authority.pem) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/secure/caroot/trusted/Trustwave_Global_Certification_Authority.pem Tue Sep 22 01:58:18 2020 (r365986, copy of r365896, head/secure/caroot/trusted/Trustwave_Global_Certification_Authority.pem) @@ -0,0 +1,135 @@ +## +## Trustwave Global Certification Authority +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 05:f7:0e:86:da:49:f3:46:35:2e:ba:b2 + Signature Algorithm: sha256WithRSAEncryption + Issuer: C = US, ST = Illinois, L = Chicago, O = "Trustwave Holdings, Inc.", CN = Trustwave Global Certification Authority + Validity + Not Before: Aug 23 19:34:12 2017 GMT + Not After : Aug 23 19:34:12 2042 GMT + Subject: C = US, ST = Illinois, L = Chicago, O = "Trustwave Holdings, Inc.", CN = Trustwave Global Certification Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:b9:5d:51:28:4b:3c:37:92:d1:82:ce:bd:1d:bd: + cd:dd:b8:ab:cf:0a:3e:e1:5d:e5:dc:aa:09:b9:57: + 02:3e:e6:63:61:df:f2:0f:82:63:ae:a3:f7:ac:73: + d1:7c:e7:b3:0b:af:08:00:09:59:7f:cd:29:2a:88: + 93:87:17:18:80:ed:88:b2:b4:b6:10:1f:2d:d6:5f: + 55:a2:13:5d:d1:c6:eb:06:56:89:88:fe:ac:32:9d: + fd:5c:c3:05:c7:6e:ee:86:89:ba:88:03:9d:72:21: + 86:90:ae:8f:03:a5:dc:9f:88:28:cb:a3:92:49:0f: + ec:d0:0f:e2:6d:44:4f:80:6a:b2:d4:e7:a0:0a:53: + 01:ba:8e:97:91:76:6e:bc:fc:d5:6b:36:e6:40:88: + d6:7b:2f:5f:05:e8:2c:6d:11:f3:e7:b2:be:92:44: + 4c:d2:97:a4:fe:d2:72:81:43:07:9c:e9:11:3e:f5: + 8b:1a:59:7d:1f:68:58:dd:04:00:2c:96:f3:43:b3: + 7e:98:19:74:d9:9c:73:d9:18:be:41:c7:34:79:d9: + f4:62:c2:43:b9:b3:27:b0:22:cb:f9:3d:52:c7:30: + 47:b3:c9:3e:b8:6a:e2:e7:e8:81:70:5e:42:8b:4f: + 26:a5:fe:3a:c2:20:6e:bb:f8:16:8e:cd:0c:a9:b4: + 1b:6c:76:10:e1:58:79:46:3e:54:ce:80:a8:57:09: + 37:29:1b:99:13:8f:0c:c8:d6:2c:1c:fb:05:e8:08: + 95:3d:65:46:dc:ee:cd:69:e2:4d:8f:87:28:4e:34: + 0b:3e:cf:14:d9:bb:dd:b6:50:9a:ad:77:d4:19:d6: + da:1a:88:c8:4e:1b:27:75:d8:b2:08:f1:ae:83:30: + b9:11:0e:cd:87:f0:84:8d:15:72:7c:a1:ef:cc:f2: + 88:61:ba:f4:69:bb:0c:8c:0b:75:57:04:b8:4e:2a: + 14:2e:3d:0f:1c:1e:32:a6:62:36:ee:66:e2:22:b8: + 05:40:63:10:22:f3:33:1d:74:72:8a:2c:f5:39:29: + a0:d3:e7:1b:80:84:2d:c5:3d:e3:4d:b1:fd:1a:6f: + ba:65:07:3b:58:ec:42:45:26:fb:d8:da:25:72:c4: + f6:00:b1:22:79:bd:e3:7c:59:62:4a:9c:05:6f:3d: + ce:e6:d6:47:63:99:c6:24:6f:72:12:c8:ac:7f:90: + b4:0b:91:70:e8:b7:e6:16:10:71:17:ce:de:06:4f: + 48:41:7d:35:4a:a3:89:f2:c9:4b:7b:41:11:6d:67: + b7:08:98:4c:e5:11:19:ae:42:80:dc:fb:90:05:d4: + f8:50:ca:be:e4:ad:c7:c2:94:d7:16:9d:e6:17:8f: + af:36:fb + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 99:E0:19:67:0D:62:DB:76:B3:DA:3D:B8:5B:E8:FD:42:D2:31:0E:87 + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: sha256WithRSAEncryption + 98:73:70:e2:b0:d3:ed:39:ec:4c:60:d9:a9:12:86:17:1e:96: + d0:e8:54:28:3b:64:2d:21:a6:f8:9d:56:13:6a:48:3d:4f:c7: + 3e:29:db:6d:58:83:54:3d:87:7d:23:05:d4:e4:1c:dc:e8:38: + 65:86:c5:75:a7:5a:db:35:05:bd:77:de:bb:29:37:40:05:07: + c3:94:52:9f:ca:64:dd:f1:1b:2b:dc:46:0a:10:02:31:fd:4a: + 68:0d:07:64:90:e6:1e:f5:2a:a1:a8:bb:3c:5d:f9:a3:08:0b: + 11:0c:f1:3f:2d:10:94:6f:fe:e2:34:87:83:d6:cf:e5:1b:35: + 6d:d2:03:e1:b0:0d:a8:a0:aa:46:27:82:36:a7:15:b6:08:a6: + 42:54:57:b6:99:5a:e2:0b:79:90:d7:57:12:51:35:19:88:41: + 68:25:d4:37:17:84:15:fb:01:72:dc:95:de:52:26:20:98:26: + e2:76:f5:27:6f:fa:00:3b:4a:61:d9:0d:cb:51:93:2a:fd:16: + 06:96:a7:23:9a:23:48:fe:51:bd:b6:c4:b0:b1:54:ce:de:6c: + 41:ad:16:67:7e:db:fd:38:cd:b9:38:4e:b2:c1:60:cb:9d:17: + df:58:9e:7a:62:b2:26:8f:74:95:9b:e4:5b:1d:d2:0f:dd:98: + 1c:9b:59:b9:23:d3:31:a0:a6:ff:38:dd:cf:20:4f:e9:58:56: + 3a:67:c3:d1:f6:99:99:9d:ba:36:b6:80:2f:88:47:4f:86:bf: + 44:3a:80:e4:37:1c:a6:ba:ea:97:98:11:d0:84:62:47:64:1e: + aa:ee:40:bf:34:b1:9c:8f:4e:e1:f2:92:4f:1f:8e:f3:9e:97: + de:f3:a6:79:6a:89:71:4f:4b:27:17:48:fe:ec:f4:50:0f:4f: + 49:7d:cc:45:e3:bd:7a:40:c5:41:dc:61:56:27:06:69:e5:72: + 41:81:d3:b6:01:89:a0:2f:3a:72:79:fe:3a:30:bf:41:ec:c7: + 62:3e:91:4b:c7:d9:31:76:42:f9:f7:3c:63:ec:26:8c:73:0c: + 7d:1a:1d:ea:a8:7c:87:a8:c2:27:7c:e1:33:41:0f:cf:cf:fc: + 00:a0:22:80:9e:4a:a7:6f:00:b0:41:45:b7:22:ca:68:48:c5: + 42:a2:ae:dd:1d:f2:e0:6e:4e:05:58:b1:c0:90:16:2a:a4:3d: + 10:40:be:8f:62:63:83:a9:9c:82:7d:2d:02:e9:83:30:7c:cb: + 27:c9:fd:1e:66:00:b0:2e:d3:21:2f:8e:33:16:6c:98:ed:10: + a8:07:d6:cc:93:cf:db:d1:69:1c:e4:ca:c9:e0:b6:9c:e9:ce: + 71:71:de:6c:3f:16:a4:79 +SHA1 Fingerprint=2F:8F:36:4F:E1:58:97:44:21:59:87:A5:2A:9A:D0:69:95:26:7F:B5 +-----BEGIN CERTIFICATE----- +MIIF2jCCA8KgAwIBAgIMBfcOhtpJ80Y1LrqyMA0GCSqGSIb3DQEBCwUAMIGIMQsw +CQYDVQQGEwJVUzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28x +ITAfBgNVBAoMGFRydXN0d2F2ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1 +c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMx +OTM0MTJaFw00MjA4MjMxOTM0MTJaMIGIMQswCQYDVQQGEwJVUzERMA8GA1UECAwI +SWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2ZSBI +b2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB +ALldUShLPDeS0YLOvR29zd24q88KPuFd5dyqCblXAj7mY2Hf8g+CY66j96xz0Xzn +swuvCAAJWX/NKSqIk4cXGIDtiLK0thAfLdZfVaITXdHG6wZWiYj+rDKd/VzDBcdu +7oaJuogDnXIhhpCujwOl3J+IKMujkkkP7NAP4m1ET4BqstTnoApTAbqOl5F2brz8 +1Ws25kCI1nsvXwXoLG0R8+eyvpJETNKXpP7ScoFDB5zpET71ixpZfR9oWN0EACyW +80OzfpgZdNmcc9kYvkHHNHnZ9GLCQ7mzJ7Aiy/k9UscwR7PJPrhq4ufogXBeQotP +JqX+OsIgbrv4Fo7NDKm0G2x2EOFYeUY+VM6AqFcJNykbmROPDMjWLBz7BegIlT1l +RtzuzWniTY+HKE40Cz7PFNm73bZQmq131BnW2hqIyE4bJ3XYsgjxroMwuREOzYfw +hI0Vcnyh78zyiGG69Gm7DIwLdVcEuE4qFC49DxweMqZiNu5m4iK4BUBjECLzMx10 +coos9TkpoNPnG4CELcU9402x/RpvumUHO1jsQkUm+9jaJXLE9gCxInm943xZYkqc +BW89zubWR2OZxiRvchLIrH+QtAuRcOi35hYQcRfO3gZPSEF9NUqjifLJS3tBEW1n +twiYTOURGa5CgNz7kAXU+FDKvuStx8KU1xad5hePrzb7AgMBAAGjQjBAMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFJngGWcNYtt2s9o9uFvo/ULSMQ6HMA4GA1Ud +DwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAmHNw4rDT7TnsTGDZqRKGFx6W +0OhUKDtkLSGm+J1WE2pIPU/HPinbbViDVD2HfSMF1OQc3Og4ZYbFdada2zUFvXfe +uyk3QAUHw5RSn8pk3fEbK9xGChACMf1KaA0HZJDmHvUqoai7PF35owgLEQzxPy0Q +lG/+4jSHg9bP5Rs1bdID4bANqKCqRieCNqcVtgimQlRXtpla4gt5kNdXElE1GYhB +aCXUNxeEFfsBctyV3lImIJgm4nb1J2/6ADtKYdkNy1GTKv0WBpanI5ojSP5RvbbE +sLFUzt5sQa0WZ37b/TjNuThOssFgy50X31ieemKyJo90lZvkWx3SD92YHJtZuSPT +MaCm/zjdzyBP6VhWOmfD0faZmZ26NraAL4hHT4a/RDqA5Dccprrql5gR0IRiR2Qe +qu5AvzSxnI9O4fKSTx+O856X3vOmeWqJcU9LJxdI/uz0UA9PSX3MReO9ekDFQdxh +VicGaeVyQYHTtgGJoC86cnn+OjC/QezHYj6RS8fZMXZC+fc8Y+wmjHMMfRod6qh8 +h6jCJ3zhM0EPz8/8AKAigJ5Kp28AsEFFtyLKaEjFQqKu3R3y4G5OBVixwJAWKqQ9 +EEC+j2Jjg6mcgn0tAumDMHzLJ8n9HmYAsC7TIS+OMxZsmO0QqAfWzJPP29FpHOTK +yeC2nOnOcXHebD8WpHk= +-----END CERTIFICATE----- Copied: stable/12/secure/caroot/trusted/Trustwave_Global_ECC_P256_Certification_Authority.pem (from r365896, head/secure/caroot/trusted/Trustwave_Global_ECC_P256_Certification_Authority.pem) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/secure/caroot/trusted/Trustwave_Global_ECC_P256_Certification_Authority.pem Tue Sep 22 01:58:18 2020 (r365986, copy of r365896, head/secure/caroot/trusted/Trustwave_Global_ECC_P256_Certification_Authority.pem) @@ -0,0 +1,62 @@ +## +## Trustwave Global ECC P256 Certification Authority +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 0d:6a:5f:08:3f:28:5c:3e:51:95:df:5d + Signature Algorithm: ecdsa-with-SHA256 + Issuer: C = US, ST = Illinois, L = Chicago, O = "Trustwave Holdings, Inc.", CN = Trustwave Global ECC P256 Certification Authority + Validity + Not Before: Aug 23 19:35:10 2017 GMT + Not After : Aug 23 19:35:10 2042 GMT + Subject: C = US, ST = Illinois, L = Chicago, O = "Trustwave Holdings, Inc.", CN = Trustwave Global ECC P256 Certification Authority + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (256 bit) + pub: + 04:7e:fb:6c:e6:23:e3:73:32:08:ca:60:e6:53:9c: + ba:74:8d:18:b0:78:90:52:80:dd:38:c0:4a:1d:d1: + a8:cc:93:a4:97:06:38:ca:0d:15:62:c6:8e:01:2a: + 65:9d:aa:df:34:91:2e:81:c1:e4:33:92:31:c4:fd: + 09:3a:a6:3f:ad + ASN1 OID: prime256v1 + NIST CURVE: P-256 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + A3:41:06:AC:90:6D:D1:4A:EB:75:A5:4A:10:99:B3:B1:A1:8B:4A:F7 + Signature Algorithm: ecdsa-with-SHA256 + 30:44:02:20:07:e6:54:da:0e:a0:5a:b2:ae:11:9f:87:c5:b6: + ff:69:de:25:be:f8:a0:b7:08:f3:44:ce:2a:df:08:21:0c:37: + 02:20:2d:26:03:a0:05:bd:6b:d1:f6:5c:f8:65:cc:86:6d:b3: + 9c:34:48:63:84:09:c5:8d:77:1a:e2:cc:9c:e1:74:7b +SHA1 Fingerprint=B4:90:82:DD:45:0C:BE:8B:5B:B1:66:D3:E2:A4:08:26:CD:ED:42:CF +-----BEGIN CERTIFICATE----- +MIICYDCCAgegAwIBAgIMDWpfCD8oXD5Rld9dMAoGCCqGSM49BAMCMIGRMQswCQYD +VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAf +BgNVBAoTGFRydXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3 +YXZlIEdsb2JhbCBFQ0MgUDI1NiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0x +NzA4MjMxOTM1MTBaFw00MjA4MjMxOTM1MTBaMIGRMQswCQYDVQQGEwJVUzERMA8G +A1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0 +d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBF +Q0MgUDI1NiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTBZMBMGByqGSM49AgEGCCqG +SM49AwEHA0IABH77bOYj43MyCMpg5lOcunSNGLB4kFKA3TjASh3RqMyTpJcGOMoN +FWLGjgEqZZ2q3zSRLoHB5DOSMcT9CTqmP62jQzBBMA8GA1UdEwEB/wQFMAMBAf8w +DwYDVR0PAQH/BAUDAwcGADAdBgNVHQ4EFgQUo0EGrJBt0UrrdaVKEJmzsaGLSvcw +CgYIKoZIzj0EAwIDRwAwRAIgB+ZU2g6gWrKuEZ+Hxbb/ad4lvvigtwjzRM4q3wgh +DDcCIC0mA6AFvWvR9lz4ZcyGbbOcNEhjhAnFjXca4syc4XR7 +-----END CERTIFICATE----- Copied: stable/12/secure/caroot/trusted/Trustwave_Global_ECC_P384_Certification_Authority.pem (from r365896, head/secure/caroot/trusted/Trustwave_Global_ECC_P384_Certification_Authority.pem) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/secure/caroot/trusted/Trustwave_Global_ECC_P384_Certification_Authority.pem Tue Sep 22 01:58:18 2020 (r365986, copy of r365896, head/secure/caroot/trusted/Trustwave_Global_ECC_P384_Certification_Authority.pem) @@ -0,0 +1,68 @@ +## +## Trustwave Global ECC P384 Certification Authority +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 08:bd:85:97:6c:99:27:a4:80:68:47:3b + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = US, ST = Illinois, L = Chicago, O = "Trustwave Holdings, Inc.", CN = Trustwave Global ECC P384 Certification Authority + Validity + Not Before: Aug 23 19:36:43 2017 GMT + Not After : Aug 23 19:36:43 2042 GMT + Subject: C = US, ST = Illinois, L = Chicago, O = "Trustwave Holdings, Inc.", CN = Trustwave Global ECC P384 Certification Authority + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:6b:da:0d:75:35:08:31:47:05:ae:45:99:55:f1: + 11:13:2e:4a:f8:10:31:23:a3:7e:83:d3:7f:28:08: + 3a:26:1a:3a:cf:97:82:1f:80:b7:27:09:8f:d1:8e: + 30:c4:0a:9b:0e:ac:58:04:ab:f7:36:7d:94:23:a4: + 9b:0a:8a:8b:ab:eb:fd:39:25:66:f1:5e:fe:8c:ae: + 8d:41:79:9d:09:60:ce:28:a9:d3:8a:6d:f3:d6:45: + d4:f2:98:84:38:65:a0 + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 55:A9:84:89:D2:C1:32:BD:18:CB:6C:A6:07:4E:C8:E7:9D:BE:82:90 + Signature Algorithm: ecdsa-with-SHA384 + 30:64:02:30:37:01:92:97:45:12:7e:a0:f3:3e:ad:19:3a:72: + dd:f4:50:93:03:12:be:44:d2:4f:41:a4:8c:9c:9d:1f:a3:f6: + c2:92:e7:48:14:fe:4e:9b:a5:91:57:ae:c6:37:72:bb:02:30: + 67:25:0a:b1:0c:5e:ee:a9:63:92:6f:e5:90:0b:fe:66:22:ca: + 47:fd:8a:31:f7:83:fe:7a:bf:10:be:18:2b:1e:8f:f6:29:1e: + 94:59:ef:8e:21:37:cb:51:98:a5:6e:4b +SHA1 Fingerprint=E7:F3:A3:C8:CF:6F:C3:04:2E:6D:0E:67:32:C5:9E:68:95:0D:5E:D2 +-----BEGIN CERTIFICATE----- +MIICnTCCAiSgAwIBAgIMCL2Fl2yZJ6SAaEc7MAoGCCqGSM49BAMDMIGRMQswCQYD +VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAf +BgNVBAoTGFRydXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3 +YXZlIEdsb2JhbCBFQ0MgUDM4NCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0x +NzA4MjMxOTM2NDNaFw00MjA4MjMxOTM2NDNaMIGRMQswCQYDVQQGEwJVUzERMA8G +A1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0 +d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBF +Q0MgUDM4NCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTB2MBAGByqGSM49AgEGBSuB +BAAiA2IABGvaDXU1CDFHBa5FmVXxERMuSvgQMSOjfoPTfygIOiYaOs+Xgh+AtycJ +j9GOMMQKmw6sWASr9zZ9lCOkmwqKi6vr/TklZvFe/oyujUF5nQlgziip04pt89ZF +1PKYhDhloKNDMEEwDwYDVR0TAQH/BAUwAwEB/zAPBgNVHQ8BAf8EBQMDBwYAMB0G +A1UdDgQWBBRVqYSJ0sEyvRjLbKYHTsjnnb6CkDAKBggqhkjOPQQDAwNnADBkAjA3 +AZKXRRJ+oPM+rRk6ct30UJMDEr5E0k9BpIycnR+j9sKS50gU/k6bpZFXrsY3crsC +MGclCrEMXu6pY5Jv5ZAL/mYiykf9ijH3g/56vxC+GCsej/YpHpRZ744hN8tRmKVu +Sw== +-----END CERTIFICATE----- From owner-svn-src-stable-12@freebsd.org Tue Sep 22 02:14:57 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 155604261D6; Tue, 22 Sep 2020 02:14:57 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwPym6WM9z4K78; Tue, 22 Sep 2020 02:14:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A8B4818306; Tue, 22 Sep 2020 02:14:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08M2Eu9R002880; Tue, 22 Sep 2020 02:14:56 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08M2EuBD002878; Tue, 22 Sep 2020 02:14:56 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202009220214.08M2EuBD002878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 22 Sep 2020 02:14:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365987 - in stable/12: . usr.sbin/bsdinstall/scripts X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/12: . usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 365987 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 02:14:57 -0000 Author: kevans Date: Tue Sep 22 02:14:55 2020 New Revision: 365987 URL: https://svnweb.freebsd.org/changeset/base/365987 Log: MFC r365829, r365837, r365852: certctl rehash upon install/distribute r365829: installworld: run `certctl rehash` after installation completes This was originally introduced back in r360833, and subsequently reverted because it was broken for -DNO_ROOT builds and it may not have been the correct place for it. While debatably this may still not be 'the correct place,' it's much cleaner than scattering rehashes all throughout the tree. brooks has fixed the issue with -DNO_ROOT by properly writing to the METALOG in r361397. Do note that this is different than what was originally committed; brooks had revisions in D24932 that made it actually use the revised unprivileged mode and write to METALOG, along with being a little more friendly to foreign crossbuilds and just using the certctl in-tree. With this change, I believe we should now have a populated /etc/ssl/certs in the VM images. r365837: Promote the installworld `certctl rehash` to distributeworld Contrary to my belief, installworld is not sufficient for getting certs installed into VM images. Promote the rehash to both installworld and distributeworld (notably: not stageworld) and rehash the base distdir so we end up with /etc/ssl/certs populated in the base dist archive. A future commit will remove the rehash from bsdinstall, which doesn't really need to happen if they're installed into base.txz. While here, fix a minor typo: s/CERTCLTFLAGS/CERTCTLFLAGS/ r365852: Revert r361257: bsdinstall: do a `certctl rehash` upon installation [...] As of r365829, any given base distribution set will now include the /etc/ssl symlinks that this rehash would've otherwise installed. This extra step is no longer required. Modified: stable/12/Makefile.inc1 stable/12/usr.sbin/bsdinstall/scripts/config Directory Properties: stable/12/ (props changed) Modified: stable/12/Makefile.inc1 ============================================================================== --- stable/12/Makefile.inc1 Tue Sep 22 01:58:18 2020 (r365986) +++ stable/12/Makefile.inc1 Tue Sep 22 02:14:55 2020 (r365987) @@ -849,7 +849,9 @@ INSTALL_DDIR= ${_INSTALL_DDIR:S://:/:g:C:/$::} METALOG?= ${DESTDIR}/${DISTDIR}/METALOG METALOG:= ${METALOG:C,//+,/,g} IMAKE+= -DNO_ROOT METALOG=${METALOG} -INSTALLFLAGS+= -U -M ${METALOG} -D ${INSTALL_DDIR} +METALOG_INSTALLFLAGS= -U -M ${METALOG} -D ${INSTALL_DDIR} +INSTALLFLAGS+= ${METALOG_INSTALLFLAGS} +CERTCTLFLAGS= ${METALOG_INSTALLFLAGS} MTREEFLAGS+= -W .endif .if defined(BUILD_PKGS) @@ -859,6 +861,11 @@ INSTALLFLAGS+= -h sha256 IMAKE_INSTALL= INSTALL="install ${INSTALLFLAGS}" IMAKE_MTREE= MTREE_CMD="mtree ${MTREEFLAGS}" .endif +.if make(distributeworld) +CERTCTLDESTDIR= ${DESTDIR}/${DISTDIR}/base +.else +CERTCTLDESTDIR= ${DESTDIR} +.endif DESTDIR_MTREEFLAGS= -deU # When creating worldtmp we don't need to set the directories as owned by root @@ -1419,6 +1426,14 @@ distributeworld installworld stageworld: _installcheck ${DESTDIR}/${DISTDIR}/${dist}.debug.meta .endfor .endif +.endif # make(distributeworld) +.if !make(packageworld) && ${MK_CAROOT} != "no" + @if which openssl>/dev/null; then \ + DESTDIR=${CERTCTLDESTDIR} \ + sh ${SRCTOP}/usr.sbin/certctl/certctl.sh ${CERTCTLFLAGS} rehash \ + else \ + echo "No openssl on the host, not rehashing certificates target -- /etc/ssl may not be populated."; \ + fi .endif packageworld: .PHONY Modified: stable/12/usr.sbin/bsdinstall/scripts/config ============================================================================== --- stable/12/usr.sbin/bsdinstall/scripts/config Tue Sep 22 01:58:18 2020 (r365986) +++ stable/12/usr.sbin/bsdinstall/scripts/config Tue Sep 22 02:14:55 2020 (r365987) @@ -55,9 +55,6 @@ cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHROOT/boot # Set up other things from installed config chroot $BSDINSTALL_CHROOT /usr/bin/newaliases > /dev/null 2>&1 -if [ -x $BSDINSTALL_CHROOT/usr/sbin/certctl ]; then - chroot $BSDINSTALL_CHROOT /usr/sbin/certctl rehash -fi exit 0 From owner-svn-src-stable-12@freebsd.org Tue Sep 22 02:22:38 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D22E42698E; Tue, 22 Sep 2020 02:22:38 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwQ7f01Ynz4L5S; Tue, 22 Sep 2020 02:22:38 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8A6C18492; Tue, 22 Sep 2020 02:22:37 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08M2MbWZ009044; Tue, 22 Sep 2020 02:22:37 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08M2MbfG009043; Tue, 22 Sep 2020 02:22:37 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202009220222.08M2MbfG009043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 22 Sep 2020 02:22:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365990 - in stable: 11 12 X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11 12 X-SVN-Commit-Revision: 365990 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 02:22:38 -0000 Author: kevans Date: Tue Sep 22 02:22:37 2020 New Revision: 365990 URL: https://svnweb.freebsd.org/changeset/base/365990 Log: Record-only MFC of r365018 MFC r365018: Makefile.inc1: comment .endif to ease finding matching .if This was effectively merged back in r365987 and r365988. Modified: Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable-12@freebsd.org Tue Sep 22 12:14:47 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE6EE3E7787; Tue, 22 Sep 2020 12:14:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwgGv61Pwz3fJg; Tue, 22 Sep 2020 12:14:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97BB01F507; Tue, 22 Sep 2020 12:14:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MCElCw071970; Tue, 22 Sep 2020 12:14:47 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MCElAl071968; Tue, 22 Sep 2020 12:14:47 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202009221214.08MCElAl071968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 22 Sep 2020 12:14:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365994 - stable/12/usr.bin/posixshmcontrol X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/usr.bin/posixshmcontrol X-SVN-Commit-Revision: 365994 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 12:14:48 -0000 Author: markj Date: Tue Sep 22 12:14:46 2020 New Revision: 365994 URL: https://svnweb.freebsd.org/changeset/base/365994 Log: MFC r365749: Fix some posixshmcontrol nits. Modified: stable/12/usr.bin/posixshmcontrol/posixshmcontrol.1 stable/12/usr.bin/posixshmcontrol/posixshmcontrol.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/posixshmcontrol/posixshmcontrol.1 ============================================================================== --- stable/12/usr.bin/posixshmcontrol/posixshmcontrol.1 Tue Sep 22 04:16:40 2020 (r365993) +++ stable/12/usr.bin/posixshmcontrol/posixshmcontrol.1 Tue Sep 22 12:14:46 2020 (r365994) @@ -120,7 +120,7 @@ using name-switch services, instead the raw numeric va To show content of the shared memory segment with the path .Pa /1 , use the command -.Dl "posixshmcontrol dump /q | hexdump -C" +.Dl "posixshmcontrol dump /1 | hexdump -C" .It To create a segment with the path .Pa /2 Modified: stable/12/usr.bin/posixshmcontrol/posixshmcontrol.c ============================================================================== --- stable/12/usr.bin/posixshmcontrol/posixshmcontrol.c Tue Sep 22 04:16:40 2020 (r365993) +++ stable/12/usr.bin/posixshmcontrol/posixshmcontrol.c Tue Sep 22 12:14:46 2020 (r365994) @@ -96,9 +96,14 @@ create_shm(int argc, char **argv) return (2); } } - argc -= optind; argv += optind; + + if (argc == 0) { + usage(); + return (2); + } + ret = 0; for (i = 0; i < argc; i++) { ret1 = create_one_shm(argv[i], mode); @@ -128,6 +133,11 @@ delete_shm(int argc, char **argv) { int i, ret, ret1; + if (argc == 1) { + usage(); + return (2); + } + ret = 0; for (i = 1; i < argc; i++) { ret1 = delete_one_shm(argv[i]); @@ -296,6 +306,11 @@ read_shm(int argc, char **argv) { int i, ret, ret1; + if (argc == 1) { + usage(); + return (2); + } + ret = 0; for (i = 1; i < argc; i++) { ret1 = read_one_shm(argv[i]); @@ -379,6 +394,11 @@ stat_shm(int argc, char **argv) argc -= optind; argv += optind; + if (argc == 0) { + usage(); + return (2); + } + ret = 0; for (i = 0; i < argc; i++) { ret1 = stat_one_shm(argv[i], hsize, uname); @@ -419,16 +439,21 @@ truncate_shm(int argc, char **argv) switch (c) { case 's': if (expand_number(optarg, &newsize) == -1) - err(1, "size:"); + err(1, "size"); break; case '?': default: return (2); } } - argc -= optind; argv += optind; + + if (argc == 0) { + usage(); + return (2); + } + ret = 0; for (i = 0; i < argc; i++) { ret1 = truncate_one_shm(argv[i], newsize); From owner-svn-src-stable-12@freebsd.org Tue Sep 22 14:15:07 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F9C43EA636; Tue, 22 Sep 2020 14:15:07 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwjxk6yrJz44fG; Tue, 22 Sep 2020 14:15:06 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D252E207BE; Tue, 22 Sep 2020 14:15:06 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MEF6Ob047444; Tue, 22 Sep 2020 14:15:06 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MEF6GO047443; Tue, 22 Sep 2020 14:15:06 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202009221415.08MEF6GO047443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Tue, 22 Sep 2020 14:15:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365996 - stable/12/sys/arm64/include X-SVN-Group: stable-12 X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: stable/12/sys/arm64/include X-SVN-Commit-Revision: 365996 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 14:15:07 -0000 Author: mhorne Date: Tue Sep 22 14:15:06 2020 New Revision: 365996 URL: https://svnweb.freebsd.org/changeset/base/365996 Log: MFC r365304, r365459 r365304: arm64: update the set of HWCAP definitions r365459: arm64: fix incorrect HWCAP definitions Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/arm64/include/elf.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/include/elf.h ============================================================================== --- stable/12/sys/arm64/include/elf.h Tue Sep 22 13:00:02 2020 (r365995) +++ stable/12/sys/arm64/include/elf.h Tue Sep 22 14:15:06 2020 (r365996) @@ -115,33 +115,62 @@ __ElfType(Auxinfo); #define ET_DYN_LOAD_ADDR 0x100000 /* HWCAP */ +#define HWCAP_FP 0x00000001 +#define HWCAP_ASIMD 0x00000002 +#define HWCAP_EVTSTRM 0x00000004 +#define HWCAP_AES 0x00000008 +#define HWCAP_PMULL 0x00000010 +#define HWCAP_SHA1 0x00000020 +#define HWCAP_SHA2 0x00000040 +#define HWCAP_CRC32 0x00000080 +#define HWCAP_ATOMICS 0x00000100 +#define HWCAP_FPHP 0x00000200 +#define HWCAP_ASIMDHP 0x00000400 +/* + * XXX: The following bits (from CPUID to FLAGM) were originally incorrect, + * but later changed to match the Linux definitions. No compatibility code is + * provided, as the fix was expected to result in near-zero fallout. + */ +#define HWCAP_CPUID 0x00000800 +#define HWCAP_ASIMDRDM 0x00001000 +#define HWCAP_JSCVT 0x00002000 +#define HWCAP_FCMA 0x00004000 +#define HWCAP_LRCPC 0x00008000 +#define HWCAP_DCPOP 0x00010000 +#define HWCAP_SHA3 0x00020000 +#define HWCAP_SM3 0x00040000 +#define HWCAP_SM4 0x00080000 +#define HWCAP_ASIMDDP 0x00100000 +#define HWCAP_SHA512 0x00200000 +#define HWCAP_SVE 0x00400000 +#define HWCAP_ASIMDFHM 0x00800000 +#define HWCAP_DIT 0x01000000 +#define HWCAP_USCAT 0x02000000 +#define HWCAP_ILRCPC 0x04000000 +#define HWCAP_FLAGM 0x08000000 +#define HWCAP_SSBS 0x10000000 +#define HWCAP_SB 0x20000000 +#define HWCAP_PACA 0x40000000 +#define HWCAP_PACG 0x80000000 -#define HWCAP_FP 0x00000001 -#define HWCAP_ASIMD 0x00000002 -#define HWCAP_EVTSTRM 0x00000004 -#define HWCAP_AES 0x00000008 -#define HWCAP_PMULL 0x00000010 -#define HWCAP_SHA1 0x00000020 -#define HWCAP_SHA2 0x00000040 -#define HWCAP_CRC32 0x00000080 -#define HWCAP_ATOMICS 0x00000100 -#define HWCAP_FPHP 0x00000200 -#define HWCAP_CPUID 0x00000400 -#define HWCAP_ASIMDRDM 0x00000800 -#define HWCAP_JSCVT 0x00001000 -#define HWCAP_FCMA 0x00002000 -#define HWCAP_LRCPC 0x00004000 -#define HWCAP_DCPOP 0x00008000 -#define HWCAP_SHA3 0x00010000 -#define HWCAP_SM3 0x00020000 -#define HWCAP_SM4 0x00040000 -#define HWCAP_ASIMDDP 0x00080000 -#define HWCAP_SHA512 0x00100000 -#define HWCAP_SVE 0x00200000 -#define HWCAP_ASIMDFHM 0x00400000 -#define HWCAP_DIT 0x00800000 -#define HWCAP_USCAT 0x01000000 -#define HWCAP_ILRCPC 0x02000000 -#define HWCAP_FLAGM 0x04000000 +/* HWCAP2 */ +#define HWCAP2_DCPODP 0x00000001 +#define HWCAP2_SVE2 0x00000002 +#define HWCAP2_SVEAES 0x00000004 +#define HWCAP2_SVEPMULL 0x00000008 +#define HWCAP2_SVEBITPERM 0x00000010 +#define HWCAP2_SVESHA3 0x00000020 +#define HWCAP2_SVESM4 0x00000040 +#define HWCAP2_FLAGM2 0x00000080 +#define HWCAP2_FRINT 0x00000100 +#define HWCAP2_SVEI8MM 0x00000200 +#define HWCAP2_SVEF32MM 0x00000400 +#define HWCAP2_SVEF64MM 0x00000800 +#define HWCAP2_SVEBF16 0x00001000 +#define HWCAP2_I8MM 0x00002000 +#define HWCAP2_BF16 0x00004000 +#define HWCAP2_DGH 0x00008000 +#define HWCAP2_RNG 0x00010000 +#define HWCAP2_BTI 0x00020000 #endif /* !_MACHINE_ELF_H_ */ From owner-svn-src-stable-12@freebsd.org Tue Sep 22 14:29:20 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 53DB33EAE0B; Tue, 22 Sep 2020 14:29:20 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwkG81ccBz45V0; Tue, 22 Sep 2020 14:29:20 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00D8920A59; Tue, 22 Sep 2020 14:29:20 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08METJBW053994; Tue, 22 Sep 2020 14:29:19 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08METJqp053993; Tue, 22 Sep 2020 14:29:19 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202009221429.08METJqp053993@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Tue, 22 Sep 2020 14:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365999 - stable/12 X-SVN-Group: stable-12 X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: stable/12 X-SVN-Commit-Revision: 365999 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 14:29:20 -0000 Author: mhorne Date: Tue Sep 22 14:29:19 2020 New Revision: 365999 URL: https://svnweb.freebsd.org/changeset/base/365999 Log: Add some missing mergeinfo This should have been included when MFC'ing r362788 and r364193. Modified: Directory Properties: stable/12/ (props changed) From owner-svn-src-stable-12@freebsd.org Tue Sep 22 14:59:05 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ECD253EBB07; Tue, 22 Sep 2020 14:59:05 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwkwT61wzz46bw; Tue, 22 Sep 2020 14:59:05 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B22EA20DE2; Tue, 22 Sep 2020 14:59:05 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MEx5wE072319; Tue, 22 Sep 2020 14:59:05 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MEx5k2072318; Tue, 22 Sep 2020 14:59:05 GMT (envelope-from ian@FreeBSD.org) Message-Id: <202009221459.08MEx5k2072318@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 22 Sep 2020 14:59:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366000 - stable/12/sys/dev/usb X-SVN-Group: stable-12 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/12/sys/dev/usb X-SVN-Commit-Revision: 366000 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 14:59:06 -0000 Author: ian Date: Tue Sep 22 14:59:05 2020 New Revision: 366000 URL: https://svnweb.freebsd.org/changeset/base/366000 Log: MFC r365729: Add product ID strings for a couple Microchip usb hubs. Also, update the vendor ID string to say just "Microchip Technology" -- the buyout of Standard Microsystems happened in 2012 and the SMC/SMSC names are pretty much retired at this point. PR: 241406 Modified: stable/12/sys/dev/usb/usbdevs Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/usbdevs ============================================================================== --- stable/12/sys/dev/usb/usbdevs Tue Sep 22 14:29:19 2020 (r365999) +++ stable/12/sys/dev/usb/usbdevs Tue Sep 22 14:59:05 2020 (r366000) @@ -103,7 +103,7 @@ vendor CREATIVE 0x041e Creative Labs vendor NOKIA 0x0421 Nokia vendor ADI 0x0422 ADI Systems vendor CATC 0x0423 Computer Access Technology -vendor SMC2 0x0424 Microchip (Standard Microsystems) +vendor SMC2 0x0424 Microchip Technology vendor MOTOROLA_HK 0x0425 Motorola HK vendor GRAVIS 0x0428 Advanced Gravis Computer vendor CIRRUSLOGIC 0x0429 Cirrus Logic @@ -4426,13 +4426,15 @@ product SMART2 G2MEMKEY 0x1700 G2 Memory Key product SMARTBRIDGES SMARTLINK 0x0001 SmartLink USB Ethernet product SMARTBRIDGES SMARTNIC 0x0003 smartNIC 2 PnP Ethernet -/* SMC products */ +/* Microchip Technology (formerly SMC) products */ product SMC 2102USB 0x0100 10Mbps Ethernet product SMC 2202USB 0x0200 10/100 Ethernet product SMC 2206USB 0x0201 EZ Connect USB Ethernet product SMC 2862WG 0xee13 EZ Connect Wireless Adapter product SMC2 2020HUB 0x2020 USB Hub +product SMC2 2513HUB 0x2513 USB Hub product SMC2 2514HUB 0x2514 USB Hub +product SMC2 2517HUB 0x2517 USB Hub product SMC3 2662WUSB 0xa002 2662W-AR Wireless product SMC2 LAN7800_ETH 0x7800 USB/Ethernet product SMC2 LAN7801_ETH 0x7801 USB/Ethernet From owner-svn-src-stable-12@freebsd.org Tue Sep 22 17:28:32 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AEC313F0A51; Tue, 22 Sep 2020 17:28:32 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwpDw498Vz4Ldk; Tue, 22 Sep 2020 17:28:32 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 723A222DF8; Tue, 22 Sep 2020 17:28:32 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MHSWb8065460; Tue, 22 Sep 2020 17:28:32 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MHSWIs065459; Tue, 22 Sep 2020 17:28:32 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202009221728.08MHSWIs065459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Tue, 22 Sep 2020 17:28:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366006 - stable/12/share/man/man9 X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/share/man/man9 X-SVN-Commit-Revision: 366006 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 17:28:32 -0000 Author: gbe (doc committer) Date: Tue Sep 22 17:28:32 2020 New Revision: 366006 URL: https://svnweb.freebsd.org/changeset/base/366006 Log: MFC r365857: pwmbus(9): some markup fixes - whitespace at end of input line Modified: stable/12/share/man/man9/pwmbus.9 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man9/pwmbus.9 ============================================================================== --- stable/12/share/man/man9/pwmbus.9 Tue Sep 22 17:05:01 2020 (r366005) +++ stable/12/share/man/man9/pwmbus.9 Tue Sep 22 17:28:32 2020 (r366006) @@ -68,11 +68,11 @@ argument is the duration in nanoseconds of the on port .Pp Some PWM hardware is organized as a single controller with multiple channels. Channel numbers count up from zero. -When multiple channels are present, they sometimes share a common clock or +When multiple channels are present, they sometimes share a common clock or other resources. -In such cases, changing the period or duty cycle of any one channel may affect +In such cases, changing the period or duty cycle of any one channel may affect other channels within the hardware which share the same resources. -Consult the documentation for the underlying PWM hardware device driver for +Consult the documentation for the underlying PWM hardware device driver for details on channels that share resources. .Sh INTERFACE .Bl -tag -width indent From owner-svn-src-stable-12@freebsd.org Tue Sep 22 17:29:45 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FB8E3F0ADE; Tue, 22 Sep 2020 17:29:45 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwpGK1vBYz4Lsv; Tue, 22 Sep 2020 17:29:45 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 245C5227F5; Tue, 22 Sep 2020 17:29:45 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MHTj0i065571; Tue, 22 Sep 2020 17:29:45 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MHTiRV065570; Tue, 22 Sep 2020 17:29:44 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202009221729.08MHTiRV065570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Tue, 22 Sep 2020 17:29:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366007 - stable/12/share/man/man9 X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/share/man/man9 X-SVN-Commit-Revision: 366007 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 17:29:45 -0000 Author: gbe (doc committer) Date: Tue Sep 22 17:29:44 2020 New Revision: 366007 URL: https://svnweb.freebsd.org/changeset/base/366007 Log: MFC r365854: VOP_INACTIVE(9): Remove trailing whitespace Modified: stable/12/share/man/man9/VOP_INACTIVE.9 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man9/VOP_INACTIVE.9 ============================================================================== --- stable/12/share/man/man9/VOP_INACTIVE.9 Tue Sep 22 17:28:32 2020 (r366006) +++ stable/12/share/man/man9/VOP_INACTIVE.9 Tue Sep 22 17:29:44 2020 (r366007) @@ -57,7 +57,7 @@ to exclusive without sleeping. This may be because the reference count reaches zero or it may be that the file system is being forcibly unmounted while there are open files. -It can be used to reclaim space on the last close of an +It can be used to reclaim space on the last close of an .Sq open but deleted file. .Pp From owner-svn-src-stable-12@freebsd.org Tue Sep 22 17:30:53 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BDCA63F0E28; Tue, 22 Sep 2020 17:30:53 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwpHd4YbRz4M5L; Tue, 22 Sep 2020 17:30:53 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7ECF922E1A; Tue, 22 Sep 2020 17:30:53 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MHUr5n066679; Tue, 22 Sep 2020 17:30:53 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MHUrgC066678; Tue, 22 Sep 2020 17:30:53 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202009221730.08MHUrgC066678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Tue, 22 Sep 2020 17:30:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366008 - stable/12/share/man/man9 X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/share/man/man9 X-SVN-Commit-Revision: 366008 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 17:30:53 -0000 Author: gbe (doc committer) Date: Tue Sep 22 17:30:53 2020 New Revision: 366008 URL: https://svnweb.freebsd.org/changeset/base/366008 Log: MFC r365853: domainset(9): Some markup fixes - new sentence, new line - whitespace at end of input line Modified: stable/12/share/man/man9/domainset.9 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man9/domainset.9 ============================================================================== --- stable/12/share/man/man9/domainset.9 Tue Sep 22 17:29:44 2020 (r366007) +++ stable/12/share/man/man9/domainset.9 Tue Sep 22 17:30:53 2020 (r366008) @@ -88,8 +88,9 @@ memory is accessed from many CPUs that are not in the .It Dv DOMAINSET_POLICY_PREFER Memory is allocated from the node in the .Vt prefer -member. The preferred node must be set in the allowed mask. -If the preferred node is out of memory the allocation falls back to +member. +The preferred node must be set in the allowed mask. +If the preferred node is out of memory the allocation falls back to round-robin among allowed sets. .It Dv DOMAINSET_POLICY_INTERLEAVE Memory is allocated in a striped fashion with multiple pages @@ -128,8 +129,7 @@ function takes a partially filled in domainset as a ke valid domainset or NULL. It is critical that consumers not use domainsets that have not been returned by this function. -.Vt -domainset +.Vt domainset is an immutable type that is shared among all matching keys and must not be modified after return. .Pp @@ -138,9 +138,8 @@ The function is provided as a convenience for modifying or viewing domainsets that are not accessible via .Xr cpuset 2 . -It is intended for use with +It is intended for use with .Xr sysctl 9 . -.Pp .Sh SEE ALSO .Xr cpuset 1 , .Xr cpuset 2 , From owner-svn-src-stable-12@freebsd.org Tue Sep 22 18:18:58 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46DD13F23C7; Tue, 22 Sep 2020 18:18:58 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwqM61BPTz4Qf8; Tue, 22 Sep 2020 18:18:58 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0780A236AE; Tue, 22 Sep 2020 18:18:58 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MIIvpt097023; Tue, 22 Sep 2020 18:18:57 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MIIvd0097022; Tue, 22 Sep 2020 18:18:57 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <202009221818.08MIIvd0097022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Tue, 22 Sep 2020 18:18:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366009 - stable/12/release/tools X-SVN-Group: stable-12 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/12/release/tools X-SVN-Commit-Revision: 366009 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 18:18:58 -0000 Author: cperciva Date: Tue Sep 22 18:18:57 2020 New Revision: 366009 URL: https://svnweb.freebsd.org/changeset/base/366009 Log: Revert r361645. The current quarterly ports branch contains ebsnvme-id, so packages are now available for all architectures. (Direct commit to stable/12 since r361645 never happened in HEAD.) Modified: stable/12/release/tools/ec2.conf Modified: stable/12/release/tools/ec2.conf ============================================================================== --- stable/12/release/tools/ec2.conf Tue Sep 22 17:30:53 2020 (r366008) +++ stable/12/release/tools/ec2.conf Tue Sep 22 18:18:57 2020 (r366009) @@ -6,14 +6,7 @@ # Packages to install into the image we're creating. This is a deliberately # minimalist set, providing only the packages necessary to bootstrap further # package installation as specified via EC2 user-data. -export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs dual-dhclient-daemon" - -# This package isn't currently (2020-05-29) available for aarch64 since it is -# not yet in the "quarterly" branch. Some time after 2020-07-01 this can be -# made unconditional. -if [ "${TARGET_ARCH}" = "amd64" ]; then - export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ebsnvme-id" -fi +export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs dual-dhclient-daemon ebsnvme-id" # Include the amazon-ssm-agent package in amd64 images, since some users want # to be able to use it on systems which are not connected to the Internet. From owner-svn-src-stable-12@freebsd.org Tue Sep 22 20:04:58 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFB803F4C52; Tue, 22 Sep 2020 20:04:58 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwsjQ4f2Sz4Y7P; Tue, 22 Sep 2020 20:04:58 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8288324D1A; Tue, 22 Sep 2020 20:04:58 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MK4wo8065710; Tue, 22 Sep 2020 20:04:58 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MK4w0k065709; Tue, 22 Sep 2020 20:04:58 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202009222004.08MK4w0k065709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 22 Sep 2020 20:04:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366010 - stable/12/tests/sys/opencrypto X-SVN-Group: stable-12 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: stable/12/tests/sys/opencrypto X-SVN-Commit-Revision: 366010 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 20:04:58 -0000 Author: lwhsu Date: Tue Sep 22 20:04:57 2020 New Revision: 366010 URL: https://svnweb.freebsd.org/changeset/base/366010 Log: MFC r346623 (by ngie): Chase PEP-3110 Replace `except Environment, e:` with `except Environment as e` for compatibility between python 2.x and python 3.x. While here, fix a bad indentation change from r346620 by reindenting the code properly. Sponsored by: The FreeBSD Foundation Modified: stable/12/tests/sys/opencrypto/cryptotest.py Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/opencrypto/cryptotest.py ============================================================================== --- stable/12/tests/sys/opencrypto/cryptotest.py Tue Sep 22 18:18:57 2020 (r366009) +++ stable/12/tests/sys/opencrypto/cryptotest.py Tue Sep 22 20:04:57 2020 (r366010) @@ -126,7 +126,7 @@ def GenTestCase(cname): mac=self._gmacsizes[len(cipherkey)], mackey=cipherkey, crid=crid, maclen=16) - except EnvironmentError, e: + except EnvironmentError as e: # Can't test algorithms the driver does not support. if e.errno != errno.EOPNOTSUPP: raise @@ -135,7 +135,7 @@ def GenTestCase(cname): if mode == 'ENCRYPT': try: rct, rtag = c.encrypt(pt, iv, aad) - except EnvironmentError, e: + except EnvironmentError as e: # Can't test inputs the driver does not support. if e.errno != errno.EINVAL: raise @@ -155,7 +155,7 @@ def GenTestCase(cname): else: try: rpt, rtag = c.decrypt(*args) - except EnvironmentError, e: + except EnvironmentError as e: # Can't test inputs the driver does not support. if e.errno != errno.EINVAL: raise @@ -223,7 +223,7 @@ def GenTestCase(cname): try: c = Crypto(meth, cipherkey, crid=crid) r = curfun(c, pt, iv) - except EnvironmentError, e: + except EnvironmentError as e: # Can't test hashes the driver does not support. if e.errno != errno.EOPNOTSUPP: raise @@ -254,7 +254,7 @@ def GenTestCase(cname): mackey=key, maclen=16) r, tag = Crypto.encrypt(c, payload, nonce, aad) - except EnvironmentError, e: + except EnvironmentError as e: if e.errno != errno.EOPNOTSUPP: raise continue @@ -296,7 +296,7 @@ def GenTestCase(cname): key=key, mac=cryptodev.CRYPTO_AES_CCM_CBC_MAC, mackey=key, maclen=16) - except EnvironmentError, e: + except EnvironmentError as e: if e.errno != errno.EOPNOTSUPP: raise continue @@ -390,13 +390,13 @@ def GenTestCase(cname): for data in lines: msg = data['Msg'].decode('hex') - msg = msg[:int(data['Len'])] + msg = msg[:int(data['Len'])] md = data['MD'].decode('hex') try: c = Crypto(mac=alg, crid=crid, maclen=hashlen) - except EnvironmentError, e: + except EnvironmentError as e: # Can't test hashes the driver does not support. if e.errno != errno.EOPNOTSUPP: raise @@ -453,7 +453,7 @@ def GenTestCase(cname): try: c = Crypto(mac=alg, mackey=key, crid=crid, maclen=hashlen) - except EnvironmentError, e: + except EnvironmentError as e: # Can't test hashes the driver does not support. if e.errno != errno.EOPNOTSUPP: raise From owner-svn-src-stable-12@freebsd.org Tue Sep 22 21:16:05 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62E643F7171; Tue, 22 Sep 2020 21:16:05 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwvHT219Zz4fKW; Tue, 22 Sep 2020 21:16:05 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2840E25B77; Tue, 22 Sep 2020 21:16:05 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MLG5g2009769; Tue, 22 Sep 2020 21:16:05 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MLG3qa009762; Tue, 22 Sep 2020 21:16:03 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202009222116.08MLG3qa009762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 22 Sep 2020 21:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366013 - in stable/12: lib lib/libnetmap share/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: in stable/12: lib lib/libnetmap share/mk X-SVN-Commit-Revision: 366013 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 21:16:05 -0000 Author: vmaffione Date: Tue Sep 22 21:16:03 2020 New Revision: 366013 URL: https://svnweb.freebsd.org/changeset/base/366013 Log: MFC r364936, r365023 lib: add libnetmap This changeset introduces the new libnetmap library for writing netmap applications. Before libnetmap, applications could either use the kernel API directly (e.g. NIOCREGIF/NIOCCTRL) or the simple header-only-library netmap_user.h (e.g. nm_open(), nm_close(), nm_mmap() etc.) The new library offers more functionalities than netmap_user.h: - Support for complex netmap options, such as external memory allocators or per-buffer offsets. This opens the way to future extensions. - More flexibility in the netmap port bind options, such as non-numeric names for pipes, or the ability to specify the netmap allocator that must be used for a given port. - Automatic tracking of the netmap memory regions in use across the open ports. At the moment there is no man page, but the libnetmap.h header file has in-depth documentation. Reviewed by: hrs Differential Revision: https://reviews.freebsd.org/D26171 Added: stable/12/lib/libnetmap/ - copied from r364936, head/lib/libnetmap/ Modified: stable/12/lib/Makefile stable/12/lib/libnetmap/nmctx-pthreads.c stable/12/lib/libnetmap/nmctx.c stable/12/lib/libnetmap/nmport.c stable/12/lib/libnetmap/nmreq.c stable/12/share/mk/bsd.libnames.mk stable/12/share/mk/src.libnames.mk Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/Makefile ============================================================================== --- stable/12/lib/Makefile Tue Sep 22 21:13:26 2020 (r366012) +++ stable/12/lib/Makefile Tue Sep 22 21:16:03 2020 (r366013) @@ -66,6 +66,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libmt \ lib80211 \ libnetbsd \ + libnetmap \ libnv \ libopenbsd \ libopie \ Modified: stable/12/lib/libnetmap/nmctx-pthreads.c ============================================================================== --- head/lib/libnetmap/nmctx-pthreads.c Fri Aug 28 20:03:54 2020 (r364936) +++ stable/12/lib/libnetmap/nmctx-pthreads.c Tue Sep 22 21:16:03 2020 (r366013) @@ -1,4 +1,34 @@ -/* $FreeBSD$ */ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (C) 2018 Universita` di Pisa + * 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$ + */ + #include #include #include Modified: stable/12/lib/libnetmap/nmctx.c ============================================================================== --- head/lib/libnetmap/nmctx.c Fri Aug 28 20:03:54 2020 (r364936) +++ stable/12/lib/libnetmap/nmctx.c Tue Sep 22 21:16:03 2020 (r366013) @@ -1,4 +1,34 @@ -/* $FreeBSD$ */ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (C) 2018 Universita` di Pisa + * 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$ + */ + #include #include #include Modified: stable/12/lib/libnetmap/nmport.c ============================================================================== --- head/lib/libnetmap/nmport.c Fri Aug 28 20:03:54 2020 (r364936) +++ stable/12/lib/libnetmap/nmport.c Tue Sep 22 21:16:03 2020 (r366013) @@ -1,4 +1,34 @@ -/* $FreeBSD$ */ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (C) 2018 Universita` di Pisa + * 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$ + */ + #include #include #include Modified: stable/12/lib/libnetmap/nmreq.c ============================================================================== --- head/lib/libnetmap/nmreq.c Fri Aug 28 20:03:54 2020 (r364936) +++ stable/12/lib/libnetmap/nmreq.c Tue Sep 22 21:16:03 2020 (r366013) @@ -1,4 +1,34 @@ -/* $FreeBSD$ */ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (C) 2018 Universita` di Pisa + * 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$ + */ + #include #include #include Modified: stable/12/share/mk/bsd.libnames.mk ============================================================================== --- stable/12/share/mk/bsd.libnames.mk Tue Sep 22 21:13:26 2020 (r366012) +++ stable/12/share/mk/bsd.libnames.mk Tue Sep 22 21:16:03 2020 (r366013) @@ -109,6 +109,7 @@ LIBNANDFS?= ${LIBDESTDIR}${LIBDIR_BASE}/libnandfs.a LIBNCURSES?= ${LIBDESTDIR}${LIBDIR_BASE}/libncurses.a LIBNCURSESW?= ${LIBDESTDIR}${LIBDIR_BASE}/libncursesw.a LIBNETGRAPH?= ${LIBDESTDIR}${LIBDIR_BASE}/libnetgraph.a +LIBNETMAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libnetmap.a LIBNGATM?= ${LIBDESTDIR}${LIBDIR_BASE}/libngatm.a LIBNV?= ${LIBDESTDIR}${LIBDIR_BASE}/libnv.a LIBNVPAIR?= ${LIBDESTDIR}${LIBDIR_BASE}/libnvpair.a Modified: stable/12/share/mk/src.libnames.mk ============================================================================== --- stable/12/share/mk/src.libnames.mk Tue Sep 22 21:13:26 2020 (r366012) +++ stable/12/share/mk/src.libnames.mk Tue Sep 22 21:16:03 2020 (r366013) @@ -139,6 +139,7 @@ _LIBRARIES= \ ncurses \ ncursesw \ netgraph \ + netmap \ ngatm \ nv \ nvpair \ @@ -363,6 +364,7 @@ _DP_zfs= md pthread umem util uutil m nvpair avl bsdxm _DP_zfs_core= nvpair _DP_zpool= md pthread z nvpair avl umem _DP_be= zfs nvpair +_DP_netmap= # OFED support .if ${MK_OFED} != "no" From owner-svn-src-stable-12@freebsd.org Tue Sep 22 21:43:44 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F38133E0640; Tue, 22 Sep 2020 21:43:44 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwvvN66P5z3Sq9; Tue, 22 Sep 2020 21:43:44 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACBAF25DAA; Tue, 22 Sep 2020 21:43:44 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MLhiK1028980; Tue, 22 Sep 2020 21:43:44 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MLhiRZ028978; Tue, 22 Sep 2020 21:43:44 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202009222143.08MLhiRZ028978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 22 Sep 2020 21:43:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366014 - in stable/12/sys: dev/bnxt dev/vmware/vmxnet3 net X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: in stable/12/sys: dev/bnxt dev/vmware/vmxnet3 net X-SVN-Commit-Revision: 366014 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 21:43:45 -0000 Author: vmaffione Date: Tue Sep 22 21:43:43 2020 New Revision: 366014 URL: https://svnweb.freebsd.org/changeset/base/366014 Log: MFC r365061 iflib: leave only 1 receive descriptor unused The pidx argument of isc_rxd_flush() indicates which is the last valid receive descriptor to be used by the NIC. However, current code has multiple issues: - Intel drivers write pidx to their RDT register, which means that NICs will only use the descriptors up to pidx-1 (modulo ring size N), and won't actually use the one pointed by pidx. This does not break reception, but it is anyway confusing and suboptimal (the NIC will actually see only N-2 descriptors as available, rather than N-1). Other drivers (if_vmx, if_bnxt, if_mgb) adhere to this semantic. - The semantic used by Intel (RDT is one descriptor past the last valid one) is used by most (if not all) NICs, and it is also used on the TX side (also in iflib). Since iflib is not currently using this semantic for RX, it must decrement fl->ifl_pidx (modulo N) before calling isc_rxd_flush(), and then the per-driver callback implementation must increment the index again (to match the real semantic). This is confusing and suboptimal. - The iflib refill function is also called at initialization. However, in case the ring size is smaller than 128 (e.g. if_mgb), the refill function will actually prepare all the receive descriptors (N), without leaving one unused, as most of NICs assume (e.g. to avoid RDT to overrun RDH). I can speculate that the code looks like this right now because this issue showed up during testing (e.g. with if_mgb), and it was easy to workaround by decrementing pidx before isc_rxd_flush(). The goal of this change is to simplify the code (removing a bunch of instructions from the RX fast path), and to make the semantic of isc_rxd_flush() consistent across drivers. To achieve this, we: - change the semantics of the pidx argument to the usual one (that is the index one past the last valid one), so that both iflib and drivers avoid the decrement/increment dance. - fix the initialization code to prepare at most N-1 descriptors. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D26191 Modified: stable/12/sys/dev/bnxt/bnxt_txrx.c stable/12/sys/dev/vmware/vmxnet3/if_vmx.c stable/12/sys/net/iflib.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/bnxt/bnxt_txrx.c ============================================================================== --- stable/12/sys/dev/bnxt/bnxt_txrx.c Tue Sep 22 21:16:03 2020 (r366013) +++ stable/12/sys/dev/bnxt/bnxt_txrx.c Tue Sep 22 21:43:43 2020 (r366014) @@ -316,10 +316,9 @@ bnxt_isc_rxd_flush(void *sc, uint16_t rxqid, uint8_t f if (softc->rx_cp_rings[rxqid].cons != UINT32_MAX) BNXT_CP_IDX_DISABLE_DB(&softc->rx_cp_rings[rxqid].ring, softc->rx_cp_rings[rxqid].cons); - /* We're given the last filled RX buffer here, not the next empty one */ - BNXT_RX_DB(rx_ring, RING_NEXT(rx_ring, pidx)); + BNXT_RX_DB(rx_ring, pidx); /* TODO: Cumulus+ doesn't need the double doorbell */ - BNXT_RX_DB(rx_ring, RING_NEXT(rx_ring, pidx)); + BNXT_RX_DB(rx_ring, pidx); return; } Modified: stable/12/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- stable/12/sys/dev/vmware/vmxnet3/if_vmx.c Tue Sep 22 21:16:03 2020 (r366013) +++ stable/12/sys/dev/vmware/vmxnet3/if_vmx.c Tue Sep 22 21:43:43 2020 (r366014) @@ -1744,13 +1744,6 @@ vmxnet3_isc_rxd_flush(void *vsc, uint16_t rxqid, uint8 else r = VMXNET3_BAR0_RXH2(rxqid); - /* - * pidx is the index of the last descriptor with a buffer the device - * can use, and the device needs to be told which index is one past - * that. - */ - if (++pidx == rxr->vxrxr_ndesc) - pidx = 0; vmxnet3_write_bar0(sc, r, pidx); } Modified: stable/12/sys/net/iflib.c ============================================================================== --- stable/12/sys/net/iflib.c Tue Sep 22 21:16:03 2020 (r366013) +++ stable/12/sys/net/iflib.c Tue Sep 22 21:43:43 2020 (r366014) @@ -2030,7 +2030,8 @@ _rxq_refill_cb(void *arg, bus_dma_segment_t *segs, int * @count: the number of new buffers to allocate * * (Re)populate an rxq free-buffer list with up to @count new packet buffers. - * The caller must assure that @count does not exceed the queue's capacity. + * The caller must assure that @count does not exceed the queue's capacity + * minus one (since we always leave a descriptor unavailable). */ static uint8_t iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int count) @@ -2045,6 +2046,8 @@ iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int count int err, frag_idx, i, idx, n, pidx; qidx_t credits; + MPASS(count <= fl->ifl_size - fl->ifl_credits - 1); + sd_m = fl->ifl_sds.ifsd_m; sd_map = fl->ifl_sds.ifsd_map; sd_cl = fl->ifl_sds.ifsd_cl; @@ -2151,15 +2154,10 @@ iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int count fl->ifl_credits = credits; } DBG_COUNTER_INC(rxd_flush); - if (fl->ifl_pidx == 0) - pidx = fl->ifl_size - 1; - else - pidx = fl->ifl_pidx - 1; - bus_dmamap_sync(fl->ifl_ifdi->idi_tag, fl->ifl_ifdi->idi_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); ctx->isc_rxd_flush(ctx->ifc_softc, fl->ifl_rxq->ifr_id, - fl->ifl_id, pidx); + fl->ifl_id, fl->ifl_pidx); if (__predict_true(bit_test(fl->ifl_rx_bitmap, frag_idx))) { fl->ifl_fragidx = frag_idx + 1; if (fl->ifl_fragidx == fl->ifl_size) @@ -2175,7 +2173,17 @@ iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int count static inline uint8_t iflib_fl_refill_all(if_ctx_t ctx, iflib_fl_t fl) { - /* we avoid allowing pidx to catch up with cidx as it confuses ixl */ + /* + * We leave an unused descriptor to avoid pidx to catch up with cidx. + * This is important as it confuses most NICs. For instance, + * Intel NICs have (per receive ring) RDH and RDT registers, where + * RDH points to the next receive descriptor to be used by the NIC, + * and RDT for the next receive descriptor to be published by the + * driver to the NIC (RDT - 1 is thus the last valid one). + * The condition RDH == RDT means no descriptors are available to + * the NIC, and thus it would be ambiguous if it also meant that + * all the descriptors are available to the NIC. + */ int32_t reclaimable = fl->ifl_size - fl->ifl_credits - 1; #ifdef INVARIANTS int32_t delta = fl->ifl_size - get_inuse(fl->ifl_size, fl->ifl_cidx, fl->ifl_pidx, fl->ifl_gen) - 1; @@ -2280,12 +2288,15 @@ iflib_fl_setup(iflib_fl_t fl) fl->ifl_zone = m_getzone(fl->ifl_buf_size); - /* avoid pre-allocating zillions of clusters to an idle card - * potentially speeding up attach + /* + * Avoid pre-allocating zillions of clusters to an idle card + * potentially speeding up attach. In any case make sure + * to leave a descriptor unavailable. See the comment in + * iflib_fl_refill_all(). */ - (void)iflib_fl_refill(ctx, fl, min(128, fl->ifl_size)); - MPASS(min(128, fl->ifl_size) == fl->ifl_credits); - if (min(128, fl->ifl_size) != fl->ifl_credits) + MPASS(fl->ifl_size > 0); + (void)iflib_fl_refill(ctx, fl, min(128, fl->ifl_size - 1)); + if (min(128, fl->ifl_size - 1) != fl->ifl_credits) return (ENOBUFS); /* * handle failure From owner-svn-src-stable-12@freebsd.org Tue Sep 22 23:13:29 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB2933E3C98; Tue, 22 Sep 2020 23:13:29 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwxtx5QlSz3bc7; Tue, 22 Sep 2020 23:13:29 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 842E026F4C; Tue, 22 Sep 2020 23:13:29 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08MNDTAq084581; Tue, 22 Sep 2020 23:13:29 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08MNDT7v084580; Tue, 22 Sep 2020 23:13:29 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <202009222313.08MNDT7v084580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Tue, 22 Sep 2020 23:13:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366028 - stable/12/release/tools X-SVN-Group: stable-12 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/12/release/tools X-SVN-Commit-Revision: 366028 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 23:13:29 -0000 Author: cperciva Date: Tue Sep 22 23:13:29 2020 New Revision: 366028 URL: https://svnweb.freebsd.org/changeset/base/366028 Log: MFC r365696: Spawn the DHCPv6 client in EC2 instances via rtsold. Modified: stable/12/release/tools/ec2.conf Directory Properties: stable/12/ (props changed) Modified: stable/12/release/tools/ec2.conf ============================================================================== --- stable/12/release/tools/ec2.conf Tue Sep 22 23:02:01 2020 (r366027) +++ stable/12/release/tools/ec2.conf Tue Sep 22 23:13:29 2020 (r366028) @@ -6,7 +6,7 @@ # Packages to install into the image we're creating. This is a deliberately # minimalist set, providing only the packages necessary to bootstrap further # package installation as specified via EC2 user-data. -export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs dual-dhclient-daemon ebsnvme-id" +export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client ebsnvme-id" # Include the amazon-ssm-agent package in amd64 images, since some users want # to be able to use it on systems which are not connected to the Internet. @@ -63,9 +63,19 @@ vm_extra_pre_umount() { # via EC2 user-data. echo 'firstboot_pkgs_list="awscli"' >> ${DESTDIR}/etc/rc.conf - # Enable IPv6 on all interfaces, and use DHCP on both IPv4 and IPv6. + # Enable IPv6 on all interfaces, and spawn DHCPv6 via rtsold echo 'ipv6_activate_all_interfaces="YES"' >> ${DESTDIR}/etc/rc.conf - echo 'dhclient_program="/usr/local/sbin/dual-dhclient"' >> ${DESTDIR}/etc/rc.conf + echo 'rtsold_enable="YES"' >> ${DESTDIR}/etc/rc.conf + echo 'rtsold_flags="-M /usr/local/libexec/rtsold-M -a"' >> ${DESTDIR}/etc/rc.conf + + # Provide a script which rtsold can use to launch DHCPv6 + mkdir -p ${DESTDIR}/usr/local/libexec + cat > ${DESTDIR}/usr/local/libexec/rtsold-M <<'EOF' +#!/bin/sh + +/usr/local/sbin/dhclient -6 -nw -N -cf /dev/null $1 +EOF + chmod 755 ${DESTDIR}/usr/local/libexec/rtsold-M # The EC2 console is output-only, so while printing a backtrace can # be useful, there's no point dropping into a debugger or waiting From owner-svn-src-stable-12@freebsd.org Wed Sep 23 01:49:51 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47BD73E8D2E; Wed, 23 Sep 2020 01:49:51 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bx1MM1BZZz447d; Wed, 23 Sep 2020 01:49:51 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0BE958C62; Wed, 23 Sep 2020 01:49:51 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N1nojH078941; Wed, 23 Sep 2020 01:49:50 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N1nobY078940; Wed, 23 Sep 2020 01:49:50 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202009230149.08N1nobY078940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 23 Sep 2020 01:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366050 - stable/12/sys/fs/nfsserver X-SVN-Group: stable-12 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/12/sys/fs/nfsserver X-SVN-Commit-Revision: 366050 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 01:49:51 -0000 Author: rmacklem Date: Wed Sep 23 01:49:50 2020 New Revision: 366050 URL: https://svnweb.freebsd.org/changeset/base/366050 Log: MFC: r365789 Fix a LOR between the NFS server and server side krpc. Recent testing of the NFS-over-TLS code found a LOR between the mutex lock used for sessions and the sleep lock used for server side krpc socket structures. The code in nfsrv_checksequence() would call SVC_RELEASE() with the mutex held. Normally this is ok, since all that happens is SVC_RELEASE() decrements a reference count. However, if the socket has just been shut down, SVC_RELEASE() drops the reference count to 0 and acquires a sleep lock during destruction of the server side krpc structure. This patch fixes the problem by moving the SVC_RELEASE() call in nfsrv_checksequence() down a few lines to below where the mutex is released. Modified: stable/12/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/12/sys/fs/nfsserver/nfs_nfsdstate.c Wed Sep 23 01:49:37 2020 (r366049) +++ stable/12/sys/fs/nfsserver/nfs_nfsdstate.c Wed Sep 23 01:49:50 2020 (r366050) @@ -6214,6 +6214,7 @@ nfsrv_checksequence(struct nfsrv_descript *nd, uint32_ * bound as well, do the implicit binding unless a * BindConnectiontoSession has already been done on the session. */ + savxprt = NULL; if (sep->sess_clp->lc_req.nr_client != NULL && sep->sess_cbsess.nfsess_xprt != nd->nd_xprt && (sep->sess_crflags & NFSV4CRSESS_CONNBACKCHAN) != 0 && @@ -6226,14 +6227,14 @@ nfsrv_checksequence(struct nfsrv_descript *nd, uint32_ sep->sess_clp->lc_req.nr_client->cl_private; nd->nd_xprt->xp_idletimeout = 0; /* Disable timeout. */ sep->sess_cbsess.nfsess_xprt = nd->nd_xprt; - if (savxprt != NULL) - SVC_RELEASE(savxprt); } *sflagsp = 0; if (sep->sess_clp->lc_req.nr_client == NULL) *sflagsp |= NFSV4SEQ_CBPATHDOWN; NFSUNLOCKSESSION(shp); + if (savxprt != NULL) + SVC_RELEASE(savxprt); if (error == NFSERR_EXPIRED) { *sflagsp |= NFSV4SEQ_EXPIREDALLSTATEREVOKED; error = 0; From owner-svn-src-stable-12@freebsd.org Wed Sep 23 09:58:49 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A98F73F4407; Wed, 23 Sep 2020 09:58:49 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxDCY3sYZz4YJx; Wed, 23 Sep 2020 09:58:49 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63FDDE5E8; Wed, 23 Sep 2020 09:58:49 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08N9wnmf081672; Wed, 23 Sep 2020 09:58:49 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08N9wn8F081670; Wed, 23 Sep 2020 09:58:49 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202009230958.08N9wn8F081670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Wed, 23 Sep 2020 09:58:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366067 - in stable/12/sys/dev/usb: . net X-SVN-Group: stable-12 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: in stable/12/sys/dev/usb: . net X-SVN-Commit-Revision: 366067 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 09:58:49 -0000 Author: lwhsu Date: Wed Sep 23 09:58:48 2020 New Revision: 366067 URL: https://svnweb.freebsd.org/changeset/base/366067 Log: MFC r365444: Add support to BELKIN B2B128 USB3 Ethernet Adapter to axge(4) Github PR: https://github.com/freebsd/freebsd/pull/439 Submitted by: https://github.com/jdpc86 Modified: stable/12/sys/dev/usb/net/if_axge.c stable/12/sys/dev/usb/usbdevs Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/net/if_axge.c ============================================================================== --- stable/12/sys/dev/usb/net/if_axge.c Wed Sep 23 08:22:14 2020 (r366066) +++ stable/12/sys/dev/usb/net/if_axge.c Wed Sep 23 09:58:48 2020 (r366067) @@ -69,6 +69,7 @@ static const STRUCT_USB_HOST_ID axge_devs[] = { #define AXGE_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } AXGE_DEV(ASIX, AX88178A), AXGE_DEV(ASIX, AX88179), + AXGE_DEV(BELKIN, B2B128), AXGE_DEV(DLINK, DUB1312), AXGE_DEV(LENOVO, GIGALAN), AXGE_DEV(SITECOMEU, LN032), Modified: stable/12/sys/dev/usb/usbdevs ============================================================================== --- stable/12/sys/dev/usb/usbdevs Wed Sep 23 08:22:14 2020 (r366066) +++ stable/12/sys/dev/usb/usbdevs Wed Sep 23 09:58:48 2020 (r366067) @@ -1367,6 +1367,7 @@ product BELKIN F5U109 0x0109 F5U109 Serial product BELKIN USB2SCSI 0x0115 USB to SCSI product BELKIN F8T012 0x0121 F8T012xx1 Bluetooth USB Adapter product BELKIN USB2LAN 0x0121 USB to LAN +product BELKIN B2B128 0x0128 USB3 to LAN product BELKIN F5U208 0x0208 F5U208 VideoBus II product BELKIN F5U237 0x0237 F5U237 USB 2.0 7-Port Hub product BELKIN F5U257 0x0257 F5U257 Serial From owner-svn-src-stable-12@freebsd.org Wed Sep 23 12:11:15 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 01B883F7DC6; Wed, 23 Sep 2020 12:11:15 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxH8L6fdzz4kWh; Wed, 23 Sep 2020 12:11:14 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C88A0103A3; Wed, 23 Sep 2020 12:11:14 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NCBECu069031; Wed, 23 Sep 2020 12:11:14 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NCBEZ9069030; Wed, 23 Sep 2020 12:11:14 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202009231211.08NCBEZ9069030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Wed, 23 Sep 2020 12:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366073 - stable/12/tests/sys/opencrypto X-SVN-Group: stable-12 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: stable/12/tests/sys/opencrypto X-SVN-Commit-Revision: 366073 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 12:11:15 -0000 Author: lwhsu Date: Wed Sep 23 12:11:14 2020 New Revision: 366073 URL: https://svnweb.freebsd.org/changeset/base/366073 Log: MFC r347996, r348024, r348031, r348042 (by ngie) r347996: Replace uses of `foo.(de|en)code('hex')` with `binascii.(un)?hexlify(foo)` Python 3 no longer doesn't support encoding/decoding hexadecimal numbers using the `str.format` method. The backwards compatible new method (using the binascii module/methods) is a comparable means of converting to/from hexadecimal format. In short, the functional change is the following: * `foo.decode('hex')` -> `binascii.unhexlify(foo)` * `foo.encode('hex')` -> `binascii.hexlify(foo)` While here, move the dpkt import in `cryptodev.py` down per PEP8, so it comes after the standard library provided imports. PR: 237403 r348024: Followup to r347996 Replace uses of `foo.encode("hex")` with `binascii.hexlify(foo)` for forwards compatibility between python 2.x and python 3. PR: 237403 r348031: Squash deprecation warning related to array.array(..).tostring() In version 3.2+, `array.array(..).tostring()` was renamed to `array.array(..).tobytes()`. Conditionally call `array.array(..).tobytes()` if the python version is 3.2+. PR: 237403 r348042: Fix encoding issues with python 3 In python 3, the default encoding was switched from ascii character sets to unicode character sets in order to support internationalization by default. Some interfaces, like ioctls and packets, however, specify data in terms of non-unicode encodings formats, either in host endian (`fcntl.ioctl`) or network endian (`dpkt`) byte order/format. This change alters assumptions made by previous code where it was all data objects were assumed to be basestrings, when they should have been treated as byte arrays. In order to achieve this the following are done: * str objects with encodings needing to be encoded as ascii byte arrays are done so via `.encode("ascii")`. In order for this to work on python 3 in a type agnostic way (as it anecdotally varied depending on the caller), call `.encode("ascii")` only on str objects with python 3 to cast them to ascii byte arrays in a helper function name `str_to_ascii(..)`. * `dpkt.Packet` objects needing to be passed in to `fcntl.ioctl(..)` are done so by casting them to byte arrays via `bytes()`, which calls `dpkt.Packet__str__` under the covers and does the necessary str to byte array conversion needed for the `dpkt` APIs and `struct` module. In order to accomodate this change, apply the necessary typecasting for the byte array literal in order to search `fop.name` for nul bytes. This resolves all remaining python 2.x and python 3.x compatibility issues on amd64. More work needs to be done for the tests to function with i386, in general (this is a legacy issue). PR: 237403 Tested with: python 2.7.16 (amd64), python 3.6.8 (amd64) Modified: stable/12/tests/sys/opencrypto/cryptodev.py stable/12/tests/sys/opencrypto/cryptotest.py Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/opencrypto/cryptodev.py ============================================================================== --- stable/12/tests/sys/opencrypto/cryptodev.py Wed Sep 23 11:02:23 2020 (r366072) +++ stable/12/tests/sys/opencrypto/cryptodev.py Wed Sep 23 12:11:14 2020 (r366073) @@ -32,13 +32,16 @@ import array -import dpkt +import binascii from fcntl import ioctl import os import platform import signal from struct import pack as _pack +import sys +import dpkt + from cryptodevh import * __all__ = [ 'Crypto', 'MismatchError', ] @@ -131,22 +134,33 @@ def _getdev(): _cryptodev = _getdev() +def str_to_ascii(val): + if sys.version_info[0] >= 3: + if isinstance(val, str): + return val.encode("ascii") + return val; + def _findop(crid, name): fop = FindOp() fop.crid = crid - fop.name = name + fop.name = str_to_ascii(name) s = array.array('B', fop.pack_hdr()) ioctl(_cryptodev, CIOCFINDDEV, s, 1) fop.unpack(s) try: - idx = fop.name.index('\x00') + idx = fop.name.index(b'\x00') name = fop.name[:idx] except ValueError: name = fop.name return fop.crid, name +def array_tobytes(array_obj): + if sys.version_info[:2] >= (3, 2): + return array_obj.tobytes() + return array_obj.tostring() + class Crypto: @staticmethod def findcrid(name): @@ -208,15 +222,15 @@ class Crypto: if self._maclen is not None: m = array.array('B', [0] * self._maclen) cop.mac = m.buffer_info()[0] - ivbuf = array.array('B', iv) + ivbuf = array.array('B', str_to_ascii(iv)) cop.iv = ivbuf.buffer_info()[0] #print('cop:', cop) - ioctl(_cryptodev, CIOCCRYPT, str(cop)) + ioctl(_cryptodev, CIOCCRYPT, bytes(cop)) - s = s.tostring() + s = array_tobytes(s) if self._maclen is not None: - return s, m.tostring() + return s, array_tobytes(m) return s @@ -226,6 +240,7 @@ class Crypto: caead.op = op caead.flags = CRD_F_IV_EXPLICIT caead.flags = 0 + src = str_to_ascii(src) caead.len = len(src) s = array.array('B', src) caead.src = caead.dst = s.buffer_info()[0] @@ -236,6 +251,7 @@ class Crypto: if self._maclen is None: raise ValueError('must have a tag length') + tag = str_to_ascii(tag) if tag is None: tag = array.array('B', [0] * self._maclen) else: @@ -249,17 +265,18 @@ class Crypto: caead.ivlen = len(iv) caead.iv = ivbuf.buffer_info()[0] - ioctl(_cryptodev, CIOCCRYPTAEAD, str(caead)) + ioctl(_cryptodev, CIOCCRYPTAEAD, bytes(caead)) - s = s.tostring() + s = array_tobytes(s) - return s, tag.tostring() + return s, array_tobytes(tag) def perftest(self, op, size, timeo=3): import random import time inp = array.array('B', (random.randint(0, 255) for x in xrange(size))) + inp = str_to_ascii(inp) out = array.array('B', inp) # prep ioctl @@ -286,8 +303,9 @@ class Crypto: start = time.time() reps = 0 + cop = bytes(cop) while not exit[0]: - ioctl(_cryptodev, CIOCCRYPT, str(cop)) + ioctl(_cryptodev, CIOCCRYPT, cop) reps += 1 end = time.time() @@ -494,7 +512,7 @@ class KATCCMParser: def _spdechex(s): - return ''.join(s.split()).decode('hex') + return binascii.hexlify(''.join(s.split())) if __name__ == '__main__': if True: @@ -526,15 +544,15 @@ if __name__ == '__main__': c = Crypto(CRYPTO_AES_ICM, key) enc = c.encrypt(pt, iv) - print('enc:', enc.encode('hex')) - print(' ct:', ct.encode('hex')) + print('enc:', binascii.hexlify(enc)) + print(' ct:', binascii.hexlify(ct)) assert ct == enc dec = c.decrypt(ct, iv) - print('dec:', dec.encode('hex')) - print(' pt:', pt.encode('hex')) + print('dec:', binascii.hexlify(dec)) + print(' pt:', binascii.hexlify(pt)) assert pt == dec elif False: @@ -547,15 +565,15 @@ if __name__ == '__main__': c = Crypto(CRYPTO_AES_ICM, key) enc = c.encrypt(pt, iv) - print('enc:', enc.encode('hex')) - print(' ct:', ct.encode('hex')) + print('enc:', binascii.hexlify(enc)) + print(' ct:', binascii.hexlify(ct)) assert ct == enc dec = c.decrypt(ct, iv) - print('dec:', dec.encode('hex')) - print(' pt:', pt.encode('hex')) + print('dec:', binascii.hexlify(dec)) + print(' pt:', binascii.hexlify(pt)) assert pt == dec elif False: @@ -567,15 +585,15 @@ if __name__ == '__main__': enc = c.encrypt(pt, iv) - print('enc:', enc.encode('hex')) - print(' ct:', ct.encode('hex')) + print('enc:', binascii.hexlify(enc)) + print(' ct:', binascii.hexlify(ct)) assert ct == enc dec = c.decrypt(ct, iv) - print('dec:', dec.encode('hex')) - print(' pt:', pt.encode('hex')) + print('dec:', binascii.hexlify(dec)) + print(' pt:', binascii.hexlify(pt)) assert pt == dec elif False: @@ -593,26 +611,26 @@ if __name__ == '__main__': enc, enctag = c.encrypt(pt, iv, aad=aad) - print('enc:', enc.encode('hex')) - print(' ct:', ct.encode('hex')) + print('enc:', binascii.hexlify(enc)) + print(' ct:', binascii.hexlify(ct)) assert enc == ct - print('etg:', enctag.encode('hex')) - print('tag:', tag.encode('hex')) + print('etg:', binascii.hexlify(enctag)) + print('tag:', binascii.hexlify(tag)) assert enctag == tag # Make sure we get EBADMSG #enctag = enctag[:-1] + 'a' dec, dectag = c.decrypt(ct, iv, aad=aad, tag=enctag) - print('dec:', dec.encode('hex')) - print(' pt:', pt.encode('hex')) + print('dec:', binascii.hexlify(dec)) + print(' pt:', binascii.hexlify(pt)) assert dec == pt - print('dtg:', dectag.encode('hex')) - print('tag:', tag.encode('hex')) + print('dtg:', binascii.hexlify(dectag)) + print('tag:', binascii.hexlify(tag)) assert dectag == tag elif False: @@ -629,27 +647,27 @@ if __name__ == '__main__': enc, enctag = c.encrypt(pt, iv, aad=aad) - print('enc:', enc.encode('hex')) - print(' ct:', ct.encode('hex')) + print('enc:', binascii.hexlify(enc)) + print(' ct:', binascii.hexlify(ct)) assert enc == ct - print('etg:', enctag.encode('hex')) - print('tag:', tag.encode('hex')) + print('etg:', binascii.hexlify(enctag)) + print('tag:', binascii.hexlify(tag)) assert enctag == tag elif False: for i in xrange(100000): - c = Crypto(CRYPTO_AES_XTS, '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex')) - data = '52a42bca4e9425a25bbc8c8bf6129dec'.decode('hex') - ct = '517e602becd066b65fa4f4f56ddfe240'.decode('hex') + c = Crypto(CRYPTO_AES_XTS, binascii.unhexlify('1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382')) + data = binascii.unhexlify('52a42bca4e9425a25bbc8c8bf6129dec') + ct = binascii.unhexlify('517e602becd066b65fa4f4f56ddfe240') iv = _pack('QQ', 71, 0) enc = c.encrypt(data, iv) assert enc == ct elif True: - c = Crypto(CRYPTO_AES_XTS, '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex')) - data = '52a42bca4e9425a25bbc8c8bf6129dec'.decode('hex') - ct = '517e602becd066b65fa4f4f56ddfe240'.decode('hex') + c = Crypto(CRYPTO_AES_XTS, binascii.unhexlify('1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382')) + data = binascii.unhexlify('52a42bca4e9425a25bbc8c8bf6129dec') + ct = binascii.unhexlify('517e602becd066b65fa4f4f56ddfe240') iv = _pack('QQ', 71, 0) enc = c.encrypt(data, iv) @@ -661,7 +679,7 @@ if __name__ == '__main__': #c.perftest(COP_ENCRYPT, 192*1024, reps=30000) else: - key = '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex') + key = binascii.unhexlify('1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382') print('XTS %d testing:' % (len(key) * 8)) c = Crypto(CRYPTO_AES_XTS, key) for i in [ 8192, 192*1024]: Modified: stable/12/tests/sys/opencrypto/cryptotest.py ============================================================================== --- stable/12/tests/sys/opencrypto/cryptotest.py Wed Sep 23 11:02:23 2020 (r366072) +++ stable/12/tests/sys/opencrypto/cryptotest.py Wed Sep 23 12:11:14 2020 (r366073) @@ -108,13 +108,13 @@ def GenTestCase(cname): [ 'Count', 'Key', 'IV', 'CT', 'AAD', 'Tag', 'PT', ]): for data in lines: curcnt = int(data['Count']) - cipherkey = data['Key'].decode('hex') - iv = data['IV'].decode('hex') - aad = data['AAD'].decode('hex') - tag = data['Tag'].decode('hex') + cipherkey = binascii.unhexlify(data['Key']) + iv = binascii.unhexlify(data['IV']) + aad = binascii.unhexlify(data['AAD']) + tag = binascii.unhexlify(data['Tag']) if 'FAIL' not in data: - pt = data['PT'].decode('hex') - ct = data['CT'].decode('hex') + pt = binascii.unhexlify(data['PT']) + ct = binascii.unhexlify(data['CT']) if len(iv) != 12: # XXX - isn't supported @@ -141,8 +141,8 @@ def GenTestCase(cname): raise continue rtag = rtag[:len(tag)] - data['rct'] = rct.encode('hex') - data['rtag'] = rtag.encode('hex') + data['rct'] = binascii.hexlify(rct) + data['rtag'] = binascii.hexlify(rtag) self.assertEqual(rct, ct, repr(data)) self.assertEqual(rtag, tag, repr(data)) else: @@ -160,8 +160,8 @@ def GenTestCase(cname): if e.errno != errno.EINVAL: raise continue - data['rpt'] = rpt.encode('hex') - data['rtag'] = rtag.encode('hex') + data['rpt'] = binascii.hexlify(rpt) + data['rtag'] = binascii.hexlify(rtag) self.assertEqual(rpt, pt, repr(data)) @@ -180,10 +180,10 @@ def GenTestCase(cname): for data in lines: curcnt = int(data['COUNT']) - cipherkey = data['KEY'].decode('hex') - iv = data['IV'].decode('hex') - pt = data['PLAINTEXT'].decode('hex') - ct = data['CIPHERTEXT'].decode('hex') + cipherkey = binascii.unhexlify(data['KEY']) + iv = binascii.unhexlify(data['IV']) + pt = binascii.unhexlify(data['PLAINTEXT']) + ct = binascii.unhexlify(data['CIPHERTEXT']) if swapptct: pt, ct = ct, pt @@ -209,10 +209,10 @@ def GenTestCase(cname): for data in lines: curcnt = int(data['COUNT']) nbits = int(data['DataUnitLen']) - cipherkey = data['Key'].decode('hex') + cipherkey = binascii.unhexlify(data['Key']) iv = struct.pack('QQ', int(data['DataUnitSeqNumber']), 0) - pt = data['PT'].decode('hex') - ct = data['CT'].decode('hex') + pt = binascii.unhexlify(data['PT']) + ct = binascii.unhexlify(data['CT']) if nbits % 128 != 0: # XXX - mark as skipped @@ -236,15 +236,15 @@ def GenTestCase(cname): if Nlen != 12: # OCF only supports 12 byte IVs continue - key = data['Key'].decode('hex') - nonce = data['Nonce'].decode('hex') + key = binascii.unhexlify(data['Key']) + nonce = binascii.unhexlify(data['Nonce']) Alen = int(data['Alen']) if Alen != 0: - aad = data['Adata'].decode('hex') + aad = binascii.unhexlify(data['Adata']) else: aad = None - payload = data['Payload'].decode('hex') - ct = data['CT'].decode('hex') + payload = binascii.unhexlify(data['Payload']) + ct = binascii.unhexlify(data['CT']) try: c = Crypto(crid=crid, @@ -262,7 +262,7 @@ def GenTestCase(cname): out = r + tag self.assertEqual(out, ct, "Count " + data['Count'] + " Actual: " + \ - repr(out.encode("hex")) + " Expected: " + \ + repr(binascii.hexlify(out)) + " Expected: " + \ repr(data) + " on " + cname) def runCCMDecrypt(self, fname): @@ -279,14 +279,14 @@ def GenTestCase(cname): if Tlen != 16: # OCF only supports 16 byte tags continue - key = data['Key'].decode('hex') - nonce = data['Nonce'].decode('hex') + key = binascii.unhexlify(data['Key']) + nonce = binascii.unhexlify(data['Nonce']) Alen = int(data['Alen']) if Alen != 0: - aad = data['Adata'].decode('hex') + aad = binascii.unhexlify(data['Adata']) else: aad = None - ct = data['CT'].decode('hex') + ct = binascii.unhexlify(data['CT']) tag = ct[-16:] ct = ct[:-16] @@ -308,12 +308,12 @@ def GenTestCase(cname): r = Crypto.decrypt(c, payload, nonce, aad, tag) - payload = data['Payload'].decode('hex') + payload = binascii.unhexlify(data['Payload']) Plen = int(data('Plen')) payload = payload[:plen] self.assertEqual(r, payload, "Count " + data['Count'] + \ - " Actual: " + repr(r.encode("hex")) + \ + " Actual: " + repr(binascii.hexlify(r)) + \ " Expected: " + repr(data) + \ " on " + cname) @@ -341,10 +341,10 @@ def GenTestCase(cname): for data in lines: curcnt = int(data['COUNT']) key = data['KEYs'] * 3 - cipherkey = key.decode('hex') - iv = data['IV'].decode('hex') - pt = data['PLAINTEXT'].decode('hex') - ct = data['CIPHERTEXT'].decode('hex') + cipherkey = binascii.unhexlify(key) + iv = binascii.unhexlify(data['IV']) + pt = binascii.unhexlify(data['PLAINTEXT']) + ct = binascii.unhexlify(data['CIPHERTEXT']) if swapptct: pt, ct = ct, pt @@ -389,9 +389,9 @@ def GenTestCase(cname): continue for data in lines: - msg = data['Msg'].decode('hex') + msg = binascii.unhexlify(data['Msg']) msg = msg[:int(data['Len'])] - md = data['MD'].decode('hex') + md = binascii.unhexlify(data['MD']) try: c = Crypto(mac=alg, crid=crid, @@ -405,7 +405,7 @@ def GenTestCase(cname): _, r = c.encrypt(msg, iv="") self.assertEqual(r, md, "Actual: " + \ - repr(r.encode("hex")) + " Expected: " + repr(data) + " on " + cname) + repr(binascii.hexlify(r)) + " Expected: " + repr(data) + " on " + cname) @unittest.skipIf(cname not in shamodules, 'skipping SHA-HMAC on %s' % str(cname)) def test_sha1hmac(self): @@ -442,9 +442,9 @@ def GenTestCase(cname): continue for data in lines: - key = data['Key'].decode('hex') - msg = data['Msg'].decode('hex') - mac = data['Mac'].decode('hex') + key = binascii.unhexlify(data['Key']) + msg = binascii.unhexlify(data['Msg']) + mac = binascii.unhexlify(data['Mac']) tlen = int(data['Tlen']) if len(key) > blocksize: @@ -462,7 +462,7 @@ def GenTestCase(cname): _, r = c.encrypt(msg, iv="") self.assertEqual(r[:tlen], mac, "Actual: " + \ - repr(r.encode("hex")) + " Expected: " + repr(data)) + repr(binascii.hexlify(r)) + " Expected: " + repr(data)) return GendCryptoTestCase From owner-svn-src-stable-12@freebsd.org Wed Sep 23 14:36:42 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 346893FB256; Wed, 23 Sep 2020 14:36:42 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxLNB0wt0z4tvw; Wed, 23 Sep 2020 14:36:42 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02E041208F; Wed, 23 Sep 2020 14:36:42 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NEaf6G059091; Wed, 23 Sep 2020 14:36:41 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NEae5f059083; Wed, 23 Sep 2020 14:36:40 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202009231436.08NEae5f059083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 23 Sep 2020 14:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366076 - in stable: 11/contrib/sqlite3 11/contrib/sqlite3/tea 12/contrib/sqlite3 12/contrib/sqlite3/tea X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/sqlite3 11/contrib/sqlite3/tea 12/contrib/sqlite3 12/contrib/sqlite3/tea X-SVN-Commit-Revision: 366076 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 14:36:42 -0000 Author: cy Date: Wed Sep 23 14:36:38 2020 New Revision: 366076 URL: https://svnweb.freebsd.org/changeset/base/366076 Log: MFC r364720: Update sqlite to 3.33.0 (3330000). Release announcement at https://www.sqlite.org/releaselog/3_33_0.html. Added: stable/12/contrib/sqlite3/sqlite3rc.h - copied unchanged from r364720, head/contrib/sqlite3/sqlite3rc.h Modified: stable/12/contrib/sqlite3/Makefile.am stable/12/contrib/sqlite3/Makefile.in stable/12/contrib/sqlite3/configure stable/12/contrib/sqlite3/configure.ac stable/12/contrib/sqlite3/shell.c stable/12/contrib/sqlite3/sqlite3.c stable/12/contrib/sqlite3/sqlite3.h stable/12/contrib/sqlite3/tea/configure stable/12/contrib/sqlite3/tea/configure.ac Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Added: stable/11/contrib/sqlite3/sqlite3rc.h - copied unchanged from r364720, head/contrib/sqlite3/sqlite3rc.h Modified: stable/11/contrib/sqlite3/Makefile.am stable/11/contrib/sqlite3/Makefile.in stable/11/contrib/sqlite3/configure stable/11/contrib/sqlite3/configure.ac stable/11/contrib/sqlite3/shell.c stable/11/contrib/sqlite3/sqlite3.c stable/11/contrib/sqlite3/sqlite3.h stable/11/contrib/sqlite3/tea/configure stable/11/contrib/sqlite3/tea/configure.ac Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/sqlite3/Makefile.am ============================================================================== --- stable/12/contrib/sqlite3/Makefile.am Wed Sep 23 12:54:42 2020 (r366075) +++ stable/12/contrib/sqlite3/Makefile.am Wed Sep 23 14:36:38 2020 (r366076) @@ -13,7 +13,7 @@ sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_ include_HEADERS = sqlite3.h sqlite3ext.h -EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc README.txt Replace.cs Makefile.fallback +EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc sqlite3rc.h README.txt Replace.cs Makefile.fallback pkgconfigdir = ${libdir}/pkgconfig pkgconfig_DATA = sqlite3.pc Modified: stable/12/contrib/sqlite3/Makefile.in ============================================================================== --- stable/12/contrib/sqlite3/Makefile.in Wed Sep 23 12:54:42 2020 (r366075) +++ stable/12/contrib/sqlite3/Makefile.in Wed Sep 23 14:36:38 2020 (r366076) @@ -370,7 +370,7 @@ sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@ sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@ sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) include_HEADERS = sqlite3.h sqlite3ext.h -EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc README.txt Replace.cs Makefile.fallback +EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc sqlite3rc.h README.txt Replace.cs Makefile.fallback pkgconfigdir = ${libdir}/pkgconfig pkgconfig_DATA = sqlite3.pc man_MANS = sqlite3.1 Modified: stable/12/contrib/sqlite3/configure ============================================================================== --- stable/12/contrib/sqlite3/configure Wed Sep 23 12:54:42 2020 (r366075) +++ stable/12/contrib/sqlite3/configure Wed Sep 23 14:36:38 2020 (r366076) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.32.3. +# Generated by GNU Autoconf 2.69 for sqlite 3.33.0. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.32.3' -PACKAGE_STRING='sqlite 3.32.3' +PACKAGE_VERSION='3.33.0' +PACKAGE_STRING='sqlite 3.33.0' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1341,7 +1341,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.32.3 to adapt to many kinds of systems. +\`configure' configures sqlite 3.33.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1412,7 +1412,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.32.3:";; + short | recursive ) echo "Configuration of sqlite 3.33.0:";; esac cat <<\_ACEOF @@ -1537,7 +1537,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.32.3 +sqlite configure 3.33.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1952,7 +1952,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.32.3, which was +It was created by sqlite $as_me 3.33.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2818,7 +2818,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.32.3' + VERSION='3.33.0' cat >>confdefs.h <<_ACEOF @@ -14438,7 +14438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.32.3, which was +This file was extended by sqlite $as_me 3.33.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14495,7 +14495,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sqlite config.status 3.32.3 +sqlite config.status 3.33.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: stable/12/contrib/sqlite3/configure.ac ============================================================================== --- stable/12/contrib/sqlite3/configure.ac Wed Sep 23 12:54:42 2020 (r366075) +++ stable/12/contrib/sqlite3/configure.ac Wed Sep 23 14:36:38 2020 (r366076) @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.32.3, http://www.sqlite.org) +AC_INIT(sqlite, 3.33.0, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) Modified: stable/12/contrib/sqlite3/shell.c ============================================================================== --- stable/12/contrib/sqlite3/shell.c Wed Sep 23 12:54:42 2020 (r366075) +++ stable/12/contrib/sqlite3/shell.c Wed Sep 23 14:36:38 2020 (r366076) @@ -642,6 +642,21 @@ static int strlenChar(const char *z){ } /* +** Return true if zFile does not exist or if it is not an ordinary file. +*/ +#ifdef _WIN32 +# define notNormalFile(X) 0 +#else +static int notNormalFile(const char *zFile){ + struct stat x; + int rc; + memset(&x, 0, sizeof(x)); + rc = stat(zFile, &x); + return rc || !S_ISREG(x.st_mode); +} +#endif + +/* ** This routine reads a line of text from FILE in, stores ** the text in memory obtained from malloc() and returns a pointer ** to the text. NULL is returned at end of file, or if malloc() @@ -953,7 +968,7 @@ static void shellModuleSchema( ** CREATE VIRTUAL TABLE ** ** This UDF is used by the .schema command to insert the schema name of -** attached databases into the middle of the sqlite_master.sql field. +** attached databases into the middle of the sqlite_schema.sql field. */ static void shellAddSchemaName( sqlite3_context *pCtx, @@ -3330,7 +3345,7 @@ static int completionNext(sqlite3_vtab_cursor *cur){ const char *zDb = (const char*)sqlite3_column_text(pS2, 1); zSql = sqlite3_mprintf( "%z%s" - "SELECT name FROM \"%w\".sqlite_master", + "SELECT name FROM \"%w\".sqlite_schema", zSql, zSep, zDb ); if( zSql==0 ) return SQLITE_NOMEM; @@ -3354,7 +3369,7 @@ static int completionNext(sqlite3_vtab_cursor *cur){ const char *zDb = (const char*)sqlite3_column_text(pS2, 1); zSql = sqlite3_mprintf( "%z%s" - "SELECT pti.name FROM \"%w\".sqlite_master AS sm" + "SELECT pti.name FROM \"%w\".sqlite_schema AS sm" " JOIN pragma_table_info(sm.name,%Q) AS pti" " WHERE sm.type='table'", zSql, zSep, zDb, zDb @@ -4047,7 +4062,7 @@ static int apndOpen( p = (ApndFile*)pFile; memset(p, 0, sizeof(*p)); pSubFile = ORIGFILE(pFile); - p->base.pMethods = &apnd_io_methods; + pFile->pMethods = &apnd_io_methods; rc = pSubVfs->xOpen(pSubVfs, zName, pSubFile, flags, pOutFlags); if( rc ) goto apnd_open_done; rc = pSubFile->pMethods->xFileSize(pSubFile, &sz); @@ -4379,6 +4394,927 @@ int sqlite3_uint_init( } /************************* End ../ext/misc/uint.c ********************/ +/************************* Begin ../ext/misc/decimal.c ******************/ +/* +** 2020-06-22 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +****************************************************************************** +** +** Routines to implement arbitrary-precision decimal math. +** +** The focus here is on simplicity and correctness, not performance. +*/ +/* #include "sqlite3ext.h" */ +SQLITE_EXTENSION_INIT1 +#include +#include +#include +#include + +/* Mark a function parameter as unused, to suppress nuisance compiler +** warnings. */ +#ifndef UNUSED_PARAMETER +# define UNUSED_PARAMETER(X) (void)(X) +#endif + + +/* A decimal object */ +typedef struct Decimal Decimal; +struct Decimal { + char sign; /* 0 for positive, 1 for negative */ + char oom; /* True if an OOM is encountered */ + char isNull; /* True if holds a NULL rather than a number */ + char isInit; /* True upon initialization */ + int nDigit; /* Total number of digits */ + int nFrac; /* Number of digits to the right of the decimal point */ + signed char *a; /* Array of digits. Most significant first. */ +}; + +/* +** Release memory held by a Decimal, but do not free the object itself. +*/ +static void decimal_clear(Decimal *p){ + sqlite3_free(p->a); +} + +/* +** Destroy a Decimal object +*/ +static void decimal_free(Decimal *p){ + if( p ){ + decimal_clear(p); + sqlite3_free(p); + } +} + +/* +** Allocate a new Decimal object. Initialize it to the number given +** by the input string. +*/ +static Decimal *decimal_new( + sqlite3_context *pCtx, + sqlite3_value *pIn, + int nAlt, + const unsigned char *zAlt +){ + Decimal *p; + int n, i; + const unsigned char *zIn; + int iExp = 0; + p = sqlite3_malloc( sizeof(*p) ); + if( p==0 ) goto new_no_mem; + p->sign = 0; + p->oom = 0; + p->isInit = 1; + p->isNull = 0; + p->nDigit = 0; + p->nFrac = 0; + if( zAlt ){ + n = nAlt, + zIn = zAlt; + }else{ + if( sqlite3_value_type(pIn)==SQLITE_NULL ){ + p->a = 0; + p->isNull = 1; + return p; + } + n = sqlite3_value_bytes(pIn); + zIn = sqlite3_value_text(pIn); + } + p->a = sqlite3_malloc64( n+1 ); + if( p->a==0 ) goto new_no_mem; + for(i=0; isspace(zIn[i]); i++){} + if( zIn[i]=='-' ){ + p->sign = 1; + i++; + }else if( zIn[i]=='+' ){ + i++; + } + while( i='0' && c<='9' ){ + p->a[p->nDigit++] = c - '0'; + }else if( c=='.' ){ + p->nFrac = p->nDigit + 1; + }else if( c=='e' || c=='E' ){ + int j = i+1; + int neg = 0; + if( j>=n ) break; + if( zIn[j]=='-' ){ + neg = 1; + j++; + }else if( zIn[j]=='+' ){ + j++; + } + while( j='0' && zIn[j]<='9' ){ + iExp = iExp*10 + zIn[j] - '0'; + } + j++; + } + if( neg ) iExp = -iExp; + break; + } + i++; + } + if( p->nFrac ){ + p->nFrac = p->nDigit - (p->nFrac - 1); + } + if( iExp>0 ){ + if( p->nFrac>0 ){ + if( iExp<=p->nFrac ){ + p->nFrac -= iExp; + iExp = 0; + }else{ + iExp -= p->nFrac; + p->nFrac = 0; + } + } + if( iExp>0 ){ + p->a = sqlite3_realloc64(p->a, p->nDigit + iExp + 1 ); + if( p->a==0 ) goto new_no_mem; + memset(p->a+p->nDigit, 0, iExp); + p->nDigit += iExp; + } + }else if( iExp<0 ){ + int nExtra; + iExp = -iExp; + nExtra = p->nDigit - p->nFrac - 1; + if( nExtra ){ + if( nExtra>=iExp ){ + p->nFrac += iExp; + iExp = 0; + }else{ + iExp -= nExtra; + p->nFrac = p->nDigit - 1; + } + } + if( iExp>0 ){ + p->a = sqlite3_realloc64(p->a, p->nDigit + iExp + 1 ); + if( p->a==0 ) goto new_no_mem; + memmove(p->a+iExp, p->a, p->nDigit); + memset(p->a, 0, iExp); + p->nDigit += iExp; + p->nFrac += iExp; + } + } + return p; + +new_no_mem: + if( pCtx ) sqlite3_result_error_nomem(pCtx); + sqlite3_free(p); + return 0; +} + +/* +** Make the given Decimal the result. +*/ +static void decimal_result(sqlite3_context *pCtx, Decimal *p){ + char *z; + int i, j; + int n; + if( p==0 || p->oom ){ + sqlite3_result_error_nomem(pCtx); + return; + } + if( p->isNull ){ + sqlite3_result_null(pCtx); + return; + } + z = sqlite3_malloc( p->nDigit+4 ); + if( z==0 ){ + sqlite3_result_error_nomem(pCtx); + return; + } + i = 0; + if( p->nDigit==0 || (p->nDigit==1 && p->a[0]==0) ){ + p->sign = 0; + } + if( p->sign ){ + z[0] = '-'; + i = 1; + } + n = p->nDigit - p->nFrac; + if( n<=0 ){ + z[i++] = '0'; + } + j = 0; + while( n>1 && p->a[j]==0 ){ + j++; + n--; + } + while( n>0 ){ + z[i++] = p->a[j] + '0'; + j++; + n--; + } + if( p->nFrac ){ + z[i++] = '.'; + do{ + z[i++] = p->a[j] + '0'; + j++; + }while( jnDigit ); + } + z[i] = 0; + sqlite3_result_text(pCtx, z, i, sqlite3_free); +} + +/* +** SQL Function: decimal(X) +** +** Convert input X into decimal and then back into text +*/ +static void decimalFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *p = decimal_new(context, argv[0], 0, 0); + UNUSED_PARAMETER(argc); + decimal_result(context, p); + decimal_free(p); +} + +/* +** Compare to Decimal objects. Return negative, 0, or positive if the +** first object is less than, equal to, or greater than the second. +** +** Preconditions for this routine: +** +** pA!=0 +** pA->isNull==0 +** pB!=0 +** pB->isNull==0 +*/ +static int decimal_cmp(const Decimal *pA, const Decimal *pB){ + int nASig, nBSig, rc, n; + if( pA->sign!=pB->sign ){ + return pA->sign ? -1 : +1; + } + if( pA->sign ){ + const Decimal *pTemp = pA; + pA = pB; + pB = pTemp; + } + nASig = pA->nDigit - pA->nFrac; + nBSig = pB->nDigit - pB->nFrac; + if( nASig!=nBSig ){ + return nASig - nBSig; + } + n = pA->nDigit; + if( n>pB->nDigit ) n = pB->nDigit; + rc = memcmp(pA->a, pB->a, n); + if( rc==0 ){ + rc = pA->nDigit - pB->nDigit; + } + return rc; +} + +/* +** SQL Function: decimal_cmp(X, Y) +** +** Return negative, zero, or positive if X is less then, equal to, or +** greater than Y. +*/ +static void decimalCmpFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *pA = 0, *pB = 0; + int rc; + + UNUSED_PARAMETER(argc); + pA = decimal_new(context, argv[0], 0, 0); + if( pA==0 || pA->isNull ) goto cmp_done; + pB = decimal_new(context, argv[1], 0, 0); + if( pB==0 || pB->isNull ) goto cmp_done; + rc = decimal_cmp(pA, pB); + if( rc<0 ) rc = -1; + else if( rc>0 ) rc = +1; + sqlite3_result_int(context, rc); +cmp_done: + decimal_free(pA); + decimal_free(pB); +} + +/* +** Expand the Decimal so that it has a least nDigit digits and nFrac +** digits to the right of the decimal point. +*/ +static void decimal_expand(Decimal *p, int nDigit, int nFrac){ + int nAddSig; + int nAddFrac; + if( p==0 ) return; + nAddFrac = nFrac - p->nFrac; + nAddSig = (nDigit - p->nDigit) - nAddFrac; + if( nAddFrac==0 && nAddSig==0 ) return; + p->a = sqlite3_realloc64(p->a, nDigit+1); + if( p->a==0 ){ + p->oom = 1; + return; + } + if( nAddSig ){ + memmove(p->a+nAddSig, p->a, p->nDigit); + memset(p->a, 0, nAddSig); + p->nDigit += nAddSig; + } + if( nAddFrac ){ + memset(p->a+p->nDigit, 0, nAddFrac); + p->nDigit += nAddFrac; + p->nFrac += nAddFrac; + } +} + +/* +** Add the value pB into pA. +** +** Both pA and pB might become denormalized by this routine. +*/ +static void decimal_add(Decimal *pA, Decimal *pB){ + int nSig, nFrac, nDigit; + int i, rc; + if( pA==0 ){ + return; + } + if( pA->oom || pB==0 || pB->oom ){ + pA->oom = 1; + return; + } + if( pA->isNull || pB->isNull ){ + pA->isNull = 1; + return; + } + nSig = pA->nDigit - pA->nFrac; + if( nSig && pA->a[0]==0 ) nSig--; + if( nSignDigit-pB->nFrac ){ + nSig = pB->nDigit - pB->nFrac; + } + nFrac = pA->nFrac; + if( nFracnFrac ) nFrac = pB->nFrac; + nDigit = nSig + nFrac + 1; + decimal_expand(pA, nDigit, nFrac); + decimal_expand(pB, nDigit, nFrac); + if( pA->oom || pB->oom ){ + pA->oom = 1; + }else{ + if( pA->sign==pB->sign ){ + int carry = 0; + for(i=nDigit-1; i>=0; i--){ + int x = pA->a[i] + pB->a[i] + carry; + if( x>=10 ){ + carry = 1; + pA->a[i] = x - 10; + }else{ + carry = 0; + pA->a[i] = x; + } + } + }else{ + signed char *aA, *aB; + int borrow = 0; + rc = memcmp(pA->a, pB->a, nDigit); + if( rc<0 ){ + aA = pB->a; + aB = pA->a; + pA->sign = !pA->sign; + }else{ + aA = pA->a; + aB = pB->a; + } + for(i=nDigit-1; i>=0; i--){ + int x = aA[i] - aB[i] - borrow; + if( x<0 ){ + pA->a[i] = x+10; + borrow = 1; + }else{ + pA->a[i] = x; + borrow = 0; + } + } + } + } +} + +/* +** Compare text in decimal order. +*/ +static int decimalCollFunc( + void *notUsed, + int nKey1, const void *pKey1, + int nKey2, const void *pKey2 +){ + const unsigned char *zA = (const unsigned char*)pKey1; + const unsigned char *zB = (const unsigned char*)pKey2; + Decimal *pA = decimal_new(0, 0, nKey1, zA); + Decimal *pB = decimal_new(0, 0, nKey2, zB); + int rc; + UNUSED_PARAMETER(notUsed); + if( pA==0 || pB==0 ){ + rc = 0; + }else{ + rc = decimal_cmp(pA, pB); + } + decimal_free(pA); + decimal_free(pB); + return rc; +} + + +/* +** SQL Function: decimal_add(X, Y) +** decimal_sub(X, Y) +** +** Return the sum or difference of X and Y. +*/ +static void decimalAddFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *pA = decimal_new(context, argv[0], 0, 0); + Decimal *pB = decimal_new(context, argv[1], 0, 0); + UNUSED_PARAMETER(argc); + decimal_add(pA, pB); + decimal_result(context, pA); + decimal_free(pA); + decimal_free(pB); +} +static void decimalSubFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *pA = decimal_new(context, argv[0], 0, 0); + Decimal *pB = decimal_new(context, argv[1], 0, 0); + UNUSED_PARAMETER(argc); + if( pB==0 ) return; + pB->sign = !pB->sign; + decimal_add(pA, pB); + decimal_result(context, pA); + decimal_free(pA); + decimal_free(pB); +} + +/* Aggregate funcion: decimal_sum(X) +** +** Works like sum() except that it uses decimal arithmetic for unlimited +** precision. +*/ +static void decimalSumStep( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *p; + Decimal *pArg; + UNUSED_PARAMETER(argc); + p = sqlite3_aggregate_context(context, sizeof(*p)); + if( p==0 ) return; + if( !p->isInit ){ + p->isInit = 1; + p->a = sqlite3_malloc(2); + if( p->a==0 ){ + p->oom = 1; + }else{ + p->a[0] = 0; + } + p->nDigit = 1; + p->nFrac = 0; + } + if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; + pArg = decimal_new(context, argv[0], 0, 0); + decimal_add(p, pArg); + decimal_free(pArg); +} +static void decimalSumInverse( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *p; + Decimal *pArg; + UNUSED_PARAMETER(argc); + p = sqlite3_aggregate_context(context, sizeof(*p)); + if( p==0 ) return; + if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; + pArg = decimal_new(context, argv[0], 0, 0); + if( pArg ) pArg->sign = !pArg->sign; + decimal_add(p, pArg); + decimal_free(pArg); +} +static void decimalSumValue(sqlite3_context *context){ + Decimal *p = sqlite3_aggregate_context(context, 0); + if( p==0 ) return; + decimal_result(context, p); +} +static void decimalSumFinalize(sqlite3_context *context){ + Decimal *p = sqlite3_aggregate_context(context, 0); + if( p==0 ) return; + decimal_result(context, p); + decimal_clear(p); +} + +/* +** SQL Function: decimal_mul(X, Y) +** +** Return the product of X and Y. +** +** All significant digits after the decimal point are retained. +** Trailing zeros after the decimal point are omitted as long as +** the number of digits after the decimal point is no less than +** either the number of digits in either input. +*/ +static void decimalMulFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *pA = decimal_new(context, argv[0], 0, 0); + Decimal *pB = decimal_new(context, argv[1], 0, 0); + signed char *acc = 0; + int i, j, k; + int minFrac; + UNUSED_PARAMETER(argc); + if( pA==0 || pA->oom || pA->isNull + || pB==0 || pB->oom || pB->isNull + ){ + goto mul_end; + } + acc = sqlite3_malloc64( pA->nDigit + pB->nDigit + 2 ); + if( acc==0 ){ + sqlite3_result_error_nomem(context); + goto mul_end; + } + memset(acc, 0, pA->nDigit + pB->nDigit + 2); + minFrac = pA->nFrac; + if( pB->nFracnFrac; + for(i=pA->nDigit-1; i>=0; i--){ + signed char f = pA->a[i]; + int carry = 0, x; + for(j=pB->nDigit-1, k=i+j+3; j>=0; j--, k--){ + x = acc[k] + f*pB->a[j] + carry; + acc[k] = x%10; + carry = x/10; + } + x = acc[k] + carry; + acc[k] = x%10; + acc[k-1] += x/10; + } + sqlite3_free(pA->a); + pA->a = acc; + acc = 0; + pA->nDigit += pB->nDigit + 2; + pA->nFrac += pB->nFrac; + pA->sign ^= pB->sign; + while( pA->nFrac>minFrac && pA->a[pA->nDigit-1]==0 ){ + pA->nFrac--; + pA->nDigit--; + } + decimal_result(context, pA); + +mul_end: + sqlite3_free(acc); + decimal_free(pA); + decimal_free(pB); +} + +#ifdef _WIN32 + +#endif +int sqlite3_decimal_init( + sqlite3 *db, + char **pzErrMsg, + const sqlite3_api_routines *pApi +){ + int rc = SQLITE_OK; + static const struct { + const char *zFuncName; + int nArg; + void (*xFunc)(sqlite3_context*,int,sqlite3_value**); + } aFunc[] = { + { "decimal", 1, decimalFunc }, + { "decimal_cmp", 2, decimalCmpFunc }, + { "decimal_add", 2, decimalAddFunc }, + { "decimal_sub", 2, decimalSubFunc }, + { "decimal_mul", 2, decimalMulFunc }, + }; + unsigned int i; + (void)pzErrMsg; /* Unused parameter */ + + SQLITE_EXTENSION_INIT2(pApi); + + for(i=0; i 'ieee754(2,0)' +** ieee754(45.25) -> 'ieee754(181,-2)' +** ieee754(2, 0) -> 2.0 +** ieee754(181, -2) -> 45.25 +** +** Two additional functions break apart the one-argument ieee754() +** result into separate integer values: +** +** ieee754_mantissa(45.25) -> 181 +** ieee754_exponent(45.25) -> -2 +** +** These functions convert binary64 numbers into blobs and back again. +** +** ieee754_from_blob(x'3ff0000000000000') -> 1.0 +** ieee754_to_blob(1.0) -> x'3ff0000000000000' +** +** In all single-argument functions, if the argument is an 8-byte blob +** then that blob is interpreted as a big-endian binary64 value. +** +** +** EXACT DECIMAL REPRESENTATION OF BINARY64 VALUES +** ----------------------------------------------- +** +** This extension in combination with the separate 'decimal' extension +** can be used to compute the exact decimal representation of binary64 +** values. To begin, first compute a table of exponent values: +** +** CREATE TABLE pow2(x INTEGER PRIMARY KEY, v TEXT); +** WITH RECURSIVE c(x,v) AS ( +** VALUES(0,'1') +** UNION ALL +** SELECT x+1, decimal_mul(v,'2') FROM c WHERE x+1<=971 +** ) INSERT INTO pow2(x,v) SELECT x, v FROM c; +** WITH RECURSIVE c(x,v) AS ( +** VALUES(-1,'0.5') +** UNION ALL +** SELECT x-1, decimal_mul(v,'0.5') FROM c WHERE x-1>=-1075 +** ) INSERT INTO pow2(x,v) SELECT x, v FROM c; +** +** Then, to compute the exact decimal representation of a floating +** point value (the value 47.49 is used in the example) do: +** +** WITH c(n) AS (VALUES(47.49)) +** ---------------^^^^^---- Replace with whatever you want +** SELECT decimal_mul(ieee754_mantissa(c.n),pow2.v) +** FROM pow2, c WHERE pow2.x=ieee754_exponent(c.n); +** +** Here is a query to show various boundry values for the binary64 +** number format: +** +** WITH c(name,bin) AS (VALUES +** ('minimum positive value', x'0000000000000001'), +** ('maximum subnormal value', x'000fffffffffffff'), +** ('mininum positive nornal value', x'0010000000000000'), +** ('maximum value', x'7fefffffffffffff')) +** SELECT c.name, decimal_mul(ieee754_mantissa(c.bin),pow2.v) +** FROM pow2, c WHERE pow2.x=ieee754_exponent(c.bin); +** +*/ +/* #include "sqlite3ext.h" */ +SQLITE_EXTENSION_INIT1 +#include +#include + +/* Mark a function parameter as unused, to suppress nuisance compiler +** warnings. */ +#ifndef UNUSED_PARAMETER +# define UNUSED_PARAMETER(X) (void)(X) +#endif + +/* +** Implementation of the ieee754() function +*/ +static void ieee754func( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + if( argc==1 ){ + sqlite3_int64 m, a; + double r; + int e; + int isNeg; + char zResult[100]; + assert( sizeof(m)==sizeof(r) ); + if( sqlite3_value_type(argv[0])==SQLITE_BLOB + && sqlite3_value_bytes(argv[0])==sizeof(r) + ){ + const unsigned char *x = sqlite3_value_blob(argv[0]); + unsigned int i; + sqlite3_uint64 v = 0; + for(i=0; i>52; + m = a & ((((sqlite3_int64)1)<<52)-1); + if( e==0 ){ + m <<= 1; + }else{ + m |= ((sqlite3_int64)1)<<52; + } + while( e<1075 && m>0 && (m&1)==0 ){ + m >>= 1; + e++; + } + if( isNeg ) m = -m; + } + switch( *(int*)sqlite3_user_data(context) ){ + case 0: + sqlite3_snprintf(sizeof(zResult), zResult, "ieee754(%lld,%d)", + m, e-1075); + sqlite3_result_text(context, zResult, -1, SQLITE_TRANSIENT); + break; + case 1: + sqlite3_result_int64(context, m); + break; + case 2: + sqlite3_result_int(context, e-1075); + break; + } + }else{ + sqlite3_int64 m, e, a; + double r; + int isNeg = 0; + m = sqlite3_value_int64(argv[0]); + e = sqlite3_value_int64(argv[1]); + if( m<0 ){ + isNeg = 1; + m = -m; + if( m<0 ) return; + }else if( m==0 && e>-1000 && e<1000 ){ + sqlite3_result_double(context, 0.0); + return; + } + while( (m>>32)&0xffe00000 ){ + m >>= 1; + e++; + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Wed Sep 23 17:11:07 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 561773FF641; Wed, 23 Sep 2020 17:11:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxPpM1hJwz3d5k; Wed, 23 Sep 2020 17:11:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D62F13C6B; Wed, 23 Sep 2020 17:11:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NHB6Ch054682; Wed, 23 Sep 2020 17:11:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NHB6rG054681; Wed, 23 Sep 2020 17:11:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009231711.08NHB6rG054681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 23 Sep 2020 17:11:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366079 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 366079 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 17:11:07 -0000 Author: kib Date: Wed Sep 23 17:11:06 2020 New Revision: 366079 URL: https://svnweb.freebsd.org/changeset/base/366079 Log: MFC r365811: Improve ddb 'show pgrpdump' command. Modified: stable/12/sys/kern/kern_proc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_proc.c ============================================================================== --- stable/12/sys/kern/kern_proc.c Wed Sep 23 17:04:27 2020 (r366078) +++ stable/12/sys/kern/kern_proc.c Wed Sep 23 17:11:06 2020 (r366079) @@ -905,6 +905,16 @@ sess_release(struct session *s) #ifdef DDB +static void +db_print_pgrp_one(struct pgrp *pgrp, struct proc *p) +{ + db_printf( + " pid %d at %p pr %d pgrp %p e %d jc %d\n", + p->p_pid, p, p->p_pptr == NULL ? -1 : p->p_pptr->p_pid, + p->p_pgrp, (p->p_treeflag & P_TREE_GRPEXITED) != 0, + p->p_pptr == NULL ? 0 : isjobproc(p->p_pptr, pgrp)); +} + DB_SHOW_COMMAND(pgrpdump, pgrpdump) { struct pgrp *pgrp; @@ -913,19 +923,15 @@ DB_SHOW_COMMAND(pgrpdump, pgrpdump) for (i = 0; i <= pgrphash; i++) { if (!LIST_EMPTY(&pgrphashtbl[i])) { - printf("\tindx %d\n", i); + db_printf("indx %d\n", i); LIST_FOREACH(pgrp, &pgrphashtbl[i], pg_hash) { - printf( - "\tpgrp %p, pgid %ld, sess %p, sesscnt %d, mem %p\n", - (void *)pgrp, (long)pgrp->pg_id, - (void *)pgrp->pg_session, + db_printf( + " pgrp %p, pgid %d, sess %p, sesscnt %d, mem %p\n", + pgrp, (int)pgrp->pg_id, pgrp->pg_session, pgrp->pg_session->s_count, - (void *)LIST_FIRST(&pgrp->pg_members)); - LIST_FOREACH(p, &pgrp->pg_members, p_pglist) { - printf("\t\tpid %ld addr %p pgrp %p\n", - (long)p->p_pid, (void *)p, - (void *)p->p_pgrp); - } + LIST_FIRST(&pgrp->pg_members)); + LIST_FOREACH(p, &pgrp->pg_members, p_pglist) + db_print_pgrp_one(pgrp, p); } } } From owner-svn-src-stable-12@freebsd.org Wed Sep 23 17:13:00 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 59F0A3FF3DD; Wed, 23 Sep 2020 17:13:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxPrX1jx5z3dhK; Wed, 23 Sep 2020 17:13:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1FC371413A; Wed, 23 Sep 2020 17:13:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NHD0f2060390; Wed, 23 Sep 2020 17:13:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NHD0LG060387; Wed, 23 Sep 2020 17:13:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009231713.08NHD0LG060387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 23 Sep 2020 17:12:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366080 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 366080 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 17:13:00 -0000 Author: kib Date: Wed Sep 23 17:12:59 2020 New Revision: 366080 URL: https://svnweb.freebsd.org/changeset/base/366080 Log: MFC r365812: proc_realparent: if p_oppid does not match pid of the current parent for non-orphaned process, return reaper instead of init. Modified: stable/12/sys/kern/kern_exit.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_exit.c ============================================================================== --- stable/12/sys/kern/kern_exit.c Wed Sep 23 17:11:06 2020 (r366079) +++ stable/12/sys/kern/kern_exit.c Wed Sep 23 17:12:59 2020 (r366080) @@ -109,7 +109,7 @@ proc_realparent(struct proc *child) sx_assert(&proctree_lock, SX_LOCKED); if ((child->p_treeflag & P_TREE_ORPHANED) == 0) return (child->p_pptr->p_pid == child->p_oppid ? - child->p_pptr : initproc); + child->p_pptr : child->p_reaper); for (p = child; (p->p_treeflag & P_TREE_FIRST_ORPHAN) == 0;) { /* Cannot use LIST_PREV(), since the list head is not known. */ p = __containerof(p->p_orphan.le_prev, struct proc, From owner-svn-src-stable-12@freebsd.org Wed Sep 23 17:20:04 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DDA7E3FF9BE; Wed, 23 Sep 2020 17:20:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxQ0h5Mp3z3dqP; Wed, 23 Sep 2020 17:20:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97FB014183; Wed, 23 Sep 2020 17:20:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NHK4re061039; Wed, 23 Sep 2020 17:20:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NHK4Ac061038; Wed, 23 Sep 2020 17:20:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009231720.08NHK4Ac061038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 23 Sep 2020 17:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366081 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 366081 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 17:20:04 -0000 Author: kib Date: Wed Sep 23 17:20:04 2020 New Revision: 366081 URL: https://svnweb.freebsd.org/changeset/base/366081 Log: MFC r365813: Assert that P_TREE_GRPEXITED is set only once. Modified: stable/12/sys/kern/kern_proc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_proc.c ============================================================================== --- stable/12/sys/kern/kern_proc.c Wed Sep 23 17:12:59 2020 (r366080) +++ stable/12/sys/kern/kern_proc.c Wed Sep 23 17:20:04 2020 (r366081) @@ -762,6 +762,7 @@ fixjobc_kill(struct proc *p) * It is marked by the flag because p is only physically * removed from its process group on wait(2). */ + MPASS((p->p_treeflag & P_TREE_GRPEXITED) == 0); p->p_treeflag |= P_TREE_GRPEXITED; /* From owner-svn-src-stable-12@freebsd.org Wed Sep 23 17:25:05 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FEDA3FF940; Wed, 23 Sep 2020 17:25:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxQ6T2Lnrz3fd8; Wed, 23 Sep 2020 17:25:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33EBA141A2; Wed, 23 Sep 2020 17:25:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NHP5Yr066982; Wed, 23 Sep 2020 17:25:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NHP52p066981; Wed, 23 Sep 2020 17:25:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009231725.08NHP52p066981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 23 Sep 2020 17:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366082 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 366082 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 17:25:05 -0000 Author: kib Date: Wed Sep 23 17:25:04 2020 New Revision: 366082 URL: https://svnweb.freebsd.org/changeset/base/366082 Log: MFC r365814: Fix fixjobc+orhpanage. Modified: stable/12/sys/kern/kern_proc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_proc.c ============================================================================== --- stable/12/sys/kern/kern_proc.c Wed Sep 23 17:20:04 2020 (r366081) +++ stable/12/sys/kern/kern_proc.c Wed Sep 23 17:25:04 2020 (r366082) @@ -557,6 +557,35 @@ isjobproc(struct proc *q, struct pgrp *pgrp) q->p_pgrp->pg_session == pgrp->pg_session); } +static struct proc * +jobc_reaper(struct proc *p) +{ + struct proc *pp; + + sx_assert(&proctree_lock, SX_LOCKED); + + for (pp = p;;) { + pp = pp->p_reaper; + if (pp->p_reaper == pp || + (pp->p_treeflag & P_TREE_GRPEXITED) == 0) + return (pp); + } +} + +static struct proc * +jobc_parent(struct proc *p) +{ + struct proc *pp; + + sx_assert(&proctree_lock, SX_LOCKED); + + pp = proc_realparent(p); + if (pp->p_pptr == NULL || + (pp->p_treeflag & P_TREE_GRPEXITED) == 0) + return (pp); + return (jobc_reaper(pp)); +} + #ifdef INVARIANTS static void check_pgrp_jobc(struct pgrp *pgrp) @@ -573,7 +602,7 @@ check_pgrp_jobc(struct pgrp *pgrp) if ((q->p_treeflag & P_TREE_GRPEXITED) != 0 || q->p_pptr == NULL) continue; - if (isjobproc(q->p_pptr, pgrp)) + if (isjobproc(jobc_parent(q), pgrp)) cnt++; } KASSERT(pgrp->pg_jobc == cnt, ("pgrp %d %p pg_jobc %d cnt %d", @@ -695,6 +724,25 @@ pgadjustjobc(struct pgrp *pgrp, bool entering) PGRP_UNLOCK(pgrp); } +static void +fixjobc_enterpgrp_q(struct pgrp *pgrp, struct proc *p, struct proc *q, bool adj) +{ + struct pgrp *childpgrp; + bool future_jobc; + + sx_assert(&proctree_lock, SX_LOCKED); + + if ((q->p_treeflag & P_TREE_GRPEXITED) != 0) + return; + childpgrp = q->p_pgrp; + future_jobc = childpgrp != pgrp && + childpgrp->pg_session == pgrp->pg_session; + + if ((adj && !isjobproc(p, childpgrp) && future_jobc) || + (!adj && isjobproc(p, childpgrp) && !future_jobc)) + pgadjustjobc(childpgrp, adj); +} + /* * Adjust pgrp jobc counters when specified process changes process group. * We count the number of processes in each process group that "qualify" @@ -709,8 +757,6 @@ static void fixjobc_enterpgrp(struct proc *p, struct pgrp *pgrp) { struct proc *q; - struct pgrp *childpgrp; - bool future_jobc; sx_assert(&proctree_lock, SX_LOCKED); PROC_LOCK_ASSERT(p, MA_NOTOWNED); @@ -720,36 +766,49 @@ fixjobc_enterpgrp(struct proc *p, struct pgrp *pgrp) if (p->p_pgrp == pgrp) return; - if (isjobproc(p->p_pptr, pgrp)) + if (isjobproc(jobc_parent(p), pgrp)) pgadjustjobc(pgrp, true); LIST_FOREACH(q, &p->p_children, p_sibling) { - if ((q->p_treeflag & P_TREE_GRPEXITED) != 0) + if ((q->p_treeflag & P_TREE_ORPHANED) != 0) continue; - childpgrp = q->p_pgrp; - future_jobc = childpgrp != pgrp && - childpgrp->pg_session == pgrp->pg_session; - if (!isjobproc(p, childpgrp) && future_jobc) - pgadjustjobc(childpgrp, true); + fixjobc_enterpgrp_q(pgrp, p, q, true); } + LIST_FOREACH(q, &p->p_orphans, p_orphan) + fixjobc_enterpgrp_q(pgrp, p, q, true); - if (isjobproc(p->p_pptr, p->p_pgrp)) + if (isjobproc(jobc_parent(p), p->p_pgrp)) pgadjustjobc(p->p_pgrp, false); LIST_FOREACH(q, &p->p_children, p_sibling) { - if ((q->p_treeflag & P_TREE_GRPEXITED) != 0) + if ((q->p_treeflag & P_TREE_ORPHANED) != 0) continue; - childpgrp = q->p_pgrp; - future_jobc = childpgrp != pgrp && - childpgrp->pg_session == pgrp->pg_session; - if (isjobproc(p, childpgrp) && !future_jobc) - pgadjustjobc(childpgrp, false); + fixjobc_enterpgrp_q(pgrp, p, q, false); } + LIST_FOREACH(q, &p->p_orphans, p_orphan) + fixjobc_enterpgrp_q(pgrp, p, q, false); } static void +fixjobc_kill_q(struct proc *p, struct proc *q, bool adj) +{ + struct pgrp *childpgrp; + + sx_assert(&proctree_lock, SX_LOCKED); + + if ((q->p_treeflag & P_TREE_GRPEXITED) != 0) + return; + childpgrp = q->p_pgrp; + + if ((adj && isjobproc(jobc_reaper(q), childpgrp) && + !isjobproc(p, childpgrp)) || (!adj && !isjobproc(jobc_reaper(q), + childpgrp) && isjobproc(p, childpgrp))) + pgadjustjobc(childpgrp, adj); +} + +static void fixjobc_kill(struct proc *p) { struct proc *q; - struct pgrp *childpgrp, *pgrp; + struct pgrp *pgrp; sx_assert(&proctree_lock, SX_LOCKED); PROC_LOCK_ASSERT(p, MA_NOTOWNED); @@ -769,7 +828,7 @@ fixjobc_kill(struct proc *p) * Check p's parent to see whether p qualifies its own process * group; if so, adjust count for p's process group. */ - if (isjobproc(p->p_pptr, pgrp)) + if (isjobproc(jobc_parent(p), pgrp)) pgadjustjobc(pgrp, false); /* @@ -778,21 +837,19 @@ fixjobc_kill(struct proc *p) * adjust counts for children's process groups. */ LIST_FOREACH(q, &p->p_children, p_sibling) { - if ((q->p_treeflag & P_TREE_GRPEXITED) != 0) + if ((q->p_treeflag & P_TREE_ORPHANED) != 0) continue; - childpgrp = q->p_pgrp; - if (isjobproc(q->p_reaper, childpgrp) && - !isjobproc(p, childpgrp)) - pgadjustjobc(childpgrp, true); + fixjobc_kill_q(p, q, true); } + LIST_FOREACH(q, &p->p_orphans, p_orphan) + fixjobc_kill_q(p, q, true); LIST_FOREACH(q, &p->p_children, p_sibling) { - if ((q->p_treeflag & P_TREE_GRPEXITED) != 0) + if ((q->p_treeflag & P_TREE_ORPHANED) != 0) continue; - childpgrp = q->p_pgrp; - if (!isjobproc(q->p_reaper, childpgrp) && - isjobproc(p, childpgrp)) - pgadjustjobc(childpgrp, false); + fixjobc_kill_q(p, q, false); } + LIST_FOREACH(q, &p->p_orphans, p_orphan) + fixjobc_kill_q(p, q, false); } void From owner-svn-src-stable-12@freebsd.org Wed Sep 23 17:26:54 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 826BC3FFD1E; Wed, 23 Sep 2020 17:26:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxQ8Z2s0lz3fSJ; Wed, 23 Sep 2020 17:26:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4549613BE7; Wed, 23 Sep 2020 17:26:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NHQsSn067115; Wed, 23 Sep 2020 17:26:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NHQsRp067114; Wed, 23 Sep 2020 17:26:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009231726.08NHQsRp067114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 23 Sep 2020 17:26:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366083 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 366083 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 17:26:54 -0000 Author: kib Date: Wed Sep 23 17:26:53 2020 New Revision: 366083 URL: https://svnweb.freebsd.org/changeset/base/366083 Log: MFC r365815, r365826: Add check_pgrp_jobc() calls into process exit path. Modified: stable/12/sys/kern/kern_proc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_proc.c ============================================================================== --- stable/12/sys/kern/kern_proc.c Wed Sep 23 17:25:04 2020 (r366082) +++ stable/12/sys/kern/kern_proc.c Wed Sep 23 17:26:53 2020 (r366083) @@ -815,6 +815,9 @@ fixjobc_kill(struct proc *p) pgrp = p->p_pgrp; PGRP_LOCK_ASSERT(pgrp, MA_NOTOWNED); SESS_LOCK_ASSERT(pgrp->pg_session, MA_NOTOWNED); +#ifdef INVARIANTS + check_pgrp_jobc(pgrp); +#endif /* * p no longer affects process group orphanage for children. @@ -850,6 +853,10 @@ fixjobc_kill(struct proc *p) } LIST_FOREACH(q, &p->p_orphans, p_orphan) fixjobc_kill_q(p, q, false); + +#ifdef INVARIANTS + check_pgrp_jobc(pgrp); +#endif } void From owner-svn-src-stable-12@freebsd.org Wed Sep 23 19:40:05 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56E5D424D3D; Wed, 23 Sep 2020 19:40:05 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxT6F1b7Hz4G8N; Wed, 23 Sep 2020 19:40:05 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19C9515942; Wed, 23 Sep 2020 19:40:05 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NJe4Zs056046; Wed, 23 Sep 2020 19:40:04 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NJe3EM056040; Wed, 23 Sep 2020 19:40:03 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202009231940.08NJe3EM056040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Wed, 23 Sep 2020 19:40:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366092 - stable/12/share/man/man9 X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/share/man/man9 X-SVN-Commit-Revision: 366092 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 19:40:05 -0000 Author: gbe (doc committer) Date: Wed Sep 23 19:40:03 2020 New Revision: 366092 URL: https://svnweb.freebsd.org/changeset/base/366092 Log: MFC r365858: man(9): Some markup fixes - whitespace at end of input line - skipping paragraph macro: Pp after Sh Modified: stable/12/share/man/man9/EVENTHANDLER.9 stable/12/share/man/man9/OF_node_from_xref.9 stable/12/share/man/man9/ieee80211.9 stable/12/share/man/man9/socket.9 stable/12/share/man/man9/tcp_functions.9 stable/12/share/man/man9/ucred.9 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man9/EVENTHANDLER.9 ============================================================================== --- stable/12/share/man/man9/EVENTHANDLER.9 Wed Sep 23 19:36:07 2020 (r366091) +++ stable/12/share/man/man9/EVENTHANDLER.9 Wed Sep 23 19:40:03 2020 (r366092) @@ -299,7 +299,7 @@ Callback invoked when an interfance has been removed f .It Vt ifaddr_event Callbacks invoked when an address is set up on a network interface. .It Vt ifaddr_event_ext -Callback invoked when an address has been added or removed from an interface. +Callback invoked when an address has been added or removed from an interface. .It Vt if_clone_event Callbacks invoked when an interface is cloned. .It Vt iflladdr_event Modified: stable/12/share/man/man9/OF_node_from_xref.9 ============================================================================== --- stable/12/share/man/man9/OF_node_from_xref.9 Wed Sep 23 19:36:07 2020 (r366091) +++ stable/12/share/man/man9/OF_node_from_xref.9 Wed Sep 23 19:40:03 2020 (r366092) @@ -64,7 +64,7 @@ the values of "phandle" properties. and .Fn OF_xref_from_node are used to perform conversion between these two kinds of node -identifiers. +identifiers. .Pp .Fn OF_node_from_xref returns the kernel phandle for the effective phandle Modified: stable/12/share/man/man9/ieee80211.9 ============================================================================== --- stable/12/share/man/man9/ieee80211.9 Wed Sep 23 19:36:07 2020 (r366091) +++ stable/12/share/man/man9/ieee80211.9 Wed Sep 23 19:40:03 2020 (r366092) @@ -706,7 +706,7 @@ and were later ported to This man page was updated with the information from .Nx .Nm -man page. +man page. .Sh AUTHORS .An -nosplit The original Modified: stable/12/share/man/man9/socket.9 ============================================================================== --- stable/12/share/man/man9/socket.9 Wed Sep 23 19:36:07 2020 (r366091) +++ stable/12/share/man/man9/socket.9 Wed Sep 23 19:40:03 2020 (r366092) @@ -56,7 +56,7 @@ .Fn sodisconnect "struct socket *so" .Ft void .Fo sodtor_set -.Fa "struct socket *so" +.Fa "struct socket *so" .Fa "void (*func)(struct socket *)" .Fc .Ft struct sockaddr * Modified: stable/12/share/man/man9/tcp_functions.9 ============================================================================== --- stable/12/share/man/man9/tcp_functions.9 Wed Sep 23 19:36:07 2020 (r366091) +++ stable/12/share/man/man9/tcp_functions.9 Wed Sep 23 19:40:03 2020 (r366092) @@ -281,8 +281,9 @@ for that socket, the kernel will call the function poi .Va tfb_tcp_handoff_ok field. The function should return 0 if the user is allowed to switch the socket to use -the TCP stack. Otherwise, the function should return an error code, which will -be returned to the user. +the TCP stack. +Otherwise, the function should return an error code, which will be returned to +the user. If the .Va tfb_tcp_handoff_ok field is Modified: stable/12/share/man/man9/ucred.9 ============================================================================== --- stable/12/share/man/man9/ucred.9 Wed Sep 23 19:36:07 2020 (r366091) +++ stable/12/share/man/man9/ucred.9 Wed Sep 23 19:40:03 2020 (r366092) @@ -143,7 +143,6 @@ and appropriately sets fields in the latter that are n the former (e.g., .Va cr_version ) . -.Pp .Sh RETURN VALUES .Fn crget , .Fn crhold , From owner-svn-src-stable-12@freebsd.org Wed Sep 23 21:57:30 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 463DE427AB9; Wed, 23 Sep 2020 21:57:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxX8p0z3Lz4Qff; Wed, 23 Sep 2020 21:57:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0047E1765D; Wed, 23 Sep 2020 21:57:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NLvTP7042619; Wed, 23 Sep 2020 21:57:29 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NLvTxo042618; Wed, 23 Sep 2020 21:57:29 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202009232157.08NLvTxo042618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 23 Sep 2020 21:57:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366094 - in stable: 11/lib/libc/gen 12/lib/libc/gen X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/lib/libc/gen 12/lib/libc/gen X-SVN-Commit-Revision: 366094 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 21:57:30 -0000 Author: jhb Date: Wed Sep 23 21:57:29 2020 New Revision: 366094 URL: https://svnweb.freebsd.org/changeset/base/366094 Log: MFC 365278: Don't assume objects in program sections have a size of a pointer. The size of the object at 'addr' is unknown and might be smaller than the size of a pointer (e.g. some x86 instructions are smaller than a pointer). Instead, just check that the address is in the bounds of the program header. Modified: stable/12/lib/libc/gen/elf_utils.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libc/gen/elf_utils.c Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libc/gen/elf_utils.c ============================================================================== --- stable/12/lib/libc/gen/elf_utils.c Wed Sep 23 19:54:59 2020 (r366093) +++ stable/12/lib/libc/gen/elf_utils.c Wed Sep 23 21:57:29 2020 (r366094) @@ -65,7 +65,7 @@ __elf_phdr_match_addr(struct dl_phdr_info *phdr_info, #endif if (phdr_info->dlpi_addr + ph->p_vaddr <= (uintptr_t)addr && - (uintptr_t)addr + sizeof(addr) < phdr_info->dlpi_addr + + (uintptr_t)addr < phdr_info->dlpi_addr + ph->p_vaddr + ph->p_memsz) break; } From owner-svn-src-stable-12@freebsd.org Wed Sep 23 22:36:42 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF03B3E0B91; Wed, 23 Sep 2020 22:36:42 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxY224SvGz4SQF; Wed, 23 Sep 2020 22:36:42 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 62DE317F97; Wed, 23 Sep 2020 22:36:42 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08NMag7H067341; Wed, 23 Sep 2020 22:36:42 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08NMae02067330; Wed, 23 Sep 2020 22:36:40 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202009232236.08NMae02067330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 23 Sep 2020 22:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366095 - in stable: 11/contrib/unbound 11/contrib/unbound/.github 11/contrib/unbound/cachedb 11/contrib/unbound/contrib 11/contrib/unbound/contrib/android 11/contrib/unbound/contrib/io... X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/unbound 11/contrib/unbound/.github 11/contrib/unbound/cachedb 11/contrib/unbound/contrib 11/contrib/unbound/contrib/android 11/contrib/unbound/contrib/ios 11/contrib/unbound/daem... X-SVN-Commit-Revision: 366095 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 22:36:42 -0000 Author: cy Date: Wed Sep 23 22:36:38 2020 New Revision: 366095 URL: https://svnweb.freebsd.org/changeset/base/366095 Log: MFC r364721-r364722 r364721: MFV 364468: Update unbound 1.10.1 --> 1.11.0. r364722: Update unbound version number. Added: stable/12/contrib/unbound/README-Travis.md - copied unchanged from r364721, head/contrib/unbound/README-Travis.md stable/12/contrib/unbound/contrib/android/ - copied from r364721, head/contrib/unbound/contrib/android/ stable/12/contrib/unbound/contrib/ios/ - copied from r364721, head/contrib/unbound/contrib/ios/ stable/12/contrib/unbound/dnstap/dnstap_fstrm.c - copied unchanged from r364721, head/contrib/unbound/dnstap/dnstap_fstrm.c stable/12/contrib/unbound/dnstap/dnstap_fstrm.h - copied unchanged from r364721, head/contrib/unbound/dnstap/dnstap_fstrm.h stable/12/contrib/unbound/dnstap/dtstream.c - copied unchanged from r364721, head/contrib/unbound/dnstap/dtstream.c stable/12/contrib/unbound/dnstap/dtstream.h - copied unchanged from r364721, head/contrib/unbound/dnstap/dtstream.h stable/12/contrib/unbound/dnstap/unbound-dnstap-socket.c - copied unchanged from r364721, head/contrib/unbound/dnstap/unbound-dnstap-socket.c stable/12/contrib/unbound/dynlibmod/ - copied from r364721, head/contrib/unbound/dynlibmod/ Modified: stable/12/contrib/unbound/.github/FUNDING.yml stable/12/contrib/unbound/.travis.yml stable/12/contrib/unbound/Makefile.in stable/12/contrib/unbound/acx_python.m4 stable/12/contrib/unbound/cachedb/cachedb.c stable/12/contrib/unbound/cachedb/cachedb.h stable/12/contrib/unbound/cachedb/redis.c stable/12/contrib/unbound/config.guess stable/12/contrib/unbound/config.h.in stable/12/contrib/unbound/config.sub stable/12/contrib/unbound/configure stable/12/contrib/unbound/configure.ac stable/12/contrib/unbound/contrib/aaaa-filter-iterator.patch stable/12/contrib/unbound/contrib/fastrpz.patch stable/12/contrib/unbound/contrib/libunbound.pc.in stable/12/contrib/unbound/contrib/unbound.service.in stable/12/contrib/unbound/daemon/acl_list.c stable/12/contrib/unbound/daemon/daemon.c stable/12/contrib/unbound/daemon/remote.c stable/12/contrib/unbound/daemon/unbound.c stable/12/contrib/unbound/daemon/worker.c stable/12/contrib/unbound/dns64/dns64.c stable/12/contrib/unbound/dnstap/dnstap.c stable/12/contrib/unbound/dnstap/dnstap.h stable/12/contrib/unbound/dnstap/dnstap.m4 stable/12/contrib/unbound/doc/Changelog stable/12/contrib/unbound/doc/README stable/12/contrib/unbound/doc/example.conf.in stable/12/contrib/unbound/doc/libunbound.3.in stable/12/contrib/unbound/doc/unbound-anchor.8.in stable/12/contrib/unbound/doc/unbound-checkconf.8.in stable/12/contrib/unbound/doc/unbound-control.8.in stable/12/contrib/unbound/doc/unbound-host.1.in stable/12/contrib/unbound/doc/unbound.8.in stable/12/contrib/unbound/doc/unbound.conf.5.in stable/12/contrib/unbound/edns-subnet/subnetmod.c stable/12/contrib/unbound/edns-subnet/subnetmod.h stable/12/contrib/unbound/iterator/iter_utils.c stable/12/contrib/unbound/iterator/iterator.c stable/12/contrib/unbound/iterator/iterator.h stable/12/contrib/unbound/libunbound/libworker.c stable/12/contrib/unbound/libunbound/unbound.h stable/12/contrib/unbound/respip/respip.c stable/12/contrib/unbound/services/authzone.c stable/12/contrib/unbound/services/authzone.h stable/12/contrib/unbound/services/listen_dnsport.c stable/12/contrib/unbound/services/listen_dnsport.h stable/12/contrib/unbound/services/localzone.c stable/12/contrib/unbound/services/mesh.c stable/12/contrib/unbound/services/modstack.c stable/12/contrib/unbound/services/outside_network.c stable/12/contrib/unbound/services/outside_network.h stable/12/contrib/unbound/services/rpz.c stable/12/contrib/unbound/services/rpz.h stable/12/contrib/unbound/sldns/parseutil.c stable/12/contrib/unbound/smallapp/unbound-anchor.c stable/12/contrib/unbound/smallapp/unbound-checkconf.c stable/12/contrib/unbound/smallapp/unbound-control-setup.sh.in stable/12/contrib/unbound/smallapp/unbound-control.c stable/12/contrib/unbound/smallapp/worker_cb.c stable/12/contrib/unbound/util/config_file.c stable/12/contrib/unbound/util/config_file.h stable/12/contrib/unbound/util/configlexer.lex stable/12/contrib/unbound/util/configparser.y stable/12/contrib/unbound/util/fptr_wlist.c stable/12/contrib/unbound/util/iana_ports.inc stable/12/contrib/unbound/util/mini_event.h stable/12/contrib/unbound/util/net_help.c stable/12/contrib/unbound/util/net_help.h stable/12/contrib/unbound/util/netevent.c stable/12/contrib/unbound/util/netevent.h stable/12/contrib/unbound/util/shm_side/shm_main.c stable/12/contrib/unbound/util/ub_event.c stable/12/contrib/unbound/validator/val_secalgo.c stable/12/contrib/unbound/validator/val_sigcrypt.c stable/12/usr.sbin/unbound/config.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Added: stable/11/contrib/unbound/README-Travis.md - copied unchanged from r364721, head/contrib/unbound/README-Travis.md stable/11/contrib/unbound/contrib/android/ - copied from r364721, head/contrib/unbound/contrib/android/ stable/11/contrib/unbound/contrib/ios/ - copied from r364721, head/contrib/unbound/contrib/ios/ stable/11/contrib/unbound/dnstap/dnstap_fstrm.c - copied unchanged from r364721, head/contrib/unbound/dnstap/dnstap_fstrm.c stable/11/contrib/unbound/dnstap/dnstap_fstrm.h - copied unchanged from r364721, head/contrib/unbound/dnstap/dnstap_fstrm.h stable/11/contrib/unbound/dnstap/dtstream.c - copied unchanged from r364721, head/contrib/unbound/dnstap/dtstream.c stable/11/contrib/unbound/dnstap/dtstream.h - copied unchanged from r364721, head/contrib/unbound/dnstap/dtstream.h stable/11/contrib/unbound/dnstap/unbound-dnstap-socket.c - copied unchanged from r364721, head/contrib/unbound/dnstap/unbound-dnstap-socket.c stable/11/contrib/unbound/dynlibmod/ - copied from r364721, head/contrib/unbound/dynlibmod/ Modified: stable/11/contrib/unbound/.github/FUNDING.yml stable/11/contrib/unbound/.travis.yml stable/11/contrib/unbound/Makefile.in stable/11/contrib/unbound/acx_python.m4 stable/11/contrib/unbound/cachedb/cachedb.c stable/11/contrib/unbound/cachedb/cachedb.h stable/11/contrib/unbound/cachedb/redis.c stable/11/contrib/unbound/config.guess stable/11/contrib/unbound/config.h.in stable/11/contrib/unbound/config.sub stable/11/contrib/unbound/configure stable/11/contrib/unbound/configure.ac stable/11/contrib/unbound/contrib/aaaa-filter-iterator.patch stable/11/contrib/unbound/contrib/fastrpz.patch stable/11/contrib/unbound/contrib/libunbound.pc.in stable/11/contrib/unbound/contrib/unbound.service.in stable/11/contrib/unbound/daemon/acl_list.c stable/11/contrib/unbound/daemon/daemon.c stable/11/contrib/unbound/daemon/remote.c stable/11/contrib/unbound/daemon/unbound.c stable/11/contrib/unbound/daemon/worker.c stable/11/contrib/unbound/dns64/dns64.c stable/11/contrib/unbound/dnstap/dnstap.c stable/11/contrib/unbound/dnstap/dnstap.h stable/11/contrib/unbound/dnstap/dnstap.m4 stable/11/contrib/unbound/doc/Changelog stable/11/contrib/unbound/doc/README stable/11/contrib/unbound/doc/example.conf.in stable/11/contrib/unbound/doc/libunbound.3.in stable/11/contrib/unbound/doc/unbound-anchor.8.in stable/11/contrib/unbound/doc/unbound-checkconf.8.in stable/11/contrib/unbound/doc/unbound-control.8.in stable/11/contrib/unbound/doc/unbound-host.1.in stable/11/contrib/unbound/doc/unbound.8.in stable/11/contrib/unbound/doc/unbound.conf.5.in stable/11/contrib/unbound/edns-subnet/subnetmod.c stable/11/contrib/unbound/edns-subnet/subnetmod.h stable/11/contrib/unbound/iterator/iter_utils.c stable/11/contrib/unbound/iterator/iterator.c stable/11/contrib/unbound/iterator/iterator.h stable/11/contrib/unbound/libunbound/libworker.c stable/11/contrib/unbound/libunbound/unbound.h stable/11/contrib/unbound/respip/respip.c stable/11/contrib/unbound/services/authzone.c stable/11/contrib/unbound/services/authzone.h stable/11/contrib/unbound/services/listen_dnsport.c stable/11/contrib/unbound/services/listen_dnsport.h stable/11/contrib/unbound/services/localzone.c stable/11/contrib/unbound/services/mesh.c stable/11/contrib/unbound/services/modstack.c stable/11/contrib/unbound/services/outside_network.c stable/11/contrib/unbound/services/outside_network.h stable/11/contrib/unbound/services/rpz.c stable/11/contrib/unbound/services/rpz.h stable/11/contrib/unbound/sldns/parseutil.c stable/11/contrib/unbound/smallapp/unbound-anchor.c stable/11/contrib/unbound/smallapp/unbound-checkconf.c stable/11/contrib/unbound/smallapp/unbound-control-setup.sh.in stable/11/contrib/unbound/smallapp/unbound-control.c stable/11/contrib/unbound/smallapp/worker_cb.c stable/11/contrib/unbound/util/config_file.c stable/11/contrib/unbound/util/config_file.h stable/11/contrib/unbound/util/configlexer.lex stable/11/contrib/unbound/util/configparser.y stable/11/contrib/unbound/util/fptr_wlist.c stable/11/contrib/unbound/util/iana_ports.inc stable/11/contrib/unbound/util/mini_event.h stable/11/contrib/unbound/util/net_help.c stable/11/contrib/unbound/util/net_help.h stable/11/contrib/unbound/util/netevent.c stable/11/contrib/unbound/util/netevent.h stable/11/contrib/unbound/util/shm_side/shm_main.c stable/11/contrib/unbound/util/ub_event.c stable/11/contrib/unbound/validator/val_secalgo.c stable/11/contrib/unbound/validator/val_sigcrypt.c stable/11/usr.sbin/unbound/config.h Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/unbound/.github/FUNDING.yml ============================================================================== --- stable/12/contrib/unbound/.github/FUNDING.yml Wed Sep 23 21:57:29 2020 (r366094) +++ stable/12/contrib/unbound/.github/FUNDING.yml Wed Sep 23 22:36:38 2020 (r366095) @@ -1,12 +1,2 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username +github: [NLnetLabs] custom: ['https://nlnetlabs.nl/funding/'] Modified: stable/12/contrib/unbound/.travis.yml ============================================================================== --- stable/12/contrib/unbound/.travis.yml Wed Sep 23 21:57:29 2020 (r366094) +++ stable/12/contrib/unbound/.travis.yml Wed Sep 23 22:36:38 2020 (r366095) @@ -1,7 +1,8 @@ -sudo: false language: c -compiler: - - gcc + +git: + depth: 5 + addons: apt: packages: @@ -9,8 +10,335 @@ addons: - libevent-dev - libexpat-dev - clang + homebrew: + packages: + - openssl + - libevent + - expat + update: true + +jobs: + include: + - os: linux + name: GCC on Linux, Amd64 + compiler: gcc + arch: amd64 + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: linux + name: Clang on Linux, Amd64 + compiler: clang + arch: amd64 + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: osx + name: Clang on OS X, Amd64 + compiler: clang + arch: amd64 + env: + - TEST_OSX=yes + - CONFIG_OPTS="--enable-debug --disable-flto --with-ssl=/usr/local/opt/openssl/" + - os: linux + name: Libevent, GCC on Linux, Amd64 + compiler: gcc + arch: amd64 + env: + - TEST_LIBEVENT=yes + - CONFIG_OPTS="--with-libevent" + - os: linux + name: Libevent, Clang on Linux, Amd64 + compiler: clang + arch: amd64 + env: + - TEST_LIBEVENT=yes + - CONFIG_OPTS="--with-libevent" + - os: osx + name: Libevent, Clang on OS X, Amd64 + compiler: clang + arch: amd64 + env: + - TEST_OSX=yes + - TEST_LIBEVENT=yes + - CONFIG_OPTS="--with-ssl=/usr/local/opt/openssl/ --with-libevent=/usr/local/opt/libevent/" + - os: linux + name: UBsan, GCC on Linux, Amd64 + compiler: gcc + arch: amd64 + dist: bionic + env: + - TEST_UBSAN=yes + - os: linux + name: UBsan, Clang on Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: + - TEST_UBSAN=yes + - os: linux + name: Asan, GCC on Linux, Amd64 + compiler: gcc + arch: amd64 + dist: bionic + env: + - TEST_ASAN=yes + - os: linux + name: Asan, Clang on Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: + - TEST_ASAN=yes + - os: linux + name: GCC on Linux, Aarch64 + compiler: gcc + arch: arm64 + dist: bionic + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: linux + name: Clang on Linux, Aarch64 + compiler: clang + arch: arm64 + dist: bionic + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: linux + name: GCC on Linux, PowerPC64 + compiler: gcc + arch: ppc64le + dist: bionic + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: linux + name: Clang on Linux, PowerPC64 + compiler: clang + arch: ppc64le + dist: bionic + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: linux + name: GCC on Linux, s390x + compiler: gcc + arch: s390x + dist: bionic + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: linux + name: Clang on Linux, s390x + compiler: clang + arch: s390x + dist: bionic + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: osx + osx_image: xcode10 + name: Apple iPhone on iOS, armv7 + compiler: clang + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=armv7-apple-ios + - OPENSSL_HOST=ios-cross + - IOS_SDK=iPhoneOS + - IOS_CPU=armv7s + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: osx + osx_image: xcode10 + name: Apple iPhone on iOS, arm64 + compiler: clang + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=aarch64-apple-ios + - OPENSSL_HOST=ios64-cross + - IOS_SDK=iPhoneOS + - IOS_CPU=arm64 + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: osx + osx_image: xcode10 + name: Apple TV on iOS, arm64 + compiler: clang + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=aarch64-apple-ios + - OPENSSL_HOST=ios64-cross + - IOS_SDK=AppleTVOS + - IOS_CPU=arm64 + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: osx + osx_image: xcode10 + name: Apple Watch on iOS, armv7 + compiler: clang + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=armv7-apple-ios + - OPENSSL_HOST=ios-cross + - IOS_SDK=WatchOS + - IOS_CPU=armv7k + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: osx + osx_image: xcode10 + name: iPhoneSimulator on OS X, i386 + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=i386-apple-ios + - OPENSSL_HOST=iphoneos-cross + - IOS_CPU=i386 + - IOS_SDK=iPhoneSimulator + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: osx + osx_image: xcode10 + name: iPhoneSimulator on OS X, x86_64 + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=x86_64-apple-ios + - OPENSSL_HOST=iphoneos-cross + - IOS_CPU=x86_64 + - IOS_SDK=iPhoneSimulator + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: osx + osx_image: xcode10 + name: AppleTVSimulator on OS X, x86_64 + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=x86_64-apple-ios + - OPENSSL_HOST=iphoneos-cross + - IOS_CPU=x86_64 + - IOS_SDK=AppleTVSimulator + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: osx + osx_image: xcode10 + name: WatchSimulator on OS X, i386 + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=i386-apple-ios + - OPENSSL_HOST=iphoneos-cross + - IOS_CPU=i386 + - IOS_SDK=WatchSimulator + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: linux + name: Android armv7a, Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: + - TEST_ANDROID=yes + - AUTOTOOLS_HOST=armv7a-linux-androideabi + - OPENSSL_HOST=android-arm + - ANDROID_CPU=armv7a + - ANDROID_API=23 + - ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU" + - ANDROID_SDK_ROOT="$HOME/android-sdk" + - ANDROID_NDK_ROOT="$HOME/android-ndk" + - os: linux + name: Android aarch64, Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: + - TEST_ANDROID=yes + - AUTOTOOLS_HOST=aarch64-linux-android + - OPENSSL_HOST=android-arm64 + - ANDROID_CPU=aarch64 + - ANDROID_API=23 + - ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU" + - ANDROID_SDK_ROOT="$HOME/android-sdk" + - ANDROID_NDK_ROOT="$HOME/android-ndk" + - os: linux + name: Android x86, Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: + - TEST_ANDROID=yes + - AUTOTOOLS_HOST=i686-linux-android + - OPENSSL_HOST=android-x86 + - ANDROID_CPU=x86 + - ANDROID_API=23 + - ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU" + - ANDROID_SDK_ROOT="$HOME/android-sdk" + - ANDROID_NDK_ROOT="$HOME/android-ndk" + - os: linux + name: Android x86_64, Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: + - TEST_ANDROID=yes + - AUTOTOOLS_HOST=x86_64-linux-android + - OPENSSL_HOST=android-x86_64 + - ANDROID_CPU=x86_64 + - ANDROID_API=23 + - ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU" + - ANDROID_SDK_ROOT="$HOME/android-sdk" + - ANDROID_NDK_ROOT="$HOME/android-ndk" + + allow_failures: + - os: linux + name: Android armv7a, Linux, Amd64 + - os: linux + name: Android aarch64, Linux, Amd64 + - os: linux + name: Android x86, Linux, Amd64 + - os: linux + name: Android x86_64, Linux, Amd64 + +before_script: + - | + if [ "$TEST_ANDROID" = "yes" ]; then + ./contrib/android/install_tools.sh + elif [ "$TEST_IOS" = "yes" ]; then + ./contrib/ios/install_tools.sh + fi + +# The Travis docs say to avoid calling exit in the script. It leads to +# some code duplication to avoid failures in cross-compiles. Also see +# https://docs.travis-ci.com/user/job-lifecycle/ in the Travis docs. script: - - ./configure --enable-debug --disable-flto - - make - - make test - - (cd testdata/clang-analysis.tdir; bash clang-analysis.test) + - | + if [ "$TEST_UBSAN" = "yes" ]; then + export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=undefined -fno-sanitize-recover" + ./configure + make -j 2 + make test + elif [ "$TEST_ASAN" = "yes" ]; then + export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=address" + ./configure + make -j 2 + make test + elif [ "$TEST_IOS" = "yes" ]; then + export AUTOTOOLS_BUILD="$(./config.guess)" + export PKG_CONFIG_PATH="$IOS_PREFIX/lib/pkgconfig" + source ./contrib/ios/setenv_ios.sh + ./contrib/ios/install_openssl.sh + ./contrib/ios/install_expat.sh + ./configure \ + --build="$AUTOTOOLS_BUILD" --host="$AUTOTOOLS_HOST" \ + --prefix="$IOS_PREFIX" \ + --with-ssl="$IOS_PREFIX" --disable-gost \ + --with-libexpat="$IOS_PREFIX"; + make -j 2 + make install + elif [ "$TEST_ANDROID" = "yes" ]; then + export AUTOTOOLS_BUILD="$(./config.guess)" + export PKG_CONFIG_PATH="$ANDROID_PREFIX/lib/pkgconfig" + ./contrib/android/install_ndk.sh + source ./contrib/android/setenv_android.sh + ./contrib/android/install_openssl.sh + ./contrib/android/install_expat.sh + ./configure \ + --build="$AUTOTOOLS_BUILD" --host="$AUTOTOOLS_HOST" \ + --prefix="$ANDROID_PREFIX" \ + --with-ssl="$ANDROID_PREFIX" --disable-gost \ + --with-libexpat="$ANDROID_PREFIX"; + make -j 2 + make install + elif [ "$TEST_OSX" = "yes" ]; then + ./configure --enable-debug --disable-flto --with-ssl=/usr/local/opt/openssl/ + make -j 2 + make test + (cd testdata/clang-analysis.tdir; bash clang-analysis.test) + else + ./configure ${CONFIG_OPTS} + make -j 2 + make test + (cd testdata/clang-analysis.tdir; bash clang-analysis.test) + fi Modified: stable/12/contrib/unbound/Makefile.in ============================================================================== --- stable/12/contrib/unbound/Makefile.in Wed Sep 23 21:57:29 2020 (r366094) +++ stable/12/contrib/unbound/Makefile.in Wed Sep 23 22:36:38 2020 (r366095) @@ -25,6 +25,7 @@ DNSTAP_SRC=@DNSTAP_SRC@ DNSTAP_OBJ=@DNSTAP_OBJ@ DNSCRYPT_SRC=@DNSCRYPT_SRC@ DNSCRYPT_OBJ=@DNSCRYPT_OBJ@ +WITH_DYNLIBMODULE=@WITH_DYNLIBMODULE@ WITH_PYTHONMODULE=@WITH_PYTHONMODULE@ WITH_PYUNBOUND=@WITH_PYUNBOUND@ PY_MAJOR_VERSION=@PY_MAJOR_VERSION@ @@ -77,7 +78,7 @@ LINT=splint LINTFLAGS=+quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t -preproc -Drlimit=rlimit64 -D__gnuc_va_list=va_list -formatcode #-Dglob64=glob -Dglobfree64=globfree # compat with openssl linux edition. -LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned" -D"ECDSA_SIG=DSA_SIG" -Dfstrm_res=int +LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned" -D"ECDSA_SIG=DSA_SIG" # compat with NetBSD LINTFLAGS+=@NETBSD_LINTFLAGS@ # compat with OpenBSD @@ -87,6 +88,12 @@ LINTFLAGS+="-D__uint16_t=uint16_t" "-DEVP_PKEY_ASN1_ME INSTALL=$(SHELL) $(srcdir)/install-sh +DYNLIBMOD_SRC=dynlibmod/dynlibmod.c +DYNLIBMOD_OBJ=@DYNLIBMOD_OBJ@ +DYNLIBMOD_HEADER=@DYNLIBMOD_HEADER@ +DYNLIBMOD_EXTRALIBS=@DYNLIBMOD_EXTRALIBS@ + + #pythonmod.c is not here, it is mentioned by itself in its own rules, #makedepend fails on missing interface.h otherwise. PYTHONMOD_SRC=pythonmod/pythonmod_utils.c @@ -140,7 +147,7 @@ autotrust.lo val_anchor.lo rpz.lo \ validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo \ val_secalgo.lo val_sigcrypt.lo val_utils.lo dns64.lo cachedb.lo redis.lo authzone.lo \ $(SUBNET_OBJ) $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) $(DNSTAP_OBJ) $(DNSCRYPT_OBJ) \ -$(IPSECMOD_OBJ) $(IPSET_OBJ) respip.lo +$(IPSECMOD_OBJ) $(IPSET_OBJ) $(DYNLIBMOD_OBJ) respip.lo COMMON_OBJ_WITHOUT_UB_EVENT=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ outside_network.lo COMMON_OBJ=$(COMMON_OBJ_WITHOUT_UB_EVENT) ub_event.lo @@ -219,7 +226,7 @@ MEMSTATS_OBJ_LINK=$(MEMSTATS_OBJ) worker_cb.lo $(COMMO $(SLDNS_OBJ) ASYNCLOOK_SRC=testcode/asynclook.c ASYNCLOOK_OBJ=asynclook.lo -ASYNCLOOK_OBJ_LINK=$(ASYNCLOOK_OBJ) log.lo locks.lo $(COMPAT_OBJ) @ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ@ +ASYNCLOOK_OBJ_LINK=$(ASYNCLOOK_OBJ) log.lo locks.lo $(CHECKLOCK_OBJ) $(COMPAT_OBJ) @ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ@ STREAMTCP_SRC=testcode/streamtcp.c STREAMTCP_OBJ=streamtcp.lo STREAMTCP_OBJ_LINK=$(STREAMTCP_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) \ @@ -233,6 +240,10 @@ DELAYER_OBJ_LINK=$(DELAYER_OBJ) worker_cb.lo $(COMMON_ $(SLDNS_OBJ) IPSET_SRC=@IPSET_SRC@ IPSET_OBJ=@IPSET_OBJ@ +DNSTAP_SOCKET_SRC=dnstap/unbound-dnstap-socket.c +DNSTAP_SOCKET_OBJ=unbound-dnstap-socket.lo +DNSTAP_SOCKET_OBJ_LINK=$(DNSTAP_SOCKET_OBJ) $(COMMON_OBJ) \ +$(COMPAT_OBJ) $(SLDNS_OBJ) LIBUNBOUND_SRC=libunbound/context.c libunbound/libunbound.c \ libunbound/libworker.c LIBUNBOUND_OBJ=context.lo libunbound.lo libworker.lo ub_event_pluggable.lo @@ -259,7 +270,7 @@ ALL_SRC=$(COMMON_SRC) $(UNITTEST_SRC) $(DAEMON_SRC) \ $(TESTBOUND_SRC) $(LOCKVERIFY_SRC) $(PKTVIEW_SRC) \ $(MEMSTATS_SRC) $(CHECKCONF_SRC) $(LIBUNBOUND_SRC) $(HOST_SRC) \ $(ASYNCLOOK_SRC) $(STREAMTCP_SRC) $(PERF_SRC) $(DELAYER_SRC) \ - $(CONTROL_SRC) $(UBANCHOR_SRC) $(PETAL_SRC) \ + $(CONTROL_SRC) $(UBANCHOR_SRC) $(PETAL_SRC) $(DNSTAP_SOCKET_SRC)\ $(PYTHONMOD_SRC) $(PYUNBOUND_SRC) $(WIN_DAEMON_THE_SRC) \ $(SVCINST_SRC) $(SVCUNINST_SRC) $(ANCHORUPD_SRC) $(SLDNS_SRC) @@ -267,7 +278,7 @@ ALL_OBJ=$(COMMON_OBJ) $(UNITTEST_OBJ) $(DAEMON_OBJ) \ $(TESTBOUND_OBJ) $(LOCKVERIFY_OBJ) $(PKTVIEW_OBJ) \ $(MEMSTATS_OBJ) $(CHECKCONF_OBJ) $(LIBUNBOUND_OBJ) $(HOST_OBJ) \ $(ASYNCLOOK_OBJ) $(STREAMTCP_OBJ) $(PERF_OBJ) $(DELAYER_OBJ) \ - $(CONTROL_OBJ) $(UBANCHOR_OBJ) $(PETAL_OBJ) \ + $(CONTROL_OBJ) $(UBANCHOR_OBJ) $(PETAL_OBJ) $(DNSTAP_SOCKET_OBJ)\ $(COMPAT_OBJ) $(PYUNBOUND_OBJ) \ $(SVCINST_OBJ) $(SVCUNINST_OBJ) $(ANCHORUPD_OBJ) $(SLDNS_OBJ) @@ -306,6 +317,7 @@ rsrc_unbound_checkconf.o: $(srcdir)/winrc/rsrc_unbound TEST_BIN=asynclook$(EXEEXT) delayer$(EXEEXT) \ lock-verify$(EXEEXT) memstats$(EXEEXT) perf$(EXEEXT) \ petal$(EXEEXT) pktview$(EXEEXT) streamtcp$(EXEEXT) \ + unbound-dnstap-socket$(EXEEXT) \ testbound$(EXEEXT) unittest$(EXEEXT) tests: all $(TEST_BIN) @@ -315,7 +327,7 @@ longcheck: longtest test: unittest$(EXEEXT) testbound$(EXEEXT) ./unittest$(EXEEXT) ./testbound$(EXEEXT) -s - for x in $(srcdir)/testdata/*.rpl; do echo -n "$$x "; if ./testbound$(EXEEXT) -p $$x >/dev/null 2>&1; then echo OK; else echo failed; exit 1; fi done + for x in $(srcdir)/testdata/*.rpl; do printf "%s" "$$x "; if ./testbound$(EXEEXT) -p $$x >/dev/null 2>&1; then echo OK; else echo failed; exit 1; fi done @echo test OK longtest: tests @@ -328,13 +340,13 @@ libunbound.la: $(LIBUNBOUND_OBJ_LINK) $(LINK_LIB) $(UBSYMS) -o $@ $(LIBUNBOUND_OBJ_LINK) -rpath $(libdir) $(SSLLIB) $(LIBS) unbound$(EXEEXT): $(DAEMON_OBJ_LINK) libunbound.la - $(LINK) -o $@ $(DAEMON_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(DAEMON_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) unbound-checkconf$(EXEEXT): $(CHECKCONF_OBJ_LINK) libunbound.la - $(LINK) -o $@ $(CHECKCONF_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(CHECKCONF_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) unbound-control$(EXEEXT): $(CONTROL_OBJ_LINK) libunbound.la - $(LINK) -o $@ $(CONTROL_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(CONTROL_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) unbound-host$(EXEEXT): $(HOST_OBJ_LINK) libunbound.la $(LINK) -o $@ $(HOST_OBJ_LINK) -L. -L.libs -lunbound $(SSLLIB) $(LIBS) @@ -352,34 +364,34 @@ anchor-update$(EXEEXT): $(ANCHORUPD_OBJ_LINK) libunbo $(LINK) -o $@ $(ANCHORUPD_OBJ_LINK) -L. -L.libs -lunbound $(LIBS) unittest$(EXEEXT): $(UNITTEST_OBJ_LINK) - $(LINK) -o $@ $(UNITTEST_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(UNITTEST_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) testbound$(EXEEXT): $(TESTBOUND_OBJ_LINK) - $(LINK) -o $@ $(TESTBOUND_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(TESTBOUND_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) lock-verify$(EXEEXT): $(LOCKVERIFY_OBJ_LINK) - $(LINK) -o $@ $(LOCKVERIFY_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(LOCKVERIFY_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) petal$(EXEEXT): $(PETAL_OBJ_LINK) $(LINK) -o $@ $(PETAL_OBJ_LINK) $(SSLLIB) $(LIBS) pktview$(EXEEXT): $(PKTVIEW_OBJ_LINK) - $(LINK) -o $@ $(PKTVIEW_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(PKTVIEW_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) memstats$(EXEEXT): $(MEMSTATS_OBJ_LINK) - $(LINK) -o $@ $(MEMSTATS_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(MEMSTATS_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) asynclook$(EXEEXT): $(ASYNCLOOK_OBJ_LINK) libunbound.la $(LINK) -o $@ $(ASYNCLOOK_OBJ_LINK) -L. -L.libs -lunbound $(SSLLIB) $(LIBS) streamtcp$(EXEEXT): $(STREAMTCP_OBJ_LINK) - $(LINK) -o $@ $(STREAMTCP_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(STREAMTCP_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) perf$(EXEEXT): $(PERF_OBJ_LINK) - $(LINK) -o $@ $(PERF_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(PERF_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) delayer$(EXEEXT): $(DELAYER_OBJ_LINK) - $(LINK) -o $@ $(DELAYER_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(DELAYER_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) signit$(EXEEXT): testcode/signit.c $(CC) $(CPPFLAGS) $(CFLAGS) @PTHREAD_CFLAGS_ONLY@ -o $@ testcode/signit.c $(LDFLAGS) -lldns $(SSLLIB) $(LIBS) @@ -401,7 +413,13 @@ dnstap/dnstap.pb-c.c dnstap/dnstap.pb-c.h: $(srcdir)/d @-if test ! -d dnstap; then $(INSTALL) -d dnstap; fi $(PROTOC_C) --c_out=. --proto_path=$(srcdir) $(srcdir)/dnstap/dnstap.proto +unbound-dnstap-socket$(EXEEXT): $(DNSTAP_SOCKET_OBJ_LINK) + $(LINK) -o $@ $(DNSTAP_SOCKET_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) + dnstap.pb-c.lo dnstap.pb-c.o: dnstap/dnstap.pb-c.c dnstap/dnstap.pb-c.h +dtstream.lo dtstream.o: $(srcdir)/dnstap/dtstream.c config.h $(srcdir)/dnstap/dtstream.h +dnstap_fstrm.lo dnstap_fstrm.o: $(srcdir)/dnstap/dnstap_fstrm.c config.h $(srcdir)/dnstap/dnstap_fstrm.h +unbound-dnstap-socket.lo unbound-dnstap-socket.o: $(srcdir)/dnstap/unbound-dnstap-socket.c config.h $(srcdir)/dnstap/dtstream.h # dnscrypt dnscrypt.lo dnscrypt.o: $(srcdir)/dnscrypt/dnscrypt.c config.h \ @@ -455,6 +473,7 @@ clean: rm -f unbound$(EXEEXT) unbound-checkconf$(EXEEXT) unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup libunbound.la unbound.h rm -f $(ALL_SRC:.c=.lint) rm -f _unbound.la libunbound/python/libunbound_wrap.c libunbound/python/unbound.py pythonmod/interface.h pythonmod/unboundmodule.py + rm -f libunbound.a rm -rf autom4te.cache .libs build doc/html doc/xml distclean: clean @@ -629,6 +648,7 @@ depend: -e 's?$$(srcdir)/pythonmod/pythonmod.h?$$(PYTHONMOD_HEADER)?g' \ -e 's?$$(srcdir)/edns-subnet/subnetmod.h $$(srcdir)/edns-subnet/subnet-whitelist.h $$(srcdir)/edns-subnet/edns-subnet.h $$(srcdir)/edns-subnet/addrtree.h?$$(SUBNET_HEADER)?g' \ -e 's?$$(srcdir)/ipsecmod/ipsecmod.h $$(srcdir)/ipsecmod/ipsecmod-whitelist.h?$$(IPSECMOD_HEADER)?g' \ + -e 's?$$(srcdir)/dynlibmod/dynlibmod.h?$$(DYNLIBMOD_HEADER)?g' \ -e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' \ > $(DEPEND_TMP) cp $(DEPEND_TARGET) $(DEPEND_TMP2) @@ -796,12 +816,13 @@ modstack.lo modstack.o: $(srcdir)/services/modstack.c $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/rpz.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(srcdir)/sldns/sbuffer.h \ - $(srcdir)/util/config_file.h $(srcdir)/services/authzone.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ - $(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h $(srcdir)/dns64/dns64.h $(srcdir)/iterator/iterator.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/dns64/dns64.h \ + $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/respip/respip.h $(srcdir)/services/localzone.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(PYTHONMOD_HEADER) $(srcdir)/ipsecmod/ipsecmod.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/edns-subnet/addrtree.h $(srcdir)/edns-subnet/edns-subnet.h \ + $(srcdir)/ipset/ipset.h $(srcdir)/dynlibmod/dynlibmod.h view.lo view.o: $(srcdir)/services/view.c config.h $(srcdir)/services/view.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/msgreply.h \ @@ -886,21 +907,23 @@ authzone.lo authzone.o: $(srcdir)/services/authzone.c $(srcdir)/validator/val_secalgo.h fptr_wlist.lo fptr_wlist.o: $(srcdir)/util/fptr_wlist.c config.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(srcdir)/sldns/sbuffer.h \ - $(srcdir)/util/config_file.h $(srcdir)/services/authzone.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ - $(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/outside_network.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h \ - $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ - $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h \ - $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h \ - $(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/libunbound/libworker.h \ - $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/libunbound/unbound-event.h \ - $(srcdir)/libunbound/worker.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \ + $(srcdir)/services/outside_network.h $(srcdir)/services/localzone.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(srcdir)/services/authzone.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/validator/validator.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_nsec3.h \ + $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_neg.h \ + $(srcdir)/validator/autotrust.h $(srcdir)/libunbound/libworker.h $(srcdir)/libunbound/context.h \ + $(srcdir)/util/alloc.h $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/unbound-event.h \ + $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h $(srcdir)/respip/respip.h \ + $(PYTHONMOD_HEADER) $(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/edns-subnet/subnetmod.h $(srcdir)/util/net_help.h \ + $(srcdir)/edns-subnet/addrtree.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/ipset/ipset.h \ + $(srcdir)/dynlibmod/dynlibmod.h locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/sldns/sbuffer.h mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ @@ -1108,7 +1131,32 @@ respip.lo respip.o: $(srcdir)/respip/respip.c config.h $(srcdir)/util/regional.h checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/testcode/checklocks.h +dnstap.lo dnstap.o: $(srcdir)/dnstap/dnstap.c config.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/util/locks.h $(srcdir)/dnstap/dnstap.h \ + dnstap/dnstap.pb-c.h +dnstap.pb-c.lo dnstap.pb-c.o: dnstap/dnstap.pb-c.c dnstap/dnstap.pb-c.h \ + +dynlibmod.lo dynlibmod.o: $(srcdir)/dynlibmod/dynlibmod.c config.h $(srcdir)/dynlibmod/dynlibmod.h \ + $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/rbtree.h\ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/config_file.h $(srcdir)/services/cache/dns.h $(srcdir)/sldns/wire2str.h +dnscrypt.lo dnscrypt.o: $(srcdir)/dnscrypt/dnscrypt.c config.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/util/locks.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/storage/lookup3.h ipsecmod.lo ipsecmod.o: $(srcdir)/ipsecmod/ipsecmod.c config.h +ipset.lo ipset.o: $(srcdir)/ipset/ipset.c config.h $(srcdir)/ipset/ipset.h $(srcdir)/util/module.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/services/cache/dns.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/parseutil.h ipsecmod-whitelist.lo ipsecmod-whitelist.o: $(srcdir)/ipsecmod/ipsecmod-whitelist.c config.h unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/testcode/unitmain.h \ Copied: stable/12/contrib/unbound/README-Travis.md (from r364721, head/contrib/unbound/README-Travis.md) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/contrib/unbound/README-Travis.md Wed Sep 23 22:36:38 2020 (r366095, copy of r364721, head/contrib/unbound/README-Travis.md) @@ -0,0 +1,278 @@ +# Travis Testing + +Unbound 1.10 and above leverage Travis CI to increase coverage of compilers and platforms. Compilers include Clang and GCC; while platforms include Android, iOS, Linux, and OS X on AMD64, Aarch64, PowerPC and s390x hardware. + +Android is tested on armv7a, aarch64, x86 and x86_64. The Android recipes build and install OpenSSL and Expat, and then builds Unbound. The testing is tailored for Android NDK-r19 and above, and includes NDK-r20 and NDK-r21. Mips and Mips64 are not tested because they are no longer supported under current NDKs. + +iOS is tested for iPhoneOS, WatchOS, AppleTVOS, iPhoneSimulator, AppleTVSimulator and WatchSimulator. The testing uses Xcode 10 on OS X 10.13. + +The Unbound Travis configuration file `.travis.yml` does not use top-level keys like `os:` and `compiler:` so there is no matrix expansion. Instead Unbound specifies the exact job to run under the `jobs:` and `include:` keys. + +## Typical recipe + +A typical recipe tests Clang and GCC on various hardware. The hardware includes AMD64, Aarch64, PowerPC and s390x. PowerPC is a little-endian platform, and s390x is a big-endian platform. There are pairs of recipes that are similar to the following. + +``` +- os: linux + name: GCC on Linux, Aarch64 + compiler: gcc + arch: arm64 + dist: bionic +- os: linux + name: Clang on Linux, Aarch64 + compiler: clang + arch: arm64 + dist: bionic +``` + +OS X provides a single recipe to test Clang. GCC is not tested because GCC is an alias for Clang. + +## Sanitizer builds + +Two sanitizer builds are tested using Clang and GCC, for a total of four builds. The first sanitizer is Undefined Behavior sanitizer (UBsan), and the second is Address sanitizer (Asan). The sanitizers are only run on AMD64 hardware. Note the environment includes `TEST_UBSAN=yes` or `TEST_ASAN=yes` for the sanitizer builds. + +The recipes are similar to the following. + +``` +- os: linux + name: UBsan, GCC on Linux, Amd64 + compiler: gcc + arch: amd64 + dist: bionic + env: TEST_UBSAN=yes +- os: linux + name: UBsan, Clang on Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: TEST_UBSAN=yes +``` + +When the Travis script encounters a sanitizer it uses different `CFLAGS` and configuration string. + +``` +if [ "$TEST_UBSAN" = "yes" ]; then + export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=undefined -fno-sanitize-recover" + ./configure + make -j 2 + make test +elif [ "$TEST_ASAN" = "yes" ]; then + export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=address" + ./configure + make -j 2 + make test +... +``` + +## Android builds + +Travis tests Android builds for the armv7a, aarch64, x86 and x86_64 architectures. The builds are trickier than other builds for several reasons. The testing requires installation of the Android NDK and SDK, it requires a cross-compile, and requires OpenSSL and Expat prerequisites. The Android cross-compiles also require care to set the Autotools triplet, the OpenSSL triplet, the toolchain path, the tool variables, and the sysroot. The discussion below detail the steps of the Android recipes. + +### Android job + +The first step sets environmental variables for the cross-compile using the Travis job. A typical job with variables is shown below. + +``` +- os: linux + name: Android armv7a, Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: + - TEST_ANDROID=yes + - AUTOTOOLS_HOST=armv7a-linux-androideabi + - OPENSSL_HOST=android-arm + - ANDROID_CPU=armv7a + - ANDROID_API=23 + - ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU" + - ANDROID_SDK_ROOT="$HOME/android-sdk" + - ANDROID_NDK_ROOT="$HOME/android-ndk" +``` + +### ANDROID_NDK_ROOT + +The second step for Android is to set the environmental variables `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT`. This is an important step because the NDK and SDK use the variables internally to locate their own tools. Also see [Recommended NDK Directory?](https://groups.google.com/forum/#!topic/android-ndk/qZjhOaynHXc) on the android-ndk mailing list. (Many folks miss this step, or use incorrect variables like `ANDROID_NDK_HOME` or `ANDROID_SDK_HOME`). + +If you are working from a developer machine you probably already have the necessary tools installed. You should ensure `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT` are set properly. + +### Tool installation + +The second step installs tools needed for OpenSSL, Expat and Unbound. This step is handled in by the script `contrib/android/install_tools.sh`. The tools include curl, tar, zip, unzip and java. + +``` +before_script: + - | + if [ "$TEST_ANDROID" = "yes" ]; then + ./contrib/android/install_tools.sh + elif [ "$TEST_IOS" = "yes" ]; then + ./contrib/ios/install_tools.sh + fi +``` + +### NDK installation + +The third step installs the NDK and SDK. This step is handled in by the script `contrib/android/install_ndk.sh`. The script uses `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT` to place the NDK and SDK in the `$HOME` directory. + +If you are working from a developer machine you probably already have a NDK and SDK installed. + +### Android environment + +The fourth step sets the Android cross-compile environment using the script `contrib/android/setenv_android.sh`. The script is `sourced` so the variables in the script are available to the calling shell. The script sets variables like `CC`, `CXX`, `AS` and `AR`; sets `CFLAGS` and `CXXFLAGS`; sets a `sysroot` so Android headers and libraries are found; and adds the path to the toolchain to `PATH`. + +`contrib/android/setenv_android.sh` knows which toolchain and architecture to select by inspecting environmental variables set by Travis for the job. In particular, the variables `ANDROID_CPU` and `ANDROID_API` tell `contrib/android/setenv_android.sh` which tools and libraries to select. + +The `contrib/android/setenv_android.sh` script specifies the tools in a `case` statement like the following. There is a case for each of the architectures armv7a, aarch64, x86 and x86_64. + +``` +armv8a|aarch64|arm64|arm64-v8a) + CC="aarch64-linux-android$ANDROID_API-clang" + CXX="aarch64-linux-android$ANDROID_API-clang++" + LD="aarch64-linux-android-ld" + AS="aarch64-linux-android-as" + AR="aarch64-linux-android-ar" + RANLIB="aarch64-linux-android-ranlib" + STRIP="aarch64-linux-android-strip" + + CFLAGS="-funwind-tables -fexceptions" + CXXFLAGS="-funwind-tables -fexceptions -frtti" +``` + +### OpenSSL and Expat + +The fifth step builds OpenSSL and Expat. OpenSSL and Expat are built for Android using the scripts `contrib/android/install_openssl.sh` and `contrib/android/install_expat.sh`. The scripts download, configure and install the latest release version of the libraries. The libraries are configured with `--prefix="$ANDROID_PREFIX"` so the headers are placed in `$ANDROID_PREFIX/include` directory, and the libraries are placed in the `$ANDROID_PREFIX/lib` directory. + +`ANDROID_PREFIX` is the value `$HOME/android$ANDROID_API-$ANDROID_CPU`. The libraries will be installed in `$HOME/android23-armv7a`, `$HOME/android23-aarch64`, etc. For Autotools projects, the appropriate `PKG_CONFIG_PATH` is exported. `PKG_CONFIG_PATH` is the userland equivalent to sysroot, and allows Autotools to find non-system headers and libraries for an architecture. Typical `PKG_CONFIG_PATH` are `$HOME/android23-armv7a/lib/pkgconfig` and `$HOME/android23-aarch64/lib/pkgconfig`. + +OpenSSL also uses a custom configuration file called `15-android.conf`. It is a copy of the OpenSSL's project file and located at `contrib/android/15-android.conf`. The Unbound version is copied to the OpenSSL source files after unpacking the OpenSSL distribution. The Unbound version has legacy NDK support removed and some other fixes, like `ANDROID_NDK_ROOT` awareness. The changes mean Unbound's `15-android.conf` will only work with Unbound, with NDK-r19 and above, and a properly set environment. + +OpenSSL is configured with `no-engine`. If you want to include OpenSSL engines then edit `contrib/android/install_openssl.sh` and remove the config option. + +### Android build + +Finally, once OpenSSL and Expat are built, then the Travis script configures and builds Unbound. The recipe looks as follows. + +``` +elif [ "$TEST_ANDROID" = "yes" ]; then + export AUTOTOOLS_BUILD="$(./config.guess)" + export PKG_CONFIG_PATH="$ANDROID_PREFIX/lib/pkgconfig" + ./contrib/android/install_ndk.sh + source ./contrib/android/setenv_android.sh + ./contrib/android/install_openssl.sh + ./contrib/android/install_expat.sh + ./configure \ + --build="$AUTOTOOLS_BUILD" \ + --host="$AUTOTOOLS_HOST" \ + --prefix="$ANDROID_PREFIX" \ + --with-ssl="$ANDROID_PREFIX" \ + --with-libexpat="$ANDROID_PREFIX" \ + --disable-gost; + make -j 2 + make install +``` + +Travis only smoke tests an Android build using a compile, link and install. The self tests are not run. TODO: figure out how to fire up an emulator, push the tests to the device and run them. + +### Android flags + +`contrib/android/setenv_android.sh` uses specific flags for `CFLAGS` and `CXXFLAGS`. They are taken from `ndk-build`, so we consider them the official flag set. It is important to use the same flags across projects to avoid subtle problems due to mixing and matching different flags. + +`CXXFLAGS` includes `-fexceptions` and `-frtti` because exceptions and runtime type info are disabled by default. `CFLAGS` include `-funwind-tables` and `-fexceptions` to ensure C++ exceptions pass through C code, if needed. Also see `docs/CPLUSPLUS-SUPPORT.html` in the NDK docs. + +To inspect the flags used by `ndk-build` for a platform clone ASOP's [ndk-samples](https://github.com/android/ndk-samples/tree/master/hello-jni) and build the `hello-jni` project. Use the `V=1` flag to see the full compiler output from `ndk-build`. + +## iOS builds + +Travis tests iOS builds for the armv7a, armv7s and aarch64 architectures for iPhoneOS, AppleTVOS and WatchOS. iPhoneOS is tested using both 32-bit builds (iPhones) and 64-bit builds (iPads). Travis also tests compiles against the simulators. The builds are trickier than other builds for several reasons. The testing requires a cross-compile, and requires OpenSSL and Expat prerequisites. The iOS cross-compiles also require care to set the Autotools triplet, the OpenSSL triplet, the toolchain path, the tool variables, and the sysroot. The discussion below detail the steps of the iOS recipes. + +### iOS job + +The first step sets environmental variables for the cross-compile using the Travis job. A typical job with variables is shown below. + +``` +- os: osx + osx_image: xcode10 + name: Apple iPhone on iOS, armv7 + compiler: clang + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=armv7-apple-ios + - OPENSSL_HOST=ios-cross + - IOS_SDK=iPhoneOS + - IOS_CPU=armv7s + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" +``` + +### Tool installation + +The second step installs tools needed for OpenSSL, Expat and Unbound. This step is handled in by the script `contrib/ios/install_tools.sh`. The tools include autotools, curl and perl. The installation happens at the `before_script:` stage of Travis. + +``` +before_script: + - | + if [ "$TEST_ANDROID" = "yes" ]; then + ./contrib/android/install_tools.sh + elif [ "$TEST_IOS" = "yes" ]; then + ./contrib/ios/install_tools.sh + fi +``` + +### iOS environment + +The third step sets the iOS cross-compile environment using the script `contrib/ios/setenv_ios.sh`. The script is `sourced` so the variables in the script are available to the calling shell. The script sets variables like `CC`, `CXX`, `AS` and `AR`; sets `CFLAGS` and `CXXFLAGS`; sets a `sysroot` so iOS headers and libraries are found; and adds the path to the toolchain to `PATH`. + +`contrib/ios/setenv_ios.sh` knows which toolchain and architecture to select by inspecting environmental variables set by Travis for the job. In particular, the variables `IOS_SDK` and `IOS_CPU` tell `contrib/ios/setenv_ios.sh` which tools and libraries to select. + +The `contrib/ios/setenv_ios.sh` script specifies the tools to use during the cross-compile. For Apple SDKs, the tool names are the same as a desktop. There are no special prefixes for the mobile tools. + +``` +CPP=cpp +CC=clang +CXX=clang++ +LD=ld +AS=as +AR=ar +RANLIB=ranlib +STRIP=strip +``` + +If you are working from a developer machine you probably already have the necessary tools installed. + +### OpenSSL and Expat + +The fourth step builds OpenSSL and Expat. OpenSSL and Expat are built for iOS using the scripts `contrib/ios/install_openssl.sh` and `contrib/ios/install_expat.sh`. The scripts download, configure and install the latest release version of the libraries. The libraries are configured with `--prefix="$IOS_PREFIX"` so the headers are placed in `$IOS_PREFIX/include` directory, and the libraries are placed in the `$IOS_PREFIX/lib` directory. + +`IOS_PREFIX` is the value `$HOME/$IOS_SDK-$IOS_CPU`. The scheme handles both iOS SDKs and cpu architectures so the pair recieves a unique installation directory. The libraries will be installed in `$HOME/iPhoneOS-armv7s`, `$HOME/iPhoneOS-arm64`, `$HOME/iPhoneSimulator-i386`, etc. For Autotools projects, the appropriate `PKG_CONFIG_PATH` is exported. + +`PKG_CONFIG_PATH` is an important variable. It is the userland equivalent to sysroot, and allows Autotools to find non-system headers and libraries for an architecture. Typical `PKG_CONFIG_PATH` are `$HOME/iPhoneOS-armv7s/lib/pkgconfig` and `$HOME/iPhoneOS-arm64/lib/pkgconfig`. + +OpenSSL also uses a custom configuration file called `15-ios.conf`. It is a copy of the OpenSSL's project file and located at `contrib/ios/15-ios.conf`. The Unbound version is copied to the OpenSSL source files after unpacking the OpenSSL distribution. The changes mean Unbound's `15-ios.conf` will only work with Unbound and a properly set environment. + +OpenSSL is configured with `no-engine`. Engines require dynamic loading so engines are disabled permanently in `15-ios.conf`. + +### iOS build + +Finally, once OpenSSL and Expat are built, then the Travis script configures and builds Unbound. The full recipe looks as follows. + +``` +elif [ "$TEST_IOS" = "yes" ]; then + export AUTOTOOLS_BUILD="$(./config.guess)" + export PKG_CONFIG_PATH="$IOS_PREFIX/lib/pkgconfig" + source ./contrib/ios/setenv_ios.sh + ./contrib/ios/install_openssl.sh + ./contrib/ios/install_expat.sh + ./configure \ + --build="$AUTOTOOLS_BUILD" \ + --host="$AUTOTOOLS_HOST" \ + --prefix="$IOS_PREFIX" \ + --with-ssl="$IOS_PREFIX" \ + --with-libexpat="$IOS_PREFIX" \ + --disable-gost; + make -j 2 + make install +``` + +Travis only smoke tests an iOS build using a compile, link and install. The self tests are not run. TODO: figure out how to fire up an simulator, push the tests to the device and run them. + +### iOS flags + +`contrib/ios/setenv_ios.sh` uses specific flags for `CFLAGS` and `CXXFLAGS`. They are taken from Xcode, so we consider them the official flag set. It is important to use the same flags across projects to avoid subtle problems due to mixing and matching different flags. Modified: stable/12/contrib/unbound/acx_python.m4 ============================================================================== --- stable/12/contrib/unbound/acx_python.m4 Wed Sep 23 21:57:29 2020 (r366094) +++ stable/12/contrib/unbound/acx_python.m4 Wed Sep 23 22:36:38 2020 (r366095) @@ -58,6 +58,11 @@ $ac_distutils_result]) AC_MSG_RESULT([$PYTHON_LDFLAGS]) AC_SUBST([PYTHON_LDFLAGS]) + if test -z "$PYTHON_LIBDIR"; then + PYTHON_LIBDIR=`$PYTHON -c "from distutils.sysconfig import *; \ + print(get_config_var('LIBDIR'));"` + fi + # # Check for site packages # Modified: stable/12/contrib/unbound/cachedb/cachedb.c ============================================================================== --- stable/12/contrib/unbound/cachedb/cachedb.c Wed Sep 23 21:57:29 2020 (r366094) +++ stable/12/contrib/unbound/cachedb/cachedb.c Wed Sep 23 22:36:38 2020 (r366095) @@ -160,7 +160,7 @@ testframe_lookup(struct module_env* env, struct cached static void testframe_store(struct module_env* env, struct cachedb_env* cachedb_env, - char* key, uint8_t* data, size_t data_len) + char* key, uint8_t* data, size_t data_len, time_t ATTR_UNUSED(ttl)) { struct testframe_moddata* d = (struct testframe_moddata*) cachedb_env->backend_data; @@ -606,7 +606,8 @@ cachedb_extcache_store(struct module_qstate* qstate, s /* call backend */ (*ie->backend->store)(qstate->env, ie, key, sldns_buffer_begin(qstate->env->scratch_buffer), - sldns_buffer_limit(qstate->env->scratch_buffer)); + sldns_buffer_limit(qstate->env->scratch_buffer), + qstate->return_msg->rep->ttl); } /** Modified: stable/12/contrib/unbound/cachedb/cachedb.h ============================================================================== --- stable/12/contrib/unbound/cachedb/cachedb.h Wed Sep 23 21:57:29 2020 (r366094) +++ stable/12/contrib/unbound/cachedb/cachedb.h Wed Sep 23 22:36:38 2020 (r366095) @@ -84,7 +84,7 @@ struct cachedb_backend { /** Store (env, cachedb_env, key, data, data_len) */ void (*store)(struct module_env*, struct cachedb_env*, char*, - uint8_t*, size_t); + uint8_t*, size_t, time_t); }; #define CACHEDB_HASHSIZE 256 /* bit hash */ Modified: stable/12/contrib/unbound/cachedb/redis.c ============================================================================== --- stable/12/contrib/unbound/cachedb/redis.c Wed Sep 23 21:57:29 2020 (r366094) +++ stable/12/contrib/unbound/cachedb/redis.c Wed Sep 23 22:36:38 2020 (r366095) @@ -59,6 +59,9 @@ struct redis_moddata { struct timeval timeout; /* timeout for connection setup and commands */ }; +static redisReply* redis_command(struct module_env*, struct cachedb_env*, + const char*, const uint8_t*, size_t); + static redisContext* redis_connect(const struct redis_moddata* moddata) { @@ -114,6 +117,33 @@ redis_init(struct module_env* env, struct cachedb_env* for(i = 0; i < moddata->numctxs; i++) moddata->ctxs[i] = redis_connect(moddata); cachedb_env->backend_data = moddata; + if(env->cfg->redis_expire_records) { + redisReply* rep = NULL; + int redis_reply_type = 0; + /** check if setex command is supported */ + rep = redis_command(env, cachedb_env, + "SETEX __UNBOUND_REDIS_CHECK__ 1 none", NULL, 0); + if(!rep) { + /** init failed, no response from redis server*/ + log_err("redis_init: failed to init redis, the " *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Thu Sep 24 15:34:48 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 97F0C3FA80C; Thu, 24 Sep 2020 15:34:48 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bxzcm3LkVz4Z6p; Thu, 24 Sep 2020 15:34:48 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5219723F6F; Thu, 24 Sep 2020 15:34:48 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08OFYm97000434; Thu, 24 Sep 2020 15:34:48 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OFYmCH000433; Thu, 24 Sep 2020 15:34:48 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202009241534.08OFYmCH000433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 24 Sep 2020 15:34:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366117 - stable/12/sys/fs/nfsserver X-SVN-Group: stable-12 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/12/sys/fs/nfsserver X-SVN-Commit-Revision: 366117 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2020 15:34:48 -0000 Author: rmacklem Date: Thu Sep 24 15:34:47 2020 New Revision: 366117 URL: https://svnweb.freebsd.org/changeset/base/366117 Log: MFC: r365895 Fix a LOR between the NFS server and server side krpc. Recent testing of the NFS-over-TLS code found a LOR between the mutex lock used for sessions and the sleep lock used for server side krpc socket structures in nfsrv_checksequence(). This was fixed by r365789. A similar bug exists in nfsrv_bindconnsess(), where SVC_RELEASE() is called while mutexes are held. This patch applies a fix similar to r365789, moving the SVC_RELEASE() call down to after the mutexes are released. This patch fixes the problem by moving the SVC_RELEASE() call in nfsrv_bindconnsess() down a few lines to below where the mutexes are released. Modified: stable/12/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/12/sys/fs/nfsserver/nfs_nfsdstate.c Thu Sep 24 14:59:10 2020 (r366116) +++ stable/12/sys/fs/nfsserver/nfs_nfsdstate.c Thu Sep 24 15:34:47 2020 (r366117) @@ -6405,6 +6405,7 @@ nfsrv_bindconnsess(struct nfsrv_descript *nd, uint8_t int error; error = 0; + savxprt = NULL; shp = NFSSESSIONHASH(sessionid); NFSLOCKSTATE(); NFSLOCKSESSION(shp); @@ -6432,8 +6433,6 @@ nfsrv_bindconnsess(struct nfsrv_descript *nd, uint8_t /* Disable idle timeout. */ nd->nd_xprt->xp_idletimeout = 0; sep->sess_cbsess.nfsess_xprt = nd->nd_xprt; - if (savxprt != NULL) - SVC_RELEASE(savxprt); sep->sess_crflags |= NFSV4CRSESS_CONNBACKCHAN; clp->lc_flags |= LCL_DONEBINDCONN; if (*foreaftp == NFSCDFS4_BACK) @@ -6460,6 +6459,8 @@ nfsrv_bindconnsess(struct nfsrv_descript *nd, uint8_t error = NFSERR_BADSESSION; NFSUNLOCKSESSION(shp); NFSUNLOCKSTATE(); + if (savxprt != NULL) + SVC_RELEASE(savxprt); return (error); } From owner-svn-src-stable-12@freebsd.org Thu Sep 24 20:01:31 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAE71426969; Thu, 24 Sep 2020 20:01:31 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4By5XW5zTFz46dc; Thu, 24 Sep 2020 20:01:31 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B072627456; Thu, 24 Sep 2020 20:01:31 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08OK1V68064678; Thu, 24 Sep 2020 20:01:31 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08OK1VPO064677; Thu, 24 Sep 2020 20:01:31 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202009242001.08OK1VPO064677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 24 Sep 2020 20:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366130 - stable/12/lib/libnetmap X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/lib/libnetmap X-SVN-Commit-Revision: 366130 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2020 20:01:32 -0000 Author: vmaffione Date: Thu Sep 24 20:01:31 2020 New Revision: 366130 URL: https://svnweb.freebsd.org/changeset/base/366130 Log: MFC r366011 libnetmap: fix cast from uint64_t to void* We use uintptr_t as an intermediate cast to avoid compiler warnings on 32 bit architectures. Reported by: adrian Modified: stable/12/lib/libnetmap/libnetmap.h stable/12/lib/libnetmap/nmport.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libnetmap/libnetmap.h ============================================================================== --- stable/12/lib/libnetmap/libnetmap.h Thu Sep 24 19:59:29 2020 (r366129) +++ stable/12/lib/libnetmap/libnetmap.h Thu Sep 24 20:01:31 2020 (r366130) @@ -554,9 +554,9 @@ struct nmreq_option *nmreq_find_option(struct nmreq_he void nmreq_free_options(struct nmreq_header *); const char* nmreq_option_name(uint32_t); #define nmreq_foreach_option(h_, o_) \ - for ((o_) = (struct nmreq_option *)((h_)->nr_options);\ + for ((o_) = (struct nmreq_option *)((uintptr_t)((h_)->nr_options));\ (o_) != NULL;\ - (o_) = (struct nmreq_option *)((o_)->nro_next)) + (o_) = (struct nmreq_option *)((uintptr_t)((o_)->nro_next))) /* nmctx manipulation */ Modified: stable/12/lib/libnetmap/nmport.c ============================================================================== --- stable/12/lib/libnetmap/nmport.c Thu Sep 24 19:59:29 2020 (r366129) +++ stable/12/lib/libnetmap/nmport.c Thu Sep 24 20:01:31 2020 (r366130) @@ -614,7 +614,7 @@ nmport_mmap(struct nmport_d *d) } memset(m, 0, sizeof(*m)); if (d->extmem != NULL) { - m->mem = (void *)d->extmem->nro_usrptr; + m->mem = (void *)((uintptr_t)d->extmem->nro_usrptr); m->size = d->extmem->nro_info.nr_memsize; m->is_extmem = 1; } else { From owner-svn-src-stable-12@freebsd.org Fri Sep 25 10:49:27 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A050E3F24C7; Fri, 25 Sep 2020 10:49:27 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByTF33pb8z3V7c; Fri, 25 Sep 2020 10:49:27 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6192411A6D; Fri, 25 Sep 2020 10:49:27 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PAnRuX015114; Fri, 25 Sep 2020 10:49:27 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PAnRo3015113; Fri, 25 Sep 2020 10:49:27 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202009251049.08PAnRo3015113@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Fri, 25 Sep 2020 10:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366151 - stable/12/sys/netinet/cc X-SVN-Group: stable-12 X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: stable/12/sys/netinet/cc X-SVN-Commit-Revision: 366151 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2020 10:49:27 -0000 Author: rscheff Date: Fri Sep 25 10:49:26 2020 New Revision: 366151 URL: https://svnweb.freebsd.org/changeset/base/366151 Log: MFC r365546: cc_mod: remove unused CCF_DELACK definition During the DCTCP improvements, use of CCF_DELACK was removed. This change is just to rename the unused flag bit to prevent use of it, without also re-implementing the tcp_input and tcp_output interfaces. No functional change. Reviewed by: chengc_netapp.com,tuexen MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D26181 Modified: stable/12/sys/netinet/cc/cc.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/cc/cc.h ============================================================================== --- stable/12/sys/netinet/cc/cc.h Fri Sep 25 10:38:19 2020 (r366150) +++ stable/12/sys/netinet/cc/cc.h Fri Sep 25 10:49:26 2020 (r366151) @@ -98,7 +98,7 @@ struct cc_var { /* cc_var flags. */ #define CCF_ABC_SENTAWND 0x0001 /* ABC counted cwnd worth of bytes? */ #define CCF_CWND_LIMITED 0x0002 /* Are we currently cwnd limited? */ -#define CCF_DELACK 0x0004 /* Is this ack delayed? */ +#define CCF_UNUSED1 0x0004 /* unused */ #define CCF_ACKNOW 0x0008 /* Will this ack be sent now? */ #define CCF_IPHDR_CE 0x0010 /* Does this packet set CE bit? */ #define CCF_TCPHDR_CWR 0x0020 /* Does this packet set CWR bit? */ From owner-svn-src-stable-12@freebsd.org Fri Sep 25 10:57:12 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E17E3F26C6; Fri, 25 Sep 2020 10:57:12 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByTQ03JlQz3VgG; Fri, 25 Sep 2020 10:57:12 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5464111CE1; Fri, 25 Sep 2020 10:57:12 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PAvCOi021431; Fri, 25 Sep 2020 10:57:12 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PAvCxo021429; Fri, 25 Sep 2020 10:57:12 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202009251057.08PAvCxo021429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Fri, 25 Sep 2020 10:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366152 - stable/12/sbin/ping6 X-SVN-Group: stable-12 X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: stable/12/sbin/ping6 X-SVN-Commit-Revision: 366152 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2020 10:57:12 -0000 Author: rscheff Date: Fri Sep 25 10:57:11 2020 New Revision: 366152 URL: https://svnweb.freebsd.org/changeset/base/366152 Log: MFC r365547: Add -z "TOS" option to ping6, to test DSCP/ECN values ping has the option to add the (deprecated) TOS byte using the -z option. Adding the same option, with the same (deprecated) Traffic Class Byte (nowadays actually DSCP and ECN fields) to ping6 to validate proper QoS processing in network switches. Reviewed by: tuexen MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D26384 Modified: stable/12/sbin/ping6/ping6.8 stable/12/sbin/ping6/ping6.c Modified: stable/12/sbin/ping6/ping6.8 ============================================================================== --- stable/12/sbin/ping6/ping6.8 Fri Sep 25 10:49:26 2020 (r366151) +++ stable/12/sbin/ping6/ping6.8 Fri Sep 25 10:57:11 2020 (r366152) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 22, 2014 +.Dd September 10, 2020 .Dt PING6 8 .Os .Sh NAME @@ -87,6 +87,9 @@ packets to network hosts .Op Fl s Ar packetsize .Ek .Bk -words +.Op Fl z Ar tclass +.Ek +.Bk -words .Op Ar hops ... .Ek .Bk -words @@ -329,6 +332,8 @@ This option is present for backward compatibility. has no effect if .Fl w is specified. +.It Fl z Ar tclass +Use the specified traffic class when sending. .It Ar hops IPv6 addresses for intermediate nodes, which will be put into type 0 routing header. Modified: stable/12/sbin/ping6/ping6.c ============================================================================== --- stable/12/sbin/ping6/ping6.c Fri Sep 25 10:49:26 2020 (r366151) +++ stable/12/sbin/ping6/ping6.c Fri Sep 25 10:57:11 2020 (r366152) @@ -229,6 +229,7 @@ static char *hostname; static int ident; /* process id to identify our packets */ static u_int8_t nonce[8]; /* nonce field for node information */ static int hoplimit = -1; /* hoplimit */ +static int tclass = -1; /* traffic class */ static u_char *packet = NULL; static cap_channel_t *capdns; @@ -351,7 +352,7 @@ main(int argc, char *argv[]) #endif /*IPSEC_POLICY_IPSEC*/ #endif while ((ch = getopt(argc, argv, - "a:b:c:DdfHg:h:I:i:l:mnNop:qrRS:s:tvwWx:X:" ADDOPTS)) != -1) { + "a:b:c:DdfHg:h:I:i:l:mnNop:qrRS:s:tvwWx:X:z:" ADDOPTS)) != -1) { #undef ADDOPTS switch (ch) { case 'a': @@ -576,6 +577,14 @@ main(int argc, char *argv[]) optarg, MAXALARM); alarm((int)alarmtimeout); break; + case 'z': /* traffic class */ + tclass = strtol(optarg, &e, 10); + if (*optarg == '\0' || *e != '\0') + errx(1, "illegal traffic class %s", optarg); + if (255 < tclass || tclass < -1) + errx(1, + "illegal traffic class -- %s", optarg); + break; #ifdef IPSEC #ifdef IPSEC_POLICY_IPSEC case 'P': @@ -926,6 +935,12 @@ main(int argc, char *argv[]) memcpy(CMSG_DATA(scmsgp), &hoplimit, sizeof(hoplimit)); scmsgp = CMSG_NXTHDR(&smsghdr, scmsgp); + } + + if (tclass != -1) { + if (setsockopt(ssend, IPPROTO_IPV6, IPV6_TCLASS, + &tclass, sizeof(tclass)) == -1) + err(1, "setsockopt(IPV6_TCLASS)"); } if (argc > 1) { /* some intermediate addrs are specified */ From owner-svn-src-stable-12@freebsd.org Fri Sep 25 12:54:44 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A40F43F6AF8; Fri, 25 Sep 2020 12:54:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByX1c4G1qz3dj7; Fri, 25 Sep 2020 12:54:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7661213A08; Fri, 25 Sep 2020 12:54:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PCsiDD096497; Fri, 25 Sep 2020 12:54:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PCshEs096490; Fri, 25 Sep 2020 12:54:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009251254.08PCshEs096490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 25 Sep 2020 12:54:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366153 - stable/12/usr.bin/procstat X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/usr.bin/procstat X-SVN-Commit-Revision: 366153 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2020 12:54:44 -0000 Author: kib Date: Fri Sep 25 12:54:42 2020 New Revision: 366153 URL: https://svnweb.freebsd.org/changeset/base/366153 Log: MFC r365880: Add pargs, penv, pwdx commands and aliases to procstat(1). Added: stable/12/usr.bin/procstat/procstat_penv.c - copied unchanged from r365880, head/usr.bin/procstat/procstat_penv.c stable/12/usr.bin/procstat/procstat_pwdx.c - copied unchanged from r365880, head/usr.bin/procstat/procstat_pwdx.c Modified: stable/12/usr.bin/procstat/Makefile stable/12/usr.bin/procstat/procstat.1 stable/12/usr.bin/procstat/procstat.c stable/12/usr.bin/procstat/procstat.h stable/12/usr.bin/procstat/procstat_kstack.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/procstat/Makefile ============================================================================== --- stable/12/usr.bin/procstat/Makefile Fri Sep 25 10:57:11 2020 (r366152) +++ stable/12/usr.bin/procstat/Makefile Fri Sep 25 12:54:42 2020 (r366153) @@ -13,14 +13,24 @@ SRCS= procstat.c \ procstat_cs.c \ procstat_files.c \ procstat_kstack.c \ + procstat_penv.c \ procstat_ptlwpinfo.c \ + procstat_pwdx.c \ procstat_rlimit.c \ procstat_rusage.c \ procstat_sigs.c \ procstat_threads.c \ procstat_vm.c +MLINKS+= procstat.1 pargs.1 +MLINKS+= procstat.1 penv.1 +MLINKS+= procstat.1 pwdx.1 + LIBADD+= procstat xo util sbuf + +LINKS+= ${BINDIR}/procstat ${BINDIR}/pargs +LINKS+= ${BINDIR}/procstat ${BINDIR}/penv +LINKS+= ${BINDIR}/procstat ${BINDIR}/pwdx HAS_TESTS= SUBDIR.${MK_TESTS}+= tests Modified: stable/12/usr.bin/procstat/procstat.1 ============================================================================== --- stable/12/usr.bin/procstat/procstat.1 Fri Sep 25 10:57:11 2020 (r366152) +++ stable/12/usr.bin/procstat/procstat.1 Fri Sep 25 12:54:42 2020 (r366153) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 4, 2019 +.Dd September 14, 2020 .Dt PROCSTAT 1 .Os .Sh NAME @@ -102,6 +102,15 @@ .Op Fl N Ar system .Op Fl w Ar interval .Ar core ... +.Nm pargs +.Op Fl -libxo +.Ar pid ... +.Nm penv +.Op Fl -libxo +.Ar pid ... +.Nm pwdx +.Op Fl -libxo +.Ar pid ... .Sh DESCRIPTION .Nm utility displays detailed information about the processes identified by the @@ -112,6 +121,17 @@ flag is used, all processes. It can also display information extracted from a process core file, if the core file is specified as the argument. .Pp +The +.Nm pargs , +.Nm penv +and +.Nm pwdx +utilities display the arguments, environment, and current working directory, +respectively of the process specified by +.Ar pid +argument. +They mimic the behavior of Solaris utilities of the same names. +.Pp If the .Fl -libxo flag is specified the output is generated via @@ -121,7 +141,8 @@ See .Xr xo_parse_args 3 for details on command line arguments. .Pp -The following commands are available: +The following commands are available for +.Nm : .Bl -tag -width indent .It Ar basic Print basic process statistics (this is the default). @@ -196,6 +217,12 @@ Display thread information for the process. Display virtual memory mappings for the process. .It Ar auxv | Fl x Display ELF auxiliary vector for the process. +.It Ar pargs +Display arguments for the process. +.It Ar penv +Display environment variables for the process. +.It Ar pwdx +Display current working directory for the process. .El .Pp All options generate output in the format of a table, the first field of @@ -430,7 +457,7 @@ process signal disposition details, three symbols if signal is pending in the global process queue; - otherwise. .It I if signal delivery disposition is -.Dv SIG_IGN; +.Dv SIG_IGN ; - otherwise. .It C if the signal will be caught; - otherwise. @@ -711,6 +738,10 @@ support was added by .An -nosplit Allan Jude .Aq Mt allanjude@FreeBSD.org . +.br +.An Juraj Lutter +.Aq Mt juraj@lutter.sk +added the pargs, penv and pwdx functionality. .Sh BUGS The display of open file or memory mapping pathnames is implemented using the kernel's name cache. Modified: stable/12/usr.bin/procstat/procstat.c ============================================================================== --- stable/12/usr.bin/procstat/procstat.c Fri Sep 25 10:57:11 2020 (r366152) +++ stable/12/usr.bin/procstat/procstat.c Fri Sep 25 12:54:42 2020 (r366153) @@ -68,6 +68,23 @@ static void cmdopt_rusage(int argc, char * const argv[ static void cmdopt_files(int argc, char * const argv[]); static void cmdopt_cpuset(int argc, char * const argv[]); +static const char *progname; + +/* aliased program parameters and arguments + * - usage field is abused to hold the pointer to the function + * displaying program usage + */ +static const struct procstat_cmd pacmd_table[] = { + /* arguments are the same as for pwdx: pid or core file */ + { "pargs", "args", NULL, &procstat_pargs, &cmdopt_none, + PS_CMP_NORMAL | PS_MODE_COMPAT }, + { "penv", "env", NULL, &procstat_penv, &cmdopt_none, + PS_CMP_NORMAL | PS_MODE_COMPAT }, + { "pwdx", "pwd", NULL, &procstat_pwdx, &cmdopt_none, + PS_CMP_NORMAL | PS_MODE_COMPAT } +}; + +/* procstat parameters and arguments */ static const struct procstat_cmd cmd_table[] = { { "argument", "arguments", NULL, &procstat_args, &cmdopt_none, PS_CMP_PLURAL | PS_CMP_SUBSTR }, @@ -88,8 +105,14 @@ static const struct procstat_cmd cmd_table[] = { PS_CMP_PLURAL }, { "kstack", "kstack", "[-v]", &procstat_kstack, &cmdopt_verbose, PS_CMP_NORMAL }, + { "pargs", "args", NULL, &procstat_pargs, &cmdopt_none, + PS_CMP_NORMAL }, + { "penv", "env", NULL, &procstat_penv, &cmdopt_none, + PS_CMP_NORMAL }, { "ptlwpinfo", "ptlwpinfo", NULL, &procstat_ptlwpinfo, &cmdopt_none, PS_CMP_NORMAL }, + { "pwdx", "pwd", NULL, &procstat_pwdx, &cmdopt_none, + PS_CMP_NORMAL }, { "rlimit", "rlimit", NULL, &procstat_rlimit, &cmdopt_none, PS_CMP_NORMAL }, { "rusage", "rusage", "[-Ht]", &procstat_rusage, &cmdopt_rusage, @@ -104,43 +127,49 @@ static const struct procstat_cmd cmd_table[] = { }; static void -usage(void) +usage(const struct procstat_cmd *cmd) { size_t i, l; int multi; - xo_error("usage: procstat [--libxo] [-h] [-M core] [-N system]" - " [-w interval] command\n" - " [pid ... | core ...]\n" - " procstat [--libxo] -a [-h] [-M core] [-N system] " - " [-w interval] command\n" - " procstat [--libxo] [-h] [-M core] [-N system]" - " [-w interval]\n" - " [-S | -b | -c | -e | -f [-C] | -i [-n] | " - "-j [-n] | -k [-k] |\n" - " -l | -r [-H] | -s | -t | -v | -x] " - "[pid ... | core ...]\n" - " procstat [--libxo] -a [-h] [-M core] [-N system]" - " [-w interval]\n" - " [-S | -b | -c | -e | -f [-C] | -i [-n] | " - "-j [-n] | -k [-k] |\n" - " -l | -r [-H] | -s | -t | -v | -x]\n" - " procstat [--libxo] -L [-h] [-M core] [-N system] core ...\n" - "Available commands:\n"); - for (i = 0, l = nitems(cmd_table); i < l; i++) { - multi = i + 1 < l && cmd_table[i].cmd == cmd_table[i + 1].cmd; - xo_error(" %s%s%s", multi ? "[" : "", - cmd_table[i].command, (cmd_table[i].cmp & PS_CMP_PLURAL) ? - "(s)" : ""); - for (; i + 1 < l && cmd_table[i].cmd == cmd_table[i + 1].cmd; - i++) - xo_error(" | %s%s", cmd_table[i + 1].command, - (cmd_table[i].cmp & PS_CMP_PLURAL) ? "(s)" : ""); - if (multi) - xo_error("]"); - if (cmd_table[i].usage != NULL) - xo_error(" %s", cmd_table[i].usage); - xo_error("\n"); + if (cmd == NULL || (cmd->cmp & PS_MODE_COMPAT) == 0) { + xo_error("usage: procstat [--libxo] [-h] [-M core] [-N system]" + " [-w interval] command\n" + " [pid ... | core ...]\n" + " procstat [--libxo] -a [-h] [-M core] [-N system] " + " [-w interval] command\n" + " procstat [--libxo] [-h] [-M core] [-N system]" + " [-w interval]\n" + " [-S | -b | -c | -e | -f [-C] | -i [-n] | " + "-j [-n] | -k [-k] |\n" + " -l | -r [-H] | -s | -t | -v | -x] " + "[pid ... | core ...]\n" + " procstat [--libxo] -a [-h] [-M core] [-N system]" + " [-w interval]\n" + " [-S | -b | -c | -e | -f [-C] | -i [-n] | " + "-j [-n] | -k [-k] |\n" + " -l | -r [-H] | -s | -t | -v | -x]\n" + " procstat [--libxo] -L [-h] [-M core] [-N system] core ...\n" + "Available commands:\n"); + for (i = 0, l = nitems(cmd_table); i < l; i++) { + multi = i + 1 < l && cmd_table[i].cmd == + cmd_table[i + 1].cmd; + xo_error(" %s%s%s", multi ? "[" : "", + cmd_table[i].command, (cmd_table[i].cmp & + PS_CMP_PLURAL) ? "(s)" : ""); + for (; i + 1 < l && cmd_table[i].cmd == + cmd_table[i + 1].cmd; i++) + xo_error(" | %s%s", cmd_table[i + 1].command, + (cmd_table[i].cmp & PS_CMP_PLURAL) ? + "(s)" : ""); + if (multi) + xo_error("]"); + if (cmd_table[i].usage != NULL) + xo_error(" %s", cmd_table[i].usage); + xo_error("\n"); + } + } else { + xo_error("usage: %s [--libxo] pid ...\n", progname); } xo_finish(); exit(EX_USAGE); @@ -201,6 +230,25 @@ kinfo_proc_thread_name(const struct kinfo_proc *kipp) } static const struct procstat_cmd * +getcmdbyprogname(const char *pprogname) +{ + const char *ca; + size_t i, len; + + if (pprogname == NULL) + return (NULL); + len = strlen(pprogname); + + for (i = 0; i < nitems(pacmd_table); i++) { + ca = pacmd_table[i].command; + if (ca != NULL && strcmp(ca, pprogname) == 0) + return (&pacmd_table[i]); + } + + return (NULL); +} + +static const struct procstat_cmd * getcmd(const char *str) { const struct procstat_cmd *cmd; @@ -235,17 +283,14 @@ getcmd(const char *str) int main(int argc, char *argv[]) { - int ch, interval; - int i; struct kinfo_proc *p; const struct procstat_cmd *cmd; struct procstat *prstat, *cprstat; + char *dummy, *nlistf, *memf; + const char *xocontainer; long l; pid_t pid; - char *dummy; - char *nlistf, *memf; - int aflag; - int cnt; + int aflag, ch, cnt, i, interval; interval = 0; cmd = NULL; @@ -253,6 +298,9 @@ main(int argc, char *argv[]) aflag = 0; argc = xo_parse_args(argc, argv); + progname = getprogname(); + cmd = getcmdbyprogname(progname); + while ((ch = getopt(argc, argv, "abCcefHhijkLlM:N:nrSstvw:x")) != -1) { switch (ch) { case 'a': @@ -260,7 +308,7 @@ main(int argc, char *argv[]) break; case 'b': if (cmd != NULL) - usage(); + usage(cmd); cmd = getcmd("binary"); break; case 'C': @@ -268,17 +316,17 @@ main(int argc, char *argv[]) break; case 'c': if (cmd != NULL) - usage(); + usage(cmd); cmd = getcmd("arguments"); break; case 'e': if (cmd != NULL) - usage(); + usage(cmd); cmd = getcmd("environment"); break; case 'f': if (cmd != NULL) - usage(); + usage(cmd); cmd = getcmd("files"); break; case 'H': @@ -289,33 +337,33 @@ main(int argc, char *argv[]) break; case 'i': if (cmd != NULL) - usage(); + usage(cmd); cmd = getcmd("signals"); break; case 'j': if (cmd != NULL) - usage(); + usage(cmd); cmd = getcmd("tsignals"); break; case 'k': if (cmd != NULL && cmd->cmd == procstat_kstack) { if ((procstat_opts & PS_OPT_VERBOSE) != 0) - usage(); + usage(cmd); procstat_opts |= PS_OPT_VERBOSE; } else { if (cmd != NULL) - usage(); + usage(cmd); cmd = getcmd("kstack"); } break; case 'L': if (cmd != NULL) - usage(); + usage(cmd); cmd = getcmd("ptlwpinfo"); break; case 'l': if (cmd != NULL) - usage(); + usage(cmd); cmd = getcmd("rlimit"); break; case 'M': @@ -329,75 +377,79 @@ main(int argc, char *argv[]) break; case 'r': if (cmd != NULL) - usage(); + usage(cmd); cmd = getcmd("rusage"); break; case 'S': if (cmd != NULL) - usage(); + usage(cmd); cmd = getcmd("cpuset"); break; case 's': if (cmd != NULL) - usage(); + usage(cmd); cmd = getcmd("credentials"); break; case 't': if (cmd != NULL) - usage(); + usage(cmd); cmd = getcmd("threads"); break; case 'v': if (cmd != NULL) - usage(); + usage(cmd); cmd = getcmd("vm"); break; case 'w': l = strtol(optarg, &dummy, 10); if (*dummy != '\0') - usage(); + usage(cmd); if (l < 1 || l > INT_MAX) - usage(); + usage(cmd); interval = l; break; case 'x': if (cmd != NULL) - usage(); + usage(cmd); cmd = getcmd("auxv"); break; case '?': default: - usage(); + usage(cmd); } } argc -= optind; argv += optind; - if (cmd == NULL && argv[0] != NULL && (cmd = getcmd(argv[0])) != NULL) { + if (cmd == NULL && argv[0] != NULL) + cmd = getcmd(argv[0]); + if (cmd != NULL) { if ((procstat_opts & PS_SUBCOMMAND_OPTS) != 0) - usage(); + usage(cmd); if (cmd->opt != NULL) { optreset = 1; optind = 1; cmd->opt(argc, argv); - argc -= optind; - argv += optind; + if ((cmd->cmp & PS_MODE_COMPAT) == 0) { + argc -= optind; + argv += optind; + } } else { argc -= 1; argv += 1; } } else { - if (cmd == NULL) - cmd = getcmd("basic"); - if (cmd->cmd != procstat_files && - (procstat_opts & PS_OPT_CAPABILITIES) != 0) - usage(); + cmd = getcmd("basic"); } + if (cmd->cmd != procstat_files && + (procstat_opts & PS_OPT_CAPABILITIES) != 0 && + (cmd->cmp & PS_MODE_COMPAT) == 0) + usage(cmd); /* Must specify either the -a flag or a list of pids. */ if (!(aflag == 1 && argc == 0) && !(aflag == 0 && argc > 0)) - usage(); + usage(cmd); if (memf != NULL) prstat = procstat_open_kvm(nlistf, memf); @@ -406,9 +458,11 @@ main(int argc, char *argv[]) if (prstat == NULL) xo_errx(1, "procstat_open()"); do { + xocontainer = cmd->xocontainer != NULL ? cmd->xocontainer : + cmd->command; xo_set_version(PROCSTAT_XO_VERSION); - xo_open_container("procstat"); - xo_open_container(cmd->xocontainer); + xo_open_container(progname); + xo_open_container(xocontainer); if (aflag) { p = procstat_getprocs(prstat, KERN_PROC_PROC, 0, &cnt); @@ -428,7 +482,7 @@ main(int argc, char *argv[]) l = strtol(argv[i], &dummy, 10); if (*dummy == '\0') { if (l < 0) - usage(); + usage(cmd); pid = l; p = procstat_getprocs(prstat, KERN_PROC_PID, @@ -439,26 +493,34 @@ main(int argc, char *argv[]) procstat(cmd, prstat, p); procstat_freeprocs(prstat, p); } else { - cprstat = procstat_open_core(argv[i]); - if (cprstat == NULL) { - warnx("procstat_open()"); - continue; + if ((cmd->cmp & PS_MODE_COMPAT) == 0) { + cprstat = procstat_open_core(argv[i]); + if (cprstat == NULL) { + warnx("procstat_open()"); + continue; + } + p = procstat_getprocs(cprstat, + KERN_PROC_PID, -1, &cnt); + if (p == NULL) { + xo_errx(1, + "procstat_getprocs()"); + } + if (cnt != 0) + procstat(cmd, cprstat, p); + procstat_freeprocs(cprstat, p); + procstat_close(cprstat); + } else { + usage(cmd); } - p = procstat_getprocs(cprstat, KERN_PROC_PID, - -1, &cnt); - if (p == NULL) - xo_errx(1, "procstat_getprocs()"); - if (cnt != 0) - procstat(cmd, cprstat, p); - procstat_freeprocs(cprstat, p); - procstat_close(cprstat); } - /* Suppress header after first process. */ - procstat_opts |= PS_OPT_NOHEADER; + if ((cmd->cmp & PS_MODE_COMPAT) == 0) { + /* Suppress header after first process. */ + procstat_opts |= PS_OPT_NOHEADER; + } } - xo_close_container(cmd->xocontainer); - xo_close_container("procstat"); + xo_close_container(xocontainer); + xo_close_container(progname); xo_finish(); if (interval) sleep(interval); @@ -478,7 +540,7 @@ cmdopt_none(int argc, char * const argv[]) switch (ch) { case '?': default: - usage(); + usage(NULL); } } } @@ -495,7 +557,7 @@ cmdopt_verbose(int argc, char * const argv[]) break; case '?': default: - usage(); + usage(NULL); } } } @@ -512,7 +574,7 @@ cmdopt_signals(int argc, char * const argv[]) break; case '?': default: - usage(); + usage(NULL); } } } @@ -531,7 +593,7 @@ cmdopt_rusage(int argc, char * const argv[]) break; case '?': default: - usage(); + usage(NULL); } } } @@ -548,7 +610,7 @@ cmdopt_files(int argc, char * const argv[]) break; case '?': default: - usage(); + usage(NULL); } } } Modified: stable/12/usr.bin/procstat/procstat.h ============================================================================== --- stable/12/usr.bin/procstat/procstat.h Fri Sep 25 10:57:11 2020 (r366152) +++ stable/12/usr.bin/procstat/procstat.h Fri Sep 25 12:54:42 2020 (r366153) @@ -42,7 +42,8 @@ enum { PS_OPT_NOHEADER = 0x02, PS_OPT_PERTHREAD = 0x04, PS_OPT_SIGNUM = 0x08, - PS_OPT_VERBOSE = 0x10 + PS_OPT_VERBOSE = 0x10, + PS_MODE_COMPAT = 0x20, }; #define PS_SUBCOMMAND_OPTS \ @@ -64,7 +65,10 @@ void procstat_cs(struct procstat *prstat, struct kinfo void procstat_env(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_files(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_kstack(struct procstat *prstat, struct kinfo_proc *kipp); +void procstat_pargs(struct procstat *prstat, struct kinfo_proc *kipp); +void procstat_penv(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_ptlwpinfo(struct procstat *prstat, struct kinfo_proc *kipp); +void procstat_pwdx(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_rlimit(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_rusage(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_sigs(struct procstat *prstat, struct kinfo_proc *kipp); Modified: stable/12/usr.bin/procstat/procstat_kstack.c ============================================================================== --- stable/12/usr.bin/procstat/procstat_kstack.c Fri Sep 25 10:57:11 2020 (r366152) +++ stable/12/usr.bin/procstat/procstat_kstack.c Fri Sep 25 12:54:42 2020 (r366153) @@ -68,7 +68,7 @@ kstack_nextstate(enum trace_state ts) return (TS_OFF); case TS_OFF: - return TS_FRAMENUM; + return (TS_FRAMENUM); default: errx(-1, "kstack_nextstate"); Copied: stable/12/usr.bin/procstat/procstat_penv.c (from r365880, head/usr.bin/procstat/procstat_penv.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/procstat/procstat_penv.c Fri Sep 25 12:54:42 2020 (r366153, copy of r365880, head/usr.bin/procstat/procstat_penv.c) @@ -0,0 +1,86 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Juraj Lutter + * 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$"); + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "procstat.h" + +void +procstat_pargs(struct procstat *procstat, struct kinfo_proc *kipp) +{ + int i; + char **args; + + args = procstat_getargv(procstat, kipp, 0); + + xo_emit("{k:process_id/%d}: {:command/%s/%s}\n", kipp->ki_pid, + kipp->ki_comm); + + if (args == NULL) { + xo_emit("{d:args/-}\n"); + } else { + for (i = 0; args[i] != NULL; i++) { + xo_emit("{Ld:argv[}{Ld:/%d}{Ldwc:]}{l:argv/%s}\n", + i, args[i]); + } + } +} + +void +procstat_penv(struct procstat *procstat, struct kinfo_proc *kipp) +{ + int i; + char **envs; + + envs = procstat_getenvv(procstat, kipp, 0); + + xo_emit("{k:process_id/%d}: {:command/%s/%s}\n", kipp->ki_pid, + kipp->ki_comm); + + if (envs == NULL) { + xo_emit("{d:env/-}\n"); + } else { + for (i = 0; envs[i] != NULL; i++) { + xo_emit("{Ld:envp[}{Ld:/%d}{Ldwc:]}{l:envp/%s}\n", + i, envs[i]); + } + } +} Copied: stable/12/usr.bin/procstat/procstat_pwdx.c (from r365880, head/usr.bin/procstat/procstat_pwdx.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/procstat/procstat_pwdx.c Fri Sep 25 12:54:42 2020 (r366153, copy of r365880, head/usr.bin/procstat/procstat_pwdx.c) @@ -0,0 +1,70 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Juraj Lutter + * 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$"); + +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include "procstat.h" + +void +procstat_pwdx(struct procstat *procstat, struct kinfo_proc *kipp) +{ + struct filestat_list *head; + struct filestat *fst; + + head = procstat_getfiles(procstat, kipp, 0); + if (head == NULL) + return; + STAILQ_FOREACH(fst, head, next) { + if ((fst->fs_uflags & PS_FST_UFLAG_CDIR) && + (fst->fs_path != NULL)) { + xo_emit("{k:process_id/%d}{P:: }", kipp->ki_pid); + xo_emit("{:cwd/%s}", fst->fs_path); + xo_emit("\n"); + } + } + procstat_freefiles(procstat, head); +} From owner-svn-src-stable-12@freebsd.org Fri Sep 25 13:24:29 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D0E303F749A; Fri, 25 Sep 2020 13:24:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByXgx56Z1z3gSd; Fri, 25 Sep 2020 13:24:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 946E013D51; Fri, 25 Sep 2020 13:24:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PDOTko015424; Fri, 25 Sep 2020 13:24:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PDOTlh015423; Fri, 25 Sep 2020 13:24:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202009251324.08PDOTlh015423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 25 Sep 2020 13:24:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366154 - stable/12/sys/fs/udf X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/fs/udf X-SVN-Commit-Revision: 366154 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2020 13:24:29 -0000 Author: markj Date: Fri Sep 25 13:24:29 2020 New Revision: 366154 URL: https://svnweb.freebsd.org/changeset/base/366154 Log: MFC r366005: udf: Validate the full file entry length PR: 248613 Modified: stable/12/sys/fs/udf/udf_vfsops.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/udf/udf_vfsops.c ============================================================================== --- stable/12/sys/fs/udf/udf_vfsops.c Fri Sep 25 12:54:42 2020 (r366153) +++ stable/12/sys/fs/udf/udf_vfsops.c Fri Sep 25 13:24:29 2020 (r366154) @@ -590,6 +590,7 @@ udf_vget(struct mount *mp, ino_t ino, int flags, struc struct vnode *vp; struct udf_node *unode; struct file_entry *fe; + uint32_t lea, lad; int error, sector, size; error = vfs_hash_get(mp, ino, flags, curthread, vpp, NULL, NULL); @@ -645,31 +646,37 @@ udf_vget(struct mount *mp, ino_t ino, int flags, struc devvp = udfmp->im_devvp; if ((error = RDSECTOR(devvp, sector, udfmp->bsize, &bp)) != 0) { printf("Cannot read sector %d\n", sector); - vgone(vp); - vput(vp); - brelse(bp); - *vpp = NULL; - return (error); + goto error; } + /* + * File entry length validation. + */ fe = (struct file_entry *)bp->b_data; if (udf_checktag(&fe->tag, TAGID_FENTRY)) { printf("Invalid file entry!\n"); - vgone(vp); - vput(vp); - brelse(bp); - *vpp = NULL; - return (ENOMEM); + error = ENOMEM; + goto error; } - size = UDF_FENTRY_SIZE + le32toh(fe->l_ea) + le32toh(fe->l_ad); + lea = le32toh(fe->l_ea); + lad = le32toh(fe->l_ad); + if (lea > udfmp->bsize || lad > udfmp->bsize) { + printf("Invalid EA and AD lengths %u, %u\n", lea, lad); + error = EIO; + goto error; + } + size = UDF_FENTRY_SIZE + lea + lad; + if (size > udfmp->bsize) { + printf("Invalid file entry size %u\n", size); + error = EIO; + goto error; + } + unode->fentry = malloc(size, M_UDFFENTRY, M_NOWAIT | M_ZERO); if (unode->fentry == NULL) { printf("Cannot allocate file entry block\n"); - vgone(vp); - vput(vp); - brelse(bp); - *vpp = NULL; - return (ENOMEM); + error = ENOMEM; + goto error; } bcopy(bp->b_data, unode->fentry, size); @@ -714,6 +721,13 @@ udf_vget(struct mount *mp, ino_t ino, int flags, struc *vpp = vp; return (0); + +error: + vgone(vp); + vput(vp); + brelse(bp); + *vpp = NULL; + return (error); } static int From owner-svn-src-stable-12@freebsd.org Fri Sep 25 13:53:32 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBEF83F8228; Fri, 25 Sep 2020 13:53:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByYKS5xzlz402p; Fri, 25 Sep 2020 13:53:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 951BA13F75; Fri, 25 Sep 2020 13:53:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PDrWlh034364; Fri, 25 Sep 2020 13:53:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PDrWe0034363; Fri, 25 Sep 2020 13:53:32 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202009251353.08PDrWe0034363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 25 Sep 2020 13:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366157 - stable/12/share/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/share/mk X-SVN-Commit-Revision: 366157 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2020 13:53:33 -0000 Author: markj Date: Fri Sep 25 13:53:32 2020 New Revision: 366157 URL: https://svnweb.freebsd.org/changeset/base/366157 Log: MFC r365889: Install library symlinks atomically. PR: 233769 Modified: stable/12/share/mk/bsd.lib.mk Directory Properties: stable/12/ (props changed) Modified: stable/12/share/mk/bsd.lib.mk ============================================================================== --- stable/12/share/mk/bsd.lib.mk Fri Sep 25 13:52:31 2020 (r366156) +++ stable/12/share/mk/bsd.lib.mk Fri Sep 25 13:53:32 2020 (r366157) @@ -405,6 +405,7 @@ SHLINSTALLFLAGS+= -fschg # that are only creating an image. .if !defined(NO_SAFE_LIBINSTALL) && !defined(NO_ROOT) SHLINSTALLFLAGS+= -S +SHLINSTALLSYMLINKFLAGS+= -S .endif _INSTALLFLAGS:= ${INSTALLFLAGS} @@ -412,6 +413,7 @@ _INSTALLFLAGS:= ${INSTALLFLAGS} _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}} .endfor _SHLINSTALLFLAGS:= ${SHLINSTALLFLAGS} +_SHLINSTALLSYMLINKFLAGS:= ${SHLINSTALLSYMLINKFLAGS} .for ie in ${INSTALLFLAGS_EDIT} _SHLINSTALLFLAGS:= ${_SHLINSTALLFLAGS${ie}} .endfor @@ -446,29 +448,31 @@ _libinstall: ${_INSTALLFLAGS} ${SHLIB_LINK:R}.ld \ ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} .for _SHLIB_LINK_LINK in ${SHLIB_LDSCRIPT_LINKS} - ${INSTALL_LIBSYMLINK} ${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK} + ${INSTALL_LIBSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${SHLIB_LINK} \ + ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK} .endfor .else .if ${_SHLIBDIR} == ${_LIBDIR} .if ${SHLIB_LINK:Mlib*} - ${INSTALL_RSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} + ${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${TAG_ARGS:D${TAG_ARGS},development} \ + ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} .else - ${INSTALL_RSYMLINK} ${TAG_ARGS} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \ + ${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${TAG_ARGS} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \ ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} .endif .else .if ${SHLIB_LINK:Mlib*} - ${INSTALL_RSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \ - ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} + ${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${TAG_ARGS:D${TAG_ARGS},development} \ + ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} .else - ${INSTALL_RSYMLINK} ${TAG_ARGS} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \ - ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} + ${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${TAG_ARGS} \ + ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} .endif .if exists(${DESTDIR}${_LIBDIR}/${SHLIB_NAME}) -chflags noschg ${DESTDIR}${_LIBDIR}/${SHLIB_NAME} rm -f ${DESTDIR}${_LIBDIR}/${SHLIB_NAME} .endif -.endif +.endif # _SHLIBDIR == _LIBDIR .endif # SHLIB_LDSCRIPT .endif # SHLIB_LINK .endif # SHIB_NAME From owner-svn-src-stable-12@freebsd.org Fri Sep 25 13:59:51 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0AA453F81FA; Fri, 25 Sep 2020 13:59:51 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByYSk6bGBz40NG; Fri, 25 Sep 2020 13:59:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C582E14052; Fri, 25 Sep 2020 13:59:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PDxoXf034848; Fri, 25 Sep 2020 13:59:50 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PDxohT034847; Fri, 25 Sep 2020 13:59:50 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202009251359.08PDxohT034847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 25 Sep 2020 13:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366158 - stable/12/sys/arm64/arm64 X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/arm64/arm64 X-SVN-Commit-Revision: 366158 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2020 13:59:51 -0000 Author: markj Date: Fri Sep 25 13:59:50 2020 New Revision: 366158 URL: https://svnweb.freebsd.org/changeset/base/366158 Log: MFC r365879, r365976: Assert we are not traversing through superpages in the arm64 pmap. Modified: stable/12/sys/arm64/arm64/pmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/arm64/pmap.c ============================================================================== --- stable/12/sys/arm64/arm64/pmap.c Fri Sep 25 13:53:32 2020 (r366157) +++ stable/12/sys/arm64/arm64/pmap.c Fri Sep 25 13:59:50 2020 (r366158) @@ -373,12 +373,22 @@ pmap_l1(pmap_t pmap, vm_offset_t va) } static __inline pd_entry_t * -pmap_l1_to_l2(pd_entry_t *l1, vm_offset_t va) +pmap_l1_to_l2(pd_entry_t *l1p, vm_offset_t va) { - pd_entry_t *l2; + pd_entry_t l1, *l2p; - l2 = (pd_entry_t *)PHYS_TO_DMAP(pmap_load(l1) & ~ATTR_MASK); - return (&l2[pmap_l2_index(va)]); + l1 = pmap_load(l1p); + + /* + * The valid bit may be clear if pmap_update_entry() is concurrently + * modifying the entry, so for KVA only the entry type may be checked. + */ + KASSERT(va >= VM_MAX_USER_ADDRESS || (l1 & ATTR_DESCR_VALID) != 0, + ("%s: L1 entry %#lx for %#lx is invalid", __func__, l1, va)); + KASSERT((l1 & ATTR_DESCR_TYPE_MASK) == ATTR_DESCR_TYPE_TABLE, + ("%s: L1 entry %#lx for %#lx is a leaf", __func__, l1, va)); + l2p = (pd_entry_t *)PHYS_TO_DMAP(l1 & ~ATTR_MASK); + return (&l2p[pmap_l2_index(va)]); } static __inline pd_entry_t * @@ -394,12 +404,23 @@ pmap_l2(pmap_t pmap, vm_offset_t va) } static __inline pt_entry_t * -pmap_l2_to_l3(pd_entry_t *l2, vm_offset_t va) +pmap_l2_to_l3(pd_entry_t *l2p, vm_offset_t va) { - pt_entry_t *l3; + pd_entry_t l2; + pt_entry_t *l3p; - l3 = (pd_entry_t *)PHYS_TO_DMAP(pmap_load(l2) & ~ATTR_MASK); - return (&l3[pmap_l3_index(va)]); + l2 = pmap_load(l2p); + + /* + * The valid bit may be clear if pmap_update_entry() is concurrently + * modifying the entry, so for KVA only the entry type may be checked. + */ + KASSERT(va >= VM_MAX_USER_ADDRESS || (l2 & ATTR_DESCR_VALID) != 0, + ("%s: L2 entry %#lx for %#lx is invalid", __func__, l2, va)); + KASSERT((l2 & ATTR_DESCR_TYPE_MASK) == ATTR_DESCR_TYPE_TABLE, + ("%s: L2 entry %#lx for %#lx is a leaf", __func__, l2, va)); + l3p = (pt_entry_t *)PHYS_TO_DMAP(l2 & ~ATTR_MASK); + return (&l3p[pmap_l3_index(va)]); } /* From owner-svn-src-stable-12@freebsd.org Fri Sep 25 17:14:35 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D75663FD6AE; Fri, 25 Sep 2020 17:14:35 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BydnR5PvTz4GZl; Fri, 25 Sep 2020 17:14:35 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D001168BB; Fri, 25 Sep 2020 17:14:35 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PHEZZ1059878; Fri, 25 Sep 2020 17:14:35 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PHEZPI059877; Fri, 25 Sep 2020 17:14:35 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202009251714.08PHEZPI059877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Fri, 25 Sep 2020 17:14:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366163 - stable/12/sbin/growfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: stable/12/sbin/growfs X-SVN-Commit-Revision: 366163 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2020 17:14:35 -0000 Author: mckusick Date: Fri Sep 25 17:14:35 2020 New Revision: 366163 URL: https://svnweb.freebsd.org/changeset/base/366163 Log: MFC of 365992 Update check-hash when doing large filesystem expansions. Sponsored by: Netflix Modified: stable/12/sbin/growfs/growfs.c Modified: stable/12/sbin/growfs/growfs.c ============================================================================== --- stable/12/sbin/growfs/growfs.c Fri Sep 25 17:13:45 2020 (r366162) +++ stable/12/sbin/growfs/growfs.c Fri Sep 25 17:14:35 2020 (r366163) @@ -572,6 +572,7 @@ updjcg(int cylno, time_t modtime, int fsi, int fso, un if (sblock.fs_magic == FS_UFS1_MAGIC) acg.cg_old_ncyl = sblock.fs_old_cpg; + cgckhash(&acg); wtfs(fsbtodb(&sblock, cgtod(&sblock, cylno)), (size_t)sblock.fs_cgsize, (void *)&acg, fso, Nflag); DBG_PRINT0("jcg written\n"); @@ -947,6 +948,7 @@ updcsloc(time_t modtime, int fsi, int fso, unsigned in * Now write the former cylinder group containing the cylinder * summary back to disk. */ + cgckhash(&acg); wtfs(fsbtodb(&sblock, cgtod(&sblock, ocscg)), (size_t)sblock.fs_cgsize, (void *)&acg, fso, Nflag); DBG_PRINT0("oscg written\n"); @@ -1039,6 +1041,7 @@ updcsloc(time_t modtime, int fsi, int fso, unsigned in * Write the new cylinder group containing the cylinder summary * back to disk. */ + cgckhash(&acg); wtfs(fsbtodb(&sblock, cgtod(&sblock, ncscg)), (size_t)sblock.fs_cgsize, (void *)&acg, fso, Nflag); DBG_PRINT0("nscg written\n"); From owner-svn-src-stable-12@freebsd.org Fri Sep 25 18:21:51 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C21E93FFA67; Fri, 25 Sep 2020 18:21:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BygH33bsYz4MWX; Fri, 25 Sep 2020 18:21:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45D1C1745D; Fri, 25 Sep 2020 18:21:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PILp4M003481; Fri, 25 Sep 2020 18:21:51 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PILpZf003480; Fri, 25 Sep 2020 18:21:51 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202009251821.08PILpZf003480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 25 Sep 2020 18:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366166 - stable/12 X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/12 X-SVN-Commit-Revision: 366166 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2020 18:21:51 -0000 Author: gjb Date: Fri Sep 25 18:21:50 2020 New Revision: 366166 URL: https://svnweb.freebsd.org/changeset/base/366166 Log: Record missing svn:mergeinfo for r366163. Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: Directory Properties: stable/12/ (props changed) From owner-svn-src-stable-12@freebsd.org Fri Sep 25 21:18:45 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C0C33E539F; Fri, 25 Sep 2020 21:18:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BylC855Dpz4bYC; Fri, 25 Sep 2020 21:18:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EF0319997; Fri, 25 Sep 2020 21:18:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PLIid9010460; Fri, 25 Sep 2020 21:18:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PLIi3h010459; Fri, 25 Sep 2020 21:18:44 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202009252118.08PLIi3h010459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 25 Sep 2020 21:18:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366174 - stable/12/share/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/share/mk X-SVN-Commit-Revision: 366174 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2020 21:18:45 -0000 Author: jhb Date: Fri Sep 25 21:18:43 2020 New Revision: 366174 URL: https://svnweb.freebsd.org/changeset/base/366174 Log: MFC 365013: Suppress -Wempty-body warnings in GCC 6.x and later. libc++ in LLVM 11 uses an empty else clause in include/c++/v1/__thread_support which triggers this warning. Modified: stable/12/share/mk/bsd.sys.mk Directory Properties: stable/12/ (props changed) Modified: stable/12/share/mk/bsd.sys.mk ============================================================================== --- stable/12/share/mk/bsd.sys.mk Fri Sep 25 20:51:07 2020 (r366173) +++ stable/12/share/mk/bsd.sys.mk Fri Sep 25 21:18:43 2020 (r366174) @@ -156,7 +156,8 @@ CWARNFLAGS+= -Wno-error=address \ # GCC 6.1.0 .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 -CWARNFLAGS+= -Wno-error=nonnull-compare \ +CWARNFLAGS+= -Wno-error=empty-body \ + -Wno-error=nonnull-compare \ -Wno-error=shift-negative-value \ -Wno-error=tautological-compare \ -Wno-error=unused-const-variable From owner-svn-src-stable-12@freebsd.org Fri Sep 25 21:58:47 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F14663E6A10; Fri, 25 Sep 2020 21:58:47 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bym5M6Lhwz4dhm; Fri, 25 Sep 2020 21:58:47 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD2D119ECB; Fri, 25 Sep 2020 21:58:47 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08PLwlfn035263; Fri, 25 Sep 2020 21:58:47 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08PLwiKF035244; Fri, 25 Sep 2020 21:58:44 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202009252158.08PLwiKF035244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 25 Sep 2020 21:58:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366176 - in stable/12: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn ... X-SVN-Group: stable-12 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in stable/12: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/cma... X-SVN-Commit-Revision: 366176 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2020 21:58:48 -0000 Author: jkim Date: Fri Sep 25 21:58:43 2020 New Revision: 366176 URL: https://svnweb.freebsd.org/changeset/base/366176 Log: MFC: r366004 Merge OpenSSL 1.1.1h. Deleted: stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl Modified: stable/12/crypto/openssl/CHANGES stable/12/crypto/openssl/Configure stable/12/crypto/openssl/NEWS stable/12/crypto/openssl/NOTES.PERL stable/12/crypto/openssl/README stable/12/crypto/openssl/apps/genpkey.c stable/12/crypto/openssl/apps/rsa8192.pem stable/12/crypto/openssl/apps/s_client.c stable/12/crypto/openssl/apps/x509.c stable/12/crypto/openssl/appveyor.yml stable/12/crypto/openssl/crypto/aes/aes_core.c stable/12/crypto/openssl/crypto/aes/aes_ige.c stable/12/crypto/openssl/crypto/asn1/d2i_pr.c stable/12/crypto/openssl/crypto/asn1/x_algor.c stable/12/crypto/openssl/crypto/bio/b_print.c stable/12/crypto/openssl/crypto/bio/bss_acpt.c stable/12/crypto/openssl/crypto/bio/bss_conn.c stable/12/crypto/openssl/crypto/bn/bn_gcd.c stable/12/crypto/openssl/crypto/bn/bn_lib.c stable/12/crypto/openssl/crypto/bn/bn_mpi.c stable/12/crypto/openssl/crypto/cmac/cmac.c stable/12/crypto/openssl/crypto/cms/cms_lib.c stable/12/crypto/openssl/crypto/cms/cms_sd.c stable/12/crypto/openssl/crypto/conf/conf_def.c stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-armv4.pl stable/12/crypto/openssl/crypto/ec/ec_ameth.c stable/12/crypto/openssl/crypto/ec/ec_asn1.c stable/12/crypto/openssl/crypto/ec/ec_err.c stable/12/crypto/openssl/crypto/ec/ec_key.c stable/12/crypto/openssl/crypto/ec/ec_lib.c stable/12/crypto/openssl/crypto/ec/ec_local.h stable/12/crypto/openssl/crypto/ec/ecp_nistp224.c stable/12/crypto/openssl/crypto/ec/ecp_nistp521.c stable/12/crypto/openssl/crypto/ec/ecp_nistz256.c stable/12/crypto/openssl/crypto/engine/eng_lib.c stable/12/crypto/openssl/crypto/err/openssl.txt stable/12/crypto/openssl/crypto/evp/e_aes.c stable/12/crypto/openssl/crypto/evp/encode.c stable/12/crypto/openssl/crypto/mem_sec.c stable/12/crypto/openssl/crypto/modes/cbc128.c stable/12/crypto/openssl/crypto/modes/ccm128.c stable/12/crypto/openssl/crypto/modes/cfb128.c stable/12/crypto/openssl/crypto/modes/ctr128.c stable/12/crypto/openssl/crypto/modes/gcm128.c stable/12/crypto/openssl/crypto/modes/modes_local.h stable/12/crypto/openssl/crypto/modes/ofb128.c stable/12/crypto/openssl/crypto/modes/xts128.c stable/12/crypto/openssl/crypto/o_str.c stable/12/crypto/openssl/crypto/o_time.c stable/12/crypto/openssl/crypto/pem/pem_err.c stable/12/crypto/openssl/crypto/pem/pem_lib.c stable/12/crypto/openssl/crypto/pem/pem_pkey.c stable/12/crypto/openssl/crypto/pem/pvkfmt.c stable/12/crypto/openssl/crypto/rand/drbg_ctr.c stable/12/crypto/openssl/crypto/rand/drbg_lib.c stable/12/crypto/openssl/crypto/rand/rand_lib.c stable/12/crypto/openssl/crypto/rand/rand_local.h stable/12/crypto/openssl/crypto/rand/rand_unix.c stable/12/crypto/openssl/crypto/rand/randfile.c stable/12/crypto/openssl/crypto/rsa/rsa_ameth.c stable/12/crypto/openssl/crypto/store/loader_file.c stable/12/crypto/openssl/crypto/store/store_lib.c stable/12/crypto/openssl/crypto/ts/ts_rsp_sign.c stable/12/crypto/openssl/crypto/ui/ui_openssl.c stable/12/crypto/openssl/crypto/whrlpool/wp_block.c stable/12/crypto/openssl/crypto/x509/x509_err.c stable/12/crypto/openssl/crypto/x509/x509_local.h stable/12/crypto/openssl/crypto/x509/x509_req.c stable/12/crypto/openssl/crypto/x509/x509_txt.c stable/12/crypto/openssl/crypto/x509/x509_vfy.c stable/12/crypto/openssl/crypto/x509/x_pubkey.c stable/12/crypto/openssl/crypto/x509v3/pcy_data.c stable/12/crypto/openssl/crypto/x509v3/v3_alt.c stable/12/crypto/openssl/crypto/x509v3/v3_purp.c stable/12/crypto/openssl/doc/man1/CA.pl.pod stable/12/crypto/openssl/doc/man1/ca.pod stable/12/crypto/openssl/doc/man1/dgst.pod stable/12/crypto/openssl/doc/man1/enc.pod stable/12/crypto/openssl/doc/man1/ocsp.pod stable/12/crypto/openssl/doc/man1/pkcs12.pod stable/12/crypto/openssl/doc/man1/pkcs8.pod stable/12/crypto/openssl/doc/man1/pkeyutl.pod stable/12/crypto/openssl/doc/man1/s_client.pod stable/12/crypto/openssl/doc/man1/s_server.pod stable/12/crypto/openssl/doc/man1/s_time.pod stable/12/crypto/openssl/doc/man1/sess_id.pod stable/12/crypto/openssl/doc/man1/ts.pod stable/12/crypto/openssl/doc/man1/tsget.pod stable/12/crypto/openssl/doc/man1/verify.pod stable/12/crypto/openssl/doc/man1/x509.pod stable/12/crypto/openssl/doc/man3/ASN1_INTEGER_get_int64.pod stable/12/crypto/openssl/doc/man3/ASN1_STRING_length.pod stable/12/crypto/openssl/doc/man3/ASN1_TIME_set.pod stable/12/crypto/openssl/doc/man3/ASN1_TYPE_get.pod stable/12/crypto/openssl/doc/man3/ASYNC_WAIT_CTX_new.pod stable/12/crypto/openssl/doc/man3/ASYNC_start_job.pod stable/12/crypto/openssl/doc/man3/BF_encrypt.pod stable/12/crypto/openssl/doc/man3/BIO_ADDR.pod stable/12/crypto/openssl/doc/man3/BIO_ADDRINFO.pod stable/12/crypto/openssl/doc/man3/BIO_connect.pod stable/12/crypto/openssl/doc/man3/BIO_ctrl.pod stable/12/crypto/openssl/doc/man3/BIO_get_data.pod stable/12/crypto/openssl/doc/man3/BIO_parse_hostserv.pod stable/12/crypto/openssl/doc/man3/BIO_read.pod stable/12/crypto/openssl/doc/man3/BIO_s_accept.pod stable/12/crypto/openssl/doc/man3/BIO_s_bio.pod stable/12/crypto/openssl/doc/man3/BIO_s_connect.pod stable/12/crypto/openssl/doc/man3/BIO_s_file.pod stable/12/crypto/openssl/doc/man3/BIO_set_callback.pod stable/12/crypto/openssl/doc/man3/BN_add.pod stable/12/crypto/openssl/doc/man3/BN_bn2bin.pod stable/12/crypto/openssl/doc/man3/BN_generate_prime.pod stable/12/crypto/openssl/doc/man3/BN_mod_mul_montgomery.pod stable/12/crypto/openssl/doc/man3/BN_set_bit.pod stable/12/crypto/openssl/doc/man3/CMS_verify.pod stable/12/crypto/openssl/doc/man3/CRYPTO_THREAD_run_once.pod stable/12/crypto/openssl/doc/man3/CRYPTO_memcmp.pod stable/12/crypto/openssl/doc/man3/DES_random_key.pod stable/12/crypto/openssl/doc/man3/DH_get0_pqg.pod stable/12/crypto/openssl/doc/man3/DH_set_method.pod stable/12/crypto/openssl/doc/man3/DSA_set_method.pod stable/12/crypto/openssl/doc/man3/DTLSv1_listen.pod stable/12/crypto/openssl/doc/man3/ECDSA_SIG_new.pod stable/12/crypto/openssl/doc/man3/EC_GROUP_new.pod stable/12/crypto/openssl/doc/man3/EC_KEY_new.pod stable/12/crypto/openssl/doc/man3/EC_POINT_new.pod stable/12/crypto/openssl/doc/man3/ENGINE_add.pod stable/12/crypto/openssl/doc/man3/ERR_get_error.pod stable/12/crypto/openssl/doc/man3/ERR_print_errors.pod stable/12/crypto/openssl/doc/man3/ERR_put_error.pod stable/12/crypto/openssl/doc/man3/EVP_DigestInit.pod stable/12/crypto/openssl/doc/man3/EVP_DigestSignInit.pod stable/12/crypto/openssl/doc/man3/EVP_DigestVerifyInit.pod stable/12/crypto/openssl/doc/man3/EVP_EncodeInit.pod stable/12/crypto/openssl/doc/man3/EVP_EncryptInit.pod stable/12/crypto/openssl/doc/man3/EVP_OpenInit.pod stable/12/crypto/openssl/doc/man3/EVP_PKEY_CTX_ctrl.pod stable/12/crypto/openssl/doc/man3/EVP_PKEY_CTX_new.pod stable/12/crypto/openssl/doc/man3/EVP_PKEY_keygen.pod stable/12/crypto/openssl/doc/man3/EVP_PKEY_new.pod stable/12/crypto/openssl/doc/man3/EVP_SealInit.pod stable/12/crypto/openssl/doc/man3/EVP_SignInit.pod stable/12/crypto/openssl/doc/man3/EVP_VerifyInit.pod stable/12/crypto/openssl/doc/man3/HMAC.pod stable/12/crypto/openssl/doc/man3/OCSP_cert_to_id.pod stable/12/crypto/openssl/doc/man3/OCSP_request_add1_nonce.pod stable/12/crypto/openssl/doc/man3/OCSP_resp_find_status.pod stable/12/crypto/openssl/doc/man3/OCSP_sendreq_new.pod stable/12/crypto/openssl/doc/man3/OPENSSL_LH_COMPFUNC.pod stable/12/crypto/openssl/doc/man3/OPENSSL_config.pod stable/12/crypto/openssl/doc/man3/OPENSSL_ia32cap.pod stable/12/crypto/openssl/doc/man3/OPENSSL_init_crypto.pod stable/12/crypto/openssl/doc/man3/OPENSSL_init_ssl.pod stable/12/crypto/openssl/doc/man3/OSSL_STORE_open.pod stable/12/crypto/openssl/doc/man3/PEM_read_bio_PrivateKey.pod stable/12/crypto/openssl/doc/man3/PKCS7_verify.pod stable/12/crypto/openssl/doc/man3/RAND_DRBG_new.pod stable/12/crypto/openssl/doc/man3/RAND_DRBG_set_callbacks.pod stable/12/crypto/openssl/doc/man3/RAND_add.pod stable/12/crypto/openssl/doc/man3/RAND_load_file.pod stable/12/crypto/openssl/doc/man3/RSA_blinding_on.pod stable/12/crypto/openssl/doc/man3/RSA_private_encrypt.pod stable/12/crypto/openssl/doc/man3/RSA_set_method.pod stable/12/crypto/openssl/doc/man3/SHA256_Init.pod stable/12/crypto/openssl/doc/man3/SSL_CONF_cmd.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_dane_enable.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_alpn_select_cb.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_generate_session_id.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_info_callback.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_max_cert_list.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_mode.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_options.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_psk_client_callback.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_read_ahead.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_security_level.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_session_cache_mode.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_session_id_context.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_session_ticket_cb.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_split_send_fragment.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_tlsext_servername_callback.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_use_psk_identity_hint.pod stable/12/crypto/openssl/doc/man3/SSL_accept.pod stable/12/crypto/openssl/doc/man3/SSL_alloc_buffers.pod stable/12/crypto/openssl/doc/man3/SSL_connect.pod stable/12/crypto/openssl/doc/man3/SSL_do_handshake.pod stable/12/crypto/openssl/doc/man3/SSL_get_all_async_fds.pod stable/12/crypto/openssl/doc/man3/SSL_get_error.pod stable/12/crypto/openssl/doc/man3/SSL_new.pod stable/12/crypto/openssl/doc/man3/SSL_pending.pod stable/12/crypto/openssl/doc/man3/SSL_read.pod stable/12/crypto/openssl/doc/man3/SSL_read_early_data.pod stable/12/crypto/openssl/doc/man3/SSL_set1_host.pod stable/12/crypto/openssl/doc/man3/SSL_set_bio.pod stable/12/crypto/openssl/doc/man3/SSL_set_fd.pod stable/12/crypto/openssl/doc/man3/SSL_set_shutdown.pod stable/12/crypto/openssl/doc/man3/SSL_shutdown.pod stable/12/crypto/openssl/doc/man3/SSL_state_string.pod stable/12/crypto/openssl/doc/man3/SSL_want.pod stable/12/crypto/openssl/doc/man3/SSL_write.pod stable/12/crypto/openssl/doc/man3/UI_UTIL_read_pw.pod stable/12/crypto/openssl/doc/man3/UI_create_method.pod stable/12/crypto/openssl/doc/man3/UI_new.pod stable/12/crypto/openssl/doc/man3/X509V3_get_d2i.pod stable/12/crypto/openssl/doc/man3/X509_ALGOR_dup.pod stable/12/crypto/openssl/doc/man3/X509_LOOKUP_hash_dir.pod stable/12/crypto/openssl/doc/man3/X509_LOOKUP_meth_new.pod stable/12/crypto/openssl/doc/man3/X509_STORE_CTX_get_error.pod stable/12/crypto/openssl/doc/man3/X509_STORE_CTX_new.pod stable/12/crypto/openssl/doc/man3/X509_STORE_CTX_set_verify_cb.pod stable/12/crypto/openssl/doc/man3/X509_STORE_set_verify_cb_func.pod stable/12/crypto/openssl/doc/man3/X509_VERIFY_PARAM_set_flags.pod stable/12/crypto/openssl/doc/man3/X509_check_ca.pod stable/12/crypto/openssl/doc/man3/X509_check_host.pod stable/12/crypto/openssl/doc/man3/X509_check_issued.pod stable/12/crypto/openssl/doc/man3/X509_check_purpose.pod stable/12/crypto/openssl/doc/man3/X509_get0_signature.pod stable/12/crypto/openssl/doc/man3/X509v3_get_ext_by_NID.pod stable/12/crypto/openssl/doc/man3/d2i_DHparams.pod stable/12/crypto/openssl/doc/man3/d2i_X509.pod stable/12/crypto/openssl/doc/man5/config.pod stable/12/crypto/openssl/doc/man5/x509v3_config.pod stable/12/crypto/openssl/doc/man7/SM2.pod stable/12/crypto/openssl/doc/man7/evp.pod stable/12/crypto/openssl/doc/man7/ossl_store.pod stable/12/crypto/openssl/e_os.h stable/12/crypto/openssl/include/openssl/bn.h stable/12/crypto/openssl/include/openssl/e_os2.h stable/12/crypto/openssl/include/openssl/ec.h stable/12/crypto/openssl/include/openssl/ecerr.h stable/12/crypto/openssl/include/openssl/opensslconf.h.in stable/12/crypto/openssl/include/openssl/opensslv.h stable/12/crypto/openssl/include/openssl/pemerr.h stable/12/crypto/openssl/include/openssl/ssl.h stable/12/crypto/openssl/include/openssl/ssl3.h stable/12/crypto/openssl/include/openssl/x509.h stable/12/crypto/openssl/include/openssl/x509_vfy.h stable/12/crypto/openssl/include/openssl/x509err.h stable/12/crypto/openssl/ssl/bio_ssl.c stable/12/crypto/openssl/ssl/record/ssl3_buffer.c stable/12/crypto/openssl/ssl/ssl_conf.c stable/12/crypto/openssl/ssl/ssl_lib.c stable/12/crypto/openssl/ssl/ssl_rsa.c stable/12/crypto/openssl/ssl/statem/extensions.c stable/12/crypto/openssl/ssl/statem/extensions_srvr.c stable/12/crypto/openssl/ssl/statem/statem_lib.c stable/12/crypto/openssl/ssl/t1_lib.c stable/12/crypto/openssl/ssl/t1_trce.c stable/12/crypto/openssl/ssl/tls13_enc.c stable/12/secure/lib/libcrypto/Makefile.inc stable/12/secure/lib/libcrypto/arm/ecp_nistz256-armv4.S stable/12/secure/lib/libcrypto/man/man3/ADMISSIONS.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 stable/12/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 stable/12/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 stable/12/secure/lib/libcrypto/man/man3/BF_encrypt.3 stable/12/secure/lib/libcrypto/man/man3/BIO_ADDR.3 stable/12/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 stable/12/secure/lib/libcrypto/man/man3/BIO_connect.3 stable/12/secure/lib/libcrypto/man/man3/BIO_ctrl.3 stable/12/secure/lib/libcrypto/man/man3/BIO_f_base64.3 stable/12/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 stable/12/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 stable/12/secure/lib/libcrypto/man/man3/BIO_f_md.3 stable/12/secure/lib/libcrypto/man/man3/BIO_f_null.3 stable/12/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 stable/12/secure/lib/libcrypto/man/man3/BIO_find_type.3 stable/12/secure/lib/libcrypto/man/man3/BIO_get_data.3 stable/12/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 stable/12/secure/lib/libcrypto/man/man3/BIO_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/BIO_new.3 stable/12/secure/lib/libcrypto/man/man3/BIO_new_CMS.3 stable/12/secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 stable/12/secure/lib/libcrypto/man/man3/BIO_printf.3 stable/12/secure/lib/libcrypto/man/man3/BIO_push.3 stable/12/secure/lib/libcrypto/man/man3/BIO_read.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_accept.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_bio.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_connect.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_fd.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_file.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_mem.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_null.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_socket.3 stable/12/secure/lib/libcrypto/man/man3/BIO_set_callback.3 stable/12/secure/lib/libcrypto/man/man3/BIO_should_retry.3 stable/12/secure/lib/libcrypto/man/man3/BN_BLINDING_new.3 stable/12/secure/lib/libcrypto/man/man3/BN_CTX_new.3 stable/12/secure/lib/libcrypto/man/man3/BN_CTX_start.3 stable/12/secure/lib/libcrypto/man/man3/BN_add.3 stable/12/secure/lib/libcrypto/man/man3/BN_add_word.3 stable/12/secure/lib/libcrypto/man/man3/BN_bn2bin.3 stable/12/secure/lib/libcrypto/man/man3/BN_cmp.3 stable/12/secure/lib/libcrypto/man/man3/BN_copy.3 stable/12/secure/lib/libcrypto/man/man3/BN_generate_prime.3 stable/12/secure/lib/libcrypto/man/man3/BN_mod_inverse.3 stable/12/secure/lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 stable/12/secure/lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 stable/12/secure/lib/libcrypto/man/man3/BN_new.3 stable/12/secure/lib/libcrypto/man/man3/BN_num_bytes.3 stable/12/secure/lib/libcrypto/man/man3/BN_rand.3 stable/12/secure/lib/libcrypto/man/man3/BN_security_bits.3 stable/12/secure/lib/libcrypto/man/man3/BN_set_bit.3 stable/12/secure/lib/libcrypto/man/man3/BN_swap.3 stable/12/secure/lib/libcrypto/man/man3/BN_zero.3 stable/12/secure/lib/libcrypto/man/man3/BUF_MEM_new.3 stable/12/secure/lib/libcrypto/man/man3/CMS_add0_cert.3 stable/12/secure/lib/libcrypto/man/man3/CMS_add1_recipient_cert.3 stable/12/secure/lib/libcrypto/man/man3/CMS_add1_signer.3 stable/12/secure/lib/libcrypto/man/man3/CMS_compress.3 stable/12/secure/lib/libcrypto/man/man3/CMS_decrypt.3 stable/12/secure/lib/libcrypto/man/man3/CMS_encrypt.3 stable/12/secure/lib/libcrypto/man/man3/CMS_final.3 stable/12/secure/lib/libcrypto/man/man3/CMS_get0_RecipientInfos.3 stable/12/secure/lib/libcrypto/man/man3/CMS_get0_SignerInfos.3 stable/12/secure/lib/libcrypto/man/man3/CMS_get0_type.3 stable/12/secure/lib/libcrypto/man/man3/CMS_get1_ReceiptRequest.3 stable/12/secure/lib/libcrypto/man/man3/CMS_sign.3 stable/12/secure/lib/libcrypto/man/man3/CMS_sign_receipt.3 stable/12/secure/lib/libcrypto/man/man3/CMS_uncompress.3 stable/12/secure/lib/libcrypto/man/man3/CMS_verify.3 stable/12/secure/lib/libcrypto/man/man3/CMS_verify_receipt.3 stable/12/secure/lib/libcrypto/man/man3/CONF_modules_free.3 stable/12/secure/lib/libcrypto/man/man3/CONF_modules_load_file.3 stable/12/secure/lib/libcrypto/man/man3/CRYPTO_THREAD_run_once.3 stable/12/secure/lib/libcrypto/man/man3/CRYPTO_get_ex_new_index.3 stable/12/secure/lib/libcrypto/man/man3/CRYPTO_memcmp.3 stable/12/secure/lib/libcrypto/man/man3/CTLOG_STORE_get0_log_by_id.3 stable/12/secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3 stable/12/secure/lib/libcrypto/man/man3/CTLOG_new.3 stable/12/secure/lib/libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3 stable/12/secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3 stable/12/secure/lib/libcrypto/man/man3/DES_random_key.3 stable/12/secure/lib/libcrypto/man/man3/DH_generate_key.3 stable/12/secure/lib/libcrypto/man/man3/DH_generate_parameters.3 stable/12/secure/lib/libcrypto/man/man3/DH_get0_pqg.3 stable/12/secure/lib/libcrypto/man/man3/DH_get_1024_160.3 stable/12/secure/lib/libcrypto/man/man3/DH_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/DH_new.3 stable/12/secure/lib/libcrypto/man/man3/DH_new_by_nid.3 stable/12/secure/lib/libcrypto/man/man3/DH_set_method.3 stable/12/secure/lib/libcrypto/man/man3/DH_size.3 stable/12/secure/lib/libcrypto/man/man3/DSA_SIG_new.3 stable/12/secure/lib/libcrypto/man/man3/DSA_do_sign.3 stable/12/secure/lib/libcrypto/man/man3/DSA_dup_DH.3 stable/12/secure/lib/libcrypto/man/man3/DSA_generate_key.3 stable/12/secure/lib/libcrypto/man/man3/DSA_generate_parameters.3 stable/12/secure/lib/libcrypto/man/man3/DSA_get0_pqg.3 stable/12/secure/lib/libcrypto/man/man3/DSA_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/DSA_new.3 stable/12/secure/lib/libcrypto/man/man3/DSA_set_method.3 stable/12/secure/lib/libcrypto/man/man3/DSA_sign.3 stable/12/secure/lib/libcrypto/man/man3/DSA_size.3 stable/12/secure/lib/libcrypto/man/man3/DTLS_get_data_mtu.3 stable/12/secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3 stable/12/secure/lib/libcrypto/man/man3/DTLSv1_listen.3 stable/12/secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3 stable/12/secure/lib/libcrypto/man/man3/ECPKParameters_print.3 stable/12/secure/lib/libcrypto/man/man3/EC_GFp_simple_method.3 stable/12/secure/lib/libcrypto/man/man3/EC_GROUP_copy.3 stable/12/secure/lib/libcrypto/man/man3/EC_GROUP_new.3 stable/12/secure/lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3 stable/12/secure/lib/libcrypto/man/man3/EC_KEY_new.3 stable/12/secure/lib/libcrypto/man/man3/EC_POINT_add.3 stable/12/secure/lib/libcrypto/man/man3/EC_POINT_new.3 stable/12/secure/lib/libcrypto/man/man3/ENGINE_add.3 stable/12/secure/lib/libcrypto/man/man3/ERR_GET_LIB.3 stable/12/secure/lib/libcrypto/man/man3/ERR_clear_error.3 stable/12/secure/lib/libcrypto/man/man3/ERR_error_string.3 stable/12/secure/lib/libcrypto/man/man3/ERR_get_error.3 stable/12/secure/lib/libcrypto/man/man3/ERR_load_crypto_strings.3 stable/12/secure/lib/libcrypto/man/man3/ERR_load_strings.3 stable/12/secure/lib/libcrypto/man/man3/ERR_print_errors.3 stable/12/secure/lib/libcrypto/man/man3/ERR_put_error.3 stable/12/secure/lib/libcrypto/man/man3/ERR_remove_state.3 stable/12/secure/lib/libcrypto/man/man3/ERR_set_mark.3 stable/12/secure/lib/libcrypto/man/man3/EVP_BytesToKey.3 stable/12/secure/lib/libcrypto/man/man3/EVP_CIPHER_CTX_get_cipher_data.3 stable/12/secure/lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/EVP_DigestInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_DigestVerifyInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_EncodeInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_EncryptInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/EVP_OpenInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set1_pbe_pass.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_asn1_get_count.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_cmp.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_get_default_digest_nid.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_keygen.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_meth_get_count.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_new.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_print_private.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_size.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_verify_recover.3 stable/12/secure/lib/libcrypto/man/man3/EVP_SealInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_SignInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_VerifyInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_aes.3 stable/12/secure/lib/libcrypto/man/man3/EVP_aria.3 stable/12/secure/lib/libcrypto/man/man3/EVP_bf_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_blake2b512.3 stable/12/secure/lib/libcrypto/man/man3/EVP_camellia.3 stable/12/secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_chacha20.3 stable/12/secure/lib/libcrypto/man/man3/EVP_des.3 stable/12/secure/lib/libcrypto/man/man3/EVP_desx_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_idea_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_md2.3 stable/12/secure/lib/libcrypto/man/man3/EVP_md4.3 stable/12/secure/lib/libcrypto/man/man3/EVP_md5.3 stable/12/secure/lib/libcrypto/man/man3/EVP_mdc2.3 stable/12/secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_rc4.3 stable/12/secure/lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_ripemd160.3 stable/12/secure/lib/libcrypto/man/man3/EVP_seed_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_sha1.3 stable/12/secure/lib/libcrypto/man/man3/EVP_sha224.3 stable/12/secure/lib/libcrypto/man/man3/EVP_sha3_224.3 stable/12/secure/lib/libcrypto/man/man3/EVP_sm3.3 stable/12/secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_whirlpool.3 stable/12/secure/lib/libcrypto/man/man3/HMAC.3 stable/12/secure/lib/libcrypto/man/man3/MD5.3 stable/12/secure/lib/libcrypto/man/man3/MDC2_Init.3 stable/12/secure/lib/libcrypto/man/man3/Makefile stable/12/secure/lib/libcrypto/man/man3/OBJ_nid2obj.3 stable/12/secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3 stable/12/secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3 stable/12/secure/lib/libcrypto/man/man3/OCSP_request_add1_nonce.3 stable/12/secure/lib/libcrypto/man/man3/OCSP_resp_find_status.3 stable/12/secure/lib/libcrypto/man/man3/OCSP_response_status.3 stable/12/secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_Applink.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_VERSION_NUMBER.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_config.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_fork_prepare.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_ia32cap.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_init_crypto.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_init_ssl.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_instrument_bus.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_load_builtin_modules.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_malloc.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 stable/12/secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3 stable/12/secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3 stable/12/secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3 stable/12/secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3 stable/12/secure/lib/libcrypto/man/man3/OSSL_STORE_open.3 stable/12/secure/lib/libcrypto/man/man3/OpenSSL_add_all_algorithms.3 stable/12/secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 stable/12/secure/lib/libcrypto/man/man3/PEM_read.3 stable/12/secure/lib/libcrypto/man/man3/PEM_read_CMS.3 stable/12/secure/lib/libcrypto/man/man3/PEM_read_bio_PrivateKey.3 stable/12/secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3 stable/12/secure/lib/libcrypto/man/man3/PEM_write_bio_CMS_stream.3 stable/12/secure/lib/libcrypto/man/man3/PEM_write_bio_PKCS7_stream.3 stable/12/secure/lib/libcrypto/man/man3/PKCS12_create.3 stable/12/secure/lib/libcrypto/man/man3/PKCS12_newpass.3 stable/12/secure/lib/libcrypto/man/man3/PKCS12_parse.3 stable/12/secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3 stable/12/secure/lib/libcrypto/man/man3/PKCS7_decrypt.3 stable/12/secure/lib/libcrypto/man/man3/PKCS7_encrypt.3 stable/12/secure/lib/libcrypto/man/man3/PKCS7_sign.3 stable/12/secure/lib/libcrypto/man/man3/PKCS7_sign_add_signer.3 stable/12/secure/lib/libcrypto/man/man3/PKCS7_verify.3 stable/12/secure/lib/libcrypto/man/man3/RAND_DRBG_generate.3 stable/12/secure/lib/libcrypto/man/man3/RAND_DRBG_get0_master.3 stable/12/secure/lib/libcrypto/man/man3/RAND_DRBG_new.3 stable/12/secure/lib/libcrypto/man/man3/RAND_DRBG_reseed.3 stable/12/secure/lib/libcrypto/man/man3/RAND_DRBG_set_callbacks.3 stable/12/secure/lib/libcrypto/man/man3/RAND_DRBG_set_ex_data.3 stable/12/secure/lib/libcrypto/man/man3/RAND_add.3 stable/12/secure/lib/libcrypto/man/man3/RAND_bytes.3 stable/12/secure/lib/libcrypto/man/man3/RAND_cleanup.3 stable/12/secure/lib/libcrypto/man/man3/RAND_egd.3 stable/12/secure/lib/libcrypto/man/man3/RAND_load_file.3 stable/12/secure/lib/libcrypto/man/man3/RAND_set_rand_method.3 stable/12/secure/lib/libcrypto/man/man3/RC4_set_key.3 stable/12/secure/lib/libcrypto/man/man3/RIPEMD160_Init.3 stable/12/secure/lib/libcrypto/man/man3/RSA_blinding_on.3 stable/12/secure/lib/libcrypto/man/man3/RSA_check_key.3 stable/12/secure/lib/libcrypto/man/man3/RSA_generate_key.3 stable/12/secure/lib/libcrypto/man/man3/RSA_get0_key.3 stable/12/secure/lib/libcrypto/man/man3/RSA_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/RSA_new.3 stable/12/secure/lib/libcrypto/man/man3/RSA_padding_add_PKCS1_type_1.3 stable/12/secure/lib/libcrypto/man/man3/RSA_print.3 stable/12/secure/lib/libcrypto/man/man3/RSA_private_encrypt.3 stable/12/secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 stable/12/secure/lib/libcrypto/man/man3/RSA_set_method.3 stable/12/secure/lib/libcrypto/man/man3/RSA_sign.3 stable/12/secure/lib/libcrypto/man/man3/RSA_sign_ASN1_OCTET_STRING.3 stable/12/secure/lib/libcrypto/man/man3/RSA_size.3 stable/12/secure/lib/libcrypto/man/man3/SCT_new.3 stable/12/secure/lib/libcrypto/man/man3/SCT_print.3 stable/12/secure/lib/libcrypto/man/man3/SCT_validate.3 stable/12/secure/lib/libcrypto/man/man3/SHA256_Init.3 stable/12/secure/lib/libcrypto/man/man3/SMIME_read_CMS.3 stable/12/secure/lib/libcrypto/man/man3/SMIME_read_PKCS7.3 stable/12/secure/lib/libcrypto/man/man3/SMIME_write_CMS.3 stable/12/secure/lib/libcrypto/man/man3/SMIME_write_PKCS7.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CIPHER_get_name.3 stable/12/secure/lib/libcrypto/man/man3/SSL_COMP_add_compression_method.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set1_prefix.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set_flags.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CONF_cmd_argv.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_add1_chain_cert.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_add_extra_chain_cert.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_add_session.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_config.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_dane_enable.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_flush_sessions.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_free.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_get_verify_mode.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_has_client_custom_ext.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_load_verify_locations.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_new.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_sess_number.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_sess_set_cache_size.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_sessions.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set1_curves.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set1_verify_cert_store.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_alpn_select_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_store.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_verify_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_cipher_list.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_client_cert_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_client_hello_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_ct_validation_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_ctlog_list_file.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_default_passwd_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_ex_data.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_generate_session_id.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_info_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_keylog_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_min_proto_version.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_msg_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_num_tickets.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_options.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_psk_client_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_quiet_shutdown.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_read_ahead.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_record_padding_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_security_level.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_cache_mode.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_id_context.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_ticket_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_split_send_fragment.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_ssl_version.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_stateless_cookie_generate_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_timeout.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_servername_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_status_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_ticket_key_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_use_srtp.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_tmp_dh_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_verify.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_use_certificate.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_use_psk_identity_hint.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_use_serverinfo.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_free.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_cipher.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_hostname.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_id_context.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_peer.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get_compress_id.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get_ex_data.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get_protocol_version.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get_time.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_has_ticket.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_is_resumable.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_print.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_set1_id.3 stable/12/secure/lib/libcrypto/man/man3/SSL_accept.3 stable/12/secure/lib/libcrypto/man/man3/SSL_alert_type_string.3 stable/12/secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3 stable/12/secure/lib/libcrypto/man/man3/SSL_check_chain.3 stable/12/secure/lib/libcrypto/man/man3/SSL_clear.3 stable/12/secure/lib/libcrypto/man/man3/SSL_connect.3 stable/12/secure/lib/libcrypto/man/man3/SSL_do_handshake.3 stable/12/secure/lib/libcrypto/man/man3/SSL_export_keying_material.3 stable/12/secure/lib/libcrypto/man/man3/SSL_extension_supported.3 stable/12/secure/lib/libcrypto/man/man3/SSL_free.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get0_peer_scts.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_SSL_CTX.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_all_async_fds.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_ciphers.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_client_random.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_current_cipher.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_default_timeout.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_error.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_extms_support.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_fd.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_peer_cert_chain.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_peer_certificate.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_peer_signature_nid.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_psk_identity.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_rbio.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_session.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_shared_sigalgs.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_verify_result.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_version.3 stable/12/secure/lib/libcrypto/man/man3/SSL_in_init.3 stable/12/secure/lib/libcrypto/man/man3/SSL_key_update.3 stable/12/secure/lib/libcrypto/man/man3/SSL_library_init.3 stable/12/secure/lib/libcrypto/man/man3/SSL_load_client_CA_file.3 stable/12/secure/lib/libcrypto/man/man3/SSL_new.3 stable/12/secure/lib/libcrypto/man/man3/SSL_pending.3 stable/12/secure/lib/libcrypto/man/man3/SSL_read.3 stable/12/secure/lib/libcrypto/man/man3/SSL_read_early_data.3 stable/12/secure/lib/libcrypto/man/man3/SSL_rstate_string.3 stable/12/secure/lib/libcrypto/man/man3/SSL_session_reused.3 stable/12/secure/lib/libcrypto/man/man3/SSL_set1_host.3 stable/12/secure/lib/libcrypto/man/man3/SSL_set_bio.3 stable/12/secure/lib/libcrypto/man/man3/SSL_set_connect_state.3 stable/12/secure/lib/libcrypto/man/man3/SSL_set_fd.3 stable/12/secure/lib/libcrypto/man/man3/SSL_set_session.3 stable/12/secure/lib/libcrypto/man/man3/SSL_set_shutdown.3 stable/12/secure/lib/libcrypto/man/man3/SSL_set_verify_result.3 stable/12/secure/lib/libcrypto/man/man3/SSL_shutdown.3 stable/12/secure/lib/libcrypto/man/man3/SSL_state_string.3 stable/12/secure/lib/libcrypto/man/man3/SSL_want.3 stable/12/secure/lib/libcrypto/man/man3/SSL_write.3 stable/12/secure/lib/libcrypto/man/man3/UI_STRING.3 stable/12/secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3 stable/12/secure/lib/libcrypto/man/man3/UI_create_method.3 stable/12/secure/lib/libcrypto/man/man3/UI_new.3 stable/12/secure/lib/libcrypto/man/man3/X509V3_get_d2i.3 stable/12/secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3 stable/12/secure/lib/libcrypto/man/man3/X509_CRL_get0_by_serial.3 stable/12/secure/lib/libcrypto/man/man3/X509_EXTENSION_set_object.3 stable/12/secure/lib/libcrypto/man/man3/X509_LOOKUP.3 stable/12/secure/lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3 stable/12/secure/lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/X509_NAME_ENTRY_get_object.3 stable/12/secure/lib/libcrypto/man/man3/X509_NAME_add_entry_by_txt.3 stable/12/secure/lib/libcrypto/man/man3/X509_NAME_get0_der.3 stable/12/secure/lib/libcrypto/man/man3/X509_NAME_get_index_by_NID.3 stable/12/secure/lib/libcrypto/man/man3/X509_NAME_print_ex.3 stable/12/secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3 stable/12/secure/lib/libcrypto/man/man3/X509_SIG_get0.3 stable/12/secure/lib/libcrypto/man/man3/X509_STORE_CTX_get_error.3 stable/12/secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 stable/12/secure/lib/libcrypto/man/man3/X509_STORE_CTX_set_verify_cb.3 stable/12/secure/lib/libcrypto/man/man3/X509_STORE_add_cert.3 stable/12/secure/lib/libcrypto/man/man3/X509_STORE_get0_param.3 stable/12/secure/lib/libcrypto/man/man3/X509_STORE_new.3 stable/12/secure/lib/libcrypto/man/man3/X509_STORE_set_verify_cb_func.3 stable/12/secure/lib/libcrypto/man/man3/X509_VERIFY_PARAM_set_flags.3 stable/12/secure/lib/libcrypto/man/man3/X509_check_ca.3 stable/12/secure/lib/libcrypto/man/man3/X509_check_host.3 stable/12/secure/lib/libcrypto/man/man3/X509_check_issued.3 stable/12/secure/lib/libcrypto/man/man3/X509_check_private_key.3 stable/12/secure/lib/libcrypto/man/man3/X509_check_purpose.3 stable/12/secure/lib/libcrypto/man/man3/X509_cmp.3 stable/12/secure/lib/libcrypto/man/man3/X509_cmp_time.3 stable/12/secure/lib/libcrypto/man/man3/X509_digest.3 stable/12/secure/lib/libcrypto/man/man3/X509_dup.3 stable/12/secure/lib/libcrypto/man/man3/X509_get0_notBefore.3 stable/12/secure/lib/libcrypto/man/man3/X509_get0_signature.3 stable/12/secure/lib/libcrypto/man/man3/X509_get0_uids.3 stable/12/secure/lib/libcrypto/man/man3/X509_get_extension_flags.3 stable/12/secure/lib/libcrypto/man/man3/X509_get_pubkey.3 stable/12/secure/lib/libcrypto/man/man3/X509_get_serialNumber.3 stable/12/secure/lib/libcrypto/man/man3/X509_get_subject_name.3 stable/12/secure/lib/libcrypto/man/man3/X509_get_version.3 stable/12/secure/lib/libcrypto/man/man3/X509_new.3 stable/12/secure/lib/libcrypto/man/man3/X509_sign.3 stable/12/secure/lib/libcrypto/man/man3/X509_verify_cert.3 stable/12/secure/lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 stable/12/secure/lib/libcrypto/man/man3/d2i_DHparams.3 stable/12/secure/lib/libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3 stable/12/secure/lib/libcrypto/man/man3/d2i_PrivateKey.3 stable/12/secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3 stable/12/secure/lib/libcrypto/man/man3/d2i_X509.3 stable/12/secure/lib/libcrypto/man/man3/i2d_CMS_bio_stream.3 stable/12/secure/lib/libcrypto/man/man3/i2d_PKCS7_bio_stream.3 stable/12/secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3 stable/12/secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3 stable/12/secure/lib/libcrypto/man/man5/x509v3_config.5 stable/12/secure/lib/libcrypto/man/man7/Ed25519.7 stable/12/secure/lib/libcrypto/man/man7/RAND.7 stable/12/secure/lib/libcrypto/man/man7/RAND_DRBG.7 stable/12/secure/lib/libcrypto/man/man7/RSA-PSS.7 stable/12/secure/lib/libcrypto/man/man7/SM2.7 stable/12/secure/lib/libcrypto/man/man7/X25519.7 stable/12/secure/lib/libcrypto/man/man7/bio.7 stable/12/secure/lib/libcrypto/man/man7/ct.7 stable/12/secure/lib/libcrypto/man/man7/des_modes.7 stable/12/secure/lib/libcrypto/man/man7/evp.7 stable/12/secure/lib/libcrypto/man/man7/ossl_store-file.7 stable/12/secure/lib/libcrypto/man/man7/ossl_store.7 stable/12/secure/lib/libcrypto/man/man7/passphrase-encoding.7 stable/12/secure/lib/libcrypto/man/man7/proxy-certificates.7 stable/12/secure/lib/libcrypto/man/man7/scrypt.7 stable/12/secure/lib/libcrypto/man/man7/ssl.7 stable/12/secure/lib/libcrypto/man/man7/x509.7 stable/12/secure/usr.bin/openssl/man/CA.pl.1 stable/12/secure/usr.bin/openssl/man/asn1parse.1 stable/12/secure/usr.bin/openssl/man/ca.1 stable/12/secure/usr.bin/openssl/man/ciphers.1 stable/12/secure/usr.bin/openssl/man/cms.1 stable/12/secure/usr.bin/openssl/man/crl.1 stable/12/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/12/secure/usr.bin/openssl/man/dgst.1 stable/12/secure/usr.bin/openssl/man/dhparam.1 stable/12/secure/usr.bin/openssl/man/dsa.1 stable/12/secure/usr.bin/openssl/man/dsaparam.1 stable/12/secure/usr.bin/openssl/man/ec.1 stable/12/secure/usr.bin/openssl/man/ecparam.1 stable/12/secure/usr.bin/openssl/man/enc.1 stable/12/secure/usr.bin/openssl/man/engine.1 stable/12/secure/usr.bin/openssl/man/errstr.1 stable/12/secure/usr.bin/openssl/man/gendsa.1 stable/12/secure/usr.bin/openssl/man/genpkey.1 stable/12/secure/usr.bin/openssl/man/genrsa.1 stable/12/secure/usr.bin/openssl/man/list.1 stable/12/secure/usr.bin/openssl/man/nseq.1 stable/12/secure/usr.bin/openssl/man/ocsp.1 stable/12/secure/usr.bin/openssl/man/openssl.1 stable/12/secure/usr.bin/openssl/man/passwd.1 stable/12/secure/usr.bin/openssl/man/pkcs12.1 stable/12/secure/usr.bin/openssl/man/pkcs7.1 stable/12/secure/usr.bin/openssl/man/pkcs8.1 stable/12/secure/usr.bin/openssl/man/pkey.1 stable/12/secure/usr.bin/openssl/man/pkeyparam.1 stable/12/secure/usr.bin/openssl/man/pkeyutl.1 stable/12/secure/usr.bin/openssl/man/prime.1 stable/12/secure/usr.bin/openssl/man/rand.1 stable/12/secure/usr.bin/openssl/man/req.1 stable/12/secure/usr.bin/openssl/man/rsa.1 stable/12/secure/usr.bin/openssl/man/rsautl.1 stable/12/secure/usr.bin/openssl/man/s_client.1 stable/12/secure/usr.bin/openssl/man/s_server.1 stable/12/secure/usr.bin/openssl/man/s_time.1 stable/12/secure/usr.bin/openssl/man/sess_id.1 stable/12/secure/usr.bin/openssl/man/smime.1 stable/12/secure/usr.bin/openssl/man/speed.1 stable/12/secure/usr.bin/openssl/man/spkac.1 stable/12/secure/usr.bin/openssl/man/srp.1 stable/12/secure/usr.bin/openssl/man/storeutl.1 stable/12/secure/usr.bin/openssl/man/ts.1 stable/12/secure/usr.bin/openssl/man/tsget.1 stable/12/secure/usr.bin/openssl/man/verify.1 stable/12/secure/usr.bin/openssl/man/version.1 stable/12/secure/usr.bin/openssl/man/x509.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/crypto/openssl/CHANGES ============================================================================== --- stable/12/crypto/openssl/CHANGES Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/CHANGES Fri Sep 25 21:58:43 2020 (r366176) @@ -7,6 +7,33 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1g and 1.1.1h [22 Sep 2020] + + *) Certificates with explicit curve parameters are now disallowed in + verification chains if the X509_V_FLAG_X509_STRICT flag is used. + [Tomas Mraz] + + *) The 'MinProtocol' and 'MaxProtocol' configuration commands now silently + ignore TLS protocol version bounds when configuring DTLS-based contexts, and + conversely, silently ignore DTLS protocol version bounds when configuring + TLS-based contexts. The commands can be repeated to set bounds of both + types. The same applies with the corresponding "min_protocol" and + "max_protocol" command-line switches, in case some application uses both TLS + and DTLS. + + SSL_CTX instances that are created for a fixed protocol version (e.g. + TLSv1_server_method()) also silently ignore version bounds. Previously + attempts to apply bounds to these protocol versions would result in an + error. Now only the "version-flexible" SSL_CTX instances are subject to + limits in configuration files in command-line options. + [Viktor Dukhovni] + + *) Handshake now fails if Extended Master Secret extension is dropped + on renegotiation. + [Tomas Mraz] + + *) The Oracle Developer Studio compiler will start reporting deprecated APIs + Changes between 1.1.1f and 1.1.1g [21 Apr 2020] *) Fixed segmentation fault in SSL_check_chain() Modified: stable/12/crypto/openssl/Configure ============================================================================== --- stable/12/crypto/openssl/Configure Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/Configure Fri Sep 25 21:58:43 2020 (r366176) @@ -217,12 +217,22 @@ sub resolve_config; # Unified build supports separate build dir my $srcdir = catdir(absolutedir(dirname($0))); # catdir ensures local syntax my $blddir = catdir(absolutedir(".")); # catdir ensures local syntax + +# File::Spec::Unix doesn't detect case insensitivity, so we make sure to +# check if the source and build directory are really the same, and make +# them so. This avoids all kinds of confusion later on. +# We must check @File::Spec::ISA rather than using File::Spec->isa() to +# know if File::Spec ended up loading File::Spec::Unix. +$srcdir = $blddir + if (grep(/::Unix$/, @File::Spec::ISA) + && samedir($srcdir, $blddir)); + my $dofile = abs2rel(catfile($srcdir, "util/dofile.pl")); my $local_config_envname = 'OPENSSL_LOCAL_CONFIG_DIR'; -$config{sourcedir} = abs2rel($srcdir); -$config{builddir} = abs2rel($blddir); +$config{sourcedir} = abs2rel($srcdir, $blddir); +$config{builddir} = abs2rel($blddir, $blddir); # Collect reconfiguration information if needed my @argvcopy=@ARGV; @@ -1049,6 +1059,9 @@ if (scalar(@seed_sources) == 0) { print "Using os-specific seed configuration\n"; push @seed_sources, 'os'; } +if (scalar(grep { $_ eq 'egd' } @seed_sources) > 0) { + delete $disabled{'egd'}; +} if (scalar(grep { $_ eq 'none' } @seed_sources) > 0) { die "Cannot seed with none and anything else" if scalar(@seed_sources) > 1; warn <<_____ if scalar(@seed_sources) == 1; @@ -3422,6 +3435,27 @@ sub absolutedir { use Cwd qw/realpath/; return realpath($dir); +} + +# Check if all paths are one and the same, using stat. They must both exist +# We need this for the cases when File::Spec doesn't detect case insensitivity +# (File::Spec::Unix assumes case sensitivity) +sub samedir { + die "samedir expects two arguments\n" unless scalar @_ == 2; + + my @stat0 = stat($_[0]); # First argument + my @stat1 = stat($_[1]); # Second argument + + die "Couldn't stat $_[0]" unless @stat0; + die "Couldn't stat $_[1]" unless @stat1; + + # Compare device number + return 0 unless ($stat0[0] == $stat1[0]); + # Compare "inode". The perl manual recommends comparing as + # string rather than as number. + return 0 unless ($stat0[1] eq $stat1[1]); + + return 1; # All the same } sub quotify { Modified: stable/12/crypto/openssl/NEWS ============================================================================== --- stable/12/crypto/openssl/NEWS Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/NEWS Fri Sep 25 21:58:43 2020 (r366176) @@ -5,6 +5,14 @@ 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.1.1g and OpenSSL 1.1.1h [22 Sep 2020] + + o Disallow explicit curve parameters in verifications chains when + X509_V_FLAG_X509_STRICT is used + o Enable 'MinProtocol' and 'MaxProtocol' to configure both TLS and DTLS + contexts + o Oracle Developer Studio will start reporting deprecation warnings + Major changes between OpenSSL 1.1.1f and OpenSSL 1.1.1g [21 Apr 2020] o Fixed segmentation fault in SSL_check_chain() (CVE-2020-1967) Modified: stable/12/crypto/openssl/NOTES.PERL ============================================================================== --- stable/12/crypto/openssl/NOTES.PERL Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/NOTES.PERL Fri Sep 25 21:58:43 2020 (r366176) @@ -109,7 +109,7 @@ $ cpan -f -i Text::Template - Note: on VMS, you must quote any argument that contains upper case + Note: on VMS, you must quote any argument that contains uppercase characters, so the lines above would be: $ cpan -i "Text::Template" Modified: stable/12/crypto/openssl/README ============================================================================== --- stable/12/crypto/openssl/README Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/README Fri Sep 25 21:58:43 2020 (r366176) @@ -1,5 +1,5 @@ - OpenSSL 1.1.1g 21 Apr 2020 + OpenSSL 1.1.1h 22 Sep 2020 Copyright (c) 1998-2020 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: stable/12/crypto/openssl/apps/genpkey.c ============================================================================== --- stable/12/crypto/openssl/apps/genpkey.c Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/apps/genpkey.c Fri Sep 25 21:58:43 2020 (r366176) @@ -1,5 +1,5 @@ /* - * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -177,9 +177,12 @@ int genpkey_main(int argc, char **argv) goto end; } + ret = 0; + if (rv <= 0) { BIO_puts(bio_err, "Error writing key\n"); ERR_print_errors(bio_err); + ret = 1; } if (text) { @@ -191,10 +194,9 @@ int genpkey_main(int argc, char **argv) if (rv <= 0) { BIO_puts(bio_err, "Error printing key\n"); ERR_print_errors(bio_err); + ret = 1; } } - - ret = 0; end: EVP_PKEY_free(pkey); Modified: stable/12/crypto/openssl/apps/rsa8192.pem ============================================================================== --- stable/12/crypto/openssl/apps/rsa8192.pem Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/apps/rsa8192.pem Fri Sep 25 21:58:43 2020 (r366176) @@ -1,5 +1,4 @@ -----BEGIN RSA PRIVATE KEY----- - MIISKAIBAAKCBAEAiQ2f1X6Bte1DKD0OoCBKEikzPW+5w3oXk3WwnE97Wxzy6wJZ ebbZC3CZKKBnJeBMrysPf+lK+9+fP6Vm8bp1wvbcSIA59BDrX6irFSuM/bdnkbuF MFlDjt+uVrxwoyqfPi2IPot1HQg3l5mdyBqcTWvbOnU2L9HZxJfPUCjfzdTMPrMY @@ -62,7 +61,7 @@ JH1/Qx7C/mTAMRsN5SkOthnGq0djCNWfPv/3JV0H67Uf5krFlnwLeb yO7iBUNJzv6Qh22malLp4P8gzACkD7DGlSTnoB5cLwcjmDGg+i9WrUBbOiVTeQfZ kOj1o+Tz35ndpq/DDUVlqliB9krcxva+QHeJPH53EGI+YVg1nD+s/vUDZ3mQMGX9 DQou2L8uU6RnWNv/BihGcL8QvS4Ty6QyPOUPpD3zc70JQAEcQk9BxQNaELgJX0IN -22cYn22tYvElew9G41OpDqzBRcfbdJmKXQ2HcroShutYJQRGUpAXHk24fy6JVkIU +2cYUn22tYvElew9G41OpDqzBRcfbdJmKXQ2HcroShutYJQRGUpAXHk24fy6JVkIU ojF5U6cwextMja1ZIIZgh9eugIRUeIE7319nQNDzuXWjRCcoBLA25P7wnpHWDRpz D9ovXCIvdja74lL5psqobV6L5+fbLPkSgXoImKR0LQKCAgAIC9Jk8kxumCyIVGCP PeM5Uby9M3GMuKrfYsn0Y5e97+kSJF1dpojTodBgR2KQar6eVrvXt+8uZCcIjfx8 @@ -98,4 +97,3 @@ TwEgE67iOb2iIoUpon/NyP4LesMzvdpsu2JFlfz13PmmQ34mFI7tWv rMlMLtKfp2w8HlMZpsUlToNCx6CI+tJrohzcs3BAVAbjFAXRKWGijB1rxwyDdHPv I+/wJTNaRNPQ1M0SwtEL/zJd21y3KSPn4eL+GP3efhlDSjtlDvZqkdAUsU8= -----END RSA PRIVATE KEY----- - Modified: stable/12/crypto/openssl/apps/s_client.c ============================================================================== --- stable/12/crypto/openssl/apps/s_client.c Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/apps/s_client.c Fri Sep 25 21:58:43 2020 (r366176) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * Copyright 2005 Nokia. All rights reserved. * * Licensed under the OpenSSL license (the "License"). You may not use @@ -1283,22 +1283,42 @@ int s_client_main(int argc, char **argv) case OPT_SSL3: min_version = SSL3_VERSION; max_version = SSL3_VERSION; + socket_type = SOCK_STREAM; +#ifndef OPENSSL_NO_DTLS + isdtls = 0; +#endif break; case OPT_TLS1_3: min_version = TLS1_3_VERSION; max_version = TLS1_3_VERSION; + socket_type = SOCK_STREAM; +#ifndef OPENSSL_NO_DTLS + isdtls = 0; +#endif break; case OPT_TLS1_2: min_version = TLS1_2_VERSION; max_version = TLS1_2_VERSION; + socket_type = SOCK_STREAM; +#ifndef OPENSSL_NO_DTLS + isdtls = 0; +#endif break; case OPT_TLS1_1: min_version = TLS1_1_VERSION; max_version = TLS1_1_VERSION; + socket_type = SOCK_STREAM; +#ifndef OPENSSL_NO_DTLS + isdtls = 0; +#endif break; case OPT_TLS1: min_version = TLS1_VERSION; max_version = TLS1_VERSION; + socket_type = SOCK_STREAM; +#ifndef OPENSSL_NO_DTLS + isdtls = 0; +#endif break; case OPT_DTLS: #ifndef OPENSSL_NO_DTLS Modified: stable/12/crypto/openssl/apps/x509.c ============================================================================== --- stable/12/crypto/openssl/apps/x509.c Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/apps/x509.c Fri Sep 25 21:58:43 2020 (r366176) @@ -140,9 +140,9 @@ const OPTIONS x509_options[] = { {"", OPT_MD, '-', "Any supported digest"}, #ifndef OPENSSL_NO_MD5 {"subject_hash_old", OPT_SUBJECT_HASH_OLD, '-', - "Print old-style (MD5) issuer hash value"}, - {"issuer_hash_old", OPT_ISSUER_HASH_OLD, '-', "Print old-style (MD5) subject hash value"}, + {"issuer_hash_old", OPT_ISSUER_HASH_OLD, '-', + "Print old-style (MD5) issuer hash value"}, #endif #ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, Modified: stable/12/crypto/openssl/appveyor.yml ============================================================================== --- stable/12/crypto/openssl/appveyor.yml Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/appveyor.yml Fri Sep 25 21:58:43 2020 (r366176) @@ -46,7 +46,8 @@ before_build: - cd .. - ps: >- if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER` - -or (&git log -2 | Select-String "\[extended tests\]") ) { + -or (&git log -1 $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT | + Select-String "\[extended tests\]") ) { $env:EXTENDED_TESTS="yes" } Modified: stable/12/crypto/openssl/crypto/aes/aes_core.c ============================================================================== --- stable/12/crypto/openssl/crypto/aes/aes_core.c Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/crypto/aes/aes_core.c Fri Sep 25 21:58:43 2020 (r366176) @@ -673,357 +673,6 @@ void AES_decrypt(const unsigned char *in, unsigned cha InvCipher(in, out, rk, key->rounds); } - -# ifndef OPENSSL_SMALL_FOOTPRINT -void AES_ctr32_encrypt(const unsigned char *in, unsigned char *out, - size_t blocks, const AES_KEY *key, - const unsigned char *ivec); - -static void RawToBits(const u8 raw[64], u64 bits[8]) -{ - int i, j; - u64 in, out; - - memset(bits, 0, 64); - for (i = 0; i < 8; i++) { - in = 0; - for (j = 0; j < 8; j++) - in |= ((u64)raw[i * 8 + j]) << (8 * j); - out = in & 0xF0F0F0F00F0F0F0FuLL; - out |= (in & 0x0F0F0F0F00000000uLL) >> 28; - out |= (in & 0x00000000F0F0F0F0uLL) << 28; - in = out & 0xCCCC3333CCCC3333uLL; - in |= (out & 0x3333000033330000uLL) >> 14; - in |= (out & 0x0000CCCC0000CCCCuLL) << 14; - out = in & 0xAA55AA55AA55AA55uLL; - out |= (in & 0x5500550055005500uLL) >> 7; - out |= (in & 0x00AA00AA00AA00AAuLL) << 7; - for (j = 0; j < 8; j++) { - bits[j] |= (out & 0xFFuLL) << (8 * i); - out = out >> 8; - } - } -} - -static void BitsToRaw(const u64 bits[8], u8 raw[64]) -{ - int i, j; - u64 in, out; - - for (i = 0; i < 8; i++) { - in = 0; - for (j = 0; j < 8; j++) - in |= ((bits[j] >> (8 * i)) & 0xFFuLL) << (8 * j); - out = in & 0xF0F0F0F00F0F0F0FuLL; - out |= (in & 0x0F0F0F0F00000000uLL) >> 28; - out |= (in & 0x00000000F0F0F0F0uLL) << 28; - in = out & 0xCCCC3333CCCC3333uLL; - in |= (out & 0x3333000033330000uLL) >> 14; - in |= (out & 0x0000CCCC0000CCCCuLL) << 14; - out = in & 0xAA55AA55AA55AA55uLL; - out |= (in & 0x5500550055005500uLL) >> 7; - out |= (in & 0x00AA00AA00AA00AAuLL) << 7; - for (j = 0; j < 8; j++) { - raw[i * 8 + j] = (u8)out; - out = out >> 8; - } - } -} - -static void BitsXtime(u64 state[8]) -{ - u64 b; - - b = state[7]; - state[7] = state[6]; - state[6] = state[5]; - state[5] = state[4]; - state[4] = state[3] ^ b; - state[3] = state[2] ^ b; - state[2] = state[1]; - state[1] = state[0] ^ b; - state[0] = b; -} - -/* - * This S-box implementation follows a circuit described in - * Boyar and Peralta: "A new combinational logic minimization - * technique with applications to cryptology." - * https://eprint.iacr.org/2009/191.pdf - * - * The math is similar to above, in that it uses - * a tower field of GF(2^2^2^2) but with a different - * basis representation, that is better suited to - * logic designs. - */ -static void BitsSub(u64 state[8]) -{ - u64 x0, x1, x2, x3, x4, x5, x6, x7; - u64 y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11; - u64 y12, y13, y14, y15, y16, y17, y18, y19, y20, y21; - u64 t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11; - u64 t12, t13, t14, t15, t16, t17, t18, t19, t20, t21; - u64 t22, t23, t24, t25, t26, t27, t28, t29, t30, t31; - u64 t32, t33, t34, t35, t36, t37, t38, t39, t40, t41; - u64 t42, t43, t44, t45, t46, t47, t48, t49, t50, t51; - u64 t52, t53, t54, t55, t56, t57, t58, t59, t60, t61; - u64 t62, t63, t64, t65, t66, t67; - u64 z0, z1, z2, z3, z4, z5, z6, z7, z8, z9, z10, z11; - u64 z12, z13, z14, z15, z16, z17; - u64 s0, s1, s2, s3, s4, s5, s6, s7; - - x7 = state[0]; - x6 = state[1]; - x5 = state[2]; - x4 = state[3]; - x3 = state[4]; - x2 = state[5]; - x1 = state[6]; - x0 = state[7]; - y14 = x3 ^ x5; - y13 = x0 ^ x6; - y9 = x0 ^ x3; - y8 = x0 ^ x5; - t0 = x1 ^ x2; - y1 = t0 ^ x7; - y4 = y1 ^ x3; - y12 = y13 ^ y14; - y2 = y1 ^ x0; - y5 = y1 ^ x6; - y3 = y5 ^ y8; - t1 = x4 ^ y12; - y15 = t1 ^ x5; - y20 = t1 ^ x1; - y6 = y15 ^ x7; - y10 = y15 ^ t0; - y11 = y20 ^ y9; - y7 = x7 ^ y11; - y17 = y10 ^ y11; - y19 = y10 ^ y8; - y16 = t0 ^ y11; - y21 = y13 ^ y16; - y18 = x0 ^ y16; - t2 = y12 & y15; - t3 = y3 & y6; - t4 = t3 ^ t2; - t5 = y4 & x7; - t6 = t5 ^ t2; - t7 = y13 & y16; - t8 = y5 & y1; - t9 = t8 ^ t7; - t10 = y2 & y7; - t11 = t10 ^ t7; - t12 = y9 & y11; - t13 = y14 & y17; - t14 = t13 ^ t12; - t15 = y8 & y10; - t16 = t15 ^ t12; - t17 = t4 ^ t14; - t18 = t6 ^ t16; - t19 = t9 ^ t14; - t20 = t11 ^ t16; - t21 = t17 ^ y20; - t22 = t18 ^ y19; - t23 = t19 ^ y21; - t24 = t20 ^ y18; - t25 = t21 ^ t22; - t26 = t21 & t23; - t27 = t24 ^ t26; - t28 = t25 & t27; - t29 = t28 ^ t22; - t30 = t23 ^ t24; - t31 = t22 ^ t26; - t32 = t31 & t30; - t33 = t32 ^ t24; - t34 = t23 ^ t33; - t35 = t27 ^ t33; - t36 = t24 & t35; - t37 = t36 ^ t34; - t38 = t27 ^ t36; - t39 = t29 & t38; - t40 = t25 ^ t39; - t41 = t40 ^ t37; - t42 = t29 ^ t33; - t43 = t29 ^ t40; - t44 = t33 ^ t37; - t45 = t42 ^ t41; - z0 = t44 & y15; - z1 = t37 & y6; - z2 = t33 & x7; - z3 = t43 & y16; - z4 = t40 & y1; - z5 = t29 & y7; - z6 = t42 & y11; - z7 = t45 & y17; - z8 = t41 & y10; - z9 = t44 & y12; - z10 = t37 & y3; - z11 = t33 & y4; - z12 = t43 & y13; - z13 = t40 & y5; - z14 = t29 & y2; - z15 = t42 & y9; - z16 = t45 & y14; - z17 = t41 & y8; - t46 = z15 ^ z16; - t47 = z10 ^ z11; - t48 = z5 ^ z13; - t49 = z9 ^ z10; - t50 = z2 ^ z12; - t51 = z2 ^ z5; - t52 = z7 ^ z8; - t53 = z0 ^ z3; - t54 = z6 ^ z7; - t55 = z16 ^ z17; - t56 = z12 ^ t48; - t57 = t50 ^ t53; - t58 = z4 ^ t46; - t59 = z3 ^ t54; - t60 = t46 ^ t57; - t61 = z14 ^ t57; - t62 = t52 ^ t58; - t63 = t49 ^ t58; - t64 = z4 ^ t59; - t65 = t61 ^ t62; - t66 = z1 ^ t63; - s0 = t59 ^ t63; - s6 = ~(t56 ^ t62); - s7 = ~(t48 ^ t60); - t67 = t64 ^ t65; - s3 = t53 ^ t66; - s4 = t51 ^ t66; - s5 = t47 ^ t65; - s1 = ~(t64 ^ s3); - s2 = ~(t55 ^ t67); - state[0] = s7; - state[1] = s6; - state[2] = s5; - state[3] = s4; - state[4] = s3; - state[5] = s2; - state[6] = s1; - state[7] = s0; -} - -static void BitsShiftRows(u64 state[8]) -{ - u64 s, s0; - int i; - - for (i = 0; i < 8; i++) { - s = state[i]; - s0 = s & 0x1111111111111111uLL; - s0 |= ((s & 0x2220222022202220uLL) >> 4) | ((s & 0x0002000200020002uLL) << 12); - s0 |= ((s & 0x4400440044004400uLL) >> 8) | ((s & 0x0044004400440044uLL) << 8); - s0 |= ((s & 0x8000800080008000uLL) >> 12) | ((s & 0x0888088808880888uLL) << 4); - state[i] = s0; - } -} - -static void BitsMixColumns(u64 state[8]) -{ - u64 s1, s; - u64 s0[8]; - int i; - - for (i = 0; i < 8; i++) { - s1 = state[i]; - s = s1; - s ^= ((s & 0xCCCCCCCCCCCCCCCCuLL) >> 2) | ((s & 0x3333333333333333uLL) << 2); - s ^= ((s & 0xAAAAAAAAAAAAAAAAuLL) >> 1) | ((s & 0x5555555555555555uLL) << 1); - s ^= s1; - s0[i] = s; - } - BitsXtime(state); - for (i = 0; i < 8; i++) { - s1 = state[i]; - s = s0[i]; - s ^= s1; - s ^= ((s1 & 0xEEEEEEEEEEEEEEEEuLL) >> 1) | ((s1 & 0x1111111111111111uLL) << 3); - state[i] = s; - } -} - -static void BitsAddRoundKey(u64 state[8], const u64 key[8]) -{ - int i; - - for (i = 0; i < 8; i++) - state[i] ^= key[i]; -} - -void AES_ctr32_encrypt(const unsigned char *in, unsigned char *out, - size_t blocks, const AES_KEY *key, - const unsigned char *ivec) -{ - struct { - u8 cipher[64]; - u64 state[8]; - u64 rd_key[AES_MAXNR + 1][8]; - } *bs; - u32 ctr32; - int i; - - ctr32 = GETU32(ivec + 12); - if (blocks >= 4 - && (bs = OPENSSL_malloc(sizeof(*bs)))) { - for (i = 0; i < key->rounds + 1; i++) { - memcpy(bs->cipher + 0, &key->rd_key[4 * i], 16); - memcpy(bs->cipher + 16, bs->cipher, 16); - memcpy(bs->cipher + 32, bs->cipher, 32); - RawToBits(bs->cipher, bs->rd_key[i]); - } - while (blocks) { - memcpy(bs->cipher, ivec, 12); - PUTU32(bs->cipher + 12, ctr32); - ctr32++; - memcpy(bs->cipher + 16, ivec, 12); - PUTU32(bs->cipher + 28, ctr32); - ctr32++; - memcpy(bs->cipher + 32, ivec, 12); - PUTU32(bs->cipher + 44, ctr32); - ctr32++; - memcpy(bs->cipher + 48, ivec, 12); - PUTU32(bs->cipher + 60, ctr32); - ctr32++; - RawToBits(bs->cipher, bs->state); - BitsAddRoundKey(bs->state, bs->rd_key[0]); - for (i = 1; i < key->rounds; i++) { - BitsSub(bs->state); - BitsShiftRows(bs->state); - BitsMixColumns(bs->state); - BitsAddRoundKey(bs->state, bs->rd_key[i]); - } - BitsSub(bs->state); - BitsShiftRows(bs->state); - BitsAddRoundKey(bs->state, bs->rd_key[key->rounds]); - BitsToRaw(bs->state, bs->cipher); - for (i = 0; i < 64 && blocks; i++) { - out[i] = in[i] ^ bs->cipher[i]; - if ((i & 15) == 15) - blocks--; - } - in += i; - out += i; - } - OPENSSL_clear_free(bs, sizeof(*bs)); - } else { - unsigned char cipher[16]; - - while (blocks) { - memcpy(cipher, ivec, 12); - PUTU32(cipher + 12, ctr32); - AES_encrypt(cipher, cipher, key); - for (i = 0; i < 16; i++) - out[i] = in[i] ^ cipher[i]; - in += 16; - out += 16; - ctr32++; - blocks--; - } - } -} -# endif #elif !defined(AES_ASM) /*- Te0[x] = S [x].[02, 01, 01, 03]; Modified: stable/12/crypto/openssl/crypto/aes/aes_ige.c ============================================================================== --- stable/12/crypto/openssl/crypto/aes/aes_ige.c Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/crypto/aes/aes_ige.c Fri Sep 25 21:58:43 2020 (r366176) @@ -1,5 +1,5 @@ /* - * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,16 +12,20 @@ #include #include "aes_local.h" -#define N_WORDS (AES_BLOCK_SIZE / sizeof(unsigned long)) -typedef struct { - unsigned long data[N_WORDS]; -} aes_block_t; - /* XXX: probably some better way to do this */ #if defined(__i386__) || defined(__x86_64__) # define UNALIGNED_MEMOPS_ARE_FAST 1 #else # define UNALIGNED_MEMOPS_ARE_FAST 0 +#endif + +#define N_WORDS (AES_BLOCK_SIZE / sizeof(unsigned long)) +typedef struct { + unsigned long data[N_WORDS]; +#if defined(__GNUC__) && UNALIGNED_MEMOPS_ARE_FAST +} aes_block_t __attribute((__aligned__(1))); +#else +} aes_block_t; #endif #if UNALIGNED_MEMOPS_ARE_FAST Modified: stable/12/crypto/openssl/crypto/asn1/d2i_pr.c ============================================================================== --- stable/12/crypto/openssl/crypto/asn1/d2i_pr.c Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/crypto/asn1/d2i_pr.c Fri Sep 25 21:58:43 2020 (r366176) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -56,6 +56,8 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const goto err; EVP_PKEY_free(ret); ret = tmp; + if (EVP_PKEY_type(type) != EVP_PKEY_base_id(ret)) + goto err; } else { ASN1err(ASN1_F_D2I_PRIVATEKEY, ERR_R_ASN1_LIB); goto err; Modified: stable/12/crypto/openssl/crypto/asn1/x_algor.c ============================================================================== --- stable/12/crypto/openssl/crypto/asn1/x_algor.c Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/crypto/asn1/x_algor.c Fri Sep 25 21:58:43 2020 (r366176) @@ -1,5 +1,5 @@ /* - * Copyright 1998-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1998-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -91,4 +91,36 @@ int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALG if (!a->parameter && !b->parameter) return 0; return ASN1_TYPE_cmp(a->parameter, b->parameter); +} + +int X509_ALGOR_copy(X509_ALGOR *dest, const X509_ALGOR *src) +{ + if (src == NULL || dest == NULL) + return 0; + + if (dest->algorithm) + ASN1_OBJECT_free(dest->algorithm); + dest->algorithm = NULL; + + if (dest->parameter) + ASN1_TYPE_free(dest->parameter); + dest->parameter = NULL; + + if (src->algorithm) + if ((dest->algorithm = OBJ_dup(src->algorithm)) == NULL) + return 0; + + if (src->parameter) { + dest->parameter = ASN1_TYPE_new(); + if (dest->parameter == NULL) + return 0; + + /* Assuming this is also correct for a BOOL. + * set does copy as a side effect. + */ + if (ASN1_TYPE_set1(dest->parameter, + src->parameter->type, src->parameter->value.ptr) == 0) + return 0; + } + return 1; } Modified: stable/12/crypto/openssl/crypto/bio/b_print.c ============================================================================== --- stable/12/crypto/openssl/crypto/bio/b_print.c Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/crypto/bio/b_print.c Fri Sep 25 21:58:43 2020 (r366176) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -635,7 +635,11 @@ fmtfp(char **sbuffer, fvalue = tmpvalue; } ufvalue = abs_val(fvalue); - if (ufvalue > ULONG_MAX) { + /* + * By subtracting 65535 (2^16-1) we cancel the low order 15 bits + * of ULONG_MAX to avoid using imprecise floating point values. + */ + if (ufvalue >= (double)(ULONG_MAX - 65535) + 65536.0) { /* Number too big */ return 0; } Modified: stable/12/crypto/openssl/crypto/bio/bss_acpt.c ============================================================================== --- stable/12/crypto/openssl/crypto/bio/bss_acpt.c Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/crypto/bio/bss_acpt.c Fri Sep 25 21:58:43 2020 (r366176) @@ -434,8 +434,10 @@ static long acpt_ctrl(BIO *b, int cmd, long num, void b->init = 1; } else if (num == 1) { OPENSSL_free(data->param_serv); - data->param_serv = BUF_strdup(ptr); - b->init = 1; + if ((data->param_serv = OPENSSL_strdup(ptr)) == NULL) + ret = 0; + else + b->init = 1; } else if (num == 2) { data->bind_mode |= BIO_SOCK_NONBLOCK; } else if (num == 3) { Modified: stable/12/crypto/openssl/crypto/bio/bss_conn.c ============================================================================== --- stable/12/crypto/openssl/crypto/bio/bss_conn.c Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/crypto/bio/bss_conn.c Fri Sep 25 21:58:43 2020 (r366176) @@ -186,8 +186,17 @@ static int conn_state(BIO *b, BIO_CONNECT *c) case BIO_CONN_S_BLOCKED_CONNECT: i = BIO_sock_error(b->num); - if (i) { + if (i != 0) { BIO_clear_retry_flags(b); + if ((c->addr_iter = BIO_ADDRINFO_next(c->addr_iter)) != NULL) { + /* + * if there are more addresses to try, do that first + */ + BIO_closesocket(b->num); + c->state = BIO_CONN_S_CREATE_SOCKET; + ERR_clear_error(); + break; + } SYSerr(SYS_F_CONNECT, i); ERR_add_error_data(4, "hostname=", c->param_hostname, @@ -407,12 +416,13 @@ static long conn_ctrl(BIO *b, int cmd, long num, void case BIO_C_SET_CONNECT: if (ptr != NULL) { b->init = 1; - if (num == 0) { + if (num == 0) { /* BIO_set_conn_hostname */ char *hold_service = data->param_service; /* We affect the hostname regardless. However, the input * string might contain a host:service spec, so we must * parse it, which might or might not affect the service */ + OPENSSL_free(data->param_hostname); data->param_hostname = NULL; ret = BIO_parse_hostserv(ptr, @@ -421,19 +431,29 @@ static long conn_ctrl(BIO *b, int cmd, long num, void BIO_PARSE_PRIO_HOST); if (hold_service != data->param_service) OPENSSL_free(hold_service); - } else if (num == 1) { + } else if (num == 1) { /* BIO_set_conn_port */ OPENSSL_free(data->param_service); - data->param_service = BUF_strdup(ptr); - } else if (num == 2) { + if ((data->param_service = OPENSSL_strdup(ptr)) == NULL) + ret = 0; + } else if (num == 2) { /* BIO_set_conn_address */ const BIO_ADDR *addr = (const BIO_ADDR *)ptr; + char *host = BIO_ADDR_hostname_string(addr, 1); + char *service = BIO_ADDR_service_string(addr, 1); + + ret = host != NULL && service != NULL; if (ret) { - data->param_hostname = BIO_ADDR_hostname_string(addr, 1); - data->param_service = BIO_ADDR_service_string(addr, 1); + OPENSSL_free(data->param_hostname); + data->param_hostname = host; + OPENSSL_free(data->param_service); + data->param_service = service; BIO_ADDRINFO_free(data->addr_first); data->addr_first = NULL; data->addr_iter = NULL; + } else { + OPENSSL_free(host); + OPENSSL_free(service); } - } else if (num == 3) { + } else if (num == 3) { /* BIO_set_conn_ip_family */ data->connect_family = *(int *)ptr; } else { ret = 0; Modified: stable/12/crypto/openssl/crypto/bn/bn_gcd.c ============================================================================== --- stable/12/crypto/openssl/crypto/bn/bn_gcd.c Fri Sep 25 21:19:56 2020 (r366175) +++ stable/12/crypto/openssl/crypto/bn/bn_gcd.c Fri Sep 25 21:58:43 2020 (r366176) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -10,22 +10,189 @@ #include "internal/cryptlib.h" #include "bn_local.h" -/* solves ax == 1 (mod n) */ -static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in, - const BIGNUM *a, const BIGNUM *n, - BN_CTX *ctx); - -BIGNUM *BN_mod_inverse(BIGNUM *in, - const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx) +/* + * bn_mod_inverse_no_branch is a special version of BN_mod_inverse. It does + * not contain branches that may leak sensitive information. + * + * This is a static function, we ensure all callers in this file pass valid + * arguments: all passed pointers here are non-NULL. + */ +static ossl_inline +BIGNUM *bn_mod_inverse_no_branch(BIGNUM *in, + const BIGNUM *a, const BIGNUM *n, + BN_CTX *ctx, int *pnoinv) { - BIGNUM *rv; - int noinv; - rv = int_bn_mod_inverse(in, a, n, ctx, &noinv); - if (noinv) - BNerr(BN_F_BN_MOD_INVERSE, BN_R_NO_INVERSE); - return rv; + BIGNUM *A, *B, *X, *Y, *M, *D, *T, *R = NULL; + BIGNUM *ret = NULL; + int sign; + + bn_check_top(a); + bn_check_top(n); + + BN_CTX_start(ctx); + A = BN_CTX_get(ctx); + B = BN_CTX_get(ctx); + X = BN_CTX_get(ctx); + D = BN_CTX_get(ctx); + M = BN_CTX_get(ctx); + Y = BN_CTX_get(ctx); + T = BN_CTX_get(ctx); + if (T == NULL) + goto err; + + if (in == NULL) + R = BN_new(); + else + R = in; + if (R == NULL) + goto err; + + BN_one(X); + BN_zero(Y); + if (BN_copy(B, a) == NULL) + goto err; + if (BN_copy(A, n) == NULL) + goto err; + A->neg = 0; + + if (B->neg || (BN_ucmp(B, A) >= 0)) { + /* + * Turn BN_FLG_CONSTTIME flag on, so that when BN_div is invoked, + * BN_div_no_branch will be called eventually. + */ + { + BIGNUM local_B; + bn_init(&local_B); + BN_with_flags(&local_B, B, BN_FLG_CONSTTIME); + if (!BN_nnmod(B, &local_B, A, ctx)) + goto err; + /* Ensure local_B goes out of scope before any further use of B */ + } + } + sign = -1; + /*- + * From B = a mod |n|, A = |n| it follows that + * + * 0 <= B < A, + * -sign*X*a == B (mod |n|), + * sign*Y*a == A (mod |n|). + */ + + while (!BN_is_zero(B)) { + BIGNUM *tmp; + + /*- + * 0 < B < A, + * (*) -sign*X*a == B (mod |n|), + * sign*Y*a == A (mod |n|) + */ + + /* + * Turn BN_FLG_CONSTTIME flag on, so that when BN_div is invoked, + * BN_div_no_branch will be called eventually. + */ + { + BIGNUM local_A; + bn_init(&local_A); + BN_with_flags(&local_A, A, BN_FLG_CONSTTIME); + + /* (D, M) := (A/B, A%B) ... */ + if (!BN_div(D, M, &local_A, B, ctx)) + goto err; + /* Ensure local_A goes out of scope before any further use of A */ + } + + /*- + * Now + * A = D*B + M; + * thus we have + * (**) sign*Y*a == D*B + M (mod |n|). + */ + + tmp = A; /* keep the BIGNUM object, the value does not + * matter */ + + /* (A, B) := (B, A mod B) ... */ + A = B; + B = M; + /* ... so we have 0 <= B < A again */ + + /*- + * Since the former M is now B and the former B is now A, + * (**) translates into + * sign*Y*a == D*A + B (mod |n|), + * i.e. + * sign*Y*a - D*A == B (mod |n|). + * Similarly, (*) translates into + * -sign*X*a == A (mod |n|). + * + * Thus, + * sign*Y*a + D*sign*X*a == B (mod |n|), + * i.e. + * sign*(Y + D*X)*a == B (mod |n|). + * + * So if we set (X, Y, sign) := (Y + D*X, X, -sign), we arrive back at + * -sign*X*a == B (mod |n|), + * sign*Y*a == A (mod |n|). + * Note that X and Y stay non-negative all the time. + */ + + if (!BN_mul(tmp, D, X, ctx)) + goto err; + if (!BN_add(tmp, tmp, Y)) + goto err; + + M = Y; /* keep the BIGNUM object, the value does not + * matter */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Sat Sep 26 00:40:57 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80F1B3EAC70; Sat, 26 Sep 2020 00:40:57 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByqhT2Zl8z3YFY; Sat, 26 Sep 2020 00:40:57 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22A181B9B1; Sat, 26 Sep 2020 00:40:57 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08Q0ev1D035424; Sat, 26 Sep 2020 00:40:57 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08Q0evqg035423; Sat, 26 Sep 2020 00:40:57 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <202009260040.08Q0evqg035423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sat, 26 Sep 2020 00:40:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366178 - stable/12/usr.sbin/freebsd-update X-SVN-Group: stable-12 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/12/usr.sbin/freebsd-update X-SVN-Commit-Revision: 366178 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Sep 2020 00:40:57 -0000 Author: cperciva Date: Sat Sep 26 00:40:56 2020 New Revision: 366178 URL: https://svnweb.freebsd.org/changeset/base/366178 Log: MFC r365898: Move finalize_components_config from get_params to cmd_*. This eliminates spurious emails from `freebsd-update cron` when the src component is listed in freebsd-update.conf but is not present. Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Fri Sep 25 22:43:14 2020 (r366177) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Sat Sep 26 00:40:56 2020 (r366178) @@ -3300,12 +3300,12 @@ get_params () { parse_cmdline $@ parse_conffile default_params - finalize_components_config ${COMPONENTS} } # Fetch command. Make sure that we're being called # interactively, then run fetch_check_params and fetch_run cmd_fetch () { + finalize_components_config ${COMPONENTS} if [ ! -t 0 -a $NOTTYOK -eq 0 ]; then echo -n "`basename $0` fetch should not " echo "be run non-interactively." @@ -3326,6 +3326,7 @@ cmd_cron () { sleep `jot -r 1 0 3600` TMPFILE=`mktemp /tmp/freebsd-update.XXXXXX` || exit 1 + finalize_components_config ${COMPONENTS} >> ${TMPFILE} if ! fetch_run >> ${TMPFILE} || ! grep -q "No updates needed" ${TMPFILE} || [ ${VERBOSELEVEL} = "debug" ]; then @@ -3337,6 +3338,7 @@ cmd_cron () { # Fetch files for upgrading to a new release. cmd_upgrade () { + finalize_components_config ${COMPONENTS} upgrade_check_params upgrade_run || exit 1 } @@ -3344,6 +3346,7 @@ cmd_upgrade () { # Check if there are fetched updates ready to install. # Chdir into the working directory. cmd_updatesready () { + finalize_components_config ${COMPONENTS} # Check if working directory exists (if not, no updates pending) if ! [ -e "${WORKDIR}" ]; then echo "No updates are available to install." @@ -3368,24 +3371,28 @@ cmd_updatesready () { # Install downloaded updates. cmd_install () { + finalize_components_config ${COMPONENTS} install_check_params install_run || exit 1 } # Rollback most recently installed updates. cmd_rollback () { + finalize_components_config ${COMPONENTS} rollback_check_params rollback_run || exit 1 } # Compare system against a "known good" index. cmd_IDS () { + finalize_components_config ${COMPONENTS} IDS_check_params IDS_run || exit 1 } # Output configuration. cmd_showconfig () { + finalize_components_config ${COMPONENTS} for X in ${CONFIGOPTIONS}; do echo $X=$(eval echo \$${X}) done From owner-svn-src-stable-12@freebsd.org Sat Sep 26 00:58:28 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7ECF33EB482; Sat, 26 Sep 2020 00:58:28 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Byr4h2pxgz3ZGk; Sat, 26 Sep 2020 00:58:28 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43DBB1BDBE; Sat, 26 Sep 2020 00:58:28 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08Q0wSOh046839; Sat, 26 Sep 2020 00:58:28 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08Q0wRQK046837; Sat, 26 Sep 2020 00:58:27 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <202009260058.08Q0wRQK046837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sat, 26 Sep 2020 00:58:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366179 - in stable/12/sys: cam cam/nvme dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: in stable/12/sys: cam cam/nvme dev/nvme X-SVN-Commit-Revision: 366179 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Sep 2020 00:58:28 -0000 Author: cperciva Date: Sat Sep 26 00:58:27 2020 New Revision: 366179 URL: https://svnweb.freebsd.org/changeset/base/366179 Log: MFC r360483,360484: Make nvmecontrol work with nda like it does with nvd, and associated bits. This commit changes the size of 'struct ccb_pathinq_settings_nvme', which would normally risk breaking kernel ABI; however, that structure is only ever used as part of a union with larger structures -- so nothing really changes size. r360483: Return the nvmeX device associated with the ndaX device. Add the nvmeX device to the XPT_PATH_INQ nvme specific information. while one could figure this out by looking up the domain:bus:slot:function, it's a lot easier to have the SIM set it directly since the sim knows this. r360484: Implement the NVME_GET_NSID and NVME_PASSTHROUGH_CMD ioctls With these two ioctls implemented in the nda driver, nvmecontrol now works with nda just like it does with nvd. It eliminates the need to jump through odd hoops to get this data. Discussed with: imp Modified: stable/12/sys/cam/cam_ccb.h stable/12/sys/cam/nvme/nvme_da.c stable/12/sys/dev/nvme/nvme_sim.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/cam_ccb.h ============================================================================== --- stable/12/sys/cam/cam_ccb.h Sat Sep 26 00:40:56 2020 (r366178) +++ stable/12/sys/cam/cam_ccb.h Sat Sep 26 00:58:27 2020 (r366179) @@ -630,6 +630,7 @@ struct ccb_pathinq_settings_sas { u_int32_t bitrate; /* Mbps */ }; +#define NVME_DEV_NAME_LEN 52 struct ccb_pathinq_settings_nvme { uint32_t nsid; /* Namespace ID for this path */ uint32_t domain; @@ -637,7 +638,10 @@ struct ccb_pathinq_settings_nvme { uint8_t slot; uint8_t function; uint8_t extra; + char dev_name[NVME_DEV_NAME_LEN]; /* nvme controller dev name for this device */ }; +_Static_assert(sizeof(struct ccb_pathinq_settings_nvme) == 64, + "ccb_pathinq_settings_nvme too big"); #define PATHINQ_SETTINGS_SIZE 128 @@ -1030,6 +1034,7 @@ struct ccb_trans_settings_nvme uint8_t speed; /* PCIe generation for each lane */ uint8_t max_lanes; /* Number of PCIe lanes */ uint8_t max_speed; /* PCIe generation for each lane */ + }; #include Modified: stable/12/sys/cam/nvme/nvme_da.c ============================================================================== --- stable/12/sys/cam/nvme/nvme_da.c Sat Sep 26 00:40:56 2020 (r366178) +++ stable/12/sys/cam/nvme/nvme_da.c Sat Sep 26 00:58:27 2020 (r366179) @@ -88,6 +88,7 @@ typedef enum { NDA_CCB_BUFFER_IO = 0x01, NDA_CCB_DUMP = 0x02, NDA_CCB_TRIM = 0x03, + NDA_CCB_PASS = 0x04, NDA_CCB_TYPE_MASK = 0x0F, } nda_ccb_state; @@ -136,6 +137,7 @@ struct nda_trim_request { /* Need quirk table */ +static disk_ioctl_t ndaioctl; static disk_strategy_t ndastrategy; static dumper_t ndadump; static periph_init_t ndainit; @@ -354,6 +356,91 @@ ndaschedule(struct cam_periph *periph) cam_iosched_schedule(softc->cam_iosched, periph); } +static int +ndaioctl(struct disk *dp, u_long cmd, void *data, int fflag, + struct thread *td) +{ + struct cam_periph *periph; + struct nda_softc *softc; + + periph = (struct cam_periph *)dp->d_drv1; + softc = (struct nda_softc *)periph->softc; + + switch (cmd) { + case NVME_IO_TEST: + case NVME_BIO_TEST: + /* + * These don't map well to the underlying CCBs, so + * they are usupported via CAM. + */ + return (ENOTTY); + case NVME_GET_NSID: + { + struct nvme_get_nsid *gnsid = (struct nvme_get_nsid *)data; + struct ccb_pathinq cpi; + + xpt_path_inq(&cpi, periph->path); + strncpy(gnsid->cdev, cpi.xport_specific.nvme.dev_name, + sizeof(gnsid->cdev)); + gnsid->nsid = cpi.xport_specific.nvme.nsid; + return (0); + } + case NVME_PASSTHROUGH_CMD: + { + struct nvme_pt_command *pt; + union ccb *ccb; + struct cam_periph_map_info mapinfo; + u_int maxmap = MAXPHYS; /* XXX is this right */ + int error; + + /* + * Create a NVME_IO CCB to do the passthrough command. + */ + pt = (struct nvme_pt_command *)data; + ccb = xpt_alloc_ccb(); + xpt_setup_ccb(&ccb->ccb_h, periph->path, CAM_PRIORITY_NORMAL); + ccb->ccb_state = NDA_CCB_PASS; + cam_fill_nvmeio(&ccb->nvmeio, + 0, /* Retries */ + ndadone, + (pt->is_read ? CAM_DIR_IN : CAM_DIR_OUT) | CAM_DATA_VADDR, + pt->buf, + pt->len, + nda_default_timeout * 1000); + memcpy(&ccb->nvmeio.cmd, &pt->cmd, sizeof(pt->cmd)); + + /* + * Wire the user memory in this request for the I/O + */ + memset(&mapinfo, 0, sizeof(mapinfo)); + error = cam_periph_mapmem(ccb, &mapinfo, maxmap); + if (error) + return (error); + + /* + * Lock the periph and run the command. XXX do we need + * to lock the periph? + */ + cam_periph_lock(periph); + cam_periph_runccb(ccb, NULL, CAM_RETRY_SELTO, SF_RETRY_UA | SF_NO_PRINT, + NULL); + cam_periph_unlock(periph); + + /* + * Tear down mapping and return status. + */ + cam_periph_unmapmem(ccb, &mapinfo); + cam_periph_lock(periph); + error = (ccb->ccb_h.status == CAM_REQ_CMP) ? 0 : EIO; + xpt_release_ccb(ccb); + return (error); + } + default: + break; + } + return (ENOTTY); +} + /* * Actually translate the requested transfer into one the physical driver * can understand. The transfer is described by a buf and will include @@ -735,11 +822,8 @@ ndaregister(struct cam_periph *periph, void *arg) /* ident_data parsing */ periph->softc = softc; - softc->quirks = NDA_Q_NONE; - xpt_path_inq(&cpi, periph->path); - TASK_INIT(&softc->sysctl_task, 0, ndasysctlinit, periph); /* @@ -763,6 +847,7 @@ ndaregister(struct cam_periph *periph, void *arg) disk->d_open = ndaopen; disk->d_close = ndaclose; disk->d_strategy = ndastrategy; + disk->d_ioctl = ndaioctl; disk->d_getattr = ndagetattr; disk->d_dump = ndadump; disk->d_gone = ndadiskgonecb; @@ -1108,6 +1193,8 @@ ndadone(struct cam_periph *periph, union ccb *done_ccb } case NDA_CCB_DUMP: /* No-op. We're polling */ + return; + case NDA_CCB_PASS: return; default: break; Modified: stable/12/sys/dev/nvme/nvme_sim.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_sim.c Sat Sep 26 00:40:56 2020 (r366178) +++ stable/12/sys/dev/nvme/nvme_sim.c Sat Sep 26 00:58:27 2020 (r366179) @@ -197,6 +197,8 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb) cpi->xport_specific.nvme.slot = pci_get_slot(dev); cpi->xport_specific.nvme.function = pci_get_function(dev); cpi->xport_specific.nvme.extra = 0; + strncpy(cpi->xport_specific.nvme.dev_name, device_get_nameunit(ctrlr->dev), + sizeof(cpi->xport_specific.nvme.dev_name)); cpi->ccb_h.status = CAM_REQ_CMP; break; } From owner-svn-src-stable-12@freebsd.org Sat Sep 26 02:50:29 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9A80D3F0FF1; Sat, 26 Sep 2020 02:50:29 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BytYx3g8Sz40CT; Sat, 26 Sep 2020 02:50:29 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 485AD1D783; Sat, 26 Sep 2020 02:50:29 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08Q2oTZZ014763; Sat, 26 Sep 2020 02:50:29 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08Q2oTSM014762; Sat, 26 Sep 2020 02:50:29 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202009260250.08Q2oTSM014762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 26 Sep 2020 02:50:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366180 - stable/12/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/12/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Commit-Revision: 366180 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Sep 2020 02:50:29 -0000 Author: asomers Date: Sat Sep 26 02:50:28 2020 New Revision: 366180 URL: https://svnweb.freebsd.org/changeset/base/366180 Log: zfs: Fix resuming receive stream to dataset with mounted clone My fix for bug 248606 (zfs receive: Input/output error accessing dataset after resuming interrupted receive), r364412, introduced a regression: attempting to resume a receive into a dataset with a mounted clone would fail if that clone were in-use. This change reverts r364412 and fixes it in a better way. Background: When ZFS receives a stream, it may decide to unmount and remount the destination and all of its children. However, ever since resumable send/receive was implemented, ZFS has skipped the unmount/remount step when resuming a stream. I don't know why. That let to bug 248606. When resuming the stream, ZFS didn't unmount and remount the destination, leaving a destroyed dataset mounted. My original fix was to always unmount and remount when resuming a receive, but that caused other problems, like bug 249579. A better solution is to unmount and remount when resuming a receive of a stream that would've unmounted and remounted when it was new. Direct commit to stable/12 because head has moved to OpenZFS. The bug exists there, too, but a change to the OpenZFS code can't be merged to the old ZFS code. PR: 249579 Reviewed by: mmacy MFC after: 1 week Sponsored by: Axcient Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Sat Sep 26 00:58:27 2020 (r366179) +++ stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Sat Sep 26 02:50:28 2020 (r366180) @@ -3301,7 +3301,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const boolean_t resuming = DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo) & DMU_BACKUP_FEATURE_RESUMING; stream_wantsnewfs = (drrb->drr_fromguid == 0 || - (drrb->drr_flags & DRR_FLAG_CLONE) || originsnap) && !resuming; + (drrb->drr_flags & DRR_FLAG_CLONE) || originsnap); if (stream_wantsnewfs) { /* @@ -3433,7 +3433,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const } if (!flags->dryrun && zhp->zfs_type == ZFS_TYPE_FILESYSTEM && - (stream_wantsnewfs || resuming)) { + stream_wantsnewfs) { /* We can't do online recv in this case */ clp = changelist_gather(zhp, ZFS_PROP_NAME, 0, 0); if (clp == NULL) { From owner-svn-src-stable-12@freebsd.org Sat Sep 26 08:44:17 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 18AE43F7E45; Sat, 26 Sep 2020 08:44:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bz2Q86y6mz4KCr; Sat, 26 Sep 2020 08:44:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D275C21896; Sat, 26 Sep 2020 08:44:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08Q8iGL4043064; Sat, 26 Sep 2020 08:44:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08Q8iGgF043063; Sat, 26 Sep 2020 08:44:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202009260844.08Q8iGgF043063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 26 Sep 2020 08:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366182 - stable/12/sys/dev/usb/controller X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/usb/controller X-SVN-Commit-Revision: 366182 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Sep 2020 08:44:17 -0000 Author: hselasky Date: Sat Sep 26 08:44:16 2020 New Revision: 366182 URL: https://svnweb.freebsd.org/changeset/base/366182 Log: MFC r365918: Fix for use of the XHCI driver on Cortex-A72 by adding a missing cache flush operation before writing to the XHCI_ERSTBA_LO/HI register(s). PR: 237666 Discussed with: Mark Millard Sponsored by: Mellanox Technologies // Nvidia Modified: stable/12/sys/dev/usb/controller/xhci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/12/sys/dev/usb/controller/xhci.c Sat Sep 26 04:06:16 2020 (r366181) +++ stable/12/sys/dev/usb/controller/xhci.c Sat Sep 26 08:44:16 2020 (r366182) @@ -431,6 +431,19 @@ xhci_start_controller(struct xhci_softc *sc) phwr->hwr_ring_seg[0].qwEvrsTablePtr = htole64(addr); phwr->hwr_ring_seg[0].dwEvrsTableSize = htole32(XHCI_MAX_EVENTS); + /* + * PR 237666: + * + * According to the XHCI specification, the XWRITE4's to + * XHCI_ERSTBA_LO and _HI lead to the XHCI to copy the + * qwEvrsTablePtr and dwEvrsTableSize values above at that + * time, as the XHCI initializes its event ring support. This + * is before the event ring starts to pay attention to the + * RUN/STOP bit. Thus, make sure the values are observable to + * the XHCI before that point. + */ + usb_bus_mem_flush_all(&sc->sc_bus, &xhci_iterate_hw_softc); + DPRINTF("ERDP(0)=0x%016llx\n", (unsigned long long)addr); XWRITE4(sc, runt, XHCI_ERDP_LO(0), (uint32_t)addr); From owner-svn-src-stable-12@freebsd.org Sat Sep 26 14:43:54 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0EFD44213C3; Sat, 26 Sep 2020 14:43:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzBP56dTgz4gGC; Sat, 26 Sep 2020 14:43:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD60725B11; Sat, 26 Sep 2020 14:43:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08QEhrri070345; Sat, 26 Sep 2020 14:43:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08QEhrBk070344; Sat, 26 Sep 2020 14:43:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202009261443.08QEhrBk070344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 26 Sep 2020 14:43:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366184 - stable/12 X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/12 X-SVN-Commit-Revision: 366184 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Sep 2020 14:43:54 -0000 Author: gjb Date: Sat Sep 26 14:43:53 2020 New Revision: 366184 URL: https://svnweb.freebsd.org/changeset/base/366184 Log: Revert r366166, which records svn:mergeinfo for the wrong revision in question. Pointyhat: gjb (myself) Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: Directory Properties: stable/12/ (props changed) From owner-svn-src-stable-12@freebsd.org Sat Sep 26 14:44:59 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 55D2B4213CF; Sat, 26 Sep 2020 14:44:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzBQM0g5Bz4g0m; Sat, 26 Sep 2020 14:44:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D420625755; Sat, 26 Sep 2020 14:44:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08QEiwWd070467; Sat, 26 Sep 2020 14:44:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08QEiwAO070466; Sat, 26 Sep 2020 14:44:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202009261444.08QEiwAO070466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 26 Sep 2020 14:44:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366185 - stable/12 X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/12 X-SVN-Commit-Revision: 366185 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Sep 2020 14:44:59 -0000 Author: gjb Date: Sat Sep 26 14:44:58 2020 New Revision: 366185 URL: https://svnweb.freebsd.org/changeset/base/366185 Log: Record svn:mergeinfo for r365992. Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: Directory Properties: stable/12/ (props changed)