From owner-svn-src-stable-12@freebsd.org Mon Mar 16 11:38: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 7C6D52636C4; Mon, 16 Mar 2020 11:38:27 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48gvSg1C14z42Hb; Mon, 16 Mar 2020 11:38:27 +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 F1D441FDE6; Mon, 16 Mar 2020 11:38:26 +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 02GBcQOW034925; Mon, 16 Mar 2020 11:38:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02GBcQkm034924; Mon, 16 Mar 2020 11:38:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003161138.02GBcQkm034924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 16 Mar 2020 11:38:26 +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: r359011 - 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: 359011 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.29 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, 16 Mar 2020 11:38:27 -0000 Author: kib Date: Mon Mar 16 11:38:26 2020 New Revision: 359011 URL: https://svnweb.freebsd.org/changeset/base/359011 Log: MFC r358816: Style. Modified: stable/12/sys/kern/sys_pipe.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/sys_pipe.c ============================================================================== --- stable/12/sys/kern/sys_pipe.c Mon Mar 16 08:44:46 2020 (r359010) +++ stable/12/sys/kern/sys_pipe.c Mon Mar 16 11:38:26 2020 (r359011) @@ -509,8 +509,8 @@ retry: error = vm_map_find(pipe_map, NULL, 0, (vm_offset_t *)&buffer, size, 0, VMFS_ANY_SPACE, VM_PROT_RW, VM_PROT_RW, 0); if (error != KERN_SUCCESS) { - if ((cpipe->pipe_buffer.buffer == NULL) && - (size > SMALL_PIPE_SIZE)) { + if (cpipe->pipe_buffer.buffer == NULL && + size > SMALL_PIPE_SIZE) { size = SMALL_PIPE_SIZE; pipefragretry++; goto retry; @@ -557,7 +557,7 @@ pipespace(struct pipe *cpipe, int size) { KASSERT(cpipe->pipe_state & PIPE_LOCKFL, - ("Unlocked pipe passed to pipespace")); + ("Unlocked pipe passed to pipespace")); return (pipespace_new(cpipe, size)); } @@ -662,10 +662,10 @@ pipe_read(struct file *fp, struct uio *uio, struct ucr goto locked_error; #endif if (amountpipekva > (3 * maxpipekva) / 4) { - if (!(rpipe->pipe_state & PIPE_DIRECTW) && - (rpipe->pipe_buffer.size > SMALL_PIPE_SIZE) && - (rpipe->pipe_buffer.cnt <= SMALL_PIPE_SIZE) && - (piperesizeallowed == 1)) { + if ((rpipe->pipe_state & PIPE_DIRECTW) == 0 && + rpipe->pipe_buffer.size > SMALL_PIPE_SIZE && + rpipe->pipe_buffer.cnt <= SMALL_PIPE_SIZE && + piperesizeallowed == 1) { PIPE_UNLOCK(rpipe); pipespace(rpipe, SMALL_PIPE_SIZE); PIPE_LOCK(rpipe); @@ -1013,10 +1013,9 @@ static int pipe_write(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td) { - int error = 0; - int desiredsize; - ssize_t orig_resid; struct pipe *wpipe, *rpipe; + ssize_t orig_resid; + int desiredsize, error; rpipe = fp->f_data; wpipe = PIPE_PEER(rpipe); @@ -1058,15 +1057,15 @@ pipe_write(struct file *fp, struct uio *uio, struct uc } /* Choose a smaller size if we're in a OOM situation */ - if ((amountpipekva > (3 * maxpipekva) / 4) && - (wpipe->pipe_buffer.size > SMALL_PIPE_SIZE) && - (wpipe->pipe_buffer.cnt <= SMALL_PIPE_SIZE) && - (piperesizeallowed == 1)) + if (amountpipekva > (3 * maxpipekva) / 4 && + wpipe->pipe_buffer.size > SMALL_PIPE_SIZE && + wpipe->pipe_buffer.cnt <= SMALL_PIPE_SIZE && + piperesizeallowed == 1) desiredsize = SMALL_PIPE_SIZE; /* Resize if the above determined that a new size was necessary */ - if ((desiredsize != wpipe->pipe_buffer.size) && - ((wpipe->pipe_state & PIPE_DIRECTW) == 0)) { + if (desiredsize != wpipe->pipe_buffer.size && + (wpipe->pipe_state & PIPE_DIRECTW) == 0) { PIPE_UNLOCK(wpipe); pipespace(wpipe, desiredsize); PIPE_LOCK(wpipe); From owner-svn-src-stable-12@freebsd.org Mon Mar 16 11:41: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 A15A72637D2; Mon, 16 Mar 2020 11:41: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48gvWc1tG4z48BC; Mon, 16 Mar 2020 11:41: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 07D5B1FE16; Mon, 16 Mar 2020 11:41: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 02GBexdw035127; Mon, 16 Mar 2020 11:40:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02GBexlw035124; Mon, 16 Mar 2020 11:40:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003161140.02GBexlw035124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 16 Mar 2020 11:40: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: r359012 - in stable/12/sys: fs/fifofs kern sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: fs/fifofs kern sys X-SVN-Commit-Revision: 359012 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.29 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, 16 Mar 2020 11:41:00 -0000 Author: kib Date: Mon Mar 16 11:40:59 2020 New Revision: 359012 URL: https://svnweb.freebsd.org/changeset/base/359012 Log: MFC r358825: Preallocate pipe buffers on pipe creation. Modified: stable/12/sys/fs/fifofs/fifo_vnops.c stable/12/sys/kern/sys_pipe.c stable/12/sys/sys/pipe.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/fifofs/fifo_vnops.c ============================================================================== --- stable/12/sys/fs/fifofs/fifo_vnops.c Mon Mar 16 11:38:26 2020 (r359011) +++ stable/12/sys/fs/fifofs/fifo_vnops.c Mon Mar 16 11:40:59 2020 (r359012) @@ -150,7 +150,9 @@ fifo_open(ap) if (fp == NULL || (ap->a_mode & FEXEC) != 0) return (EINVAL); if ((fip = vp->v_fifoinfo) == NULL) { - pipe_named_ctor(&fpipe, td); + error = pipe_named_ctor(&fpipe, td); + if (error != 0) + return (error); fip = malloc(sizeof(*fip), M_VNODE, M_WAITOK); fip->fi_pipe = fpipe; fpipe->pipe_wgen = fip->fi_readers = fip->fi_writers = 0; Modified: stable/12/sys/kern/sys_pipe.c ============================================================================== --- stable/12/sys/kern/sys_pipe.c Mon Mar 16 11:38:26 2020 (r359011) +++ stable/12/sys/kern/sys_pipe.c Mon Mar 16 11:40:59 2020 (r359012) @@ -226,8 +226,8 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, piperesizeallowed, CTL static void pipeinit(void *dummy __unused); static void pipeclose(struct pipe *cpipe); static void pipe_free_kmem(struct pipe *cpipe); -static void pipe_create(struct pipe *pipe, int backing); -static void pipe_paircreate(struct thread *td, struct pipepair **p_pp); +static int pipe_create(struct pipe *pipe, bool backing); +static int pipe_paircreate(struct thread *td, struct pipepair **p_pp); static __inline int pipelock(struct pipe *cpipe, int catch); static __inline void pipeunlock(struct pipe *cpipe); #ifndef PIPE_NODIRECT @@ -335,11 +335,12 @@ pipe_zone_fini(void *mem, int size) mtx_destroy(&pp->pp_mtx); } -static void +static int pipe_paircreate(struct thread *td, struct pipepair **p_pp) { struct pipepair *pp; struct pipe *rpipe, *wpipe; + int error; *p_pp = pp = uma_zalloc(pipe_zone, M_WAITOK); #ifdef MAC @@ -357,22 +358,44 @@ pipe_paircreate(struct thread *td, struct pipepair **p knlist_init_mtx(&rpipe->pipe_sel.si_note, PIPE_MTX(rpipe)); knlist_init_mtx(&wpipe->pipe_sel.si_note, PIPE_MTX(wpipe)); - /* Only the forward direction pipe is backed by default */ - pipe_create(rpipe, 1); - pipe_create(wpipe, 0); + /* + * Only the forward direction pipe is backed by big buffer by + * default. + */ + error = pipe_create(rpipe, true); + if (error != 0) + goto fail; + error = pipe_create(wpipe, false); + if (error != 0) { + pipe_free_kmem(rpipe); + goto fail; + } rpipe->pipe_state |= PIPE_DIRECTOK; wpipe->pipe_state |= PIPE_DIRECTOK; + return (0); + +fail: + knlist_destroy(&rpipe->pipe_sel.si_note); + knlist_destroy(&wpipe->pipe_sel.si_note); +#ifdef MAC + mac_pipe_destroy(pp); +#endif + return (error); } -void +int pipe_named_ctor(struct pipe **ppipe, struct thread *td) { struct pipepair *pp; + int error; - pipe_paircreate(td, &pp); + error = pipe_paircreate(td, &pp); + if (error != 0) + return (error); pp->pp_rpipe.pipe_state |= PIPE_NAMED; *ppipe = &pp->pp_rpipe; + return (0); } void @@ -404,7 +427,9 @@ kern_pipe(struct thread *td, int fildes[2], int flags, struct pipepair *pp; int fd, fflags, error; - pipe_paircreate(td, &pp); + error = pipe_paircreate(td, &pp); + if (error != 0) + return (error); rpipe = &pp->pp_rpipe; wpipe = &pp->pp_wpipe; error = falloc_caps(td, &rf, &fd, flags, fcaps1); @@ -618,25 +643,16 @@ pipeselwakeup(struct pipe *cpipe) * Initialize and allocate VM and memory for pipe. The structure * will start out zero'd from the ctor, so we just manage the kmem. */ -static void -pipe_create(struct pipe *pipe, int backing) +static int +pipe_create(struct pipe *pipe, bool large_backing) { + int error; - if (backing) { - /* - * Note that these functions can fail if pipe map is exhausted - * (as a result of too many pipes created), but we ignore the - * error as it is not fatal and could be provoked by - * unprivileged users. The only consequence is worse performance - * with given pipe. - */ - if (amountpipekva > maxpipekva / 2) - (void)pipespace_new(pipe, SMALL_PIPE_SIZE); - else - (void)pipespace_new(pipe, PIPE_SIZE); - } - - pipe->pipe_ino = alloc_unr64(&pipeino_unr); + error = pipespace_new(pipe, !large_backing || amountpipekva > + maxpipekva / 2 ? SMALL_PIPE_SIZE : PIPE_SIZE); + if (error == 0) + pipe->pipe_ino = alloc_unr64(&pipeino_unr); + return (error); } /* ARGSUSED */ @@ -1070,17 +1086,7 @@ pipe_write(struct file *fp, struct uio *uio, struct uc pipespace(wpipe, desiredsize); PIPE_LOCK(wpipe); } - if (wpipe->pipe_buffer.size == 0) { - /* - * This can only happen for reverse direction use of pipes - * in a complete OOM situation. - */ - error = ENOMEM; - --wpipe->pipe_busy; - pipeunlock(wpipe); - PIPE_UNLOCK(wpipe); - return (error); - } + MPASS(wpipe->pipe_buffer.size != 0); pipeunlock(wpipe); Modified: stable/12/sys/sys/pipe.h ============================================================================== --- stable/12/sys/sys/pipe.h Mon Mar 16 11:38:26 2020 (r359011) +++ stable/12/sys/sys/pipe.h Mon Mar 16 11:40:59 2020 (r359012) @@ -142,6 +142,6 @@ struct pipepair { #define PIPE_LOCK_ASSERT(pipe, type) mtx_assert(PIPE_MTX(pipe), (type)) void pipe_dtor(struct pipe *dpipe); -void pipe_named_ctor(struct pipe **ppipe, struct thread *td); +int pipe_named_ctor(struct pipe **ppipe, struct thread *td); void pipeselwakeup(struct pipe *cpipe); #endif /* !_SYS_PIPE_H_ */ From owner-svn-src-stable-12@freebsd.org Mon Mar 16 11:42: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 931F326398F; Mon, 16 Mar 2020 11:42: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48gvXr3K0Wz4Bv8; Mon, 16 Mar 2020 11:42: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 5760F1FE72; Mon, 16 Mar 2020 11:42: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 02GBg4t7040466; Mon, 16 Mar 2020 11:42:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02GBg4ol040465; Mon, 16 Mar 2020 11:42:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003161142.02GBg4ol040465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 16 Mar 2020 11:42: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: r359013 - 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: 359013 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.29 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, 16 Mar 2020 11:42:04 -0000 Author: kib Date: Mon Mar 16 11:42:03 2020 New Revision: 359013 URL: https://svnweb.freebsd.org/changeset/base/359013 Log: MFC r358827: pipe: explain why not deallocating inode number is fine. Modified: stable/12/sys/kern/sys_pipe.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/sys_pipe.c ============================================================================== --- stable/12/sys/kern/sys_pipe.c Mon Mar 16 11:40:59 2020 (r359012) +++ stable/12/sys/kern/sys_pipe.c Mon Mar 16 11:42:03 2020 (r359013) @@ -367,6 +367,15 @@ pipe_paircreate(struct thread *td, struct pipepair **p goto fail; error = pipe_create(wpipe, false); if (error != 0) { + /* + * This cleanup leaves the pipe inode number for rpipe + * still allocated, but never used. We do not free + * inode numbers for opened pipes, which is required + * for correctness because numbers must be unique. + * But also it avoids any memory use by the unr + * allocator, so stashing away the transient inode + * number is reasonable. + */ pipe_free_kmem(rpipe); goto fail; } From owner-svn-src-stable-12@freebsd.org Mon Mar 16 19:33: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 B525B26D8D3; Mon, 16 Mar 2020 19:33:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48h61C3CWMz422w; Mon, 16 Mar 2020 19:33:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DCA8E256B1; Mon, 16 Mar 2020 19:33:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02GJXoPZ020714; Mon, 16 Mar 2020 19:33:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02GJXoe1020713; Mon, 16 Mar 2020 19:33:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003161933.02GJXoe1020713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 16 Mar 2020 19:33: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: r359019 - stable/12/sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/sys X-SVN-Commit-Revision: 359019 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.29 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, 16 Mar 2020 19:33:51 -0000 Author: emaste Date: Mon Mar 16 19:33:50 2020 New Revision: 359019 URL: https://svnweb.freebsd.org/changeset/base/359019 Log: elf_common.h: sync ELF feature control note bits with HEAD Modified: stable/12/sys/sys/elf_common.h Modified: stable/12/sys/sys/elf_common.h ============================================================================== --- stable/12/sys/sys/elf_common.h Mon Mar 16 19:03:10 2020 (r359018) +++ stable/12/sys/sys/elf_common.h Mon Mar 16 19:33:50 2020 (r359019) @@ -786,7 +786,9 @@ typedef struct { /* NT_FREEBSD_FEATURE_CTL desc[0] bits */ #define NT_FREEBSD_FCTL_ASLR_DISABLE 0x00000001 +#define NT_FREEBSD_FCTL_PROTMAX_DISABLE 0x00000002 #define NT_FREEBSD_FCTL_STKGAP_DISABLE 0x00000004 +#define NT_FREEBSD_FCTL_WXNEEDED 0x00000008 /* Values for n_type. Used in core files. */ #define NT_PRSTATUS 1 /* Process status. */ From owner-svn-src-stable-12@freebsd.org Mon Mar 16 21:12: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 406D526FB69; Mon, 16 Mar 2020 21:12:47 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48h8CL6d60z3KvK; Mon, 16 Mar 2020 21:12:46 +0000 (UTC) (envelope-from bz@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 B215F26918; Mon, 16 Mar 2020 21:12:46 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02GLCkaT080603; Mon, 16 Mar 2020 21:12:46 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02GLCkEO080602; Mon, 16 Mar 2020 21:12:46 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003162112.02GLCkEO080602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 16 Mar 2020 21:12:46 +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: r359021 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 359021 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.29 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, 16 Mar 2020 21:12:47 -0000 Author: bz Date: Mon Mar 16 21:12:46 2020 New Revision: 359021 URL: https://svnweb.freebsd.org/changeset/base/359021 Log: MFC r358992: kern_jail: missing \0 termination check on osrelease parameter If a user spplies a non-\0 terminated osrelease parameter reading it back may disclose kernel memory. This is a problem in case of nested jails (children.max > 0, which is not the default). Otherwise root outside the jail has access to kernel memory by other means and root inside a jail cannot create a child jail. Add the proper \0 check at the end of a supplied osrelease parameter and make sure any copies of the field will be \0-terminated. Submitted by: Hans Christian Woithe (chwoithe yahoo.com) Modified: stable/12/sys/kern/kern_jail.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_jail.c ============================================================================== --- stable/12/sys/kern/kern_jail.c Mon Mar 16 21:12:32 2020 (r359020) +++ stable/12/sys/kern/kern_jail.c Mon Mar 16 21:12:46 2020 (r359021) @@ -862,8 +862,12 @@ kern_jail_set(struct thread *td, struct uio *optuio, i "osrelease cannot be changed after creation"); goto done_errmsg; } - if (len == 0 || len >= OSRELEASELEN) { + if (len == 0 || osrelstr[len - 1] != '\0') { error = EINVAL; + goto done_free; + } + if (len >= OSRELEASELEN) { + error = ENAMETOOLONG; vfs_opterror(opts, "osrelease string must be 1-%d bytes long", OSRELEASELEN - 1); @@ -1253,9 +1257,11 @@ kern_jail_set(struct thread *td, struct uio *optuio, i pr->pr_osreldate = osreldt ? osreldt : ppr->pr_osreldate; if (osrelstr == NULL) - strcpy(pr->pr_osrelease, ppr->pr_osrelease); + strlcpy(pr->pr_osrelease, ppr->pr_osrelease, + sizeof(pr->pr_osrelease)); else - strcpy(pr->pr_osrelease, osrelstr); + strlcpy(pr->pr_osrelease, osrelstr, + sizeof(pr->pr_osrelease)); LIST_INIT(&pr->pr_children); mtx_init(&pr->pr_mtx, "jail mutex", NULL, MTX_DEF | MTX_DUPOK); From owner-svn-src-stable-12@freebsd.org Mon Mar 16 23:09:26 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 A016C273169; Mon, 16 Mar 2020 23:09:26 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48hBny32tXz4DLD; Mon, 16 Mar 2020 23:09:26 +0000 (UTC) (envelope-from brooks@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 4972A27D7B; Mon, 16 Mar 2020 23:09:26 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02GN9QoW046997; Mon, 16 Mar 2020 23:09:26 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02GN9POr046995; Mon, 16 Mar 2020 23:09:25 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003162309.02GN9POr046995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 16 Mar 2020 23:09:25 +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: r359023 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 359023 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.29 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, 16 Mar 2020 23:09:26 -0000 Author: brooks Date: Mon Mar 16 23:09:25 2020 New Revision: 359023 URL: https://svnweb.freebsd.org/changeset/base/359023 Log: MFC r358592: Expose ifr_buffer_get_(buffer|length) outside if.c. This is a preparatory commit for D23933. Reviewed by: jhb Obtained from: CheriBSD Sponsored by: DARPA Modified: stable/12/sys/net/if.c stable/12/sys/net/if_var.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if.c ============================================================================== --- stable/12/sys/net/if.c Mon Mar 16 22:25:25 2020 (r359022) +++ stable/12/sys/net/if.c Mon Mar 16 23:09:25 2020 (r359023) @@ -2483,7 +2483,7 @@ ifunit(const char *name) return (ifp); } -static void * +void * ifr_buffer_get_buffer(void *data) { union ifreq_union *ifrup; @@ -2511,7 +2511,7 @@ ifr_buffer_set_buffer_null(void *data) ifrup->ifr.ifr_ifru.ifru_buffer.buffer = NULL; } -static size_t +size_t ifr_buffer_get_length(void *data) { union ifreq_union *ifrup; Modified: stable/12/sys/net/if_var.h ============================================================================== --- stable/12/sys/net/if_var.h Mon Mar 16 22:25:25 2020 (r359022) +++ stable/12/sys/net/if_var.h Mon Mar 16 23:09:25 2020 (r359023) @@ -763,6 +763,8 @@ int if_hw_tsomax_update(if_t ifp, struct ifnet_hw_tsom /* accessors for struct ifreq */ void *ifr_data_get_ptr(void *ifrp); +void *ifr_buffer_get_buffer(void *data); +size_t ifr_buffer_get_length(void *data); int ifhwioctl(u_long, struct ifnet *, caddr_t, struct thread *); From owner-svn-src-stable-12@freebsd.org Mon Mar 16 23:20: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 28AFA2734E7; Mon, 16 Mar 2020 23:20:57 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48hC3D6Cphz3FxB; Mon, 16 Mar 2020 23:20:56 +0000 (UTC) (envelope-from brooks@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 949EC27F78; Mon, 16 Mar 2020 23:20:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02GNKuxo056060; Mon, 16 Mar 2020 23:20:56 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02GNKu7t056059; Mon, 16 Mar 2020 23:20:56 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003162320.02GNKu7t056059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 16 Mar 2020 23:20: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: r359025 - stable/12/sys/dev/bnxt X-SVN-Group: stable-12 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/12/sys/dev/bnxt X-SVN-Commit-Revision: 359025 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.29 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, 16 Mar 2020 23:20:57 -0000 Author: brooks Date: Mon Mar 16 23:20:56 2020 New Revision: 359025 URL: https://svnweb.freebsd.org/changeset/base/359025 Log: MFC r358630: bnxt(4): Fix ioctls when user addresses are inaccessable. Check copyin's error code (differ adding copyout checks at this time). Don't directly access user memory in the switch statement. Since bnxt_ioctl_data isn't all that big, use a stack allocation. Reviewed by: jhb Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23933 Modified: stable/12/sys/dev/bnxt/if_bnxt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/bnxt/if_bnxt.c ============================================================================== --- stable/12/sys/dev/bnxt/if_bnxt.c Mon Mar 16 23:15:20 2020 (r359024) +++ stable/12/sys/dev/bnxt/if_bnxt.c Mon Mar 16 23:20:56 2020 (r359025) @@ -1638,25 +1638,26 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t { struct bnxt_softc *softc = iflib_get_softc(ctx); struct ifreq *ifr = (struct ifreq *)data; - struct ifreq_buffer *ifbuf = &ifr->ifr_ifru.ifru_buffer; - struct bnxt_ioctl_header *ioh = - (struct bnxt_ioctl_header *)(ifbuf->buffer); + struct bnxt_ioctl_header *ioh; + size_t iol; int rc = ENOTSUP; - struct bnxt_ioctl_data *iod = NULL; + struct bnxt_ioctl_data iod_storage, *iod = &iod_storage; + switch (command) { case SIOCGPRIVATE_0: if ((rc = priv_check(curthread, PRIV_DRIVER)) != 0) goto exit; - iod = malloc(ifbuf->length, M_DEVBUF, M_NOWAIT | M_ZERO); - if (!iod) { - rc = ENOMEM; + ioh = ifr_buffer_get_buffer(ifr); + iol = ifr_buffer_get_length(ifr); + if (iol > sizeof(iod_storage)) + return (EINVAL); + + if ((rc = copyin(ioh, iod, iol)) != 0) goto exit; - } - copyin(ioh, iod, ifbuf->length); - switch (ioh->type) { + switch (iod->hdr.type) { case BNXT_HWRM_NVM_FIND_DIR_ENTRY: { struct bnxt_ioctl_hwrm_nvm_find_dir_entry *find = @@ -1674,7 +1675,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1714,7 +1715,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t remain -= csize; } if (iod->hdr.rc == 0) - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); iflib_dma_free(&dma_data); rc = 0; @@ -1734,7 +1735,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1754,7 +1755,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1776,7 +1777,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1795,7 +1796,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1815,7 +1816,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1842,7 +1843,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t copyout(dma_data.idi_vaddr, get->data, get->entry_length * get->entries); iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } iflib_dma_free(&dma_data); @@ -1863,7 +1864,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1885,7 +1886,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1904,7 +1905,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1925,7 +1926,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1946,7 +1947,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1957,8 +1958,6 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } exit: - if (iod) - free(iod, M_DEVBUF); return rc; } From owner-svn-src-stable-12@freebsd.org Mon Mar 16 23:36: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 C2D4B273980; Mon, 16 Mar 2020 23:36:33 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48hCPF2pnVz4S46; Mon, 16 Mar 2020 23:36:33 +0000 (UTC) (envelope-from brooks@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 3EE07392; Mon, 16 Mar 2020 23:36:33 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02GNaXmC064580; Mon, 16 Mar 2020 23:36:33 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02GNaXnE064579; Mon, 16 Mar 2020 23:36:33 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003162336.02GNaXnE064579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 16 Mar 2020 23:36:33 +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: r359027 - stable/12/sys/dev/mxge X-SVN-Group: stable-12 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/12/sys/dev/mxge X-SVN-Commit-Revision: 359027 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.29 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, 16 Mar 2020 23:36:33 -0000 Author: brooks Date: Mon Mar 16 23:36:32 2020 New Revision: 359027 URL: https://svnweb.freebsd.org/changeset/base/359027 Log: MFC r358593: Use ifr_data_get_ptr() consistently. Obtained from: CheriBSD Sponsored by: DARPA Modified: stable/12/sys/dev/mxge/if_mxge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/12/sys/dev/mxge/if_mxge.c Mon Mar 16 23:29:03 2020 (r359026) +++ stable/12/sys/dev/mxge/if_mxge.c Mon Mar 16 23:36:32 2020 (r359027) @@ -4349,7 +4349,7 @@ mxge_ioctl(struct ifnet *ifp, u_long command, caddr_t err = mxge_fetch_i2c(sc, &i2c); mtx_unlock(&sc->driver_mtx); if (err == 0) - err = copyout(&i2c, ifr->ifr_ifru.ifru_data, + err = copyout(&i2c, ifr_data_get_ptr(ifr), sizeof(i2c)); break; default: From owner-svn-src-stable-12@freebsd.org Tue Mar 17 14:59:25 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 4CDBA268F38; Tue, 17 Mar 2020 14:59:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48hbt50lvGz4bjG; Tue, 17 Mar 2020 14:59:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C73A3AECD; Tue, 17 Mar 2020 14:59:24 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02HExOw7015319; Tue, 17 Mar 2020 14:59:24 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02HExOlh015318; Tue, 17 Mar 2020 14:59:24 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003171459.02HExOlh015318@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 17 Mar 2020 14:59:24 +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: r359036 - stable/12/share/man/man7 X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/share/man/man7 X-SVN-Commit-Revision: 359036 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.29 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, 17 Mar 2020 14:59:25 -0000 Author: emaste Date: Tue Mar 17 14:59:24 2020 New Revision: 359036 URL: https://svnweb.freebsd.org/changeset/base/359036 Log: MFC r358898: arch.7: remove extraneous markup from header table sizing Modified: stable/12/share/man/man7/arch.7 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man7/arch.7 ============================================================================== --- stable/12/share/man/man7/arch.7 Tue Mar 17 14:12:19 2020 (r359035) +++ stable/12/share/man/man7/arch.7 Tue Mar 17 14:59:24 2020 (r359036) @@ -88,7 +88,7 @@ This table shows the first release to support each architecture, and, for discontinued architectures, the final release. .Pp -.Bl -column -offset indent "Sy Architecture" "Sy Initial Release" "Sy Final Release" +.Bl -column -offset indent "Architecture" "Initial Release" "Final Release" .It Sy Architecture Ta Sy Initial Release Ta Sy Final Release .It aarch64 Ta 11.0 .It alpha Ta 3.2 Ta 6.4 @@ -151,7 +151,7 @@ execution environment is accompanied by the .Dv ILP32 environment, which was the historical 32-bit predecessor for 64-bit evolution. Examples are: -.Bl -column -offset indent "Dv powerpc64" "Sy ILP32 counterpart" +.Bl -column -offset indent "powerpc64" "ILP32 counterpart" .It Sy LP64 Ta Sy ILP32 counterpart .It Dv amd64 Ta Dv i386 .It Dv powerpc64 Ta Dv powerpc @@ -186,7 +186,7 @@ Most ILP32 ABIs, except require only 4-byte alignment for 64-bit integers. .Pp Machine-dependent type sizes: -.Bl -column -offset indent "Sy Architecture" "Sy void *" "Sy long double" "Sy time_t" +.Bl -column -offset indent "Architecture" "void *" "long double" "time_t" .It Sy Architecture Ta Sy void * Ta Sy long double Ta Sy time_t .It aarch64 Ta 8 Ta 16 Ta 8 .It amd64 Ta 8 Ta 16 Ta 8 @@ -213,7 +213,7 @@ Machine-dependent type sizes: .Sy time_t is 8 bytes on all supported architectures except i386. .Ss Endianness and Char Signedness -.Bl -column -offset indent "Sy Architecture" "Sy Endianness" "Sy char Signedness" +.Bl -column -offset indent "Architecture" "Endianness" "char Signedness" .It Sy Architecture Ta Sy Endianness Ta Sy char Signedness .It aarch64 Ta little Ta unsigned .It amd64 Ta little Ta signed @@ -238,7 +238,7 @@ is 8 bytes on all supported architectures except i386. .It sparc64 Ta big Ta signed .El .Ss Page Size -.Bl -column -offset indent "Sy Architecture" "Sy Page Sizes" +.Bl -column -offset indent "Architecture" "Page Sizes" .It Sy Architecture Ta Sy Page Sizes .It aarch64 Ta 4K, 2M, 1G .It amd64 Ta 4K, 2M, 1G @@ -263,7 +263,7 @@ is 8 bytes on all supported architectures except i386. .It sparc64 Ta 8K .El .Ss Floating Point -.Bl -column -offset indent "Sy Architecture" "Sy float, double" "Sy long double" +.Bl -column -offset indent "Architecture" "float, double" "long double" .It Sy Architecture Ta Sy float, double Ta Sy long double .It aarch64 Ta hard Ta soft, quad precision .It amd64 Ta hard Ta hard, 80 bit @@ -305,7 +305,7 @@ and Binutils .Xr ld 1 , or an external toolchain compiler and linker provided by a port or package. This table shows the default tool chain for each architecture. -.Bl -column -offset indent "Sy Architecture" "Sy Compiler" "Sy Linker" +.Bl -column -offset indent "Architecture" "Compiler" "Linker" .It Sy Architecture Ta Sy Compiler Ta Sy Linker .It aarch64 Ta Clang Ta lld .It amd64 Ta Clang Ta lld @@ -348,7 +348,7 @@ cc -x c -dM -E /dev/null .Ed .Pp Common type size and endianness macros: -.Bl -column -offset indent "BYTE_ORDER" "Sy Meaning" +.Bl -column -offset indent "BYTE_ORDER" "Meaning" .It Sy Macro Ta Sy Meaning .It Dv __LP64__ Ta 64-bit (8-byte) long and pointer, 32-bit (4-byte) int .It Dv __ILP32__ Ta 32-bit (4-byte) int, long and pointer @@ -359,7 +359,7 @@ is not used on .El .Pp Architecture-specific macros: -.Bl -column -offset indent "Sy Architecture" "Sy Predefined macros" +.Bl -column -offset indent "Architecture" "Predefined macros" .It Sy Architecture Ta Sy Predefined macros .It aarch64 Ta Dv __aarch64__ .It amd64 Ta Dv __amd64__, Dv __x86_64__ From owner-svn-src-stable-12@freebsd.org Tue Mar 17 19:53: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 8E0F02711CE; Tue, 17 Mar 2020 19:53:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48hkNw0NWXz4d61; Tue, 17 Mar 2020 19:53:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD8D7E806; Tue, 17 Mar 2020 19:53:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02HJr3TC096053; Tue, 17 Mar 2020 19:53:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02HJr3oT096051; Tue, 17 Mar 2020 19:53:03 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003171953.02HJr3oT096051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 17 Mar 2020 19:53: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: r359049 - in stable/12: tools/tools/controlelf usr.bin usr.bin/elfctl X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/12: tools/tools/controlelf usr.bin usr.bin/elfctl X-SVN-Commit-Revision: 359049 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.29 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, 17 Mar 2020 19:53:04 -0000 Author: emaste Date: Tue Mar 17 19:53:03 2020 New Revision: 359049 URL: https://svnweb.freebsd.org/changeset/base/359049 Log: MFC r358512: Move ELF feature note tool to usr.bin/elfctl elfctl is a tool for modifying the NT_FREEBSD_FEATURE_CTL ELF note, which contains a set of flags for enabling or disabling vulnerability mitigations and other features. Also merge follow-on commits: r358518 elfctl: initialize features r358546 elfctl: tiny style(9) cleanup, use bool where appropriate r358622 elfctl: style(9): use C99 uintX_t types r358623 elfctl: check read return value r358889 elfctl: remove memory leak Sponsored by: The FreeBSD Foundation Added: stable/12/usr.bin/elfctl/ - copied from r358512, head/usr.bin/elfctl/ Deleted: stable/12/tools/tools/controlelf/ Modified: stable/12/usr.bin/Makefile stable/12/usr.bin/elfctl/elfctl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/Makefile ============================================================================== --- stable/12/usr.bin/Makefile Tue Mar 17 19:20:12 2020 (r359048) +++ stable/12/usr.bin/Makefile Tue Mar 17 19:53:03 2020 (r359049) @@ -33,6 +33,7 @@ SUBDIR= alias \ dirname \ du \ elf2aout \ + elfctl \ elfdump \ enigma \ env \ Modified: stable/12/usr.bin/elfctl/elfctl.c ============================================================================== --- head/usr.bin/elfctl/elfctl.c Mon Mar 2 02:36:41 2020 (r358512) +++ stable/12/usr.bin/elfctl/elfctl.c Tue Mar 17 19:53:03 2020 (r359049) @@ -48,9 +48,9 @@ __FBSDID("$FreeBSD$"); -static bool convert_to_feature_val(char *, u_int32_t *); +static bool convert_to_feature_val(char *, uint32_t *); static bool edit_file_features(Elf *, int, int, char *); -static bool get_file_features(Elf *, int, int, u_int32_t *, u_int64_t *); +static bool get_file_features(Elf *, int, int, uint32_t *, uint64_t *); static void print_features(void); static bool print_file_features(Elf *, int, int, char *); static void usage(void); @@ -85,13 +85,14 @@ main(int argc, char **argv) GElf_Ehdr ehdr; Elf *elf; Elf_Kind kind; - int ch, fd, editfeatures, retval; + int ch, fd, retval; char *features; - bool lflag; + bool editfeatures, lflag; lflag = 0; - editfeatures = 0; + editfeatures = false; retval = 0; + features = NULL; if (elf_version(EV_CURRENT) == EV_NONE) errx(EXIT_FAILURE, "elf_version error"); @@ -104,7 +105,7 @@ main(int argc, char **argv) break; case 'e': features = optarg; - editfeatures = 1; + editfeatures = true; break; case 'h': default: @@ -205,11 +206,11 @@ usage(void) } static bool -convert_to_feature_val(char *feature_str, u_int32_t *feature_val) +convert_to_feature_val(char *feature_str, uint32_t *feature_val) { char *feature; int i, len; - u_int32_t input; + uint32_t input; char operation; input = 0; @@ -246,8 +247,8 @@ convert_to_feature_val(char *feature_str, u_int32_t *f static bool edit_file_features(Elf *elf, int phcount, int fd, char *val) { - u_int32_t features; - u_int64_t off; + uint32_t features; + uint64_t off; if (!get_file_features(elf, phcount, fd, &features, &off)) { warnx("NT_FREEBSD_FEATURE_CTL note not found"); @@ -280,7 +281,7 @@ print_features(void) static bool print_file_features(Elf *elf, int phcount, int fd, char *filename) { - u_int32_t features; + uint32_t features; unsigned long i; if (!get_file_features(elf, phcount, fd, &features, NULL)) { @@ -301,15 +302,14 @@ print_file_features(Elf *elf, int phcount, int fd, cha } static bool -get_file_features(Elf *elf, int phcount, int fd, u_int32_t *features, - u_int64_t *off) +get_file_features(Elf *elf, int phcount, int fd, uint32_t *features, + uint64_t *off) { GElf_Phdr phdr; Elf_Note note; unsigned long read_total; int namesz, descsz, i; char *name; - ssize_t size; /* * Go through each program header to find one that is of type PT_NOTE @@ -331,9 +331,9 @@ get_file_features(Elf *elf, int phcount, int fd, u_int read_total = 0; while (read_total < phdr.p_filesz) { - size = read(fd, ¬e, sizeof(note)); - if (size < (ssize_t)sizeof(note)) { - warn("read() failed:"); + if (read(fd, ¬e, sizeof(note)) < + (ssize_t)sizeof(note)) { + warnx("elf note header too short"); return (false); } read_total += sizeof(note); @@ -349,7 +349,11 @@ get_file_features(Elf *elf, int phcount, int fd, u_int return (false); } descsz = roundup2(note.n_descsz, 4); - size = read(fd, name, namesz); + if (read(fd, name, namesz) < namesz) { + warnx("elf note name too short"); + free(name); + return (false); + } read_total += namesz; if (note.n_namesz != 8 || @@ -366,7 +370,7 @@ get_file_features(Elf *elf, int phcount, int fd, u_int continue; } - if (note.n_descsz < sizeof(u_int32_t)) { + if (note.n_descsz < sizeof(uint32_t)) { warnx("Feature descriptor can't " "be less than 4 bytes"); free(name); @@ -377,9 +381,14 @@ get_file_features(Elf *elf, int phcount, int fd, u_int * XXX: For now we look at only 4 bytes of the * descriptor. This should respect descsz. */ - if (note.n_descsz > sizeof(u_int32_t)) + if (note.n_descsz > sizeof(uint32_t)) warnx("Feature note is bigger than expected"); - read(fd, features, sizeof(u_int32_t)); + if (read(fd, features, sizeof(uint32_t)) < + (ssize_t)sizeof(uint32_t)) { + warnx("feature note data too short"); + free(name); + return (false); + } if (off != NULL) *off = phdr.p_offset + read_total; free(name); From owner-svn-src-stable-12@freebsd.org Tue Mar 17 23:57: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 6D238276328; Tue, 17 Mar 2020 23:57:07 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48hqpW16ddz4Mkl; Tue, 17 Mar 2020 23:57:07 +0000 (UTC) (envelope-from wulf@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 1237619455; Tue, 17 Mar 2020 23:57:07 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02HNv60n040500; Tue, 17 Mar 2020 23:57:06 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02HNv6Z6040499; Tue, 17 Mar 2020 23:57:06 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202003172357.02HNv6Z6040499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Tue, 17 Mar 2020 23:57: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: r359055 - stable/12/sys/dev/usb/input X-SVN-Group: stable-12 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/12/sys/dev/usb/input X-SVN-Commit-Revision: 359055 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.29 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, 17 Mar 2020 23:57:07 -0000 Author: wulf Date: Tue Mar 17 23:57:06 2020 New Revision: 359055 URL: https://svnweb.freebsd.org/changeset/base/359055 Log: MFC r358824: wmt(4): Fix Synaptics Touch Digitizer V04 attachment Touch Digitizer V04 report descriptor declares 'Contact Count Maximum' usage as constant. That was not supported by descriptor parser. PR: 232040 Reported by: Sergei Akhmatdinov Modified: stable/12/sys/dev/usb/input/wmt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/input/wmt.c ============================================================================== --- stable/12/sys/dev/usb/input/wmt.c Tue Mar 17 23:22:07 2020 (r359054) +++ stable/12/sys/dev/usb/input/wmt.c Tue Mar 17 23:57:06 2020 (r359055) @@ -657,9 +657,8 @@ wmt_hid_parse(struct wmt_softc *sc, const void *d_ptr, thqa_cert_rid = hi.report_ID; break; } - if (hi.collevel == 1 && touch_coll && - WMT_HI_ABSOLUTE(hi) && hi.usage == - HID_USAGE2(HUP_DIGITIZERS, HUD_CONTACT_MAX)) { + if (hi.collevel == 1 && touch_coll && hi.usage == + HID_USAGE2(HUP_DIGITIZERS, HUD_CONTACT_MAX)) { cont_count_max = hi.logical_maximum; cont_max_rid = hi.report_ID; if (sc != NULL) From owner-svn-src-stable-12@freebsd.org Wed Mar 18 01:55: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 E5BD1278C02; Wed, 18 Mar 2020 01:55:28 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48htR44m6Wz3DCX; Wed, 18 Mar 2020 01:55:28 +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 461D21AA40; Wed, 18 Mar 2020 01:55:28 +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 02I1tSFZ013003; Wed, 18 Mar 2020 01:55:28 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02I1tSEt013002; Wed, 18 Mar 2020 01:55:28 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003180155.02I1tSEt013002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 18 Mar 2020 01:55: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: r359059 - in stable: 11/lib/libssp 12/lib/libssp X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/lib/libssp 12/lib/libssp X-SVN-Commit-Revision: 359059 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.29 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, 18 Mar 2020 01:55:29 -0000 Author: kevans Date: Wed Mar 18 01:55:27 2020 New Revision: 359059 URL: https://svnweb.freebsd.org/changeset/base/359059 Log: MFC r358993: libssp: don't compile with -fstack-protector* This similarly matches what we do in libc; compiling libssp with -fstack-protector* is actively harmful. For instance, if the canary ctor ends up with a stack protector then it will trivially trigger a false positive as the canary's being initialized. This was noted by the reporter as irc/ircd-hybrid started crashing at start after our libssp was MFC'd to stable/11, as its build will explicitly link in libssp. On FreeBSD, this isn't necessary as SSP bits are included in libc, but it should absolutely not trigger runtime breakage -- it does mean that the canary will get initialized twice, but as this is happening early on in application startup it should just be redundant work. Modified: stable/12/lib/libssp/Makefile Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libssp/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libssp/Makefile ============================================================================== --- stable/12/lib/libssp/Makefile Wed Mar 18 01:09:43 2020 (r359058) +++ stable/12/lib/libssp/Makefile Wed Mar 18 01:55:27 2020 (r359059) @@ -17,4 +17,8 @@ SRCS= stack_protector.c fortify_stubs.c CFLAGS.fortify_stubs.c= -Wno-unused-parameter +# Stack protection on libssp symbols should be considered harmful, as we may +# be talking about, for example, the guard setup constructor. +SSP_CFLAGS:= + .include From owner-svn-src-stable-12@freebsd.org Wed Mar 18 17:35:37 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 6BC0B2673DC; Wed, 18 Mar 2020 17:35:37 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jHHs1Vv4z4N77; Wed, 18 Mar 2020 17:35:37 +0000 (UTC) (envelope-from hrs@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 B5960257BE; Wed, 18 Mar 2020 17:35:36 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02IHZahT084698; Wed, 18 Mar 2020 17:35:36 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02IHZaY5084697; Wed, 18 Mar 2020 17:35:36 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202003181735.02IHZaY5084697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 18 Mar 2020 17:35:36 +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: r359074 - in stable: 11/sys/netinet6 12/sys/netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: in stable: 11/sys/netinet6 12/sys/netinet6 X-SVN-Commit-Revision: 359074 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.29 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, 18 Mar 2020 17:35:37 -0000 Author: hrs Date: Wed Mar 18 17:35:35 2020 New Revision: 359074 URL: https://svnweb.freebsd.org/changeset/base/359074 Log: MFC from r347887: Fix hostname to be returned in an ICMPv6 NI Reply message defined in RFC 4620, ICMPv6 Node Information Queries. A vnet jail with an IPv6 address sent a hostname of the host environment, not the jail, even if another hostname was set to the jail. This change can be tested by the following commands: # ifconfig epair0 create # jail -c -n j1 vnet host.hostname=vnetjail path=/ persist # ifconfig epair0b vnet j1 # ifconfig epair0a inet6 -ifdisabled auto_linklocal up # jexec j1 ifconfig epair0b inet6 -ifdisabled auto_linklocal up # ping6 -w ff02::1%epair0a Differential Revision: https://reviews.freebsd.org/D20207 Modified: stable/12/sys/netinet6/icmp6.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/netinet6/icmp6.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/netinet6/icmp6.c ============================================================================== --- stable/12/sys/netinet6/icmp6.c Wed Mar 18 17:01:03 2020 (r359073) +++ stable/12/sys/netinet6/icmp6.c Wed Mar 18 17:35:35 2020 (r359074) @@ -140,7 +140,7 @@ static int icmp6_rip6_input(struct mbuf **, int); static int icmp6_ratelimit(const struct in6_addr *, const int, const int); static const char *icmp6_redirect_diag(struct in6_addr *, struct in6_addr *, struct in6_addr *); -static struct mbuf *ni6_input(struct mbuf *, int); +static struct mbuf *ni6_input(struct mbuf *, int, struct prison *); static struct mbuf *ni6_nametodns(const char *, int, int); static int ni6_dnsmatch(const char *, int, const char *, int); static int ni6_addrs(struct icmp6_nodeinfo *, struct mbuf *, @@ -620,6 +620,7 @@ icmp6_input(struct mbuf **mp, int *offp, int proto) case ICMP6_WRUREQUEST: /* ICMP6_FQDN_QUERY */ { enum { WRU, FQDN } mode; + struct prison *pr; if (!V_icmp6_nodeinfo) break; @@ -631,6 +632,14 @@ icmp6_input(struct mbuf **mp, int *offp, int proto) else goto badlen; + pr = NULL; + sx_slock(&allprison_lock); + TAILQ_FOREACH(pr, &allprison, pr_list) + if (pr->pr_vnet == ifp->if_vnet) + break; + sx_sunlock(&allprison_lock); + if (pr == NULL) + pr = curthread->td_ucred->cr_prison; if (mode == FQDN) { if (m->m_len < off + sizeof(struct icmp6_nodeinfo)) { m = m_pullup(m, off + @@ -643,11 +652,10 @@ icmp6_input(struct mbuf **mp, int *offp, int proto) } n = m_copym(m, 0, M_COPYALL, M_NOWAIT); if (n) - n = ni6_input(n, off); + n = ni6_input(n, off, pr); /* XXX meaningless if n == NULL */ noff = sizeof(struct ip6_hdr); } else { - struct prison *pr; u_char *p; int maxhlen, hlen; @@ -681,13 +689,6 @@ icmp6_input(struct mbuf **mp, int *offp, int proto) n = NULL; break; } - maxhlen = M_TRAILINGSPACE(n) - - (sizeof(*nip6) + sizeof(*nicmp6) + 4); - pr = curthread->td_ucred->cr_prison; - mtx_lock(&pr->pr_mtx); - hlen = strlen(pr->pr_hostname); - if (maxhlen > hlen) - maxhlen = hlen; /* * Copy IPv6 and ICMPv6 only. */ @@ -697,6 +698,13 @@ icmp6_input(struct mbuf **mp, int *offp, int proto) bcopy(icmp6, nicmp6, sizeof(struct icmp6_hdr)); p = (u_char *)(nicmp6 + 1); bzero(p, 4); + + maxhlen = M_TRAILINGSPACE(n) - + (sizeof(*nip6) + sizeof(*nicmp6) + 4); + mtx_lock(&pr->pr_mtx); + hlen = strlen(pr->pr_hostname); + if (maxhlen > hlen) + maxhlen = hlen; /* meaningless TTL */ bcopy(pr->pr_hostname, p + 4, maxhlen); mtx_unlock(&pr->pr_mtx); @@ -1159,11 +1167,10 @@ icmp6_mtudisc_update(struct ip6ctlparam *ip6cp, int va * with hostname changes by sethostname(3) */ static struct mbuf * -ni6_input(struct mbuf *m, int off) +ni6_input(struct mbuf *m, int off, struct prison *pr) { struct icmp6_nodeinfo *ni6, *nni6; struct mbuf *n = NULL; - struct prison *pr; u_int16_t qtype; int subjlen; int replylen = sizeof(struct ip6_hdr) + sizeof(struct icmp6_nodeinfo); @@ -1306,7 +1313,6 @@ ni6_input(struct mbuf *m, int off) * wildcard match, if gethostname(3) side has * truncated hostname. */ - pr = curthread->td_ucred->cr_prison; mtx_lock(&pr->pr_mtx); n = ni6_nametodns(pr->pr_hostname, strlen(pr->pr_hostname), 0); @@ -1440,7 +1446,6 @@ ni6_input(struct mbuf *m, int off) /* * XXX do we really have FQDN in hostname? */ - pr = curthread->td_ucred->cr_prison; mtx_lock(&pr->pr_mtx); n->m_next = ni6_nametodns(pr->pr_hostname, strlen(pr->pr_hostname), oldfqdn); From owner-svn-src-stable-12@freebsd.org Wed Mar 18 17:42: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 A24D1267819; Wed, 18 Mar 2020 17:42:20 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jHRc1hH9z4f0K; Wed, 18 Mar 2020 17:42:20 +0000 (UTC) (envelope-from hrs@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 C231025997; Wed, 18 Mar 2020 17:42:19 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02IHgJj8090506; Wed, 18 Mar 2020 17:42:19 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02IHgJqr090505; Wed, 18 Mar 2020 17:42:19 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202003181742.02IHgJqr090505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 18 Mar 2020 17:42: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: r359075 - in stable: 11/share/vt/keymaps 12/share/vt/keymaps X-SVN-Group: stable-12 X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: in stable: 11/share/vt/keymaps 12/share/vt/keymaps X-SVN-Commit-Revision: 359075 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.29 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, 18 Mar 2020 17:42:20 -0000 Author: hrs Date: Wed Mar 18 17:42:18 2020 New Revision: 359075 URL: https://svnweb.freebsd.org/changeset/base/359075 Log: MFC of r358061: Use 0x5c for the scan code 0x7d. Japanese keyboards traditionally use 0x5c for both Japanese yen sign key and backslash key. While a Japanese yen sign is depicted on the keytop, most of Japanese expect that the scan code 0x7d gives a backslash (0x5c), not a Japanese yen sign (0xa5). This is because JIS X 0201 encoding (aka ISO/IEC 646-JA, an extended version of ASCII which is very popular in Japan) has Japanese yen sign at 0x5c and no backslash. On the other hand, ISO/IEC 8859-1 has Japanese yen sign at 0xa5. This difference has caused a confusion after Unicode became popular since ISO/IEC 10646 adopted 8859-1 for the plane 0. Modified: stable/12/share/vt/keymaps/jp.capsctrl.kbd stable/12/share/vt/keymaps/jp.kbd Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/share/vt/keymaps/jp.capsctrl.kbd stable/11/share/vt/keymaps/jp.kbd Directory Properties: stable/11/ (props changed) Modified: stable/12/share/vt/keymaps/jp.capsctrl.kbd ============================================================================== --- stable/12/share/vt/keymaps/jp.capsctrl.kbd Wed Mar 18 17:35:35 2020 (r359074) +++ stable/12/share/vt/keymaps/jp.capsctrl.kbd Wed Mar 18 17:42:18 2020 (r359075) @@ -117,4 +117,4 @@ 115 '\' '_' fs us '\' '_' fs us O 121 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O 123 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O - 125 0xa5 '|' fs us 0xa5 '|' fs us O + 125 '\' '|' fs us 0xa5 '|' fs us O Modified: stable/12/share/vt/keymaps/jp.kbd ============================================================================== --- stable/12/share/vt/keymaps/jp.kbd Wed Mar 18 17:35:35 2020 (r359074) +++ stable/12/share/vt/keymaps/jp.kbd Wed Mar 18 17:42:18 2020 (r359075) @@ -115,4 +115,4 @@ 115 '\' '_' fs us '\' '_' fs us O 121 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O 123 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O - 125 0xa5 '|' fs us 0xa5 '|' fs us O + 125 '\' '|' fs us 0xa5 '|' fs us O From owner-svn-src-stable-12@freebsd.org Wed Mar 18 18:02: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 24125267FD5; Wed, 18 Mar 2020 18:02:35 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jHtz0rh2z4SY8; Wed, 18 Mar 2020 18:02:35 +0000 (UTC) (envelope-from hrs@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 1830325D38; Wed, 18 Mar 2020 18:02:35 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02II2ZpJ002538; Wed, 18 Mar 2020 18:02:35 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02II2YDj002532; Wed, 18 Mar 2020 18:02:34 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202003181802.02II2YDj002532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 18 Mar 2020 18:02:34 +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: r359076 - in stable: 11/share/man/man4 11/sys/dev/acpica 11/usr.sbin/acpi/acpiconf 12/share/man/man4 12/sys/dev/acpica 12/usr.sbin/acpi/acpiconf X-SVN-Group: stable-12 X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: in stable: 11/share/man/man4 11/sys/dev/acpica 11/usr.sbin/acpi/acpiconf 12/share/man/man4 12/sys/dev/acpica 12/usr.sbin/acpi/acpiconf X-SVN-Commit-Revision: 359076 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.29 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, 18 Mar 2020 18:02:35 -0000 Author: hrs Date: Wed Mar 18 18:02:33 2020 New Revision: 359076 URL: https://svnweb.freebsd.org/changeset/base/359076 Log: MFC of r355574, r358095, and r358395: Add ACPI battery subsystem man page. Add _BIX (Battery Information Extended) object support. ACPI Control Method Batteries have a _BIF and/or _BIX object which provide static properties of the battery. FreeBSD acpi_cmbat module supported _BIF object only, which was deprecated as of ACPI 4.0. _BIX is an extended version of _BIF defined in ACPI 4.0 or later. As of writing, _BIX has two revisions. One is in ACPI 4.0 (rev.0) and another is in ACPI 6.0 (rev.1). It seems that hardware vendors still stick to _BIF only or _BIX rev.0 + _BIF for the maximum compatibility. Microsoft requires _BIX rev.0 for Windows machines, so there are some laptop machines with _BIX rev.0 only. In this case, FreeBSD does not recognize the battery information. After this change, the acpi_cmbat module gets battery information from _BIX or _BIF object and internally uses _BIX rev.1 data structure as the primary information store in the kernel. ACPIIO_BATT_GET_BI[FX] returns an acpi_bi[fx] structure built by using information obtained from a _BIF or a _BIX object found on the system. The revision number field can be used to check which field is available. The acpiconf(8) utility will show additional information if _BIX is available. Although ABIs of ACPIIO_BATT_* were changed, the existing APIs for userland utilities are not changed and the backward-compatible ABIs are provided. This means that older versions of acpiconf(8) can also work with the new kernel. The (union acpi_battery_ioctl_arg) was padded to 256 byte long to avoid another ABI change in the future. A _BIX object with its revision number >1 will be treated as compatible with the rev.1 _BIX format. Add workaround for models which do not follow the ACPI specification strictly. Extra objects are now simply ignored instead of rejecting everything. Differential Revision: https://reviews.freebsd.org/D22556 Differential Revision: https://reviews.freebsd.org/D23728 Added: stable/12/share/man/man4/acpi_battery.4 - copied, changed from r355574, head/share/man/man4/acpi_battery.4 Modified: stable/12/share/man/man4/Makefile stable/12/sys/dev/acpica/acpi_battery.c stable/12/sys/dev/acpica/acpi_cmbat.c stable/12/sys/dev/acpica/acpi_if.m stable/12/sys/dev/acpica/acpi_package.c stable/12/sys/dev/acpica/acpi_smbat.c stable/12/sys/dev/acpica/acpiio.h stable/12/sys/dev/acpica/acpivar.h stable/12/usr.sbin/acpi/acpiconf/acpiconf.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Added: stable/11/share/man/man4/acpi_battery.4 - copied, changed from r355574, head/share/man/man4/acpi_battery.4 Modified: stable/11/share/man/man4/Makefile stable/11/sys/dev/acpica/acpi_battery.c stable/11/sys/dev/acpica/acpi_cmbat.c stable/11/sys/dev/acpica/acpi_if.m stable/11/sys/dev/acpica/acpi_package.c stable/11/sys/dev/acpica/acpi_smbat.c stable/11/sys/dev/acpica/acpiio.h stable/11/sys/dev/acpica/acpivar.h stable/11/usr.sbin/acpi/acpiconf/acpiconf.c Directory Properties: stable/11/ (props changed) Modified: stable/12/share/man/man4/Makefile ============================================================================== --- stable/12/share/man/man4/Makefile Wed Mar 18 17:42:18 2020 (r359075) +++ stable/12/share/man/man4/Makefile Wed Mar 18 18:02:33 2020 (r359076) @@ -18,6 +18,7 @@ MAN= aac.4 \ ${_acpi_rapidstart.4} \ ${_acpi_sony.4} \ acpi_thermal.4 \ + acpi_battery.4 \ ${_acpi_toshiba.4} \ acpi_video.4 \ ${_acpi_wmi.4} \ Copied and modified: stable/12/share/man/man4/acpi_battery.4 (from r355574, head/share/man/man4/acpi_battery.4) ============================================================================== --- head/share/man/man4/acpi_battery.4 Tue Dec 10 02:19:07 2019 (r355574, copy source) +++ stable/12/share/man/man4/acpi_battery.4 Wed Mar 18 18:02:33 2020 (r359076) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 26, 2019 +.Dd February 16, 2020 .Dt ACPI_BATTERY 4 .Os .Sh NAME @@ -37,6 +37,7 @@ The .Nm is a driver for battery management features of the ACPI module. +.Pp An ACPI-compatible battery device supports either a Control Method Battery interface or a Smart Battery subsystem interface. The former is accessed by the AML @@ -45,7 +46,8 @@ code control methods, and the latter is controlled directly through the ACPI EC .Pq Embedded Controller typically via an SMBus interface. -This driver supports the +.Pp +This driver supports the .Xr sysctl 8 and .Xr ioctl 2 @@ -59,60 +61,86 @@ driver takes a single integer value for the battery un number as an argument, and returns a specific structure for each request. A special unit number -.Li ACPI_BATTERY_ALL_UNITS +.Dv ACPI_BATTERY_ALL_UNITS specifies all of the attached units and reports accumulated information. .Bl -tag -width indent -.It ACPIIO_BATT_GET_UNITS Vt int +.It Dv ACPIIO_BATT_GET_UNITS Vt int Returns the number of battery units in the system. The unit number argument will be ignored. -.It ACPIIO_BATT_GET_BATTINFO Vt struct acpi_battinfo +.It Dv ACPIIO_BATT_GET_BATTINFO Vt struct acpi_battinfo Returns the following: .Bl -tag -width indent -.It cap +.It Va cap Battery capacity in percent, -.It min +.It Va min Remaining battery life in minutes, -.It state +.It Va state Current status of the battery encoded in the following: .Bl -tag -width indent -.It ACPI_BATT_STAT_DISCHARG Pq 0x0001 +.It Dv ACPI_BATT_STAT_DISCHARG Pq 0x0001 Battery is discharging, -.It ACPI_BATT_STAT_CHARGING Pq 0x0002 +.It Dv ACPI_BATT_STAT_CHARGING Pq 0x0002 Battery is being charged, or -.It ACPI_BATT_STAT_CRITICAL Pq 0x0004 +.It Dv ACPI_BATT_STAT_CRITICAL Pq 0x0004 Remaining battery life is critically low. .El .Pp Note that the status bits of each battery will be consolidated when -.Li ACPI_BATTERY_ALL_UNITS +.Dv ACPI_BATTERY_ALL_UNITS is specified. -.It rate +.It Va rate Current battery discharging rate in mW. .Li -1 means not discharging right now. .El -.It ACPIIO_BATT_GET_BIF Vt struct acpi_bif +.It Dv ACPIIO_BATT_GET_BIX Vt struct acpi_bix Returns battery information given by the ACPI -.Li _BIF Pq Battery Information +.Li _BIX Pq Battery Information object, which is the static portion of the Control Method Battery information. -In the case of a Smart Battery attached to SMBus, +In the case of a Smart Battery attached to +SMBus or a Control Method Battery with a +.Li _BIF +object, this ioctl will build a -.Vt struct acpi_bif +.Vt struct acpi_bix structure based on the obtained information and return it. .Bl -tag -width indent -.It units +.It Va rev +Revision number of the object. +There are the following well-known values: +.Bl -tag -width indent +.It Dv ACPI_BIX_REV_0 Pq 0x0000 +A +.Li _BIX +object in ACPI 4.0. +.It Dv ACPI_BIX_REV_1 Pq 0x0001 +A +.Li _BIX +object in ACPI 6.0. +.It Dv ACPI_BIX_REV_BIF Pq 0xffff +A +.Li _BIX +object built from the +.Li _BIF +object found on the system. +.El +.Pp +Note that this field should be checked by using +.Fn ACPI_BIX_REV_MIN_CHECK var rev +macro when checking the minimum revision number. +.It Va units Indicates the units used by the battery to report its capacity and charge rate encoded in the following: .Bl -tag -width indent -.It ACPI_BIF_UNITS_MW Pq 0x00000000 +.It ACPI_BIX_UNITS_MW Pq 0x00000000 in mW .Pq power -.It ACPI_BIF_UNITS_MA Pq 0x00000001 +.It ACPI_BIX_UNITS_MA Pq 0x00000001 in mA .Pq current .El @@ -120,31 +148,69 @@ in mA Note that capacity is expressed in mWh or mAh, and rate is expressed in mW or mA, respectively. -.It dcap +.It Va dcap The Battery's design capacity, which is the nominal capacity of a new battery. This is expressed as power or current depending on the value of .Va units . -.It lfcap +.It Va lfcap Predicted battery capacity when fully charged. Typically this will decrease every charging cycle. .It btech Battery technology: .Bl -tag -width indent .It 0x00000000 Primary cell Pq non-rechargable -.It 0x00000001 Secondery cell Pq rechargable +.It 0x00000001 Secondary cell Pq rechargable .El -.It dvol +.It Va dvol Design voltage in mV, which is the nominal voltage of a new battery. -.It wcap +.It Va wcap Design capacity of warning. When a discharging battery device reaches this capacity, notification is sent to the system. -.It lcap +.It Va lcap Design capacity of low. -.It gra1 +.It Va cycles +.Pq rev 0 or newer +The number of cycles the battery has experienced. +A cycle means an amount of discharge occurred which was +approximately equal to the value of Design Capacity. +.It Va accuracy +.Pq rev 0 or newer +The accuracy of the battery capacity measurement, +in thousandth of a percent. +.It Va stmax +.Pq rev 0 or newer +The Maximum Sampling Time of the battery in +milliseconds. +This is the maximum duration between two consecutive +measurements of the battery's capacities specified in +.Li _BST . +If two succeeding readings of +.Li _BST +beyond this duration occur, +two different results can be returned. +.It Va stmin +.Pq rev 0 or newer +The Minimum Sampling Time of the battery in +milliseconds. +.It Va aimax +.Pq rev 0 or newer +The Maximum Average Interval of the battery in +milliseconds. +This is the length of time within which the battery +averages the capacity measurements specified in +.Li _BST . +The Sampling Time specifies the frequency of measurements, +and the Average Interval specifies the width of the time +window of every measurement. +.It Va aimin +.Pq rev 0 or newer +The Minimum Average Interval of the battery in +milliseconds. +.It Va gra1 Battery capacity granularity between .Va low and @@ -152,7 +218,7 @@ and This is expressed as power or current depending on the value of .Va units . -.It gra2 +.It Va gra2 Battery capacity granularity between .Va warning and @@ -160,15 +226,41 @@ and This is expressed as power or current depending on the value of .Va units . -.It model +.It Va model Model number of the battery as a string. -.It serial +.It Va serial Serial number of the battery as a string. -.It type +.It Va type Type identifier of the battery as a string. -.It oeminfo +.It Va oeminfo OEM-specific information of the battery as a string. +.It Va scap +.Pq rev 1 or newer +Battery swapping capability encoded in the following: +.Bl -tag -width indent +.It ACPI_BIX_SCAP_NO Pq 0x00000000 +Non-swappable +.It ACPI_BIX_SCAP_COLD Pq 0x00000001 +Cold-swappable +.It ACPI_BIX_SCAP_HOT Pq 0x00000010 +Hot-swappable .El +.El +.It Dv ACPIIO_BATT_GET_BIF Vt struct acpi_bif +.Pq deprecated +Returns battery information given by the ACPI +.Li _BIF Pq Battery Information +object, +which was deprecated in ACPI 4.0 specification. +The data structure is a subset of +.Vt struct acpi_bix . +.Pp +Note that this ioctl will built a +.Vt struct acpi_bif +structure based on the obtained information +even if this object is not available and a +.Li _BIX +object is found. .It ACPIIO_BATT_GET_BST Vt struct acpi_bst Returns battery information given by the ACPI .Li _BST Pq Battery Status @@ -180,25 +272,25 @@ this ioctl will build a structure based on the obtained information and return it. .Bl -tag -width indent -.It state +.It Va state Battery state. The value is encoded in the same way as .Va state of .Vt struct acpi_battinfo . -.It rate +.It Va rate Battery present rate of charging or discharging. The unit of the value depends on .Va unit of .Vt struct acpi_bif . -.It cap +.It Va cap Battery remaining capacity. The unit of this value depends on .Va unit of .Vt struct acpi_bif . -.It volt +.It Va volt Battery present voltage. .El .El @@ -212,6 +304,8 @@ connected batteries: .It Va hw.acpi.battery.info_expire Information cache expiration time in seconds. The battery information obtained by +.Li _BIX +or .Li _BIF object will be stored and reused for successive read access to this MIB within the specified period. @@ -276,8 +370,11 @@ Battery information was changed. .An Munehiro Matsuda , .An Takanori Watanabe Aq Mt takawata@FreeBSD.org , .An Mitsuru IWASAKI Aq Mt iwasaki@FreeBSD.org , +.An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org , and -.An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org . +.An Hiroki Sato Aq Mt hrs@FreeBSD.org . .Pp This manual page was written by -.An Takanori Watanabe Aq Mt takawata@FreeBSD.org . +.An Takanori Watanabe Aq Mt takawata@FreeBSD.org +and +.An Hiroki Sato Aq Mt hrs@FreeBSD.org . Modified: stable/12/sys/dev/acpica/acpi_battery.c ============================================================================== --- stable/12/sys/dev/acpica/acpi_battery.c Wed Mar 18 17:42:18 2020 (r359075) +++ stable/12/sys/dev/acpica/acpi_battery.c Wed Mar 18 18:02:33 2020 (r359076) @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); /* Default seconds before re-sampling the battery state. */ #define ACPI_BATTERY_INFO_EXPIRE 5 -static int acpi_batteries_initted; +static int acpi_batteries_initialized; static int acpi_battery_info_expire = ACPI_BATTERY_INFO_EXPIRE; static struct acpi_battinfo acpi_battery_battinfo; static struct sysctl_ctx_list acpi_battery_sysctl_ctx; @@ -65,11 +65,10 @@ acpi_battery_register(device_t dev) { int error; - error = 0; ACPI_SERIAL_BEGIN(battery); - if (!acpi_batteries_initted) - error = acpi_battery_init(); + error = acpi_battery_init(); ACPI_SERIAL_END(battery); + return (error); } @@ -107,11 +106,12 @@ acpi_battery_bst_valid(struct acpi_bst *bst) bst->cap != ACPI_BATT_UNKNOWN && bst->volt != ACPI_BATT_UNKNOWN); } -/* Check _BIF results for validity. */ +/* Check _BI[FX] results for validity. */ int -acpi_battery_bif_valid(struct acpi_bif *bif) +acpi_battery_bix_valid(struct acpi_bix *bix) { - return (bif->lfcap != 0); + + return (bix->lfcap != 0); } /* Get info about one or all batteries. */ @@ -123,7 +123,7 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_ba devclass_t batt_dc; device_t batt_dev; struct acpi_bst *bst; - struct acpi_bif *bif; + struct acpi_bix *bix; struct acpi_battinfo *bi; /* @@ -139,11 +139,11 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_ba /* * Allocate storage for all _BST data, their derived battinfo data, - * and the current battery's _BIF data. + * and the current battery's _BIX (or _BIF) data. */ bst = malloc(devcount * sizeof(*bst), M_TEMP, M_WAITOK | M_ZERO); bi = malloc(devcount * sizeof(*bi), M_TEMP, M_WAITOK | M_ZERO); - bif = malloc(sizeof(*bif), M_TEMP, M_WAITOK | M_ZERO); + bix = malloc(sizeof(*bix), M_TEMP, M_WAITOK | M_ZERO); /* * Pass 1: for each battery that is present and valid, get its status, @@ -176,12 +176,12 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_ba */ if (!acpi_BatteryIsPresent(batt_dev) || ACPI_BATT_GET_STATUS(batt_dev, &bst[i]) != 0 || - ACPI_BATT_GET_INFO(batt_dev, bif) != 0) + ACPI_BATT_GET_INFO(batt_dev, bix, sizeof(*bix)) != 0) continue; /* If a battery is not installed, we sometimes get strange values. */ if (!acpi_battery_bst_valid(&bst[i]) || - !acpi_battery_bif_valid(bif)) + !acpi_battery_bix_valid(bix)) continue; /* @@ -200,18 +200,18 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_ba * is 0 (due to some error reading the battery), skip this * conversion. */ - if (bif->units == ACPI_BIF_UNITS_MA && bif->dvol != 0 && dev == NULL) { - bst[i].rate = (bst[i].rate * bif->dvol) / 1000; - bst[i].cap = (bst[i].cap * bif->dvol) / 1000; - bif->lfcap = (bif->lfcap * bif->dvol) / 1000; + if (bix->units == ACPI_BIX_UNITS_MA && bix->dvol != 0 && dev == NULL) { + bst[i].rate = (bst[i].rate * bix->dvol) / 1000; + bst[i].cap = (bst[i].cap * bix->dvol) / 1000; + bix->lfcap = (bix->lfcap * bix->dvol) / 1000; } /* - * The calculation above may set bif->lfcap to zero. This was + * The calculation above may set bix->lfcap to zero. This was * seen on a laptop with a broken battery. The result of the * division was rounded to zero. */ - if (!acpi_battery_bif_valid(bif)) + if (!acpi_battery_bix_valid(bix)) continue; /* @@ -219,16 +219,16 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_ba * "real-capacity" when the battery is fully charged. That breaks * the above arithmetic as it needs to be 100% maximum. */ - if (bst[i].cap > bif->lfcap) - bst[i].cap = bif->lfcap; + if (bst[i].cap > bix->lfcap) + bst[i].cap = bix->lfcap; /* Calculate percent capacity remaining. */ - bi[i].cap = (100 * bst[i].cap) / bif->lfcap; + bi[i].cap = (100 * bst[i].cap) / bix->lfcap; /* If this battery is not present, don't use its capacity. */ if (bi[i].cap != -1) { total_cap += bst[i].cap; - total_lfcap += bif->lfcap; + total_lfcap += bix->lfcap; } /* @@ -294,12 +294,9 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_ba error = 0; out: - if (bi) - free(bi, M_TEMP); - if (bif) - free(bif, M_TEMP); - if (bst) - free(bst, M_TEMP); + free(bi, M_TEMP); + free(bix, M_TEMP); + free(bst, M_TEMP); return (error); } @@ -368,7 +365,8 @@ acpi_battery_ioctl(u_long cmd, caddr_t addr, void *arg unit = 0; dev = NULL; ioctl_arg = NULL; - if (IOCPARM_LEN(cmd) == sizeof(*ioctl_arg)) { + if (IOCPARM_LEN(cmd) == sizeof(union acpi_battery_ioctl_arg) || + IOCPARM_LEN(cmd) == sizeof(union acpi_battery_ioctl_arg_v1)) { ioctl_arg = (union acpi_battery_ioctl_arg *)addr; unit = ioctl_arg->unit; if (unit != ACPI_BATTERY_ALL_UNITS) @@ -379,12 +377,14 @@ acpi_battery_ioctl(u_long cmd, caddr_t addr, void *arg * No security check required: information retrieval only. If * new functions are added here, a check might be required. */ + /* Unit check */ switch (cmd) { case ACPIIO_BATT_GET_UNITS: *(int *)addr = acpi_battery_get_units(); error = 0; break; case ACPIIO_BATT_GET_BATTINFO: + case ACPIIO_BATT_GET_BATTINFO_V1: if (dev != NULL || unit == ACPI_BATTERY_ALL_UNITS) { bzero(&ioctl_arg->battinfo, sizeof(ioctl_arg->battinfo)); error = acpi_battery_get_battinfo(dev, &ioctl_arg->battinfo); @@ -393,24 +393,19 @@ acpi_battery_ioctl(u_long cmd, caddr_t addr, void *arg case ACPIIO_BATT_GET_BIF: if (dev != NULL) { bzero(&ioctl_arg->bif, sizeof(ioctl_arg->bif)); - error = ACPI_BATT_GET_INFO(dev, &ioctl_arg->bif); - - /* - * Remove invalid characters. Perhaps this should be done - * within a convenience function so all callers get the - * benefit. - */ - acpi_battery_clean_str(ioctl_arg->bif.model, - sizeof(ioctl_arg->bif.model)); - acpi_battery_clean_str(ioctl_arg->bif.serial, - sizeof(ioctl_arg->bif.serial)); - acpi_battery_clean_str(ioctl_arg->bif.type, - sizeof(ioctl_arg->bif.type)); - acpi_battery_clean_str(ioctl_arg->bif.oeminfo, - sizeof(ioctl_arg->bif.oeminfo)); + error = ACPI_BATT_GET_INFO(dev, &ioctl_arg->bif, + sizeof(ioctl_arg->bif)); } break; + case ACPIIO_BATT_GET_BIX: + if (dev != NULL) { + bzero(&ioctl_arg->bix, sizeof(ioctl_arg->bix)); + error = ACPI_BATT_GET_INFO(dev, &ioctl_arg->bix, + sizeof(ioctl_arg->bix)); + } + break; case ACPIIO_BATT_GET_BST: + case ACPIIO_BATT_GET_BST_V1: if (dev != NULL) { bzero(&ioctl_arg->bst, sizeof(ioctl_arg->bst)); error = ACPI_BATT_GET_STATUS(dev, &ioctl_arg->bst); @@ -420,6 +415,25 @@ acpi_battery_ioctl(u_long cmd, caddr_t addr, void *arg error = EINVAL; } + /* Sanitize the string members. */ + switch (cmd) { + case ACPIIO_BATT_GET_BIX: + case ACPIIO_BATT_GET_BIF: + /* + * Remove invalid characters. Perhaps this should be done + * within a convenience function so all callers get the + * benefit. + */ + acpi_battery_clean_str(ioctl_arg->bix.model, + sizeof(ioctl_arg->bix.model)); + acpi_battery_clean_str(ioctl_arg->bix.serial, + sizeof(ioctl_arg->bix.serial)); + acpi_battery_clean_str(ioctl_arg->bix.type, + sizeof(ioctl_arg->bix.type)); + acpi_battery_clean_str(ioctl_arg->bix.oeminfo, + sizeof(ioctl_arg->bix.oeminfo)); + }; + return (error); } @@ -453,27 +467,30 @@ acpi_battery_init(void) ACPI_SERIAL_ASSERT(battery); + if (acpi_batteries_initialized) + return(0); + error = ENXIO; dev = devclass_get_device(devclass_find("acpi"), 0); if (dev == NULL) goto out; sc = device_get_softc(dev); - error = acpi_register_ioctl(ACPIIO_BATT_GET_UNITS, acpi_battery_ioctl, - NULL); - if (error != 0) - goto out; - error = acpi_register_ioctl(ACPIIO_BATT_GET_BATTINFO, acpi_battery_ioctl, - NULL); - if (error != 0) - goto out; - error = acpi_register_ioctl(ACPIIO_BATT_GET_BIF, acpi_battery_ioctl, NULL); - if (error != 0) - goto out; - error = acpi_register_ioctl(ACPIIO_BATT_GET_BST, acpi_battery_ioctl, NULL); - if (error != 0) - goto out; +#define ACPI_REGISTER_IOCTL(a, b, c) do { \ + error = acpi_register_ioctl(a, b, c); \ + if (error) \ + goto out; \ + } while (0) + ACPI_REGISTER_IOCTL(ACPIIO_BATT_GET_UNITS, acpi_battery_ioctl, NULL); + ACPI_REGISTER_IOCTL(ACPIIO_BATT_GET_BATTINFO, acpi_battery_ioctl, NULL); + ACPI_REGISTER_IOCTL(ACPIIO_BATT_GET_BATTINFO_V1, acpi_battery_ioctl, NULL); + ACPI_REGISTER_IOCTL(ACPIIO_BATT_GET_BIF, acpi_battery_ioctl, NULL); + ACPI_REGISTER_IOCTL(ACPIIO_BATT_GET_BIX, acpi_battery_ioctl, NULL); + ACPI_REGISTER_IOCTL(ACPIIO_BATT_GET_BST, acpi_battery_ioctl, NULL); + ACPI_REGISTER_IOCTL(ACPIIO_BATT_GET_BST_V1, acpi_battery_ioctl, NULL); +#undef ACPI_REGISTER_IOCTL + sysctl_ctx_init(&acpi_battery_sysctl_ctx); acpi_battery_sysctl_tree = SYSCTL_ADD_NODE(&acpi_battery_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "battery", CTLFLAG_RD, @@ -508,14 +525,17 @@ acpi_battery_init(void) &acpi_battery_info_expire, 0, "time in seconds until info is refreshed"); - acpi_batteries_initted = TRUE; + acpi_batteries_initialized = TRUE; out: - if (error != 0) { + if (error) { acpi_deregister_ioctl(ACPIIO_BATT_GET_UNITS, acpi_battery_ioctl); acpi_deregister_ioctl(ACPIIO_BATT_GET_BATTINFO, acpi_battery_ioctl); + acpi_deregister_ioctl(ACPIIO_BATT_GET_BATTINFO_V1, acpi_battery_ioctl); acpi_deregister_ioctl(ACPIIO_BATT_GET_BIF, acpi_battery_ioctl); + acpi_deregister_ioctl(ACPIIO_BATT_GET_BIX, acpi_battery_ioctl); acpi_deregister_ioctl(ACPIIO_BATT_GET_BST, acpi_battery_ioctl); + acpi_deregister_ioctl(ACPIIO_BATT_GET_BST_V1, acpi_battery_ioctl); } return (error); } Modified: stable/12/sys/dev/acpica/acpi_cmbat.c ============================================================================== --- stable/12/sys/dev/acpica/acpi_cmbat.c Wed Mar 18 17:42:18 2020 (r359075) +++ stable/12/sys/dev/acpica/acpi_cmbat.c Wed Mar 18 18:02:33 2020 (r359076) @@ -61,12 +61,13 @@ ACPI_MODULE_NAME("BATTERY") #define ACPI_BATTERY_BST_CHANGE 0x80 #define ACPI_BATTERY_BIF_CHANGE 0x81 +#define ACPI_BATTERY_BIX_CHANGE ACPI_BATTERY_BIF_CHANGE struct acpi_cmbat_softc { device_t dev; int flags; - struct acpi_bif bif; + struct acpi_bix bix; struct acpi_bst bst; struct timespec bst_lastupdated; }; @@ -82,10 +83,10 @@ static void acpi_cmbat_notify_handler(ACPI_HANDLE h, static int acpi_cmbat_info_expired(struct timespec *lastupdated); static void acpi_cmbat_info_updated(struct timespec *lastupdated); static void acpi_cmbat_get_bst(void *arg); -static void acpi_cmbat_get_bif_task(void *arg); -static void acpi_cmbat_get_bif(void *arg); -static int acpi_cmbat_bst(device_t dev, struct acpi_bst *bstp); -static int acpi_cmbat_bif(device_t dev, struct acpi_bif *bifp); +static void acpi_cmbat_get_bix_task(void *arg); +static void acpi_cmbat_get_bix(void *arg); +static int acpi_cmbat_bst(device_t, struct acpi_bst *); +static int acpi_cmbat_bix(device_t, void *, size_t); static void acpi_cmbat_init_battery(void *arg); static device_method_t acpi_cmbat_methods[] = { @@ -96,7 +97,7 @@ static device_method_t acpi_cmbat_methods[] = { DEVMETHOD(device_resume, acpi_cmbat_resume), /* ACPI battery interface */ - DEVMETHOD(acpi_batt_get_info, acpi_cmbat_bif), + DEVMETHOD(acpi_batt_get_info, acpi_cmbat_bix), DEVMETHOD(acpi_batt_get_status, acpi_cmbat_bst), DEVMETHOD_END @@ -204,12 +205,12 @@ acpi_cmbat_notify_handler(ACPI_HANDLE h, UINT32 notify timespecclear(&sc->bst_lastupdated); break; case ACPI_NOTIFY_BUS_CHECK: - case ACPI_BATTERY_BIF_CHANGE: + case ACPI_BATTERY_BIX_CHANGE: /* * Queue a callback to get the current battery info from thread * context. It's not safe to block in a notify handler. */ - AcpiOsExecute(OSL_NOTIFY_HANDLER, acpi_cmbat_get_bif_task, dev); + AcpiOsExecute(OSL_NOTIFY_HANDLER, acpi_cmbat_get_bix_task, dev); break; } @@ -268,15 +269,15 @@ acpi_cmbat_get_bst(void *arg) as = AcpiEvaluateObject(h, "_BST", NULL, &bst_buffer); if (ACPI_FAILURE(as)) { ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), - "error fetching current battery status -- %s\n", - AcpiFormatException(as)); + "error fetching current battery status -- %s\n", + AcpiFormatException(as)); goto end; } res = (ACPI_OBJECT *)bst_buffer.Pointer; if (!ACPI_PKG_VALID(res, 4)) { ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), - "battery status corrupted\n"); + "battery status corrupted\n"); goto end; } @@ -306,119 +307,207 @@ acpi_cmbat_get_bst(void *arg) sc->flags &= ~ACPI_BATT_STAT_CRITICAL; end: - if (bst_buffer.Pointer != NULL) - AcpiOsFree(bst_buffer.Pointer); + AcpiOsFree(bst_buffer.Pointer); } /* XXX There should be a cleaner way to do this locking. */ static void -acpi_cmbat_get_bif_task(void *arg) +acpi_cmbat_get_bix_task(void *arg) { ACPI_SERIAL_BEGIN(cmbat); - acpi_cmbat_get_bif(arg); + acpi_cmbat_get_bix(arg); ACPI_SERIAL_END(cmbat); } static void -acpi_cmbat_get_bif(void *arg) +acpi_cmbat_get_bix(void *arg) { struct acpi_cmbat_softc *sc; ACPI_STATUS as; ACPI_OBJECT *res; ACPI_HANDLE h; - ACPI_BUFFER bif_buffer; + ACPI_BUFFER bix_buffer; device_t dev; + int i, n; + const struct { + enum { _BIX, _BIF } type; + char *name; + } bobjs[] = { + { _BIX, "_BIX"}, + { _BIF, "_BIF"}, + }; ACPI_SERIAL_ASSERT(cmbat); dev = arg; sc = device_get_softc(dev); h = acpi_get_handle(dev); - bif_buffer.Pointer = NULL; - bif_buffer.Length = ACPI_ALLOCATE_BUFFER; + bix_buffer.Pointer = NULL; + bix_buffer.Length = ACPI_ALLOCATE_BUFFER; - as = AcpiEvaluateObject(h, "_BIF", NULL, &bif_buffer); - if (ACPI_FAILURE(as)) { + for (n = 0; n < sizeof(bobjs); n++) { + as = AcpiEvaluateObject(h, bobjs[n].name, NULL, &bix_buffer); + if (!ACPI_FAILURE(as)) { + res = (ACPI_OBJECT *)bix_buffer.Pointer; + break; + } + AcpiOsFree(bix_buffer.Pointer); + bix_buffer.Pointer = NULL; + bix_buffer.Length = ACPI_ALLOCATE_BUFFER; + } + /* Both _BIF and _BIX were not found. */ + if (n == sizeof(bobjs)) { ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), - "error fetching current battery info -- %s\n", - AcpiFormatException(as)); + "error fetching current battery info -- %s\n", + AcpiFormatException(as)); goto end; } - res = (ACPI_OBJECT *)bif_buffer.Pointer; - if (!ACPI_PKG_VALID(res, 13)) { - ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), - "battery info corrupted\n"); - goto end; + /* + * ACPI _BIX and _BIF revision mismatch check: + * + * 1. _BIF has no revision field. The number of fields must be 13. + * + * 2. _BIX has a revision field. As of ACPI 6.3 it must be "0" or + * "1". The number of fields will be checked---20 and 21, + * respectively. + * + * If the revision number is grater than "1" and the number of + * fields is grater than 21, it will be treated as compatible with + * ACPI 6.0 _BIX. If not, it will be ignored. + */ + i = 0; + switch (bobjs[n].type) { + case _BIX: + if (acpi_PkgInt16(res, i++, &sc->bix.rev) != 0) { + ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), + "_BIX revision error\n"); + goto end; + } +#define ACPI_BIX_REV_MISMATCH_ERR(x, r) do { \ + ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), \ + "_BIX revision mismatch (%u != %u)\n", x, r); \ + goto end; \ + } while (0) + + if (ACPI_PKG_VALID_EQ(res, 21)) { /* ACPI 6.0 _BIX */ + /* + * Some models have rev.0 _BIX with 21 members. + * In that case, treat the first 20 members as rev.0 _BIX. + */ + if (sc->bix.rev != ACPI_BIX_REV_0 && + sc->bix.rev != ACPI_BIX_REV_1) + ACPI_BIX_REV_MISMATCH_ERR(sc->bix.rev, ACPI_BIX_REV_1); + } else if (ACPI_PKG_VALID_EQ(res, 20)) {/* ACPI 4.0 _BIX */ + if (sc->bix.rev != ACPI_BIX_REV_0) + ACPI_BIX_REV_MISMATCH_ERR(sc->bix.rev, ACPI_BIX_REV_0); + } else if (ACPI_PKG_VALID(res, 22)) { + /* _BIX with 22 or more members. */ + if (ACPI_BIX_REV_MIN_CHECK(sc->bix.rev, ACPI_BIX_REV_1 + 1)) { + /* + * Unknown revision number. + * Assume 21 members are compatible with 6.0 _BIX. + */ + ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), + "Unknown _BIX revision(%u). " + "Assuming compatible with revision %u.\n", + sc->bix.rev, ACPI_BIX_REV_1); + } else { + /* + * Known revision number. Ignore the extra members. + */ + ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), + "Extra objects found in _BIX were ignored.\n"); + } + } else { + /* Invalid _BIX. Ignore it. */ + ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), + "Invalid _BIX found (rev=%u, count=%u). Ignored.\n", + sc->bix.rev, res->Package.Count); + goto end; + } + break; +#undef ACPI_BIX_REV_MISMATCH_ERR + case _BIF: + if (ACPI_PKG_VALID_EQ(res, 13)) /* _BIF */ + sc->bix.rev = ACPI_BIX_REV_BIF; + else { + ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), + "Invalid _BIF found (count=%u). Ignored.\n", + res->Package.Count); + goto end; + } + break; } - if (acpi_PkgInt32(res, 0, &sc->bif.units) != 0) - goto end; - if (acpi_PkgInt32(res, 1, &sc->bif.dcap) != 0) - goto end; - if (acpi_PkgInt32(res, 2, &sc->bif.lfcap) != 0) - goto end; - if (acpi_PkgInt32(res, 3, &sc->bif.btech) != 0) - goto end; - if (acpi_PkgInt32(res, 4, &sc->bif.dvol) != 0) - goto end; - if (acpi_PkgInt32(res, 5, &sc->bif.wcap) != 0) - goto end; - if (acpi_PkgInt32(res, 6, &sc->bif.lcap) != 0) - goto end; - if (acpi_PkgInt32(res, 7, &sc->bif.gra1) != 0) - goto end; - if (acpi_PkgInt32(res, 8, &sc->bif.gra2) != 0) - goto end; - if (acpi_PkgStr(res, 9, sc->bif.model, ACPI_CMBAT_MAXSTRLEN) != 0) - goto end; - if (acpi_PkgStr(res, 10, sc->bif.serial, ACPI_CMBAT_MAXSTRLEN) != 0) - goto end; - if (acpi_PkgStr(res, 11, sc->bif.type, ACPI_CMBAT_MAXSTRLEN) != 0) - goto end; - if (acpi_PkgStr(res, 12, sc->bif.oeminfo, ACPI_CMBAT_MAXSTRLEN) != 0) - goto end; + ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), + "rev = %04x\n", sc->bix.rev); +#define BIX_GETU32(NAME) do { \ + ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), \ + #NAME " = %u\n", sc->bix.NAME); \ + if (acpi_PkgInt32(res, i++, &sc->bix.NAME) != 0) \ + goto end; \ + } while (0) + BIX_GETU32(units); + BIX_GETU32(dcap); + BIX_GETU32(lfcap); + BIX_GETU32(btech); + BIX_GETU32(dvol); + BIX_GETU32(wcap); + BIX_GETU32(lcap); + if (ACPI_BIX_REV_MIN_CHECK(sc->bix.rev, ACPI_BIX_REV_0)) { + BIX_GETU32(cycles); + BIX_GETU32(accuracy); + BIX_GETU32(stmax); + BIX_GETU32(stmin); + BIX_GETU32(aimax); + BIX_GETU32(aimin); + } + BIX_GETU32(gra1); + BIX_GETU32(gra2); + if (acpi_PkgStr(res, i++, sc->bix.model, ACPI_CMBAT_MAXSTRLEN) != 0) + goto end; + if (acpi_PkgStr(res, i++, sc->bix.serial, ACPI_CMBAT_MAXSTRLEN) != 0) + goto end; + if (acpi_PkgStr(res, i++, sc->bix.type, ACPI_CMBAT_MAXSTRLEN) != 0) + goto end; + if (acpi_PkgStr(res, i++, sc->bix.oeminfo, ACPI_CMBAT_MAXSTRLEN) != 0) + goto end; + if (ACPI_BIX_REV_MIN_CHECK(sc->bix.rev, ACPI_BIX_REV_1)) + BIX_GETU32(scap); +#undef BIX_GETU32 end: - if (bif_buffer.Pointer != NULL) - AcpiOsFree(bif_buffer.Pointer); + AcpiOsFree(bix_buffer.Pointer); } static int -acpi_cmbat_bif(device_t dev, struct acpi_bif *bifp) +acpi_cmbat_bix(device_t dev, void *bix, size_t len) { struct acpi_cmbat_softc *sc; + if (len != sizeof(struct acpi_bix) && + len != sizeof(struct acpi_bif)) + return (-1); + sc = device_get_softc(dev); /* * Just copy the data. The only value that should change is the * last-full capacity, so we only update when we get a notify that says * the info has changed. Many systems apparently take a long time to - * process a _BIF call so we avoid it if possible. + * process a _BI[FX] call so we avoid it if possible. */ ACPI_SERIAL_BEGIN(cmbat); - bifp->units = sc->bif.units; - bifp->dcap = sc->bif.dcap; - bifp->lfcap = sc->bif.lfcap; - bifp->btech = sc->bif.btech; - bifp->dvol = sc->bif.dvol; - bifp->wcap = sc->bif.wcap; - bifp->lcap = sc->bif.lcap; - bifp->gra1 = sc->bif.gra1; - bifp->gra2 = sc->bif.gra2; - strncpy(bifp->model, sc->bif.model, sizeof(sc->bif.model)); - strncpy(bifp->serial, sc->bif.serial, sizeof(sc->bif.serial)); - strncpy(bifp->type, sc->bif.type, sizeof(sc->bif.type)); - strncpy(bifp->oeminfo, sc->bif.oeminfo, sizeof(sc->bif.oeminfo)); + memcpy(bix, &sc->bix, len); ACPI_SERIAL_END(cmbat); return (0); } static int -acpi_cmbat_bst(device_t dev, struct acpi_bst *bstp) +acpi_cmbat_bst(device_t dev, struct acpi_bst *bst) { struct acpi_cmbat_softc *sc; @@ -427,12 +516,9 @@ acpi_cmbat_bst(device_t dev, struct acpi_bst *bstp) ACPI_SERIAL_BEGIN(cmbat); if (acpi_BatteryIsPresent(dev)) { acpi_cmbat_get_bst(dev); - bstp->state = sc->bst.state; - bstp->rate = sc->bst.rate; - bstp->cap = sc->bst.cap; - bstp->volt = sc->bst.volt; + memcpy(bst, &sc->bst, sizeof(*bst)); } else - bstp->state = ACPI_BATT_STAT_NOT_PRESENT; + bst->state = ACPI_BATT_STAT_NOT_PRESENT; ACPI_SERIAL_END(cmbat); return (0); @@ -447,7 +533,7 @@ acpi_cmbat_init_battery(void *arg) dev = (device_t)arg; ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), - "battery initialization start\n"); + "battery enitialization start\n"); /* * Try repeatedly to get valid data from the battery. Since the @@ -486,11 +572,11 @@ acpi_cmbat_init_battery(void *arg) timespecclear(&sc->bst_lastupdated); acpi_cmbat_get_bst(dev); } - if (retry == 0 || !acpi_battery_bif_valid(&sc->bif)) - acpi_cmbat_get_bif(dev); + if (retry == 0 || !acpi_battery_bix_valid(&sc->bix)) + acpi_cmbat_get_bix(dev); valid = acpi_battery_bst_valid(&sc->bst) && - acpi_battery_bif_valid(&sc->bif); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Wed Mar 18 18:10:46 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 20F7B268223; Wed, 18 Mar 2020 18:10:46 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jJ4P6Rbsz4gWw; Wed, 18 Mar 2020 18:10:45 +0000 (UTC) (envelope-from hrs@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 4E4B025E69; Wed, 18 Mar 2020 18:10:45 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02IIAj2K003022; Wed, 18 Mar 2020 18:10:45 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02IIAjLf003021; Wed, 18 Mar 2020 18:10:45 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202003181810.02IIAjLf003021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 18 Mar 2020 18:10:45 +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: r359077 - in stable: 11/bin/sh 12/bin/sh X-SVN-Group: stable-12 X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: in stable: 11/bin/sh 12/bin/sh X-SVN-Commit-Revision: 359077 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.29 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, 18 Mar 2020 18:10:46 -0000 Author: hrs Date: Wed Mar 18 18:10:44 2020 New Revision: 359077 URL: https://svnweb.freebsd.org/changeset/base/359077 Log: MFC of r358152 and r328235: Improve performance of "read" built-in command when using a seekable fd. The read built-in command calls read(2) with a 1-byte buffer because newline characters need to be detected even on a byte stream which comes from a non-seekable file descriptor. Because of this, the following script calls >6,000 read(2) to show a 6-KiB file: while read IN; do echo "$IN"; done < /COPYRIGHT When the input byte stream is seekable, it is possible to read a data block and then reposition the file pointer to where a newline character found. This change adds a small buffer to do this and reduces the number of read(2) calls. Theoretically, multiple built-in commands reading the same seekable byte stream in a single pipe chain can share the buffer. However, this change just makes a single invocation of the read built-in allocate a buffer and deallocate it every time for simplicity. Although this causes read(2) to read the same regions multiple times, the performance penalty should be small compared to the reduction of read(2) calls. Reviewed by: jilles Differential Revision: https://reviews.freebsd.org/D23747 Modified: stable/12/bin/sh/miscbltin.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/bin/sh/miscbltin.c Directory Properties: stable/11/ (props changed) Modified: stable/12/bin/sh/miscbltin.c ============================================================================== --- stable/12/bin/sh/miscbltin.c Wed Mar 18 18:02:33 2020 (r359076) +++ stable/12/bin/sh/miscbltin.c Wed Mar 18 18:10:44 2020 (r359077) @@ -66,10 +66,79 @@ __FBSDID("$FreeBSD$"); #undef eflag +#define READ_BUFLEN 1024 +struct fdctx { + int fd; + size_t off; /* offset in buf */ + size_t buflen; + char *ep; /* tail pointer */ + char buf[READ_BUFLEN]; +}; + +static void fdctx_init(int, struct fdctx *); +static void fdctx_destroy(struct fdctx *); +static ssize_t fdgetc(struct fdctx *, char *); int readcmd(int, char **); int umaskcmd(int, char **); int ulimitcmd(int, char **); +static void +fdctx_init(int fd, struct fdctx *fdc) +{ + off_t cur; + + /* Check if fd is seekable. */ + cur = lseek(fd, 0, SEEK_CUR); + *fdc = (struct fdctx){ + .fd = fd, + .buflen = (cur != -1) ? READ_BUFLEN : 1, + .ep = &fdc->buf[0], /* No data */ + }; +} + +static ssize_t +fdgetc(struct fdctx *fdc, char *c) +{ + ssize_t nread; + + if (&fdc->buf[fdc->off] == fdc->ep) { + nread = read(fdc->fd, fdc->buf, fdc->buflen); + if (nread > 0) { + fdc->off = 0; + fdc->ep = fdc->buf + nread; + } else + return (nread); + } + *c = fdc->buf[fdc->off++]; + + return (1); +} + +static void +fdctx_destroy(struct fdctx *fdc) +{ + off_t residue; + + if (fdc->buflen > 1) { + /* + * Reposition the file offset. Here is the layout of buf: + * + * | off + * v + * |*****************|-------| + * buf ep buf+buflen + * |<- residue ->| + * + * off: current character + * ep: offset just after read(2) + * residue: length for reposition + */ + residue = (fdc->ep - fdc->buf) - fdc->off; + if (residue > 0) + (void) lseek(fdc->fd, -residue, SEEK_CUR); + } +} + /* * The read builtin. The -r option causes backslashes to be treated like * ordinary characters. @@ -108,6 +177,7 @@ readcmd(int argc __unused, char **argv __unused) fd_set ifds; ssize_t nread; int sig; + struct fdctx fdctx; rflag = 0; prompt = NULL; @@ -173,8 +243,9 @@ readcmd(int argc __unused, char **argv __unused) backslash = 0; STARTSTACKSTR(p); lastnonifs = lastnonifsws = -1; + fdctx_init(STDIN_FILENO, &fdctx); for (;;) { - nread = read(STDIN_FILENO, &c, 1); + nread = fdgetc(&fdctx, &c); if (nread == -1) { if (errno == EINTR) { sig = pendingsig; @@ -260,6 +331,7 @@ readcmd(int argc __unused, char **argv __unused) STARTSTACKSTR(p); lastnonifs = lastnonifsws = -1; } + fdctx_destroy(&fdctx); STACKSTRNUL(p); /* From owner-svn-src-stable-12@freebsd.org Wed Mar 18 18:16:01 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 54F06268517; Wed, 18 Mar 2020 18:16:01 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jJBS738nz4sZN; Wed, 18 Mar 2020 18:16:00 +0000 (UTC) (envelope-from hrs@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 C5E3B25F1F; Wed, 18 Mar 2020 18:16:00 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02IIG0qF009111; Wed, 18 Mar 2020 18:16:00 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02IIG08G009109; Wed, 18 Mar 2020 18:16:00 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202003181816.02IIG08G009109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 18 Mar 2020 18:16: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: r359078 - stable/12/sys/dev/rtwn/pci X-SVN-Group: stable-12 X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: stable/12/sys/dev/rtwn/pci X-SVN-Commit-Revision: 359078 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.29 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, 18 Mar 2020 18:16:01 -0000 Author: hrs Date: Wed Mar 18 18:16:00 2020 New Revision: 359078 URL: https://svnweb.freebsd.org/changeset/base/359078 Log: MFC of r358402: Add MODULE_PNP_INFO() to autoload the rtwn_pci(4) kernel module. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D23807 Modified: stable/12/sys/dev/rtwn/pci/rtwn_pci_attach.c stable/12/sys/dev/rtwn/pci/rtwn_pci_attach.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/rtwn/pci/rtwn_pci_attach.c ============================================================================== --- stable/12/sys/dev/rtwn/pci/rtwn_pci_attach.c Wed Mar 18 18:10:44 2020 (r359077) +++ stable/12/sys/dev/rtwn/pci/rtwn_pci_attach.c Wed Mar 18 18:16:00 2020 (r359078) @@ -96,15 +96,16 @@ static void rtwn_pci_attach_methods(struct rtwn_softc static const struct rtwn_pci_ident * rtwn_pci_probe_sub(device_t dev) { - const struct rtwn_pci_ident *ident; - int vendor_id, device_id; + int i, vendor_id, device_id; vendor_id = pci_get_vendor(dev); device_id = pci_get_device(dev); - for (ident = rtwn_pci_ident_table; ident->name != NULL; ident++) - if (vendor_id == ident->vendor && device_id == ident->device) - return (ident); + for (i = 0; i < nitems(rtwn_pci_ident_table); i++) { + if (vendor_id == rtwn_pci_ident_table[i].vendor && + device_id == rtwn_pci_ident_table[i].device) + return (&rtwn_pci_ident_table[i]); + } return (NULL); } @@ -788,6 +789,8 @@ static devclass_t rtwn_pci_devclass; DRIVER_MODULE(rtwn_pci, pci, rtwn_pci_driver, rtwn_pci_devclass, NULL, NULL); MODULE_VERSION(rtwn_pci, 1); +MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, rtwn, rtwn_pci_ident_table, + nitems(rtwn_pci_ident_table)); MODULE_DEPEND(rtwn_pci, pci, 1, 1, 1); MODULE_DEPEND(rtwn_pci, wlan, 1, 1, 1); MODULE_DEPEND(rtwn_pci, rtwn, 2, 2, 2); Modified: stable/12/sys/dev/rtwn/pci/rtwn_pci_attach.h ============================================================================== --- stable/12/sys/dev/rtwn/pci/rtwn_pci_attach.h Wed Mar 18 18:10:44 2020 (r359077) +++ stable/12/sys/dev/rtwn/pci/rtwn_pci_attach.h Wed Mar 18 18:16:00 2020 (r359078) @@ -35,7 +35,6 @@ struct rtwn_pci_ident { static const struct rtwn_pci_ident rtwn_pci_ident_table[] = { { 0x10ec, 0x8176, "Realtek RTL8188CE", RTWN_CHIP_RTL8192CE }, { 0x10ec, 0x8179, "Realtek RTL8188EE", RTWN_CHIP_RTL8188EE }, - { 0, 0, NULL, RTWN_CHIP_MAX_PCI } }; typedef void (*chip_pci_attach)(struct rtwn_pci_softc *); From owner-svn-src-stable-12@freebsd.org Wed Mar 18 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 351292689D3; Wed, 18 Mar 2020 18:22:00 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jJKM3kPDz3NJ3; Wed, 18 Mar 2020 18:21:59 +0000 (UTC) (envelope-from hrs@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 5C1F0260B5; Wed, 18 Mar 2020 18:21:59 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02IILxXQ014043; Wed, 18 Mar 2020 18:21:59 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02IILxet014042; Wed, 18 Mar 2020 18:21:59 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202003181821.02IILxet014042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 18 Mar 2020 18:21: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: r359081 - stable/12/contrib/sendmail/src X-SVN-Group: stable-12 X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: stable/12/contrib/sendmail/src X-SVN-Commit-Revision: 359081 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.29 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, 18 Mar 2020 18:22:00 -0000 Author: hrs Date: Wed Mar 18 18:21:58 2020 New Revision: 359081 URL: https://svnweb.freebsd.org/changeset/base/359081 Log: MFC of r358404, r358410, r358412, and r358413: Fix broken STARTTLS when SharedMemoryKey is enabled. OpenSSL 1.1 API patch for sendmail had a bug which prevented sm_RSA_generate_key() function from working. This function is used to generate a temporary RSA key for a shared memory region used for TLS processing. Note that 12.0 and 12.1-RELEASE include this bug. This affects only if SM_CONF_SHM compile-time option (enabled by default) and SharedMemoryKey run-time option (not enabled by default) in a .cf file are specified. The latter corresponds to confSHARED_MEMORY_KEY in a .mc file. Fix style inconsistencies. Do not free p and g parameters after calling DH_set0_pqg(3). PR: 242861 Differential Revision: https://reviews.freebsd.org/D23734 Modified: stable/12/contrib/sendmail/src/tls.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/sendmail/src/tls.c ============================================================================== --- stable/12/contrib/sendmail/src/tls.c Wed Mar 18 18:20:55 2020 (r359080) +++ stable/12/contrib/sendmail/src/tls.c Wed Mar 18 18:21:58 2020 (r359081) @@ -56,10 +56,10 @@ DH_set0_pqg(dh, p, q, g) BIGNUM *q; BIGNUM *g; { - dh->p=p; + dh->p = p; if (q != NULL) - dh->q=q; - dh->g=g; + dh->q = q; + dh->g = g; return 1; /* success */ } # endif /* !defined() || OPENSSL_VERSION_NUMBER < 0x00907000L */ @@ -83,20 +83,25 @@ static unsigned char dh512_g[] = static DH * get_dh512() { - DH *dh = NULL; + DH *dh; BIGNUM *dhp_bn, *dhg_bn; if ((dh = DH_new()) == NULL) return NULL; dhp_bn = BN_bin2bn(dh512_p, sizeof(dh512_p), NULL); dhg_bn = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL); - if ((dhp_bn == NULL) || (dhg_bn == NULL) || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) + if ((dhp_bn == NULL) || (dhg_bn == NULL)) { DH_free(dh); BN_free(dhp_bn); BN_free(dhg_bn); - return(NULL); + return NULL; } + if (!DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) + { + DH_free(dh); + return NULL; + } return dh; } @@ -117,7 +122,7 @@ oK0jjSXgFyeU4/NfyA+zuNeWzUL6bHmigwIBAg== static DH * get_dh2048() { - static unsigned char dh2048_p[]={ + static unsigned char dh2048_p[] = { 0xAC,0x37,0x20,0x70,0xBA,0x71,0x12,0x4B,0x10,0x1C,0xF9,0x68, 0x95,0x12,0x82,0x50,0x9D,0xAC,0xCC,0xA4,0x73,0x8A,0xC7,0x96, 0x57,0xD7,0x14,0x49,0x03,0x59,0x1B,0x1A,0x06,0xC3,0xB2,0xA4, @@ -141,22 +146,27 @@ get_dh2048() 0xE3,0xF3,0x5F,0xC8,0x0F,0xB3,0xB8,0xD7,0x96,0xCD,0x42,0xFA, 0x6C,0x79,0xA2,0x83, }; - static unsigned char dh2048_g[]={ 0x02, }; + static unsigned char dh2048_g[] = { 0x02, }; DH *dh; BIGNUM *dhp_bn, *dhg_bn; - if ((dh=DH_new()) == NULL) - return(NULL); - dhp_bn = BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL); - dhg_bn = BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL); - if ((dhp_bn == NULL) || (dhg_bn == NULL) || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) + if ((dh = DH_new()) == NULL) + return NULL; + dhp_bn = BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL); + dhg_bn = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL); + if ((dhp_bn == NULL) || (dhg_bn == NULL)) { DH_free(dh); BN_free(dhp_bn); BN_free(dhg_bn); - return(NULL); + return NULL; } - return(dh); + if (!DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) + { + DH_free(dh); + return NULL; + } + return dh; } # endif /* !NO_DH */ @@ -744,19 +754,16 @@ sm_RSA_generate_key(num, e) unsigned long e; { RSA *rsa = NULL; - BIGNUM *bn_rsa_r4; - int rc; + BIGNUM *bn_rsa_r4; bn_rsa_r4 = BN_new(); - rc = BN_set_word(bn_rsa_r4, RSA_F4); - if ((bn_rsa_r4 != NULL) && BN_set_word(bn_rsa_r4, RSA_F4) && (rsa = RSA_new()) != NULL) + if ((bn_rsa_r4 != NULL) && BN_set_word(bn_rsa_r4, e) && (rsa = RSA_new()) != NULL) { - if (!RSA_generate_key_ex(rsa, RSA_KEYLENGTH, bn_rsa_r4, NULL)) + if (!RSA_generate_key_ex(rsa, num, bn_rsa_r4, NULL)) { RSA_free(rsa); rsa = NULL; } - return NULL; } BN_free(bn_rsa_r4); return rsa; @@ -1263,7 +1270,7 @@ inittls(ctx, req, options, srv, certfile, keyfile, cac if (tTd(96, 2)) sm_dprintf("inittls: Generating %d bit DH parameters\n", bits); - dsa=DSA_new(); + dsa = DSA_new(); /* this takes a while! */ (void)DSA_generate_parameters_ex(dsa, bits, NULL, 0, NULL, NULL, NULL); From owner-svn-src-stable-12@freebsd.org Wed Mar 18 23:53:08 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 AD63B270FCD; Wed, 18 Mar 2020 23:53:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jRgS3G0Vz4g2Q; Wed, 18 Mar 2020 23:53:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6A4F11ECD; Wed, 18 Mar 2020 23:53:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02INr8Hp014168; Wed, 18 Mar 2020 23:53:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02INr82J014167; Wed, 18 Mar 2020 23:53:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003182353.02INr82J014167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 18 Mar 2020 23:53:08 +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: r359108 - stable/12/sys/dev/ciss X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/ciss X-SVN-Commit-Revision: 359108 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.29 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, 18 Mar 2020 23:53:08 -0000 Author: mav Date: Wed Mar 18 23:53:07 2020 New Revision: 359108 URL: https://svnweb.freebsd.org/changeset/base/359108 Log: MFC r349011 (by imp): Don't print the request we may be aborting in ciss_notify_abort as part of ciss_detach. It's a left-over debug that isn't needed and also discloses a kernel address. Only root could provoke as part of a devctl or kldunload. Submitted by: Fuqian Huang Modified: stable/12/sys/dev/ciss/ciss.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ciss/ciss.c ============================================================================== --- stable/12/sys/dev/ciss/ciss.c Wed Mar 18 23:21:49 2020 (r359107) +++ stable/12/sys/dev/ciss/ciss.c Wed Mar 18 23:53:07 2020 (r359108) @@ -107,6 +107,10 @@ #include #include +#ifdef CISS_DEBUG +#include "opt_ddb.h" +#endif + static MALLOC_DEFINE(CISS_MALLOC_CLASS, "ciss_data", "ciss internal data buffers"); @@ -197,7 +201,9 @@ static void ciss_notify_logical(struct ciss_softc *sc, static void ciss_notify_physical(struct ciss_softc *sc, struct ciss_notify *cn); /* debugging output */ +#ifdef DDB static void ciss_print_request(struct ciss_request *cr); +#endif static void ciss_print_ldrive(struct ciss_softc *sc, struct ciss_ldrive *ld); static const char *ciss_name_ldrive_status(int status); static int ciss_decode_ldrive_status(int status); @@ -3811,8 +3817,9 @@ ciss_notify_abort(struct ciss_softc *sc) cnc->opcode = CISS_OPCODE_WRITE; cnc->command = CISS_COMMAND_ABORT_NOTIFY; cnc->length = htonl(CISS_NOTIFY_DATA_SIZE); - +#if 0 ciss_print_request(cr); +#endif /* * Submit the request and wait for it to complete. @@ -4237,6 +4244,7 @@ ciss_kill_notify_thread(struct ciss_softc *sc) /************************************************************************ * Print a request. */ +#ifdef DDB static void ciss_print_request(struct ciss_request *cr) { @@ -4290,6 +4298,7 @@ ciss_print_request(struct ciss_request *cr) } } } +#endif /************************************************************************ * Print information about the status of a logical drive. @@ -4353,8 +4362,6 @@ ciss_print_ldrive(struct ciss_softc *sc, struct ciss_l } } -#ifdef CISS_DEBUG -#include "opt_ddb.h" #ifdef DDB #include /************************************************************************ @@ -4408,7 +4415,6 @@ DB_COMMAND(ciss_prt, db_ciss_prt) ciss_print_adapter(sc); } } -#endif #endif /************************************************************************ From owner-svn-src-stable-12@freebsd.org Thu Mar 19 01:50:26 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 4D72627533C; Thu, 19 Mar 2020 01:50:26 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jVGn5qRPz4GBb; Thu, 19 Mar 2020 01:50:25 +0000 (UTC) (envelope-from gonzo@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 64C1C340C; Thu, 19 Mar 2020 01:50:25 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02J1oP6g080645; Thu, 19 Mar 2020 01:50:25 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02J1oPrR080644; Thu, 19 Mar 2020 01:50:25 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202003190150.02J1oPrR080644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 19 Mar 2020 01:50:25 +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: r359113 - stable/12/sys/dev/sound/pci/hda X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/sys/dev/sound/pci/hda X-SVN-Commit-Revision: 359113 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.29 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, 19 Mar 2020 01:50:26 -0000 Author: gonzo Date: Thu Mar 19 01:50:24 2020 New Revision: 359113 URL: https://svnweb.freebsd.org/changeset/base/359113 Log: MFC r352775-r352776 r352775: snd_hda: Add Intel Cannon Lake support Add PCI ids for Intel Cannon Lake PCH Tested on: HP Spectre x360 13-p0043dx PR: 240574 Submitted by: Neel Chauhan Reviewed by: imp, mizhka, ray Differential Revision: https://reviews.freebsd.org/D21789 r352776: snd_hda: Add Intel Cannon Lake support Add missing header change ommitted in r352775 X-MFC-with: 352775 Modified: stable/12/sys/dev/sound/pci/hda/hdac.c stable/12/sys/dev/sound/pci/hda/hdac.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/12/sys/dev/sound/pci/hda/hdac.c Thu Mar 19 01:05:54 2020 (r359112) +++ stable/12/sys/dev/sound/pci/hda/hdac.c Thu Mar 19 01:50:24 2020 (r359113) @@ -102,6 +102,7 @@ static const struct { { HDA_INTEL_KBLK, "Intel Kaby Lake", 0, 0 }, { HDA_INTEL_KBLKH, "Intel Kaby Lake-H", 0, 0 }, { HDA_INTEL_CFLK, "Intel Coffee Lake", 0, 0 }, + { HDA_INTEL_CNLK, "Intel Cannon Lake", 0, 0 }, { HDA_INTEL_82801F, "Intel 82801F", 0, 0 }, { HDA_INTEL_63XXESB, "Intel 631x/632xESB", 0, 0 }, { HDA_INTEL_82801G, "Intel 82801G", 0, 0 }, Modified: stable/12/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/12/sys/dev/sound/pci/hda/hdac.h Thu Mar 19 01:05:54 2020 (r359112) +++ stable/12/sys/dev/sound/pci/hda/hdac.h Thu Mar 19 01:50:24 2020 (r359113) @@ -77,6 +77,7 @@ #define HDA_INTEL_KBLK HDA_MODEL_CONSTRUCT(INTEL, 0xa171) #define HDA_INTEL_KBLKH HDA_MODEL_CONSTRUCT(INTEL, 0xa2f0) #define HDA_INTEL_CFLK HDA_MODEL_CONSTRUCT(INTEL, 0xa348) +#define HDA_INTEL_CNLK HDA_MODEL_CONSTRUCT(INTEL, 0x9dc8) #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) /* Nvidia */ From owner-svn-src-stable-12@freebsd.org Thu Mar 19 03:29: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 75D15278F07; Thu, 19 Mar 2020 03:29:48 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jXTS1Cssz3wh2; Thu, 19 Mar 2020 03:29:48 +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 C12B04A12; Thu, 19 Mar 2020 03:29:47 +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 02J3Tlta041537; Thu, 19 Mar 2020 03:29:47 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02J3Tljr041536; Thu, 19 Mar 2020 03:29:47 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003190329.02J3Tljr041536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 19 Mar 2020 03:29: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: r359115 - in stable: 11/lib/libpam/modules/pam_login_access 12/lib/libpam/modules/pam_login_access X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/lib/libpam/modules/pam_login_access 12/lib/libpam/modules/pam_login_access X-SVN-Commit-Revision: 359115 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.29 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, 19 Mar 2020 03:29:48 -0000 Author: cy Date: Thu Mar 19 03:29:46 2020 New Revision: 359115 URL: https://svnweb.freebsd.org/changeset/base/359115 Log: MFC r358065: The words ALL, LOCAL, and EXCEPT have special meaning and are documented as in the login.access(5) man page. However strcasecmp() is used to compare for these special strings. Because of this User accounts and groups with the corresponding lowercase names are misintrepreted to have special whereas they should not. This commit fixes this, conforming to the man page and to how the Linux pam_access(8) handles these special words. Approved by: des (implicit, blanket) Modified: stable/12/lib/libpam/modules/pam_login_access/login_access.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libpam/modules/pam_login_access/login_access.c Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libpam/modules/pam_login_access/login_access.c ============================================================================== --- stable/12/lib/libpam/modules/pam_login_access/login_access.c Thu Mar 19 02:22:08 2020 (r359114) +++ stable/12/lib/libpam/modules/pam_login_access/login_access.c Thu Mar 19 03:29:46 2020 (r359115) @@ -125,7 +125,7 @@ list_match(char *list, const char *item, */ for (tok = strtok(list, sep); tok != NULL; tok = strtok((char *) 0, sep)) { - if (strcasecmp(tok, "EXCEPT") == 0) /* EXCEPT: give up */ + if (strcmp(tok, "EXCEPT") == 0) /* EXCEPT: give up */ break; if ((match = (*match_fn)(tok, item)) != 0) /* YES */ break; @@ -133,7 +133,7 @@ list_match(char *list, const char *item, /* Process exceptions to matches. */ if (match != NO) { - while ((tok = strtok((char *) 0, sep)) && strcasecmp(tok, "EXCEPT")) + while ((tok = strtok((char *) 0, sep)) && strcmp(tok, "EXCEPT")) /* VOID */ ; if (tok == NULL || list_match((char *) 0, item, match_fn) == NO) return (match); @@ -219,7 +219,7 @@ from_match(const char *tok, const char *string) if ((str_len = strlen(string)) > (tok_len = strlen(tok)) && strcasecmp(tok, string + str_len - tok_len) == 0) return (YES); - } else if (strcasecmp(tok, "LOCAL") == 0) { /* local: no dots */ + } else if (strcmp(tok, "LOCAL") == 0) { /* local: no dots */ if (strchr(string, '.') == NULL) return (YES); } else if (tok[(tok_len = strlen(tok)) - 1] == '.' /* network */ @@ -240,7 +240,7 @@ string_match(const char *tok, const char *string) * Otherwise, return YES if the token fully matches the string. */ - if (strcasecmp(tok, "ALL") == 0) { /* all: always matches */ + if (strcmp(tok, "ALL") == 0) { /* all: always matches */ return (YES); } else if (strcasecmp(tok, string) == 0) { /* try exact match */ return (YES); From owner-svn-src-stable-12@freebsd.org Thu Mar 19 03:31:13 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 2D16527903C; Thu, 19 Mar 2020 03:31:13 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jXW50TYqz40Bn; Thu, 19 Mar 2020 03:31:13 +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 E4FFB4A58; Thu, 19 Mar 2020 03:31:12 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02J3VCbM043489; Thu, 19 Mar 2020 03:31:12 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02J3VC9q043487; Thu, 19 Mar 2020 03:31:12 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003190331.02J3VC9q043487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 19 Mar 2020 03:31: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: r359116 - in stable: 11/lib/libpam/modules/pam_login_access 12/lib/libpam/modules/pam_login_access X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/lib/libpam/modules/pam_login_access 12/lib/libpam/modules/pam_login_access X-SVN-Commit-Revision: 359116 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.29 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, 19 Mar 2020 03:31:13 -0000 Author: cy Date: Thu Mar 19 03:31:12 2020 New Revision: 359116 URL: https://svnweb.freebsd.org/changeset/base/359116 Log: MFC r358066: When pam_login_access(5) fails to match a username it attempts to match the primary group a user belongs to. This commit extends the match to secondary groups a user belongs to as well, just as the Linux pam_access(5) does. Approved by: des (implicit, blanket) Modified: stable/12/lib/libpam/modules/pam_login_access/login_access.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libpam/modules/pam_login_access/login_access.c Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libpam/modules/pam_login_access/login_access.c ============================================================================== --- stable/12/lib/libpam/modules/pam_login_access/login_access.c Thu Mar 19 03:29:46 2020 (r359115) +++ stable/12/lib/libpam/modules/pam_login_access/login_access.c Thu Mar 19 03:31:12 2020 (r359116) @@ -17,10 +17,12 @@ static char sccsid[] = "%Z% %M% %I% %E% %U%"; __FBSDID("$FreeBSD$"); #include +#include #include #include #include #include +#include #include #include #include @@ -174,6 +176,9 @@ static int user_match(const char *tok, const char *string) { struct group *group; + struct passwd *passwd; + gid_t *grouplist; + int ngroups = NGROUPS; int i; /* @@ -186,10 +191,37 @@ user_match(const char *tok, const char *string) return (netgroup_match(tok + 1, (char *) 0, string)); } else if (string_match(tok, string)) { /* ALL or exact match */ return (YES); - } else if ((group = getgrnam(tok)) != NULL) {/* try group membership */ - for (i = 0; group->gr_mem[i]; i++) - if (strcasecmp(string, group->gr_mem[i]) == 0) + } else { + if ((passwd = getpwnam(string)) == NULL) + return (NO); + errno = 0; + if ((group = getgrnam(tok)) == NULL) {/* try group membership */ + if (errno != 0) { + syslog(LOG_ERR, "getgrnam() failed for %s: %s", string, strerror(errno)); + } else { + syslog(LOG_NOTICE, "group not found: %s", string); + } + return (NO); + } + errno = 0; + if ((grouplist = calloc(ngroups, sizeof(gid_t))) == NULL) { + if (errno == ENOMEM) { + syslog(LOG_ERR, "cannot allocate memory for grouplist: %s", string); + } + return (NO); + } + if (getgrouplist(string, passwd->pw_gid, grouplist, &ngroups) != 0) { + syslog(LOG_ERR, "getgrouplist() failed for %s", string); + free(grouplist); + return (NO); + } + for (i = 0; i < ngroups; i++) { + if (grouplist[i] == group->gr_gid) { + free(grouplist); return (YES); + } + } + free(grouplist); } return (NO); } From owner-svn-src-stable-12@freebsd.org Thu Mar 19 03:37: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 CF157279294; Thu, 19 Mar 2020 03:37:05 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jXds4z5Hz4Bfl; Thu, 19 Mar 2020 03:37:05 +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 5014B4BE0; Thu, 19 Mar 2020 03:37:05 +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 02J3b5H4047350; Thu, 19 Mar 2020 03:37:05 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02J3b4J1047343; Thu, 19 Mar 2020 03:37:04 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003190337.02J3b4J1047343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 19 Mar 2020 03:37: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: r359117 - in stable: 11/lib/libpam/modules/pam_login_access 12/lib/libpam/modules/pam_login_access X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/lib/libpam/modules/pam_login_access 12/lib/libpam/modules/pam_login_access X-SVN-Commit-Revision: 359117 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.29 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, 19 Mar 2020 03:37:06 -0000 Author: cy Date: Thu Mar 19 03:37:02 2020 New Revision: 359117 URL: https://svnweb.freebsd.org/changeset/base/359117 Log: MFC r358070: This commit makes significant changes to pam_login_access(8) to bring it up to par with the Linux pam_access(8). Like the Linux pam_access(8) our pam_login_access(8) is a service module for pam(3) that allows a administrator to limit access from specified remote hosts or terminals. Unlike the Linux pam_access, pam_login_access is missing some features which are added by this commit: Access file can now be specified. The default remains /etc/access.conf. The syntax is consistent with Linux pam_access. By default usernames are matched. If the username fails to match a match against a group name is attempted. The new nodefgroup module option will only match a username and no attempt to match a group name is made. Group names must be specified in brackets, "()" when nodefgroup is specified. Otherwise the old backward compatible behavior is used. This is consistent with Linux pam_access. A new field separator module option allows the replacement of the default colon (:) with any other character. This facilitates potential future specification of X displays. This is also consistent with Linux pam_access. A new list separator module option to replace the default space/comma/tab with another character. This too is consistent with Linux pam_access. Linux pam_access options not implemented in this commit are the debug and audit options. These will be implemented at a later date. Reviewed by: bjk, bcr (for manpages) Approved by: des (blanket, implicit) Differential Revision: https://reviews.freebsd.org/D23198 Modified: stable/12/lib/libpam/modules/pam_login_access/login.access.5 stable/12/lib/libpam/modules/pam_login_access/login_access.c stable/12/lib/libpam/modules/pam_login_access/pam_login_access.8 stable/12/lib/libpam/modules/pam_login_access/pam_login_access.c stable/12/lib/libpam/modules/pam_login_access/pam_login_access.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libpam/modules/pam_login_access/login.access.5 stable/11/lib/libpam/modules/pam_login_access/login_access.c stable/11/lib/libpam/modules/pam_login_access/pam_login_access.8 stable/11/lib/libpam/modules/pam_login_access/pam_login_access.c stable/11/lib/libpam/modules/pam_login_access/pam_login_access.h Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libpam/modules/pam_login_access/login.access.5 ============================================================================== --- stable/12/lib/libpam/modules/pam_login_access/login.access.5 Thu Mar 19 03:31:12 2020 (r359116) +++ stable/12/lib/libpam/modules/pam_login_access/login.access.5 Thu Mar 19 03:37:02 2020 (r359117) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 27, 2020 +.Dd January 30, 2020 .Dt LOGIN.ACCESS 5 .Os .Sh NAME @@ -34,6 +34,13 @@ character. .Pp The second field should be a list of one or more login names, group names, or ALL (always matches). +Group names must be enclosed in +parentheses if the pam module specification for +.Pa pam_login_access +specifies the +.Pa nodefgroup +option. +Otherwise, group names will only match if no usernames match. .Pp The third field should be a list of one or more tty names (for non-networked logins), host names, domain Modified: stable/12/lib/libpam/modules/pam_login_access/login_access.c ============================================================================== --- stable/12/lib/libpam/modules/pam_login_access/login_access.c Thu Mar 19 03:31:12 2020 (r359116) +++ stable/12/lib/libpam/modules/pam_login_access/login_access.c Thu Mar 19 03:37:02 2020 (r359117) @@ -31,29 +31,26 @@ __FBSDID("$FreeBSD$"); #include "pam_login_access.h" -#define _PATH_LOGACCESS "/etc/login.access" - - /* Delimiters for fields and for lists of users, ttys or hosts. */ - -static char fs[] = ":"; /* field separator */ -static char sep[] = ", \t"; /* list-element separator */ - /* Constants to be used in assignments only, not in comparisons... */ #define YES 1 #define NO 0 -static int from_match(const char *, const char *); +static int from_match(const char *, const char *, struct pam_login_access_options *); static int list_match(char *, const char *, - int (*)(const char *, const char *)); + int (*)(const char *, const char *, + struct pam_login_access_options *), + struct pam_login_access_options *); static int netgroup_match(const char *, const char *, const char *); static int string_match(const char *, const char *); -static int user_match(const char *, const char *); +static int user_match(const char *, const char *, struct pam_login_access_options *); +static int group_match(const char *, const char *); /* login_access - match username/group and host/tty with access control file */ int -login_access(const char *user, const char *from) +login_access(const char *user, const char *from, + struct pam_login_access_options *login_access_opts) { FILE *fp; char line[BUFSIZ]; @@ -63,6 +60,7 @@ login_access(const char *user, const char *from) int match = NO; int end; int lineno = 0; /* for diagnostics */ + const char *fieldsep = login_access_opts->fieldsep; /* * Process the table one line at a time and stop at the first match. @@ -72,12 +70,12 @@ login_access(const char *user, const char *from) * non-existing table means no access control. */ - if ((fp = fopen(_PATH_LOGACCESS, "r")) != NULL) { + if ((fp = fopen(login_access_opts->accessfile, "r")) != NULL) { while (!match && fgets(line, sizeof(line), fp)) { lineno++; if (line[end = strlen(line) - 1] != '\n') { syslog(LOG_ERR, "%s: line %d: missing newline or line too long", - _PATH_LOGACCESS, lineno); + login_access_opts->accessfile, lineno); continue; } if (line[0] == '#') @@ -87,25 +85,25 @@ login_access(const char *user, const char *from) line[end] = 0; /* strip trailing whitespace */ if (line[0] == 0) /* skip blank lines */ continue; - if (!(perm = strtok(line, fs)) - || !(users = strtok((char *) 0, fs)) - || !(froms = strtok((char *) 0, fs)) - || strtok((char *) 0, fs)) { - syslog(LOG_ERR, "%s: line %d: bad field count", _PATH_LOGACCESS, + if (!(perm = strtok(line, fieldsep)) + || !(users = strtok((char *) 0, fieldsep)) + || !(froms = strtok((char *) 0, fieldsep)) + || strtok((char *) 0, fieldsep)) { + syslog(LOG_ERR, "%s: line %d: bad field count", login_access_opts->accessfile, lineno); continue; } if (perm[0] != '+' && perm[0] != '-') { - syslog(LOG_ERR, "%s: line %d: bad first field", _PATH_LOGACCESS, + syslog(LOG_ERR, "%s: line %d: bad first field", login_access_opts->accessfile, lineno); continue; } - match = (list_match(froms, from, from_match) - && list_match(users, user, user_match)); + match = (list_match(froms, from, from_match, login_access_opts) + && list_match(users, user, user_match, login_access_opts)); } (void) fclose(fp); } else if (errno != ENOENT) { - syslog(LOG_ERR, "cannot open %s: %m", _PATH_LOGACCESS); + syslog(LOG_ERR, "cannot open %s: %m", login_access_opts->accessfile); } return (match == 0 || (line[0] == '+')); } @@ -114,10 +112,12 @@ login_access(const char *user, const char *from) static int list_match(char *list, const char *item, - int (*match_fn)(const char *, const char *)) + int (*match_fn)(const char *, const char *, struct pam_login_access_options *), + struct pam_login_access_options *login_access_opts) { char *tok; int match = NO; + const char *listsep = login_access_opts->listsep; /* * Process tokens one at a time. We have exhausted all possible matches @@ -126,19 +126,22 @@ list_match(char *list, const char *item, * the match is affected by any exceptions. */ - for (tok = strtok(list, sep); tok != NULL; tok = strtok((char *) 0, sep)) { + for (tok = strtok(list, listsep); tok != NULL; tok = strtok((char *) 0, listsep)) { if (strcmp(tok, "EXCEPT") == 0) /* EXCEPT: give up */ break; - if ((match = (*match_fn)(tok, item)) != 0) /* YES */ + if ((match = (*match_fn)(tok, item, login_access_opts)) != 0) /* YES */ break; } /* Process exceptions to matches. */ if (match != NO) { - while ((tok = strtok((char *) 0, sep)) && strcmp(tok, "EXCEPT")) + while ((tok = strtok((char *) 0, listsep)) && strcmp(tok, "EXCEPT")) { /* VOID */ ; - if (tok == NULL || list_match((char *) 0, item, match_fn) == NO) - return (match); + if (tok == NULL || list_match((char *) 0, item, match_fn, + login_access_opts) == NO) { + return (match); + } + } } return (NO); } @@ -170,17 +173,50 @@ netgroup_match(const char *group, const char *machine, return (NO); } -/* user_match - match a username against one token */ +/* group_match - match a group against one token */ -static int -user_match(const char *tok, const char *string) +int +group_match(const char *tok, const char *username) { struct group *group; struct passwd *passwd; gid_t *grouplist; - int ngroups = NGROUPS; - int i; + int i, ret, ngroups = NGROUPS; + if ((passwd = getpwnam(username)) == NULL) + return (NO); + errno = 0; + if ((group = getgrnam(tok)) == NULL) { + if (errno != 0) + syslog(LOG_ERR, "getgrnam() failed for %s: %s", username, strerror(errno)); + else + syslog(LOG_NOTICE, "group not found: %s", username); + return (NO); + } + if ((grouplist = calloc(ngroups, sizeof(gid_t))) == NULL) { + syslog(LOG_ERR, "cannot allocate memory for grouplist: %s", username); + return (NO); + } + ret = NO; + if (getgrouplist(username, passwd->pw_gid, grouplist, &ngroups) != 0) + syslog(LOG_ERR, "getgrouplist() failed for %s", username); + for (i = 0; i < ngroups; i++) + if (grouplist[i] == group->gr_gid) + ret = YES; + free(grouplist); + return (ret); +} + +/* user_match - match a username against one token */ + +static int +user_match(const char *tok, const char *string, + struct pam_login_access_options *login_access_opts) +{ + size_t stringlen; + char *grpstr; + int rc; + /* * If a token has the magic value "ALL" the match always succeeds. * Otherwise, return YES if the token fully matches the username, or if @@ -189,39 +225,18 @@ user_match(const char *tok, const char *string) if (tok[0] == '@') { /* netgroup */ return (netgroup_match(tok + 1, (char *) 0, string)); - } else if (string_match(tok, string)) { /* ALL or exact match */ - return (YES); - } else { - if ((passwd = getpwnam(string)) == NULL) - return (NO); - errno = 0; - if ((group = getgrnam(tok)) == NULL) {/* try group membership */ - if (errno != 0) { - syslog(LOG_ERR, "getgrnam() failed for %s: %s", string, strerror(errno)); - } else { - syslog(LOG_NOTICE, "group not found: %s", string); - } + } else if (tok[0] == '(' && tok[(stringlen = strlen(&tok[1]))] == ')') { /* group */ + if ((grpstr = strndup(&tok[1], stringlen - 1)) == NULL) { + syslog(LOG_ERR, "cannot allocate memory for %s", string); return (NO); } - errno = 0; - if ((grouplist = calloc(ngroups, sizeof(gid_t))) == NULL) { - if (errno == ENOMEM) { - syslog(LOG_ERR, "cannot allocate memory for grouplist: %s", string); - } - return (NO); - } - if (getgrouplist(string, passwd->pw_gid, grouplist, &ngroups) != 0) { - syslog(LOG_ERR, "getgrouplist() failed for %s", string); - free(grouplist); - return (NO); - } - for (i = 0; i < ngroups; i++) { - if (grouplist[i] == group->gr_gid) { - free(grouplist); - return (YES); - } - } - free(grouplist); + rc = group_match(grpstr, string); + free(grpstr); + return (rc); + } else if (string_match(tok, string)) { /* ALL or exact match */ + return (YES); + } else if (login_access_opts->defgroup == true) {/* try group membership */ + return (group_match(tok, string)); } return (NO); } @@ -229,7 +244,8 @@ user_match(const char *tok, const char *string) /* from_match - match a host or tty against a list of tokens */ static int -from_match(const char *tok, const char *string) +from_match(const char *tok, const char *string, + struct pam_login_access_options *login_access_opts __unused) { int tok_len; int str_len; Modified: stable/12/lib/libpam/modules/pam_login_access/pam_login_access.8 ============================================================================== --- stable/12/lib/libpam/modules/pam_login_access/pam_login_access.8 Thu Mar 19 03:31:12 2020 (r359116) +++ stable/12/lib/libpam/modules/pam_login_access/pam_login_access.8 Thu Mar 19 03:37:02 2020 (r359117) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 24, 2002 +.Dd January 30, 2020 .Dt PAM_LOGIN_ACCESS 8 .Os .Sh NAME @@ -63,13 +63,46 @@ The .Pa login.access account management component .Pq Fn pam_sm_acct_mgmt , -returns success if and only the user is allowed to log in on the +returns success if and only the user is allowed to login on the specified tty (in the case of a local login) or from the specified remote host (in the case of a remote login), according to the restrictions listed in .Xr login.access 5 . +.Bl -tag -width ".Cm accessfile=pathname" +.It Cm accessfile Ns = Ns Ar pathname +specifies a non-standard location for the +.Pa login.access +configuration file +(normally located in +.Pa /etc/login.access ) . +.It Cm nodefgroup +makes tokens not enclosed in parentheses only match users, requiring groups +to be specified in parentheses. +Without +.Cm nodefgroup +user and group names are intermingled, with user entries taking precedence +over group entries. +This is not backwards compatible with legacy +.Pa login.access +configuration files. +However this mitigates confusion between users and +groups of the same name. +.It Cm fieldsep Ns = Ns Ar separators +changes the field separator from the default ":". +More than one separator +may be specified. +.It Cm listsep Ns = Ns Ar separators +changes the field separator from the default space (''), tab (\\t) and +comma (,). +More than one separator may be specified. +For example, listsep=; +will replace the default with a semicolon (;). +This option may be useful when specifying Active Directory groupnames which +typically contain spaces. +.El .Sh SEE ALSO .Xr pam 3 , +.Xr syslog 3 , .Xr login.access 5 , .Xr pam.conf 5 .Sh AUTHORS Modified: stable/12/lib/libpam/modules/pam_login_access/pam_login_access.c ============================================================================== --- stable/12/lib/libpam/modules/pam_login_access/pam_login_access.c Thu Mar 19 03:31:12 2020 (r359116) +++ stable/12/lib/libpam/modules/pam_login_access/pam_login_access.c Thu Mar 19 03:37:02 2020 (r359117) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #define _BSD_SOURCE #include +#include #include #include @@ -51,13 +52,25 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "pam_login_access.h" +#define OPT_ACCESSFILE "accessfile" +#define OPT_NOAUDIT "noaudit" +#define OPT_FIELDSEP "fieldsep" +#define OPT_LISTSEP "listsep" +#define OPT_NODEFGROUP "nodefgroup" + +#define _PATH_LOGACCESS "/etc/login.access" +#define _FIELD_SEPARATOR ":" +#define _LIST_SEPARATOR ", \t" + PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unused, int argc __unused, const char *argv[] __unused) { + struct pam_login_access_options login_access_opts; const void *rhost, *tty, *user; char hostname[MAXHOSTNAMELEN]; int pam_err; @@ -80,25 +93,33 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unuse return (pam_err); gethostname(hostname, sizeof hostname); + login_access_opts.defgroup = openpam_get_option(pamh, OPT_NODEFGROUP) == NULL ? true : false; + login_access_opts.audit = openpam_get_option(pamh, OPT_NOAUDIT) == NULL ? true : false; + if ((login_access_opts.accessfile = openpam_get_option(pamh, OPT_ACCESSFILE)) == NULL) + login_access_opts.accessfile = _PATH_LOGACCESS; + if ((login_access_opts.fieldsep = openpam_get_option(pamh, OPT_FIELDSEP)) == NULL) + login_access_opts.fieldsep = _FIELD_SEPARATOR; + if ((login_access_opts.listsep = openpam_get_option(pamh, OPT_LISTSEP)) == NULL) + login_access_opts.listsep = _LIST_SEPARATOR; if (rhost != NULL && *(const char *)rhost != '\0') { PAM_LOG("Checking login.access for user %s from host %s", (const char *)user, (const char *)rhost); - if (login_access(user, rhost) != 0) + if (login_access(user, rhost, &login_access_opts) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in from %s", (const char *)user, (const char *)rhost); } else if (tty != NULL && *(const char *)tty != '\0') { PAM_LOG("Checking login.access for user %s on tty %s", (const char *)user, (const char *)tty); - if (login_access(user, tty) != 0) + if (login_access(user, tty, &login_access_opts) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", (const char *)user, (const char *)tty); } else { PAM_LOG("Checking login.access for user %s", (const char *)user); - if (login_access(user, "***unknown***") != 0) + if (login_access(user, "***unknown***", &login_access_opts) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in", (const char *)user); Modified: stable/12/lib/libpam/modules/pam_login_access/pam_login_access.h ============================================================================== --- stable/12/lib/libpam/modules/pam_login_access/pam_login_access.h Thu Mar 19 03:31:12 2020 (r359116) +++ stable/12/lib/libpam/modules/pam_login_access/pam_login_access.h Thu Mar 19 03:37:02 2020 (r359117) @@ -38,4 +38,15 @@ * $FreeBSD$ */ -extern int login_access(const char *, const char *); +#include + +struct pam_login_access_options { + bool defgroup; + bool audit; + const char *accessfile; + /* Delimiters for fields and for lists of users, ttys or hosts. */ + const char *fieldsep; /* field separator */ + const char *listsep; /* list-element separator */ +}; + +extern int login_access(const char *, const char *, struct pam_login_access_options *); From owner-svn-src-stable-12@freebsd.org Thu Mar 19 09:19:23 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 2E785259728; Thu, 19 Mar 2020 09:19:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jhDp6J0Zz4f1t; Thu, 19 Mar 2020 09:19:22 +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 C75588A6F; Thu, 19 Mar 2020 09:19:22 +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 02J9JMJG053404; Thu, 19 Mar 2020 09:19:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02J9JMkp053403; Thu, 19 Mar 2020 09:19:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003190919.02J9JMkp053403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 19 Mar 2020 09:19:22 +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: r359121 - stable/12/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Commit-Revision: 359121 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.29 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, 19 Mar 2020 09:19:23 -0000 Author: hselasky Date: Thu Mar 19 09:19:22 2020 New Revision: 359121 URL: https://svnweb.freebsd.org/changeset/base/359121 Log: MFC r359014: Fix for double unlock in ipoib. The ipoib_unicast_send() function is not supposed to unlock the priv lock. Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Thu Mar 19 09:15:59 2020 (r359120) +++ stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Thu Mar 19 09:19:22 2020 (r359121) @@ -727,7 +727,6 @@ ipoib_unicast_send(struct mbuf *mb, struct ipoib_dev_p } if (!path->query && path_rec_start(priv, path)) { - spin_unlock_irqrestore(&priv->lock, flags); if (new_path) ipoib_path_free(priv, path); return; From owner-svn-src-stable-12@freebsd.org Thu Mar 19 10:31: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 F411225B413; Thu, 19 Mar 2020 10:31:47 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jjrM5lZpz4R9j; Thu, 19 Mar 2020 10:31:47 +0000 (UTC) (envelope-from 0mp@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 5F0B998DA; Thu, 19 Mar 2020 10:31:47 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02JAVlSk001331; Thu, 19 Mar 2020 10:31:47 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02JAVlIp001330; Thu, 19 Mar 2020 10:31:47 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202003191031.02JAVlIp001330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Thu, 19 Mar 2020 10:31: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: r359127 - stable/12/lib/libc/gen X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/lib/libc/gen X-SVN-Commit-Revision: 359127 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.29 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, 19 Mar 2020 10:31:48 -0000 Author: 0mp (doc,ports committer) Date: Thu Mar 19 10:31:46 2020 New Revision: 359127 URL: https://svnweb.freebsd.org/changeset/base/359127 Log: MFC 358674, 358916: Add examples to ftw.3 ftw.3: Add examples PR: 173448 [1] Submitted by: fernape@ (previous version) [1] Reviewed by: jilles Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D21750 ftw.3: Follow style(9) in the example Reported by: oshogbo Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D24043 Modified: stable/12/lib/libc/gen/ftw.3 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/gen/ftw.3 ============================================================================== --- stable/12/lib/libc/gen/ftw.3 Thu Mar 19 10:20:32 2020 (r359126) +++ stable/12/lib/libc/gen/ftw.3 Thu Mar 19 10:31:46 2020 (r359127) @@ -20,7 +20,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 5, 2004 +.Dd March 12, 2020 .Dt FTW 3 .Os .Sh NAME @@ -157,6 +157,66 @@ and will stop processing the tree and return the value from .Fa fn . Both functions return \-1 if an error is detected. +.Sh EXAMPLES +Following there is an example that shows how +.Nm nftw +can be used. +It traverses the file tree starting at the directory pointed +by the only program argument and shows the complete path and a brief +indicator about the file type. +.Bd -literal -offset 2n +#include +#include +#include + +int +nftw_callback(const char *path, const struct stat *sb, int typeflag, struct FTW *ftw) +{ + char type; + + switch(typeflag) { + case FTW_F: + type = 'F'; + break; + case FTW_D: + type = 'D'; + break; + case FTW_DNR: + type = '-'; + break; + case FTW_DP: + type = 'd'; + break; + case FTW_NS: + type = 'X'; + break; + case FTW_SL: + type = 'S'; + break; + case FTW_SLN: + type = 's'; + break; + default: + type = '?'; + break; + } + + printf("[%c] %s\\n", type, path); + + return (0); +} + +int +main(int argc, char **argv) +{ + + if (argc != 2) { + printf("Usage %s \\n", argv[0]); + return (EX_USAGE); + } else + return (nftw(argv[1], nftw_callback, /* UNUSED */ 1, 0)); +} +.Ed .Sh ERRORS The .Fn ftw From owner-svn-src-stable-12@freebsd.org Thu Mar 19 16:51: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 EFFDC264411; Thu, 19 Mar 2020 16:51:58 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jtH25DB3z45dC; Thu, 19 Mar 2020 16:51:58 +0000 (UTC) (envelope-from tsoome@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 9512CE0D5; Thu, 19 Mar 2020 16:51:58 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02JGpwAE029637; Thu, 19 Mar 2020 16:51:58 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02JGpwea029635; Thu, 19 Mar 2020 16:51:58 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202003191651.02JGpwea029635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 19 Mar 2020 16:51: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: r359143 - in stable/12/stand: efi/loader i386/libi386 X-SVN-Group: stable-12 X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in stable/12/stand: efi/loader i386/libi386 X-SVN-Commit-Revision: 359143 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.29 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, 19 Mar 2020 16:51:59 -0000 Author: tsoome Date: Thu Mar 19 16:51:57 2020 New Revision: 359143 URL: https://svnweb.freebsd.org/changeset/base/359143 Log: MFC r354240, r354252, r358906 libi386/comconsole.c updates: We don't support configuring serial PCI cards in EFI. Make this clearer in the source rather than obfuscaring it behind NO_PCI (nothing else declares that, so it's not making the ifdefs clearer). libi386/comconsole.c cstyle cleanup test if port does exist via using scratch register Modified: stable/12/stand/efi/loader/Makefile stable/12/stand/i386/libi386/comconsole.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/efi/loader/Makefile ============================================================================== --- stable/12/stand/efi/loader/Makefile Thu Mar 19 16:51:33 2020 (r359142) +++ stable/12/stand/efi/loader/Makefile Thu Mar 19 16:51:57 2020 (r359143) @@ -55,7 +55,7 @@ CFLAGS+= -I${EFISRC}/include CFLAGS+= -I${EFISRC}/include/${MACHINE} CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include CFLAGS+= -I${BOOTSRC}/i386/libi386 -CFLAGS+= -DNO_PCI -DEFI +CFLAGS+= -DEFI .if !defined(BOOT_HIDE_SERIAL_NUMBERS) # Export serial numbers, UUID, and asset tag from loader. Modified: stable/12/stand/i386/libi386/comconsole.c ============================================================================== --- stable/12/stand/i386/libi386/comconsole.c Thu Mar 19 16:51:33 2020 (r359142) +++ stable/12/stand/i386/libi386/comconsole.c Thu Mar 19 16:51:57 2020 (r359143) @@ -67,144 +67,144 @@ static int comc_port = COMPORT; static uint32_t comc_locator; struct console comconsole = { - "comconsole", - "serial port", - 0, - comc_probe, - comc_init, - comc_putchar, - comc_getchar, - comc_ischar + .c_name = "comconsole", + .c_desc = "serial port", + .c_flags = 0, + .c_probe = comc_probe, + .c_init = comc_init, + .c_out = comc_putchar, + .c_in = comc_getchar, + .c_ready = comc_ischar }; static void comc_probe(struct console *cp) { - char intbuf[16]; - char *cons, *env; - int speed, port; - uint32_t locator; + char intbuf[16]; + char *cons, *env; + int speed, port; + uint32_t locator; - if (comc_curspeed == 0) { - comc_curspeed = COMSPEED; - /* - * Assume that the speed was set by an earlier boot loader if - * comconsole is already the preferred console. - */ - cons = getenv("console"); - if ((cons != NULL && strcmp(cons, comconsole.c_name) == 0) || - getenv("boot_multicons") != NULL) { - comc_curspeed = comc_getspeed(); - } + if (comc_curspeed == 0) { + comc_curspeed = COMSPEED; + /* + * Assume that the speed was set by an earlier boot loader if + * comconsole is already the preferred console. + */ + cons = getenv("console"); + if ((cons != NULL && strcmp(cons, comconsole.c_name) == 0) || + getenv("boot_multicons") != NULL) { + comc_curspeed = comc_getspeed(); + } - env = getenv("comconsole_speed"); - if (env != NULL) { - speed = comc_parseint(env); - if (speed > 0) - comc_curspeed = speed; - } + env = getenv("comconsole_speed"); + if (env != NULL) { + speed = comc_parseint(env); + if (speed > 0) + comc_curspeed = speed; + } - sprintf(intbuf, "%d", comc_curspeed); - unsetenv("comconsole_speed"); - env_setenv("comconsole_speed", EV_VOLATILE, intbuf, comc_speed_set, - env_nounset); + sprintf(intbuf, "%d", comc_curspeed); + unsetenv("comconsole_speed"); + env_setenv("comconsole_speed", EV_VOLATILE, intbuf, + comc_speed_set, env_nounset); - env = getenv("comconsole_port"); - if (env != NULL) { - port = comc_parseint(env); - if (port > 0) - comc_port = port; - } + env = getenv("comconsole_port"); + if (env != NULL) { + port = comc_parseint(env); + if (port > 0) + comc_port = port; + } - sprintf(intbuf, "%d", comc_port); - unsetenv("comconsole_port"); - env_setenv("comconsole_port", EV_VOLATILE, intbuf, comc_port_set, - env_nounset); + sprintf(intbuf, "%d", comc_port); + unsetenv("comconsole_port"); + env_setenv("comconsole_port", EV_VOLATILE, intbuf, + comc_port_set, env_nounset); - env = getenv("comconsole_pcidev"); - if (env != NULL) { - locator = comc_parse_pcidev(env); - if (locator != 0) - comc_pcidev_handle(locator); - } + env = getenv("comconsole_pcidev"); + if (env != NULL) { + locator = comc_parse_pcidev(env); + if (locator != 0) + comc_pcidev_handle(locator); + } - unsetenv("comconsole_pcidev"); - env_setenv("comconsole_pcidev", EV_VOLATILE, env, comc_pcidev_set, - env_nounset); - } - comc_setup(comc_curspeed, comc_port); + unsetenv("comconsole_pcidev"); + env_setenv("comconsole_pcidev", EV_VOLATILE, env, + comc_pcidev_set, env_nounset); + } + comc_setup(comc_curspeed, comc_port); } static int comc_init(int arg) { - comc_setup(comc_curspeed, comc_port); + comc_setup(comc_curspeed, comc_port); - if ((comconsole.c_flags & (C_PRESENTIN | C_PRESENTOUT)) == - (C_PRESENTIN | C_PRESENTOUT)) - return (CMD_OK); - return (CMD_ERROR); + if ((comconsole.c_flags & (C_PRESENTIN | C_PRESENTOUT)) == + (C_PRESENTIN | C_PRESENTOUT)) + return (CMD_OK); + return (CMD_ERROR); } static void comc_putchar(int c) { - int wait; + int wait; - for (wait = COMC_TXWAIT; wait > 0; wait--) - if (inb(comc_port + com_lsr) & LSR_TXRDY) { - outb(comc_port + com_data, (u_char)c); - break; - } + for (wait = COMC_TXWAIT; wait > 0; wait--) + if (inb(comc_port + com_lsr) & LSR_TXRDY) { + outb(comc_port + com_data, (u_char)c); + break; + } } static int comc_getchar(void) { - return (comc_ischar() ? inb(comc_port + com_data) : -1); + return (comc_ischar() ? inb(comc_port + com_data) : -1); } static int comc_ischar(void) { - return (inb(comc_port + com_lsr) & LSR_RXRDY); + return (inb(comc_port + com_lsr) & LSR_RXRDY); } static int comc_speed_set(struct env_var *ev, int flags, const void *value) { - int speed; + int speed; - if (value == NULL || (speed = comc_parseint(value)) <= 0) { - printf("Invalid speed\n"); - return (CMD_ERROR); - } + if (value == NULL || (speed = comc_parseint(value)) <= 0) { + printf("Invalid speed\n"); + return (CMD_ERROR); + } - if (comc_curspeed != speed) - comc_setup(speed, comc_port); + if (comc_curspeed != speed) + comc_setup(speed, comc_port); - env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); + env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); - return (CMD_OK); + return (CMD_OK); } static int comc_port_set(struct env_var *ev, int flags, const void *value) { - int port; + int port; - if (value == NULL || (port = comc_parseint(value)) <= 0) { - printf("Invalid port\n"); - return (CMD_ERROR); - } + if (value == NULL || (port = comc_parseint(value)) <= 0) { + printf("Invalid port\n"); + return (CMD_ERROR); + } - if (comc_port != port) - comc_setup(comc_curspeed, port); + if (comc_port != port) + comc_setup(comc_curspeed, port); - env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); + env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); - return (CMD_OK); + return (CMD_OK); } /* @@ -214,7 +214,8 @@ comc_port_set(struct env_var *ev, int flags, const voi static uint32_t comc_parse_pcidev(const char *string) { -#ifdef NO_PCI +#ifdef EFI + /* We don't support PCI in EFI yet */ return (0); #else char *p, *p1; @@ -256,7 +257,8 @@ comc_parse_pcidev(const char *string) static int comc_pcidev_handle(uint32_t locator) { -#ifdef NO_PCI +#ifdef EFI + /* We don't support PCI in EFI yet */ return (CMD_ERROR); #else char intbuf[64]; @@ -318,46 +320,56 @@ comc_pcidev_set(struct env_var *ev, int flags, const v static void comc_setup(int speed, int port) { - static int TRY_COUNT = 1000000; - char intbuf[64]; - int tries; + static int TRY_COUNT = 1000000; + char intbuf[64]; + int tries; - unsetenv("hw.uart.console"); - comc_curspeed = speed; - comc_port = port; - if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) == 0) - return; + unsetenv("hw.uart.console"); + comc_curspeed = speed; + comc_port = port; + if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) == 0) + return; - outb(comc_port + com_cfcr, CFCR_DLAB | COMC_FMT); - outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff); - outb(comc_port + com_dlbh, COMC_BPS(speed) >> 8); - outb(comc_port + com_cfcr, COMC_FMT); - outb(comc_port + com_mcr, MCR_RTS | MCR_DTR); +#define COMC_TEST 0xbb + /* + * Write byte to scratch register and read it out. + */ + outb(comc_port + com_scr, COMC_TEST); + if (inb(comc_port + com_scr) != COMC_TEST) { + comconsole.c_flags &= ~(C_PRESENTIN | C_PRESENTOUT); + return; + } - tries = 0; - do - inb(comc_port + com_data); - while (inb(comc_port + com_lsr) & LSR_RXRDY && ++tries < TRY_COUNT); + outb(comc_port + com_cfcr, CFCR_DLAB | COMC_FMT); + outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff); + outb(comc_port + com_dlbh, COMC_BPS(speed) >> 8); + outb(comc_port + com_cfcr, COMC_FMT); + outb(comc_port + com_mcr, MCR_RTS | MCR_DTR); - if (tries < TRY_COUNT) { - comconsole.c_flags |= (C_PRESENTIN | C_PRESENTOUT); - sprintf(intbuf, "io:%d,br:%d", comc_port, comc_curspeed); - env_setenv("hw.uart.console", EV_VOLATILE, intbuf, NULL, NULL); - } else - comconsole.c_flags &= ~(C_PRESENTIN | C_PRESENTOUT); + tries = 0; + do + inb(comc_port + com_data); + while (inb(comc_port + com_lsr) & LSR_RXRDY && ++tries < TRY_COUNT); + + if (tries < TRY_COUNT) { + comconsole.c_flags |= (C_PRESENTIN | C_PRESENTOUT); + sprintf(intbuf, "io:%d,br:%d", comc_port, comc_curspeed); + env_setenv("hw.uart.console", EV_VOLATILE, intbuf, NULL, NULL); + } else + comconsole.c_flags &= ~(C_PRESENTIN | C_PRESENTOUT); } static int comc_parseint(const char *speedstr) { - char *p; - int speed; + char *p; + int speed; - speed = strtol(speedstr, &p, 0); - if (p == speedstr || *p != '\0' || speed <= 0) - return (-1); + speed = strtol(speedstr, &p, 0); + if (p == speedstr || *p != '\0' || speed <= 0) + return (-1); - return (speed); + return (speed); } static int From owner-svn-src-stable-12@freebsd.org Thu Mar 19 18:15:11 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 7285B26D1B8; Thu, 19 Mar 2020 18:15:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jw723PLSz4Mcv; Thu, 19 Mar 2020 18:15:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 20AAFF073; Thu, 19 Mar 2020 18:15:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02JIFAFR078909; Thu, 19 Mar 2020 18:15:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02JIF9t3078908; Thu, 19 Mar 2020 18:15:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003191815.02JIF9t3078908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 19 Mar 2020 18:15:09 +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: r359149 - stable/12/tools/boot X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/tools/boot X-SVN-Commit-Revision: 359149 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.29 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, 19 Mar 2020 18:15:11 -0000 Author: emaste Date: Thu Mar 19 18:15:09 2020 New Revision: 359149 URL: https://svnweb.freebsd.org/changeset/base/359149 Log: MFC r346080: Add a smoke test QEMU boot script for CI And followon commits: r346317 (ian): Allow this test script to be run from within src/tools/boot r346329: Install some entropy for QEMU CI smoke test r346330: Put QEMU CI smoke test boot log in /tmp if TMPDIR not set r346748 (bcran): Fix tools/boot/ci-qemu-test.sh and make some improvements r346961: revert QEMU q35 platform use from r346748 r352063: ci-qemu-test: if firmware is not available, hint at pkg to install r358472: CI: print wired page count on boot Sponsored by: The FreeBSD Foundation Added: stable/12/tools/boot/ci-qemu-test.sh - copied, changed from r346080, head/tools/boot/ci-qemu-test.sh Modified: Directory Properties: stable/12/ (props changed) Copied and modified: stable/12/tools/boot/ci-qemu-test.sh (from r346080, head/tools/boot/ci-qemu-test.sh) ============================================================================== --- head/tools/boot/ci-qemu-test.sh Wed Apr 10 13:41:34 2019 (r346080, copy source) +++ stable/12/tools/boot/ci-qemu-test.sh Thu Mar 19 18:15:09 2020 (r359149) @@ -2,62 +2,111 @@ # Install loader, kernel, and enough of userland to boot in QEMU and echo # "Hello world." from init, as a very quick smoke test for CI. Uses QEMU's -# virtual FAT filesystem to avoid the need to create a disk image. +# virtual FAT filesystem to avoid the need to create a disk image. While +# designed for CI automated testing, this script can also be run by hand as +# a quick smoke-test. The rootgen.sh and related scripts generate much more +# extensive tests for many combinations of boot env (ufs, zfs, geli, etc). # # $FreeBSD$ set -e -# Root directory for minimal FreeBSD installation. -ROOTDIR=$(pwd)/fat-root +die() +{ + echo "$*" 1>&2 + exit 1 +} -# Create minimal directory structure. -rm -f $ROOTDIR/efi/boot/BOOTx64.EFI -for dir in dev bin efi/boot etc lib libexec sbin usr/libexec; do - mkdir -p $ROOTDIR/$dir -done +tempdir_cleanup() +{ + trap - EXIT SIGINT SIGHUP SIGTERM SIGQUIT + rm -rf ${ROOTDIR} +} -# Install kernel, loader and minimal userland. -make -DNO_ROOT DESTDIR=$ROOTDIR \ - MODULES_OVERRIDE= \ - WITHOUT_DEBUG_FILES=yes \ - WITHOUT_KERNEL_SYMBOLS=yes \ - installkernel -for dir in stand \ - lib/libc lib/libedit lib/ncurses \ - libexec/rtld-elf \ - bin/sh sbin/init sbin/shutdown; do - make -DNO_ROOT DESTDIR=$ROOTDIR INSTALL="install -U" \ - WITHOUT_MAN= \ - WITHOUT_PROFILE= \ - WITHOUT_TESTS= \ - WITHOUT_TOOLCHAIN= \ - -C $dir install -done +tempdir_setup() +{ + # Create minimal directory structure and populate it. + # Caller must cd ${SRCTOP} before calling this function. -# Put loader in standard EFI location. -mv $ROOTDIR/boot/loader.efi $ROOTDIR/efi/boot/BOOTx64.EFI + for dir in dev bin efi/boot etc lib libexec sbin usr/lib usr/libexec; do + mkdir -p ${ROOTDIR}/${dir} + done -# Configuration files. -cat > $ROOTDIR/boot/loader.conf < ${ROOTDIR}/boot/loader.conf < $ROOTDIR/etc/rc < ${ROOTDIR}/etc/rc <&2 + die "Cannot read UEFI firmware file ${OVMF}" +fi + +# Create a temp dir to hold the boot image. +ROOTDIR=$(mktemp -d -t ci-qemu-test-fat-root) +trap tempdir_cleanup EXIT SIGINT SIGHUP SIGTERM SIGQUIT + +# Populate the boot image in a temp dir. +( cd ${SRCTOP} && tempdir_setup ) + # And, boot in QEMU. +: ${BOOTLOG:=${TMPDIR:-/tmp}/ci-qemu-test-boot.log} timeout 300 \ - qemu-system-x86_64 -m 256M -bios OVMF.fd \ - -serial stdio -vga none -nographic -monitor none \ - -snapshot -hda fat:$ROOTDIR 2>&1 | tee boot.log -grep -q 'Hello world.' boot.log -echo OK + qemu-system-x86_64 -m 256M -nodefaults \ + -drive if=pflash,format=raw,readonly,file=${OVMF} \ + -serial stdio -vga none -nographic -monitor none \ + -snapshot -hda fat:${ROOTDIR} 2>&1 | tee ${BOOTLOG} + +# Check whether we succesfully booted... +if grep -q 'Hello world.' ${BOOTLOG}; then + echo "OK" +else + die "Did not boot successfully, see ${BOOTLOG}" +fi From owner-svn-src-stable-12@freebsd.org Thu Mar 19 18:17: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 5D68926D362; Thu, 19 Mar 2020 18:17:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jw9z5h4tz4S6Y; Thu, 19 Mar 2020 18:17:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7785EF079; Thu, 19 Mar 2020 18:17:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02JIHhaF079075; Thu, 19 Mar 2020 18:17:43 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02JIHh6e079074; Thu, 19 Mar 2020 18:17:43 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003191817.02JIHh6e079074@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 19 Mar 2020 18:17: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: r359150 - stable/12 X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12 X-SVN-Commit-Revision: 359150 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.29 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, 19 Mar 2020 18:17:44 -0000 Author: emaste Date: Thu Mar 19 18:17:43 2020 New Revision: 359150 URL: https://svnweb.freebsd.org/changeset/base/359150 Log: MFC r346085: Add Cirrus CI config file to support CI builds Also followup commits: r346121: Cirrus-CI: pass OVMF env var to test script for upcoming changes r350302: cirrus.yml: use OVMF.fd from uefi-edk2-qemu-x86_64 package r350449: cirrus.yml: stop fetching OVMF.fd now that we're using the pkg r356867: Cirrus-CI: bump VM image to FreeBSD 12.1 Sponsored by: The FreeBSD Foundation Added: stable/12/.cirrus.yml - copied, changed from r346085, head/.cirrus.yml Modified: Directory Properties: stable/12/ (props changed) Copied and modified: stable/12/.cirrus.yml (from r346085, head/.cirrus.yml) ============================================================================== --- head/.cirrus.yml Wed Apr 10 15:38:53 2019 (r346085, copy source) +++ stable/12/.cirrus.yml Thu Mar 19 18:17:43 2020 (r359150) @@ -1,7 +1,7 @@ # $FreeBSD$ freebsd_instance: - image: freebsd-12-0-release-amd64 + image: freebsd-12-1-release-amd64 cpu: 8 memory: 24G @@ -11,8 +11,7 @@ env: task: timeout_in: 90m install_script: - - pkg install -y qemu-devel - - fetch https://people.freebsd.org/~emaste/OVMF.fd + - pkg install -y qemu-devel uefi-edk2-qemu-x86_64 script: - make -j$(sysctl -n hw.ncpu) WITHOUT_TOOLCHAIN=yes buildworld buildkernel test_script: From owner-svn-src-stable-12@freebsd.org Thu Mar 19 22:33:26 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 7FFEF272A97; Thu, 19 Mar 2020 22:33:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48k1s22Lmxz4HM0; Thu, 19 Mar 2020 22:33:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 039E919F76; Thu, 19 Mar 2020 22:33:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02JMXP7R034475; Thu, 19 Mar 2020 22:33:25 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02JMXOik034466; Thu, 19 Mar 2020 22:33:24 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003192233.02JMXOik034466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 19 Mar 2020 22:33:24 +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: r359155 - in stable/12/stand/i386: . boot2 gptboot gptzfsboot isoboot loader zfsboot X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable/12/stand/i386: . boot2 gptboot gptzfsboot isoboot loader zfsboot X-SVN-Commit-Revision: 359155 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.29 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, 19 Mar 2020 22:33:26 -0000 Author: dim Date: Thu Mar 19 22:33:24 2020 New Revision: 359155 URL: https://svnweb.freebsd.org/changeset/base/359155 Log: MFC r358643: Link stand/i386 components using a linker script LLD 10.0.0 changed the behavior of the -Ttext option, so that using -Ttext=0x0 now causes linking of the loaders to fail with: ld: error: output file too large: 18446744073707016908 bytes I reported this in https://bugs.llvm.org/show_bug.cgi?id=44715, and initially reverted the upstream change in r357259 to work around it. However, after some discussion with Fangrui Song in the upstream ticket, I think we can classify this as an unfortunate interaction between using -Ttext=0 in combination with --no-rosegment. (We added the latter in r332090, because btxld does not correctly handle input with more than 2 PT_LOAD segments.) Fangrui suggested to use a linker script instead, and Warner was already attempting this in r305353, but had to revert it due to "crypto-using boot problems" (not sure what those were :). This review updates the stand/i386/boot.ldscript to handle more sections, inserts some symbols like _edata and such that we use in libsa, and also discards any .interp section. It uses ORG which is defined on the linker command line using --defsym ORG=value to set the start of all the sections. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D23952 Modified: stable/12/stand/i386/Makefile.inc stable/12/stand/i386/boot.ldscript stable/12/stand/i386/boot2/Makefile stable/12/stand/i386/gptboot/Makefile stable/12/stand/i386/gptzfsboot/Makefile stable/12/stand/i386/isoboot/Makefile stable/12/stand/i386/loader/Makefile stable/12/stand/i386/zfsboot/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/i386/Makefile.inc ============================================================================== --- stable/12/stand/i386/Makefile.inc Thu Mar 19 21:38:52 2020 (r359154) +++ stable/12/stand/i386/Makefile.inc Thu Mar 19 22:33:24 2020 (r359155) @@ -22,13 +22,12 @@ CFLAGS+= -I${BTXLIB} # compact binary with no padding between text, data, bss LDSCRIPT= ${BOOTSRC}/i386/boot.ldscript -# LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-T,${LDSCRIPT},-S,--oformat,binary -# LD_FLAGS_BIN=-static -T ${LDSCRIPT} --gc-sections -LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary +LDFLAGS_ORG= -Wl,--defsym,ORG=${ORG},-T,${LDSCRIPT} +LDFLAGS_BIN= -e start ${LDFLAGS_ORG} -Wl,-N,-S,--oformat,binary .if ${LINKER_FEATURES:Mbuild-id} != "" -LDFLAGS_BIN+=-Wl,--build-id=none +LDFLAGS_BIN+= -Wl,--build-id=none .endif -LD_FLAGS_BIN=-static -N --gc-sections +LD_FLAGS_BIN= -static -N --gc-sections .if ${MACHINE_CPUARCH} == "amd64" DO32=1 Modified: stable/12/stand/i386/boot.ldscript ============================================================================== --- stable/12/stand/i386/boot.ldscript Thu Mar 19 21:38:52 2020 (r359154) +++ stable/12/stand/i386/boot.ldscript Thu Mar 19 22:33:24 2020 (r359155) @@ -1,11 +1,17 @@ /* $FreeBSD$ */ -/* Merge text, data and bss together almost no padding */ +/* Simplified linker script for the boot loaders. */ OUTPUT_FORMAT("elf32-i386-freebsd") OUTPUT_ARCH(i386) ENTRY(_start) SECTIONS { - . = 0x08048000 + SIZEOF_HEADERS; - .text : { *(.text) } =0x90909090 /* Pad with nops, if needed */ - .data : { *(.data) } _edata = .; - .bss : { *(.bss) } _end = .; + . = ORG; + .text : { *(.text .text.*) } =0xcccccccc /* Pad with int3, if needed */ + .rodata : { *(.rodata .rodata.*) } + .got : { *(.got) *(.igot) } + .got.plt : { *(.got.plt) *(.igot.plt) } + .data : { *(.data .data.*) } + _edata = .; PROVIDE (edata = .); + .bss : { *(.bss .bss.*) } + _end = .; PROVIDE (end = .); + /DISCARD/ : { *(.interp) } } Modified: stable/12/stand/i386/boot2/Makefile ============================================================================== --- stable/12/stand/i386/boot2/Makefile Thu Mar 19 21:38:52 2020 (r359154) +++ stable/12/stand/i386/boot2/Makefile Thu Mar 19 22:33:24 2020 (r359155) @@ -56,7 +56,7 @@ boot1: boot1.out ${OBJCOPY} -S -O binary boot1.out ${.TARGET} boot1.out: boot1.o - ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o + ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} boot1.o CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \ boot2.h sio.o @@ -84,7 +84,7 @@ CFLAGS.ashldi3.c= -Wno-missing-prototypes -Wno-missing CLEANFILES+= ashldi3.o boot2.out: ${BTXCRT} boot2.o sio.o ashldi3.o - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} + ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} SRCS= boot2.c boot2.h Modified: stable/12/stand/i386/gptboot/Makefile ============================================================================== --- stable/12/stand/i386/gptboot/Makefile Thu Mar 19 21:38:52 2020 (r359154) +++ stable/12/stand/i386/gptboot/Makefile Thu Mar 19 22:33:24 2020 (r359155) @@ -51,7 +51,7 @@ gptldr.bin: gptldr.out ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o - ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o + ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} gptldr.o CLEANFILES+= gptboot.bin gptboot.out gptboot.o sio.o crc32.o drv.o \ cons.o ${OPENCRYPTO_XTS} @@ -60,7 +60,7 @@ gptboot.bin: gptboot.out ${OBJCOPY} -S -O binary gptboot.out ${.TARGET} gptboot.out: ${BTXCRT} gptboot.o sio.o crc32.o drv.o cons.o ${OPENCRYPTO_XTS} - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} + ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} .include Modified: stable/12/stand/i386/gptzfsboot/Makefile ============================================================================== --- stable/12/stand/i386/gptzfsboot/Makefile Thu Mar 19 21:38:52 2020 (r359154) +++ stable/12/stand/i386/gptzfsboot/Makefile Thu Mar 19 22:33:24 2020 (r359155) @@ -57,7 +57,7 @@ gptldr.bin: gptldr.out ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o - ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o + ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} gptldr.o CLEANFILES+= gptzfsboot.bin gptzfsboot.out zfsboot.o sio.o cons.o \ drv.o gpt.o ${OPENCRYPTO_XTS} @@ -67,7 +67,7 @@ gptzfsboot.bin: gptzfsboot.out gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o \ ${OPENCRYPTO_XTS} - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} + ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} zfsboot.o: ${ZFSSRC}/zfsimpl.c Modified: stable/12/stand/i386/isoboot/Makefile ============================================================================== --- stable/12/stand/i386/isoboot/Makefile Thu Mar 19 21:38:52 2020 (r359154) +++ stable/12/stand/i386/isoboot/Makefile Thu Mar 19 22:33:24 2020 (r359155) @@ -53,7 +53,7 @@ gptldr.bin: gptldr.out ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o - ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o + ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} gptldr.o CLEANFILES+= isoboot.bin isoboot.out isoboot.o sio.o crc32.o drv.o \ cons.o ${OPENCRYPTO_XTS} @@ -62,6 +62,6 @@ isoboot.bin: isoboot.out ${OBJCOPY} -S -O binary isoboot.out ${.TARGET} isoboot.out: ${BTXCRT} isoboot.o sio.o crc32.o drv.o cons.o ${OPENCRYPTO_XTS} - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} + ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} .include Modified: stable/12/stand/i386/loader/Makefile ============================================================================== --- stable/12/stand/i386/loader/Makefile Thu Mar 19 21:38:52 2020 (r359154) +++ stable/12/stand/i386/loader/Makefile Thu Mar 19 22:33:24 2020 (r359155) @@ -46,8 +46,10 @@ HELP_FILES= ${.CURDIR}/help.i386 CLEANFILES+= ${LOADER} ${LOADER}.bin +ORG= 0x0 + CFLAGS+= -Wall -LDFLAGS+= -static -Ttext 0x0 -Wl,--gc-sections +LDFLAGS+= -static ${LDFLAGS_ORG} -Wl,--gc-sections # i386 standalone support library LIBI386= ${BOOTOBJ}/i386/libi386/libi386.a Modified: stable/12/stand/i386/zfsboot/Makefile ============================================================================== --- stable/12/stand/i386/zfsboot/Makefile Thu Mar 19 21:38:52 2020 (r359154) +++ stable/12/stand/i386/zfsboot/Makefile Thu Mar 19 22:33:24 2020 (r359155) @@ -49,7 +49,7 @@ zfsboot1: zfsldr.out ${OBJCOPY} -S -O binary zfsldr.out ${.TARGET} zfsldr.out: zfsldr.o - ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} zfsldr.o + ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} zfsldr.o CLEANFILES+= zfsboot2 zfsboot.ld zfsboot.ldr zfsboot.bin zfsboot.out \ zfsboot.o zfsboot.s zfsboot.s.tmp sio.o cons.o drv.o @@ -75,7 +75,7 @@ zfsboot.bin: zfsboot.out ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} zfsboot.out: ${BTXCRT} zfsboot.o sio.o drv.o cons.o - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} + ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} SRCS= zfsboot.c From owner-svn-src-stable-12@freebsd.org Fri Mar 20 21:43:13 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 9A4AD273BFF; Fri, 20 Mar 2020 21:43:13 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48kchd4K92z4FL4; Fri, 20 Mar 2020 21:43:13 +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 74EAE217D; Fri, 20 Mar 2020 21:43:13 +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 02KLhDxI068935; Fri, 20 Mar 2020 21:43:13 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02KLh9XU068917; Fri, 20 Mar 2020 21:43:09 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202003202143.02KLh9XU068917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 20 Mar 2020 21:43:09 +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: r359186 - in stable/12: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes crypto/openssl/crypto/aes/asm crypto/openssl/crypto/aria crypto/openssl/crypto... 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/aes/asm crypto/openssl/crypto/aria crypto/openssl/crypto/asn1 crypto/openssl/cryp... X-SVN-Commit-Revision: 359186 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.29 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, 20 Mar 2020 21:43:13 -0000 Author: jkim Date: Fri Mar 20 21:43:08 2020 New Revision: 359186 URL: https://svnweb.freebsd.org/changeset/base/359186 Log: MFC: r359060, r359061, r359066 Merge OpenSSL 1.1.1e. Added: stable/12/crypto/openssl/crypto/aes/aes_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/aes/aes_local.h stable/12/crypto/openssl/crypto/asn1/asn1_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/asn1/asn1_local.h stable/12/crypto/openssl/crypto/async/async_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/async/async_local.h stable/12/crypto/openssl/crypto/bf/bf_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/bf/bf_local.h stable/12/crypto/openssl/crypto/bio/bio_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/bio/bio_local.h stable/12/crypto/openssl/crypto/blake2/blake2_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/blake2/blake2_local.h stable/12/crypto/openssl/crypto/bn/bn_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/bn/bn_local.h stable/12/crypto/openssl/crypto/camellia/cmll_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/camellia/cmll_local.h stable/12/crypto/openssl/crypto/cast/cast_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/cast/cast_local.h stable/12/crypto/openssl/crypto/cms/cms_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/cms/cms_local.h stable/12/crypto/openssl/crypto/comp/comp_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/comp/comp_local.h stable/12/crypto/openssl/crypto/conf/conf_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/conf/conf_local.h stable/12/crypto/openssl/crypto/ct/ct_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/ct/ct_local.h stable/12/crypto/openssl/crypto/des/des_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/des/des_local.h stable/12/crypto/openssl/crypto/dh/dh_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/dh/dh_local.h stable/12/crypto/openssl/crypto/dsa/dsa_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/dsa/dsa_local.h stable/12/crypto/openssl/crypto/dso/dso_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/dso/dso_local.h stable/12/crypto/openssl/crypto/ec/curve448/curve448_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/ec/curve448/curve448_local.h stable/12/crypto/openssl/crypto/ec/ec_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/ec/ec_local.h stable/12/crypto/openssl/crypto/engine/eng_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/engine/eng_local.h stable/12/crypto/openssl/crypto/evp/evp_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/evp/evp_local.h stable/12/crypto/openssl/crypto/hmac/hmac_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/hmac/hmac_local.h stable/12/crypto/openssl/crypto/idea/idea_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/idea/idea_local.h stable/12/crypto/openssl/crypto/lhash/lhash_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/lhash/lhash_local.h stable/12/crypto/openssl/crypto/md4/md4_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/md4/md4_local.h stable/12/crypto/openssl/crypto/md5/md5_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/md5/md5_local.h stable/12/crypto/openssl/crypto/modes/modes_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/modes/modes_local.h stable/12/crypto/openssl/crypto/objects/obj_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/objects/obj_local.h stable/12/crypto/openssl/crypto/ocsp/ocsp_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/ocsp/ocsp_local.h stable/12/crypto/openssl/crypto/pkcs12/p12_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/pkcs12/p12_local.h stable/12/crypto/openssl/crypto/rand/rand_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/rand/rand_local.h stable/12/crypto/openssl/crypto/rc2/rc2_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/rc2/rc2_local.h stable/12/crypto/openssl/crypto/rc4/rc4_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/rc4/rc4_local.h stable/12/crypto/openssl/crypto/rc5/rc5_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/rc5/rc5_local.h stable/12/crypto/openssl/crypto/ripemd/rmd_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/ripemd/rmd_local.h stable/12/crypto/openssl/crypto/rsa/rsa_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/rsa/rsa_local.h stable/12/crypto/openssl/crypto/seed/seed_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/seed/seed_local.h stable/12/crypto/openssl/crypto/sha/sha_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/sha/sha_local.h stable/12/crypto/openssl/crypto/sm3/sm3_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/sm3/sm3_local.h stable/12/crypto/openssl/crypto/store/store_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/store/store_local.h stable/12/crypto/openssl/crypto/ts/ts_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/ts/ts_local.h stable/12/crypto/openssl/crypto/ui/ui_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/ui/ui_local.h stable/12/crypto/openssl/crypto/whrlpool/wp_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/whrlpool/wp_local.h stable/12/crypto/openssl/crypto/x509/x509_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/x509/x509_local.h stable/12/crypto/openssl/crypto/x509v3/pcy_local.h - copied unchanged from r359060, head/crypto/openssl/crypto/x509v3/pcy_local.h stable/12/crypto/openssl/doc/man3/EVP_PKEY_size.pod - copied unchanged from r359060, head/crypto/openssl/doc/man3/EVP_PKEY_size.pod stable/12/crypto/openssl/doc/man3/X509_LOOKUP.pod - copied unchanged from r359060, head/crypto/openssl/doc/man3/X509_LOOKUP.pod stable/12/crypto/openssl/doc/man7/proxy-certificates.pod - copied unchanged from r359060, head/crypto/openssl/doc/man7/proxy-certificates.pod stable/12/crypto/openssl/include/crypto/ - copied from r359060, head/crypto/openssl/include/crypto/ stable/12/crypto/openssl/include/internal/constant_time.h - copied unchanged from r359060, head/crypto/openssl/include/internal/constant_time.h stable/12/crypto/openssl/ssl/packet_local.h - copied unchanged from r359060, head/crypto/openssl/ssl/packet_local.h stable/12/crypto/openssl/ssl/record/record_local.h - copied unchanged from r359060, head/crypto/openssl/ssl/record/record_local.h stable/12/crypto/openssl/ssl/ssl_local.h - copied unchanged from r359060, head/crypto/openssl/ssl/ssl_local.h stable/12/crypto/openssl/ssl/statem/statem_local.h - copied unchanged from r359060, head/crypto/openssl/ssl/statem/statem_local.h stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_size.3 - copied unchanged from r359060, head/secure/lib/libcrypto/man/man3/EVP_PKEY_size.3 stable/12/secure/lib/libcrypto/man/man3/X509_LOOKUP.3 - copied unchanged from r359060, head/secure/lib/libcrypto/man/man3/X509_LOOKUP.3 stable/12/secure/lib/libcrypto/man/man7/proxy-certificates.7 - copied unchanged from r359060, head/secure/lib/libcrypto/man/man7/proxy-certificates.7 Deleted: stable/12/crypto/openssl/crypto/aes/aes_locl.h stable/12/crypto/openssl/crypto/asn1/asn1_locl.h stable/12/crypto/openssl/crypto/async/async_locl.h stable/12/crypto/openssl/crypto/bf/bf_locl.h stable/12/crypto/openssl/crypto/bio/bio_lcl.h stable/12/crypto/openssl/crypto/blake2/blake2_locl.h stable/12/crypto/openssl/crypto/bn/bn_lcl.h stable/12/crypto/openssl/crypto/camellia/cmll_locl.h stable/12/crypto/openssl/crypto/cast/cast_lcl.h stable/12/crypto/openssl/crypto/cms/cms_lcl.h stable/12/crypto/openssl/crypto/comp/comp_lcl.h stable/12/crypto/openssl/crypto/conf/conf_lcl.h stable/12/crypto/openssl/crypto/ct/ct_locl.h stable/12/crypto/openssl/crypto/des/des_locl.h stable/12/crypto/openssl/crypto/dh/dh_locl.h stable/12/crypto/openssl/crypto/dsa/dsa_locl.h stable/12/crypto/openssl/crypto/dso/dso_locl.h stable/12/crypto/openssl/crypto/ec/curve448/curve448_lcl.h stable/12/crypto/openssl/crypto/ec/ec_lcl.h stable/12/crypto/openssl/crypto/engine/eng_int.h stable/12/crypto/openssl/crypto/evp/evp_locl.h stable/12/crypto/openssl/crypto/hmac/hmac_lcl.h stable/12/crypto/openssl/crypto/idea/idea_lcl.h stable/12/crypto/openssl/crypto/include/internal/bn_conf.h stable/12/crypto/openssl/crypto/include/internal/dso_conf.h stable/12/crypto/openssl/crypto/lhash/lhash_lcl.h stable/12/crypto/openssl/crypto/md4/md4_locl.h stable/12/crypto/openssl/crypto/md5/md5_locl.h stable/12/crypto/openssl/crypto/modes/modes_lcl.h stable/12/crypto/openssl/crypto/objects/obj_lcl.h stable/12/crypto/openssl/crypto/ocsp/ocsp_lcl.h stable/12/crypto/openssl/crypto/pkcs12/p12_lcl.h stable/12/crypto/openssl/crypto/rand/rand_lcl.h stable/12/crypto/openssl/crypto/rc2/rc2_locl.h stable/12/crypto/openssl/crypto/rc4/rc4_locl.h stable/12/crypto/openssl/crypto/rc5/rc5_locl.h stable/12/crypto/openssl/crypto/ripemd/rmd_locl.h stable/12/crypto/openssl/crypto/rsa/rsa_locl.h stable/12/crypto/openssl/crypto/seed/seed_locl.h stable/12/crypto/openssl/crypto/sha/sha_locl.h stable/12/crypto/openssl/crypto/sm3/sm3_locl.h stable/12/crypto/openssl/crypto/store/store_locl.h stable/12/crypto/openssl/crypto/ts/ts_lcl.h stable/12/crypto/openssl/crypto/ui/ui_locl.h stable/12/crypto/openssl/crypto/whrlpool/wp_locl.h stable/12/crypto/openssl/crypto/x509/x509_lcl.h stable/12/crypto/openssl/crypto/x509v3/pcy_int.h stable/12/crypto/openssl/doc/HOWTO/proxy_certificates.txt stable/12/crypto/openssl/include/internal/constant_time_locl.h stable/12/crypto/openssl/ssl/packet_locl.h stable/12/crypto/openssl/ssl/record/record_locl.h stable/12/crypto/openssl/ssl/ssl_locl.h stable/12/crypto/openssl/ssl/statem/statem_locl.h Modified: stable/12/crypto/openssl/CHANGES stable/12/crypto/openssl/CONTRIBUTING stable/12/crypto/openssl/Configure stable/12/crypto/openssl/INSTALL stable/12/crypto/openssl/NEWS stable/12/crypto/openssl/README stable/12/crypto/openssl/apps/apps.c stable/12/crypto/openssl/apps/apps.h stable/12/crypto/openssl/apps/dgst.c stable/12/crypto/openssl/apps/enc.c stable/12/crypto/openssl/apps/ocsp.c stable/12/crypto/openssl/apps/openssl.c stable/12/crypto/openssl/apps/passwd.c stable/12/crypto/openssl/apps/pkcs12.c stable/12/crypto/openssl/apps/pkeyutl.c stable/12/crypto/openssl/apps/req.c stable/12/crypto/openssl/apps/s_cb.c stable/12/crypto/openssl/apps/s_server.c stable/12/crypto/openssl/apps/server.pem stable/12/crypto/openssl/apps/speed.c stable/12/crypto/openssl/apps/timeouts.h stable/12/crypto/openssl/apps/ts.c stable/12/crypto/openssl/apps/x509.c stable/12/crypto/openssl/appveyor.yml stable/12/crypto/openssl/build.info stable/12/crypto/openssl/config stable/12/crypto/openssl/crypto/LPdir_unix.c stable/12/crypto/openssl/crypto/aes/aes_core.c stable/12/crypto/openssl/crypto/aes/aes_ecb.c stable/12/crypto/openssl/crypto/aes/aes_ige.c stable/12/crypto/openssl/crypto/aes/aes_misc.c stable/12/crypto/openssl/crypto/aes/aes_x86core.c stable/12/crypto/openssl/crypto/aes/asm/aes-armv4.pl stable/12/crypto/openssl/crypto/aes/asm/aes-c64xplus.pl stable/12/crypto/openssl/crypto/aes/asm/aes-mips.pl stable/12/crypto/openssl/crypto/aes/asm/aes-parisc.pl stable/12/crypto/openssl/crypto/aes/asm/aes-ppc.pl stable/12/crypto/openssl/crypto/aes/asm/aes-s390x.pl stable/12/crypto/openssl/crypto/aes/asm/aes-sparcv9.pl stable/12/crypto/openssl/crypto/aes/asm/aesfx-sparcv9.pl stable/12/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl stable/12/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl stable/12/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl stable/12/crypto/openssl/crypto/aes/asm/aesni-x86.pl stable/12/crypto/openssl/crypto/aes/asm/aesni-x86_64.pl stable/12/crypto/openssl/crypto/aes/asm/aesp8-ppc.pl stable/12/crypto/openssl/crypto/aes/asm/aest4-sparcv9.pl stable/12/crypto/openssl/crypto/aes/asm/aesv8-armx.pl stable/12/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl stable/12/crypto/openssl/crypto/aes/asm/vpaes-armv8.pl stable/12/crypto/openssl/crypto/aes/asm/vpaes-ppc.pl stable/12/crypto/openssl/crypto/aes/asm/vpaes-x86.pl stable/12/crypto/openssl/crypto/aes/asm/vpaes-x86_64.pl stable/12/crypto/openssl/crypto/aria/aria.c stable/12/crypto/openssl/crypto/arm64cpuid.pl stable/12/crypto/openssl/crypto/arm_arch.h stable/12/crypto/openssl/crypto/armv4cpuid.pl stable/12/crypto/openssl/crypto/asn1/a_bitstr.c stable/12/crypto/openssl/crypto/asn1/a_d2i_fp.c stable/12/crypto/openssl/crypto/asn1/a_gentm.c stable/12/crypto/openssl/crypto/asn1/a_int.c stable/12/crypto/openssl/crypto/asn1/a_mbstr.c stable/12/crypto/openssl/crypto/asn1/a_object.c stable/12/crypto/openssl/crypto/asn1/a_print.c stable/12/crypto/openssl/crypto/asn1/a_sign.c stable/12/crypto/openssl/crypto/asn1/a_strex.c stable/12/crypto/openssl/crypto/asn1/a_time.c stable/12/crypto/openssl/crypto/asn1/a_type.c stable/12/crypto/openssl/crypto/asn1/a_utctm.c stable/12/crypto/openssl/crypto/asn1/a_verify.c stable/12/crypto/openssl/crypto/asn1/ameth_lib.c stable/12/crypto/openssl/crypto/asn1/asn1_lib.c stable/12/crypto/openssl/crypto/asn1/asn1_par.c stable/12/crypto/openssl/crypto/asn1/asn_mime.c stable/12/crypto/openssl/crypto/asn1/asn_moid.c stable/12/crypto/openssl/crypto/asn1/charmap.h stable/12/crypto/openssl/crypto/asn1/d2i_pr.c stable/12/crypto/openssl/crypto/asn1/d2i_pu.c stable/12/crypto/openssl/crypto/asn1/f_int.c stable/12/crypto/openssl/crypto/asn1/f_string.c stable/12/crypto/openssl/crypto/asn1/i2d_pr.c stable/12/crypto/openssl/crypto/asn1/p8_pkey.c stable/12/crypto/openssl/crypto/asn1/t_pkey.c stable/12/crypto/openssl/crypto/asn1/tasn_dec.c stable/12/crypto/openssl/crypto/asn1/tasn_enc.c stable/12/crypto/openssl/crypto/asn1/tasn_fre.c stable/12/crypto/openssl/crypto/asn1/tasn_new.c stable/12/crypto/openssl/crypto/asn1/tasn_prn.c stable/12/crypto/openssl/crypto/asn1/tasn_scn.c stable/12/crypto/openssl/crypto/asn1/tasn_utl.c stable/12/crypto/openssl/crypto/asn1/x_algor.c stable/12/crypto/openssl/crypto/asn1/x_bignum.c stable/12/crypto/openssl/crypto/asn1/x_int64.c stable/12/crypto/openssl/crypto/asn1/x_sig.c stable/12/crypto/openssl/crypto/async/arch/async_null.c stable/12/crypto/openssl/crypto/async/arch/async_posix.c stable/12/crypto/openssl/crypto/async/arch/async_posix.h stable/12/crypto/openssl/crypto/async/async.c stable/12/crypto/openssl/crypto/async/async_wait.c stable/12/crypto/openssl/crypto/bf/asm/bf-586.pl stable/12/crypto/openssl/crypto/bf/bf_cfb64.c stable/12/crypto/openssl/crypto/bf/bf_ecb.c stable/12/crypto/openssl/crypto/bf/bf_enc.c stable/12/crypto/openssl/crypto/bf/bf_ofb64.c stable/12/crypto/openssl/crypto/bf/bf_skey.c stable/12/crypto/openssl/crypto/bio/b_addr.c stable/12/crypto/openssl/crypto/bio/b_dump.c stable/12/crypto/openssl/crypto/bio/b_print.c stable/12/crypto/openssl/crypto/bio/b_sock.c stable/12/crypto/openssl/crypto/bio/b_sock2.c stable/12/crypto/openssl/crypto/bio/bf_buff.c stable/12/crypto/openssl/crypto/bio/bf_lbuf.c stable/12/crypto/openssl/crypto/bio/bf_nbio.c stable/12/crypto/openssl/crypto/bio/bf_null.c stable/12/crypto/openssl/crypto/bio/bio_cb.c stable/12/crypto/openssl/crypto/bio/bio_lib.c stable/12/crypto/openssl/crypto/bio/bio_meth.c stable/12/crypto/openssl/crypto/bio/bss_acpt.c stable/12/crypto/openssl/crypto/bio/bss_bio.c stable/12/crypto/openssl/crypto/bio/bss_conn.c stable/12/crypto/openssl/crypto/bio/bss_dgram.c stable/12/crypto/openssl/crypto/bio/bss_fd.c stable/12/crypto/openssl/crypto/bio/bss_file.c stable/12/crypto/openssl/crypto/bio/bss_log.c stable/12/crypto/openssl/crypto/bio/bss_mem.c stable/12/crypto/openssl/crypto/bio/bss_null.c stable/12/crypto/openssl/crypto/bio/bss_sock.c stable/12/crypto/openssl/crypto/blake2/blake2b.c stable/12/crypto/openssl/crypto/blake2/blake2s.c stable/12/crypto/openssl/crypto/blake2/m_blake2b.c stable/12/crypto/openssl/crypto/blake2/m_blake2s.c stable/12/crypto/openssl/crypto/bn/README.pod stable/12/crypto/openssl/crypto/bn/asm/armv4-gf2m.pl stable/12/crypto/openssl/crypto/bn/asm/armv4-mont.pl stable/12/crypto/openssl/crypto/bn/asm/armv8-mont.pl stable/12/crypto/openssl/crypto/bn/asm/bn-586.pl stable/12/crypto/openssl/crypto/bn/asm/c64xplus-gf2m.pl stable/12/crypto/openssl/crypto/bn/asm/co-586.pl stable/12/crypto/openssl/crypto/bn/asm/ia64-mont.pl stable/12/crypto/openssl/crypto/bn/asm/mips-mont.pl stable/12/crypto/openssl/crypto/bn/asm/mips.pl stable/12/crypto/openssl/crypto/bn/asm/parisc-mont.pl stable/12/crypto/openssl/crypto/bn/asm/ppc-mont.pl stable/12/crypto/openssl/crypto/bn/asm/ppc.pl stable/12/crypto/openssl/crypto/bn/asm/ppc64-mont.pl stable/12/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl stable/12/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl stable/12/crypto/openssl/crypto/bn/asm/s390x-gf2m.pl stable/12/crypto/openssl/crypto/bn/asm/s390x-mont.pl stable/12/crypto/openssl/crypto/bn/asm/s390x.S stable/12/crypto/openssl/crypto/bn/asm/sparct4-mont.pl stable/12/crypto/openssl/crypto/bn/asm/sparcv9-gf2m.pl stable/12/crypto/openssl/crypto/bn/asm/sparcv9-mont.pl stable/12/crypto/openssl/crypto/bn/asm/sparcv9a-mont.pl stable/12/crypto/openssl/crypto/bn/asm/via-mont.pl stable/12/crypto/openssl/crypto/bn/asm/vis3-mont.pl stable/12/crypto/openssl/crypto/bn/asm/x86-gf2m.pl stable/12/crypto/openssl/crypto/bn/asm/x86-mont.pl stable/12/crypto/openssl/crypto/bn/asm/x86_64-gcc.c stable/12/crypto/openssl/crypto/bn/asm/x86_64-gf2m.pl stable/12/crypto/openssl/crypto/bn/asm/x86_64-mont.pl stable/12/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl stable/12/crypto/openssl/crypto/bn/bn_add.c stable/12/crypto/openssl/crypto/bn/bn_asm.c stable/12/crypto/openssl/crypto/bn/bn_blind.c stable/12/crypto/openssl/crypto/bn/bn_ctx.c stable/12/crypto/openssl/crypto/bn/bn_depr.c stable/12/crypto/openssl/crypto/bn/bn_dh.c stable/12/crypto/openssl/crypto/bn/bn_div.c stable/12/crypto/openssl/crypto/bn/bn_exp.c stable/12/crypto/openssl/crypto/bn/bn_exp2.c stable/12/crypto/openssl/crypto/bn/bn_gcd.c stable/12/crypto/openssl/crypto/bn/bn_gf2m.c stable/12/crypto/openssl/crypto/bn/bn_intern.c stable/12/crypto/openssl/crypto/bn/bn_kron.c stable/12/crypto/openssl/crypto/bn/bn_lib.c stable/12/crypto/openssl/crypto/bn/bn_mod.c stable/12/crypto/openssl/crypto/bn/bn_mont.c stable/12/crypto/openssl/crypto/bn/bn_mpi.c stable/12/crypto/openssl/crypto/bn/bn_mul.c stable/12/crypto/openssl/crypto/bn/bn_nist.c stable/12/crypto/openssl/crypto/bn/bn_prime.c stable/12/crypto/openssl/crypto/bn/bn_prime.h stable/12/crypto/openssl/crypto/bn/bn_print.c stable/12/crypto/openssl/crypto/bn/bn_rand.c stable/12/crypto/openssl/crypto/bn/bn_recp.c stable/12/crypto/openssl/crypto/bn/bn_shift.c stable/12/crypto/openssl/crypto/bn/bn_sqr.c stable/12/crypto/openssl/crypto/bn/bn_sqrt.c stable/12/crypto/openssl/crypto/bn/bn_srp.c stable/12/crypto/openssl/crypto/bn/bn_word.c stable/12/crypto/openssl/crypto/bn/bn_x931p.c stable/12/crypto/openssl/crypto/bn/build.info stable/12/crypto/openssl/crypto/bn/rsaz_exp.h stable/12/crypto/openssl/crypto/c64xpluscpuid.pl stable/12/crypto/openssl/crypto/camellia/asm/cmll-x86.pl stable/12/crypto/openssl/crypto/camellia/asm/cmll-x86_64.pl stable/12/crypto/openssl/crypto/camellia/asm/cmllt4-sparcv9.pl stable/12/crypto/openssl/crypto/camellia/camellia.c stable/12/crypto/openssl/crypto/camellia/cmll_ecb.c stable/12/crypto/openssl/crypto/camellia/cmll_misc.c stable/12/crypto/openssl/crypto/cast/asm/cast-586.pl stable/12/crypto/openssl/crypto/cast/c_cfb64.c stable/12/crypto/openssl/crypto/cast/c_ecb.c stable/12/crypto/openssl/crypto/cast/c_enc.c stable/12/crypto/openssl/crypto/cast/c_ofb64.c stable/12/crypto/openssl/crypto/cast/c_skey.c stable/12/crypto/openssl/crypto/chacha/asm/chacha-armv4.pl stable/12/crypto/openssl/crypto/chacha/asm/chacha-armv8.pl stable/12/crypto/openssl/crypto/chacha/asm/chacha-c64xplus.pl stable/12/crypto/openssl/crypto/chacha/asm/chacha-ppc.pl stable/12/crypto/openssl/crypto/chacha/asm/chacha-s390x.pl stable/12/crypto/openssl/crypto/chacha/asm/chacha-x86.pl stable/12/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl stable/12/crypto/openssl/crypto/chacha/chacha_enc.c stable/12/crypto/openssl/crypto/cmac/cm_ameth.c stable/12/crypto/openssl/crypto/cmac/cm_pmeth.c stable/12/crypto/openssl/crypto/cms/cms_asn1.c stable/12/crypto/openssl/crypto/cms/cms_att.c stable/12/crypto/openssl/crypto/cms/cms_cd.c stable/12/crypto/openssl/crypto/cms/cms_dd.c stable/12/crypto/openssl/crypto/cms/cms_enc.c stable/12/crypto/openssl/crypto/cms/cms_env.c stable/12/crypto/openssl/crypto/cms/cms_ess.c stable/12/crypto/openssl/crypto/cms/cms_io.c stable/12/crypto/openssl/crypto/cms/cms_kari.c stable/12/crypto/openssl/crypto/cms/cms_lib.c stable/12/crypto/openssl/crypto/cms/cms_pwri.c stable/12/crypto/openssl/crypto/cms/cms_sd.c stable/12/crypto/openssl/crypto/cms/cms_smime.c stable/12/crypto/openssl/crypto/comp/c_zlib.c stable/12/crypto/openssl/crypto/comp/comp_lib.c stable/12/crypto/openssl/crypto/conf/conf_def.c stable/12/crypto/openssl/crypto/conf/conf_def.h stable/12/crypto/openssl/crypto/conf/conf_lib.c stable/12/crypto/openssl/crypto/conf/conf_mall.c stable/12/crypto/openssl/crypto/conf/conf_ssl.c stable/12/crypto/openssl/crypto/cryptlib.c stable/12/crypto/openssl/crypto/ct/ct_b64.c stable/12/crypto/openssl/crypto/ct/ct_oct.c stable/12/crypto/openssl/crypto/ct/ct_policy.c stable/12/crypto/openssl/crypto/ct/ct_prn.c stable/12/crypto/openssl/crypto/ct/ct_sct.c stable/12/crypto/openssl/crypto/ct/ct_sct_ctx.c stable/12/crypto/openssl/crypto/ct/ct_vfy.c stable/12/crypto/openssl/crypto/ct/ct_x509v3.c stable/12/crypto/openssl/crypto/ctype.c stable/12/crypto/openssl/crypto/des/asm/crypt586.pl stable/12/crypto/openssl/crypto/des/asm/des-586.pl stable/12/crypto/openssl/crypto/des/asm/des_enc.m4 stable/12/crypto/openssl/crypto/des/asm/dest4-sparcv9.pl stable/12/crypto/openssl/crypto/des/cbc_cksm.c stable/12/crypto/openssl/crypto/des/cfb64ede.c stable/12/crypto/openssl/crypto/des/cfb64enc.c stable/12/crypto/openssl/crypto/des/cfb_enc.c stable/12/crypto/openssl/crypto/des/des_enc.c stable/12/crypto/openssl/crypto/des/ecb3_enc.c stable/12/crypto/openssl/crypto/des/ecb_enc.c stable/12/crypto/openssl/crypto/des/fcrypt.c stable/12/crypto/openssl/crypto/des/fcrypt_b.c stable/12/crypto/openssl/crypto/des/ncbc_enc.c stable/12/crypto/openssl/crypto/des/ofb64ede.c stable/12/crypto/openssl/crypto/des/ofb64enc.c stable/12/crypto/openssl/crypto/des/ofb_enc.c stable/12/crypto/openssl/crypto/des/pcbc_enc.c stable/12/crypto/openssl/crypto/des/qud_cksm.c stable/12/crypto/openssl/crypto/des/set_key.c stable/12/crypto/openssl/crypto/des/str2key.c stable/12/crypto/openssl/crypto/des/xcbc_enc.c stable/12/crypto/openssl/crypto/dh/dh_ameth.c stable/12/crypto/openssl/crypto/dh/dh_asn1.c stable/12/crypto/openssl/crypto/dh/dh_check.c stable/12/crypto/openssl/crypto/dh/dh_gen.c stable/12/crypto/openssl/crypto/dh/dh_key.c stable/12/crypto/openssl/crypto/dh/dh_lib.c stable/12/crypto/openssl/crypto/dh/dh_meth.c stable/12/crypto/openssl/crypto/dh/dh_pmeth.c stable/12/crypto/openssl/crypto/dh/dh_rfc5114.c stable/12/crypto/openssl/crypto/dh/dh_rfc7919.c stable/12/crypto/openssl/crypto/dllmain.c stable/12/crypto/openssl/crypto/dsa/dsa_ameth.c stable/12/crypto/openssl/crypto/dsa/dsa_asn1.c stable/12/crypto/openssl/crypto/dsa/dsa_gen.c stable/12/crypto/openssl/crypto/dsa/dsa_key.c stable/12/crypto/openssl/crypto/dsa/dsa_lib.c stable/12/crypto/openssl/crypto/dsa/dsa_meth.c stable/12/crypto/openssl/crypto/dsa/dsa_ossl.c stable/12/crypto/openssl/crypto/dsa/dsa_pmeth.c stable/12/crypto/openssl/crypto/dsa/dsa_sign.c stable/12/crypto/openssl/crypto/dsa/dsa_vrf.c stable/12/crypto/openssl/crypto/dso/dso_dl.c stable/12/crypto/openssl/crypto/dso/dso_dlfcn.c stable/12/crypto/openssl/crypto/dso/dso_lib.c stable/12/crypto/openssl/crypto/dso/dso_openssl.c stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-armv4.pl stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-armv8.pl stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-ppc64.pl stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-sparcv9.pl stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86.pl stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl stable/12/crypto/openssl/crypto/ec/asm/x25519-ppc64.pl stable/12/crypto/openssl/crypto/ec/asm/x25519-x86_64.pl stable/12/crypto/openssl/crypto/ec/curve25519.c stable/12/crypto/openssl/crypto/ec/curve448/arch_32/arch_intrinsics.h stable/12/crypto/openssl/crypto/ec/curve448/arch_32/f_impl.h stable/12/crypto/openssl/crypto/ec/curve448/curve448.c stable/12/crypto/openssl/crypto/ec/curve448/curve448utils.h stable/12/crypto/openssl/crypto/ec/curve448/ed448.h stable/12/crypto/openssl/crypto/ec/curve448/eddsa.c stable/12/crypto/openssl/crypto/ec/curve448/field.h stable/12/crypto/openssl/crypto/ec/curve448/point_448.h stable/12/crypto/openssl/crypto/ec/curve448/word.h stable/12/crypto/openssl/crypto/ec/ec2_oct.c stable/12/crypto/openssl/crypto/ec/ec2_smpl.c 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_check.c stable/12/crypto/openssl/crypto/ec/ec_curve.c stable/12/crypto/openssl/crypto/ec/ec_cvt.c stable/12/crypto/openssl/crypto/ec/ec_key.c stable/12/crypto/openssl/crypto/ec/ec_kmeth.c stable/12/crypto/openssl/crypto/ec/ec_lib.c stable/12/crypto/openssl/crypto/ec/ec_mult.c stable/12/crypto/openssl/crypto/ec/ec_oct.c stable/12/crypto/openssl/crypto/ec/ec_pmeth.c stable/12/crypto/openssl/crypto/ec/ec_print.c stable/12/crypto/openssl/crypto/ec/ecdh_kdf.c stable/12/crypto/openssl/crypto/ec/ecdh_ossl.c stable/12/crypto/openssl/crypto/ec/ecdsa_ossl.c stable/12/crypto/openssl/crypto/ec/ecdsa_sign.c stable/12/crypto/openssl/crypto/ec/ecdsa_vrf.c stable/12/crypto/openssl/crypto/ec/ecp_mont.c stable/12/crypto/openssl/crypto/ec/ecp_nist.c stable/12/crypto/openssl/crypto/ec/ecp_nistp224.c stable/12/crypto/openssl/crypto/ec/ecp_nistp256.c stable/12/crypto/openssl/crypto/ec/ecp_nistp521.c stable/12/crypto/openssl/crypto/ec/ecp_nistputil.c stable/12/crypto/openssl/crypto/ec/ecp_nistz256.c stable/12/crypto/openssl/crypto/ec/ecp_oct.c stable/12/crypto/openssl/crypto/ec/ecp_smpl.c stable/12/crypto/openssl/crypto/ec/ecx_meth.c stable/12/crypto/openssl/crypto/engine/README stable/12/crypto/openssl/crypto/engine/eng_all.c stable/12/crypto/openssl/crypto/engine/eng_cnf.c stable/12/crypto/openssl/crypto/engine/eng_ctrl.c stable/12/crypto/openssl/crypto/engine/eng_devcrypto.c stable/12/crypto/openssl/crypto/engine/eng_dyn.c stable/12/crypto/openssl/crypto/engine/eng_fat.c stable/12/crypto/openssl/crypto/engine/eng_init.c stable/12/crypto/openssl/crypto/engine/eng_lib.c stable/12/crypto/openssl/crypto/engine/eng_list.c stable/12/crypto/openssl/crypto/engine/eng_openssl.c stable/12/crypto/openssl/crypto/engine/eng_pkey.c stable/12/crypto/openssl/crypto/engine/eng_rdrand.c stable/12/crypto/openssl/crypto/engine/eng_table.c stable/12/crypto/openssl/crypto/engine/tb_asnmth.c stable/12/crypto/openssl/crypto/engine/tb_cipher.c stable/12/crypto/openssl/crypto/engine/tb_dh.c stable/12/crypto/openssl/crypto/engine/tb_digest.c stable/12/crypto/openssl/crypto/engine/tb_dsa.c stable/12/crypto/openssl/crypto/engine/tb_eckey.c stable/12/crypto/openssl/crypto/engine/tb_pkmeth.c stable/12/crypto/openssl/crypto/engine/tb_rand.c stable/12/crypto/openssl/crypto/engine/tb_rsa.c stable/12/crypto/openssl/crypto/err/err.c stable/12/crypto/openssl/crypto/err/err_all.c stable/12/crypto/openssl/crypto/err/openssl.txt stable/12/crypto/openssl/crypto/evp/bio_md.c stable/12/crypto/openssl/crypto/evp/bio_ok.c stable/12/crypto/openssl/crypto/evp/c_allc.c stable/12/crypto/openssl/crypto/evp/c_alld.c stable/12/crypto/openssl/crypto/evp/cmeth_lib.c stable/12/crypto/openssl/crypto/evp/digest.c stable/12/crypto/openssl/crypto/evp/e_aes.c stable/12/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c stable/12/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha256.c stable/12/crypto/openssl/crypto/evp/e_aria.c stable/12/crypto/openssl/crypto/evp/e_bf.c stable/12/crypto/openssl/crypto/evp/e_camellia.c stable/12/crypto/openssl/crypto/evp/e_cast.c stable/12/crypto/openssl/crypto/evp/e_chacha20_poly1305.c stable/12/crypto/openssl/crypto/evp/e_des.c stable/12/crypto/openssl/crypto/evp/e_des3.c stable/12/crypto/openssl/crypto/evp/e_idea.c stable/12/crypto/openssl/crypto/evp/e_null.c stable/12/crypto/openssl/crypto/evp/e_rc2.c stable/12/crypto/openssl/crypto/evp/e_rc4.c stable/12/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c stable/12/crypto/openssl/crypto/evp/e_rc5.c stable/12/crypto/openssl/crypto/evp/e_seed.c stable/12/crypto/openssl/crypto/evp/e_sm4.c stable/12/crypto/openssl/crypto/evp/e_xcbc_d.c stable/12/crypto/openssl/crypto/evp/encode.c stable/12/crypto/openssl/crypto/evp/evp_enc.c stable/12/crypto/openssl/crypto/evp/evp_err.c stable/12/crypto/openssl/crypto/evp/evp_lib.c stable/12/crypto/openssl/crypto/evp/evp_pbe.c stable/12/crypto/openssl/crypto/evp/evp_pkey.c stable/12/crypto/openssl/crypto/evp/m_md2.c stable/12/crypto/openssl/crypto/evp/m_md4.c stable/12/crypto/openssl/crypto/evp/m_md5.c stable/12/crypto/openssl/crypto/evp/m_md5_sha1.c stable/12/crypto/openssl/crypto/evp/m_mdc2.c stable/12/crypto/openssl/crypto/evp/m_null.c stable/12/crypto/openssl/crypto/evp/m_ripemd.c stable/12/crypto/openssl/crypto/evp/m_sha1.c stable/12/crypto/openssl/crypto/evp/m_sha3.c stable/12/crypto/openssl/crypto/evp/m_sigver.c stable/12/crypto/openssl/crypto/evp/m_wp.c stable/12/crypto/openssl/crypto/evp/names.c stable/12/crypto/openssl/crypto/evp/p5_crpt.c stable/12/crypto/openssl/crypto/evp/p5_crpt2.c stable/12/crypto/openssl/crypto/evp/p_lib.c stable/12/crypto/openssl/crypto/evp/p_sign.c stable/12/crypto/openssl/crypto/evp/p_verify.c stable/12/crypto/openssl/crypto/evp/pmeth_fn.c stable/12/crypto/openssl/crypto/evp/pmeth_gn.c stable/12/crypto/openssl/crypto/evp/pmeth_lib.c stable/12/crypto/openssl/crypto/ex_data.c stable/12/crypto/openssl/crypto/hmac/hm_ameth.c stable/12/crypto/openssl/crypto/hmac/hm_pmeth.c stable/12/crypto/openssl/crypto/hmac/hmac.c stable/12/crypto/openssl/crypto/idea/i_cbc.c stable/12/crypto/openssl/crypto/idea/i_cfb64.c stable/12/crypto/openssl/crypto/idea/i_ecb.c stable/12/crypto/openssl/crypto/idea/i_ofb64.c stable/12/crypto/openssl/crypto/idea/i_skey.c stable/12/crypto/openssl/crypto/init.c stable/12/crypto/openssl/crypto/kdf/hkdf.c stable/12/crypto/openssl/crypto/kdf/scrypt.c stable/12/crypto/openssl/crypto/kdf/tls1_prf.c stable/12/crypto/openssl/crypto/lhash/lh_stats.c stable/12/crypto/openssl/crypto/lhash/lhash.c stable/12/crypto/openssl/crypto/md4/md4_dgst.c stable/12/crypto/openssl/crypto/md5/asm/md5-586.pl stable/12/crypto/openssl/crypto/md5/asm/md5-sparcv9.pl stable/12/crypto/openssl/crypto/md5/asm/md5-x86_64.pl stable/12/crypto/openssl/crypto/md5/md5_dgst.c stable/12/crypto/openssl/crypto/mem.c stable/12/crypto/openssl/crypto/mips_arch.h stable/12/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl stable/12/crypto/openssl/crypto/modes/asm/ghash-armv4.pl stable/12/crypto/openssl/crypto/modes/asm/ghash-c64xplus.pl stable/12/crypto/openssl/crypto/modes/asm/ghash-ia64.pl stable/12/crypto/openssl/crypto/modes/asm/ghash-parisc.pl stable/12/crypto/openssl/crypto/modes/asm/ghash-s390x.pl stable/12/crypto/openssl/crypto/modes/asm/ghash-sparcv9.pl stable/12/crypto/openssl/crypto/modes/asm/ghash-x86.pl stable/12/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl stable/12/crypto/openssl/crypto/modes/asm/ghashp8-ppc.pl stable/12/crypto/openssl/crypto/modes/asm/ghashv8-armx.pl 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/cts128.c stable/12/crypto/openssl/crypto/modes/gcm128.c stable/12/crypto/openssl/crypto/modes/ocb128.c stable/12/crypto/openssl/crypto/modes/ofb128.c stable/12/crypto/openssl/crypto/modes/xts128.c stable/12/crypto/openssl/crypto/objects/o_names.c stable/12/crypto/openssl/crypto/objects/obj_dat.c stable/12/crypto/openssl/crypto/objects/obj_dat.h stable/12/crypto/openssl/crypto/objects/obj_lib.c stable/12/crypto/openssl/crypto/objects/obj_xref.h stable/12/crypto/openssl/crypto/objects/objects.txt stable/12/crypto/openssl/crypto/ocsp/ocsp_asn.c stable/12/crypto/openssl/crypto/ocsp/ocsp_cl.c stable/12/crypto/openssl/crypto/ocsp/ocsp_ext.c stable/12/crypto/openssl/crypto/ocsp/ocsp_ht.c stable/12/crypto/openssl/crypto/ocsp/ocsp_lib.c stable/12/crypto/openssl/crypto/ocsp/ocsp_prn.c stable/12/crypto/openssl/crypto/ocsp/ocsp_srv.c stable/12/crypto/openssl/crypto/ocsp/ocsp_vfy.c stable/12/crypto/openssl/crypto/ocsp/v3_ocsp.c stable/12/crypto/openssl/crypto/pariscid.pl stable/12/crypto/openssl/crypto/pem/pem_all.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/perlasm/README stable/12/crypto/openssl/crypto/perlasm/arm-xlate.pl stable/12/crypto/openssl/crypto/perlasm/ppc-xlate.pl stable/12/crypto/openssl/crypto/perlasm/x86_64-xlate.pl stable/12/crypto/openssl/crypto/pkcs12/p12_add.c stable/12/crypto/openssl/crypto/pkcs12/p12_asn.c stable/12/crypto/openssl/crypto/pkcs12/p12_attr.c stable/12/crypto/openssl/crypto/pkcs12/p12_crt.c stable/12/crypto/openssl/crypto/pkcs12/p12_init.c stable/12/crypto/openssl/crypto/pkcs12/p12_mutl.c stable/12/crypto/openssl/crypto/pkcs12/p12_npas.c stable/12/crypto/openssl/crypto/pkcs12/p12_p8e.c stable/12/crypto/openssl/crypto/pkcs12/p12_sbag.c stable/12/crypto/openssl/crypto/pkcs7/pk7_lib.c stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-armv4.pl stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-armv8.pl stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-mips.pl stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-ppc.pl stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-ppcfp.pl stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-s390x.pl stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-sparcv9.pl stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-x86.pl stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-x86_64.pl stable/12/crypto/openssl/crypto/poly1305/poly1305.c stable/12/crypto/openssl/crypto/poly1305/poly1305_ameth.c stable/12/crypto/openssl/crypto/poly1305/poly1305_pmeth.c stable/12/crypto/openssl/crypto/ppc_arch.h stable/12/crypto/openssl/crypto/ppccap.c stable/12/crypto/openssl/crypto/ppccpuid.pl 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_err.c stable/12/crypto/openssl/crypto/rand/rand_lib.c stable/12/crypto/openssl/crypto/rand/rand_unix.c stable/12/crypto/openssl/crypto/rc2/rc2_cbc.c stable/12/crypto/openssl/crypto/rc2/rc2_ecb.c stable/12/crypto/openssl/crypto/rc2/rc2_skey.c stable/12/crypto/openssl/crypto/rc2/rc2cfb64.c stable/12/crypto/openssl/crypto/rc2/rc2ofb64.c stable/12/crypto/openssl/crypto/rc4/asm/rc4-586.pl stable/12/crypto/openssl/crypto/rc4/asm/rc4-c64xplus.pl stable/12/crypto/openssl/crypto/rc4/asm/rc4-md5-x86_64.pl stable/12/crypto/openssl/crypto/rc4/asm/rc4-parisc.pl stable/12/crypto/openssl/crypto/rc4/asm/rc4-s390x.pl stable/12/crypto/openssl/crypto/rc4/asm/rc4-x86_64.pl stable/12/crypto/openssl/crypto/rc4/rc4_enc.c stable/12/crypto/openssl/crypto/rc4/rc4_skey.c stable/12/crypto/openssl/crypto/rc5/asm/rc5-586.pl stable/12/crypto/openssl/crypto/rc5/rc5_ecb.c stable/12/crypto/openssl/crypto/rc5/rc5_enc.c stable/12/crypto/openssl/crypto/rc5/rc5_skey.c stable/12/crypto/openssl/crypto/rc5/rc5cfb64.c stable/12/crypto/openssl/crypto/rc5/rc5ofb64.c stable/12/crypto/openssl/crypto/ripemd/asm/rmd-586.pl stable/12/crypto/openssl/crypto/ripemd/rmd_dgst.c stable/12/crypto/openssl/crypto/rsa/rsa_ameth.c stable/12/crypto/openssl/crypto/rsa/rsa_asn1.c stable/12/crypto/openssl/crypto/rsa/rsa_chk.c stable/12/crypto/openssl/crypto/rsa/rsa_crpt.c stable/12/crypto/openssl/crypto/rsa/rsa_gen.c stable/12/crypto/openssl/crypto/rsa/rsa_lib.c stable/12/crypto/openssl/crypto/rsa/rsa_meth.c stable/12/crypto/openssl/crypto/rsa/rsa_mp.c stable/12/crypto/openssl/crypto/rsa/rsa_oaep.c stable/12/crypto/openssl/crypto/rsa/rsa_ossl.c stable/12/crypto/openssl/crypto/rsa/rsa_pk1.c stable/12/crypto/openssl/crypto/rsa/rsa_pmeth.c stable/12/crypto/openssl/crypto/rsa/rsa_pss.c stable/12/crypto/openssl/crypto/rsa/rsa_sign.c stable/12/crypto/openssl/crypto/rsa/rsa_ssl.c stable/12/crypto/openssl/crypto/rsa/rsa_x931g.c stable/12/crypto/openssl/crypto/s390x_arch.h stable/12/crypto/openssl/crypto/s390xcpuid.pl stable/12/crypto/openssl/crypto/seed/seed.c stable/12/crypto/openssl/crypto/sha/asm/keccak1600-armv4.pl stable/12/crypto/openssl/crypto/sha/asm/keccak1600-armv8.pl stable/12/crypto/openssl/crypto/sha/asm/keccak1600-avx2.pl stable/12/crypto/openssl/crypto/sha/asm/keccak1600-avx512.pl stable/12/crypto/openssl/crypto/sha/asm/keccak1600-avx512vl.pl stable/12/crypto/openssl/crypto/sha/asm/keccak1600-c64x.pl stable/12/crypto/openssl/crypto/sha/asm/keccak1600-mmx.pl stable/12/crypto/openssl/crypto/sha/asm/keccak1600-ppc64.pl stable/12/crypto/openssl/crypto/sha/asm/keccak1600-s390x.pl stable/12/crypto/openssl/crypto/sha/asm/keccak1600-x86_64.pl stable/12/crypto/openssl/crypto/sha/asm/keccak1600p8-ppc.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-586.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-armv4-large.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-armv8.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-c64xplus.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-mips.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-parisc.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-ppc.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-s390x.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-sparcv9.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-sparcv9a.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-thumb.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl stable/12/crypto/openssl/crypto/sha/asm/sha256-586.pl stable/12/crypto/openssl/crypto/sha/asm/sha256-armv4.pl stable/12/crypto/openssl/crypto/sha/asm/sha256-c64xplus.pl stable/12/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl stable/12/crypto/openssl/crypto/sha/asm/sha512-586.pl stable/12/crypto/openssl/crypto/sha/asm/sha512-armv4.pl stable/12/crypto/openssl/crypto/sha/asm/sha512-armv8.pl stable/12/crypto/openssl/crypto/sha/asm/sha512-c64xplus.pl stable/12/crypto/openssl/crypto/sha/asm/sha512-mips.pl stable/12/crypto/openssl/crypto/sha/asm/sha512-parisc.pl stable/12/crypto/openssl/crypto/sha/asm/sha512-ppc.pl stable/12/crypto/openssl/crypto/sha/asm/sha512-s390x.pl stable/12/crypto/openssl/crypto/sha/asm/sha512-sparcv9.pl stable/12/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl stable/12/crypto/openssl/crypto/sha/asm/sha512p8-ppc.pl stable/12/crypto/openssl/crypto/sha/sha1dgst.c stable/12/crypto/openssl/crypto/sha/sha256.c stable/12/crypto/openssl/crypto/sha/sha512.c stable/12/crypto/openssl/crypto/siphash/siphash.c stable/12/crypto/openssl/crypto/siphash/siphash_ameth.c stable/12/crypto/openssl/crypto/siphash/siphash_pmeth.c stable/12/crypto/openssl/crypto/sm2/sm2_crypt.c stable/12/crypto/openssl/crypto/sm2/sm2_err.c stable/12/crypto/openssl/crypto/sm2/sm2_pmeth.c stable/12/crypto/openssl/crypto/sm2/sm2_sign.c stable/12/crypto/openssl/crypto/sm3/m_sm3.c stable/12/crypto/openssl/crypto/sm3/sm3.c stable/12/crypto/openssl/crypto/sm4/sm4.c stable/12/crypto/openssl/crypto/sparc_arch.h stable/12/crypto/openssl/crypto/sparcv9cap.c stable/12/crypto/openssl/crypto/srp/srp_lib.c stable/12/crypto/openssl/crypto/srp/srp_vfy.c stable/12/crypto/openssl/crypto/store/loader_file.c stable/12/crypto/openssl/crypto/store/store_init.c stable/12/crypto/openssl/crypto/store/store_lib.c stable/12/crypto/openssl/crypto/store/store_register.c stable/12/crypto/openssl/crypto/threads_none.c stable/12/crypto/openssl/crypto/ts/ts_asn1.c stable/12/crypto/openssl/crypto/ts/ts_lib.c stable/12/crypto/openssl/crypto/ts/ts_req_print.c stable/12/crypto/openssl/crypto/ts/ts_req_utils.c stable/12/crypto/openssl/crypto/ts/ts_rsp_print.c stable/12/crypto/openssl/crypto/ts/ts_rsp_sign.c stable/12/crypto/openssl/crypto/ts/ts_rsp_utils.c stable/12/crypto/openssl/crypto/ts/ts_rsp_verify.c stable/12/crypto/openssl/crypto/ts/ts_verify_ctx.c stable/12/crypto/openssl/crypto/ui/ui_lib.c stable/12/crypto/openssl/crypto/ui/ui_null.c stable/12/crypto/openssl/crypto/ui/ui_openssl.c stable/12/crypto/openssl/crypto/ui/ui_util.c stable/12/crypto/openssl/crypto/whrlpool/asm/wp-mmx.pl stable/12/crypto/openssl/crypto/whrlpool/asm/wp-x86_64.pl stable/12/crypto/openssl/crypto/whrlpool/wp_block.c stable/12/crypto/openssl/crypto/whrlpool/wp_dgst.c stable/12/crypto/openssl/crypto/x509/by_dir.c stable/12/crypto/openssl/crypto/x509/by_file.c stable/12/crypto/openssl/crypto/x509/t_x509.c stable/12/crypto/openssl/crypto/x509/x509_att.c stable/12/crypto/openssl/crypto/x509/x509_cmp.c stable/12/crypto/openssl/crypto/x509/x509_ext.c stable/12/crypto/openssl/crypto/x509/x509_lu.c stable/12/crypto/openssl/crypto/x509/x509_meth.c stable/12/crypto/openssl/crypto/x509/x509_obj.c stable/12/crypto/openssl/crypto/x509/x509_r2x.c stable/12/crypto/openssl/crypto/x509/x509_req.c stable/12/crypto/openssl/crypto/x509/x509_set.c stable/12/crypto/openssl/crypto/x509/x509_trs.c stable/12/crypto/openssl/crypto/x509/x509_v3.c stable/12/crypto/openssl/crypto/x509/x509_vfy.c stable/12/crypto/openssl/crypto/x509/x509_vpm.c stable/12/crypto/openssl/crypto/x509/x509cset.c stable/12/crypto/openssl/crypto/x509/x509name.c stable/12/crypto/openssl/crypto/x509/x509rset.c stable/12/crypto/openssl/crypto/x509/x_all.c stable/12/crypto/openssl/crypto/x509/x_attrib.c stable/12/crypto/openssl/crypto/x509/x_crl.c stable/12/crypto/openssl/crypto/x509/x_exten.c stable/12/crypto/openssl/crypto/x509/x_name.c stable/12/crypto/openssl/crypto/x509/x_pubkey.c stable/12/crypto/openssl/crypto/x509/x_req.c stable/12/crypto/openssl/crypto/x509/x_x509.c stable/12/crypto/openssl/crypto/x509/x_x509a.c stable/12/crypto/openssl/crypto/x509v3/pcy_cache.c stable/12/crypto/openssl/crypto/x509v3/pcy_data.c stable/12/crypto/openssl/crypto/x509v3/pcy_lib.c stable/12/crypto/openssl/crypto/x509v3/pcy_map.c stable/12/crypto/openssl/crypto/x509v3/pcy_node.c stable/12/crypto/openssl/crypto/x509v3/pcy_tree.c stable/12/crypto/openssl/crypto/x509v3/v3_addr.c stable/12/crypto/openssl/crypto/x509v3/v3_admis.h stable/12/crypto/openssl/crypto/x509v3/v3_alt.c stable/12/crypto/openssl/crypto/x509v3/v3_asid.c stable/12/crypto/openssl/crypto/x509v3/v3_conf.c stable/12/crypto/openssl/crypto/x509v3/v3_cpols.c stable/12/crypto/openssl/crypto/x509v3/v3_crld.c stable/12/crypto/openssl/crypto/x509v3/v3_ncons.c stable/12/crypto/openssl/crypto/x509v3/v3_purp.c stable/12/crypto/openssl/crypto/x509v3/v3_skey.c stable/12/crypto/openssl/crypto/x509v3/v3_utl.c stable/12/crypto/openssl/crypto/x86_64cpuid.pl stable/12/crypto/openssl/crypto/x86cpuid.pl 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/rand.pod stable/12/crypto/openssl/doc/man1/req.pod stable/12/crypto/openssl/doc/man1/s_client.pod stable/12/crypto/openssl/doc/man1/sess_id.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_TYPE_get.pod stable/12/crypto/openssl/doc/man3/BIO_f_buffer.pod stable/12/crypto/openssl/doc/man3/BIO_get_ex_new_index.pod stable/12/crypto/openssl/doc/man3/DTLSv1_listen.pod stable/12/crypto/openssl/doc/man3/EC_GROUP_copy.pod stable/12/crypto/openssl/doc/man3/EC_GROUP_new.pod stable/12/crypto/openssl/doc/man3/EC_POINT_new.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_EncryptInit.pod stable/12/crypto/openssl/doc/man3/EVP_MD_meth_new.pod stable/12/crypto/openssl/doc/man3/EVP_PKEY_CTX_ctrl.pod stable/12/crypto/openssl/doc/man3/EVP_PKEY_meth_new.pod stable/12/crypto/openssl/doc/man3/EVP_PKEY_new.pod stable/12/crypto/openssl/doc/man3/EVP_SignInit.pod stable/12/crypto/openssl/doc/man3/OCSP_request_add1_nonce.pod stable/12/crypto/openssl/doc/man3/OCSP_response_status.pod stable/12/crypto/openssl/doc/man3/OCSP_sendreq_new.pod stable/12/crypto/openssl/doc/man3/OPENSSL_malloc.pod stable/12/crypto/openssl/doc/man3/OPENSSL_secure_malloc.pod stable/12/crypto/openssl/doc/man3/PEM_bytes_read_bio.pod stable/12/crypto/openssl/doc/man3/PEM_read_bio_PrivateKey.pod stable/12/crypto/openssl/doc/man3/PEM_read_bio_ex.pod stable/12/crypto/openssl/doc/man3/RAND_bytes.pod stable/12/crypto/openssl/doc/man3/RAND_set_rand_method.pod stable/12/crypto/openssl/doc/man3/RSA_get0_key.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_sess_set_get_cb.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_stateless_cookie_generate_cb.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_set_tlsext_servername_callback.pod stable/12/crypto/openssl/doc/man3/SSL_CTX_use_psk_identity_hint.pod stable/12/crypto/openssl/doc/man3/SSL_SESSION_get0_hostname.pod stable/12/crypto/openssl/doc/man3/SSL_accept.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_load_client_CA_file.pod stable/12/crypto/openssl/doc/man3/X509_LOOKUP_meth_new.pod stable/12/crypto/openssl/doc/man3/X509_STORE_CTX_new.pod stable/12/crypto/openssl/doc/man3/X509_STORE_add_cert.pod stable/12/crypto/openssl/doc/man3/d2i_X509.pod stable/12/crypto/openssl/doc/man5/config.pod stable/12/crypto/openssl/doc/man7/Ed25519.pod stable/12/crypto/openssl/doc/man7/X25519.pod stable/12/crypto/openssl/doc/man7/passphrase-encoding.pod stable/12/crypto/openssl/e_os.h stable/12/crypto/openssl/engines/e_afalg.c stable/12/crypto/openssl/engines/e_afalg.h stable/12/crypto/openssl/engines/e_afalg_err.h stable/12/crypto/openssl/engines/e_capi_err.h stable/12/crypto/openssl/engines/e_dasync_err.h stable/12/crypto/openssl/engines/e_ossltest_err.h stable/12/crypto/openssl/include/internal/conf.h stable/12/crypto/openssl/include/internal/cryptlib.h stable/12/crypto/openssl/include/internal/dane.h stable/12/crypto/openssl/include/internal/dso.h stable/12/crypto/openssl/include/internal/dsoerr.h stable/12/crypto/openssl/include/internal/err.h stable/12/crypto/openssl/include/internal/nelem.h stable/12/crypto/openssl/include/internal/numbers.h stable/12/crypto/openssl/include/internal/o_dir.h stable/12/crypto/openssl/include/internal/o_str.h stable/12/crypto/openssl/include/internal/refcount.h stable/12/crypto/openssl/include/internal/sockets.h stable/12/crypto/openssl/include/internal/sslconf.h stable/12/crypto/openssl/include/openssl/__DECC_INCLUDE_EPILOGUE.H stable/12/crypto/openssl/include/openssl/__DECC_INCLUDE_PROLOGUE.H stable/12/crypto/openssl/include/openssl/bio.h stable/12/crypto/openssl/include/openssl/ct.h stable/12/crypto/openssl/include/openssl/dsa.h stable/12/crypto/openssl/include/openssl/dtls1.h stable/12/crypto/openssl/include/openssl/evp.h stable/12/crypto/openssl/include/openssl/evperr.h stable/12/crypto/openssl/include/openssl/lhash.h stable/12/crypto/openssl/include/openssl/obj_mac.h stable/12/crypto/openssl/include/openssl/ocsp.h stable/12/crypto/openssl/include/openssl/opensslv.h stable/12/crypto/openssl/include/openssl/ossl_typ.h stable/12/crypto/openssl/include/openssl/randerr.h stable/12/crypto/openssl/include/openssl/rsa.h stable/12/crypto/openssl/include/openssl/sslerr.h stable/12/crypto/openssl/ssl/bio_ssl.c stable/12/crypto/openssl/ssl/d1_lib.c stable/12/crypto/openssl/ssl/d1_msg.c stable/12/crypto/openssl/ssl/d1_srtp.c stable/12/crypto/openssl/ssl/methods.c stable/12/crypto/openssl/ssl/packet.c stable/12/crypto/openssl/ssl/pqueue.c stable/12/crypto/openssl/ssl/record/README stable/12/crypto/openssl/ssl/record/dtls1_bitmap.c stable/12/crypto/openssl/ssl/record/rec_layer_d1.c stable/12/crypto/openssl/ssl/record/rec_layer_s3.c stable/12/crypto/openssl/ssl/record/ssl3_buffer.c stable/12/crypto/openssl/ssl/record/ssl3_record.c stable/12/crypto/openssl/ssl/record/ssl3_record_tls13.c stable/12/crypto/openssl/ssl/s3_cbc.c stable/12/crypto/openssl/ssl/s3_enc.c stable/12/crypto/openssl/ssl/s3_lib.c stable/12/crypto/openssl/ssl/s3_msg.c stable/12/crypto/openssl/ssl/ssl_asn1.c stable/12/crypto/openssl/ssl/ssl_cert.c stable/12/crypto/openssl/ssl/ssl_ciph.c stable/12/crypto/openssl/ssl/ssl_conf.c stable/12/crypto/openssl/ssl/ssl_err.c stable/12/crypto/openssl/ssl/ssl_init.c stable/12/crypto/openssl/ssl/ssl_lib.c stable/12/crypto/openssl/ssl/ssl_mcnf.c stable/12/crypto/openssl/ssl/ssl_rsa.c stable/12/crypto/openssl/ssl/ssl_sess.c stable/12/crypto/openssl/ssl/ssl_stat.c stable/12/crypto/openssl/ssl/ssl_txt.c stable/12/crypto/openssl/ssl/ssl_utst.c stable/12/crypto/openssl/ssl/statem/README stable/12/crypto/openssl/ssl/statem/extensions.c stable/12/crypto/openssl/ssl/statem/extensions_clnt.c stable/12/crypto/openssl/ssl/statem/extensions_cust.c stable/12/crypto/openssl/ssl/statem/extensions_srvr.c stable/12/crypto/openssl/ssl/statem/statem.c stable/12/crypto/openssl/ssl/statem/statem_clnt.c stable/12/crypto/openssl/ssl/statem/statem_dtls.c stable/12/crypto/openssl/ssl/statem/statem_lib.c stable/12/crypto/openssl/ssl/statem/statem_srvr.c stable/12/crypto/openssl/ssl/t1_enc.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/crypto/openssl/ssl/tls_srp.c stable/12/secure/lib/libcrypto/Makefile.inc stable/12/secure/lib/libcrypto/aarch64/ecp_nistz256-armv8.S stable/12/secure/lib/libcrypto/aarch64/sha256-armv8.S stable/12/secure/lib/libcrypto/aarch64/sha512-armv8.S stable/12/secure/lib/libcrypto/amd64/aesni-gcm-x86_64.S stable/12/secure/lib/libcrypto/amd64/aesni-mb-x86_64.S stable/12/secure/lib/libcrypto/amd64/aesni-sha1-x86_64.S stable/12/secure/lib/libcrypto/amd64/aesni-sha256-x86_64.S stable/12/secure/lib/libcrypto/amd64/aesni-x86_64.S stable/12/secure/lib/libcrypto/amd64/chacha-x86_64.S stable/12/secure/lib/libcrypto/amd64/cmll-x86_64.S stable/12/secure/lib/libcrypto/amd64/ecp_nistz256-x86_64.S stable/12/secure/lib/libcrypto/amd64/ghash-x86_64.S stable/12/secure/lib/libcrypto/amd64/keccak1600-x86_64.S stable/12/secure/lib/libcrypto/amd64/poly1305-x86_64.S stable/12/secure/lib/libcrypto/amd64/rc4-x86_64.S stable/12/secure/lib/libcrypto/amd64/rsaz-avx2.S stable/12/secure/lib/libcrypto/amd64/rsaz-x86_64.S stable/12/secure/lib/libcrypto/amd64/sha1-mb-x86_64.S stable/12/secure/lib/libcrypto/amd64/sha1-x86_64.S stable/12/secure/lib/libcrypto/amd64/sha256-mb-x86_64.S stable/12/secure/lib/libcrypto/amd64/sha256-x86_64.S stable/12/secure/lib/libcrypto/amd64/sha512-x86_64.S stable/12/secure/lib/libcrypto/amd64/x25519-x86_64.S stable/12/secure/lib/libcrypto/amd64/x86_64-mont.S stable/12/secure/lib/libcrypto/amd64/x86_64-mont5.S stable/12/secure/lib/libcrypto/arm/aes-armv4.S stable/12/secure/lib/libcrypto/arm/bsaes-armv7.S stable/12/secure/lib/libcrypto/arm/ecp_nistz256-armv4.S stable/12/secure/lib/libcrypto/arm/sha256-armv4.S stable/12/secure/lib/libcrypto/arm/sha512-armv4.S stable/12/secure/lib/libcrypto/i386/chacha-x86.S stable/12/secure/lib/libcrypto/i386/ecp_nistz256-x86.S stable/12/secure/lib/libcrypto/i386/poly1305-x86.S stable/12/secure/lib/libcrypto/i386/sha1-586.S stable/12/secure/lib/libcrypto/i386/sha256-586.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_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_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_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/Makefile 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/scrypt.7 stable/12/secure/lib/libcrypto/man/man7/ssl.7 stable/12/secure/lib/libcrypto/man/man7/x509.7 stable/12/secure/lib/libcrypto/opensslconf.h.in 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 Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/CHANGES Fri Mar 20 21:43:08 2020 (r359186) @@ -7,6 +7,73 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1d and 1.1.1e [17 Mar 2020] + *) Properly detect EOF while reading in libssl. Previously if we hit an EOF + while reading in libssl then we would report an error back to the + application (SSL_ERROR_SYSCALL) but errno would be 0. We now add + an error to the stack (which means we instead return SSL_ERROR_SSL) and + therefore give a hint as to what went wrong. + [Matt Caswell] + + *) Check that ed25519 and ed448 are allowed by the security level. Previously + signature algorithms not using an MD were not being checked that they were + allowed by the security level. + [Kurt Roeckx] + + *) Fixed SSL_get_servername() behaviour. The behaviour of SSL_get_servername() + was not quite right. The behaviour was not consistent between resumption + and normal handshakes, and also not quite consistent with historical + behaviour. The behaviour in various scenarios has been clarified and + it has been updated to make it match historical behaviour as closely as + possible. + [Matt Caswell] + + *) [VMS only] The header files that the VMS compilers include automatically, + __DECC_INCLUDE_PROLOGUE.H and __DECC_INCLUDE_EPILOGUE.H, use pragmas that + the C++ compiler doesn't understand. This is a shortcoming in the + compiler, but can be worked around with __cplusplus guards. + + C++ applications that use OpenSSL libraries must be compiled using the + qualifier '/NAMES=(AS_IS,SHORTENED)' to be able to use all the OpenSSL + functions. Otherwise, only functions with symbols of less than 31 + characters can be used, as the linker will not be able to successfully + resolve symbols with longer names. + [Richard Levitte] + + *) Corrected the documentation of the return values from the EVP_DigestSign* + set of functions. The documentation mentioned negative values for some + errors, but this was never the case, so the mention of negative values + was removed. + + Code that followed the documentation and thereby check with something + like 'EVP_DigestSignInit(...) <= 0' will continue to work undisturbed. + [Richard Levitte] + + *) Fixed an an overflow bug in the x64_64 Montgomery squaring procedure + used in exponentiation with 512-bit moduli. No EC algorithms are + affected. Analysis suggests that attacks against 2-prime RSA1024, + 3-prime RSA1536, and DSA1024 as a result of this defect would be very + difficult to perform and are not believed likely. Attacks against DH512 + are considered just feasible. However, for an attack the target would + have to re-use the DH512 private key, which is not recommended anyway. + Also applications directly using the low level API BN_mod_exp may be + affected if they use BN_FLG_CONSTTIME. + (CVE-2019-1551) + [Andy Polyakov] + + *) Added a new method to gather entropy on VMS, based on SYS$GET_ENTROPY. + The presence of this system service is determined at run-time. + [Richard Levitte] + + *) Added newline escaping functionality to a filename when using openssl dgst. + This output format is to replicate the output format found in the '*sum' + checksum programs. This aims to preserve backward compatibility. + [Matt Eaton, Richard Levitte, and Paul Dale] + + *) Print all values for a PKCS#12 attribute with 'openssl pkcs12', not just + the first value. + [Jon Spillett] + Changes between 1.1.1c and 1.1.1d [10 Sep 2019] *) Fixed a fork protection issue. OpenSSL 1.1.1 introduced a rewritten random @@ -633,9 +700,9 @@ bytes long. In theory it is permissible in SSLv3 - TLSv1.2 to fragment such alerts across multiple records (some of which could be empty). In practice it make no sense to send an empty alert record, or to fragment one. TLSv1.3 - prohibts this altogether and other libraries (BoringSSL, NSS) do not + prohibits this altogether and other libraries (BoringSSL, NSS) do not support this at all. Supporting it adds significant complexity to the - record layer, and its removal is unlikely to cause inter-operability + record layer, and its removal is unlikely to cause interoperability issues. [Matt Caswell] @@ -3652,7 +3719,7 @@ implementations). [Emilia Käsper, Adam Langley, Bodo Moeller (Google)] - *) Use type ossl_ssize_t instad of ssize_t which isn't available on + *) Use type ossl_ssize_t instead of ssize_t which isn't available on all platforms. Move ssize_t definition from e_os.h to the public header file e_os2.h as it now appears in public header file cms.h [Steve Henson] @@ -8373,7 +8440,7 @@ des-cbc 3624.96k 5258.21k 5530.91k *) New OCSP utility. Allows OCSP requests to be generated or read. The request can be sent to a responder and the output - parsed, outputed or printed in text form. Not complete yet: + parsed, outputted or printed in text form. Not complete yet: still needs to check the OCSP response validity. [Steve Henson] @@ -9368,7 +9435,7 @@ des-cbc 3624.96k 5258.21k 5530.91k [Andy Polyakov] *) Modified SSL library such that the verify_callback that has been set - specificly for an SSL object with SSL_set_verify() is actually being + specifically for an SSL object with SSL_set_verify() is actually being used. Before the change, a verify_callback set with this function was ignored and the verify_callback() set in the SSL_CTX at the time of the call was used. New function X509_STORE_CTX_set_verify_cb() introduced @@ -10485,10 +10552,10 @@ des-cbc 3624.96k 5258.21k 5530.91k as other interfaces in OpenSSL, like the BIO interface. NCONF_dump_* dump the internal storage of the configuration file, which is useful for debugging. All other functions take the same - arguments as the old CONF_* functions wth the exception of the + arguments as the old CONF_* functions with the exception of the first that must be a `CONF *' instead of a `LHASH *'. - To make it easer to use the new classes with the old CONF_* functions, + To make it easier to use the new classes with the old CONF_* functions, the function CONF_set_default_method is provided. [Richard Levitte] @@ -12331,7 +12398,7 @@ des-cbc 3624.96k 5258.21k 5530.91k than the old method: it now uses a modified version of Ulf's parser to read the ANSI prototypes in all header files (thus the old K&R definitions aren't needed for error creation any more) and do a better job of - translating function codes into names. The old 'ASN1 error code imbedded + translating function codes into names. The old 'ASN1 error code embedded in a comment' is no longer necessary and it doesn't use .err files which have now been deleted. Also the error code call doesn't have to appear all on one line (which resulted in some large lines...). @@ -12632,7 +12699,7 @@ des-cbc 3624.96k 5258.21k 5530.91k *) Add a useful kludge to allow package maintainers to specify compiler and other platforms details on the command line without having to patch the - Configure script everytime: One now can use ``perl Configure + Configure script every time: One now can use ``perl Configure :
'', i.e. platform ids are allowed to have details appended to them (separated by colons). This is treated as there would be a static pre-configured entry in Configure's %table under key with value Modified: stable/12/crypto/openssl/CONTRIBUTING ============================================================================== --- stable/12/crypto/openssl/CONTRIBUTING Fri Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/CONTRIBUTING Fri Mar 20 21:43:08 2020 (r359186) @@ -58,7 +58,7 @@ guidelines: consider adding a note in CHANGES. This could be a summarising description of the change, and could explain the grander details. Have a look through existing entries for inspiration. - Please note that this is NOT simply a copy of git-log oneliners. + Please note that this is NOT simply a copy of git-log one-liners. Also note that security fixes get an entry in CHANGES. This file helps users get more in depth information of what comes with a specific release without having to sift through the higher Modified: stable/12/crypto/openssl/Configure ============================================================================== --- stable/12/crypto/openssl/Configure Fri Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/Configure Fri Mar 20 21:43:08 2020 (r359186) @@ -1,6 +1,6 @@ #! /usr/bin/env perl # -*- mode: perl; -*- -# Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-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 @@ -69,7 +69,15 @@ my $usage="Usage: Configure [no- ...] [enable- # no-sse2 disables IA-32 SSE2 code in assembly modules, the above # mentioned '386' option implies this one # no- build without specified algorithm (rsa, idea, rc5, ...) -# - + compiler options are passed through +# - + All options which are unknown to the 'Configure' script are +# / passed through to the compiler. Unix-style options beginning +# with a '-' or '+' are recognized, as well as Windows-style +# options beginning with a '/'. If the option contains arguments +# separated by spaces, then the URL-style notation %20 can be +# used for the space character in order to avoid having to quote +# the option. For example, -opt%20arg gets expanded to -opt arg. +# In fact, any ASCII character can be encoded as %xx using its +# hexadecimal encoding. # -static while -static is also a pass-through compiler option (and # as such is limited to environments where it's actually # meaningful), it triggers a number configuration options, @@ -152,6 +160,10 @@ my @clang_devteam_warn = qw( -Wmissing-variable-declarations ); +my @cl_devteam_warn = qw( + /WX +); + # This adds backtrace information to the memory leak info. Is only used # when crypto-mdebug-backtrace is enabled. my $memleak_devteam_backtrace = "-rdynamic"; @@ -346,6 +358,7 @@ my @disablables = ( "dgram", "dh", "dsa", + "dso", "dtls", "dynamic-engine", "ec", @@ -423,7 +436,6 @@ my %deprecated_disablables = ( "buf-freelists" => undef, "ripemd" => "rmd160", "ui" => "ui-console", - "dso" => "", # Empty string means we're silent about it ); # All of the following are disabled by default: @@ -480,6 +492,7 @@ my @disable_cascades = ( # Without position independent code, there can be no shared libraries or DSOs "pic" => [ "shared" ], "shared" => [ "dynamic-engine" ], + "dso" => [ "dynamic-engine" ], "engine" => [ "afalgeng", "devcryptoeng" ], # no-autoalginit is only useful when building non-shared @@ -520,7 +533,7 @@ while ((my $first, my $second) = (shift @list, shift @ &usage if ($#ARGV < 0); -# For the "make variables" CINCLUDES and CDEFINES, we support lists with +# For the "make variables" CPPINCLUDES and CPPDEFINES, we support lists with # platform specific list separators. Users from those platforms should # recognise those separators from how you set up the PATH to find executables. # The default is the Unix like separator, :, but as an exception, we also @@ -776,7 +789,7 @@ while (@argvcopy) { die "FIPS mode not supported\n"; } - elsif (/^[-+]/) + elsif (m|^[-+/]|) { if (/^--prefix=(.*)$/) { @@ -853,11 +866,11 @@ while (@argvcopy) { push @{$useradd{LDFLAGS}}, $_; } - elsif (/^-D(.*)$/) + elsif (m|^[-/]D(.*)$|) { push @{$useradd{CPPDEFINES}}, $1; } - elsif (/^-I(.*)$/) + elsif (m|^[-/]I(.*)$|) { push @{$useradd{CPPINCLUDES}}, $1; } @@ -867,11 +880,23 @@ while (@argvcopy) } else # common if (/^[-+]/), just pass down... { + # Treat %xx as an ASCII code (e.g. replace %20 by a space character). + # This provides a simple way to pass options with arguments separated + # by spaces without quoting (e.g. -opt%20arg translates to -opt arg). $_ =~ s/%([0-9a-f]{1,2})/chr(hex($1))/gei; push @{$useradd{CFLAGS}}, $_; push @{$useradd{CXXFLAGS}}, $_; } } + elsif (m|^/|) + { + # Treat %xx as an ASCII code (e.g. replace %20 by a space character). + # This provides a simple way to pass options with arguments separated + # by spaces without quoting (e.g. /opt%20arg translates to /opt arg). + $_ =~ s/%([0-9a-f]{1,2})/chr(hex($1))/gei; + push @{$useradd{CFLAGS}}, $_; + push @{$useradd{CXXFLAGS}}, $_; + } else { die "target already defined - $target (offending arg: $_)\n" if ($target ne ""); @@ -949,7 +974,11 @@ foreach (keys %user) { if (defined $value) { if (ref $user{$_} eq 'ARRAY') { - $user{$_} = [ split /$list_separator_re/, $value ]; + if ($_ eq 'CPPDEFINES' || $_ eq 'CPPINCLUDES') { + $user{$_} = [ split /$list_separator_re/, $value ]; + } else { + $user{$_} = [ $value ]; + } } elsif (!defined $user{$_}) { $user{$_} = $value; } @@ -1162,43 +1191,6 @@ foreach (keys %useradd) { # Allow overriding the build file name $config{build_file} = env('BUILDFILE') || $target{build_file} || "Makefile"; -my %disabled_info = (); # For configdata.pm -foreach my $what (sort keys %disabled) { - $config{options} .= " no-$what"; - - if (!grep { $what eq $_ } ( 'buildtest-c++', 'threads', 'shared', 'pic', - 'dynamic-engine', 'makedepend', - 'zlib-dynamic', 'zlib', 'sse2' )) { - (my $WHAT = uc $what) =~ s|-|_|g; - - # Fix up C macro end names - $WHAT = "RMD160" if $what eq "ripemd"; - - # fix-up crypto/directory name(s) - $what = "ripemd" if $what eq "rmd160"; - $what = "whrlpool" if $what eq "whirlpool"; - - my $macro = $disabled_info{$what}->{macro} = "OPENSSL_NO_$WHAT"; - - if ((grep { $what eq $_ } @{$config{sdirs}}) - && $what ne 'async' && $what ne 'err') { - @{$config{sdirs}} = grep { $what ne $_} @{$config{sdirs}}; - $disabled_info{$what}->{skipped} = [ catdir('crypto', $what) ]; - - if ($what ne 'engine') { - push @{$config{openssl_algorithm_defines}}, $macro; - } else { - @{$config{dirs}} = grep !/^engines$/, @{$config{dirs}}; - push @{$disabled_info{engine}->{skipped}}, catdir('engines'); - push @{$config{openssl_other_defines}}, $macro; - } - } else { - push @{$config{openssl_other_defines}}, $macro; - } - - } -} - # Make sure build_scheme is consistent. $target{build_scheme} = [ $target{build_scheme} ] if ref($target{build_scheme}) ne "ARRAY"; @@ -1288,10 +1280,8 @@ if ($target{shared_target} eq "") } if ($disabled{"dynamic-engine"}) { - push @{$config{openssl_other_defines}}, "OPENSSL_NO_DYNAMIC_ENGINE"; $config{dynamic_engines} = 0; } else { - push @{$config{openssl_other_defines}}, "OPENSSL_NO_STATIC_ENGINE"; $config{dynamic_engines} = 1; } @@ -1375,6 +1365,7 @@ unless ($disabled{asm}) { } if ($target{aes_asm_src}) { push @{$config{lib_defines}}, "AES_ASM" if ($target{aes_asm_src} =~ m/\baes-/);; + push @{$config{lib_defines}}, "AESNI_ASM" if ($target{aes_asm_src} =~ m/\baesni-/);; # aes-ctr.fake is not a real file, only indication that assembler # module implements AES_ctr32_encrypt... push @{$config{lib_defines}}, "AES_CTR_ASM" if ($target{aes_asm_src} =~ s/\s*aes-ctr\.fake//); @@ -1501,11 +1492,20 @@ if ($strict_warnings) my $wopt; my $gccver = $predefined_C{__GNUC__} // -1; - warn "WARNING --strict-warnings requires gcc[>=4] or gcc-alike" - unless $gccver >= 4; - push @strict_warnings_collection, @gcc_devteam_warn; - push @strict_warnings_collection, @clang_devteam_warn - if (defined($predefined_C{__clang__})); + if ($gccver >= 4) + { + push @strict_warnings_collection, @gcc_devteam_warn; + push @strict_warnings_collection, @clang_devteam_warn + if (defined($predefined_C{__clang__})); + } + elsif ($config{target} =~ /^VC-/) + { + push @strict_warnings_collection, @cl_devteam_warn; + } + else + { + warn "WARNING --strict-warnings requires gcc[>=4] or gcc-alike, or MSVC" + } } if (grep { $_ eq '-static' } @{$config{LDFLAGS}}) { @@ -1552,7 +1552,20 @@ unless ($disabled{afalgeng}) { } } -push @{$config{openssl_other_defines}}, "OPENSSL_NO_AFALGENG" if ($disabled{afalgeng}); +unless ($disabled{devcryptoeng}) { + if ($target =~ m/^BSD/) { + my $maxver = 5*100 + 7; + my $sysstr = `uname -s`; + my $verstr = `uname -r`; + $sysstr =~ s|\R$||; + $verstr =~ s|\R$||; + my ($ma, $mi, @rest) = split m|\.|, $verstr; + my $ver = $ma*100 + $mi; + if ($sysstr eq 'OpenBSD' && $ver >= $maxver) { + disable('too-new-kernel', 'devcryptoeng'); + } + } +} # Get the extra flags used when building shared libraries and modules. We # do this late because some of them depend on %disabled. @@ -1596,6 +1609,49 @@ $target{module_ldflags} = $target{shared_ldflag} unles } # ALL MODIFICATIONS TO %disabled, %config and %target MUST BE DONE FROM HERE ON + +my %disabled_info = (); # For configdata.pm +foreach my $what (sort keys %disabled) { + $config{options} .= " no-$what"; + + if (!grep { $what eq $_ } ( 'buildtest-c++', 'threads', 'shared', 'pic', + 'dynamic-engine', 'makedepend', + 'zlib-dynamic', 'zlib', 'sse2' )) { + (my $WHAT = uc $what) =~ s|-|_|g; + + # Fix up C macro end names + $WHAT = "RMD160" if $what eq "ripemd"; + + # fix-up crypto/directory name(s) + $what = "ripemd" if $what eq "rmd160"; + $what = "whrlpool" if $what eq "whirlpool"; + + my $macro = $disabled_info{$what}->{macro} = "OPENSSL_NO_$WHAT"; + + if ((grep { $what eq $_ } @{$config{sdirs}}) + && $what ne 'async' && $what ne 'err' && $what ne 'dso') { + @{$config{sdirs}} = grep { $what ne $_} @{$config{sdirs}}; + $disabled_info{$what}->{skipped} = [ catdir('crypto', $what) ]; + + if ($what ne 'engine') { + push @{$config{openssl_algorithm_defines}}, $macro; + } else { + @{$config{dirs}} = grep !/^engines$/, @{$config{dirs}}; + push @{$disabled_info{engine}->{skipped}}, catdir('engines'); + push @{$config{openssl_other_defines}}, $macro; + } + } else { + push @{$config{openssl_other_defines}}, $macro; + } + + } +} + +if ($disabled{"dynamic-engine"}) { + push @{$config{openssl_other_defines}}, "OPENSSL_NO_DYNAMIC_ENGINE"; +} else { + push @{$config{openssl_other_defines}}, "OPENSSL_NO_STATIC_ENGINE"; +} # If we use the unified build, collect information from build.info files my %unified_info = (); Modified: stable/12/crypto/openssl/INSTALL ============================================================================== --- stable/12/crypto/openssl/INSTALL Fri Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/INSTALL Fri Mar 20 21:43:08 2020 (r359186) @@ -351,6 +351,9 @@ Don't build support for datagram based BIOs. Selecting this option will also force the disabling of DTLS. + no-dso + Don't build support for loading Dynamic Shared Objects. + enable-devcryptoeng Build the /dev/crypto engine. It is automatically selected on BSD implementations, in which case it can be disabled with @@ -605,11 +608,20 @@ Take note of the VAR=value documentation below and how these flags interact with those variables. - -xxx, +xxx + -xxx, +xxx, /xxx Additional options that are not otherwise recognised are - passed through as they are to the compiler as well. Again, - consult your compiler documentation. + passed through as they are to the compiler as well. + Unix-style options beginning with a '-' or '+' and + Windows-style options beginning with a '/' are recognized. + Again, consult your compiler documentation. + If the option contains arguments separated by spaces, + then the URL-style notation %20 can be used for the space + character in order to avoid having to quote the option. + For example, -opt%20arg gets expanded to -opt arg. + In fact, any ASCII character can be encoded as %xx using its + hexadecimal encoding. + Take note of the VAR=value documentation below and how these flags interact with those variables. @@ -1071,7 +1083,7 @@ HASHBANGPERL The command string for the Perl executable to insert in the - #! line of perl scripts that will be publically installed. + #! line of perl scripts that will be publicly installed. Default: /usr/bin/env perl Note: the value of this variable is added to the same scripts on all platforms, but it's only relevant on Unix-like platforms. Modified: stable/12/crypto/openssl/NEWS ============================================================================== --- stable/12/crypto/openssl/NEWS Fri Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/NEWS Fri Mar 20 21:43:08 2020 (r359186) @@ -5,6 +5,11 @@ 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.1d and OpenSSL 1.1.1e [17 Mar 2020] + + o Fixed an overflow bug in the x64_64 Montgomery squaring procedure + used in exponentiation with 512-bit moduli (CVE-2019-1551) + Major changes between OpenSSL 1.1.1c and OpenSSL 1.1.1d [10 Sep 2019] o Fixed a fork protection issue (CVE-2019-1549) Modified: stable/12/crypto/openssl/README ============================================================================== --- stable/12/crypto/openssl/README Fri Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/README Fri Mar 20 21:43:08 2020 (r359186) @@ -1,5 +1,5 @@ - OpenSSL 1.1.1d 10 Sep 2019 + OpenSSL 1.1.1e 17 Mar 2020 Copyright (c) 1998-2019 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: stable/12/crypto/openssl/apps/apps.c ============================================================================== --- stable/12/crypto/openssl/apps/apps.c Fri Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/apps/apps.c Fri Mar 20 21:43:08 2020 (r359186) @@ -1962,26 +1962,46 @@ unsigned char *next_protos_parse(size_t *outlen, const size_t len; unsigned char *out; size_t i, start = 0; + size_t skipped = 0; len = strlen(in); - if (len >= 65535) + if (len == 0 || len >= 65535) return NULL; - out = app_malloc(strlen(in) + 1, "NPN buffer"); + out = app_malloc(len + 1, "NPN buffer"); for (i = 0; i <= len; ++i) { if (i == len || in[i] == ',') { + /* + * Zero-length ALPN elements are invalid on the wire, we could be + * strict and reject the entire string, but just ignoring extra + * commas seems harmless and more friendly. + * + * Every comma we skip in this way puts the input buffer another + * byte ahead of the output buffer, so all stores into the output + * buffer need to be decremented by the number commas skipped. + */ + if (i == start) { + ++start; + ++skipped; + continue; + } if (i - start > 255) { OPENSSL_free(out); return NULL; } - out[start] = (unsigned char)(i - start); + out[start-skipped] = (unsigned char)(i - start); start = i + 1; } else { - out[i + 1] = in[i]; + out[i + 1 - skipped] = in[i]; } } - *outlen = len + 1; + if (len <= skipped) { + OPENSSL_free(out); + return NULL; + } + + *outlen = len + 1 - skipped; return out; } Modified: stable/12/crypto/openssl/apps/apps.h ============================================================================== --- stable/12/crypto/openssl/apps/apps.h Fri Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/apps/apps.h Fri Mar 20 21:43:08 2020 (r359186) @@ -7,8 +7,8 @@ * https://www.openssl.org/source/license.html */ -#ifndef HEADER_APPS_H -# define HEADER_APPS_H +#ifndef OSSL_APPS_H +# define OSSL_APPS_H # include "e_os.h" /* struct timeval for DTLS */ # include "internal/nelem.h" Modified: stable/12/crypto/openssl/apps/dgst.c ============================================================================== --- stable/12/crypto/openssl/apps/dgst.c Fri Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/apps/dgst.c Fri Mar 20 21:43:08 2020 (r359186) @@ -19,6 +19,7 @@ #include #include #include +#include #undef BUFSIZE #define BUFSIZE 1024*8 @@ -27,9 +28,15 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int s EVP_PKEY *key, unsigned char *sigin, int siglen, const char *sig_name, const char *md_name, const char *file); +static void show_digests(const OBJ_NAME *name, void *bio_); +struct doall_dgst_digests { + BIO *bio; + int n; +}; + typedef enum OPTION_choice { - OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, + OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_LIST, OPT_C, OPT_R, OPT_OUT, OPT_SIGN, OPT_PASSIN, OPT_VERIFY, OPT_PRVERIFY, OPT_SIGNATURE, OPT_KEYFORM, OPT_ENGINE, OPT_ENGINE_IMPL, OPT_HEX, OPT_BINARY, OPT_DEBUG, OPT_FIPS_FINGERPRINT, @@ -43,6 +50,7 @@ const OPTIONS dgst_options[] = { {OPT_HELP_STR, 1, '-', " file... files to digest (default is stdin)\n"}, {"help", OPT_HELP, '-', "Display this summary"}, + {"list", OPT_LIST, '-', "List digests"}, {"c", OPT_C, '-', "Print the digest with separating colons"}, {"r", OPT_R, '-', "Print the digest in coreutils format"}, {"out", OPT_OUT, '>', "Output to filename rather than stdout"}, @@ -91,6 +99,7 @@ int dgst_main(int argc, char **argv) int i, ret = 1, out_bin = -1, want_pub = 0, do_verify = 0; unsigned char *buf = NULL, *sigbuf = NULL; int engine_impl = 0; + struct doall_dgst_digests dec; prog = opt_progname(argv[0]); buf = app_malloc(BUFSIZE, "I/O buffer"); @@ -108,6 +117,15 @@ int dgst_main(int argc, char **argv) opt_help(dgst_options); ret = 0; goto end; + case OPT_LIST: + BIO_printf(bio_out, "Supported digests:\n"); + dec.bio = bio_out; + dec.n = 0; + OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_MD_METH, + show_digests, &dec); + BIO_printf(bio_out, "\n"); + ret = 0; + goto end; case OPT_C: separator = 1; break; @@ -413,20 +431,86 @@ int dgst_main(int argc, char **argv) return ret; } +static void show_digests(const OBJ_NAME *name, void *arg) +{ + struct doall_dgst_digests *dec = (struct doall_dgst_digests *)arg; + const EVP_MD *md = NULL; + + /* Filter out signed digests (a.k.a signature algorithms) */ + if (strstr(name->name, "rsa") != NULL || strstr(name->name, "RSA") != NULL) + return; + + if (!islower((unsigned char)*name->name)) + return; + + /* Filter out message digests that we cannot use */ + md = EVP_get_digestbyname(name->name); + if (md == NULL) + return; + + BIO_printf(dec->bio, "-%-25s", name->name); + if (++dec->n == 3) { + BIO_printf(dec->bio, "\n"); + dec->n = 0; + } else { + BIO_printf(dec->bio, " "); + } +} + +/* + * The newline_escape_filename function performs newline escaping for any + * filename that contains a newline. This function also takes a pointer + * to backslash. The backslash pointer is a flag to indicating whether a newline + * is present in the filename. If a newline is present, the backslash flag is + * set and the output format will contain a backslash at the beginning of the + * digest output. This output format is to replicate the output format found + * in the '*sum' checksum programs. This aims to preserve backward + * compatibility. + */ +static const char *newline_escape_filename(const char *file, int * backslash) +{ + size_t i, e = 0, length = strlen(file), newline_count = 0, mem_len = 0; + char *file_cpy = NULL; + + for (i = 0; i < length; i++) + if (file[i] == '\n') + newline_count++; + + mem_len = length + newline_count + 1; + file_cpy = app_malloc(mem_len, file); + i = 0; + + while(e < length) { + const char c = file[e]; + if (c == '\n') { + file_cpy[i++] = '\\'; + file_cpy[i++] = 'n'; + *backslash = 1; + } else { + file_cpy[i++] = c; + } + e++; + } + file_cpy[i] = '\0'; + return (const char*)file_cpy; +} + + int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout, EVP_PKEY *key, unsigned char *sigin, int siglen, const char *sig_name, const char *md_name, const char *file) { - size_t len; - int i; + size_t len = BUFSIZE; + int i, backslash = 0, ret = 1; + unsigned char *sigbuf = NULL; while (BIO_pending(bp) || !BIO_eof(bp)) { i = BIO_read(bp, (char *)buf, BUFSIZE); if (i < 0) { BIO_printf(bio_err, "Read Error in %s\n", file); ERR_print_errors(bio_err); - return 1; + goto end; } if (i == 0) break; @@ -439,37 +523,51 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int s BIO_printf(out, "Verified OK\n"); } else if (i == 0) { BIO_printf(out, "Verification Failure\n"); - return 1; + goto end; } else { BIO_printf(bio_err, "Error Verifying Data\n"); ERR_print_errors(bio_err); - return 1; + goto end; } - return 0; + ret = 0; + goto end; } if (key != NULL) { EVP_MD_CTX *ctx; + int pkey_len; BIO_get_md_ctx(bp, &ctx); - len = BUFSIZE; + pkey_len = EVP_PKEY_size(key); + if (pkey_len > BUFSIZE) { + len = pkey_len; + sigbuf = app_malloc(len, "Signature buffer"); + buf = sigbuf; + } if (!EVP_DigestSignFinal(ctx, buf, &len)) { BIO_printf(bio_err, "Error Signing Data\n"); ERR_print_errors(bio_err); - return 1; + goto end; } } else { len = BIO_gets(bp, (char *)buf, BUFSIZE); if ((int)len < 0) { ERR_print_errors(bio_err); - return 1; + goto end; } } if (binout) { BIO_write(out, buf, len); } else if (sep == 2) { + file = newline_escape_filename(file, &backslash); + + if (backslash == 1) + BIO_puts(out, "\\"); + for (i = 0; i < (int)len; i++) BIO_printf(out, "%02x", buf[i]); + BIO_printf(out, " *%s\n", file); + OPENSSL_free((char *)file); } else { if (sig_name != NULL) { BIO_puts(out, sig_name); @@ -488,5 +586,11 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int s } BIO_printf(out, "\n"); } - return 0; + + ret = 0; + end: + if (sigbuf != NULL) + OPENSSL_clear_free(sigbuf, len); + + return ret; } Modified: stable/12/crypto/openssl/apps/enc.c ============================================================================== --- stable/12/crypto/openssl/apps/enc.c Fri Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/apps/enc.c Fri Mar 20 21:43:08 2020 (r359186) @@ -50,7 +50,8 @@ typedef enum OPTION_choice { const OPTIONS enc_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, - {"ciphers", OPT_LIST, '-', "List ciphers"}, + {"list", OPT_LIST, '-', "List ciphers"}, + {"ciphers", OPT_LIST, '-', "Alias for -list"}, {"in", OPT_IN, '<', "Input file"}, {"out", OPT_OUT, '>', "Output file"}, {"pass", OPT_PASS, 's', "Passphrase source"}, Modified: stable/12/crypto/openssl/apps/ocsp.c ============================================================================== --- stable/12/crypto/openssl/apps/ocsp.c Fri Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/apps/ocsp.c Fri Mar 20 21:43:08 2020 (r359186) @@ -114,7 +114,7 @@ static int acfd = (int) INVALID_SOCKET; static int index_changed(CA_DB *); static void spawn_loop(void); static int print_syslog(const char *str, size_t len, void *levPtr); -static void sock_timeout(int signum); +static void socket_timeout(int signum); # endif # ifndef OPENSSL_NO_SOCK @@ -597,7 +597,7 @@ int ocsp_main(int argc, char **argv) if (multi && acbio != NULL) spawn_loop(); if (acbio != NULL && req_timeout > 0) - signal(SIGALRM, sock_timeout); + signal(SIGALRM, socket_timeout); #endif if (acbio != NULL) @@ -1352,7 +1352,7 @@ static int urldecode(char *p) # endif # ifdef OCSP_DAEMON -static void sock_timeout(int signum) +static void socket_timeout(int signum) { if (acfd != (int)INVALID_SOCKET) (void)shutdown(acfd, SHUT_RD); Modified: stable/12/crypto/openssl/apps/openssl.c ============================================================================== --- stable/12/crypto/openssl/apps/openssl.c Fri Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/apps/openssl.c Fri Mar 20 21:43:08 2020 (r359186) @@ -164,6 +164,13 @@ int main(int argc, char *argv[]) } prog = prog_init(); + if (prog == NULL) { + BIO_printf(bio_err, + "FATAL: Startup failure (dev note: prog_init() failed)\n"); + ERR_print_errors(bio_err); + ret = 1; + goto end; + } pname = opt_progname(argv[0]); /* first check the program name */ Modified: stable/12/crypto/openssl/apps/passwd.c ============================================================================== --- stable/12/crypto/openssl/apps/passwd.c Fri Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/apps/passwd.c Fri Mar 20 21:43:08 2020 (r359186) @@ -807,7 +807,7 @@ static int do_passwd(int passed_salt, char **salt_p, c (*salt_p)[i] = cov_2char[(*salt_p)[i] & 0x3f]; /* 6 bits */ (*salt_p)[i] = 0; # ifdef CHARSET_EBCDIC - /* The password encryption funtion will convert back to ASCII */ + /* The password encryption function will convert back to ASCII */ ascii2ebcdic(*salt_p, *salt_p, saltlen); # endif } Modified: stable/12/crypto/openssl/apps/pkcs12.c ============================================================================== --- stable/12/crypto/openssl/apps/pkcs12.c Fri Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/apps/pkcs12.c Fri Mar 20 21:43:08 2020 (r359186) @@ -41,6 +41,7 @@ int dump_certs_pkeys_bags(BIO *out, const STACK_OF(PKC int dump_certs_pkeys_bag(BIO *out, const PKCS12_SAFEBAG *bags, const char *pass, int passlen, int options, char *pempass, const EVP_CIPHER *enc); +void print_attribute(BIO *out, const ASN1_TYPE *av); int print_attribs(BIO *out, const STACK_OF(X509_ATTRIBUTE) *attrlst, const char *name); void hex_prin(BIO *out, unsigned char *buf, int len); @@ -878,6 +879,38 @@ int cert_load(BIO *in, STACK_OF(X509) *sk) return ret; } +/* Generalised x509 attribute value print */ + +void print_attribute(BIO *out, const ASN1_TYPE *av) +{ + char *value; + + switch (av->type) { + case V_ASN1_BMPSTRING: + value = OPENSSL_uni2asc(av->value.bmpstring->data, + av->value.bmpstring->length); + BIO_printf(out, "%s\n", value); + OPENSSL_free(value); + break; + + case V_ASN1_OCTET_STRING: + hex_prin(out, av->value.octet_string->data, + av->value.octet_string->length); + BIO_printf(out, "\n"); + break; + + case V_ASN1_BIT_STRING: + hex_prin(out, av->value.bit_string->data, + av->value.bit_string->length); + BIO_printf(out, "\n"); + break; + + default: + BIO_printf(out, "\n", av->type); + break; + } +} + /* Generalised attribute print: handle PKCS#8 and bag attributes */ int print_attribs(BIO *out, const STACK_OF(X509_ATTRIBUTE) *attrlst, @@ -885,8 +918,7 @@ int print_attribs(BIO *out, const STACK_OF(X509_ATTRIB { X509_ATTRIBUTE *attr; ASN1_TYPE *av; - char *value; - int i, attr_nid; + int i, j, attr_nid; if (!attrlst) { BIO_printf(out, "%s: \n", name); return 1; @@ -910,30 +942,10 @@ int print_attribs(BIO *out, const STACK_OF(X509_ATTRIB } if (X509_ATTRIBUTE_count(attr)) { - av = X509_ATTRIBUTE_get0_type(attr, 0); - switch (av->type) { - case V_ASN1_BMPSTRING: - value = OPENSSL_uni2asc(av->value.bmpstring->data, - av->value.bmpstring->length); - BIO_printf(out, "%s\n", value); - OPENSSL_free(value); - break; - - case V_ASN1_OCTET_STRING: - hex_prin(out, av->value.octet_string->data, - av->value.octet_string->length); - BIO_printf(out, "\n"); - break; - - case V_ASN1_BIT_STRING: - hex_prin(out, av->value.bit_string->data, - av->value.bit_string->length); - BIO_printf(out, "\n"); - break; - - default: - BIO_printf(out, "\n", av->type); - break; + for (j = 0; j < X509_ATTRIBUTE_count(attr); j++) + { + av = X509_ATTRIBUTE_get0_type(attr, j); + print_attribute(out, av); } } else { BIO_printf(out, "\n"); Modified: stable/12/crypto/openssl/apps/pkeyutl.c ============================================================================== --- stable/12/crypto/openssl/apps/pkeyutl.c Fri Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/apps/pkeyutl.c Fri Mar 20 21:43:08 2020 (r359186) @@ -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 @@ -299,8 +299,7 @@ int pkeyutl_main(int argc, char **argv) /* Sanity check the input */ if (buf_inlen > EVP_MAX_MD_SIZE && (pkey_op == EVP_PKEY_OP_SIGN - || pkey_op == EVP_PKEY_OP_VERIFY - || pkey_op == EVP_PKEY_OP_VERIFYRECOVER)) { + || pkey_op == EVP_PKEY_OP_VERIFY)) { BIO_printf(bio_err, "Error: The input data looks too long to be a hash\n"); goto end; Modified: stable/12/crypto/openssl/apps/req.c ============================================================================== --- stable/12/crypto/openssl/apps/req.c Fri Mar 20 21:06:58 2020 (r359185) +++ stable/12/crypto/openssl/apps/req.c Fri Mar 20 21:43:08 2020 (r359186) @@ -200,9 +200,12 @@ static int duplicated(LHASH_OF(OPENSSL_STRING) *addext *p = '\0'; /* Finally have a clean "key"; see if it's there [by attempt to add it]. */ - if ((p = (char *)lh_OPENSSL_STRING_insert(addexts, (OPENSSL_STRING*)kv)) - != NULL || lh_OPENSSL_STRING_error(addexts)) { - OPENSSL_free(p != NULL ? p : kv); + p = (char *)lh_OPENSSL_STRING_insert(addexts, (OPENSSL_STRING*)kv); + if (p != NULL) { + OPENSSL_free(p); + return 1; + } else if (lh_OPENSSL_STRING_error(addexts)) { + OPENSSL_free(kv); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Sat Mar 21 00:29: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 E4768277B98; Sat, 21 Mar 2020 00:29:17 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48khNF4Ty3z4KWD; Sat, 21 Mar 2020 00:29:17 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 635E942CC; Sat, 21 Mar 2020 00:29:17 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02L0TG0p065921; Sat, 21 Mar 2020 00:29:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02L0TG2U065920; Sat, 21 Mar 2020 00:29:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003210029.02L0TG2U065920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 21 Mar 2020 00:29: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: r359190 - stable/12/sys/dev/usb/net X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/dev/usb/net X-SVN-Commit-Revision: 359190 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.29 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, 21 Mar 2020 00:29:18 -0000 Author: emaste Date: Sat Mar 21 00:29:16 2020 New Revision: 359190 URL: https://svnweb.freebsd.org/changeset/base/359190 Log: MFC r358979: muge: correct RX checksum offload Modified: stable/12/sys/dev/usb/net/if_muge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/net/if_muge.c ============================================================================== --- stable/12/sys/dev/usb/net/if_muge.c Sat Mar 21 00:08:33 2020 (r359189) +++ stable/12/sys/dev/usb/net/if_muge.c Sat Mar 21 00:29:16 2020 (r359190) @@ -1282,7 +1282,8 @@ muge_bulk_read_callback(struct usb_xfer *xfer, usb_err */ if (pktlen > ETHER_MIN_LEN) { m->m_pkthdr.csum_flags |= - CSUM_DATA_VALID; + CSUM_DATA_VALID | + CSUM_PSEUDO_HDR; /* * Copy the checksum from the @@ -1301,7 +1302,7 @@ muge_bulk_read_callback(struct usb_xfer *xfer, usb_err * be in host network order. */ m->m_pkthdr.csum_data = - ntohs(m->m_pkthdr.csum_data); + ntohs(0xffff); muge_dbg_printf(sc, "RX checksum offloaded (0x%04x)\n", From owner-svn-src-stable-12@freebsd.org Sat Mar 21 00:31: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 B2368277D0D; Sat, 21 Mar 2020 00:31:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48khQl3y6Cz4LF9; Sat, 21 Mar 2020 00:31:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81C5C4426; Sat, 21 Mar 2020 00:31:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02L0VR6L068283; Sat, 21 Mar 2020 00:31:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02L0VRdB068282; Sat, 21 Mar 2020 00:31:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003210031.02L0VRdB068282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 21 Mar 2020 00:31: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: r359191 - stable/12/sys/dev/usb/net X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/dev/usb/net X-SVN-Commit-Revision: 359191 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.29 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, 21 Mar 2020 00:31:27 -0000 Author: emaste Date: Sat Mar 21 00:31:27 2020 New Revision: 359191 URL: https://svnweb.freebsd.org/changeset/base/359191 Log: MFC r359007: muge: drop CSUM from MUGE_DEFAULT_TSO_CSUM_ENABLE TSO is independent of checksum offload Modified: stable/12/sys/dev/usb/net/if_muge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/net/if_muge.c ============================================================================== --- stable/12/sys/dev/usb/net/if_muge.c Sat Mar 21 00:29:16 2020 (r359190) +++ stable/12/sys/dev/usb/net/if_muge.c Sat Mar 21 00:31:27 2020 (r359191) @@ -124,7 +124,7 @@ SYSCTL_INT(_hw_usb_muge, OID_AUTO, debug, CTLFLAG_RWTU #define MUGE_DEFAULT_RX_CSUM_ENABLE (false) #define MUGE_DEFAULT_TX_CSUM_ENABLE (false) -#define MUGE_DEFAULT_TSO_CSUM_ENABLE (false) +#define MUGE_DEFAULT_TSO_ENABLE (false) /* Supported Vendor and Product IDs. */ static const struct usb_device_id lan78xx_devs[] = { @@ -1624,7 +1624,7 @@ muge_attach_post_sub(struct usb_ether *ue) * here, that's something related to socket buffers used in Linux. * FreeBSD doesn't have that as an interface feature. */ - if (MUGE_DEFAULT_TSO_CSUM_ENABLE) + if (MUGE_DEFAULT_TSO_ENABLE) ifp->if_capabilities |= IFCAP_TSO4 | IFCAP_TSO6; #if 0 From owner-svn-src-stable-12@freebsd.org Sat Mar 21 00:32: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 61A18277EE7; Sat, 21 Mar 2020 00:32:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48khSD1McDz4N4Y; Sat, 21 Mar 2020 00:32:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DB824491; Sat, 21 Mar 2020 00:32:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02L0WhpA071821; Sat, 21 Mar 2020 00:32:43 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02L0WhnH071820; Sat, 21 Mar 2020 00:32:43 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003210032.02L0WhnH071820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 21 Mar 2020 00:32: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: r359192 - stable/12/sys/dev/usb/net X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/dev/usb/net X-SVN-Commit-Revision: 359192 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.29 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, 21 Mar 2020 00:32:44 -0000 Author: emaste Date: Sat Mar 21 00:32:43 2020 New Revision: 359192 URL: https://svnweb.freebsd.org/changeset/base/359192 Log: MFC r359009: if_muge: whitespace and style cleanup Modified: stable/12/sys/dev/usb/net/if_muge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/net/if_muge.c ============================================================================== --- stable/12/sys/dev/usb/net/if_muge.c Sat Mar 21 00:31:27 2020 (r359191) +++ stable/12/sys/dev/usb/net/if_muge.c Sat Mar 21 00:32:43 2020 (r359192) @@ -656,8 +656,8 @@ lan78xx_set_rx_max_frame_length(struct muge_softc *sc, * 0 is returned. */ static int -lan78xx_miibus_readreg(device_t dev, int phy, int reg) { - +lan78xx_miibus_readreg(device_t dev, int phy, int reg) +{ struct muge_softc *sc = device_get_softc(dev); int locked; uint32_t addr, val; @@ -1178,7 +1178,6 @@ muge_bulk_read_callback(struct usb_xfer *xfer, usb_err switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - /* * There is always a zero length frame after bringing the * interface up. @@ -1195,7 +1194,6 @@ muge_bulk_read_callback(struct usb_xfer *xfer, usb_err off = 0; while (off < actlen) { - /* The frame header is aligned on a 4 byte boundary. */ off = ((off + 0x3) & ~0x3); @@ -1206,7 +1204,6 @@ muge_bulk_read_callback(struct usb_xfer *xfer, usb_err off += (sizeof(rx_cmd_a)); rx_cmd_a = le32toh(rx_cmd_a); - /* Extract RX CMD B. */ if (off + sizeof(rx_cmd_b) > actlen) goto tr_setup; @@ -1214,7 +1211,6 @@ muge_bulk_read_callback(struct usb_xfer *xfer, usb_err off += (sizeof(rx_cmd_b)); rx_cmd_b = le32toh(rx_cmd_b); - /* Extract RX CMD C. */ if (off + sizeof(rx_cmd_c) > actlen) goto tr_setup; @@ -1302,7 +1298,7 @@ muge_bulk_read_callback(struct usb_xfer *xfer, usb_err * be in host network order. */ m->m_pkthdr.csum_data = - ntohs(0xffff); + ntohs(0xffff); muge_dbg_printf(sc, "RX checksum offloaded (0x%04x)\n", @@ -1325,7 +1321,6 @@ muge_bulk_read_callback(struct usb_xfer *xfer, usb_err */ off += pktlen; } - /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: @@ -1333,7 +1328,6 @@ tr_setup: usbd_transfer_submit(xfer); uether_rxflush(ue); return; - default: if (error != USB_ERR_CANCELLED) { muge_warn_printf(sc, "bulk read error, %s\n", @@ -1374,7 +1368,7 @@ muge_bulk_write_callback(struct usb_xfer *xfer, usb_er muge_dbg_printf(sc, "USB TRANSFER status: USB_ST_SETUP\n"); tr_setup: if ((sc->sc_flags & MUGE_FLAG_LINK) == 0 || - (ifp->if_drv_flags & IFF_DRV_OACTIVE) != 0) { + (ifp->if_drv_flags & IFF_DRV_OACTIVE) != 0) { muge_dbg_printf(sc, "sc->sc_flags & MUGE_FLAG_LINK: %d\n", (sc->sc_flags & MUGE_FLAG_LINK)); @@ -1389,8 +1383,9 @@ tr_setup: */ return; } - for (nframes = 0; nframes < 16 && - !IFQ_DRV_IS_EMPTY(&ifp->if_snd); nframes++) { + for (nframes = 0; + nframes < 16 && !IFQ_DRV_IS_EMPTY(&ifp->if_snd); + nframes++) { IFQ_DRV_DEQUEUE(&ifp->if_snd, m); if (m == NULL) break; @@ -1637,9 +1632,9 @@ muge_attach_post_sub(struct usb_ether *ue) ifp->if_capenable = ifp->if_capabilities; mtx_lock(&Giant); - error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, - uether_ifmedia_upd, ue->ue_methods->ue_mii_sts, - BMSR_DEFCAPMASK, sc->sc_phyno, MII_OFFSET_ANY, 0); + error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, uether_ifmedia_upd, + ue->ue_methods->ue_mii_sts, BMSR_DEFCAPMASK, sc->sc_phyno, + MII_OFFSET_ANY, 0); mtx_unlock(&Giant); return (0); @@ -1697,7 +1692,7 @@ muge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data /* Modify the RX CSUM enable bits. */ if ((mask & IFCAP_RXCSUM) != 0 && - (ifp->if_capabilities & IFCAP_RXCSUM) != 0) { + (ifp->if_capabilities & IFCAP_RXCSUM) != 0) { ifp->if_capenable ^= IFCAP_RXCSUM; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { @@ -1709,7 +1704,6 @@ muge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data MUGE_UNLOCK(sc); if (reinit) uether_init(ue); - } else { rc = uether_ioctl(ifp, cmd, data); } @@ -1878,7 +1872,7 @@ muge_setmulti(struct usb_ether *ue) MUGE_LOCK_ASSERT(sc, MA_OWNED); sc->sc_rfe_ctl &= ~(ETH_RFE_CTL_UCAST_EN_ | ETH_RFE_CTL_MCAST_EN_ | - ETH_RFE_CTL_DA_PERFECT_ | ETH_RFE_CTL_MCAST_HASH_); + ETH_RFE_CTL_DA_PERFECT_ | ETH_RFE_CTL_MCAST_HASH_); /* Initialize hash filter table. */ for (i = 0; i < ETH_DP_SEL_VHF_HASH_LEN; i++) @@ -1886,8 +1880,7 @@ muge_setmulti(struct usb_ether *ue) /* Initialize perfect filter table. */ for (i = 1; i < MUGE_NUM_PFILTER_ADDRS_; i++) { - sc->sc_pfilter_table[i][0] = - sc->sc_pfilter_table[i][1] = 0; + sc->sc_pfilter_table[i][0] = sc->sc_pfilter_table[i][1] = 0; } sc->sc_rfe_ctl |= ETH_RFE_CTL_BCAST_EN_; @@ -1895,7 +1888,7 @@ muge_setmulti(struct usb_ether *ue) if (ifp->if_flags & IFF_PROMISC) { muge_dbg_printf(sc, "promiscuous mode enabled\n"); sc->sc_rfe_ctl |= ETH_RFE_CTL_MCAST_EN_ | ETH_RFE_CTL_UCAST_EN_; - } else if (ifp->if_flags & IFF_ALLMULTI){ + } else if (ifp->if_flags & IFF_ALLMULTI) { muge_dbg_printf(sc, "receive all multicast enabled\n"); sc->sc_rfe_ctl |= ETH_RFE_CTL_MCAST_EN_; } else { @@ -1962,7 +1955,8 @@ muge_setpromisc(struct usb_ether *ue) * RETURNS: * Returns 0 on success or a negative error code. */ -static int muge_sethwcsum(struct muge_softc *sc) +static int +muge_sethwcsum(struct muge_softc *sc) { struct ifnet *ifp = uether_getifp(&sc->sc_ue); int err; From owner-svn-src-stable-12@freebsd.org Sat Mar 21 00:34: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 0FC8D277F86; Sat, 21 Mar 2020 00:34:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48khVD6gp7z4RGG; Sat, 21 Mar 2020 00:34:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D90954492; Sat, 21 Mar 2020 00:34:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02L0YSN6071972; Sat, 21 Mar 2020 00:34:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02L0YSZE071971; Sat, 21 Mar 2020 00:34:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003210034.02L0YSZE071971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 21 Mar 2020 00:34: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: r359193 - stable/12/sys/dev/usb/net X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/dev/usb/net X-SVN-Commit-Revision: 359193 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.29 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, 21 Mar 2020 00:34:29 -0000 Author: emaste Date: Sat Mar 21 00:34:28 2020 New Revision: 359193 URL: https://svnweb.freebsd.org/changeset/base/359193 Log: MFC r359070: if_muge: use C99 bool for boolean vars Modified: stable/12/sys/dev/usb/net/if_muge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/net/if_muge.c ============================================================================== --- stable/12/sys/dev/usb/net/if_muge.c Sat Mar 21 00:32:43 2020 (r359192) +++ stable/12/sys/dev/usb/net/if_muge.c Sat Mar 21 00:34:28 2020 (r359193) @@ -389,9 +389,10 @@ lan78xx_eeprom_read_raw(struct muge_softc *sc, uint16_ { usb_ticks_t start_ticks; const usb_ticks_t max_ticks = USB_MS_TO_TICKS(1000); - int err, locked; + int err; uint32_t val, saved; uint16_t i; + bool locked; locked = mtx_owned(&sc->sc_mtx); /* XXX */ if (!locked) @@ -483,9 +484,10 @@ static int lan78xx_otp_read_raw(struct muge_softc *sc, uint16_t off, uint8_t *buf, uint16_t buflen) { - int locked, err; + int err; uint32_t val; uint16_t i; + bool locked; locked = mtx_owned(&sc->sc_mtx); if (!locked) MUGE_LOCK(sc); @@ -659,8 +661,8 @@ static int lan78xx_miibus_readreg(device_t dev, int phy, int reg) { struct muge_softc *sc = device_get_softc(dev); - int locked; uint32_t addr, val; + bool locked; val = 0; locked = mtx_owned(&sc->sc_mtx); @@ -712,8 +714,8 @@ static int lan78xx_miibus_writereg(device_t dev, int phy, int reg, int val) { struct muge_softc *sc = device_get_softc(dev); - int locked; uint32_t addr; + bool locked; if (sc->sc_phyno != phy) return (0); @@ -760,10 +762,10 @@ lan78xx_miibus_statchg(device_t dev) struct muge_softc *sc = device_get_softc(dev); struct mii_data *mii = uether_getmii(&sc->sc_ue); struct ifnet *ifp; - int locked; int err; uint32_t flow = 0; uint32_t fct_flow = 0; + bool locked; locked = mtx_owned(&sc->sc_mtx); if (!locked)