From owner-svn-src-stable-11@freebsd.org Mon Jan 20 08:28:55 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9FED1F210D; Mon, 20 Jan 2020 08:28:55 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 481Pvq4zfZz4F4D; Mon, 20 Jan 2020 08:28:55 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A63BF20C81; Mon, 20 Jan 2020 08:28:55 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00K8Stwf056858; Mon, 20 Jan 2020 08:28:55 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00K8SteN056855; Mon, 20 Jan 2020 08:28:55 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202001200828.00K8SteN056855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 20 Jan 2020 08:28:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r356905 - in stable/11: sbin/fsck_ffs sbin/newfs sys/ufs/ffs X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in stable/11: sbin/fsck_ffs sbin/newfs sys/ufs/ffs X-SVN-Commit-Revision: 356905 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 08:28:55 -0000 Author: eugen Date: Mon Jan 20 08:28:54 2020 New Revision: 356905 URL: https://svnweb.freebsd.org/changeset/base/356905 Log: MFC r323157 by 323157: fix recovery information with sector sizes up to 64K. Original commit log: The new fsck recovery information to enable it to find backup superblocks created in revision 322297 only works on disks with sector sizes up to 4K. This update allows the recovery information to be created by newfs and used by fsck on disks with sector sizes up to 64K. Note that FFS currently limits filesystem to be mounted from disks with up to 8K sectors. Expanding this limitation will be the subject of another commit. For example, this allows newfs to work on GELI volumes with 8K sectors. PR: 243413 Approved by: mckusick Relnotes: Yes Modified: stable/11/sbin/fsck_ffs/setup.c stable/11/sbin/newfs/mkfs.c stable/11/sys/ufs/ffs/fs.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/fsck_ffs/setup.c ============================================================================== --- stable/11/sbin/fsck_ffs/setup.c Mon Jan 20 04:01:35 2020 (r356904) +++ stable/11/sbin/fsck_ffs/setup.c Mon Jan 20 08:28:54 2020 (r356905) @@ -36,6 +36,7 @@ static const char sccsid[] = "@(#)setup.c 8.10 (Berkel __FBSDID("$FreeBSD$"); #include +#include #include #define FSTYPENAMES #include @@ -466,7 +467,9 @@ sblock_init(void) static int calcsb(char *dev, int devfd, struct fs *fs) { - struct fsrecovery fsr; + struct fsrecovery *fsr; + char *fsrbuf; + u_int secsize; /* * We need fragments-per-group and the partition-size. @@ -476,32 +479,62 @@ calcsb(char *dev, int devfd, struct fs *fs) * overwritten by a boot block, we fail. But usually they are * there and we can use them. */ - if (blread(devfd, (char *)&fsr, - (SBLOCK_UFS2 - sizeof(fsr)) / dev_bsize, sizeof(fsr)) || - fsr.fsr_magic != FS_UFS2_MAGIC) + if (ioctl(devfd, DIOCGSECTORSIZE, &secsize) == -1) return (0); + fsrbuf = Malloc(secsize); + if (fsrbuf == NULL) + errx(EEXIT, "calcsb: cannot allocate recovery buffer"); + if (blread(devfd, fsrbuf, + (SBLOCK_UFS2 - secsize) / dev_bsize, secsize) != 0) + return (0); + fsr = (struct fsrecovery *)&fsrbuf[secsize - sizeof *fsr]; + if (fsr->fsr_magic != FS_UFS2_MAGIC) + return (0); memset(fs, 0, sizeof(struct fs)); - fs->fs_fpg = fsr.fsr_fpg; - fs->fs_fsbtodb = fsr.fsr_fsbtodb; - fs->fs_sblkno = fsr.fsr_sblkno; - fs->fs_magic = fsr.fsr_magic; - fs->fs_ncg = fsr.fsr_ncg; + fs->fs_fpg = fsr->fsr_fpg; + fs->fs_fsbtodb = fsr->fsr_fsbtodb; + fs->fs_sblkno = fsr->fsr_sblkno; + fs->fs_magic = fsr->fsr_magic; + fs->fs_ncg = fsr->fsr_ncg; + free(fsrbuf); return (1); } /* * Check to see if recovery information exists. + * Return 1 if it exists or cannot be created. + * Return 0 if it does not exist and can be created. */ static int chkrecovery(int devfd) { - struct fsrecovery fsr; + struct fsrecovery *fsr; + char *fsrbuf; + u_int secsize; - if (blread(devfd, (char *)&fsr, - (SBLOCK_UFS2 - sizeof(fsr)) / dev_bsize, sizeof(fsr)) || - fsr.fsr_magic != FS_UFS2_MAGIC) - return (0); - return (1); + /* + * Could not determine if backup material exists, so do not + * offer to create it. + */ + if (ioctl(devfd, DIOCGSECTORSIZE, &secsize) == -1 || + (fsrbuf = Malloc(secsize)) == NULL || + blread(devfd, fsrbuf, (SBLOCK_UFS2 - secsize) / dev_bsize, + secsize) != 0) + return (1); + /* + * Recovery material has already been created, so do not + * need to create it again. + */ + fsr = (struct fsrecovery *)&fsrbuf[secsize - sizeof *fsr]; + if (fsr->fsr_magic == FS_UFS2_MAGIC) { + free(fsrbuf); + return (1); + } + /* + * Recovery material has not been created and can be if desired. + */ + free(fsrbuf); + return (0); } /* @@ -512,17 +545,24 @@ chkrecovery(int devfd) static void saverecovery(int readfd, int writefd) { - struct fsrecovery fsr; + struct fsrecovery *fsr; + char *fsrbuf; + u_int secsize; if (sblock.fs_magic != FS_UFS2_MAGIC || - blread(readfd, (char *)&fsr, - (SBLOCK_UFS2 - sizeof(fsr)) / dev_bsize, sizeof(fsr))) + ioctl(readfd, DIOCGSECTORSIZE, &secsize) == -1 || + (fsrbuf = Malloc(secsize)) == NULL || + blread(readfd, fsrbuf, (SBLOCK_UFS2 - secsize) / dev_bsize, + secsize) != 0) { + printf("RECOVERY DATA COULD NOT BE CREATED\n"); return; - fsr.fsr_magic = sblock.fs_magic; - fsr.fsr_fpg = sblock.fs_fpg; - fsr.fsr_fsbtodb = sblock.fs_fsbtodb; - fsr.fsr_sblkno = sblock.fs_sblkno; - fsr.fsr_ncg = sblock.fs_ncg; - blwrite(writefd, (char *)&fsr, (SBLOCK_UFS2 - sizeof(fsr)) / dev_bsize, - sizeof(fsr)); + } + fsr = (struct fsrecovery *)&fsrbuf[secsize - sizeof *fsr]; + fsr->fsr_magic = sblock.fs_magic; + fsr->fsr_fpg = sblock.fs_fpg; + fsr->fsr_fsbtodb = sblock.fs_fsbtodb; + fsr->fsr_sblkno = sblock.fs_sblkno; + fsr->fsr_ncg = sblock.fs_ncg; + blwrite(writefd, fsrbuf, (SBLOCK_UFS2 - secsize) / secsize, secsize); + free(fsrbuf); } Modified: stable/11/sbin/newfs/mkfs.c ============================================================================== --- stable/11/sbin/newfs/mkfs.c Mon Jan 20 04:01:35 2020 (r356904) +++ stable/11/sbin/newfs/mkfs.c Mon Jan 20 08:28:54 2020 (r356905) @@ -121,7 +121,8 @@ mkfs(struct partition *pp, char *fsys) ino_t maxinum; int minfragsperinode; /* minimum ratio of frags to inodes */ char tmpbuf[100]; /* XXX this will break in about 2,500 years */ - struct fsrecovery fsr; + struct fsrecovery *fsr; + char *fsrbuf; union { struct fs fdummy; char cdummy[SBLOCKSIZE]; @@ -442,6 +443,8 @@ restart: sblock.fs_sbsize = fragroundup(&sblock, sizeof(struct fs)); if (sblock.fs_sbsize > SBLOCKSIZE) sblock.fs_sbsize = SBLOCKSIZE; + if (sblock.fs_sbsize < realsectorsize) + sblock.fs_sbsize = realsectorsize; sblock.fs_minfree = minfree; if (metaspace > 0 && metaspace < sblock.fs_fpg / 2) sblock.fs_metaspace = blknum(&sblock, metaspace); @@ -513,7 +516,7 @@ restart: /* * Wipe out old UFS1 superblock(s) if necessary. */ - if (!Nflag && Oflag != 1) { + if (!Nflag && Oflag != 1 && realsectorsize <= SBLOCK_UFS1) { i = bread(&disk, part_ofs + SBLOCK_UFS1 / disk.d_bsize, chdummy, SBLOCKSIZE); if (i == -1) err(1, "can't read old UFS1 superblock: %s", disk.d_error); @@ -622,18 +625,20 @@ restart: * The recovery information only works for UFS2 filesystems. */ if (sblock.fs_magic == FS_UFS2_MAGIC) { - i = bread(&disk, - part_ofs + (SBLOCK_UFS2 - sizeof(fsr)) / disk.d_bsize, - (char *)&fsr, sizeof(fsr)); - if (i == -1) + if ((fsrbuf = malloc(realsectorsize)) == NULL || bread(&disk, + part_ofs + (SBLOCK_UFS2 - realsectorsize) / disk.d_bsize, + fsrbuf, realsectorsize) == -1) err(1, "can't read recovery area: %s", disk.d_error); - fsr.fsr_magic = sblock.fs_magic; - fsr.fsr_fpg = sblock.fs_fpg; - fsr.fsr_fsbtodb = sblock.fs_fsbtodb; - fsr.fsr_sblkno = sblock.fs_sblkno; - fsr.fsr_ncg = sblock.fs_ncg; - wtfs((SBLOCK_UFS2 - sizeof(fsr)) / disk.d_bsize, sizeof(fsr), - (char *)&fsr); + fsr = + (struct fsrecovery *)&fsrbuf[realsectorsize - sizeof *fsr]; + fsr->fsr_magic = sblock.fs_magic; + fsr->fsr_fpg = sblock.fs_fpg; + fsr->fsr_fsbtodb = sblock.fs_fsbtodb; + fsr->fsr_sblkno = sblock.fs_sblkno; + fsr->fsr_ncg = sblock.fs_ncg; + wtfs((SBLOCK_UFS2 - realsectorsize) / disk.d_bsize, + realsectorsize, fsrbuf); + free(fsrbuf); } /* * Update information about this partition in pack Modified: stable/11/sys/ufs/ffs/fs.h ============================================================================== --- stable/11/sys/ufs/ffs/fs.h Mon Jan 20 04:01:35 2020 (r356904) +++ stable/11/sys/ufs/ffs/fs.h Mon Jan 20 08:28:54 2020 (r356905) @@ -238,9 +238,7 @@ struct fsck_cmd { * A recovery structure placed at the end of the boot block area by newfs * that can be used by fsck to search for alternate superblocks. */ -#define RESID (4096 - 20) /* disk sector size minus recovery area size */ struct fsrecovery { - char block[RESID]; /* unused part of sector */ int32_t fsr_magic; /* magic number */ int32_t fsr_fsbtodb; /* fsbtodb and dbtofsb shift constant */ int32_t fsr_sblkno; /* offset of super-block in filesys */ From owner-svn-src-stable-11@freebsd.org Mon Jan 20 09:16:07 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E61D1F34CD; Mon, 20 Jan 2020 09:16:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 481QyG6vS5z4H9h; Mon, 20 Jan 2020 09:16:06 +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 E3BAA21582; Mon, 20 Jan 2020 09:16:06 +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 00K9G6ON086491; Mon, 20 Jan 2020 09:16:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00K9G6pR086490; Mon, 20 Jan 2020 09:16:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202001200916.00K9G6pR086490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 20 Jan 2020 09:16:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r356907 - stable/11/sys/compat/linuxkpi/common/src X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 356907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 09:16:07 -0000 Author: kib Date: Mon Jan 20 09:16:06 2020 New Revision: 356907 URL: https://svnweb.freebsd.org/changeset/base/356907 Log: MFC r356682: Code must not unlock a mutex while owning the thread lock. Modified: stable/11/sys/compat/linuxkpi/common/src/linux_rcu.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/src/linux_rcu.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_rcu.c Mon Jan 20 08:55:27 2020 (r356906) +++ stable/11/sys/compat/linuxkpi/common/src/linux_rcu.c Mon Jan 20 09:16:06 2020 (r356907) @@ -296,14 +296,13 @@ linux_synchronize_rcu(void) "linux_synchronize_rcu() can sleep"); td = curthread; + DROP_GIANT(); /* * Synchronizing RCU might change the CPU core this function * is running on. Save current values: */ thread_lock(td); - - DROP_GIANT(); old_cpu = PCPU_GET(cpuid); old_pinned = td->td_pinned; From owner-svn-src-stable-11@freebsd.org Mon Jan 20 11:19:56 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C73E01F6531; Mon, 20 Jan 2020 11:19:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 481Tj84zSwz4NNh; Mon, 20 Jan 2020 11:19:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A615122BD6; Mon, 20 Jan 2020 11:19:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00KBJuq2058215; Mon, 20 Jan 2020 11:19:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00KBJulX058214; Mon, 20 Jan 2020 11:19:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202001201119.00KBJulX058214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 20 Jan 2020 11:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r356908 - in stable: 11/sys/opencrypto 12/sys/opencrypto X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/opencrypto 12/sys/opencrypto X-SVN-Commit-Revision: 356908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 11:19:56 -0000 Author: jhb Date: Mon Jan 20 11:19:55 2020 New Revision: 356908 URL: https://svnweb.freebsd.org/changeset/base/356908 Log: MFC 356507,356520: Add a reference count to cryptodev sessions. 356507: Add a reference count to cryptodev sessions. This prevents use-after-free races with crypto requests (which may sleep) and CIOCFSESSION as well as races from current CIOCFSESSION requests. 356520: Remove no-longer-used function prototype. admbugs: 949 Sponsored by: Chelsio Communications Modified: stable/11/sys/opencrypto/cryptodev.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/opencrypto/cryptodev.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/opencrypto/cryptodev.c ============================================================================== --- stable/11/sys/opencrypto/cryptodev.c Mon Jan 20 09:16:06 2020 (r356907) +++ stable/11/sys/opencrypto/cryptodev.c Mon Jan 20 11:19:55 2020 (r356908) @@ -268,6 +268,7 @@ crypt_kop_to_32(const struct crypt_kop *from, struct c struct csession { TAILQ_ENTRY(csession) next; u_int64_t sid; + volatile u_int refs; u_int32_t ses; struct mtx lock; /* for op submission */ @@ -294,6 +295,7 @@ struct cryptop_data { struct fcrypt { TAILQ_HEAD(csessionlist, csession) csessions; int sesn; + struct mtx lock; }; static struct timeval warninterval = { .tv_sec = 60, .tv_usec = 0 }; @@ -325,8 +327,7 @@ static struct fileops cryptofops = { }; static struct csession *csefind(struct fcrypt *, u_int); -static int csedelete(struct fcrypt *, struct csession *); -static struct csession *cseadd(struct fcrypt *, struct csession *); +static int csedelete(struct fcrypt *, u_int); static struct csession *csecreate(struct fcrypt *, u_int64_t, caddr_t, u_int64_t, caddr_t, u_int64_t, u_int32_t, u_int32_t, struct enc_xform *, struct auth_hash *); @@ -617,13 +618,9 @@ bail: break; case CIOCFSESSION: ses = *(u_int32_t *)data; - cse = csefind(fcr, ses); - if (cse == NULL) { + error = csedelete(fcr, ses); + if (error != 0) SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); - return (EINVAL); - } - csedelete(fcr, cse); - error = csefree(cse); break; case CIOCCRYPT: #ifdef COMPAT_FREEBSD32 @@ -640,6 +637,7 @@ bail: return (EINVAL); } error = cryptodev_op(cse, cop, active_cred, td); + (void)csefree(cse); #ifdef COMPAT_FREEBSD32 if (error == 0 && cmd == CIOCCRYPT32) crypt_op_to_32(cop, data); @@ -706,6 +704,7 @@ bail: return (EINVAL); } error = cryptodev_aead(cse, caead, active_cred, td); + (void)csefree(cse); break; default: error = EINVAL; @@ -1323,6 +1322,9 @@ cryptof_close(struct file *fp, struct thread *td) while ((cse = TAILQ_FIRST(&fcr->csessions))) { TAILQ_REMOVE(&fcr->csessions, cse, next); + KASSERT(cse->refs == 1, + ("%s: crypto session %p with %d refs", __func__, cse, + cse->refs)); (void)csefree(cse); } free(fcr, M_XDATA); @@ -1343,34 +1345,35 @@ csefind(struct fcrypt *fcr, u_int ses) { struct csession *cse; - TAILQ_FOREACH(cse, &fcr->csessions, next) - if (cse->ses == ses) + mtx_lock(&fcr->lock); + TAILQ_FOREACH(cse, &fcr->csessions, next) { + if (cse->ses == ses) { + refcount_acquire(&cse->refs); + mtx_unlock(&fcr->lock); return (cse); + } + } + mtx_unlock(&fcr->lock); return (NULL); } static int -csedelete(struct fcrypt *fcr, struct csession *cse_del) +csedelete(struct fcrypt *fcr, u_int ses) { struct csession *cse; + mtx_lock(&fcr->lock); TAILQ_FOREACH(cse, &fcr->csessions, next) { - if (cse == cse_del) { + if (cse->ses == ses) { TAILQ_REMOVE(&fcr->csessions, cse, next); - return (1); + mtx_unlock(&fcr->lock); + return (csefree(cse)); } } - return (0); + mtx_unlock(&fcr->lock); + return (EINVAL); } -static struct csession * -cseadd(struct fcrypt *fcr, struct csession *cse) -{ - TAILQ_INSERT_TAIL(&fcr->csessions, cse, next); - cse->ses = fcr->sesn++; - return (cse); -} - struct csession * csecreate(struct fcrypt *fcr, u_int64_t sid, caddr_t key, u_int64_t keylen, caddr_t mackey, u_int64_t mackeylen, u_int32_t cipher, u_int32_t mac, @@ -1382,6 +1385,7 @@ csecreate(struct fcrypt *fcr, u_int64_t sid, caddr_t k if (cse == NULL) return NULL; mtx_init(&cse->lock, "cryptodev", "crypto session lock", MTX_DEF); + refcount_init(&cse->refs, 1); cse->key = key; cse->keylen = keylen/8; cse->mackey = mackey; @@ -1391,7 +1395,10 @@ csecreate(struct fcrypt *fcr, u_int64_t sid, caddr_t k cse->mac = mac; cse->txform = txform; cse->thash = thash; - cseadd(fcr, cse); + mtx_lock(&fcr->lock); + TAILQ_INSERT_TAIL(&fcr->csessions, cse, next); + cse->ses = fcr->sesn++; + mtx_unlock(&fcr->lock); return (cse); } @@ -1400,6 +1407,8 @@ csefree(struct csession *cse) { int error; + if (!refcount_release(&cse->refs)) + return (0); error = crypto_freesession(cse->sid); mtx_destroy(&cse->lock); if (cse->key) @@ -1437,13 +1446,14 @@ cryptoioctl(struct cdev *dev, u_long cmd, caddr_t data switch (cmd) { case CRIOGET: - fcr = malloc(sizeof(struct fcrypt), M_XDATA, M_WAITOK); + fcr = malloc(sizeof(struct fcrypt), M_XDATA, M_WAITOK | M_ZERO); TAILQ_INIT(&fcr->csessions); - fcr->sesn = 0; + mtx_init(&fcr->lock, "fcrypt", NULL, MTX_DEF); error = falloc(td, &f, &fd, 0); if (error) { + mtx_destroy(&fcr->lock); free(fcr, M_XDATA); return (error); } From owner-svn-src-stable-11@freebsd.org Mon Jan 20 13:46:11 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4B5E1FA833; Mon, 20 Jan 2020 13:46:11 +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 481Xxv4LpJz4X37; Mon, 20 Jan 2020 13:46:11 +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 8C1002479D; Mon, 20 Jan 2020 13:46:11 +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 00KDkBkH056527; Mon, 20 Jan 2020 13:46:11 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00KDkA06056518; Mon, 20 Jan 2020 13:46:10 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202001201346.00KDkA06056518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 20 Jan 2020 13:46:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r356914 - in stable: 11/contrib/unbound 11/lib/libunbound 11/usr.sbin/unbound 11/usr.sbin/unbound/anchor 11/usr.sbin/unbound/checkconf 11/usr.sbin/unbound/control 11/usr.sbin/unbound/da... X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/unbound 11/lib/libunbound 11/usr.sbin/unbound 11/usr.sbin/unbound/anchor 11/usr.sbin/unbound/checkconf 11/usr.sbin/unbound/control 11/usr.sbin/unbound/daemon 12/contrib/unbound 1... X-SVN-Commit-Revision: 356914 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 13:46:11 -0000 Author: cy Date: Mon Jan 20 13:46:09 2020 New Revision: 356914 URL: https://svnweb.freebsd.org/changeset/base/356914 Log: MFC r356676: Unbound's config.h is manually maintained, using a ./configure produced config.h as a guide. In practice contributed software maintains a copy of config.h within its build directory tree containing its Makefile. usr.sbin/unbound is the home for its config.h. Differential Revision: https://reviews.freebsd.org/D22983 Added: stable/11/usr.sbin/unbound/config.h (contents, props changed) - copied, changed from r356913, stable/11/contrib/unbound/config.h Deleted: stable/11/contrib/unbound/config.h Modified: stable/11/lib/libunbound/Makefile stable/11/usr.sbin/unbound/anchor/Makefile stable/11/usr.sbin/unbound/checkconf/Makefile stable/11/usr.sbin/unbound/control/Makefile stable/11/usr.sbin/unbound/daemon/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Added: stable/12/usr.sbin/unbound/config.h - copied unchanged from r356676, head/usr.sbin/unbound/config.h Deleted: stable/12/contrib/unbound/config.h Modified: stable/12/lib/libunbound/Makefile stable/12/usr.sbin/unbound/anchor/Makefile stable/12/usr.sbin/unbound/checkconf/Makefile stable/12/usr.sbin/unbound/control/Makefile stable/12/usr.sbin/unbound/daemon/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/11/lib/libunbound/Makefile ============================================================================== --- stable/11/lib/libunbound/Makefile Mon Jan 20 12:53:02 2020 (r356913) +++ stable/11/lib/libunbound/Makefile Mon Jan 20 13:46:09 2020 (r356914) @@ -13,6 +13,7 @@ PRIVATELIB= PACKAGE= unbound CFLAGS+= -I${UNBOUNDDIR} -I${LDNSDIR} -I${.OBJDIR} +CFLAGS+= -I${SRCTOP}/usr.sbin/unbound SRCS= alloc.c as112.c authzone.c autotrust.c cachedb.c config_file.c \ configlexer.l configparser.y context.c dname.c dns.c dns64.c \ Modified: stable/11/usr.sbin/unbound/anchor/Makefile ============================================================================== --- stable/11/usr.sbin/unbound/anchor/Makefile Mon Jan 20 12:53:02 2020 (r356913) +++ stable/11/usr.sbin/unbound/anchor/Makefile Mon Jan 20 13:46:09 2020 (r356914) @@ -10,6 +10,7 @@ EXPATDIR= ${SRCTOP}/contrib/expat PROG= local-unbound-anchor SRCS= unbound-anchor.c CFLAGS+= -I${UNBOUNDDIR} -I${LDNSDIR} -I${EXPATDIR}/lib +CFLAGS+= -I${.CURDIR:H} -I${.CURDIR} LIBADD= unbound bsdxml ssl crypto pthread MAN= local-unbound-anchor.8 Modified: stable/11/usr.sbin/unbound/checkconf/Makefile ============================================================================== --- stable/11/usr.sbin/unbound/checkconf/Makefile Mon Jan 20 12:53:02 2020 (r356913) +++ stable/11/usr.sbin/unbound/checkconf/Makefile Mon Jan 20 13:46:09 2020 (r356914) @@ -9,6 +9,7 @@ UNBOUNDDIR= ${SRCTOP}/contrib/unbound PROG= local-unbound-checkconf SRCS= ub_event.c unbound-checkconf.c worker_cb.c CFLAGS+= -I${UNBOUNDDIR} -I${LDNSDIR} +CFLAGS+= -I${.CURDIR:H} -I${.CURDIR} LIBADD= unbound pthread MAN= local-unbound-checkconf.8 Copied and modified: stable/11/usr.sbin/unbound/config.h (from r356913, stable/11/contrib/unbound/config.h) ============================================================================== --- stable/11/contrib/unbound/config.h Mon Jan 20 12:53:02 2020 (r356913, copy source) +++ stable/11/usr.sbin/unbound/config.h Mon Jan 20 13:46:09 2020 (r356914) @@ -1,5 +1,6 @@ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ +/* $FreeBSD$ */ /* apply the noreturn attribute to a function that exits the program */ #define ATTR_NORETURN __attribute__((__noreturn__)) Modified: stable/11/usr.sbin/unbound/control/Makefile ============================================================================== --- stable/11/usr.sbin/unbound/control/Makefile Mon Jan 20 12:53:02 2020 (r356913) +++ stable/11/usr.sbin/unbound/control/Makefile Mon Jan 20 13:46:09 2020 (r356914) @@ -9,6 +9,7 @@ UNBOUNDDIR= ${SRCTOP}/contrib/unbound PROG= local-unbound-control SRCS= ub_event.c unbound-control.c worker_cb.c CFLAGS+= -I${UNBOUNDDIR} -I${LDNSDIR} +CFLAGS+= -I${.CURDIR:H} -I${.CURDIR} LIBADD= unbound crypto ssl pthread MAN= local-unbound-control.8 Modified: stable/11/usr.sbin/unbound/daemon/Makefile ============================================================================== --- stable/11/usr.sbin/unbound/daemon/Makefile Mon Jan 20 12:53:02 2020 (r356913) +++ stable/11/usr.sbin/unbound/daemon/Makefile Mon Jan 20 13:46:09 2020 (r356914) @@ -10,6 +10,7 @@ PROG= local-unbound SRCS= acl_list.c cachedump.c daemon.c remote.c shm_main.c stats.c \ ub_event.c unbound.c worker.c CFLAGS+= -I${UNBOUNDDIR} -I${LDNSDIR} +CFLAGS+= -I${.CURDIR:H} -I${.CURDIR} LIBADD= unbound util ssl crypto pthread MAN= local-unbound.8 local-unbound.conf.5 From owner-svn-src-stable-11@freebsd.org Mon Jan 20 15:38:05 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF13B1FE26B; Mon, 20 Jan 2020 15:38:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 481bR15Pmrz4fSS; Mon, 20 Jan 2020 15:38:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B090725C0D; Mon, 20 Jan 2020 15:38:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00KFc5Ke028059; Mon, 20 Jan 2020 15:38:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00KFc5We028058; Mon, 20 Jan 2020 15:38:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202001201538.00KFc5We028058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 20 Jan 2020 15:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r356917 - in stable: 11/share/man/man7 12/share/man/man7 X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 11/share/man/man7 12/share/man/man7 X-SVN-Commit-Revision: 356917 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 15:38:06 -0000 Author: gjb Date: Mon Jan 20 15:38:05 2020 New Revision: 356917 URL: https://svnweb.freebsd.org/changeset/base/356917 Log: MFC r356792: Update release(7) to note OSRELEASE is only relevant when the 'install' target is invoked. While here, bump the sample output version name, and explicitly add the 'obj' target to avoid polluting the src checkout. PR: 243287 (related) Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: stable/11/share/man/man7/release.7 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/share/man/man7/release.7 Directory Properties: stable/12/ (props changed) Modified: stable/11/share/man/man7/release.7 ============================================================================== --- stable/11/share/man/man7/release.7 Mon Jan 20 15:19:56 2020 (r356916) +++ stable/11/share/man/man7/release.7 Mon Jan 20 15:38:05 2020 (r356917) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 28, 2018 +.Dd January 16, 2020 .Dt RELEASE 7 .Os .Sh NAME @@ -570,8 +570,10 @@ target invoked by Optional variables: .Bl -tag -width ".Ev TARGET_ARCH" .It Ev OSRELEASE -Optional base name for generated media images -.Pq e.g., FreeBSD-9.0-RC2-amd64 . +Optional base name for generated media images when invoking the +.Cm install +target +.Pq e.g., FreeBSD-12.1-RELEASE-amd64 . Defaults to the output of .Ic `uname -s`-`uname -r`-`uname -p` within the chroot. @@ -659,6 +661,7 @@ svn co svn://svn.freebsd.org/base/head src cd src make buildworld buildkernel cd release +make obj make release make install DESTDIR=/var/freebsd-snapshot .Ed From owner-svn-src-stable-11@freebsd.org Mon Jan 20 18:54:20 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E655B22348C; Mon, 20 Jan 2020 18:54:20 +0000 (UTC) (envelope-from loos@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 481gnS22Hdz4qlR; Mon, 20 Jan 2020 18:54:20 +0000 (UTC) (envelope-from loos@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 40DB01C3; Mon, 20 Jan 2020 18:54:20 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00KIsK7N048221; Mon, 20 Jan 2020 18:54:20 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00KIsJoo048219; Mon, 20 Jan 2020 18:54:19 GMT (envelope-from loos@FreeBSD.org) Message-Id: <202001201854.00KIsJoo048219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 20 Jan 2020 18:54:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r356923 - stable/11/sys/dev/uart X-SVN-Group: stable-11 X-SVN-Commit-Author: loos X-SVN-Commit-Paths: stable/11/sys/dev/uart X-SVN-Commit-Revision: 356923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 18:54:21 -0000 Author: loos Date: Mon Jan 20 18:54:19 2020 New Revision: 356923 URL: https://svnweb.freebsd.org/changeset/base/356923 Log: MFC r336623 by mmacy: Fixes the interrupt storm in UART during the boot on ARMADA38X. The missing attribution of ns8250->busy_detect breaks the UART support. Original commit log: Add busy detect quirk to list of console options This change allows one to set the busy_detect flag required by the synopsys UART at the loader prompt. This is needed by the EPYC 3000 SoC. This will give users a working console up to the point where getty is required: hw.uart.console="mm:0xfedc9000,rs:2,bd:1" Sponsored by: Rubicon Communications, LLC (Netgate) Modified: stable/11/sys/dev/uart/uart_dev_ns8250.c stable/11/sys/dev/uart/uart_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- stable/11/sys/dev/uart/uart_dev_ns8250.c Mon Jan 20 18:43:10 2020 (r356922) +++ stable/11/sys/dev/uart/uart_dev_ns8250.c Mon Jan 20 18:54:19 2020 (r356923) @@ -479,6 +479,7 @@ ns8250_bus_attach(struct uart_softc *sc) bas = &sc->sc_bas; + ns8250->busy_detect = bas->busy_detect; ns8250->mcr = uart_getreg(bas, REG_MCR); ns8250->fcr = FCR_ENABLE; if (!resource_int_value("uart", device_get_unit(sc->sc_dev), "flags", Modified: stable/11/sys/dev/uart/uart_subr.c ============================================================================== --- stable/11/sys/dev/uart/uart_subr.c Mon Jan 20 18:43:10 2020 (r356922) +++ stable/11/sys/dev/uart/uart_subr.c Mon Jan 20 18:54:19 2020 (r356923) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #define UART_TAG_RS 7 #define UART_TAG_SB 8 #define UART_TAG_XO 9 +#define UART_TAG_BD 10 static struct uart_class *uart_classes[] = { &uart_ns8250_class, @@ -122,6 +123,10 @@ uart_parse_tag(const char **p) { int tag; + if ((*p)[0] == 'b' && (*p)[1] == 'd') { + tag = UART_TAG_BD; + goto out; + } if ((*p)[0] == 'b' && (*p)[1] == 'r') { tag = UART_TAG_BR; goto out; @@ -177,6 +182,7 @@ out: * separated by commas. Each attribute is a tag-value pair with the tag and * value separated by a colon. Supported tags are: * + * bd = Busy Detect * br = Baudrate * ch = Channel * db = Data bits @@ -240,6 +246,9 @@ uart_getenv(int devtype, struct uart_devinfo *di, stru spec = cp; for (;;) { switch (uart_parse_tag(&spec)) { + case UART_TAG_BD: + di->bas.busy_detect = uart_parse_long(&spec); + break; case UART_TAG_BR: di->baudrate = uart_parse_long(&spec); break; From owner-svn-src-stable-11@freebsd.org Wed Jan 22 01:31:03 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99E052290FC; Wed, 22 Jan 2020 01:31:03 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 482SXl3Kjlz4Khp; Wed, 22 Jan 2020 01:31:03 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32F451DB65; Wed, 22 Jan 2020 01:31:03 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00M1V3e0057176; Wed, 22 Jan 2020 01:31:03 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00M1V3BD057175; Wed, 22 Jan 2020 01:31:03 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202001220131.00M1V3BD057175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Wed, 22 Jan 2020 01:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r356965 - stable/11/sys/ufs/ufs X-SVN-Group: stable-11 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: stable/11/sys/ufs/ufs X-SVN-Commit-Revision: 356965 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 01:31:03 -0000 Author: mckusick Date: Wed Jan 22 01:31:02 2020 New Revision: 356965 URL: https://svnweb.freebsd.org/changeset/base/356965 Log: MFC of 356627 Reset link counts after directory update failures Modified: stable/11/sys/ufs/ufs/ufs_lookup.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_lookup.c Wed Jan 22 01:28:37 2020 (r356964) +++ stable/11/sys/ufs/ufs/ufs_lookup.c Wed Jan 22 01:31:02 2020 (r356965) @@ -1167,6 +1167,7 @@ ufs_dirremove(dvp, ip, flags, isrmdir) struct inode *dp; struct direct *ep, *rep; struct buf *bp; + off_t offset; int error; dp = VTOI(dvp); @@ -1185,22 +1186,32 @@ ufs_dirremove(dvp, ip, flags, isrmdir) ip->i_flag |= IN_CHANGE; } } + if (flags & DOWHITEOUT) + offset = dp->i_offset; + else + offset = dp->i_offset - dp->i_count; + if ((error = UFS_BLKATOFF(dvp, offset, (char **)&ep, &bp)) != 0) { + if (ip) { + ip->i_effnlink++; + ip->i_flag |= IN_CHANGE; + if (DOINGSOFTDEP(dvp)) { + softdep_change_linkcnt(ip); + } else { + ip->i_nlink++; + DIP_SET(ip, i_nlink, ip->i_nlink); + ip->i_flag |= IN_CHANGE; + } + } + return (error); + } if (flags & DOWHITEOUT) { /* * Whiteout entry: set d_ino to WINO. */ - if ((error = - UFS_BLKATOFF(dvp, (off_t)dp->i_offset, (char **)&ep, &bp)) != 0) - return (error); ep->d_ino = WINO; ep->d_type = DT_WHT; goto out; } - - if ((error = UFS_BLKATOFF(dvp, - (off_t)(dp->i_offset - dp->i_count), (char **)&ep, &bp)) != 0) - return (error); - /* Set 'rep' to the entry being removed. */ if (dp->i_count == 0) rep = ep; @@ -1300,12 +1311,22 @@ ufs_dirrewrite(dp, oip, newinum, newtype, isrmdir) } error = UFS_BLKATOFF(vdp, (off_t)dp->i_offset, (char **)&ep, &bp); - if (error) - return (error); - if (ep->d_namlen == 2 && ep->d_name[1] == '.' && ep->d_name[0] == '.' && - ep->d_ino != oip->i_number) { + if (error == 0 && ep->d_namlen == 2 && ep->d_name[1] == '.' && + ep->d_name[0] == '.' && ep->d_ino != oip->i_number) { brelse(bp); - return (EIDRM); + error = EIDRM; + } + if (error) { + oip->i_effnlink++; + oip->i_flag |= IN_CHANGE; + if (DOINGSOFTDEP(vdp)) { + softdep_change_linkcnt(oip); + } else { + oip->i_nlink++; + DIP_SET(oip, i_nlink, oip->i_nlink); + oip->i_flag |= IN_CHANGE; + } + return (error); } ep->d_ino = newinum; if (!OFSFMT(vdp)) From owner-svn-src-stable-11@freebsd.org Wed Jan 22 15:51:25 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02AE61F3F27; Wed, 22 Jan 2020 15:51:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 482qdS5v08z4Bg3; Wed, 22 Jan 2020 15:51:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C578127D42; Wed, 22 Jan 2020 15:51:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00MFpO57082624; Wed, 22 Jan 2020 15:51:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00MFpOni082623; Wed, 22 Jan 2020 15:51:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202001221551.00MFpOni082623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 22 Jan 2020 15:51:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r356987 - stable/11/sys/compat/linuxkpi/common/src X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 356987 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 15:51:25 -0000 Author: markj Date: Wed Jan 22 15:51:24 2020 New Revision: 356987 URL: https://svnweb.freebsd.org/changeset/base/356987 Log: MFC r356760: Handle a NULL thread pointer in linux_close_file(). PR: 242913 Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Wed Jan 22 15:06:59 2020 (r356986) +++ stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Wed Jan 22 15:51:24 2020 (r356987) @@ -1502,6 +1502,9 @@ linux_file_close(struct file *file, struct thread *td) KASSERT(file_count(filp) == 0, ("File refcount(%d) is not zero", file_count(filp))); + if (td == NULL) + td = curthread; + error = 0; filp->f_flags = file->f_flag; linux_set_current(td); From owner-svn-src-stable-11@freebsd.org Wed Jan 22 22:51:56 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C47C0221280; Wed, 22 Jan 2020 22:51:56 +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 4830yh4v63z4f1L; Wed, 22 Jan 2020 22:51:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A33A24FB8; Wed, 22 Jan 2020 22:51:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00MMpuYT036545; Wed, 22 Jan 2020 22:51:56 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00MMpuTo036542; Wed, 22 Jan 2020 22:51:56 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202001222251.00MMpuTo036542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 22 Jan 2020 22:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357001 - in stable: 11/cddl/contrib/opensolaris/lib/libzfs/common 11/lib/libbe 12/cddl/contrib/opensolaris/lib/libzfs/common 12/lib/libbe X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/cddl/contrib/opensolaris/lib/libzfs/common 11/lib/libbe 12/cddl/contrib/opensolaris/lib/libzfs/common 12/lib/libbe X-SVN-Commit-Revision: 357001 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 22:51:56 -0000 Author: kevans Date: Wed Jan 22 22:51:55 2020 New Revision: 357001 URL: https://svnweb.freebsd.org/changeset/base/357001 Log: MFC r356876-r356877: add zfs_mount_at r356876: libzfs: add zfs_mount_at This will be used in libbe in place of the internal zmount(); libbe only wants to be able to mount a dataset at an arbitrary mountpoint without altering dataset/pool properties. The natural way to do this in a portable way is by creating a zfs_mount_at() interface that's effectively zfs_mount() + a mountpoint parameter. zfs_mount() is now a light wrapper around the new method. The interface and implementation have already been accepted into ZFS On Linux, and the next commit to switch libbe() over to this new interface will solve the last compatibility issue with ZoL. The next sysutils/openzfs rebase against ZoL should be able to build libbe/bectl with only minor adjustments to build glue. r356877: libbe: use the new zfs_mount_at() More background is available in r356876, but this new interface is more portable across ZFS implementations and cleaner for what libbe is attempting to achieve anyways. Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c stable/11/lib/libbe/be_access.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c stable/12/lib/libbe/be_access.c Directory Properties: stable/12/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed Jan 22 22:08:02 2020 (r357000) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed Jan 22 22:51:55 2020 (r357001) @@ -748,6 +748,7 @@ extern boolean_t zfs_bookmark_exists(const char *path) extern boolean_t is_mounted(libzfs_handle_t *, const char *special, char **); extern boolean_t zfs_is_mounted(zfs_handle_t *, char **); extern int zfs_mount(zfs_handle_t *, const char *, int); +extern int zfs_mount_at(zfs_handle_t *, const char *, int, const char *); extern int zfs_unmount(zfs_handle_t *, const char *, int); extern int zfs_unmountall(zfs_handle_t *, int); Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Wed Jan 22 22:08:02 2020 (r357000) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Wed Jan 22 22:51:55 2020 (r357001) @@ -301,6 +301,17 @@ zfs_is_mounted(zfs_handle_t *zhp, char **where) return (is_mounted(zhp->zfs_hdl, zfs_get_name(zhp), where)); } +static boolean_t +zfs_is_mountable_internal(zfs_handle_t *zhp, const char *mountpoint) +{ + + if (zfs_prop_get_int(zhp, ZFS_PROP_ZONED) && + getzoneid() == GLOBAL_ZONEID) + return (B_FALSE); + + return (B_TRUE); +} + /* * Returns true if the given dataset is mountable, false otherwise. Returns the * mountpoint in 'buf'. @@ -325,8 +336,7 @@ zfs_is_mountable(zfs_handle_t *zhp, char *buf, size_t if (zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT) == ZFS_CANMOUNT_OFF) return (B_FALSE); - if (zfs_prop_get_int(zhp, ZFS_PROP_ZONED) && - getzoneid() == GLOBAL_ZONEID) + if (!zfs_is_mountable_internal(zhp, buf)) return (B_FALSE); if (source) @@ -341,8 +351,19 @@ zfs_is_mountable(zfs_handle_t *zhp, char *buf, size_t int zfs_mount(zfs_handle_t *zhp, const char *options, int flags) { - struct stat buf; char mountpoint[ZFS_MAXPROPLEN]; + + if (!zfs_is_mountable(zhp, mountpoint, sizeof (mountpoint), NULL)) + return (0); + + return (zfs_mount_at(zhp, options, flags, mountpoint)); +} + +int +zfs_mount_at(zfs_handle_t *zhp, const char *options, int flags, + const char *mountpoint) +{ + struct stat buf; char mntopts[MNT_LINE_MAX]; libzfs_handle_t *hdl = zhp->zfs_hdl; @@ -357,8 +378,8 @@ zfs_mount(zfs_handle_t *zhp, const char *options, int if (zpool_get_prop_int(zhp->zpool_hdl, ZPOOL_PROP_READONLY, NULL)) flags |= MS_RDONLY; - if (!zfs_is_mountable(zhp, mountpoint, sizeof (mountpoint), NULL)) - return (0); + if (!zfs_is_mountable_internal(zhp, mountpoint)) + return (B_FALSE); /* Create the directory if it doesn't already exist */ if (lstat(mountpoint, &buf) != 0) { Modified: stable/11/lib/libbe/be_access.c ============================================================================== --- stable/11/lib/libbe/be_access.c Wed Jan 22 22:08:02 2020 (r357000) +++ stable/11/lib/libbe/be_access.c Wed Jan 22 22:51:55 2020 (r357001) @@ -82,7 +82,6 @@ be_mount_iter(zfs_handle_t *zfs_hdl, void *data) char *mountpoint; char tmp[BE_MAXPATHLEN], zfs_mnt[BE_MAXPATHLEN]; struct be_mount_info *info; - char opt; info = (struct be_mount_info *)data; @@ -121,9 +120,7 @@ be_mount_iter(zfs_handle_t *zfs_hdl, void *data) mountpoint); } - opt = '\0'; - if ((err = zmount(zfs_get_name(zfs_hdl), tmp, info->mntflags, - __DECONST(char *, MNTTYPE_ZFS), NULL, 0, &opt, 1)) != 0) { + if ((err = zfs_mount_at(zfs_hdl, NULL, info->mntflags, tmp)) != 0) { switch (errno) { case ENAMETOOLONG: return (set_error(info->lbh, BE_ERR_PATHLEN)); From owner-svn-src-stable-11@freebsd.org Thu Jan 23 06:06:33 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5A00B22DBFA; Thu, 23 Jan 2020 06:06:33 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 483Bc91nGFz49ZF; Thu, 23 Jan 2020 06:06:33 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33D9CA169; Thu, 23 Jan 2020 06:06:33 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00N66Ww0002744; Thu, 23 Jan 2020 06:06:32 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00N66W50002743; Thu, 23 Jan 2020 06:06:32 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202001230606.00N66W50002743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Thu, 23 Jan 2020 06:06:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357030 - stable/11/sys/ufs/ffs X-SVN-Group: stable-11 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: stable/11/sys/ufs/ffs X-SVN-Commit-Revision: 357030 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jan 2020 06:06:33 -0000 Author: mckusick Date: Thu Jan 23 06:06:32 2020 New Revision: 357030 URL: https://svnweb.freebsd.org/changeset/base/357030 Log: MFC of 356739 Optimize quota sync'ing Modified: stable/11/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_vfsops.c Thu Jan 23 06:02:52 2020 (r357029) +++ stable/11/sys/ufs/ffs/ffs_vfsops.c Thu Jan 23 06:06:32 2020 (r357030) @@ -1483,8 +1483,12 @@ ffs_sync_lazy(mp) allerror = 0; td = curthread; - if ((mp->mnt_flag & MNT_NOATIME) != 0) - goto qupdate; + if ((mp->mnt_flag & MNT_NOATIME) != 0) { +#ifdef QUOTA + qsync(mp); +#endif + goto sbupdate; + } MNT_VNODE_FOREACH_ACTIVE(vp, mp, mvp) { if (vp->v_type == VNON) { VI_UNLOCK(vp); @@ -1506,18 +1510,16 @@ ffs_sync_lazy(mp) if ((error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, td)) != 0) continue; +#ifdef QUOTA + qsyncvp(vp); +#endif if (sync_doupdate(ip)) error = ffs_update(vp, 0); if (error != 0) allerror = error; vput(vp); } - -qupdate: -#ifdef QUOTA - qsync(mp); -#endif - +sbupdate: if (VFSTOUFS(mp)->um_fs->fs_fmod != 0 && (error = ffs_sbupdate(VFSTOUFS(mp), MNT_LAZY, 0)) != 0) allerror = error; @@ -1610,6 +1612,9 @@ loop: } continue; } +#ifdef QUOTA + qsyncvp(vp); +#endif if ((error = ffs_syncvnode(vp, waitfor, 0)) != 0) allerror = error; vput(vp); @@ -1624,9 +1629,6 @@ loop: if (allerror == 0 && count) goto loop; } -#ifdef QUOTA - qsync(mp); -#endif devvp = ump->um_devvp; bo = &devvp->v_bufobj; From owner-svn-src-stable-11@freebsd.org Thu Jan 23 06:18:08 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB21722DFC8; Thu, 23 Jan 2020 06:18:08 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 483BsX44Rkz4BB9; Thu, 23 Jan 2020 06:18:08 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 86F62A32E; Thu, 23 Jan 2020 06:18:08 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00N6I8x7008565; Thu, 23 Jan 2020 06:18:08 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00N6I80e008564; Thu, 23 Jan 2020 06:18:08 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202001230618.00N6I80e008564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Thu, 23 Jan 2020 06:18:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357032 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 357032 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jan 2020 06:18:08 -0000 Author: mckusick Date: Thu Jan 23 06:18:08 2020 New Revision: 357032 URL: https://svnweb.freebsd.org/changeset/base/357032 Log: MFC of 356763 Remove call to VFS_SYNC() to avoid unmount livelock Modified: stable/11/sys/kern/vfs_mount.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_mount.c ============================================================================== --- stable/11/sys/kern/vfs_mount.c Thu Jan 23 06:11:25 2020 (r357031) +++ stable/11/sys/kern/vfs_mount.c Thu Jan 23 06:18:08 2020 (r357032) @@ -1435,9 +1435,7 @@ dounmount(struct mount *mp, int flags, struct thread * } vput(fsrootvp); } - if ((mp->mnt_flag & MNT_RDONLY) != 0 || (flags & MNT_FORCE) != 0 || - (error = VFS_SYNC(mp, MNT_WAIT)) == 0) - error = VFS_UNMOUNT(mp, flags); + error = VFS_UNMOUNT(mp, flags); vn_finished_write(mp); /* * If we failed to flush the dirty blocks for this mount point, From owner-svn-src-stable-11@freebsd.org Thu Jan 23 06:24:12 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A3C222E36A; Thu, 23 Jan 2020 06:24:12 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 483C0X2cqGz4Bgk; Thu, 23 Jan 2020 06:24:12 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55165A509; Thu, 23 Jan 2020 06:24:12 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00N6OCm0014536; Thu, 23 Jan 2020 06:24:12 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00N6OCXB014535; Thu, 23 Jan 2020 06:24:12 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202001230624.00N6OCXB014535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Thu, 23 Jan 2020 06:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357034 - stable/11/sys/ufs/ffs X-SVN-Group: stable-11 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: stable/11/sys/ufs/ffs X-SVN-Commit-Revision: 357034 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jan 2020 06:24:12 -0000 Author: mckusick Date: Thu Jan 23 06:24:11 2020 New Revision: 357034 URL: https://svnweb.freebsd.org/changeset/base/357034 Log: MFC of 356714 Fix DIRCHG panic Modified: stable/11/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_softdep.c Thu Jan 23 06:20:57 2020 (r357033) +++ stable/11/sys/ufs/ffs/ffs_softdep.c Thu Jan 23 06:24:11 2020 (r357034) @@ -9776,14 +9776,20 @@ handle_workitem_remove(dirrem, flags) /* * Move all dependencies waiting on the remove to complete * from the dirrem to the inode inowait list to be completed - * after the inode has been updated and written to disk. Any - * marked MKDIR_PARENT are saved to be completed when the .. ref - * is removed. + * after the inode has been updated and written to disk. + * + * Any marked MKDIR_PARENT are saved to be completed when the + * dotdot ref is removed unless DIRCHG is specified. For + * directory change operations there will be no further + * directory writes and the jsegdeps need to be moved along + * with the rest to be completed when the inode is free or + * stable in the inode free list. */ LIST_INIT(&dotdotwk); while ((wk = LIST_FIRST(&dirrem->dm_jwork)) != NULL) { WORKLIST_REMOVE(wk); - if (wk->wk_state & MKDIR_PARENT) { + if ((dirrem->dm_state & DIRCHG) == 0 && + wk->wk_state & MKDIR_PARENT) { wk->wk_state &= ~MKDIR_PARENT; WORKLIST_INSERT(&dotdotwk, wk); continue; From owner-svn-src-stable-11@freebsd.org Thu Jan 23 14:14:38 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B72F71F3765; Thu, 23 Jan 2020 14:14:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 483PRL4VMrz3CjW; Thu, 23 Jan 2020 14:14:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95778FE47; Thu, 23 Jan 2020 14:14:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00NEEcHp096709; Thu, 23 Jan 2020 14:14:38 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00NEEc4w096708; Thu, 23 Jan 2020 14:14:38 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202001231414.00NEEc4w096708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 23 Jan 2020 14:14:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357046 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 357046 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jan 2020 14:14:38 -0000 Author: markj Date: Thu Jan 23 14:14:38 2020 New Revision: 357046 URL: https://svnweb.freebsd.org/changeset/base/357046 Log: MFC r356563: UMA: Don't destroy zones after the system shutdown process starts. PR: 242427 Modified: stable/11/sys/vm/uma_core.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/uma_core.c ============================================================================== --- stable/11/sys/vm/uma_core.c Thu Jan 23 14:11:02 2020 (r357045) +++ stable/11/sys/vm/uma_core.c Thu Jan 23 14:14:38 2020 (r357046) @@ -153,6 +153,7 @@ static struct sx uma_drain_lock; static int booted = 0; #define UMA_STARTUP 1 #define UMA_STARTUP2 2 +#define UMA_SHUTDOWN 3 /* * This is the handle used to schedule events that need to happen @@ -247,6 +248,7 @@ static int hash_expand(struct uma_hash *, struct uma_h static void hash_free(struct uma_hash *hash); static void uma_timeout(void *); static void uma_startup3(void); +static void uma_shutdown(void); static void *zone_alloc_item(uma_zone_t, void *, int); static void zone_free_item(uma_zone_t, void *, void *, enum zfreeskip); static void bucket_enable(void); @@ -1849,10 +1851,6 @@ uma_startup2(void) #endif } -/* - * Initialize our callout handle - * - */ static void uma_startup3(void) @@ -1865,8 +1863,18 @@ uma_startup3(void) #ifdef UMA_DEBUG printf("UMA startup3 complete.\n"); #endif + + EVENTHANDLER_REGISTER(shutdown_post_sync, uma_shutdown, NULL, + EVENTHANDLER_PRI_FIRST); } +static void +uma_shutdown(void) +{ + + booted = UMA_SHUTDOWN; +} + static uma_keg_t uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit, uma_fini fini, int align, uint32_t flags) @@ -2085,6 +2093,14 @@ void uma_zdestroy(uma_zone_t zone) { + /* + * Large slabs are expensive to reclaim, so don't bother doing + * unnecessary work if we're shutting down. + */ + if (booted == UMA_SHUTDOWN && + zone->uz_fini == NULL && + zone->uz_release == (uma_release)zone_release) + return; sx_slock(&uma_drain_lock); zone_free_item(zones, zone, NULL, SKIP_NONE); sx_sunlock(&uma_drain_lock); From owner-svn-src-stable-11@freebsd.org Fri Jan 24 15:29:35 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A8ED1F36B7; Fri, 24 Jan 2020 15:29:35 +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 48433M0FZkz49p1; Fri, 24 Jan 2020 15:29:35 +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 F33422949E; Fri, 24 Jan 2020 15:29:34 +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 00OFTYxE095048; Fri, 24 Jan 2020 15:29:34 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00OFTXvc095041; Fri, 24 Jan 2020 15:29:33 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202001241529.00OFTXvc095041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 24 Jan 2020 15:29:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357082 - in stable: 11/etc/mtree 11/secure 11/secure/caroot 11/share/mk 11/usr.sbin 11/usr.sbin/certctl 11/usr.sbin/etcupdate 11/usr.sbin/mergemaster 12/etc/mtree 12/secure 12/secure/c... X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/etc/mtree 11/secure 11/secure/caroot 11/share/mk 11/usr.sbin 11/usr.sbin/certctl 11/usr.sbin/etcupdate 11/usr.sbin/mergemaster 12/etc/mtree 12/secure 12/secure/caroot 12/share/mk 12/usr.... X-SVN-Commit-Revision: 357082 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2020 15:29:35 -0000 Author: kevans Date: Fri Jan 24 15:29:33 2020 New Revision: 357082 URL: https://svnweb.freebsd.org/changeset/base/357082 Log: MFC r352948-r352951, r353002, r353066, r353070: caroot infrastructure Infrastructure only -- no plans in place currently to commit any certs to these branches. r352948: [1/3] Initial infrastructure for SSL root bundle in base This setup will add the trusted certificates from the Mozilla NSS bundle to base. This commit includes: - CAROOT option to opt out of installation of certs - mtree amendments for final destinations - infrastructure to fetch/update certs, along with instructions A follow-up commit will add a certctl(8) utility to give the user control over trust specifics. Another follow-up commit will actually commit the initial result of updatecerts. This work was done primarily by allanjude@, with minor contributions by myself. r352949: [2/3] Add certctl(8) This is a simple utility to hash all trusted on the system into /etc/ssl/certs. It also allows the user to blacklist certificates they do not trust. This work was done primarily by allanjude@, with minor contributions by myself. r352950: [3/3] etcupdate and mergemaster support for certctl This commit add support for certctl in mergemaster and etcupdate. Both will either rehash or prompt for rehash as new certificates are trusted/blacklisted. This work was done primarily by allanjude@, with minor contributions by myself. r352951: caroot: add @generated tags to extracted .pem As is the current trend; while these files are manually curated, they are still generated. If they end up in a review, it would be helpful to also take the hint and hide them. r353002: Unbreak etcupdate(8) and mergemaster(8) after r352950 r352950 introduced improper case fall-through for shell scripts. Fix it with a pipe. r353066: certctl(8): realpath the file before creating the symlink Otherwise we end up creating broken relative symlinks in /etc/ssl/blacklisted. r353070: certctl(8): let one blacklist based on hashed filenames It seems reasonable to allow, for instance: $ certctl list # reviews output -- ah, yeah, I don't trust that one $ certctl blacklist ce5e74ef.0 $ certctl rehash We can unambiguously determine what cert "ce5e74ef.0" refers to, and we've described it to them in `certctl list` output -- I see little sense in forcing another level of filesystem inspection to determien what cert file this physically corresponds to. Relnotes: yes Added: stable/11/secure/caroot/ - copied from r352951, head/secure/caroot/ stable/11/usr.sbin/certctl/ - copied from r352951, head/usr.sbin/certctl/ Modified: stable/11/etc/mtree/BSD.usr.dist stable/11/secure/Makefile stable/11/share/mk/src.opts.mk stable/11/usr.sbin/Makefile stable/11/usr.sbin/certctl/certctl.sh stable/11/usr.sbin/etcupdate/etcupdate.sh stable/11/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Added: stable/12/secure/caroot/ - copied from r352951, head/secure/caroot/ stable/12/usr.sbin/certctl/ - copied from r352951, head/usr.sbin/certctl/ Modified: stable/12/etc/mtree/BSD.usr.dist stable/12/secure/Makefile stable/12/share/mk/src.opts.mk stable/12/usr.sbin/Makefile stable/12/usr.sbin/certctl/certctl.sh stable/12/usr.sbin/etcupdate/etcupdate.sh stable/12/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/12/ (props changed) Modified: stable/11/etc/mtree/BSD.usr.dist ============================================================================== --- stable/11/etc/mtree/BSD.usr.dist Fri Jan 24 14:58:02 2020 (r357081) +++ stable/11/etc/mtree/BSD.usr.dist Fri Jan 24 15:29:33 2020 (r357082) @@ -178,6 +178,12 @@ uk_UA.KOI8-U .. .. + certs + blacklisted + .. + trusted + .. + .. dict .. doc Modified: stable/11/secure/Makefile ============================================================================== --- stable/11/secure/Makefile Fri Jan 24 14:58:02 2020 (r357081) +++ stable/11/secure/Makefile Fri Jan 24 15:29:33 2020 (r357082) @@ -10,6 +10,8 @@ SUBDIR_PARALLEL= _tests= tests .endif +SUBDIR.${MK_CAROOT}+= caroot + # These are the programs which depend on crypto, but not Kerberos. SPROGS= lib/libfetch lib/libpam lib/libradius lib/libtelnet \ bin/ed libexec/telnetd usr.bin/fetch usr.bin/telnet \ Modified: stable/11/share/mk/src.opts.mk ============================================================================== --- stable/11/share/mk/src.opts.mk Fri Jan 24 14:58:02 2020 (r357081) +++ stable/11/share/mk/src.opts.mk Fri Jan 24 15:29:33 2020 (r357082) @@ -68,6 +68,7 @@ __DEFAULT_YES_OPTIONS = \ BZIP2 \ CALENDAR \ CAPSICUM \ + CAROOT \ CASPER \ CCD \ CDDL \ Modified: stable/11/usr.sbin/Makefile ============================================================================== --- stable/11/usr.sbin/Makefile Fri Jan 24 14:58:02 2020 (r357081) +++ stable/11/usr.sbin/Makefile Fri Jan 24 15:29:33 2020 (r357082) @@ -124,6 +124,9 @@ SUBDIR.${MK_BLUETOOTH}+= bluetooth SUBDIR.${MK_BOOTPARAMD}+= bootparamd SUBDIR.${MK_BSDINSTALL}+= bsdinstall SUBDIR.${MK_BSNMP}+= bsnmpd +.if ${MK_CAROOT} != "no" +SUBDIR.${MK_OPENSSL}+= certctl +.endif SUBDIR.${MK_CTM}+= ctm SUBDIR.${MK_CXGBETOOL}+= cxgbetool SUBDIR.${MK_MLX5TOOL}+= mlx5tool Modified: stable/11/usr.sbin/certctl/certctl.sh ============================================================================== --- head/usr.sbin/certctl/certctl.sh Wed Oct 2 01:27:50 2019 (r352951) +++ stable/11/usr.sbin/certctl/certctl.sh Fri Jan 24 15:29:33 2020 (r357082) @@ -69,16 +69,26 @@ create_trusted_link() return 1 fi [ $VERBOSE -gt 0 ] && echo "Adding $hash.0 to trust store" - [ $NOOP -eq 0 ] && ln -fs "$1" "$CERTDESTDIR/$hash.0" + [ $NOOP -eq 0 ] && ln -fs $(realpath "$1") "$CERTDESTDIR/$hash.0" } create_blacklisted() { - local hash + local hash srcfile filename - hash=$( do_hash "$1" ) || return - [ $VERBOSE -gt 0 ] && echo "Adding $hash.0 to blacklist" - [ $NOOP -eq 0 ] && ln -fs "$1" "$BLACKLISTDESTDIR/$hash.0" + # If it exists as a file, we'll try that; otherwise, we'll scan + if [ -e "$1" ]; then + hash=$( do_hash "$1" ) || return + srcfile=$(realpath "$1") + filename="$hash.0" + elif [ -e "${CERTDESTDIR}/$1" ]; then + srcfile=$(realpath "${CERTDESTDIR}/$1") + filename="$1" + else + return + fi + [ $VERBOSE -gt 0 ] && echo "Adding $filename to blacklist" + [ $NOOP -eq 0 ] && ln -fs "$srcfile" "$BLACKLISTDESTDIR/$filename" } do_scan() Modified: stable/11/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- stable/11/usr.sbin/etcupdate/etcupdate.sh Fri Jan 24 14:58:02 2020 (r357081) +++ stable/11/usr.sbin/etcupdate/etcupdate.sh Fri Jan 24 15:29:33 2020 (r357082) @@ -595,6 +595,12 @@ post_install_file() NEWALIAS_WARN=yes fi ;; + /usr/share/certs/trusted/* | /usr/share/certs/blacklisted/*) + log "certctl rehash" + if [ -z "$dryrun" ]; then + env DESTDIR=${DESTDIR} certctl rehash >&3 2>&1 + fi + ;; /etc/login.conf) log "cap_mkdb ${DESTDIR}$1" if [ -z "$dryrun" ]; then Modified: stable/11/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/11/usr.sbin/mergemaster/mergemaster.sh Fri Jan 24 14:58:02 2020 (r357081) +++ stable/11/usr.sbin/mergemaster/mergemaster.sh Fri Jan 24 15:29:33 2020 (r357082) @@ -863,6 +863,9 @@ mm_install () { /etc/mail/aliases) NEED_NEWALIASES=yes ;; + /usr/share/certs/trusted/* | /usr/share/certs/blacklisted/*) + NEED_CERTCTL=yes + ;; /etc/login.conf) NEED_CAP_MKDB=yes ;; @@ -1331,6 +1334,23 @@ case "${NEED_PWD_MKDB}" in echo " '/usr/sbin/pwd_mkdb -p /etc/master.passwd'" echo " to rebuild your password files" run_it_now '/usr/sbin/pwd_mkdb -p /etc/master.passwd' + fi + ;; +esac + +case "${NEED_CERTCTL}" in +'') ;; +*) + echo '' + echo "*** You installed files in /etc/ssl/certs, so make sure that you run" + if [ -n "${DESTDIR}" ]; then + echo " 'env DESTDIR=${DESTDIR} /usr/sbin/certctl rehash'" + echo " to rebuild your certificate authority database" + run_it_now "env DESTDIR=${DESTDIR} /usr/sbin/certctl rehash" + else + echo " '/usr/sbin/certctl rehash'" + echo " to rebuild your certificate authority database" + run_it_now "/usr/sbin/certctl rehash" fi ;; esac From owner-svn-src-stable-11@freebsd.org Fri Jan 24 17:15:32 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 502121F5EEA; Fri, 24 Jan 2020 17:15:32 +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 4845Pc1Rjvz4Hrr; Fri, 24 Jan 2020 17:15:32 +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 2CD4B2A913; Fri, 24 Jan 2020 17:15:32 +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 00OHFWsD060693; Fri, 24 Jan 2020 17:15:32 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00OHFWnG060692; Fri, 24 Jan 2020 17:15:32 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202001241715.00OHFWnG060692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 24 Jan 2020 17:15:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357089 - in stable: 11/lib/libc/gen 12/lib/libc/gen X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/lib/libc/gen 12/lib/libc/gen X-SVN-Commit-Revision: 357089 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2020 17:15:32 -0000 Author: kevans Date: Fri Jan 24 17:15:31 2020 New Revision: 357089 URL: https://svnweb.freebsd.org/changeset/base/357089 Log: MFC 356951: posix_spawn: mark error as volatile In the case of an error, the RFSPAWN'd thread will write back to psa->error with the correct exit code. Mark this as volatile as the return value is being actively dorked up for erroneous exits on !x86. This fixes the following tests, tested on aarch64 (only under qemu, at the moment): - posix_spawn/spawn_test:t_spawn_missing - posix_spawn/spawn_test:t_spawn_nonexec - posix_spawn/spawn_test:t_spawn_zero Modified: stable/11/lib/libc/gen/posix_spawn.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/lib/libc/gen/posix_spawn.c Directory Properties: stable/12/ (props changed) Modified: stable/11/lib/libc/gen/posix_spawn.c ============================================================================== --- stable/11/lib/libc/gen/posix_spawn.c Fri Jan 24 17:11:54 2020 (r357088) +++ stable/11/lib/libc/gen/posix_spawn.c Fri Jan 24 17:15:31 2020 (r357089) @@ -199,7 +199,7 @@ struct posix_spawn_args { char * const * argv; char * const * envp; int use_env_path; - int error; + volatile int error; }; #if defined(__i386__) || defined(__amd64__) From owner-svn-src-stable-11@freebsd.org Sat Jan 25 04:48:48 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9371A232786; Sat, 25 Jan 2020 04:48:48 +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 484NnX3K7Bz449M; Sat, 25 Jan 2020 04:48:48 +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 546F22B99; Sat, 25 Jan 2020 04:48:48 +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 00P4mmdJ074548; Sat, 25 Jan 2020 04:48:48 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00P4mkS1074538; Sat, 25 Jan 2020 04:48:46 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202001250448.00P4mkS1074538@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 25 Jan 2020 04:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357105 - in stable/11/sys: amd64/linux amd64/linux32 compat/cloudabi32 compat/cloudabi64 compat/freebsd32 compat/svr4 i386/ibcs2 i386/linux kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/sys: amd64/linux amd64/linux32 compat/cloudabi32 compat/cloudabi64 compat/freebsd32 compat/svr4 i386/ibcs2 i386/linux kern X-SVN-Commit-Revision: 357105 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2020 04:48:48 -0000 Author: kevans Date: Sat Jan 25 04:48:46 2020 New Revision: 357105 URL: https://svnweb.freebsd.org/changeset/base/357105 Log: MFC r328560: Don't use an .OBJDIR for 'make sysent'. Modified: stable/11/sys/amd64/linux/Makefile stable/11/sys/amd64/linux32/Makefile stable/11/sys/compat/cloudabi32/Makefile stable/11/sys/compat/cloudabi64/Makefile stable/11/sys/compat/freebsd32/Makefile stable/11/sys/compat/svr4/Makefile stable/11/sys/i386/ibcs2/Makefile stable/11/sys/i386/linux/Makefile stable/11/sys/kern/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/linux/Makefile ============================================================================== --- stable/11/sys/amd64/linux/Makefile Sat Jan 25 03:52:16 2020 (r357104) +++ stable/11/sys/amd64/linux/Makefile Sat Jan 25 04:48:46 2020 (r357105) @@ -2,6 +2,9 @@ # # $FreeBSD$ +# Don't use an OBJDIR +.OBJDIR: ${.CURDIR} + all: @echo "make sysent only" Modified: stable/11/sys/amd64/linux32/Makefile ============================================================================== --- stable/11/sys/amd64/linux32/Makefile Sat Jan 25 03:52:16 2020 (r357104) +++ stable/11/sys/amd64/linux32/Makefile Sat Jan 25 04:48:46 2020 (r357105) @@ -2,6 +2,9 @@ # # $FreeBSD$ +# Don't use an OBJDIR +.OBJDIR: ${.CURDIR} + all: @echo "make sysent only" Modified: stable/11/sys/compat/cloudabi32/Makefile ============================================================================== --- stable/11/sys/compat/cloudabi32/Makefile Sat Jan 25 03:52:16 2020 (r357104) +++ stable/11/sys/compat/cloudabi32/Makefile Sat Jan 25 04:48:46 2020 (r357105) @@ -1,5 +1,8 @@ # $FreeBSD$ +# Don't use an OBJDIR +.OBJDIR: ${.CURDIR} + all: @echo "make sysent only" Modified: stable/11/sys/compat/cloudabi64/Makefile ============================================================================== --- stable/11/sys/compat/cloudabi64/Makefile Sat Jan 25 03:52:16 2020 (r357104) +++ stable/11/sys/compat/cloudabi64/Makefile Sat Jan 25 04:48:46 2020 (r357105) @@ -1,5 +1,8 @@ # $FreeBSD$ +# Don't use an OBJDIR +.OBJDIR: ${.CURDIR} + all: @echo "make sysent only" Modified: stable/11/sys/compat/freebsd32/Makefile ============================================================================== --- stable/11/sys/compat/freebsd32/Makefile Sat Jan 25 03:52:16 2020 (r357104) +++ stable/11/sys/compat/freebsd32/Makefile Sat Jan 25 04:48:46 2020 (r357105) @@ -2,6 +2,9 @@ # # $FreeBSD$ +# Don't use an OBJDIR +.OBJDIR: ${.CURDIR} + all: @echo "make sysent only" Modified: stable/11/sys/compat/svr4/Makefile ============================================================================== --- stable/11/sys/compat/svr4/Makefile Sat Jan 25 03:52:16 2020 (r357104) +++ stable/11/sys/compat/svr4/Makefile Sat Jan 25 04:48:46 2020 (r357105) @@ -2,6 +2,9 @@ # # $FreeBSD$ +# Don't use an OBJDIR +.OBJDIR: ${.CURDIR} + all: @echo "make sysent only" Modified: stable/11/sys/i386/ibcs2/Makefile ============================================================================== --- stable/11/sys/i386/ibcs2/Makefile Sat Jan 25 03:52:16 2020 (r357104) +++ stable/11/sys/i386/ibcs2/Makefile Sat Jan 25 04:48:46 2020 (r357105) @@ -2,6 +2,9 @@ # # $FreeBSD$ +# Don't use an OBJDIR +.OBJDIR: ${.CURDIR} + all: @echo "make sysent, isc_sysent or xenix_sysent only" Modified: stable/11/sys/i386/linux/Makefile ============================================================================== --- stable/11/sys/i386/linux/Makefile Sat Jan 25 03:52:16 2020 (r357104) +++ stable/11/sys/i386/linux/Makefile Sat Jan 25 04:48:46 2020 (r357105) @@ -2,6 +2,9 @@ # # $FreeBSD$ +# Don't use an OBJDIR +.OBJDIR: ${.CURDIR} + all: @echo "make sysent only" Modified: stable/11/sys/kern/Makefile ============================================================================== --- stable/11/sys/kern/Makefile Sat Jan 25 03:52:16 2020 (r357104) +++ stable/11/sys/kern/Makefile Sat Jan 25 04:48:46 2020 (r357105) @@ -1,7 +1,10 @@ # @(#)Makefile 8.2 (Berkeley) 3/21/94 # $FreeBSD$ - +# # Makefile for init_sysent + +# Don't use an OBJDIR +.OBJDIR: ${.CURDIR} all: @echo "make sysent only" From owner-svn-src-stable-11@freebsd.org Sat Jan 25 04:57:27 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F749232C45; Sat, 25 Jan 2020 04:57:27 +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 484NzW1KfWz44hP; Sat, 25 Jan 2020 04:57:27 +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 28D472D82; Sat, 25 Jan 2020 04:57:27 +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 00P4vRmI080172; Sat, 25 Jan 2020 04:57:27 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00P4vR8N080171; Sat, 25 Jan 2020 04:57:27 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202001250457.00P4vR8N080171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 25 Jan 2020 04:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357106 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 357106 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2020 04:57:27 -0000 Author: kevans Date: Sat Jan 25 04:57:26 2020 New Revision: 357106 URL: https://svnweb.freebsd.org/changeset/base/357106 Log: MFC r352919: Update cloudabi(32|64) sysents with "make sysent". Additionally, I've added svr4 which still exists in this branch. Modified: stable/11/Makefile.inc1 Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Sat Jan 25 04:48:46 2020 (r357105) +++ stable/11/Makefile.inc1 Sat Jan 25 04:57:26 2020 (r357106) @@ -1138,6 +1138,9 @@ makeman: .PHONY _sysent_dirs= sys/kern _sysent_dirs+= sys/compat/freebsd32 +_sysent_dirs+= sys/compat/svr4 +_sysent_dirs+= sys/compat/cloudabi32 \ + sys/compat/cloudabi64 _sysent_dirs+= sys/i386/ibcs2 _sysent_dirs+= sys/amd64/linux \ sys/amd64/linux32 \ From owner-svn-src-stable-11@freebsd.org Sat Jan 25 05:17:45 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1974F233479; Sat, 25 Jan 2020 05:17:45 +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 484PQw6x6Zz45gw; Sat, 25 Jan 2020 05:17:44 +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 E9205313E; Sat, 25 Jan 2020 05:17:44 +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 00P5HitW092892; Sat, 25 Jan 2020 05:17:44 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00P5HiLD092890; Sat, 25 Jan 2020 05:17:44 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202001250517.00P5HiLD092890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 25 Jan 2020 05:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357107 - in stable: 11/share/mk 12/share/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/share/mk 12/share/mk X-SVN-Commit-Revision: 357107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2020 05:17:45 -0000 Author: kevans Date: Sat Jan 25 05:17:44 2020 New Revision: 357107 URL: https://svnweb.freebsd.org/changeset/base/357107 Log: MFC r354968, r354976: Introduce, but do not use, bsd.sysdir.mk [Some sysent bits use bsd.sysdir.mk now, but I don't see a point in converting existing stuff] MFC r354968: Introduce bsd.sysdir.mk to consolidate looking for the kernel. MFC r354976: Install bsd.sysdir.mk Added: stable/11/share/mk/bsd.sysdir.mk - copied unchanged from r354968, head/share/mk/bsd.sysdir.mk Modified: stable/11/share/mk/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Added: stable/12/share/mk/bsd.sysdir.mk - copied unchanged from r354968, head/share/mk/bsd.sysdir.mk Modified: stable/12/share/mk/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/11/share/mk/Makefile ============================================================================== --- stable/11/share/mk/Makefile Sat Jan 25 04:57:26 2020 (r357106) +++ stable/11/share/mk/Makefile Sat Jan 25 05:17:44 2020 (r357107) @@ -52,6 +52,7 @@ FILES= \ bsd.subdir.mk \ bsd.symver.mk \ bsd.sys.mk \ + bsd.sysdir.mk \ bsd.test.mk \ dirdeps.mk \ gendirdeps.mk \ Copied: stable/11/share/mk/bsd.sysdir.mk (from r354968, head/share/mk/bsd.sysdir.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/share/mk/bsd.sysdir.mk Sat Jan 25 05:17:44 2020 (r357107, copy of r354968, head/share/mk/bsd.sysdir.mk) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +# Search for kernel source tree in standard places. +.if !defined(SYSDIR) +.for _dir in ${SRCTOP:D${SRCTOP}/sys} \ + ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ + ${.CURDIR}/../../../../.. /sys /usr/src/sys +.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) +SYSDIR= ${_dir:tA} +.endif +.endfor +.endif +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ + !exists(${SYSDIR}/conf/kmod.mk) +.error Unable to locate the kernel source tree. Set SYSDIR to override. +.endif From owner-svn-src-stable-11@freebsd.org Sat Jan 25 05:47:58 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B844823486D; Sat, 25 Jan 2020 05:47:58 +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 484Q5p5FMSz47ls; Sat, 25 Jan 2020 05:47:58 +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 AE31638B4; Sat, 25 Jan 2020 05:47:58 +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 00P5lwxr011148; Sat, 25 Jan 2020 05:47:58 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00P5luHL011137; Sat, 25 Jan 2020 05:47:56 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202001250547.00P5luHL011137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 25 Jan 2020 05:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357108 - in stable: 11/sys/amd64/linux 11/sys/amd64/linux32 11/sys/compat/cloudabi32 11/sys/compat/cloudabi64 11/sys/compat/freebsd32 11/sys/compat/svr4 11/sys/conf 11/sys/i386/ibcs2 1... X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/sys/amd64/linux 11/sys/amd64/linux32 11/sys/compat/cloudabi32 11/sys/compat/cloudabi64 11/sys/compat/freebsd32 11/sys/compat/svr4 11/sys/conf 11/sys/i386/ibcs2 11/sys/i386/linux 11/sys/k... X-SVN-Commit-Revision: 357108 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2020 05:47:58 -0000 Author: kevans Date: Sat Jan 25 05:47:56 2020 New Revision: 357108 URL: https://svnweb.freebsd.org/changeset/base/357108 Log: MFC r355473, r356540, r356604, r356868, r356937: sysent improvements The main motivation here being .ORDER to render -jN > 1 harmless; svr4/ibcs2 targets were also refactored a bit, but both are irregular and cannot use sysent.mk as-is due to differences in files generated. I have no interest in refactoring, since these are gone in head anyways. r355473: sysent: Reduce duplication and improve readability. Use the power of variable to avoid spelling out source and generated files too many times. The previous Makefiles were hard to read, hard to edit, and badly formatted. r356540: kern/Makefile: systrace_args.c is also generated r356604: Set .ORDER for makesyscalls generated files When either makesyscalls.lua or syscalls.master changes, all of the ${GENERATED} targets are now out-of-date. With make jobs > 1, this means we will run the makesyscalls script in parallel for the same ABI, generating the same set of output files. Prior to r356603 , there is a large window for interlacing output for some of the generated files that we were generating in-place rather than staging in a temp dir. After that, we still should't need to run the script more than once per-ABI as the first invocation should update all of them. Add .ORDER to do so cleanly. r356868: sysent targets: further cleanup and deduplication r355473 vastly improved the readability and cleanliness of these Makefiles. Every single one of them follows the same pattern and duplicates the exact same logic. Now that we have GENERATED/SRCS, split SRCS up into the two parameters we'll use for ${MAKESYSCALLS} rather than assuming a specific ordering of SRCS and include a common sysent.mk to handle the rest. This makes it less tedious to make sweeping changes. Some default values are provided for GENERATED/SYSENT_*; almost all of these just use a 'syscalls.master' and 'syscalls.conf' in cwd, and they all use effectively the same filenames with an arbitrary prefix. Most ABIs will be able to get away with just setting GENERATED_PREFIX and including ^/sys/conf/sysent.mk, while others only need light additions. kern/Makefile is the notable exception, as it doesn't take a SYSENT_CONF and the generated files are spread out between ^/sys/kern and ^/sys/sys, but it otherwise fits the pattern enough to use the common version. r356937: sysent.mk: split interpreter out of target command The main objective here is to make it easy to identify what needs to change in order to use a different sysent generator than the current Lua-based one, which may be used to MFC some of the changes that have happened so we can avoid parallel accidents in stable branches, for instance. As a secondary objective, it's now feasible to override the generator on a per-Makefile basis if needed, so that one could refactor their Makefile to use this while pinning generation to the legacy makesyscalls.sh. I don't anticipate any consistent need for such a thing, but it's low-effort to achieve. Added: stable/11/sys/conf/sysent.mk - copied, changed from r356868, head/sys/conf/sysent.mk Modified: stable/11/sys/amd64/linux/Makefile stable/11/sys/amd64/linux32/Makefile stable/11/sys/compat/cloudabi32/Makefile stable/11/sys/compat/cloudabi64/Makefile stable/11/sys/compat/freebsd32/Makefile stable/11/sys/compat/svr4/Makefile stable/11/sys/i386/ibcs2/Makefile stable/11/sys/i386/linux/Makefile stable/11/sys/kern/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Added: stable/12/sys/conf/sysent.mk - copied, changed from r356868, head/sys/conf/sysent.mk Modified: stable/12/sys/amd64/linux/Makefile stable/12/sys/amd64/linux32/Makefile stable/12/sys/arm64/linux/Makefile stable/12/sys/compat/cloudabi32/Makefile stable/12/sys/compat/cloudabi64/Makefile stable/12/sys/compat/freebsd32/Makefile stable/12/sys/i386/ibcs2/Makefile stable/12/sys/i386/linux/Makefile stable/12/sys/kern/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/amd64/linux/Makefile ============================================================================== --- stable/11/sys/amd64/linux/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/11/sys/amd64/linux/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -2,14 +2,6 @@ # # $FreeBSD$ -# Don't use an OBJDIR -.OBJDIR: ${.CURDIR} +GENERATED_PREFIX= linux_ -all: - @echo "make sysent only" - -sysent: linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c - -linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c: \ - ../../kern/makesyscalls.sh syscalls.master syscalls.conf - sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf +.include "../../conf/sysent.mk" Modified: stable/11/sys/amd64/linux32/Makefile ============================================================================== --- stable/11/sys/amd64/linux32/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/11/sys/amd64/linux32/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -2,14 +2,6 @@ # # $FreeBSD$ -# Don't use an OBJDIR -.OBJDIR: ${.CURDIR} +GENERATED_PREFIX= linux32_ -all: - @echo "make sysent only" - -sysent: linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c linux32_systrace_args.c - -linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c linux32_systrace_args.c: ../../kern/makesyscalls.sh \ - syscalls.master syscalls.conf - sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf +.include "../../conf/sysent.mk" Modified: stable/11/sys/compat/cloudabi32/Makefile ============================================================================== --- stable/11/sys/compat/cloudabi32/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/11/sys/compat/cloudabi32/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -1,17 +1,6 @@ # $FreeBSD$ -# Don't use an OBJDIR -.OBJDIR: ${.CURDIR} +SYSENT_FILE= ${SYSDIR}/contrib/cloudabi/syscalls32.master +GENERATED_PREFIX= cloudabi32_ -all: - @echo "make sysent only" - -sysent: cloudabi32_sysent.c cloudabi32_syscall.h cloudabi32_proto.h \ - cloudabi32_syscalls.c cloudabi32_systrace_args.c - -cloudabi32_sysent.c cloudabi32_syscall.h cloudabi32_proto.h \ - cloudabi32_syscalls.c cloudabi32_systrace_args.c: \ - ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls32.master \ - syscalls.conf - sh ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls32.master \ - syscalls.conf +.include "../../conf/sysent.mk" Modified: stable/11/sys/compat/cloudabi64/Makefile ============================================================================== --- stable/11/sys/compat/cloudabi64/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/11/sys/compat/cloudabi64/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -1,17 +1,6 @@ # $FreeBSD$ -# Don't use an OBJDIR -.OBJDIR: ${.CURDIR} +SYSENT_FILE= ${SYSDIR}/contrib/cloudabi/syscalls64.master +GENERATED_PREFIX= cloudabi64_ -all: - @echo "make sysent only" - -sysent: cloudabi64_sysent.c cloudabi64_syscall.h cloudabi64_proto.h \ - cloudabi64_syscalls.c cloudabi64_systrace_args.c - -cloudabi64_sysent.c cloudabi64_syscall.h cloudabi64_proto.h \ - cloudabi64_syscalls.c cloudabi64_systrace_args.c: \ - ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls64.master \ - syscalls.conf - sh ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls64.master \ - syscalls.conf +.include "../../conf/sysent.mk" Modified: stable/11/sys/compat/freebsd32/Makefile ============================================================================== --- stable/11/sys/compat/freebsd32/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/11/sys/compat/freebsd32/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -2,18 +2,6 @@ # # $FreeBSD$ -# Don't use an OBJDIR -.OBJDIR: ${.CURDIR} +GENERATED_PREFIX= freebsd32_ -all: - @echo "make sysent only" - -sysent: freebsd32_sysent.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c - -freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c : \ - ../../kern/makesyscalls.sh syscalls.master syscalls.conf capabilities.conf - sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf - -clean: - rm -f freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h - rm -f freebsd32_systrace_args.c +.include "../../conf/sysent.mk" Modified: stable/11/sys/compat/svr4/Makefile ============================================================================== --- stable/11/sys/compat/svr4/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/11/sys/compat/svr4/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -5,12 +5,18 @@ # Don't use an OBJDIR .OBJDIR: ${.CURDIR} +MAKESYSCALLS= ../../kern/makesyscalls.sh +GENERATED= svr4_sysent.c \ + svr4_syscall.h \ + svr4_syscallnames.c \ + svr4_proto.h + all: @echo "make sysent only" -sysent: svr4_sysent.c svr4_syscall.h svr4_proto.h +.ORDER: ${GENERATED} +sysent: ${GENERATED} -svr4_syscallnames.c svr4_sysent.c svr4_syscall.h svr4_proto.h: \ - ../../kern/makesyscalls.sh syscalls.master syscalls.conf - sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf +${GENERATED}: ${MAKESYSCALLS} syscalls.master syscalls.conf + sh ${MAKESYSCALLS} syscalls.master syscalls.conf Copied and modified: stable/11/sys/conf/sysent.mk (from r356868, head/sys/conf/sysent.mk) ============================================================================== --- head/sys/conf/sysent.mk Sat Jan 18 20:37:45 2020 (r356868, copy source) +++ stable/11/sys/conf/sysent.mk Sat Jan 25 05:47:56 2020 (r357108) @@ -21,8 +21,11 @@ SYSENT_CONF?= syscalls.conf # and set GENERATED. SRCS+= ${SYSENT_FILE} SRCS+= ${SYSENT_CONF} -MAKESYSCALLS= ${SYSDIR}/tools/makesyscalls.lua +MAKESYSCALLS_INTERP?= sh +MAKESYSCALLS_SCRIPT?= ${SYSDIR}/kern/makesyscalls.sh +MAKESYSCALLS= ${MAKESYSCALLS_INTERP} ${MAKESYSCALLS_SCRIPT} + all: @echo "make sysent only" @@ -31,5 +34,5 @@ all: .ORDER: ${GENERATED} sysent: ${GENERATED} -${GENERATED}: ${MAKESYSCALLS} ${SRCS} - ${LUA} ${MAKESYSCALLS} ${SYSENT_FILE} ${SYSENT_CONF} +${GENERATED}: ${MAKESYSCALLS_SCRIPT} ${SRCS} + ${MAKESYSCALLS} ${SYSENT_FILE} ${SYSENT_CONF} Modified: stable/11/sys/i386/ibcs2/Makefile ============================================================================== --- stable/11/sys/i386/ibcs2/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/11/sys/i386/ibcs2/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -5,23 +5,32 @@ # Don't use an OBJDIR .OBJDIR: ${.CURDIR} +MAKESYSCALLS= ../../kern/makesyscalls.sh +BASE_GENERATED= ibcs2_syscall.h \ + ibcs2_sysent.c \ + ibcs2_proto.h +ISC_GENERATED= ibcs2_isc_syscall.h \ + ibcs2_isc_sysent.c +XENIX_GENERATED= ibcs2_xenix_syscall.h \ + ibcs2_xenix_sysent.c \ + ibcs2_xenix_proto.h + all: @echo "make sysent, isc_sysent or xenix_sysent only" -sysent: ibcs2_sysent.c ibcs2_syscall.h ibcs2_proto.h +.ORDER: ${BASE_GENERATED} +.ORDER: ${ISC_GENERATED} +.ORDER: ${XENIX_GENERATED} -ibcs2_sysent.c ibcs2_syscall.h ibcs2_proto.h: ../../kern/makesyscalls.sh \ - syscalls.master syscalls.conf - sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf +sysent: ${BASE_GENERATED} +isc_sysent: ${ISC_GENERATED} +xenix_sysent: ${XENIX_GENERATED} -isc_sysent: ibcs2_isc_sysent.c ibcs2_isc_syscall.h +${BASE_GENERATED}: ${MAKESYSCALLS} syscalls.master syscalls.conf + sh ${MAKESYSCALLS} syscalls.master syscalls.conf -ibcs2_isc_sysent.c ibcs2_isc_syscall.h : ../../kern/makesyscalls.sh \ - syscalls.isc syscalls.isc.conf - sh ../../kern/makesyscalls.sh syscalls.isc syscalls.isc.conf +${ISC_GENERATED}: ${MAKESYSCALLS} syscalls.isc syscalls.isc.conf + sh ${MAKESYSCALLS} syscalls.isc syscalls.isc.conf -xenix_sysent: ibcs2_xenix_sysent.c ibcs2_xenix_syscall.h ibcs2_xenix.h - -ibcs2_xenix_sysent.c ibcs2_xenix_syscall.h ibcs2_xenix.h: \ - ../../kern/makesyscalls.sh syscalls.xenix syscalls.xenix.conf - sh ../../kern/makesyscalls.sh syscalls.xenix syscalls.xenix.conf +${XENIX_GENERATED}: ${MAKESYSCALLS} syscalls.xenix syscalls.xenix.conf + sh ${MAKESYSCALLS} syscalls.xenix syscalls.xenix.conf Modified: stable/11/sys/i386/linux/Makefile ============================================================================== --- stable/11/sys/i386/linux/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/11/sys/i386/linux/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -2,14 +2,6 @@ # # $FreeBSD$ -# Don't use an OBJDIR -.OBJDIR: ${.CURDIR} +GENERATED_PREFIX= linux_ -all: - @echo "make sysent only" - -sysent: linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c - -linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c: \ - ../../kern/makesyscalls.sh syscalls.master syscalls.conf - sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf +.include "../../conf/sysent.mk" Modified: stable/11/sys/kern/Makefile ============================================================================== --- stable/11/sys/kern/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/11/sys/kern/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -3,16 +3,12 @@ # # Makefile for init_sysent -# Don't use an OBJDIR -.OBJDIR: ${.CURDIR} +SYSENT_CONF= +GENERATED= init_sysent.c \ + syscalls.c \ + systrace_args.c \ + ${SYSDIR}/sys/syscall.h \ + ${SYSDIR}/sys/syscall.mk \ + ${SYSDIR}/sys/sysproto.h -all: - @echo "make sysent only" - -sysent: init_sysent.c syscalls.c ../sys/syscall.h ../sys/syscall.mk \ -../sys/sysproto.h - -init_sysent.c syscalls.c systrace_args.c ../sys/syscall.h \ -../sys/syscall.mk ../sys/sysproto.h: makesyscalls.sh syscalls.master \ -capabilities.conf - sh makesyscalls.sh syscalls.master +.include "../conf/sysent.mk" From owner-svn-src-stable-11@freebsd.org Sat Jan 25 05:52:33 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 01AC7234BED; Sat, 25 Jan 2020 05:52:33 +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 484QC46Hmwz48LR; Sat, 25 Jan 2020 05:52:32 +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 D35763AFC; Sat, 25 Jan 2020 05:52:32 +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 00P5qWge016934; Sat, 25 Jan 2020 05:52:32 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00P5qVD4016929; Sat, 25 Jan 2020 05:52:31 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202001250552.00P5qVD4016929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 25 Jan 2020 05:52:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357109 - in stable: 11/sys/i386/ibcs2 12/sys/i386/ibcs2 X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/sys/i386/ibcs2 12/sys/i386/ibcs2 X-SVN-Commit-Revision: 357109 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2020 05:52:33 -0000 Author: kevans Date: Sat Jan 25 05:52:31 2020 New Revision: 357109 URL: https://svnweb.freebsd.org/changeset/base/357109 Log: Regenerate ibcs2 sysent targets, NFC Direct commit; these hadn't been regenerated in a wihle, and it's nice to see no diff going forward in case these get tweaked a little bit more for conventions. Unlikely. Modified: stable/11/sys/i386/ibcs2/ibcs2_isc_syscall.h stable/11/sys/i386/ibcs2/ibcs2_isc_sysent.c stable/11/sys/i386/ibcs2/ibcs2_xenix.h stable/11/sys/i386/ibcs2/ibcs2_xenix_syscall.h stable/11/sys/i386/ibcs2/ibcs2_xenix_sysent.c Changes in other areas also in this revision: Modified: stable/12/sys/i386/ibcs2/ibcs2_isc_syscall.h stable/12/sys/i386/ibcs2/ibcs2_isc_sysent.c stable/12/sys/i386/ibcs2/ibcs2_xenix.h stable/12/sys/i386/ibcs2/ibcs2_xenix_syscall.h stable/12/sys/i386/ibcs2/ibcs2_xenix_sysent.c Modified: stable/11/sys/i386/ibcs2/ibcs2_isc_syscall.h ============================================================================== --- stable/11/sys/i386/ibcs2/ibcs2_isc_syscall.h Sat Jan 25 05:47:56 2020 (r357108) +++ stable/11/sys/i386/ibcs2/ibcs2_isc_syscall.h Sat Jan 25 05:52:31 2020 (r357109) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.isc 160798 2006-07-28 19:05:28Z jhb */ #define IBCS2_ISC_ibcs2_rename 2 Modified: stable/11/sys/i386/ibcs2/ibcs2_isc_sysent.c ============================================================================== --- stable/11/sys/i386/ibcs2/ibcs2_isc_sysent.c Sat Jan 25 05:47:56 2020 (r357108) +++ stable/11/sys/i386/ibcs2/ibcs2_isc_sysent.c Sat Jan 25 05:52:31 2020 (r357109) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.isc 160798 2006-07-28 19:05:28Z jhb */ #include Modified: stable/11/sys/i386/ibcs2/ibcs2_xenix.h ============================================================================== --- stable/11/sys/i386/ibcs2/ibcs2_xenix.h Sat Jan 25 05:47:56 2020 (r357108) +++ stable/11/sys/i386/ibcs2/ibcs2_xenix.h Sat Jan 25 05:52:31 2020 (r357109) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.xenix 160798 2006-07-28 19:05:28Z jhb */ #ifndef _IBCS2_XENIX_H_ @@ -12,8 +11,10 @@ #include #include #include +#include #include #include +#include #include @@ -134,6 +135,12 @@ int xenix_utsname(struct thread *, struct xenix_utsnam #endif /* COMPAT_FREEBSD7 */ + + +#ifdef COMPAT_FREEBSD10 + + +#endif /* COMPAT_FREEBSD10 */ #define IBCS2_XENIX_AUE_xenix_rdchk AUE_NULL #define IBCS2_XENIX_AUE_xenix_chsize AUE_FTRUNCATE Modified: stable/11/sys/i386/ibcs2/ibcs2_xenix_syscall.h ============================================================================== --- stable/11/sys/i386/ibcs2/ibcs2_xenix_syscall.h Sat Jan 25 05:47:56 2020 (r357108) +++ stable/11/sys/i386/ibcs2/ibcs2_xenix_syscall.h Sat Jan 25 05:52:31 2020 (r357109) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.xenix 160798 2006-07-28 19:05:28Z jhb */ #define IBCS2_XENIX_xenix_rdchk 7 Modified: stable/11/sys/i386/ibcs2/ibcs2_xenix_sysent.c ============================================================================== --- stable/11/sys/i386/ibcs2/ibcs2_xenix_sysent.c Sat Jan 25 05:47:56 2020 (r357108) +++ stable/11/sys/i386/ibcs2/ibcs2_xenix_sysent.c Sat Jan 25 05:52:31 2020 (r357109) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.xenix 160798 2006-07-28 19:05:28Z jhb */ #include From owner-svn-src-stable-11@freebsd.org Sat Jan 25 09:22:29 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2287323A115; Sat, 25 Jan 2020 09:22:29 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 484VsK08X1z4JVs; Sat, 25 Jan 2020 09:22:29 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 005856225; Sat, 25 Jan 2020 09:22:29 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00P9MSIK041252; Sat, 25 Jan 2020 09:22:28 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00P9MSYh041233; Sat, 25 Jan 2020 09:22:28 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202001250922.00P9MSYh041233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sat, 25 Jan 2020 09:22:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357112 - stable/11/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sys/net X-SVN-Commit-Revision: 357112 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2020 09:22:29 -0000 Author: eugen Date: Sat Jan 25 09:22:28 2020 New Revision: 357112 URL: https://svnweb.freebsd.org/changeset/base/357112 Log: MFC r356863: ifa_maintain_loopback_route: adjust debugging output Modified: stable/11/sys/net/if.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if.c ============================================================================== --- stable/11/sys/net/if.c Sat Jan 25 09:12:20 2020 (r357111) +++ stable/11/sys/net/if.c Sat Jan 25 09:22:28 2020 (r357112) @@ -1831,9 +1831,13 @@ ifa_maintain_loopback_route(int cmd, const char *otype error = rtrequest1_fib(cmd, &info, NULL, ifp->if_fib); - if (error != 0) - log(LOG_DEBUG, "%s: %s failed for interface %s: %u\n", - __func__, otype, if_name(ifp), error); + if (error == 0 || + (cmd == RTM_ADD && error == EEXIST) || + (cmd == RTM_DELETE && (error == ENOENT || error == ESRCH))) + return (error); + + log(LOG_DEBUG, "%s: %s failed for interface %s: %u\n", + __func__, otype, if_name(ifp), error); return (error); }